/* today.az — site styles (redesign 25.11.2026). One file instead of reset/grid/main/dayaz_login/today-fixes.
   Keeps the brand: dark teal navigation (#004054), blue headings (#006bc1). Fluid up to 1100px, one column on phones. */

:root {
  --brand: #004054;
  --brand-dark: #00232b;
  --accent: #006bc1;
  --accent-dark: #00539a;
  --text: #1b1f23;
  --muted: #69737d;
  --line: #e2e6ea;
  --soft: #f3f6f8;
  --radius: 6px;
  --sans: "Roboto", system-ui, -apple-system, "Segoe UI", Arial, sans-serif;
  --serif: "Roboto Serif", Georgia, "Times New Roman", serif;
  --wrap: 1100px;
  --gap: 24px;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: #fff; color: var(--text); font: 400 15px/1.5 var(--sans); }
img { max-width: 100%; height: auto; border: 0; }
a { color: var(--accent); text-decoration: none; }
a:hover { color: var(--accent-dark); text-decoration: underline; }
h1, h2, h3, h4 { margin: 0; line-height: 1.25; }
ul, ol { margin: 0; padding: 0; list-style: none; }
time { color: var(--muted); font-size: 12px; white-space: nowrap; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }

.visually-hidden { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip-link { position: absolute; left: -9999px; top: 0; z-index: 100; background: var(--brand); color: #fff; padding: 8px 14px; }
.skip-link:focus { left: 8px; top: 8px; }
.wrap { max-width: var(--wrap); margin: 0 auto; padding: 0 16px; }

/* ---------- header ---------- */
.site-header { border-bottom: 3px solid var(--brand); }
.header-inner { display: flex; align-items: center; justify-content: space-between; gap: 24px; padding-top: 14px; padding-bottom: 12px; }
.logo { margin: 0; flex: 0 0 auto; }
.logo img { display: block; width: 300px; height: auto; }
.header-tools { display: flex; flex-direction: column; align-items: flex-end; gap: 8px; min-width: 0; }
.header-row { display: flex; gap: 18px; font-size: 12px; color: var(--muted); }
.other-langs a { color: var(--muted); margin-left: 14px; }
.other-langs a:hover { color: var(--accent); }
.search { display: flex; width: 340px; max-width: 100%; }
.search input { flex: 1; min-width: 0; height: 34px; padding: 0 12px; border: 1px solid #c4ccd3; border-right: 0; border-radius: var(--radius) 0 0 var(--radius);
  font: 14px var(--sans); color: var(--text); background: #fff; }
.search input:focus { outline: none; border-color: var(--accent); }
.search button { width: 40px; height: 34px; border: 0; border-radius: 0 var(--radius) var(--radius) 0; background: var(--brand); cursor: pointer;
  display: flex; align-items: center; justify-content: center; }
.search button:hover { background: var(--brand-dark); }
.search svg { width: 18px; height: 18px; fill: #fff; }
.social { display: flex; gap: 6px; }
.social a { display: inline-flex; align-items: center; gap: 5px; height: 24px; padding: 0 10px 0 5px; border-radius: 12px; color: #fff;
  font: 500 12px/24px var(--sans); text-decoration: none; transition: filter .15s; }
.social a:hover { filter: brightness(1.15); color: #fff; text-decoration: none; }
.social svg { width: 15px; height: 15px; fill: #fff; }
.social .fb a { background: #1877f2; }
.social .x a { background: #000; }
.social .rss a { background: #f26522; }

/* navigation: all sections, wraps to a second line on narrow screens */
.main-nav { background: var(--brand); }
.main-nav ul { display: flex; flex-wrap: wrap; }
.main-nav li a { display: block; padding: 9px 11px; color: #fff; font: 500 13px/1.2 var(--sans); white-space: nowrap; }
.main-nav li a:hover { background: var(--brand-dark); color: #fff; text-decoration: none; }
.main-nav li a[aria-current="page"] { background: var(--brand-dark); box-shadow: inset 0 -3px 0 #4fb3d9; }
.main-nav li.latest a { color: #ffe680; }
.main-nav li.partner { margin-left: auto; }
.main-nav li.partner a { font-weight: 700; }

/* ---------- page grid ---------- */
.page { display: grid; grid-template-columns: minmax(0, 1fr) 300px; gap: var(--gap); padding-top: 20px; padding-bottom: 32px; }
.content { min-width: 0; }

.block-title { margin: 0 0 12px; padding: 8px 12px; background: var(--brand); color: #fff; font: 700 13px/1.2 var(--sans);
  text-transform: uppercase; letter-spacing: .04em; border-radius: var(--radius) var(--radius) 0 0; }
.block-title a { color: #fff; }
.block-title a:hover { color: #fff; text-decoration: underline; }
.more { display: inline-block; margin-top: 10px; font-size: 13px; font-weight: 500; }

/* ---------- front: top stories ---------- */
.top-stories { display: grid; grid-template-columns: minmax(0, 1.35fr) minmax(0, 1fr); background: var(--soft); border: 1px solid var(--line);
  border-radius: var(--radius); overflow: hidden; margin-bottom: 28px; min-height: 300px; }
.top-media { position: relative; min-width: 0; min-height: 300px; background: #d9e0e5; }
.top-slide { position: absolute; inset: 0; opacity: 0; transition: opacity .25s; }
.top-slide.is-active { opacity: 1; z-index: 1; }
.top-slide img { width: 100%; height: 100%; object-fit: cover; object-position: center; display: block; }
.top-list { display: flex; flex-direction: column; min-width: 0; }
.top-list li { flex: 1; display: flex; flex-direction: column; justify-content: center; gap: 3px; padding: 7px 14px; border-bottom: 1px solid var(--line);
  border-left: 4px solid transparent; transition: background .15s; }
.top-list li:last-child { border-bottom: 0; }
.top-list li a { color: var(--brand); font: 700 13.5px/1.3 var(--sans); display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.top-list li.is-active { background: #fff; border-left-color: var(--accent); }
.top-list li.is-active a { color: var(--accent); }

/* front: cards and category blocks */
.news-section { margin-bottom: 28px; }
.cards { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; }
.card-img { display: block; aspect-ratio: 16 / 9; overflow: hidden; border-radius: var(--radius); background: var(--soft); margin-bottom: 8px; }
.card-img img { width: 100%; height: 100%; object-fit: cover; display: block; transition: transform .3s; }
.card:hover .card-img img { transform: scale(1.03); }
.card h3 { font: 700 14px/1.35 var(--sans); }
.card h3 a { color: var(--text); }
.card h3 a:hover { color: var(--accent); }

.sections-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 0 var(--gap); align-items: start; }
.cat-block { border-bottom: 1px solid var(--line); padding-bottom: 14px; }
.cat-block .lead { margin-bottom: 8px; }
.cat-block .lead-img { display: block; aspect-ratio: 16 / 9; overflow: hidden; border-radius: var(--radius); margin-bottom: 8px; background: var(--soft); }
.cat-block .lead-img img { width: 100%; height: 100%; object-fit: cover; display: block; }
.cat-block .lead h3 { font: 700 16px/1.3 var(--sans); }
.cat-block .lead h3 a { color: var(--text); }
.cat-block .lead h3 a:hover { color: var(--accent); }
.headlines li { padding: 7px 0; border-top: 1px dashed var(--line); font-size: 14px; line-height: 1.35; }
.headlines li time { display: block; margin-bottom: 1px; }
.headlines li a { color: var(--text); }
.headlines li a:hover { color: var(--accent); }

/* ---------- sidebar ---------- */
.sidebar { min-width: 0; }
.side-block { margin-bottom: 24px; border: 1px solid var(--line); border-radius: var(--radius); background: #fff; }
.side-block .block-title { margin: 0; }
.side-block ul, .side-block ol { padding: 4px 12px; }
.newsline li { padding: 7px 0; border-bottom: 1px dashed var(--line); font-size: 13px; line-height: 1.35; }
.newsline li:last-child { border-bottom: 0; }
.newsline li time { display: block; }
.newsline li a { color: var(--text); }
.newsline li.b a { font-weight: 700; }
.newsline li.hl a { font-weight: 700; color: var(--brand); }
.newsline li a:hover { color: var(--accent); }
.side-block .more { margin: 4px 12px 12px; }
.popular li { border-bottom: 1px dashed var(--line); }
.popular li:last-child { border-bottom: 0; }
.popular a { display: flex; gap: 10px; align-items: flex-start; padding: 9px 0; color: var(--text); font-size: 13px; line-height: 1.35; font-weight: 500; }
.popular a:hover { color: var(--accent); text-decoration: none; }
.popular img { flex: 0 0 96px; width: 96px; height: 54px; object-fit: cover; border-radius: 4px; }

/* ---------- breadcrumbs, page titles ---------- */
.breadcrumbs ol { display: flex; flex-wrap: wrap; font-size: 12px; color: var(--muted); margin-bottom: 8px; text-transform: uppercase; letter-spacing: .03em; }
.breadcrumbs li + li::before { content: "/"; margin: 0 8px; color: #b3bcc4; }
.breadcrumbs a { color: var(--accent); font-weight: 500; }
.page-title { font: 700 28px/1.2 var(--sans); color: var(--brand); margin: 0 0 18px; padding-bottom: 10px; border-bottom: 2px solid var(--brand); }
.page-title small { font-size: 15px; font-weight: 400; color: var(--muted); }

/* ---------- article ---------- */
.article-head h1 { font: 700 32px/1.2 var(--sans); color: var(--text); margin: 0 0 10px; letter-spacing: -.01em; }
.article-meta { margin: 0 0 18px; font-size: 13px; color: var(--muted); }
.article-meta time { font-size: 13px; }
.article-meta a { font-weight: 500; }
.article-lead { margin: 0 0 18px; font: 500 18px/1.5 var(--sans); color: #343c45; }
.article-figure { margin: 0 0 20px; }
.article-figure img { display: block; max-width: 100%; height: auto; border-radius: var(--radius); }
.article-body { font: 400 17px/1.75 var(--serif); color: #20262c; overflow-wrap: break-word; }
.article-body p { margin: 0 0 1.1em; }
.article-body h2, .article-body h3 { font-family: var(--sans); margin: 1.4em 0 .6em; color: var(--text); }
.article-body a { text-decoration: underline; text-underline-offset: 2px; }
.article-body img { max-width: 100%; height: auto; border-radius: 4px; margin: .4em 0; }
.article-body iframe, .article-body video { max-width: 100%; }
.article-body table { max-width: 100%; border-collapse: collapse; font-family: var(--sans); font-size: 14px; }
.article-body td, .article-body th { border: 1px solid var(--line); padding: 4px 8px; }
.article-body blockquote { margin: 1em 0; padding: .2em 0 .2em 1em; border-left: 4px solid var(--accent); color: #3d4650; font-style: italic; }
.article-body ul, .article-body ol { margin: 0 0 1.1em 1.4em; }
.article-body ul li { list-style: disc; }
.article-body ol li { list-style: decimal; }
.article-foot { display: flex; justify-content: space-between; align-items: center; margin: 24px 0; padding: 12px 0; border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line); font-size: 13px; color: var(--muted); }
.article-foot .print { display: inline-flex; align-items: center; gap: 6px; color: var(--muted); }
.article-foot .print:hover { color: var(--accent); }
.article-foot svg { width: 16px; height: 16px; fill: currentColor; }
.article-foot .views { font-weight: 500; }

.see-also ul { display: grid; grid-template-columns: 1fr 1fr; gap: 0 20px; }
.see-also li { padding: 9px 0; border-bottom: 1px dashed var(--line); font-size: 14px; line-height: 1.35; }
.see-also li time { display: block; margin-bottom: 2px; }
.see-also li a { color: var(--text); font-weight: 500; }
.see-also li a:hover { color: var(--accent); }

/* ---------- category list, pagination ---------- */
.list-item { display: flex; gap: 16px; padding: 14px 0; border-bottom: 1px solid var(--line); }
.list-img { flex: 0 0 176px; aspect-ratio: 16 / 9; overflow: hidden; border-radius: var(--radius); background: var(--soft); }
.list-img img { display: block; width: 100%; height: 100%; object-fit: cover; }
.list-text { min-width: 0; }
.list-text h2 { font: 700 17px/1.3 var(--sans); margin: 3px 0 5px; }
.list-text h2 a { color: var(--text); }
.list-text h2 a:hover { color: var(--accent); }
.list-text p { margin: 0; color: #3d4650; font-size: 14px; }
.pagination { display: flex; flex-wrap: wrap; justify-content: center; gap: 6px; margin: 24px 0; }
.pagination a, .pagination span { min-width: 36px; height: 36px; padding: 0 10px; display: inline-flex; align-items: center; justify-content: center;
  border: 1px solid var(--line); border-radius: var(--radius); font-size: 14px; color: var(--text); }
.pagination a:hover { border-color: var(--accent); color: var(--accent); text-decoration: none; }
.pagination span[aria-current] { background: var(--brand); border-color: var(--brand); color: #fff; font-weight: 700; }
.pagination .gap { border: 0; min-width: 0; color: var(--muted); }

/* ---------- latest ---------- */
.day-group { margin-bottom: 22px; }
.day-title { font: 700 14px/1.2 var(--sans); color: var(--brand); text-transform: uppercase; letter-spacing: .04em; margin: 0 0 6px; }
.timeline li { display: grid; grid-template-columns: 44px 1fr auto; gap: 12px; align-items: baseline; padding: 8px 0; border-bottom: 1px dashed var(--line); font-size: 14px; }
.timeline li a { color: var(--text); font-weight: 500; }
.timeline li a:hover { color: var(--accent); }
.timeline li a.cat { color: var(--muted); font-size: 12px; font-weight: 400; white-space: nowrap; }

/* ---------- static pages ---------- */
.prose { font-size: 16px; line-height: 1.7; max-width: 720px; }
.prose p { margin: 0 0 14px; }
.prose h2 { font: 700 17px/1.3 var(--sans); color: var(--brand); margin: 26px 0 8px; }
.prose ul { margin: 0 0 14px 20px; }
.prose ul li { list-style: disc; margin-bottom: 4px; }
.prose .note { color: var(--muted); font-style: italic; }

/* ---------- footer ---------- */
.site-footer { background: var(--brand); color: #cfe0e6; font-size: 13px; }
.footer-inner { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 24px; padding-top: 26px; padding-bottom: 26px; }
.footer-logo { color: #fff; font: 700 20px var(--sans); }
.site-footer p { margin: 6px 0 0; }
.site-footer nav ul { display: flex; flex-wrap: wrap; gap: 6px 20px; }
.site-footer a { color: #fff; }
.site-footer .copyright { text-align: right; }

/* ---------- smaller screens ---------- */
@media (max-width: 960px) {
  .page { grid-template-columns: 1fr; }
  .sidebar { order: 2; }
  .header-inner { flex-wrap: wrap; }
  .header-tools { align-items: flex-start; width: 100%; }
  .search { width: 100%; }
}
@media (max-width: 720px) {
  body { font-size: 15px; }
  .logo img { width: 220px; }
  .header-row { flex-direction: column; gap: 2px; }
  .other-langs a { margin: 0 14px 0 0; }
  .main-nav ul { flex-wrap: nowrap; overflow-x: auto; -webkit-overflow-scrolling: touch; scrollbar-width: none; }
  .main-nav li.partner { margin-left: 0; }
  .top-stories { grid-template-columns: 1fr; }
  .top-media { min-height: 0; aspect-ratio: 16 / 9; }
  .top-list li { padding: 10px 14px; }
  .cards { grid-template-columns: 1fr 1fr; }
  .sections-grid { grid-template-columns: 1fr; }
  .article-head h1 { font-size: 25px; }
  .article-body { font-size: 17px; }
  .see-also ul { grid-template-columns: 1fr; }
  .list-img { flex-basis: 120px; }
  .timeline li { grid-template-columns: 46px 1fr; }
  .timeline li a.cat { display: none; }
  .site-footer .copyright { text-align: left; }
}
@media (max-width: 460px) {
  .cards { grid-template-columns: 1fr; }
}
@media print {
  .site-header, .sidebar, .site-footer, .see-also, .article-foot { display: none; }
  .page { display: block; }
}

/* ---------- photo gallery (news_media_en) + viewer ---------- */
.gallery { margin: 28px 0 8px; }
.gallery-title { font: 700 18px/1.2 var(--sans); color: var(--brand); margin: 0 0 12px; display: flex; align-items: baseline; gap: 10px; }
.gallery-title span { font-size: 13px; font-weight: 400; color: var(--muted); }
.gallery-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); gap: 8px; }
.gallery-grid a { display: block; aspect-ratio: 4 / 3; overflow: hidden; border-radius: 4px; background: var(--soft); }
.gallery-grid img { width: 100%; height: 100%; object-fit: cover; display: block; transition: transform .25s, opacity .25s; }
.gallery-grid a:hover img { transform: scale(1.04); opacity: .92; }
.lightbox { border: 0; padding: 0; background: transparent; max-width: 100vw; max-height: 100vh; width: 100vw; height: 100vh; }
.lightbox::backdrop { background: rgba(5, 15, 20, .92); }
.lightbox[open] { display: flex; align-items: center; justify-content: center; }
.lightbox figure { margin: 0; text-align: center; }
.lightbox img { max-width: 92vw; max-height: 84vh; object-fit: contain; border-radius: 4px; box-shadow: 0 10px 40px rgba(0,0,0,.5); }
.lightbox figcaption { color: #cfd8dc; font: 13px var(--sans); margin-top: 10px; }
.lightbox button { position: fixed; border: 0; background: rgba(255,255,255,.12); color: #fff; cursor: pointer; border-radius: 50%;
  width: 48px; height: 48px; font: 32px/48px var(--sans); }
.lightbox button:hover { background: rgba(255,255,255,.25); }
.lb-close { top: 16px; right: 16px; font-size: 30px !important; }
.lb-prev { left: 16px; top: 50%; transform: translateY(-50%); }
.lb-next { right: 16px; top: 50%; transform: translateY(-50%); }
@media (max-width: 720px) { .gallery-grid { grid-template-columns: repeat(3, 1fr); gap: 4px; } .lightbox button { width: 40px; height: 40px; line-height: 40px; } }

/* ---------- search page ---------- */
.search-page-form { display: flex; gap: 0; max-width: 620px; margin: 0 0 12px; }
.search-page-form input { flex: 1; min-width: 0; height: 42px; padding: 0 14px; font: 16px var(--sans); border: 1px solid #c4ccd3; border-right: 0;
  border-radius: var(--radius) 0 0 var(--radius); }
.search-page-form input:focus { outline: none; border-color: var(--accent); }
.search-page-form button { height: 42px; padding: 0 22px; border: 0; border-radius: 0 var(--radius) var(--radius) 0; background: var(--brand); color: #fff;
  font: 500 15px var(--sans); cursor: pointer; }
.search-page-form button:hover { background: var(--brand-dark); }
.search-sort { font-size: 13px; color: var(--muted); margin: 0 0 6px; }
.search-results mark { background: #fff1a8; color: inherit; padding: 0 1px; border-radius: 2px; }
.cat-label { font-size: 12px; color: var(--accent); margin-left: 6px; }
