
/* ================= YOUR GLOBAL THEME SYSTEM ================= */
:root {
    --bg: #fff1df;
    --surface: #fff7ef;
    --surface-strong: #ffffff;
    --surface-dark: #a5431a;
    --ink: #351b12;
    --muted: #765142;
    --accent: #ff9f1c;
    --accent-deep: #e85d04;
    --line: rgba(53, 27, 18, 0.13);
    --shadow: 0 24px 70px rgba(120, 52, 16, 0.14);
}

[data-theme="dark"] {
    --bg: #110906;
    --surface: #1a100c;
    --surface-strong: #20130e;
    --surface-dark: #130c09;
    --ink: #fff7f0;
    --muted: #e3c8b9;
    --accent: #ffb15c;
    --accent-deep: #ff7a1a;
    --line: rgba(89, 55, 38, 0.78);
    --shadow: 0 24px 70px rgba(0, 0, 0, 0.34);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }

body {
    margin: 0;
    font-family: "Segoe UI", "Helvetica Neue", sans-serif;
    color: var(--ink);
    background:
        radial-gradient(circle at top right, rgba(255, 177, 92, 0.28), transparent 28rem),
        radial-gradient(circle at left top, rgba(232, 93, 4, 0.18), transparent 24rem),
        radial-gradient(circle at 20% 95%, rgba(0, 185, 212, 0.12), transparent 22rem),
        var(--bg);
    line-height: 1.55;
    overflow-x: hidden;
}

a { color: inherit; text-decoration: none; }
img { max-width: 100%; height: auto; }

.container {
    width: min(1120px, calc(100% - 2rem));
    margin: 0 auto;
}

/* ================= HEADER (with hide on scroll) ================= */
.site-header {
    position: sticky;
    top: 0;
    z-index: 20;
    backdrop-filter: blur(10px);
    background: var(--surface-strong);
    border-bottom: 1px solid var(--line);
    transition: transform 0.4s ease, opacity 0.4s ease;
}
[data-theme="dark"] .site-header {
    background: rgba(19, 12, 9, 0.92);
}

/* Navbar hidden state */
.site-header.is-hidden {
    transform: translateY(-100%);
    opacity: 0;
}
/* Navbar visible state */
.site-header.is-visible {
    transform: translateY(0);
    opacity: 1;
}

.header-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    min-height: 72px;
}

.brand {
    display: inline-flex;
    align-items: center;
    font-size: 1.35rem;
    font-weight: 800;
    letter-spacing: 0.03em;
    white-space: nowrap;
    color: var(--ink);
}

.brand-with-mark { display: inline-flex; align-items: center; gap: 0.7rem; }
.brand-mark {
    display: inline-grid; place-items: center;
    width: clamp(38px, 5vw, 44px); height: clamp(38px, 5vw, 44px);
    max-width: 44px; max-height: 44px;
    border-radius: clamp(11px, 1.6vw, 14px);
    overflow: hidden; flex: 0 0 auto;
    box-shadow: 0 10px 24px rgba(16, 34, 45, 0.16);
}
.brand-mark img { display: block; width: 100%; height: 100%; object-fit: cover; border-radius: inherit; }

.top-nav {
    display: flex; align-items: center; gap: 1.1rem;
    color: var(--muted);
}
.top-nav a {
    position: relative; padding: 0.25rem 0; transition: color 160ms ease;
    color: var(--muted);
}
.top-nav a::after {
    content: ""; position: absolute; left: 0; right: 0; bottom: -0.55rem;
    height: 2px; border-radius: 999px; background: var(--accent-deep);
    opacity: 0; transform: scaleX(0.4); transition: opacity 180ms, transform 180ms;
}
.top-nav a.is-active { color: var(--ink); }
.top-nav a.is-active::after { opacity: 1; transform: scaleX(1); }
.top-nav a:hover { color: var(--accent-deep); }

.menu-toggle {
    display: none; width: 48px; height: 48px; border: 1px solid var(--line);
    border-radius: 14px; background: var(--surface-strong); align-items: center;
    justify-content: center; flex-direction: column; gap: 5px; cursor: pointer;
}
.menu-toggle span { display: block; width: 20px; height: 2px; border-radius: 999px; background: var(--ink); }

.theme-toggle {
    display: inline-flex; align-items: center; gap: 0.5rem;
    padding: 0.75rem 0.9rem; border: 1px solid var(--line);
    border-radius: 14px; background: var(--surface-strong); color: var(--ink);
    cursor: pointer; font: inherit;
}
.theme-toggle-icon { font-size: 1rem; line-height: 1; }

/* ================= TOP CTA STRIP (reveals on scroll) ================= */
.top-cta-strip {
    position: fixed;
    top: 72px;
    left: 0;
    right: 0;
    z-index: 19;
    background: rgba(17, 9, 6, 0.3);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border-bottom: 1px solid rgba(255, 255, 255, 0.15);
    display: flex;
    justify-content: center;
    padding: 0.6rem 1rem;
    transition: transform 0.4s ease, opacity 0.4s ease, top 0.4s ease;
    /* hidden by default */
    opacity: 0;
    transform: translateY(-100%);
    pointer-events: none;
}
/* Visible when scrolled down */
.top-cta-strip.is-visible {
    top: 0;
    opacity: 1;
    transform: translateY(0);
    pointer-events: auto;
}
/* Hidden when reaching #hotels section (existing) */
.top-cta-strip.is-hidden {
    transform: translateY(-100%);
    opacity: 0;
    pointer-events: none;
}

.top-cta-strip-inner {
    display: flex;
    gap: 0.8rem;
    align-items: center;
    max-width: 900px;
    width: 100%;
    justify-content: space-between;
}
.top-cta-strip-text {
    color: white;
    font-size: 0.9rem;
    font-weight: 500;
}
.top-cta-strip a {
    padding: 0.4rem 1.2rem;
    border-radius: 12px;
    background: linear-gradient(135deg, var(--accent-deep), var(--accent));
    color: white;
    font-weight: 600;
    white-space: nowrap;
    text-decoration: none;
}

/* ================= PAGE CONTENT STYLES ================= */
.section { padding: 5rem 0; }
.section-heading { text-align: center; margin-bottom: 3rem; }
.section-heading h2 { margin: 0.9rem 0; line-height: 1.02; color: var(--ink); }
.section-heading p { color: var(--muted); max-width: 60ch; margin: 0 auto; }

.stack-card {
    background: var(--surface-strong);
    padding: 2.5rem;
    border-radius: 24px;
    border: 1px solid var(--line);
    box-shadow: var(--shadow);
    margin-bottom: 2rem;
}

.stack-card h3 { color: var(--ink); margin-top: 0; border-bottom: 2px solid var(--accent); padding-bottom: 0.5rem; display: inline-block; }
.stack-card h4 { color: var(--muted); margin: 1.5rem 0 0.5rem; }
.stack-card p, .stack-card li { color: var(--muted); line-height: 1.7; }
.stack-card ul, .stack-card ol { padding-left: 1.5rem; margin: 1rem 0; }
.stack-card li + li { margin-top: 0.5rem; }

.cost-grid, .season-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1.5rem;
    margin: 1rem 0;
}
.cost-item, .season-item {
    background: var(--bg);
    padding: 1.2rem;
    border-radius: 16px;
    border: 1px solid var(--line);
    text-align: center;
}
.cost-item strong, .season-item strong {
    display: block;
    font-size: 1.2rem;
    color: var(--ink);
    margin-bottom: 0.3rem;
}
.cost-item span, .season-item span {
    color: var(--accent-deep);
    font-size: 1.1rem;
    font-weight: bold;
}

.eyebrow {
    display: inline-flex; align-items: center; padding: 0.35rem 0.75rem;
    border-radius: 999px; background: rgba(232, 93, 4, 0.1); color: #a5431a;
    font-size: 0.85rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.08em;
}
[data-theme="dark"] .eyebrow { background: rgba(255, 177, 92, 0.16); color: #ffe0c0; }

/* ================= PROFESSIONAL HERO BACKGROUND ================= */
.hero {
    position: relative;
    padding: 5.5rem 0 3rem;
    overflow: hidden;
    background-color: var(--bg);
}

.hero-bg-image {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    z-index: 0;
    filter: brightness(0.5) saturate(1.1);
}

.hero .container {
    position: relative;
    z-index: 1;
}

.hero .container h1,
.hero .container p {
    color: #ffffff !important;
    text-shadow: 0 4px 16px rgba(0, 0, 0, 0.6);
}

.hero .container .eyebrow {
    background: rgba(0, 0, 0, 0.3);
    backdrop-filter: blur(2px);
    color: #ffffff !important;
    border: 1px solid rgba(255, 255, 255, 0.2);
}

/* ================= PROFESSIONAL MONEY BACKGROUND ================= */
.expenses-hero-banner {
    background-image: linear-gradient(rgba(0, 0, 0, 0.5), rgba(0, 0, 0, 0.5)), url('assets/money.jpg');
    background-size: cover;
    background-position: center;
    border-radius: 20px;
    padding: 3.5rem 2.5rem;
    margin-bottom: 2.5rem;
    text-align: center;
}

.expenses-hero-banner h3 {
    border-bottom: 2px solid rgba(255, 255, 255, 0.4) !important;
    color: #ffffff !important;
    text-shadow: 0 4px 16px rgba(0, 0, 0, 0.6);
    padding-bottom: 0.5rem;
}

.expenses-hero-banner p {
    color: #ffffff !important;
    text-shadow: 0 4px 16px rgba(0, 0, 0, 0.6);
    font-size: 1.1rem;
}

/* ================= INSURANCE BANNER ================= */
.insurance-hero-banner {
    background-image: linear-gradient(rgba(0, 0, 0, 0.5), rgba(0, 0, 0, 0.5)), url('assets/beach.jpg');
    background-size: cover;
    background-position: center;
    border-radius: 20px;
    padding: 3.5rem 2.5rem;
    margin-bottom: 2.5rem;
    text-align: center;
}

.insurance-hero-banner h3 {
    border-bottom: 2px solid rgba(255, 255, 255, 0.4) !important;
    color: #ffffff !important;
    text-shadow: 0 4px 16px rgba(0, 0, 0, 0.6);
    padding-bottom: 0.5rem;
}

.insurance-hero-banner p {
    color: #ffffff !important;
    text-shadow: 0 4px 16px rgba(0, 0, 0, 0.6);
    font-size: 1.1rem;
}

/* ================= FOOTER ================= */
.site-footer { padding: 2rem 0 2.5rem; border-top: 1px solid var(--line); background: var(--surface); }
.footer-grid { display: grid; grid-template-columns: 1.2fr 1fr 0.9fr 0.9fr; gap: 1.5rem; }
.footer-links { list-style: none; margin: 0; padding: 0; display: grid; gap: 0.55rem; color: var(--muted); }
.footer-links a { color: var(--muted); transition: color 0.2s; }
.footer-links a:hover { color: var(--accent-deep); }
.footer-meta { margin-top: 1.5rem; color: var(--muted); }

/* ================= ANIMATIONS ================= */
@keyframes pulseGlow {
    0%, 100% { opacity: 0.7; transform: scale(1); }
    50% { opacity: 1; transform: scale(1.05); }
}
.js-reveal-ready .reveal-target {
    opacity: 0; transform: translate3d(0, 26px, 0);
    transition: opacity 0.8s ease, transform 0.8s ease;
    transition-delay: var(--reveal-delay, 0ms);
    will-change: opacity, transform;
}
.js-reveal-ready .reveal-target.is-visible { opacity: 1; transform: translate3d(0, 0, 0); }
@media (prefers-reduced-motion: reduce) {
    * { animation: none !important; transition: none !important; }
    .js-reveal-ready .reveal-target, .js-reveal-ready .reveal-target.is-visible { opacity: 1 !important; transform: none !important; }
}

/* ================= RESPONSIVE ================= */
@media (max-width: 980px) {
    .footer-grid { grid-template-columns: 1fr; }
}

@media (max-width: 720px) {
    .menu-toggle { display: inline-flex; }
    .top-nav {
        position: absolute; top: calc(100% + 10px); left: 1rem; right: 1rem;
        display: none; flex-direction: column; align-items: stretch; gap: 0.2rem;
        padding: 0.75rem; border-radius: 20px; background: var(--surface-strong); border: 1px solid var(--line); box-shadow: var(--shadow);
    }
    .top-nav.is-open { display: flex; }
    .top-nav a { padding: 0.85rem 0.9rem; border-radius: 14px; background: rgba(232, 93, 4, 0.06); color: var(--ink); }
    .top-nav a::after { display: none; }
    [data-theme="dark"] .top-nav { background: rgba(17, 17, 19, 0.98); border-color: rgba(42, 52, 64, 0.92); }
    [data-theme="dark"] .top-nav a { background: rgba(255, 255, 255, 0.04); }
    .section { padding: 3rem 0; }
    .stack-card { padding: 1.5rem; }
    .expenses-hero-banner { padding: 2rem 1.5rem; }
    .insurance-hero-banner { padding: 2rem 1.5rem; }
}

@media (max-width: 520px) {
    .container { width: min(100% - 1rem, 1120px); }
    .header-inner { gap: 0.55rem; min-height: 64px; }
    .brand { font-size: 1.08rem; letter-spacing: 0.015em; }
    .brand-with-mark { gap: 0.5rem; }
    .brand-mark { width: 36px; height: 36px; max-width: 36px; max-height: 36px; border-radius: 11px; }
    .theme-toggle { padding: 0.7rem; justify-content: center; }
    .theme-toggle span:last-child { display: none; }
}

/* =============== FERRY STATUS STYLES =============== */
.ferry-status-container {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    align-items: center;
    max-width: 800px;
    margin: 0 auto;
}
.live-weather-block {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    width: 100%;
    align-self: flex-start;
}
.live-weather-title {
    font-weight: 700;
    color: var(--ink);
    font-size: 1.1rem;
    border-bottom: 1px solid var(--line);
    padding-bottom: 0.5rem;
}

/* =============== INSURANCE COMPARISON TABLE =============== */
.insurance-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 1.5rem;
    margin: 1rem 0;
}
.insurance-item {
    background: var(--bg);
    padding: 1.2rem;
    border-radius: 16px;
    border: 1px solid var(--line);
    text-align: left;
}
.insurance-item strong { display: block; color: var(--ink); font-size: 1.1rem; }
.insurance-item .price { color: var(--accent-deep); font-weight: bold; font-size: 1.2rem; }
.insurance-item .note { color: var(--muted); font-size: 0.85rem; }
.insurance-item ul { margin: 0.5rem 0; padding-left: 1.2rem; }
.insurance-item ul li { font-size: 0.9rem; }

/* =============== 7-DAY ITINERARY STYLES =============== */
.itinerary-day {
    display: grid;
    grid-template-columns: 80px 1fr;
    gap: 1rem;
    padding: 1rem;
    border-radius: 16px;
    background: var(--bg);
    border: 1px solid var(--line);
    margin-bottom: 1rem;
    align-items: start;
}
.itinerary-day .day-number {
    font-size: 1.8rem;
    font-weight: 800;
    color: var(--accent-deep);
    text-align: center;
    line-height: 1.2;
}
.itinerary-day .day-number small {
    font-size: 0.8rem;
    font-weight: 400;
    display: block;
    color: var(--muted);
}
.itinerary-day .day-content h4 {
    margin: 0 0 0.3rem 0;
    color: var(--ink);
}
.itinerary-day .day-content p {
    margin: 0;
    color: var(--muted);
    font-size: 0.95rem;
}
@media (max-width: 520px) {
    .itinerary-day {
        grid-template-columns: 1fr;
        gap: 0.3rem;
        text-align: center;
    }
    .itinerary-day .day-number {
        font-size: 1.4rem;
    }
}