/*
Theme Name: Primadent
Template: twentytwentyfive
Description: Primadent Hambaravi blokkteema (Twenty Twenty-Five lapsteema). Kujundus ProDenti eeskujul, ilma ThemeRexi/WPBakeryta.
Author: Riin Agency
Author URI: https://riin.eu
Version: 1.1.0
Requires at least: 6.8
Text Domain: primadent
*/

/* Hinnatabelid: hind paremale, triibud */
.wp-block-table.is-style-hinnakiri table { border-collapse: collapse; width: 100%; }
.wp-block-table.is-style-hinnakiri td { border: 0; border-bottom: 1px solid #e3eef0; padding: 0.7rem 0.5rem; vertical-align: top; }
.wp-block-table.is-style-hinnakiri tr:nth-child(odd) td { background: var(--wp--preset--color--base-2); }
.wp-block-table.is-style-hinnakiri td:last-child { text-align: right; white-space: nowrap; font-weight: 600; color: var(--wp--preset--color--dark); }

/* Kaardid (arstid, teenused, arvamused) */
.pd-card { background: #fff; border-radius: 14px; box-shadow: 0 6px 24px rgba(43,52,71,.08); overflow: hidden; height: 100%; }
.pd-card .wp-block-image img { border-radius: 14px 14px 0 0; }

/* Päise ülemine riba */
.pd-topbar a { color: inherit; text-decoration: none; }
.pd-topbar a:hover { text-decoration: underline; }

/* Staging-teade (eemaldada live-is) */
.pd-staging-note { border: 2px dashed var(--wp--preset--color--accent-strong); border-radius: 12px; }

/* ===== Paigutus ===== */
.pd-band { padding: clamp(3rem, 6vw, 5.5rem) 1.25rem; }
.pd-band-light { background: var(--wp--preset--color--base-2); }
.pd-eyebrow { text-transform: uppercase; letter-spacing: .12em; font-size: .8rem !important; font-weight: 600; color: var(--wp--preset--color--primary-dark); margin-bottom: .25rem !important; }
.pd-lead { font-size: 1.125rem; }
.pd-notice { background: #fff3f3; border-left: 4px solid var(--wp--preset--color--accent-strong); padding: .9rem 1.2rem; border-radius: 8px; }

/* Päis */
.pd-topbar { background: var(--wp--preset--color--dark); color: #fff; font-size: .85rem; padding: .45rem 1.25rem; }
.pd-topbar p { margin: 0; }
.pd-header { padding: .9rem 1.25rem; border-bottom: 1px solid #e6eef0; background: #fff; }
.pd-header .wp-block-site-logo img { height: auto; }
.pd-header-cta .wp-block-button__link { padding: .6rem 1.3rem; font-size: .95rem; }

/* Kangelasplokk */
.pd-hero { padding: clamp(2.5rem, 5vw, 4.5rem) 1.25rem; }
.pd-hero-cols { align-items: center !important; gap: clamp(1.5rem, 4vw, 3.5rem) !important; }
.pd-hero h1 { font-weight: 300; max-width: 14ch; margin-top: .3rem; }
.pd-hero .pd-lead { max-width: 46ch; }
.pd-hero-img img { border-radius: 18px; box-shadow: 0 18px 50px rgba(43,52,71,.12); }

/* Kaardid */
.pd-card-body { padding: 1.25rem 1.5rem 1.6rem; }
.pd-card h3 { margin-top: 0; }
.pd-cards > .wp-block-column { display: flex; }
.pd-cards > .wp-block-column > .pd-card { width: 100%; }
.pd-testimonial { background: #fff; border-radius: 14px; padding: 1.5rem 1.6rem; box-shadow: 0 6px 24px rgba(43,52,71,.06); height: 100%; }
.pd-testimonial .wp-block-quote { border: 0; padding: 0; margin: 0; font-style: italic; }
.pd-testimonial cite { display: block; margin-top: .8rem; font-style: normal; font-weight: 600; color: var(--wp--preset--color--dark); }

/* Jalus */
.pd-footer { background: var(--wp--preset--color--dark); color: #dfe5ec; padding: 3.5rem 1.25rem 1.5rem; font-size: .95rem; }
.pd-footer h4 { color: #fff; font-weight: 600; }
.pd-footer a { color: #9fe3eb; }
.pd-footer a:hover { color: #fff; }
.pd-footer-bottom { border-top: 1px solid rgba(255,255,255,.12); padding-top: 1.2rem; margin-top: 2rem; font-size: .85rem; color: #aab4c0; }

@media (max-width: 781px) {
  .pd-topbar { text-align: center; }
  .pd-header-cta { display: none; }
}

/* Parandused 27.09 */
body.page-template-page-no-title .wp-site-blocks > main { margin-block-start: 0; }
.wp-site-blocks > footer { margin-block-start: 0; }
.pd-card > .wp-block-image { margin: 0; }
.pd-card > .wp-block-image img { width: 100%; aspect-ratio: 1 / 1; object-fit: cover; object-position: center 22%; }

@media (max-width: 781px) {
  .wp-block-buttons.pd-header-cta { display: none; }
  .pd-topbar p.has-text-align-right { text-align: center; }
  .pd-topbar { font-size: .78rem; }
  .pd-hero .wp-block-buttons { gap: .75rem; }
}

/* Mobiilimenüü: vasakjoondus, alamlehed taandega */
.wp-block-navigation__responsive-container.is-menu-open .wp-block-navigation__responsive-container-content,
.wp-block-navigation__responsive-container.is-menu-open .wp-block-navigation__container,
.wp-block-navigation__responsive-container.is-menu-open .wp-block-navigation-item,
.wp-block-navigation__responsive-container.is-menu-open .wp-block-navigation__submenu-container { align-items: flex-start !important; text-align: left; }
.wp-block-navigation__responsive-container.is-menu-open .wp-block-navigation__responsive-container-content { padding: 1rem 1.5rem 2rem; }
.wp-block-navigation__responsive-container.is-menu-open .wp-block-navigation__container { gap: .9rem; font-size: 1.15rem; }
.wp-block-navigation__responsive-container.is-menu-open .wp-block-navigation__submenu-container { padding: .4rem 0 0 1rem !important; gap: .6rem; font-size: 1rem; }
.wp-block-navigation__responsive-container.is-menu-open .wp-block-navigation__submenu-container a { color: var(--wp--preset--color--muted); }

/* ===== Live-lehe kujundus (28.09) ===== */
/* Sektsiooni pealkiri keskel + hall alapealkiri */
.pd-sec-head { text-align: center; margin-bottom: 2.5rem !important; }
.pd-sec-head h2 { font-size: clamp(2.2rem, 4vw, 3.4rem); font-weight: 300; margin-bottom: .4rem; color: #404040; }
.pd-subtitle { color: #969fa8; font-size: 1.05rem; margin-top: 0 !important; }

/* Teenusekaardid: korall-ring ikoon */
.pd-service { background: #fff; box-shadow: 0 10px 40px rgba(43,52,71,.07); padding: 2.8rem 1.5rem 2.4rem; text-align: center; height: 100%; transition: transform .2s, box-shadow .2s; }
.pd-service:hover { transform: translateY(-4px); box-shadow: 0 16px 44px rgba(43,52,71,.12); }
.pd-service h3 { font-size: 1.7rem; font-weight: 300; margin: 1.6rem 0 0; }
.pd-service h3 a { color: #404040; text-decoration: none; }
.pd-service h3 a::after { content: ""; position: absolute; inset: 0; }
.pd-service { position: relative; }
.pd-icon-ring img { width: 116px !important; height: 116px; padding: 24px; border: 3px solid var(--wp--preset--color--coral); border-radius: 50%; box-sizing: border-box; }

/* Kontaktirida: lilla täisring */
.pd-contact-row { text-align: center; }
.pd-contact-row p { color: #7d8792; font-size: 1.05rem; }
.pd-icon-fill img { width: 130px !important; height: 130px; padding: 36px; background: var(--wp--preset--color--lavender); border-radius: 50%; box-sizing: border-box; }

/* Sisulehe pealkirjariba */
.pd-pagehead { background: var(--wp--preset--color--ink); padding: clamp(2.5rem, 5vw, 4.2rem) 1.25rem; }
.pd-pagehead h1 { color: #fff; font-size: clamp(2.6rem, 5.5vw, 4.6rem); font-weight: 300; margin: 0 0 .6rem; }
.pd-breadcrumb { gap: .9rem !important; color: #fff; font-size: 1.05rem; }
.pd-breadcrumb p { margin: 0; }
.pd-breadcrumb a { color: #fff; text-decoration: none; }
.pd-breadcrumb a:hover { color: var(--wp--preset--color--coral); }
.pd-breadcrumb .pd-crumb-current { color: var(--wp--preset--color--coral); font-size: inherit; font-weight: 400; margin: 0; }
.pd-page-main > .wp-block-post-content { padding-top: clamp(2.5rem, 5vw, 4rem); padding-bottom: clamp(2.5rem, 5vw, 4rem); }
.pd-page-main > .wp-block-post-content > .pd-band:last-child { margin-bottom: calc(-1 * clamp(2.5rem, 5vw, 4rem)); }

/* Menüü: hall, aktiivne türkiis; rippmenüü türkiis taustaga */
.wp-block-navigation .current-menu-item > a, .wp-block-navigation .current-menu-ancestor > a { color: var(--wp--preset--color--primary-dark) !important; }
@media (min-width: 782px) {
  .wp-block-navigation .wp-block-navigation__submenu-container { background: #6dd5d5 !important; border: 0 !important; padding: 1.1rem 0 !important; min-width: 240px !important; box-shadow: 0 10px 30px rgba(0,0,0,.08); }
  .wp-block-navigation .wp-block-navigation__submenu-container a { color: #fff !important; justify-content: center; text-align: center; padding: .45rem 1.2rem !important; }
  .wp-block-navigation .wp-block-navigation__submenu-container a:hover { background: rgba(255,255,255,.12); }
}

/* Jalus: valge, tume ülemine joon */
.pd-footer { background: #fff; color: #6b7480; border-top: 4px solid var(--wp--preset--color--dark); }
.pd-footer h4 { color: var(--wp--preset--color--dark); }
.pd-footer a { color: var(--wp--preset--color--primary-dark); }
.pd-footer a:hover { color: var(--wp--preset--color--pink); }
.pd-footer-bottom { border-top: 1px solid #e6eaee; color: #969fa8; }
/* Eyebrow live-lehe moodi: hall, tavakiri */
.pd-eyebrow { text-transform: none; letter-spacing: 0; color: #969fa8; font-size: 1.05rem !important; font-weight: 400; }
.pd-band .pd-contact-row { margin-top: 1rem; }
.pd-cards > .wp-block-column > .pd-service { width: 100%; }
.pd-cards { margin-bottom: 2.5rem !important; }
/* Täislaiuses plokk lehe alguses/lõpus kleepub pealkirjariba/jaluse külge */
.pd-page-main > .wp-block-post-content > .alignfull:first-child { margin-top: calc(-1 * clamp(2.5rem, 5vw, 4rem)) !important; }
.pd-page-main > .wp-block-post-content > .alignfull:last-child { margin-bottom: calc(-1 * clamp(2.5rem, 5vw, 4rem)) !important; }
/* Laiemad servad suurel ekraanil (lehe laius 1440px) */
.pd-band, .pd-pagehead, .pd-header, .pd-footer, .pd-topbar, .pd-hero { padding-left: clamp(1.25rem, 4vw, 3.5rem) !important; padding-right: clamp(1.25rem, 4vw, 3.5rem) !important; }
.wp-site-blocks > .pd-pagehead, .wp-site-blocks > main.pd-page-main { margin-block-start: 0 !important; }
@media (max-width: 781px) {
  .wp-block-columns.pd-svc-grid { flex-wrap: wrap !important; gap: 1rem !important; }
  .wp-block-columns.pd-svc-grid > .wp-block-column { flex-basis: calc(50% - .5rem) !important; flex-grow: 0; }
  .pd-svc-grid .pd-service { padding: 1.6rem .8rem 1.4rem; }
  .pd-svc-grid .pd-icon-ring img { width: 78px !important; height: 78px; padding: 16px; border-width: 2px; }
  .pd-svc-grid .pd-service h3 { font-size: 1.15rem; margin-top: 1rem; }
  .pd-icon-fill img { width: 104px !important; height: 104px; padding: 28px; }
}

/* Sisu 1440px konteineris; tekst loetavuse pärast kuni 860px, joondatud vasakule (pealkirjaga samale joonele) */
.pd-page-main > .wp-block-post-content > p,
.pd-page-main > .wp-block-post-content > ul,
.pd-page-main > .wp-block-post-content > ol,
.pd-page-main > .wp-block-post-content > h2,
.pd-page-main > .wp-block-post-content > h3,
.pd-page-main > .wp-block-post-content > .pd-notice,
.pd-page-main > .wp-block-post-content > .wp-block-image.size-medium {
  max-width: 860px !important;
  margin-left: max(0px, calc((100% - 1440px) / 2)) !important;
  margin-right: auto !important;
}

/* ===== Sisulehtede kaardid (28.09) ===== */
.pd-intro { max-width: 760px; margin: 0 auto 2.2rem !important; }
.pd-price { margin-bottom: 1.5rem !important; }
.pd-price h3 { margin-bottom: 1rem; }
.pd-price .wp-block-table { margin: 0; }
.pd-card .wp-block-table.is-style-hinnakiri tr:nth-child(odd) td { background: #f5f7f7; }
.pd-footnote { color: #7d8792; font-size: .95rem; }
.pd-side { position: sticky; top: 1.5rem; }
.pd-side h3 { margin-top: 0; }
.pd-side h3 + * { margin-top: .6rem; }
.pd-side .wp-block-list { padding-left: 1.1rem; }
.pd-article { padding: clamp(1.5rem, 3vw, 2.8rem) clamp(1.25rem, 3vw, 3rem); }
.pd-article > h3 { margin-top: 2rem; }
.pd-doc { margin-bottom: 2rem !important; overflow: hidden; }
.pd-doc > .wp-block-columns { gap: 0 !important; margin: 0; }
.pd-doc .pd-doc-img { margin: 0; height: 100%; }
.pd-doc .pd-doc-img img { width: 100%; height: 100%; min-height: 320px; object-fit: cover; object-position: center 20%; border-radius: 0; }
.pd-doc .pd-card-body { padding: clamp(1.5rem, 3vw, 2.8rem); }
.pd-doc h2 { margin-top: 0; font-size: 2rem; }
.pd-cards .pd-card h3 { margin-top: 0; }
@media (max-width: 781px) {
  .pd-side { position: static; }
  .pd-doc .pd-doc-img img { min-height: 0; aspect-ratio: 1 / 1; }
}
.pd-card.pd-price, .pd-card.pd-side, .pd-card.pd-article, .pd-card.pd-doc { height: auto; }
.pd-article > .wp-block-image img { width: auto !important; max-width: 240px; height: auto; aspect-ratio: auto !important; object-fit: contain; }
.pd-side h3:not(:first-child) { margin-top: 1.6rem !important; }

/* "Tule vastuvõtule" – helesinine nagu rippmenüü, valged ikoonid (28.09) */
.pd-band.pd-contact-band { background: #6dd5d5 !important; }
.pd-contact-band .pd-sec-head h2 { color: #fff; }
.pd-contact-band .pd-subtitle { color: rgba(255,255,255,.92); }
.pd-contact-band .pd-contact-row p { color: var(--wp--preset--color--dark); font-weight: 500; }
.pd-contact-band .pd-contact-row a { color: var(--wp--preset--color--dark); }
.pd-contact-band .pd-contact-row a:hover { color: #fff; }
.pd-contact-band .pd-icon-fill img { background: rgba(255,255,255,.18); border: 2px solid #fff; }
.pd-btn-light .wp-block-button__link { background: #fff !important; color: var(--wp--preset--color--pink) !important; }
.pd-btn-light .wp-block-button__link:hover { background: var(--wp--preset--color--dark) !important; color: #fff !important; }
.pd-footer .wp-block-button__link { color: #fff !important; padding: .65rem 1.4rem; font-size: .95rem; }
.pd-footer .wp-block-button__link:hover { color: #fff !important; }
/* Täislaiuses taustaplokkide vahel ei tohi olla valget riba */
.wp-block-post-content > .pd-band, .wp-block-post-content > .pd-hero { margin-block-start: 0 !important; margin-block-end: 0 !important; }

/* Keelevahetaja ülemises ribas */
.pd-topbar .alignwide { align-items: center; }
.pd-langs { display: flex; gap: .45rem; align-items: center; font-weight: 600; letter-spacing: .04em; }
.pd-langs a { color: rgba(255,255,255,.75); }
.pd-langs a:hover { color: #fff; }
.pd-langs .is-current { color: #6dd5d5; }
.pd-lang-sep { color: rgba(255,255,255,.35); }
@media (max-width: 781px) {
  .pd-topbar .alignwide { justify-content: center !important; gap: .3rem !important; }
}

/* Avalehe päis: naeratuse pilt sulandub taustaga (pildi taust #f4f8fb), suur ja ilma kastita */
.pd-hero.pd-hero-smile { background: #f4f8fb url(assets/img/taust-smile.jpg) no-repeat right bottom / auto 100% !important; }
@media (min-width: 782px) {
  .pd-hero.pd-hero-smile { min-height: 600px; display: flex; flex-direction: column; justify-content: center; }
  .pd-hero-smile .pd-hero-cols > .wp-block-column:last-child { visibility: hidden; }
  .pd-hero-smile .pd-hero-cols > .wp-block-column:first-child { flex-basis: 48% !important; flex-grow: 0; }
}
@media (max-width: 781px) {
  .pd-hero.pd-hero-smile { background-image: none !important; padding-bottom: 0 !important; }
  .pd-hero-smile .pd-hero-img { margin-left: calc(-1 * clamp(1.25rem, 4vw, 3.5rem)); margin-right: calc(-1 * clamp(1.25rem, 4vw, 3.5rem)); margin-bottom: 0; }
  .pd-hero-smile .pd-hero-img img { border-radius: 0; box-shadow: none; }
}

/* Roosa aktsent (Helena 22.09 kujundusidee): ülapealkirjad, aktiivne menüüpunkt, „Miks Primadent?“ plokk */
.pd-eyebrow, .pd-hero .pd-eyebrow { text-transform: uppercase !important; letter-spacing: .14em !important; font-size: .82rem !important; font-weight: 600 !important; color: var(--wp--preset--color--pink) !important; }
.pd-hero-smile .pd-eyebrow { color: var(--wp--preset--color--ink, #14151b) !important; }
.pd-header .wp-block-navigation .current-menu-item > a { color: var(--wp--preset--color--pink) !important; box-shadow: inset 0 -2px 0 var(--wp--preset--color--pink); padding-bottom: .35rem; }
.pd-why { background: #fdf3f7 !important; }
.pd-why h2 { margin-top: .3rem; }
.pd-why-grid { gap: clamp(1.5rem, 3vw, 3rem) !important; margin-top: 2.2rem; }
.pd-why-item { text-align: left; }
.pd-why-item .pd-icon-soft { margin: 0 0 1.1rem !important; text-align: left; }
.pd-icon-soft img { width: 84px !important; height: 84px; padding: 20px; background: #fbe1ec; border-radius: 50%; box-sizing: border-box; }
.pd-why-item h3 { font-size: 1.2rem; margin: 0 0 .5rem; }
.pd-why-item p { color: var(--wp--preset--color--muted, #5b6470); font-size: .98rem; margin: 0; }
@media (max-width: 781px) {
  .wp-block-columns.pd-why-grid { flex-wrap: wrap !important; }
  .wp-block-columns.pd-why-grid > .wp-block-column { flex-basis: calc(50% - .75rem) !important; flex-grow: 0; }
  .pd-icon-soft img { width: 64px !important; height: 64px; padding: 15px; }
}
@media (max-width: 480px) { .wp-block-columns.pd-why-grid > .wp-block-column { flex-basis: 100% !important; } }
@media (min-width: 782px) {
  .pd-hero-smile h1 { font-size: clamp(2.6rem, 4.2vw, 4.3rem) !important; line-height: 1.1; max-width: 13ch; }
  .pd-hero-smile .pd-lead { font-size: 1.3rem !important; max-width: 32ch; }
}

/* Helena 01.10: partnerid, reede paksult, sotsiaalmeedia, muudetav teade */
.pd-partners-band { background: #fff !important; padding-top: clamp(2rem, 4vw, 3rem) !important; padding-bottom: clamp(2rem, 4vw, 3rem) !important; }
.pd-partners { gap: clamp(1.5rem, 4vw, 4rem) !important; }
.pd-partner { display: flex; flex-direction: column; gap: .4rem; }
.pd-partner .wp-block-image { margin: 0 0 .6rem; }
.pd-partner .wp-block-image img { height: 46px; width: auto !important; object-fit: contain; }
.pd-partner h3 { font-size: 1.15rem; margin: 0; }
.pd-partner h3 a { color: inherit; text-decoration: none; }
.pd-partner h3 a:hover { color: var(--wp--preset--color--pink); }
.pd-partner p { margin: 0; color: var(--wp--preset--color--muted); font-size: .98rem; }
.pd-friday strong, .pd-notice strong { font-weight: 700; }
.pd-socials { display: flex; gap: .8rem; margin-top: 1rem !important; }
.pd-social img { width: 24px; height: 24px; display: block; transition: opacity .2s; }
.pd-social:hover img { opacity: .7; }
.pd-footer-logos .wp-block-image { margin: 0 0 1.2rem; }
.pd-footer-logos .wp-block-image img { max-width: 140px; height: auto; }
.pd-teade { background: var(--wp--preset--color--pink); color: #fff; text-align: center; font-weight: 600; padding: .6rem 1.25rem; margin: 0 !important; }
.pd-teade p { margin: 0 auto !important; }
.pd-teade a { color: #fff; }
.pd-teade:not(:has(p:not(:empty))) { display: none; }
