/*
Theme Name: CoreDigify FirstStep
Theme URI: https://firststep.lv
Template: coredigify-base
Author: CoreDigify
Author URI: https://my.coredigify.com
Description: CDDS design for PPII "First step" (firststep.lv) — the kindergarten's existing playful look rebuilt without Divi: hand-drawn "Love Ya Like A Sister" headings, the photo-tile home grid, green wavy page heroes and the watercolor-grass contact footer. Child of coredigify-base; adds header/footer parts + full design CSS.
Version: 0.1.6
Requires at least: 6.4
Tested up to: 6.6
Requires PHP: 8.1
License: GPL-2.0-or-later
License URI: https://www.gnu.org/licenses/gpl-2.0.html
Text Domain: coredigify-firststep
*/

/* Fonts are enqueued in functions.php (parallel load + preconnect) instead of a
   render-blocking @import chain inside this stylesheet. */

/* ==========================================================================
   Tokens — the site's original palette (Divi accents preserved 1:1)
   ========================================================================== */
:root {
  --fs-font: 'Quicksand', 'Segoe UI', system-ui, -apple-system, sans-serif;
  --fs-hand: 'Love Ya Like A Sister', 'Quicksand', cursive;
  --fs-blue: #2b76df;
  --fs-coral: #ff7355;
  --fs-amber: #ff9c02;
  --fs-green: #74bc19;
  --fs-violet: #7f5aff;
  --fs-orange: #e0561f;   /* active menu / links — original Divi accent */
  --fs-leaf: #145311;     /* page-hero green */
  --fs-ink: #3f4448;
  --fs-muted: #77808a;
  --fs-line: #eceff3;
  --fs-shadow: 0 16px 44px -18px rgba(63, 68, 72, .22);
  --fs-ring: rgba(43, 118, 223, .45);
}

body {
  font-family: var(--fs-font);
  color: var(--fs-ink);
  background: #fff;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}
.fs-wrap { width: min(1180px, 92vw); margin-inline: auto; }
img { max-width: 100%; height: auto; }

/* wpautop neutralizer: WP wraps inline children (our <a class="fs-tile">, imgs)
   in <p> and injects empty <p>s between them — those become grid items and
   shatter the layouts. display:contents dissolves the wrapper box so the real
   tiles are laid out as direct grid/flex children again; an empty <p> with
   display:contents renders nothing at all. */
.fs-grid > p, .fs-grid-5 > p, .fs-team > p, .fs-sched-row > p,
.fs-info-cards > p, .fs-docs > p, .fs-lists > p, .fs-callout > p,
.fs-contact-grid > p, .fs-feature > p, .fs-split > p { display: contents; }
/* wpautop also drops <br> between the tiles — each <br> is a grid item that
   eats a cell and turns the 4-column grid into a holey checkerboard. The
   `> p > br` variant matters too: once a wrapping <p> is display:contents its
   <br> children join the grid directly, so they need hiding as well. */
.fs-grid > br, .fs-grid-5 > br, .fs-team > br, .fs-sched-row > br,
.fs-info-cards > br, .fs-docs > br, .fs-lists > br, .fs-callout > br,
.fs-contact-grid > br, .fs-feature > br, .fs-split > br,
.fs-grid > p > br, .fs-grid-5 > p > br, .fs-team > p > br, .fs-sched-row > p > br,
.fs-info-cards > p > br, .fs-docs > p > br, .fs-lists > p > br, .fs-callout > p > br,
.fs-contact-grid > p > br, .fs-feature > p > br, .fs-split > p > br { display: none; }

/* ==========================================================================
   Header — sticky white bar, hand-drawn menu (dropdown under "Mēs")
   ========================================================================== */
.fs-header {
  position: sticky; top: 0; z-index: 40;
  background: rgba(255, 255, 255, .94);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--fs-line);
}
.fs-nav { display: flex; align-items: center; justify-content: space-between; gap: 24px; padding: 12px 0; }
.fs-brand img { height: 64px; width: auto; display: block; }

.fs-mainmenu { display: flex; align-items: center; gap: 30px; flex-wrap: wrap; list-style: none; margin: 0; padding: 0; }
.fs-mainmenu li { position: relative; }
.fs-mainmenu a {
  font-family: var(--fs-hand); font-size: 1.3rem; letter-spacing: .03em;
  color: #4a4f54; text-decoration: none; display: inline-block;
  transition: color .18s, transform .18s;
}
.fs-mainmenu > li > a:hover { color: var(--fs-orange); transform: rotate(-2deg) scale(1.06); }
.fs-mainmenu .current-menu-item > a,
.fs-mainmenu .current-menu-ancestor > a,
.fs-mainmenu .current_page_item > a { color: var(--fs-orange); }
.fs-mainmenu a:focus-visible { outline: 3px solid var(--fs-ring); outline-offset: 4px; border-radius: 6px; }
.fs-mainmenu .menu-item-has-children > a::after { content: " ▾"; font-family: var(--fs-font); font-size: .7em; vertical-align: middle; opacity: .55; }
.fs-mainmenu .sub-menu {
  position: absolute; top: 100%; left: 50%; transform: translateX(-50%) translateY(6px);
  background: #fff; border: 1px solid var(--fs-line); border-radius: 14px;
  box-shadow: var(--fs-shadow); padding: 10px 18px; margin: 0; list-style: none;
  opacity: 0; pointer-events: none; transition: .18s; white-space: nowrap; z-index: 41;
}
.fs-mainmenu li:hover > .sub-menu,
.fs-mainmenu li:focus-within > .sub-menu { opacity: 1; pointer-events: auto; transform: translateX(-50%) translateY(2px); }

/* ==========================================================================
   Page hero — leaf-green band with the original day_care pattern + white wave
   ========================================================================== */
.fs-hero {
  position: relative;
  background: var(--fs-leaf) url("https://firststep.lv/wp-content/uploads/2024/01/day_care_bg_02.png") center top repeat;
  padding: 64px 16px 84px; text-align: center; overflow: hidden;
}
.fs-hero h1 {
  margin: 0; font-family: var(--fs-hand); font-weight: 400; color: #fff;
  font-size: clamp(2.6rem, 7vw, 4.6rem); letter-spacing: .04em;
  text-shadow: .05em .05em .14em rgba(0, 0, 0, .22);
}
.fs-hero-wave { position: absolute; left: 0; right: 0; bottom: -1px; width: 100%; height: 2.6vw; min-height: 22px; display: block; }

/* ==========================================================================
   Photo tiles (home grid + Vecākiem sub-grid) — hand-drawn images kept 1:1
   ========================================================================== */
.fs-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 30px; padding: 44px 0 70px; }
.fs-grid-5 { display: grid; grid-template-columns: repeat(5, 1fr); gap: 20px; padding: 40px 0 8px; }
.fs-tile {
  display: flex; flex-direction: column; gap: 14px; align-items: center;
  background: #fff; border-radius: 26px; padding: 14px 14px 20px;
  box-shadow: var(--fs-shadow); text-decoration: none;
  transition: transform .25s cubic-bezier(.34, 1.56, .64, 1), box-shadow .25s ease;
}
.fs-tile:nth-child(odd) { transform: rotate(-1deg); }
.fs-tile:nth-child(even) { transform: rotate(1.2deg); }
.fs-tile:hover { transform: rotate(0deg) translateY(-8px) scale(1.02); box-shadow: 0 26px 54px -20px rgba(63, 68, 72, .32); }
.fs-tile:focus-visible { outline: 3px solid var(--fs-ring); outline-offset: 3px; }
.fs-tile-photo { width: 100%; aspect-ratio: 1 / 1; border-radius: 18px; overflow: hidden; display: block; background: #f6f8fa; }
.fs-tile-photo img { width: 100%; height: 100%; object-fit: cover; display: block; transition: transform .5s cubic-bezier(.2, .7, .3, 1); }
.fs-tile:hover .fs-tile-photo img { transform: scale(1.07); }
.fs-tile-label { display: flex; flex-direction: column; gap: 2px; align-items: center; text-align: center; }
.fs-tile-title {
  font-family: var(--fs-hand); font-weight: 400; font-size: 1.35rem; color: #3f4448;
  line-height: 1.2; position: relative; padding-bottom: 10px;
}
.fs-grid-5 .fs-tile-title { font-size: 1.08rem; }
.fs-tile-title::after {
  content: ""; position: absolute; left: 50%; bottom: 0; transform: translateX(-50%) rotate(-1deg);
  width: 30px; height: 4px; border-radius: 4px; background: var(--fs-accent, var(--fs-blue));
  transition: width .22s ease;
}
.fs-tile:hover .fs-tile-title::after { width: 58px; }
.fs-tile-sub { font-size: .9rem; color: var(--fs-muted); }
.fs-tile.is-soon { cursor: default; }
.fs-tile.is-soon .fs-tile-photo img { filter: grayscale(.3) opacity(.92); }
.fs-a-blue { --fs-accent: var(--fs-blue); }
.fs-a-coral { --fs-accent: var(--fs-coral); }
.fs-a-amber { --fs-accent: var(--fs-amber); }
.fs-a-green { --fs-accent: var(--fs-green); }
.fs-a-violet { --fs-accent: var(--fs-violet); }

/* ==========================================================================
   Generic sections
   ========================================================================== */
.fs-section { padding: 56px 0; }
.fs-section-title {
  font-family: var(--fs-hand); font-weight: 400; font-size: clamp(1.7rem, 3.4vw, 2.5rem);
  color: #3f4448; text-align: center; margin: 0 0 8px; text-wrap: balance;
}
.fs-section-kicker {
  display: block; text-align: center; font-size: .8rem; font-weight: 700;
  letter-spacing: .28em; text-transform: uppercase; color: var(--fs-blue); margin-bottom: 10px;
}
.fs-underline {
  display: block; width: 64px; height: 5px; border-radius: 5px; margin: 14px auto 0;
  background: var(--fs-amber); transform: rotate(-1deg);
}

/* Mēs — intro split */
.fs-split { display: grid; grid-template-columns: 1fr 1.1fr; gap: 48px; align-items: center; }
.fs-split-img img { width: 100%; border-radius: 0 0 240px 240px; display: block; box-shadow: var(--fs-shadow); }
.fs-split-txt p { font-size: 1.05rem; font-weight: 600; line-height: 1.9; color: #232629; }

/* Mēs — team cards */
.fs-team { display: grid; grid-template-columns: 1fr 1fr; gap: 34px; margin-top: 34px; }
.fs-member {
  background: #fff; border-radius: 22px; padding: 26px 28px; box-shadow: var(--fs-shadow);
  text-align: center; transition: transform .22s ease;
}
.fs-member:hover { transform: translateY(-5px); }
.fs-member img { width: 150px; height: 150px; object-fit: cover; border-radius: 18px; box-shadow: 0 10px 24px -10px rgba(0, 0, 0, .3); margin-bottom: 12px; }
.fs-member h3 { margin: .2em 0 0; font-family: var(--fs-hand); font-weight: 400; font-size: 1.5rem; color: #2c2f33; }
.fs-member-pos { margin: 0 0 10px; font-size: .85rem; font-weight: 700; letter-spacing: .16em; text-transform: uppercase; color: var(--fs-blue); }
.fs-member p { font-size: .98rem; line-height: 1.85; font-weight: 600; color: #3c4247; }
.fs-member-quote { font-weight: 500; color: var(--fs-muted); }

/* Instagram band */
.fs-insta {
  background: linear-gradient(90deg, rgba(58, 80, 99, .94), #3a5063);
  border-radius: 26px; color: #fff; padding: 56px 8%; margin: 20px 0 60px;
  border-left: 8px solid var(--fs-amber);
}
.fs-insta h2 { font-family: var(--fs-hand); font-weight: 400; font-size: clamp(1.6rem, 3vw, 2.3rem); margin: 0 0 10px; color: #fff; }
.fs-insta p { margin: 0 0 22px; opacity: .85; }

/* Buttons */
.fs-btn {
  display: inline-block; font-family: var(--fs-hand); font-size: 1.1rem; letter-spacing: .05em;
  background: #fff; color: var(--fs-orange); padding: 13px 30px; border-radius: 60px;
  box-shadow: 0 14px 30px -12px rgba(0, 0, 0, .4); text-decoration: none; transition: transform .18s;
}
.fs-btn:hover { transform: translateY(-3px) rotate(-1.5deg); }
.fs-doc-btn {
  display: inline-block; font-family: var(--fs-hand); font-size: 1.05rem; background: var(--fs-blue);
  color: #fff; padding: 14px 28px; border-radius: 60px; text-decoration: none;
  box-shadow: 0 14px 30px -12px rgba(43, 118, 223, .6); transition: transform .18s;
}
.fs-doc-btn:hover { transform: translateY(-3px) rotate(-1deg); color: #fff; }
.fs-doc-btn.fs-doc-green { background: var(--fs-green); box-shadow: 0 14px 30px -12px rgba(116, 188, 25, .6); }
.fs-docs { display: flex; gap: 18px; flex-wrap: wrap; justify-content: center; margin: 50px 0 10px; }

/* Vecākiem blocks */
.fs-card { background: #fff; border-radius: 22px; padding: 26px 28px; box-shadow: var(--fs-shadow); }
.fs-info-cards { display: grid; grid-template-columns: repeat(3, 1fr); gap: 26px; margin-top: 30px; }
.fs-info-cards .fs-card { text-align: center; }
.fs-info-cards img { width: 110px; height: 110px; object-fit: cover; border-radius: 50%; margin-bottom: 12px; }
.fs-callout { display: grid; grid-template-columns: 1.1fr 1fr; gap: 40px; align-items: center; margin-top: 26px; }
.fs-callout .fs-big { font-family: var(--fs-hand); font-size: 1.5rem; line-height: 1.7; }
.fs-callout img { width: 100%; border-radius: 22px; box-shadow: var(--fs-shadow); }
.fs-lists { display: grid; grid-template-columns: 1fr auto 1fr; gap: 34px; align-items: center; margin-top: 30px; }
.fs-lists ul { margin: 0; padding-left: 1.2em; font-weight: 600; line-height: 2.1; }
.fs-lists img { width: 280px; border-radius: 22px; box-shadow: var(--fs-shadow); transform: rotate(1.6deg); }

.fs-sched-row { display: grid; grid-template-columns: repeat(3, 1fr); gap: 26px; margin-top: 30px; }
.fs-sched { background: #fff; border-radius: 22px; padding: 24px; box-shadow: var(--fs-shadow); border-top: 8px solid var(--fs-accent, var(--fs-blue)); }
.fs-sched h3 { margin: 0 0 14px; text-align: center; font-size: .85rem; font-weight: 700; letter-spacing: .18em; text-transform: uppercase; color: var(--fs-muted); }
.fs-sched-name { font-family: var(--fs-hand); font-size: 1.5rem; letter-spacing: .02em; text-transform: none; color: #2c2f33; display: inline-block; margin-top: 6px; }
.fs-sched ul { list-style: none; margin: 0; padding: 0; }
.fs-sched li { display: grid; grid-template-columns: 96px 1fr; gap: 10px; padding: 7px 0; border-bottom: 1px dashed var(--fs-line); font-size: .9rem; }
.fs-sched li:last-child { border-bottom: 0; }
.fs-sched b { color: var(--fs-accent, var(--fs-blue)); font-variant-numeric: tabular-nums; white-space: nowrap; }

.fs-feature { display: grid; grid-template-columns: 340px 1fr; gap: 40px; align-items: center; margin-top: 34px; }
.fs-feature.fs-rev { grid-template-columns: 1fr 340px; }
.fs-feature img { width: 100%; border-radius: 22px; box-shadow: var(--fs-shadow); transform: rotate(-1.4deg); }
.fs-feature.fs-rev img { transform: rotate(1.4deg); }
.fs-feature h3 { font-family: var(--fs-hand); font-weight: 400; font-size: 1.7rem; margin: 0 0 10px; color: #2c2f33; }
.fs-feature p { font-weight: 600; line-height: 1.9; }

/* Kontakti */
.fs-contact-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 34px; padding: 50px 0 10px; }
.fs-contact-grid h3 { font-family: var(--fs-hand); font-weight: 400; font-size: 1.6rem; margin: 0 0 14px; color: #2c2f33; }
.fs-contact-grid p, .fs-contact-grid a.fs-line { display: flex; gap: 10px; align-items: flex-start; margin: 8px 0; font-weight: 600; color: #3c4247; text-decoration: none; }
.fs-contact-grid a.fs-line:hover { color: var(--fs-blue); }
.fs-map-card { margin: 40px 0 60px; border-radius: 30px; overflow: hidden; box-shadow: 0 40px 90px -50px rgba(0, 0, 0, .4); }
.fs-map-card iframe { display: block; width: 100%; height: 380px; border: 0; }

/* ==========================================================================
   Footer — watercolor-grass KONTAKTI band (original green.png kept)
   ========================================================================== */
.fs-footer {
  position: relative; margin-top: 20px; min-height: 520px;
  background: #fff url("assets/green.webp") center bottom / cover no-repeat;
  display: flex; flex-direction: column; justify-content: flex-end;
  font-family: var(--fs-hand); color: #fff;
}
.fs-foot-contact { text-align: center; padding: 0 16px 26px; }
.fs-foot-contact h2 {
  margin: 0 0 14px; font-family: var(--fs-hand); font-weight: 400; font-size: 2.1rem;
  letter-spacing: .06em; color: #fff; text-shadow: 0 2px 10px rgba(0, 40, 0, .45);
}
.fs-foot-contact p, .fs-foot-contact a {
  margin: 5px 0; display: block; font-size: 1.25rem; color: #fff;
  text-decoration: none; text-shadow: 0 2px 8px rgba(0, 40, 0, .45);
}
.fs-foot-contact a:hover { color: #ffe9a8; }
.fs-foot-bottom { display: flex; align-items: center; justify-content: space-between; gap: 18px; flex-wrap: wrap; padding: 16px 0 22px; }
.fs-foot-credit { font-family: var(--fs-font); font-size: .9rem; color: rgba(255, 255, 255, .85); }
.fs-foot-credit a { color: #ffb35c; text-decoration: none; }
.fs-foot-credit a:hover { color: #ffe9a8; }
.fs-foot-right { display: flex; align-items: center; gap: 16px; }
.fs-foot-copy { font-family: var(--fs-font); font-size: .95rem; color: #fff; }
.fs-socials { display: flex; gap: 12px; }
.fs-socials a {
  width: 40px; height: 40px; border-radius: 50%; display: grid; place-items: center;
  color: #fff; background: rgba(255, 255, 255, .16); transition: .18s;
}
.fs-socials a:hover { background: rgba(255, 255, 255, .32); transform: translateY(-2px) rotate(-4deg); }
.fs-socials svg { width: 19px; height: 19px; }

/* ==========================================================================
   Responsive
   ========================================================================== */
@media (max-width: 980px) {
  .fs-grid { grid-template-columns: repeat(2, 1fr); gap: 22px; }
  .fs-grid-5 { grid-template-columns: repeat(3, 1fr); }
  .fs-split, .fs-callout, .fs-team, .fs-sched-row, .fs-info-cards, .fs-contact-grid { grid-template-columns: 1fr; }
  .fs-feature, .fs-feature.fs-rev { grid-template-columns: 1fr; }
  .fs-feature img, .fs-feature.fs-rev img { max-width: 340px; margin-inline: auto; }
  .fs-lists { grid-template-columns: 1fr; }
  .fs-lists img { margin-inline: auto; }
}
@media (max-width: 560px) {
  .fs-mainmenu { gap: 14px; }
  .fs-mainmenu a { font-size: 1.02rem; }
  .fs-brand img { height: 46px; }
  .fs-grid, .fs-grid-5 { grid-template-columns: repeat(2, 1fr); gap: 14px; }
  .fs-tile { padding: 10px 10px 14px; border-radius: 20px; }
  .fs-tile-title { font-size: 1.1rem; }
  .fs-footer { min-height: 440px; }
  .fs-foot-bottom { justify-content: center; text-align: center; }
}
@media (prefers-reduced-motion: reduce) {
  .fs-tile, .fs-tile-photo img, .fs-member, .fs-btn, .fs-doc-btn, .fs-mainmenu a, .fs-socials a { transition: none !important; }
  .fs-tile:nth-child(odd), .fs-tile:nth-child(even) { transform: none; }
}
