/* =========================================================
   ATELPA barbershop — viena skata dizains (child theme stils)
   Krāsas ņemtas no logo: brūns #62381F + krēms #E4C18E
   Mobile-first: viss redzams bez skrolēšanas, Bookly centrā.
   ========================================================= */

:root {
  --bg: #62381f;            /* logo fons */
  --bg-deep: #522e19;
  --surface: #4a2915;       /* kartīte */
  --surface-2: #3d2211;
  --ink: #f3e3c8;           /* teksts */
  --muted: #d5b88f;
  --line: rgba(228, 193, 142, .22);
  --accent: #e4c18e;        /* logo krēmkrāsa */
  --accent-hover: #efd2a6;
  --accent-ink: #3d2211;
  --display: "Manrope", system-ui, sans-serif;
  --display-weight: 800;
  --display-case: none;
  --display-track: -0.01em;
  --body: "Manrope", system-ui, sans-serif;
  --radius: 12px;
  --title-size: 1.35rem;
}

*, *::before, *::after { box-sizing: border-box; }

/* WordPress / Twenty Twenty-Four atstarpju neitralizēšana tikai šajā lapā */
body.atelpa .wp-site-blocks { padding: 0 !important; }
body.atelpa .wp-site-blocks > *,
body.atelpa .a-screen > *,
body.atelpa .a-main > *,
body.atelpa .a-card > *,
body.atelpa .wp-block-post-content > * { margin-block: 0 !important; }
body.atelpa .wp-block-post-content { max-width: none !important; padding: 0 !important; }
html { -webkit-text-size-adjust: 100%; height: 100%; }
body.atelpa {
  margin: 0; min-height: 100%; min-height: 100dvh;
  background: var(--bg); /* tieši logo fona krāsa — logo saplūst ar lapu */
  color: var(--ink);
  font: 500 1rem/1.5 var(--body);
  -webkit-font-smoothing: antialiased;
}
.atelpa img { max-width: 100%; display: block; }
.atelpa a { color: inherit; text-underline-offset: .2em; }
.atelpa ::selection { background: var(--accent); color: var(--accent-ink); }
.atelpa :focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }
html { scrollbar-color: var(--accent) var(--bg-deep); }

/* ---------- viena skata izkārtojums ---------- */
.a-screen {
  /* augstums = ekrāns, bet ne vairāk par 860px — tad nekad neveidojas tukša sprauga */
  min-height: min(100svh, 860px);
  display: grid; grid-template-rows: auto auto 1fr; gap: 14px; align-content: start;
  width: min(100%, 460px); margin-inline: auto;
  padding: max(12px, env(safe-area-inset-top)) 16px max(14px, env(safe-area-inset-bottom));
}
.a-brand { display: grid; justify-items: center; gap: 2px; min-width: 0; }
.a-brand__logo { width: min(64vw, 300px); height: auto; aspect-ratio: 908 / 476; object-fit: contain; }
.a-brand__tag { display: none; }
.a-main { display: grid; align-content: start; min-width: 0; }
.a-card { min-width: 0; }

/* rezervācijas kartīte */
.a-card {
  background: var(--surface);
  border: 1px solid var(--line); border-radius: 18px;
  padding: 18px 16px 16px;
  box-shadow: 0 24px 48px -24px rgba(20, 8, 2, .7);
}

/* apakšējā josla */
.a-bar { display: grid; gap: 10px; align-self: end; }
.a-links { display: grid; grid-template-columns: repeat(3, 1fr) 52px; gap: 8px; }
.a-chip {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  min-height: 48px; padding: 0 10px;
  font: 700 .9rem/1 var(--body); color: var(--ink); text-decoration: none;
  background: rgba(228, 193, 142, .08); border: 1px solid var(--line); border-radius: var(--radius);
  cursor: pointer; transition: background-color .2s ease, border-color .2s ease;
}
.a-chip:hover { background: rgba(228, 193, 142, .16); border-color: var(--accent); }
.a-chip svg { width: 20px; height: 20px; }
.a-chip--call { padding: 0 !important; background: var(--accent); color: var(--accent-ink); border-color: var(--accent); }
.a-chip--call:hover { background: var(--accent-hover); }
.a-meta { margin: 0; text-align: center; font-size: .8rem; color: var(--muted); }
.a-meta a { text-decoration: none; }

/* dators: divas kolonnas, joprojām viens skats */
@media (min-width: 900px) {
  .a-screen {
    width: min(100% - 64px, 1080px);
    min-height: min(100svh, 960px);
    grid-template-columns: 1fr 440px; grid-template-rows: 1fr auto;
    column-gap: 72px; row-gap: 24px; align-items: center;
    padding-block: 40px 28px;
  }
  .a-brand { justify-items: start; gap: 18px; }
  .a-brand__logo { width: 100%; max-width: 520px; }
  .a-brand__tag { display: block; margin: 0; font-size: 1.15rem; color: var(--muted); max-width: 34ch; }
  .a-card { padding: 28px; }
  .a-bar { grid-column: 1 / -1; grid-template-columns: auto 1fr; align-items: center; }
  .a-links { grid-template-columns: repeat(3, auto) 52px; }
  .a-chip { padding: 0 20px; }
  .a-meta { text-align: right; }
}
@media (min-width: 900px) and (max-height: 640px) { .a-screen { align-items: start; } }

/* ---------- lapiņas (cenas / meistari / kontakti) ---------- */
.a-sheet {
  position: fixed; inset: auto 0 0 0; margin: 0 auto; z-index: 90;
  width: min(100%, 520px); max-height: 82dvh; overflow: auto;
  padding: 10px 20px max(24px, env(safe-area-inset-bottom));
  background: var(--surface-2); color: var(--ink);
  border: 1px solid var(--line); border-bottom: 0; border-radius: 22px 22px 0 0;
  box-shadow: 0 -20px 50px -20px rgba(0,0,0,.6);
}
.a-sheet::backdrop { background: rgba(25, 10, 3, .55); }
.a-sheet[open] { animation: a-up .35s cubic-bezier(.16,1,.3,1); }
@keyframes a-up { from { transform: translateY(40px); opacity: 0; } to { transform: none; opacity: 1; } }
@media (min-width: 900px) { .a-sheet { inset: 0; margin: auto; border-radius: 22px; border-bottom: 1px solid var(--line); max-height: 80vh; } }
.a-sheet__grab { width: 40px; height: 4px; border-radius: 4px; background: var(--line); margin: 0 auto 12px; }
.a-sheet__head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 6px; }
.a-sheet__head h2 { margin: 0; font-size: 1.4rem; font-weight: 800; }
.a-close { width: 44px; height: 44px; display: grid; place-items: center; background: none; border: 1px solid var(--line); border-radius: 50%; color: var(--ink); cursor: pointer; }
.a-close svg { width: 18px; height: 18px; }
.a-sheet__note { font-size: .85rem; color: var(--muted); margin: 0 0 6px; }

/* cenas */
.a-price {
  width: 100%; display: grid; grid-template-columns: 1fr auto; align-items: center; gap: 2px 12px;
  padding: 12px 0; background: none; border: 0; border-bottom: 1px solid var(--line);
  color: inherit; font: inherit; text-align: left; cursor: pointer;
}
.a-price:last-child { border-bottom: 0; }
.a-price__name { font-weight: 700; }
.a-price__time { grid-column: 1; font-size: .8rem; color: var(--muted); }
.a-price__sum { grid-row: 1 / span 2; grid-column: 2; font-weight: 800; font-size: 1.15rem; color: var(--accent); font-variant-numeric: tabular-nums; }
.a-price:hover .a-price__name { text-decoration: underline; text-underline-offset: .2em; }

/* meistari */
.a-member {
  width: 100%; display: grid; grid-template-columns: 64px 1fr auto; align-items: center; gap: 14px;
  padding: 12px 0; background: none; border: 0; border-bottom: 1px solid var(--line);
  color: inherit; font: inherit; text-align: left; cursor: pointer;
}
.a-member:last-child { border-bottom: 0; }
.a-member img { width: 64px; height: 64px; border-radius: 50%; object-fit: cover; object-position: top; background: var(--surface); }
.a-member b { display: block; font-size: 1.1rem; }
.a-member span { font-size: .85rem; color: var(--muted); }
.a-member em { font-style: normal; font-weight: 800; font-size: .8rem; color: var(--accent-ink); background: var(--accent); padding: 8px 12px; border-radius: 999px; white-space: nowrap; }

/* kontakti */
.a-contact { list-style: none; margin: 0; padding: 0; }
.a-contact li { padding: 12px 0; border-bottom: 1px solid var(--line); }
.a-contact li:last-child { border-bottom: 0; }
.a-contact small { display: block; font-size: .75rem; font-weight: 800; letter-spacing: .1em; text-transform: uppercase; color: var(--muted); }
.a-contact a { font-weight: 700; font-size: 1.05rem; }

/* ---------- smalka kustība ---------- */
@keyframes a-in { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: none; } }
.a-brand { animation: a-in .6s cubic-bezier(.16,1,.3,1) both; }
.a-card { animation: a-in .7s .08s cubic-bezier(.16,1,.3,1) both; }
@media (prefers-reduced-motion: reduce) {
  .a-brand, .a-card, .a-sheet[open] { animation: none; }
}

/* ātrās izvēles mirgojums, kad pakalpojums/meistars izvēlēts no lapiņas */
.atelpa .bookly-form.a-flash [data-type] select { border-color: var(--accent) !important; background-color: rgba(228,193,142,.14) !important; }

/* zemi telefoni — logo mazliet mazāks, lai viss joprojām ietilptu vienā ekrānā */
@media (max-width: 899px) and (max-height: 720px) {
  .a-brand__logo { width: min(50vw, 220px); }
  .a-screen { gap: 10px; }
  .atelpa .bookly-form label { margin-bottom: .3rem !important; }
}


/* ---------- logo ievads: maigs atklāšanās efekts no kreisās uz labo ---------- */
@keyframes a-wipe { from { clip-path: inset(0 100% 0 0); opacity: .2; } to { clip-path: inset(0 0 0 0); opacity: 1; } }
.a-brand__logo { animation: a-wipe 1.1s .1s cubic-bezier(.65,0,.35,1) both; }

/* "Par Atelpu" norāde pirmā ekrāna apakšā */
.a-more { display: none; }
@media (min-height: 760px), (min-width: 900px) {
  .a-more { display: inline-flex; flex-direction: column; align-items: center; gap: 0; justify-self: center;
    font-size: .72rem; font-weight: 800; letter-spacing: .18em; text-transform: uppercase; color: var(--muted); text-decoration: none; }
  .a-more svg { width: 22px; height: 22px; animation: a-bob 2.4s ease-in-out infinite; }
}
@media (min-width: 900px) { .a-more { grid-column: 1 / -1; } }
@keyframes a-bob { 0%, 100% { transform: translateY(0); opacity: .6; } 50% { transform: translateY(5px); opacity: 1; } }

/* ---------- iedvesmas daļa ---------- */
.a-story { border-top: 1px solid var(--line); background: var(--bg-deep); }
.a-story__in { width: min(100% - 40px, 980px); margin-inline: auto; padding: 88px 0 72px; display: grid; gap: 28px; }
.a-reveal { margin: 0; font-weight: 800; font-size: clamp(1.75rem, 6.4vw, 3.4rem); line-height: 1.18; letter-spacing: -0.02em; text-wrap: balance; }
.a-reveal .w { opacity: .18; transition: opacity .35s ease, color .35s ease; }
.a-reveal .w.lit { opacity: 1; }
.a-reveal .w.key.lit { color: var(--accent); }
.a-story__text { margin: 0; max-width: 46ch; font-size: 1.1rem; color: var(--muted); }

/* elpojošais logo — vienīgā "dzīvā" kustība, ļoti lēna */
.a-breath { margin: 64px 0 24px; display: grid; justify-items: center; gap: 10px; text-align: center;
  font-weight: 700; font-size: 1.05rem; letter-spacing: .2em; text-transform: uppercase; color: var(--muted); }
.a-breath img { width: min(78vw, 520px); height: auto; animation: a-breathe 7s ease-in-out infinite; transform-origin: 50% 60%; }
@keyframes a-breathe { 0%, 100% { transform: scale(1); opacity: .9; } 50% { transform: scale(1.04); opacity: 1; } }

.a-quotes { display: grid; gap: 22px; margin-top: 24px; }
.a-quote { margin: 0; padding: 26px 22px; border: 1px solid var(--line); border-radius: 18px; background: rgba(228,193,142,.04); }
.a-quote blockquote { margin: 0 0 18px; font-weight: 700; font-size: 1.3rem; line-height: 1.3; text-wrap: balance; }
.a-quote blockquote::before { content: "“"; display: block; font-size: 3rem; line-height: .6; color: var(--accent); margin-bottom: 10px; }
.a-quote figcaption { display: flex; align-items: center; gap: 12px; font-weight: 800; color: var(--accent); }
.a-quote figcaption img { width: 44px; height: 44px; border-radius: 50%; object-fit: cover; object-position: top; background: var(--surface); }
@media (min-width: 900px) { .a-quotes { grid-template-columns: repeat(3, 1fr); } }

.a-end { margin-top: 40px; display: grid; justify-items: center; gap: 18px; text-align: center; }
.a-end p { margin: 0; font-weight: 800; font-size: clamp(1.6rem, 5vw, 2.4rem); }
.a-cta { display: inline-flex; align-items: center; justify-content: center; min-height: 56px; padding: 0 36px;
  background: var(--accent); color: var(--accent-ink) !important; text-decoration: none; border-radius: var(--radius);
  font-weight: 800; letter-spacing: .08em; text-transform: uppercase; transition: background-color .2s, transform .15s; }
.a-cta:hover { background: var(--accent-hover); }
.a-cta:active { transform: scale(.97); }
.a-copy { margin: 0; padding: 20px; text-align: center; font-size: .8rem; color: var(--muted); border-top: 1px solid var(--line); }
.a-copy a { text-decoration: none; }

/* atsauksmes (reputationhub logrīks) */
.a-reviews { margin-top: 40px; display: grid; gap: 16px; }
.a-reviews__title { margin: 0; text-align: center; font-weight: 800; font-size: clamp(1.4rem, 4.5vw, 2rem); }
.a-reviews__frame { border-radius: 18px; overflow: hidden; border: 1px solid var(--line); background: var(--surface); padding: 8px; }
.a-reviews__frame iframe { display: block; min-height: 320px; border: 0; }

/* parādīšanās skrolējot */
.js .a-fade { opacity: 0; transform: translateY(18px); transition: opacity .8s cubic-bezier(.16,1,.3,1), transform .8s cubic-bezier(.16,1,.3,1); }
.js .a-fade.in { opacity: 1; transform: none; }
.a-quotes .a-fade:nth-child(2) { transition-delay: .08s; }
.a-quotes .a-fade:nth-child(3) { transition-delay: .16s; }

@media (prefers-reduced-motion: reduce) {
  .a-brand__logo, .a-breath img, .a-more svg { animation: none; }
  .js .a-fade { opacity: 1; transform: none; transition: none; }
  .a-reveal .w { opacity: 1; transition: none; }
}


/* ---------- GALERIJAS LAPA (veidne "Atelpa galerija") ---------- */
.a-galpage { width: min(100% - 32px, 1100px); margin-inline: auto; padding: 14px 0 110px; display: grid; gap: 18px; }
.a-galhead { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.a-galhead a img { width: 150px; height: auto; }
.atelpa .a-galhead h1 { margin: 0; font-family: var(--body); font-size: 1.5rem; font-weight: 800; color: var(--ink); letter-spacing: -0.01em; }
.atelpa .wp-block-gallery.has-nested-images { gap: 8px !important; }
.atelpa .wp-block-gallery.has-nested-images figure.wp-block-image { width: calc(50% - 4px) !important; flex-grow: 0 !important; margin: 0 !important; border-radius: 12px; overflow: hidden; }
.atelpa .wp-block-gallery.has-nested-images figure.wp-block-image img { aspect-ratio: 4 / 5; object-fit: cover; width: 100%; height: 100% !important; transition: transform .6s cubic-bezier(.16,1,.3,1); }
.atelpa .wp-block-gallery.has-nested-images figure.wp-block-image:hover img { transform: scale(1.04); }
@media (min-width: 900px) {
  .a-galpage { padding-top: 32px; }
  .a-galhead a img { width: 200px; }
  .atelpa .wp-block-gallery.has-nested-images figure.wp-block-image { width: calc(25% - 6px) !important; }
}
.a-galdock { position: fixed; left: 0; right: 0; bottom: 0; z-index: 60; display: flex; gap: 8px; justify-content: center;
  padding: 10px 16px max(12px, env(safe-area-inset-bottom)); background: color-mix(in srgb, var(--bg) 90%, transparent); border-top: 1px solid var(--line); }
.a-galdock .a-cta { flex: 1; max-width: 420px; }
/* WordPress iebūvētais "Expand on click" skats krāsās */
.atelpa .wp-lightbox-overlay .scrim { background-color: var(--bg-deep) !important; }


/* ---------- MEISTARI (lapiņā un lejasdaļā) ---------- */
.atelpa h1, .atelpa h2, .atelpa h3, .atelpa blockquote { font-family: var(--body); }
.atelpa .a-sheet__head h2 { color: var(--ink); }
.a-masters {
  display: grid; grid-auto-flow: column; grid-auto-columns: 78%; gap: 14px;
  overflow-x: auto; scroll-snap-type: x mandatory; overscroll-behavior-x: contain;
  margin-inline: -20px; padding: 4px 20px 14px; scrollbar-width: none;
}
.a-masters::-webkit-scrollbar { display: none; }
.a-master {
  scroll-snap-align: center; display: grid; grid-template-rows: auto 1fr auto; gap: 14px;
  background: var(--surface); border: 1px solid var(--line); border-radius: 22px; padding: 10px 10px 14px;
}
.a-master__photo { position: relative; aspect-ratio: 4 / 5; border-radius: 16px; overflow: hidden; background: #e9e4dc; }
.a-master__photo img { width: 100%; height: 100%; object-fit: cover; object-position: 50% 20%;
  transition: transform .8s cubic-bezier(.16,1,.3,1); }
.a-master__photo::after { content: ""; position: absolute; inset: 45% 0 0; background: linear-gradient(to top, rgba(61,34,17,.92), rgba(61,34,17,0)); pointer-events: none; }
.a-master__name { position: absolute; left: 16px; bottom: 12px; z-index: 1; font-weight: 800; font-size: 2.3rem; line-height: 1; letter-spacing: -0.02em; color: var(--accent); }
.a-master__quote { margin: 0 6px; font-weight: 600; font-size: 1.02rem; line-height: 1.4; color: var(--ink); }
.a-master__quote::before { content: "“"; color: var(--accent); font-weight: 800; margin-right: 2px; }
.a-master__quote::after { content: "”"; color: var(--accent); font-weight: 800; }
.a-master__btn {
  min-height: 50px; border: 0; border-radius: var(--radius); cursor: pointer;
  background: var(--accent); color: var(--accent-ink); font: 800 .85rem/1 var(--body); letter-spacing: .06em; text-transform: uppercase;
  transition: background-color .2s, transform .15s;
}
.a-master__btn:hover { background: var(--accent-hover); }
.a-master__btn:active { transform: scale(.97); }
.a-master:hover .a-master__photo img { transform: scale(1.04); }

.a-team { margin-top: 56px; display: grid; gap: 18px; }
.a-team__title { margin: 0; text-align: center; font-weight: 800; font-size: clamp(1.6rem, 5vw, 2.4rem); }

/* plašā lapiņa meistariem */
.a-sheet--wide { overflow-x: hidden; }
@media (min-width: 900px) {
  .a-sheet--wide { width: min(100% - 64px, 980px); padding: 18px 28px 28px; }
  .a-masters { grid-auto-flow: row; grid-template-columns: repeat(3, 1fr); grid-auto-columns: auto; overflow: visible; margin: 0; padding: 4px 0 0; gap: 20px; }
  .a-team .a-masters { gap: 24px; }
}

/* bilžu baltās malas paslēpšana */
.a-master__photo img { transform: scale(1.07); }
.a-master:hover .a-master__photo img { transform: scale(1.11); }

/* ---------- MŪSU DRAUGI — slīdošā josla ---------- */
.a-pals { margin-top: 56px; display: grid; gap: 18px; }
.a-marquee {
  overflow: hidden; margin-inline: -20px; padding: 6px 0;
  -webkit-mask-image: linear-gradient(to right, transparent, #000 12%, #000 88%, transparent);
          mask-image: linear-gradient(to right, transparent, #000 12%, #000 88%, transparent);
}
.a-marquee__track { display: flex; width: max-content; animation: a-slide 34s linear infinite; }
.a-marquee:hover .a-marquee__track { animation-play-state: paused; }
@keyframes a-slide { to { transform: translateX(-50%); } }
.a-pal {
  flex: 0 0 auto; display: grid; place-items: center; width: 150px; height: 84px; margin-right: 14px; padding: 12px 16px;
  background: #f3e3c8; border-radius: 16px; box-shadow: 0 10px 24px -14px rgba(20,8,2,.7);
  transition: transform .35s cubic-bezier(.16,1,.3,1);
}
.a-pal:nth-child(even) { transform: rotate(-1.5deg); }
.a-pal:nth-child(odd) { transform: rotate(1.2deg); }
.a-pal:hover { transform: rotate(0) translateY(-4px) scale(1.04); }
.a-pal img { max-width: 100%; max-height: 100%; width: auto; height: auto; object-fit: contain; }
@media (min-width: 900px) { .a-pal { width: 180px; height: 100px; margin-right: 20px; } .a-marquee { margin-inline: 0; } }
@media (prefers-reduced-motion: reduce) {
  .a-marquee { overflow-x: auto; }
  .a-marquee__track { animation: none; }
}

/* draugu kartītes: tumšas (gaišiem logo), Proraso — gaiša */
.a-pal { background: var(--surface-2); border: 1px solid var(--line); }
.a-pal--light { background: #f3e3c8; border-color: transparent; }

/* ===== MŪSU DRAUGI v2 — tīrs, logo tieši uz brūnā fona (taste: edge-to-edge marquee) ===== */
.a-pals .a-marquee {
  margin-inline: calc(50% - 50vw); padding: 28px 0;
  border-block: 1px solid var(--line);
}
.a-pals .a-marquee__track { animation-duration: 42s; }
.a-pals .a-marquee.is-paused .a-marquee__track { animation-play-state: paused; }
.a-pals .a-pal, .a-pals .a-pal--light {
  width: auto; height: 52px; margin-right: 64px; padding: 0;
  background: none; border: 0; border-radius: 0; box-shadow: none; transform: none;
  opacity: .8; transition: opacity .2s ease, transform .3s cubic-bezier(.22,1,.36,1);
}
.a-pals .a-pal:nth-child(n) { transform: none; }
.a-pals .a-pal:hover { opacity: 1; transform: translateY(-2px); }
.a-pals .a-pal img { height: 100%; width: auto; max-width: 150px; object-fit: contain; }
@media (min-width: 900px) {
  .a-pals .a-pal, .a-pals .a-pal--light { height: 68px; margin-right: 96px; }
  .a-pals .a-pal img { max-width: 190px; }
}

.a-pals .a-pal { display: flex; align-items: center; overflow: hidden; }
.a-pals .a-pal img { height: 52px; max-height: none; max-width: 150px; width: auto; }
@media (min-width: 900px) { .a-pals .a-pal img { height: 68px; max-width: 190px; } }

/* ===== MEISTARI v2 — barbershop: arkas spogulis, silts vintāžas tonis, bārbera stabiņš ===== */
.a-masters { grid-auto-columns: 74%; gap: 22px; }
.a-master { background: none; border: 0; padding: 8px 0 4px; gap: 16px; text-align: center; justify-items: center; grid-template-rows: none; }
.a-master > * { order: 3; }
.a-master__photo { order: 1; }
.a-master::after {
  content: ""; order: 2; width: 54px; height: 6px; border-radius: 6px;
  background: repeating-linear-gradient(-45deg, var(--accent) 0 5px, transparent 5px 10px) 0 0 / 28px 6px;
  box-shadow: inset 0 0 0 1px rgba(228,193,142,.35);
  animation: a-pole 1.6s linear infinite;
}
@keyframes a-pole { to { background-position: 28px 0; } }
.a-master__btn { order: 4; }
.a-master__photo {
  width: 100%; aspect-ratio: 3 / 4; border-radius: 999px 999px 14px 14px; background: var(--surface);
  outline: 1px solid rgba(228,193,142,.45); outline-offset: 6px; margin: 8px 0 6px;
}
.a-master__photo img { transform: scale(1.14); object-position: 50% 18%;
  filter: sepia(.45) saturate(.75) contrast(1.06) brightness(.92);
  transition: transform .9s cubic-bezier(.16,1,.3,1), filter .6s ease; }
.a-master:hover .a-master__photo img, .a-master:focus-within .a-master__photo img { transform: scale(1.19); filter: none; }
.a-master__photo::after { inset: 55% 0 0; background: linear-gradient(to top, rgba(61,34,17,.95), rgba(61,34,17,0)); }
.a-master__name { left: 0; right: 0; bottom: 14px; text-align: center; font-size: 2.6rem; color: #f3e3c8; }
.a-master__quote { margin: 0 4px; max-width: 26ch; font-weight: 500; font-size: 1rem; color: var(--muted); }
.a-master__btn {
  background: transparent; color: var(--accent); border: 1.5px solid rgba(228,193,142,.6);
  min-height: 48px; padding: 0 22px; border-radius: 999px; font-size: .78rem; letter-spacing: .1em;
}
.a-master__btn:hover { background: var(--accent); color: var(--accent-ink); border-color: var(--accent); }
@media (min-width: 900px) { .a-masters { gap: 40px; } .a-master__name { font-size: 3rem; } }
@media (prefers-reduced-motion: reduce) { .a-master::after { animation: none; } }

/* KAITAI logo — ik pa laikam apgriežas aplis */
.a-pals .a-pal--kt { color: var(--accent); }
.a-pals .a-pal--kt .a-kt { height: 52px; width: 52px; display: block; }
.a-kt__spin { transform-box: view-box; transform-origin: 300px 210px; animation: a-kt-spin 7s cubic-bezier(.76,0,.24,1) infinite; }
@keyframes a-kt-spin { 0%, 78% { transform: rotate(0); } 100% { transform: rotate(360deg); } }
@media (min-width: 900px) { .a-pals .a-pal--kt .a-kt { height: 68px; width: 68px; } }
@media (prefers-reduced-motion: reduce) { .a-kt__spin { animation: none; } }

/* SEO H1 — logo ir galvenais virsraksts; teksts redzams tikai meklētājiem un ekrāna lasītājiem */
.atelpa .a-brand__h1 { margin: 0; font-size: inherit; line-height: 0; }
.a-vh { position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }

/* cenrādis no Bookly — kategoriju virsraksti */
.atelpa .a-price-cat { margin: 18px 0 2px; font-family: var(--body); font-size: .75rem; font-weight: 800; letter-spacing: .16em; text-transform: uppercase; color: var(--accent); }
.atelpa .a-price-cat:first-of-type { margin-top: 6px; }

/* ===== GALERIJA v2 — mākslinieciska barbershop mozaīka ===== */
body.atelpa-gal .a-galpage { width: min(100% - 24px, 1200px); padding: 22px 0 120px; gap: 26px; }
body.atelpa-gal .a-galhead { display: grid; justify-items: center; gap: 10px; text-align: center; padding-top: 8px; }
body.atelpa-gal .a-galhead__logo img { width: 150px; height: auto; }
body.atelpa-gal .a-galhead h1 { margin: 10px 0 0; font-family: var(--body); font-weight: 800; font-size: clamp(3.2rem, 14vw, 7rem); line-height: .9; letter-spacing: -0.04em; color: var(--ink); }
body.atelpa-gal .a-galhead__sub { margin: 0; color: var(--muted); max-width: 32ch; }
body.atelpa-gal .a-galhead__pole { width: 64px; height: 6px; border-radius: 6px; margin-top: 6px;
  background: repeating-linear-gradient(-45deg, var(--accent) 0 5px, transparent 5px 10px) 0 0 / 28px 6px;
  box-shadow: inset 0 0 0 1px rgba(228,193,142,.35); animation: a-pole 1.6s linear infinite; }

body.atelpa-gal .wp-block-gallery.has-nested-images {
  display: grid !important; grid-template-columns: repeat(2, minmax(0, 1fr)); grid-auto-rows: 44vw; grid-auto-flow: dense;
  gap: 8px !important; margin: 0 !important;
}
body.atelpa-gal .wp-block-gallery.has-nested-images figure.wp-block-image {
  width: auto !important; margin: 0 !important; border-radius: 14px; overflow: hidden; position: relative; background: var(--surface);
}
body.atelpa-gal .wp-block-gallery.has-nested-images figure.is-tall { grid-row: span 2; border-radius: 999px 999px 14px 14px; }
body.atelpa-gal .wp-block-gallery.has-nested-images figure.is-big { grid-column: span 2; grid-row: span 2; }
body.atelpa-gal .wp-block-gallery.has-nested-images figure.wp-block-image img {
  width: 100% !important; height: 100% !important; object-fit: cover; aspect-ratio: auto;
  filter: sepia(.32) saturate(.82) contrast(1.05) brightness(.95);
  transition: filter .6s ease, transform .9s cubic-bezier(.16,1,.3,1);
}
body.atelpa-gal .wp-block-gallery.has-nested-images figure.wp-block-image:hover img { filter: none; transform: scale(1.04); }
body.atelpa-gal .wp-block-gallery.has-nested-images figure.is-tall::after {
  content: ""; position: absolute; inset: 6px; border-radius: inherit; border: 1px solid rgba(243,227,200,.35); pointer-events: none;
}
/* parādīšanās ritinot */
.js body.atelpa-gal figure.wp-block-image.a-rise { opacity: 0; transform: translateY(26px); transition: opacity .8s cubic-bezier(.16,1,.3,1), transform .8s cubic-bezier(.16,1,.3,1); }
.js body.atelpa-gal figure.wp-block-image.a-rise.in { opacity: 1; transform: none; }
@media (min-width: 900px) {
  body.atelpa-gal .a-galpage { padding-top: 40px; gap: 40px; }
  body.atelpa-gal .wp-block-gallery.has-nested-images { grid-template-columns: repeat(4, minmax(0, 1fr)); grid-auto-rows: 230px; gap: 12px !important; }
}
/* pilnekrāna skats (WordPress "Expand on click") jūsu krāsās */
body.atelpa-gal .wp-lightbox-overlay .scrim { background-color: #2b170b !important; opacity: .96 !important; }
body.atelpa-gal .wp-lightbox-overlay .close-button { color: var(--accent) !important; }
@media (prefers-reduced-motion: reduce) {
  .js body.atelpa-gal figure.wp-block-image.a-rise { opacity: 1; transform: none; transition: none; }
  body.atelpa-gal .a-galhead__pole { animation: none; }
}

/* ===== GALERIJA v3 — izstāde: treileris, meistari kadrā, brīva ekspozīcija ===== */
body.atelpa-gal .a-galpage { width: min(100% - 24px, 1180px); }
body.atelpa-gal .entry-content { display: grid; gap: 0; }
.a-ex-h { margin: 72px 0 22px; text-align: center; font-family: var(--body); font-weight: 800; font-size: clamp(1.8rem, 6vw, 3rem); letter-spacing: -0.03em; color: var(--ink); }
.a-ex-h::after { content: ""; display: block; width: 54px; height: 6px; margin: 14px auto 0; border-radius: 6px;
  background: repeating-linear-gradient(-45deg, var(--accent) 0 5px, transparent 5px 10px) 0 0 / 28px 6px; box-shadow: inset 0 0 0 1px rgba(228,193,142,.35); }

/* video */
.a-vid { margin: 0; display: grid; gap: 12px; }
.a-vid__play { all: unset; position: relative; display: block; width: 100%; aspect-ratio: 16 / 9; border-radius: 16px; overflow: hidden; cursor: pointer; background: #1d0f07; }
.a-vid__play img { width: 100%; height: 100%; object-fit: cover; filter: sepia(.35) saturate(.8) brightness(.85); transform: scale(1.02); transition: filter .6s ease, transform .9s cubic-bezier(.16,1,.3,1); }
.a-vid__play:hover img, .a-vid__play:focus-visible img { filter: none; transform: scale(1.05); }
.a-vid__play::after { content: ""; position: absolute; inset: 0; background: linear-gradient(to top, rgba(43,23,11,.7), rgba(43,23,11,0) 55%); }
.a-vid__btn { position: absolute; z-index: 1; left: 50%; top: 50%; width: 74px; height: 74px; margin: -37px 0 0 -37px; border-radius: 50%;
  display: grid; place-items: center; background: var(--accent); color: var(--accent-ink); box-shadow: 0 0 0 0 rgba(228,193,142,.55); animation: a-ring 2.4s ease-out infinite; transition: transform .25s cubic-bezier(.22,1,.36,1); }
.a-vid__play:hover .a-vid__btn { transform: scale(1.08); }
.a-vid__btn svg { width: 26px; height: 26px; margin-left: 4px; }
@keyframes a-ring { 0% { box-shadow: 0 0 0 0 rgba(228,193,142,.5); } 70%, 100% { box-shadow: 0 0 0 22px rgba(228,193,142,0); } }
.a-vid__over { position: absolute; z-index: 1; left: 18px; bottom: 14px; right: 18px; color: #f3e3c8; font-weight: 800; font-size: 1.05rem; letter-spacing: .14em; text-transform: uppercase; }
.a-vid iframe { width: 100%; aspect-ratio: 16 / 9; border: 0; border-radius: 16px; display: block; background: #000; }
.a-vid figcaption { display: grid; gap: 2px; padding: 0 4px; }
.a-vid figcaption b { font-size: 1.6rem; font-weight: 800; letter-spacing: -0.02em; color: var(--accent); line-height: 1.1; }
.a-vid figcaption span { color: var(--muted); font-size: .95rem; }
/* treileris — kino kadrs */
.a-vid--treileris { margin-top: 26px; }
.a-vid--treileris .a-vid__play, .a-vid--treileris iframe { border-radius: 6px; box-shadow: 0 30px 70px -30px rgba(0,0,0,.8); outline: 1px solid rgba(228,193,142,.35); outline-offset: 8px; }
.a-vid--treileris figcaption { display: none; }
/* meistaru video rinda */
.a-vids { display: grid; grid-auto-flow: column; grid-auto-columns: 84%; gap: 14px; overflow-x: auto; scroll-snap-type: x mandatory; margin-inline: -12px; padding: 0 12px 6px; scrollbar-width: none; }
.a-vids::-webkit-scrollbar { display: none; }
.a-vids > * { scroll-snap-align: center; margin: 0 !important; }
@media (min-width: 900px) { .a-vids { grid-auto-flow: row; grid-template-columns: repeat(3, 1fr); overflow: visible; margin: 0; padding: 0; gap: 22px; } }

/* brīvā ekspozīcija — atkārtojas ik pa 5 bildēm, tāpēc der jebkuram bilžu skaitam */
body.atelpa-gal .wp-block-gallery.has-nested-images {
  display: grid !important; grid-template-columns: repeat(12, minmax(0, 1fr)) !important; grid-auto-rows: auto !important;
  grid-auto-flow: row !important; column-gap: 12px !important; row-gap: 0 !important; align-items: start;
}
body.atelpa-gal .wp-block-gallery.has-nested-images figure.wp-block-image { grid-row: auto !important; border-radius: 14px; overflow: hidden; }
body.atelpa-gal .wp-block-gallery.has-nested-images figure.wp-block-image img { height: auto !important; aspect-ratio: auto; transform: translateY(var(--py, 0)) scale(1.12);
  filter: sepia(.85) saturate(.5) brightness(.8) contrast(1.05); transition: filter 1.6s ease, transform .1s linear; }
body.atelpa-gal .wp-block-gallery.has-nested-images figure.wp-block-image.in img { filter: sepia(.18) saturate(.95) brightness(.97); }
body.atelpa-gal .wp-block-gallery.has-nested-images figure.wp-block-image:hover img { filter: none; }
body.atelpa-gal .wp-block-gallery.has-nested-images figure.is-tall { border-radius: 999px 999px 14px 14px; }
/* telefons */
body.atelpa-gal .wp-block-gallery.has-nested-images figure:nth-child(5n+1) { grid-column: 1 / 13; margin-top: 0 !important; }
body.atelpa-gal .wp-block-gallery.has-nested-images figure:nth-child(5n+2) { grid-column: 5 / 13; margin-top: 28px !important; }
body.atelpa-gal .wp-block-gallery.has-nested-images figure:nth-child(5n+3) { grid-column: 1 / 10; margin-top: 28px !important; }
body.atelpa-gal .wp-block-gallery.has-nested-images figure:nth-child(5n+4) { grid-column: 4 / 13; margin-top: 28px !important; }
body.atelpa-gal .wp-block-gallery.has-nested-images figure:nth-child(5n+5) { grid-column: 1 / 12; margin-top: 28px !important; }
body.atelpa-gal .wp-block-gallery.has-nested-images figure.is-tall:nth-child(5n+1),
body.atelpa-gal .wp-block-gallery.has-nested-images figure.is-tall:nth-child(5n+5) { grid-column: 2 / 12; }
/* dators: divi blakus ar nobīdi, tad viens plats */
@media (min-width: 900px) {
  body.atelpa-gal .wp-block-gallery.has-nested-images { column-gap: 28px !important; }
  body.atelpa-gal .wp-block-gallery.has-nested-images figure:nth-child(5n+1) { grid-column: 1 / 8; margin-top: 40px !important; }
  body.atelpa-gal .wp-block-gallery.has-nested-images figure:nth-child(5n+2) { grid-column: 8 / 13; margin-top: 170px !important; }
  body.atelpa-gal .wp-block-gallery.has-nested-images figure:nth-child(5n+3) { grid-column: 2 / 7; margin-top: 60px !important; }
  body.atelpa-gal .wp-block-gallery.has-nested-images figure:nth-child(5n+4) { grid-column: 7 / 12; margin-top: 180px !important; }
  body.atelpa-gal .wp-block-gallery.has-nested-images figure:nth-child(5n+5) { grid-column: 3 / 13; margin-top: 60px !important; }
  body.atelpa-gal .wp-block-gallery.has-nested-images figure.is-tall:nth-child(5n+1) { grid-column: 2 / 6; }
  body.atelpa-gal .wp-block-gallery.has-nested-images figure.is-tall:nth-child(5n+5) { grid-column: 5 / 9; }
  body.atelpa-gal .wp-block-gallery.has-nested-images figure.is-tall:nth-child(5n+3) { grid-column: 3 / 7; }
}
@media (prefers-reduced-motion: reduce) {
  .a-vid__btn { animation: none; }
  body.atelpa-gal .wp-block-gallery.has-nested-images figure.wp-block-image img { transform: none; filter: sepia(.18) saturate(.95); }
}

/* galerija v3 labojumi: atstarpes ar padding (WP noņem margin), kino kadra atkāpe */
body.atelpa-gal .a-ex-h { margin: 0 !important; padding: 72px 0 22px; }
body.atelpa-gal .a-vid--treileris { padding-top: 30px; }

/* ===== GALERIJA v4 — pakāpienu kolonnas (bez spraugām, jebkurš bilžu skaits) ===== */
body.atelpa-gal .wp-block-gallery.has-nested-images.a-mason { display: flex !important; align-items: flex-start; gap: 12px !important; }
body.atelpa-gal .a-mason__col { flex: 1 1 0; min-width: 0; display: flex; flex-direction: column; gap: 12px; }
body.atelpa-gal .a-mason__col:nth-child(2) { padding-top: 56px; }
body.atelpa-gal .wp-block-gallery.has-nested-images.a-mason figure.wp-block-image { width: 100% !important; margin: 0 !important; grid-column: auto !important; }
@media (min-width: 900px) {
  body.atelpa-gal .wp-block-gallery.has-nested-images.a-mason { gap: 24px !important; }
  body.atelpa-gal .a-mason__col { gap: 24px; }
  body.atelpa-gal .a-mason__col:nth-child(2) { padding-top: 120px; }
  body.atelpa-gal .a-mason__col:nth-child(3) { padding-top: 48px; }
}

/* ===== Izceltās saites pirmajā ekrānā: Galerija + Abonements ===== */
.a-feature { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.a-feat { display: flex; align-items: center; gap: 10px; min-height: 56px; padding: 7px 10px 7px 7px; text-decoration: none; color: var(--ink);
  background: rgba(228,193,142,.12); border: 1px solid rgba(228,193,142,.4); border-radius: 14px; transition: background-color .2s, border-color .2s, transform .15s; }
.a-feat:hover { background: rgba(228,193,142,.2); border-color: var(--accent); }
.a-feat:active { transform: scale(.98); }
.a-feat__img { position: relative; flex: 0 0 auto; width: 52px; height: 40px; border-radius: 9px; overflow: hidden; display: grid; place-items: center; background: #2b170b; }
.a-feat__img img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; filter: sepia(.35) brightness(.75); }
.a-feat__img svg { position: relative; width: 18px; height: 18px; color: var(--accent); }
.a-feat__ico { flex: 0 0 auto; width: 40px; height: 40px; border-radius: 10px; display: grid; place-items: center; background: var(--accent); color: var(--accent-ink); }
.a-feat__ico svg { width: 24px; height: 24px; }
.a-feat__txt { display: grid; min-width: 0; line-height: 1.15; }
.a-feat__txt b { font-weight: 800; font-size: .95rem; }
.a-feat__txt small { font-size: .72rem; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
@media (min-width: 900px) {
  .a-feature { grid-column: 1 / -1; grid-template-columns: repeat(2, minmax(0, 280px)); }
  .a-feat { min-height: 62px; }
}

/* pirmais ekrāns ar izceltajām saitēm — kompaktāk telefonā */
@media (max-width: 899px) {
  .a-feat { min-height: 50px; padding: 5px 8px 5px 5px; }
  .a-feat__img { width: 46px; height: 38px; }
  .a-feat__ico { width: 38px; height: 38px; }
  .a-chip { min-height: 44px; }
  .a-bar { gap: 8px; }
}
@media (max-width: 899px) and (max-height: 860px) {
  .a-brand__logo { width: min(50vw, 220px); }
  .a-screen { gap: 10px; }
  .a-card { padding: 14px 14px 12px; }
  .atelpa .bookly-form .bookly-table { gap: .6rem; }
  .atelpa .bookly-form .bookly-box { margin-bottom: .75rem !important; }
}

/* ===== ATELPA LAPA (abonements) + Contact Form 7 kopējā stilā ===== */
body.atelpa-page .a-pagewrap { width: min(100% - 32px, 1080px); margin-inline: auto; padding: 18px 0 120px; display: grid; gap: 8px; }
body.atelpa-page .a-pagehead { display: grid; justify-items: center; }
body.atelpa-page .a-pagehead img { width: 150px; height: auto; }
.a-abo { display: grid; gap: 18px; text-align: center; justify-items: center; padding-top: 18px; }
.atelpa .a-abo__h { margin: 0; font-family: var(--body); font-weight: 800; font-size: clamp(3rem, 13vw, 6.5rem); line-height: .92; letter-spacing: -0.04em; color: var(--ink); }
.a-abo__lead { margin: 0; max-width: 30ch; font-size: clamp(1.25rem, 4.6vw, 1.7rem); font-weight: 700; line-height: 1.3; color: var(--ink); text-wrap: balance; }
.a-abo__lead em { font-style: normal; color: var(--accent); }
.a-abo__sub { margin: 0; color: var(--muted); max-width: 42ch; }
.a-abo__pole { width: 64px; height: 6px; border-radius: 6px; background: repeating-linear-gradient(-45deg, var(--accent) 0 5px, transparent 5px 10px) 0 0 / 28px 6px; box-shadow: inset 0 0 0 1px rgba(228,193,142,.35); animation: a-pole 1.6s linear infinite; }
.a-abo__facts { list-style: none; margin: 18px 0 0; padding: 0; width: 100%; display: grid; gap: 10px; text-align: left; }
.a-abo__facts li { display: grid; gap: 2px; padding: 16px 18px; border: 1px solid var(--line); border-radius: 16px; background: rgba(228,193,142,.05); }
.a-abo__facts b { font-size: 1.1rem; font-weight: 800; color: var(--accent); }
.a-abo__facts span { color: var(--ink); opacity: .85; }
.a-abo__ex { margin: 10px 0 0; max-width: 34ch; font-size: 1.15rem; font-weight: 600; color: var(--muted); }
.a-abo__ex q { color: var(--ink); quotes: "“" "”"; }
@media (min-width: 900px) { .a-abo__facts { grid-template-columns: repeat(2, 1fr); gap: 16px; } }

.a-abo-form { width: 100%; max-width: 560px; justify-self: center; margin-top: 40px !important; padding: 22px 18px 18px; background: var(--surface); border: 1px solid var(--line); border-radius: 18px; box-shadow: 0 24px 48px -24px rgba(20,8,2,.7); }
.atelpa .a-abo-form h2 { margin: 0 0 16px; font-family: var(--body); font-size: 1.5rem; font-weight: 800; color: var(--ink); text-align: center; }
@media (min-width: 900px) { .a-abo-form { padding: 30px 30px 26px; } }

/* Contact Form 7 */
.atelpa .wpcf7 form p { margin: 0 0 14px; }
.atelpa .wpcf7 form label { display: block; font-size: .75rem; font-weight: 800; letter-spacing: .12em; text-transform: uppercase; color: var(--muted); }
.atelpa .wpcf7 form label br { display: none; }
.atelpa .wpcf7 .wpcf7-form-control-wrap { display: block; margin-top: .45rem; }
.atelpa .wpcf7 input[type="text"], .atelpa .wpcf7 input[type="email"], .atelpa .wpcf7 input[type="tel"], .atelpa .wpcf7 textarea {
  width: 100%; min-height: 52px; padding: .75rem 1rem; font: 600 16px/1.4 var(--body); letter-spacing: 0; text-transform: none;
  color: var(--ink); background: var(--surface-2); border: 1.5px solid var(--line); border-radius: 10px; outline: none; transition: border-color .2s; }
.atelpa .wpcf7 textarea { min-height: 110px; height: 110px; resize: vertical; }
.atelpa .wpcf7 input:focus, .atelpa .wpcf7 textarea:focus { border-color: var(--accent); }
.atelpa .wpcf7 .wpcf7-list-item { margin: 0; }
.atelpa .wpcf7 .wpcf7-list-item label { display: flex; gap: 10px; align-items: flex-start; font-size: .9rem; font-weight: 600; letter-spacing: 0; text-transform: none; color: var(--ink); cursor: pointer; }
.atelpa .wpcf7 input[type="checkbox"] { width: 20px; height: 20px; margin: 1px 0 0; accent-color: var(--accent); flex: 0 0 auto; }
.atelpa .wpcf7 input[type="submit"] { width: 100%; min-height: 54px; border: 0; border-radius: var(--radius); cursor: pointer;
  background: var(--accent); color: var(--accent-ink); font: 800 .95rem/1 var(--body); letter-spacing: .08em; text-transform: uppercase; transition: background-color .2s, transform .15s; }
.atelpa .wpcf7 input[type="submit"]:hover { background: var(--accent-hover); }
.atelpa .wpcf7 input[type="submit"]:active { transform: scale(.98); }
.atelpa .wpcf7 .wpcf7-spinner { display: block; margin: 10px auto 0; }
.atelpa .wpcf7 .wpcf7-not-valid-tip { margin-top: 6px; font-size: .85rem; font-weight: 700; letter-spacing: 0; text-transform: none; color: #f0866a; }
.atelpa .wpcf7 .wpcf7-not-valid { border-color: #f0866a !important; }
.atelpa .wpcf7 form .wpcf7-response-output { margin: 12px 0 0; padding: 12px 14px; border-radius: 10px; border: 1px solid var(--line); color: var(--ink); font-weight: 600; }
.atelpa .wpcf7 form.sent .wpcf7-response-output { border-color: var(--accent); background: rgba(228,193,142,.12); }
.atelpa .wpcf7 form.invalid .wpcf7-response-output, .atelpa .wpcf7 form.failed .wpcf7-response-output { border-color: #f0866a; }
@media (prefers-reduced-motion: reduce) { .a-abo__pole { animation: none; } }

/* apakšējā josla paslēpjas, kamēr forma redzama */
.a-galdock { transition: transform .35s cubic-bezier(.22,1,.36,1); }
.a-galdock.is-hidden { transform: translateY(120%); }
