/* Ana sayfa stilleri (home.blade.php). Marka mavisi vurgu rengidir; geri kalan yüzeyler beyaz/açık gri. */
:root {
    --brand: #0B6EF3;
    --brand-dark: #0958c4;
    --brand-soft: rgba(11, 110, 243, .08);
    --navy: #102A43;
    --text: #475569;
    --border: #E2E8F0;
    --surface: #F8FAFC;
    --radius: 14px;
    --shadow-sm: 0 1px 3px rgba(16, 42, 67, .06);
    --shadow-md: 0 6px 18px rgba(16, 42, 67, .08);
}

.home-section { padding: 56px 0 0; }
.home-section:last-of-type { padding-bottom: 64px; }
.home-container { max-width: 1320px; margin: 0 auto; padding: 0 20px; }

.section-head {
    display: flex; align-items: flex-end; justify-content: space-between;
    gap: 12px; flex-wrap: wrap; margin-bottom: 22px;
}
.section-head h2 {
    margin: 0; font-size: 1.5rem; font-weight: 700; color: var(--navy); letter-spacing: -.01em;
}
.section-head p { margin: 4px 0 0; color: var(--text); font-size: .92rem; }
.link-more {
    color: var(--brand); font-weight: 600; font-size: .92rem; text-decoration: none; white-space: nowrap;
}
.link-more:hover { color: var(--brand-dark); }
.link-more i { transition: transform .15s ease; }
.link-more:hover i { transform: translateX(3px); }

:focus-visible { outline: 2px solid var(--brand); outline-offset: 2px; }

/* ---------- HERO ---------- */
.slider-section { position: relative; z-index: 1; }
.slider-section .carousel-inner,
.slider-section .carousel-item {
    height: clamp(420px, 62vh, 520px);
    background: var(--navy);
    position: relative;
}
@media (min-width: 992px) {
    .slider-section .carousel-inner,
    .slider-section .carousel-item { height: clamp(520px, 68vh, 700px); }
}
.slider-section .carousel-item img {
    width: 100%; height: 100%; object-fit: cover; object-position: center; display: block;
}
.slider-section .carousel-item::after {
    content: ''; position: absolute; inset: 0; pointer-events: none; z-index: 1;
    background: linear-gradient(90deg, rgba(16,42,67,.82) 0%, rgba(16,42,67,.5) 42%, rgba(16,42,67,0) 75%);
}
.slider-section .carousel-caption {
    z-index: 2; left: 0; right: 0; bottom: 0; top: 0; margin: 0 auto; padding: 0 20px;
    max-width: 1320px; text-align: left;
    display: flex; flex-direction: column; justify-content: center; align-items: flex-start;
}
.hero-title {
    font-size: clamp(1.9rem, 5vw, 3.6rem); font-weight: 800; line-height: 1.08; letter-spacing: -.02em;
    color: #fff; max-width: 720px; margin: 0 0 14px; text-transform: uppercase;
}
.hero-desc {
    font-size: clamp(1rem, 2vw, 1.25rem); color: rgba(255,255,255,.9); max-width: 560px; margin: 0 0 26px;
}
.hero-actions { display: flex; flex-wrap: wrap; gap: 12px; }
.btn-brand, .btn-ghost {
    display: inline-flex; align-items: center; gap: 8px; padding: 12px 22px; border-radius: 10px;
    font-weight: 600; font-size: .96rem; text-decoration: none; border: 1px solid transparent;
    transition: background .15s ease, border-color .15s ease, color .15s ease;
}
.btn-brand { background: var(--brand); color: #fff; }
.btn-brand:hover { background: var(--brand-dark); color: #fff; }
.btn-ghost { background: rgba(255,255,255,.1); color: #fff; border-color: rgba(255,255,255,.55); }
.btn-ghost:hover { background: #fff; color: var(--navy); }

.slider-section .carousel-control-prev,
.slider-section .carousel-control-next { width: 64px; opacity: 1; z-index: 3; }
.slider-section .carousel-control-prev-icon,
.slider-section .carousel-control-next-icon {
    width: 42px; height: 42px; border-radius: 50%; padding: 0; background-color: rgba(16,42,67,.45);
    background-size: 14px; border: 1px solid rgba(255,255,255,.4); transition: background-color .15s ease;
}
.slider-section .carousel-control-prev:hover .carousel-control-prev-icon,
.slider-section .carousel-control-next:hover .carousel-control-next-icon { background-color: var(--brand); }
.slider-section .carousel-indicators { margin-bottom: 18px; gap: 6px; z-index: 3; }
.slider-section .carousel-indicators [data-bs-target] {
    width: 8px; height: 8px; border-radius: 50%; border: 0; margin: 0; opacity: .5; background: #fff;
    transition: width .2s ease, opacity .2s ease;
}
.slider-section .carousel-indicators .active { width: 26px; border-radius: 4px; opacity: 1; }

/* ---------- İSTATİSTİK ---------- */
.stats-strip { margin-top: -34px; position: relative; z-index: 5; }
.stats-strip__inner {
    background: #fff; border: 1px solid var(--border); border-radius: var(--radius);
    box-shadow: var(--shadow-md); display: flex; justify-content: center; flex-wrap: wrap;
    width: fit-content; max-width: 100%; margin: 0 auto;
}
.stat-item { flex: 1 1 160px; min-width: 160px; text-align: center; padding: 20px 16px; }
.stat-item + .stat-item { border-left: 1px solid var(--border); }
.stat-item strong { display: block; font-size: 2rem; font-weight: 800; color: var(--brand); line-height: 1.1; }
.stat-item span { color: var(--text); font-size: .92rem; font-weight: 500; }
@media (max-width: 575.98px) {
    .stats-strip { margin-top: -24px; }
    .stat-item { padding: 14px 8px; }
    .stat-item strong { font-size: 1.6rem; }
}

/* ---------- HABERLER ---------- */
.news-pager { display: flex; align-items: center; gap: 10px; }
.news-pager__count { font-size: .9rem; color: var(--text); min-width: 52px; text-align: center; font-variant-numeric: tabular-nums; }
.icon-btn {
    width: 38px; height: 38px; border-radius: 50%; border: 1px solid var(--border); background: #fff;
    color: var(--navy); display: inline-flex; align-items: center; justify-content: center;
    transition: border-color .15s ease, color .15s ease, background .15s ease;
}
.icon-btn:hover:not(:disabled) { border-color: var(--brand); color: var(--brand); background: var(--brand-soft); }
.icon-btn:disabled { opacity: .4; cursor: default; }

.news-page { display: grid; grid-area: 1 / 1; visibility: hidden; pointer-events: none; grid-template-columns: 1.35fr 1fr; gap: 20px; }
/* Geçiş animasyonu JS (Web Animations API) ile yapılır; taşma yalnızca bu kutu içinde kırpılır.
   padding/negatif margin kart kenar gölgelerinin kırpılmasını önler, düzen aynı kalır. */
/* Tüm slide'lar aynı grid hücresinde üst üste durur (yalnızca aktif olan görünür): kapsayıcı en uzun slide'a göre
   sabit yükseklikte kalır, kayarken layout shift olmaz. */
.news-page.is-active { visibility: visible; pointer-events: auto; }
#newsPages { display: grid; grid-template-columns: minmax(0, 1fr); overflow: hidden; padding: 6px; margin: -6px; }
.news-page--single { grid-template-columns: 1fr; }
.news-side { display: flex; flex-direction: column; gap: 16px; min-width: 0; }

.news-card {
    display: flex; flex-direction: column; background: #fff; border: 1px solid var(--border);
    border-radius: var(--radius); overflow: hidden; text-decoration: none; color: var(--text);
    box-shadow: var(--shadow-sm); transition: border-color .15s ease, box-shadow .15s ease; min-width: 0;
}
.news-card:hover { border-color: var(--brand); box-shadow: var(--shadow-md); color: var(--text); }
.news-card__media { position: relative; background: var(--surface); overflow: hidden; }
/* Görsel akıştan çıkarılır: alanın yüksekliğini fotoğrafın doğal oranı değil kart düzeni belirler.
   Fotoğraf kırpılmaz (contain); boşluklar aynı fotoğrafın bulanık/karartılmış kopyasıyla (--news-bg) dolar. */
.news-card__media::before {
    content: ''; position: absolute; inset: -24px; z-index: 0;
    background: var(--news-bg) center / cover no-repeat; filter: blur(22px) brightness(.72);
}
.news-card__media img {
    position: absolute; inset: 0; z-index: 1; width: 100%; height: 100%;
    object-fit: contain; object-position: center; display: block;
}
.news-card__body { padding: 18px 20px 20px; display: flex; flex-direction: column; gap: 8px; min-width: 0; }
.news-card__date { font-size: .82rem; color: var(--text); }
.news-card__date i { color: var(--brand); margin-right: 5px; }
.news-card__title { margin: 0; font-weight: 700; color: var(--navy); line-height: 1.3; }
.news-card__summary { margin: 0; font-size: .92rem; }
.news-card__more { margin-top: 4px; color: var(--brand); font-weight: 600; font-size: .9rem; }

.news-card--featured { height: 100%; }
.news-card--featured .news-card__media { flex: none; height: 250px; min-height: 0; }
.news-card--featured .news-card__title {
    font-size: 1.45rem; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden;
}

.news-card--small { flex-direction: row; flex: 1; }
.news-card--small .news-card__media { flex: 0 0 154px; width: 154px; min-height: 0; } /* 156px kart - 2px border = kare */
.news-card--small .news-card__body { padding: 14px 16px; justify-content: center; gap: 6px; }
.news-card--small .news-card__title {
    font-size: 1rem; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
.news-card--featured .news-card__summary,
.news-card--small .news-card__summary {
    display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
.news-card--small .news-card__summary { display: none; }
@media (min-width: 1200px) { .news-card--small .news-card__summary { display: -webkit-box; -webkit-line-clamp: 1; } }

/* Masaüstü: tüm slide'lar aynı yüksekliği korusun; küçük kartlar slide'daki haber sayısından bağımsız 156px sabit, ana görsel kalan alanı doldurur. */
@media (min-width: 992px) {
    .news-page { min-height: 500px; }
    .news-card--small { flex: 0 0 156px; height: 156px; min-height: 0; }
}

@media (max-width: 991.98px) {
    .news-card--small { flex: 0 0 156px; height: 156px; }
    .news-page, .news-page.is-active { grid-template-columns: 1fr; align-content: start; }
    .news-card--featured .news-card__media { flex: none; height: 250px; min-height: 0; }
}
@media (max-width: 575.98px) {
    }

/* ---------- DUYURU + HIZLI ERİŞİM ---------- */
.announcements-wide { max-width: 100%; }
.panel { background: #fff; border: 1px solid var(--border); border-radius: var(--radius); box-shadow: var(--shadow-sm); overflow: hidden; }
.announcement-row {
    display: flex; gap: 16px; align-items: center; padding: 16px 20px; text-decoration: none; color: var(--text);
    border-bottom: 1px solid var(--border); transition: background .15s ease;
}
.announcement-row:last-child { border-bottom: 0; }
.announcement-row:hover { background: var(--surface); color: var(--text); }
.date-block {
    flex: 0 0 58px; height: 62px; border-radius: 10px; background: var(--brand-soft); color: var(--brand);
    display: flex; flex-direction: column; align-items: center; justify-content: center; line-height: 1;
}
.date-block strong { font-size: 1.4rem; font-weight: 800; }
.date-block span { font-size: .72rem; font-weight: 700; letter-spacing: .06em; margin-top: 4px; text-transform: uppercase; }
.announcement-row__text { min-width: 0; flex: 1; }
.announcement-row__text h3 { margin: 0 0 3px; font-size: 1rem; font-weight: 700; color: var(--navy); }
.announcement-row:hover h3 { color: var(--brand); }
.announcement-row__text p {
    margin: 0; font-size: .88rem; display: -webkit-box; -webkit-line-clamp: 1; -webkit-box-orient: vertical; overflow: hidden;
}
.announcement-row > i { color: #94a3b8; font-size: .8rem; }
.panel-empty { padding: 28px 20px; text-align: center; color: var(--text); }

/* Hızlı Erişim çubuğu: istatistik ile sektör kartları arasında kompakt tek sıra */
.quick-bar { padding: 28px 0 12px; }
.quick-bar__title { margin: 0 0 12px; font-size: 1.25rem; font-weight: 700; color: var(--navy); letter-spacing: -.01em; }
.quick-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; }
.quick-tile {
    display: flex; flex-direction: row; align-items: center; justify-content: flex-start; gap: 12px;
    padding: 14px 16px; background: #F4F8FE; border: 1px solid #D9E6F8; border-radius: var(--radius);
    color: var(--navy); font-weight: 600; font-size: .95rem; text-decoration: none; text-align: left;
    transition: border-color .15s ease, background .15s ease, box-shadow .15s ease;
}
.quick-tile i {
    flex: none; width: 40px; height: 40px; display: inline-flex; align-items: center; justify-content: center;
    border-radius: 11px; background: #fff; color: var(--brand); font-size: 1.05rem;
}
.quick-tile span { min-width: 0; overflow-wrap: anywhere; line-height: 1.25; }
.quick-tile:hover, .quick-tile:focus-visible { border-color: var(--brand); background: #EAF2FD; box-shadow: var(--shadow-md); color: var(--navy); }
@media (max-width: 991.98px) { .quick-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }

/* ---------- SEKTÖR KARTLARI (sector-carousel partial'ı için ortak ana sayfa başlığı) ---------- */
@media (max-width: 767.98px) {
    .home-section { padding-top: 40px; }
    .section-head h2 { font-size: 1.25rem; }
}

/* ---------- MOBİL / TABLET GÜVENLİK ---------- */
.home-container, .announcements-wide > *, .news-page > *, .section-head > *, .panel, .quick-tile { min-width: 0; }
.news-card__title, .announcement-row__text h3, .news-card__summary { overflow-wrap: anywhere; }
.slider-section, main { max-width: 100%; }

@media (max-width: 575.98px) {
    .home-container { padding: 0 16px; }
    .section-head { margin-bottom: 16px; gap: 8px 12px; }
    .section-head h2 { font-size: 1.25rem; }
    .section-head p { font-size: .85rem; }
    .link-more { font-size: .86rem; }

    /* Hero */
    .slider-section .carousel-inner,
    .slider-section .carousel-item { height: 620px; }
    .slider-section .carousel-item::after {
        background: linear-gradient(180deg, rgba(16,42,67,.25) 0%, rgba(16,42,67,.55) 45%, rgba(16,42,67,.85) 100%);
    }
    .slider-section .carousel-caption {
        padding: 0 16px 84px; justify-content: flex-end; align-items: stretch;
    }
    .hero-title { font-size: 1.75rem; line-height: 1.12; margin-bottom: 10px; overflow-wrap: anywhere; }
    .hero-desc { font-size: .95rem; margin-bottom: 18px; }
    .hero-actions { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
    .btn-brand, .btn-ghost { padding: 11px 10px; font-size: .88rem; justify-content: center; min-width: 0; text-align: center; }
    .slider-section .carousel-control-prev,
    .slider-section .carousel-control-next { top: auto; bottom: 18px; height: 38px; width: 56px; }
    .slider-section .carousel-control-prev { left: 8px; }
    .slider-section .carousel-control-next { right: 8px; }
    .slider-section .carousel-control-prev-icon,
    .slider-section .carousel-control-next-icon { width: 36px; height: 36px; background-size: 12px; }
    .slider-section .carousel-indicators { margin-bottom: 28px; }

    /* İstatistik */
    .stats-strip .home-container { padding: 0 16px; }
    .stats-strip__inner { width: 100%; }
    .stat-item { flex: 1 1 0; min-width: 0; }

    /* Haberler */
    .news-page, .news-page.is-active { gap: 14px; }
    .news-side { gap: 12px; }
    .news-card--featured .news-card__media { aspect-ratio: 16 / 10; max-height: 200px; }
    .news-card--featured .news-card__body { padding: 14px 16px 16px; gap: 6px; }
    .news-card--featured .news-card__title { font-size: 1.5rem; }
    .news-card--featured .news-card__summary { font-size: .88rem; -webkit-line-clamp: 2; }
    .news-card--small { flex-basis: 108px; height: 108px; }
    .news-card--small .news-card__media { flex: 0 0 106px; width: 106px; min-height: 0; }
    .news-card--small .news-card__body { padding: 10px 12px; gap: 4px; }
    .news-card--small .news-card__title { font-size: .92rem; }
    .news-card--small .news-card__summary { display: none; }
    .news-card--small .news-card__more { font-size: .82rem; margin-top: 0; }
    .news-pager__count { min-width: 44px; }

    /* Duyurular */
    .announcement-row { gap: 12px; padding: 12px 14px; }
    .date-block { flex-basis: 48px; height: 52px; border-radius: 8px; }
    .date-block strong { font-size: 1.15rem; }
    .date-block span { font-size: .66rem; margin-top: 3px; }
    .announcement-row__text h3 { font-size: .9rem; }
    .announcement-row__text p { font-size: .82rem; }

    /* Hızlı erişim (2x2) */
    .quick-bar { padding-top: 22px; }
    .quick-bar__title { font-size: 1.1rem; margin-bottom: 10px; }
    .quick-grid { gap: 10px; }
    .quick-tile { padding: 11px 10px; gap: 9px; font-size: .84rem; }
    .quick-tile i { width: 32px; height: 32px; font-size: .9rem; border-radius: 9px; }
}
@media (max-width: 359.98px) {
    .quick-tile { padding: 10px 8px; gap: 7px; font-size: .78rem; }
    .quick-tile i { width: 28px; height: 28px; font-size: .8rem; }
}
