/* ============================================================
   TwinkleTrail - Main Stylesheet
   ============================================================ */

:root {
    --night: #0a0e1a;
    --night-mid: #111833;
    --night-light: #1a2340;
    --gold: #f0c040;
    --gold-light: #ffe47a;
    --gold-dim: #c49a2a;
    --snow: #f0f2f8;
    --ice: #c8d6f0;
    --red: #d44040;
    --red-light: #ff6b6b;
    --green: #2d8a4e;
    --green-light: #5dc47a;
    --warm-white: #fff8e8;
}

* { margin: 0; padding: 0; box-sizing: border-box; }

body {
    font-family: 'DM Sans', sans-serif;
    background: var(--night);
    color: var(--snow);
    overflow-x: hidden;
}

h1, h2, h3, h4, h5 { font-family: 'Playfair Display', serif; }

a { transition: color 0.25s; }

/* ─── Snowfall ─── */
.snowfall {
    position: fixed; top: 0; left: 0; width: 100%; height: 100%;
    pointer-events: none; z-index: 9999;
}
.snowflake {
    position: absolute; top: -10px;
    width: 6px; height: 6px;
    background: white; border-radius: 50%;
    opacity: 0; animation: fall linear infinite;
}
@keyframes fall {
    0% { opacity: 0; transform: translateY(-10px) translateX(0) rotate(0deg); }
    10% { opacity: 0.7; }
    90% { opacity: 0.4; }
    100% { opacity: 0; transform: translateY(100vh) translateX(80px) rotate(360deg); }
}

/* ─── Fairy Lights String ─── */
.fairy-string {
    position: absolute; top: 0; left: 0; width: 100%; height: 40px;
    z-index: 10; overflow: visible;
}
.fairy-string svg { width: 100%; height: 40px; }
.fairy-bulb { animation: twinkle 2s ease-in-out infinite alternate; }
.fairy-bulb:nth-child(2n) { animation-delay: 0.3s; }
.fairy-bulb:nth-child(3n) { animation-delay: 0.7s; }
.fairy-bulb:nth-child(4n) { animation-delay: 1.1s; }
.fairy-bulb:nth-child(5n) { animation-delay: 0.5s; }
@keyframes twinkle {
    0% { opacity: 0.4; }
    50% { opacity: 1; }
    100% { opacity: 0.6; }
}

/* ─── Navbar ─── */
.navbar-tw {
    position: fixed; top: 0; width: 100%; z-index: 1000;
    padding: 16px 0;
    transition: all 0.3s;
    background: transparent;
}
.navbar-tw.scrolled {
    background: rgba(10,14,26,0.92);
    backdrop-filter: blur(16px);
    border-bottom: 1px solid rgba(255,255,255,0.06);
    padding: 10px 0;
}
.navbar-tw.menu-open {
    background: rgba(10,14,26,0.97);
    backdrop-filter: blur(16px);
}
.nav-logo {
    font-family: 'Playfair Display', serif;
    font-weight: 800; font-size: 1.4rem;
    color: white; text-decoration: none;
    display: flex; align-items: center; gap: 10px;
}
.nav-logo:hover { color: white; }
.nav-logo .logo-icon {
    width: 34px; height: 34px;
    background: linear-gradient(135deg, var(--gold), var(--gold-dim));
    border-radius: 10px;
    display: flex; align-items: center; justify-content: center;
    font-size: 1rem;
}
.nav-links a {
    color: var(--ice); text-decoration: none;
    font-size: 0.9rem; font-weight: 500;
    transition: color 0.25s;
    padding: 8px 16px;
}
.nav-links a:hover, .nav-links a.active { color: white; }
.nav-cta {
    background: rgba(240,192,64,0.12) !important;
    border: 1px solid rgba(240,192,64,0.3) !important;
    color: var(--gold-light) !important;
    border-radius: 10px !important;
    padding: 8px 20px !important;
    font-weight: 600 !important;
    text-decoration: none !important;
}
.nav-cta:hover {
    background: rgba(240,192,64,0.2) !important;
    color: var(--gold) !important;
}
.mobile-nav-link {
    color: var(--ice); text-decoration: none;
    padding: 10px 0; font-size: 0.95rem;
    display: block; border-bottom: 1px solid rgba(255,255,255,0.06);
}
.mobile-nav-link:hover { color: white; }

/* ─── Hero ─── */
.hero {
    position: relative;
    min-height: 100vh;
    display: flex; align-items: center;
    background: radial-gradient(ellipse at 50% 20%, #1a2855 0%, var(--night) 70%);
    overflow: hidden;
    padding-top: 80px;
}
.hero::before {
    content: '';
    position: absolute; inset: 0;
    background:
        radial-gradient(1px 1px at 20% 30%, rgba(255,255,200,0.6), transparent),
        radial-gradient(1px 1px at 40% 70%, rgba(255,255,200,0.4), transparent),
        radial-gradient(1.5px 1.5px at 60% 20%, rgba(255,255,200,0.5), transparent),
        radial-gradient(1px 1px at 80% 50%, rgba(255,255,200,0.3), transparent),
        radial-gradient(1px 1px at 10% 80%, rgba(255,255,200,0.4), transparent),
        radial-gradient(1.5px 1.5px at 90% 10%, rgba(255,255,200,0.6), transparent),
        radial-gradient(1px 1px at 50% 50%, rgba(255,255,200,0.3), transparent),
        radial-gradient(1px 1px at 70% 90%, rgba(255,255,200,0.5), transparent);
    background-size: 300px 300px;
    animation: starShimmer 8s ease-in-out infinite alternate;
}
@keyframes starShimmer { 0% { opacity: 0.5; } 100% { opacity: 1; } }

.hero-badge {
    display: inline-flex; align-items: center; gap: 8px;
    background: rgba(240,192,64,0.1);
    border: 1px solid rgba(240,192,64,0.25);
    border-radius: 100px; padding: 6px 18px;
    font-size: 0.85rem; color: var(--gold-light);
    margin-bottom: 1.5rem;
    animation: fadeSlideUp 0.8s ease-out 0.3s both;
}
.hero h1 {
    font-size: clamp(2.24rem, 4.8vw, 4.4rem);
    font-weight: 800; line-height: 1.05;
    margin-bottom: 1.5rem;
    animation: fadeSlideUp 0.8s ease-out 0.5s both;
}
.hero h1 .gold { color: var(--gold); }
.hero h1 .italic { font-style: italic; color: var(--gold-light); }
.hero-sub {
    font-size: 1.2rem; color: var(--ice);
    max-width: 520px; line-height: 1.7;
    margin-bottom: 1rem;
    animation: fadeSlideUp 0.8s ease-out 0.7s both;
}
@keyframes fadeSlideUp {
    from { opacity: 0; transform: translateY(30px); }
    to { opacity: 1; transform: translateY(0); }
}

/* ─── Search Bar ─── */
.hero-search {
    background: rgba(255,255,255,0.06);
    border: 1px solid rgba(255,255,255,0.12);
    border-radius: 16px; padding: 8px;
    max-width: 560px;
    animation: fadeSlideUp 0.8s ease-out 0.9s both;
    backdrop-filter: blur(10px);
}
.hero-search .form-control {
    background: transparent; border: none;
    color: white; font-size: 1.05rem;
    padding: 14px 20px;
}
.hero-search .form-control::placeholder { color: rgba(200,214,240,0.5); }
.hero-search .form-control:focus { box-shadow: none; }
.hero-search .btn {
    background: linear-gradient(135deg, var(--gold), var(--gold-dim));
    border: none; color: var(--night);
    font-weight: 700; padding: 14px 28px;
    border-radius: 12px; font-size: 0.95rem;
    transition: all 0.3s;
}
.hero-search .btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 30px rgba(240,192,64,0.3);
    background: linear-gradient(135deg, var(--gold-light), var(--gold));
}
.popular-tags {
    margin-top: 1rem; display: flex; gap: 8px; flex-wrap: wrap;
    animation: fadeSlideUp 0.8s ease-out 1.1s both;
}
.popular-tags span { font-size: 0.8rem; color: rgba(200,214,240,0.5); }
.popular-tags a {
    font-size: 0.8rem; color: var(--ice);
    text-decoration: none;
    background: rgba(255,255,255,0.06);
    padding: 4px 14px; border-radius: 100px;
    transition: all 0.25s;
    border: 1px solid rgba(255,255,255,0.08);
}
.popular-tags a:hover {
    background: rgba(240,192,64,0.15);
    border-color: rgba(240,192,64,0.3);
    color: var(--gold-light);
}

/* ─── Hero Map ─── */
.hero-visual {
    position: relative;
    animation: fadeSlideUp 1s ease-out 0.6s both;
}
.map-preview {
    border: 1px solid rgba(255,255,255,0.08);
    border-radius: 20px;
    overflow: hidden;
    box-shadow: 0 30px 80px rgba(0,0,0,0.5), 0 0 60px rgba(240,192,64,0.08);
}

/* Leaflet overrides for dark theme */
.leaflet-container { background: var(--night-mid) !important; }
.leaflet-popup-content-wrapper {
    background: rgba(10,14,26,0.92) !important;
    color: var(--snow) !important;
    border-radius: 12px !important;
    border: 1px solid rgba(255,255,255,0.1) !important;
    box-shadow: 0 10px 30px rgba(0,0,0,0.5) !important;
}
.leaflet-popup-tip { background: rgba(10,14,26,0.92) !important; }
.leaflet-popup-content a { color: var(--gold) !important; text-decoration: none !important; }
.leaflet-popup-content a:hover { color: var(--gold-light) !important; }
.leaflet-popup-close-button { color: var(--ice) !important; }

/* ─── Sections ─── */
section { padding: 100px 0; position: relative; }

.section-label {
    display: inline-flex; align-items: center; gap: 8px;
    font-size: 0.8rem; font-weight: 600;
    text-transform: uppercase; letter-spacing: 2px;
    color: var(--gold);
    margin-bottom: 1rem;
}
.section-label::before {
    content: ''; width: 30px; height: 2px;
    background: var(--gold);
}
.section-title {
    font-size: clamp(2rem, 4vw, 3rem);
    font-weight: 700;
    margin-bottom: 1rem;
}
.section-desc {
    color: var(--ice); font-size: 1.05rem;
    max-width: 540px; line-height: 1.7;
}

/* ─── How It Works ─── */
.how-section {
    background: linear-gradient(180deg, var(--night) 0%, var(--night-mid) 100%);
}
.step-card {
    background: rgba(255,255,255,0.03);
    border: 1px solid rgba(255,255,255,0.06);
    border-radius: 20px;
    padding: 36px 30px;
    text-align: center;
    transition: all 0.4s;
    position: relative;
    overflow: hidden;
}
.step-card::before {
    content: '';
    position: absolute; top: 0; left: 50%; transform: translateX(-50%);
    width: 60%; height: 1px;
    background: linear-gradient(90deg, transparent, rgba(240,192,64,0.3), transparent);
}
.step-card:hover {
    transform: translateY(-6px);
    border-color: rgba(240,192,64,0.15);
    box-shadow: 0 20px 60px rgba(0,0,0,0.3);
}
.step-num {
    width: 52px; height: 52px;
    border-radius: 16px;
    background: linear-gradient(135deg, rgba(240,192,64,0.15), rgba(240,192,64,0.05));
    border: 1px solid rgba(240,192,64,0.2);
    display: inline-flex; align-items: center; justify-content: center;
    font-family: 'Playfair Display', serif;
    font-size: 1.3rem; font-weight: 800;
    color: var(--gold);
    margin-bottom: 1.5rem;
}
.step-card h4 { font-size: 1.2rem; margin-bottom: 0.75rem; }
.step-card p { color: var(--ice); font-size: 0.9rem; line-height: 1.6; }

/* ─── Featured Lights Cards ─── */
.featured-section { background: var(--night-mid); }

.light-card {
    background: rgba(255,255,255,0.03);
    border: 1px solid rgba(255,255,255,0.06);
    border-radius: 18px;
    overflow: hidden;
    transition: all 0.4s;
    cursor: pointer;
}
.light-card:hover {
    transform: translateY(-6px);
    border-color: rgba(240,192,64,0.15);
    box-shadow: 0 20px 60px rgba(0,0,0,0.3);
}
.light-img {
    height: 220px;
    position: relative; overflow: hidden;
}
.light-img img {
    width: 100%; height: 100%; object-fit: cover;
    transition: transform 0.5s;
}
.light-card:hover .light-img img { transform: scale(1.05); }

.light-img-placeholder {
    width: 100%; height: 100%;
    display: flex; align-items: center; justify-content: center;
    font-size: 3.5rem;
}
.light-img-placeholder.img1 { background: linear-gradient(135deg, #1a0a2e, #2d1155, #0d2040); }
.light-img-placeholder.img2 { background: linear-gradient(135deg, #0d2020, #0a1a0a, #1a2800); }
.light-img-placeholder.img3 { background: linear-gradient(135deg, #2a0a0a, #1a0500, #2d1500); }
.light-img-placeholder.img4 { background: linear-gradient(135deg, #0a1a2e, #051530, #0d0a25); }

.light-badge {
    position: absolute; top: 12px; left: 12px;
    background: rgba(10,14,26,0.8);
    backdrop-filter: blur(8px);
    padding: 4px 12px;
    border-radius: 100px;
    font-size: 0.75rem; font-weight: 600;
    border: 1px solid rgba(255,255,255,0.1);
}
.light-badge.trending { color: var(--red-light); }
.light-badge.new-entry { color: var(--green-light); }

.light-body { padding: 20px; }
.light-body h5 { font-size: 1.05rem; margin-bottom: 4px; }
.light-location {
    font-size: 0.82rem; color: rgba(200,214,240,0.5);
    margin-bottom: 10px;
}
.light-location i { margin-right: 4px; }
.light-stars { color: var(--gold); font-size: 0.85rem; margin-bottom: 10px; }
.light-stars span, .light-stars .rating-num {
    color: var(--ice); font-size: 0.8rem; margin-left: 6px;
}
.light-meta {
    display: flex; gap: 16px;
    font-size: 0.78rem; color: rgba(200,214,240,0.4);
}
.light-meta i { margin-right: 4px; color: rgba(200,214,240,0.3); }

/* ─── Stars (reusable) ─── */
.stars { color: var(--gold); letter-spacing: 1px; }

/* ─── City Pills ─── */
.cities-section { background: var(--night); }
.city-pill {
    display: inline-flex; align-items: center; gap: 8px;
    background: rgba(255,255,255,0.04);
    border: 1px solid rgba(255,255,255,0.08);
    border-radius: 100px;
    padding: 10px 24px;
    font-size: 0.9rem; font-weight: 500;
    color: var(--snow);
    text-decoration: none;
    transition: all 0.3s;
}
.city-pill:hover {
    background: rgba(240,192,64,0.1);
    border-color: rgba(240,192,64,0.25);
    color: var(--gold-light);
    transform: translateY(-2px);
}
.city-pill .count {
    background: rgba(255,255,255,0.08);
    padding: 2px 10px;
    border-radius: 100px;
    font-size: 0.75rem;
    color: var(--ice);
}

/* ─── Stats ─── */
.stat-item { text-align: center; }
.stat-num {
    font-family: 'Playfair Display', serif;
    font-size: 2.8rem; font-weight: 800;
    color: var(--gold);
}
.stat-label { font-size: 0.85rem; color: var(--ice); margin-top: 4px; }
.stats-row { animation: fadeSlideUp 0.8s ease-out 1.3s both; }

/* ─── CTA ─── */
.cta-section {
    background: linear-gradient(180deg, var(--night-mid) 0%, var(--night) 100%);
}
.cta-box {
    background:
        radial-gradient(ellipse at 30% 50%, rgba(240,192,64,0.08) 0%, transparent 60%),
        radial-gradient(ellipse at 70% 50%, rgba(212,64,64,0.06) 0%, transparent 60%),
        rgba(255,255,255,0.02);
    border: 1px solid rgba(255,255,255,0.08);
    border-radius: 28px;
    padding: 80px 60px;
    text-align: center;
    position: relative;
    overflow: hidden;
}
.cta-box::before, .cta-box::after {
    content: '✦';
    position: absolute;
    font-size: 1.5rem;
    color: rgba(240,192,64,0.15);
    animation: twinkle 3s ease-in-out infinite alternate;
}
.cta-box::before { top: 30px; left: 40px; }
.cta-box::after { bottom: 30px; right: 40px; animation-delay: 1s; }
.cta-box h2 { font-size: clamp(2rem, 4vw, 3rem); margin-bottom: 1rem; }
.cta-box p { color: var(--ice); font-size: 1.1rem; max-width: 500px; margin: 0 auto 2rem; }

/* ─── Buttons ─── */
.btn-glow {
    background: linear-gradient(135deg, var(--gold), var(--gold-dim));
    border: none; color: var(--night);
    font-weight: 700; padding: 16px 40px;
    border-radius: 14px; font-size: 1rem;
    transition: all 0.3s;
    text-decoration: none; display: inline-flex; align-items: center; gap: 8px;
}
.btn-glow:hover {
    transform: translateY(-3px);
    box-shadow: 0 12px 40px rgba(240,192,64,0.35);
    color: var(--night);
}
.btn-outline-light-custom {
    background: transparent;
    border: 1px solid rgba(255,255,255,0.2);
    color: white; padding: 16px 40px;
    border-radius: 14px; font-size: 1rem; font-weight: 600;
    transition: all 0.3s;
    text-decoration: none; display: inline-flex; align-items: center; gap: 8px;
}
.btn-outline-light-custom:hover {
    background: rgba(255,255,255,0.06);
    border-color: rgba(255,255,255,0.3);
    color: white;
    transform: translateY(-3px);
}

/* ─── Footer ─── */
footer {
    background: var(--night);
    border-top: 1px solid rgba(255,255,255,0.06);
    padding: 60px 0 30px;
}
footer a {
    color: rgba(200,214,240,0.5);
    text-decoration: none; font-size: 0.88rem;
    transition: color 0.25s;
}
footer a:hover { color: var(--gold-light); }
.footer-logo {
    font-family: 'Playfair Display', serif;
    font-weight: 800; font-size: 1.3rem; color: white;
    display: flex; align-items: center; gap: 8px;
    margin-bottom: 1rem;
}
.footer-desc {
    color: rgba(200,214,240,0.4);
    font-size: 0.88rem; line-height: 1.7;
    max-width: 300px;
}
.footer-heading {
    font-family: 'DM Sans', sans-serif;
    font-weight: 700; font-size: 0.8rem;
    text-transform: uppercase; letter-spacing: 1.5px;
    color: var(--snow);
    margin-bottom: 1.2rem;
}
.footer-links { list-style: none; padding: 0; }
.footer-links li { margin-bottom: 10px; }
.footer-bottom {
    margin-top: 50px; padding-top: 20px;
    border-top: 1px solid rgba(255,255,255,0.06);
    display: flex; justify-content: space-between; align-items: center;
    flex-wrap: wrap; gap: 16px;
}
.footer-bottom p { font-size: 0.8rem; color: rgba(200,214,240,0.3); margin: 0; }

/* ─── Page Content (non-homepage) ─── */
.page-header {
    padding: 90px 0 30px;
    background: radial-gradient(ellipse at 50% 30%, #1a2855 0%, var(--night) 70%);
    position: relative;
}
.page-content { padding: 60px 0; }

/* ─── Forms (dark theme) ─── */
.form-dark .form-control,
.form-dark .form-select {
    background: rgba(255,255,255,0.04);
    border: 1px solid rgba(255,255,255,0.1);
    color: var(--snow);
    border-radius: 12px;
    padding: 12px 16px;
}
.form-dark .form-control:focus,
.form-dark .form-select:focus {
    background: rgba(255,255,255,0.06);
    border-color: rgba(240,192,64,0.4);
    box-shadow: 0 0 0 3px rgba(240,192,64,0.1);
    color: white;
}
.form-dark .form-control::placeholder { color: rgba(200,214,240,0.4); }
.form-dark .form-label {
    font-size: 0.85rem; font-weight: 600;
    color: var(--ice); margin-bottom: 6px;
}
.form-dark .form-check-input {
    background-color: rgba(255,255,255,0.1);
    border-color: rgba(255,255,255,0.2);
}
.form-dark .form-check-input:checked {
    background-color: var(--gold);
    border-color: var(--gold);
}
.form-dark .form-text { color: rgba(200,214,240,0.4); font-size: 0.8rem; }

/* ─── Card (generic dark) ─── */
.card-dark {
    background: rgba(255,255,255,0.03);
    border: 1px solid rgba(255,255,255,0.06);
    border-radius: 18px;
    padding: 30px;
}

/* ─── Bootstrap dropdown dark overrides ─── */
.dropdown-menu-dark {
    background: rgba(10,14,26,0.95) !important;
    border: 1px solid rgba(255,255,255,0.1) !important;
    border-radius: 12px !important;
    backdrop-filter: blur(16px);
}
.dropdown-menu-dark .dropdown-item {
    color: var(--ice) !important;
    font-size: 0.88rem;
    padding: 8px 16px;
}
.dropdown-menu-dark .dropdown-item:hover {
    background: rgba(240,192,64,0.1) !important;
    color: var(--gold-light) !important;
}

/* ─── Scroll Animations ─── */
.reveal {
    opacity: 0; transform: translateY(30px);
    transition: all 0.7s cubic-bezier(0.16, 1, 0.3, 1);
}
.reveal.visible { opacity: 1; transform: translateY(0); }

/* ─── Mobile Bottom Nav ─── */
.mobile-bottom-nav {
    position: fixed; bottom: 0; left: 0; right: 0;
    z-index: 1000;
    display: flex;
    background: rgba(10,14,26,0.97);
    backdrop-filter: blur(16px);
    border-top: 1px solid rgba(255,255,255,0.08);
    height: 60px;
    padding-bottom: env(safe-area-inset-bottom);
}
.mobile-bottom-nav-item {
    flex: 1;
    display: flex; flex-direction: column;
    align-items: center; justify-content: center;
    gap: 3px;
    color: rgba(200,214,240,0.4);
    text-decoration: none;
    font-size: 0.68rem; font-weight: 600;
    letter-spacing: 0.02em;
    transition: color 0.2s;
}
.mobile-bottom-nav-item i { font-size: 1.25rem; line-height: 1; }
.mobile-bottom-nav-item:hover,
.mobile-bottom-nav-item.active { color: var(--gold); }

/* Prevent page content sitting behind the fixed bar */
@media (max-width: 767px) {
    body { padding-bottom: 60px; }
}

/* ─── Responsive ─── */
@media (max-width: 991px) {
    .hero { padding-top: 10px; }
    .hero-visual { margin-top: 0px; }
    .hero h1 { text-align: center; }
}
@media (max-width: 767px) {
    section { padding: 70px 0; }
    .cta-box { padding: 50px 30px; }
    .stat-num { font-size: 2rem; }
}
