/* ==========================================================================
   Premium Hero — scoped under .ph-root, no external dependencies.
   Per-line color/size/font (headline, subtext, feature text, stat text,
   trust text) is applied via inline style="" in templates/hero.php, which
   naturally overrides the class rules below — no per-line CSS needed here.
   ========================================================================== */

.ph-root {
  --ph-border:rgba(28,24,48,.1);
  --ph-cream:#FBF3EC;
  --ph-header-h:92px;
  position:relative;
  font-family:-apple-system,BlinkMacSystemFont,"Segoe UI",Roboto,Helvetica,Arial,sans-serif;
  color:var(--ph-navy);
  line-height:1.4;
  isolation:isolate;
}
.ph-root *, .ph-root *::before, .ph-root *::after { box-sizing:border-box; }
.ph-root, .ph-header, .ph-hero, .ph-hero-inner, .ph-header-inner { border:0 !important; outline:0 !important; }
.ph-root img { max-width:100%; display:block; }
.ph-root a { text-decoration:none; color:inherit; }
.ph-root ul { list-style:none; margin:0; padding:0; }
.ph-root button { font-family:inherit; }
.ph-root svg { display:block; }

/* ---------------- Header ---------------- */
.ph-header { position:absolute; top:0; left:0; right:0; z-index:30; background:transparent; }
.ph-header-inner { max-width:1320px; margin:0 auto; padding:22px 32px; display:flex; align-items:center; justify-content:space-between; gap:24px; }

.ph-logo { display:flex; align-items:center; gap:10px; flex-shrink:1; min-width:0; }
.ph-logo-img { max-height:44px; width:auto; }
.ph-logo-mark { color:var(--ph-primary); flex-shrink:0; }
.ph-logo-text { display:flex; flex-direction:column; line-height:1.25; min-width:0; }
.ph-logo-text strong { font-size:15px; font-weight:800; letter-spacing:.04em; text-transform:uppercase; color:var(--ph-navy); white-space:nowrap; overflow:hidden; text-overflow:ellipsis; }
.ph-logo-text small { font-size:10px; font-weight:700; letter-spacing:.14em; text-transform:uppercase; color:var(--ph-primary); white-space:nowrap; overflow:hidden; text-overflow:ellipsis; }

.ph-nav { flex:1; display:flex; justify-content:center; background:var(--ph-nav-bg, transparent); border-radius:10px; padding:6px 10px; }
.ph-menu { display:flex; align-items:center; gap:32px; font-family:var(--ph-font-nav, inherit); }
.ph-menu > li { position:relative; }
.ph-menu > li > a { font-size:var(--ph-nav-font-size, 15px); font-weight:var(--ph-nav-font-weight, 600); color:var(--ph-nav-color); border-radius:6px; padding:8px 10px; display:inline-flex; align-items:center; gap:5px; transition:color .2s; }
.ph-menu > li > a:hover { color:var(--ph-nav-hover-color, var(--ph-primary)); }
.ph-menu > li.menu-item-has-children > a::after {
  content:""; width:7px; height:7px; border-right:1.6px solid currentColor; border-bottom:1.6px solid currentColor;
  transform:rotate(45deg); margin-left:2px; margin-top:-3px; opacity:.7;
}
.ph-menu > li.current-menu-item > a, .ph-menu > li.current-menu-ancestor > a { color:var(--ph-nav-hover-color, var(--ph-primary)); }
.ph-menu > li.current-menu-item > a { box-shadow:0 2px 0 var(--ph-nav-hover-color, var(--ph-primary)); }

/* Dropdowns ("menu subsections") */
.ph-menu .sub-menu {
  position:absolute; top:100%; left:0; margin-top:14px; min-width:200px;
  background:var(--ph-nav-submenu-bg, #fff); border-radius:14px; padding:10px; box-shadow:0 18px 40px -14px rgba(28,24,48,.28), 0 2px 8px rgba(28,24,48,.06);
  opacity:0; visibility:hidden; transform:translateY(6px); transition:opacity .18s ease, transform .18s ease, visibility .18s;
  z-index:40;
}
.ph-menu li.menu-item-has-children:hover > .sub-menu,
.ph-menu li.menu-item-has-children:focus-within > .sub-menu,
.ph-menu li.menu-item-has-children.ph-open > .sub-menu {
  opacity:1; visibility:visible; transform:translateY(0);
}
.ph-menu .sub-menu li a {
  display:flex; align-items:center; gap:10px; padding:10px 12px; border-radius:8px;
  font-size:14px; font-weight:600; color:var(--ph-nav-submenu-color, var(--ph-nav-color)); white-space:nowrap;
}
.ph-menu .sub-menu li a:hover { background:rgba(var(--ph-primary-rgb,109,40,217),.08); color:var(--ph-nav-submenu-hover-color, var(--ph-primary)); }
.ph-menu .sub-menu li a::before {
  content:""; width:16px; height:16px; flex-shrink:0; border-radius:4px;
  background:rgba(var(--ph-primary-rgb,109,40,217),.12);
}

.ph-header-actions { display:flex; align-items:center; gap:10px; flex-shrink:0; }
.ph-icon-btn {
  display:flex; align-items:center; justify-content:center; width:40px; height:40px; border-radius:50%;
  border:1.5px solid var(--ph-phone-color); color:var(--ph-phone-color); background:var(--ph-phone-bg);
  flex-shrink:0; transition:background .2s, color .2s;
}
.ph-icon-btn:hover { background:var(--ph-phone-color); color:#fff; }
.ph-icon-wa { border-color:var(--ph-whatsapp-color); color:var(--ph-whatsapp-color); background:var(--ph-whatsapp-bg); }
.ph-icon-wa:hover { background:var(--ph-whatsapp-color); border-color:var(--ph-whatsapp-color); color:#fff; }
.ph-cta {
  display:inline-flex; align-items:center; gap:8px; background:var(--ph-cta-bg); color:var(--ph-cta-text);
  font-size:14px; font-weight:700; padding:12px 20px; border-radius:999px; white-space:nowrap; transition:opacity .2s;
}
.ph-cta:hover { opacity:.88; }

.ph-burger { display:none; flex-direction:column; justify-content:center; gap:5px; width:38px; height:38px; border:0; background:transparent; cursor:pointer; padding:0; }
.ph-burger span { display:block; height:2px; background:var(--ph-navy); border-radius:2px; transition:transform .25s, opacity .25s; }
.ph-burger[aria-expanded="true"] span:nth-child(1) { transform:translateY(7px) rotate(45deg); }
.ph-burger[aria-expanded="true"] span:nth-child(2) { opacity:0; }
.ph-burger[aria-expanded="true"] span:nth-child(3) { transform:translateY(-7px) rotate(-45deg); }

/* ---------------- Hero ---------------- */
.ph-hero {
  position:relative; overflow:hidden; padding-top:var(--ph-header-h); min-height:var(--ph-hero-height, 30vh);
  display:flex; align-items:center;
  background:var(--ph-hero-bg, transparent);
}
.ph-hero.ph-hero-boxed { max-width:var(--ph-hero-maxwidth, none); margin:0 auto; }
.ph-hero.ph-hero-fit-image { aspect-ratio:var(--ph-hero-aspect, auto); min-height:0; height:auto; }
.ph-hero-bg { position:absolute; inset:0; z-index:0; }
.ph-hero-bg img { width:100%; height:100%; object-fit:cover; }
.ph-hero-bg-mobile { display:none; position:absolute; inset:0; z-index:0; }
.ph-hero-bg-mobile img { width:100%; height:100%; object-fit:cover; }
.ph-hero-overlay { position:absolute; inset:0; z-index:1; background:var(--ph-hero-overlay, transparent); pointer-events:none; }
.ph-hero-inner { position:relative; z-index:2; max-width:1320px; margin:0 auto; padding:32px 32px 32px; width:100%; display:flex; flex-direction:column; }

.ph-eyebrow { display:flex; align-items:center; gap:14px; color:var(--ph-eyebrow-color, var(--ph-primary)); margin-bottom:14px; }
.ph-eyebrow-line { width:46px; height:1px; background:var(--ph-eyebrow-color, var(--ph-border)); opacity:.35; }

.ph-headline {
  margin:0 0 0 -2px; font-weight:700; letter-spacing:.01em;
  text-transform:uppercase; line-height:1.06;
  max-width:18ch;
}
.ph-underline { width:64px; height:3px; background:var(--ph-underline-color, var(--ph-gold)); margin:16px 0 14px; border-radius:2px; }
.ph-subtext { max-width:440px; margin:0 0 26px; line-height:1.55; }

.ph-features { display:flex; flex-wrap:nowrap; gap:34px; margin-bottom:26px; max-width:none; }
.ph-feature { display:flex; align-items:center; gap:14px; min-width:0; }
.ph-feature-icon {
  width:52px; height:52px; border-radius:50%;
  border:1.6px solid var(--ph-feat-icon-border, var(--ph-primary));
  color:var(--ph-feat-icon-color, var(--ph-primary));
  background:var(--ph-feat-icon-bg, transparent);
  display:flex; align-items:center; justify-content:center; flex-shrink:0; overflow:hidden;
}
.ph-feature-icon svg { max-width:24px; max-height:24px; }
.ph-feature-text { display:flex; flex-direction:column; gap:2px; min-width:0; }
.ph-feature-text strong { font-weight:800; letter-spacing:.06em; text-transform:uppercase; display:block; }
.ph-feature-text span { display:block; max-width:20ch; line-height:1.35; }

.ph-stats-card {
  display:grid; grid-template-columns:repeat(4, 1fr); gap:0;
  background:var(--ph-stats-bg, rgba(255,255,255,.92));
  backdrop-filter:blur(var(--ph-stats-blur, 8px)); -webkit-backdrop-filter:blur(var(--ph-stats-blur, 8px));
  border-radius:calc(18px * var(--ph-stats-scale, 1)); box-shadow:0 22px 48px -20px rgba(28,24,48,.28);
  border:var(--ph-stats-border-width, 0) solid var(--ph-stats-border-color, transparent);
  max-width:calc(620px * var(--ph-stats-scale, 1)); margin-bottom:26px; overflow:hidden;
}
.ph-stats-card.ph-stats-count-1 { grid-template-columns:repeat(1, 1fr); max-width:calc(200px * var(--ph-stats-scale, 1)); }
.ph-stats-card.ph-stats-count-2 { grid-template-columns:repeat(2, 1fr); max-width:calc(340px * var(--ph-stats-scale, 1)); }
.ph-stats-card.ph-stats-count-3 { grid-template-columns:repeat(3, 1fr); max-width:calc(480px * var(--ph-stats-scale, 1)); }
.ph-stat {
  padding:calc(20px * var(--ph-stats-scale, 1)) calc(18px * var(--ph-stats-scale, 1));
  display:flex; flex-direction:column; align-items:flex-start; gap:calc(6px * var(--ph-stats-scale, 1));
  border-right:1px solid var(--ph-border);
}
.ph-stat:last-child { border-right:0; }
.ph-stat-icon { color:var(--ph-stat-icon-color, var(--ph-primary)); }
.ph-stat-icon svg { max-width:calc(20px * var(--ph-stats-scale, 1)); max-height:calc(20px * var(--ph-stats-scale, 1)); }
.ph-stat-num { font-weight:700; display:block; }
.ph-stat-label { font-weight:700; letter-spacing:.08em; text-transform:uppercase; display:block; }

.ph-trust { display:flex; align-items:center; gap:14px; }
.ph-trust-badge {
  width:44px; height:44px; border-radius:50%;
  background:var(--ph-trust-badge-bg, var(--ph-navy));
  color:var(--ph-trust-badge-color, #fff);
  display:flex; align-items:center; justify-content:center; flex-shrink:0; overflow:hidden;
}
.ph-trust-badge svg { max-width:18px; max-height:18px; }
.ph-trust-text { display:flex; flex-direction:column; }
.ph-trust-text strong { font-weight:800; letter-spacing:.05em; text-transform:uppercase; display:block; }
.ph-trust-text span { display:block; }

/* ---------------- Alignment ("change alignment of text and card and all things") ----------------
   One switch controls the headline, subtext, feature row, stats card, and trust badge, and
   applies identically on desktop, tablet, and mobile — nothing is breakpoint-specific here. */
.ph-align-left .ph-hero-inner { align-items:flex-start; text-align:left; }
.ph-align-left .ph-headline { margin-left:-2px; }
.ph-align-left .ph-eyebrow, .ph-align-left .ph-underline, .ph-align-left .ph-subtext { margin-left:0; margin-right:auto; }
.ph-align-left .ph-features { justify-content:flex-start; }
.ph-align-left .ph-feature-text { align-items:flex-start; text-align:left; }
.ph-align-left .ph-stats-card { margin-left:0; margin-right:auto; }
.ph-align-left .ph-stat { align-items:flex-start; text-align:left; }
.ph-align-left .ph-trust { justify-content:flex-start; }

.ph-align-center .ph-hero-inner { align-items:center; text-align:center; }
.ph-align-center .ph-headline { margin-left:0; }
.ph-align-center .ph-eyebrow, .ph-align-center .ph-underline, .ph-align-center .ph-subtext { margin-left:auto; margin-right:auto; }
.ph-align-center .ph-features { justify-content:center; }
.ph-align-center .ph-feature-text { align-items:center; text-align:center; }
.ph-align-center .ph-stats-card { margin-left:auto; margin-right:auto; }
.ph-align-center .ph-stat { align-items:center; text-align:center; }
.ph-align-center .ph-trust { justify-content:center; }

.ph-align-right .ph-hero-inner { align-items:flex-end; text-align:right; }
.ph-align-right .ph-headline { margin-left:0; }
.ph-align-right .ph-eyebrow, .ph-align-right .ph-underline, .ph-align-right .ph-subtext { margin-left:auto; margin-right:0; }
.ph-align-right .ph-features { justify-content:flex-end; }
.ph-align-right .ph-feature-text { align-items:flex-end; text-align:right; }
.ph-align-right .ph-stats-card { margin-left:auto; margin-right:0; }
.ph-align-right .ph-stat { align-items:flex-end; text-align:right; }
.ph-align-right .ph-trust { justify-content:flex-end; }

/* ---------------- Hero spacing presets ---------------- */
.ph-style-minimal .ph-eyebrow { display:none; }
.ph-style-minimal .ph-hero-inner { padding-top:64px; padding-bottom:64px; }
.ph-style-minimal .ph-underline { margin-top:20px; }
.ph-style-minimal .ph-subtext { max-width:520px; }

/* ---------------- Responsive ---------------- */
@media (max-width:1180px) {
  .ph-menu { gap:22px; }
  .ph-stats-card:not(.ph-stats-count-1):not(.ph-stats-count-2):not(.ph-stats-count-3) { grid-template-columns:repeat(2, 1fr); }
  .ph-stats-card:not(.ph-stats-count-1):not(.ph-stats-count-2):not(.ph-stats-count-3) .ph-stat:nth-child(2) { border-right:0; }
  .ph-stats-card:not(.ph-stats-count-1):not(.ph-stats-count-2):not(.ph-stats-count-3) .ph-stat:nth-child(1),
  .ph-stats-card:not(.ph-stats-count-1):not(.ph-stats-count-2):not(.ph-stats-count-3) .ph-stat:nth-child(2) { border-bottom:1px solid var(--ph-border); }
}

@media (max-width:900px) {
  .ph-root { --ph-header-h:76px; }
  .ph-header-inner { padding:16px 20px; }
  .ph-nav {
    position:fixed; inset:76px 0 0 0; background:var(--ph-nav-mobile-bg, #fff); z-index:29; padding:24px 24px 32px;
    display:flex; justify-content:flex-start; align-items:flex-start;
    transform:translateY(-12px); opacity:0; visibility:hidden; pointer-events:none;
    transition:opacity .22s ease, transform .22s ease, visibility .22s; overflow-y:auto;
  }
  .ph-nav.ph-nav-open { opacity:1; visibility:visible; transform:translateY(0); pointer-events:auto; }
  .ph-menu { flex-direction:column; align-items:flex-start; gap:2px; width:100%; }
  .ph-menu > li { width:100%; }
  .ph-menu > li > a {
    width:100%; padding:14px 4px; border-bottom:1px solid var(--ph-border); justify-content:space-between;
    font-size:var(--ph-nav-font-size-mobile, 15px); font-weight:var(--ph-nav-font-weight-mobile, 600);
  }
  .ph-menu .sub-menu {
    position:static; opacity:1; visibility:visible; transform:none; box-shadow:none; margin:0 0 6px;
    display:none; padding:4px 0 4px 14px; background:var(--ph-nav-submenu-mobile-bg, transparent);
  }
  .ph-menu li.ph-open > .sub-menu { display:block; }
  .ph-menu .sub-menu li a::before { display:none; }
  .ph-burger { display:flex; }
  .ph-header-actions { gap:8px; }
  .ph-icon-btn { width:36px; height:36px; }
  .ph-cta { padding:10px 16px; font-size:13px; }

  /* Hero size & background on mobile & tablet. min-height falls back to 0
     (auto height, fits content) unless a mobile height % was explicitly set. */
  .ph-hero { min-height:var(--ph-hero-height-mobile, 0); padding-bottom:48px; }
  .ph-mobile-bg-image .ph-hero-bg,
  .ph-mobile-bg-color .ph-hero-bg { display:none; }
  .ph-mobile-bg-image .ph-hero-bg-mobile { display:block; }
  .ph-mobile-bg-color { background:var(--ph-hero-bg-mobile, transparent); }

  .ph-hero-inner { padding:44px 20px 0; }
  .ph-headline { max-width:none; }

  /* Feature row: stays one row (icon + title + description for all three
     items, side by side) all the way down to the smallest phone widths —
     sizes shrink instead of wrapping to separate lines. */
  .ph-features { gap:14px; }
  .ph-feature { gap:8px; flex:1 1 0; }
  .ph-feature-icon { width:42px; height:42px; }
  .ph-feature-icon svg { max-width:19px; max-height:19px; }
  .ph-feature-text strong { font-size:12px; }
  .ph-feature-text span { font-size:11px; max-width:none; }

  .ph-stats-card { grid-template-columns:repeat(2, 1fr); max-width:100%; }
  .ph-stats-card.ph-stats-count-1 { max-width:100%; }
}

@media (max-width:560px) {
  .ph-logo-text strong { font-size:13px; }
  .ph-logo-text small { font-size:9px; }

  /* Below ~560px there isn't room for full descriptions on one row without
     wrapping, so each description truncates to a single line instead of
     breaking the row — the three icons + titles stay aligned on one line. */
  .ph-features { gap:8px; }
  .ph-feature { gap:6px; }
  .ph-feature-icon { width:36px; height:36px; }
  .ph-feature-icon svg { max-width:16px; max-height:16px; }
  .ph-feature-text { min-width:0; }
  .ph-feature-text strong { font-size:11px; white-space:nowrap; overflow:hidden; text-overflow:ellipsis; }
  .ph-feature-text span { white-space:nowrap; overflow:hidden; text-overflow:ellipsis; }
  .ph-stat { padding:16px 12px; }
}

@media (max-width:400px) {
  .ph-header-inner { padding:14px 14px; gap:10px; }
  .ph-header-actions { gap:6px; }
  .ph-cta { padding:10px; border-radius:50%; width:40px; height:40px; justify-content:center; }
  .ph-cta-label { display:none; }
  .ph-icon-btn { width:34px; height:34px; }
  .ph-burger { width:32px; height:32px; }
  .ph-feature-icon { width:32px; height:32px; }
  .ph-feature-icon svg { max-width:14px; max-height:14px; }
  .ph-feature-text strong,
  .ph-feature-text span { font-size:10px; }
}
