/* Hero Slider Section */
.hero-slider-section {
    position: relative;
    height: 100vh;
    min-height: 100vh;
    max-height: 100vh;
    overflow: hidden;
}

.heroSwiper {
    width: 100%;
    height: 100%;
    min-height: 100vh;
}

.heroSwiper .swiper-slide {
    position: relative;
    width: 100%;
    height: 100%;
}

.slide-bg {
    position: absolute;
    inset: 0;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
}

.slide-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(
        135deg,
        rgba(3, 17, 39, 0.85) 0%,
        rgba(3, 17, 39, 0.4) 50%,
        rgba(3, 17, 39, 0.6) 100%
    );
}

.slide-content {
    position: relative;
    z-index: 10;
    display: flex;
    flex-direction: column;
    justify-content: center;
    height: 100%;
    padding: 90px clamp(1rem, 4vw, 3rem) 100px;
    max-width: 100%;
}

.slide-inner {
    display: grid;
    grid-template-columns: 1fr 360px;
    gap: 4rem;
    align-items: center;
    max-width: 1400px;
    margin: 0 auto;
    padding: 0;
    width: 100%;
}

/* Make slide-content a non-flex container for inner content */
.slide-content > .slide-inner {
    display: grid;
    grid-template-columns: 1fr 360px;
    gap: 4rem;
    align-items: center;
    max-width: 1400px;
    margin: 0 auto;
    padding: 0;
    width: 100%;
}

/* Slide Text */
.slide-text {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    max-width: 720px;
    font-family: Inter, ui-sans-serif, system-ui, sans-serif;
    text-shadow: 0 2px 18px rgba(3, 17, 39, 0.3);
}

.welcome-label {
    display: inline-block;
    font-size: 0.85rem;
    font-weight: 800;
    letter-spacing: 0.22em;
    color: #7eeaff;
    text-transform: uppercase;
}

.slide-text h1 {
    font-family: 'Space Grotesk', Inter, sans-serif;
    font-size: clamp(2.5rem, 6vw, 4.5rem);
    font-weight: 700;
    line-height: 1.04;
    letter-spacing: -0.045em;
    margin: 0;
    color: white;
}

.slide-text h1 .highlight {
    display: block;
    color: transparent;
    background: linear-gradient(90deg, #18d9ff 0%, #6e79ff 48%, #c55cff 78%, #f353d7 100%);
    background-clip: text;
    -webkit-background-clip: text;
    text-shadow: none;
}

.slide-description {
    font-size: clamp(1rem, 1.5vw, 1.15rem);
    line-height: 1.7;
    color: rgba(244, 249, 255, 0.88);
    font-weight: 500;
    letter-spacing: -0.01em;
    max-width: 600px;
    margin: 0;
}

.slide-actions {
    display: flex;
    gap: 1rem;
    margin-top: 1rem;
}

.btn-explore {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.9rem 2rem;
    border: 1px solid rgba(126, 234, 255, 0.38);
    background: linear-gradient(135deg, #168cff 0%, #704aff 58%, #9a4fff 100%);
    color: white;
    font-weight: 800;
    font-size: 0.95rem;
    border-radius: 999px;
    text-decoration: none;
    transition: all 0.3s ease;
    letter-spacing: 0.01em;
    box-shadow: 0 12px 30px rgba(74, 79, 255, 0.34), inset 0 1px rgba(255, 255, 255, 0.22);
}

.btn-explore:hover {
    transform: translateY(-3px);
    color: white;
    background: linear-gradient(135deg, #18bfff 0%, #7654ff 55%, #bd55ed 100%);
    box-shadow: 0 16px 38px rgba(74, 79, 255, 0.46), 0 0 24px rgba(24, 217, 255, 0.18);
}

.btn-explore:focus-visible {
    outline: 3px solid rgba(126, 234, 255, 0.72);
    outline-offset: 3px;
}

.btn-video {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.9rem 2rem;
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    color: white;
    font-weight: 600;
    font-size: 0.95rem;
    border-radius: 999px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.btn-video:hover {
    background: rgba(255, 255, 255, 0.2);
    border-color: rgba(255, 255, 255, 0.4);
}

.btn-video i {
    width: 28px;
    height: 28px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: white;
    color: #ff6b35;
    border-radius: 50%;
    font-size: 0.75rem;
}

/* Slide Navigation */
.slide-nav {
    display: flex;
    align-items: center;
    gap: 1.5rem;
    margin-top: 1.5rem;
}

.nav-label {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.7rem;
    font-weight: 600;
    letter-spacing: 2px;
    color: rgba(255, 255, 255, 0.6);
    text-transform: uppercase;
}

.nav-label i {
    color: var(--cyan);
}

.nav-dots {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.nav-dots .dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.3);
    cursor: pointer;
    transition: all 0.3s ease;
}

.nav-dots .dot.active {
    width: 30px;
    border-radius: 4px;
    background: linear-gradient(90deg, #18d9ff, #704aff);
    box-shadow: 0 0 12px rgba(24, 217, 255, 0.55);
}

/* Weather Card */
.weather-card {
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: 20px;
    padding: 1.5rem;
    color: white;
    align-self: flex-start;
    margin-top: 2rem;
}

.weather-main {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    margin-bottom: 1rem;
}

.weather-icon {
    font-size: 3rem;
    color: #ffd700;
}

.weather-temp {
    font-size: 3rem;
    font-weight: 800;
    line-height: 1;
}

.weather-status {
    font-size: 1rem;
    color: rgba(255, 255, 255, 0.7);
}

.weather-location {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.25rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    margin-bottom: 1rem;
}

.weather-location i {
    color: var(--cyan);
}

.weather-location span {
    font-weight: 700;
    font-size: 0.85rem;
    letter-spacing: 2px;
}

.weather-location small {
    font-size: 0.75rem;
    color: rgba(255, 255, 255, 0.6);
}

.events-section h4 {
    font-size: 0.75rem;
    font-weight: 700;
    letter-spacing: 1px;
    color: rgba(255, 255, 255, 0.7);
    margin: 0 0 0.75rem 0;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.event-item {
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
    padding: 0.6rem 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.event-item:last-of-type {
    border-bottom: none;
    margin-bottom: 0.75rem;
}

.event-time {
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--cyan);
    min-width: 60px;
}

.event-time strong,
.event-time small {
    display: block;
    color: inherit;
    line-height: 1.35;
}

.event-time strong {
    font-size: 0.72rem;
    text-transform: uppercase;
}

.event-time small {
    margin-top: 0.15rem;
    color: rgba(255, 255, 255, 0.68);
    font-size: 0.6rem;
    white-space: nowrap;
}

.event-info {
    display: flex;
    flex-direction: column;
    gap: 0.15rem;
}

.event-info strong {
    font-size: 0.85rem;
    font-weight: 700;
}

.event-info span {
    font-size: 0.7rem;
    color: rgba(255, 255, 255, 0.6);
}

.event-item-link {
    margin-inline: -0.45rem;
    padding-inline: 0.45rem;
    color: inherit;
    text-decoration: none;
    border-radius: 9px;
    transition: background-color 0.2s ease, transform 0.2s ease;
}

.event-item-link:hover {
    color: #fff;
    background: rgba(24, 217, 255, 0.08);
    transform: translateX(2px);
}

.event-info span i {
    margin-right: 0.2rem;
    color: var(--cyan);
}

.event-arrow {
    align-self: center;
    margin-left: auto;
    color: rgba(126, 234, 255, 0.78);
    font-size: 0.65rem;
}

.event-item-empty {
    align-items: center;
    color: rgba(255, 255, 255, 0.7);
}

.event-item-empty > i {
    color: var(--cyan);
    font-size: 1.1rem;
}

.live-atlas-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    width: 100%;
    padding: 0.7rem;
    border: 1px solid rgba(126, 234, 255, 0.3);
    background: linear-gradient(135deg, #168cff 0%, #704aff 65%, #9a4fff 100%);
    color: white;
    font-weight: 700;
    font-size: 0.8rem;
    border-radius: 10px;
    text-decoration: none;
    margin-top: 0.5rem;
    transition: all 0.3s ease;
}

.live-atlas-btn:hover {
    transform: translateY(-2px);
    color: #fff;
    background: linear-gradient(135deg, #18bfff 0%, #7654ff 60%, #b34fe2 100%);
    box-shadow: 0 10px 26px rgba(74, 79, 255, 0.4), 0 0 20px rgba(24, 217, 255, 0.14);
}

.live-atlas-btn:focus-visible {
    outline: 3px solid rgba(126, 234, 255, 0.68);
    outline-offset: 3px;
}

.view-all-link {
    display: block;
    text-align: center;
    font-size: 0.75rem;
    color: rgba(255, 255, 255, 0.6);
    margin-top: 0.75rem;
    text-decoration: none;
    transition: color 0.2s ease;
}

.view-all-link:hover {
    color: var(--cyan);
}

/* Scroll Down Indicator */
.scroll-indicator {
    position: absolute;
    bottom: 80px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 20;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
    color: rgba(255, 255, 255, 0.6);
    font-family: 'Space Grotesk', Inter, sans-serif;
    font-size: 0.7rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    text-decoration: none;
    opacity: 0.8;
    transition: all 0.3s ease;
    cursor: pointer;
}

.scroll-indicator:hover {
    color: rgba(255, 255, 255, 1);
    opacity: 1;
}

.mouse {
    width: 22px;
    height: 34px;
    border: 2px solid rgba(255, 255, 255, 0.5);
    border-radius: 10px;
    display: flex;
    justify-content: center;
    padding-top: 5px;
    transition: all 0.3s ease;
}

.scroll-indicator:hover .mouse {
    border-color: rgba(255, 255, 255, 1);
}

.wheel {
    width: 3px;
    height: 6px;
    background: rgba(255, 255, 255, 0.8);
    border-radius: 2px;
    animation: scrollWheel 2s infinite;
}

@keyframes scrollWheel {
    0% { transform: translateY(0); opacity: 1; }
    100% { transform: translateY(12px); opacity: 0; }
}

/* Timeline Section - Historical Timeline */
#historical-timeline {
    padding: 4rem 0;
    border-top: 1px solid var(--line);
    border-bottom: 1px solid var(--line);
    background: var(--bg);
    transition: background-color 0.3s ease;
}

/* Timeline Section Container */
.timeline-section {
    display: grid;
    grid-template-columns: 1fr 1.2fr;
    gap: 3rem;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 clamp(1rem, 4vw, 3rem);
    align-items: start;
}

/* Left Panel */
.left-panel {
    position: sticky;
    top: 100px;
}

.left-panel .badge {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 1rem;
    background: rgba(255, 107, 53, 0.1);
    border: 1px solid rgba(255, 107, 53, 0.2);
    border-radius: 999px;
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--orange);
    margin-bottom: 1.5rem;
    letter-spacing: 1px;
}

.left-panel .badge svg {
    width: 16px;
    height: 16px;
    fill: var(--orange);
    stroke: var(--orange);
}

.left-panel h1 {
    font-family: 'Space Grotesk', Inter, sans-serif;
    font-size: clamp(2.5rem, 5vw, 3.5rem);
    font-weight: 800;
    line-height: 1.1;
    color: var(--text);
    margin: 0 0 1.5rem;
    letter-spacing: -1px;
}

.left-panel .description {
    font-size: 0.95rem;
    line-height: 1.8;
    color: var(--muted);
    margin: 0 0 2rem;
}

.left-panel .image-card {
    position: relative;
    border-radius: 16px;
    overflow: visible;
    background: linear-gradient(145deg, var(--panel), var(--panel-soft));
    border: 1px solid var(--line);
    min-height: 280px;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    margin-top: 60px;
    padding-top: 60px;
    z-index: 1;
}

.left-panel .image-card::before {
    content: '';
    position: absolute;
    /* Fallback for inset */
    top: 60px;
    left: 0;
    right: 0;
    bottom: auto;
    height: auto;
    background: linear-gradient(to top, rgba(3, 17, 39, 0.95) 0%, rgba(3, 17, 39, 0.5) 40%, transparent 100%);
    z-index: 1;
    border-radius: 0 0 16px 16px;
}

.left-panel .image-card-image {
    width: 240px;
    margin-left: auto;
    margin-right: auto;
    text-align: center;
    border-radius: 16px 16px 0 0;
    z-index: 0;
}

.left-panel .image-card-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    -webkit-filter: brightness(0.9);
    filter: brightness(0.9);
    transition: transform 0.5s ease, -webkit-transform 0.5s ease;
}

.left-panel .image-card:hover .image-card-image img {
    transform: scale(1.05);
    -webkit-transform: scale(1.05);
}

.left-panel .image-card-content {
    position: relative;
    z-index: 2;
    padding: 1.5rem;
}

.left-panel .image-card h4 {
    font-family: 'Space Grotesk', Inter, sans-serif;
    font-size: 1.25rem;
    font-weight: 700;
    color: white;
    margin: 0 0 0.5rem;
    letter-spacing: 2px;
}

.left-panel .image-card p {
    font-size: 0.85rem;
    color: rgba(255, 255, 255, 0.8);
    margin: 0;
}

/* Right Panel / Timeline */
.right-panel {
    position: relative;
}

.timeline-container {
    position: relative;
    padding-left: 2rem;
}

.timeline-line {
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 2px;
    background: linear-gradient(180deg, var(--orange), var(--cyan), var(--violet));
    opacity: 0.6;
    border-radius: 1px;
}

[data-theme='light'] .timeline-line {
    opacity: 0.4;
}

/* Timeline Item */
.timeline-item {
    position: relative;
    margin-bottom: 1.25rem;
}

.timeline-item:last-child {
    margin-bottom: 0;
}

/* Timeline Dot */
.timeline-dot {
    position: absolute;
    left: -2rem;
    top: 1.25rem;
    width: 14px;
    height: 14px;
    background: var(--orange);
    border: 3px solid var(--bg);
    border-radius: 50%;
    z-index: 2;
    box-shadow: 0 0 12px var(--orange);
    transition: all 0.3s ease;
}

[data-theme='dark'] .timeline-dot {
    border-color: var(--bg);
    box-shadow: 0 0 16px var(--orange);
}

[data-theme='light'] .timeline-dot {
    border-color: #ffffff;
    box-shadow: 0 0 8px rgba(255, 107, 53, 0.5);
}

.timeline-item.cyan-dot .timeline-dot {
    background: var(--cyan);
    box-shadow: 0 0 12px var(--cyan);
}

[data-theme='dark'] .timeline-item.cyan-dot .timeline-dot {
    box-shadow: 0 0 16px var(--cyan);
}

[data-theme='light'] .timeline-item.cyan-dot .timeline-dot {
    box-shadow: 0 0 8px rgba(24, 217, 255, 0.5);
}

.timeline-item.expanded .timeline-dot {
    transform: scale(1.3);
}

/* Accordion Card */
.accordion-card {
    background: var(--panel);
    border: 1px solid var(--line);
    border-radius: 12px;
    overflow: hidden;
    transition: all 0.3s ease;
}

[data-theme='dark'] .accordion-card {
    background: rgba(5, 22, 50, 0.8);
}

[data-theme='light'] .accordion-card {
    background: rgba(255, 255, 255, 0.9);
}

.timeline-item.expanded .accordion-card {
    border-color: var(--orange);
    box-shadow: 0 4px 20px rgba(255, 107, 53, 0.2);
}

[data-theme='dark'] .timeline-item.expanded .accordion-card {
    box-shadow: 0 4px 30px rgba(255, 107, 53, 0.3);
}

.timeline-item.cyan-dot.expanded .accordion-card {
    border-color: var(--cyan);
    box-shadow: 0 4px 20px rgba(24, 217, 255, 0.2);
}

[data-theme='dark'] .timeline-item.cyan-dot.expanded .accordion-card {
    box-shadow: 0 4px 30px rgba(24, 217, 255, 0.3);
}

/* Accordion Header */
.accordion-header {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1.25rem 1.5rem;
    cursor: pointer;
    transition: background-color 0.3s ease;
}

.accordion-header:focus-visible {
    outline: 3px solid color-mix(in srgb, var(--cyan) 58%, transparent);
    outline-offset: -3px;
    border-radius: 10px;
}

[data-theme='dark'] .accordion-header:hover {
    background: rgba(255, 255, 255, 0.02);
}

[data-theme='light'] .accordion-header:hover {
    background: rgba(0, 0, 0, 0.02);
}

.accordion-header .number {
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(255, 107, 53, 0.1);
    border-radius: 8px;
    font-size: 0.75rem;
    font-weight: 700;
    color: var(--orange);
    flex-shrink: 0;
}

.timeline-item.cyan-dot .accordion-header .number {
    background: rgba(24, 217, 255, 0.1);
    color: var(--cyan);
}

.accordion-header .title-group {
    flex: 1;
}

.accordion-header h3 {
    font-size: 1rem;
    font-weight: 600;
    color: var(--text);
    margin: 0 0 0.25rem;
}

.accordion-header .date {
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--orange);
    letter-spacing: 1px;
}

.timeline-item.cyan-dot .accordion-header .date {
    color: var(--cyan);
}

.toggle-btn {
    width: 28px;
    height: 28px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--panel-soft);
    border: 1px solid var(--line);
    border-radius: 50%;
    font-size: 1rem;
    color: var(--muted);
    flex-shrink: 0;
    transition: all 0.3s ease;
}

[data-theme='dark'] .toggle-btn {
    background: rgba(5, 22, 50, 0.6);
}

[data-theme='light'] .toggle-btn {
    background: rgba(0, 0, 0, 0.05);
}

.timeline-item.expanded .toggle-btn {
    background: var(--orange);
    border-color: var(--orange);
    color: white;
}

.timeline-item.cyan-dot.expanded .toggle-btn {
    background: var(--cyan);
    border-color: var(--cyan);
}

/* Accordion Body */
.accordion-body {
    max-height: 0;
    overflow: hidden;
    visibility: hidden;
    opacity: 0;
    transition: max-height 0.42s ease, padding 0.42s ease, opacity 0.25s ease, visibility 0s linear 0.42s;
    padding: 0 1.5rem;
}

.timeline-item.expanded .accordion-body {
    visibility: visible;
    opacity: 1;
    transition-delay: 0s;
    padding: 0 1.5rem 1.5rem;
}

.accordion-body .body-text {
    font-size: 0.9rem;
    line-height: 1.7;
    color: var(--muted);
    margin: 0 0 1rem;
}

.accordion-body .quote-block {
    padding: 1rem;
    background: rgba(255, 107, 53, 0.08);
    border-left: 3px solid var(--orange);
    border-radius: 0 8px 8px 0;
    margin-bottom: 1rem;
}

[data-theme='dark'] .accordion-body .quote-block {
    background: rgba(255, 107, 53, 0.1);
}

[data-theme='light'] .accordion-body .quote-block {
    background: rgba(255, 107, 53, 0.05);
}

.accordion-body .quote-block p {
    font-size: 0.85rem;
    line-height: 1.7;
    color: var(--muted);
    margin: 0;
}

/* Thumbnail Container */
.thumbnail-container {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.75rem;
    background: var(--panel-soft);
    border-radius: 8px;
}

[data-theme='dark'] .thumbnail-container {
    background: rgba(5, 22, 50, 0.6);
}

[data-theme='light'] .thumbnail-container {
    background: rgba(0, 0, 0, 0.05);
}

.thumb-date {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.75rem;
    color: var(--muted);
}

.thumb-date svg {
    width: 14px;
    height: 14px;
    fill: none;
    stroke: currentColor;
}

.thumb-tag {
    padding: 0.25rem 0.75rem;
    background: var(--orange);
    color: white;
    font-size: 0.65rem;
    font-weight: 700;
    letter-spacing: 1px;
    border-radius: 999px;
}

/* Responsive Timeline */
@media (max-width: 992px) {
    .timeline-section {
        grid-template-columns: 1fr;
        gap: 2rem;
    }

    .left-panel {
        position: relative;
        top: 0;
    }
}

@media (max-width: 640px) {
    #historical-timeline {
        padding: 3rem 0;
    }

    .timeline-container {
        padding-left: 1.5rem;
    }

    .timeline-line {
        left: -0.25rem;
    }

    .timeline-dot {
        left: -1.5rem;
    }

    .accordion-header {
        padding: 1rem;
        flex-wrap: wrap;
    }

    .accordion-header .number {
        width: 32px;
        height: 32px;
        font-size: 0.7rem;
    }

    .accordion-header h3 {
        font-size: 0.9rem;
    }

    .timeline-item.expanded .accordion-body {
        padding: 0 1rem 1rem;
    }
}

/* Responsive hero: allow the content to define its height on tablets and phones. */
@media (max-width: 1100px) {
    .hero-slider-section,
    .heroSwiper {
        height: auto;
        min-height: max(100svh, 760px);
        max-height: none;
    }

    .heroSwiper .swiper-slide { height: auto; min-height: max(100svh, 760px); }
    .slide-content { min-height: max(100svh, 760px); padding: 105px clamp(1.25rem, 4vw, 2.5rem) 76px; }
    .slide-content > .slide-inner {
        grid-template-columns: minmax(0, 1fr) minmax(280px, 320px);
        gap: clamp(1.5rem, 4vw, 3rem);
    }
    .slide-text { min-width: 0; }
    .slide-text h1 { font-size: clamp(2.7rem, 6.7vw, 4.25rem); }
    .weather-card { width: 100%; margin-top: 0; padding: 1.2rem; }
    .scroll-indicator { bottom: 24px; }
}

@media (max-width: 860px) {
    .hero-slider-section,
    .heroSwiper,
    .heroSwiper .swiper-slide,
    .slide-content { min-height: max(100svh, 820px); }

    .slide-bg { background-position: 58% center; }
    .slide-overlay {
        background: linear-gradient(180deg, rgba(3,17,39,.82) 0%, rgba(3,17,39,.52) 46%, rgba(3,17,39,.9) 100%);
    }
    .slide-content { justify-content: flex-start; padding-top: 112px; padding-bottom: 70px; }
    .slide-content > .slide-inner { grid-template-columns: 1fr; gap: 1.5rem; }
    .slide-text { max-width: 680px; gap: .8rem; }
    .slide-text h1 { font-size: clamp(2.55rem, 9vw, 4rem); }
    .slide-description { max-width: 650px; font-size: clamp(.9rem, 2.2vw, 1.05rem); line-height: 1.65; }
    .slide-actions { margin-top: .55rem; }
    .slide-nav { margin-top: .7rem; }

    .weather-card {
        display: grid;
        grid-template-columns: minmax(145px,.75fr) minmax(160px,.8fr) minmax(250px,1.35fr);
        gap: 1rem;
        align-items: center;
        border-radius: 17px;
        background: rgba(5,22,50,.64);
    }
    .weather-main,
    .weather-location { min-height: 92px; margin: 0; padding: .3rem 1rem .3rem 0; border: 0; border-right: 1px solid rgba(255,255,255,.12); }
    .weather-main { gap: .7rem; }
    .weather-icon,.weather-temp { font-size: 2.25rem; }
    .weather-status { font-size: .78rem; }
    .weather-location { justify-content: center; align-items: flex-start; }
    .weather-location span { font-size: .72rem; letter-spacing: 1px; }
    .weather-location small { font-size: .66rem; }
    .events-section { min-width: 0; }
    .events-section h4 { margin-bottom: .35rem; }
    .event-item { padding: .4rem 0; }
    .event-info { min-width: 0; }
    .event-info strong,.event-info span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
    .live-atlas-btn { padding: .55rem; margin-top: .3rem; }
    .view-all-link { margin-top: .45rem; font-size: .65rem; }
    .scroll-indicator { display: none; }
}

@media (max-width: 640px) {
    .hero-slider-section {
        height: auto !important;
        min-height: 100svh;
        max-height: none;
    }

    .heroSwiper { height: auto !important; min-height: 100svh; }
    .heroSwiper .swiper-wrapper { height: auto !important; min-height: 100svh; align-items: stretch; }
    .heroSwiper .swiper-slide { height: auto !important; min-height: 100svh; align-self: stretch; }
    .slide-content { height: auto; min-height: 100svh; }

    .slide-content {
        padding: 92px max(1rem, env(safe-area-inset-left)) 42px;
    }

    .slide-content > .slide-inner {
        gap: 1.15rem;
    }

    .slide-text { gap: .68rem; }
    .welcome-label { font-size: .66rem; letter-spacing: .15em; }
    .slide-text h1 { font-size: clamp(2.2rem, 12vw, 3.15rem); line-height: 1; }
    .slide-description { font-size: .84rem; line-height: 1.58; }

    .slide-actions {
        flex-direction: column;
        margin-top: .35rem;
    }

    .btn-explore,
    .btn-video {
        width: 100%;
        justify-content: center;
    }

    .btn-explore { min-height: 44px; padding: .72rem 1.2rem; font-size: .82rem; }

    .weather-card {
        grid-template-columns: 1fr 1fr;
        gap: .75rem;
        padding: .9rem;
        border-radius: 15px;
    }

    .weather-main,.weather-location { min-height: 78px; padding: .1rem .7rem .1rem 0; }
    .weather-location { border-right: 0; padding-right: 0; }
    .events-section { grid-column: 1 / -1; padding-top: .7rem; border-top: 1px solid rgba(255,255,255,.12); }
    .event-item { align-items: center; }

    .weather-icon {
        font-size: 1.8rem;
    }

    .weather-temp {
        font-size: 2rem;
    }

    .weather-status { display: none; }

    .slide-nav {
        justify-content: flex-start;
        margin-top: .45rem;
    }

    .nav-label {
        display: none;
    }

    .nav-dots .dot { width: 7px; height: 7px; }
    .nav-dots .dot.active { width: 24px; }
}

@media (max-width: 390px) {
    .hero-slider-section,
    .heroSwiper,
    .heroSwiper .swiper-slide,
    .slide-content { min-height: 100svh; }
    .slide-content { padding-top: 86px; }
    .slide-text h1 { font-size: 2.1rem; }
    .slide-description { font-size: .78rem; }
    .weather-card { gap: .55rem; padding: .75rem; }
    .weather-main,.weather-location { min-height: 70px; }
    .weather-icon { font-size: 1.55rem; }
    .weather-temp { font-size: 1.75rem; }
    .weather-location span { font-size: .62rem; }
    .weather-location small { font-size: .57rem; }
    .event-time { min-width: 50px; }
    .event-info strong { font-size: .75rem; }
}

/* On phones the weather panel becomes a separate block below the hero image.
   Tablet and desktop positioning intentionally remains unchanged. */
@media (max-width: 640px) {
    .hero-slider-section,
    .heroSwiper,
    .heroSwiper .swiper-wrapper,
    .heroSwiper .swiper-slide {
        height: auto !important;
        min-height: 0;
        max-height: none;
    }

    .heroSwiper .swiper-slide {
        background: var(--bg-primary, #07142d);
    }

    .heroSwiper .slide-bg {
        inset: 0 0 auto;
        height: 570px;
    }

    .heroSwiper .slide-content {
        height: auto;
        min-height: 0;
        padding: 0 max(1rem, env(safe-area-inset-left)) 32px;
    }

    .heroSwiper .slide-content > .slide-inner {
        display: grid;
        grid-template-columns: minmax(0, 1fr);
        gap: 0;
    }

    .heroSwiper .slide-text {
        min-height: 570px;
        justify-content: center;
        padding: 82px 0 46px;
    }

    .heroSwiper .weather-card {
        position: relative;
        z-index: 12;
        width: 100%;
        margin: 18px 0 0;
        transform: none;
        align-self: stretch;
        background: linear-gradient(145deg, rgba(12, 35, 75, .98), rgba(8, 24, 53, .98));
        border-color: rgba(143, 181, 236, .2);
        box-shadow: 0 18px 42px rgba(2, 12, 31, .3);
        backdrop-filter: none;
    }

    [data-theme="light"] .heroSwiper .swiper-slide {
        background: #f6f9ff;
    }

    [data-theme="light"] .heroSwiper .weather-card {
        background: linear-gradient(145deg, #102b57, #091d40);
        box-shadow: 0 16px 38px rgba(35, 66, 112, .2);
    }
}

@media (max-width: 390px) {
    .heroSwiper .slide-bg,
    .heroSwiper .slide-text {
        height: auto;
        min-height: 540px;
    }

    .heroSwiper .slide-content {
        padding-top: 0;
    }

    .heroSwiper .slide-text {
        padding-top: 76px;
    }
}

/* Dashboard Panel - Metric Grid */
.metric-grid {
    position: relative;
    width: 100%;
    height: 100%;
    min-height: 200px;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    background: rgba(0, 0, 0, 0.1);
    border-radius: 0.5rem;
}

.metric-grid img {
    width: 100%;
    height: auto;
    max-height: 100%;
    object-fit: contain;
    display: block;
    border-radius: 0.5rem;
}

/* Fullscreen Button */
.fullscreen-btn {
    position: absolute;
    top: 12px;
    right: 12px;
    background: rgba(0, 0, 0, 0.6);
    color: white;
    border: none;
    border-radius: 50%;
    width: 36px;
    height: 36px;
    cursor: pointer;
    font-size: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    z-index: 10;
}

.fullscreen-btn:hover {
    background: rgba(0, 0, 0, 0.85);
    transform: scale(1.1);
}

/* Map Popup Overlay */
.map-popup-overlay {
    animation: fadeIn 0.3s ease;
}

.map-popup-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.9);
    z-index: 9999;
    justify-content: center;
    align-items: center;
    cursor: pointer;
}

.map-popup-content {
    position: relative;
    max-width: 90vw;
    max-height: 90vh;
}

.map-popup-content img {
    max-width: 100%;
    max-height: 90vh;
    object-fit: contain;
    border-radius: 8px;
}

.close-popup-btn {
    position: absolute;
    top: 10px;
    right: 10px;
    background: rgba(0, 0, 0, 0.7);
    color: white;
    border: none;
    border-radius: 50%;
    width: 40px;
    height: 40px;
    cursor: pointer;
    font-size: 18px;
    display: flex;
    align-items: center;
    justify-content: center;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

/* Home categories: scoped to the Explore panel so other page layouts stay intact. */
.explore-panel .category-row {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: .55rem;
    margin-bottom: 1rem;
}

.explore-panel .category-row a {
    position: relative;
    display: grid;
    min-width: 0;
    min-height: 4.25rem;
    padding: .4rem;
    place-items: center;
    align-content: center;
    gap: .35rem;
    overflow: hidden;
    border: 1px solid var(--line);
    border-radius: .85rem;
    color: var(--text);
    text-align: center;
    font-family: Inter, ui-sans-serif, system-ui, sans-serif;
    background: color-mix(in srgb, var(--category-tone) 5%, var(--panel));
    transition: transform .25s ease, border-color .25s ease, box-shadow .25s ease;
}

.explore-panel .category-row a::before {
    position: absolute;
    inset: 0 0 auto;
    height: 3px;
    background: linear-gradient(90deg, transparent, var(--category-tone), transparent);
    content: "";
}

.explore-panel .category-row a > span {
    display: grid;
    width: 2.2rem;
    height: 2.2rem;
    place-items: center;
    border: 1px solid color-mix(in srgb, var(--category-tone) 45%, transparent);
    border-radius: 50%;
    color: var(--category-tone);
    font-size: .88rem;
    background: linear-gradient(145deg, color-mix(in srgb, var(--category-tone) 19%, var(--panel)), color-mix(in srgb, var(--category-tone) 8%, transparent));
    box-shadow: 0 6px 16px color-mix(in srgb, var(--category-tone) 16%, transparent);
}

.explore-panel .category-row b {
    font-size: .7rem;
    font-weight: 800;
    line-height: 1.25;
    letter-spacing: -.01em;
}
.explore-panel .category-row a:focus-visible {
    outline: 3px solid color-mix(in srgb, var(--category-tone) 52%, transparent);
    outline-offset: 3px;
}
.explore-panel .category-row a:hover,
.explore-panel .category-row a.active {
    border-color: color-mix(in srgb, var(--category-tone) 62%, var(--line));
    box-shadow: 0 10px 22px color-mix(in srgb, var(--category-tone) 15%, transparent);
    transform: translateY(-3px);
}

/* Database-backed update cards. */
.news-panel .news-card {
    display: block;
    background-image: var(--news-image, linear-gradient(135deg, rgba(24,217,255,.18), rgba(243,83,215,.15)));
    background-size: cover;
    background-position: center;
    color: #fff;
    transition: transform .25s ease, box-shadow .25s ease;
}

.news-panel .news-card:hover {
    box-shadow: 0 17px 35px rgba(24, 126, 255, .2);
    transform: translateY(-5px);
}

.news-panel .home-latest-news-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 1rem;
}

.news-panel .home-latest-news-grid .news-card {
    display: flex;
    min-height: 18rem;
    padding: 9.5rem 1.05rem 1rem;
    flex-direction: column;
    justify-content: flex-end;
    border-radius: .9rem;
}

.news-panel .home-latest-news-grid .news-card::before {
    background: linear-gradient(180deg, rgba(3, 11, 28, .04) 18%, rgba(3, 11, 28, .94) 82%);
}

.news-panel .home-latest-news-grid .news-card span {
    width: fit-content;
    font-size: .65rem;
}

.news-panel .home-latest-news-grid .news-card h3 {
    display: -webkit-box;
    overflow: hidden;
    margin-top: .65rem;
    font-size: 1.02rem;
    line-height: 1.35;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
}

.news-panel .home-latest-news-grid .news-card p {
    display: -webkit-box;
    overflow: hidden;
    margin-top: .45rem;
    color: #dbe7f8;
    font-size: .75rem;
    line-height: 1.5;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
}

.news-panel .home-latest-news-grid .news-card small {
    margin-top: .65rem;
    color: #c7d7ee;
    font-size: .68rem;
}

@media (max-width: 540px) {
    .news-panel .home-latest-news-grid { grid-template-columns: 1fr; }
    .news-panel .home-latest-news-grid .news-card { min-height: 17rem; }
}

.home-data-empty {
    display: flex;
    min-height: 9rem;
    padding: 1rem;
    align-items: center;
    justify-content: center;
    gap: .85rem;
    border: 1px dashed var(--line);
    border-radius: .8rem;
    color: var(--muted);
    text-align: left;
    background: color-mix(in srgb, var(--panel) 88%, transparent);
}

.home-data-empty > i { color: var(--violet); font-size: 1.7rem; }
.home-data-empty b,
.home-data-empty small { display: block; }
.home-data-empty b { color: var(--text); font-size: .8rem; }
.home-data-empty small { margin-top: .2rem; font-size: .68rem; }
.news-grid > .home-data-empty { grid-column: 1 / -1; }

/* Database-backed tourism cards. */
.explore-panel .place-grid {
    width: 100%;
    margin-inline: auto;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: .85rem;
}

.explore-panel .place-card {
    min-height: 9.375rem;
    color: #fff;
    background-image: var(--place-image), linear-gradient(135deg, rgba(24,217,255,.18), rgba(112,74,255,.2));
    background-size: cover;
    background-position: center;
    text-decoration: none;
}

.explore-panel .place-card::before {
    background: linear-gradient(180deg, rgba(3,11,28,.03) 22%, rgba(3,11,28,.92) 100%);
}

.explore-panel .place-card div { padding: 1.1rem; }
.explore-panel .place-card h3 {
    margin: 0;
    color: #fff;
    font-size: clamp(1rem, 1.4vw, 1.2rem);
    font-weight: 800;
    line-height: 1.25;
    letter-spacing: -.02em;
}
.explore-panel .place-card p {
    margin: .35rem 0 0;
    color: rgba(225,239,255,.88);
    font-size: .82rem;
    font-weight: 600;
    line-height: 1.4;
}
.explore-panel .tourism-empty { grid-column: 1 / -1; }

@media (max-width: 980px) {
    .explore-panel .category-row { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}

@media (max-width: 560px) {
    .explore-panel .category-row { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: .45rem; }
    .explore-panel .category-row a { min-height: 4.1rem; padding: .35rem .3rem; }
    .explore-panel .category-row a > span { width: 2rem; height: 2rem; font-size: .8rem; }
    .explore-panel .place-grid { width: 100%; grid-template-columns: 1fr; }
}

@media (max-width: 390px) {
    .explore-panel .category-row { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
