/* ============================================================
   AS Servicios - Landing pública
   ============================================================ */

* { box-sizing: border-box; margin: 0; padding: 0; }

body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  background: #fff;
  color: #1e293b;
  line-height: 1.55;
  font-size: 16px;
}

img { max-width: 100%; display: block; }
a { color: #2563eb; text-decoration: none; }
a:hover { text-decoration: underline; }

.container {
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 20px;
}

/* === Header === */
.header {
  background: #fff;
  border-bottom: 1px solid #e2e8f0;
  position: sticky;
  top: 0;
  z-index: 50;
}
.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 20px;
  gap: 20px;
  position: relative;
}
.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  color: #0f172a;
  font-weight: 700;
  font-size: 18px;
  text-decoration: none;
}
.brand:hover { text-decoration: none; }

/* Ícono cuadrado del logo (versión actual) */
.brand-icon-img {
  height: 38px;
  width: auto;
  display: block;
  object-fit: contain;
  flex-shrink: 0;
}
.brand-text {
  font-weight: 700;
  font-size: 18px;
  letter-spacing: -0.2px;
  color: inherit;
}

/* Compatibilidad con imagen full (legacy) */
.brand-img {
  height: 44px;
  width: auto;
  display: block;
  object-fit: contain;
}

.brand-icon {
  width: 36px;
  height: 36px;
  background: linear-gradient(135deg, #1e40af, #3b82f6);
  color: #fff;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 14px;
  letter-spacing: 0.5px;
}
.nav {
  display: flex;
  gap: 24px;
}
.nav a {
  color: #475569;
  font-size: 14px;
  font-weight: 500;
}
.nav a:hover { color: #1e40af; text-decoration: none; }

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 10px 18px;
  border-radius: 6px;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  text-decoration: none;
  border: 0;
  transition: all 0.15s;
  font-family: inherit;
}
.btn:hover { text-decoration: none; }
.btn-primary {
  background: #1e40af;
  color: #fff;
}
.btn-primary:hover { background: #1e3a8a; }
.btn-light {
  background: #fff;
  color: #1e40af;
}
.btn-light:hover { background: #f1f5f9; }
.btn-wsp {
  background: #25d366;
  color: #fff;
}
.btn-wsp:hover { background: #1ebe57; }
.btn-lg {
  padding: 14px 26px;
  font-size: 16px;
}
.btn-cta-header { padding: 9px 16px; font-size: 13px; }

/* === Hero === */
.hero {
  background: linear-gradient(135deg, #0f172a 0%, #1e3a8a 100%);
  color: #fff;
  padding: 70px 0 60px;
  position: relative;
  overflow: hidden;
}
.hero::before {
  content: '';
  position: absolute;
  top: -50%;
  right: -20%;
  width: 600px;
  height: 600px;
  background: radial-gradient(circle, rgba(59,130,246,0.25) 0%, transparent 70%);
  pointer-events: none;
}
.hero h1 {
  font-size: 42px;
  line-height: 1.15;
  font-weight: 700;
  margin-bottom: 18px;
  position: relative;
}

/* Logo del hero - blanco/transparente sobre fondo azul oscuro */
.hero-logo {
  display: block;
  width: 110px;
  height: auto;
  object-fit: contain;
  margin: 0 0 22px 0;
  position: relative;
  filter: drop-shadow(0 4px 16px rgba(96, 165, 250, 0.3));
}
.hero .hl { color: #60a5fa; }
.hero .lead {
  font-size: 18px;
  color: #cbd5e1;
  max-width: 640px;
  margin-bottom: 32px;
  position: relative;
}
.hero-cta {
  display: flex;
  gap: 12px;
  margin-bottom: 50px;
  flex-wrap: wrap;
  position: relative;
}
.hero-features {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 18px;
  position: relative;
}
.feature {
  border-left: 3px solid #60a5fa;
  padding: 4px 14px;
}
.feature strong {
  display: block;
  font-size: 18px;
  color: #fff;
  font-weight: 600;
}
.feature span {
  font-size: 13px;
  color: #94a3b8;
}

/* === Sections === */
.section { padding: 70px 0; }
.section-alt { background: #f8fafc; }
.section-head {
  text-align: center;
  margin-bottom: 40px;
}
.section-head h2 {
  font-size: 30px;
  color: #0f172a;
  font-weight: 700;
  margin-bottom: 10px;
}
.section-head p {
  color: #64748b;
  font-size: 16px;
}

.grid-2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 40px;
  align-items: start;
}
.grid-3 {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 22px;
}

/* === Cards de servicios === */
.card-srv {
  background: #fff;
  border: 1px solid #e2e8f0;
  border-radius: 10px;
  padding: 24px;
  transition: all 0.15s;
}
.card-srv:hover {
  border-color: #3b82f6;
  transform: translateY(-3px);
  box-shadow: 0 4px 14px rgba(0,0,0,0.05);
}
.card-srv-icon {
  font-size: 32px;
  margin-bottom: 12px;
}
.card-srv h3 {
  font-size: 17px;
  color: #0f172a;
  margin-bottom: 6px;
  font-weight: 600;
}
.card-srv p {
  color: #475569;
  font-size: 14px;
}

/* === Que es === */
.section-alt p {
  color: #334155;
  margin-bottom: 14px;
}
.ventajas {
  background: #fff;
  border: 1px solid #e2e8f0;
  border-radius: 10px;
  padding: 22px;
}
.ventajas h4 {
  font-size: 15px;
  color: #1e40af;
  margin-bottom: 12px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}
.ventajas ul {
  list-style: none;
}
.ventajas li {
  padding: 8px 0 8px 26px;
  border-bottom: 1px solid #f1f5f9;
  font-size: 14px;
  color: #334155;
  position: relative;
}
.ventajas li::before {
  content: '✓';
  position: absolute;
  left: 0;
  top: 8px;
  color: #16a34a;
  font-weight: 700;
}
.ventajas li:last-child { border-bottom: 0; }

/* === Cobertura === */
.card-cobertura {
  background: #fff;
  border: 1px solid #e2e8f0;
  border-radius: 10px;
  padding: 30px;
}
.cobertura-prov {
  margin-bottom: 20px;
}
.cobertura-prov:last-of-type { margin-bottom: 10px; }
.cobertura-prov h4 {
  font-size: 14px;
  color: #1e40af;
  text-transform: uppercase;
  letter-spacing: 0.6px;
  font-weight: 600;
  margin-bottom: 12px;
  text-align: left;
}
.cobertura-grid-prov {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 10px;
}
.cobertura-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 14px;
  margin-bottom: 20px;
}
.zona-item {
  background: #f1f5f9;
  padding: 10px;
  border-radius: 6px;
  font-size: 14px;
  color: #334155;
  text-align: center;
}
.zona-item strong { color: #1e40af; font-weight: 600; }
.cobertura-extra {
  color: #64748b;
  font-size: 14px;
  margin-top: 14px;
  text-align: center;
  border-top: 1px dashed #e2e8f0;
  padding-top: 14px;
}

/* === CTA banner === */
.cta-banner {
  background: linear-gradient(135deg, #1e40af, #3b82f6);
  color: #fff;
  padding: 60px 0;
  text-align: center;
}
.cta-banner h2 {
  font-size: 28px;
  margin-bottom: 8px;
}
.cta-banner p {
  margin-bottom: 24px;
  opacity: 0.9;
  font-size: 16px;
}

/* === Cards de contacto === */
.card-contacto {
  background: #fff;
  border: 1px solid #e2e8f0;
  border-radius: 10px;
  padding: 20px;
  display: flex;
  align-items: center;
  gap: 14px;
  text-decoration: none;
  color: inherit;
  transition: all 0.15s;
}
.card-contacto:hover {
  border-color: #3b82f6;
  text-decoration: none;
  transform: translateY(-2px);
  box-shadow: 0 4px 14px rgba(0,0,0,0.05);
}
.card-contacto-icon {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.card-contacto strong {
  display: block;
  font-size: 15px;
  color: #0f172a;
  font-weight: 600;
}
.card-contacto span {
  font-size: 13px;
  color: #64748b;
}

/* === Footer === */
.footer {
  background: #0f172a;
  color: #cbd5e1;
  padding: 40px 0 20px;
}
.footer-grid {
  display: grid;
  grid-template-columns: 1.5fr 1fr 1fr 1fr;
  gap: 30px;
  margin-bottom: 30px;
}
.brand-footer {
  color: #fff !important;
  margin-bottom: 8px;
  display: inline-flex !important;
}
.brand-footer .brand-icon-img { height: 32px; }
.brand-footer .brand-text { color: #fff; font-size: 16px; }
.brand-footer .brand-img { height: 36px; filter: drop-shadow(0 2px 8px rgba(96, 165, 250, 0.3)); }
.footer h5 {
  color: #fff;
  font-size: 13px;
  text-transform: uppercase;
  letter-spacing: 0.6px;
  margin-bottom: 8px;
  font-weight: 600;
}
.footer p {
  font-size: 14px;
  color: #94a3b8;
}
.footer a {
  color: #cbd5e1;
}
.footer a:hover { color: #fff; }
.footer-tag {
  font-size: 13px;
  color: #94a3b8;
}
.footer-mini {
  display: block;
  margin-top: 4px;
  color: #64748b;
  font-size: 11px;
}
.footer-bottom {
  border-top: 1px solid #1e293b;
  padding-top: 18px;
  text-align: center;
  font-size: 13px;
  color: #64748b;
}

/* ============================================================
   Formulario público de pedido
   ============================================================ */
.form-page {
  background: #f8fafc;
  min-height: 100vh;
  padding: 30px 0 60px;
}
.form-card {
  background: #fff;
  border: 1px solid #e2e8f0;
  border-radius: 10px;
  padding: 30px;
  max-width: 800px;
  margin: 0 auto;
}
.form-card h1 {
  font-size: 26px;
  color: #0f172a;
  margin-bottom: 6px;
}
.form-card .lead {
  color: #64748b;
  font-size: 14px;
  margin-bottom: 24px;
}
.form-step {
  margin-bottom: 28px;
  padding-bottom: 24px;
  border-bottom: 1px solid #f1f5f9;
}
.form-step:last-of-type { border-bottom: 0; padding-bottom: 0; }
.form-step h3 {
  font-size: 14px;
  color: #1e40af;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 14px;
  font-weight: 600;
}
.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
  margin-bottom: 14px;
}
.form-row.cols-3 { grid-template-columns: 1fr 1fr 1fr; }
.form-group { margin-bottom: 14px; }
.form-group label {
  display: block;
  font-size: 13px;
  color: #475569;
  font-weight: 500;
  margin-bottom: 5px;
}
.form-group label .req { color: #dc2626; }

/* Inputs del formulario público - reglas reforzadas para evitar que las pise el CSS del sistema */
.form-card .form-group input,
.form-card .form-group select,
.form-card .form-group textarea,
.form-card input[type="text"],
.form-card input[type="email"],
.form-card input[type="tel"],
.form-card input[type="number"],
.form-card select,
.form-card textarea {
  display: block !important;
  width: 100% !important;
  padding: 10px 12px !important;
  border: 1px solid #cbd5e1 !important;
  border-radius: 6px !important;
  font-size: 15px !important;
  font-family: inherit !important;
  background: #fff !important;
  color: #0f172a !important;
  height: auto !important;
  min-height: 42px !important;
  visibility: visible !important;
  opacity: 1 !important;
  box-sizing: border-box !important;
  transition: border-color 0.15s;
  line-height: 1.4;
}
.form-card textarea {
  min-height: 80px !important;
  resize: vertical;
}
.form-card .form-group input:focus,
.form-card .form-group select:focus,
.form-card .form-group textarea:focus {
  outline: none;
  border-color: #3b82f6 !important;
  box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.15);
}
.form-card .form-group small {
  display: block;
  margin-top: 4px;
  font-size: 12px;
  color: #94a3b8;
}

/* Tabla medidas en form público */
.medidas-publico {
  background: #fefce8;
  border: 1px solid #fde047;
  border-radius: 8px;
  padding: 14px;
}
.medidas-publico table { width: 100%; border-collapse: collapse; }
.medidas-publico th {
  text-align: left;
  font-size: 11px;
  text-transform: uppercase;
  color: #713f12;
  font-weight: 600;
  padding: 6px 8px;
  border-bottom: 1px solid #fde047;
}
.medidas-publico td {
  padding: 4px 6px;
  vertical-align: middle;
}
.medidas-publico td input {
  width: 100%;
  padding: 6px 8px;
  border: 1px solid #fde047;
  border-radius: 4px;
  font-size: 13px;
  background: #fff;
}
.medidas-publico .subtotal-cell {
  text-align: right;
  font-weight: 600;
  font-family: monospace;
  color: #0f172a;
}
.medidas-publico .btn-quitar {
  background: transparent;
  border: 0;
  color: #dc2626;
  font-size: 14px;
  cursor: pointer;
}
.medidas-publico .total-row td {
  padding-top: 10px;
  font-weight: 700;
  font-size: 14px;
  border-top: 1px solid #fde047;
}

/* Subir fotos */
.fotos-zona {
  border: 2px dashed #cbd5e1;
  border-radius: 8px;
  padding: 20px;
  text-align: center;
  color: #64748b;
  font-size: 14px;
  cursor: pointer;
  transition: all 0.15s;
}
.fotos-zona:hover { border-color: #3b82f6; background: #f8fafc; color: #1e40af; }
.fotos-zona input[type="file"] { display: none; }
.fotos-preview {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
  gap: 10px;
  margin-top: 12px;
}
.foto-preview {
  position: relative;
  border-radius: 6px;
  overflow: hidden;
  aspect-ratio: 1;
}
.foto-preview img { width: 100%; height: 100%; object-fit: cover; }
.foto-preview .quitar-foto {
  position: absolute;
  top: 4px;
  right: 4px;
  background: rgba(0,0,0,0.7);
  color: #fff;
  border: 0;
  border-radius: 50%;
  width: 24px;
  height: 24px;
  cursor: pointer;
  font-size: 14px;
}

/* Mensajes */
.alert {
  padding: 12px 16px;
  border-radius: 6px;
  margin-bottom: 16px;
  font-size: 14px;
}
.alert-error { background: #fee2e2; border: 1px solid #fecaca; color: #991b1b; }
.alert-success { background: #dcfce7; border: 1px solid #bbf7d0; color: #166534; }
.alert-info { background: #dbeafe; border: 1px solid #bfdbfe; color: #1e40af; }

.honeypot { display: none !important; }

/* Página de éxito */
.success-page {
  text-align: center;
  padding: 60px 30px;
}
.success-icon {
  width: 80px;
  height: 80px;
  margin: 0 auto 20px;
  background: #dcfce7;
  color: #16a34a;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 40px;
}
.success-page h1 { color: #16a34a; margin-bottom: 10px; }
.success-page p { color: #475569; max-width: 500px; margin: 0 auto 24px; }

/* ============================================================
   RESPONSIVE
   Breakpoints:
     - 1024px: tablet horizontal
     - 768px:  tablet vertical / mobile grande
     - 480px:  mobile
     - 380px:  mobile chico
   ============================================================ */

/* Botón hamburguesa - oculto por default */
.nav-toggle {
  display: none;
  background: transparent;
  border: 0;
  width: 36px;
  height: 36px;
  padding: 0;
  cursor: pointer;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 5px;
  margin-left: auto;
}
.nav-toggle span {
  display: block;
  width: 22px;
  height: 2px;
  background: #0f172a;
  border-radius: 2px;
  transition: transform 0.2s, opacity 0.2s;
}
.nav-toggle.is-active span:nth-child(1) {
  transform: translateY(7px) rotate(45deg);
}
.nav-toggle.is-active span:nth-child(2) {
  opacity: 0;
}
.nav-toggle.is-active span:nth-child(3) {
  transform: translateY(-7px) rotate(-45deg);
}

/* CTA "Pedir presupuesto" en header - mobile/desktop variants */
.nav-cta-mobile { display: none; }
.nav-cta-desktop { display: inline-flex; }

/* === TABLET (1024px) === */
@media (max-width: 1024px) {
  .hero h1 { font-size: 38px; }
  .grid-3 { grid-template-columns: repeat(2, 1fr); }
  .footer-grid { grid-template-columns: 1.5fr 1fr 1fr; }
  .footer-grid > div:last-child { grid-column: 1 / -1; }
  .nav { gap: 18px; }
  .nav a { font-size: 13px; }
}

/* === TABLET VERTICAL / MOBILE GRANDE (768px) === */
@media (max-width: 768px) {
  .container { padding: 0 16px; }

  /* Header con hamburguesa */
  .header-inner { padding: 12px 16px; gap: 10px; }
  .nav-toggle { display: flex; }
  .nav-cta-desktop { display: none; }
  .nav-cta-mobile { display: inline-flex; width: 100%; justify-content: center; margin-top: 6px; }

  .nav {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: #fff;
    border-bottom: 1px solid #e2e8f0;
    box-shadow: 0 8px 16px rgba(0, 0, 0, 0.08);
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    padding: 8px 16px 16px;
    max-height: 0;
    overflow: hidden;
    visibility: hidden;
    transition: max-height 0.25s ease, visibility 0.25s;
  }
  .nav.nav-open {
    max-height: 400px;
    visibility: visible;
  }
  .nav a {
    padding: 12px 4px;
    border-bottom: 1px solid #f1f5f9;
    font-size: 15px;
    font-weight: 500;
  }
  .nav a:last-of-type {
    border-bottom: 0;
  }

  /* Hero */
  .hero { padding: 40px 0 36px; }
  .hero h1 { font-size: 28px; line-height: 1.2; }
  .hero .lead { font-size: 15px; margin-bottom: 24px; }
  .hero-logo { width: 80px; margin-bottom: 14px; }
  .hero-cta { gap: 8px; flex-direction: column; align-items: stretch; }
  .hero-cta .btn { width: 100%; justify-content: center; }
  .hero-features { grid-template-columns: repeat(2, 1fr); gap: 12px 18px; }
  .feature strong { font-size: 16px; }
  .feature span { font-size: 12px; }

  /* Sections */
  .section, .section-alt { padding: 40px 0; }
  .section-head { margin-bottom: 28px; }
  .section-head h2 { font-size: 24px; }
  .section-head p { font-size: 14px; }

  /* Grids */
  .grid-2 { grid-template-columns: 1fr; gap: 24px; }
  .grid-3 { grid-template-columns: 1fr; gap: 16px; }

  /* Servicios cards */
  .card-srv { padding: 18px; }
  .card-srv-icon { font-size: 28px; }
  .card-srv h3 { font-size: 16px; }
  .card-srv p { font-size: 13px; }

  /* Qué es */
  .ventajas { padding: 18px; }
  .ventajas li { font-size: 13px; padding-left: 24px; }

  /* Cobertura */
  .card-cobertura { padding: 22px 16px; }
  .cobertura-grid-prov { grid-template-columns: repeat(2, 1fr); gap: 8px; }
  .zona-item { padding: 10px 8px; font-size: 13px; }

  /* CTA banner */
  .cta-banner { padding: 44px 0; }
  .cta-banner h2 { font-size: 22px; }
  .cta-banner p { font-size: 14px; }

  /* Contacto */
  .card-contacto { padding: 16px; gap: 12px; }
  .card-contacto-icon { width: 40px; height: 40px; }

  /* Footer */
  .footer-grid {
    grid-template-columns: 1fr;
    gap: 22px;
    text-align: center;
  }
  .footer h5 { font-size: 12px; }
  .footer p { font-size: 13px; }
  .brand-footer { justify-content: center; }
  .footer-bottom { font-size: 12px; }

  /* Form público */
  .form-card { padding: 22px 18px; }
  .form-card h1 { font-size: 22px; }
  .form-row { grid-template-columns: 1fr; }
  .form-row.cols-3 { grid-template-columns: 1fr; }
  .medidas-publico { padding: 12px 8px; }
  .medidas-publico table { font-size: 12px; }
  .medidas-publico th, .medidas-publico td { padding: 4px 3px; }
  .medidas-publico td input { padding: 5px 6px; font-size: 12px; }
}

/* === MOBILE (480px) === */
@media (max-width: 480px) {
  .container { padding: 0 14px; }
  .header-inner { padding: 10px 14px; }
  .brand-text { font-size: 16px; }
  .brand-icon-img { height: 32px; }

  .hero { padding: 32px 0 28px; }
  .hero h1 { font-size: 24px; }
  .hero .lead { font-size: 14px; }
  .hero-logo { width: 70px; }

  .section-head h2 { font-size: 20px; }
  .section-head p { font-size: 13px; }

  .btn-lg { padding: 12px 22px; font-size: 14px; }

  .feature { padding: 4px 10px; border-left-width: 2px; }
  .feature strong { font-size: 14px; }

  .cta-banner h2 { font-size: 20px; }

  .form-card { padding: 18px 14px; }
  .form-card h1 { font-size: 20px; }
}

/* === MOBILE CHICO (380px) === */
@media (max-width: 380px) {
  .brand-text { font-size: 15px; }
  .brand-icon-img { height: 28px; }
  .hero h1 { font-size: 22px; }
  .hero-features { grid-template-columns: 1fr; }
  .cobertura-grid-prov { grid-template-columns: 1fr; }
}