/*
Theme Name: ProNatal
Theme URI: https://www.pronatal.hr/
Author: Barrek d.o.o.
Author URI: https://barrek.eu
Description: Tema za Polikliniku ProNatal. Usluge, tim i iskustva pacijenata uređuju se kao vlastiti tipovi sadržaja, sekcije se slažu ProNatal blokovima i predlošcima, a blog dolazi u istom dizajnu.
Version: 1.0.0
Requires at least: 6.3
Tested up to: 7.0
Requires PHP: 7.4
License: GNU General Public License v2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Text Domain: pronatal
Tags: custom-logo, custom-menu, featured-images, block-patterns, translation-ready, one-column, blog
*/

/* =========================================================
   Pristupačnost i WP osnove
   ========================================================= */
.screen-reader-text {
  position: absolute !important;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
  border: 0;
}

.skip-link {
  position: absolute;
  top: -100px;
  left: 16px;
  z-index: 300;
  padding: 14px 24px;
  border-radius: 0 0 12px 12px;
  background: var(--navy);
  color: var(--ivory);
  font-weight: 600;
  font-size: .85rem;
  letter-spacing: .1em;
  text-transform: uppercase;
  transition: top .2s var(--ease);
}

.skip-link:focus {
  top: 0;
  width: auto;
  height: auto;
  clip-path: none;
}

.admin-bar .header { top: 32px; }
.admin-bar .mobile-nav { top: 32px; }

@media (max-width: 782px) {
  .admin-bar .header { top: 46px; }
  .admin-bar .mobile-nav { top: 46px; }
}

/* =========================================================
   Sadržaj iz uređivača
   ========================================================= */
.pronatal-content > *:not(.section):not(.wp-block-group.section):not(.alignfull):not(.endcta):not(.cta) {
  max-width: calc(var(--maxw) - 64px);
  margin-left: auto;
  margin-right: auto;
  padding-left: 32px;
  padding-right: 32px;
}

.pronatal-content > p,
.pronatal-content > ul,
.pronatal-content > ol,
.pronatal-content > h2,
.pronatal-content > h3,
.pronatal-content > blockquote,
.pronatal-content > figure {
  margin-top: 24px;
}

.pronatal-content > :first-child { margin-top: 60px; }
.pronatal-content > :last-child { margin-bottom: 60px; }

.pronatal-content > .section:first-child,
.pronatal-content > .wp-block-group.section:first-child { margin-top: 0; }

/* CTA traka nosi svoju boju preko cijele sirine. Razmaci iznad su za tekst iz
   uredivaca; na traci bi ostavili prugu podloge izmedu nje i podnozja. Vidi se
   samo na naslovnici, gdje je traka zadnji blok u sadrzaju, a ne iz predloska. */
.pronatal-content > .endcta:last-child,
.pronatal-content > .cta:last-child { margin-bottom: 0; }

.pronatal-content > .endcta:first-child,
.pronatal-content > .cta:first-child { margin-top: 0; }

.wp-block-group.section > .wp-block-group.container { width: 100%; }

.alignfull {
  max-width: none;
  width: 100%;
  margin-left: 0;
  margin-right: 0;
  padding-left: 0;
  padding-right: 0;
}

.alignwide { max-width: var(--maxw); margin-left: auto; margin-right: auto; }
.aligncenter { margin-left: auto; margin-right: auto; }
.alignleft { float: left; margin: .4em 2em 1.4em 0; }
.alignright { float: right; margin: .4em 0 1.4em 2em; }

@media (max-width: 560px) {
  .alignleft, .alignright { float: none; margin: 1.6em auto; }
  .pronatal-content > *:not(.section):not(.wp-block-group.section):not(.alignfull):not(.endcta):not(.cta) {
    padding-left: 22px;
    padding-right: 22px;
  }
}

/* =========================================================
   Komponente iz uređivača (blokovi umjesto ručnog markupa)
   ========================================================= */
.steps > .step,
.steps > .wp-block-group.step {
  position: relative;
  padding: 0 0 40px 44px;
}

.steps > .step:last-child { padding-bottom: 0; }

.steps > .step::before {
  content: "";
  position: absolute;
  left: -6.5px;
  top: 6px;
  width: 11px;
  height: 11px;
  border-radius: 50%;
  background: var(--teal);
  border: 2.5px solid var(--ivory);
}

.steps > .step h4 {
  font-size: .8rem;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--navy);
  margin-bottom: 9px;
}

.steps > .step p {
  font-size: .95rem;
  line-height: 1.75;
  color: var(--graphite);
  margin: 0;
}

/* FAQ u dva stupca - naslov lijevo prati skrolanje, pitanja desno.
   Bez ovoga accordion je siroko 820px pa desna trecina ostaje prazna. */
@media (min-width: 1025px) {
  .container:has(> .faq) {
    display: grid;
    grid-template-columns: 1fr 1.25fr;
    gap: 80px;
    align-items: start;
  }

  .container:has(> .faq) > .section-head {
    position: sticky;
    top: 120px;
    margin-bottom: 0;
  }

  .container:has(> .faq) > .faq {
    max-width: none;
  }
}

/* Mreze s fiksnim brojem stupaca prate broj zapisa. Predlozak je crtan za
   cetiri usluge - s tri bi zadnji stupac ostao prazan, a to se vidi. */
@media (min-width: 861px) {
  .services-grid:has(> :nth-child(3):last-child) { grid-template-columns: repeat(3, 1fr); }
  .services-grid:has(> :nth-child(2):last-child) { grid-template-columns: repeat(2, 1fr); }
}

@media (min-width: 1025px) {
  .related:has(> :nth-child(2):last-child) { grid-template-columns: repeat(2, 1fr); }
  .related:has(> :only-child) { grid-template-columns: minmax(0, 460px); }
}

.faq details > :not(summary) { padding: 0 60px 28px 0; }
.faq details > :not(summary):last-child { margin-bottom: 0; }
.faq .wp-block-details { border-bottom: 1px solid var(--stone); }
.faq p { font-size: .97rem; line-height: 1.8; color: var(--graphite); margin-bottom: 14px; }

@media (max-width: 560px) {
  .faq details > :not(summary) { padding-right: 0; }
}

.split.wp-block-columns {
  display: grid;
  gap: 80px;
}

.split.wp-block-columns > .wp-block-column { flex-basis: auto !important; }

.cards.wp-block-group > .card { margin: 0; }
.figures.wp-block-group > .figure { margin: 0; }

.figure .fg-num { margin-bottom: 10px; }
.figure .fg-txt { margin: 0; }

.section-head .eyebrow { display: inline-flex; }
.section-head > * + * { margin-top: 14px; }

.values .section-head h2 { color: var(--ivory); }
.values .section-head p { color: rgba(248, 246, 242, .82); }
.values .section-head .eyebrow { color: var(--teal); }
.values .section-head .eyebrow::before { background: var(--teal); }
.values .section-head { max-width: 680px; margin-left: auto; margin-right: auto; }
.values .link-cta { color: var(--teal); }
.values .link-cta::after { background: var(--teal); }

.callout .co-label { display: block; }

/* Varijante koje su u statickom predlosku bile inline stilovi */
.section--beige { background: var(--beige); }
.section--100 { padding-top: 100px; padding-bottom: 100px; }
.section--110 { padding-top: 110px; }
.section--pb110 { padding-bottom: 110px; }
.callout--ivory { background: var(--ivory); }
.callout.is-wide { max-width: none; }
.prose--wide { max-width: 74ch; }
.section-head.is-narrow { max-width: 640px; }
.eyebrow.is-center { justify-content: center; }

/* Razmaci izmedu slozenih komponenti u istoj sekciji */
.cards + .callout,
.cards + .cards,
.callout + .cards,
.prose + .cards,
.faq + .callout,
.steps + .callout { margin-top: 34px; }

.callout + .callout { margin-top: 24px; }

.tst-head .eyebrow { justify-content: center; }

/* Hero naslov: crta vise ne lomi recenicu nego stoji ispod naslova
   i odvaja ga od uvodnog teksta. */
.hero .ed-title .r2 {
  display: block;
  gap: 0;
}

.hero .ed-title { margin-bottom: 34px; }

.hero .ed-rule {
  height: 2px;
  width: 120px;
  background: var(--teal);
  margin-bottom: 44px;
}

@media (max-width: 900px) {
  .hero .ed-title { margin-bottom: 26px; }
  .hero .ed-rule { margin-bottom: 32px; }
}

/* Na bez pozadini bez callout ne bi bio vidljiv - dize se na bijelo */
.section--beige .callout:not(.callout--navy):not(.callout--ivory) {
  background: var(--white);
}

/* Kad predlozak stranice vec ispise sekciju, prva sekcija iz sadrzaja ne
   treba jos 150px odozgo - inace izmedu njih zjapi 300px.
   Vrijedi samo ako ta sekcija nema vidljivu pozadinu: kad je ima, gornji
   razmak je ono sto odvaja sadrzaj od ruba boje i mora ostati. */
section.section + .pronatal-content > .section:first-child:not(.section--beige):not(.values) {
  padding-top: 0;
}

/* CTA traka na dnu: jedan oblik na cijelom sajtu - traka preko cijele sirine,
   u tirkiznoj s naslovnice. Tekst ide na navy jer je tirkiz previse svjetao za
   graphite i za tirkizni nadnaslov. Boje su prepisane iz .cta iz predloska. */
.endcta {
  background: var(--teal);
  color: var(--navy);
  position: relative;
  overflow: hidden;
}

.endcta::before {
  content: "";
  position: absolute;
  right: -120px;
  top: -120px;
  width: 420px;
  height: 420px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(248, 246, 242, .25), transparent 68%);
  pointer-events: none;
}

.endcta .container { position: relative; z-index: 2; }
.endcta .eyebrow { color: var(--navy); }
.endcta .eyebrow::before { background: var(--navy); }
.endcta h2 { color: var(--navy); }
.endcta p { color: rgba(15, 31, 43, .85); }
.endcta .link-cta { color: var(--navy); }
.endcta .link-cta::after { background: var(--navy); }
.endcta .link-cta:hover { color: var(--ivory); }
.endcta .link-cta:hover::after { background: var(--ivory); }

/* Mobilni izbornik: fiksna ploha bez skrolanja gubila je zadnje stavke ispod
   ruba ekrana (Zanimljivosti se nije moglo dohvatiti). Dodano skrolanje
   unutar plohe i prostor za safe area na iPhoneu. */
.mobile-nav {
  overflow-y: auto;
  overscroll-behavior: contain;
  -webkit-overflow-scrolling: touch;
  padding-bottom: calc(32px + env(safe-area-inset-bottom, 0px));
}

.mobile-nav .mn-top {
  flex: 0 0 auto;
  margin-bottom: 34px;
}

.mobile-nav > a,
.mobile-nav .mn-sub { flex: 0 0 auto; }

@media (max-height: 720px) {
  .mobile-nav a { font-size: 1.5rem; padding: 12px 0; }
  .mobile-nav .mn-sub a { font-size: .92rem; padding: 10px 0 10px 20px; }
  .mobile-nav .mn-top { margin-bottom: 22px; }
}

/* Naslov sekcije usluga i poveznica "Sve usluge".
   Desktop: poveznica u ravnini s naslovom, ne pri dnu bloka.
   Mobilno: poveznica je skrivena (ista je odmah ispod, u popisu usluga), a
   razmak do popisa pada da naslov citaju kao naslov tog popisa. */
@media (min-width: 861px) {
  .services-head { align-items: center; }
  .services-head .link-cta { margin-bottom: 0; }
}

@media (max-width: 1024px) {
  .services-head { margin-bottom: 56px; }
}

@media (max-width: 860px) {
  .services-head { margin-bottom: 30px; }
  .services-head > .link-cta { display: none; }
}

/* Nadnaslov pa naslov izvan section-heada - razmaci iz predloska */
:not(.section-head) > .eyebrow + h2 { margin: 14px 0 26px; }

h2.is-small { font-size: 1.7rem; }
h2.is-light, h3.is-light { color: var(--ivory); }

.pronatal-block-empty {
  padding: 22px 24px;
  border: 1px dashed var(--stone);
  border-radius: var(--r);
  color: var(--graphite);
  font-size: .92rem;
}

/* =========================================================
   Blog
   ========================================================= */
.post-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 26px;
}

.post-card {
  background: var(--white);
  border: 1px solid var(--light-grey);
  border-radius: var(--r);
  overflow: hidden;
  transition: transform .3s var(--ease), box-shadow .3s var(--ease);
}

.post-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 26px 50px -34px rgba(15, 31, 43, .5);
}

.post-card .pc-link {
  display: flex;
  flex-direction: column;
  height: 100%;
}

.post-card .pc-photo {
  margin: 0;
  aspect-ratio: 16 / 10;
  overflow: hidden;
  background: linear-gradient(160deg, #E9DFD2, #c9c0b4);
}

.post-card .pc-photo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform .5s var(--ease);
}

.post-card:hover .pc-photo img { transform: scale(1.04); }

.post-card .pc-body {
  padding: 28px 26px 30px;
  display: flex;
  flex-direction: column;
  flex: 1;
  gap: 10px;
}

.post-card .rc-eyebrow {
  font-size: .7rem;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--teal-deep);
  font-weight: 600;
}

.post-card h3 {
  font-family: 'Playfair Display', serif;
  font-size: 1.24rem;
  font-weight: 600;
  line-height: 1.3;
  text-transform: none;
  letter-spacing: 0;
  color: var(--navy);
}

.post-card:hover h3 { color: var(--teal-deep); }

.post-card p {
  font-size: .93rem;
  line-height: 1.72;
  color: var(--graphite);
  margin: 0;
}

.post-card .pc-meta {
  margin-top: auto;
  padding-top: 16px;
  font-size: .78rem;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: var(--teal-deep);
  font-weight: 600;
}

.cat-filter {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 44px;
}

.cat-filter a {
  font-size: .72rem;
  letter-spacing: .1em;
  text-transform: uppercase;
  font-weight: 600;
  color: var(--graphite);
  border: 1px solid var(--stone);
  border-radius: 30px;
  padding: 8px 18px;
  transition: .25s var(--ease);
}

.cat-filter a:hover,
.cat-filter a.is-active {
  color: var(--navy);
  border-color: var(--teal);
  background: var(--beige);
}

.entry-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 12px 28px;
  margin-bottom: 44px;
  padding-bottom: 22px;
  border-bottom: 1px solid var(--stone);
  font-size: .8rem;
  letter-spacing: .08em;
  text-transform: uppercase;
  font-weight: 600;
  color: var(--graphite);
}

.entry-meta span {
  display: inline-flex;
  align-items: center;
  gap: 9px;
}

.entry-meta svg {
  width: 16px;
  height: 16px;
  stroke: var(--teal-deep);
  fill: none;
}

.entry-tags {
  margin-top: 44px;
  padding-top: 26px;
  border-top: 1px solid var(--stone);
}

.entry-tags a span { transition: .25s var(--ease); }
.entry-tags a:hover span { background: var(--beige); border-color: var(--teal); }

.page-links { margin-top: 30px; font-weight: 600; }
.page-links a { color: var(--teal-deep); text-decoration: underline; }

.search-wrap { margin-bottom: 44px; max-width: 560px; }

.search-form {
  display: flex;
  gap: 16px;
  align-items: flex-end;
}

.search-form .field { flex: 1; margin-bottom: 0; }
.search-form button { flex: 0 0 auto; padding-bottom: 15px; }

/* Paginacija */
.navigation.pagination { margin-top: 64px; }

.pagination .nav-links {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
}

.pagination .page-numbers {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 44px;
  height: 44px;
  padding: 0 14px;
  border: 1px solid var(--stone);
  border-radius: 30px;
  font-size: .85rem;
  font-weight: 600;
  color: var(--navy);
  transition: .25s var(--ease);
}

.pagination .page-numbers:hover,
.pagination .page-numbers.current {
  background: var(--teal);
  border-color: var(--teal);
}

.pagination .page-numbers.dots { border: none; }

.comment-navigation .nav-links {
  display: flex;
  justify-content: space-between;
  gap: 20px;
  margin: 26px 0;
  font-size: .85rem;
  font-weight: 600;
}

/* =========================================================
   Komentari
   ========================================================= */
.comments-area { max-width: 820px; }

.comment-list {
  list-style: none;
  margin: 0 0 48px;
  padding: 0;
}

.comment-list ol.children {
  list-style: none;
  margin: 20px 0 0;
  padding-left: clamp(18px, 4vw, 46px);
  border-left: 1px solid var(--stone);
}

.comment-body {
  padding: 24px 0;
  border-bottom: 1px solid var(--stone);
}

.comment-meta {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 14px;
}

.comment-author {
  display: flex;
  align-items: center;
  gap: 12px;
  font-weight: 600;
  color: var(--navy);
}

.comment-author img { border-radius: 50%; }
.comment-author .says { display: none; }

.comment-metadata {
  font-size: .8rem;
  color: var(--graphite);
}

.comment-metadata a { color: var(--graphite); }

.comment-content p { font-size: .97rem; line-height: 1.8; }

.reply {
  margin-top: 12px;
  font-size: .76rem;
  letter-spacing: .12em;
  text-transform: uppercase;
  font-weight: 600;
}

.reply a { color: var(--teal-deep); }

.comment-reply-title { margin-bottom: 8px; }
.comment-form { max-width: 640px; }
.comment-form .field-row { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.comment-notes, .logged-in-as { font-size: .84rem; color: var(--graphite); margin-bottom: 20px; }
.comment-form-cookies-consent { display: flex; gap: 12px; align-items: flex-start; margin: 18px 0; }
.comment-form-cookies-consent input { width: 17px; height: 17px; flex: 0 0 auto; margin-top: 3px; accent-color: var(--teal-deep); }
.comment-form-cookies-consent label { font-size: .82rem; font-weight: 400; letter-spacing: 0; color: var(--graphite); }

@media (max-width: 560px) {
  .comment-form .field-row { grid-template-columns: 1fr; }
}

/* =========================================================
   Contact Form 7 - poravnato s obrascem iz predloška
   ========================================================= */
.wpcf7 .wpcf7-form-control-wrap { display: block; }

.wpcf7 .field input[type="text"],
.wpcf7 .field input[type="email"],
.wpcf7 .field input[type="tel"],
.wpcf7 .field input[type="date"],
.wpcf7 .field select,
.wpcf7 .field textarea {
  width: 100%;
  padding: 13px 16px;
  border: none;
  border-radius: 10px;
  font-family: 'Montserrat', sans-serif;
  font-size: .92rem;
  color: var(--navy);
  background: var(--beige);
}

.wpcf7 .consent { align-items: flex-start; }
.wpcf7 .consent .wpcf7-form-control-wrap { display: inline; }
.wpcf7 .consent .wpcf7-acceptance { display: block; }
.wpcf7 .consent .wpcf7-list-item { margin: 0; }

.wpcf7 .consent label {
  display: flex;
  gap: 12px;
  align-items: flex-start;
  font-size: .82rem;
  font-weight: 400;
  line-height: 1.6;
  letter-spacing: 0;
  color: var(--graphite);
  margin: 0;
}

.wpcf7 .consent input[type="checkbox"] {
  width: 17px;
  height: 17px;
  flex: 0 0 auto;
  margin-top: 2px;
  accent-color: var(--teal-deep);
}

.wpcf7 .consent .wpcf7-list-item-label { display: inline; }
.wpcf7 .consent a { color: var(--teal-deep); text-decoration: underline; }

.wpcf7 input[type="submit"] {
  display: inline-flex;
  align-items: center;
  margin-top: 18px;
  padding: 0 30px 6px 0;
  border: none;
  border-bottom: 1.5px solid var(--teal);
  background-color: transparent;
  background-image: url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%237AAEAE' stroke-width='2' stroke-linecap='round'%3E%3Cpath d='M5 12h14M13 6l6 6-6 6'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right center;
  background-size: 16px 16px;
  font-family: 'Montserrat', sans-serif;
  font-weight: 600;
  font-size: .88rem;
  letter-spacing: .16em;
  text-transform: uppercase;
  color: var(--teal);
  cursor: pointer;
  transition: color .3s var(--ease), border-color .3s var(--ease);
}

.wpcf7 input[type="submit"]:hover {
  color: var(--teal-deep);
  border-color: var(--teal-deep);
}

.wpcf7 .wpcf7-not-valid-tip {
  display: block;
  margin-top: 7px;
  font-size: .78rem;
  font-weight: 600;
  color: #b3261e;
}

.wpcf7 .wpcf7-response-output {
  margin: 22px 0 0;
  padding: 16px 20px;
  border: 1px solid var(--stone);
  border-radius: 10px;
  font-size: .88rem;
  line-height: 1.6;
}

.wpcf7 form.sent .wpcf7-response-output {
  border-color: var(--teal);
  background: rgba(122, 174, 174, .14);
}

.wpcf7 form.invalid .wpcf7-response-output,
.wpcf7 form.failed .wpcf7-response-output {
  border-color: #e0b4ae;
  background: rgba(232, 196, 184, .28);
}

.wpcf7-spinner { margin-left: 12px; }

.wpcf7 .form-note { margin-top: 16px; }

/* =========================================================
   Sitne dopune
   ========================================================= */
.mn-cta { margin-top: 30px; align-self: flex-start; border: none; }

.page-hero .ph-grid > div:first-child:empty { display: none; }

.post-card.sticky { border-color: var(--teal); }

.wp-block-image.sp-photo img { border-radius: var(--r); }

.prose > .wp-block-image { margin: 32px 0; }

.prose figcaption {
  font-size: .84rem;
  color: var(--graphite);
  margin-top: 10px;
}

.prose blockquote {
  margin: 32px 0;
  padding-left: 26px;
  border-left: 2px solid var(--teal);
  font-family: 'Playfair Display', serif;
  font-size: 1.24rem;
  line-height: 1.5;
  color: var(--navy);
}

.prose table { width: 100%; border-collapse: collapse; margin-bottom: 24px; }
.prose th, .prose td { padding: 12px 14px; border-bottom: 1px solid var(--stone); text-align: left; font-size: .94rem; }
.prose th { font-weight: 600; color: var(--navy); }

@media (max-width: 1024px) {
  .post-grid { grid-template-columns: repeat(2, 1fr); }
  .split.wp-block-columns { grid-template-columns: 1fr; gap: 48px; }
}

@media (max-width: 560px) {
  .post-grid { grid-template-columns: 1fr; }
  .search-form { flex-direction: column; align-items: stretch; }
  .search-form button { justify-content: center; }
}
