/* ============================================
   SECCIÓN: CONTACTO
   ============================================ */

.contacto {
  padding: var(--space-section) 0;
  background: linear-gradient(
    180deg,
    var(--color-gray-50) 0%,
    var(--color-white) 100%
  );
  position: relative;
}

.contacto .container {
  max-width: 1200px;
}

/* Encabezado de sección */
.contacto__header {
  text-align: center;
  margin-bottom: var(--space-3xl);
}

.contacto__subtitle {
  font-family: var(--font-accent);
  font-size: var(--font-size-2xl);
  color: var(--color-primary);
  margin-bottom: var(--space-xs);
  font-weight: var(--font-weight-normal);
}

.contacto__title {
  font-family: var(--font-primary);
  font-size: var(--font-size-4xl);
  color: var(--color-secondary);
  font-weight: var(--font-weight-bold);
  margin-bottom: var(--space-md);
  line-height: var(--line-height-tight);
}

.contacto__intro {
  font-size: var(--font-size-lg);
  color: var(--color-gray-700);
  max-width: 800px;
  margin: 0 auto;
  line-height: var(--line-height-relaxed);
}

/* Layout principal */
.contacto__content {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--space-3xl);
  align-items: stretch;
}

/* Información de contacto */
.contacto__info {
  background: var(--color-white);
  padding: var(--space-xl);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
  border: 1px solid var(--color-gray-200);
}

.contacto__info-title {
  font-family: var(--font-primary);
  font-size: var(--font-size-lg);
  color: var(--color-secondary);
  margin-bottom: var(--space-md);
  font-weight: var(--font-weight-bold);
}

.contacto__info-items {
  display: flex;
  flex-direction: column;
  gap: var(--space-sm);
  margin-bottom: var(--space-lg);
}

/* Item de información */
.info-item {
  display: flex;
  align-items: flex-start;
  gap: var(--space-sm);
  padding: var(--space-sm);
  border-radius: var(--radius-sm);
  transition: all var(--transition-base);
  border: 1px solid transparent;
}

.info-item:hover {
  background: var(--color-gray-50);
  border-color: var(--color-primary);
  transform: translateX(2px);
}

.info-item__icon {
  width: 36px;
  height: 36px;
  background: linear-gradient(
    135deg,
    var(--color-primary),
    var(--color-accent)
  );
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1rem;
  flex-shrink: 0;
  box-shadow: var(--shadow-sm);
}

.info-item__icon svg {
  width: 18px;
  height: 18px;
}

.info-item__content {
  flex: 1;
}

.info-item__label {
  font-weight: var(--font-weight-semibold);
  color: var(--color-gray-600);
  font-size: var(--font-size-xs);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 2px;
}

.info-item__value {
  font-size: var(--font-size-sm);
  color: var(--color-secondary);
  font-weight: var(--font-weight-medium);
  line-height: 1.4;
}

.info-item__value a {
  color: inherit;
  text-decoration: none;
  transition: color var(--transition-base);
}

.info-item__value a:hover {
  color: var(--color-primary);
}

.info-item__value .btn {
  margin-top: 0.5rem;
  font-size: var(--font-size-xs);
  padding: 0.35rem 0.75rem;
}

/* Redes sociales */
.contacto__social {
  padding-top: var(--space-md);
  border-top: 1px solid var(--color-gray-200);
}

.contacto__social-title {
  font-weight: var(--font-weight-semibold);
  color: var(--color-secondary);
  margin-bottom: var(--space-sm);
  font-size: var(--font-size-sm);
}

.social-links {
  display: flex;
  gap: var(--space-sm);
  flex-wrap: wrap;
}

.social-link {
  width: 38px;
  height: 38px;
  background: var(--color-gray-100);
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--color-secondary);
  font-size: 1rem;
  transition: all var(--transition-base);
  text-decoration: none;
  border: 2px solid transparent;
}

.social-link svg {
  width: 18px;
  height: 18px;
}

.social-link:hover {
  background: var(--color-primary);
  color: var(--color-secondary);
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
  border-color: var(--color-primary);
}

.social-link:focus {
  outline: 3px solid var(--color-primary);
  outline-offset: 2px;
}

/* Horarios */
.contacto__horarios {
  margin-top: var(--space-md);
  padding: var(--space-md);
  background: var(--color-gray-50);
  border-radius: var(--radius-sm);
  border-left: 3px solid var(--color-primary);
}

.contacto__horarios-title {
  font-weight: var(--font-weight-bold);
  color: var(--color-secondary);
  margin-bottom: var(--space-sm);
  font-size: var(--font-size-sm);
}

.horario-item {
  display: flex;
  justify-content: space-between;
  padding: 0.25rem 0;
  font-size: var(--font-size-xs);
}

.horario-item__dia {
  color: var(--color-gray-700);
  font-weight: var(--font-weight-medium);
}

.horario-item__hora {
  color: var(--color-secondary);
  font-weight: var(--font-weight-semibold);
}

/* Formulario de contacto */
.contacto__form-wrapper {
  background: var(--color-white);
  padding: var(--space-2xl);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
  border: 1px solid var(--color-gray-200);
}

.contacto__form-title {
  font-family: var(--font-primary);
  font-size: var(--font-size-2xl);
  color: var(--color-secondary);
  margin-bottom: var(--space-md);
  font-weight: var(--font-weight-bold);
}

.contacto__form-description {
  font-size: var(--font-size-base);
  color: var(--color-gray-700);
  margin-bottom: var(--space-2xl);
  line-height: var(--line-height-relaxed);
}

/* Formulario */
.contacto-form {
  display: grid;
  gap: var(--space-lg);
}

.form-group {
  display: flex;
  flex-direction: column;
  gap: var(--space-xs);
}

.form-group label {
  font-weight: var(--font-weight-semibold);
  color: var(--color-secondary);
  font-size: var(--font-size-sm);
  display: flex;
  align-items: center;
  gap: var(--space-xs);
}

.form-group label .required {
  color: var(--color-error);
}

.form-group input,
.form-group select,
.form-group textarea {
  width: 100%;
  padding: var(--space-sm) var(--space-md);
  border: 2px solid var(--color-gray-300);
  border-radius: var(--radius-md);
  font-size: var(--font-size-base);
  font-family: var(--font-secondary);
  transition: all var(--transition-base);
  background: var(--color-white);
  color: var(--color-secondary);
  min-height: 44px;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
  outline: none;
  border-color: var(--color-primary);
  box-shadow: 0 0 0 3px rgba(212, 175, 55, 0.1);
}

.form-group input::placeholder,
.form-group textarea::placeholder {
  color: var(--color-gray-500);
}

.form-group textarea {
  min-height: 120px;
  resize: vertical;
  font-family: var(--font-secondary);
  line-height: var(--line-height-relaxed);
}

/* Estados de validación */
.form-group input.error,
.form-group select.error,
.form-group textarea.error {
  border-color: var(--color-error);
}

.form-group input.success,
.form-group select.success,
.form-group textarea.success {
  border-color: var(--color-success);
}

.form-group__error {
  font-size: var(--font-size-sm);
  color: var(--color-error);
  display: none;
}

.form-group.has-error .form-group__error {
  display: block;
}

/* Grid para campos en línea */
.form-row {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--space-lg);
}

/* Botón de envío */
.contacto-form__submit {
  margin-top: var(--space-md);
}

.contacto-form__submit .btn {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-sm);
  font-size: var(--font-size-lg);
  padding: var(--space-md) var(--space-xl);
  min-height: 52px;
}

/* Mensajes de estado */
.form-message {
  padding: var(--space-md);
  border-radius: var(--radius-md);
  font-size: var(--font-size-sm);
  display: none;
  margin-bottom: var(--space-lg);
}

.form-message.success {
  background: var(--color-success-light);
  color: var(--color-success-dark);
  border: 1px solid var(--color-success);
  display: block;
}

.form-message.error {
  background: var(--color-error-light);
  color: var(--color-error-dark);
  border: 1px solid var(--color-error);
  display: block;
}

/* Mapa */
.contacto__mapa {
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-lg);
  background: var(--color-white);
  display: flex;
  flex-direction: column;
  gap: var(--space-xl);
}

.contacto__mapa iframe {
  width: 100%;
  min-height: 400px;
  height: 450px;
  border: none;
  border-radius: var(--radius-lg);
  flex-shrink: 0;
}

/* Información de contacto dentro del contenedor del mapa */
.contacto__mapa .contacto__info {
  padding: var(--space-md) var(--space-lg);
  box-shadow: none;
  border: none;
  margin: 0;
}

.contacto__mapa .contacto__info-title {
  font-size: var(--font-size-base);
  margin-bottom: var(--space-sm);
}

/* Placeholder del mapa */
.mapa-placeholder {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  height: 100%;
  padding: var(--space-2xl);
  text-align: center;
  background: var(--color-gray-100);
}

.mapa-placeholder__icon {
  font-size: 3rem;
  color: var(--color-primary);
  margin-bottom: var(--space-md);
}

.mapa-placeholder__text {
  color: var(--color-gray-700);
  font-size: var(--font-size-base);
}

/* Botón flotante de WhatsApp */
.whatsapp-float {
  position: fixed;
  bottom: var(--space-xl);
  right: var(--space-xl);
  width: 60px;
  height: 60px;
  background: #25D366;
  color: var(--color-white);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2rem;
  box-shadow: var(--shadow-xl);
  z-index: 999;
  text-decoration: none;
  transition: all var(--transition-base);
  animation: pulse 2s infinite;
}

.whatsapp-float:hover {
  transform: scale(1.1);
  box-shadow: 0 8px 24px rgba(37, 211, 102, 0.4);
}

.whatsapp-float:focus {
  outline: 3px solid #25D366;
  outline-offset: 4px;
}

@keyframes pulse {
  0%, 100% {
    box-shadow: 0 4px 12px rgba(37, 211, 102, 0.4);
  }
  50% {
    box-shadow: 0 8px 24px rgba(37, 211, 102, 0.6);
  }
}

/* ============================================
   RESPONSIVE
   ============================================ */

/* Tablet: 768px+ */
@media (min-width: 768px) {
  .contacto__title {
    font-size: var(--font-size-5xl);
  }

  .contacto__content {
    grid-template-columns: 1fr 1fr;
    gap: var(--space-3xl);
  }

  .form-row {
    grid-template-columns: repeat(2, 1fr);
  }

  .contacto__mapa iframe {
    height: 400px;
  }
}

/* Desktop: 1024px+ */
@media (min-width: 1024px) {
  .contacto {
    padding: var(--space-4xl) 0;
  }

  .contacto__form-wrapper {
    padding: var(--space-3xl);
  }

  .contacto__info {
    padding: var(--space-2xl);
  }

  .contacto__mapa iframe {
    height: 500px;
  }

  .contacto__mapa .contacto__info {
    padding: var(--space-2xl);
  }
}

/* ============================================
   ACCESIBILIDAD
   ============================================ */

/* Reducir movimiento para usuarios con preferencias */
@media (prefers-reduced-motion: reduce) {
  .info-item,
  .social-link,
  .whatsapp-float {
    animation: none !important;
    transition: none !important;
  }

  .whatsapp-float {
    animation: none;
  }
}

/* Focus visible para navegación por teclado */
.info-item:focus-within,
.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
  outline: 3px solid var(--color-primary);
  outline-offset: 2px;
}

/* Asegurar contraste adecuado */
.form-group label {
  font-weight: var(--font-weight-semibold);
}

/* Error states accesibles */
.form-group.has-error input,
.form-group.has-error select,
.form-group.has-error textarea {
  border-color: var(--color-error);
  background: var(--color-error-light);
}

.form-group.has-error label {
  color: var(--color-error);
}

/* Indicador visual de campo requerido */
.required::after {
  content: ' *';
  color: var(--color-error);
}

/* Estados hover mejorados para accesibilidad */
.social-link:hover,
.social-link:focus-visible {
  outline: 3px solid var(--color-primary);
  outline-offset: 2px;
}
