/**
 * Homepage hero — أحدث الأخبار (خفيف · عصري)
 */

.home-hero-portal {
    margin-bottom: 22px;
    --hh-bg: #ffffff;
    --hh-bg2: #f8fafc;
    --hh-border: rgba(15, 23, 42, 0.08);
    --hh-text: #0f172a;
    --hh-muted: #64748b;
    --hh-accent: #0ea5e9;
    --hh-accent2: #0284c7;
    --hh-accent-soft: rgba(14, 165, 233, 0.08);
    --hh-shadow: 0 1px 2px rgba(15, 23, 42, 0.04), 0 12px 32px rgba(15, 23, 42, 0.06);
}

.home-hero-mob,
.home-hero-mob-extra,
.home-hero-head--mob {
    display: none;
}

.home-hero-container {
    position: relative;
    background: var(--hh-bg);
    border-radius: 16px;
    overflow: hidden;
    box-shadow: var(--hh-shadow);
    border: 1px solid var(--hh-border);
}

.home-hero-progress {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 2px;
    background: rgba(148, 163, 184, 0.16);
    z-index: 20;
}

.home-hero-progress__inner {
    height: 100%;
    width: 0;
    background: linear-gradient(90deg, var(--hh-accent2), var(--hh-accent));
    transition: width 0s linear;
}

.home-hero-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 12px 16px;
    margin: 0;
    border-bottom: 1px solid var(--hh-border);
    background: rgba(248, 250, 252, 0.72);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    position: relative;
    z-index: 12;
}

.home-hero-head__brand {
    display: flex;
    align-items: center;
    gap: 10px;
    min-width: 0;
}

.home-hero-head__pulse {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: #22c55e;
    box-shadow: 0 0 0 0 rgba(34, 197, 94, 0.35);
    animation: home-hero-pulse 2.2s ease-out infinite;
    flex-shrink: 0;
}

@keyframes home-hero-pulse {
    0% { box-shadow: 0 0 0 0 rgba(34, 197, 94, 0.35); }
    70% { box-shadow: 0 0 0 8px rgba(34, 197, 94, 0); }
    100% { box-shadow: 0 0 0 0 rgba(34, 197, 94, 0); }
}

.home-hero-head__mark {
    display: none;
}

.home-hero-head__title {
    margin: 0;
    font-size: clamp(0.95rem, 2.4vw, 1.08rem);
    font-weight: 800;
    letter-spacing: -0.01em;
    color: var(--hh-text);
    line-height: 1.2;
}

.home-hero-head__chip {
    flex-shrink: 0;
    padding: 4px 10px;
    border-radius: 999px;
    font-size: 10px;
    font-weight: 700;
    color: var(--hh-accent2);
    background: var(--hh-accent-soft);
    border: 1px solid rgba(14, 165, 233, 0.14);
}

.home-hero-row {
    display: grid;
    grid-template-columns: 1fr 280px;
    min-height: 0;
    align-items: stretch;
}

.home-hero-row--solo {
    display: block;
    grid-template-columns: none;
}

.home-hero-row--solo .home-hero-slider-wrap {
    max-height: 340px;
    aspect-ratio: 2.35 / 1;
}

.home-hero-main-col {
    display: flex;
    flex-direction: column;
    min-height: 100%;
    min-width: 0;
    background: var(--hh-bg);
}

.home-hero-main-col::after {
    content: '';
    flex: 1 1 auto;
    min-height: 8px;
    background: var(--hh-bg2);
    border-top: 1px solid var(--hh-border);
    pointer-events: none;
}

.home-hero-main-col:not(.home-hero-main-col--no-pair)::after {
    display: none;
}

.home-hero-main-col--no-pair::after {
    min-height: 0;
    display: none;
}

.home-hero-slider-wrap {
    position: relative;
    overflow: hidden;
    background: #0f172a;
    aspect-ratio: 2.45 / 1;
    max-height: 300px;
    min-height: 168px;
}

.home-hero-slider {
    position: relative;
    width: 100%;
    height: 100%;
    min-height: 0;
}

.home-hero-link {
    display: block;
    height: 100%;
    position: relative;
    text-decoration: none;
    color: inherit;
}

.home-hero-media {
    position: absolute;
    inset: 0;
}

.home-hero-media img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform 0.45s ease;
}

.home-hero-link:hover .home-hero-media img {
    transform: scale(1.02);
}

.home-hero-placeholder {
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, #334155 0%, #0ea5e9 100%);
}

.home-hero-gradient {
    position: absolute;
    inset: 0;
    background:
        linear-gradient(to top, rgba(15, 23, 42, 0.82) 0%, rgba(15, 23, 42, 0.28) 38%, transparent 68%);
    pointer-events: none;
}

.home-hero-content {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 16px 18px 42px;
    color: #fff;
    z-index: 10;
    max-width: 100%;
    box-sizing: border-box;
    text-align: start;
}

.home-hero-meta-top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    margin-bottom: 8px;
    flex-wrap: wrap;
}

.home-hero-tag {
    padding: 3px 10px;
    background: rgba(255, 255, 255, 0.14);
    border: 1px solid rgba(255, 255, 255, 0.22);
    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);
    border-radius: 999px;
    font-size: 10px;
    font-weight: 700;
    color: #fff;
    letter-spacing: 0.02em;
}

.home-hero-counter {
    font-size: 10px;
    font-weight: 600;
    color: rgba(255, 255, 255, 0.62);
    font-variant-numeric: tabular-nums;
}

.home-hero-title {
    margin: 0 0 10px;
    font-size: clamp(1rem, 1.7vw, 1.32rem);
    font-weight: 800;
    line-height: 1.32;
    color: #fff;
    display: -webkit-box;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
    overflow: hidden;
}

.home-hero-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    padding-top: 8px;
    border-top: 1px solid rgba(255, 255, 255, 0.12);
}

.home-hero-date {
    font-size: 11px;
    color: rgba(255, 255, 255, 0.78);
    display: flex;
    align-items: center;
    gap: 5px;
    flex-wrap: wrap;
}

.home-hero-date svg {
    opacity: 0.75;
}

.home-hero-date-sep {
    opacity: 0.35;
    margin: 0 2px;
}

.home-hero-date-since {
    color: #bae6fd;
    font-weight: 600;
}

.home-hero-btn {
    font-size: 11px;
    font-weight: 700;
    color: #fff;
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 5px 11px;
    background: rgba(255, 255, 255, 0.12);
    border: 1px solid rgba(255, 255, 255, 0.22);
    border-radius: 999px;
    flex-shrink: 0;
    transition: background 0.2s ease, border-color 0.2s ease;
}

.home-hero-link:hover .home-hero-btn {
    background: rgba(255, 255, 255, 0.2);
    border-color: rgba(255, 255, 255, 0.35);
}

.home-hero-dots {
    position: absolute;
    bottom: 10px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    align-items: center;
    gap: 6px;
    z-index: 14;
    padding: 5px 10px;
    background: rgba(15, 23, 42, 0.42);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 999px;
}

.home-hero-dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    border: none;
    padding: 0;
    cursor: pointer;
    background: rgba(255, 255, 255, 0.38);
    transition: background 0.2s ease, width 0.2s ease, border-radius 0.2s ease, opacity 0.2s ease;
}

.home-hero-dot.is-active {
    background: #fff;
    width: 18px;
    border-radius: 999px;
}

.home-hero-dot:focus-visible {
    outline: 2px solid #fff;
    outline-offset: 2px;
}

.home-hero-pair {
    flex: 1 1 auto;
    display: grid;
    grid-template-columns: 1fr 1fr;
    grid-template-rows: minmax(180px, 1fr);
    gap: 8px;
    padding: 10px 12px 12px;
    border-top: 1px solid var(--hh-border);
    min-height: 0;
    align-items: stretch;
    background: var(--hh-bg2);
}

.home-hero-pair-card {
    display: flex;
    flex-direction: column;
    min-width: 0;
    min-height: 0;
    height: 100%;
    text-decoration: none;
    border-radius: 12px;
    overflow: hidden;
    background: var(--hh-bg);
    border: 1px solid var(--hh-border);
    transition: border-color 0.2s ease, box-shadow 0.2s ease, transform 0.2s ease;
}

.home-hero-pair-card:hover {
    border-color: rgba(14, 165, 233, 0.28);
    box-shadow: 0 6px 18px rgba(15, 23, 42, 0.06);
    transform: translateY(-1px);
    color: inherit;
}

.home-hero-pair-frame {
    position: relative;
    flex: 1 1 auto;
    width: 100%;
    min-height: 110px;
    max-height: 240px;
    background: #e2e8f0;
}

.home-hero-pair-thumb {
    position: absolute;
    inset: 0;
}

.home-hero-pair-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.home-hero-pair-placeholder {
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, #cbd5e1, #94a3b8);
}

.home-hero-pair-meta {
    flex: 0 0 auto;
    padding: 9px 10px;
    text-align: start;
    background: var(--hh-bg);
}

.home-hero-pair-cat {
    display: block;
    font-size: 9px;
    font-weight: 700;
    color: var(--hh-accent2);
    letter-spacing: 0.04em;
    margin-bottom: 4px;
}

.home-hero-pair-title {
    margin: 0;
    font-size: 12px;
    font-weight: 700;
    line-height: 1.38;
    color: var(--hh-text);
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.home-hero-sidebar {
    padding: 14px 8px 16px;
    display: flex;
    flex-direction: column;
    background: var(--hh-bg2);
    border-inline-start: 1px solid var(--hh-border);
}

.home-hero-sidebar--featured {
    padding: 14px 8px 16px;
    background: var(--hh-bg2);
    border-inline-start: 1px solid var(--hh-border);
    box-shadow: none;
}

.home-hero-sidebar-head__title {
    margin: 0;
    font-size: 14px;
    font-weight: 800;
    color: var(--hh-text);
    letter-spacing: -0.01em;
}

.home-hero-sidebar--featured .home-hero-sidebar-link {
    padding: 8px 6px;
    border: 1px solid transparent;
    background: transparent;
    box-shadow: none;
    border-radius: 10px;
}

.home-hero-sidebar--featured .home-hero-sidebar-link:hover {
    border-color: rgba(14, 165, 233, 0.28);
    background: var(--hh-bg);
    box-shadow: 0 4px 12px rgba(15, 23, 42, 0.05);
    transform: translateY(-1px);
}

.home-hero-sidebar--featured .home-hero-sidebar-thumb-wrap {
    width: 104px;
    height: 70px;
    padding: 0;
    border-color: var(--hh-border);
}

.home-hero-sidebar--featured .home-hero-sidebar-num {
    width: 20px;
    height: 20px;
    font-size: 10px;
    top: -5px;
    right: -5px;
    background: var(--hh-accent);
    box-shadow: 0 2px 6px rgba(14, 165, 233, 0.25);
}

.home-hero-sidebar--featured .home-hero-sidebar-title {
    font-size: 13px;
    font-weight: 700;
}

.home-hero-sidebar-head {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 12px;
    border-bottom: none;
    padding-bottom: 0;
}

.home-hero-sidebar-glow {
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: var(--hh-accent);
    flex-shrink: 0;
    box-shadow: none;
}

.home-hero-sidebar-head h3 {
    font-size: 14px;
    font-weight: 800;
    color: var(--hh-text);
    margin: 0;
}

.home-hero-sidebar-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
    flex: 1;
}

.home-hero-sidebar-link {
    display: grid;
    grid-template-columns: 104px 1fr;
    gap: 12px;
    text-decoration: none;
    padding: 8px 6px;
    border-radius: 10px;
    transition: all 0.2s ease;
    color: inherit;
}

.home-hero-sidebar-link:hover {
    background: var(--hh-bg);
}

.home-hero-sidebar-thumb-wrap {
    position: relative;
    width: 104px;
    height: 70px;
    padding: 0;
    background: #e2e8f0;
    border-radius: 8px;
    border: 1px solid var(--hh-border);
    overflow: hidden;
}

.home-hero-sidebar-thumb {
    width: 100%;
    height: 100%;
    border-radius: 0;
    overflow: hidden;
}

.home-hero-sidebar-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.home-hero-sidebar-placeholder {
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, #e2e8f0, #cbd5e1);
}

.home-hero-sidebar-num {
    position: absolute;
    top: -5px;
    right: -5px;
    width: 20px;
    height: 20px;
    background: var(--hh-accent);
    color: #fff;
    font-size: 10px;
    font-weight: 800;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    border: 2px solid var(--hh-bg2);
    z-index: 5;
    box-shadow: 0 2px 6px rgba(14, 165, 233, 0.2);
}

.home-hero-sidebar-info {
    display: flex;
    flex-direction: column;
    gap: 3px;
    justify-content: center;
    min-width: 0;
}

.home-hero-sidebar-meta {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 6px;
}

.home-hero-sidebar-cat {
    font-size: 10px;
    font-weight: 700;
    color: var(--hh-accent2);
}

.home-hero-sidebar-since {
    font-size: 10px;
    font-weight: 600;
    color: var(--hh-muted);
}

.home-hero-sidebar-title {
    margin: 0;
    font-size: 13.5px;
    font-weight: 700;
    line-height: 1.45;
    color: var(--hh-text);
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.home-more-section {
    margin-top: 10px;
}

/* Dark mode */
html.site-dark .home-hero-portal {
    --hh-bg: #141c2e;
    --hh-bg2: #0f172a;
    --hh-border: rgba(148, 163, 184, 0.14);
    --hh-text: #f1f5f9;
    --hh-muted: #94a3b8;
    --hh-accent-soft: rgba(56, 189, 248, 0.12);
    --hh-shadow: 0 8px 28px rgba(0, 0, 0, 0.28);
}

html.site-dark .home-hero-head {
    border-bottom-color: var(--hh-border);
    background: rgba(15, 23, 42, 0.55);
}

html.site-dark .home-hero-head__chip {
    color: #7dd3fc;
    border-color: rgba(56, 189, 248, 0.2);
}

html.site-dark .home-hero-main-col {
    background: var(--hh-bg);
}

html.site-dark .home-hero-pair {
    background: var(--hh-bg2);
}

html.site-dark .home-hero-pair-card {
    background: #1e293b;
    border-color: var(--hh-border);
}

html.site-dark .home-hero-pair-meta {
    background: #1e293b;
}

html.site-dark .home-hero-pair-title {
    color: #e2e8f0;
}

html.site-dark .home-hero-sidebar {
    background: var(--hh-bg2);
    border-inline-start-color: var(--hh-border);
}

html.site-dark .home-hero-sidebar--featured {
    background: var(--hh-bg2);
}

html.site-dark .home-hero-sidebar--featured .home-hero-sidebar-link:hover {
    background: #1e293b;
    border-color: var(--hh-border);
}

html.site-dark .home-hero-sidebar-title {
    color: #e2e8f0;
}

html.site-dark .home-hero-sidebar-num {
    border-color: var(--hh-bg2);
}

@media (max-width: 1024px) and (min-width: 769px) {
    .home-hero-row {
        grid-template-columns: 1fr;
    }

    .home-hero-slider-wrap {
        max-height: 280px;
        aspect-ratio: 2.2 / 1;
        min-height: 190px;
    }

    .home-hero-sidebar {
        border-inline-start: none;
        border-top: 1px solid var(--hh-border);
    }
}

@media (max-width: 768px) {
    .home-hero-portal {
        display: block;
        margin-bottom: 12px;
    }

    .home-hero-head {
        padding: 10px 12px;
    }

    .home-hero-head__chip {
        display: none;
    }

    .home-hero-row {
        grid-template-columns: 1fr;
    }

    .home-hero-row--solo .home-hero-slider-wrap,
    .home-hero-slider-wrap {
        max-height: none;
        aspect-ratio: 16 / 9;
        min-height: 0;
    }

    .home-hero-title {
        font-size: clamp(0.92rem, 4vw, 1.1rem);
        -webkit-line-clamp: 3;
    }

    .home-hero-content {
        padding: 12px 14px 40px;
    }

    .home-hero-pair {
        grid-template-columns: 1fr;
        grid-template-rows: auto;
    }

    .home-hero-sidebar {
        border-inline-start: none;
        border-top: 1px solid var(--hh-border);
        padding: 12px;
    }
}

@media (prefers-reduced-motion: reduce) {
    .home-hero-media img,
    .home-hero-pair-card,
    .home-hero-btn {
        transition: none;
    }

    .home-hero-head__pulse {
        animation: none;
    }
}
