/*
 * SERT INFORM 3.0 overrides. Loaded after main.css, so equal-specificity rules here win
 * at every breakpoint. Keep this file small: it only changes what the v3 brief asks for.
 */

/* ---------- Typography ---------- */
body{text-rendering:optimizeLegibility;font-feature-settings:"cv11","ss01"}
h1,h2,h3{text-wrap:balance}
.story-excerpt,.article-lead,.article-content p{text-wrap:pretty}
.article-header h1{font-size:clamp(30px,3.1vw,44px);line-height:1.12;letter-spacing:-.035em}
.article-lead{font-size:clamp(17px,1.25vw,20px);line-height:1.5;color:#2b3c57;max-width:760px}
.article-content{font-size:clamp(17px,.9vw + 9px,19px);line-height:1.78;color:#1d2a3e;max-width:800px;margin-top:24px}
.article-content p{margin:0 0 1.15em}
.article-content h2{font-size:clamp(23px,1.6vw,28px);line-height:1.25;margin:1.6em 0 .55em}
.article-content h3{font-size:clamp(19px,1.3vw,23px);line-height:1.3;margin:1.4em 0 .5em}
.article-content ul,.article-content ol{margin-bottom:1.2em}
.article-content li+li{margin-top:.35em}
.article-content img{border-radius:8px}
.article-content figcaption,.article-content .wp-caption-text{font-size:13px;color:#5b6b82}
.article-tags a{font-size:12px}

/* ---------- Article photo: show the whole picture, never crop it ---------- */
.article-cover{margin:0 0 6px}
.article-cover-zoom{display:block;border-radius:8px;overflow:hidden;background:#eef3f9;cursor:zoom-in}
.article-cover .story-image{width:100%;height:auto;max-height:none;aspect-ratio:auto;object-fit:contain;transition:none}
.article-cover .story-image:hover{transform:none}
.article-cover figcaption{font-size:12px;color:#5b6b82;line-height:1.5;margin-top:8px}

/* Full-screen photo viewer (native <dialog>; without JS the link opens the full file). */
.image-lightbox{border:0;padding:0;margin:0;width:100vw;height:100vh;max-width:100vw;max-height:100vh;background:transparent;display:none}
.image-lightbox[open]{display:flex;align-items:center;justify-content:center}
.image-lightbox::backdrop{background:rgba(3,20,36,.94)}
.image-lightbox img{display:block;width:auto;height:auto;max-width:min(96vw,1600px);max-height:92vh;object-fit:contain;border-radius:4px}
.lightbox-close{position:fixed;top:14px;right:14px;width:44px;height:44px;border-radius:50%;background:#ffffff24;color:#fff;font-size:28px;line-height:1;display:grid;place-items:center;z-index:2}
.lightbox-close:hover{background:var(--sert-accent);color:#fff}
body.lightbox-open{overflow:hidden}

/* ---------- Section headings get a clear accent bar ---------- */
.category-section .section-heading h2,
.media-section .section-heading h2,
.special-section .section-heading h2,
.home-sections .section-heading h2{padding-left:12px;position:relative}
.category-section .section-heading h2:before,
.media-section .section-heading h2:before,
.special-section .section-heading h2:before,
.home-sections .section-heading h2:before{content:"";position:absolute;left:0;top:.12em;bottom:.12em;width:4px;border-radius:2px;background:var(--sert-accent)}

/* ---------- Layout helpers used by SERT Composer ---------- */
.home-sections>:only-child{grid-column:1/-1}
.composer-block{min-width:0}
.composer-spacer{display:block}
.composer-html>*:first-child{margin-top:0}
.composer-html>*:last-child{margin-bottom:0}

@media (prefers-reduced-motion:reduce){
  .lightbox-close{transition:none}
}
.hero-grid--single{grid-template-columns:minmax(0,1fr)}
.composer-block>.latest-section{margin-top:0}

/* ---------- Sidebar news feed ---------- */
.news-feed{display:flex;flex-direction:column;padding:14px 0 0;overflow:hidden}
.news-feed .side-heading{padding:0 16px;margin-bottom:6px}
.news-feed .side-heading h2{display:flex;align-items:center;gap:9px}
.news-feed-live{width:8px;height:8px;flex:0 0 8px;border-radius:50%;background:#e5383b;animation:sert-live 2.2s ease-out infinite}
@keyframes sert-live{0%{box-shadow:0 0 0 0 #e5383b59}70%{box-shadow:0 0 0 7px #e5383b00}100%{box-shadow:0 0 0 0 #e5383b00}}
.news-feed-body{position:relative;min-height:0}
.news-feed-scroll{max-height:calc(var(--feed-visible,7) * 64px);overflow-y:auto;overscroll-behavior:contain;scrollbar-width:thin;scrollbar-color:#cfdbea transparent}
.news-feed-scroll:focus-visible{outline-offset:-3px}
.news-feed-list{list-style:none;margin:0;padding:0}
.news-feed-list li+li .news-feed-item{border-top:1px solid #eef2f7}
.news-feed-item{display:grid;grid-template-columns:42px minmax(0,1fr);gap:12px;align-items:start;height:64px;padding:11px 16px;color:var(--sert-primary);transition:background .15s}
.news-feed-item:hover{background:#f4f8fe;color:var(--sert-primary)}
.news-feed-item:hover .news-feed-title{color:var(--sert-accent)}
.news-feed-when{display:flex;flex-direction:column;line-height:1.15;padding-top:1px}
.news-feed-when time{font-size:13px;font-weight:700;color:var(--sert-accent);font-variant-numeric:tabular-nums}
.news-feed-when small{font-size:10.5px;color:var(--sert-muted);margin-top:3px}
.news-feed-title{font-size:13.5px;font-weight:550;line-height:1.35;letter-spacing:-.01em;display:-webkit-box;-webkit-box-orient:vertical;-webkit-line-clamp:2;overflow:hidden;transition:color .15s}
.news-feed-more{display:flex;align-items:center;justify-content:center;gap:6px;min-height:42px;border-top:1px solid var(--sert-border);background:#fafcff;font-size:12px;font-weight:600;color:var(--sert-accent)}
.news-feed-more:hover{background:#f1f7ff}
.news-feed-more .icon{width:14px;height:14px}
.news-feed-item--popular{grid-template-columns:24px 64px minmax(0,1fr);gap:10px;align-items:center;height:78px;padding:9px 12px}
.news-feed-item--popular .news-feed-rank{font-size:22px;line-height:1;font-weight:850;color:var(--sert-primary);font-variant-numeric:tabular-nums;text-align:center}
.news-feed-thumb{display:block;width:64px;height:56px;overflow:hidden;border-radius:6px;background:var(--sert-surface-blue)}
.news-feed-thumb .story-image{width:100%;height:100%;object-fit:cover;aspect-ratio:auto}
.news-feed-popular-copy{min-width:0;display:block}
.news-feed-item--popular .news-feed-title{font-size:12.5px;line-height:1.3;-webkit-line-clamp:2}
.news-feed-views{display:block;margin-top:5px;font-size:10px;line-height:1.2;color:var(--sert-muted)}

/* Home, desktop: the feed fills exactly the height left beside the main column.
   The list is positioned absolutely, so it never makes the sidebar taller than the content. */
@media (min-width:901px){
  .home-top{align-items:stretch}
  .news-feed--fill{flex:1 1 auto;min-height:calc(4 * 64px + 104px);max-height:calc(var(--feed-total,20) * 64px + 104px)}
  .news-feed--fill .news-feed-body{flex:1 1 auto}
  .news-feed--fill .news-feed-scroll{position:absolute;inset:0;max-height:none}
  .news-feed--fill.is-popular-active{flex:0 0 auto;min-height:0;max-height:none}
  .news-feed--fill.is-popular-active .news-feed-body{flex:0 0 auto}
  .news-feed--fill.is-popular-active .news-feed-scroll{position:static;inset:auto;max-height:none}
}
@media (prefers-reduced-motion:reduce){.news-feed-live{animation:none}}

/* Newsletter added as a SERT Composer block: a horizontal strip on desktop.
   The classic home keeps its bottom newsletter for mobile only, because the footer already has one on desktop. */
@media (min-width:901px){
  .composer-newsletter{margin-top:30px}
  .composer-newsletter .newsletter{display:flex;gap:28px;align-items:center;padding:22px 26px}
  .composer-newsletter .newsletter-top{display:flex;flex:1;min-width:0}
  .composer-newsletter .newsletter-form{width:45%;margin:0}
  .composer-newsletter .privacy-note{display:none}
}

/* Tabs of the sidebar news box. */
.news-feed{padding-top:0}
.news-feed-tabs{display:flex;gap:2px;padding:0 8px;border-bottom:1px solid var(--sert-border);overflow-x:auto;scrollbar-width:none}
.news-feed-tab{display:inline-flex;align-items:center;gap:8px;min-height:48px;padding:0 8px;margin-bottom:-1px;border-bottom:2px solid transparent;font-size:14px;font-weight:700;letter-spacing:-.01em;color:var(--sert-muted);white-space:nowrap}
.news-feed-tab:hover{color:var(--sert-primary)}
.news-feed-tab.is-active{color:var(--sert-primary);border-bottom-color:var(--sert-accent)}
.news-feed-tab:focus-visible{outline-offset:-3px}
.news-feed-rank{font-size:19px;font-weight:800;line-height:1;color:var(--sert-primary);font-variant-numeric:tabular-nums}
.news-feed-list.is-popular .news-feed-when small{margin-top:5px}
@media (max-width:1250px){.news-feed-tab{font-size:13px;padding:0 6px;gap:6px}}

/* "Соңғы жаңалықтар" strip: on desktop the sidebar feed already shows the newest stories. */
@media (min-width:901px){.latest-section--mobile-only{display:none}}

/* Header news ticker: compact, readable, and visually separate from the main menu. */
.top-news-strip{height:38px;border-bottom:1px solid #e6ebf1;background:#f8fafc;overflow:hidden}
.top-news-inner{height:100%;display:flex;align-items:center;gap:16px;min-width:0}
.top-news-label{position:relative;z-index:2;display:inline-flex;align-items:center;align-self:stretch;flex:0 0 auto;padding:0 15px;background:var(--sert-accent);color:#fff;font-size:11px;font-weight:800;letter-spacing:.035em;text-transform:uppercase;white-space:nowrap}
.top-news-label:hover{color:#fff;background:var(--sert-accent-hover)}
.top-news-label::after{content:"";position:absolute;right:-8px;top:50%;width:16px;height:16px;background:inherit;transform:translateY(-50%) rotate(45deg);border-radius:2px}
.top-news-marquee{position:relative;flex:1;min-width:0;overflow:hidden;mask-image:linear-gradient(90deg,transparent 0,#000 24px,#000 calc(100% - 24px),transparent 100%);-webkit-mask-image:linear-gradient(90deg,transparent 0,#000 24px,#000 calc(100% - 24px),transparent 100%)}
.top-news-track{display:flex;width:max-content;will-change:transform;animation:sert-news-ticker 68s linear infinite}
.top-news-group{display:flex;align-items:center;gap:28px;flex:none;padding-right:28px}
.top-news-item{display:inline-flex;align-items:center;gap:8px;flex:0 0 auto;max-width:520px;color:#26364b;font-size:12px;line-height:1.25;white-space:nowrap}
.top-news-item time{color:var(--sert-accent);font-size:11px;font-weight:800;font-variant-numeric:tabular-nums}
.top-news-item span{overflow:hidden;text-overflow:ellipsis}
.top-news-item:hover{color:var(--sert-accent)}
.top-news-marquee:hover .top-news-track{animation-play-state:paused}
@keyframes sert-news-ticker{to{transform:translateX(-50%)}}
@media (max-width:767px){.top-news-strip{height:36px}.top-news-inner{padding-inline:0;gap:12px}.top-news-label{padding-inline:12px;font-size:10px}.top-news-label::after{right:-7px;width:14px;height:14px}.top-news-group{gap:22px;padding-right:22px}.top-news-item{max-width:360px;font-size:11px}.top-news-item time{font-size:10px}}
@media (prefers-reduced-motion:reduce){.top-news-track{animation:none}.top-news-marquee{overflow-x:auto;mask-image:none;-webkit-mask-image:none;scrollbar-width:none}.top-news-group[aria-hidden="true"]{display:none}}
