/* === Reset & Base === */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    color: #2c3e50;
    background: #fafafa;
    line-height: 1.7;
}
a { color: inherit; text-decoration: none; }
img { max-width: 100%; }
.container { max-width: 1100px; margin: 0 auto; padding: 0 24px; }

/* === Typography === */
h1, h2, h3 { font-family: 'Playfair Display', Georgia, serif; font-weight: 700; }
h2 { font-size: 2rem; }
h3 { font-size: 1.3rem; }

/* === Nav === */
.main-nav {
    position: fixed; top: 0; left: 0; right: 0; z-index: 1000;
    display: flex; justify-content: space-between; align-items: center;
    padding: 14px 32px;
    background: rgba(20, 20, 30, 0.92);
    backdrop-filter: blur(12px);
    border-bottom: 1px solid rgba(255,255,255,0.08);
}
.nav-brand {
    font-family: 'Playfair Display', serif;
    font-size: 1.15rem; font-weight: 700; color: #fff;
    letter-spacing: 0.3px;
}
.nav-links { display: flex; gap: 28px; }
.nav-links a { color: rgba(255,255,255,0.75); font-size: 0.88rem; font-weight: 500; transition: color 0.2s; }
.nav-links a:hover { color: #fff; }

/* === Hero === */
.hero {
    position: relative;
    min-height: 100vh;
    display: flex; align-items: center; justify-content: center;
    background: linear-gradient(135deg, #1a1a2e 0%, #16213e 40%, #0f3460 70%, #533483 100%);
    overflow: hidden;
}
.hero-overlay {
    position: absolute; inset: 0;
    background: url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cg fill='%23ffffff' fill-opacity='0.03'%3E%3Cpath d='M36 34v-4h-2v4h-4v2h4v4h2v-4h4v-2h-4zm0-30V0h-2v4h-4v2h4v4h2V6h4V4h-4zM6 34v-4H4v4H0v2h4v4h2v-4h4v-2H6zM6 4V0H4v4H0v2h4v4h2V6h4V4H6z'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E");
}
.hero-content { position: relative; text-align: center; padding: 120px 24px 80px; }
.hero-title {
    font-family: 'Playfair Display', serif;
    font-size: clamp(2.5rem, 6vw, 4.5rem);
    color: #fff; margin-bottom: 16px;
    letter-spacing: 1px;
}
.hero-subtitle {
    font-size: 1.15rem; color: rgba(255,255,255,0.7);
    letter-spacing: 3px; text-transform: uppercase;
    margin-bottom: 12px;
}
.hero-dates {
    font-size: 1rem; color: rgba(255,255,255,0.5);
    margin-bottom: 40px;
}
.hero-cta {
    display: inline-block;
    padding: 14px 40px;
    border: 2px solid rgba(255,255,255,0.4);
    color: #fff; font-weight: 600; font-size: 0.95rem;
    letter-spacing: 1px; text-transform: uppercase;
    border-radius: 50px;
    transition: all 0.3s;
}
.hero-cta:hover { background: rgba(255,255,255,0.12); border-color: rgba(255,255,255,0.7); }

/* === Stats Bar === */
.stats-bar {
    display: flex; justify-content: center; flex-wrap: wrap; gap: 48px;
    padding: 48px 24px;
    background: #fff;
    border-bottom: 1px solid #eee;
}
.stat { text-align: center; }
.stat-number {
    display: block;
    font-family: 'Playfair Display', serif;
    font-size: 2.8rem; font-weight: 700; color: #c0392b;
}
.stat-label { font-size: 0.82rem; text-transform: uppercase; letter-spacing: 2px; color: #888; }

/* === Sections === */
.section { padding: 80px 0; }
.section-alt { background: #fff; }
.section-title {
    text-align: center; margin-bottom: 12px;
    font-size: 2.2rem; color: #1a1a2e;
}
.section-desc {
    text-align: center; color: #666; max-width: 600px; margin: 0 auto 48px;
    font-size: 1.05rem;
}
.subsection-title {
    text-align: center; margin: 48px 0 24px;
    font-size: 1.4rem; color: #1a1a2e;
}

/* === Route Map === */
.route-map { height: 500px; border-radius: 12px; overflow: hidden; box-shadow: 0 4px 24px rgba(0,0,0,0.1); }
.route-marker-dot {
    width: 28px; height: 28px; border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
    color: #fff; font-size: 11px; font-weight: 700;
    box-shadow: 0 2px 8px rgba(0,0,0,0.3);
    border: 2px solid #fff;
}
.poi-dot {
    width: 14px; height: 14px; border-radius: 50%;
    border: 2px solid #fff;
    box-shadow: 0 1px 4px rgba(0,0,0,0.3);
}

/* === Family === */
.family-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 24px; }
.family-card {
    background: #fafafa; border-radius: 12px; padding: 32px;
    text-align: center;
    border: 1px solid #eee;
    transition: transform 0.2s, box-shadow 0.2s;
}
.family-card:hover { transform: translateY(-2px); box-shadow: 0 8px 32px rgba(0,0,0,0.08); }
.family-avatar {
    width: 64px; height: 64px; border-radius: 50%;
    background: linear-gradient(135deg, #c0392b, #e74c3c);
    color: #fff; font-family: 'Playfair Display', serif;
    font-size: 1.6rem; font-weight: 700;
    display: flex; align-items: center; justify-content: center;
    margin: 0 auto 16px;
}
.family-age { color: #999; font-weight: 400; }
.family-role { color: #c0392b; font-size: 0.85rem; font-weight: 600; text-transform: uppercase; letter-spacing: 1px; margin: 6px 0 12px; }
.family-desc { color: #666; font-size: 0.92rem; line-height: 1.6; }

/* === Timeline === */
.timeline { display: flex; flex-direction: column; gap: 12px; max-width: 800px; margin: 0 auto; }
.timeline-card {
    display: flex; align-items: center; gap: 20px;
    background: #fff; border-radius: 12px; padding: 20px 24px;
    border: 1px solid #eee;
    transition: all 0.2s;
    cursor: pointer;
}
.timeline-card:hover {
    border-color: var(--card-color);
    box-shadow: 0 4px 20px rgba(0,0,0,0.08);
    transform: translateX(4px);
}
.timeline-marker {
    flex-shrink: 0; width: 48px; height: 48px; border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
}
.timeline-day { color: #fff; font-weight: 700; font-size: 0.95rem; }
.timeline-content { flex: 1; }
.timeline-date { font-size: 0.8rem; color: #999; text-transform: uppercase; letter-spacing: 1px; }
.timeline-title { font-size: 1.15rem; margin: 2px 0; }
.timeline-subtitle { color: #666; font-size: 0.9rem; font-style: italic; }
.timeline-meta { display: flex; gap: 12px; margin-top: 8px; flex-wrap: wrap; }
.transit-badge {
    font-size: 0.78rem; padding: 3px 10px;
    background: #f0f0f0; border-radius: 20px; color: #555;
}
.location-badge { font-size: 0.78rem; color: #888; }
.timeline-arrow { color: #ccc; font-size: 1.5rem; flex-shrink: 0; }

/* === Legend === */
.legend-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 20px; max-width: 800px; margin: 0 auto; }
.legend-item { display: flex; align-items: flex-start; gap: 16px; padding: 16px; background: #fafafa; border-radius: 10px; }
.legend-flag { font-size: 2rem; line-height: 1; }
.legend-item strong { display: block; margin-bottom: 2px; }
.legend-item p { font-size: 0.88rem; color: #666; margin: 0; }
.transit-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 16px; max-width: 900px; margin: 0 auto; }
.transit-item { text-align: center; padding: 20px; background: #fafafa; border-radius: 10px; }
.transit-icon-lg { font-size: 2rem; display: block; margin-bottom: 8px; }
.transit-item strong { display: block; margin-bottom: 4px; }
.transit-item p { font-size: 0.85rem; color: #666; margin: 0; }

/* === Day Detail Hero === */
.day-hero {
    position: relative;
    min-height: 40vh; display: flex; align-items: flex-end;
    background: linear-gradient(135deg, var(--day-color) 0%, #1a1a2e 100%);
    padding-top: 80px;
}
.day-hero-overlay {
    position: absolute; inset: 0;
    background: linear-gradient(to top, rgba(0,0,0,0.6), transparent);
}
.day-hero-content { position: relative; padding: 40px 32px; max-width: 1100px; margin: 0 auto; width: 100%; }
.day-badge {
    display: inline-block; padding: 4px 16px;
    background: rgba(255,255,255,0.2); border-radius: 20px;
    color: #fff; font-size: 0.82rem; font-weight: 600;
    text-transform: uppercase; letter-spacing: 2px;
    margin-bottom: 12px;
}
.day-hero h1 { color: #fff; font-size: clamp(2rem, 5vw, 3rem); margin-bottom: 8px; }
.day-hero-subtitle { color: rgba(255,255,255,0.8); font-size: 1.15rem; font-style: italic; margin-bottom: 16px; }
.day-hero-meta { display: flex; gap: 12px; color: rgba(255,255,255,0.6); font-size: 0.9rem; flex-wrap: wrap; }

/* === Day Layout === */
.day-layout { padding: 48px 24px 80px; display: flex; flex-direction: column; gap: 28px; }

/* === Info Cards === */
.info-card {
    background: #fff; border-radius: 12px; padding: 32px;
    border: 1px solid #eee;
    box-shadow: 0 2px 12px rgba(0,0,0,0.04);
}
.info-card h3 {
    font-size: 1.2rem; margin-bottom: 20px;
    padding-bottom: 12px; border-bottom: 2px solid #f0f0f0;
}

/* Transit Card */
.transit-details { display: flex; flex-direction: column; gap: 12px; }
.transit-row { display: flex; gap: 16px; }
.transit-label {
    flex-shrink: 0; width: 80px;
    font-size: 0.82rem; text-transform: uppercase; letter-spacing: 1px;
    color: #999; font-weight: 600; padding-top: 2px;
}
.transit-note {
    margin-top: 8px; padding: 12px 16px;
    background: #f8f9fa; border-radius: 8px;
    font-size: 0.92rem; color: #555;
    border-left: 3px solid #3498db;
}

/* Map Card */
.day-map { height: 400px; border-radius: 8px; overflow: hidden; margin-bottom: 24px; }

/* POI List */
.poi-list { display: flex; flex-direction: column; gap: 16px; }
.poi-item { display: flex; gap: 16px; padding: 16px; border-radius: 8px; background: #fafafa; }
.poi-marker { font-size: 1.5rem; flex-shrink: 0; width: 40px; text-align: center; }
.poi-info strong { display: block; margin-bottom: 4px; font-size: 1rem; }
.poi-info p { color: #555; font-size: 0.92rem; margin: 0; line-height: 1.6; }

/* Narrative */
.narrative p { margin-bottom: 16px; font-size: 1.05rem; line-height: 1.8; color: #444; }
.narrative p:last-child { margin-bottom: 0; }

/* Stay Card */
.stay-details strong { font-size: 1.1rem; display: block; margin-bottom: 4px; }
.stay-details p { color: #555; margin: 4px 0; }
.stay-notes { font-size: 0.92rem; color: #888; font-style: italic; margin-top: 8px !important; }

/* Kids Card */
.kids-split { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }
.kid-box { padding: 20px; border-radius: 8px; }
.steph-box { background: #eef6ff; border: 1px solid #d0e4f7; }
.emily-box { background: #fef5ee; border: 1px solid #f5dcc3; }
.kid-name { font-weight: 700; margin-bottom: 8px; font-size: 1rem; }
.kid-trait { font-weight: 400; color: #888; font-size: 0.85rem; }
.kid-box p { font-size: 0.92rem; color: #555; line-height: 1.6; margin: 0; }

/* Grandparents Card */
.gp-card { border-left: 4px solid #8e44ad; }
.gp-card p { font-size: 0.95rem; color: #555; line-height: 1.7; }

/* Tips Card */
.tips-list { list-style: none; padding: 0; }
.tips-list li {
    padding: 10px 0 10px 28px; position: relative;
    font-size: 0.95rem; color: #555; border-bottom: 1px solid #f5f5f5;
}
.tips-list li:last-child { border-bottom: none; }
.tips-list li::before {
    content: ''; position: absolute; left: 0; top: 16px;
    width: 8px; height: 8px; border-radius: 50%;
    background: #c0392b;
}

/* Day Nav */
.day-nav {
    display: flex; justify-content: space-between; align-items: center;
    gap: 16px; padding-top: 20px; flex-wrap: wrap;
}
.day-nav-btn {
    padding: 12px 24px; border-radius: 8px;
    font-size: 0.88rem; font-weight: 500;
    transition: all 0.2s;
}
.prev-btn, .next-btn {
    background: #fff; border: 1px solid #ddd;
}
.prev-btn:hover, .next-btn:hover {
    border-color: #c0392b; color: #c0392b;
}
.home-btn { background: #1a1a2e; color: #fff; }
.home-btn:hover { background: #2c3e50; }

/* === Footer === */
footer {
    background: #1a1a2e; color: rgba(255,255,255,0.5);
    text-align: center; padding: 40px 24px;
}
.footer-text { font-size: 0.9rem; margin-bottom: 4px; }
.footer-sub { font-size: 0.8rem; color: rgba(255,255,255,0.3); }

/* === Responsive === */
@media (max-width: 768px) {
    .nav-links { display: none; }
    .stats-bar { gap: 24px; padding: 32px 16px; }
    .stat-number { font-size: 2rem; }
    .route-map { height: 350px; }
    .day-map { height: 300px; }
    .kids-split { grid-template-columns: 1fr; }
    .day-nav { flex-direction: column; }
    .day-nav-btn { width: 100%; text-align: center; }
    .timeline-card { padding: 16px; }
    .legend-grid { grid-template-columns: 1fr; }
    .family-grid { grid-template-columns: 1fr; }
}

/* === Leaflet Overrides === */
.leaflet-popup-content-wrapper { border-radius: 8px; }
.leaflet-popup-content { font-family: 'Inter', sans-serif; font-size: 0.88rem; line-height: 1.5; }
