/* ================================================================
   Mobile & Tablet RWD  (max-width: 768px = mobile, 1024px = tablet)
   ================================================================ */

/* ── Nav ── */

@media (max-width: 1100px) {
  html, body {
    overflow-x: hidden;
  }

  /* Hide nav links, show hamburger */
  nav > div:nth-child(2) {
    display: none;
  }
  nav {
    justify-content: space-between;
    padding: 12px 20px;
  }
  .nav-logo {
    height: 44px;
  }
  .nav-hamburger {
    display: grid;
    place-items: center;
    cursor: pointer;
    padding: 6px;
    z-index: 200;
    background: none;
    border: none;
    color: #1a1a1a;
  }
  .nav-hamburger svg {
    width: 26px;
    height: 26px;
  }

  /* 右側滑入選單 */
  .mobile-menu {
    position: fixed;
    top: 0;
    right: 0;
    bottom: 0;
    width: 260px;
    max-width: 70vw;
    background: #ffffff;
    z-index: 150;
    padding: 60px 24px 32px;
    box-shadow: -8px 0 40px rgba(0,0,0,0.12);
    transform: translateX(100%);
    transition: transform 0.35s cubic-bezier(0.4,0,0.2,1);
    display: flex;
    flex-direction: column;
    overflow-y: auto;
    gap: 0;
  }
  .mobile-menu.open {
    transform: translateX(0);
  }
  /* 背景遮罩 */
  .mobile-menu-backdrop {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.4);
    z-index: 140;
  }
  .mobile-menu-backdrop.open { display: block; }

  .mobile-menu a {
    display: block;
    font-size: 14px;
    font-weight: 600;
    color: #1a1a1a;
    text-decoration: none;
    text-transform: uppercase;
    letter-spacing: 1px;
    padding: 12px 0;
    border-bottom: 1px solid rgba(0,0,0,0.07);
  }
  .mobile-menu a:last-child { border-bottom: none; }
  .mobile-menu a.nav-cta {
    background: #ecad29;
    color: #1a1a1a !important;
    padding: 10px 20px;
    border-radius: 99px;
    text-align: center;
    margin-top: 12px;
    border-bottom: none;
    font-size: 13px;
  }
  .mobile-menu-close {
    position: absolute;
    top: 14px;
    right: 14px;
    font-size: 18px;
    cursor: pointer;
    color: #555;
    background: none;
    border: none;
    line-height: 1;
    padding: 6px;
  }
}


/* ── Sub-pages ── */
@media (max-width: 768px) {
  .page-main {
    padding: 100px 60px 60px;
  }
  .page-title {
    font-size: 36px;
  }

  /* Services: 手風琴列表 — 每個服務項目一列，點擊展開內容，一次只開一個 */
  .pricing-layout {
    grid-template-columns: 1fr;
    border: none;
    border-radius: 0;
    box-shadow: none;
    min-height: auto;
  }
  .pricing-tabs {
    flex-direction: column;
    padding: 0;
    gap: 10px;
    background: transparent;
  }
  .pricing-tab {
    width: 100%;
    padding: 14px 16px;
    background: #1a1a1a;
    border-radius: 10px;
    position: relative;
  }
  .pricing-tab::after {
    content: "+";
    position: absolute;
    right: 16px;
    top: 50%;
    transform: translateY(-50%);
    color: #ffffff88;
    font-size: 18px;
    font-weight: 300;
  }
  .pricing-tab.active::after { content: "−"; color: #ecad29; }
  .tab-name { font-size: 14px; }
  .tab-price { font-size: 12px; }
  .pricing-panel {
    padding: 20px 16px;
    display: none;
    visibility: visible;
    grid-column: 1;
    grid-row: auto;
    margin-top: -4px;
    border: 1px solid rgba(0,0,0,0.08);
    border-top: none;
    border-radius: 0 0 10px 10px;
  }
  .pricing-panel.active { display: block; }
  .panel-top {
    flex-direction: column;
    gap: 12px;
    margin-bottom: 16px;
    padding-bottom: 16px;
  }
  .panel-title { font-size: 20px; }
  .panel-subtitle { font-size: 13px; }
  .panel-price-block { text-align: left; }
  .panel-amount { font-size: 26px; }
  .panel-min { font-size: 11px; }
  .panel-rules li { font-size: 13px; }

  .equipment-row {
    grid-template-columns: 1fr;
  }

  /* About: single column */
  .about-section { flex-direction: column; gap: 12px; }
  .about-info { padding: 20px; }
  .about-info-item { flex-direction: column; gap: 4px; }

  /* QA accordion */
  .accordion-question { font-size: 14px; }
  .accordion-body { padding-left: 0; }
  .accordion-item.open .accordion-body { padding-left: 0; }

  /* Notice */
  .notice-item { gap: 16px; }
  .notice-index { font-size: 24px; min-width: 40px; }

  /* Calendar */
  .cal-page { overflow-y: auto !important; }
  .cal-wrap {
    padding: 80px 52px 40px;
    height: auto !important;
    display: block !important;
  }
  .cal-header-row { margin-bottom: 12px; }
  .cal-title-area h1 { font-size: 22px; }
  .cal-title-area .page-label { font-size: 10px; }
  .cal-month-label { font-size: 16px; min-width: 100px; }
  .cal-nav-btn { width: 30px; height: 30px; }
  .cal-nav-btn svg { width: 14px; height: 14px; }
  .cal-grid {
    flex: none !important;
    width: 100%;
    height: auto !important;
  }
  .cal-grid, .cal-grid tbody { height: auto !important; }
  .cal-grid tr { height: auto !important; }
  .cal-grid th {
    font-size: 9px;
    padding: 6px 0;
    letter-spacing: 0;
  }
  .cal-day {
    height: 72px !important;
    padding: 4px 3px;
    vertical-align: top;
  }
  .day-num { font-size: 11px; margin-bottom: 2px; }
  .day-event {
    font-size: 9px;
    padding: 1px 2px;
    gap: 3px;
  }
  .day-event::before { width: 5px; height: 5px; }
  .evt-time { font-size: 9px; }
}

/* ── Social float: mobile ── */
@media (max-width: 768px) {
  .social-float {
    right: -2px;
    top: 50%;
    bottom: auto;
    transform: translateY(-50%);
    gap: 8px;
  }
  .social-btn {
    padding: 11px 14px;
    font-size: 13px;
    transform: translateX(calc(100% - 48px));
  }
  .social-btn svg {
    width: 22px;
    height: 22px;
  }

  /* Page content: add right padding to avoid social button overlap */
  .page-main {
    padding-right: 60px;
  }
  .cal-wrap {
    padding-right: 52px;
  }
  .svc-wrap {
    padding-right: 60px;
  }
}

/* ── Tablet adjustments ── */
@media (min-width: 769px) and (max-width: 1024px) {
  .pricing-layout {
    grid-template-columns: 180px 1fr;
  }
  .equipment-row {
    grid-template-columns: 1fr;
  }
  .about-info-item { gap: 12px; }
  .service-cards {
    grid-template-columns: 1fr 1fr;
  }
}

/* ── Mobile menu: narrower on small phones ── */
@media (max-width: 480px) {
  .mobile-menu {
    width: 55vw;
    max-width: 200px;
  }
}

/* ── Social float: two-tap expand on touch devices ── */
@media (max-width: 1100px) {
  .social-btn.expanded {
    transform: translateX(0) !important;
    box-shadow: -4px 4px 20px rgba(0,0,0,0.28);
  }
}

