/* ===========================================================
   SHARED STYLES — Lextrafic
   Tokens, base type, hello bar, header, drawer, buttons,
   section base, CTA banner, footer, mobile CTA, helpers.
   Page-specific CSS lives inline on each page.
   =========================================================== */

/* === BRAND TOKENS (overridable by tweaks) === */
:root {
  --brand-primary: #1b2a44;
  --brand-primary-2: #2a3d5c;
  --brand-accent: #b07a3a;
  --brand-accent-2: #d29852;
  --bg: #faf7f2;
  --bg-soft: #f1ece2;
  --text: #1a1f2c;
  --text-soft: #4a5366;
  --text-mute: #6b7384;
  --line: #e6dfd0;
  --line-soft: #efe8d8;
  --white: #ffffff;
  --max: 1240px;
  --radius: 4px;
  --shadow-sm: 0 1px 2px rgba(20,30,50,.06);
  --shadow: 0 8px 30px rgba(20,30,50,.08);
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
  font-family: 'Manrope', system-ui, sans-serif;
  color: var(--text);
  background: var(--bg);
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3, h4 { font-family: 'Spectral', Georgia, serif; font-weight: 500; letter-spacing: -.01em; color: var(--brand-primary); margin: 0; line-height: 1.18; text-wrap: balance; }
h1 { font-size: clamp(34px, 4.4vw, 56px); }
h2 { font-size: clamp(28px, 3vw, 40px); }
h3 { font-size: clamp(20px, 1.6vw, 24px); }
p { margin: 0 0 .8em; color: var(--text-soft); text-wrap: pretty; }
a { color: inherit; text-decoration: none; }
.container { max-width: var(--max); margin: 0 auto; padding: 0 28px; }

/* === Top hello bar === */
.hellobar { background: var(--brand-primary); color: rgba(255,255,255,.85); font-size: 13px; padding: 9px 0; border-bottom: 1px solid rgba(255,255,255,.08); }
.hellobar .container { display: flex; justify-content: space-between; align-items: center; gap: 16px; }
.hellobar .tagline { font-style: italic; color: rgba(255,255,255,.8); }
.hellobar .right { display: flex; align-items: center; gap: 18px; }
.hellobar .social { display: flex; gap: 10px; }
.hellobar .social a { width: 26px; height: 26px; border: 1px solid rgba(255,255,255,.25); border-radius: 50%; display: inline-flex; align-items: center; justify-content: center; font-size: 12px; transition: all .2s; }
.hellobar .social a:hover { background: var(--brand-accent); border-color: var(--brand-accent); }
.hellobar .mail { opacity: .85; }
.hellobar .mail:hover { color: var(--brand-accent-2); opacity: 1; }

/* === Header / Nav === */
header.site { background: var(--white); border-bottom: 1px solid var(--line); position: sticky; top: 0; z-index: 50; }
header.site .container { display: flex; align-items: center; justify-content: space-between; gap: 28px; padding-top: 14px; padding-bottom: 14px; }
.logo { display: flex; align-items: center; gap: 12px; font-family: 'Spectral', serif; }
.logo .mark { width: 42px; height: 42px; background: var(--brand-primary); color: var(--white); display: inline-flex; align-items: center; justify-content: center; border-radius: 2px; font-weight: 700; font-size: 18px; letter-spacing: .04em; font-family: 'Manrope',sans-serif;}
.logo .wm { display: flex; flex-direction: column; line-height: 1; }
.logo .wm strong { font-size: 20px; color: var(--brand-primary); font-weight: 600; letter-spacing: .12em; text-transform: uppercase; font-family: 'Manrope',sans-serif; }
.logo .wm span { font-size: 11px; color: var(--text-mute); letter-spacing: .22em; text-transform: uppercase; margin-top: 4px; }
.logo .logo-img { height: 46px; width: auto; display: block; }

nav.primary { display: flex; gap: 30px; }
nav.primary a { font-weight: 600; font-size: 14.5px; color: var(--text); letter-spacing: .01em; position: relative; padding: 6px 0; }
nav.primary a:hover { color: var(--brand-accent); }
nav.primary a.active { color: var(--brand-accent); }
nav.primary a.active::after { content: ""; position: absolute; left: 0; right: 0; bottom: -2px; height: 2px; background: var(--brand-accent); }

/* Desplegable del menú (escritorio) */
.nav-dropdown { position: relative; }
.nav-dropdown-toggle { font: inherit; font-weight: 600; font-size: 14.5px; color: var(--text); letter-spacing: .01em; background: none; border: 0; padding: 6px 0; cursor: pointer; display: inline-flex; align-items: center; gap: 5px; }
.nav-dropdown-toggle .caret { transition: transform .2s ease; opacity: .7; }
.nav-dropdown:hover .nav-dropdown-toggle, .nav-dropdown:focus-within .nav-dropdown-toggle, .nav-dropdown-toggle.active { color: var(--brand-accent); }
.nav-dropdown:hover .nav-dropdown-toggle .caret, .nav-dropdown:focus-within .nav-dropdown-toggle .caret { transform: rotate(180deg); }
.nav-dropdown-menu { position: absolute; top: calc(100% + 12px); left: 50%; transform: translateX(-50%) translateY(6px); min-width: 250px; background: #fff; border: 1px solid var(--line); border-radius: 6px; box-shadow: var(--shadow); padding: 8px; opacity: 0; visibility: hidden; transition: opacity .18s ease, transform .18s ease; z-index: 60; }
.nav-dropdown-menu::before { content: ""; position: absolute; top: -12px; left: 0; right: 0; height: 12px; }
.nav-dropdown:hover .nav-dropdown-menu, .nav-dropdown:focus-within .nav-dropdown-menu { opacity: 1; visibility: visible; transform: translateX(-50%) translateY(0); }
.nav-dropdown-menu a { display: block; padding: 11px 14px; font-size: 14px; font-weight: 600; color: var(--text); border-radius: 4px; white-space: nowrap; }
.nav-dropdown-menu a:hover { background: var(--bg); color: var(--brand-accent); }

.header-cta { display: flex; align-items: center; gap: 14px; }
.header-cta .phone { display: flex; align-items: center; gap: 10px; }
.header-cta .phone .icn { width: 38px; height: 38px; background: var(--bg-soft); color: var(--brand-primary); border-radius: 50%; display: inline-flex; align-items: center; justify-content: center; }
.header-cta .phone .num { font-weight: 700; color: var(--brand-primary); letter-spacing: .02em; }
.header-cta .phone .lbl { font-size: 11px; color: var(--text-mute); letter-spacing: .14em; text-transform: uppercase; display: block; line-height: 1; margin-bottom: 4px; }

/* === Buttons === */
.btn { display: inline-flex; align-items: center; gap: 8px; padding: 12px 22px; border-radius: var(--radius); font-weight: 700; font-size: 14px; letter-spacing: .04em; text-transform: uppercase; cursor: pointer; transition: transform .15s ease, background .2s; border: 1px solid transparent; }
.btn-primary { background: var(--brand-accent); color: #fff; }
.btn-primary:hover { background: var(--brand-accent-2); }
.btn-dark { background: var(--brand-primary); color: #fff; }
.btn-dark:hover { background: var(--brand-primary-2); }
.btn-ghost { background: transparent; color: var(--brand-primary); border-color: currentColor; }
.btn-ghost:hover { background: var(--brand-primary); color: #fff; }
.btn-block { width: 100%; justify-content: center; padding: 16px 24px; font-size: 14.5px; }

/* === Section base === */
section { padding: 96px 0; }
.section-head { text-align: center; max-width: 760px; margin: 0 auto 56px; }
.section-head .kicker { display: inline-block; font-size: 12px; letter-spacing: .22em; text-transform: uppercase; color: var(--brand-accent); font-weight: 700; margin-bottom: 14px; }
.section-head .kicker::before, .section-head .kicker::after { content: ""; display: inline-block; width: 28px; height: 1px; background: var(--brand-accent); vertical-align: middle; margin: 0 12px; }
.section-head h2 { margin-bottom: 16px; }
.section-head p { font-size: 17px; color: var(--text-soft); }

/* === CTA banner === */
.cta-banner { background: var(--brand-accent); padding: 70px 0; color: #fff; }
.cta-inner { display: grid; grid-template-columns: 1.4fr auto; gap: 40px; align-items: center; }
.cta-banner h2 { color: #fff; font-size: 36px; margin-bottom: 10px; }
.cta-banner p { color: rgba(255,255,255,.9); font-size: 17px; margin: 0; }
.cta-banner .btn-dark { background: var(--brand-primary); padding: 18px 32px; font-size: 14px; }
.cta-banner .btn-dark:hover { background: #0d1628; }

/* === Valoraciones (reseñas de Google) === */
.reviews { background: var(--bg); }
.reviews-badge { display: flex; align-items: center; gap: 16px; width: max-content; max-width: 100%; margin: -8px auto 44px; background: #fff; border: 1px solid var(--line); border-radius: 10px; padding: 14px 26px; box-shadow: var(--shadow); }
.reviews-badge .g-logo { display: inline-flex; }
.reviews-badge-num { font-family: 'Spectral', serif; font-size: 40px; line-height: 1; color: var(--brand-primary); font-weight: 600; }
.reviews-badge-meta { display: flex; flex-direction: column; gap: 4px; }
.reviews-badge-meta > span { font-size: 13px; color: var(--text-mute); }
.reviews .stars { display: inline-flex; gap: 2px; }
.reviews .star { width: 18px; height: 18px; fill: #fbbc04; }
.reviews-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; }
.review-card { background: #fff; border: 1px solid var(--line); border-radius: 6px; padding: 26px 24px; display: flex; flex-direction: column; gap: 14px; }
.review-card .star { width: 16px; height: 16px; }
.review-text { font-size: 15px; color: var(--text-soft); line-height: 1.6; flex: 1; margin: 0; font-style: italic; }
.review-author { display: flex; align-items: center; gap: 12px; }
.review-avatar { width: 42px; height: 42px; flex: none; border-radius: 50%; background: var(--brand-primary); color: #fff; display: inline-flex; align-items: center; justify-content: center; font-weight: 700; font-size: 18px; font-family: 'Manrope',sans-serif; }
.review-meta { display: flex; flex-direction: column; line-height: 1.3; }
.review-name { font-weight: 700; color: var(--text); font-size: 14.5px; }
.review-src { font-size: 12px; color: var(--text-mute); }
.reviews-foot { text-align: center; margin-top: 40px; }
@media (max-width: 980px) { .reviews-grid { grid-template-columns: 1fr; } }

/* === Article cards (shared with landing) === */
.articles-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 30px; }
.article-card { background: var(--white); border: 1px solid var(--line); border-radius: 4px; overflow: hidden; transition: all .2s; display: flex; flex-direction: column; }
.article-card:hover { transform: translateY(-3px); box-shadow: var(--shadow); }
.article-card .img { aspect-ratio: 16/10; background: var(--bg-soft); background-image: repeating-linear-gradient(135deg, transparent 0 14px, rgba(27,42,68,.06) 14px 28px); border-bottom: 1px solid var(--line); position: relative; display: flex; align-items: center; justify-content: center; }
.article-card .img::before { content: ""; position: absolute; inset: 14px; border: 1px solid var(--line); }
.article-card .img .ph-label { font-family: ui-monospace, monospace; font-size: 10px; color: var(--text-mute); letter-spacing: .18em; text-transform: uppercase; background: var(--bg); padding: 5px 10px; border: 1px solid var(--line); }
.article-card .body { padding: 26px; flex: 1; display: flex; flex-direction: column; }
.article-card .cat { font-size: 11px; letter-spacing: .2em; text-transform: uppercase; color: var(--brand-accent); font-weight: 700; margin-bottom: 10px; }
.article-card h3 { font-size: 19px; margin-bottom: 12px; line-height: 1.3; }
.article-card .excerpt { font-size: 14.5px; color: var(--text-soft); flex: 1; margin-bottom: 18px; }
.article-card .read-more { color: var(--brand-primary); font-weight: 700; font-size: 13px; letter-spacing: .08em; text-transform: uppercase; display: inline-flex; align-items: center; gap: 6px; }
.article-card .read-more:hover { color: var(--brand-accent); }

/* === Footer === */
footer.site { background: #0e1628; color: rgba(255,255,255,.7); padding: 70px 0 0; }
.footer-grid { display: grid; grid-template-columns: 1.4fr 1fr 1fr 1fr; gap: 50px; padding-bottom: 50px; border-bottom: 1px solid rgba(255,255,255,.1); }
footer.site h4 { color: #fff; font-family: 'Manrope',sans-serif; font-size: 13px; letter-spacing: .2em; text-transform: uppercase; margin-bottom: 22px; }
footer.site ul { list-style: none; padding: 0; margin: 0; }
footer.site ul li { margin-bottom: 10px; font-size: 14.5px; }
footer.site ul li a:hover { color: var(--brand-accent-2); }
footer.site p { color: rgba(255,255,255,.6); font-size: 14px; }
footer .brand { display: flex; gap: 14px; align-items: center; margin-bottom: 18px; }
footer .brand .mark { width: 44px; height: 44px; background: var(--brand-accent); color: #fff; display: inline-flex; align-items: center; justify-content: center; font-weight: 700; }
footer .brand .wm { font-family: 'Manrope',sans-serif; font-size: 20px; color: #fff; font-weight: 600; letter-spacing: .12em; text-transform: uppercase; }
.legal-bar { padding: 22px 0; display: flex; justify-content: space-between; gap: 18px; flex-wrap: wrap; font-size: 13px; color: rgba(255,255,255,.5); }
.legal-bar a { margin-right: 18px; }
.legal-bar a:hover { color: #fff; }

/* === Mobile drawer === */
.hamburger { display: none; width: 44px; height: 44px; border: 1px solid var(--line); border-radius: var(--radius); background: #fff; cursor: pointer; align-items: center; justify-content: center; color: var(--brand-primary); padding: 0; }
.hamburger:hover { border-color: var(--brand-accent); }
.hamburger svg { display:block; }
.drawer-backdrop { position: fixed; inset: 0; background: rgba(15,22,40,.5); opacity: 0; pointer-events: none; transition: opacity .25s; z-index: 90; }
.drawer-backdrop.open { opacity: 1; pointer-events: auto; }
.drawer { position: fixed; top: 0; right: 0; bottom: 0; width: min(86vw, 360px); background: #fff; z-index: 100; transform: translateX(100%); transition: transform .28s ease; display: flex; flex-direction: column; box-shadow: -8px 0 30px rgba(15,22,40,.18); }
.drawer.open { transform: translateX(0); }
.drawer-head { display: flex; justify-content: space-between; align-items: center; padding: 18px 22px; border-bottom: 1px solid var(--line); }
.drawer-head .lbl { font-size: 11px; letter-spacing: .22em; text-transform: uppercase; color: var(--text-mute); font-weight: 700; }
.drawer-close { width: 36px; height: 36px; border: none; background: var(--bg-soft); border-radius: 50%; cursor: pointer; color: var(--brand-primary); display: inline-flex; align-items: center; justify-content: center; font-size: 18px; line-height: 1; }
.drawer nav { display: flex; flex-direction: column; padding: 8px 0; flex: 1; }
.drawer nav a { padding: 16px 22px; font-size: 17px; font-weight: 600; color: var(--text); border-bottom: 1px solid var(--line-soft); display: flex; align-items: center; justify-content: space-between; }
.drawer nav a::after { content: "›"; color: var(--brand-accent); font-size: 22px; opacity: .6; }
.drawer nav a:hover { background: var(--bg); color: var(--brand-primary); }
/* Submenú desplegable del drawer (móvil) */
.drawer-group { border-bottom: 1px solid var(--line-soft); }
.drawer-summary { padding: 16px 22px; font-size: 17px; font-weight: 600; color: var(--text); display: flex; align-items: center; justify-content: space-between; cursor: pointer; list-style: none; }
.drawer-summary::-webkit-details-marker { display: none; }
.drawer-summary::after { content: "+"; color: var(--brand-accent); font-size: 24px; font-weight: 300; line-height: 1; }
.drawer-group[open] > .drawer-summary { color: var(--brand-primary); }
.drawer-group[open] > .drawer-summary::after { content: "\2212"; }
.drawer-sub { background: var(--bg); }
.drawer-sub a.drawer-sublink { padding-left: 40px; font-size: 15.5px; font-weight: 500; }
.drawer-foot { padding: 22px; background: var(--bg); border-top: 1px solid var(--line); }
.drawer-foot .phone-big { display: flex; align-items: center; gap: 12px; padding: 14px 16px; background: #fff; border: 1px solid var(--line); border-radius: var(--radius); margin-bottom: 12px; }
.drawer-foot .phone-big .icn { width: 40px; height: 40px; background: var(--brand-accent); color: #fff; border-radius: 50%; display: inline-flex; align-items: center; justify-content: center; }
.drawer-foot .phone-big .lbl { font-size: 11px; letter-spacing: .18em; text-transform: uppercase; color: var(--text-mute); display: block; }
.drawer-foot .phone-big .num { font-weight: 700; color: var(--brand-primary); font-size: 17px; }

/* === Mobile sticky CTA === */
.mobile-cta { display: none; position: fixed; left: 0; right: 0; bottom: 0; z-index: 80; background: #fff; border-top: 1px solid var(--line); box-shadow: 0 -6px 24px rgba(15,22,40,.08); padding: 10px 12px calc(10px + env(safe-area-inset-bottom)); gap: 8px; }
.mobile-cta .btn { padding: 14px 12px; font-size: 13px; text-transform: uppercase; letter-spacing: .04em; flex: 1; justify-content: center; border-radius: var(--radius); }
.mobile-cta .btn-call { background: var(--brand-primary); color: #fff; }
.mobile-cta .btn-form { background: var(--brand-accent); color: #fff; }

/* === Page hero (smaller, for inner pages) === */
.page-hero { background: var(--brand-primary); color: #fff; padding: 70px 0 80px; position: relative; overflow: hidden; isolation: isolate; }
.page-hero::before { content:""; position:absolute; inset:0; z-index:-1; background: radial-gradient(70% 60% at 80% 30%, rgba(176,122,58,.22), transparent 70%), linear-gradient(135deg, #20304c 0%, #14213a 100%); }
.page-hero::after { content:""; position:absolute; inset:0; z-index:-1; background: repeating-linear-gradient(45deg, rgba(255,255,255,.012) 0 24px, transparent 24px 48px); }
.page-hero .breadcrumb { display: flex; gap: 8px; align-items: center; font-size: 12.5px; letter-spacing: .14em; text-transform: uppercase; color: rgba(255,255,255,.6); margin-bottom: 18px; }
.page-hero .breadcrumb a { color: rgba(255,255,255,.85); }
.page-hero .breadcrumb a:hover { color: var(--brand-accent-2); }
.page-hero .breadcrumb .sep { color: rgba(255,255,255,.35); }
.page-hero .eyebrow { display: inline-flex; align-items: center; gap: 10px; padding: 7px 14px; border: 1px solid rgba(255,255,255,.2); border-radius: 999px; font-size: 12px; letter-spacing: .18em; text-transform: uppercase; color: rgba(255,255,255,.85); margin-bottom: 22px; }
.page-hero .eyebrow .dot { width: 6px; height: 6px; border-radius: 50%; background: var(--brand-accent-2); }
.page-hero h1 { color: #fff; }
.page-hero .lead { color: rgba(255,255,255,.82); font-size: 18px; margin-top: 16px; max-width: 720px; }

/* === Responsive (shared parts) === */
@media (max-width: 980px) {
  nav.primary { display: none; }
  .hamburger { display: inline-flex; }
  .articles-grid { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr 1fr; gap: 30px; }
  .cta-inner { grid-template-columns: 1fr; text-align: left; gap: 22px; }
  .hellobar .tagline { display: none; }
  section { padding: 64px 0; }
  .header-cta .phone, .header-cta .btn-primary { display: none; }
  body { padding-bottom: 72px; }
  .mobile-cta { display: flex; }
  .page-hero { padding: 50px 0 56px; }
}
@media (max-width: 640px) {
  .container { padding: 0 20px; }
  h1 { font-size: 32px; line-height: 1.12; }
  h2 { font-size: 26px; }
  .section-head { margin-bottom: 40px; }
  .section-head p { font-size: 15.5px; }
  .cta-banner { padding: 56px 0; }
  .cta-banner h2 { font-size: 26px; }
  .footer-grid { grid-template-columns: 1fr; gap: 36px; padding-bottom: 36px; }
  .legal-bar { flex-direction: column; gap: 12px; align-items: flex-start; }
  .hellobar .right .mail { display: none; }
  .header-cta { gap: 8px; }
  header.site .container { gap: 12px; padding-top: 10px; padding-bottom: 10px; }
  .logo .wm span { display: none; }
  .logo .mark { width: 38px; height: 38px; font-size: 15px; }
  .logo .wm strong { font-size: 17px; }
  .logo .logo-img { height: 36px; }
  .page-hero h1 { font-size: 30px; }
  .page-hero .lead { font-size: 15.5px; }
}
