/*
Theme Name: Child City
Theme URI: https://child-city.ee
Author: Aktio Agentuur OÜ
Description: Child City mängutoa teema. Värviline ja mänguline, kolmes keeles (Polylang). Töötab koos pluginaga Child City Core.
Version: 1.0.2
Requires PHP: 8.0
Text Domain: childcity
*/

:root {
  --cc-navy: #1E2A4A;
  --cc-pink: #FF5C8A;
  --cc-pink-dark: #C2185B;
  --cc-pink-text: #E0336B;
  --cc-yellow: #FFC93C;
  --cc-cream: #FFF3D1;
  --cc-bg: #FFFBF2;
  --cc-rose: #FFE1EA;
  --cc-mint: #D9F4F1;
  --cc-teal: #19B3A6;
  --cc-sky: #E3EAFF;
  --cc-muted: #5A6378;
  --cc-wrap: 1200px;
  --cc-radius: 32px;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; background: var(--cc-bg); color: var(--cc-navy); font-family: Nunito, system-ui, -apple-system, "Segoe UI", sans-serif; font-size: 18px; line-height: 1.6; -webkit-font-smoothing: antialiased; overflow-x: hidden; }
img { max-width: 100%; height: auto; display: block; }
a { color: var(--cc-navy); text-decoration-thickness: 2px; text-underline-offset: 3px; }
a:hover { color: var(--cc-pink-dark); }
h1, h2, h3, h4 { font-weight: 900; line-height: 1.1; margin: 0 0 .5em; letter-spacing: -.3px; }
h1 { font-size: clamp(40px, 6vw, 64px); }
h2 { font-size: clamp(30px, 4vw, 44px); }
h3 { font-size: clamp(21px, 2.2vw, 26px); }
p { margin: 0 0 1em; }
.screen-reader-text { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(1px, 1px, 1px, 1px); white-space: nowrap; }
.skip-link:focus { position: fixed; top: 8px; left: 8px; z-index: 100; background: #fff; padding: 10px 16px; border-radius: 12px; clip: auto; width: auto; height: auto; }
:focus-visible { outline: 3px solid var(--cc-pink); outline-offset: 2px; }

.cc-wrap { max-width: var(--cc-wrap); margin: 0 auto; padding: 0 clamp(18px, 3vw, 32px); }

/* ---------- Top bar & header ---------- */
.cc-topbar { background: var(--cc-navy); color: #fff; font-size: 14px; font-weight: 700; }
.cc-topbar .cc-wrap { display: flex; flex-wrap: wrap; gap: 8px 24px; justify-content: space-between; align-items: center; padding-top: 9px; padding-bottom: 9px; }
.cc-topbar a { color: #fff; text-decoration: none; }
.cc-topbar a:hover { color: var(--cc-yellow); }
.cc-topbar__social, .cc-lang { display: flex; gap: 14px; list-style: none; margin: 0; padding: 0; flex-wrap: wrap; }
.cc-lang .current-lang a, .cc-lang a[aria-current] { color: var(--cc-yellow); }
.cc-header { position: relative; z-index: 20; background: var(--cc-bg); }
.cc-header .cc-wrap { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding-top: 12px; padding-bottom: 12px; }
.cc-logo img { width: 84px; height: 84px; }
.cc-nav ul { list-style: none; display: flex; flex-wrap: wrap; gap: 4px 22px; margin: 0; padding: 0; }
.cc-nav a { text-decoration: none; font-weight: 800; font-size: 16px; }
.cc-nav .current-menu-item > a, .cc-nav .current_page_item > a { color: var(--cc-pink-text); }
.cc-menu-toggle { display: none; }

.cc-btn, .wp-block-button__link { display: inline-flex; align-items: center; justify-content: center; min-height: 52px; padding: 0 28px; border-radius: 999px; font-weight: 900; font-size: 17px; text-decoration: none; border: 0; cursor: pointer; font-family: inherit; line-height: 1.2; }
.cc-btn--pink, .wp-block-button__link { background: var(--cc-pink); color: #fff; box-shadow: 0 6px 0 var(--cc-pink-dark); }
.cc-btn--pink:hover, .wp-block-button__link:hover { color: #fff; transform: translateY(1px); box-shadow: 0 5px 0 var(--cc-pink-dark); }
.is-style-outline .wp-block-button__link, .cc-btn--outline { background: #fff; color: var(--cc-navy); border: 3px solid var(--cc-navy); box-shadow: none; }
.is-style-outline .wp-block-button__link:hover { color: var(--cc-navy); }
.wp-block-buttons { display: flex; flex-wrap: wrap; gap: 14px; }

/* ---------- Generic page ---------- */
.cc-main { min-height: 50vh; }
.cc-page { padding: 30px 0 90px; position: relative; overflow-x: clip; }
.cc-page__blob { position: absolute; right: -180px; top: -60px; width: 520px; height: 520px; border-radius: 50%; background: var(--cc-yellow); z-index: 0; }
.cc-page > .cc-wrap { position: relative; z-index: 1; }
.cc-page__title { margin-bottom: 28px; }
.cc-content > * { max-width: 100%; }
.cc-content > p, .cc-content > ul, .cc-content > ol, .cc-content > h2, .cc-content > h3 { max-width: 760px; }
.cc-content ul, .cc-content ol { padding-left: 1.2em; }
.cc-content li { margin-bottom: .4em; }
.cc-content table { border-collapse: collapse; width: 100%; max-width: 760px; margin-bottom: 1.5em; background: #fff; border-radius: 16px; overflow: hidden; }
.cc-content th, .cc-content td { text-align: left; padding: 10px 14px; border-bottom: 1px solid #EEE7D6; }
.cc-content th { background: var(--cc-cream); }
.cc-content .wp-block-image img { border-radius: 24px; }

/* Eyebrow & pill */
.cc-eyebrow { color: var(--cc-pink-text); font-weight: 900; text-transform: uppercase; letter-spacing: 2px; font-size: 14px; margin: 0 0 10px; }
.cc-pill { display: inline-block; background: #fff; border: 2px solid var(--cc-navy); border-radius: 999px; padding: 6px 16px; font-weight: 800; font-size: 14px; margin: 0 0 18px; }
.cc-accent, .cc-content mark { color: var(--cc-pink-text); background: none; }

/* ---------- Home sections (block groups with classes) ---------- */
.cc-section { padding: 90px 0; position: relative; }
.cc-section--white { background: #fff; }
.cc-section--cream { background: var(--cc-cream); }
.cc-section > .wp-block-group__inner-container, .cc-section > .cc-in { max-width: var(--cc-wrap); margin: 0 auto; padding: 0 clamp(18px, 3vw, 32px); }

.cc-hero { padding: 30px 0 90px; position: relative; overflow: hidden; }
.cc-hero::before { content: ""; position: absolute; right: -140px; top: -60px; width: 620px; height: 620px; border-radius: 50%; background: var(--cc-yellow); }
.cc-hero::after { content: ""; position: absolute; left: -90px; bottom: 10px; width: 220px; height: 220px; border-radius: 50%; background: #BDEDE8; }
.cc-hero__grid { position: relative; z-index: 1; max-width: var(--cc-wrap); margin: 0 auto; padding: 0 clamp(18px, 3vw, 32px); display: grid; grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr); gap: 48px; align-items: center; }
.cc-hero h1 { margin-bottom: 20px; }
.cc-hero__lead { font-size: 20px; max-width: 520px; }
.cc-hero__facts { display: flex; flex-wrap: wrap; gap: 8px 26px; font-weight: 800; font-size: 15px; margin-top: 24px; }
.cc-hero__facts p { margin: 0; }
.cc-hero__img img { width: 100%; aspect-ratio: 1 / 1; object-fit: cover; border-radius: 48% 52% 44% 56% / 52% 44% 56% 48%; border: 8px solid #fff; box-shadow: 0 20px 40px rgba(30, 42, 74, .18); }

.cc-center { text-align: center; }
.cc-cards { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 28px; margin-top: 40px; }
.cc-card { position: relative; border-radius: var(--cc-radius); padding: 14px 14px 28px; display: flex; flex-direction: column; gap: 10px; }
.cc-card:nth-child(1) { background: var(--cc-cream); }
.cc-card:nth-child(2) { background: var(--cc-rose); }
.cc-card:nth-child(3) { background: var(--cc-mint); }
.cc-card > * { margin-left: 14px; margin-right: 14px; }
.cc-card > .wp-block-image:first-child { margin: 0 0 6px; }
.cc-card > .wp-block-image:first-child img { width: 100%; height: 230px; object-fit: cover; border-radius: 24px; }
.cc-card h3 { margin: 0; }
.cc-card p { margin: 0; font-size: 17px; }
.cc-card .cc-more a { font-weight: 900; }
.cc-card__mascot { position: absolute; right: -16px; top: -40px; width: 104px; z-index: 2; margin: 0 !important; pointer-events: none; }

.cc-split { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 40px; align-items: center; }
.cc-split--top { align-items: start; }
.cc-dark { background: var(--cc-navy); color: #fff; border-radius: 40px; padding: 44px; }
.cc-dark p { color: #E3E8F5; }
.cc-priceline { display: flex; justify-content: space-between; align-items: center; background: rgba(255,255,255,.08); border-radius: 20px; padding: 14px 22px; margin: 0 0 12px; font-size: 20px; font-weight: 800; }
.cc-priceline strong { font-size: 30px; font-weight: 900; color: var(--cc-yellow); }
.cc-steps { list-style: none; padding: 0; margin: 0; counter-reset: s; display: flex; flex-direction: column; gap: 18px; }
.cc-steps li { counter-increment: s; display: flex; gap: 16px; align-items: flex-start; font-size: 18px; }
.cc-steps li::before { content: counter(s); flex: none; width: 44px; height: 44px; border-radius: 50%; display: flex; align-items: center; justify-content: center; font-weight: 900; background: var(--cc-yellow); margin-top: -6px; }
.cc-steps li:nth-child(2)::before { background: #FF8FB0; }
.cc-steps li:nth-child(3)::before { background: #7FD8CF; }
.cc-steps li:nth-child(4)::before { background: #A9C1FF; }

.cc-facts { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 20px; margin-top: 40px; }
.cc-fact { background: #fff; border-radius: 24px; padding: 22px; }
.cc-fact p { margin: 0; font-weight: 700; font-size: 16px; }
.cc-fact p:first-child { font-size: 30px; font-weight: 900; color: var(--cc-pink-text); line-height: 1.2; margin-bottom: 4px; }
.cc-round img { border-radius: var(--cc-radius); width: 100%; object-fit: cover; }

.cc-gallery { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 14px; margin-top: 32px; }
.cc-gallery figure { margin: 0; }
.cc-gallery img { width: 100%; aspect-ratio: 3 / 4; object-fit: cover; border-radius: 22px; }
.cc-gallery figure:nth-child(even) { margin-top: 30px; }
.cc-row-head { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: flex-end; gap: 16px; }
.cc-row-head h2 { margin: 0; }
.cc-row-head p { margin: 0; font-weight: 900; }

/* Blog cards */
.cc-posts { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 28px; margin-top: 32px; }
.cc-post { background: #fff; border-radius: 28px; overflow: hidden; display: flex; flex-direction: column; box-shadow: 0 10px 30px rgba(30, 42, 74, .08); text-decoration: none; color: var(--cc-navy); }
.cc-post:hover { color: var(--cc-navy); transform: translateY(-2px); }
.cc-post img { width: 100%; height: 200px; object-fit: cover; }
.cc-post__body { padding: 22px 24px 26px; display: flex; flex-direction: column; gap: 10px; }
.cc-post__tag { align-self: flex-start; background: var(--cc-rose); border-radius: 999px; padding: 4px 12px; font-size: 13px; font-weight: 800; }
.cc-post:nth-child(3n+2) .cc-post__tag { background: var(--cc-mint); }
.cc-post:nth-child(3n) .cc-post__tag { background: var(--cc-cream); }
.cc-post h3 { margin: 0; font-size: 21px; line-height: 1.3; }
.cc-post__meta { font-size: 15px; font-weight: 700; color: var(--cc-muted); }
.cc-article { max-width: 780px; margin: 0 auto; }
.cc-article__img img { border-radius: var(--cc-radius); width: 100%; max-height: 440px; object-fit: cover; margin-bottom: 30px; }
.cc-article .cc-content > * { max-width: none; }
.cc-article .cc-content em:first-child { font-size: 20px; }

/* Contact */
.cc-contact-list p { margin: 0 0 6px; font-weight: 800; font-size: 18px; }
.cc-form { background: #fff; border-radius: 36px; padding: 36px; display: flex; flex-direction: column; gap: 16px; box-shadow: 0 16px 40px rgba(30, 42, 74, .08); }
.cc-form label { display: flex; flex-direction: column; gap: 6px; font-weight: 800; font-size: 15px; }
.cc-form input, .cc-form textarea { min-height: 50px; border: 2px solid #D5D9E6; border-radius: 16px; padding: 10px 16px; font: inherit; font-weight: 600; color: var(--cc-navy); }
.cc-form .cc-hp { position: absolute; left: -9999px; }
.cc-form__ok { background: #E7F8EC; color: #13542A; border-radius: 16px; padding: 14px 18px; font-weight: 800; }

/* Footer */
.cc-footer { background: var(--cc-navy); color: #fff; padding: 56px 0 36px; margin-top: 0; }
.cc-footer a { color: #fff; }
.cc-footer .cc-wrap { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 32px; }
.cc-footer__logo img { width: 90px; height: 90px; }
.cc-footer__muted { font-size: 15px; color: #C9D1E6; }
.cc-footer__info p { margin: 0 0 6px; font-weight: 700; font-size: 16px; }
.cc-social { display: flex; flex-wrap: wrap; gap: 10px; list-style: none; margin: 0; padding: 0; align-items: flex-start; }
.cc-social a { display: inline-flex; align-items: center; gap: 8px; color: var(--cc-navy); border-radius: 999px; padding: 10px 16px; font-weight: 800; text-decoration: none; font-size: 15px; }
.cc-social svg { width: 18px; height: 18px; }
.cc-social li:nth-child(1) a { background: var(--cc-yellow); }
.cc-social li:nth-child(2) a { background: #FF8FB0; }
.cc-social li:nth-child(3) a { background: #7FD8CF; }
.cc-social li:nth-child(4) a { background: #A9C1FF; }
.cc-footer__bottom { border-top: 1px solid rgba(255,255,255,.15); margin-top: 32px; padding-top: 18px; font-size: 14px; color: #C9D1E6; }

/* ---------- Responsive ---------- */
@media (max-width: 960px) {
  .cc-hero__grid, .cc-split { grid-template-columns: minmax(0, 1fr); }
  .cc-cards, .cc-posts { grid-template-columns: minmax(0, 1fr); }
  .cc-facts { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .cc-gallery { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .cc-hero::before { width: 380px; height: 380px; right: -160px; }
  .cc-menu-toggle { display: inline-flex; align-items: center; gap: 8px; min-height: 48px; padding: 0 18px; border-radius: 999px; border: 3px solid var(--cc-navy); background: #fff; font: inherit; font-weight: 900; color: var(--cc-navy); cursor: pointer; }
  .cc-nav { position: absolute; left: 0; right: 0; top: 100%; background: #fff; box-shadow: 0 20px 30px rgba(30,42,74,.12); display: none; padding: 16px 24px 24px; }
  .cc-nav.is-open { display: block; }
  .cc-nav ul { flex-direction: column; gap: 6px; }
  .cc-nav a { display: block; padding: 10px 0; font-size: 18px; }
  .cc-header__cta { display: none; }
  .cc-card__mascot { width: 86px; top: -32px; right: -6px; }
  .cc-dark { padding: 30px; }
}
@media (max-width: 520px) {
  body { font-size: 17px; }
  .cc-logo img { width: 64px; height: 64px; }
  .cc-section { padding: 64px 0; }
  .cc-facts { grid-template-columns: minmax(0, 1fr); }
  .cc-topbar__social { display: none; }
}

/* Block layout resets for grid containers */
.cc-cards > *, .cc-facts > *, .cc-gallery > *, .cc-split > *, .cc-hero__grid > *, .cc-posts > * { margin-block-start: 0 !important; margin-block-end: 0 !important; }
.cc-card > * + *, .cc-fact > * + * { margin-block-start: 0; }
.wp-site-blocks, .is-layout-constrained > * { max-width: none; }
.cc-front > .wp-block-group, .cc-front > * { margin-block-start: 0 !important; }

/* Block styles */
.is-style-cc-blob img { width: 100%; aspect-ratio: 1 / 1; object-fit: cover; border-radius: 48% 52% 44% 56% / 52% 44% 56% 48%; border: 8px solid #fff; box-shadow: 0 20px 40px rgba(30, 42, 74, .18); }
.is-style-cc-round img { border-radius: var(--cc-radius); }
.cc-error { background: #FFE1EA; color: #8A1238; border-radius: 14px; padding: 12px 16px; font-weight: 800; }

/* Section inner width (block groups) */
.cc-section > *, .cc-hero > *:not(.cc-hero__grid) { max-width: var(--cc-wrap); margin-left: auto !important; margin-right: auto !important; padding-left: clamp(18px, 3vw, 32px); padding-right: clamp(18px, 3vw, 32px); }
.cc-section > .cc-cards, .cc-section > .cc-facts, .cc-section > .cc-gallery, .cc-section > .cc-split, .cc-section > .cc-row-head { margin-top: 32px; }
.cc-section > .cc-row-head:first-child, .cc-section > .cc-split:first-child { margin-top: 0; }
.cc-shortcode-wrap { max-width: var(--cc-wrap); margin: 0 auto; }
.cc-front .wp-block-shortcode { margin: 0; }

/* Mascots, menu, chips, gallery page */
.cc-row-head .cc-inline-mascot { width: 110px; margin: 0; }
.cc-form-mascot { width: 120px; margin: 0 0 -46px auto !important; position: relative; z-index: 2; }
.cc-party-img { position: relative; }
.cc-party-mascot { position: absolute; left: -30px; bottom: -30px; width: 180px; margin: 0 !important; }
.cc-chips { gap: 10px !important; }
.cc-chips p { background: #fff; border-radius: 999px; padding: 8px 16px; }
.cc-menu { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 20px; margin-top: 24px; }
.cc-menu > * { margin: 0 !important; }
.cc-menu-item { background: #fff; border-radius: 28px; padding: 14px 14px 20px; text-align: center; box-shadow: 0 10px 30px rgba(30,42,74,.06); }
.cc-menu-item img { width: 100%; height: 160px; object-fit: contain; border-radius: 18px; }
.cc-menu-item h3 { font-size: 20px; margin: 10px 0 2px; }
.cc-menu-price { font-weight: 900; color: var(--cc-pink-text); font-size: 20px; margin: 0; }
.cc-gallery--page { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.cc-gallery--page figure:nth-child(even) { margin-top: 0; }
.cc-gallery--page img { aspect-ratio: 4 / 3; }
.cc-terms { background: #fff; border-radius: 32px; padding: 32px; margin-top: 40px; }
.cc-page .cc-content > h2 { margin-top: 56px; }
@media (max-width: 960px) {
  .cc-menu, .cc-gallery--page { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .cc-party-mascot { width: 130px; left: -10px; }
}

.cc-logo-white { filter: brightness(0) invert(1); }

/* Specificity fixes: keep shaped images over the generic .cc-content image radius */
.cc-content .cc-hero__img img, .cc-content .is-style-cc-blob img { border-radius: 48% 52% 44% 56% / 52% 44% 56% 48%; }
.cc-content .cc-gallery img { border-radius: 22px; }
.cc-content .cc-card__mascot img, .cc-content .cc-inline-mascot img, .cc-content .cc-form-mascot img, .cc-content .cc-party-mascot img, .cc-content img[src*="fox"], .cc-content img[src*="elephant"], .cc-content img[src*="llama"] { border-radius: 0; box-shadow: none; border: 0; }
.cc-hero::before, .cc-hero::after { z-index: 0; pointer-events: none; }
html, body { overflow-x: clip; }
