/* =========================================================
   CLASS NISEKO - Optimized Minimal Premium CSS
   - Single-file
   - Preserves all HTML & JS hooks (class/id names unchanged)
   - Systematic variables, spacing, shadows, radii
========================================================= */

/* ---------------------------------------------------------
   Design Tokens (variables)
--------------------------------------------------------- */
:root {
    /* Colors */
    --black: #0b0b0b;
    --white: #ffffff;
    --accent: #8b0000;
    /* red */
    --muted: #7a7a7a;
    /* text muted */
    --text: #111111;
    --text-soft: #222222;
    --border: #e6e6e6;

    /* Radii */
    --radius-sm: 8px;
    --radius: 12px;
    --radius-lg: 24px;

    /* Spacing scale */
    --space-xs: 8px;
    --space-sm: 12px;
    --space-md: 20px;
    --space-lg: 28px;
    --space-xl: 36px;

    /* Header */
    --header-h: 64px;

    /* Shadows */
    --shadow-sm: 0 4px 12px rgba(10, 10, 10, 0.06);
    --shadow-md: 0 10px 30px rgba(10, 10, 10, 0.08);
    --shadow-lg: 0 18px 50px rgba(10, 10, 10, 0.10);

    /* Backgrounds */
    --bg: var(--black);
    --surface: var(--white);
    --section-dark: var(--bg);
    --section-light: var(--surface);
}

/* ---------------------------------------------------------
   Reset & Base
--------------------------------------------------------- */
* {
    box-sizing: border-box
}

html,
body {
    margin: 0;
    height: 100%;
    font-family: 'Inter', sans-serif;
    background: var(--section-light);
    color: var(--text);
    -webkit-font-smoothing: antialiased;
    scroll-behavior: smooth
}

a {
    color: inherit;
    text-decoration: none
}

img {
    max-width: 100%;
    height: auto
}

button {
    font-family: inherit
}

/* ---------------------------------------------------------
   Layout helpers
--------------------------------------------------------- */
/* ----------------------------------
   Anchor offset for fixed header
---------------------------------- */
section {
    scroll-margin-top: calc(var(--header-h) + 16px);
}

.container {
    max-width: 1100px;
    margin: 0 auto;
    padding: 0 var(--space-md)
}

.section {
    padding: 72px 20px
}

/* vertical rhythm helper */
.section--compact {
    padding: 48px 16px
}

/* card base to unify card styles */
.card-base {
    background: var(--section-light);
    border-radius: var(--radius);
    box-shadow: var(--shadow-sm);
    border: 1px solid rgba(0, 0, 0, 0.04);
}

/* ---------------------------------------------------------
   Header / Navigation
--------------------------------------------------------- */
header {
    position: fixed;
    overflow: visible;
    top: 0;
    left: 0;
    width: 100%;
    height: var(--header-h);
    display: flex;
    align-items: center;
    padding: 0 28px;
    background: rgba(11, 11, 11, 0.95);
    color: var(--surface);
    z-index: 1200;

    transition:
        background .25s ease,
        backdrop-filter .25s ease,
        box-shadow .22s ease;

    -webkit-backdrop-filter: blur(0px);
    /* Safari / iOS */
    backdrop-filter: blur(0px);
}

/* header scrolled state */
header.scrolled {
    background: rgba(11, 11, 11, 0.98);
    box-shadow: 0 6px 18px rgba(0, 0, 0, 0.18);

    -webkit-backdrop-filter: blur(4px);
    backdrop-filter: blur(4px);
}


/* logo */
.logo {
    font-weight: 700;
    font-size: 20px;
    letter-spacing: .3px;
    color: var(--surface)
}

/* nav links (desktop) */
.nav-links {
    display: flex;
    gap: 28px;
    margin-left: auto
}

.nav-links a {
    font-weight: 600;
    opacity: .95;
    color: var(--surface);
    padding: 8px 4px;
    border-radius: 6px;
    line-height: 1.2;
    transition: color .18s ease, background .18s ease
}

.nav-links a:hover {
    color: var(--accent);
    background: rgba(255, 255, 255, 0.03)
}

/* hamburger — structurally correct */
.hamburger {
    margin-left: auto;
    position: relative;
    width: 44px;
    height: 44px;
    cursor: pointer;
    z-index: 1100;
    display: none;
}

.hamburger span {
    position: absolute;
    left: 50%;
    top: 50%;
    width: 24px;
    height: 2px;
    background: var(--surface);
    border-radius: 2px;
    transform-origin: center;
    transition: transform .28s ease, opacity .2s ease;
}

/* 初始狀態：兩條線分開 */
.hamburger span:nth-child(1) {
    transform: translate(-50%, -4px);
}

.hamburger span:nth-child(2) {
    transform: translate(-50%, 4px);
}

/* active → X（完全在盒內） */
.hamburger.active span:nth-child(1) {
    transform: translate(-50%, 0) rotate(45deg);
}

.hamburger.active span:nth-child(2) {
    transform: translate(-50%, 0) rotate(-45deg);
}

/* mobile nav (slide from right) */
.mobile-nav {
    position: fixed;
    top: 0;
    right: -100%;
    width: 70%;
    max-width: 320px;
    height: 100vh;
    background: var(--section-dark);
    display: flex;
    flex-direction: column;
    padding: 80px 20px;
    transition: right .35s ease;
    z-index: 1000;
}

.mobile-nav a {
    margin: 12px 0;
    font-size: 18px;
    color: var(--surface)
}

.mobile-nav.active {
    right: 0
}

@media (max-width: 768px) {
    header {
        padding: 0 20px;
    }

    .hamburger {
        display: flex;
    }

    .nav-links {
        display: none;
    }
}

/* ---------------------------------------------------------
   Hero
--------------------------------------------------------- */
.hero {
    margin-top: var(--header-h);
    height: calc(100vh - var(--header-h));
    display: flex;
    justify-content: center;
    align-items: center;
    text-align: center;
    background:
        linear-gradient(180deg, rgba(0, 0, 0, 0.28), rgba(0, 0, 0, 0.48)),
        url('https://images.unsplash.com/photo-1674297026373-6e2b74da47b6?fm=jpg&q=80&w=2400') center/cover no-repeat;
    color: var(--surface);
    position: relative;
}

.hero .inner {
    z-index: 5;
    max-width: 980px;
    padding: 28px
}

.hero h1 {
    font-size: clamp(28px, 5vw, 44px);
    margin: 0;
    font-weight: 700;
    letter-spacing: 1px
}

.hero p {
    margin-top: 14px;
    font-size: 1.05rem;
    color: rgba(255, 255, 255, 0.95)
}

/* hero buttons wrapper */
.hero-buttons {
    display: flex;
    gap: 14px;
    justify-content: center;
    flex-wrap: wrap;
    margin-top: 18px
}

/* ---------------------------------------------------------
   Buttons (Unified system)
--------------------------------------------------------- */
/* base */
.btn {
    display: inline-block;
    padding: 12px 26px;
    border-radius: 10px;
    font-weight: 700;
    cursor: pointer;
    transition: transform .18s ease, box-shadow .18s ease, opacity .12s ease;
    border: 0;
    background: transparent;
    color: inherit;
    text-align: center;
}

/* dark primary (used for add course etc.) */
.btn--dark {
    background: var(--black);
    color: var(--surface);
    box-shadow: var(--shadow-sm)
}

/* accent (red) for critical CTA (submit) */
.btn--accent {
    background: var(--accent);
    color: var(--surface);
    box-shadow: var(--shadow-sm)
}

/* outline */
.btn--outline {
    background: transparent;
    border: 1.5px solid rgba(0, 0, 0, 0.06);
    color: var(--text-soft)
}

/* Helpers to keep backward compatibility with your classes */
.btn-primary {
    /* your old class */
    background: var(--accent);
    color: var(--surface);
    box-shadow: var(--shadow-sm)
}

.btn-outline {
    border: 2px solid rgba(255, 255, 255, 0.95);
    color: var(--surface);
    background: transparent
}

/* hover */
.btn:hover {
    transform: translateY(-3px)
}

.btn--accent:hover,
.btn-primary:hover {
    opacity: .95
}

.btn--dark:hover,
#addCourseBtn:hover {
    opacity: .95
}

/* ---------------------------------------------------------
   Sections & Containers
--------------------------------------------------------- */
section {
    padding: 72px 20px
}

.container {
    max-width: 1100px;
    margin: 0 auto;
    padding: 0 var(--space-md)
}

.fade-wrap {
    overflow: hidden
}

/* ---------------------------------------------------------
   Cards / Course Cards
--------------------------------------------------------- */
.course-cards {
    display: flex;
    gap: 20px;
    flex-wrap: wrap
}

.card {
    flex: 1 1 300px;
    background: var(--section-light);
    border-radius: var(--radius);
    padding: 20px;
    box-shadow: var(--shadow-sm);
    transition: transform .28s, box-shadow .28s
}

.card:hover {
    transform: translateY(-8px);
    box-shadow: var(--shadow-md)
}

/* pricing grid */
.pricing-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 28px;
    margin-top: 32px;
    padding: 0 12px
}

.price-card {
    position: relative;
    padding: 32px 28px;
    border-radius: var(--radius-lg);
    background: var(--section-light);
    box-shadow: var(--shadow-sm);
    border: 1px solid rgba(0, 0, 0, 0.06);
    transition: transform .25s ease
}

.price-card:hover {
    transform: translateY(-6px)
}

/* price card typography */
.price-card h3 {
    font-size: 1.45rem;
    font-weight: 700;
    margin-bottom: 8px;
    color: var(--text)
}

.price-card .date {
    color: var(--muted);
    font-size: 0.95rem;
    margin-bottom: 20px
}

.price-card ul {
    list-style: none;
    padding: 0;
    margin: 0
}

.price-card li {
    padding: 10px 0;
    font-size: 1rem;
    border-bottom: 1px solid rgba(0, 0, 0, 0.06);
    display: flex;
    justify-content: space-between;
    align-items: center
}

.price-card li strong {
    color: var(--accent)
}

.btn--outline.instagram {
    border: 1.5px solid rgba(0, 0, 0, 0.25);
    color: var(--text-soft);
    background: transparent;
}

.btn--outline.instagram:hover {
    background: var(--accent);
    border-color: var(--accent);
    color: #fff;
}

/* ---------------------------------------------------------
   Reservation Form (new) — unified & safe
   - preserves all .course-item, #addCourseBtn, .delete-course, .time-slot, .btn-submit
--------------------------------------------------------- */
.reservation .card-form {
    background: var(--section-light);
    padding: 26px;
    border-radius: var(--radius);
    max-width: 760px;
    margin: 0 auto;
    box-shadow: var(--shadow-md)
}

/* heading & labels */
.reservation h2 {
    text-align: center;
    font-size: 1.9rem;
    font-weight: 700;
    color: var(--text);
    margin: 0 0 12px
}

.reservation label {
    display: block;
    margin-bottom: 6px;
    font-weight: 600;
    color: var(--text-soft);
    font-size: 0.95rem
}

/* inputs unified */
.reservation input,
.reservation select,
.reservation textarea {
    width: 100%;
    padding: 12px;
    border-radius: 10px;
    border: 1px solid var(--border);
    font-size: 15px;
    margin-bottom: 14px;
    background: var(--surface)
}

.reservation textarea {
    min-height: 100px;
    resize: vertical;
    padding-top: 10px
}

/* iOS / Safari 專用：修正 date input 撐高問題 */
.reservation input[type="date"],
.reservation input[type="time"] {
    height: 44px;
    line-height: 44px;
    /* ⭐ 關鍵 */
    padding: 0 6px;
    /* ⭐ 關鍵：不要上下 padding */
    font-size: 15px;
    box-sizing: border-box;
}

/* course-item (derived from card-base with slight differences) */
.course-item {
    background: var(--surface);
    padding: 22px;
    border-radius: var(--radius);
    border: 1px solid rgba(0, 0, 0, 0.06);
    box-shadow: var(--shadow-sm);
    margin-bottom: 28px;
}

.course-item h3 {
    margin: 0 0 14px 0;
    color: var(--accent);
    font-size: 1.1rem;
    font-weight: 700
}

/* time-slot hidden by default (JS toggles display) */
.time-slot {
    margin-top: 8px;
    display: none;
}

.time-slot.is-visible {
    display: block;
}

/* delete button — minimal outline red */
.delete-course {
    margin-top: 14px;
    padding: 8px 14px;
    border-radius: 8px;
    font-size: 14px;
    background: transparent;
    border: 1.5px solid var(--accent);
    color: var(--accent);
    cursor: pointer;
}

.delete-course:hover {
    background: var(--accent);
    color: var(--surface)
}

/* add course button — uses unified button styling but kept ID selector for JS */
#addCourseBtn {
    margin-top: 14px;
    width: 100%;
    padding: 14px;
    background: var(--black);
    border: none;
    border-radius: 10px;
    color: var(--surface);
    font-weight: 700;
    font-size: 16px;
    cursor: pointer;
    box-shadow: var(--shadow-sm)
}

#addCourseBtn:hover {
    opacity: .94
}

/* submit button — accent red (keeps .btn-submit selector for JS) */
.btn-submit {
    padding: 14px 18px;
    border-radius: 10px;
    background: var(--accent);
    color: var(--surface);
    font-weight: 700;
    border: none;
    cursor: pointer;
    font-size: 18px;
    width: 100%;
    margin-top: 14px;
}

.btn-submit:hover {
    opacity: .95
}

/* thank you block */
.thankyou {
    display: none;
    padding: 36px;
    text-align: center;
    color: var(--bg)
}

/* small helper for form split */
.course-split {
    border: 0;
    border-bottom: 1px solid rgba(0, 0, 0, 0.06);
    margin: 18px 0
}

/* ---------------------------------------------------------
   FAQ styles (simple, readable)
--------------------------------------------------------- */
.faq-section {
    padding: 48px 20px
}

.faq-item {
    margin-bottom: 18px
}

.faq-question {
    cursor: pointer;
    font-weight: 700;
    margin: 0 0 6px
}

.faq-answer {
    margin: 0;
    color: var(--text-soft)
}

/* ---------------------------------------------------------
   Contact Section
--------------------------------------------------------- */
.contact-section {
    padding: 56px 20px;
    background: var(--section-light);
    text-align: center;
}

.contact-section h2 {
    font-size: 1.6rem;
    font-weight: 700;
    margin-bottom: 12px;
}

.contact-desc {
    color: var(--muted);
    margin-bottom: 28px;
    line-height: 1.6;
}

.contact-links {
    display: flex;
    justify-content: center;
    gap: 16px;
    flex-wrap: wrap;
}

.contact-actions {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
    margin-top: 16px;
    justify-content: center;
    max-width: 420px;
    margin-left: auto;
    margin-right: auto;
}

/* 基本按鈕 */
.contact-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 16px;
    border-radius: 10px;
    font-weight: 600;
    font-size: 15px;
    border: 1px solid rgba(0, 0, 0, 0.15);
    color: var(--text-soft);
    background: #fff;
    transition: background .2s ease, transform .15s ease;
}

/* icon 本體 */
.contact-btn .icon {
    font-size: 14px;
    opacity: .8;
}

/* hover */
.contact-btn:hover {
    transform: translateY(-1px);
    background: #f4f4f4;
}

@media (max-width: 480px) {
    .contact-actions {
        gap: 10px;
        flex-direction: column;
        align-items: stretch;
    }

    .contact-btn {
        justify-content: center;
    }
}

/* ---------------------------------------------------------
   Footer
--------------------------------------------------------- */
/* ===============================
   Footer
================================ */
.site-footer {
  background: #080808;
  color: rgba(255,255,255,0.9);
  padding: 48px 20px 36px;
  text-align: center;
}

.footer-inner {
  max-width: 960px;
  margin: 0 auto;
}

/* 品牌區 */
.footer-brand {
  margin-bottom: 20px;
}

.footer-logo {
  font-weight: 700;
  letter-spacing: 1px;
  font-size: 15px;
}

.footer-tagline {
  font-size: 13px;
  color: rgba(255,255,255,0.6);
  margin-top: 6px;
}

/* 連結區（IG / LINE / Email） */
.footer-links {
  display: flex;
  align-items: center;          /* ⭐ 關鍵：統一垂直置中 */
  justify-content: center;
  flex-wrap: wrap;
  gap: 8px;

  font-size: 14px;
  margin-bottom: 20px;
}

/* 所有項目統一成 inline-flex，避免基準線問題 */
.footer-links a,
.footer-email {
  display: inline-flex;         /* ⭐ 關鍵 */
  align-items: center;          /* ⭐ 關鍵 */
  color: rgba(255,255,255,0.9);
  font-weight: 600;
  text-decoration: none;
}

/* hover */
.footer-links a:hover {
  text-decoration: underline;
}

/* 分隔點 */
.footer-links .dot {
  opacity: 0.5;
  margin: 0 6px;
}

/* Email（只保留可選取，不做位移） */
.footer-email {
  user-select: text;
  cursor: text;
}

/* copyright */
.footer-copy {
  font-size: 12px;
  color: rgba(255,255,255,0.45);
}
/* ---------------------------------------------------------
   Fade-up animation (used by JS IntersectionObserver)
--------------------------------------------------------- */
.fade-up {
    opacity: 0;
    transform: translateY(18px);
    transition: opacity .6s ease, transform .6s ease
}

.fade-up.in {
    opacity: 1;
    transform: none
}

/* ---------------------------------------------------------
   Accessibility touches
--------------------------------------------------------- */
a:focus,
button:focus,
input:focus,
select:focus,
textarea:focus {
    outline: 3px solid rgba(139, 0, 0, 0.12);
    outline-offset: 2px
}

/* ---------------------------------------------------------
   Responsive
   - ensures hamburger shows on mobile and nav-links hidden
--------------------------------------------------------- */
@media (max-width: 1024px) {
    .pricing-grid {
        gap: 20px
    }
}

@media (max-width: 768px) {
    .hamburger {
        display: flex
    }

    .nav-links {
        display: none
    }

    .hero {
        height: auto;
        padding: var(--space-xl) 20px 60px
    }

    .hero .inner {
        padding: 8px
    }

    .course-cards {
        flex-direction: column;
        align-items: center
    }

    .container {
        padding: 0 16px
    }

    .reservation .card-form {
        padding: 20px
    }

    .price-card {
        border-radius: var(--radius);
        padding: 20px
    }
}

/* ---------------------------------------------------------
   Minor utility classes (kept small)
--------------------------------------------------------- */
.text-center {
    text-align: center
}

.mt-sm {
    margin-top: var(--space-sm)
}

.mt-md {
    margin-top: var(--space-md)
}

.hidden {
    display: none
}