/* Eğitimler (egitim.emoankara.tr): ana sitenin renkleri ve bileşenleri. Lacivert menü, beyaz paneller, Inter.
   Etkinlikler sitesinin stillerinin kopyasıdır (sites/etkinlik/assets/etkinlik.css), o da Yayınlar'dan kopyadır;
   ortak bir bileşen değişirse üçünde de elle değiştirilir. */

@font-face {
    font-family: Inter;
    font-style: normal;
    font-weight: 100 900;
    font-display: swap;
    src: url(fonts/inter-latin-ext-wght-normal.woff2) format("woff2");
    unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}

@font-face {
    font-family: Inter;
    font-style: normal;
    font-weight: 100 900;
    font-display: swap;
    src: url(fonts/inter-latin-wght-normal.woff2) format("woff2");
    unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}


:root {
    --navy: #002b49;
    --primary: #0b4a72;
    --accent: #006398;
    --amber: #f59e0b;
    --amber-soft: #fbbf24;
    --ink: #0f172a;
    --text: #334155;
    --muted: #64748b;
    --line: #e2e8f0;
    --bg: #f8fafc;
    --sans: Inter, system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
    --mono: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
}

*, *::before, *::after { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }

body.egitim {
    display: flex;
    flex-direction: column;
    min-height: 100vh;
    margin: 0;
    background: var(--bg);
    color: var(--text);
    font-family: var(--sans);
    font-size: 16px;
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
}

h1, h2, h3, p, ul { margin: 0; padding: 0; }
ul { list-style: none; }
img { display: block; }
a { color: inherit; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.visually-hidden { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }

.container { width: 100%; max-width: 1280px; margin-inline: auto; padding-inline: 16px; }

/* Üst bölüm: ana sitenin üst bölümüyle aynı */
.site-head { background: #fff; border-bottom: 1px solid var(--line); }
.site-head__row { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding-block: 16px; }
.site-head__brand { display: flex; align-items: center; gap: 20px; min-width: 0; }
.site-head__org { display: flex; align-items: center; gap: 16px; min-width: 0; text-decoration: none; }
.site-head__emo { width: auto; height: 72px; flex: none; }
.site-head__org-text { display: flex; flex-direction: column; min-width: 0; line-height: 1.25; }
.site-head__tmmob { color: var(--muted); font-size: 11px; font-weight: 800; letter-spacing: .06em; }
.site-head__name { color: var(--navy); font-size: 21px; font-weight: 800; letter-spacing: -.02em; text-transform: uppercase; }
.site-head__unit { color: var(--accent); font-size: 13px; font-weight: 700; letter-spacing: .03em; text-transform: uppercase; }
/* Bölümün adı: şube adının yanında ince bir çizgiyle ayrılır */
.site-head__title { padding: 6px 0 6px 20px; border-left: 2px solid var(--line); color: var(--navy); font-size: 21px; font-weight: 800; letter-spacing: -.01em; text-decoration: none; text-transform: uppercase; white-space: nowrap; }
.site-head__title:hover { color: var(--accent); }
.site-head__anniversary { width: auto; height: 76px; flex: none; }

/* Kategori menüsü: ana sitenin lacivert üst menüsü */
.cat-nav { background: var(--navy); }
.cat-nav__list { display: flex; flex-wrap: wrap; }
.cat-nav__link {
    display: block;
    padding: 12px 20px;
    border-bottom: 2px solid transparent;
    color: #e2e8f0;
    font-size: 14px;
    font-weight: 500;
    text-decoration: none;
}
.cat-nav__link:hover { background: var(--primary); color: #fff; }
.cat-nav__link.is-current { background: var(--accent); border-bottom-color: var(--amber-soft); color: #fff; font-weight: 700; }

/* Gövde */
.main { flex: 1; padding-block: 28px 56px; }

.panel { background: #fff; border: 1px solid var(--line); box-shadow: 0 1px 2px rgba(15, 23, 42, .05); }
.panel__bar {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px 20px;
    background: var(--navy);
    color: #fff;
    font-size: 12px;
    font-weight: 700;
    letter-spacing: .08em;
    text-transform: uppercase;
}
.panel__mark { width: 10px; height: 10px; flex: none; background: var(--amber-soft); }
.panel__body { display: grid; justify-items: start; gap: 20px; padding: 28px; }
.lead { color: var(--text); font-size: 16px; font-weight: 400; }

/* Bölüm başlığı: lacivert kare, büyük harf, altında çizgi */
.section-head { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 24px; margin-bottom: 20px; padding-bottom: 12px; border-bottom: 2px solid var(--navy); }
.section-head--row { justify-content: space-between; }
.section-head__title { display: flex; align-items: center; gap: 12px; color: var(--ink); font-size: 22px; font-weight: 800; letter-spacing: .04em; line-height: 1.2; text-transform: uppercase; }
.section-head__title::before { content: ""; width: 12px; height: 24px; flex: none; background: var(--navy); }

/* Panelden yazılan bilgi yazısı */
.intro { max-width: 760px; margin: -6px 0 22px; color: var(--muted); font-size: 16px; }

/* Düğmeler */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    min-height: 44px;
    padding: 10px 24px;
    border: 1px solid transparent;
    background: transparent;
    color: var(--navy);
    font-family: inherit;
    font-size: 13px;
    font-weight: 700;
    letter-spacing: .05em;
    text-decoration: none;
    text-transform: uppercase;
    cursor: pointer;
}
.btn:disabled { opacity: .35; cursor: default; pointer-events: none; }
.btn--primary, .btn--solid { background: var(--navy); border-color: var(--navy); color: #fff; box-shadow: 0 1px 2px rgba(15, 23, 42, .1); }
.btn--primary:hover, .btn--solid:hover { background: var(--primary); border-color: var(--primary); }
.btn--ghost { background: #fff; border-color: #cbd5e1; }
.btn--ghost:hover { border-color: var(--navy); }
.btn--small { min-height: 38px; padding: 6px 16px; }

pre { padding: 10px; background: #f1f5f9; font-size: 12px; white-space: pre-wrap; overflow-wrap: anywhere; }

/* Son yayınlanan ve güncel sayı: ana sayfadaki "Son Paylaşılan" paneli */
.latest { display: grid; grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr); align-items: stretch; gap: 24px; }
.feature { display: flex; flex-direction: column; min-width: 0; }
/* Sağdaki kareler paneli uzatsa da satır afiş kadar kalır: düğmeler afişin alt hizasında durur, panelin dibine inmez. */
.feature__body { display: grid; flex: 1; grid-template-columns: minmax(140px, min(40%, 280px)) minmax(0, 1fr); align-content: start; align-items: start; gap: 28px; padding: 28px; }
.feature__media { display: block; text-decoration: none; }
.feature__media > * { box-shadow: 0 0 0 1px rgba(15, 23, 42, .12), 0 14px 26px -18px rgba(15, 23, 42, .6); transition: transform .2s ease; }
.feature__media:hover > * { transform: translateY(-3px); }
.feature__text { display: flex; flex-direction: column; gap: 14px; height: 100%; min-width: 0; }
.feature__meta { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 12px; color: var(--muted); font-size: 13px; }
.feature__date { display: inline-flex; align-items: center; gap: 8px; }
.feature__date::before { content: ""; width: 8px; height: 8px; background: var(--primary); }
.feature__section { padding-left: 12px; border-left: 1px solid #cbd5e1; color: var(--ink); font-weight: 500; text-decoration: none; }
.feature__section:hover { color: var(--accent); text-decoration: underline; }
/* Son duyurulan eğitim geçmişse tarihin yanında yazar */
.feature__status { padding-left: 12px; border-left: 1px solid #cbd5e1; color: var(--ink); font-weight: 600; }
.feature__title { color: var(--ink); font-size: 34px; font-weight: 800; line-height: 1.1; letter-spacing: -.02em; overflow-wrap: anywhere; }
.feature__label { display: block; margin-bottom: 6px; color: var(--accent); font-size: 14px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; }
.feature__summary { color: var(--text); font-size: 17px; line-height: 1.5; overflow-wrap: anywhere; }
.feature__info { color: var(--muted); font-size: 14px; font-variant-numeric: tabular-nums; }
.feature__actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: auto; padding-top: 20px; border-top: 1px solid var(--line); }
/* Kategori sayfasında güncel sayı tam genişliktedir */
.feature--current .feature__body { grid-template-columns: minmax(160px, 260px) minmax(0, 1fr); }
.feature--current .feature__title { font-size: 40px; }

/* Sağdaki 3x3 kare */
.recent { display: flex; min-width: 0; }
.recent__grid { display: grid; flex: 1; grid-template-columns: repeat(3, minmax(0, 1fr)); grid-template-rows: repeat(3, minmax(0, 1fr)); gap: 14px; }
.tile {
    display: flex;
    flex-direction: column;
    height: 100%;
    background: #fff;
    border: 1px solid var(--line);
    box-shadow: 0 1px 2px rgba(15, 23, 42, .05);
    text-decoration: none;
    transition: border-color .15s ease, box-shadow .15s ease;
}
.tile:hover { border-color: var(--accent); box-shadow: 0 8px 18px -10px rgba(15, 23, 42, .35); }
/* Kapak dikeydir; karede üst kısmı (yayının adı) görünür. */
.tile__media { position: relative; flex: 1 1 0; min-height: 72px; overflow: hidden; background: var(--bg); border-bottom: 1px solid var(--line); }
.tile__media > * { position: absolute; inset: 0; height: 100%; aspect-ratio: auto; object-position: top; }
.tile__text { display: grid; padding: 7px 10px 9px; line-height: 1.3; }
.tile__label { overflow: hidden; color: var(--accent); font-size: 10.5px; font-weight: 700; letter-spacing: .06em; text-overflow: ellipsis; text-transform: uppercase; white-space: nowrap; }
.tile__title { color: var(--ink); font-size: 14px; font-weight: 700; }
.tile:hover .tile__title { color: var(--accent); }
.tile__date { color: var(--muted); font-family: var(--mono); font-size: 11px; }

/* Tüm sayılar */
.archive { padding-top: 40px; scroll-margin-top: 8px; }
.archive__year { margin: 8px 0 14px; color: var(--muted); font-size: 13px; font-weight: 700; letter-spacing: .1em; font-variant-numeric: tabular-nums; }
.archive__year:not(:first-of-type) { margin-top: 28px; }
.archive__empty { padding: 20px 0; color: var(--muted); }

.years { display: flex; flex-wrap: wrap; gap: 6px; }
.years__item {
    display: inline-flex;
    align-items: center;
    min-height: 34px;
    padding: 4px 14px;
    border: 1px solid #cbd5e1;
    background: #fff;
    color: var(--ink);
    font-size: 13px;
    font-weight: 600;
    text-decoration: none;
    font-variant-numeric: tabular-nums;
}
.years__item:hover { border-color: var(--navy); }
.years__item.is-current { background: var(--navy); border-color: var(--navy); color: #fff; }

/* Alt bölüm: ana siteyle aynı (Portal::partials/site-footer) */
.site-footer { background: var(--navy); border-top: 2px solid var(--accent); color: #94a3b8; font-size: 13px; }
.site-footer__grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 32px; padding-block: 32px 24px; }
.site-footer__grid p + p { margin-top: 6px; }
.site-footer__title { padding-bottom: 6px; margin-bottom: 10px; border-bottom: 1px solid #334155; color: #fff; font-size: 14px; font-weight: 700; letter-spacing: .05em; text-transform: uppercase; }
.site-footer strong { color: #e2e8f0; }
.site-footer a { color: inherit; }
.site-footer a:hover { color: #fff; }
.site-footer__bottom { padding-block: 14px; border-top: 1px solid #334155; font-size: 12px; }

.tile__external { color: var(--accent); font-weight: 700; }

/* Kart ızgarası: beyaz, kenarlı kartlar (eğitimler gibi listeler için) */
.card-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 20px; }
.card {
    display: flex;
    flex-direction: column;
    height: 100%;
    background: #fff;
    border: 1px solid var(--line);
    box-shadow: 0 1px 2px rgba(15, 23, 42, .05);
    text-decoration: none;
    transition: border-color .15s ease, box-shadow .15s ease;
}
.card:hover { border-color: var(--accent); box-shadow: 0 8px 18px -10px rgba(15, 23, 42, .35); }
.card__media { position: relative; aspect-ratio: 4 / 3; overflow: hidden; background: var(--bg); border-bottom: 1px solid var(--line); }
.card__media > * { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: top; }
.card__body { display: grid; gap: 4px; padding: 12px 14px 14px; }
.card__kicker { color: var(--accent); font-size: 12px; font-weight: 700; letter-spacing: .04em; text-transform: uppercase; font-variant-numeric: tabular-nums; }
.card__past { color: var(--muted); }
.card__title { color: var(--ink); font-size: 16px; font-weight: 800; line-height: 1.3; overflow-wrap: anywhere; }
.card:hover .card__title { color: var(--accent); }
.card__meta { color: var(--muted); font-size: 13px; overflow-wrap: anywhere; }

/* Geniş ekranda boyu sol panel belirler: kareler onu uzatmaz, panelin altında boşluk kalmaz.
   Satırlar kare sayısı kadardır ve paneli doldurur. Uzun eğitim adı karede iki satıra kısalır, afiş kalan yere sığar. */
@media (min-width: 1025px) {
    .recent { contain: size; }
    .recent__grid { grid-template-rows: none; grid-auto-rows: minmax(0, 1fr); }
    .tile { overflow: hidden; }
    .tile__media { min-height: 0; }
    .tile__title { display: -webkit-box; overflow: hidden; -webkit-box-orient: vertical; -webkit-line-clamp: 2; }
}

/* Dar ekranda son paylaşılan üstte, öncekiler altında; kareler yatay oranını korur. */
@media (max-width: 1024px) {
    .latest { grid-template-columns: minmax(0, 1fr); }
    .recent__grid { grid-template-rows: none; }
    .tile__media { flex: none; aspect-ratio: 16 / 10; }
}

@media (max-width: 860px) {
    .site-footer__grid { grid-template-columns: minmax(0, 1fr); gap: 24px; }
}

/* Telefon */
@media (max-width: 700px) {
    .site-head__row { gap: 10px; padding-block: 10px; }
    .site-head__brand { gap: 10px; }
    .site-head__org { gap: 10px; }
    .site-head__emo { height: 54px; }
    .site-head__org-text { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
    .site-head__title { padding-left: 10px; font-size: 18px; }
    .site-head__anniversary { height: 52px; }
    .cat-nav__link { padding: 11px 14px; }
    .main { padding-block: 18px 32px; }

    .latest { gap: 16px; }
    .feature__body, .feature--current .feature__body { grid-template-columns: minmax(0, 38%) minmax(0, 1fr); gap: 16px; padding: 16px; }
    .feature__title, .feature--current .feature__title { font-size: 24px; }
    .feature__label { font-size: 12px; }
    .feature__summary { font-size: 15px; }
    .feature__actions { padding-top: 14px; }
    .btn { padding-inline: 18px; }
    .recent__grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
    /* İki sütunda tek kare kalmasın: telefonda önceki sekiz gösterilir. */
    .recent__grid > li:nth-child(9) { display: none; }

    .section-head__title { font-size: 18px; }
    .archive { padding-top: 28px; }
    .card-grid { grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 12px; }
}

@media (prefers-reduced-motion: reduce) {
    .feature__media > *, .tile, .card { transition: none; }
    .feature__media:hover > * { transform: none; }
}

/* Afiş: dikey. Afiş yoksa lacivert zeminde eğitimin günü ve ayı. */
.poster { display: block; width: 100%; height: auto; aspect-ratio: 1 / 1.414; object-fit: cover; background: var(--bg); }
.poster--empty {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 2px;
    background: var(--navy);
    color: #fff;
    text-align: center;
}
.poster--empty::before { content: ""; width: 34px; height: 5px; margin-bottom: 12px; background: var(--amber-soft); }
.poster__day { font-size: 56px; font-weight: 800; line-height: 1; letter-spacing: -.02em; font-variant-numeric: tabular-nums; }
.poster__month { font-size: 16px; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; }
.poster__year { color: #94a3b8; font-size: 13px; font-weight: 600; letter-spacing: .1em; }
.card__media .poster--empty { position: absolute; inset: 0; aspect-ratio: auto; }
.card__media .poster__day { font-size: 40px; }
/* 3x3 karede afişsiz eğitimin günü küçük yazılır */
.tile__media .poster--empty::before { margin-bottom: 6px; }
.tile__media .poster__day { font-size: 30px; }
.tile__media .poster__month { font-size: 12px; }
.tile__media .poster__year { font-size: 11px; }

/* Eğitimin sayfası */
.training__body { display: grid; grid-template-columns: minmax(180px, 340px) minmax(0, 1fr); align-items: start; gap: 32px; padding: 28px; }
.training__poster > * { box-shadow: 0 0 0 1px rgba(15, 23, 42, .12), 0 14px 26px -18px rgba(15, 23, 42, .6); }
.training__text { display: grid; gap: 18px; min-width: 0; }
.training__title { color: var(--ink); font-size: 34px; font-weight: 800; line-height: 1.15; letter-spacing: -.02em; overflow-wrap: anywhere; }
.training__facts { display: grid; gap: 10px; margin: 0; padding: 14px 0; border-block: 1px solid var(--line); }
.training__facts div { display: grid; grid-template-columns: 86px minmax(0, 1fr); gap: 12px; }
.training__facts dt { color: var(--muted); font-size: 12px; font-weight: 700; letter-spacing: .08em; line-height: 1.9; text-transform: uppercase; }
.training__facts dd { margin: 0; color: var(--ink); font-weight: 600; overflow-wrap: anywhere; }
.training__facts dd a { color: var(--accent); text-decoration: none; }
.training__facts dd a:hover { text-decoration: underline; }
.training__actions { display: flex; flex-wrap: wrap; gap: 10px; }
.training__description { display: grid; gap: 14px; color: var(--text); font-size: 16px; line-height: 1.7; overflow-wrap: anywhere; }
.training__description a { color: var(--accent); font-weight: 600; }
.training__description a:hover { color: var(--navy); }
.training__back { margin-top: 18px; font-size: 14px; font-weight: 600; }
.training__back a { color: var(--accent); text-decoration: none; }
.training__back a:hover { text-decoration: underline; }

@media (max-width: 700px) {
    .training__body { grid-template-columns: minmax(0, 1fr); gap: 20px; padding: 16px; }
    .training__poster { width: min(70%, 280px); }
    .training__title { font-size: 24px; }
    .card__media .poster__day { font-size: 30px; }
}
