/* Custom Properties for Clean Light Theme (Corporate/Trustworthy) */
:root {
  --font-family: 'Plus Jakarta Sans', 'Inter', sans-serif;
  
  /* Color Scheme (Default Emerald Green & Slate Gray) */
  --primary-color: #059669;
  --primary-hover: #047857;
  --primary-light: #ecfdf5;
  --accent-color: #059669;
  
  --bg-body: #f8fafc;
  --bg-card: #ffffff;
  --bg-navbar: rgba(255, 255, 255, 0.8);
  
  --border-color: #e2e8f0;
  --border-focus: #10b981;
  
  /* Text colors */
  --text-primary: #0f172a;
  --text-secondary: #475569;
  --text-light: #64748b;
  
  /* Custom Shadows (Corporate & Soft) */
  --shadow-sm: 0 1px 3px 0 rgba(0, 0, 0, 0.05), 0 1px 2px -1px rgba(0, 0, 0, 0.05);
  --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.05), 0 2px 4px -2px rgba(0, 0, 0, 0.05);
  --shadow-lg: 0 10px 15px -3px rgba(15, 23, 42, 0.05), 0 4px 6px -4px rgba(15, 23, 42, 0.05);
  --shadow-xl: 0 20px 25px -5px rgba(15, 23, 42, 0.06), 0 8px 10px -6px rgba(15, 23, 42, 0.06);
  
  --max-width: 1140px;
  --border-radius: 12px;
  --transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Reset styles */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  scroll-behavior: smooth;
}

body {
  font-family: var(--font-family);
  background-color: var(--bg-body);
  color: var(--text-primary);
  line-height: 1.6;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* Utility Containers */
.container {
  width: 100%;
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 24px;
}

/* Base Headings & Text */
h1, h2, h3, h4 {
  font-family: 'Plus Jakarta Sans', sans-serif;
  color: var(--text-primary);
  font-weight: 700;
  letter-spacing: -0.02em;
}

.text-primary-color {
  color: var(--primary-color);
}

/* Cards (Slate Border & Clean White) */
.card-glass {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--border-radius);
  box-shadow: var(--shadow-sm);
  transition: var(--transition);
}

.card-glass:hover {
  box-shadow: var(--shadow-lg);
  border-color: #cbd5e1;
}

/* SVG Icon Wrapper */
.feature-icon-wrapper,
.service-icon-wrapper,
.contact-card-icon {
  width: 52px;
  height: 52px;
  border-radius: 10px;
  background-color: var(--primary-light);
  color: var(--primary-color);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 24px;
  transition: var(--transition);
}

.svg-icon,
.logo-svg,
.nav-phone-svg,
.inline-svg,
.btn-svg,
.faq-arrow-svg,
.svg-icon-contact {
  stroke: currentColor;
  stroke-width: 2.2;
}

/* Logo specific icon styles */
.logo-svg {
  color: var(--primary-color);
  fill: rgba(5, 150, 105, 0.1);
  stroke-width: 2.5;
}

/* Buttons (Flat, High-End Corporate) */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px 24px;
  font-family: 'Plus Jakarta Sans', sans-serif;
  font-size: 15px;
  font-weight: 600;
  border-radius: 8px;
  cursor: pointer;
  text-decoration: none;
  transition: var(--transition);
  border: none;
}

.btn-primary {
  background-color: var(--primary-color);
  color: #ffffff;
}

.btn-primary:hover {
  background-color: var(--primary-hover);
  transform: translateY(-1px);
}

.btn-secondary {
  background-color: var(--primary-light);
  color: var(--primary-color);
}

.btn-secondary:hover {
  background-color: #d1fae5;
  transform: translateY(-1px);
}

.btn-outline {
  background-color: #ffffff;
  color: var(--text-primary);
  border: 1px solid var(--border-color);
}

.btn-outline:hover {
  background-color: #f1f5f9;
  border-color: #cbd5e1;
  transform: translateY(-1px);
}

.btn-whatsapp {
  background-color: #25d366;
  color: #ffffff;
  box-shadow: 0 4px 12px rgba(37, 211, 102, 0.15);
}

.btn-whatsapp:hover {
  background-color: #20ba59;
  transform: translateY(-1px);
  box-shadow: 0 6px 16px rgba(37, 211, 102, 0.25);
}

.btn-block {
  width: 100%;
}

/* Navbar */
.navbar {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 72px;
  display: flex;
  align-items: center;
  z-index: 1000;
  background-color: var(--bg-navbar);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--border-color);
  transition: var(--transition);
}

.nav-container {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.logo {
  display: flex;
  align-items: center;
  gap: 8px;
  font-family: 'Plus Jakarta Sans', sans-serif;
  font-weight: 700;
  font-size: 20px;
}

.logo-text {
  color: var(--text-primary);
}

.nav-links {
  display: flex;
  gap: 28px;
}

.nav-links a {
  color: var(--text-secondary);
  text-decoration: none;
  font-size: 14px;
  font-weight: 500;
  transition: var(--transition);
}

.nav-links a:hover {
  color: var(--primary-color);
}

.nav-actions {
  display: flex;
  align-items: center;
  gap: 24px;
}

.btn-nav-phone {
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--text-primary);
  text-decoration: none;
  font-weight: 600;
  font-size: 15px;
  transition: var(--transition);
}

.btn-nav-phone:hover {
  color: var(--primary-color);
}

.menu-toggle {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  flex-direction: column;
  gap: 5px;
}

.menu-toggle .bar {
  width: 20px;
  height: 2px;
  background-color: var(--text-primary);
  transition: var(--transition);
}

/* Mobile Menu */
.mobile-menu {
  position: fixed;
  top: 72px;
  left: 0;
  width: 100%;
  background-color: #ffffff;
  padding: 24px;
  border-bottom: 1px solid var(--border-color);
  display: none;
  flex-direction: column;
  gap: 16px;
  z-index: 999;
  box-shadow: var(--shadow-lg);
}

.mobile-menu.open {
  display: flex;
}

.mobile-link {
  color: var(--text-secondary);
  text-decoration: none;
  font-size: 16px;
  font-weight: 600;
}

.mobile-phone {
  color: var(--text-primary);
  display: flex;
  align-items: center;
  gap: 8px;
}

/* Hero Section */
.hero {
  padding-top: 140px;
  padding-bottom: 80px;
  background: radial-gradient(40% 40% at 90% 30%, #f0fdf4 0%, transparent 100%), var(--bg-body);
}

.hero-container {
  display: grid;
  grid-template-columns: 1.15fr 0.85fr;
  gap: 60px;
  align-items: center;
}

.hero-badge {
  display: inline-flex;
  align-items: center;
  padding: 6px 12px;
  background-color: var(--primary-light);
  border: 1px solid rgba(16, 185, 129, 0.15);
  border-radius: 6px;
  font-size: 12px;
  font-weight: 600;
  color: var(--primary-color);
  margin-bottom: 20px;
}

.hero-title {
  font-size: 42px;
  font-weight: 800;
  line-height: 1.15;
  margin-bottom: 20px;
}

.hero-subtitle {
  font-size: 16px;
  color: var(--text-secondary);
  margin-bottom: 32px;
  max-width: 520px;
}

.hero-buttons {
  display: flex;
  gap: 16px;
}

/* Hero visual wallbox card styling */
.hero-visual {
  display: flex;
  justify-content: center;
  align-items: center;
}

.wallbox-schematic {
  width: 100%;
  max-width: 290px;
  background-color: #ffffff;
  border-radius: 16px;
  padding: 16px;
  box-shadow: var(--shadow-xl);
  border: 1px solid var(--border-color);
}

.wallbox-svg-drawing {
  display: block;
}

.led-glow {
  stroke-dasharray: 6 2;
  animation: strokeRotate 15s linear infinite;
  transform-origin: 160px 120px;
}

@keyframes strokeRotate {
  from { transform: rotate(0deg); }
  to { transform: rotate(360deg); }
}

/* Features Grid */
.features {
  padding: 60px 0;
  background-color: #ffffff;
  border-top: 1px solid var(--border-color);
  border-bottom: 1px solid var(--border-color);
}

.features-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 30px;
}

.feature-card {
  padding: 28px;
  background-color: var(--bg-body);
}

.feature-card:hover {
  transform: translateY(-2px);
  border-color: var(--primary-color);
  box-shadow: var(--shadow-md);
}

.feature-title {
  font-size: 18px;
  font-weight: 700;
  margin-bottom: 10px;
}

.feature-desc {
  color: var(--text-secondary);
  font-size: 14px;
}

/* Generic Section Header */
.section-header {
  text-align: center;
  max-width: 620px;
  margin: 0 auto 52px auto;
}

.section-title {
  font-size: 32px;
  font-weight: 800;
  margin-bottom: 12px;
}

.section-subtitle {
  color: var(--text-secondary);
  font-size: 15px;
}

/* Services Section */
.services {
  padding: 80px 0;
}

.services-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 30px;
}

.service-card {
  padding: 32px;
  display: flex;
  flex-direction: column;
}

.service-card:hover {
  transform: translateY(-2px);
  border-color: var(--primary-color);
  box-shadow: var(--shadow-lg);
}

.service-title {
  font-size: 19px;
  font-weight: 700;
  margin-bottom: 12px;
}

.service-desc {
  color: var(--text-secondary);
  font-size: 14px;
  margin-bottom: 24px;
  flex-grow: 1;
}

.service-footer {
  border-top: 1px solid var(--border-color);
  padding-top: 16px;
  margin-top: auto;
}

.service-price {
  font-family: 'Plus Jakarta Sans', sans-serif;
  font-size: 20px;
  font-weight: 700;
  color: var(--primary-color);
}

/* FAQs Section */
.faqs {
  padding: 80px 0;
  background-color: #ffffff;
  border-top: 1px solid var(--border-color);
}

.faq-list {
  max-width: 680px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.faq-item {
  border-radius: var(--border-radius);
  border: 1px solid var(--border-color);
  overflow: hidden;
  background-color: var(--bg-body);
}

.faq-question {
  width: 100%;
  padding: 20px 24px;
  background: transparent;
  border: none;
  color: var(--text-primary);
  font-family: 'Plus Jakarta Sans', sans-serif;
  font-size: 16px;
  font-weight: 600;
  text-align: left;
  display: flex;
  justify-content: space-between;
  align-items: center;
  cursor: pointer;
  gap: 20px;
}

.faq-question:hover {
  color: var(--primary-color);
}

.faq-arrow-svg {
  color: var(--text-light);
  transition: transform 0.2s ease, color 0.2s ease;
}

.faq-answer {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.35s cubic-bezier(0, 1, 0, 1);
  padding: 0 24px;
}

.faq-answer p {
  padding-bottom: 20px;
  color: var(--text-secondary);
  font-size: 14px;
}

.faq-item.active {
  border-color: var(--primary-color);
  background-color: #ffffff;
}

.faq-item.active .faq-answer {
  max-height: 800px;
  transition: max-height 0.8s ease-in-out;
}

.faq-item.active .faq-arrow-svg {
  transform: rotate(180deg);
  color: var(--primary-color);
}

/* Contact Section (Direct Cards Grid) */
.contact {
  padding: 80px 0;
  background: radial-gradient(40% 40% at 10% 80%, #f0fdf4 0%, transparent 100%), var(--bg-body);
  border-top: 1px solid var(--border-color);
}

.contact-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 30px;
  max-width: 800px;
  margin: 0 auto 32px auto;
}

.contact-card {
  padding: 40px 32px;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
}

.contact-card:hover {
  border-color: var(--primary-color);
  box-shadow: var(--shadow-xl);
}

.contact-card-icon {
  background-color: var(--primary-light);
  color: var(--primary-color);
}

.contact-card h3 {
  font-size: 19px;
  margin-bottom: 10px;
}

.contact-card-desc {
  font-size: 14px;
  color: var(--text-secondary);
  margin-bottom: 28px;
  max-width: 280px;
  flex-grow: 1;
}

.contact-footer-note {
  max-width: 580px;
  margin: 0 auto;
}

.rgpd-text {
  font-size: 11px;
  color: var(--text-light);
  line-height: 1.5;
}

.text-center {
  text-align: center;
}

/* Footer */
.footer {
  padding: 32px 0 100px 0; /* padding for mobile action bar */
  background-color: #ffffff;
  border-top: 1px solid var(--border-color);
  font-size: 13px;
  color: var(--text-light);
}

.footer-container {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 16px;
}

.footer-links {
  display: flex;
  gap: 20px;
}

.footer-links a {
  color: var(--text-light);
  text-decoration: none;
  transition: var(--transition);
}

.footer-links a:hover {
  color: var(--primary-color);
}

/* Footer Localities Interlinking */
.footer-localities {
  width: 100%;
  border-top: 1px solid var(--border-color);
  margin-top: 24px;
  padding-top: 20px;
  text-align: center;
}

.footer-localities-title {
  font-family: 'Plus Jakarta Sans', sans-serif;
  font-size: 14px;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 12px;
}

.footer-localities-links {
  font-size: 13px;
  color: var(--text-light);
  line-height: 1.8;
}

.locality-link {
  color: var(--text-secondary);
  text-decoration: none;
  transition: var(--transition);
  padding: 2px 6px;
  border-radius: 4px;
  display: inline-block;
}

.locality-link:hover {
  color: var(--primary-color);
  background-color: var(--primary-light);
}

.locality-link.active {
  color: var(--primary-color);
  font-weight: 600;
  background-color: var(--primary-light);
  pointer-events: none;
}

/* Floating Mobile Action Bar */
.mobile-floating-cta {
  position: fixed;
  bottom: 0;
  left: 0;
  width: 100%;
  padding: 12px 20px;
  background-color: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  border-top: 1px solid var(--border-color);
  z-index: 998;
  display: none; /* Shown dynamically on mobile screens */
  justify-content: center;
  gap: 12px;
  box-shadow: 0 -4px 12px rgba(0, 0, 0, 0.03);
}

.floating-btn {
  flex: 1;
  max-width: 160px;
  font-size: 13px;
  padding: 10px 14px;
}

/* Responsive Media Queries */
@media (max-width: 1024px) {
  .hero-container {
    grid-template-columns: 1fr;
    gap: 40px;
    text-align: center;
  }
  
  .hero-content {
    display: flex;
    flex-direction: column;
    align-items: center;
  }
  
  .hero-subtitle {
    margin: 0 auto 28px auto;
  }
  
  .hero-buttons {
    justify-content: center;
  }
  
  .features-grid,
  .services-grid {
    grid-template-columns: 1fr;
    gap: 20px;
  }
}

@media (max-width: 768px) {
  .nav-links,
  .nav-actions {
    display: none;
  }
  
  .menu-toggle {
    display: flex;
  }
  
  .hero-title {
    font-size: 32px;
  }
  
  .section-title {
    font-size: 26px;
  }
  
  .contact-grid {
    grid-template-columns: 1fr;
    gap: 20px;
    max-width: 420px;
  }
}

/* Cookie Consent Banner */
.cookie-banner {
  position: fixed;
  bottom: 24px;
  right: 24px;
  width: calc(100% - 48px);
  max-width: 400px;
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border: 1px solid var(--border-color);
  border-radius: var(--border-radius);
  padding: 24px;
  box-shadow: var(--shadow-xl);
  z-index: 1000;
  display: flex;
  flex-direction: column;
  gap: 16px;
  animation: cookieSlideIn 0.4s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

@keyframes cookieSlideIn {
  from {
    transform: translateY(30px);
    opacity: 0;
  }
  to {
    transform: translateY(0);
    opacity: 1;
  }
}

.cookie-title {
  font-size: 16px;
  font-weight: 700;
  color: var(--text-primary);
  display: flex;
  align-items: center;
  gap: 8px;
}

.cookie-text {
  font-size: 13.5px;
  line-height: 1.5;
  color: var(--text-secondary);
}

.cookie-text a {
  color: var(--primary-color);
  text-decoration: underline;
  font-weight: 500;
}

.cookie-buttons {
  display: flex;
  gap: 12px;
}

.cookie-btn {
  flex: 1;
  padding: 10px 16px;
  font-size: 13.5px;
  font-weight: 600;
  border-radius: 6px;
  cursor: pointer;
  border: none;
  transition: var(--transition);
  text-align: center;
}

.cookie-btn-accept {
  background-color: var(--primary-color);
  color: white;
}

.cookie-btn-accept:hover {
  background-color: var(--primary-hover);
}

.cookie-btn-reject {
  background-color: #f1f5f9;
  color: var(--text-secondary);
}

.cookie-btn-reject:hover {
  background-color: #e2e8f0;
}

/* Adjustments on mobile to prevent overlapping with floating CTA bar */
@media (max-width: 1024px) {
  .cookie-banner {
    bottom: 85px; /* Sits right above the mobile floating CTA bar */
    right: 16px;
    left: 16px;
    width: auto;
  }
}


/* ============================================
   Formulario de captación de leads (modo "form")
   Mobile-first: una columna, campos grandes (touch).
   ============================================ */
.lead-form {
  max-width: 600px;
  margin: 0 auto;
  padding: 1.5rem;
  display: flex;
  flex-direction: column;
  gap: 1rem;
  border-radius: 16px;
}
.lead-form-grid {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}
.lead-input {
  width: 100%;
  padding: 0.95rem 1rem;
  font-size: 16px; /* evita el zoom automático de iOS al enfocar */
  font-family: var(--font-family);
  color: var(--text-primary);
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: 12px;
  -webkit-appearance: none;
  appearance: none;
}
.lead-input::placeholder { color: var(--text-light, #94a3b8); }
.lead-input:focus {
  outline: none;
  border-color: var(--accent-color);
  box-shadow: 0 0 0 3px rgba(2, 132, 199, 0.15);
}
textarea.lead-input { resize: vertical; min-height: 96px; }
.lead-submit {
  margin-top: 0.25rem;
  width: 100%;
  padding: 1rem 1.25rem;
  font-size: 1.05rem;
  border: none;
  cursor: pointer;
}
.lead-submit:disabled { opacity: 0.6; cursor: default; }
.lead-honeypot { position: absolute; left: -9999px; width: 1px; height: 1px; opacity: 0; }
.lead-form-msg {
  margin: 0.25rem 0 0;
  text-align: center;
  font-size: 0.95rem;
  min-height: 1.2em;
}
.lead-form-msg.success { color: #059669; font-weight: 600; }
.lead-form-msg.error { color: #dc2626; font-weight: 600; }

/* En pantallas grandes, nombre y teléfono en dos columnas */
@media (min-width: 640px) {
  .lead-form { padding: 2rem; }
  .lead-form-grid { display: grid; grid-template-columns: 1fr 1fr; }
}

.lead-consent {
  margin: 0.25rem 0 0;
  font-size: 0.8rem;
  line-height: 1.5;
  color: var(--text-light, #94a3b8);
  text-align: center;
}
.lead-consent a { color: var(--text-secondary); text-decoration: underline; }
