/* ==========================================================================
   Site header + home page responsive styles
   ========================================================================== */

/* ---------- Header ---------- */
.site-header {
    padding-top: .5rem;
    padding-bottom: .5rem;
}

.site-header-inner {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
}

.site-header-brand {
    padding: 0;
}

.site-header-brand img {
    width: 60px;
    height: 60px;
    object-fit: contain;
}

/* Home: floating white card, the bar itself stays transparent */
.site-header-home,
.site-header-home.navbar-stuck {
    background-color: transparent !important;
    box-shadow: none !important;
    padding-top: .75rem;
}

.site-header-home .site-header-inner {
    padding: .5rem 1rem;
    border-radius: .75rem;
}

@media (min-width: 992px) {
    .site-header-home .site-header-inner {
        width: 66.6667%;
        max-width: 1100px;
        min-width: 860px;
    }
}

/* Toggler (hamburger -> X) */
.site-header-toggler {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    padding: 0;
    border: 1px solid #efecf3;
    border-radius: .625rem;
    background-color: #f9f8fa;
    box-shadow: none !important;
}

.site-header-toggler-bars {
    position: relative;
    display: block;
    width: 20px;
    height: 14px;
}

.site-header-toggler-bars span {
    position: absolute;
    right: 0;
    left: 0;
    height: 2px;
    border-radius: 2px;
    background-color: #454056;
    transition: transform .25s ease, opacity .2s ease, top .25s ease;
}

.site-header-toggler-bars span:nth-child(1) { top: 0; }
.site-header-toggler-bars span:nth-child(2) { top: 6px; }
.site-header-toggler-bars span:nth-child(3) { top: 12px; }

.site-header-toggler:not(.collapsed) .site-header-toggler-bars span:nth-child(1) {
    top: 6px;
    transform: rotate(45deg);
}

.site-header-toggler:not(.collapsed) .site-header-toggler-bars span:nth-child(2) {
    opacity: 0;
}

.site-header-toggler:not(.collapsed) .site-header-toggler-bars span:nth-child(3) {
    top: 6px;
    transform: rotate(-45deg);
}

@media (max-width: 991.98px) {
    .site-header {
        padding-top: .5rem;
        padding-bottom: .5rem;
    }

    /* Inner pages: solid bar so the open menu is always readable */
    .site-header:not(.site-header-home) {
        background-color: #fff;
        box-shadow: 0 .125rem .125rem -.125rem rgba(31, 27, 45, .08), 0 .25rem .75rem rgba(31, 27, 45, .08);
    }

    .site-header-home {
        padding-right: .75rem;
        padding-left: .75rem;
    }

    .site-header-home .site-header-inner {
        width: 100%;
        max-width: 720px;
        padding: .375rem .625rem;
    }

    .site-header-brand img {
        width: 46px;
        height: 46px;
    }

    .site-header-cta {
        white-space: nowrap;
        padding: .5rem .75rem;
    }

    .site-header-collapse {
        flex-basis: 100%;
        max-height: calc(100vh - 5.5rem);
        max-height: calc(100dvh - 5.5rem);
        overflow-y: auto;
    }

    .site-header-nav {
        margin: .5rem 0 0;
        padding: .625rem 0 0;
        border-top: 1px solid #efecf3;
    }

    .site-header-nav .nav-item {
        margin: 0 0 .25rem;
        padding: 0;
        border: 0;
    }

    .site-header-nav .nav-link {
        display: flex;
        align-items: center;
        padding: .75rem .875rem !important;
        border: 0 !important;
        border-radius: .625rem;
        font-size: 1rem;
        font-weight: 500;
        color: #454056;
        background-color: transparent;
    }

    .site-header-nav .nav-link i {
        margin-left: .75rem;
        font-size: 1.25rem;
        opacity: .7;
    }

    .site-header-nav .nav-link:active,
    .site-header-nav .nav-link:hover {
        background-color: #f5f4f8;
    }

    .site-header-nav .nav-link.active {
        color: var(--fi-primary, #fd5631);
        background-color: rgba(253, 86, 49, .08);
    }

    .site-header-nav .nav-link.active i {
        opacity: 1;
    }

    .site-header-account {
        margin-top: .5rem;
        padding: .875rem 0 .5rem;
        border-top: 1px solid #efecf3;
    }
}

@media (max-width: 359.98px) {
    .site-header-cta {
        padding: .5rem .625rem;
        font-size: .75rem;
    }
}

/* ---------- Hero ---------- */
.home-hero {
    position: relative;
    display: flex;
    align-items: center;
    min-height: 600px;
    padding: 9rem 0 5rem;
    overflow: hidden;
    background-color: #1f1b2d;
}

.home-hero .particles,
.home-hero #particles-js {
    position: absolute;
    top: 0;
    right: 0;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 0;
    background-color: rgba(0, 0, 0, .65);
    background-size: cover;
    background-position: 50% 50%;
    background-repeat: no-repeat;
}

.home-hero .particles canvas {
    width: 100% !important;
    height: 100% !important;
}

.home-hero-content {
    position: relative;
    z-index: 1;
    text-align: center;
}

.home-hero-title {
    margin: 0 auto 1rem;
    max-width: 60rem;
    font-size: clamp(1.5rem, 1rem + 2.6vw, 2.75rem);
    font-weight: 700;
    line-height: 1.5;
}

.home-hero-lead {
    margin: 0 auto 2rem;
    max-width: 40rem;
    font-size: clamp(.9rem, .82rem + .4vw, 1.05rem);
    line-height: 1.9;
    opacity: .9;
}

/* Search panel */
.home-search {
    display: flex;
    align-items: center;
    max-width: 46rem;
    margin: 0 auto;
    padding: .5rem;
    border-radius: .75rem;
    background-color: #fff;
    box-shadow: 0 .5rem 1.875rem rgba(0, 0, 0, .2);
}

.home-search-field {
    flex: 1 1 0;
    min-width: 0;
}

.home-search-field + .home-search-field {
    border-right: 1px solid #efecf3;
}

.home-search .form-select {
    height: 48px;
    border: 0;
    box-shadow: none;
    background-color: transparent;
    text-overflow: ellipsis;
}

.home-search-btn {
    flex-shrink: 0;
    height: 48px;
    margin-right: .5rem;
    padding: 0 1.25rem;
    white-space: nowrap;
}

@media (max-width: 991.98px) {
    .home-hero {
        min-height: 0;
        padding: 8rem 0 4rem;
    }
}

@media (max-width: 767.98px) {
    .home-hero {
        padding: 7rem 0 2.5rem;
    }

    .home-hero-lead {
        margin-bottom: 1.5rem;
    }

    .home-search {
        display: grid;
        grid-template-columns: 1fr;
        gap: .5rem;
        max-width: 28rem;
        padding: .75rem;
    }

    .home-search-field + .home-search-field {
        border-right: 0;
    }

    .home-search .form-select {
        height: 46px;
        border: 1px solid #e4e1ea;
        border-radius: .5rem;
        background-color: #fff;
    }

    .home-search-btn {
        width: 100%;
        margin: .125rem 0 0;
    }
}

/* ---------- Usage cards ---------- */
.home-usages {
    margin-top: 2.5rem;
}

@media (min-width: 992px) {
    .home-usages {
        margin-top: 4rem;
    }
}

@media (max-width: 575.98px) {
    .home-usage-card {
        padding: 1rem .5rem;
    }

    .home-usage-card .icon-box-media {
        margin-bottom: .625rem !important;
    }

    .home-usage-card .icon-box-title {
        font-size: .875rem !important;
        line-height: 1.6;
    }
}

/* ---------- Section titles ---------- */
@media (max-width: 575.98px) {
    .home-section-title,
    .home-regions h2,
    section > h2.h3 {
        font-size: 1.25rem;
    }
}

/* ---------- Regions (pills) ---------- */
.home-regions-list {
    position: relative;
    display: flex;
    flex-wrap: wrap;
    gap: .625rem;
    max-height: 10.75rem;
    padding: .25rem .25rem .5rem;
    margin: 0 -.25rem;
    overflow: hidden;
}

.home-regions-list.is-open {
    max-height: none;
}

.home-regions-list:not(.is-open)::after {
    content: "";
    position: absolute;
    right: 0;
    bottom: 0;
    left: 0;
    height: 2.5rem;
    background: linear-gradient(to bottom, rgba(255, 255, 255, 0), #fff);
    pointer-events: none;
}

.home-region-pill {
    max-width: 100%;
    padding: .375rem .375rem .375rem 1rem;
    text-decoration: none;
}

.home-region-pill .icon-box-media {
    width: 2.25rem;
    height: 2.25rem;
    margin-left: .625rem;
    font-size: 1rem;
    line-height: 2.25rem;
}

.home-region-pill .icon-box-title {
    font-size: .875rem;
    line-height: 1.6;
}

@media (max-width: 575.98px) {
    .home-regions-list {
        gap: .5rem;
        max-height: 13.25rem;
    }

    .home-region-pill {
        padding: .25rem .25rem .25rem .75rem;
    }

    .home-region-pill .icon-box-media {
        width: 1.875rem;
        height: 1.875rem;
        margin-left: .5rem;
        font-size: .875rem;
        line-height: 1.875rem;
    }

    .home-region-pill .icon-box-title {
        font-size: .8125rem;
    }
}

/* ---------- Pagination: wrap instead of overflowing on small screens ---------- */
@media (max-width: 767.98px) {
    .pagination {
        flex-wrap: wrap;
        justify-content: center;
        row-gap: .375rem;
    }
}
