/*
==============================================
とまりぎ薬局 レスポンシブスタイルシート
==============================================
*/

/* タブレット（1199px以下）
==============================================*/
@media (max-width: 1199px) {
  :root {
    --font-size-h1: 32px;
    --font-size-h2: 28px;
    --font-size-h3: 24px;
  }

  .features-grid,
  .home-care-grid,
  .staff-grid,
  .benefits-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .access-content {
    grid-template-columns: 1fr;
  }
}

/* タブレット（768px以下）
==============================================*/
@media (max-width: 767px) {
  :root {
    --font-size-h1: 28px;
    --font-size-h2: 24px;
    --font-size-h3: 20px;
    --font-size-h4: 18px;
    --font-size-base: 15px;
    --spacing-lg: 32px;
    --spacing-xl: 48px;
    --spacing-xxl: 64px;
  }

  /* ヘッダー */
  .header-container {
    flex-wrap: wrap;
  }

  .site-logo {
    width: 100%;
    justify-content: center;
    margin-bottom: var(--spacing-sm);
  }

  .site-logo img {
    height: 40px;
  }

  .site-title {
    font-size: 20px;
  }

  /* ナビゲーション */
  .main-navigation {
    width: 100%;
  }

  .main-navigation ul {
    display: none;
    flex-direction: column;
    width: 100%;
    gap: 0;
    background-color: var(--color-bg-main);
    box-shadow: var(--shadow-md);
    border-radius: var(--border-radius);
  }

  .main-navigation ul.active {
    display: flex;
  }

  .main-navigation li {
    width: 100%;
    border-bottom: 1px solid var(--color-border);
  }

  .main-navigation li:last-child {
    border-bottom: none;
  }

  .main-navigation a {
    display: block;
    padding: var(--spacing-sm);
    width: 100%;
  }

  .menu-toggle {
    display: block;
    margin-left: auto;
  }

  .menu-toggle.active span:nth-child(1) {
    transform: translateY(8px) rotate(45deg);
  }

  .menu-toggle.active span:nth-child(2) {
    opacity: 0;
  }

  .menu-toggle.active span:nth-child(3) {
    transform: translateY(-8px) rotate(-45deg);
  }

  /* ヒーローセクション */
  .hero-section {
    min-height: 500px;
  }

  .hero-container {
    min-height: 500px;
  }

  .hero-title {
    font-size: 28px;
  }

  .hero-subtitle {
    font-size: 18px;
  }

  .hero-buttons {
    flex-direction: column;
    align-items: stretch;
  }

  .hero-buttons .btn {
    width: 100%;
  }

  /* グリッドレイアウト */
  .features-grid,
  .home-care-grid,
  .staff-grid,
  .benefits-grid,
  .positions-list,
  .facility-gallery {
    grid-template-columns: 1fr;
  }

  .footer-widgets {
    grid-template-columns: 1fr;
  }

  /* お知らせ */
  .news-item {
    flex-direction: column;
    gap: var(--spacing-xs);
  }

  .news-date {
    font-size: 12px;
  }

  /* アクセス */
  .access-content {
    grid-template-columns: 1fr;
  }

  .pharmacy-info-table th {
    width: 40%;
  }

  /* フッター */
  .footer-bottom-content {
    flex-direction: column;
    text-align: center;
  }

  .footer-legal-links {
    justify-content: center;
  }

  /* ボタン */
  .btn {
    width: 100%;
    min-width: auto;
  }

  .contact-cta-buttons,
  .recruitment-cta-buttons {
    flex-direction: column;
  }

  .contact-cta-buttons .btn,
  .recruitment-cta-buttons .btn {
    width: 100%;
  }

  /* テーブル */
  .pharmacy-info-table,
  .notice-table {
    font-size: var(--font-size-small);
  }

  .pharmacy-info-table th,
  .pharmacy-info-table td,
  .notice-table th,
  .notice-table td {
    padding: var(--spacing-xs);
  }

  /* お問い合わせフォーム */
  .contact-form {
    padding: var(--spacing-md);
  }

  /* 前後の記事ナビゲーション */
  .post-navigation {
    flex-direction: column;
    gap: var(--spacing-md);
  }

  .post-navigation a {
    font-size: var(--font-size-small);
  }

  /* ページネーション */
  .pagination .page-numbers {
    padding: 6px 10px;
    font-size: var(--font-size-small);
  }
}

/* スマートフォン小（480px以下）
==============================================*/
@media (max-width: 480px) {
  :root {
    --container-padding: 15px;
    --spacing-md: 16px;
    --spacing-lg: 24px;
    --spacing-xl: 32px;
  }

  .hero-section {
    min-height: 400px;
  }

  .hero-container {
    min-height: 400px;
  }

  .hero-title {
    font-size: 24px;
  }

  .hero-subtitle {
    font-size: 16px;
  }

  .section {
    padding: var(--spacing-lg) 0;
  }

  .section-title {
    font-size: 24px;
  }

  .btn {
    padding: 12px 24px;
    font-size: 14px;
  }

  .feature-icon,
  .home-care-icon {
    width: 60px;
    height: 60px;
    font-size: 28px;
  }

  .pharmacy-info-table th,
  .notice-table th {
    display: block;
    width: 100%;
    border-bottom: none;
  }

  .pharmacy-info-table td,
  .notice-table td {
    display: block;
    width: 100%;
  }

  .pharmacy-info-table tr,
  .notice-table tr {
    display: block;
    margin-bottom: var(--spacing-sm);
    border: 1px solid var(--color-border);
    border-radius: var(--border-radius);
    overflow: hidden;
  }

  .contact-phone-number {
    font-size: 28px;
  }

  .back-to-top {
    width: 45px;
    height: 45px;
    bottom: var(--spacing-sm);
    right: var(--spacing-sm);
  }
}

/* 印刷用スタイル
==============================================*/
@media print {
  .site-header,
  .site-footer,
  .back-to-top,
  .hero-buttons,
  .news-more,
  .contact-cta-section,
  .recruitment-cta-section,
  .menu-toggle,
  .breadcrumb {
    display: none !important;
  }

  body {
    font-size: 12pt;
    line-height: 1.5;
    color: #000;
    background: #fff;
  }

  .container {
    max-width: 100%;
    padding: 0;
  }

  .section {
    padding: 20pt 0;
    page-break-inside: avoid;
  }

  .page-hero {
    background: none;
    color: #000;
    border-bottom: 2pt solid #000;
  }

  .page-title {
    color: #000;
  }

  a {
    color: #000;
    text-decoration: underline;
  }

  .card {
    box-shadow: none;
    border: 1pt solid #ccc;
  }

  .notice-section {
    page-break-inside: avoid;
  }

  .pharmacy-info-table,
  .notice-table {
    border-collapse: collapse;
    width: 100%;
  }

  .pharmacy-info-table th,
  .pharmacy-info-table td,
  .notice-table th,
  .notice-table td {
    border: 1pt solid #000;
    padding: 5pt;
  }
}

/* アクセシビリティ: 縮小モーション設定
==============================================*/
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}

/* ダークモード対応（オプション）
==============================================*/
@media (prefers-color-scheme: dark) {
  /* 将来的にダークモードを実装する場合のための骨組み */
  /* 現時点では実装しない */
}

/* 高コントラストモード対応
==============================================*/
@media (prefers-contrast: high) {
  :root {
    --color-text: #000000;
    --color-bg-main: #FFFFFF;
    --color-border: #000000;
  }

  .btn {
    border: 2px solid currentColor;
  }

  .card {
    border: 2px solid var(--color-border);
  }
}
