/* Homepage — Browse by Country (compact SEO tag carousel) */

.home-country-carousel {
    margin: 0 0 2rem;
    padding: 1.25rem 1.25rem 1.35rem;
    border-radius: 16px;
    border: 1px solid #e5e7eb;
    border-top: 4px solid #457b9d;
    background: linear-gradient(180deg, #f0f7fc 0%, #fff 3rem);
    box-shadow: 0 4px 24px rgba(38, 70, 83, 0.06);
    box-sizing: border-box;
}

.home-country-carousel__head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 1rem;
    margin-bottom: 1rem;
}

.home-country-carousel__eyebrow {
    margin: 0 0 0.35rem;
    font-size: 0.75rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: #457b9d;
}

.home-country-carousel__title {
    margin: 0 0 0.35rem;
    font-size: clamp(1.2rem, 2.8vw, 1.55rem);
    line-height: 1.25;
    color: #264653;
}

.home-country-carousel__lead {
    margin: 0;
    max-width: 40rem;
    color: #4b5563;
    font-size: 0.9rem;
    line-height: 1.5;
}

.home-country-carousel__all {
    flex-shrink: 0;
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    padding: 0.5rem 0.9rem;
    border-radius: 999px;
    border: 1px solid #cbd5e1;
    background: #fff;
    color: #264653;
    font-size: 0.8125rem;
    font-weight: 600;
    text-decoration: none;
    transition: border-color 0.15s ease, box-shadow 0.15s ease, color 0.15s ease;
}

.home-country-carousel__all:hover {
    border-color: #457b9d;
    color: #1d3557;
    box-shadow: 0 2px 10px rgba(69, 123, 157, 0.12);
}

.home-country-carousel__all-icon {
    line-height: 1;
}

.home-country-carousel__shell {
    position: relative;
    width: 100%;
}

.home-country-carousel__viewport {
    overflow-x: auto;
    overflow-y: hidden;
    scroll-snap-type: x mandatory;
    scroll-behavior: smooth;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    overscroll-behavior-x: contain;
    width: 100%;
    padding: 0.15rem 0 0.35rem;
}

.home-country-carousel__viewport::-webkit-scrollbar {
    display: none;
}

.home-country-carousel__track {
    display: flex;
    flex-wrap: nowrap;
    gap: 0.65rem;
    margin: 0;
    padding: 0;
    list-style: none;
    min-height: 148px;
}

.home-country-carousel__item {
    flex: 0 0 152px;
    width: 152px;
    scroll-snap-align: start;
}

.home-country-carousel__tile {
    display: flex;
    flex-direction: column;
    height: 148px;
    border-radius: 12px;
    border: 1px solid #e2e8f0;
    background: #fff;
    color: #264653;
    text-decoration: none;
    overflow: hidden;
    box-shadow: 0 1px 4px rgba(38, 70, 83, 0.06);
    transition: transform 0.15s ease, box-shadow 0.15s ease, border-color 0.15s ease;
}

.home-country-carousel__tile:hover,
.home-country-carousel__tile:focus-visible {
    border-color: #457b9d;
    box-shadow: 0 6px 18px rgba(69, 123, 157, 0.14);
    transform: translateY(-2px);
    outline: none;
}

.home-country-carousel__media {
    position: relative;
    display: block;
    width: 100%;
    height: 78px;
    flex-shrink: 0;
    overflow: hidden;
    background: linear-gradient(135deg, #e8f1f8 0%, #dbeafe 100%);
}

.home-country-carousel__photo {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
}

.home-country-carousel__photo--fallback {
    background: linear-gradient(135deg, #457b9d 0%, #264653 100%);
}

.home-country-carousel__flag {
    position: absolute;
    left: 8px;
    bottom: 8px;
    width: 24px;
    height: 18px;
    border-radius: 2px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.25);
    object-fit: cover;
}

.home-country-carousel__label {
    display: -webkit-box;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
    overflow: hidden;
    padding: 0.45rem 0.55rem 0.15rem;
    font-size: 0.78rem;
    font-weight: 700;
    line-height: 1.25;
    color: #1f2937;
}

.home-country-carousel__country {
    display: block;
    padding: 0 0.55rem 0.5rem;
    margin-top: auto;
    font-size: 0.68rem;
    font-weight: 600;
    letter-spacing: 0.02em;
    text-transform: uppercase;
    color: #64748b;
}

.home-country-carousel__nav {
    position: absolute;
    top: 50%;
    z-index: 2;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 34px;
    height: 34px;
    padding: 0;
    border: 1px solid #cbd5e1;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.96);
    color: #264653;
    font-size: 1.25rem;
    line-height: 1;
    cursor: pointer;
    box-shadow: 0 1px 4px rgba(38, 70, 83, 0.08);
    transform: translateY(-50%);
    transition: border-color 0.15s ease, background 0.15s ease, opacity 0.15s ease;
}

.home-country-carousel__nav--prev {
    left: 6px;
}

.home-country-carousel__nav--next {
    right: 6px;
}

.home-country-carousel__nav:hover:not(:disabled):not(.is-hidden) {
    border-color: #457b9d;
    background: #f0f7fc;
}

.home-country-carousel__nav.is-hidden {
    opacity: 0;
    pointer-events: none;
}

@media (max-width: 768px) {
    .home-country-carousel__head {
        flex-direction: column;
        align-items: stretch;
    }

    .home-country-carousel__all {
        align-self: flex-start;
    }

    .home-country-carousel__nav {
        display: none;
    }

    .home-country-carousel__item {
        flex-basis: 138px;
        width: 138px;
    }

    .home-country-carousel__tile {
        height: 140px;
    }

    .home-country-carousel__media {
        height: 72px;
    }
}

@media (min-width: 1200px) {
    .home-country-carousel__item {
        flex-basis: 160px;
        width: 160px;
    }

    .home-country-carousel__tile {
        height: 152px;
    }

    .home-country-carousel__media {
        height: 82px;
    }
}
