/*
Theme Name: KNC Theme
Theme URI: https://krizinionestumocentras.lt
Description: Custom theme for Krizinio nėštumo centras
Version: 1.0.0
Author: KNC
Text Domain: knc-theme
*/

/* ─── Brand tokens ─────────────────────────────────────────── */
:root {
  --colorPrimary:    #ee9795;
  --colorBlue:       #2e327b;
  --colorGreen:      #379E8F;
  --colorRed:        #ee9795;
  --colorOrange:     #633f10;
  --colorBlack:      #1c1c1c;
  --colorLightBlack: #393939;
  --colorWhite:      #ffffff;
  --colorLightGray:  #f5f5f5;

  --font-main: 'Graphik', 'Manrope', sans-serif;
  --container-width: 1200px;
  --header-height: 72px;
}

/* ─── Global Kirby CTA buttons ─────────────────────────────── */
a.cta, a.cta-big, .buttonPile > a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.65rem 1.5rem;
  border-radius: 50px;
  font-size: 0.8rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  text-decoration: none !important;
  margin: 0.35rem 0.35rem 0 0;
  line-height: 1.3;
  cursor: pointer;
}

/* ─── Kirby color class mappings ───────────────────────────── */
.bgcolorBlue    { background: var(--colorBlue)   !important; }
.bgcolorPrimary { background: var(--colorPrimary) !important; }
.bgcolorRed     { background: var(--colorPrimary) !important; }
.bgcolorGreen   { background: var(--colorGreen)   !important; }
.bgcolorOrange  { background: var(--colorOrange)  !important; }
.bgcolorWhite   { background: var(--colorWhite)   !important; }
.colorWhite     { color: var(--colorWhite)        !important; }
.colorBlue      { color: var(--colorBlue)         !important; }
.colorBlack     { color: var(--colorBlack)        !important; }
.colorLightBlack{ color: var(--colorLightBlack)   !important; }

/* ─── Reset / base ─────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: smooth; }

body {
  font-family: var(--font-main);
  font-size: 16px;
  line-height: 1.6;
  color: var(--colorLightBlack);
  background: #f6f2f3;   /* warm off-white, matches source */
}

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

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

h1, h2, h3, h4, h5, h6 {
  font-weight: 400;
  line-height: 1.2;
  color: var(--colorBlack);
}

/* ─── Layout helpers ───────────────────────────────────────── */
.container {
  max-width: var(--container-width);
  margin: 0 auto;
  padding: 0 1.5rem;
}

/* Original site grid system */
.grid {
  display: grid;
  grid-template-columns: repeat(12, 1fr);
  gap: 1.5rem;
}

.column {
  grid-column: span var(--columns, 12);
}

@media (max-width: 768px) {
  .column { grid-column: span 12; }
}

/* ─── Header ───────────────────────────────────────────────── */
#site-header {
  position: sticky;
  top: 0;
  z-index: 1000;
  background: var(--colorWhite);
  box-shadow: 0 1px 6px rgba(0,0,0,0.07);
  height: var(--header-height);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 100%;
  gap: 1rem;
}

.site-logo {
  flex-shrink: 0;            /* never let the menu squeeze the logo */
}

.site-logo a {
  display: flex;
  align-items: center;
  text-decoration: none;
}

.site-logo img {
  height: 64px;
  width: auto;
  max-width: none;          /* override global img max-width:100% */
}

/* Header right: social + CTA buttons */
.header-right {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  flex-shrink: 0;
}

.header-social {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  color: var(--colorLightBlack);
}

.header-social a {
  display: flex;
  align-items: center;
  color: var(--colorLightBlack);
  transition: color 0.15s;
}

.header-social a:hover { color: var(--colorBlue); }

/* Pill buttons */
.btn-pill {
  display: inline-flex;
  align-items: center;
  padding: 0.45rem 1.1rem;
  border-radius: 50px;
  font-size: 0.85rem;
  font-weight: 600;
  text-decoration: none !important;
  white-space: nowrap;
  transition: background 0.15s, color 0.15s;
}

.btn-pill.btn-blue {
  background: var(--colorBlue);
  color: var(--colorWhite) !important;
}

.btn-pill.btn-blue:hover {
  background: #1f2258;
}

.btn-pill.btn-pink {
  background: var(--colorPrimary);
  color: var(--colorWhite) !important;
}

.btn-pill.btn-pink:hover {
  background: #d97b79;
}

/* Language switcher */
.lang-switcher {
  display: flex;
  gap: 0.35rem;
  list-style: none;
  margin: 0;
  padding: 0;
  font-size: 0.8rem;
  text-transform: uppercase;
}
.lang-switcher li { line-height: 1; }
.lang-switcher a {
  color: var(--colorLightBlack);
  text-decoration: none;
  font-weight: 600;
  padding: 0.2rem 0.35rem;
}
.lang-switcher .current-lang a,
.lang-switcher a:hover { color: var(--colorBlue); }

/* ─── Navigation ───────────────────────────────────────────── */
#site-nav ul {
  display: flex;
  align-items: center;
  gap: 0;
  list-style: none;
}

#site-nav > ul > li {
  position: relative;
}

#site-nav > ul > li > a {
  display: block;
  padding: 0.5rem 0.85rem;
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--colorBlack);
  transition: color 0.15s;
  white-space: nowrap;
  text-decoration: none !important;
}

#site-nav > ul > li > a:hover,
#site-nav > ul > li.current-menu-item > a {
  color: var(--colorBlue);
}

/* Dropdown */
#site-nav ul ul {
  display: none;
  position: absolute;
  top: 100%;
  left: 0;
  min-width: 240px;
  background: var(--colorWhite);
  border-top: 2px solid var(--colorPrimary);
  box-shadow: 0 4px 16px rgba(0,0,0,0.12);
  list-style: none;
  z-index: 100;
}

#site-nav ul ul li a {
  display: block;
  padding: 0.6rem 1.25rem;
  font-size: 0.875rem;
  color: var(--colorLightBlack);
  border-bottom: 1px solid #f0f0f0;
  transition: background 0.1s, color 0.1s;
}

#site-nav ul ul li a:hover {
  background: var(--colorLightGray);
  color: var(--colorBlue);
  text-decoration: none;
}

#site-nav ul li:hover > ul { display: block; }

/* Donate CTA button in nav */
.nav-cta {
  display: inline-block;
  padding: 0.5rem 1.25rem;
  background: var(--colorPrimary);
  color: var(--colorWhite) !important;
  border-radius: 2px;
  font-weight: 500;
  font-size: 0.875rem;
  margin-left: 0.5rem;
  transition: background 0.15s;
}

.nav-cta:hover {
  background: var(--colorBlue) !important;
  text-decoration: none !important;
}

/* Hamburger (mobile) */
.nav-toggle {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  padding: 0.5rem;
}

.nav-toggle span {
  display: block;
  width: 24px;
  height: 2px;
  background: var(--colorBlack);
  margin: 5px 0;
  transition: 0.2s;
}

@media (max-width: 900px) {
  .nav-toggle { display: block; }

  .header-social,
  .btn-pill { display: none; }

  #site-nav {
    display: none;
    position: absolute;
    top: var(--header-height);
    left: 0;
    right: 0;
    background: var(--colorWhite);
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
    padding: 1rem 1.5rem;
    z-index: 999;
  }

  #site-nav.open { display: block; }

  #site-nav ul {
    flex-direction: column;
    align-items: flex-start;
    gap: 0;
  }

  #site-nav > ul > li { width: 100%; }

  #site-nav > ul > li > a {
    padding: 0.75rem 0;
    border-bottom: 1px solid #f0f0f0;
    width: 100%;
  }

  #site-nav ul ul {
    display: block;
    position: static;
    box-shadow: none;
    border-top: none;
    padding-left: 1rem;
  }
}

/* ─── Kirby layout classes (used in page content) ───────────── */
.flex          { display: flex; }
.flex-v        { display: flex; flex-direction: column; width: 100%; }
.flex-h        { display: flex; flex-direction: row; flex-wrap: wrap; width: 100%; }
.valign-center { justify-content: center; }
.valign-bottom { justify-content: flex-end; }
.halign-left   { align-items: flex-start; }
.halign-center { align-items: center; }
.h-large       { min-height: 520px; }
.h-medium      { min-height: 320px; }
.full-width    { width: 100%; }
.padding-s     { padding: 2rem 3rem; }
.padding-m     { padding: 3rem; }
.mbottom-true  { margin-bottom: 2rem; }
.mbottom-false { margin-bottom: 0; }

/* Kirby grid inside content */
.entry-content .grid,
.entry-content section.grid {
  display: grid;
  grid-template-columns: repeat(12, 1fr);
  gap: 1.5rem;
}

.entry-content .column {
  grid-column: span var(--columns, 12);
}

@media (max-width: 768px) {
  .entry-content .column { grid-column: span 12; }
}

/* ─── Hero block (front page) ──────────────────────────────── */
/* background-image injected via functions.php wp_head hook */
.block-type-hero {
  background-color: #f0ebe5;
}

.block-type-hero section.hero { width: 100%; }

.block-type-hero .hero > .container {
  max-width: var(--container-width);
  margin: 0 auto;
  padding: 0 3rem;
  width: 100%;
}

.block-type-hero .padding-left-setting {
  width: 100%;
  display: block;
}

/* Hero heading */
.block-type-hero .hstyle1 {
  font-size: 2.75rem !important;
  font-weight: 700 !important;
  color: var(--colorBlack) !important;
  line-height: 1.15 !important;
  margin-bottom: 1rem !important;
}

.block-type-hero .tstyle2 p {
  font-size: 1rem;
  line-height: 1.65;
  color: var(--colorBlack);
  margin-bottom: 0.5rem;
}

/* CTA button row */
.block-type-hero .mobile-vertical {
  display: flex !important;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-top: 1.5rem !important;
}

.block-type-hero .mobile-vertical > div { flex-shrink: 0; }

/* CTA buttons */
.block-type-hero .cta,
.block-type-hero .cta-big,
.block-type-hero a.cta {
  display: inline-flex !important;
  flex-direction: column !important;
  align-items: center !important;
  justify-content: center !important;
  padding: 0.75rem 1.75rem !important;
  border-radius: 50px !important;
  font-size: 0.8rem !important;
  font-weight: 700 !important;
  text-transform: uppercase !important;
  letter-spacing: 0.06em !important;
  text-decoration: none !important;
  min-width: 180px;
  line-height: 1.3 !important;
}

.block-type-hero .cta span[style*="lowercase"],
.block-type-hero .cta-big span[style*="lowercase"] {
  font-size: 0.9rem !important;
  font-weight: 400 !important;
  text-transform: none !important;
  letter-spacing: 0 !important;
}


@media (max-width: 768px) {
  .block-type-hero .padding-left-setting { padding-right: 0 !important; }
  .block-type-hero .hstyle1 { font-size: 2rem !important; }
  .block-type-hero .h-large { min-height: auto; padding: 2rem 0; }
}

/* ─── Front page hero ──────────────────────────────────────── */
.fp-hero {
  background-color: #f0ebe5;
  background-size: cover;
  background-position: center center;
  background-repeat: no-repeat;
  min-height: 460px;
  display: flex;
  align-items: center;
}

.fp-hero__inner {
  padding-top: 3rem;
  padding-bottom: 3rem;
}

.fp-hero__text {
  max-width: 52%;
}

.fp-hero__text h1 {
  font-size: 3rem;
  font-weight: 700;
  color: var(--colorBlack);
  line-height: 1.1;
  margin-bottom: 1rem;
}

.fp-hero__text p {
  font-size: 1rem;
  line-height: 1.65;
  color: var(--colorBlack);
  margin-bottom: 1.5rem;
}

.fp-hero__cta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
}

.btn-stack {
  flex-direction: column !important;
  align-items: center !important;
  gap: 0.1rem;
  padding: 0.7rem 1.5rem !important;
}

.btn-stack .btn-label {
  font-size: 0.78rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.07em;
}

.btn-stack .btn-sub {
  font-size: 0.82rem;
  font-weight: 400;
  text-transform: none;
  letter-spacing: 0;
}

.fp-paid {
  padding: 2rem 1.5rem 0;
}

/* ─── Front page services ───────────────────────────────────── */
.fp-services, .fp-stories {
  padding: 3rem 0;
}

/* Centered section title with full-width divider (matches source) */
.fp-section-title {
  font-size: 1.85rem;
  font-weight: 500;
  color: var(--colorBlack);
  text-align: center;
  margin-bottom: 2.5rem;
  padding-bottom: 1.25rem;
  border-bottom: 1px solid #ddd6cd;
}

.fp-services__grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 2rem 2.5rem;
}

.fp-service-card {
  display: block;
  text-decoration: none !important;
  color: var(--colorBlack);
  transition: transform 0.15s;
}

.fp-service-card:hover { transform: translateY(-3px); text-decoration: none !important; }

.fp-service-card__img {
  aspect-ratio: 16 / 11;
  overflow: hidden;
  border-radius: 8px;
  margin-bottom: 1.1rem;
  background: var(--colorLightGray);
}

.fp-service-card__img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.fp-service-card h3 {
  font-size: 1.3rem;
  font-weight: 700;
  color: var(--colorBlack);
  margin-bottom: 0.6rem;
}

/* short pink accent line under the title */
.fp-service-card h3::after {
  content: "";
  display: block;
  width: 38px;
  height: 3px;
  background: var(--colorPrimary);
  margin-top: 0.6rem;
}

.fp-service-card p {
  font-size: 0.95rem;
  color: #6f6a64;
  line-height: 1.65;
}

/* ─── Front page videos ─────────────────────────────────────── */
.fp-videos { padding: 1rem 0 3rem; }
.fp-videos__grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 2rem;
}
@media (max-width: 768px) { .fp-videos__grid { grid-template-columns: 1fr; } }
.fp-video {
  position: relative;
  aspect-ratio: 16 / 9;
  border-radius: 8px;
  overflow: hidden;
  background: #000;
}
.fp-video iframe {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: 0;
}

/* ─── Front page testimonials ───────────────────────────────── */
.fp-testimonials { padding: 3rem 0; }
.fp-testimonials__grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 2rem;
  margin-bottom: 2rem;
}
@media (max-width: 768px) { .fp-testimonials__grid { grid-template-columns: 1fr; } }
.fp-testimonial { position: relative; padding-top: 0.5rem; }
.fp-testimonial__quote {
  font-size: 3rem;
  line-height: 0.6;
  color: var(--colorPrimary);
  font-family: Georgia, serif;
  display: block;
  margin-bottom: 0.5rem;
}
.fp-testimonial__title { font-size: 1rem; font-weight: 700; color: var(--colorBlack); margin-bottom: 0.5rem; }
.fp-testimonial__text { font-size: 0.9rem; color: var(--colorLightBlack); line-height: 1.6; margin-bottom: 0.75rem; }
.fp-testimonial__author { font-size: 0.9rem; color: var(--colorPrimary); font-style: italic; }
.testimonial-archive-grid { margin-top: 1.5rem; }

/* ─── Front page stories ────────────────────────────────────── */
.fp-stories { background: transparent; }

.fp-stories__grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.5rem;
  margin-bottom: 2rem;
  align-items: stretch;          /* equal-height cards per row */
}

/* Subtle, no box — blends into the section background (matches source) */
.fp-story-card {
  display: flex;
  flex-direction: column;
  height: 100%;
  background: transparent;
  text-decoration: none !important;
  color: var(--colorBlack);
  transition: transform 0.15s;
}

.fp-story-card:hover { transform: translateY(-3px); text-decoration: none !important; }

.fp-story-card__img {
  position: relative;
  aspect-ratio: 16/10;
  overflow: hidden;
  border-radius: 8px;
  margin-bottom: 1rem;
  background: #e6dfd6;
}
.fp-story-card__img img { width: 100%; height: 100%; object-fit: cover; }

/* date badge (top-left pink pill) */
.fp-story-card__date {
  position: absolute;
  top: 0.75rem;
  left: 0.75rem;
  background: var(--colorPrimary);
  color: var(--colorWhite);
  font-size: 0.75rem;
  font-weight: 600;
  padding: 0.2rem 0.7rem;
  border-radius: 50px;
  z-index: 2;
}

.fp-story-card h3 {
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--colorBlack);
  margin-bottom: 0.6rem;
}

/* small pink separator under the title */
.fp-story-card h3::after {
  content: "";
  display: block;
  width: 34px;
  height: 3px;
  background: var(--colorPrimary);
  margin-top: 0.6rem;
}

/* muted body text that blends, clamped for equal height */
.fp-story-card p {
  font-size: 0.9rem;
  color: #8a857d;
  line-height: 1.65;
  display: -webkit-box;
  -webkit-line-clamp: 6;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.fp-more { text-align: center; }

@media (max-width: 900px) {
  .fp-hero__text { max-width: 100%; }
  .fp-hero__text h1 { font-size: 2.2rem; }
  .fp-services__grid, .fp-stories__grid { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 600px) {
  .fp-services__grid, .fp-stories__grid { grid-template-columns: 1fr; }
}

/* Hide Kirby's in-content duplicate title (the template provides the h1) */
.entry-content .page-title,
.entry-content h1.hstyle1:first-child { display: none; }

/* ─── In-content Kirby hero block (e.g. Apie mus) ───────────── */
/* Full-bleed: breaks out of .container's max-width + padding to span the
   full viewport, matching the source (edge-to-edge, no rounded corners). */
.entry-content section.hero {
  /* Contained box, height halved (480px -> 240px). Column flex so the text
     block flows normally instead of being squeezed by flex sizing. */
  display: flex;
  flex-direction: column;
  justify-content: center;
  min-height: 240px;
  padding: 2.5rem;
  margin: 0 0 2.5rem;
  border-radius: 12px;
  overflow: hidden;
  color: #fff;
  background-color: var(--colorBlue);          /* fallback so text stays readable */
  background-image: linear-gradient(0deg, #301b0345, #301c046e),
                    url('assets/apie-mus-hero.jpg');
  background-size: cover;
  background-position: center 30%;
}
.entry-content section.hero .padding-left-setting {
  position: relative;
  z-index: 2;
  padding: 0 !important;   /* kill Kirby's inline padding-right:60% that collapsed the text */
  width: 100%;
  max-width: 520px;        /* readable text column */
}
.entry-content section.hero .hstyle1 {
  color: #fff !important;
  font-size: 2.6rem;
  font-weight: 700;
  margin: 0 0 1rem !important;
}
.entry-content section.hero .tstyle2,
.entry-content section.hero .tstyle2 p { color: #fff !important; }
.entry-content section.hero .mobile-vertical { margin-top: 1.5rem; }
.entry-content section.hero .mobile-vertical > div:empty,
.entry-content section.hero a.cta:empty { display: none !important; }

/* The page already has a hero with its own title — hide the template title/breadcrumb */
body.page:has(.entry-content section.hero) .page-title,
body.page:has(.entry-content section.hero) .breadcrumb { display: none; }

@media (max-width: 768px) {
  .entry-content section.hero { min-height: auto; padding: 2rem 1.5rem; }
  .entry-content section.hero .padding-left-setting { max-width: 100%; }
}

/* ─── Strip scraped Kirby artifacts ─────────────────────────── */
.entry-content .cookies-wrapper,
.entry-content form#kookie_form,
.entry-content .kookie_text,
.entry-content section:empty,
.entry-content .hide-mobile:empty,
.entry-content .hide-desktop,
.entry-content div:empty { display: none !important; }   /* Kirby form-error placeholders etc. */

/* ─── Breadcrumb ────────────────────────────────────────────── */
.breadcrumb {
  font-size: 0.85rem;
  color: #9b948c;
  margin-bottom: 1rem;
}
.breadcrumb a { color: #9b948c; text-decoration: none; }
.breadcrumb a:hover { color: var(--colorBlue); }
.breadcrumb__sep { margin: 0 0.35rem; color: #c9c2b9; }
.breadcrumb__current { color: var(--colorLightBlack); }

/* ─── Content "question" link lists (Kirby a.list) ──────────── */
.entry-content h3.hstyle4,
.entry-content h2.hstyle4 { margin: 0; }
.entry-content a.list {
  display: block;
  color: var(--colorBlack);
  text-decoration: none !important;
  font-size: 1.15rem;
  font-weight: 600;
  line-height: 1.4;
  padding: 0.85rem 0;
  border-bottom: 1px solid #ece7e0;
  transition: color 0.15s;
}
.entry-content a.list:hover { color: var(--colorPrimary); }

/* ─── Kirby content card grids (section pages) ──────────────── */
/* Section pages use the full container width (like the source) */
body.page .entry-content { max-width: 100%; }

.entry-content ul.grid {
  list-style: none;
  display: grid;
  grid-template-columns: repeat(12, 1fr);
  gap: 2rem;
  margin: 1.75rem 0;
  padding: 0;
}
/* honor Kirby's --columns (3 → 4 cards per row); collapse on smaller screens */
.entry-content ul.grid > li.column {
  list-style: none;
  margin: 0;
  padding: 0;
  grid-column: span var(--columns, 3) !important;
}
@media (max-width: 900px) {
  .entry-content ul.grid > li.column { grid-column: span 6 !important; }
}
@media (max-width: 600px) {
  .entry-content ul.grid > li.column { grid-column: span 12 !important; }
}

.entry-content a.normal {
  display: block;
  text-decoration: none !important;
  color: var(--colorBlack);
  transition: transform 0.15s;
}
.entry-content a.normal:hover { transform: translateY(-3px); }
.entry-content a.normal:empty { display: none; }   /* Kirby's duplicate empty link */

.entry-content a.normal figure.img {
  margin: 0 0 1rem;
  border-radius: 8px;
  overflow: hidden;
  /* honor Kirby's per-image ratio (--w/--h on the figure); fall back to 4:3 */
  aspect-ratio: var(--w, 4) / var(--h, 3);
  background: #e6dfd6;
}
.entry-content a.normal figure.img img { width: 100%; height: 100%; object-fit: cover; display: block; }

.entry-content a.normal h2,
.entry-content a.normal h3 {
  font-size: 1.2rem;
  font-weight: 700;
  color: var(--colorBlack);
  margin: 0 0 0.5rem;
}
.entry-content a.normal h2::after,
.entry-content a.normal h3::after {
  content: "";
  display: block;
  width: 34px;
  height: 3px;
  background: var(--colorPrimary);
  margin-top: 0.55rem;
}
.entry-content a.normal p {
  color: #8a857d;
  font-size: 0.9rem;
  line-height: 1.6;
  text-decoration: none;
}

@media (max-width: 600px) {
  .entry-content ul.grid { grid-template-columns: 1fr; }
}

/* ─── Partner / sponsor logos (Rėmėjai ir partneriai) ───────── */
.entry-content figure.img[data-contain] {
  aspect-ratio: var(--w, 3) / var(--h, 2);
  background: #fff;
  border: 1px solid #eee;
  border-radius: 8px;
  padding: 1.1rem;
  margin: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: box-shadow 0.15s;
}
.entry-content figure.img[data-contain] img {
  width: 100%;
  height: 100%;
  object-fit: contain;   /* logos must not be cropped */
}
.entry-content ul.grid a[target="_blank"]:hover figure.img[data-contain] {
  box-shadow: 0 4px 16px rgba(0,0,0,0.08);
}

/* ─── Document / report lists (Ataskaitos, Medžiaga) ────────── */
.entry-content img.pdf,
.entry-content img[src*="ic-doc"] { display: none; }   /* broken Kirby icon */
.entry-content a:has(> img.pdf) { display: none; }     /* icon-only link (leaves the titled one) */

.entry-content a[href$=".pdf"],
.entry-content a[href$=".docx"],
.entry-content a[href$=".doc"],
.entry-content a[href$=".xlsx"] {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  color: var(--colorBlue);
  text-decoration: none;
  font-weight: 500;
  padding: 0.35rem 0;
}
.entry-content a[href$=".pdf"]:hover,
.entry-content a[href$=".docx"]:hover,
.entry-content a[href$=".doc"]:hover,
.entry-content a[href$=".xlsx"]:hover { color: var(--colorPrimary); }
.entry-content a[href$=".pdf"]::before,
.entry-content a[href$=".docx"]::before,
.entry-content a[href$=".doc"]::before,
.entry-content a[href$=".xlsx"]::before {
  content: "";
  flex: 0 0 auto;
  width: 20px;
  height: 24px;
  background: var(--colorPrimary);
  -webkit-mask: no-repeat center / contain;
  mask: no-repeat center / contain;
  -webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M6 2h9l5 5v13a1 1 0 0 1-1 1H6a1 1 0 0 1-1-1V3a1 1 0 0 1 1-1zm8 1.5V8h4.5L14 3.5z'/%3E%3C/svg%3E");
  mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M6 2h9l5 5v13a1 1 0 0 1-1 1H6a1 1 0 0 1-1-1V3a1 1 0 0 1 1-1zm8 1.5V8h4.5L14 3.5z'/%3E%3C/svg%3E");
}

/* ─── Main content ─────────────────────────────────────────── */
#content {
  min-height: 60vh;
  padding: 2.5rem 0 3rem;
}

.entry-content {
  max-width: 860px;
}

.entry-content h1 { font-size: 2rem; margin-bottom: 1rem; color: var(--colorBlue); }
.entry-content h2 { font-size: 1.5rem; margin: 1.75rem 0 0.75rem; color: var(--colorBlue); }
.entry-content h3 { font-size: 1.2rem; margin: 1.25rem 0 0.5rem; }
.entry-content p  { margin-bottom: 1rem; }
.entry-content ul, .entry-content ol { margin: 0.5rem 0 1rem 1.5rem; }
.entry-content li { margin-bottom: 0.35rem; }
.entry-content a  { color: var(--colorBlue); text-decoration: underline; }

/* Page title */
.page-title {
  font-size: 2.5rem;
  font-weight: 700;
  color: var(--colorBlack);
  margin-bottom: 1.5rem;
}

/* ─── Archive intro ────────────────────────────────────────── */
.archive-intro {
  font-size: 1.05rem;
  color: var(--colorLightBlack);
  margin: -0.5rem 0 1.75rem;
}
.archive-intro a { color: var(--colorBlue); text-decoration: underline; }

/* ─── Story archive ────────────────────────────────────────── */
.story-archive-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.5rem;
  margin-bottom: 2.5rem;
}
@media (max-width: 900px) { .story-archive-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 600px) { .story-archive-grid { grid-template-columns: 1fr; } }

/* ─── Single story ──────────────────────────────────────────── */
.single-story { max-width: 760px; }
.single-back { font-size: 0.85rem; color: var(--colorBlue); display: inline-block; margin-bottom: 1rem; }
.single-back:hover { text-decoration: underline; }
.single-story__header h1 { font-size: 2rem; font-weight: 700; margin-bottom: 1.5rem; }
.single-story__thumb { margin-bottom: 2rem; border-radius: 6px; overflow: hidden; }
.single-story__thumb img { width: 100%; height: auto; }
.single-story__body { font-size: 1.05rem; line-height: 1.75; }

/* ─── Project list ─────────────────────────────────────────── */
.project-list { max-width: 820px; }
.project-item {
  padding: 1.5rem 0;
  border-bottom: 1px solid #ececec;
}
.project-item h2 { font-size: 1.25rem; margin-bottom: 0.5rem; }
.project-item h2 a { color: var(--colorBlue); text-decoration: none; }
.project-item h2 a:hover { text-decoration: underline; }
.project-item p { color: var(--colorLightBlack); margin-bottom: 0.5rem; line-height: 1.6; }
.project-more { font-size: 0.85rem; color: var(--colorPrimary); font-weight: 600; }
.single-project .entry-content { max-width: 820px; }

/* ─── Team grid ────────────────────────────────────────────── */
.team-group-title {
  font-size: 1.4rem;
  color: var(--colorBlue);
  margin: 2rem 0 1.25rem;
}
.team-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1.5rem;
  margin-bottom: 1rem;
}
@media (max-width: 900px) { .team-grid { grid-template-columns: repeat(3, 1fr); } }
@media (max-width: 600px) { .team-grid { grid-template-columns: repeat(2, 1fr); } }

.team-card { text-decoration: none !important; color: var(--colorBlack); text-align: center; }
.team-card__img {
  aspect-ratio: 1;
  overflow: hidden;
  border-radius: 50%;
  margin-bottom: 0.6rem;
  background: var(--colorLightGray);
}
.team-card__img img { width: 100%; height: 100%; object-fit: cover; }
.team-card__img--empty { background: linear-gradient(135deg, #f0ebe5, #e6dfd6); }
.team-card__name { display: block; font-size: 0.9rem; font-weight: 600; color: var(--colorBlue); }
.team-card__role { display: block; font-size: 0.8rem; color: var(--colorLightBlack); margin-top: 0.15rem; }
.single-team__role { font-size: 1rem; color: var(--colorPrimary); font-weight: 600; margin-top: 0.25rem; }

/* Consulting specialists block under team archive */
.team-specialists { margin-top: 2.5rem; padding-top: 1.5rem; border-top: 1px solid #e8e8e8; }
/* Works for both native columns and the legacy custom markup */
.team-specialists .wp-block-columns,
.team-specialists .specialists-cols {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 2rem;
}
@media (max-width: 600px) {
  .team-specialists .wp-block-columns,
  .team-specialists .specialists-cols { grid-template-columns: 1fr; }
}
.team-specialists h2 { font-size: 1.1rem; color: var(--colorBlue); margin-bottom: 0.5rem; }
.team-specialists h3 { font-size: 0.95rem; color: var(--colorBlack); margin: 0.75rem 0 0.25rem; }
.team-specialists ul { margin: 0 0 0.5rem 1.1rem; }
.team-specialists li { font-size: 0.9rem; line-height: 1.55; }

.single-team { max-width: 760px; }
.single-team__head { display: flex; align-items: center; gap: 1.5rem; margin-bottom: 1.5rem; }
.single-team__photo { flex-shrink: 0; width: 140px; }
.single-team__photo img { width: 140px; height: 140px; object-fit: cover; border-radius: 50%; }
.single-team__head h1 { font-size: 1.8rem; }
.single-team .entry-content { max-width: 100%; }

/* ─── Contact form ──────────────────────────────────────────── */
.knc-form {
  background: #fff;
  border-radius: 10px;
  box-shadow: 0 4px 24px rgba(0,0,0,0.06);
  padding: 2rem;
  max-width: 480px;
}
.knc-form__hp { position: absolute; left: -9999px; }
.knc-form__row { display: block; margin-bottom: 1rem; }
.knc-form__row span { display: block; font-size: 0.9rem; margin-bottom: 0.35rem; color: var(--colorLightBlack); }
.knc-form input,
.knc-form textarea {
  width: 100%;
  border: 1px solid #dcd6ce;
  border-radius: 6px;
  padding: 0.65rem 0.8rem;
  font: inherit;
  background: #fff;
}
.knc-form input:focus,
.knc-form textarea:focus { outline: none; border-color: var(--colorBlue); }
.knc-form__submit { border: 0; cursor: pointer; margin-top: 0.5rem; }
.knc-form__success {
  background: #e7f6ec;
  border-left: 4px solid #379E8F;
  padding: 0.75rem 1rem;
  border-radius: 6px;
  margin-bottom: 1rem;
}

/* Contacts page: info flows left, form floated right (two columns) */
.kontaktai-form {
  float: right;
  width: 460px;
  max-width: 44%;
  margin: 0 0 2rem 2.5rem;
}
.kontaktai-form .knc-form { max-width: none; }   /* fill the column */

.knc-map {
  clear: both;                                    /* drop below the floated form */
  margin: 2rem 0 0;
  border-radius: 10px;
  overflow: hidden;
  line-height: 0;
}
.knc-map iframe { width: 100%; height: 360px; border: 0; }

@media (max-width: 768px) {
  .kontaktai-form { float: none; width: 100%; max-width: 100%; margin: 2rem 0 0; }
}

/* ─── Footer ───────────────────────────────────────────────── */
#site-footer {
  background: var(--colorWhite);
  color: var(--colorLightBlack);
  border-top: 1px solid #e8e8e8;
  padding: 2.5rem 0 1.5rem;
  font-size: 0.875rem;
}

.footer-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 2rem;
  margin-bottom: 2rem;
}

@media (max-width: 768px) {
  .footer-grid { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 480px) {
  .footer-grid { grid-template-columns: 1fr; }
}

.footer-col h3 {
  font-size: 0.875rem;
  font-weight: 600;
  margin-bottom: 0.75rem;
  color: var(--colorBlack);
}

.footer-col p, .footer-col a {
  color: var(--colorLightBlack);
  line-height: 1.8;
}

.footer-bottom {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: 1.5rem;
  border-top: 1px solid #e8e8e8;
  font-size: 0.8rem;
  color: #888;
}

.footer-social {
  display: flex;
  gap: 1rem;
  align-items: center;
}

.footer-social a {
  display: flex;
  align-items: center;
  color: var(--colorLightBlack);
  transition: color 0.15s;
}

.footer-social a:hover { color: var(--colorBlue); }
