/*
Theme Name: Devy Clinic
Theme URI: https://devyclinic.com
Description: Child theme of Twenty Twenty-Five with the Devy Beauty Clinic brand identity (colors, GE SS Three / Runalto fonts, logo, pattern).
Author: Devy Beauty Clinic
Template: twentytwentyfive
Version: 1.2.3
Requires at least: 6.7
Text Domain: devyclinic
*/

/* ---------- Base ---------- */
body { overflow-x: hidden; }
/* Full-bleed sections: no theme gaps between them */
.dv-main, .dv-main .wp-block-post-content { margin-top: 0 !important; padding-top: 0 !important; }
.dv-main .wp-block-post-content > * { margin-block-start: 0 !important; margin-block-end: 0 !important; }
body > .wp-site-blocks > * + * { margin-block-start: 0 !important; }
/* Grids: children must not inherit flow block-gap margins */
.dv-cards > *, .dv-features > *, .dv-letters > * { margin: 0 !important; }
/* GE SS Three maps digits to Arabic-Indic glyphs; keep phone numbers in Latin digits */
.ltr, a[href^="tel:"], a[href*="wa.me"].ltr { font-family: "Segoe UI", Tahoma, Arial, sans-serif; direction: ltr; unicode-bidi: embed; }
.dv-latin { font-family: var(--wp--preset--font-family--runalto); letter-spacing: .5px; }
.dv-eyebrow {
  color: var(--wp--preset--color--mauve);
  font-size: 15px;
  letter-spacing: 1px;
  margin-bottom: 6px !important;
}
.dv-section { padding: clamp(56px, 8vw, 110px) 20px; }
.dv-section > * { max-width: 1140px; margin-left: auto !important; margin-right: auto !important; }
.dv-title { font-size: clamp(28px, 4vw, 42px); color: var(--wp--preset--color--plum); margin-top: 0; }
.dv-lead { font-size: clamp(17px, 1.6vw, 19px); line-height: 1.9; }
.dv-center { text-align: center; }
.dv-center .wp-block-buttons { justify-content: center; }

/* Sparkle divider (brand star) */
.dv-sparkle { display: block; margin: 0 auto 10px; width: 26px; height: 26px; }

/* ---------- Header ---------- */
.dv-header {
  position: sticky; top: 0; z-index: 50;
  background: rgba(252, 244, 255, .92);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid rgba(126, 104, 140, .18);
  padding: 10px 20px;
}
.dv-header-inner { max-width: 1180px; margin: 0 auto; display: flex; align-items: center; justify-content: space-between; gap: 18px; }
/* Neutralise WordPress layout margins (auto-centering / block gap) inside the header row */
.dv-header-inner > * { margin: 0 !important; max-width: none !important; }
.dv-header .dv-logo img { height: 56px; width: auto; display: block; }
.dv-header .wp-block-navigation { font-size: 16px; gap: 26px; }
.dv-header .wp-block-navigation a { color: var(--wp--preset--color--plum); }
.dv-header .wp-block-navigation a:hover { color: var(--wp--preset--color--mauve); }
.dv-header .wp-block-buttons { margin: 0; }
.dv-header .wp-block-button__link { padding: 10px 22px; font-size: 15px; }
@media (max-width: 781px) {
  .dv-header .dv-logo img { height: 46px; }
  .dv-header .dv-head-cta { display: none; }
}

/* ---------- Buttons ---------- */
.wp-block-button__link { border-radius: 999px; padding: 14px 34px; transition: transform .15s ease, background .15s ease; }
.wp-block-button__link:hover { transform: translateY(-2px); }
.dv-btn-light .wp-block-button__link { background: #fff; color: var(--wp--preset--color--plum); }
.dv-btn-outline .wp-block-button__link { background: transparent; color: #fff; border: 1px solid rgba(255,255,255,.7); }
.dv-btn-outline .wp-block-button__link:hover { background: rgba(255,255,255,.12); }

/* ---------- Hero ---------- */
.dv-hero { min-height: min(92vh, 820px); padding: 120px 20px 90px !important; }
.dv-hero .wp-block-cover__inner-container { max-width: 760px; text-align: center; color: #fff; }
.dv-hero .dv-hero-logo img { width: clamp(150px, 22vw, 220px); height: auto; margin: 0 auto; }
.dv-hero h1 { color: #fff; font-size: clamp(34px, 5.5vw, 60px); margin: 22px 0 14px; }
.dv-hero p { color: #f0ebf2; font-size: clamp(17px, 1.8vw, 20px); line-height: 1.9; }
.dv-hero .wp-block-buttons { justify-content: center; margin-top: 30px; gap: 14px; }

/* ---------- About ---------- */
.dv-about { background: var(--wp--preset--color--base); text-align: center; }
.dv-about > .dv-lead { max-width: 820px; }
.dv-about-sparkle { text-align: center; margin-bottom: 4px !important; }
.dv-about-sparkle img { width: 64px; height: 64px; display: block; margin: 0 auto; }
.dv-about .wp-block-buttons { justify-content: center; margin-top: 26px; }
.dv-about .wp-block-columns { align-items: center; gap: clamp(30px, 5vw, 70px); }
.dv-arch img {
  border-radius: 999px 999px 18px 18px;
  aspect-ratio: 4 / 5; object-fit: cover; width: 100%;
  box-shadow: 0 25px 60px rgba(49, 26, 64, .18);
}
.dv-arch { position: relative; }
.dv-arch::after {
  content: ""; position: absolute; inset: -14px -14px auto auto; width: 100%; height: 100%;
  border: 1.5px solid var(--wp--preset--color--mauve); border-radius: 999px 999px 18px 18px;
  z-index: -1; pointer-events: none;
}

/* ---------- Services (dark) ---------- */
.dv-services { background: var(--wp--preset--color--night); color: #e9e2ee; position: relative; overflow: hidden; }
.dv-services .dv-title { color: #fff; }
.dv-services .dv-eyebrow { color: #b9a5c6; }
.dv-cards { display: flex !important; flex-wrap: wrap; justify-content: center; gap: 24px; margin-top: 40px !important; margin-bottom: 40px !important; }
.dv-card {
  flex: 1 1 300px; max-width: 360px;
  background: #2a1b37; border-radius: 22px; overflow: hidden;
  border: 1px solid rgba(255,255,255,.07);
  transition: transform .2s ease, box-shadow .2s ease;
}
.dv-card:hover { transform: translateY(-6px); box-shadow: 0 20px 40px rgba(0,0,0,.35); }
.dv-card .wp-block-image { margin: 0; }
.dv-card .wp-block-image img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; display: block; }
.dv-card h3 { color: #fff; font-size: 21px; margin: 20px 22px 8px; }
.dv-card p { margin: 0 22px 24px; color: #cfc4d8; line-height: 1.85; font-size: 16px; }

/* ---------- Why Devy ---------- */
.dv-why { background: var(--wp--preset--color--mist); }
.dv-features { display: grid !important; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 22px; margin-top: 36px !important; }
.dv-feature {
  background: #fff; border-radius: 20px; padding: 30px 24px !important; text-align: center;
  border: 1px solid rgba(126,104,140,.18);
}
.dv-feature .dv-icon { font-size: 30px; margin: 0 0 8px; }
.dv-feature h3 { font-size: 19px; margin: 6px 0; color: var(--wp--preset--color--plum); }
.dv-feature p { margin: 0; color: #5d4d68; font-size: 15px; line-height: 1.8; }

/* ---------- Brand story ---------- */
.dv-story { background: var(--wp--preset--color--mauve); color: #fff; position: relative; overflow: hidden; }
.dv-story .dv-title, .dv-story h3 { color: #fff; }
.dv-story .dv-story-logo { text-align: center; }
.dv-story .dv-story-logo img { width: 150px; height: auto; margin: 0 auto 10px; display: block; }
.dv-letters { display: grid !important; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 16px; margin-top: 34px !important; }
.dv-letter { background: rgba(255,255,255,.1); border: 1px solid rgba(255,255,255,.22); border-radius: 18px; padding: 22px 12px !important; text-align: center; }
.dv-letter .dv-big { font-family: var(--wp--preset--font-family--runalto); font-size: 46px; line-height: 1; margin: 0; color: #fff; }
.dv-letter p { margin: 6px 0 0; color: #f3edf6; }
.dv-pattern-band {
  height: 80px; margin: 0 !important; max-width: none !important;
  background: var(--wp--preset--color--plum) url("assets/images/pattern-white.png") repeat-x center / auto 64px;
  opacity: 1;
}

/* ---------- Contact ---------- */
.dv-contact .wp-block-columns { gap: 36px; align-items: stretch; }
.dv-contact-card { background: #fff; border-radius: 22px; padding: 34px 30px !important; border: 1px solid rgba(126,104,140,.18); }
.dv-contact-card p { font-size: 17px; line-height: 2; margin: 0 0 6px; }
.dv-contact-card a:not(.wp-block-button__link) { color: var(--wp--preset--color--plum); text-decoration: none; }
.dv-contact-card .wp-block-buttons { margin-top: 18px; }
.dv-map { height: 100%; min-height: 360px; border-radius: 22px; overflow: hidden; background: var(--wp--preset--color--mist); border: 1px solid rgba(126,104,140,.18); }
.dv-map iframe { width: 100%; height: 100%; min-height: 360px; border: 0; display: block; }

/* ---------- CTA band ---------- */
.dv-cta { background: linear-gradient(135deg, var(--wp--preset--color--plum), var(--wp--preset--color--mauve)); color: #fff; text-align: center; }
.dv-cta .dv-title { color: #fff; }
.dv-cta .wp-block-buttons { justify-content: center; gap: 14px; }

/* ---------- Footer ---------- */
.dv-footer { background: var(--wp--preset--color--night); color: #cfc4d8; padding: 56px 20px 26px; }
.dv-footer-inner { max-width: 1140px; margin: 0 auto; }
.dv-footer .dv-logo img { height: 92px; width: auto; }
.dv-footer a { color: #fff; text-decoration: none; }
.dv-footer .wp-block-columns { gap: 36px; }
.dv-footer h4 { color: #fff; font-size: 18px; margin: 0 0 12px; }
.dv-footer p { margin: 0 0 8px; line-height: 1.9; }
.dv-footer .dv-copy { border-top: 1px solid rgba(255,255,255,.1); margin-top: 36px; padding-top: 18px; font-size: 14px; text-align: center; }

/* ---------- Header language toggle (always visible, incl. mobile) ---------- */
.dv-lang-switch {
  display: inline-flex; margin: 0 !important; padding: 3px; gap: 2px;
  border: 1px solid rgba(126,104,140,.4); border-radius: 999px; background: #fff;
  direction: ltr; flex-shrink: 0;
}
.dv-lang-switch a {
  display: block; padding: 5px 13px; border-radius: 999px; text-decoration: none;
  font-size: 14px; line-height: 1.3; color: var(--wp--preset--color--plum);
  font-family: "Segoe UI", Tahoma, Arial, sans-serif; font-weight: 600;
}
.dv-lang-switch a:lang(ar), .dv-lang-switch a[hreflang="ar"] { font-family: var(--wp--preset--font-family--ge-ss-three); font-weight: 400; }
.dv-lang-switch a.is-active { background: var(--wp--preset--color--plum); color: #fff; pointer-events: none; }
.dv-lang-switch a:not(.is-active):hover { background: var(--wp--preset--color--mist); }
@media (max-width: 781px) {
  .dv-lang-switch a { padding: 4px 11px; font-size: 13px; }
  /* The toggle itself is direction:ltr, so use physical margins per page direction */
  html[dir="rtl"] .dv-header-inner > .dv-lang-switch { margin-right: auto !important; }
  html:not([dir="rtl"]) .dv-header-inner > .dv-lang-switch { margin-left: auto !important; }
  /* Phone: row 1 = logo + language toggle, row 2 = section links (always visible, swipeable) */
  .dv-header { padding: 8px 12px 0; }
  .dv-header-inner { flex-wrap: wrap; gap: 6px 10px; }
  .dv-header .dv-nav {
    order: 3; width: 100%; flex-basis: 100%;
    border-top: 1px solid rgba(126,104,140,.15);
    overflow-x: auto; -webkit-overflow-scrolling: touch; scrollbar-width: none;
  }
  .dv-header .dv-nav::-webkit-scrollbar { display: none; }
  .dv-header .dv-nav .wp-block-navigation__container {
    flex-wrap: nowrap !important; justify-content: center; gap: 4px !important;
    min-width: max-content; margin: 0 auto; padding: 6px 4px;
  }
  .dv-header .dv-nav .wp-block-navigation-item__content {
    white-space: nowrap; font-size: 14px; padding: 6px 10px; border-radius: 999px;
  }
  .dv-header .dv-nav .wp-block-navigation-item__content:active { background: var(--wp--preset--color--mist); }
}

/* ---------- Map ---------- */
.dv-map-links { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 12px !important; }
.dv-map-links a {
  display: inline-block; padding: 8px 16px; border-radius: 999px; font-size: 14px; text-decoration: none;
  border: 1px solid rgba(126,104,140,.35); color: var(--wp--preset--color--plum); background: #fff;
}
.dv-map-links a:hover { background: var(--wp--preset--color--mist); }

/* ---------- Language switch + English (LTR) version ---------- */
.dv-nav .dv-lang a {
  border: 1px solid rgba(126,104,140,.45); border-radius: 999px; padding: 4px 14px !important;
  font-family: "Segoe UI", Tahoma, Arial, sans-serif; font-size: 14px;
}
.dv-nav .dv-lang a:lang(en), html[lang|="en"] .dv-nav .dv-lang a { font-family: var(--wp--preset--font-family--ge-ss-three); }
/* GE SS Three has (almost) no Latin glyphs: English pages use a clean sans for text, Runalto for headings */
html[lang|="en"] body,
html[lang|="en"] .wp-block-button__link,
html[lang|="en"] .wp-block-navigation { font-family: "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif; }
html[lang|="en"] h1, html[lang|="en"] h2, html[lang|="en"] .dv-title { font-family: var(--wp--preset--font-family--runalto); letter-spacing: .3px; }
html[lang|="en"] h3, html[lang|="en"] h4 { font-family: "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif; font-weight: 600; }
html[lang|="en"] .dv-eyebrow { text-transform: uppercase; letter-spacing: 2px; font-size: 13px; }
html[lang|="en"] .dv-lead { line-height: 1.75; }
html[lang|="en"] .dv-wa { left: auto; right: 22px; }

/* ---------- Floating WhatsApp ---------- */
.dv-wa {
  position: fixed; bottom: 22px; left: 22px; z-index: 99;
  width: 58px; height: 58px; border-radius: 50%;
  background: #25d366; color: #fff; display: flex; align-items: center; justify-content: center;
  box-shadow: 0 10px 25px rgba(0,0,0,.25); transition: transform .15s ease;
}
.dv-wa:hover { transform: scale(1.07); }
.dv-wa svg { width: 30px; height: 30px; fill: #fff; }
