:root {
  --color-bg: #dceef0;
  --color-surface: #ffffff;
  --color-surface-alt: #e8f4f5;
  --section-alt-bg: rgba(255, 255, 255, 0.42);
  --color-text: #14324d;
  --color-muted: #5e7180;
  --color-primary: #184b6b;
  --color-primary-dark: #10374d;
  --color-accent: #2e8b8b;
  --color-accent-soft: #dceef0;
  --color-border: rgba(20, 50, 77, 0.14);
  --shadow: 0 18px 44px rgba(15, 42, 60, 0.11);
  --radius: 8px;
  --font-heading: "Poppins", "Segoe UI", sans-serif;
  --font-body: "Work Sans", "Segoe UI", sans-serif;
  --container: min(1120px, calc(100% - 2rem));
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  overflow-x: hidden;
}

body {
  margin: 0;
  font-family: var(--font-body);
  color: var(--color-text);
  background: var(--color-bg);
  line-height: 1.6;
  overflow-x: hidden;
}

img {
  display: block;
  max-width: 100%;
  width: 100%;
  height: auto;
}

a {
  color: inherit;
  text-decoration: none;
}

button,
input,
textarea {
  font: inherit;
  min-width: 0;
}

button {
  cursor: pointer;
}

button:focus-visible,
a:focus-visible,
input:focus-visible,
textarea:focus-visible {
  outline: 3px solid var(--color-accent);
  outline-offset: 3px;
}

.skip-link {
  position: absolute;
  left: -999px;
  top: 0;
  z-index: 1000;
  background: var(--color-primary);
  color: white;
  padding: 0.75rem 1rem;
}

.skip-link:focus {
  left: 1rem;
  top: 1rem;
}

.container {
  width: var(--container);
  margin: 0 auto;
  min-width: 0;
}

.site-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  background: rgba(8, 28, 45, 0.22);
  border-bottom: 1px solid rgba(255, 255, 255, 0.2);
  backdrop-filter: blur(14px);
}

.site-header-solid {
  position: sticky;
  background: rgba(8, 28, 45, 0.26);
}

.nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 74px;
  width: calc(100% - 1rem);
  max-width: 1480px;
  margin: 0 auto;
  gap: 1rem;
}

.brand,
.footer-brand {
  display: inline-flex;
  align-items: center;
  gap: 0.75rem;
  min-width: 0;
  font-family: var(--font-heading);
  font-weight: 700;
}

.brand-logo {
  width: 70px;
  height: 70px;
  object-fit: contain;
  filter: brightness(0) invert(1) drop-shadow(0 2px 8px rgba(0, 0, 0, 0.35));
}

.brand-text {
  max-width: 260px;
  font-size: 1.08rem;
  line-height: 1.18;
  color: white;
  text-shadow: 0 2px 12px rgba(0, 0, 0, 0.45);
  overflow-wrap: normal;
}

.nav-toggle {
  display: inline-flex;
  flex-direction: column;
  gap: 4px;
  padding: 0.35rem;
  background: transparent;
  border: 0;
}

.nav-toggle span {
  width: 26px;
  height: 2px;
  background: white;
  border-radius: 999px;
}

.nav-links {
  display: none;
  flex-direction: column;
  gap: 0.85rem;
  position: absolute;
  right: 1rem;
  top: 78px;
  width: min(280px, calc(100vw - 2rem));
  min-width: 0;
  padding: 1rem;
  background: white;
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

.nav-links.is-open {
  display: flex;
}

.nav-links a {
  font-size: 1.2rem;
  font-weight: 600;
  color: white;
  text-shadow: 0 2px 10px rgba(0, 0, 0, 0.45);
}

.nav-links a:hover,
.nav-links a[aria-current="page"] {
  color: var(--color-accent);
}

.nav-links .nav-cta {
  display: inline-flex;
  justify-content: center;
  padding: 0.72rem 1rem;
  background: rgba(255, 255, 255, 0.18);
  color: white;
  border: 1px solid rgba(255, 255, 255, 0.5);
  border-radius: 999px;
}

.nav-links .nav-cta-secondary {
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.32);
}

.hero {
  position: relative;
  min-height: 100svh;
  display: grid;
  align-items: center;
  overflow: hidden;
  background-image: url("assets/images/hero-modern-building.png");
  background-size: cover;
  background-position: center;
  isolation: isolate;
}

.hero-overlay {
  position: absolute;
  inset: 0;
  z-index: -1;
  background:
    linear-gradient(90deg, rgba(9, 30, 47, 0.76) 0%, rgba(9, 30, 47, 0.52) 42%, rgba(9, 30, 47, 0.12) 100%),
    linear-gradient(0deg, rgba(9, 30, 47, 0.22), rgba(9, 30, 47, 0.04));
}

.hero-content {
  padding: 7.5rem 0 3.5rem;
}

.hero-copy {
  max-width: 680px;
  color: white;
}

.eyebrow,
.section-tag,
.widget-label {
  display: inline-block;
  margin: 0 0 0.75rem;
  color: var(--color-accent);
  font-size: 0.82rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.hero .eyebrow {
  color: #bff2e7;
}

.hero h1,
.portal-hero h1,
.section h2 {
  font-family: var(--font-heading);
  line-height: 1.12;
  letter-spacing: 0;
}

.hero h1 {
  max-width: 13ch;
  margin: 0 0 1rem;
  font-size: clamp(2.5rem, 6.4vw, 5.25rem);
}

.hero p {
  max-width: 620px;
  margin: 0;
  color: rgba(255, 255, 255, 0.88);
  font-size: clamp(1.05rem, 2vw, 1.24rem);
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.85rem;
  margin-top: 1.7rem;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 0.85rem 1.15rem;
  border: 0;
  border-radius: 999px;
  font-weight: 700;
  transition: transform 180ms ease, box-shadow 180ms ease, background 180ms ease;
}

.btn:hover {
  transform: translateY(-1px);
}

.btn-primary {
  background: var(--color-primary);
  color: white;
  box-shadow: var(--shadow);
}

.btn-news {
  background: #2a6787;
  color: white;
  box-shadow: var(--shadow);
}

.btn-secondary {
  background: var(--color-accent-soft);
  color: var(--color-primary-dark);
}

.btn-outline {
  background: transparent;
  color: var(--color-primary);
  border: 1px solid var(--color-border);
}

.btn-small {
  min-height: 38px;
  padding: 0.62rem 0.9rem;
  font-size: 0.9rem;
}

.site-frame {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 1rem;
  width: calc(100% - 1rem);
  max-width: 1480px;
  margin: 0.75rem auto 0;
}

.page-content {
  min-width: 0;
}

h1,
h2,
h3,
p,
a,
li,
span,
strong,
label {
  overflow-wrap: break-word;
}

.section {
  padding: 4rem 0;
}

.section-alt {
  background: var(--section-alt-bg);
}

.page-content .section-alt {
  box-shadow: 0 0 0 100vmax var(--section-alt-bg);
  clip-path: inset(0 -100vmax);
}

.section h2,
.portal-hero h1 {
  max-width: 24ch;
  margin: 0 0 1rem;
  font-size: clamp(1.65rem, 3vw, 2.35rem);
  overflow-wrap: normal;
}

.portal-hero h1 {
  max-width: 22ch;
  font-size: clamp(2.35rem, 4.7vw, 3.85rem);
}

.section p,
.card p,
.service-card p,
.step-card p,
.trust-card p,
.quote-card p,
.faq-answer p,
.location-list li,
.contact-copy p,
.review-copy p,
.post-card p {
  color: var(--color-muted);
}

.split-layout,
.contact-layout {
  display: grid;
  gap: 2rem;
}

.info-card,
.card,
.service-card,
.step-card,
.trust-card,
.quote-card,
.location-card,
.contact-form,
.review-form,
.widget,
.portal-widget,
.post-card {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

.info-card,
.card,
.service-card,
.step-card,
.trust-card,
.quote-card,
.contact-form,
.review-form,
.widget,
.portal-widget,
.post-card {
  padding: 1.25rem;
}

.info-card ul,
.location-list,
.contact-list,
.archive-list {
  display: grid;
  gap: 0.55rem;
  margin: 0;
  padding-left: 1.15rem;
}

.cards-grid,
.services-grid,
.steps-grid,
.trust-grid {
  display: grid;
  width: 100%;
  min-width: 0;
  gap: 1rem;
  margin-top: 1.5rem;
}

.card,
.service-card,
.step-card,
.trust-card,
.quote-card,
.post-card {
  min-width: 0;
  transition: transform 220ms ease, box-shadow 220ms ease;
}

.card h3,
.service-card h3,
.step-card h3,
.trust-card h3,
.quote-card h3 {
  overflow-wrap: normal;
  word-break: normal;
}

.card-media {
  width: 100%;
  aspect-ratio: 16 / 9;
  object-fit: cover;
  border-radius: calc(var(--radius) - 2px);
  margin-bottom: 0.9rem;
}

.card:hover,
.service-card:hover,
.step-card:hover,
.trust-card:hover,
.quote-card:hover,
.post-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 22px 48px rgba(15, 42, 60, 0.14);
}

.reveal {
  opacity: 0;
  transform: translateY(18px);
  transition: opacity 650ms ease, transform 650ms ease;
}

.reveal.is-visible {
  opacity: 1;
  transform: translateY(0);
}

.section-centered {
  text-align: center;
}

.section-heading-centered {
  max-width: 760px;
  margin: 0 auto 1.5rem;
}

.section-heading-centered h2 {
  max-width: none;
  margin-left: auto;
  margin-right: auto;
}

.centered-grid .card {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
}

.card-icon {
  display: grid;
  place-items: center;
  width: 48px;
  height: 48px;
  margin-bottom: 1rem;
  border-radius: var(--radius);
  background: var(--color-accent-soft);
  color: var(--color-primary);
  font-size: 1.35rem;
}

.card-icon svg {
  width: 29px;
  height: 29px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2.4;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.service-card {
  min-height: 170px;
}

.step-card {
  position: relative;
  padding-top: 2.6rem;
}

.step-number {
  position: absolute;
  top: 1rem;
  left: 1.25rem;
  color: var(--color-accent);
  font-weight: 700;
}

.trust-card {
  text-align: center;
}

.trust-number {
  display: block;
  color: var(--color-primary);
  font-family: var(--font-heading);
  font-size: 2rem;
  font-weight: 700;
  line-height: 1.2;
}

.quote-card {
  font-style: italic;
}

.review-form {
  display: grid;
  gap: 1rem;
  margin-top: 1.5rem;
}

.review-copy h3 {
  margin: 0 0 0.35rem;
  font-family: var(--font-heading);
}

.review-copy p {
  margin: 0;
}

.faq-list {
  display: grid;
  gap: 0.85rem;
  margin-top: 1.5rem;
}

.faq-item {
  overflow: hidden;
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  background: white;
}

.faq-question {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  padding: 1rem 1.1rem;
  border: 0;
  background: transparent;
  color: var(--color-text);
  text-align: left;
  font-weight: 700;
}

.faq-icon {
  color: var(--color-accent);
  font-size: 1.2rem;
}

.faq-answer {
  padding: 0 1.1rem 1rem;
}

.location-card {
  overflow: hidden;
  padding: 0;
}

.location-card img {
  aspect-ratio: 4 / 3;
  object-fit: cover;
}

.location-details {
  padding: 1rem 1.1rem 1.2rem;
}

.contact-form {
  display: grid;
  gap: 1rem;
}

.form-grid {
  display: grid;
  gap: 1rem;
}

label {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
  color: var(--color-text);
  font-weight: 700;
}

input,
textarea {
  width: 100%;
  padding: 0.85rem 0.95rem;
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  background: white;
  color: var(--color-text);
}

textarea {
  min-height: 120px;
  resize: vertical;
}

.privacy-note {
  margin: 0;
  color: var(--color-muted);
  font-size: 0.95rem;
}

.field-note {
  color: var(--color-muted);
  font-size: 0.95rem;
  font-weight: 500;
}

.form-actions {
  display: grid;
  gap: 0.75rem;
}

.form-status {
  min-height: 1.2rem;
  margin: 0;
  font-weight: 700;
}

.form-status.success {
  color: var(--color-accent);
}

.form-status.error {
  color: #b33a3a;
}

.visually-hidden {
  position: absolute;
  left: -9999px;
}

.ad-rail {
  display: grid;
  align-content: start;
  gap: 1rem;
}

.ad-card {
  display: grid;
  gap: 0.45rem;
  min-height: 130px;
  padding: 1rem;
  color: white;
  background:
    linear-gradient(145deg, rgba(24, 75, 107, 0.95), rgba(46, 139, 139, 0.88)),
    url("assets/images/hero-zgrada.webp") center / cover;
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  overflow: hidden;
}

.ad-card span {
  color: #c8fff3;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.ad-card strong {
  max-width: 16ch;
  font-family: var(--font-heading);
  font-size: 1.1rem;
  line-height: 1.2;
}

.ad-card small {
  color: rgba(255, 255, 255, 0.78);
}

.tall-ad {
  min-height: 280px;
}

.widget {
  display: grid;
  gap: 0.75rem;
}

.widget h2 {
  margin: 0;
  font-family: var(--font-heading);
  font-size: 1.15rem;
}

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

.split-map-link {
  display: block;
  overflow: hidden;
  border-radius: var(--radius);
  border: 1px solid var(--color-border);
  background: var(--color-accent-soft);
}

.split-map-link iframe {
  display: block;
  width: 100%;
  height: 230px;
  border: 0;
  pointer-events: none;
}

.weather-temp {
  color: var(--color-primary);
  font-family: var(--font-heading);
  font-size: 2.25rem;
  font-weight: 700;
  line-height: 1;
}

.analog-clock {
  position: relative;
  width: 148px;
  height: 148px;
  margin: 0.25rem auto;
  border: 8px solid var(--color-accent-soft);
  border-radius: 50%;
  background: radial-gradient(circle, white 0 62%, #f5fbfb 63% 100%);
  box-shadow: inset 0 0 0 1px var(--color-border);
}

.clock-number {
  position: absolute;
  width: 24px;
  height: 24px;
  display: grid;
  place-items: center;
  color: var(--color-muted);
  font-size: 0.72rem;
  font-weight: 700;
  line-height: 1;
}

.clock-12 {
  top: 7px;
  left: 50%;
  transform: translateX(-50%);
}

.clock-1 {
  top: 15px;
  right: 32px;
}

.clock-2 {
  top: 35px;
  right: 13px;
}

.clock-3 {
  top: 50%;
  right: 7px;
  transform: translateY(-50%);
}

.clock-4 {
  right: 13px;
  bottom: 35px;
}

.clock-5 {
  right: 32px;
  bottom: 15px;
}

.clock-6 {
  bottom: 7px;
  left: 50%;
  transform: translateX(-50%);
}

.clock-7 {
  left: 32px;
  bottom: 15px;
}

.clock-8 {
  left: 13px;
  bottom: 35px;
}

.clock-9 {
  top: 50%;
  left: 7px;
  transform: translateY(-50%);
}

.clock-10 {
  top: 35px;
  left: 13px;
}

.clock-11 {
  top: 15px;
  left: 32px;
}

.clock-hand {
  position: absolute;
  left: 50%;
  bottom: 50%;
  width: 3px;
  transform-origin: bottom center;
  border-radius: 999px;
  background: var(--color-primary);
}

.hour-hand {
  height: 42px;
}

.minute-hand {
  height: 54px;
}

.second-hand {
  width: 2px;
  height: 58px;
  background: var(--color-accent);
}

.clock-center {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: var(--color-primary);
  transform: translate(-50%, -50%);
}

#digitalClock {
  text-align: center;
  color: var(--color-primary);
  font-weight: 700;
}

.clock-date {
  margin: -0.2rem 0 0;
  text-align: center;
  color: var(--color-primary-dark);
  font-weight: 700;
}

.portal-hero {
  padding: 8.5rem 0 3rem;
  background:
    linear-gradient(90deg, rgba(9, 30, 47, 0.82), rgba(9, 30, 47, 0.45)),
    url("assets/images/hero-modern-building.png") center / cover;
  color: white;
}

.portal-hero-inner {
  display: grid;
  gap: 1.5rem;
  align-items: end;
}

.portal-hero p {
  max-width: 620px;
  color: rgba(255, 255, 255, 0.86);
}

.portal-search {
  display: grid;
  gap: 0.45rem;
  padding: 0.85rem;
  background: rgba(255, 255, 255, 0.94);
  border-radius: var(--radius);
  color: var(--color-text);
  box-shadow: var(--shadow);
}

.portal-search label {
  font-size: 0.92rem;
  font-weight: 700;
}

.portal-search .search-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 0.45rem;
  align-items: center;
}

.portal-search input {
  min-height: 38px;
  padding: 0.62rem 0.75rem;
}

.portal-search .btn {
  min-height: 38px;
  padding: 0.62rem 0.78rem;
  font-size: 0.9rem;
  box-shadow: none;
}

.projects-cta-band {
  padding: 0 0 2.5rem;
  background: var(--color-bg);
}

.projects-cta-inner {
  display: flex;
  flex-wrap: wrap;
  gap: 0.85rem;
  justify-content: center;
}

.search-row {
  display: grid;
  gap: 0.75rem;
}

.portal-layout {
  display: grid;
  gap: 1.2rem;
  align-items: start;
}

.article-list {
  display: grid;
  gap: 1rem;
  min-width: 0;
}

.post-card {
  position: relative;
  display: grid;
  gap: 0.75rem;
  overflow: hidden;
  padding: 0;
}

.post-card > div {
  display: grid;
  gap: 0.65rem;
  padding: 1.15rem;
}

.post-card img {
  display: block;
  width: 100%;
  aspect-ratio: 16 / 9;
  object-fit: cover;
}

.portal-post-image {
  min-height: 180px;
  background: var(--color-accent-soft);
}

.post-card > img,
.post-card h2 {
  cursor: pointer;
}

.post-card > img:hover,
.post-card h2:hover {
  color: var(--color-primary);
}

.post-card h2 {
  margin: 0;
  font-family: var(--font-heading);
  font-size: clamp(1.25rem, 2vw, 1.65rem);
  line-height: 1.2;
  overflow-wrap: normal;
}

.post-card p {
  margin: 0;
}

.post-meta {
  color: var(--color-accent);
  font-size: 0.85rem;
  font-weight: 700;
}

.post-details {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem 0.75rem;
  color: var(--color-muted);
  font-size: 0.82rem;
  font-weight: 700;
  overflow-wrap: break-word;
}

.post-id-badge {
  position: absolute;
  top: 0.8rem;
  right: 0.8rem;
  z-index: 2;
  padding: 0.34rem 0.58rem;
  background: rgba(255, 255, 255, 0.94);
  border: 1px solid rgba(20, 50, 77, 0.14);
  border-radius: 999px;
  color: var(--color-primary-dark);
  font-size: 0.78rem;
  font-weight: 800;
  line-height: 1;
  box-shadow: 0 10px 24px rgba(15, 42, 60, 0.16);
}

.text-link {
  width: fit-content;
  padding: 0;
  border: 0;
  background: transparent;
  color: var(--color-primary);
  font-weight: 700;
  text-align: left;
}

.article-body {
  display: none;
}

.portal-sidebar {
  display: grid;
  gap: 1rem;
  align-content: start;
  min-width: 0;
}

.news-page .portal-sidebar {
  position: sticky;
  top: 96px;
  align-self: start;
}

.news-page .site-frame {
  display: block;
  width: 100%;
  max-width: none;
  margin: 0;
}

.news-page .site-frame > .ad-rail {
  display: none;
}

.news-page .site-frame > .page-content {
  width: 100%;
  min-width: 0;
}

.news-page .portal-layout {
  width: min(1120px, calc(100vw - 2rem));
  max-width: 1120px;
  margin: 0 auto;
}

.portal-widget h2 {
  margin: 0 0 0.8rem;
  font-family: var(--font-heading);
  font-size: 1.1rem;
}

.filter-list {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.filter-button {
  min-height: 38px;
  padding: 0.5rem 0.78rem;
  border: 1px solid var(--color-border);
  border-radius: 999px;
  background: white;
  color: var(--color-text);
  font-weight: 700;
}

.filter-button.is-active {
  background: var(--color-primary);
  color: white;
}

.archive-list,
.popular-list {
  display: grid;
  gap: 0.55rem;
}

.empty-state {
  margin: 0;
  padding: 1rem;
  background: white;
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  color: var(--color-muted);
}

.admin-login-section {
  padding-top: 0;
}

.admin-login-panel {
  display: grid;
  gap: 1.2rem;
  padding: 1.25rem;
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

.admin-login-copy {
  display: grid;
  gap: 0.7rem;
}

.admin-login-copy h2,
.admin-login-copy p {
  margin: 0;
}

.admin-login-form {
  align-self: center;
  display: grid;
  gap: 0.85rem;
}

.admin-login-form .btn {
  width: fit-content;
}

.page-counter {
  display: inline-grid;
  grid-template-columns: auto auto;
  align-items: center;
  gap: 0.45rem;
  width: fit-content;
  max-width: 100%;
  color: var(--color-primary-dark);
  font-weight: 700;
}

.page-counter span {
  display: inline-flex;
  align-items: center;
  min-width: 0;
  width: fit-content;
  padding: 0.45rem 0;
}

.page-counter strong {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  justify-self: start;
  min-width: 3.25rem;
  padding: 0.45rem 0.75rem;
  background: var(--color-accent-soft);
  border-radius: 999px;
  font-size: 1.25rem;
}

.article-modal {
  position: fixed;
  inset: 0;
  z-index: 200;
  display: grid;
  place-items: center;
  padding: 1rem;
}

.article-modal[hidden] {
  display: none;
}

/* Author display rules (grid/flex) must respect filtering and hidden templates. */
[hidden] {
  display: none !important;
}

.openable-card {
  cursor: pointer;
}

.openable-card:focus-visible {
  outline: 3px solid var(--color-primary);
  outline-offset: 4px;
}

.article-modal-panel.card-dialog {
  position: fixed;
  inset: 0;
  margin: auto;
  padding: 0;
  border: 0;
  width: min(760px, calc(100% - 2rem));
}

.card-dialog::backdrop {
  background: rgba(8, 28, 45, 0.68);
}

.card-dialog > img {
  width: 100%;
  max-height: 55svh;
  object-fit: contain;
}

.home-card-content {
  display: grid;
  gap: 0.8rem;
}

.article-modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(8, 28, 45, 0.68);
}

.article-modal-panel {
  position: relative;
  z-index: 1;
  width: min(760px, 100%);
  max-height: min(820px, calc(100svh - 2rem));
  overflow: auto;
  background: white;
  border-radius: var(--radius);
  box-shadow: 0 28px 70px rgba(5, 22, 36, 0.35);
}

.article-modal.is-expanded .article-modal-panel {
  width: min(1120px, calc(100% - 2rem));
  max-height: calc(100svh - 2rem);
}

.article-modal-panel > img {
  display: block;
  width: auto;
  max-width: 100%;
  height: auto;
  margin: 0 auto;
}

.article-modal-content {
  display: grid;
  gap: 0.8rem;
  padding: 1.35rem;
}

.article-modal-content h2,
.article-modal-content h3 {
  margin: 0;
  font-family: var(--font-heading);
  line-height: 1.18;
  overflow-wrap: normal;
}

.article-modal-content h3 {
  margin-top: 0.35rem;
  font-size: 1rem;
}

.article-modal-content p,
.article-modal-content figure {
  margin: 0;
}

.article-modal-content p {
  color: var(--color-muted);
}

.article-modal-content figure {
  display: grid;
  gap: 0.45rem;
}

#articleModalFull {
  display: grid;
  gap: 0.85rem;
}

#articleModalFull figure,
#articleModalFull .wp-block-image,
#articleModalFull .wp-block-image.size-full,
#articleModalFull .wp-block-image.size-large {
  display: block;
  max-width: 100% !important;
}

#articleModalFull figure.aligncenter,
#articleModalFull .wp-block-image.aligncenter {
  margin-left: auto;
  margin-right: auto;
  text-align: center;
}

#articleModalFull figure.aligncenter img,
#articleModalFull .wp-block-image.aligncenter img,
#articleModalFull img.aligncenter {
  margin-left: auto;
  margin-right: auto;
}

#articleModalFull figure.alignleft,
#articleModalFull .wp-block-image.alignleft {
  float: left;
  margin: 0.25rem 1rem 0.75rem 0;
}

#articleModalFull figure.alignright,
#articleModalFull .wp-block-image.alignright {
  float: right;
  margin: 0.25rem 0 0.75rem 1rem;
}

#articleModalFull img {
  display: block;
  width: auto !important;
  max-width: 100% !important;
  height: auto !important;
  max-height: none;
  aspect-ratio: auto;
  border: 0;
  border-radius: 0;
  background: transparent;
}

#articleModalFull::after {
  display: block;
  clear: both;
  content: "";
}

#articleModalFull figcaption {
  margin-top: 0.45rem;
  color: var(--color-muted);
  font-size: 0.9rem;
  text-align: center;
}

.article-modal-actions {
  position: sticky;
  top: 0.85rem;
  z-index: 2;
  display: flex;
  justify-content: flex-end;
  gap: 0.5rem;
  margin: 0.85rem 0.85rem -4.25rem;
  pointer-events: none;
}

.article-modal-close,
.article-modal-expand {
  position: relative;
  display: grid;
  place-items: center;
  width: 52px;
  height: 52px;
  border: 1px solid rgba(255, 255, 255, 0.58);
  border-radius: 16px;
  background: rgba(8, 28, 45, 0.9);
  color: white;
  font-size: 0;
  line-height: 1;
  backdrop-filter: blur(12px);
  box-shadow: 0 16px 36px rgba(5, 22, 36, 0.34);
  pointer-events: auto;
  transition: transform 0.18s ease, background 0.18s ease, border-color 0.18s ease;
}

.article-modal-expand svg {
  width: 25px;
  height: 25px;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 2.2;
}

.article-modal-close::before,
.article-modal-close::after {
  position: absolute;
  width: 22px;
  height: 2px;
  background: currentColor;
  border-radius: 999px;
  content: "";
}

.article-modal-close::before {
  transform: rotate(45deg);
}

.article-modal-close::after {
  transform: rotate(-45deg);
}

.article-modal-close:hover,
.article-modal-expand:hover {
  border-color: rgba(255, 255, 255, 0.78);
  background: var(--color-primary-dark);
  transform: translateY(-2px);
}

.article-modal-expand span {
  display: none;
}

.site-footer {
  padding: 2rem 0 4rem;
}

.footer-wrap {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  padding-top: 1.25rem;
  border-top: 1px solid var(--color-border);
}

.footer-brand img {
  width: 52px;
  height: 52px;
  object-fit: contain;
}

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

.back-to-top {
  position: fixed;
  right: 1rem;
  bottom: 1rem;
  z-index: 90;
  display: none;
  width: 48px;
  height: 48px;
  border: 0;
  border-radius: 50%;
  background: var(--color-primary);
  color: white;
  box-shadow: var(--shadow);
}

.back-to-top.is-visible {
  display: grid;
  place-items: center;
}

.cookie-banner {
  position: fixed;
  left: 1rem;
  right: 1rem;
  bottom: 1rem;
  z-index: 120;
  display: none;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 1rem;
  background: white;
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

.cookie-banner.is-visible {
  display: flex;
  flex-wrap: wrap;
}

.cookie-banner p {
  margin: 0;
}

.cookie-actions {
  display: flex;
  gap: 0.6rem;
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    animation: none !important;
    transition: none !important;
  }
}

@media (min-width: 700px) {
  .nav-toggle {
    display: none;
  }

  .nav-links {
    display: flex;
    position: static;
    flex-direction: row;
    align-items: center;
    gap: 0.68rem;
    width: auto;
    min-width: auto;
    padding: 0;
    background: transparent;
    border: 0;
    box-shadow: none;
  }

  .nav-links a {
    font-size: 1.08rem;
    white-space: nowrap;
  }

  .nav-links .nav-cta {
    padding: 0.66rem 0.9rem;
  }

  .split-layout,
  .contact-layout {
    grid-template-columns: minmax(320px, 1.05fr) minmax(280px, 0.95fr);
    align-items: center;
  }

  .cards-grid,
  .services-grid {
    grid-template-columns: repeat(2, minmax(260px, 1fr));
  }

  .steps-grid,
  .trust-grid {
    grid-template-columns: repeat(2, minmax(240px, 1fr));
  }

  .form-grid,
  .search-row {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .portal-search .search-row {
    grid-template-columns: minmax(0, 1fr) auto;
  }

  .portal-hero-inner {
    grid-template-columns: minmax(0, 1fr) minmax(320px, 420px);
  }

  .portal-layout {
    grid-template-columns: minmax(0, 1fr) 290px;
  }

  .article-list {
    grid-column: 1;
    grid-row: 1;
  }

  .portal-sidebar {
    grid-column: 2;
    grid-row: 1;
  }

  .admin-login-panel {
    grid-template-columns: minmax(0, 1fr) minmax(280px, 360px);
    align-items: center;
  }

  .article-list {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    align-content: start;
  }

  .empty-state {
    grid-column: 1 / -1;
  }
}

@media (min-width: 1180px) {
  .news-page .portal-layout {
    grid-template-columns: minmax(0, 1fr) 290px;
  }

  .news-page .article-list {
    grid-column: 1;
    grid-row: 1;
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .news-page .portal-sidebar {
    grid-column: 2;
    grid-row: 1;
  }
}

@media (min-width: 700px) and (max-width: 1279px) {
  .nav-toggle {
    display: inline-flex;
  }

  .nav-links {
    display: none;
    position: absolute;
    top: 78px;
    right: 1rem;
    flex-direction: column;
    align-items: stretch;
    gap: 0.85rem;
    width: min(280px, calc(100vw - 2rem));
    min-width: 0;
    padding: 1rem;
    background: rgba(8, 28, 45, 0.94);
    border: 1px solid rgba(255, 255, 255, 0.18);
    box-shadow: var(--shadow);
  }

  .nav-links.is-open {
    display: flex;
  }

  .nav-links a {
    font-size: 1.08rem;
    white-space: normal;
  }

  .nav-links .nav-cta {
    padding: 0.72rem 1rem;
  }
}

@media (min-width: 1180px) {
  .site-frame {
    grid-template-columns: 156px minmax(0, 1fr) 220px;
    gap: 1.25rem;
  }

  .page-content .container {
    width: 100%;
    max-width: 1120px;
  }

  .ad-rail {
    position: sticky;
    top: 92px;
  }
}

@media (min-width: 1400px) {
  .services-grid {
    grid-template-columns: repeat(4, minmax(220px, 1fr));
  }

  .cards-grid {
    grid-template-columns: repeat(3, minmax(260px, 1fr));
  }

  .steps-grid,
  .trust-grid {
    grid-template-columns: repeat(4, minmax(220px, 1fr));
  }
}

@media (max-width: 1179px) {
  .ad-rail {
    width: var(--container);
    margin: 0 auto;
  }

  .ad-rail-left {
    order: 2;
  }

  .page-content {
    order: 1;
  }

  .ad-rail-right {
    order: 3;
  }

  .tall-ad {
    min-height: 170px;
  }
}

@media (max-width: 699px) {
  :root {
    --container: min(1120px, calc(100% - 1.25rem));
  }

  .nav {
    gap: 0.65rem;
  }

  .brand-logo {
    width: 52px;
    height: 52px;
  }

  .brand-text {
    max-width: min(165px, calc(100vw - 145px));
    font-size: 0.88rem;
  }

  .nav-links {
    left: 1rem;
    right: 1rem;
    width: auto;
    min-width: 0;
    max-width: calc(100vw - 2rem);
    background: rgba(8, 28, 45, 0.94);
    border-color: rgba(255, 255, 255, 0.18);
  }

  .nav-links a {
    font-size: 1.08rem;
  }

  .hero {
    min-height: 100svh;
    background-position: 60% center;
  }

  .hero-overlay {
    background: linear-gradient(90deg, rgba(9, 30, 47, 0.82), rgba(9, 30, 47, 0.42));
  }

  .hero h1 {
    max-width: 11ch;
    font-size: clamp(2.1rem, 11vw, 3rem);
  }

  .hero-actions .btn {
    width: 100%;
  }

  .section {
    padding: 3rem 0;
  }

  .portal-hero {
    padding: 7rem 0 2.5rem;
  }

  .portal-hero h1 {
    font-size: clamp(2.05rem, 10vw, 2.65rem);
  }

  .card,
  .service-card,
  .step-card,
  .trust-card,
  .quote-card,
  .contact-form,
  .review-form,
  .widget,
  .portal-widget,
  .post-card,
  .admin-login-panel {
    padding: 1rem;
  }

  .post-card {
    padding: 0;
  }

  .news-page .portal-sidebar {
    position: static;
  }

  .page-counter {
    grid-template-columns: minmax(0, 1fr);
    gap: 0.35rem;
  }

  .article-modal {
    padding: 0.65rem;
  }

  .article-modal-content {
    padding: 1rem;
  }

  .cookie-banner {
    align-items: stretch;
  }

  .cookie-actions,
  .cookie-actions .btn {
    width: 100%;
  }

  .cookie-actions {
    flex-direction: column;
  }
}

@media (max-width: 360px) {
  .brand-logo {
    width: 48px;
    height: 48px;
  }

  .brand-text {
    max-width: 132px;
    font-size: 0.84rem;
  }

  .nav-links a {
    font-size: 1rem;
  }

  .nav-links .nav-cta {
    padding: 0.62rem 0.75rem;
  }
}

@media (min-width: 700px) {
  .split-layout,
  .contact-layout {
    grid-template-columns: 1.05fr 0.95fr;
  }
}

/* Final layout lock for production/CDN builds. */
#sadrzaj:not(.news-page) .site-frame {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  width: 100%;
  max-width: none;
  margin: 0;
}

#sadrzaj:not(.news-page) .page-content {
  order: 1;
}

#sadrzaj:not(.news-page) .ad-rail-left {
  order: 2;
}

#sadrzaj:not(.news-page) .ad-rail-right {
  order: 3;
}

#sadrzaj:not(.news-page) .ad-rail {
  display: grid;
  width: var(--container);
  margin: 1rem auto;
}

#sadrzaj:not(.news-page) .page-content {
  min-width: 0;
  width: 100%;
}

#sadrzaj:not(.news-page) .cards-grid,
#sadrzaj:not(.news-page) .services-grid,
#sadrzaj:not(.news-page) .steps-grid,
#sadrzaj:not(.news-page) .trust-grid {
  display: grid;
  width: 100%;
  min-width: 0;
  align-items: stretch;
}

#sadrzaj:not(.news-page) .card,
#sadrzaj:not(.news-page) .service-card,
#sadrzaj:not(.news-page) .step-card,
#sadrzaj:not(.news-page) .trust-card,
#sadrzaj:not(.news-page) .quote-card {
  min-width: 0;
}

#sadrzaj:not(.news-page) .card h3,
#sadrzaj:not(.news-page) .service-card h3,
#sadrzaj:not(.news-page) .step-card h3 {
  overflow-wrap: normal;
  word-break: normal;
}

@media (min-width: 700px) {
  #sadrzaj:not(.news-page) .cards-grid,
  #sadrzaj:not(.news-page) .services-grid {
    grid-template-columns: repeat(2, minmax(260px, 1fr));
  }

  #sadrzaj:not(.news-page) .steps-grid,
  #sadrzaj:not(.news-page) .trust-grid {
    grid-template-columns: repeat(2, minmax(240px, 1fr));
  }
}

@media (min-width: 1600px) {
  #sadrzaj:not(.news-page) .site-frame {
    display: block;
    width: 100%;
    max-width: none;
    margin: 0;
  }

  #sadrzaj:not(.news-page) .page-content .container {
    width: var(--container);
    max-width: 1120px;
  }

  #sadrzaj:not(.news-page) .ad-rail {
    position: fixed;
    top: 92px;
    z-index: 20;
    width: 170px;
    margin: 0;
    max-height: calc(100svh - 110px);
    overflow: auto;
  }

  #sadrzaj:not(.news-page) .ad-rail-left {
    left: max(1rem, calc((100vw - 1560px) / 2));
  }

  #sadrzaj:not(.news-page) .ad-rail-right {
    right: max(1rem, calc((100vw - 1560px) / 2));
  }
}

@media (min-width: 1400px) {
  #sadrzaj:not(.news-page) .cards-grid {
    grid-template-columns: repeat(3, minmax(260px, 1fr));
  }

  #sadrzaj:not(.news-page) .services-grid {
    grid-template-columns: repeat(4, minmax(220px, 1fr));
  }

  #sadrzaj:not(.news-page) .steps-grid,
  #sadrzaj:not(.news-page) .trust-grid {
    grid-template-columns: repeat(4, minmax(220px, 1fr));
  }
}

@media (max-width: 1179px) {
  #sadrzaj:not(.news-page) .site-frame {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
  }

  #sadrzaj:not(.news-page) .ad-rail {
    width: var(--container);
    margin: 0 auto;
  }
}

/* Stable homepage info block for Netlify/live preview. */
#sadrzaj:not(.news-page) .home-status-section {
  display: block;
  padding: 2rem 0;
  background: var(--color-bg);
}

#sadrzaj:not(.news-page) .home-status-grid {
  display: grid;
  gap: 1rem;
  align-items: stretch;
}

#sadrzaj:not(.news-page) .home-sponsor-panel {
  display: grid;
  gap: 1rem;
}

#sadrzaj:not(.news-page) > .site-frame {
  display: block;
  width: 100%;
  max-width: none;
  margin: 0;
}

#sadrzaj:not(.news-page) > .site-frame > .ad-rail {
  display: none;
}

#sadrzaj:not(.news-page) > .site-frame > .page-content {
  width: 100%;
}

#sadrzaj:not(.news-page) > .site-frame > .page-content .container {
  width: var(--container);
  max-width: 1120px;
}

@media (min-width: 700px) {
  #sadrzaj:not(.news-page) .home-status-grid {
    grid-template-columns: repeat(2, minmax(260px, 1fr));
  }
}

@media (min-width: 1180px) {
  #sadrzaj:not(.news-page) .home-status-grid {
    grid-template-columns: minmax(220px, 1fr) minmax(220px, 1fr) minmax(260px, 1.15fr) minmax(220px, 0.95fr);
  }
}

/* Homepage production layout: content left, live info and sponsors right. */
#sadrzaj:not(.news-page) {
  overflow-x: clip;
}

#sadrzaj:not(.news-page) > .hero {
  width: 100vw;
  max-width: 100vw;
  margin-left: calc(50% - 50vw);
  margin-right: calc(50% - 50vw);
}

#sadrzaj:not(.news-page) > .site-frame > .ad-rail {
  display: none;
}

#sadrzaj:not(.news-page) > .site-frame > .page-content,
#sadrzaj:not(.news-page) > .site-frame > .page-content .container,
#sadrzaj:not(.news-page) .home-status-section > .container {
  min-width: 0;
}

#sadrzaj:not(.news-page) .home-status-section {
  background: transparent;
}

#sadrzaj:not(.news-page) .home-status-section > .container {
  width: min(1120px, calc(100% - 2rem));
}

@media (min-width: 1180px) {
  #sadrzaj:not(.news-page) {
    display: grid;
    grid-template-columns: minmax(0, 1120px) minmax(230px, 260px);
    column-gap: 1rem;
    justify-content: center;
    align-items: start;
  }

  #sadrzaj:not(.news-page) > .hero {
    grid-column: 1 / -1;
  }

  #sadrzaj:not(.news-page) > .home-status-section {
    grid-column: 2;
    grid-row: 2;
    width: 100%;
    padding: 2rem 0 0;
    position: sticky;
    top: 92px;
    z-index: 5;
  }

  #sadrzaj:not(.news-page) > .home-status-section > .container {
    width: 100%;
    max-width: none;
  }

  #sadrzaj:not(.news-page) .home-status-grid {
    grid-template-columns: minmax(0, 1fr);
    gap: 0.75rem;
  }

  #sadrzaj:not(.news-page) .home-status-section .widget,
  #sadrzaj:not(.news-page) .home-status-section .ad-card {
    padding: 0.8rem;
  }

  #sadrzaj:not(.news-page) .home-status-section .widget h2 {
    font-size: 0.98rem;
  }

  #sadrzaj:not(.news-page) .home-status-section .widget-label {
    font-size: 0.68rem;
    letter-spacing: 0.08em;
  }

  #sadrzaj:not(.news-page) .home-status-section .weather-temp {
    font-size: 2rem;
  }

  #sadrzaj:not(.news-page) .home-status-section .split-map-link iframe {
    height: 190px;
  }

  #sadrzaj:not(.news-page) .home-status-section .analog-clock {
    width: 148px;
    height: 148px;
    border-width: 8px;
  }

  #sadrzaj:not(.news-page) .home-status-section .clock-number {
    font-size: 0.72rem;
  }

  #sadrzaj:not(.news-page) .home-status-section .ad-card {
    min-height: 112px;
  }

  #sadrzaj:not(.news-page) .home-status-section .ad-card strong {
    max-width: 15ch;
    font-size: 1rem;
  }

  #sadrzaj:not(.news-page) .home-status-section .ad-card span,
  #sadrzaj:not(.news-page) .home-status-section .ad-card small {
    font-size: 0.68rem;
  }

  #sadrzaj:not(.news-page) > .site-frame {
    grid-column: 1;
    grid-row: 2;
    display: block;
    width: 100%;
    max-width: none;
    margin: 0;
  }

  #sadrzaj:not(.news-page) > .site-frame > .page-content .container {
    width: min(1120px, calc(100% - 2rem));
    max-width: 1120px;
  }
}

@media (max-width: 1179px) {
  #sadrzaj:not(.news-page) {
    display: block;
  }

  #sadrzaj:not(.news-page) .home-status-section {
    padding: 1.25rem 0 0;
  }

  #sadrzaj:not(.news-page) .home-status-grid {
    grid-template-columns: repeat(auto-fit, minmax(min(100%, 260px), 1fr));
  }
}
