/* Slideshow styles */
.hero-banner {
    background-size: cover;
    background-position: center;
    color: #fff;
    padding: 2rem 0;
    position: relative;
    overflow: visible;
    margin-bottom: 0;
    z-index: 1;
}

.slideshow {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1;
}
.slideshow-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: rgba(0, 0, 0, 0.5); /* Light gray/dark translucent overlay */
    z-index: 2;
}
.hero-banner .hero-body {
    z-index: 3;
    display: flex !important;
    align-items: flex-end !important;
    /* Navbar is fixed and transparent over the banner, so clear its real
       height (set by navbar.html) instead of guessing at it. */
    padding-top: calc(var(--navbar-height, 100px) + var(--hero-gap, 2rem)) !important;
}
.slideshow-item {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
    transition: opacity 1s ease-in-out;
    background-size: cover;
    background-position: center;
    z-index: 1;
}
.slideshow-item.active { opacity: 1; }

/* Text styles */
.banner-title {
    font-size: 34px;
    line-height: 40px;
    font-weight: 500;
    color: #fff;
    text-shadow: 1px 2px 2px rgba(0, 0, 0, 0.3);
}
.banner-subtitle {
    font-size: 18px;
    line-height: 28px;
    max-width: 58rem;
    color: #fff;
    text-shadow: 1px 1px 1px rgba(0, 0, 0, 0.2);
}
.section-title {
    display: flex;
    justify-content: center;
    font-size: 32px;
    width: 100%;
    padding-bottom: 40px;
    font-weight: 500;
    color: var(--text);
}
.intro-text {
    font-size: 24px;
    color: var(--link);
}

/* Button styles */
.map-btn {
    margin-top: 20px;
    background-color: var(--secondary);
    color: var(--on-secondary);
    border-color: var(--secondary);
    transition: background-color 0.3s ease, border-color 0.3s ease;
}

.map-btn:hover {
    background-color: var(--secondary-hover);
    border-color: var(--secondary-hover);
}
.map-btn:hover span {
    transform: translateX(5px);
}

.banner-arrow {
    position: absolute;
    display: flex;
    justify-content: center;
    width: 100%;
    bottom: -20px;
    z-index: 100;
}
.banner-arrow button {
    background-color: var(--secondary);
    height: 40px;
    width: 40px;
    border-radius: 50%;
    border: none;
    cursor: pointer;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
    transition: background-color 0.3s ease;
}

.banner-arrow button:hover {
    background-color: var(--secondary-hover);
}

.banner-arrow button svg {
    height: 15px;
    width: 15px;
    fill: var(--on-secondary);
}

/* Layout styles */
section:nth-child(even) {
    background-color: color-mix(in srgb, var(--surface) 98%, black);
}

.section {
    padding: 0.75rem 0;
    background-color: var(--surface);
}

.section:first-of-type {
    padding-top: 1.5rem;
    margin-top: 0;
    position: relative;
    z-index: 1;
}

.map-widget-section {
    padding: 0.25rem 0 0;
}

.info-section:nth-child(odd) .info-section-row {
    flex-direction: row-reverse !important;
}

/* Image styles */
.intro-image {
    height: 360px;
    width: 100%;
}
.intro-image img {
    height: 100%;
    width: 100%;
    object-fit: contain;
}
.info-image {
    height: 400px;
    width: 100%;
    padding: 0 16px;
}
.info-image img {
    height: 100%;
    width: 100%;
    object-fit: cover;
    border-radius: 8px;
}

/* Feature styles */
.feature-icon-fill {
    background-color: var(--accent);
    transition: background-color 0.3s ease;
}

.feature-icon-fill:hover {
    background-color: var(--secondary);
}

.feature-icon {
    width: fit-content;
    padding: 12px;
    border-radius: 4px;
    display: flex;
    align-items: center;
}

.feature-icon svg {
    height: 40px;
    width: 40px;
    fill: var(--on-accent);
    transition: fill 0.3s ease;
}

.feature-icon-fill:hover svg {
    fill: var(--on-secondary);
}

.icon-fill svg {
    fill: var(--link);
}

.feature-title {
    padding: 10px 0;
    font-weight: 500;
    text-align: center;
    color: var(--text);
}

.feature-description {
    text-align: center;
    color: var(--text-muted);
}

/* Category styles */
.category-map-link {
    color: var(--link);
    transition: color 0.3s ease;
}

.category-map-link:hover,
.category-map-link:hover svg {
    color: var(--link-hover);
    fill: var(--link-hover);
}

.dataset-count {
    position: absolute;
    bottom: 0;
    right: 0;
    display: flex;
    justify-content: center;
    align-items: center;
    width: 20px;
    height: 20px;
    background-color: var(--secondary);
    border-radius: 100%;
    font-size: 12px;
    font-weight: 500;
    color: var(--on-secondary);
}

/* Info section styles */
.info-description {
    padding-bottom: 20px;
    color: var(--text-muted);
}

.info-title {
    font-size: 32px;
    font-weight: 500;
    padding: 20px 0;
    color: var(--text);
}

.info-list-items {
    list-style: none;
    padding-left: 0;
}

.info-list-items li {
    position: relative;
    padding-left: 1.5em;
    font-size: 18px;
    padding-bottom: 4px;
    color: var(--text);
}

.info-list-items li:before {
    content: "";
    position: absolute;
    left: 0;
    width: 1em;
    height: 1em;
    margin-top: 4px;
    background: url("data:image/svg+xml;utf8,<?xml version='1.0' encoding='utf-8'?><svg width='18' height='18' viewBox='0 0 1792 1792' xmlns='http://www.w3.org/2000/svg'><path d='M1671 566q0 40-28 68l-724 724-136 136q-28 28-68 28t-68-28l-136-136-362-362q-28-28-28-68t28-68l136-136q28-28 68-28t68 28l294 295 656-657q28-28 68-28t68 28l136 136q28 28 28 68z' fill='currentColor'/></svg>") no-repeat;
}

/* Additional global text styles */
body {
    color: var(--text);
    background-color: var(--surface);
}

/* Sliders: partner logos and member states share one moving strip */
.partners-slider-section,
.member-states-section {
    background-color: color-mix(in srgb, var(--surface) 98%, black);
    padding: 0.75rem 0 0.5rem;
}

.partners-slider-wrapper,
.member-states-slider-wrapper {
    overflow: hidden;
    margin: 2rem 0;
    position: relative;
    mask-image: linear-gradient(to right, transparent, black 10%, black 90%, transparent);
    -webkit-mask-image: linear-gradient(to right, transparent, black 10%, black 90%, transparent);
}

.member-states-slider-wrapper {
    margin: 2rem auto;
    max-width: 800px;
}

.partners-slider,
.member-states-slider {
    display: flex;
    gap: 3rem;
    animation: scroll 30s linear infinite;
    width: fit-content;
}

/* Member states move left to right */
.member-states-slider {
    animation-direction: reverse;
}

.partners-slider:hover,
.member-states-slider:hover {
    animation-play-state: paused;
}

.partner-slide,
.member-state-slide {
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1rem;
    background-color: var(--surface);
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.partner-slide {
    height: 120px;
    width: 180px;
}

.member-state-slide {
    flex-direction: column;
    gap: 0.65rem;
    width: 160px;
}

.partner-slide:hover,
.member-state-slide:hover {
    transform: translateY(-3px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.partner-logo-img {
    max-width: 150px;
    max-height: 90px;
    width: auto;
    height: auto;
    object-fit: contain;
    display: block;
}

.member-state-flag-frame {
    width: 120px;
    height: 80px;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 6px;
    border-radius: 4px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
    border: 1px solid color-mix(in srgb, var(--text) 20%, transparent);
    background-color: var(--surface);
    box-sizing: border-box;
}

.member-state-flag {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
}

.member-state-name {
    font-size: 14px;
    font-weight: 400;
    color: var(--text);
    text-align: center;
}

.more-partners-btn {
    background-color: var(--brand);
    color: var(--on-brand);
    border-color: var(--brand);
    transition: background-color 0.3s ease, border-color 0.3s ease;
    padding: 0.75rem 2rem;
    font-weight: 600;
}

.more-partners-btn:hover {
    background-color: var(--accent);
    border-color: var(--accent);
    color: var(--on-accent);
}

@keyframes scroll {
    0% {
        transform: translateX(0);
    }
    100% {
        transform: translateX(-50%);
    }
}

@media screen and (max-width: 768px) {
    .partners-slider,
    .member-states-slider {
        gap: 2rem;
        animation-duration: 20s;
    }

    .partner-slide {
        height: 100px;
        width: 150px;
        padding: 0.75rem;
    }

    .partner-logo-img {
        max-width: 120px;
        max-height: 70px;
    }

    .member-state-slide {
        width: 130px;
        padding: 0.75rem;
    }

    .member-state-flag-frame {
        width: 100px;
        height: 65px;
    }
}

/* What's Included & Features section padding */
.whats-included-section .container,
.features-section .container {
    padding: 1.5rem 1rem;
}

/* 6 per row on widescreen (≥1216px) */
@media screen and (min-width: 1216px) {
    .whats-included-section .column.is-one-fifth-desktop,
    .features-section .column.is-one-fifth-desktop {
        width: calc(100% / 6);
        flex: none;
    }
}

/* ── Tablet & mobile responsive fixes ── */
@media screen and (max-width: 1024px) {
    .banner-title {
        font-size: 28px;
        line-height: 34px;
    }
    .banner-subtitle {
        font-size: 16px;
        max-width: 100%;
    }
    .section-title {
        font-size: 26px;
        padding-bottom: 28px;
    }
    .intro-text {
        font-size: 20px;
    }
    .info-title {
        font-size: 26px;
    }
    .feature-icon svg {
        height: 36px;
        width: 36px;
    }
}

@media screen and (max-width: 768px) {
    .hero-banner {
        padding: 0 0 1rem;
    }
    .hero-banner .hero-body {
        --hero-gap: 1.25rem;
        padding-bottom: 1.5rem !important;
    }
    .banner-title {
        font-size: 22px;
        line-height: 28px;
    }
    .banner-subtitle {
        font-size: 14px;
        line-height: 22px;
        max-width: 100%;
    }
    .section-title {
        font-size: 22px;
        padding-bottom: 20px;
    }
    .intro-text {
        font-size: 16px;
    }
    .intro-image {
        height: 240px;
    }
    .info-image {
        height: 240px;
        padding: 0 8px;
    }
    .info-title {
        font-size: 22px;
        padding: 12px 0;
    }
    .info-list-items li {
        font-size: 15px;
    }
    .info-section:nth-child(odd) .info-section-row {
        flex-direction: column !important;
    }
    .member-state-item {
        flex-shrink: 1;
    }
    .feature-icon svg {
        height: 32px;
        width: 32px;
    }
    .feature-title {
        font-size: 14px;
        padding: 6px 0;
    }
    .feature-description {
        font-size: 13px;
    }
    .dataset-count {
        width: 16px;
        height: 16px;
        font-size: 10px;
    }
    .whats-included-section .container,
    .features-section .container {
        padding: 1rem 0.75rem;
    }
}

@media screen and (max-width: 480px) {
    .banner-title {
        font-size: 18px;
        line-height: 24px;
    }
    .banner-subtitle {
        font-size: 13px;
    }
    .section-title {
        font-size: 18px;
        padding-bottom: 16px;
    }
    .intro-image {
        height: 180px;
    }
    .info-image {
        height: 180px;
    }
    .member-state-flag-frame {
        width: 80px;
        height: 53px;
    }
    .member-states-grid {
        gap: 1rem;
    }
    .map-btn {
        font-size: 0.8rem;
        padding: 0.4rem 0.9rem;
        margin-top: 12px;
    }
    .feature-icon {
        padding: 8px;
    }
    .feature-icon svg {
        height: 28px;
        width: 28px;
    }
    .feature-title {
        font-size: 12px;
    }
    .feature-description {
        font-size: 12px;
    }
    .dataset-count {
        width: 14px;
        height: 14px;
        font-size: 9px;
    }
    .whats-included-section .container,
    .features-section .container {
        padding: 0.75rem 0.5rem;
    }
}
