/* ============================================================
   AllMedia.ge — Enhancement layer (loaded last, additive)
   Editorial typography (Noto Serif Georgian + FiraGO) + polish
   ============================================================ */

:root{
	/* All type = BRAND (Helvetica Neue LT GEO), mirroring complexy.ge */
	--font-sans:'BRAND','Noto Sans Georgian',ui-sans-serif,system-ui,sans-serif;
	--font-serif:'BRAND','Noto Sans Georgian',ui-sans-serif,system-ui,sans-serif;
	--ink:#16233d;
}

/* Replace FiraGO/Noto Serif everywhere with the brand font. */
body{
	font-family:var(--font-sans);
	font-size:15.5px;text-rendering:optimizeLegibility;
}
h1,h2,h3,h4,h5,h6,
button,input,select,textarea,
.am-logo,.am-btn,.am-nav__menu a,.am-topbar,.am-card__title,
.am-hero__title,.am-single__title,.am-section-title,.am-archive__title,.am-page__title{
	font-family:var(--font-sans);
}
/* Heavier display weight, like complexy's Black/Heavy headlines */
.am-hero__title,.am-single__title,.am-archive__title,.am-page__title,.am-empty h1{font-weight:800}

/* ---- Editorial serif voice for display + headlines ---- */
.am-hero__title,
.am-single__title,
.am-single__body h2,
.am-single__body h3,
.am-section-title,
.am-archive__title,
.am-page__title,
.am-empty h1,
.am-single__body blockquote{
	font-family:var(--font-serif);
	letter-spacing:-.012em;
}
.am-section-title{font-weight:700;font-size:19px}
.am-section-title:before{height:20px}

/* =========================================================
   SINGLE ARTICLE — readability & editorial layout
   ========================================================= */
.am-single{padding:28px 0 48px}
.am-single__main{padding:40px 46px}
@media (max-width:780px){ .am-single__main{padding:22px 20px} }

.am-single__head{border-bottom:1px solid var(--border-light);padding-bottom:22px;margin-bottom:6px}
.am-single__title{
	font-size:38px;line-height:1.22;font-weight:700;
	margin:14px 0 16px;color:var(--navy);
}
@media (max-width:780px){ .am-single__title{font-size:26px} }

.am-single__meta{gap:9px;font-size:13.5px;color:var(--text-muted)}
.am-badge--solid{box-shadow:0 4px 12px rgba(0,87,217,.22)}

.am-single__cover{margin:26px 0 6px;box-shadow:var(--shadow)}

/* Reading column */
.am-single__body{
	font-family:var(--font-sans);
	font-size:18px;line-height:1.85;color:var(--ink);
	max-width:748px;
}
.am-single__body p{margin:0 0 1.15em}
/* Lead paragraph */
.am-single__body > p:first-of-type{
	font-size:20px;line-height:1.7;color:var(--text-dark);font-weight:500;
}
.am-single__body h2{font-size:26px;margin:1.6em 0 .5em;line-height:1.3;color:var(--navy)}
.am-single__body h3{font-size:21px;margin:1.35em 0 .4em;color:var(--navy)}
.am-single__body a{
	color:var(--primary-blue);text-decoration:underline;
	text-underline-offset:3px;text-decoration-thickness:1px;
	text-decoration-color:rgba(0,87,217,.4);
}
.am-single__body a:hover{text-decoration-color:var(--primary-blue)}
.am-single__body img{border-radius:var(--radius);margin:1.4em 0;box-shadow:var(--shadow-sm)}
.am-single__body figure{margin:1.5em 0}
.am-single__body figcaption{font-size:13px;color:var(--text-muted);text-align:center;margin-top:8px}
.am-single__body ul,.am-single__body ol{margin:0 0 1.2em;padding-left:1.4em;list-style:revert}
.am-single__body li{margin:.35em 0}
.am-single__body blockquote{
	font-size:20px;line-height:1.55;font-style:normal;
	border-left-width:4px;padding:16px 22px;margin:1.4em 0;
}

/* Source attribution — a proper "read on source" card */
.am-single__source-link{
	margin:34px 0 6px;max-width:748px;text-align:left;
	background:var(--gradient-sky);border:1px solid var(--border-light);
	border-radius:var(--radius-lg);padding:20px 22px;
	display:flex;align-items:center;justify-content:space-between;gap:14px;flex-wrap:wrap;
	position:relative;
}
.am-single__source-link:before{
	content:"წყარო";position:absolute;top:-10px;left:20px;
	background:var(--primary-blue);color:#fff;font-size:10px;font-weight:700;
	letter-spacing:.09em;text-transform:uppercase;padding:3px 11px;border-radius:999px;
}
.am-single__source-link .am-btn{margin:0}

/* Share + related */
.am-single__share{gap:8px;padding-top:22px}
.am-single__share .am-btn--ghost{border-radius:999px;padding:8px 16px}
.am-related .am-section-title{margin-bottom:16px}

/* Sidebar sticks alongside long articles */
@media (min-width:1101px){
	.am-single__layout > .am-sidebar{position:sticky;top:92px;align-self:start}
}

/* =========================================================
   HOME — hero + rhythm
   ========================================================= */
.am-hero__title{font-size:34px;line-height:1.18}
.am-hero__card,.am-edit-card{border-radius:var(--radius-xl)}

/* "most read" repurposed section: hide play glyph on non-video cards */
.am-morefeed .am-video-card__media .am-play{display:none}
.am-morefeed .am-video-card__media:after{
	content:"";position:absolute;inset:0;
	background:linear-gradient(180deg,rgba(7,30,65,0) 45%,rgba(7,30,65,.78) 100%);
}
.am-morefeed .am-video-card__media .am-badge--on-image{z-index:2}

/* Section vertical rhythm */
.am-cat-grid{padding:26px 0}
.am-video-section{padding:34px 0}

/* =========================================================
   Subtle, tasteful page-load reveal (hero only)
   ========================================================= */
@media (prefers-reduced-motion:no-preference){
	.am-hero__featured{animation:am-rise .55s both}
	.am-hero__editorial{animation:am-rise .55s .07s both}
	.am-hero__latest{animation:am-rise .55s .14s both}
	@keyframes am-rise{from{opacity:0;transform:translateY(12px)}to{opacity:1;transform:none}}
}

/* Focus visibility (a11y) */
a:focus-visible,button:focus-visible,input:focus-visible{
	outline:2px solid var(--primary-blue);outline-offset:2px;border-radius:6px;
}

/* =========================================================
   HOME — titles only, calmer sizes, clamp long titles (≤ 4 lines, then …)
   ========================================================= */
/* Drop the long hero body text — on the home page titles carry the page. */
.am-hero__excerpt{display:none}
.am-hero__inner{padding:24px 28px}

/* Calmer headline sizes */
.am-hero__title{font-size:26px;line-height:1.24;margin:8px 0 8px}
.am-edit-card__title{font-size:15px;line-height:1.32;margin:6px 0 6px}
.am-cat-block .am-card .am-card__title{font-size:14.5px;line-height:1.35}
.am-video-card__body h3{font-size:14px;line-height:1.35}

/* Line-clamp: never exceed the set number of lines; overflow → “…” */
.am-hero__title,
.am-edit-card__title,
.am-card__title,
.am-video-card__body h3,
.am-timeline a,
.am-list__title{
	display:-webkit-box;-webkit-box-orient:vertical;overflow:hidden;text-overflow:ellipsis;
}
.am-hero__title{-webkit-line-clamp:3;line-clamp:3}
.am-edit-card__title{-webkit-line-clamp:3;line-clamp:3}
.am-card__title{-webkit-line-clamp:3;line-clamp:3}
.am-video-card__body h3{-webkit-line-clamp:2;line-clamp:2}
.am-timeline a{-webkit-line-clamp:2;line-clamp:2}
/* list items: keep the time inline, clamp the title to 2 lines */
.am-list__item .am-list__body{min-width:0}
.am-list__title{-webkit-line-clamp:2;line-clamp:2}

/* =========================================================
   TYPE — make the solid brand font read confident & even
   ========================================================= */
html{font-synthesis-weight:none}
body{font-weight:400;letter-spacing:.002em}
.am-nav__menu>li>a{font-weight:600}
.am-section-title{font-weight:800;letter-spacing:-.01em}
.am-card__title,.am-edit-card__title,.am-video-card__body h3{font-weight:700}
.am-hero__title{font-weight:800}
.am-single__body{letter-spacing:.001em}

/* =========================================================
   SIDEBAR default widgets — ბოლო ჩანაწერები / არქივები / კატეგორიები / ძებნა
   (they already carry .card; here we beautify the inner content)
   ========================================================= */
.am-sidebar .widget{padding:18px 18px 14px}
.am-sidebar .widget + .widget{margin-top:var(--gap)}
.am-sidebar .widget .wp-block-heading,
.am-sidebar .widget .widget-title{
	font-family:var(--font-sans);font-size:16px;font-weight:800;color:var(--navy);
	margin:0 0 14px;padding-left:14px;position:relative;line-height:1.25;
}
.am-sidebar .widget .wp-block-heading:before,
.am-sidebar .widget .widget-title:before{
	content:"";position:absolute;left:0;top:50%;transform:translateY(-50%);
	width:4px;height:18px;border-radius:2px;background:var(--gradient-blue);
}
.am-sidebar .widget ul{list-style:none;margin:0;padding:0}
.am-sidebar .wp-block-latest-posts__list li,
.am-sidebar .wp-block-categories li,
.am-sidebar .wp-block-archives li{
	padding:9px 0;border-bottom:1px dashed var(--border-light);font-size:14px;line-height:1.42;
}
.am-sidebar .widget li:last-child{border-bottom:0}
.am-sidebar .widget li a{color:var(--text-dark);font-weight:600}
.am-sidebar .widget li a:hover{color:var(--primary-blue)}
.am-sidebar .wp-block-latest-posts__post-date{
	display:block;font-size:11.5px;color:var(--text-muted);margin-top:3px;font-weight:600;
}
.am-sidebar .wp-block-latest-posts__featured-image{margin-bottom:8px}
.am-sidebar .wp-block-latest-posts__featured-image img{border-radius:10px;width:100%;object-fit:cover}
.am-sidebar .wp-block-categories li,
.am-sidebar .wp-block-archives li{display:flex;justify-content:space-between;gap:8px}
/* Search */
.am-sidebar .wp-block-search__inside-wrapper{
	display:flex;gap:6px;border:1px solid var(--border-light);border-radius:12px;
	background:var(--light-blue);padding:5px;overflow:hidden;
}
.am-sidebar .wp-block-search__input{flex:1;border:0;background:transparent;padding:8px 10px;font-family:inherit;color:var(--text-dark);outline:0}
.am-sidebar .wp-block-search__button{
	background:var(--gradient-blue);color:#fff;border:0;margin:0;border-radius:9px;padding:8px 16px;font-weight:600;font-family:inherit;
}
.am-sidebar .wp-block-search__label{font-weight:800;color:var(--navy);margin-bottom:8px;display:block}
/* Recent Comments widget is pointless now (comments disabled) — hide it */
.am-sidebar .widget:has(.wp-block-latest-comments){display:none}

/* =========================================================
   HOME category grids — fill the row regardless of how many
   populated blocks there are (empty categories are skipped in PHP)
   ========================================================= */
.am-cat-grid__inner{grid-template-columns:repeat(auto-fit,minmax(260px,1fr))}
@media (max-width:560px){ .am-cat-grid__inner{grid-template-columns:1fr} }

/* =========================================================
   on.ge FONT SYSTEM  (overrides earlier rules; loaded last)
   menu + titles = DejaVu Sans M · body = BPG Rioni
   ========================================================= */
:root{
	--font-body:'BPG Rioni','DejaVuSansM','DejaVu Sans',Sylfaen,'Noto Sans Georgian',Arial,sans-serif;
	--font-head:'DejaVuSansM','DejaVu Sans','BPG Rioni',Sylfaen,'Noto Sans Georgian',Arial,sans-serif;
}
html{font-synthesis-weight:auto}
body{font-family:var(--font-body)}
.am-single__body,.am-card__excerpt,.am-hero__excerpt,input,select,textarea,p{font-family:var(--font-body)}
/* MENU → DejaVu Sans M (on.ge menu font) */
.am-nav__menu,.am-nav__menu>li>a,.am-topbar__menu,.am-topbar__menu>li>a{font-family:var(--font-head)}
/* TITLES / HEADINGS → DejaVu Sans M (on.ge title font) */
h1,h2,h3,h4,h5,h6,
.am-logo,.am-btn,
.am-section-title,.am-hero__title,.am-single__title,.am-archive__title,.am-page__title,
.am-card__title,.am-edit-card__title,.am-video-card__body h3,.am-list__title,.am-timeline a,
.am-single__body h2,.am-single__body h3,
.am-sidebar .widget .wp-block-heading,.am-sidebar .widget .widget-title,
.am-breaking__badge,.am-badge{font-family:var(--font-head)}

/* =========================================================
   HERO PHOTO SLIDER
   ========================================================= */
.am-hero__featured.am-slider{position:relative;height:100%;min-height:520px;padding:0;border:0;box-shadow:none;background:transparent}
.am-slider__viewport{position:relative;width:100%;height:100%;min-height:520px;border-radius:var(--radius-xl);overflow:hidden;box-shadow:var(--shadow)}
.am-slide{position:absolute;inset:0;min-height:520px;opacity:0;visibility:hidden;transition:opacity .6s ease;transform:none}
.am-slide.is-active{opacity:1;visibility:visible;z-index:1}
.am-slider:hover .am-slide.is-active{transform:none}
.am-slider__arrow{
	position:absolute;top:50%;transform:translateY(-50%);z-index:3;
	width:42px;height:42px;border-radius:50%;background:rgba(255,255,255,.85);color:var(--navy);
	display:flex;align-items:center;justify-content:center;box-shadow:var(--shadow);
	opacity:0;transition:opacity .25s,background .2s,color .2s;cursor:pointer;
}
.am-slider:hover .am-slider__arrow{opacity:1}
.am-slider__arrow--prev{left:14px}
.am-slider__arrow--next{right:14px}
.am-slider__arrow:hover{background:#fff;color:var(--primary-blue)}
.am-slider__dots{position:absolute;left:0;right:0;bottom:16px;z-index:4;display:flex;gap:8px;justify-content:center}
.am-slider__dot{width:9px;height:9px;padding:0;border:0;border-radius:50%;background:rgba(255,255,255,.55);cursor:pointer;transition:width .25s,background .25s}
.am-slider__dot.is-active{background:#fff;width:26px;border-radius:6px}
@media (max-width:1100px){ .am-hero__featured.am-slider,.am-slider__viewport,.am-slide{min-height:420px} }
@media (max-width:780px){ .am-hero__featured.am-slider,.am-slider__viewport,.am-slide{min-height:320px} .am-slider__arrow{opacity:1} }

/* =========================================================
   LATEST NEWS (20 on home)
   ========================================================= */
.am-latest{padding:28px 0 6px}
.am-latest__grid{margin-top:4px}
@media (max-width:1100px){ .am-latest__grid.am-grid--4{grid-template-columns:repeat(3,minmax(0,1fr))} }
@media (max-width:820px){ .am-latest__grid.am-grid--4{grid-template-columns:repeat(2,minmax(0,1fr))} }
@media (max-width:520px){ .am-latest__grid.am-grid--4{grid-template-columns:1fr} }
