/*
Theme Name: Rastimo Redesign
Theme URI: https://rastimouvjeri.com
Description: Child theme of Pennews implementing the Rastimo u vjeri redesign (wine/navy editorial layout).
Author: Anos Media - Obrt za digitalni marketing
Author URI: https://anosmedia.hr
Template: pennews
Version: 1.11.1
Text Domain: rastimo-redesign
*/

/* ==========================================================================
   All rules below are scoped to override Pennews defaults for this design.
   Google Fonts (Roboto / Roboto Condensed) are enqueued in functions.php,
   not @imported here, for performance.
   ========================================================================== */


  :root{
    --page:#E9EDF2;
    --paper:#FFFFFF;
    --ink:#1E1E22;
    --ink-soft:#6A6C74;
    --red:#C81E2A;
    --red-deep:#9E141E;
    --navy:#1B3A63;
    --navy-deep:#122946;
    --gold:#B08A2E;
    --line:#E2E4E9;
    --card:#FFFFFF;
  }
  /* ---------- Dark mode ----------
     Toggled via .dark-mode on <html> — see the inline script in
     header.php (sets the initial state before paint) and
     js/theme-toggle.js (handles the click + saves the choice).
     Almost the entire site is already built on these variables
     (backgrounds, text, borders all read var(--page)/var(--paper)/
     var(--ink)/var(--ink-soft)/var(--line)/var(--card) rather than
     hardcoded colors), so redefining just these seven here is enough
     to re-skin nearly every section automatically. --red/--red-deep/
     --navy/--navy-deep/--gold are deliberately left unchanged: the
     navy header/footer bands are already dark and read fine as-is,
     and the red/gold accents still have enough contrast against the
     new dark surfaces below. A handful of spots that hardcode #fff
     instead of using a variable (because they always sit on a photo
     or on the always-dark navy bands, regardless of site-wide mode)
     are intentionally NOT touched here — see style.css comments near
     .hero-dot, .hero-main, .friend-box .btn-white. */
  html.dark-mode{
    --page:#15171B;
    --paper:#1E2127;
    --ink:#ECEDEF;
    --ink-soft:#9CA0AC;
    --line:#2C2F37;
    --card:#1E2127;
  }
  html.dark-mode .header-search-form input{background:var(--paper);color:var(--ink);}
  body,.site-shell,header.ruv-header,.vijesti-main,.vijesti-sidebar,.tile,.col-block,
  .tcf-block,.tcf-tile,.prop-tile,.slide-card,.ruv-pagination .page-numbers{
    transition:background-color .25s ease,color .25s ease,border-color .25s ease;
  }
  *{box-sizing:border-box;}
  html,body{margin:0;padding:0;}
  body{background:var(--page);color:var(--ink);font-family:'Roboto', sans-serif;-webkit-font-smoothing:antialiased;line-height:1.5;}
  a{color:inherit;text-decoration:none;}
  img,svg{display:block;max-width:100%;}
  .ruv-wrap{max-width:1240px;margin:0 auto;padding:0 48px;}
  .site-shell{max-width:1520px;margin:0 auto;background:var(--paper);box-shadow:0 0 0 1px var(--line);}
  @media (max-width:1300px){ .ruv-wrap{padding:0 36px;} }
  @media (max-width:600px){ .ruv-wrap{padding:0 20px;} }
  h1,h2,h3,h4{font-family:'Roboto Condensed', sans-serif;margin:0;font-weight:700;letter-spacing:-0.005em;}
  .rubric{display:block;font-size:11.5px;font-weight:700;letter-spacing:0.04em;text-transform:uppercase;color:var(--ink-soft);margin-bottom:6px;font-family:'Roboto',sans-serif;}
  /* !important: the rubric's category name is itself a link, and
     Pennews' own parent-theme CSS carries anchor color rules that can
     otherwise win here depending on load order — pin it white so the
     category label is always legible over the dark hero photo. */
  .rubric.on-photo, .rubric.on-photo a{color:#fff !important;}
  /* Default 4:3 shape so ANY .thumb — even one used somewhere without a
     more specific aspect-ratio override — always holds its size, whether
     it's showing a real photo or the gradient placeholder. Every specific
     card type below (hero, tile, related-card, etc.) overrides this with
     its own ratio via higher selector specificity; this is just the floor. */
  /* Placeholder icon (mountain/sun) sits behind any real <img> — a real
     photo is a child element and paints on top, automatically hiding
     this the moment ruv_safe_thumbnail() has a working image to show.
     If it's missing/broken, this renders instead of a blank box, so
     every card keeps a uniform, deliberate look regardless of media
     migration state. */
  .thumb{
    width:100%;aspect-ratio:4/3;position:relative;overflow:hidden;
    background:
      url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 64 64' fill='none'%3E%3Ccircle cx='21' cy='21' r='6' stroke='white' stroke-opacity='0.4' stroke-width='2.5'/%3E%3Cpath d='M6 46 L23 29 L33 39 L43 27 L58 46' stroke='white' stroke-opacity='0.4' stroke-width='2.5' fill='none' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center/42px 42px no-repeat,
      linear-gradient(135deg,var(--navy) 0%,var(--red) 100%);
  }
  .thumb img{width:100%;height:100%;object-fit:cover;display:block;}

  .thumb svg{position:absolute;inset:0;width:100%;height:100%;}

  /* ---------- Utility bar ---------- */
  .utility-bar{background:var(--navy-deep);color:#DCE4EF;font-size:12px;}
  .utility-bar .ruv-wrap{display:flex;justify-content:space-between;align-items:center;height:34px;}
  .utility-bar .tagline{font-weight:600;letter-spacing:0.02em;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;margin-right:16px;}
  .utility-bar .date{opacity:0.75;letter-spacing:0.02em;}
  .utility-bar .utility-socials{display:flex;align-items:center;gap:12px;flex-shrink:0;}
  .utility-bar .utility-socials svg{display:block;width:13px;height:13px;color:#DCE4EF;opacity:0.8;}
  .utility-bar .utility-socials a:hover svg{opacity:1;color:#fff;}

  /* ---------- Header ---------- */
  header.ruv-header{background:var(--paper) !important;border-bottom:1px solid var(--line);}
  .header-inner{display:flex;align-items:center;justify-content:space-between;padding:16px 0;gap:20px;}
  .logo{display:flex;align-items:center;gap:11px;}
  .logo-mark{width:38px;height:38px;flex:none;}
  .logo-text{font-family:'Roboto Condensed',sans-serif;font-size:29px;font-weight:700;color:var(--ink);line-height:1.05;}
  .logo-text span{display:block;font-family:'Public Sans',sans-serif;font-size:11px;font-weight:700;letter-spacing:0.12em;text-transform:uppercase;color:var(--gold);margin-top:4px;}
  .header-icons{display:flex;align-items:center;gap:18px;}
  .header-icons svg{width:18px;height:18px;color:var(--ink-soft);cursor:pointer;}
  .hamburger-btn{display:none;background:none;border:none;padding:0;cursor:pointer;}
  .hamburger-btn svg{width:22px;height:22px;color:var(--ink);}
  .search-toggle{background:none;border:none;padding:0;cursor:pointer;line-height:0;}
  .search-toggle.is-active svg{color:var(--red);}

  /* ---------- Dark/light switch ---------- */
  .theme-toggle{background:none;border:none;padding:0;cursor:pointer;position:relative;width:18px;height:18px;flex:none;}
  .theme-toggle svg{position:absolute;inset:0;width:18px;height:18px;color:var(--ink-soft);transition:opacity .2s ease,transform .3s ease;}
  .theme-toggle .icon-moon{opacity:0;transform:rotate(-70deg) scale(.5);}
  .theme-toggle .icon-sun{opacity:1;transform:rotate(0) scale(1);}
  html.dark-mode .theme-toggle .icon-sun{opacity:0;transform:rotate(70deg) scale(.5);}
  html.dark-mode .theme-toggle .icon-moon{opacity:1;transform:rotate(0) scale(1);color:var(--gold);}

  /* Slide-down search bar, toggled by #searchToggle in mobile-nav.js.
     Hidden via max-height (not display:none) so the collapse/expand
     can animate instead of snapping. */
  .header-search{max-height:0;overflow:hidden;background:var(--page);border-bottom:0 solid var(--line);transition:max-height 0.25s ease;}
  .header-search.is-open{max-height:90px;border-bottom-width:1px;}
  .header-search .ruv-wrap{padding-top:14px;padding-bottom:14px;}
  .header-search-form{display:flex;max-width:480px;}
  .header-search-form input{flex:1;border:1px solid var(--line);border-right:none;background:#fff;padding:11px 14px;font-size:14px;color:var(--ink);}
  .header-search-form input:focus{outline:none;border-color:var(--navy);}
  .header-search-form button{background:var(--red);border:none;color:#fff;padding:0 16px;cursor:pointer;display:flex;align-items:center;justify-content:center;}
  .header-search-form button svg{width:16px;height:16px;}

  .main-nav{background:var(--navy);}
  .main-nav{background:var(--navy);position:relative;z-index:40;}
  .nav-inner{display:flex !important;overflow-x:visible;}
  /* !important below: Pennews (the parent theme) ships its own CSS for
     generic `.menu` / `.menu-item` nav markup — the exact class names
     WordPress's wp_nav_menu() outputs by default. Without forcing these,
     the parent stylesheet (enqueued first, but sometimes with matching
     or higher specificity) can silently win and the menu renders as a
     plain stacked list instead of the intended horizontal bar. */
  .nav-inner .menu{display:flex !important;flex-direction:row !important;flex-wrap:nowrap !important;list-style:none !important;margin:0 !important;padding:0 !important;width:100%;}
  .nav-inner .menu-item{position:relative !important;display:block !important;float:none !important;width:auto !important;}
  .nav-inner, .nav-inner *{box-sizing:border-box !important;}
  .nav-inner .menu-item>a{
    display:block !important;padding:15px 22px !important;font-size:14px !important;
    line-height:1.3 !important;font-weight:700;letter-spacing:0.03em;text-transform:uppercase;
    color:#D7E0EC;white-space:nowrap;border-bottom:2px solid transparent;
  }
  .nav-inner .menu-item>a:hover, .nav-inner .menu-item>a.active{color:#fff;border-bottom-color:var(--red);background:rgba(255,255,255,0.04);}
  .nav-inner .menu-item.current-menu-item>a, .nav-inner .menu-item.current-menu-ancestor>a{color:#fff;border-bottom-color:var(--red);background:rgba(255,255,255,0.04);}
  .nav-inner .has-children>a::after, .nav-inner .menu-item-has-children>a::after{content:"";display:inline-block;margin-left:6px;width:6px;height:6px;border-right:1.5px solid currentColor;border-bottom:1.5px solid currentColor;transform:rotate(45deg);vertical-align:2px;opacity:0.7;}
  /* .submenu-toggle only exists for mobile's tap-to-expand accordion
     (see @media(max-width:820px) below) — desktop keeps the existing
     hover-to-open behavior and never shows this button at all. */
  .submenu-toggle{display:none;}
  /* !important below: same Pennews-collision reason as the flex rules
     above — the parent theme's own dropdown CSS also targets plain
     `.sub-menu`/`ul.sub-menu` (WordPress's default nav-menu child-list
     class) and can carry a `display:none !important` of its own on
     hover states, silently keeping ours from ever showing. */
  .nav-inner .sub-menu{display:none !important;position:absolute !important;top:100% !important;left:0 !important;min-width:230px;background:var(--navy-deep);box-shadow:0 10px 24px rgba(0,0,0,0.28);z-index:60;list-style:none !important;margin:0 !important;padding:6px 0 !important;}
  .nav-inner .has-children:hover>.sub-menu, .nav-inner .menu-item-has-children:hover>.sub-menu,
  .nav-inner .has-children:focus-within>.sub-menu, .nav-inner .menu-item-has-children:focus-within>.sub-menu{display:block !important;}
  .nav-inner .sub-menu li a{display:block;padding:10px 18px;font-size:12.5px;font-weight:600;letter-spacing:0.01em;text-transform:none;color:#D7E0EC;white-space:nowrap;}
  .nav-inner .sub-menu li a:hover{background:rgba(255,255,255,0.08);color:#fff;}

  /* ---------- Mobile dropdown nav ---------- */
  @media (max-width:820px){
    .hamburger-btn{display:block;}
    .main-nav{
      max-height:0;
      overflow:hidden;
      transition:max-height 0.3s ease;
    }
    .main-nav.open{max-height:80vh;overflow-y:auto;}
    .main-nav .ruv-wrap{padding:0;}
    .nav-inner{overflow-x:visible;}
    .nav-inner .menu{flex-direction:column !important;}
    .nav-inner .menu-item>a{
      padding:14px 20px;
      border-bottom:1px solid rgba(255,255,255,0.1);
      border-left:3px solid transparent;
    }
    .nav-inner .menu-item>a:hover, .nav-inner .menu-item>a.active{
      border-bottom-color:rgba(255,255,255,0.1);
      border-left-color:var(--red);
      background:rgba(255,255,255,0.06);
    }
    /* Collapsed by default on mobile — no hover on touch, so a
       dedicated .submenu-toggle button (mobile-nav.js) opens/closes
       it instead of it always being expanded. !important to win over
       the desktop rule's own !important. */
    .nav-inner .has-children{display:flex !important;flex-wrap:wrap !important;position:relative !important;}
    .nav-inner .has-children>a{flex:1 1 auto;}
    .nav-inner .sub-menu{
      display:none !important;position:static !important;box-shadow:none;
      background:rgba(0,0,0,0.18);padding:0 !important;width:100%;
      flex-basis:100%;order:3;
    }
    .nav-inner .has-children.submenu-open>.sub-menu{display:block !important;}
    .nav-inner .sub-menu li a{
      padding:11px 20px 11px 34px;
      border-bottom:1px solid rgba(255,255,255,0.06);
      font-size:12px;color:#C3CEDD;
    }
    .submenu-toggle{
      display:flex;align-items:center;justify-content:center;
      flex:0 0 50px;width:50px;align-self:stretch;
      background:none;border:none;border-bottom:1px solid rgba(255,255,255,0.1);
      color:#D7E0EC;cursor:pointer;order:2;
    }
    .submenu-toggle svg{width:16px;height:16px;transition:transform 0.2s ease;}
    .has-children.submenu-open>.submenu-toggle svg{transform:rotate(180deg);}
    /* The ::after arrow next to the label is desktop-only visual sugar
       (hover cue) — .submenu-toggle's own chevron replaces it on mobile. */
    .nav-inner .has-children>a::after, .nav-inner .menu-item-has-children>a::after{display:none;}
  }

  /* ---------- Hero ---------- */
  .hero{padding:26px 0 0;}
  /* Wider than the standard 1240px .ruv-wrap used everywhere else, so
     the 1-large + 6-small hero nearly fills the white .site-shell
     (1520px) instead of leaving big empty margins on large screens.
     Selector specificity (.hero .ruv-wrap) beats the base .ruv-wrap
     rule without needing !important; every section below the hero is
     untouched and stays at the normal 1240px width. */
  .hero .ruv-wrap{max-width:1500px;padding:0 20px;}
  /* All slides share one CSS grid cell (grid-area:1/1), so the stack's
     height always matches the tallest slide and swapping the active
     one never causes a layout jump — no JS height math needed. See
     js/hero-slider.js for the crossfade/autoplay logic that toggles
     .is-active between them. */
  .hero-slides{display:grid;}
  .hero-slide{grid-area:1/1;opacity:0;transition:opacity 0.6s ease;pointer-events:none;}
  .hero-slide.is-active{opacity:1;pointer-events:auto;}
  /* Duplicated into every slide's caption (only the active one is ever
     visible) rather than positioned as one shared overlay, so it stays
     anchored to that slide's own image/caption without extra JS to
     reposition a single shared element. */
  .hero-dots{display:flex;gap:6px;margin-top:14px;}
  .hero-dot{width:8px;height:8px;padding:0;border:none;border-radius:50%;background:rgba(255,255,255,0.4);cursor:pointer;transition:background 0.2s ease,transform 0.2s ease;}
  .hero-dot:hover{background:rgba(255,255,255,0.7);}
  .hero-dot.is-active{background:#fff;transform:scale(1.2);}
  /* 1.2fr (was 1.6fr): the main image is narrower — and, since its
     height is driven by aspect-ratio, correspondingly shorter — to
     balance against the 3-column x 2-row mini-grid next to it.
     align-items:start stops the grid from stretching the shorter
     column to match the taller one (which would otherwise letterbox
     the hero image with blank space under it). */
  .hero-grid{display:grid;grid-template-columns:1.2fr 1fr;gap:18px;align-items:start;}
  .hero-main{position:relative;background:#000;}
  /* Wider/shorter than the original 16:11 — closer to a 16:9-ish news
     hero so the image reads as a wide banner instead of a tall photo. */
  .hero-main .thumb{aspect-ratio:16/9;}
  .hero-main .caption{position:absolute;left:0;right:0;bottom:0;padding:24px 26px 20px;background:linear-gradient(0deg,rgba(0,0,0,0.8) 10%,rgba(0,0,0,0.1) 75%,transparent 100%);}
  .hero-main .caption h2{color:#fff;font-size:34px;line-height:1.18;}
  /* 3 columns x 2 rows for the 6 mini stories. */
  .hero-mini-grid{display:grid;grid-template-columns:repeat(3,1fr);gap:14px;}
  /* Wider/shorter than the sitewide 4:3 default, to match. */
  .mini-story .thumb{aspect-ratio:16/10;}
  .mini-story .story-body{padding:9px 0 0;}
  .mini-story h4{font-family:'Roboto Condensed',sans-serif;font-size:16px;line-height:1.28;font-weight:600;}
  .mini-story .rubric{font-size:11px;}

  /* ---------- Colored section bars (major sections only) ---------- */
  .bar-head{display:flex;align-items:center;justify-content:space-between;padding:10px 16px;font-size:13px;font-weight:700;letter-spacing:0.06em;text-transform:uppercase;color:#fff;font-family:'Roboto Condensed',sans-serif;}
  .bar-head.red{background:var(--red);}
  .bar-head.navy{background:var(--navy);}
  .bar-head .arrow{opacity:0.85;font-size:12px;}
  .bar-head .nav-arrows{display:flex;gap:8px;}
  .bar-head .nav-arrows span{width:19px;height:19px;border:1px solid rgba(255,255,255,0.5);display:flex;align-items:center;justify-content:center;font-size:11px;cursor:pointer;line-height:1;}
  .bar-head .nav-arrows span:hover{background:rgba(255,255,255,0.15);}
  .bar-head .nav-arrows span.is-disabled{opacity:0.3;cursor:default;pointer-events:none;}

  /* ---------- Light module header (category grid) ---------- */
  .light-head{display:flex;align-items:center;gap:10px;padding:14px 18px 12px;border-bottom:2px solid var(--ink);}
  .light-head .accent{width:16px;height:3px;background:var(--red);flex:none;}
  .light-head.navy-accent .accent{background:var(--navy);}
  .light-head span{font-family:'Roboto Condensed',sans-serif;font-size:14.5px;font-weight:800;letter-spacing:0.04em;text-transform:uppercase;color:var(--ink);}

  /* ---------- Featured slider ---------- */
  .featured{padding:24px 0 0;}
  /* Client asked for this section to run wider on desktop, closer to
     how HKM's does it — was using the standard 1240px .ruv-wrap, which
     left noticeably more empty space on either side than the rest of
     the reference. Same wider max-width as .hero .ruv-wrap; the side
     padding is already 0 via this wrap's own inline style (so the red
     bar-head and slider-track already run edge-to-edge within it) —
     only the overall width needed widening. */
  .featured .ruv-wrap{max-width:1500px;}
  /* 4 cards fit per "page" (each is flex:0 0 25%); the arrows in
     .bar-head scroll by one full page via js/featured-slider.js.
     scroll-snap makes both the arrows and a plain touch swipe land
     on an exact card boundary instead of an arbitrary scroll offset. */
  .slider-track{display:flex;gap:1px;background:var(--line);overflow-x:auto;scroll-behavior:smooth;scroll-snap-type:x mandatory;-webkit-overflow-scrolling:touch;scrollbar-width:none;}
  .slider-track::-webkit-scrollbar{display:none;}
  .slide-card{flex:0 0 25%;background:var(--card);scroll-snap-align:start;}
  .slide-card .thumb{aspect-ratio:4/3;}
  .slide-card .story-body{padding:12px 15px 15px;}
  .slide-card h4{font-family:'Roboto Condensed',sans-serif;font-size:16.5px;line-height:1.28;font-weight:600;}
  .slide-card .rubric{font-size:11px;}

  /* ---------- Promo banners row (real content) ---------- */
  .promo-row{padding:18px 0 0;}
  .promo-grid{display:grid;grid-template-columns:1fr 1fr;gap:16px;}
  .promo-card{display:flex;align-items:center;gap:16px;background:var(--navy-deep);padding:13px 18px;min-height:74px;}
  .promo-card.alt{background:var(--red-deep);}
  .promo-thumb{width:50px;height:50px;flex:none;border-radius:50%;background:linear-gradient(135deg,var(--gold),var(--navy));overflow:hidden;}
  .promo-thumb img{width:100%;height:100%;object-fit:cover;display:block;}
  /* Second promo-row divider between the stacked category-columns
     sections — same look, just a bit more breathing room around it
     since it's acting as a section break, not a lead-in to the next
     block. */
  .promo-row-divider{padding:32px 0;}
  .promo-text .eyebrow{font-size:9.5px;font-weight:700;letter-spacing:0.08em;text-transform:uppercase;color:#B9C6D8;}
  .promo-card.alt .eyebrow{color:#EFC3C8;}
  .promo-text h4{color:#fff;font-size:15px;margin-top:4px;}
  .promo-text .when{color:#9AA7B8;font-size:10.5px;margin-top:4px;letter-spacing:0.03em;}

  /* ---------- NAJNOVIJE dense section ---------- */
  .vijesti{padding:26px 0 0;}
  /* gap widened from the original 1px hairline to real breathing room
     between the main feed and the sidebar; background is --paper (not
     --page) to match .vijesti-main/.vijesti-sidebar and the surrounding
     .site-shell, which all sit on --paper (white in light mode) — so
     the gap reads as plain white space, not a tinted gutter. */
  .vijesti-layout{display:grid;grid-template-columns:2.2fr 1fr;gap:20px;background:var(--paper);border:1px solid var(--line);}
  .vijesti-main{background:var(--paper);}
  .vijesti-sidebar{background:var(--paper);}
  .feature-story{border-bottom:1px solid var(--line);}
  .feature-story .thumb{aspect-ratio:16/8.5;}
  .feature-story .story-body{padding:17px 20px 20px;}
  .feature-story h3{font-size:23px;line-height:1.26;}
  .row2, .row3{display:grid;gap:1px;background:var(--line);border-bottom:1px solid var(--line);}
  .row2{grid-template-columns:1fr 1fr;}
  .row3{grid-template-columns:1fr 1fr 1fr;}
  .tile{background:var(--paper);}
  .tile .thumb{aspect-ratio:4/3;}
  .tile .story-body{padding:13px 15px 15px;}
  .tile h4{font-family:'Roboto Condensed',sans-serif;font-size:17px;line-height:1.28;font-weight:600;}
  .row3 .tile h4{font-size:15px;}
  .tile .rubric{font-size:11px;}
  .tile .date{font-size:10.5px;color:var(--ink-soft);margin-top:4px;}

  .sb-widget{border-bottom:1px solid var(--line);}
  .sb-widget:last-child{border-bottom:none;}
  .contact-grid{display:grid;grid-template-columns:1fr 1fr;gap:8px;padding:14px 16px 16px;}
  .contact-btn{display:flex;align-items:center;justify-content:center;gap:7px;background:var(--navy-deep);color:#fff;padding:10px;font-size:11px;font-weight:700;}
  .contact-btn svg{width:14px;height:14px;}
  .testi-list{list-style:none;margin:0;padding:10px 16px 16px;}
  .testi-list li{padding:9px 0;border-top:1px solid var(--line);font-size:12.5px;font-weight:600;line-height:1.35;}
  .rank-list{list-style:none;margin:0;padding:14px 16px 16px;counter-reset:rank;}
  .rank-list li{counter-increment:rank;display:flex;gap:11px;align-items:flex-start;padding:9px 0;border-top:1px solid var(--line);}
  .rank-list li:first-child{border-top:none;padding-top:0;}
  .rank-list li::before{content:counter(rank);font-family:'Roboto Condensed',sans-serif;font-size:19px;font-weight:700;color:var(--red);flex:none;width:20px;line-height:1.1;}
  .rank-list a{font-size:12.5px;line-height:1.4;font-weight:600;}
  .rank-list a:hover{color:var(--red);}

  /* Small thumbnail + title list — used for "Najčitanije vijesti" /
     "Najnovije vijesti" in the post/category sidebar (sidebar-post.php). */
  .thumb-list{padding:10px 16px 16px;}
  .thumb-item{display:flex;gap:10px;align-items:flex-start;padding:9px 0;border-top:1px solid var(--line);}
  .thumb-item:first-child{border-top:none;padding-top:0;}
  .thumb-item .thumb{width:56px;height:56px;flex:none;aspect-ratio:1/1;}
  .thumb-item p{font-size:12px;font-weight:600;line-height:1.35;margin:0;}
  .thumb-item:hover p{color:var(--red);}

  .contact-mini{background:var(--navy-deep);padding:20px 18px;}
  .contact-mini h5{color:#fff;font-family:'Roboto Condensed',sans-serif;font-size:15px;margin-bottom:8px;}
  .contact-mini p{color:#AEBBCB;font-size:12px;margin:0 0 14px;line-height:1.5;}
  .contact-mini .email-link{display:inline-block;background:var(--red);color:#fff;font-weight:700;font-size:12.5px;padding:10px 16px;word-break:break-all;}
  .contact-mini .email-link:hover{opacity:0.9;}

  .cat-links-list{list-style:none;margin:0;padding:10px 16px 16px;}
  .cat-links-list li{padding:9px 0;border-top:1px solid var(--line);}
  .cat-links-list li:first-child{border-top:none;padding-top:0;}
  .cat-links-list a{font-size:12.5px;font-weight:600;display:flex;align-items:center;gap:8px;}
  .cat-links-list a::before{content:"";width:6px;height:6px;border-radius:50%;background:var(--red);flex:none;}
  .cat-links-list a:hover{color:var(--red);}
  .cat-links-list .count{font-weight:400;color:var(--ink-soft);}

  /* ---------- Category columns (real taxonomy) ---------- */
  /* Each stacked category-columns section used to butt straight up
     against the one before it (no gap at all between, e.g., the end of
     "Najnovije objave" and the first Duhovnost/Molitva i vjera/Svetac
     dana row, or between one three-column row and the next). */
  .category-columns{padding:0;margin-top:30px;}
  .col-grid{display:grid;grid-template-columns:repeat(3,1fr);gap:1px;background:var(--line);border-top:1px solid var(--line);border-bottom:1px solid var(--line);}
  .col-block{background:var(--paper);}
  .col-feature{padding:16px 18px 0;}
  .col-feature .thumb{aspect-ratio:16/10;}
  .col-feature .story-body{padding:12px 0 0;}
  .col-feature h4{font-family:'Roboto Condensed',sans-serif;font-size:17px;line-height:1.28;font-weight:600;}
  .col-feature .rubric{font-size:11px;}
  .headline-list{list-style:none;margin:0;padding:6px 18px 18px;}
  .headline-list li{padding:9px 0;border-top:1px solid var(--line);font-size:12.5px;line-height:1.36;font-weight:600;}

  /* ---------- Illustration promo (Duhovna glazba) ---------- */
  .illustration-banner{padding:28px 0 0;}
  .illus-inner{display:flex;background:var(--navy-deep);overflow:hidden;}
  .illus-art{flex:1.3;aspect-ratio:20/7;background:linear-gradient(135deg,var(--navy) 0%,var(--red) 100%);overflow:hidden;}
  .illus-art img{width:100%;height:100%;object-fit:cover;display:block;}
  .illus-info{flex:1;background:var(--red);color:#fff;padding:22px 26px;display:flex;flex-direction:column;justify-content:center;}
  .illus-info .eyebrow{font-size:10px;font-weight:700;letter-spacing:0.09em;text-transform:uppercase;color:#F3C4C9;}
  .illus-info h3{font-size:18px;margin:8px 0 10px;color:#fff;}
  .illus-info a{font-size:11.5px;font-weight:700;letter-spacing:0.03em;text-decoration:underline;}

  /* ---------- Two-col feature blocks ---------- */
  .two-col-features{padding:0;}
  .tcf-grid{display:grid;grid-template-columns:1fr 1fr;gap:1px;background:var(--line);border-top:1px solid var(--line);border-bottom:1px solid var(--line);}
  .tcf-block{background:var(--paper);}
  .tcf-feature .thumb{aspect-ratio:16/9.5;}
  .tcf-feature .story-body{padding:15px 18px 15px;}
  .tcf-feature h3{font-size:18px;line-height:1.28;}
  .tcf-tiles{display:grid;grid-template-columns:1fr 1fr;gap:1px;background:var(--line);border-top:1px solid var(--line);}
  .tcf-tile{background:var(--paper);}
  .tcf-tile .thumb{aspect-ratio:4/3;}
  .tcf-tile .story-body{padding:11px 13px 13px;}
  .tcf-tile h5{font-family:'Roboto Condensed',sans-serif;font-size:12.5px;font-weight:600;line-height:1.32;}
  .tcf-tile .rubric{font-size:10.5px;}

  /* ---------- Propovijedi row ---------- */
  .propovijedi-section{padding:24px 0 40px;}
  .prop-grid{display:grid;grid-template-columns:repeat(4,1fr);gap:1px;background:var(--line);border:1px solid var(--line);border-top:none;}
  .prop-tile{display:block;background:var(--paper);padding:16px 16px 18px;}
  .prop-tile .time{font-size:10px;font-weight:700;color:var(--red);text-transform:uppercase;letter-spacing:0.05em;}
  .prop-tile h5{font-family:'Roboto Condensed',sans-serif;font-size:13.5px;font-weight:600;margin-top:6px;line-height:1.32;}

  /* ---------- Footer top: links + weather ---------- */
  .footer-top{background:var(--navy-deep);color:#B9C6D8;padding:32px 0;margin-top:36px;}
  .ft-grid{display:grid;grid-template-columns:1fr 1fr 1fr 1fr;gap:32px;}
  .ft-col h5{color:#EFC3C8;font-size:11px;font-weight:700;letter-spacing:0.09em;text-transform:uppercase;margin-bottom:13px;}
  .ft-item{display:flex;gap:10px;padding:8px 0;border-top:1px solid rgba(255,255,255,0.08);}
  .ft-item:first-child{border-top:none;}
  .ft-item .thumb{width:40px;height:40px;flex:none;}
  .ft-item p{font-size:11.5px;line-height:1.35;font-weight:600;color:#D3DCE7;margin:0;}
  .weather-card{background:rgba(255,255,255,0.05);padding:15px;}
  .weather-city{font-family:'Roboto Condensed',sans-serif;font-size:15px;color:#fff;margin-bottom:2px;}
  .weather-desc{font-size:10.5px;color:#8FA0B5;margin-bottom:9px;}
  .weather-now{display:flex;align-items:center;gap:9px;margin-bottom:11px;}
  .weather-now .temp{font-family:'Roboto Condensed',sans-serif;font-size:28px;color:#fff;}
  .weather-days{display:flex;justify-content:space-between;font-size:10px;color:#8FA0B5;}
  .weather-days span{display:block;text-align:center;}
  .weather-days b{display:block;color:#fff;font-size:11px;margin-top:2px;}

  /* ---------- Footer bottom ---------- */
  footer.ruv-footer{background:var(--navy-deep) !important;color:#AAB6C6;border-top:1px solid rgba(255,255,255,0.08);}
  .footer-brand{display:flex;flex-direction:column;align-items:center;gap:6px;padding:24px 0 10px;}
  .footer-brand .logo-text{color:#fff;}
  .footer-brand p{font-size:11.5px;color:#8394A8;max-width:420px;text-align:center;margin:0;}
  .footer-links{display:flex;justify-content:center;gap:22px;flex-wrap:wrap;padding:14px 0;font-size:11.5px;}
  .footer-links a:hover{color:#fff;}
  .footer-socials{display:flex;justify-content:center;gap:15px;padding:6px 0 18px;}
  .footer-socials svg{width:15px;height:15px;color:#AAB6C6;}
  .footer-socials a:hover svg{color:#fff;}
  .footer-copy{text-align:center;font-size:10.5px;padding:14px 0 20px;color:#647186;border-top:1px solid rgba(255,255,255,0.06);}
  .footer-copy .credit{display:block;margin-top:4px;}
  .footer-copy .credit a{color:#8394A8;}
  .footer-copy .credit a:hover{color:#fff;}

  @media (max-width:1000px){
    .hero-grid{grid-template-columns:1fr;}
    .hero-mini-grid{grid-template-columns:1fr 1fr;}
    .vijesti-layout{grid-template-columns:1fr;}
    /* .row2 always has an even count, so 2 columns divides cleanly.
       .row3 has 3 posts — forced into 2 columns, the 3rd always lands
       alone in a new row, leaving the other cell blank (this is what
       looked like a "missing" post on mobile: not missing, just an
       empty grid cell next to it). Single column avoids that leftover
       gap entirely, for any count. */
    .row2{grid-template-columns:1fr 1fr;}
    .row3{grid-template-columns:1fr;}
    .col-grid{grid-template-columns:1fr;}
    .promo-grid{grid-template-columns:1fr !important;}
    .tcf-grid{grid-template-columns:1fr;}
    .prop-grid{grid-template-columns:1fr 1fr;}
    .ft-grid{grid-template-columns:1fr 1fr;}
    .illus-inner{flex-direction:column;}
    .illus-art{aspect-ratio:16/9;}
    .nav-inner{flex-wrap:wrap;}
    .slide-card{flex:0 0 50%;}
  }

  @media (max-width:600px){
    /* Mobile only — desktop keeps the existing 20px .hero .ruv-wrap
       padding untouched. Drops that padding to 0 so the main hero
       image runs fully edge-to-edge, then re-adds it at half the
       amount (10px, was 20px) directly on .hero-mini-grid only, so
       the 6 smaller tiles still get some breathing room from the
       screen edge. */
    .hero .ruv-wrap{padding:0;}
    .hero-mini-grid{padding:0 10px;}
    .hero-main .thumb{aspect-ratio:16/9;}
    .hero-main .caption h2{font-size:22px;line-height:1.22;}
    .mini-story .thumb{aspect-ratio:4/3;}
    .promo-card{padding:16px 18px;min-height:auto;gap:14px;}
    .promo-thumb{width:44px;height:44px;}
    .promo-text h4{font-size:15.5px;line-height:1.32;}
    .promo-text .eyebrow{font-size:10px;}
    .promo-text .when{font-size:11px;}
    /* Exactly one card per view on mobile (was 82% + a peek of the
       next card) — js/featured-slider.js now measures the actual
       rendered card width at every breakpoint, so this and the 50%
       tablet rule above both "just work" without any JS changes. */
    .slide-card{flex:0 0 100%;}
  }

  /* ================= POST / ARTICLE PAGE ================= */
  .post-wrap{padding:22px 0 0;}
  .post-layout{display:grid;grid-template-columns:2.15fr 1fr;gap:34px;align-items:start;}

  .article-hero{width:100%;aspect-ratio:16/9;overflow:hidden;background:var(--navy);}
  .article-hero img{width:100%;height:100%;object-fit:cover;}

  .cat-badge{display:inline-block;background:var(--red);color:#fff;font-family:'Roboto Condensed',sans-serif;font-size:11.5px;font-weight:700;letter-spacing:0.06em;text-transform:uppercase;padding:5px 12px;margin:16px 0 10px;}
  .article-title{font-size:32px;line-height:1.2;color:var(--ink);margin-bottom:10px;}
  .article-credit{font-size:11px;font-weight:700;letter-spacing:0.05em;text-transform:uppercase;color:var(--ink-soft);font-family:'Roboto',sans-serif;margin-bottom:10px;}
  .article-lede{font-family:'Roboto Condensed',sans-serif;font-size:17px;font-weight:600;color:var(--ink);line-height:1.5;margin-bottom:10px;}
  .article-meta{font-size:12px;color:var(--ink-soft);letter-spacing:0.02em;padding-bottom:16px;border-bottom:1px solid var(--line);margin-bottom:20px;}

  .article-body{font-size:16px;line-height:1.75;color:var(--ink);}
  .article-body p{margin:0 0 20px;}
  .article-body h2{font-size:22px;margin:32px 0 14px;color:var(--ink);}
  /* Inline content images (pasted into the post body, not the
     ruv-hero/ruv-feature sizes used elsewhere) — without this they
     keep whatever fixed pixel width was set when they were inserted
     and can overflow a narrow mobile screen. */
  .article-body img{max-width:100%;height:auto;}
  /* A pasted YouTube URL (or other oEmbed link) — and, on older posts,
     hand-pasted <iframe> embed code — comes out of WordPress at a
     fixed pixel width/height (e.g. 500x281), which doesn't shrink to
     fit a narrow mobile screen and reads as stretched/squeezed
     (reported by the client). Forcing width:100% + a real 16:9
     aspect-ratio makes it fill the column at normal proportions on
     any screen size — covers a raw <iframe> directly in the content,
     and WordPress's own .wp-embed-responsive wrapper (used when
     add_theme_support('responsive-embeds') applies — see
     functions.php) for however the video was actually inserted. */
  .article-body iframe,
  .article-body embed,
  .article-body object{width:100%;aspect-ratio:16/9;height:auto;border:0;}
  .article-body .wp-embed-responsive .wp-block-embed__wrapper,
  .article-body .wp-embed-aspect-16-9{aspect-ratio:16/9;}
  .article-body blockquote{
    margin:26px 0;padding:4px 0 4px 20px;border-left:3px solid var(--red);
    font-family:'Roboto Condensed',sans-serif;font-style:italic;font-size:19px;
    font-weight:600;color:var(--ink);line-height:1.45;
  }

  .article-promo-row{margin:30px 0;}

  .share-row{display:flex;align-items:center;gap:14px;padding:20px 0;border-top:1px solid var(--line);margin-top:8px;}
  .share-row span{font-size:12.5px;font-weight:700;color:var(--ink-soft);text-transform:uppercase;letter-spacing:0.04em;}
  .share-row .icons{display:flex;gap:10px;}
  .share-row .icons a{width:32px;height:32px;border-radius:50%;background:var(--navy-deep);display:flex;align-items:center;justify-content:center;}
  .share-row .icons svg{width:15px;height:15px;color:#fff;}

  .tags-row{padding:16px 0 26px;border-bottom:1px solid var(--line);font-size:13px;}
  .tags-row .label{color:var(--ink-soft);font-weight:700;margin-right:8px;}
  .tags-row a{display:inline-block;background:var(--page);border:1px solid var(--line);padding:5px 12px;margin:0 6px 6px 0;font-size:12px;font-weight:600;color:var(--navy-deep);}
  .tags-row a:hover{background:var(--red);color:#fff;border-color:var(--red);}

  .related-section{padding:26px 0;}
  .related-grid{display:grid;grid-template-columns:repeat(3,1fr);gap:18px;}
  .related-card .thumb{aspect-ratio:4/3;}
  .related-card .story-body{padding:11px 0 0;}
  .related-card h5{font-family:'Roboto Condensed',sans-serif;font-size:14px;font-weight:600;line-height:1.32;}

  .contact-banner{background:var(--navy);color:#fff;padding:18px 24px;display:flex;align-items:center;justify-content:space-between;flex-wrap:wrap;gap:10px;margin:8px 0 26px;}
  .contact-banner .txt{font-size:14px;}
  .contact-banner a.email{color:var(--gold);font-weight:700;text-decoration:underline;}

  .post-sidebar .sb-widget{border:1px solid var(--line);border-top:none;}
  .post-sidebar .sb-widget:first-child{border-top:1px solid var(--line);}
  .post-sidebar{margin-bottom:20px;}
  .cta-red{display:block;text-align:center;background:var(--red);color:#fff;padding:11px;font-size:12.5px;font-weight:700;letter-spacing:0.03em;margin:0 16px 16px;}
  .related-list{list-style:none;margin:0;padding:6px 18px 18px;}
  .related-list li{padding:9px 0;border-top:1px solid var(--line);font-size:12.5px;line-height:1.4;font-weight:600;}

  .friend-box{background:var(--red);color:#fff;padding:22px;text-align:center;}
  .friend-box .rubric{color:#F3C4C9;}
  .friend-box h4{color:#fff;font-size:17px;margin:6px 0 10px;}
  .friend-box p{font-size:12px;color:#F3D0D4;margin:0 0 14px;line-height:1.5;}
  .friend-box .btn-white{display:inline-block;background:#fff;color:var(--red);padding:10px 20px;font-size:12px;font-weight:700;letter-spacing:0.03em;}

  /* ================= CATEGORY ARCHIVE ================= */
  .archive-banner{background:var(--navy);color:#fff;padding:34px 0 26px;}
  .ruv-breadcrumb{font-size:12px;color:#B9C6DA;margin-bottom:10px;letter-spacing:0.02em;}
  .ruv-breadcrumb a{color:#B9C6DA;}
  .ruv-breadcrumb a:hover{color:#fff;}
  .ruv-breadcrumb .sep{margin:0 6px;opacity:0.6;}
  .ruv-breadcrumb .current{color:#fff;font-weight:600;}
  .archive-title{color:#fff;font-size:34px;line-height:1.15;}
  .archive-desc{color:#CBD5E3;font-size:14px;margin-top:8px;max-width:720px;line-height:1.55;}

  .archive-wrap{padding:26px 0 40px;}
  .archive-empty{padding:10px 0 40px;font-size:15px;color:var(--ink-soft);}

  .list-card{display:flex;gap:20px;padding:22px 0;border-top:1px solid var(--line);}
  .list-card:first-child{border-top:none;padding-top:0;}
  .list-card-thumb{flex:0 0 240px;width:240px;}
  .list-card .thumb{aspect-ratio:4/3;}
  .list-card .story-body{flex:1 1 0%;min-width:0;}
  .list-card h2{font-size:20px;line-height:1.3;margin-bottom:8px;}
  .list-card h2 a:hover{color:var(--red);}
  .list-card-excerpt{font-size:14px;line-height:1.6;color:var(--ink);margin:0 0 10px;}
  .list-card-meta{font-size:12px;color:var(--ink-soft);letter-spacing:0.02em;}
  .list-card-meta .dot{margin:0 6px;}

  .ruv-pagination{display:flex;flex-wrap:wrap;gap:8px;margin-top:30px;padding-top:22px;border-top:1px solid var(--line);}
  .ruv-pagination .page-numbers{display:inline-flex;align-items:center;justify-content:center;min-width:38px;height:38px;padding:0 10px;font-size:13px;font-weight:700;font-family:'Roboto Condensed',sans-serif;background:var(--paper);border:1px solid var(--line);color:var(--ink);}
  .ruv-pagination a.page-numbers:hover{background:var(--red);border-color:var(--red);color:#fff;}
  .ruv-pagination .page-numbers.current{background:var(--red);border-color:var(--red);color:#fff;}
  .ruv-pagination .page-numbers.dots{border:none;background:transparent;}

  @media (max-width:900px){
    .post-layout{grid-template-columns:1fr;}
    .article-title{font-size:24px;line-height:1.24;}
    .related-grid{grid-template-columns:1fr 1fr;}
    .archive-title{font-size:28px;}
    .list-card-thumb{flex:0 0 180px;width:180px;}
  }

  @media (max-width:600px){
    .article-hero{aspect-ratio:16/8;}
    .cat-badge{margin:12px 0 8px;}
    .article-title{font-size:21px;line-height:1.22;margin-bottom:8px;}
    .article-credit{margin-bottom:8px;}
    .article-lede{font-size:15.5px;margin-bottom:8px;}
    .article-meta{padding-bottom:12px;margin-bottom:16px;}
    /* Client feedback (Saša): body text on mobile felt a touch large
       with a touch too much line spacing — slightly smaller font-size
       and tighter line-height so a bit more of the article fits on
       screen while staying comfortably readable. Desktop is untouched
       (still 16px / 1.75 from the base .article-body rule above). */
    .article-body{font-size:15px;line-height:1.6;}

    /* Vezani članci: square thumb left, title + date right.
       single.php gives each card a separate thumb-link and title-link
       (not one <a> wrapping everything — see the nested-<a> fix note
       in single.php), so the flex row is applied to .related-card
       itself, which now directly contains both as siblings. */
    .related-grid{display:flex !important;flex-direction:column !important;width:100%;gap:0;}
    .related-card{
      display:flex !important;flex-direction:row !important;flex-wrap:nowrap !important;
      align-items:center;width:100%;gap:12px;box-sizing:border-box;
      padding:12px 0;border-top:1px solid var(--line);
    }
    .related-card:first-child{border-top:none;padding-top:0;}
    /* The <a> wrapping the thumb (.related-card-thumb) is the actual
       flex item now, not .thumb itself — flex-basis has to land on
       the direct child of the .related-card flex row. */
    .related-card-thumb{
      flex:0 0 64px !important;width:64px !important;height:64px !important;
      max-width:64px;overflow:hidden;
    }
    .related-card-thumb .thumb{width:100%;height:100%;aspect-ratio:1/1;}
    .related-card .thumb img{width:100%;height:100%;object-fit:cover;display:block;}
    .related-card .story-body{flex:1 1 0% !important;min-width:0;width:auto;padding:0;}
    .related-card .rubric{display:none;}
    .related-card h5{
      font-size:13px;line-height:1.35;margin:0;
      overflow-wrap:break-word;word-break:normal;hyphens:auto;
    }
    .related-card .related-date{font-size:11px;color:var(--ink-soft);margin-top:4px;}

    .archive-banner{padding:24px 0 20px;}
    .archive-title{font-size:22px;}
    .archive-desc{font-size:13px;}
    .list-card{flex-direction:column;gap:12px;padding:16px 0;}
    .list-card-thumb{width:100%;flex:none;}
    .list-card h2{font-size:17px;}
    .list-card-excerpt{font-size:13.5px;}
  }

  /* ---------- Back-to-top (every page) ---------- */
  .back-to-top{
    position:fixed;right:22px;bottom:28px;z-index:9998;
    width:44px;height:44px;border-radius:50%;
    background:var(--red);color:#fff;border:none;cursor:pointer;
    display:flex;align-items:center;justify-content:center;
    box-shadow:0 4px 16px rgba(0,0,0,0.28);
    opacity:0;visibility:hidden;transform:translateY(10px);
    transition:opacity .25s ease,transform .25s ease,visibility .25s ease,background-color .25s ease;
  }
  .back-to-top.is-visible{opacity:1;visibility:visible;transform:translateY(0);}
  .back-to-top:hover{background:var(--red-deep);}
  .back-to-top svg{width:20px;height:20px;}
  @media (max-width:600px){
    .back-to-top{right:14px;bottom:18px;width:40px;height:40px;}
    .back-to-top svg{width:18px;height:18px;}
  }

  /* ---------- Reading progress bar (post pages only) ---------- */
  .reading-progress{
    position:fixed;left:0;bottom:0;width:100%;height:4px;
    background:rgba(0,0,0,0.08);z-index:9999;
  }
  html.dark-mode .reading-progress{background:rgba(255,255,255,0.08);}
  .reading-progress-bar{height:100%;width:0%;background:#2563eb;}
