/* =========================================================================
   F04 HOME SECTIONS — the 12-column grid and every section, ported from the layout playground.
   Prefix ap-. Colours/fonts/spacing only from F01 variables.
   A section = <section class="ap-block ap-w-N"> (N = 12, 8, 6 or 4 columns on screens >= 900 px; full width below).
   ========================================================================= */

/* ---- the home page sheet: no white box, no page title ---- */
body.home .inside-article { padding: 0; background-color: transparent; box-shadow: none; }
body.home .entry-content { margin: 0; }

/* ---- grid ---- */
.ap-grid { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); gap: var(--ap-gap); align-items: stretch; }
.ap-block { grid-column: span 12; min-width: 0; display: flex; flex-direction: column; scroll-margin-top: calc(var(--ap-hdr-nav) + var(--ap-sp-4)); }
.ap-block > * { margin-top: 0; }
@media (min-width: 900px) {
	.ap-block.ap-w-8 { grid-column: span 8; }
	.ap-block.ap-w-6 { grid-column: span 6; }
	.ap-block.ap-w-4 { grid-column: span 4; }
}
.ap-block:has(> .ap-slot:empty) { display: none; }   /* a section whose content feature is switched off disappears */

/* ---- common parts ---- */
.ap-block :where(h2, h3, h4, p) { margin: 0; }
.ap-title { font: 700 var(--ap-fs-2xl)/1.2 var(--ap-font-head); color: var(--ap-text); display: flex; align-items: center; gap: var(--ap-sp-3); margin: 0 0 var(--ap-sp-4); }
.ap-title::before { content: ""; flex: none; width: 6px; height: 28px; border-radius: 3px; background: var(--ap-brand); }
.ap-panel { flex: 1 1 auto; min-width: 0; background: var(--ap-card); border-radius: var(--ap-radius); padding: calc(var(--ap-sp-5) + var(--ap-sp-1)); box-shadow: var(--ap-shadow-card); }
.ap-small { font-size: var(--ap-fs-s); color: var(--ap-muted); margin-top: var(--ap-sp-3); }
.ap-cat, .ap-cat a { font-size: var(--ap-fs-xs); font-weight: 800; letter-spacing: .06em; text-transform: uppercase; color: var(--ap-brand); text-decoration: none; }
.ap-cat a:hover { text-decoration: underline; color: var(--ap-brand-dark); }
.ap-date { color: var(--ap-muted); font-size: var(--ap-fs-s); }
.ap-more, .wp-block-read-more.ap-more { font-weight: 700; margin-top: var(--ap-sp-1); }
.ap-btn a.wp-block-button__link { display: inline-flex; align-items: center; justify-content: center; min-height: 48px; padding: 0 22px; border-radius: var(--ap-radius-sm);
	background: var(--ap-btn); color: var(--ap-btn-ink); font-size: calc(18px * var(--ap-scale, 1)); font-weight: 700; text-decoration: none; }
.ap-btn a.wp-block-button__link:hover { background: var(--ap-btn-hover); color: var(--ap-btn-ink); }
.ap-panel .wp-block-buttons { margin-top: var(--ap-sp-5); }

/* ---- 1. notice ---- */
.ap-notice { background: var(--ap-tint); color: var(--ap-text); text-align: center; font-size: var(--ap-fs-s); font-weight: 700; padding: 10px var(--ap-sp-4); border-radius: var(--ap-radius-sm); letter-spacing: .02em; }

/* ---- 2. alert ---- */
.ap-alert { display: flex; flex-wrap: wrap; align-items: center; gap: var(--ap-sp-3) 22px; padding: 18px var(--ap-sp-5); border-radius: var(--ap-radius); background: var(--ap-warn-o); color: var(--ap-warn-o-ink); }
.ap-alert[data-level="zuta"] { background: var(--ap-warn-y); color: var(--ap-warn-y-ink); }
.ap-alert[data-level="crvena"] { background: var(--ap-warn-r); color: var(--ap-warn-r-ink); }
.ap-alert-ico { width: 38px; height: 38px; flex: none; }
.ap-alert-main { flex: 1 1 320px; display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.ap-alert-level { font-size: var(--ap-fs-xs); font-weight: 800; letter-spacing: .08em; text-transform: uppercase; }
.ap-alert-main strong { font-size: var(--ap-fs-xl); line-height: 1.4; }
.ap-scale { display: flex; flex-wrap: wrap; gap: var(--ap-sp-2); list-style: none; margin: 0; padding: 0; font-size: var(--ap-fs-s); }
.ap-scale li { display: inline-flex; align-items: center; gap: var(--ap-sp-2); min-height: 34px; padding: 0 var(--ap-sp-3); border-radius: var(--ap-radius-pill); font-weight: 600; margin: 0; }
.ap-scale li::before { content: ""; width: 14px; height: 14px; border-radius: 50%; border: 2px solid var(--ap-white); background: var(--ap-c); }
.ap-scale .ap-y { --ap-c: var(--ap-warn-y); } .ap-scale .ap-o { --ap-c: var(--ap-warn-o); } .ap-scale .ap-r { --ap-c: var(--ap-warn-r); }
.ap-scale li.ap-on { background: var(--ap-white); color: var(--ap-ink-dark); font-weight: 800; }
.ap-alert[data-level="zuta"] .ap-scale li::before { border-color: var(--ap-ink-dark); }
.ap-alert-more, .ap-alert-more:hover { color: inherit; font-weight: 700; display: inline-flex; align-items: center; min-height: var(--ap-touch); }

/* ---- cards (Glavna vijest, Najnovije) ---- */
.wp-block-post-template { list-style: none; margin: 0; padding: 0; }
.ap-cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(270px, 1fr)); gap: var(--ap-sp-5); }
.ap-cards > li { margin: 0; }
.ap-card { position: relative; height: 100%; background: var(--ap-card); border-radius: var(--ap-radius); overflow: hidden; display: flex; flex-direction: column; box-shadow: var(--ap-shadow-card); }
.ap-card > * { margin: 0; }
.ap-card .wp-block-post-featured-image { margin: 0; }
.ap-card .wp-block-post-featured-image img { display: block; width: 100%; }
.ap-card-body { padding: var(--ap-sp-4) 22px var(--ap-sp-5); display: flex; flex-direction: column; gap: 10px; flex: 1 1 auto; }
.ap-card-body > * { margin: 0; }
.ap-card .wp-block-post-title { font: 700 var(--ap-fs-xl)/1.3 var(--ap-font-head); }
.ap-card .wp-block-post-title a { color: var(--ap-text); text-decoration: none; }
.ap-card .wp-block-post-title a:hover { text-decoration: underline; text-decoration-thickness: 2px; }
.ap-card-lead .wp-block-post-title { font-size: var(--ap-fs-2xl); }
.ap-sum, .ap-sum p { color: var(--ap-muted); font-size: calc(18px * var(--ap-scale, 1)); }
.ap-lead .ap-cards, .ap-lead .wp-block-post-template { display: block; height: 100%; }
.ap-lead { height: 100%; }
.ap-lead .wp-block-post-template > li { height: 100%; }

/* ---- 5. deadlines (list of posts) ---- */
.ap-deadlines .wp-block-post-template { display: flex; flex-direction: column; gap: var(--ap-sp-4); }
.ap-deadlines .wp-block-post-template > li { margin: 0; display: flex; flex-direction: column; gap: var(--ap-sp-1); padding-bottom: var(--ap-sp-4); border-bottom: 1px solid var(--ap-line); }
.ap-deadlines .wp-block-post-template > li:last-child { border-bottom: 0; padding-bottom: 0; }
.ap-dl-title { font: 600 18px/1.35 var(--ap-font); margin: 0; }
.ap-dl-title a { color: var(--ap-text); text-decoration: none; }
.ap-dl-title a:hover { text-decoration: underline; }

/* ---- 7. prices ---- */
.ap-example-badge { display: inline-flex; align-items: center; gap: var(--ap-sp-2); min-height: 36px; padding: 0 var(--ap-sp-4); border-radius: var(--ap-radius-pill);
	background: var(--ap-warn-y); color: var(--ap-warn-y-ink); font-size: var(--ap-fs-s); font-weight: 800; letter-spacing: .03em; }
.ap-prices { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 14px; margin-top: 18px; }
.ap-price { background: var(--ap-bg); border-radius: var(--ap-radius-sm); padding: var(--ap-sp-4) 18px; display: flex; flex-direction: column; gap: 2px; }
.ap-p-name { font-weight: 700; font-size: calc(18px * var(--ap-scale, 1)); line-height: 1.3; }
.ap-p-val { font: 700 var(--ap-fs-2xl)/1.2 var(--ap-font-head); color: var(--ap-text); }
.ap-p-val span { font: 600 var(--ap-fs-m) var(--ap-font); color: var(--ap-muted); margin-left: var(--ap-sp-1); }
.ap-p-chg { font-weight: 800; font-size: var(--ap-fs-m); }
.ap-p-chg.ap-up { color: var(--ap-up); } .ap-p-chg.ap-down { color: var(--ap-down); } .ap-p-chg.ap-flat { color: var(--ap-flat); }
.ap-p-wk { font-size: var(--ap-fs-s); color: var(--ap-muted); }

/* ---- 8. guides ---- */
.ap-guides { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: var(--ap-sp-4); }
.ap-guide { background: var(--ap-bg); border-radius: var(--ap-radius-sm); padding: 18px; display: flex; flex-direction: column; gap: 10px; }
.ap-guide h3 { font: 700 21px/1.3 var(--ap-font-head); }
.ap-guide h3 a { color: var(--ap-text); text-decoration: none; }
.ap-guide h3 a:hover { text-decoration: underline; }
.ap-guide p { font-size: var(--ap-fs-m); }
.ap-facts { background: var(--ap-card); border-radius: var(--ap-radius-sm); padding: var(--ap-sp-3) 14px; }
.ap-facts h4 { font: 800 var(--ap-fs-xs)/1.3 var(--ap-font); letter-spacing: .06em; text-transform: uppercase; color: var(--ap-brand); margin-bottom: var(--ap-sp-1); }
.ap-facts ul { list-style: none; margin: 0; padding: 0; font-size: var(--ap-fs-s); line-height: 1.5; }
.ap-facts li + li { margin-top: 3px; }
.ap-upd { font-size: calc(15.5px * var(--ap-scale, 1)); color: var(--ap-muted); }

/* ---- 9. questions ---- */
.ap-qa { display: flex; flex-direction: column; gap: 10px; }
.ap-qa .wp-block-details { background: var(--ap-bg); border-radius: var(--ap-radius-sm); margin: 0; }
.ap-qa .wp-block-details summary { list-style: none; display: flex; align-items: center; justify-content: space-between; gap: var(--ap-sp-3); min-height: 56px; padding: 10px 18px;
	font-weight: 700; cursor: pointer; border-radius: var(--ap-radius-sm); }
.ap-qa .wp-block-details summary::-webkit-details-marker { display: none; }
.ap-qa .wp-block-details summary::after { content: "+"; flex: none; width: 32px; height: 32px; display: grid; place-items: center; border-radius: 50%;
	background: var(--ap-tint); color: var(--ap-brand-dark); font-size: var(--ap-fs-xl); line-height: 1; font-weight: 700; }
.ap-qa .wp-block-details[open] summary::after { content: "−"; }
.ap-qa .wp-block-details > :not(summary) { padding: 2px 18px 18px; margin: 0; }

/* ---- 10. newsletter ---- */
.ap-nl { background: var(--ap-brand); color: var(--ap-on-brand); display: flex; flex-direction: column; justify-content: center; }
.ap-nl .ap-nl-big { font: 700 28px/1.25 var(--ap-font-head); margin-bottom: var(--ap-sp-3); }
.ap-nl p { margin-bottom: 14px; }
.ap-nl label { display: block; font-weight: 700; margin-bottom: 6px; }
.ap-nl-row { display: flex; flex-wrap: wrap; gap: 10px; }
.ap-nl input[type="email"] { flex: 1 1 220px; min-width: 0; min-height: 52px; padding: 0 var(--ap-sp-4); border: 2px solid transparent; border-radius: var(--ap-radius-sm);
	background: var(--ap-white); color: var(--ap-ink-dark); font-size: var(--ap-fs-l); }
.ap-nl input[type="email"]::placeholder { color: var(--ap-flat); opacity: 1; }
.ap-nl input[type="email"]:focus-visible, .ap-nl .ap-btn-light:focus-visible { outline: 3px solid var(--ap-warn-y); outline-offset: 2px; }
.ap-nl .ap-btn-light { min-height: 52px; padding: 0 var(--ap-sp-5); border: 0; border-radius: var(--ap-radius-sm); background: var(--ap-white); color: var(--ap-brand-dark); font-size: calc(18px * var(--ap-scale, 1)); font-weight: 800; }
.ap-nl .ap-btn-light:disabled { opacity: .85; cursor: not-allowed; }
.ap-nl .ap-nl-note { margin: var(--ap-sp-3) 0 0; font-weight: 700; }

/* ---- 11. footer section ---- */
.ap-foot { background: var(--ap-brand-dark); color: var(--ap-white); border-radius: var(--ap-radius); padding: var(--ap-sp-6) 28px 22px; }
.ap-foot-cols { display: grid; grid-template-columns: 2fr 1fr 1fr 1fr; gap: 28px; }
.ap-foot h3 { font: 700 20px/1.3 var(--ap-font-head); color: var(--ap-white); margin-bottom: var(--ap-sp-2); }
.ap-foot ul { list-style: none; margin: 0; padding: 0; }
.ap-foot li { margin: 0; }
.ap-foot a, .ap-foot a:hover { color: var(--ap-white); display: inline-flex; align-items: center; min-height: var(--ap-touch); }
.ap-foot a:hover { text-decoration-thickness: 2px; }
.ap-foot :focus-visible { outline-color: var(--ap-warn-y); }
.ap-foot p { font-size: var(--ap-fs-m); }
.ap-foot .ap-foot-bottom { margin-top: 18px; padding-top: 14px; border-top: 1px solid var(--ap-line-on-dark); font-size: var(--ap-fs-s); }
@media (max-width: 899px) {
	.ap-foot-cols { grid-template-columns: 1fr 1fr; }
	.ap-foot-cols > :first-child { grid-column: 1 / -1; }
	.ap-panel { padding: 20px; }
	.ap-card-lead .wp-block-post-title { font-size: calc(25px * var(--ap-scale, 1)); }
}

/* ---- GeneratePress' footer bar: our copyright line ---- */
.site-info { background-color: transparent; color: var(--ap-muted); text-align: center; font-size: var(--ap-fs-s); }
.site-info a { color: var(--ap-link); }

/* headline + one-line tagline at the top of the home page: what the portal is FOR (his order 27.10.) */
.ap-hero { padding: var(--ap-sp-3) 0 0; }
/* his order 27.10.: on wide screens the headline's top lines up with the top of the video box beside it */
@media (min-width: 900px) { .ap-hero { align-self: start; padding-top: 0; } .ap-hero .ap-hero-title { margin-top: 0; } }
.ap-hero-title { margin: 0 0 var(--ap-sp-2); font: 700 var(--ap-h1)/1.15 var(--ap-font-head); color: var(--ap-brand-dark); text-wrap: balance; }
.ap-hero-sub { margin: 0; max-width: 46em; font-size: var(--ap-fs-xl); line-height: 1.4; color: var(--ap-text); text-wrap: pretty; }
