/*
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: var(--colorWhite);
}

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 a {
  display: flex;
  align-items: center;
  text-decoration: none;
}

.site-logo img {
  height: 64px;
  width: auto;
}

/* 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;
}

/* ─── 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;
}

.fp-section-title {
  font-size: 1.6rem;
  font-weight: 600;
  color: var(--colorBlue);
  margin-bottom: 1.75rem;
}

.fp-services__grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.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: 4/3;
  overflow: hidden;
  border-radius: 4px;
  margin-bottom: 0.75rem;
  background: var(--colorLightGray);
}

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

.fp-service-card h3 {
  font-size: 1rem;
  font-weight: 600;
  color: var(--colorBlue);
  margin-bottom: 0.35rem;
}

.fp-service-card p {
  font-size: 0.875rem;
  color: var(--colorLightBlack);
  line-height: 1.5;
}

/* ─── Front page stories ────────────────────────────────────── */
.fp-stories { background: var(--colorLightGray); }

.fp-stories__grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.5rem;
  margin-bottom: 2rem;
}

.fp-story-card {
  display: block;
  background: var(--colorWhite);
  border-radius: 6px;
  overflow: hidden;
  text-decoration: none !important;
  color: var(--colorBlack);
  transition: box-shadow 0.15s;
}

.fp-story-card:hover { box-shadow: 0 4px 16px rgba(0,0,0,0.1); text-decoration: none !important; }

.fp-story-card__img { aspect-ratio: 16/9; overflow: hidden; background: var(--colorLightGray); }
.fp-story-card__img img { width: 100%; height: 100%; object-fit: cover; }

.fp-story-card h3 {
  font-size: 1rem;
  font-weight: 600;
  color: var(--colorBlue);
  padding: 0.75rem 1rem 0.35rem;
}

.fp-story-card p {
  font-size: 0.875rem;
  color: var(--colorLightBlack);
  padding: 0 1rem 1rem;
  line-height: 1.5;
}

.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; }
}

/* ─── 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: 300;
  color: var(--colorBlue);
  margin-bottom: 1.5rem;
}

/* ─── 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; }

/* ─── 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); }
