/* ============ VARIABLES ============ */
:root {
  --teal: #0d9488;
  --teal-dark: #0b7a70;
  --gold: #b8892f;
  --gold-dark: #96701f;
  --text: #1a2e2c;
  --bg: #fafafa;
  --bg-alt: #f1f5f4;
  --white: #ffffff;
  --border: #e2e8e6;
  --dark-1: #0c1e1b;
  --dark-2: #133731;
  --header-h: 84px;
  --header-h-mobile: 68px;
  --radius: 14px;
  --shadow: 0 4px 24px rgba(26, 46, 44, 0.08);
  --shadow-lg: 0 12px 40px rgba(26, 46, 44, 0.14);
}

/* ============ RESET ============ */
* { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  font-family: 'Segoe UI', system-ui, -apple-system, Roboto, Helvetica, Arial, sans-serif;
  color: var(--text);
  background: var(--bg);
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
ul { list-style: none; }
button { font: inherit; cursor: pointer; border: none; background: none; color: inherit; }
input, select, textarea { font: inherit; color: inherit; }
h1, h2, h3 { line-height: 1.2; font-weight: 800; }

.skip-link {
  position: absolute; left: -9999px; top: 0; z-index: 1000;
  background: var(--gold); color: #fff; padding: 12px 20px; border-radius: 0 0 8px 0;
}
.skip-link:focus { left: 0; }

.container {
  width: 100%;
  max-width: 1180px;
  margin: 0 auto;
  padding: 0 24px;
}

section[id] { scroll-margin-top: var(--header-h-mobile); }
@media (min-width: 768px) {
  section[id] { scroll-margin-top: var(--header-h); }
}

.section { padding: 88px 0; }
@media (max-width: 640px) {
  .section { padding: 64px 0; }
}

h2 {
  font-size: clamp(1.7rem, 3.5vw, 2.4rem);
  text-align: center;
  margin-bottom: 16px;
  color: var(--text);
}
.section-intro {
  text-align: center;
  max-width: 620px;
  margin: 0 auto 48px;
  color: #4a5a58;
  font-size: 1.05rem;
}

/* ============ BUTTONS ============ */
.btn {
  display: inline-block;
  padding: 15px 32px;
  border-radius: 999px;
  font-weight: 700;
  font-size: 1rem;
  transition: transform 0.15s ease, box-shadow 0.15s ease, background 0.15s ease;
  white-space: nowrap;
}
.btn-gold {
  background: linear-gradient(135deg, var(--gold), var(--gold-dark));
  color: #fff;
  box-shadow: 0 6px 20px rgba(184, 137, 47, 0.35);
}
.btn-gold:hover { transform: translateY(-2px); box-shadow: 0 10px 26px rgba(184, 137, 47, 0.45); }
.btn-lg { padding: 18px 44px; font-size: 1.05rem; }
.btn-header { padding: 11px 22px; font-size: 0.92rem; display: none; white-space: nowrap; }
@media (min-width: 1400px) { .btn-header { display: inline-block; } }

/* ============ HEADER ============ */
.site-header {
  position: sticky; top: 0; z-index: 500;
  background: rgba(250, 250, 250, 0.97);
  border-bottom: 1px solid var(--border);
  height: var(--header-h-mobile);
  display: flex;
  align-items: center;
}
@media (min-width: 768px) { .site-header { height: var(--header-h); } }

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  width: 100%;
}
.header-logo img {
  height: 52px; width: 52px; object-fit: contain;
}
@media (min-width: 768px) { .header-logo img { height: 64px; width: 64px; } }

.main-nav ul { display: flex; gap: 28px; }
.main-nav a {
  font-weight: 600; font-size: 0.95rem; color: var(--text);
  position: relative; padding: 6px 0;
  white-space: nowrap;
}
.main-nav a:hover { color: var(--teal); }
.main-nav {
  display: none;
}
@media (min-width: 1400px) {
  .main-nav { display: block; }
}

.nav-toggle {
  display: flex; flex-direction: column; justify-content: center; gap: 5px;
  width: 40px; height: 40px; align-items: center;
}
@media (min-width: 1400px) { .nav-toggle { display: none; } }
.nav-toggle span {
  display: block; width: 24px; height: 2.5px; background: var(--text); border-radius: 2px;
  transition: transform 0.25s ease, opacity 0.25s ease;
}
.nav-toggle[aria-expanded="true"] span:nth-child(1) { transform: translateY(7.5px) rotate(45deg); }
.nav-toggle[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.nav-toggle[aria-expanded="true"] span:nth-child(3) { transform: translateY(-7.5px) rotate(-45deg); }

@media (max-width: 1399px) {
  .main-nav {
    position: fixed;
    top: var(--header-h-mobile);
    left: 0; right: 0; bottom: 0;
    background: var(--white);
    transform: translateX(100%);
    transition: transform 0.3s ease;
    padding: 32px 24px;
    overflow-y: auto;
  }
  .main-nav.open { display: block; transform: translateX(0); }
  .main-nav ul { flex-direction: column; gap: 4px; }
  .main-nav a {
    display: block; padding: 16px 4px; font-size: 1.15rem;
    border-bottom: 1px solid var(--border);
    white-space: normal;
  }
  .main-nav .nav-cta {
    margin-top: 20px;
  }
}
@media (min-width: 768px) and (max-width: 1399px) {
  .main-nav { top: var(--header-h); }
}

/* ============ HERO ============ */
.hero {
  background: radial-gradient(circle at 30% 20%, #16453d 0%, var(--dark-2) 45%, var(--dark-1) 100%);
  color: #fff;
  padding: 72px 0 88px;
  text-align: center;
}
.hero-inner { display: flex; flex-direction: column; align-items: center; }
.hero-logo {
  height: 130px;
  width: auto;
  aspect-ratio: 16 / 9;
  object-fit: contain;
  margin-bottom: 20px;
  mix-blend-mode: lighten;
}
@media (min-width: 768px) { .hero-logo { height: 170px; } }

.eyebrow {
  color: #7fd4c9;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  font-size: 0.82rem;
  margin-bottom: 18px;
}
.hero h1 {
  font-size: clamp(2.1rem, 6vw, 3.6rem);
  margin-bottom: 14px;
  color: #fff;
}
.hero-subtitle {
  font-size: clamp(1.1rem, 2.6vw, 1.5rem);
  color: #d7ece8;
  font-weight: 500;
  margin-bottom: 22px;
}
.hero-support {
  max-width: 640px;
  color: #b7cdc9;
  font-size: 1.05rem;
  margin-bottom: 32px;
}
.hero-support strong { color: #fff; }

.hero-badges {
  display: flex; flex-wrap: wrap; justify-content: center; gap: 12px;
  margin-bottom: 36px;
}
.badge {
  display: inline-block;
  padding: 8px 18px;
  border-radius: 999px;
  font-size: 0.88rem;
  font-weight: 600;
}
.badge-outline {
  border: 1px solid rgba(255, 255, 255, 0.28);
  color: #e6f3f0;
  background: rgba(255, 255, 255, 0.06);
}

/* ============ AUTODIAGNÓSTICO ============ */
.diagnostico { background: var(--bg-alt); }
.diagnostico-list {
  max-width: 720px;
  margin: 0 auto 40px;
  display: flex;
  flex-direction: column;
  gap: 14px;
}
.diagnostico-list li {
  display: flex;
  align-items: center;
  gap: 16px;
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px 22px;
  box-shadow: var(--shadow);
}
.diagnostico-icon {
  flex: none;
  width: 34px; height: 34px;
  color: var(--gold);
}
.diagnostico-icon svg { width: 100%; height: 100%; }
.diagnostico-list p { font-weight: 600; font-size: 1.02rem; }

.diagnostico-closing {
  max-width: 700px;
  margin: 0 auto;
  text-align: center;
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--text);
  background: #fff;
  border-left: 4px solid var(--gold);
  border-radius: 10px;
  padding: 24px 28px;
  box-shadow: var(--shadow);
}

/* ============ SERVICIO ESTRELLA: FUNNEL DE LEADS ============ */
.funnel-estrella {
  background: linear-gradient(180deg, #fbf3e3 0%, var(--bg) 100%);
}
.funnel-card {
  max-width: 900px;
  margin: 0 auto;
  background: var(--white);
  border: 1px solid rgba(184, 137, 47, 0.35);
  border-radius: 22px;
  padding: 48px 32px;
  box-shadow: 0 18px 50px rgba(184, 137, 47, 0.18), var(--shadow-lg);
  text-align: center;
}
@media (min-width: 768px) { .funnel-card { padding: 56px 64px; } }

.estrella-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: linear-gradient(135deg, var(--gold), var(--gold-dark));
  color: #fff;
  font-weight: 800;
  font-size: 0.8rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  padding: 9px 20px;
  border-radius: 999px;
  box-shadow: 0 6px 18px rgba(184, 137, 47, 0.4);
  margin-bottom: 22px;
}
.estrella-badge svg { width: 15px; height: 15px; }

.funnel-card h2 { margin-bottom: 8px; }
.funnel-subtitle {
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--teal-dark);
  margin-bottom: 24px;
}
.funnel-contrast {
  max-width: 680px;
  margin: 0 auto 40px;
  color: #52625f;
  font-size: 1rem;
}

.funnel-steps {
  display: grid;
  grid-template-columns: 1fr;
  gap: 18px;
  text-align: left;
  margin-bottom: 40px;
  list-style: none;
  padding: 0;
}
@media (min-width: 700px) {
  .funnel-steps { grid-template-columns: repeat(2, 1fr); }
}
@media (min-width: 1000px) {
  .funnel-steps { grid-template-columns: repeat(3, 1fr); }
}
.funnel-steps li {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 10px;
  background: var(--bg-alt);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 22px 20px 20px;
}
.funnel-step-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 46px; height: 46px;
  background: linear-gradient(135deg, var(--gold), var(--gold-dark));
  color: #fff;
  border-radius: 50%;
}
.funnel-step-icon svg { width: 22px; height: 22px; }
.funnel-step-num {
  position: absolute;
  top: 16px; right: 18px;
  font-size: 1.6rem;
  font-weight: 800;
  color: rgba(184, 137, 47, 0.25);
  line-height: 1;
}
.funnel-steps p { font-size: 0.95rem; color: #3d4d4b; }
.funnel-steps strong { color: var(--text); }

.funnel-result {
  font-size: clamp(1.25rem, 3vw, 1.6rem);
  font-weight: 800;
  color: var(--gold-dark);
  border-top: 1px solid var(--border);
  padding-top: 28px;
  margin-bottom: 30px;
}

/* ============ CARDS GRID (shared) ============ */
.cards-grid { display: grid; gap: 24px; }
.cards-grid-5 { grid-template-columns: repeat(1, 1fr); }
.cards-grid-3 { grid-template-columns: repeat(1, 1fr); }
@media (min-width: 640px) {
  .cards-grid-5 { grid-template-columns: repeat(2, 1fr); }
  .cards-grid-3 { grid-template-columns: repeat(1, 1fr); }
}
@media (min-width: 900px) {
  .cards-grid-5 { grid-template-columns: repeat(3, 1fr); }
  .cards-grid-3 { grid-template-columns: repeat(3, 1fr); }
}
@media (min-width: 1180px) {
  .cards-grid-5 { grid-template-columns: repeat(5, 1fr); }
}

.card {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 30px 26px;
  box-shadow: var(--shadow);
  height: 100%;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}
.card:hover { transform: translateY(-4px); box-shadow: var(--shadow-lg); }

.card-icon {
  display: inline-flex; align-items: center; justify-content: center;
  width: 52px; height: 52px;
  background: rgba(13, 148, 136, 0.1);
  color: var(--teal);
  border-radius: 12px;
  margin-bottom: 18px;
}
.card-icon svg { width: 26px; height: 26px; }
.soluciones .card h3 {
  font-size: 1.12rem;
  margin-bottom: 10px;
  min-height: 2.6em;
}
.soluciones .card p { color: #4a5a58; font-size: 0.96rem; }

/* ============ RESULTADOS ============ */
.resultados { background: var(--bg-alt); }
.result-card {
  display: flex;
  flex-direction: column;
  gap: 12px;
  opacity: 0;
  transform: translateY(28px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}
.result-card.is-visible { opacity: 1; transform: translateY(0); }
.result-card:nth-child(1) { transition-delay: 0ms; }
.result-card:nth-child(2) { transition-delay: 150ms; }
.result-card:nth-child(3) { transition-delay: 300ms; }
@media (prefers-reduced-motion: reduce) {
  .result-card {
    opacity: 1;
    transform: none;
    transition: none;
  }
}
.result-badge {
  display: inline-block;
  align-self: flex-start;
  background: rgba(13, 148, 136, 0.1);
  color: var(--teal-dark);
  font-weight: 700;
  font-size: 0.82rem;
  padding: 6px 14px;
  border-radius: 999px;
  text-transform: uppercase;
  letter-spacing: 0.02em;
}
.result-desc { color: #4a5a58; font-size: 0.96rem; flex-grow: 1; }
.result-metric {
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--text);
  display: flex;
  align-items: baseline;
  gap: 8px;
  border-top: 1px solid var(--border);
  padding-top: 12px;
}
.result-metric span {
  font-size: 1.9rem;
  font-weight: 800;
  color: var(--gold-dark);
}

/* ============ NOSOTROS ============ */
.nosotros-intro {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 24px;
  max-width: 720px;
  margin: 0 auto 56px;
  text-align: center;
}
.nosotros-photo {
  width: 160px; height: 160px;
  border-radius: 50%;
  object-fit: cover;
  border: 4px solid var(--white);
  box-shadow: var(--shadow-lg);
}
.nosotros-lead { font-size: 1.15rem; font-weight: 600; color: var(--text); }

.nosotros-blocks {
  display: grid;
  gap: 28px;
  grid-template-columns: 1fr;
  max-width: 860px;
  margin: 0 auto;
}
.nosotros-block {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 32px 28px;
  box-shadow: var(--shadow);
}
.nosotros-block h3 {
  font-size: 1.2rem;
  margin-bottom: 20px;
  color: var(--teal-dark);
}
.logos-bar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 36px;
}
@media (max-width: 480px) {
  .logos-bar { gap: 28px; }
}
.logos-bar li { display: flex; align-items: center; }
.logos-bar img {
  height: 40px;
  width: auto;
  object-fit: contain;
  filter: grayscale(100%);
  opacity: 0.75;
  transition: filter 0.25s ease, opacity 0.25s ease;
}
.logos-bar img:hover {
  filter: grayscale(0%);
  opacity: 1;
}
.logro-anchor-stat {
  font-size: clamp(1.2rem, 2.8vw, 1.5rem);
  font-weight: 800;
  color: var(--gold-dark);
  text-align: center;
  margin-bottom: 28px;
}

/* ============ SERVICIOS (ACCORDION) ============ */
.accordion {
  max-width: 820px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.accordion-item {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
}
.accordion-trigger {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 20px 24px;
  font-weight: 700;
  font-size: 1.02rem;
  text-align: left;
}
.accordion-trigger:hover { color: var(--teal-dark); }
.accordion-arrow {
  flex: none;
  width: 12px; height: 12px;
  border-right: 2.5px solid var(--gold);
  border-bottom: 2.5px solid var(--gold);
  transform: rotate(45deg);
  transition: transform 0.25s ease;
  margin-top: -4px;
}
.accordion-trigger[aria-expanded="true"] .accordion-arrow {
  transform: rotate(-135deg);
  margin-top: 4px;
}
.accordion-panel {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.3s ease;
}
.accordion-panel-inner {
  padding: 0 24px 24px;
}
.accordion-tagline {
  color: var(--teal-dark);
  font-weight: 600;
  margin-bottom: 14px;
  font-size: 0.96rem;
}
.accordion-panel ul { display: flex; flex-direction: column; gap: 10px; }
.accordion-panel li {
  padding-left: 20px;
  position: relative;
  font-size: 0.95rem;
  color: #3d4d4b;
}
.accordion-panel li::before {
  content: "";
  position: absolute; left: 0; top: 9px;
  width: 6px; height: 6px;
  background: var(--teal);
  border-radius: 50%;
}

/* ============ CTA FINAL ============ */
.cta-final {
  background: radial-gradient(circle at 70% 20%, #16453d 0%, var(--dark-2) 45%, var(--dark-1) 100%);
  color: #fff;
  padding: 88px 0;
}
.cta-final-inner { display: flex; flex-direction: column; align-items: center; text-align: center; }
.cta-logo { width: 100px; height: 100px; object-fit: contain; margin-bottom: 20px; }
.cta-final h2 { color: #fff; }
.cta-final-text { color: #c3d7d3; max-width: 560px; margin-bottom: 30px; }

.contact-form {
  width: 100%;
  max-width: 640px;
  margin-top: 52px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: var(--radius);
  padding: 36px;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
  text-align: left;
}
.hidden-field { display: none; }
.form-row { display: flex; flex-direction: column; gap: 8px; grid-column: 1 / -1; }
.form-row-half { grid-column: span 1; }
@media (max-width: 560px) {
  .contact-form { grid-template-columns: 1fr; padding: 26px 20px; }
  .form-row-half { grid-column: 1 / -1; }
}
.form-row label { font-size: 0.88rem; font-weight: 600; color: #d7ece8; }
.form-row input, .form-row select, .form-row textarea {
  background: rgba(255, 255, 255, 0.92);
  border: 1px solid transparent;
  border-radius: 8px;
  padding: 12px 14px;
  font-size: 0.96rem;
  color: var(--text);
}
.form-row input:focus, .form-row select:focus, .form-row textarea:focus {
  outline: 2px solid var(--gold);
  outline-offset: 1px;
}
.contact-form .btn { grid-column: 1 / -1; justify-self: center; margin-top: 8px; }

/* ============ FOOTER ============ */
.site-footer { background: var(--white); border-top: 1px solid var(--border); }
.footer-bar { background: var(--teal); color: #fff; padding: 14px 0; }
.footer-bar p { text-align: center; font-size: 0.85rem; font-weight: 600; }
.footer-main {
  padding: 56px 24px 40px;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 14px;
}
.footer-main img { height: 64px; width: 64px; object-fit: contain; }
.footer-tagline { font-size: 1.1rem; font-weight: 700; color: var(--text); margin-bottom: 6px; }
.footer-contact { display: flex; flex-direction: column; gap: 6px; color: #4a5a58; font-size: 0.92rem; }
.footer-contact a:hover { color: var(--teal); }
.footer-copy { margin-top: 18px; font-size: 0.82rem; color: #8a9997; }

/* ============ WHATSAPP FLOAT ============ */
.whatsapp-float {
  position: fixed;
  bottom: 22px; right: 22px;
  width: 58px; height: 58px;
  background: #25D366;
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.25);
  z-index: 600;
  transition: transform 0.2s ease;
}
.whatsapp-float:hover { transform: scale(1.08); }
.whatsapp-float svg { width: 30px; height: 30px; color: #fff; }
