/*
Theme Name: Alegro Portal
Theme URI: https://alegro.rs/
Author: Novinarsko udruženje Alegro
Description: Pristupačna WordPress tema za medijski portal Alegro, zasnovana na originalnom Alegro prototipu.
Version: 1.0.0
Requires at least: 6.0
Tested up to: 6.8
Requires PHP: 7.4
Text Domain: alegro
*/

:root {
      --navy: #12304a;
      --blue: #1976a3;
      --light-blue: #eaf5fa;
      --teal: #0f8c83;
      --text: #1d2730;
      --muted: #64717d;
      --white: #ffffff;
      --border: #d9e3e9;
      --surface: #f5f8fa;
      --shadow: 0 12px 35px rgba(18, 48, 74, 0.10);
      --radius: 18px;
      --font-size: 17px;
    }

    * {
      box-sizing: border-box;
    }

    html {
      scroll-behavior: smooth;
    }

    body {
      margin: 0;
      font-family: Arial, Helvetica, sans-serif;
      font-size: var(--font-size);
      line-height: 1.65;
      color: var(--text);
      background: var(--white);
    }

    body.large-text {
      --font-size: 20px;
    }

    body.high-contrast {
      --navy: #000000;
      --blue: #003cff;
      --light-blue: #ffffff;
      --teal: #006b00;
      --text: #000000;
      --muted: #222222;
      --white: #ffffff;
      --border: #000000;
      --surface: #ffffff;
      --shadow: none;
    }

    a {
      color: inherit;
    }

    a:focus-visible,
    button:focus-visible {
      outline: 4px solid #ffbf47;
      outline-offset: 3px;
    }

    .skip-link {
      position: absolute;
      left: -9999px;
      top: 0;
      z-index: 1000;
      padding: 12px 18px;
      background: #000;
      color: #fff;
      text-decoration: none;
    }

    .skip-link:focus {
      left: 12px;
      top: 12px;
    }

    .topbar {
      background: var(--navy);
      color: var(--white);
      font-size: 0.9rem;
    }

    .topbar-inner,
    .header-inner,
    .container {
      width: min(1160px, calc(100% - 36px));
      margin: 0 auto;
    }

    .topbar-inner {
      min-height: 42px;
      display: flex;
      justify-content: space-between;
      align-items: center;
      gap: 16px;
      flex-wrap: wrap;
    }

    .accessibility-tools {
      display: flex;
      gap: 8px;
      flex-wrap: wrap;
    }

    .tool-button {
      border: 1px solid rgba(255,255,255,0.65);
      background: transparent;
      color: #fff;
      border-radius: 999px;
      padding: 6px 11px;
      cursor: pointer;
      font-weight: 700;
    }

    .site-header {
      position: sticky;
      top: 0;
      z-index: 50;
      background: rgba(255,255,255,0.97);
      border-bottom: 1px solid var(--border);
      backdrop-filter: blur(10px);
    }

    .header-inner {
      min-height: 84px;
      display: flex;
      align-items: center;
      justify-content: space-between;
      gap: 30px;
    }

    .brand {
      display: flex;
      align-items: center;
      gap: 12px;
      text-decoration: none;
    }

    .brand-mark {
      width: 48px;
      height: 48px;
      border-radius: 14px;
      display: grid;
      place-items: center;
      background: linear-gradient(135deg, var(--blue), var(--teal));
      color: white;
      font-size: 1.35rem;
      font-weight: 800;
      letter-spacing: -1px;
    }

    .brand-text strong {
      display: block;
      color: var(--navy);
      font-size: 1.25rem;
      letter-spacing: 0.04em;
    }

    .brand-text span {
      display: block;
      color: var(--muted);
      font-size: 0.78rem;
      line-height: 1.25;
    }

    .brand-text .brand-details {
      margin-top: 4px;
      font-size: 0.68rem;
      color: var(--muted);
    }

    nav ul {
      margin: 0;
      padding: 0;
      display: flex;
      gap: 24px;
      list-style: none;
      align-items: center;
      flex-wrap: wrap;
    }

    nav a {
      text-decoration: none;
      font-weight: 700;
      color: var(--navy);
    }

    nav a:hover {
      color: var(--blue);
    }

    .hero {
      background:
        radial-gradient(circle at 85% 20%, rgba(15,140,131,0.18), transparent 32%),
        linear-gradient(135deg, #eef8fc 0%, #ffffff 62%);
      border-bottom: 1px solid var(--border);
    }

    .hero-grid {
      min-height: 520px;
      display: grid;
      grid-template-columns: 1.1fr 0.9fr;
      align-items: center;
      gap: 55px;
      padding: 72px 0;
    }

    .eyebrow {
      display: inline-flex;
      align-items: center;
      gap: 8px;
      margin-bottom: 16px;
      color: var(--blue);
      font-weight: 800;
      text-transform: uppercase;
      letter-spacing: 0.08em;
      font-size: 0.82rem;
    }

    h1, h2, h3 {
      color: var(--navy);
      line-height: 1.15;
      margin-top: 0;
    }

    h1 {
      font-size: clamp(2.35rem, 5vw, 4.8rem);
      margin-bottom: 22px;
      letter-spacing: -0.045em;
    }

    h2 {
      font-size: clamp(1.8rem, 3vw, 2.8rem);
      margin-bottom: 14px;
    }

    h3 {
      font-size: 1.25rem;
      margin-bottom: 10px;
    }

    .hero p {
      max-width: 700px;
      color: var(--muted);
      font-size: 1.15rem;
      margin-bottom: 30px;
    }

    .button-row {
      display: flex;
      gap: 12px;
      flex-wrap: wrap;
    }

    .button {
      display: inline-flex;
      align-items: center;
      justify-content: center;
      gap: 8px;
      min-height: 48px;
      padding: 11px 19px;
      border-radius: 12px;
      text-decoration: none;
      font-weight: 800;
      border: 2px solid transparent;
    }

    .button-primary {
      background: var(--blue);
      color: #fff;
    }

    .button-secondary {
      color: var(--navy);
      border-color: var(--navy);
      background: transparent;
    }

    .hero-card {
      position: relative;
      min-height: 350px;
      border-radius: 28px;
      overflow: hidden;
      background:
        linear-gradient(155deg, rgba(18,48,74,0.10), rgba(15,140,131,0.16)),
        var(--light-blue);
      box-shadow: var(--shadow);
      display: grid;
      place-items: center;
      padding: 32px;
    }

    .hero-card::before,
    .hero-card::after {
      content: "";
      position: absolute;
      border-radius: 50%;
      background: rgba(255,255,255,0.65);
    }

    .hero-card::before {
      width: 170px;
      height: 170px;
      right: -35px;
      top: -35px;
    }

    .hero-card::after {
      width: 120px;
      height: 120px;
      left: -25px;
      bottom: -25px;
    }

    .hero-placeholder {
      position: relative;
      z-index: 2;
      width: 100%;
      max-width: 330px;
      padding: 28px;
      border-radius: 20px;
      background: rgba(255,255,255,0.88);
      border: 1px solid rgba(18,48,74,0.10);
    }

    .hero-placeholder .icon {
      width: 64px;
      height: 64px;
      border-radius: 18px;
      background: linear-gradient(135deg, var(--blue), var(--teal));
      color: white;
      display: grid;
      place-items: center;
      font-size: 1.8rem;
      margin-bottom: 18px;
    }

    section {
      padding: 80px 0;
    }

    .section-head {
      display: flex;
      justify-content: space-between;
      gap: 22px;
      align-items: end;
      margin-bottom: 32px;
    }

    .section-head p {
      max-width: 650px;
      color: var(--muted);
      margin: 0;
    }

    .cards {
      display: grid;
      grid-template-columns: repeat(3, 1fr);
      gap: 24px;
    }

    .card {
      border: 1px solid var(--border);
      background: var(--white);
      border-radius: var(--radius);
      overflow: hidden;
      box-shadow: 0 7px 24px rgba(18,48,74,0.06);
    }

    .card-image {
      min-height: 190px;
      padding: 20px;
      display: flex;
      align-items: flex-end;
      background:
        linear-gradient(135deg, rgba(25,118,163,0.18), rgba(15,140,131,0.20)),
        var(--light-blue);
    }

    .card-image span {
      display: inline-block;
      background: var(--navy);
      color: white;
      padding: 7px 10px;
      border-radius: 999px;
      font-size: 0.76rem;
      font-weight: 800;
      text-transform: uppercase;
      letter-spacing: 0.06em;
    }

    .card-body {
      padding: 22px;
    }

    .meta {
      display: flex;
      gap: 10px;
      flex-wrap: wrap;
      color: var(--muted);
      font-size: 0.86rem;
      margin-bottom: 10px;
    }

    .card p {
      color: var(--muted);
      margin-bottom: 18px;
    }

    .read-more {
      color: var(--blue);
      font-weight: 800;
      text-decoration: none;
    }

    .projects {
      background: var(--surface);
      border-top: 1px solid var(--border);
      border-bottom: 1px solid var(--border);
    }

    .project-list {
      display: grid;
      gap: 18px;
    }

    .project {
      display: grid;
      grid-template-columns: 90px 1fr auto;
      gap: 22px;
      align-items: center;
      padding: 24px;
      border-radius: var(--radius);
      border: 1px solid var(--border);
      background: var(--white);
    }

    .project-number {
      width: 70px;
      height: 70px;
      border-radius: 18px;
      display: grid;
      place-items: center;
      color: #fff;
      background: linear-gradient(135deg, var(--navy), var(--blue));
      font-weight: 900;
      font-size: 1.25rem;
    }

    .project p {
      margin: 0;
      color: var(--muted);
    }

    .media-grid {
      display: grid;
      grid-template-columns: 1.25fr 0.75fr;
      gap: 26px;
    }

    .video-box,
    .podcast-box {
      min-height: 320px;
      border-radius: 24px;
      padding: 30px;
      display: flex;
      flex-direction: column;
      justify-content: end;
      color: #fff;
      overflow: hidden;
    }

    .video-box {
      background:
        linear-gradient(rgba(18,48,74,0.32), rgba(18,48,74,0.88)),
        linear-gradient(135deg, #4e8fb0, #12304a);
    }

    .podcast-box {
      background:
        linear-gradient(rgba(15,140,131,0.20), rgba(18,48,74,0.88)),
        linear-gradient(135deg, #33a89e, #12304a);
    }

    .video-box h3,
    .podcast-box h3 {
      color: #fff;
      font-size: 1.65rem;
    }

    .about-panel {
      display: grid;
      grid-template-columns: 0.9fr 1.1fr;
      gap: 42px;
      align-items: center;
      padding: 42px;
      border-radius: 28px;
      background: var(--navy);
      color: #fff;
    }

    .about-panel h2 {
      color: #fff;
    }

    .about-panel p {
      color: rgba(255,255,255,0.82);
    }

    .about-badges {
      display: grid;
      grid-template-columns: repeat(2, 1fr);
      gap: 14px;
    }

    .badge {
      min-height: 110px;
      padding: 18px;
      border-radius: 16px;
      background: rgba(255,255,255,0.10);
      border: 1px solid rgba(255,255,255,0.17);
    }

    .badge strong {
      display: block;
      font-size: 1.35rem;
      margin-bottom: 4px;
    }

    footer {
      background: #0b2133;
      color: #fff;
      padding: 48px 0 28px;
    }

    .footer-grid {
      display: grid;
      grid-template-columns: 1.2fr 0.8fr 0.8fr;
      gap: 36px;
      margin-bottom: 36px;
    }

    footer h3 {
      color: #fff;
    }

    footer p,
    footer a {
      color: rgba(255,255,255,0.78);
    }

    footer ul {
      list-style: none;
      padding: 0;
      margin: 0;
    }

    footer li {
      margin-bottom: 9px;
    }

    footer a {
      text-decoration: none;
    }

    .copyright {
      border-top: 1px solid rgba(255,255,255,0.14);
      padding-top: 22px;
      color: rgba(255,255,255,0.62);
      font-size: 0.88rem;
    }

    @media (max-width: 900px) {
      .header-inner {
        align-items: flex-start;
        flex-direction: column;
        padding: 16px 0;
      }

      nav ul {
        gap: 14px;
      }

      .hero-grid,
      .media-grid,
      .about-panel {
        grid-template-columns: 1fr;
      }

      .cards {
        grid-template-columns: 1fr 1fr;
      }

      .project {
        grid-template-columns: 75px 1fr;
      }

      .project .button {
        grid-column: 1 / -1;
      }

      .footer-grid {
        grid-template-columns: 1fr 1fr;
      }
    }

    @media (max-width: 620px) {
      .topbar-inner {
        padding: 8px 0;
      }

      .site-header {
        position: static;
      }

      nav ul {
        flex-direction: column;
        align-items: flex-start;
      }

      .hero-grid {
        padding: 48px 0;
      }

      section {
        padding: 58px 0;
      }

      .cards,
      .footer-grid,
      .about-badges {
        grid-template-columns: 1fr;
      }

      .section-head {
        align-items: flex-start;
        flex-direction: column;
      }

      .project {
        grid-template-columns: 1fr;
      }

      .about-panel {
        padding: 27px;
      }
    }

/* WordPress integration */
body.admin-bar .site-header { top: 32px; }
.post-thumb { min-height: 190px; background-size: cover; background-position: center; }
.card h3 a { text-decoration: none; color: inherit; }
.card h3 a:hover { color: var(--blue); }
.empty-state { padding: 28px; border: 1px dashed var(--border); border-radius: var(--radius); background: var(--surface); color: var(--muted); }
.content-wrap { width: min(900px, calc(100% - 36px)); margin: 0 auto; padding: 60px 0 80px; }
.entry-header { margin-bottom: 30px; }
.entry-title { font-size: clamp(2rem, 4vw, 3.6rem); }
.entry-meta { color: var(--muted); margin-bottom: 14px; }
.entry-content { font-size: 1.05rem; }
.entry-content img { max-width: 100%; height: auto; border-radius: 16px; }
.entry-content a { color: var(--blue); }
.featured-single { width: 100%; height: auto; border-radius: 22px; margin-bottom: 30px; }
.archive-head { margin-bottom: 32px; }
.pagination { margin-top: 36px; }
.pagination .nav-links { display: flex; gap: 8px; flex-wrap: wrap; }
.pagination a, .pagination span { padding: 8px 12px; border: 1px solid var(--border); border-radius: 8px; text-decoration: none; }
.screen-reader-text { position:absolute; width:1px; height:1px; padding:0; margin:-1px; overflow:hidden; clip:rect(0,0,0,0); white-space:nowrap; border:0; }
.site-header .current-menu-item > a { color: var(--blue); }

@media (max-width: 782px) {
  body.admin-bar .site-header { top: 46px; }
}
.brand-logo img { width: 48px; height: 48px; object-fit: contain; border-radius: 12px; display: block; }
