/* ==========================================================================
   Haber Dosyası (timeline) sayfası — /{dosya_url}/
   Prefix: hd-   |  Mobil öncelikli, 768px ve 960px kırılımları
   ========================================================================== */

.hd-page {
    /* sondakika marka rengi (#header-container ile aynı); haberler.com'da #fe0000 */
    --hd-red: #ff671c;
    --hd-red-soft: rgba(255, 103, 28, 0.08);
    --hd-text: #333333;
    --hd-muted: #6d6d6d;
    --hd-line: #e3e3e3;
    --hd-card: #ffffff;
    --hd-shadow: 0 1px 2px rgba(0, 0, 0, 0.2);
    --hd-shadow-hover: 0 4px 13px rgba(0, 0, 0, 0.25);
    --hd-radius: 4px;
    --hd-rail-x: 14px;      /* rayın sol konumu (mobil) */
    --hd-time-col: 0px;     /* saat sütunu genişliği (mobilde yok) */
}

/* main.hd-page: .content-container (rstyle6.css, 1056px) ile çakışmayı özgüllükle çözer. haberler.com haber-dosyasi.css ile aynı dosya. */
main.hd-page {
    box-sizing: border-box; /* rstyle6.css global border-box vermez; width:100% + yan boşluk mobilde taşmasın */
    width: 100%;
    max-width: 1056px;
    margin: 0 auto;
    padding: 12px 15px 40px;
    color: var(--hd-text);
}

.hd-page *,
.hd-page *::before,
.hd-page *::after {
    box-sizing: border-box;
}

/* :where -> sıfır özgüllük; aşağıdaki bileşen kuralları rahatça ezebilir */
.hd-page :where(ol, ul) {
    list-style: none;
    margin: 0;
    padding: 0;
}

/* --------------------------------------------------------------------------
   Hero
   -------------------------------------------------------------------------- */
.hd-hero {
    position: relative;
    background: var(--hd-card);
    border-radius: var(--hd-radius);
    box-shadow: var(--hd-shadow);
    padding: 20px 20px 18px;
    margin-bottom: 26px;
    overflow: hidden;
}

.hd-hero::before {
    content: "";
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 5px;
    background: var(--hd-red);
}

/* display:flex (inline-flex değil): etiket kendi satırında kalsın, başlık altına insin */
.hd-page .hd-eyebrow {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--hd-red);
    margin-bottom: 8px;
}

.hd-live {
    position: relative;
    display: inline-block;
    width: 9px;
    height: 9px;
    border-radius: 50%;
    background: var(--hd-red);
}

.hd-live::after {
    content: "";
    position: absolute;
    inset: -4px;
    border-radius: 50%;
    border: 2px solid var(--hd-red);
    opacity: 0;
    animation: hd-pulse 1.8s ease-out infinite;
}

/* rstyle6.css'teki genel h1 kuralları (font-size 36px, margin .67em) ezilir; blok kalsın, etiketle yan yana gelmesin */
.hd-page h1.hd-title {
    display: block;
    float: none;
    clear: both;
    margin: 0;
    padding: 0;
    font-size: 26px;
    line-height: 1.2;
    font-weight: 800;
    color: #111;
    letter-spacing: -0.01em;
}

/* --------------------------------------------------------------------------
   Timeline iskeleti
   -------------------------------------------------------------------------- */
.hd-timeline {
    position: relative;
    padding-left: calc(var(--hd-time-col) + var(--hd-rail-x) + 22px);
}

/* dikey ray */
.hd-timeline::before {
    content: "";
    position: absolute;
    top: 6px;
    bottom: 0;
    left: calc(var(--hd-time-col) + var(--hd-rail-x));
    width: 2px;
    background: var(--hd-line);
}

/* Gün etiketi (sticky) */
.hd-day__label {
    position: sticky;
    top: 8px;
    z-index: 3;
    display: flex;
    margin: 0 0 14px calc(-1 * (var(--hd-rail-x) + 22px));
    pointer-events: none;
}

.hd-day__label time {
    pointer-events: auto;
    display: inline-flex;
    align-items: baseline;
    gap: 8px;
    background: #1f1f1f;
    color: #fff;
    font-size: 13px;
    font-weight: 500;
    line-height: 1.2;
    padding: 7px 14px;
    border-radius: 999px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.18);
}

/* Aynı font boyutu + baseline hizası: "BUGÜN" ile tarih aynı satır çizgisinde */
.hd-day__label b {
    color: #fff;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    font-size: 13px;
    line-height: inherit;
}

.hd-day__sep {
    opacity: 0.55;
}

.hd-day {
    margin-bottom: 24px;
}

.hd-day__items {
    display: flex;
    flex-direction: column;
    gap: 24px;
}

/* --------------------------------------------------------------------------
   Timeline öğesi
   -------------------------------------------------------------------------- */
.hd-item {
    position: relative;
}

.hd-item__dot {
    position: absolute;
    top: 18px;
    left: calc(-1 * (var(--hd-rail-x) + 22px) + var(--hd-rail-x) - 5px);
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: #fff;
    border: 2px solid var(--hd-red);
    z-index: 2;
}

/* ray -> kart bağlantı çizgisi */
.hd-item__dot::after {
    content: "";
    position: absolute;
    top: 50%;
    left: 100%;
    width: 14px;
    height: 2px;
    background: var(--hd-line);
    transform: translateY(-50%);
}

.hd-item--latest .hd-item__dot {
    background: var(--hd-red);
    box-shadow: 0 0 0 4px var(--hd-red-soft);
}

.hd-item--latest .hd-item__dot::before {
    content: "";
    position: absolute;
    inset: -6px;
    border-radius: 50%;
    border: 2px solid var(--hd-red);
    opacity: 0;
    animation: hd-pulse 1.8s ease-out infinite;
}

/* Masaüstündeki saat sütunu (mobilde gizli, görsel üstünde rozet var) */
.hd-item__time {
    display: none;
}

/* --------------------------------------------------------------------------
   Kart
   -------------------------------------------------------------------------- */
.hd-card {
    background: var(--hd-card);
    border-radius: var(--hd-radius);
    box-shadow: var(--hd-shadow);
    overflow: hidden;
    transition: box-shadow 0.18s ease, transform 0.18s ease;
}

.hd-card:hover {
    box-shadow: var(--hd-shadow-hover);
    transform: translateY(-1px);
}

/* height verilmez: masaüstünde kartın (min-height) yüksekliğini flex stretch ile alır,
   yüzde yükseklik stretch'i devre dışı bırakırdı */
.hd-card__link {
    display: flex;
    flex-direction: column;
    color: inherit;
    text-decoration: none;
}

.hd-card__media {
    position: relative;
    width: 100%;
    aspect-ratio: 16 / 9;
    background: #ededed;
    overflow: hidden;
}

/* Mutlak konum: masaüstünde kutu flex ile esnediğinde yüzde yükseklik çözümlemesine bağlı kalmaz */
.hd-card__media picture {
    position: absolute;
    inset: 0;
    display: block;
}

.hd-card__media img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.35s ease;
}

.hd-card:hover .hd-card__media img {
    transform: scale(1.03);
}

.hd-card__time-badge {
    position: absolute;
    left: 10px;
    bottom: 10px;
    background: rgba(0, 0, 0, 0.72);
    color: #fff;
    font-size: 13px;
    font-weight: 700;
    line-height: 1;
    padding: 6px 9px;
    border-radius: 4px;
    letter-spacing: 0.02em;
}

.hd-card__body {
    display: flex;
    flex-direction: column;
    gap: 8px;
    padding: 14px 16px 16px;
}

.hd-card__tags {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

.hd-chip {
    display: inline-block;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    color: var(--hd-muted);
    background: #f2f2f2;
    padding: 4px 8px;
    border-radius: 4px;
    line-height: 1;
}

.hd-card__title {
    margin: 0;
    padding: 0;
    font-size: 24px;
    line-height: 1.35;
    font-weight: 700;
    color: #111;
}

/* Özet tam gösterilir (kesme yok); boyut haber detay metniyle aynı (.news-icerik p) */
.hd-card__summary {
    margin: 0;
    font-size: 18px;
    font-weight: 500;
    line-height: 150%;
    color: #333;
    overflow-wrap: anywhere;
}

.hd-card__tags:empty {
    display: none;
}

/* Resimsiz kart: saat, mobilde chip olarak etiket satırında görünür */
.hd-chip--time {
    color: #fff;
    background: #1f1f1f;
    font-variant-numeric: tabular-nums;
}

.hd-card--noimage .hd-card__body {
    padding-top: 16px;
}

/* --------------------------------------------------------------------------
   Ray sonu
   -------------------------------------------------------------------------- */
.hd-end {
    position: relative;
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 6px 0 0;
    font-size: 13px;
    color: var(--hd-muted);
}

.hd-end__dot {
    position: absolute;
    left: calc(-1 * (var(--hd-rail-x) + 22px) + var(--hd-rail-x) - 5px);
    top: 10px;
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: var(--hd-line);
    border: 2px solid #fff;
    z-index: 2;
}

/* --------------------------------------------------------------------------
   Animasyon
   -------------------------------------------------------------------------- */
@keyframes hd-pulse {
    0%   { transform: scale(0.6); opacity: 0.9; }
    100% { transform: scale(1.6); opacity: 0; }
}

@media (prefers-reduced-motion: reduce) {
    .hd-live::after,
    .hd-item--latest .hd-item__dot::before {
        animation: none;
    }
    .hd-card,
    .hd-card__media img,
    .hd-card__more svg {
        transition: none;
    }
}

/* --------------------------------------------------------------------------
   Tablet ve üstü (≥768px): saat sütunu + yatay kart
   -------------------------------------------------------------------------- */
@media (min-width: 768px) {
    .hd-page {
        --hd-time-col: 64px;
        --hd-rail-x: 10px;
    }

    main.hd-page {
        padding-top: 20px;
    }

    .hd-page h1.hd-title {
        font-size: 34px;
    }

    .hd-hero {
        padding: 26px 28px 24px 30px;
    }

    .hd-day__label {
        margin-left: calc(-1 * (var(--hd-time-col) + var(--hd-rail-x) + 22px));
    }

    /* Saat ve ray noktası, kartın ilk satırıyla aynı çizgiden başlar: kart iç boşluğu 14px olduğundan
       noktanın üst kenarı görselin üst kenarıyla aynı hizada (top:14px), saat de aynı merkezde (20px) */
    .hd-item__time {
        display: flex;
        align-items: center;
        justify-content: flex-end;
        position: absolute;
        top: 10px;
        height: 20px;
        left: calc(-1 * (var(--hd-time-col) + var(--hd-rail-x) + 22px));
        width: var(--hd-time-col);
        padding-right: 8px;
        font-size: 16px;
        font-weight: 700;
        color: var(--hd-text);
        font-variant-numeric: tabular-nums;
    }

    .hd-item__dot {
        top: 14px;
    }

    .hd-item--latest .hd-item__time {
        color: var(--hd-red);
    }

    .hd-card__time-badge {
        display: none;
    }

    /* Görsel kart içinde 240x200'lük sabit bir kutu: sunucu crop'u ile birebir aynı ölçü olduğundan
       tarayıcı ikinci bir kırpma yapmaz (yüz/kişi kesilmez). Kutu kartın tepesine yapışmaz, gövdeyle
       aynı iç boşluktan başlar; görselin üst kenarı ile başlığın ilk satırı aynı hizadadır. */
    .hd-card {
        min-height: 228px;
        display: flex;
    }

    .hd-card__link {
        flex: 1 1 auto;
        flex-direction: row;
        align-items: flex-start;
        gap: 16px;
        padding: 14px;
    }

    .hd-card__media {
        flex: 0 0 240px;
        width: 240px;
        height: 200px;
        aspect-ratio: auto;
        border-radius: var(--hd-radius);
    }

    /* negatif margin, satır yüksekliğinden gelen ~4px üst boşluğu kazır; başlığın harf üstü
       görselin üst kenarıyla aynı çizgiye gelir */
    .hd-card__body {
        flex: 1 1 auto;
        padding: 0;
        margin-top: -4px;
        min-width: 0;
    }

    .hd-card__title {
        font-size: 24px;
    }

    /* Saat sütunu varken chip'e gerek yok */
    .hd-chip--time {
        display: none;
    }

    /* Resimsiz kartta gövde tam genişlik (link padding'i ile birlikte 18px üst / 22px yan) */
    .hd-card--noimage .hd-card__body {
        padding: 4px 8px;
        margin-top: 0;
    }

    .hd-end__text {
        font-size: 14px;
    }
}

/* --------------------------------------------------------------------------
   Masaüstü (≥960px)
   -------------------------------------------------------------------------- */
@media (min-width: 960px) {
    main.hd-page {
        padding-left: 0;
        padding-right: 0;
    }

    .hd-day__items {
        gap: 28px;
    }
}
