/* =============================
   VARIABLES Y RESETEO
============================= */
:root {
  --primary-color: #1e3c72;
  --secondary-color: #2a5298;
  --accent-color: #ff6b35;
  --light-gray: #f8f9fa;
  --dark-gray: #333;
  --text-muted: #666;
  --white: #fff;
  --success-color: #28a745;
  --error-color: #dc3545;
  --warning-color: #ffc107;
  --whatsapp-color: #25d366;
  --font-main: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: var(--font-main);
  line-height: 1.6;
  color: var(--dark-gray);
  background-color: var(--white);
}

/* UTILIDADES */
.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 2rem;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

a,
button {
  transition: all 0.3s ease;
}

a:focus,
button:focus {
  outline: 2px solid var(--accent-color);
  outline-offset: 2px;
}

/* =============================
   HEADER / NAV
============================= */
.header {
  background: linear-gradient(135deg, var(--primary-color) 0%, var(--secondary-color) 100%);
  color: var(--white);
  padding: 1rem 0;
  position: fixed;
  width: 100%;
  top: 0;
  z-index: 1000;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.nav {
  display: flex;
  justify-content: space-between;
  align-items: center;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 2rem;
}

.logo {
  font-size: 1.8rem;
  font-weight: bold;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.nav-links {
  display: flex;
  list-style: none;
  gap: 2rem;
}

.nav-links a {
  color: var(--white);
  text-decoration: none;
  font-weight: 500;
  position: relative;
}

.nav-links a:hover,
.nav-links a.active {
  color: var(--accent-color);
}

.nav-links a.active::after {
  content: '';
  position: absolute;
  bottom: -5px;
  left: 0;
  width: 100%;
  height: 2px;
  background: var(--accent-color);
}

/* CTA */
.cta-button {
  background: var(--accent-color);
  color: var(--white);
  padding: 0.75rem 1.5rem;
  border: none;
  border-radius: 5px;
  cursor: pointer;
  font-weight: bold;
  text-decoration: none;
  display: inline-block;
  font-size: 1rem;
  transition: all 0.3s ease;
}

.cta-button:hover {
  background: #e55a2b;
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(255, 107, 53, 0.3);
}

.cta-outline {
  background: transparent;
  border: 2px solid var(--white);
}

.cta-button.big {
  font-size: 1.2rem;
  padding: 1rem 2rem;
}

/* Toggle */
.menu-toggle {
  display: none;
  background: none;
  border: none;
  color: var(--white);
  font-size: 1.5rem;
  cursor: pointer;
}

/* =============================
   HERO CONTACTO
============================= */
.hero-contacto {
  background: linear-gradient(rgba(30, 60, 114, 0.8), rgba(42, 82, 152, 0.8)), 
              url('assets/contacto-hero.jpg') no-repeat center/cover;
  height: 60vh;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  color: var(--white);
  padding: 0 2rem;
  margin-top: 80px;
}

.hero-contacto .hero-content h1 {
  font-size: 3.5rem;
  margin-bottom: 1rem;
  font-weight: 700;
  opacity: 0;
  transform: translateY(30px);
  animation: fadeInUp 1s ease forwards;
}

.hero-contacto .hero-content .subtitle {
  font-size: 1.3rem;
  margin-bottom: 2rem;
  opacity: 0.9;
  opacity: 0;
  transform: translateY(30px);
  animation: fadeInUp 1s ease 0.3s forwards;
}

@keyframes fadeInUp {
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* =============================
   CONTACTO RÁPIDO
============================= */
.contacto-rapido {
  padding: 5rem 0;
  background: var(--white);
}

.section-title {
  font-size: 2.5rem;
  color: var(--primary-color);
  text-align: center;
  margin-bottom: 1rem;
}

.section-subtitle {
  text-align: center;
  color: var(--text-muted);
  font-size: 1.1rem;
  margin-bottom: 3rem;
  max-width: 600px;
  margin-left: auto;
  margin-right: auto;
}

.contacto-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 2rem;
  margin-top: 3rem;
}

.contacto-card {
  background: var(--white);
  padding: 2.5rem 2rem;
  border-radius: 15px;
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.08);
  text-align: center;
  transition: all 0.3s ease;
  border: 2px solid transparent;
}

.contacto-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 12px 35px rgba(0, 0, 0, 0.15);
}

.contacto-card.urgente {
  border-color: var(--error-color);
  background: linear-gradient(135deg, #fff 0%, #fff5f5 100%);
}

.contacto-card.urgente:hover {
  border-color: var(--error-color);
  box-shadow: 0 12px 35px rgba(220, 53, 69, 0.2);
}

.icon-circle {
  width: 80px;
  height: 80px;
  margin: 0 auto 1.5rem;
  background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2rem;
  color: var(--white);
  transition: transform 0.3s ease;
}

.icon-circle.emergency {
  background: linear-gradient(135deg, var(--error-color), #c82333);
}

.icon-circle.whatsapp {
  background: linear-gradient(135deg, var(--whatsapp-color), #20ba5a);
}

.contacto-card:hover .icon-circle {
  transform: scale(1.1);
}

.contacto-card h3 {
  font-size: 1.5rem;
  margin-bottom: 1rem;
  color: var(--primary-color);
}

.contacto-card p {
  color: var(--text-muted);
  margin-bottom: 1.5rem;
  line-height: 1.6;
}

.contact-info {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.contact-link {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.75rem 1.5rem;
  background: var(--light-gray);
  color: var(--dark-gray);
  text-decoration: none;
  border-radius: 25px;
  font-weight: 500;
  transition: all 0.3s ease;
}

.contact-link:hover {
  background: var(--primary-color);
  color: var(--white);
  transform: translateY(-2px);
}

.contact-link.emergency {
  background: var(--error-color);
  color: var(--white);
}

.contact-link.emergency:hover {
  background: #c82333;
}

.contact-link.whatsapp {
  background: var(--whatsapp-color);
  color: var(--white);
}

.contact-link.whatsapp:hover {
  background: #20ba5a;
}

/* =============================
   FORMULARIO
============================= */
.formulario-section {
  padding: 5rem 0;
  background: var(--light-gray);
}

.form-wrapper {
  display: grid;
  grid-template-columns: 1fr 2fr;
  gap: 4rem;
  align-items: start;
}

.form-intro h2 {
  font-size: 2.2rem;
  color: var(--primary-color);
  margin-bottom: 1rem;
}

.form-intro p {
  color: var(--text-muted);
  margin-bottom: 2rem;
  font-size: 1.1rem;
  line-height: 1.6;
}

.form-benefits {
  list-style: none;
}

.form-benefits li {
  padding: 0.5rem 0;
  display: flex;
  align-items: center;
  gap: 0.75rem;
  color: var(--dark-gray);
}

.form-benefits i {
  color: var(--success-color);
  font-size: 1.2rem;
}

.contact-form {
  background: var(--white);
  padding: 3rem;
  border-radius: 15px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
}

.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.5rem;
}

.form-group {
  margin-bottom: 1.5rem;
}

.form-group label {
  display: block;
  margin-bottom: 0.5rem;
  color: var(--dark-gray);
  font-weight: 500;
}

.form-group input,
.form-group select,
.form-group textarea {
  width: 100%;
  padding: 0.875rem 1rem;
  border: 2px solid #e1e5e9;
  border-radius: 8px;
  font-size: 1rem;
  transition: all 0.3s ease;
  background: var(--white);
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
  outline: none;
  border-color: var(--primary-color);
  box-shadow: 0 0 0 3px rgba(30, 60, 114, 0.1);
}

.form-group input.error,
.form-group select.error,
.form-group textarea.error {
  border-color: var(--error-color);
}

.form-group input.success,
.form-group select.success,
.form-group textarea.success {
  border-color: var(--success-color);
}

.error-message {
  display: block;
  color: var(--error-color);
  font-size: 0.875rem;
  margin-top: 0.25rem;
  min-height: 1.2rem;
}

.help-text {
  display: block;
  color: var(--text-muted);
  font-size: 0.875rem;
  margin-top: 0.25rem;
}

.checkbox-label {
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
  cursor: pointer;
  line-height: 1.5;
}

.checkbox-label input[type="checkbox"] {
  display: none;
}

.checkbox-custom {
  width: 20px;
  height: 20px;
  border: 2px solid #e1e5e9;
  border-radius: 4px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.3s ease;
  flex-shrink: 0;
  margin-top: 2px;
}

.checkbox-label input[type="checkbox"]:checked + .checkbox-custom {
  background: var(--primary-color);
  border-color: var(--primary-color);
}

.checkbox-label input[type="checkbox"]:checked + .checkbox-custom::after {
  content: '✓';
  color: var(--white);
  font-size: 14px;
  font-weight: bold;
}

.form-submit {
  width: 100%;
  padding: 1rem 2rem;
  font-size: 1.1rem;
  margin-top: 1rem;
  position: relative;
  overflow: hidden;
}

.form-submit:disabled {
  background: #ccc;
  cursor: not-allowed;
}

.form-submit:disabled:hover {
  background: #ccc;
  transform: none;
  box-shadow: none;
}

/* =============================
   HORARIOS Y UBICACIÓN
============================= */
.horarios-ubicacion {
  padding: 5rem 0;
  background: var(--white);
}

.info-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 2rem;
  margin-top: 3rem;
}

.info-card {
  background: var(--light-gray);
  padding: 2.5rem 2rem;
  border-radius: 15px;
  text-align: center;
  transition: transform 0.3s ease;
}

.info-card:hover {
  transform: translateY(-3px);
}

.info-card h3 {
  font-size: 1.4rem;
  color: var(--primary-color);
  margin-bottom: 1.5rem;
}

.horarios-list {
  text-align: left;
}

.horario-item {
  display: flex;
  justify-content: space-between;
  padding: 0.75rem 0;
  border-bottom: 1px solid #ddd;
}

.horario-item:last-child {
  border-bottom: none;
}

.horario-item.urgente {
  color: var(--error-color);
  font-weight: 600;
}

.dia {
  font-weight: 500;
}

.hora {
  color: var(--text-muted);
}

.direccion-info {
  font-style: normal;
  text-align: left;
  line-height: 1.6;
}

.direccion-info p {
  margin-bottom: 0.5rem;
  color: var(--text-muted);
}

.direccion-info strong {
  color: var(--dark-gray);
}

.ver-mapa {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  color: var(--primary-color);
  text-decoration: none;
  font-weight: 500;
  margin-top: 1rem;
}

.ver-mapa:hover {
  color: var(--accent-color);
}

.cobertura-list {
  list-style: none;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.5rem;
  text-align: left;
}

.cobertura-list li {
  padding: 0.25rem 0;
  color: var(--text-muted);
  position: relative;
  padding-left: 1rem;
}

.cobertura-list li::before {
  content: '•';
  position: absolute;
  left: 0;
  color: var(--accent-color);
  font-weight: bold;
}

.cobertura-nota {
  font-size: 0.9rem;
  color: var(--text-muted);
  font-style: italic;
  margin-top: 1rem;
  text-align: center;
}

/* =============================
   MAPA
============================= */
.mapa-section {
  padding: 3rem 0;
  background: var(--light-gray);
}

.mapa-container {
  width: 100%;
  height: auto;
  max-width: 100%;
  border-radius: 15px;
  overflow: hidden;
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.1);
  margin-top: 2rem;
}

/* =============================
   FAQ CONTACTO
============================= */
.faq-contacto {
  padding: 5rem 0;
  background: var(--white);
}

.faq-list {
  max-width: 800px;
  margin: 0 auto;
  margin-top: 3rem;
}

.faq-item {
  border: 1px solid #e1e5e9;
  border-radius: 10px;
  margin-bottom: 1rem;
  padding: 1.5rem;
  background: var(--white);
  transition: all 0.3s ease;
}

.faq-item:hover {
  border-color: var(--primary-color);
  box-shadow: 0 4px 15px rgba(30, 60, 114, 0.1);
}

.faq-item summary {
  font-weight: 600;
  cursor: pointer;
  list-style: none;
  color: var(--primary-color);
  font-size: 1.1rem;
}

.faq-item summary::marker {
  display: none;
}

.faq-item summary::-webkit-details-marker {
  display: none;
}

.faq-item[open] {
  border-color: var(--primary-color);
}

.faq-item p {
  margin-top: 1rem;
  color: var(--text-muted);
  line-height: 1.6;
}

/* =============================
   FOOTER
============================= */
.footer {
  background: var(--primary-color);
  color: var(--white);
  font-size: 1.2rem;
  padding: 2rem 1rem;
}

.footer-container {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 2rem;
  max-width: 1200px;
  margin: 0 auto;
}

.footer-col h4 {
  font-size: 1.1rem;
  margin-bottom: 1rem;
  color: var(--white);
}

.footer-col p {
  line-height: 1.6;
}

.footer-logo {
  max-width: 160px;
  margin-bottom: 1rem;
}

.footer-links {
  list-style: none;
  padding: 0;
  margin: 0;
}

.footer-links li {
  margin-bottom: 0.5rem;
}

.footer-links a {
  color: #ccc;
  text-decoration: none;
  transition: color 0.3s;
}

.footer-links a:hover {
  color: var(--white);
}

.footer-bottom {
  border-top: 1px solid #333;
  text-align: center;
  padding-top: 1rem;
  margin-top: 2rem;
  font-size: 0.9rem;
  color: #aaa;
}

/* =============================
   ANIMACIONES
============================= */
@keyframes slideInLeft {
  from {
    opacity: 0;
    transform: translateX(-50px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

@keyframes slideInRight {
  from {
    opacity: 0;
    transform: translateX(50px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

@keyframes fadeInScale {
  from {
    opacity: 0;
    transform: scale(0.9);
  }
  to {
    opacity: 1;
    transform: scale(1);
  }
}

/* Clases para animaciones */
.animate-left {
  animation: slideInLeft 0.8s ease forwards;
}

.animate-right {
  animation: slideInRight 0.8s ease forwards;
}

.animate-scale {
  animation: fadeInScale 0.6s ease forwards;
}

/* =============================
   RESPONSIVE
============================= */
@media (max-width: 1024px) {
  .form-wrapper {
    grid-template-columns: 1fr;
    gap: 3rem;
  }
  
  .form-intro {
    text-align: center;
  }
}

@media (max-width: 768px) {
  .menu-toggle {
    display: block;
  }

  .nav-links {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    width: 100%;
    background: var(--primary-color);
    flex-direction: column;
    padding: 1rem 0;
  }

  .nav-links.active {
    display: flex;
  }

  .hero-contacto .hero-content h1 {
    font-size: 2.5rem;
  }

  .hero-contacto .hero-content .subtitle {
    font-size: 1.1rem;
  }

  .contacto-grid {
    grid-template-columns: 1fr;
  }

  .form-row {
    grid-template-columns: 1fr;
    gap: 0;
  }

  .contact-form {
    padding: 2rem;
  }

  .info-grid {
    grid-template-columns: 1fr;
  }

  .cobertura-list {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 480px) {
  .nav {
    padding: 0 1rem;
  }

  .container {
    padding: 0 1rem;
  }

  .hero-contacto .hero-content h1 {
    font-size: 2rem;
  }

  .section-title {
    font-size: 2rem;
  }

  .contacto-card {
    padding: 2rem 1.5rem;
  }

  .contact-form {
    padding: 1.5rem;
  }

  .info-card {
    padding: 2rem 1.5rem;
  }
}

/* =============================
   ESTADOS DE LOADING
============================= */
.loading {
  opacity: 0.7;
  pointer-events: none;
}

.success-message {
  background: var(--success-color);
  color: var(--white);
  padding: 1rem;
  border-radius: 8px;
  margin-bottom: 1rem;
  text-align: center;
}

.error-general {
  background: var(--error-color);
  color: var(--white);
  padding: 1rem;
  border-radius: 8px;
  margin-bottom: 1rem;
  text-align: center;
}