/* ============================================================
   García Smester — main.css
   Sistema de diseño: requerimientos/DISEÑO.md
   ============================================================ */

/* ── Variables ─────────────────────────────────────────────── */
:root {
  /* Base */
  --color-white:       #ffffff;
  --color-bg-light:    #f5f5f7;
  --color-bg-dark:     #0a0a0a;
  --color-surface:     #1c1c1e;

  /* Texto */
  --color-text-primary:   #1c1c1c;
  --color-text-secondary: #6e6e73;
  --color-text-tertiary:  #929292;
  --color-text-inverse:   #f5f5f7;

  /* Marca */
  --color-brand-red:    #E8621A;
  --color-brand-blue:   #0088cb;
  --color-brand-yellow: #ffcb05;
  --color-brand-green:  #26e089;

  /* Semánticos */
  --color-accent: var(--color-brand-red);
  --color-cta:    var(--color-brand-green);

  /* Bordes */
  --color-border-light: rgba(0,0,0,.08);
  --color-border-dark:  rgba(255,255,255,.10);

  /* Glass */
  --color-glass-bg:   rgba(255,255,255,.72);
  --color-glass-dark: rgba(10,10,10,.80);

  /* Tipografía */
  --font-primary: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --text-xs:   .75rem;
  --text-sm:   .875rem;
  --text-base: 1rem;
  --text-lg:   1.25rem;
  --text-xl:   1.5rem;
  --text-2xl:  2rem;
  --text-3xl:  2.5rem;
  --text-4xl:  3.5rem;
  --text-5xl:  4.5rem;
  --text-hero: clamp(3rem, 8vw, 6rem);

  --font-regular:  400;
  --font-medium:   500;
  --font-semibold: 600;
  --font-bold:     700;
  --font-black:    900;

  --leading-tight:  1.1;
  --leading-snug:   1.3;
  --leading-normal: 1.6;

  --tracking-tight:  -.04em;
  --tracking-normal:  0em;
  --tracking-wide:    .08em;

  /* Espaciado */
  --space-1:  .25rem;
  --space-2:  .5rem;
  --space-3:  .75rem;
  --space-4:  1rem;
  --space-6:  1.5rem;
  --space-8:  2rem;
  --space-12: 3rem;
  --space-16: 4rem;
  --space-20: 5rem;
  --space-24: 6rem;

  --section-padding-y: clamp(4rem, 8vw, 8rem);
  --container-max: 1200px;
  --container-px:  clamp(1.25rem, 4vw, 3rem);
}

/* ── Reset ─────────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }

body {
  font-family: var(--font-primary);
  font-size: var(--text-base);
  color: var(--color-text-primary);
  background: var(--color-white);
  line-height: var(--leading-normal);
  -webkit-font-smoothing: antialiased;
}

img, video { display: block; max-width: 100%; height: auto; }
a { color: inherit; text-decoration: none; }
ul, ol { list-style: none; }
button { font-family: inherit; cursor: pointer; background: none; border: none; }
address { font-style: normal; }

/* ── Contenedor ─────────────────────────────────────────────── */
.container {
  max-width: var(--container-max);
  margin-inline: auto;
  padding-inline: var(--container-px);
}

/* ── Tipografía ─────────────────────────────────────────────── */
h1, h2, h3, h4 {
  font-weight: var(--font-bold);
  line-height: var(--leading-tight);
  letter-spacing: var(--tracking-tight);
}

h1 { font-size: clamp(2.2rem, 5vw, 3.5rem); }
h2 { font-size: clamp(1.75rem, 3.5vw, 2.5rem); }
h3 { font-size: clamp(1.2rem, 2vw, 1.5rem); }

.label {
  display: inline-block;
  font-size: var(--text-xs);
  font-weight: var(--font-semibold);
  letter-spacing: var(--tracking-wide);
  text-transform: uppercase;
  color: var(--color-brand-red);
  margin-bottom: var(--space-4);
}

/* ── Botones ─────────────────────────────────────────────────── */
.btn {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  padding: .875rem 2rem;
  border-radius: 100px;
  font-family: var(--font-primary);
  font-weight: var(--font-semibold);
  font-size: var(--text-base);
  text-decoration: none;
  transition: transform .15s ease, box-shadow .15s ease;
  cursor: pointer;
  border: none;
  min-height: 48px;
}

.btn:hover  { transform: scale(1.02); }
.btn:active { transform: scale(.98); }

.btn--cta {
  background: var(--color-brand-green);
  color: #0a0a0a;
}
.btn--cta:hover { box-shadow: 0 8px 24px rgba(38,224,137,.35); }

.btn--ghost {
  background: transparent;
  color: var(--color-text-inverse);
  border: 1.5px solid rgba(255,255,255,.3);
}
.btn--ghost:hover { border-color: rgba(255,255,255,.6); }

.btn--secondary {
  background: var(--color-bg-dark);
  color: var(--color-text-inverse);
}

/* ── Navegación glass ───────────────────────────────────────── */
.nav-toggle { display: none; }

.site-nav {
  position: sticky;
  top: 0;
  z-index: 100;
  background: var(--color-glass-bg);
  backdrop-filter: saturate(180%) blur(20px);
  -webkit-backdrop-filter: saturate(180%) blur(20px);
  border-bottom: 1px solid var(--color-border-light);
  transition: background .3s ease;
}

.nav-inner {
  display: flex;
  align-items: center;
  gap: var(--space-8);
  height: 64px;
}

.nav-logo {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  font-weight: var(--font-black);
  font-size: var(--text-lg);
  color: var(--color-text-primary);
  flex-shrink: 0;
}
.nav-logo__svg { width: 36px; height: 20px; color: var(--color-brand-red); }

.nav-links {
  display: flex;
  align-items: center;
  gap: var(--space-6);
  margin-left: auto;
}

.nav-link {
  font-size: var(--text-sm);
  font-weight: var(--font-medium);
  color: var(--color-text-primary);
  transition: color .15s ease;
  background: none;
  border: none;
  padding: 0;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: var(--space-1);
}
.nav-link:hover { color: var(--color-brand-red); }

.nav-cta { margin-left: var(--space-4); }

/* Dropdown */
.nav-dropdown { position: relative; }
.nav-dropdown__icon { width: 16px; height: 16px; transition: transform .2s; }
.nav-dropdown:hover .nav-dropdown__icon { transform: rotate(180deg); }

.nav-dropdown__menu {
  display: none;
  position: absolute;
  top: calc(100% + 12px);
  left: 50%;
  transform: translateX(-50%);
  background: var(--color-white);
  border: 1px solid var(--color-border-light);
  border-radius: 16px;
  box-shadow: 0 16px 48px rgba(0,0,0,.12);
  padding: var(--space-3);
  min-width: 220px;
  z-index: 200;
}
.nav-dropdown:hover .nav-dropdown__menu { display: block; }

.nav-dropdown__item {
  display: block;
  padding: var(--space-3) var(--space-4);
  font-size: var(--text-sm);
  border-radius: 10px;
  transition: background .15s ease, color .15s ease;
}
.nav-dropdown__item:hover {
  background: var(--color-bg-light);
  color: var(--color-brand-red);
}

/* Hamburguesa (mobile) */
.nav-hamburger {
  display: none;
  flex-direction: column;
  gap: 5px;
  cursor: pointer;
  margin-left: auto;
  padding: var(--space-2);
}
.nav-hamburger span {
  display: block;
  width: 22px;
  height: 2px;
  background: var(--color-text-primary);
  border-radius: 2px;
  transition: transform .25s ease, opacity .25s ease;
}

.nav-mobile-overlay {
  display: none;
  position: fixed;
  inset: 64px 0 0;
  background: var(--color-white);
  z-index: 99;
  overflow-y: auto;
  padding: var(--space-6) var(--container-px);
}

.nav-mobile { display: flex; flex-direction: column; gap: var(--space-4); }
.nav-mobile__heading { font-weight: var(--font-semibold); padding: var(--space-3) 0; cursor: pointer; }
.nav-mobile__list { display: flex; flex-direction: column; gap: var(--space-2); padding-left: var(--space-4); }
.nav-mobile__item, .nav-mobile__link { font-size: var(--text-base); padding: var(--space-2) 0; display: block; }
.nav-mobile__cta { margin-top: var(--space-4); text-align: center; justify-content: center; }

.nav-toggle:checked ~ .nav-mobile-overlay { display: block; }
.nav-toggle:checked ~ .site-nav .nav-hamburger span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav-toggle:checked ~ .site-nav .nav-hamburger span:nth-child(2) { opacity: 0; }
.nav-toggle:checked ~ .site-nav .nav-hamburger span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* ── Hero ────────────────────────────────────────────────────── */
.hero {
  position: relative;
  background: var(--color-bg-dark);
  color: var(--color-text-inverse);
  overflow: hidden;
}

.hero--full {
  min-height: 100svh;
  display: flex;
  align-items: center;
  text-align: center;
}

.hero--full .container {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--space-6);
  padding-block: var(--space-24);
}

.hero__eyebrow {
  font-size: var(--text-xs);
  font-weight: var(--font-semibold);
  letter-spacing: var(--tracking-wide);
  text-transform: uppercase;
  color: var(--color-brand-red);
}

.hero__heading {
  font-size: var(--text-hero);
  font-weight: var(--font-black);
  letter-spacing: var(--tracking-tight);
  line-height: 1.05;
  max-width: 14ch;
}

.hero__sub {
  font-size: var(--text-lg);
  color: var(--color-text-secondary);
  max-width: 50ch;
  line-height: var(--leading-snug);
}

.hero__actions {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-4);
  justify-content: center;
}

/* Hero split */
.hero--split .container {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-12);
  align-items: center;
  min-height: 80svh;
  padding-block: var(--section-padding-y);
}

.hero--split .hero__content {
  display: flex;
  flex-direction: column;
  gap: var(--space-6);
}

.hero--split .hero__visual img {
  width: 100%;
  height: 520px;
  object-fit: cover;
  border-radius: 20px;
}

/* ── Secciones ───────────────────────────────────────────────── */
.section { padding-block: var(--section-padding-y); }

.section--light { background: var(--color-bg-light); }

.section--dark {
  background: var(--color-bg-dark);
  color: var(--color-text-inverse);
}

.section__header {
  text-align: center;
  margin-bottom: var(--space-12);
}
.section__header h2 { margin-bottom: var(--space-4); }
.section__header p {
  color: var(--color-text-secondary);
  max-width: 55ch;
  margin-inline: auto;
}

/* ── Grid de servicios ───────────────────────────────────────── */
.grid-services {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 320px), 1fr));
  gap: var(--space-6);
}

.card-service {
  background: var(--color-white);
  border-radius: 20px;
  overflow: hidden;
  border: 1px solid var(--color-border-light);
  transition: transform .25s ease, box-shadow .25s ease;
  display: flex;
  flex-direction: column;
}
.card-service:hover {
  transform: translateY(-4px);
  box-shadow: 0 20px 60px rgba(0,0,0,.08);
}

.card-service__accent { height: 4px; background: var(--color-brand-red); }

.card-service__body { padding: var(--space-6); flex: 1; display: flex; flex-direction: column; gap: var(--space-3); }

.card-service__name {
  font-size: var(--text-lg);
  font-weight: var(--font-bold);
}

.card-service__desc {
  font-size: var(--text-sm);
  color: var(--color-text-secondary);
  line-height: var(--leading-normal);
  flex: 1;
}

.card-service__link {
  font-size: var(--text-sm);
  font-weight: var(--font-semibold);
  color: var(--color-brand-blue);
  display: inline-flex;
  align-items: center;
  gap: var(--space-1);
  margin-top: var(--space-3);
}

/* ── Stats band ──────────────────────────────────────────────── */
.stats-band { background: var(--color-bg-light); padding-block: var(--space-20); }

.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: var(--space-8);
  text-align: center;
}

.stat-block__number {
  display: block;
  font-size: var(--text-5xl);
  font-weight: var(--font-black);
  letter-spacing: var(--tracking-tight);
  color: var(--color-brand-yellow);
  line-height: 1;
}

.stat-block__label {
  display: block;
  font-size: var(--text-xs);
  font-weight: var(--font-semibold);
  letter-spacing: var(--tracking-wide);
  text-transform: uppercase;
  color: var(--color-text-secondary);
  margin-top: var(--space-2);
}

/* ── CTA final ───────────────────────────────────────────────── */
.section--cta {
  background: var(--color-brand-red);
  color: var(--color-white);
  text-align: center;
  padding-block: var(--section-padding-y);
}
.section--cta h2 { color: var(--color-white); margin-bottom: var(--space-6); }
.section--cta p  { color: rgba(255,255,255,.8); margin-bottom: var(--space-8); max-width: 50ch; margin-inline: auto; }

/* ── Footer ──────────────────────────────────────────────────── */
.site-footer {
  background: var(--color-bg-dark);
  color: var(--color-text-inverse);
  padding-top: var(--space-20);
}

.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 2fr;
  gap: var(--space-12);
  padding-bottom: var(--space-16);
}

.footer-logo {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  font-weight: var(--font-black);
  font-size: var(--text-xl);
  margin-bottom: var(--space-4);
}
.footer-logo__gs   { color: var(--color-brand-red); }
.footer-logo__name { color: var(--color-text-inverse); }

.footer-tagline {
  font-size: var(--text-sm);
  color: var(--color-text-tertiary);
  line-height: var(--leading-normal);
}

.footer-heading {
  font-size: var(--text-xs);
  font-weight: var(--font-semibold);
  letter-spacing: var(--tracking-wide);
  text-transform: uppercase;
  color: var(--color-text-tertiary);
  margin-bottom: var(--space-6);
}

.footer-links { display: flex; flex-direction: column; gap: var(--space-3); }
.footer-links a {
  font-size: var(--text-sm);
  color: var(--color-text-secondary);
  transition: color .15s ease;
}
.footer-links a:hover { color: var(--color-text-inverse); }

.footer-address p {
  font-size: var(--text-sm);
  color: var(--color-text-secondary);
  margin-bottom: var(--space-2);
}
.footer-address a { transition: color .15s ease; }
.footer-address a:hover { color: var(--color-text-inverse); }

.footer-bottom {
  border-top: 1px solid var(--color-border-dark);
  padding-block: var(--space-6);
}
.footer-copy {
  font-size: var(--text-xs);
  color: var(--color-text-tertiary);
  text-align: center;
}

/* ── WhatsApp flotante ───────────────────────────────────────── */
.whatsapp-btn {
  position: fixed;
  bottom: 2rem;
  right: 2rem;
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: #25d366;
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 8px 32px rgba(37,211,102,.4);
  transition: transform .2s ease;
  z-index: 200;
}
.whatsapp-btn:hover { transform: scale(1.08); }
.whatsapp-btn svg { width: 28px; height: 28px; }

/* ── Animaciones ─────────────────────────────────────────────── */
.animate-on-scroll {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity .6s ease, transform .6s ease;
}
.animate-on-scroll.is-visible { opacity: 1; transform: none; }
.animate-on-scroll:nth-child(2) { transition-delay: .1s; }
.animate-on-scroll:nth-child(3) { transition-delay: .2s; }
.animate-on-scroll:nth-child(4) { transition-delay: .3s; }

/* ── Responsive ──────────────────────────────────────────────── */
@media (min-width: 768px) {
  .nav-hamburger { display: none; }
}

@media (max-width: 767px) {
  .nav-links  { display: none; }
  .nav-cta    { display: none; }
  .nav-hamburger { display: flex; }

  .hero--split .container { grid-template-columns: 1fr; }
  .hero--split .hero__visual { order: -1; }
  .hero--split .hero__visual img { height: 260px; }

  .footer-grid { grid-template-columns: 1fr 1fr; gap: var(--space-8); }
  .footer-brand { grid-column: 1 / -1; }
}

@media (max-width: 480px) {
  .footer-grid { grid-template-columns: 1fr; }
  .stats-grid  { grid-template-columns: 1fr 1fr; }
}

/* ── Card proyecto ───────────────────────────────────────────── */
.projects-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: var(--space-6);
}

.card-project {
  background: var(--color-white);
  border-radius: 20px;
  overflow: hidden;
  border: 1px solid var(--color-border-light);
  transition: transform .25s ease, box-shadow .25s ease;
}

.card-project:hover {
  transform: translateY(-4px);
  box-shadow: 0 20px 60px rgba(0,0,0,.10);
}

.card-project__img {
  width: 100%;
  height: 220px;
  object-fit: cover;
  display: block;
  background: var(--color-bg-light);
}

.card-project__img--placeholder {
  height: 220px;
  background: linear-gradient(135deg, var(--color-bg-light) 0%, #e5e5e7 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 3rem;
}

.card-project__body {
  padding: var(--space-5) var(--space-6);
}

.card-project__tag {
  display: inline-block;
  font-size: var(--text-xs);
  font-weight: var(--font-semibold);
  text-transform: uppercase;
  letter-spacing: var(--tracking-wide);
  color: var(--color-brand-blue);
  margin-bottom: var(--space-2);
}

.card-project__title {
  font-size: var(--text-lg);
  font-weight: var(--font-bold);
  margin-bottom: var(--space-1);
}

.card-project__meta {
  font-size: var(--text-sm);
  color: var(--color-text-secondary);
}

/* ── Casos de éxito (sección oscura) ─────────────────────────── */
.section--dark {
  background: var(--color-bg-dark);
  color: var(--color-text-inverse);
}

.section--dark h2 { color: var(--color-text-inverse); }
.section--dark p  { color: rgba(255,255,255,.7); }

.casos-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: var(--space-6);
}

.caso-card {
  background: var(--color-surface);
  border: 1px solid var(--color-border-dark);
  border-radius: 20px;
  overflow: hidden;
  transition: border-color .2s;
}

.caso-card:hover { border-color: rgba(255,255,255,.25); }

.caso-card__img {
  width: 100%;
  height: 200px;
  object-fit: cover;
  display: block;
}

.caso-card__body { padding: var(--space-5) var(--space-6); }

.caso-card__tag {
  font-size: var(--text-xs);
  font-weight: var(--font-semibold);
  text-transform: uppercase;
  letter-spacing: var(--tracking-wide);
  color: var(--color-brand-green);
  margin-bottom: var(--space-2);
  display: block;
}

.caso-card__title {
  font-size: var(--text-lg);
  font-weight: var(--font-bold);
  color: var(--color-text-inverse);
  margin-bottom: var(--space-2);
}

.caso-card__desc {
  font-size: var(--text-sm);
  color: rgba(255,255,255,.6);
  line-height: var(--leading-normal);
}

/* ── Grid de características ─────────────────────────────────── */
.features-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: var(--space-8);
}

.feature-item {
  display: flex;
  flex-direction: column;
  gap: var(--space-3);
}

.feature-item__icon {
  width: 48px;
  height: 48px;
  border-radius: 12px;
  background: rgba(237,28,36,.08);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
}

.feature-item__title {
  font-size: var(--text-lg);
  font-weight: var(--font-bold);
}

.feature-item__desc {
  font-size: var(--text-sm);
  color: var(--color-text-secondary);
  line-height: var(--leading-normal);
}

/* ── Ficha técnica (tabla de especificaciones) ────────────────── */
.tabla-tecnica {
  width: 100%;
  border-collapse: collapse;
  font-size: var(--text-sm);
  border-radius: 12px;
  overflow: hidden;
  border: 1px solid var(--color-border-light);
}

.tabla-tecnica th {
  background: var(--color-bg-light);
  font-size: var(--text-xs);
  font-weight: var(--font-semibold);
  text-transform: uppercase;
  letter-spacing: var(--tracking-wide);
  color: var(--color-text-secondary);
  padding: var(--space-3) var(--space-4);
  text-align: left;
  border-bottom: 1px solid var(--color-border-light);
}

.tabla-tecnica td {
  padding: var(--space-3) var(--space-4);
  border-bottom: 1px solid var(--color-border-light);
  color: var(--color-text-primary);
  line-height: var(--leading-normal);
}

.tabla-tecnica tr:last-child td { border-bottom: none; }
.tabla-tecnica tr:nth-child(even) td { background: rgba(0,0,0,.02); }

.tabla-tecnica td:first-child {
  font-weight: var(--font-semibold);
  color: var(--color-text-secondary);
  width: 40%;
}

/* ── Formulario de contacto ──────────────────────────────────── */
.contacto-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-16);
  align-items: start;
}

.form-contacto {
  display: flex;
  flex-direction: column;
  gap: var(--space-4);
}

.form-contacto .form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-4);
}

.form-contacto .form-group {
  display: flex;
  flex-direction: column;
  gap: var(--space-1);
}

.form-contacto label {
  font-size: var(--text-xs);
  font-weight: var(--font-semibold);
  text-transform: uppercase;
  letter-spacing: var(--tracking-wide);
  color: var(--color-text-secondary);
}

.form-contacto input,
.form-contacto textarea,
.form-contacto select {
  padding: .875rem 1rem;
  border: 1px solid var(--color-border-light);
  border-radius: 10px;
  font-size: var(--text-base);
  font-family: inherit;
  color: var(--color-text-primary);
  background: var(--color-white);
  transition: border-color .15s;
  outline: none;
  width: 100%;
}

.form-contacto input:focus,
.form-contacto textarea:focus { border-color: var(--color-brand-blue); }

.form-contacto textarea { resize: vertical; min-height: 140px; }

/* ── Blog: listado ───────────────────────────────────────────── */
.blog-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: var(--space-6);
}

.card-post {
  background: var(--color-white);
  border: 1px solid var(--color-border-light);
  border-radius: 20px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transition: transform .25s ease, box-shadow .25s ease;
}

.card-post:hover {
  transform: translateY(-4px);
  box-shadow: 0 20px 60px rgba(0,0,0,.08);
}

.card-post__body { padding: var(--space-6); flex: 1; display: flex; flex-direction: column; }

.card-post__date {
  font-size: var(--text-xs);
  color: var(--color-text-tertiary);
  text-transform: uppercase;
  letter-spacing: var(--tracking-wide);
  margin-bottom: var(--space-2);
}

.card-post__title {
  font-size: var(--text-xl);
  font-weight: var(--font-bold);
  line-height: var(--leading-snug);
  margin-bottom: var(--space-3);
}

.card-post__excerpt {
  font-size: var(--text-sm);
  color: var(--color-text-secondary);
  line-height: var(--leading-normal);
  flex: 1;
}

.card-post__link {
  display: inline-flex;
  align-items: center;
  gap: var(--space-1);
  font-size: var(--text-sm);
  font-weight: var(--font-semibold);
  color: var(--color-brand-blue);
  margin-top: var(--space-4);
}

/* ── Blog: post individual ───────────────────────────────────── */
.post-content {
  max-width: 72ch;
  margin-inline: auto;
  line-height: var(--leading-normal);
}

.post-content h2 {
  font-size: var(--text-2xl);
  font-weight: var(--font-bold);
  margin-top: var(--space-10);
  margin-bottom: var(--space-4);
}

.post-content h3 {
  font-size: var(--text-xl);
  font-weight: var(--font-bold);
  margin-top: var(--space-8);
  margin-bottom: var(--space-3);
}

.post-content p    { margin-bottom: var(--space-5); }
.post-content ul,
.post-content ol   { margin-left: var(--space-6); margin-bottom: var(--space-5); }
.post-content li   { margin-bottom: var(--space-2); }
.post-content img  { border-radius: 12px; max-width: 100%; margin-block: var(--space-6); }

/* ── Breadcrumb ──────────────────────────────────────────────── */
.breadcrumb {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  font-size: var(--text-sm);
  color: var(--color-text-secondary);
  margin-bottom: var(--space-6);
  flex-wrap: wrap;
}

.breadcrumb a { color: var(--color-text-secondary); transition: color .15s; }
.breadcrumb a:hover { color: var(--color-text-primary); }
.breadcrumb__sep { color: var(--color-text-tertiary); }
.breadcrumb__current { color: var(--color-text-primary); font-weight: var(--font-medium); }

/* ── Sección de servicios relacionados ───────────────────────── */
.related-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: var(--space-4);
}

/* ── WhatsApp flotante — mover arriba del chatbot ────────────── */
.whatsapp-btn {
  bottom: 5.5rem;  /* sube sobre el botón del chatbot */
}

/* ── Página vacía / empty state ──────────────────────────────── */
.empty-state {
  text-align: center;
  padding: var(--space-20) var(--space-8);
  color: var(--color-text-secondary);
}

.empty-state__icon { font-size: 3rem; margin-bottom: var(--space-4); display: block; }
.empty-state__title { font-size: var(--text-xl); font-weight: var(--font-bold); color: var(--color-text-primary); margin-bottom: var(--space-2); }

/* ── Responsive adicional ────────────────────────────────────── */
@media (max-width: 767px) {
  .contacto-grid { grid-template-columns: 1fr; }
  .form-contacto .form-row { grid-template-columns: 1fr; }
  .projects-grid { grid-template-columns: 1fr; }
  .casos-grid    { grid-template-columns: 1fr; }
  .blog-grid     { grid-template-columns: 1fr; }
  .features-grid { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 480px) {
  .features-grid { grid-template-columns: 1fr; }
  .whatsapp-btn  { bottom: 5rem; right: 1rem; }
}

/* ── Page hero (páginas internas: blog, contacto) ────────────── */
.page-hero {
  padding: var(--space-20) 0 var(--space-12);
  background: var(--color-bg-light);
  border-bottom: 1px solid var(--color-border-light);
}

.page-hero .label { display: block; margin-bottom: var(--space-3); }

.page-hero h1 {
  font-size: clamp(var(--text-3xl), 5vw, var(--text-4xl));
  font-weight: var(--font-black);
  letter-spacing: var(--tracking-tight);
  line-height: var(--leading-tight);
  margin-bottom: var(--space-4);
}

.page-hero .hero__sub {
  font-size: var(--text-lg);
  color: var(--color-text-secondary);
  max-width: 55ch;
}

/* ── Botón variante oscura (sobre fondo rojo) ────────────────── */
.btn--dark {
  background: var(--color-bg-dark);
  color: var(--color-text-inverse);
}
.btn--dark:hover { opacity: .85; }

/* ── CTA centrado en sección oscura ──────────────────────────── */
.section__cta-center {
  text-align: center;
  margin-top: var(--space-12);
}

/* ── Formulario de contacto — clases usadas en contacto/index.php ── */
.contacto-form-wrapper { display: flex; flex-direction: column; gap: var(--space-4); }

.form-group {
  display: flex;
  flex-direction: column;
  gap: var(--space-1);
}

.form-label {
  font-size: var(--text-xs);
  font-weight: var(--font-semibold);
  text-transform: uppercase;
  letter-spacing: var(--tracking-wide);
  color: var(--color-text-secondary);
}

.form-label--optional {
  font-weight: var(--font-regular);
  color: var(--color-text-tertiary);
  text-transform: none;
  letter-spacing: 0;
}

.form-input {
  padding: .875rem 1rem;
  border: 1px solid var(--color-border-light);
  border-radius: 10px;
  font-size: var(--text-base);
  font-family: inherit;
  color: var(--color-text-primary);
  background: var(--color-white);
  transition: border-color .15s;
  outline: none;
  width: 100%;
}

.form-input:focus { border-color: var(--color-brand-blue); }
.form-textarea { resize: vertical; min-height: 140px; }

/* Honeypot — ocultar visualmente SIN display:none (bots lo detectan) */
.form-honeypot {
  position: absolute;
  left: -9999px;
  opacity: 0;
  pointer-events: none;
  height: 0;
  overflow: hidden;
}

.form-success {
  background: rgba(38,224,137,.08);
  border: 1px solid rgba(38,224,137,.25);
  border-radius: 16px;
  padding: var(--space-10) var(--space-8);
  text-align: center;
}

.form-success h2 { margin-bottom: var(--space-3); }

.form-errors {
  background: rgba(237,28,36,.06);
  border: 1px solid rgba(237,28,36,.2);
  border-radius: 10px;
  padding: var(--space-4) var(--space-5);
  font-size: var(--text-sm);
  color: var(--color-brand-red);
}

.form-errors ul { list-style: disc; padding-left: var(--space-5); }
.form-errors li { margin-bottom: var(--space-1); }

/* Aside de info de contacto */
.contacto-info { display: flex; flex-direction: column; gap: var(--space-6); }

.contacto-item h3 {
  font-size: var(--text-xs);
  font-weight: var(--font-semibold);
  text-transform: uppercase;
  letter-spacing: var(--tracking-wide);
  color: var(--color-text-secondary);
  margin-bottom: var(--space-1);
}

.contacto-item p, .contacto-item address {
  font-size: var(--text-base);
  color: var(--color-text-primary);
  font-style: normal;
}

.contacto-item a {
  color: var(--color-brand-blue);
  transition: color .15s;
}
.contacto-item a:hover { color: var(--color-brand-red); }

.contacto-map { border-radius: 12px; overflow: hidden; }

/* ── Rich text (descripcion de servicios) ────────────────────── */
.rich-text { line-height: var(--leading-normal); }
.rich-text h2 { font-size: var(--text-2xl); font-weight: var(--font-bold); margin: var(--space-8) 0 var(--space-4); }
.rich-text h3 { font-size: var(--text-xl);  font-weight: var(--font-bold); margin: var(--space-6) 0 var(--space-3); }
.rich-text p  { margin-bottom: var(--space-5); }
.rich-text ul, .rich-text ol { margin-left: var(--space-6); margin-bottom: var(--space-5); }
.rich-text li { margin-bottom: var(--space-2); }

.content-narrow { max-width: 72ch; margin-inline: auto; }

/* ── Post fecha ──────────────────────────────────────────────── */
.post-date {
  display: block;
  font-size: var(--text-sm);
  color: var(--color-text-secondary);
  margin-top: var(--space-3);
}

/* ── Responsive adicional contacto ───────────────────────────── */
@media (max-width: 767px) {
  .contacto-grid { grid-template-columns: 1fr; }
}
