/*
 * EnFavori Design System — Home Standard
 * ---------------------------------------
 * Ana sayfadaki eski hm-home-* kurallarını tek tasarım sözleşmesine bağlayan
 * son uyumluluk katmanıdır. Sadece .hm-home-page altında çalışır.
 */

body .hm-home-page {
    --hm-home-navy: var(--ef-color-navy);
    --hm-home-navy-dark: var(--ef-color-navy-dark);
    --hm-home-blue: var(--ef-color-blue);
    --hm-home-blue-dark: var(--ef-color-blue-dark);
    --hm-home-turquoise: var(--ef-color-turquoise);
    --hm-home-turquoise-dark: var(--ef-color-turquoise-dark);
    --hm-home-white: var(--ef-color-white);
    --hm-home-page: var(--ef-color-page);
    --hm-home-text: var(--ef-color-text);
    --hm-home-muted: var(--ef-color-muted);
    --hm-home-light: var(--ef-color-light);
    --hm-home-border: var(--ef-color-border);
    --hm-home-soft-blue: var(--ef-color-info-soft);
    --hm-home-soft-green: var(--ef-color-success-soft);
    --hm-home-danger: var(--ef-color-danger);
    --hm-home-success: var(--ef-color-success);

    color: var(--ef-color-text);
    font-family: var(--ef-font-sans);
}

/* Sayfa ritmi */
body .hm-home-page .hm-home-container {
    margin-top: 0 !important;
    padding-top: 0 !important;
}

body .hm-home-page .hm-home-section {
    margin-bottom: var(--ef-space-5) !important;
}

body .hm-home-page .hm-home-ad-slot {
    margin-block: var(--ef-space-4) !important;
}

/* Karşılama bandı */
body .hm-home-page .hm-home-welcome {
    margin-bottom: var(--ef-space-3) !important;
    padding: 12px 22px !important;
    border-radius: var(--ef-radius-md) !important;
    border-color: rgba(24, 199, 187, 0.22) !important;
    border-left-color: var(--ef-color-turquoise) !important;
    box-shadow: var(--ef-shadow-sm) !important;
}

body .hm-home-page .hm-home-welcome-title {
    font-family: var(--ef-font-sans) !important;
    font-weight: 850 !important;
    letter-spacing: -0.025em !important;
}

/* Manşet */
body .hm-home-page .hm-home-hero-grid,
body .hm-home-page .hm-home-hero-side {
    gap: var(--ef-space-3) !important;
}

body .hm-home-page .hm-home-hero-card {
    border-radius: var(--ef-radius-md) !important;
    border-color: rgba(20, 40, 68, 0.10) !important;
    box-shadow: var(--ef-shadow-md) !important;
}

body .hm-home-page .hm-home-hero-category,
body .hm-home-page .hm-home-hero-kicker,
body .hm-home-page .hm-home-hero-stat {
    border-radius: var(--ef-radius-sm) !important;
}

body .hm-home-page .hm-home-hero-nav,
body .hm-home-page .hm-home-channel-nav,
body .hm-home-page .hm-home-hero-counter,
body .hm-home-page .hm-home-hero-cta,
body .hm-home-page .hm-home-list-cta {
    border-radius: var(--ef-radius-sm) !important;
}

body .hm-home-page .hm-home-hero-nav,
body .hm-home-page .hm-home-channel-nav {
    width: 38px !important;
    height: 38px !important;
    flex-basis: 38px !important;
}

body .hm-home-page .hm-home-hero-controls {
    gap: var(--ef-space-3) !important;
    margin-top: var(--ef-space-3) !important;
}

/* EnFavori kimliği */
body .hm-home-page .hm-home-identity-strip {
    border-radius: var(--ef-radius-md) !important;
    border-color: var(--ef-color-border) !important;
    border-top-color: var(--ef-color-turquoise) !important;
    box-shadow: var(--ef-shadow-sm) !important;
}

/* Bölüm başlıkları */
body .hm-home-page .hm-home-section-header,
body .hm-home-page .hm-home-live-header {
    margin-bottom: var(--ef-space-3) !important;
}

body .hm-home-page .hm-home-section-icon {
    width: 40px !important;
    height: 40px !important;
    flex-basis: 40px !important;
    border-radius: var(--ef-radius-sm) !important;
}

body .hm-home-page .hm-home-section-title,
body .hm-home-page .hm-home-live-title {
    color: var(--ef-color-navy) !important;
    font-family: var(--ef-font-sans) !important;
    font-size: var(--ef-font-size-xl) !important;
    font-weight: 800 !important;
    line-height: 1.25 !important;
    letter-spacing: -0.02em !important;
}

body .hm-home-page .hm-home-live-description {
    color: var(--ef-color-muted) !important;
    line-height: var(--ef-line-height-normal) !important;
}

/* Ortak kart yüzeyi */
body .hm-home-page .hm-home-insight-card,
body .hm-home-page .hm-home-list-panel,
body .hm-home-page .hm-home-sidebar-card {
    background: var(--ef-color-surface) !important;
    border: 1px solid var(--ef-color-border) !important;
    border-radius: var(--ef-radius-md) !important;
    box-shadow: var(--ef-shadow-sm) !important;
}

body .hm-home-page .hm-home-insight-card,
body .hm-home-page .hm-home-list-panel {
    padding: var(--ef-space-4) !important;
}

body .hm-home-page .hm-home-insight-title {
    margin-bottom: var(--ef-space-4) !important;
    padding-bottom: var(--ef-space-2) !important;
    color: var(--ef-color-navy) !important;
    font-size: var(--ef-font-size-lg) !important;
    font-weight: 800 !important;
}

body .hm-home-page .hm-home-insight-title::after {
    width: 40px !important;
    background: var(--ef-color-turquoise) !important;
}

/* Kart içi görseller */
body .hm-home-page .hm-home-rank-image-link,
body .hm-home-page .hm-home-trending-image-link,
body .hm-home-page .hm-home-list-image-link,
body .hm-home-page .hm-home-channel-image-wrap {
    border-radius: var(--ef-radius-sm) !important;
}

/* Etiket ve metrikler */
body .hm-home-page .hm-home-category,
body .hm-home-page .hm-home-channel,
body .hm-home-page .hm-home-list-metric,
body .hm-home-page .hm-home-rank-direction,
body .hm-home-page .hm-home-live-window {
    border-radius: var(--ef-radius-sm) !important;
}

/* Kanal alanı */
body .hm-home-page .hm-home-channels-panel {
    border-color: var(--ef-color-border) !important;
    box-shadow: var(--ef-shadow-sm) !important;
}

body .hm-home-page .hm-home-channel-scroll {
    gap: var(--ef-space-3) !important;
}

body .hm-home-page .hm-home-channels-panel .hm-home-channel-scroll .hm-home-channel-card {
    border-radius: var(--ef-radius-md) !important;
    border-color: var(--ef-color-border) !important;
    box-shadow: var(--ef-shadow-sm) !important;
}

body .hm-home-page .hm-home-channels-panel .hm-home-channel-scroll .hm-home-channel-card:hover,
body .hm-home-page .hm-home-channels-panel .hm-home-channel-scroll .hm-home-channel-card:focus {
    border-color: rgba(24, 199, 187, 0.55) !important;
    box-shadow: var(--ef-shadow-md) !important;
}

/* Son listeler ve link ritmi */
body .hm-home-page .hm-home-rank-title,
body .hm-home-page .hm-home-trending-title,
body .hm-home-page .hm-home-list-title {
    color: var(--ef-color-text) !important;
    font-family: var(--ef-font-sans) !important;
}

body .hm-home-page .hm-home-rank-item,
body .hm-home-page .hm-home-trending-item,
body .hm-home-page .hm-home-list-item {
    border-color: var(--ef-color-border) !important;
}

/* Erişilebilir focus standardı */
body .hm-home-page a:focus-visible,
body .hm-home-page button:focus-visible {
    outline: 3px solid rgba(28, 156, 240, 0.24) !important;
    outline-offset: 2px !important;
}

/* Tablet */
@media (min-width: 768px) and (max-width: 1199.98px) {
    body .hm-home-page .hm-home-section {
        margin-bottom: var(--ef-space-5) !important;
    }

    body .hm-home-page .hm-home-insights-grid {
        gap: var(--ef-space-4) !important;
    }
}

/* Masaüstü manşet metin ritmi */
@media (min-width: 768px) {
    body .hm-home-page .hm-home-hero-card-main .hm-home-hero-title {
        max-width: 100% !important;
        overflow-wrap: normal !important;
        word-break: normal !important;
        text-wrap: balance;
    }

    body .hm-home-page .hm-home-hero-card-main .hm-home-hero-cta {
        max-width: 190px !important;
        padding-right: 14px !important;
        padding-left: 14px !important;
        font-size: 12.5px !important;
        white-space: nowrap !important;
    }
}

/* Mobil */
@media (max-width: 767.98px) {
    body .hm-home-page .container {
        padding-right: var(--ef-space-3) !important;
        padding-left: var(--ef-space-3) !important;
    }

    body .hm-home-page .hm-home-section {
        margin-bottom: 20px !important;
    }

    body .hm-home-page .hm-home-welcome {
        margin-top: 0 !important;
        margin-bottom: var(--ef-space-3) !important;
        padding: 9px 12px !important;
        border-top-color: var(--ef-color-turquoise) !important;
        border-radius: var(--ef-radius-md) !important;
    }

    body .hm-home-page .hm-home-hero-card {
        border-radius: var(--ef-radius-md) !important;
    }

    /* Ana kartta başlık ve CTA birbirini sıkıştırmasın. */
    body .hm-home-page .hm-home-hero-card-main .hm-home-hero-content {
        grid-template-columns: minmax(0, 1fr) 76px !important;
        column-gap: 8px !important;
    }

    body .hm-home-page .hm-home-hero-card-main .hm-home-hero-title {
        min-width: 0 !important;
        max-width: 100% !important;
    }

    body .hm-home-page .hm-home-hero-card-main .hm-home-hero-actions,
    body .hm-home-page .hm-home-hero-card-main .hm-home-hero-cta {
        width: 76px !important;
        min-width: 76px !important;
    }

    body .hm-home-page .hm-home-hero-card-main .hm-home-hero-cta {
        height: 38px !important;
        min-height: 38px !important;
        padding: 0 8px !important;
        gap: 0 !important;
        border-radius: 10px !important;
        font-size: 11.5px !important;
        white-space: nowrap !important;
    }

    /* Mobil CTA'daki mouse/el ikonunu kaldır; metin aksiyonu tek başına yeterli. */
    body .hm-home-page .hm-home-hero-card-main .hm-home-hero-cta i,
    body .hm-home-page .hm-home-hero-card-main .hm-home-hero-cta svg {
        display: none !important;
    }

    /* Slider kontrolü içerikten rol çalmasın. */
    body .hm-home-page .hm-home-hero-controls {
        gap: 6px !important;
        margin-top: 6px !important;
    }

    body .hm-home-page .hm-home-hero-nav {
        width: 30px !important;
        height: 30px !important;
        flex-basis: 30px !important;
    }

    body .hm-home-page .hm-home-hero-counter {
        min-width: 52px !important;
        min-height: 30px !important;
        padding: 5px 8px !important;
        font-size: 11px !important;
    }

    /* Mobilde kanal kartları yatay kaydırılır; ayrıca ok göstermeye gerek yok. */
    body .hm-home-page .hm-home-channel-nav {
        display: none !important;
    }

    /* Kanallar başlığı panelin dışında duruyor; gerçek bölüm üzerinden hedefle. */
    body .hm-home-page .hm-home-section:has(.hm-home-channels-panel) .hm-home-section-header,
    body .hm-home-page .hm-home-section:has(.hm-home-channel-scroll) .hm-home-section-header,
    body .hm-home-page .hm-home-section-header:has(~ .hm-home-channels-panel) {
        display: flex !important;
        align-items: center !important;
    }

    body .hm-home-page .hm-home-section:has(.hm-home-channels-panel) .hm-home-section-header::after,
    body .hm-home-page .hm-home-section:has(.hm-home-channel-scroll) .hm-home-section-header::after,
    body .hm-home-page .hm-home-section-header:has(~ .hm-home-channels-panel)::after {
        content: "Tümü ›";
        margin-left: auto;
        color: var(--ef-color-turquoise-dark) !important;
        font-family: var(--ef-font-sans) !important;
        font-size: 12px !important;
        font-weight: 700 !important;
        line-height: 1 !important;
        letter-spacing: -0.01em !important;
        white-space: nowrap;
        pointer-events: none;
    }

    body .hm-home-page .hm-home-section-icon {
        width: 36px !important;
        height: 36px !important;
        flex-basis: 36px !important;
    }

    body .hm-home-page .hm-home-section-title,
    body .hm-home-page .hm-home-live-title {
        font-size: var(--ef-font-size-lg) !important;
    }

    body .hm-home-page .hm-home-insight-card,
    body .hm-home-page .hm-home-list-panel {
        padding: var(--ef-space-3) !important;
    }

    body .hm-home-page .hm-home-insight-title {
        margin-bottom: var(--ef-space-3) !important;
        font-size: 16px !important;
    }

    body .hm-home-page .hm-home-channel-scroll {
        gap: 10px !important;
    }
}

@media (max-width: 390px) {
    body .hm-home-page .container {
        padding-right: 10px !important;
        padding-left: 10px !important;
    }
}

/*
 * Kurumsal bölüm başlığı standardı
 * --------------------------------
 * Ana sayfadaki tüm üst seviye bölüm başlıklarını Kanallar modelinde birleştirir.
 * Kart içi başlıklar (.hm-home-insight-title vb.) bu standardın dışında tutulur.
 */
body .hm-home-page .hm-home-section-header {
    display: flex !important;
    align-items: center !important;
    gap: 10px !important;
    min-height: 40px !important;
}

body .hm-home-page .hm-home-section-icon {
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    width: 40px !important;
    height: 40px !important;
    min-width: 40px !important;
    flex: 0 0 40px !important;
    margin: 0 !important;
    padding: 0 !important;
    border: 0 !important;
    border-radius: var(--ef-radius-sm) !important;
    background: var(--ef-color-navy) !important;
    color: var(--ef-color-white) !important;
    box-shadow: none !important;
    font-size: 20px !important;
    font-weight: 800 !important;
    line-height: 1 !important;
}

body .hm-home-page .hm-home-section-icon i,
body .hm-home-page .hm-home-section-icon svg {
    color: var(--ef-color-white) !important;
    fill: currentColor;
}

body .hm-home-page .hm-home-section-icon svg {
    width: 20px !important;
    height: 20px !important;
}

body .hm-home-page .hm-home-section-title {
    margin: 0 !important;
    padding: 0 !important;
    color: var(--ef-color-navy) !important;
    font-size: var(--ef-font-size-xl) !important;
    font-weight: 800 !important;
    line-height: 1.2 !important;
    letter-spacing: -0.025em !important;
}

/* Canlı sıralamalar da diğer ana bölümlerle aynı ikon + başlık modelini kullanır. */
body .hm-home-page .hm-home-live-title {
    display: flex !important;
    align-items: center !important;
    gap: 10px !important;
    margin: 0 !important;
    padding: 0 !important;
    color: var(--ef-color-navy) !important;
    font-size: var(--ef-font-size-xl) !important;
    font-weight: 800 !important;
    line-height: 1.2 !important;
    letter-spacing: -0.025em !important;
}

body .hm-home-page .hm-home-live-title::before {
    content: "";
    display: inline-block;
    width: 40px;
    height: 40px;
    min-width: 40px;
    flex: 0 0 40px;
    border-radius: var(--ef-radius-sm);
    background-color: var(--ef-color-navy);
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='white' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M3 17l5-5 4 4 8-9'/%3E%3Cpath d='M14 7h6v6'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: center;
    background-size: 20px 20px;
}

@media (max-width: 767.98px) {
    body .hm-home-page .hm-home-section-header,
    body .hm-home-page .hm-home-live-title {
        gap: 9px !important;
    }

    body .hm-home-page .hm-home-section-header {
        min-height: 36px !important;
    }

    body .hm-home-page .hm-home-section-icon,
    body .hm-home-page .hm-home-live-title::before {
        width: 36px !important;
        height: 36px !important;
        min-width: 36px !important;
        flex-basis: 36px !important;
    }

    body .hm-home-page .hm-home-section-icon {
        flex: 0 0 36px !important;
        font-size: 18px !important;
    }

    body .hm-home-page .hm-home-section-icon svg,
    body .hm-home-page .hm-home-live-title::before {
        background-size: 18px 18px;
    }

    body .hm-home-page .hm-home-section-title,
    body .hm-home-page .hm-home-live-title {
        font-size: var(--ef-font-size-lg) !important;
    }
}
