/**
 * Ana sayfa — Haberler ve Etkinlikler bölümlerinin yenilenmiş görünümü.
 * style.css içindeki eski kuralların üzerine yüklenir; işaretleme aynıdır.
 */

.home-news,
.home-events {
    --hs-brand: #32439f;
    --hs-navy: #1e2a6b;
    --hs-muted: #64748b;
    --hs-line: #e2e8f0;
}

/* ---------- Haberler ---------- */

.home-news .home-news__layout {
    display: grid !important;
    grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr);
    gap: 1.5rem;
    align-items: stretch;
}

.home-news .home-news-card {
    text-decoration: none;
    border-radius: 18px;
    overflow: hidden;
    background: #fff;
    box-shadow: inset 0 0 0 1px rgba(15, 23, 42, 0.05), 0 4px 24px rgba(15, 23, 42, 0.06);
    transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.home-news .home-news-card:hover,
.home-news .home-news-card:focus-visible {
    transform: translateY(-4px);
    box-shadow: inset 0 0 0 1px rgba(50, 67, 159, 0.25), 0 24px 40px -24px rgba(30, 42, 107, 0.6);
    outline: none;
}

.home-news .home-news-card__media {
    overflow: hidden;
    background: #e8ebf7;
}

.home-news .home-news-card__media img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.45s ease;
}

.home-news .home-news-card:hover .home-news-card__media img {
    transform: scale(1.05);
}

.home-news .home-news-card__date {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    margin: 0;
    font-size: 0.78rem;
    letter-spacing: 0.02em;
    color: var(--hs-muted);
}

/* Öne çıkan haber: görsel kartı doldurur, başlık görselin üzerinde durur */
.home-news .home-news-card--featured {
    position: relative;
    display: block !important;
    min-height: 30rem;
    padding: 0;
}

.home-news .home-news-card--featured .home-news-card__media {
    position: absolute;
    inset: 0;
    height: auto !important;
    max-height: none !important;
    aspect-ratio: auto !important;
}

.home-news .home-news-card--featured .home-news-card__media::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, rgba(15, 20, 55, 0) 30%, rgba(15, 20, 55, 0.6) 62%, rgba(15, 20, 55, 0.94) 100%);
}

.home-news .home-news-card--featured .home-news-card__body {
    position: absolute;
    inset: auto 0 0 0;
    z-index: 1;
    padding: 2rem !important;
    background: transparent !important;
}

.home-news .home-news-card--featured .home-news-card__date {
    padding: 0.35rem 0.75rem;
    border-radius: 999px;
    color: #fff;
    background: rgba(255, 255, 255, 0.16);
    box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.24);
}

.home-news .home-news-card--featured .home-news-card__title {
    margin: 0.9rem 0 0;
    font-size: clamp(1.35rem, 2.1vw, 1.85rem);
    line-height: 1.22;
    font-weight: 500;
    letter-spacing: -0.015em;
    color: #fff !important;
}

.home-news .home-news-card--featured .home-news-card__excerpt {
    margin: 0.75rem 0 0;
    max-width: 38rem;
    font-size: 0.95rem;
    line-height: 1.6;
    color: rgba(255, 255, 255, 0.84) !important;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* Diğer haberler: solda küçük görsel, sağda tarih ve başlık */
.home-news .home-news__grid {
    display: grid !important;
    grid-template-columns: 1fr !important;
    grid-auto-rows: 1fr;
    gap: 0.875rem;
}

.home-news .home-news-card--compact {
    display: grid !important;
    grid-template-columns: 9.5rem minmax(0, 1fr);
    align-items: stretch;
    min-height: 6.75rem;
}

.home-news .home-news-card--compact .home-news-card__media {
    height: 100% !important;
    max-height: none !important;
    aspect-ratio: auto !important;
}

.home-news .home-news-card--compact .home-news-card__body {
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding: 0.9rem 1.15rem !important;
}

.home-news .home-news-card--compact .home-news-card__title {
    margin: 0.4rem 0 0;
    font-size: 1rem;
    line-height: 1.38;
    font-weight: 500;
    color: var(--hs-navy);
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    transition: color 0.2s ease;
}

.home-news .home-news-card--compact:hover .home-news-card__title {
    color: var(--hs-brand);
}

/* ---------- Etkinlikler ---------- */

.home-events .etkinlik-kart-ozel {
    position: relative;
    display: flex !important;
    flex-direction: column;
    height: 100%;
    border-radius: 18px;
    overflow: hidden;
    text-decoration: none;
    background: #fff;
    box-shadow: inset 0 0 0 1px rgba(15, 23, 42, 0.06), 0 4px 24px rgba(15, 23, 42, 0.06);
    transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.home-events .etkinlik-kart-ozel:hover,
.home-events .etkinlik-kart-ozel:focus-visible {
    transform: translateY(-5px);
    box-shadow: inset 0 0 0 1px rgba(50, 67, 159, 0.25), 0 26px 42px -26px rgba(30, 42, 107, 0.65);
    outline: none;
}

/* Kart gölgesi ve yukarı kayma, kaydırıcının kenarında kesilmesin */
.home-events .etkinlikler-carousel .owl-stage-outer {
    padding: 0.5rem 0 1.75rem;
    margin: -0.5rem 0 -1.75rem;
}

.home-events .etkinlik-kart-gorsel {
    position: relative;
    aspect-ratio: 4 / 5;
    height: auto !important;
    overflow: hidden;
    background: #e8ebf7;
}

.home-events .etkinlik-kart-gorsel img {
    width: 100%;
    height: 100% !important;
    object-fit: cover;
    transition: transform 0.45s ease;
}

.home-events .etkinlik-kart-ozel:hover .etkinlik-kart-gorsel img {
    transform: scale(1.05);
}

/* Tarih karosu: afişin sol üstünde beyaz, yuvarlak köşeli */
.home-events .etkinlik-kart-tarih {
    position: absolute !important;
    top: 0.9rem;
    left: 0.9rem;
    z-index: 2;
    display: flex;
    flex-direction: column;
    align-items: center;
    min-width: 3.6rem;
    padding: 0.55rem 0.6rem 0.5rem;
    border-radius: 14px;
    color: var(--hs-navy) !important;
    background: #fff !important;
    box-shadow: 0 12px 24px -12px rgba(15, 23, 42, 0.55);
}

.home-events .tarih-gun-kucuk {
    font-size: 1.5rem;
    line-height: 1;
    font-weight: 700;
    color: var(--hs-brand) !important;
}

.home-events .tarih-ay-kucuk {
    margin-top: 0.2rem;
    font-size: 0.7rem;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--hs-navy) !important;
}

.home-events .tarih-gun-adi-kucuk {
    font-size: 0.66rem;
    color: var(--hs-muted) !important;
}

.home-events .etkinlik-tip-badge-kucuk {
    position: absolute;
    left: 0.9rem;
    right: auto !important;
    bottom: 0.9rem;
    width: auto !important;
    padding: 0.3rem 0.7rem;
    border-radius: 999px;
    font-size: 0.72rem;
    color: var(--hs-navy) !important;
    background: rgba(255, 255, 255, 0.94) !important;
}

.home-events .etkinlik-yaklasan-badge {
    position: absolute;
    top: 0.9rem;
    right: 0.9rem;
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    padding: 0.3rem 0.7rem;
    border-radius: 999px;
    font-size: 0.72rem;
    color: #fff !important;
    background: #059669 !important;
}

.home-events .etkinlik-kart-icerik {
    display: flex;
    flex: 1;
    flex-direction: column;
    padding: 1.1rem 1.2rem 1.25rem !important;
    background: #fff !important;
}

.home-events .etkinlik-kart-baslik {
    margin: 0;
    font-size: 1.05rem;
    line-height: 1.35;
    font-weight: 500;
    color: var(--hs-navy) !important;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.home-events .etkinlik-kart-detaylar {
    display: flex;
    flex-wrap: wrap;
    gap: 0.4rem 1rem;
    margin-top: auto;
    padding-top: 0.85rem;
    border-top: 1px solid var(--hs-line);
}

.home-events .etkinlik-kart-baslik + .etkinlik-kart-detaylar {
    margin-top: 0.85rem;
}

.home-events .detay-kucuk {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    font-size: 0.85rem;
    color: var(--hs-muted) !important;
}

.home-events .detay-kucuk i {
    color: var(--hs-brand);
}

/* Kaydırma okları */
.home-events .home-events__nav-btn {
    width: 2.75rem;
    height: 2.75rem;
    border: 0;
    border-radius: 50%;
    color: var(--hs-brand);
    background: #fff;
    box-shadow: inset 0 0 0 1px var(--hs-line);
    transition: background 0.2s ease, color 0.2s ease;
}

.home-events .home-events__nav-btn:hover,
.home-events .home-events__nav-btn:focus-visible {
    color: #fff;
    background: var(--hs-brand);
    outline: none;
}

/* ---------- Duyarlı ---------- */

@media (max-width: 991.98px) {
    .home-news .home-news__layout {
        grid-template-columns: 1fr;
    }

    .home-news .home-news-card--featured {
        min-height: 22rem;
    }
}

@media (max-width: 575.98px) {
    .home-news .home-news-card--compact {
        grid-template-columns: 7rem minmax(0, 1fr);
    }

    .home-news .home-news-card--featured .home-news-card__body {
        padding: 1.25rem !important;
    }
}

@media (prefers-reduced-motion: reduce) {
    .home-news .home-news-card,
    .home-news .home-news-card__media img,
    .home-events .etkinlik-kart-ozel,
    .home-events .etkinlik-kart-gorsel img {
        transition: none;
    }
}
