/* ========================================
   PUERTAS ACORAZADAS BCN — Full Design System
   ======================================== */

/* === VARIABLES === */
:root {
  --c-primary: #C44A1A;
  --c-primary-dark: #A33D16;
  --c-primary-light: #FF6B35;
  --c-navy: #000000;
  --c-navy-light: #142240;
  --c-surface: #F8F9FB;
  --c-white: #FFFFFF;
  --c-text: #191C1E;
  --c-text-secondary: #4A5568;
  --c-text-light: #CBD5E0;
  --c-border: #E2E8F0;
  --c-blue: #005F9D;
  --c-green-wa: #25D366;
  --c-success: #38A169;
  --c-star: #F6AD55;
  --transition: 0.3s cubic-bezier(.4,0,.2,1);
  --radius: 8px;
  --radius-lg: 16px;
  --radius-xl: 24px;
  --shadow: 0 1px 3px rgba(0,0,0,.08), 0 4px 12px rgba(0,0,0,.04);
  --shadow-lg: 0 8px 30px rgba(0,0,0,.08);
  --shadow-xl: 0 20px 60px rgba(10,22,40,.15);
  --fs-sm: 0.875rem;
  --fs-base: 1rem;
  --fs-lg: 1.125rem;
  --fs-xl: 1.25rem;
  --fs-2xl: 1.5rem;
  --fs-3xl: 2rem;
  --fs-4xl: 2.5rem;
}

/* === RESET & BASE === */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; -webkit-font-smoothing: antialiased; }
body {
  font-family: 'Inter', system-ui, -apple-system, sans-serif;
  font-size: var(--fs-base);
  line-height: 1.6;
  color: var(--c-text);
  background: var(--c-white);
  overflow-x: hidden;
}
a { color: inherit; text-decoration: none; transition: var(--transition); }
img { max-width: 100%; height: auto; display: block; }
button { font-family: inherit; cursor: pointer; }
h1, h2, h3, h4 { line-height: 1.2; font-weight: 700; }
h1 { font-size: clamp(1.75rem, 4vw, var(--fs-4xl)); }
h2 { font-size: clamp(1.5rem, 3vw, var(--fs-3xl)); }
h3 { font-size: var(--fs-xl); }
p { color: var(--c-text-secondary); }

/* === LAYOUT === */
.container {
  max-width: 1600px;
  margin: 0 auto;
  padding: 0 24px;
}
.text-center { text-align: center; }

/* === HEADER === */
.header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  background: url('../img/bg-head.jpg') center/cover no-repeat;
  transition: var(--transition);
}
.header::before {
  content: '';
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, .50);
  z-index: 0;
}
.header > * { position: relative; z-index: 1; }
.header.scrolled {
  background-color: rgba(0, 0, 0, 0.95) !important;
  background-image: none !important;
  box-shadow: 0 4px 20px rgba(0,0,0,.25);
}
.header.scrolled::before { display: none; }

/* Brand row: logo left, contact center, CTA right */
.header-brand {
  padding: 24px 0;
}
.header-brand .container {
  display: flex;
  align-items: center;
  gap: 20px;
}
.logo img { height: 68px; width: auto; }
.header-contact {
  margin-left: auto;
  display: flex;
  align-items: center;
  gap: 20px;
}
.header-top-phone {
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--c-white);
  font-weight: 500;
  font-size: var(--fs-sm);
}
.header-top-phone:hover { color: var(--c-primary-light); }
.header-email {
  color: rgba(255,255,255,.5);
  font-size: 12px;
}

/* Header CTA */
.header-cta { white-space: nowrap; margin-left: 8px; }

/* Nav row: full width below brand */
.header-nav {
  background: rgba(255,255,255,.08);
  border-top: 1px solid rgba(255,255,255,.1);
}
.header-nav .container {
  display: flex;
  align-items: center;
}

/* === NAV === */
.nav {
  display: flex;
  align-items: center;
  gap: 4px;
  width: 100%;
}
.nav > a, .nav-dropdown > span {
  color: rgba(255,255,255,.85);
  padding: 12px 18px;
  border-radius: 0;
  font-size: var(--fs-sm);
  font-weight: 500;
  transition: var(--transition);
  cursor: pointer;
}
.nav > a:hover, .nav > a.active, .nav-dropdown:hover > span {
  color: var(--c-white);
  background: rgba(255,255,255,.1);
}
.nav-dropdown { position: relative; }
.nav-dropdown-menu {
  position: absolute;
  top: 100%;
  left: 0;
  min-width: 280px;
  background: var(--c-white);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-xl);
  padding: 8px;
  opacity: 0;
  visibility: hidden;
  transform: translateY(8px);
  transition: var(--transition);
  z-index: 100;
}
.nav-dropdown:hover .nav-dropdown-menu {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}
.nav-dropdown-menu a {
  display: block;
  padding: 10px 14px;
  border-radius: var(--radius);
  color: var(--c-text);
  font-size: var(--fs-sm);
  font-weight: 500;
}
.nav-dropdown-menu a small {
  display: block;
  font-size: 12px;
  color: var(--c-text-secondary);
  font-weight: 400;
  margin-top: 2px;
}
.nav-dropdown-menu a:hover { background: var(--c-surface); }

/* Lang switch */
.lang-switch {
  display: flex;
  gap: 4px;
  margin-left: 8px;
}
.lang-switch a {
  color: rgba(255,255,255,.5);
  font-size: 12px;
  font-weight: 600;
  padding: 4px 8px;
  border-radius: var(--radius);
}
.lang-switch a.active { color: var(--c-white); background: rgba(255,255,255,.1); }
.lang-switch a:hover { color: var(--c-white); }

/* === BUTTONS === */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 14px 28px;
  border-radius: var(--radius);
  font-weight: 600;
  font-size: var(--fs-base);
  border: 2px solid transparent;
  transition: var(--transition);
  cursor: pointer;
  text-align: center;
}
.btn-primary {
  background: var(--c-primary);
  color: var(--c-white);
}
.btn-primary:hover {
  background: var(--c-primary-dark);
  transform: translateY(-2px);
  box-shadow: 0 8px 25px rgba(217,83,30,.3);
}
.btn-outline {
  background: transparent;
  color: var(--c-text-secondary);
  border-color: var(--c-border);
}
.btn-outline:hover { border-color: var(--c-text-secondary); }
.btn-sm { padding: 10px 20px; font-size: var(--fs-sm); }

/* === HERO === */
.hero {
  background: var(--c-navy);
  padding: 200px 0 80px;
  color: var(--c-white);
}
#presupuesto {
  background: url('../img/baner-home.jpg') center/cover no-repeat;
  position: relative;
}
#presupuesto::before {
  content: '';
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.25);
  z-index: 0;
}
#presupuesto > .container {
  position: relative;
  z-index: 1;
}
#presupuesto .container {
  grid-template-columns: 1fr 560px;
  gap: 32px;
  max-width: 1240px;
}
#presupuesto .hero-form {
  padding: 20px 0 0 0;
  overflow: hidden;
}
#presupuesto .hero-form .form-title {
  padding: 0 24px;
  margin-bottom: 4px;
  text-align: center;
}
#presupuesto .hero-form > p {
  padding: 0 24px;
  margin-bottom: 8px;
  text-align: center;
}
#presupuesto .hero-form iframe {
  width: 700px !important;
  max-width: none !important;
  margin-left: -70px;
}
.hero .container {
  display: grid;
  grid-template-columns: 1fr 440px;
  gap: 60px;
  align-items: center;
}
.hero h1 { color: var(--c-white); margin-bottom: 16px; }
.hero-badge {
  display: inline-block;
  background: rgba(255,255,255,.1);
  color: var(--c-primary-light);
  padding: 6px 16px;
  border-radius: 100px;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: .08em;
  text-transform: uppercase;
  margin-bottom: 20px;
}
.hero-text {
  color: rgba(255,255,255,.85);
  font-size: var(--fs-lg);
  margin-bottom: 32px;
}
.trust-bar { display: flex; gap: 24px; flex-wrap: wrap; }
.trust-item {
  display: flex;
  align-items: center;
  gap: 10px;
}
.trust-icon {
  font-size: 28px;
  color: var(--c-primary-light);
}
.trust-item strong { color: var(--c-white); font-size: var(--fs-sm); display: block; }
.trust-item small { color: rgba(255,255,255,.5); font-size: 12px; }

/* Trust bar on light backgrounds (empresa, características) */
.trust-bar-light {
  background: var(--c-navy);
  padding: 20px 0;
  justify-content: center;
}
.trust-bar-light .trust-icon { color: var(--c-primary-light); }
.trust-bar-light .trust-item strong { color: var(--c-white); }
.trust-bar-light .trust-item small { color: rgba(255,255,255,.6); }

/* Hero form */
.hero-form {
  background: var(--c-white);
  border-radius: var(--radius-xl);
  padding: 32px;
  box-shadow: var(--shadow-xl);
}
.hero-form h3, .hero-form .form-title { color: var(--c-text); margin-bottom: 4px; }
.hero-form p { color: var(--c-text-secondary); font-size: var(--fs-sm); margin-bottom: 16px; }
.form-title {
  font-size: var(--fs-xl);
  font-weight: 700;
  line-height: 1.2;
  color: var(--c-text);
  margin-bottom: 4px;
}

/* === FORM LIGHTBOX === */
.form-lightbox {
  position: fixed; inset: 0; z-index: 9999;
  display: flex; align-items: center; justify-content: center;
  opacity: 0; visibility: hidden; pointer-events: none;
  transition: opacity .35s ease, visibility .35s ease;
}
.form-lightbox:not(.open) * { pointer-events: none !important; }
.form-lightbox.open { opacity: 1; visibility: visible; pointer-events: auto; }
.form-lightbox-overlay {
  position: absolute; inset: 0;
  background: rgba(10, 22, 40, .65);
  backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px);
}
.form-lightbox-body {
  position: relative; z-index: 1;
  width: 94%; max-width: 730px;
  background: var(--c-white);
  border-radius: var(--radius-xl);
  box-shadow: 0 24px 80px rgba(10,22,40,.25), 0 0 0 1px rgba(255,255,255,.1);
  padding: 36px 32px 28px;
  transform: translateY(24px) scale(.96);
  transition: transform .35s cubic-bezier(.4,0,.2,1);
  max-height: 90vh; overflow-y: auto;
}
.form-lightbox.open .form-lightbox-body { transform: translateY(0) scale(1); }
.form-lightbox-close {
  position: absolute; top: 12px; right: 12px;
  width: 40px; height: 40px; border-radius: 50%;
  background: var(--c-surface); border: 1px solid var(--c-border);
  display: flex; align-items: center; justify-content: center;
  cursor: pointer; transition: var(--transition); z-index: 2;
}
.form-lightbox-close:hover { background: var(--c-border); }
.form-lightbox-close svg { width: 18px; height: 18px; stroke: var(--c-text); }
.form-lightbox-header { text-align: center; margin-bottom: 6px; }
.form-lightbox-header h3,
.form-lightbox-header .form-title {
  font-size: var(--fs-xl); color: var(--c-navy); margin-bottom: 4px;
}
.form-lightbox-header p {
  font-size: var(--fs-sm); color: var(--c-text-secondary); margin-bottom: 0;
}
.form-lightbox-badge {
  display: inline-flex; align-items: center; gap: 6px;
  background: linear-gradient(135deg, rgba(217,83,30,.08), rgba(217,83,30,.04));
  color: var(--c-primary); font-size: 12px; font-weight: 600;
  padding: 6px 14px; border-radius: 20px; margin-bottom: 14px;
  letter-spacing: .02em; text-transform: uppercase;
}
.form-lightbox-badge svg { width: 14px; height: 14px; }
.form-lightbox iframe { border-radius: var(--radius); }
@media (max-width: 600px) {
  .form-lightbox-body { width: 100%; max-width: 100%; border-radius: var(--radius-lg) var(--radius-lg) 0 0; padding: 28px 20px 20px; margin-top: auto; max-height: 92vh; }
  .form-lightbox { align-items: flex-end; }
}

/* === SECTIONS === */
.section { padding: 80px 0; }
.bg-surface { background: var(--c-surface); }
.section-header { margin-bottom: 48px; }
.section-header h2 { margin-bottom: 12px; color: var(--c-text); }
.section-subtitle {
  color: var(--c-text-secondary);
  font-size: var(--fs-lg);
  max-width: 680px;
}

/* === CARDS === */
.cards-grid {
  display: grid;
  gap: 24px;
}
.cards-grid-4 { grid-template-columns: repeat(4, 1fr); }
.cards-grid-2 { grid-template-columns: repeat(2, 1fr); }
.card {
  background: var(--c-white);
  border-radius: var(--radius-lg);
  padding: 32px;
  box-shadow: var(--shadow);
  transition: var(--transition);
  position: relative;
}
.card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-lg);
}
.card-icon {
  width: 52px;
  height: 52px;
  background: rgba(217,83,30,.08);
  border-radius: var(--radius);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 16px;
}
.card-icon .material-symbols-outlined {
  font-size: 28px;
  color: var(--c-primary);
}
.card h3 { margin-bottom: 8px; }
.card p { font-size: var(--fs-sm); }

/* Product cards */
.product-card { padding-top: 40px; display: flex; flex-direction: column; }
.product-tagline {
  color: var(--c-text-secondary);
  font-size: var(--fs-sm);
  margin-bottom: 20px;
  flex-grow: 1;
}
.badge {
  position: absolute;
  top: 16px;
  right: 16px;
  background: var(--c-primary);
  color: var(--c-white);
  font-size: 11px;
  font-weight: 700;
  padding: 4px 12px;
  border-radius: 100px;
  text-transform: uppercase;
  letter-spacing: .05em;
}
.badge-premium { background: linear-gradient(135deg, #B8860B, #DAA520); }

/* === FEATURES LIST === */
.features-list {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 12px;
  margin-bottom: 40px;
}
.feature-item {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 12px 16px;
  border-radius: var(--radius);
  background: var(--c-white);
}
.feature-item svg {
  width: 22px;
  height: 22px;
  flex-shrink: 0;
  color: var(--c-success);
  margin-top: 2px;
}
.feature-item span { font-size: var(--fs-sm); color: var(--c-text); }

/* Cert badge */
.cert-badge {
  display: flex;
  align-items: flex-start;
  gap: 16px;
  background: var(--c-white);
  border: 2px solid var(--c-border);
  border-radius: var(--radius-lg);
  padding: 24px;
  margin-bottom: 32px;
}
.cert-badge svg {
  width: 40px;
  height: 40px;
  flex-shrink: 0;
  color: var(--c-blue);
}
.cert-badge p { font-size: var(--fs-sm); color: var(--c-text); }

/* Trust badges */
.trust-badges {
  display: flex;
  gap: 24px;
  align-items: center;
  justify-content: center;
}
.trust-badge-item img { height: 120px; width: auto; }

/* === ZONES === */
.zones-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}
.zone-tag {
  background: var(--c-surface);
  border: 1px solid var(--c-border);
  padding: 8px 18px;
  border-radius: 100px;
  font-size: var(--fs-sm);
  font-weight: 500;
  color: var(--c-text);
  transition: var(--transition);
}
.zone-tag:hover { border-color: var(--c-primary); color: var(--c-primary); }

/* === REVIEWS === */
.reviews-section { background: var(--c-navy); color: var(--c-white); }
.reviews-section h2 { color: var(--c-white); }
.reviews-intro { color: rgba(255,255,255,.7); font-size: var(--fs-lg); max-width: 600px; margin: 0 auto; }
.lc_reviews_widget { min-height: 300px; border: none; }

/* === STEPS === */
.steps {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 32px;
  counter-reset: step;
}
.step {
  position: relative;
  padding: 32px;
  background: var(--c-surface);
  border-radius: var(--radius-lg);
  counter-increment: step;
}
.step::before {
  content: counter(step);
  display: flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  background: var(--c-primary);
  color: var(--c-white);
  border-radius: 50%;
  font-weight: 700;
  font-size: var(--fs-lg);
  margin-bottom: 16px;
}
.step h3 { margin-bottom: 8px; }

/* === FAQ === */
.faq-list {
  max-width: 800px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.faq-item {
  background: var(--c-white);
  border-radius: var(--radius);
  overflow: hidden;
  border: 1px solid var(--c-border);
}
.faq-question {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 18px 24px;
  background: none;
  border: none;
  font-size: var(--fs-base);
  font-weight: 600;
  color: var(--c-text);
  text-align: left;
  cursor: pointer;
  transition: var(--transition);
}
.faq-question:hover { color: var(--c-primary); }
.faq-question svg {
  width: 20px;
  height: 20px;
  flex-shrink: 0;
  transition: var(--transition);
}
.faq-item.open .faq-question svg { transform: rotate(180deg); }
.faq-answer {
  max-height: 0;
  overflow: hidden;
  transition: max-height .4s ease;
}
.faq-answer-inner {
  padding: 0 24px 18px;
  color: var(--c-text-secondary);
  font-size: var(--fs-sm);
  line-height: 1.7;
}

/* === CTA SECTION === */
.cta-section {
  background: var(--c-navy);
  color: var(--c-white);
  text-align: center;
}
.cta-section h2 { color: var(--c-white); }
.cta-section .section-subtitle { color: rgba(255,255,255,.85); margin: 0 auto; }
.cta-section p { color: rgba(255,255,255,.85); }
.cta-section a[href^="tel:"] { color: var(--c-primary-light) !important; }
.cta-form {
  max-width: 600px;
  margin: 32px auto 0;
  background: var(--c-white);
  border-radius: var(--radius-xl);
  padding: 32px;
  box-shadow: var(--shadow-xl);
}
#contacto .cta-form {
  max-width: 560px;
  padding: 20px 0 0 0;
  overflow: hidden;
}
#contacto .cta-form .form-title {
  padding: 0 24px;
  margin-bottom: 4px;
  text-align: center;
  color: var(--c-navy);
  font-size: 1.25rem;
}
#contacto .cta-form > p {
  padding: 0 24px;
  margin-bottom: 8px;
  text-align: center;
  color: var(--c-navy-light);
  font-size: 0.95rem;
}
#contacto .cta-form iframe {
  width: 700px !important;
  max-width: none !important;
  margin-left: -70px;
}

/* === FOOTER === */
.footer {
  background: url('../img/bg-head.jpg') center/cover no-repeat;
  color: rgba(255,255,255,.8);
  padding: 60px 0 0;
  position: relative;
}
.footer::before {
  content: '';
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, .75);
  z-index: 0;
}
.footer > * { position: relative; z-index: 1; }
.footer-grid {
  display: grid;
  grid-template-columns: 1.5fr 1fr 1fr 1fr;
  gap: 40px;
  padding-bottom: 40px;
  border-bottom: 1px solid rgba(255,255,255,.1);
}
.footer-brand p { font-size: var(--fs-sm); color: rgba(255,255,255,.6); line-height: 1.7; }
.footer-social { display: flex; gap: 12px; margin-top: 16px; }
.footer-social a {
  width: 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  background: rgba(255,255,255,.08);
  color: rgba(255,255,255,.6);
  transition: var(--transition);
}
.footer-social a:hover { background: var(--c-primary); color: var(--c-white); }
.footer-social svg { width: 16px; height: 16px; }
.footer h4, .footer .footer-heading {
  color: var(--c-white);
  font-size: var(--fs-sm);
  text-transform: uppercase;
  letter-spacing: .08em;
  margin-bottom: 16px;
}
.footer-links {
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.footer-links a {
  font-size: var(--fs-sm);
  color: rgba(255,255,255,.6);
}
.footer-links a:hover { color: var(--c-white); }
.footer-sisters { display: flex; flex-direction: column; gap: 8px; }
.footer-sisters a {
  font-size: var(--fs-sm);
  color: var(--c-primary-light);
}
.footer-sisters a:hover { color: var(--c-white); }
.footer-contact-item {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: var(--fs-sm);
  margin-bottom: 8px;
}
.footer-contact-item svg { flex-shrink: 0; color: rgba(255,255,255,.4); }
.footer-contact-item a { color: rgba(255,255,255,.6); }
.footer-contact-item a:hover { color: var(--c-white); }
.footer-badges {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 24px;
  padding: 32px 0;
}
.footer-badges img { height: 60px; width: auto; }
.footer-bottom {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 6px 24px;
  padding: 20px 0;
  border-top: 1px solid rgba(255,255,255,.1);
  font-size: 12px;
  color: rgba(255,255,255,.4);
  text-align: center;
}
.footer-gremi span { font-size: 12px; }
.footer-gremi { width: 100%; margin-bottom: 4px; }
.footer-legal { display: flex; gap: 6px; flex-wrap: wrap; align-items: center; }
.footer-legal a { color: rgba(255,255,255,.5); font-size: 12px; transition: var(--transition); }
.footer-legal a:hover { color: var(--c-white); }
.footer-legal a + a::before { content: "·"; margin-right: 6px; color: rgba(255,255,255,.3); pointer-events: none; }

/* === MOBILE MENU === */
.menu-toggle {
  display: none;
  width: 44px;
  height: 44px;
  align-items: center;
  justify-content: center;
  color: var(--c-white);
  border-radius: var(--radius);
  background: none;
  border: none;
}
.menu-toggle svg { width: 24px; height: 24px; }

/* === WHATSAPP === */
.wa-float { position: fixed; bottom: 24px; right: 24px; z-index: 900; }
.wa-btn {
  width: 60px; height: 60px; border-radius: 50%;
  background: var(--c-green-wa); color: var(--c-white);
  display: flex; align-items: center; justify-content: center;
  box-shadow: 0 4px 15px rgba(37,211,102,.4);
  transition: var(--transition); animation: waFloat 3s ease-in-out infinite;
  border: none;
}
.wa-btn:hover { transform: scale(1.1); box-shadow: 0 6px 20px rgba(37,211,102,.5); }
.wa-btn svg { width: 32px; height: 32px; }
.wa-popup {
  position: absolute; bottom: 72px; right: 0; width: 320px;
  background: var(--c-white); border-radius: var(--radius-lg);
  box-shadow: var(--shadow-xl); overflow: hidden;
  opacity: 0; visibility: hidden; transform: translateY(10px) scale(.95);
  transition: var(--transition);
}
.wa-popup.open { opacity: 1; visibility: visible; transform: translateY(0) scale(1); }
.wa-popup-header {
  background: #075E54; color: var(--c-white); padding: 16px 20px;
  display: flex; align-items: center; gap: 12px;
}
.wa-popup-avatar {
  width: 40px; height: 40px; border-radius: 50%;
  background: rgba(255,255,255,.2); display: flex;
  align-items: center; justify-content: center; font-weight: 700; font-size: 1.125rem;
}
.wa-popup-info h5, .wa-popup-info .wa-popup-name { font-size: 14px; font-weight: 600; margin: 0; display: block; }
.wa-popup-info span { font-size: 11px; opacity: .8; }
.wa-popup-close {
  margin-left: auto; opacity: .7; cursor: pointer;
  background: none; border: none; color: white;
}
.wa-popup-close:hover { opacity: 1; }
.wa-popup-body {
  padding: 20px; background: #E5DDD5; min-height: 80px;
  display: flex; align-items: flex-start;
}
.wa-popup-msg {
  background: var(--c-white); padding: 10px 14px;
  border-radius: 0 8px 8px 8px; font-size: 14px;
  box-shadow: 0 1px 2px rgba(0,0,0,.1); position: relative; color: var(--c-text);
}
.wa-popup-msg::before {
  content: ''; position: absolute; top: 0; left: -8px;
  border: 8px solid transparent;
  border-top-color: var(--c-white); border-right-color: var(--c-white);
}
.wa-popup-footer { padding: 16px 20px; }
.wa-popup-footer a {
  display: flex; align-items: center; justify-content: center; gap: 8px;
  background: var(--c-green-wa); color: var(--c-white); padding: 12px;
  border-radius: var(--radius); font-weight: 600; font-size: 14px;
  transition: var(--transition);
}
.wa-popup-footer a:hover { background: #1fba59; }
.wa-popup-footer a svg { width: 20px; height: 20px; }

/* Chat widget overrides */
#lc_chat_layout { left: 24px !important; right: auto !important; }
#lc_chat_layout .lc_chat_widget_launcher { left: 24px !important; right: auto !important; }

/* === ANIMATIONS === */
.animate-on-scroll {
  opacity: 0; transform: translateY(20px);
  transition: opacity .6s ease, transform .6s ease;
}
.animate-on-scroll.visible { opacity: 1; transform: translateY(0); }
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }
@keyframes waFloat { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-6px); } }

/* === RESPONSIVE === */
@media (max-width: 1023px) {
  .menu-toggle { display: flex; }
  .header-nav { display: none; }
  .header-contact { display: none; }
  /* When menu is open, nav escapes its hidden parent via fixed positioning */
  body.menu-open .header-nav { display: block; }
  .nav.open {
    display: flex !important; flex-direction: column;
    position: fixed; top: 0; left: 0; right: 0; bottom: 0;
    background: var(--c-navy); z-index: 2147483647;
    padding: 80px 24px 24px; gap: 8px;
    animation: fadeIn .3s; overflow-y: auto;
  }
  /* Direct nav links in mobile menu */
  .nav.open > a {
    display: block; color: rgba(255,255,255,.9);
    padding: 12px 16px; font-size: var(--fs-lg); font-weight: 500;
    border-radius: var(--radius);
  }
  .nav.open > a:hover, .nav.open > a:active { background: rgba(255,255,255,.08); }
  /* Dropdown container in mobile */
  .nav.open .nav-dropdown { position: static; }
  .nav.open .nav-dropdown > span {
    display: block; color: rgba(255,255,255,.9);
    padding: 12px 16px; font-size: var(--fs-lg); font-weight: 500;
  }
  /* Force dropdown menu open and static in mobile */
  .nav.open .nav-dropdown-menu,
  .nav.open .nav-dropdown:hover .nav-dropdown-menu {
    position: static !important; opacity: 1 !important;
    visibility: visible !important; transform: none !important;
    box-shadow: none; background: rgba(255,255,255,.05);
    min-width: auto; display: block !important;
    margin: 0; padding: 4px 0 4px 12px;
  }
  .nav.open .nav-dropdown-menu a {
    color: rgba(255,255,255,.75); display: block; padding: 8px 12px;
    font-size: var(--fs-sm);
  }
  .nav.open .nav-dropdown-menu a:hover { background: rgba(255,255,255,.05); }
  .menu-close {
    position: fixed; top: 20px; right: 20px; z-index: 2147483647;
    color: var(--c-white); width: 44px; height: 44px;
    display: flex; align-items: center; justify-content: center;
    background: none; border: none;
  }
  .menu-close svg { width: 24px; height: 24px; }
  .hero .container { grid-template-columns: 1fr; gap: 40px; }
  .hero { padding: 140px 0 60px; }
  #presupuesto .container { grid-template-columns: 1fr; }
  #presupuesto .hero-form iframe { width: 100% !important; max-width: 100% !important; margin-left: 0; }
  #contacto .cta-form { max-width: 100%; margin: 24px 0 0; padding: 20px 0 0 0; }
  #contacto .cta-form iframe { width: 100% !important; max-width: 100% !important; margin-left: 0; }
  .cards-grid-4 { grid-template-columns: repeat(2, 1fr); }
  .cards-grid-2 { grid-template-columns: 1fr; }
  .features-list { grid-template-columns: 1fr; }
  .steps { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: repeat(2, 1fr); }
  .footer-bottom { flex-direction: column; gap: 8px; text-align: center; }
  .header-cta { display: none; }
}
@media (max-width: 640px) {
  .cards-grid-4 { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr; }
  .trust-bar { flex-direction: column; }
  .trust-badges { flex-direction: column; }
  .section { padding: 60px 0; }
}

/* === MENU OPEN: hide floating widgets === */
body.menu-open .wa-float,
body.menu-open chat-widget,
body.menu-open iframe[src*="leadconnectorhq"],
body.menu-open iframe[src*="chat-widget"],
body.menu-open [class*="lc-chat"],
body.menu-open [id*="chat-widget"],
body.menu-open [class*="chat-widget"] {
  display: none !important;
  visibility: hidden !important;
  opacity: 0 !important;
  pointer-events: none !important;
  z-index: -1 !important;
}
