/* --------------------------------------------------
   StreamHub – Mobile-first, clean light UI (DROP-IN)
-------------------------------------------------- */

:root {
    --sh-bg: #f3f4f6;
    --sh-card: #ffffff;
    --sh-border: rgba(229, 231, 235, .95);
    --sh-text: #0f172a;
    --sh-muted: #64748b;
    --sh-link: #2563eb;

    --sh-radius: 1.1rem;
    --sh-shadow: 0 18px 45px rgba(15, 23, 42, 0.06);
}

/* ---------------- BASE ---------------- */

.sh-body {
    background:
        radial-gradient(circle at top left, rgba(191, 219, 254, 0.7) 0, transparent 55%),
        radial-gradient(circle at bottom right, rgba(254, 202, 202, 0.7) 0, transparent 55%),
        var(--sh-bg);
    color: #111827;
    min-height: 100vh;

    /* ✅ stops “cropped edges” feeling on mobile */
    padding-left: env(safe-area-inset-left);
    padding-right: env(safe-area-inset-right);
}

/* Make Bulma containers feel better on mobile */
.container {
    padding-left: 1rem;
    padding-right: 1rem;
}

@media (min-width: 769px) {
    .container {
        padding-left: 1.25rem;
        padding-right: 1.25rem;
    }
}

/* Sections: remove “huge” padding on phones */
.sh-section {
    padding: 1.5rem 0 1.75rem;
}

@media (min-width: 769px) {
    .sh-section {
        padding: 2.25rem 0 2.5rem;
    }
}

/* ---------------- NAVBAR ---------------- */

.sh-navbar {
    background: rgba(255, 255, 255, 0.92);
    backdrop-filter: blur(18px);
    border-bottom: 1px solid rgba(229, 231, 235, 0.9);
    box-shadow: 0 10px 30px rgba(15, 23, 42, 0.06);
}

.sh-logo {
    font-weight: 800;
    letter-spacing: 0.02em;
    color: #111827;
}

.sh-navbar .navbar-item,
.sh-navbar .navbar-link {
    color: #4b5563;
}

.sh-navbar .navbar-item.is-active,
.sh-navbar .navbar-link.is-active {
    color: #1d4ed8;
}

/* ✅ burger spacing + prevent cramped header on mobile */
.navbar-brand {
    min-height: 64px;
}

.navbar-burger {
    height: 64px;
}

/* ---------------- HERO (your current hero illustrated) ---------------- */

.sh-hero-illustrated {
    position: relative;
    overflow: hidden;
    padding: 2.25rem 0 1.25rem;
}

@media (min-width: 769px) {
    .sh-hero-illustrated {
        padding: 4rem 0 3rem;
        overflow: visible;
    }
}

.sh-hero-bg {
    position: absolute;
    inset: 0;
    overflow: hidden;
    pointer-events: none;
}

.sh-hero-content {
    position: relative;
    z-index: 2;
}

/* ✅ keep title/subtitle readable on phones */
.sh-hero-title {
    font-weight: 900;
    letter-spacing: -0.03em;
    color: var(--sh-text);
    line-height: 1.05;
}

@media (max-width: 768px) {
    .sh-hero-title {
        font-size: 2.1rem !important;
        /* Bulma title override */
    }
}

.sh-hero-subtitle {
    color: #475569;
    font-size: 1.02rem;
    line-height: 1.5;
}

@media (max-width: 768px) {
    .sh-hero-subtitle {
        font-size: 0.98rem;
        margin-top: .75rem !important;
    }
}

/* ✅ HERO SEARCH: full width + bigger touch targets on mobile */
.sh-hero-illustrated .field.has-addons {
    gap: .65rem;
}

@media (max-width: 768px) {
    .sh-hero-illustrated .field.has-addons {
        display: flex;
        flex-direction: column;
        align-items: stretch;
    }

    .sh-hero-illustrated .field.has-addons .control {
        margin-right: 0 !important;
    }

    .sh-hero-illustrated .field.has-addons .control.is-expanded {
        width: 100%;
    }

    .sh-hero-illustrated input.input {
        width: 100%;
        height: 54px;
        font-size: 1rem;
        border-radius: 14px !important;
    }

    .sh-hero-illustrated .button.is-medium {
        width: 100%;
        height: 52px;
        border-radius: 14px !important;
        font-weight: 700;
    }
}

/* Overview card */
.sh-overview-card {
    padding: 1.25rem;
    background: var(--sh-card);
    border: 1px solid var(--sh-border);
    border-radius: 1.2rem;
    box-shadow: var(--sh-shadow);
}

.sh-overview-title {
    font-size: .75rem;
    text-transform: uppercase;
    font-weight: 800;
    color: #475569;
    letter-spacing: .12em;
}

.sh-overview-sub {
    font-size: .82rem;
    color: #64748b;
}

.sh-overview-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: .75rem;
}

@media (max-width: 768px) {
    .sh-overview-card {
        padding: 1.1rem;
        border-radius: 1.1rem;
    }

    .sh-overview-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

.sh-overview-label {
    font-size: .7rem;
    text-transform: uppercase;
    letter-spacing: .12em;
    color: #94a3b8;
}

.sh-overview-value {
    font-size: 1.35rem;
    font-weight: 900;
    color: #111827;
}

/* ---------------- SECTION HEADERS ---------------- */

.sh-section-header {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 1rem;
    margin-bottom: .85rem;
}

.sh-section-title {
    font-size: 1.15rem;
    font-weight: 900;
    color: #0f172a;
    line-height: 1.15;
}

.sh-section-subtitle {
    font-size: .82rem;
    color: #6b7280;
}

.sh-section-link {
    font-size: .82rem;
    color: var(--sh-link);
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: .25rem;
    white-space: nowrap;
}

.sh-section-link:hover {
    text-decoration: underline;
}

@media (max-width: 768px) {
    .sh-section-header {
        align-items: flex-start;
        flex-direction: column;
        gap: .25rem;
    }

    .sh-section-link {
        margin-top: .15rem;
    }
}

/* ---------------- FEATURED CATEGORIES ---------------- */

.sh-category-stub-grid .column {
    padding: .5rem !important;
}

.sh-stub-box {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;

    padding: 1rem .75rem;
    background: #f8fafc;
    border: 1px solid var(--sh-border);
    border-radius: 1rem;
    transition: .2s;
    text-decoration: none;
    height: 100%;
}

.sh-stub-box:hover {
    background: #eef2ff;
    transform: translateY(-2px);
}

/* ✅ denser on mobile */
@media (max-width: 768px) {
    .sh-stub-box {
        padding: .9rem .6rem;
        border-radius: .95rem;
    }

    .sh-stub-box p {
        font-size: .85rem;
    }
}

/* ---------------- TOP COUNTRIES ---------------- */

.sh-country-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
    gap: .85rem;
}

@media (max-width: 768px) {
    .sh-country-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: .75rem;
    }
}

.sh-country-box {
    text-align: center;
    padding: .85rem .7rem;
    border-radius: 1rem;
    border: 1px solid var(--sh-border);
    background: var(--sh-card);
    transition: .2s;
    text-decoration: none;

    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: 110px;
}

.sh-country-box:hover {
    background: #f0f9ff;
    transform: translateY(-2px);
    border-color: #38bdf8;
    box-shadow: 0 12px 30px rgba(56, 189, 248, .14);
}

.sh-country-box.is-active {
    border-color: #2563eb;
    box-shadow: 0 12px 32px rgba(37, 99, 235, .18);
    background: #eff6ff;
}

.sh-country-flag {
    font-size: 2rem;
    margin-bottom: .2rem;
}

.sh-country-label {
    font-size: .88rem;
    color: #0f172a;
    font-weight: 800;
}

.sh-country-code {
    font-size: .75rem;
    color: #6b7280;
}

/* ---------------- COUNTRY QUICK-VIEW (✅ compact cards) ---------------- */

#sh-country-preview {
    margin-top: 1rem;
    border-radius: 1.1rem;
    border: 1px solid var(--sh-border);
    background: #f9fafb;
    padding: .9rem;
}

/* ✅ override Bulma .columns inside the quick-view and make it a real grid */
#sh-country-preview .columns {
    display: grid !important;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: .75rem;
    margin: 0 !important;
}

#sh-country-preview .column {
    padding: 0 !important;
}

/* ✅ small thumb + compact typography */
#sh-country-preview .sh-card.sh-card-country-preview {
    padding: .6rem .65rem !important;
    border-radius: 1rem;
    background: #ffffff;
    border: 1px solid rgba(229, 231, 235, .9);
    box-shadow: 0 10px 24px rgba(15, 23, 42, .06);
}

#sh-country-preview .sh-card-country-preview .sh-thumb {
    height: 68px !important;
    border-radius: .85rem !important;
    background: #f3f4f6;
}

#sh-country-preview .sh-card-country-preview .sh-meta {
    font-size: .82rem !important;
    font-weight: 800;
    margin-top: .45rem !important;
    color: #0f172a;
    text-align: left;
}

#sh-country-preview .sh-card-country-preview .sh-meta-sub {
    font-size: .72rem !important;
    margin-top: .1rem !important;
    color: #6b7280;
}

/* super small phones: 1 column */
@media (max-width: 360px) {
    #sh-country-preview .columns {
        grid-template-columns: 1fr;
    }
}

/* ---------------- SLIDERS (✅ aligned + mobile smooth) ---------------- */

.sh-slider {
    position: relative;
    display: flex;
    align-items: center;
    gap: .65rem;
}

.sh-slider-track {
    display: flex;
    gap: .9rem;
    overflow-x: auto;
    overflow-y: hidden;
    scroll-behavior: smooth;
    width: 100%;
    padding: .4rem .1rem;

    /* ✅ smooth alignment */
    scroll-snap-type: x mandatory;
    -webkit-overflow-scrolling: touch;
}

.sh-slider-track::-webkit-scrollbar {
    display: none;
}

.sh-slider-track {
    scrollbar-width: none;
}

.sh-slide {
    flex: 0 0 190px;
    text-decoration: none;
    scroll-snap-align: start;
}

@media (max-width: 768px) {
    .sh-slide {
        flex: 0 0 72vw;
    }
}

/* ✅ slider arrows: hide on mobile (they misalign a lot on phones) */
.sh-slider-btn {
    width: 34px;
    height: 34px;
    border-radius: 999px;
    border: 1px solid #e5e7eb;
    background: #ffffff;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: .2s;
    flex-shrink: 0;
}

.sh-slider-btn:hover {
    background: #3b82f6;
    color: #fff;
    border-color: #3b82f6;
    transform: translateY(-2px);
}

@media (max-width: 768px) {
    .sh-slider-btn {
        display: none !important;
    }
}

/* ---------------- CARDS (slider + grid) ---------------- */

.sh-card {
    border: 1px solid rgba(229, 231, 235, .92);
    border-radius: 1rem;
    padding: .55rem;
    background: #ffffff;
    transition: .18s;
    box-shadow: 0 10px 22px rgba(15, 23, 42, .05);
}

.sh-card:hover {
    transform: translateY(-2px);
    border-color: rgba(59, 130, 246, .55);
    box-shadow: 0 14px 30px rgba(37, 99, 235, .12);
}

.sh-thumb {
    height: 92px;
    border-radius: .9rem;
    overflow: hidden;
    background: #f3f4f6;
    display: flex;
    align-items: center;
    justify-content: center;
}

.sh-thumb img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.sh-meta {
    font-size: .85rem;
    font-weight: 800;
    color: #334155;
    margin-top: .45rem;
    text-align: center;
}

/* Grid variant (Latest + general grid cards) */
.sh-card-grid {
    height: 100%;
    display: flex;
    flex-direction: column;
    align-items: stretch;
    text-align: left;
}

.sh-card-grid .sh-thumb {
    height: 110px;
}

.sh-card-grid .sh-meta {
    text-align: left;
}

.sh-meta-sub {
    font-size: .75rem;
    color: #6b7280;
    margin-top: .15rem;
}

/* ✅ Bulma grid spacing on mobile (remove “cropped / negative margin” feel) */
.columns {
    margin-left: 0 !important;
    margin-right: 0 !important;
}

.columns.is-variable.is-3 {
    --columnGap: .9rem;
}

.columns.is-multiline .column {
    padding: .45rem !important;
}

@media (max-width: 768px) {
    .columns.is-multiline .column {
        padding: .4rem !important;
    }
}

/* ---------------- ADS ---------------- */

.sh-ad-section {
    padding-top: 1.25rem;
    padding-bottom: 1.25rem;
}

.sh-ad-block {
    border-radius: 0.95rem;
    padding: 0.85rem;
    background: #f9fafb;
    border: 1px dashed rgba(229, 231, 235, .95);
    text-align: center;
}

.sh-ad-block ins {
    display: inline-block;
}

/* ---------------- FOOTER ---------------- */

.sh-footer {
    background: #f9fafb;
    color: #6b7280;
    padding: 1.5rem 0;
    border-top: 1px solid rgba(229, 231, 235, .95);
    margin-top: 1.25rem;
}

.sh-footer-links a {
    margin: 0 3px;
}

.sh-footer-sep {
    color: #94a3b8;
    margin: 0 4px;
    opacity: 0.8;
}

/* ---------------- PJAX + PLAYER helpers (keep your existing bits) ---------------- */

#sh-pjax-overlay {
    position: fixed;
    inset: 0;
    display: flex;
    align-items: flex-start;
    justify-content: center;
    padding-top: 4.5rem;
    pointer-events: none;
    opacity: 0;
    transform: translateY(-10px);
    transition: opacity 0.25s ease, transform 0.25s ease;
    z-index: 80;
}

#sh-pjax-overlay.is-active {
    opacity: 1;
    transform: translateY(0);
}

.sh-pjax-pill {
    background: radial-gradient(circle at 0 0, #22d3ee, #4f46e5 35%, #0b1120 100%);
    border-radius: 999px;
    padding: 0.45rem 1.2rem;
    box-shadow:
        0 0 0 1px rgba(129, 140, 248, 0.5),
        0 0 18px rgba(56, 189, 248, 0.7);
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.8rem;
    color: #e5e7eb;
    letter-spacing: 0.06em;
    text-transform: uppercase;
}

.sh-pjax-icon {
    font-size: 1.1rem;
}

#sh-pjax-content {
    transition: opacity 0.2s ease, filter 0.2s ease;
}

body.sh-pjax-loading #sh-pjax-content {
    opacity: 0.45;
    filter: blur(1px);
}

.sh-pjax-fade-out {
    opacity: 0.3;
    filter: blur(1px);
}

.sh-pjax-fade-in {
    opacity: 1;
    filter: blur(0);
}

#shPlayerWrapper.sh-player-transition-hidden {
    opacity: 0;
    pointer-events: none;
}

/* Mini-player close button */
.sh-player-close-btn {
    position: absolute;
    top: 6px;
    left: 6px;
    width: 22px;
    height: 22px;
    border-radius: 50%;
    background: rgba(0, 0, 0, 0.55);
    color: white;
    font-size: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    z-index: 9999;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.2s;
}

.sh-player-floating .sh-player-close-btn {
    opacity: 1;
    pointer-events: auto;
}

.sh-player-close-btn:hover {
    background: rgba(0, 0, 0, 0.75);
}
/* =========================================
   AUTOCOMPLETE WRAPPER FIX (prevents snap)
   ========================================= */

/* the JS wraps inputs with this */
.sh-search-wrap {
    position: relative !important;
    flex: 1 1 auto !important;
    /* ✅ becomes the flex item instead of input */
    width: 100% !important;
    min-width: 0 !important;
    /* ✅ critical inside flex */
    display: block;
}

/* keep the actual input full width inside wrapper */
.sh-search-wrap>input {
    width: 100% !important;
    min-width: 0 !important;
}

/* dropdown created by your JS */
.sh-search-suggest {
    position: absolute !important;
    left: 0 !important;
    right: 0 !important;
    top: calc(100% + 8px) !important;
    z-index: 99999 !important;
    display: none;
    max-height: 340px;
    overflow: auto;
    border-radius: 14px;
    background: #fff;
    border: 1px solid #e5e7eb;
    box-shadow: 0 18px 45px rgba(15, 23, 42, .18);
}

/* make sure nothing clips the dropdown */
.sh-hero-illustrated,
.sh-hero-content,
.sh-hero-illustrated .columns,
.sh-hero-illustrated .column,
.sh-hero-search,
.sh-hero-search-row {
    overflow: visible !important;
}

/* your hero row must remain horizontal on desktop */
.sh-hero-search-row {
    display: flex !important;
    flex-wrap: nowrap !important;
    align-items: stretch !important;
    gap: .6rem !important;
}

/* keep button stable */
.sh-hero-search-btn {
    flex: 0 0 auto !important;
    white-space: nowrap !important;
}

/* Mobile stack */
@media (max-width: 768px) {
    .sh-hero-search-row {
        flex-direction: column !important;
    }

    .sh-hero-search-btn {
        width: 100% !important;
        justify-content: center !important;
    }
}

/* (optional) nicer items — your classes */
.sh-search-suggest-item {
    width: 100%;
    text-align: left;
    border: 0;
    background: transparent;
    padding: .75rem .85rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: .75rem;
    cursor: pointer;
}

.sh-search-suggest-item:hover,
.sh-search-suggest-item.is-active {
    background: #eff6ff;
}

.sh-search-suggest-item.is-static {
    cursor: default;
}

.sh-search-suggest-main {
    display: inline-flex;
    align-items: center;
    gap: .55rem;
}

.sh-search-suggest-label {
    font-weight: 700;
    color: #0f172a;
}

.sh-search-suggest-meta {
    font-size: .78rem;
    color: #6b7280;
}
/* =========================================
   HERO ALIGNMENT: Search + Stats uniform
   ========================================= */

/* Desktop/tablet: align both hero columns at the bottom */
@media (min-width: 769px) {
    .sh-hero-content .columns {
        align-items: flex-end !important;
        /* ✅ bottom-align columns */
    }

    /* Left hero column: make it a vertical stack, push search to bottom */
    .sh-hero-content .columns>.column:first-child {
        display: flex !important;
        flex-direction: column !important;
        height: 100% !important;
    }

    /* Keep title/subtitle at top and push search down */
    .sh-hero-content .columns>.column:first-child .sh-hero-search {
        margin-top: auto !important;
        /* ✅ makes search align with stats card */
        margin-bottom: 0 !important;
    }

    /* Right hero column: ensure the overview card sits at bottom too */
    .sh-hero-content .columns>.column:last-child {
        display: flex !important;
        flex-direction: column !important;
        justify-content: flex-end !important;
        height: 100% !important;
    }

    /* Optional: make the overview card height visually match the left block */
    .sh-overview-card {
        margin-bottom: 0 !important;
    }
}