/* ==============================
   PÁGINA DE CONTACTO
   ============================== */

.contact-page {
  padding: 3rem 0;
  min-height: 60vh;
}

.contact-header {
  text-align: center;
  margin-bottom: 3rem;
}

.contact-header h1 {
  font-size: 2.5rem;
  font-weight: 700;
  color: #10375c;
  margin-bottom: 1rem;
}

.contact-header p {
  font-size: 1.1rem;
  color: #666;
  max-width: 600px;
  margin: 0 auto;
  line-height: 1.6;
}

/* Mensajes de éxito y error */
.contact-success {
  background-color: #d4edda;
  border: 1px solid #c3e6cb;
  color: #155724;
  padding: 1.5rem;
  border-radius: 8px;
  margin-bottom: 2rem;
  text-align: center;
}

.contact-success h3 {
  margin-bottom: 0.5rem;
  font-size: 1.3rem;
}

.contact-errors {
  background-color: #f8d7da;
  border: 1px solid #f5c6cb;
  color: #721c24;
  padding: 1.5rem;
  border-radius: 8px;
  margin-bottom: 2rem;
}

.contact-errors h3 {
  margin-bottom: 1rem;
  font-size: 1.2rem;
}

.contact-errors ul {
  margin: 0;
  padding-left: 1.5rem;
}

.contact-errors li {
  margin-bottom: 0.5rem;
}

/* Layout principal */
.contact-content {
  display: grid;
  grid-template-columns: 2fr 1fr;
  gap: 3rem;
  align-items: start;
}

/* Formulario */
.contact-form-container {
  background: #ffffff;
  padding: 2.5rem;
  border-radius: 12px;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
  border: 1px solid #e5e7eb;
}

.contact-form {
  width: 100%;
}

.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.5rem;
  margin-bottom: 1.5rem;
}

.form-group {
  margin-bottom: 1.5rem;
}

.form-group label {
  display: block;
  font-weight: 500;
  color: #374151;
  margin-bottom: 0.5rem;
  font-size: 0.95rem;
}

.form-group input,
.form-group textarea {
  width: 100%;
  padding: 0.875rem 1rem;
  border: 2px solid #e5e7eb;
  border-radius: 8px;
  font-size: 1rem;
  font-family: inherit;
  transition: border-color 0.2s, box-shadow 0.2s;
  background-color: #ffffff;
}

.form-group input:focus,
.form-group textarea:focus {
  outline: none;
  border-color: #10375c;
  box-shadow: 0 0 0 3px rgba(16, 55, 92, 0.1);
}

.form-group textarea {
  resize: vertical;
  min-height: 120px;
}

.form-group small {
  display: block;
  margin-top: 0.5rem;
  color: #6b7280;
  font-size: 0.85rem;
}

/* Checkbox personalizado - Completamente rediseñado para alineación lineal */
.checkbox-group {
  margin: 2rem 0;
}

.authorization-container {
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
  background: transparent;
  padding: 1rem;
  border-radius: 8px;
  border: 1px solid transparent;
}

.authorization-container input[type="checkbox"] {
  display: none;
}

.authorization-label {
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
  cursor: pointer;
  font-size: 0.95rem;
  line-height: 1.5;
  width: 100%;
}

.checkmark {
  width: 20px;
  height: 20px;
  min-width: 20px;
  border: 2px solid #d1d5db;
  border-radius: 4px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s;
  flex-shrink: 0;
  margin-top: 2px;
}

.authorization-container input[type="checkbox"]:checked + .authorization-label .checkmark {
  background-color: #10375c;
  border-color: #10375c;
}

.authorization-container input[type="checkbox"]:checked + .authorization-label .checkmark::after {
  content: "✓";
  color: white;
  font-size: 12px;
  font-weight: bold;
}

.authorization-text {
  flex: 1;
  line-height: 1.5;
}

.authorization-label a {
  color: #10375c;
  text-decoration: underline;
}

.authorization-label a:hover {
  color: #0c2d48;
}

/* Botón de envío - Color #10375C solo en modo claro */
.submit-button {
  background: #10375c; /* Color sólido en modo claro */
  color: white;
  border: none;
  padding: 1rem 2.5rem;
  font-size: 1.1rem;
  font-weight: 600;
  border-radius: 25px;
  cursor: pointer;
  transition: all 0.3s ease;
  box-shadow: 0 4px 15px rgba(16, 55, 92, 0.3);
  width: 100%;
  max-width: 300px;
  margin: 0 auto;
  display: block;
}

.submit-button:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(16, 55, 92, 0.4);
  background: #0c2d48; /* Más oscuro al hacer hover */
}

.submit-button:active {
  transform: translateY(0);
  box-shadow: 0 2px 10px rgba(16, 55, 92, 0.3);
}

/* Sidebar de información */
.contact-info-sidebar {
  display: flex;
  flex-direction: column;
  gap: 2rem;
}

.contact-card {
  background: #ffffff;
  padding: 2rem;
  border-radius: 12px;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
  border: 1px solid #e5e7eb;
}

.contact-card h3 {
  font-size: 1.3rem;
  font-weight: 600;
  color: #10375c;
  margin-bottom: 1.5rem;
  text-align: center;
}

.contact-item {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin-bottom: 1.5rem;
}

.contact-item:last-child {
  margin-bottom: 0;
}

/* Contenedor de iconos con sistema de cambio de imagen */
.contact-icon {
  width: 40px;
  height: 40px;
  background: transparent;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  position: relative;
}

.contact-icon img {
  width: 20px;
  height: 20px;
  object-fit: contain;
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
}

/* En modo claro, mostrar iconos oscuros y ocultar iconos claros */
.contact-icon .icon-light {
  display: block;
}

.contact-icon .icon-dark {
  display: none;
}

.contact-details {
  flex: 1;
}

.contact-details strong {
  display: block;
  color: #374151;
  font-size: 0.9rem;
  margin-bottom: 0.25rem;
}

/* Enlaces de contacto - Sin animación en modo claro */
.contact-details .contact-link {
  color: #10375c;
  text-decoration: none;
  font-weight: 500;
  transition: none; /* Sin transición en modo claro */
}

.contact-details .contact-link:hover {
  text-decoration: underline;
  color: #10375c; /* Mantener el mismo color */
}

/* Modo oscuro */
body.dark-mode .contact-header h1 {
  color: #ffffff;
}

body.dark-mode .contact-header p {
  color: rgba(255, 255, 255, 0.8);
}

body.dark-mode .contact-form-container,
body.dark-mode .contact-card {
  background-color: #071326;
  border-color: #1f2937;
}

body.dark-mode .form-group label {
  color: #ffffff;
}

body.dark-mode .form-group input,
body.dark-mode .form-group textarea {
  background-color: #0f1419;
  border-color: #374151;
  color: #ffffff;
}

body.dark-mode .form-group input:focus,
body.dark-mode .form-group textarea:focus {
  border-color: #10375c;
  box-shadow: 0 0 0 3px rgba(16, 55, 92, 0.2);
}

body.dark-mode .form-group small {
  color: rgba(255, 255, 255, 0.6);
}

body.dark-mode .checkmark {
  border-color: #4b5563;
}

body.dark-mode .contact-card h3 {
  color: #ffffff;
}

body.dark-mode .contact-details strong {
  color: #ffffff;
}

/* Botón en modo oscuro - Gradiente */
body.dark-mode .submit-button {
  background: linear-gradient(135deg, #10375c 0%, #0c2d48 100%);
}

body.dark-mode .submit-button:hover {
  background: linear-gradient(135deg, #0c2d48 0%, #081f33 100%);
}

/* En modo oscuro, mostrar iconos claros y ocultar iconos oscuros */
body.dark-mode .contact-icon .icon-light {
  display: none;
}

body.dark-mode .contact-icon .icon-dark {
  display: block;
}

/* Icono en modo oscuro - mantener fondo oscuro para contraste */
body.dark-mode .contact-icon {
  background-color: #1f2937;
}

/* Enlaces de contacto en modo oscuro - Con animación */
body.dark-mode .contact-details .contact-link {
  color: #ffffff;
  transition: color 0.2s; /* Restaurar transición en modo oscuro */
}

body.dark-mode .contact-details .contact-link:hover {
  color: #ffffff;
  text-decoration: underline;
}

/* Política de tratamiento en modo oscuro - blanco y negrita */
body.dark-mode .authorization-label a {
  color: #ffffff;
  font-weight: 700;
}

body.dark-mode .authorization-label a:hover {
  color: #ffffff;
  text-decoration: underline;
}

/* Social media section styles for contact page */
.contact-social-section {
  margin-top: 1.5rem;
  padding-top: 1.5rem;
  border-top: 1px solid #e5e7eb;
}

.contact-social-section .social-title {
  display: block;
  color: #374151;
  font-size: 0.9rem;
  margin-bottom: 1rem;
  text-align: center;
}

.contact-social-icons {
  display: flex;
  gap: 1rem;
  justify-content: center;
  flex-wrap: wrap;
}

.contact-social-icons a {
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  background-color: #f8f9fa;
  border-radius: 8px;
  transition: all 0.2s;
  position: relative;
}

.contact-social-icons a:hover {
  transform: translateY(-3px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.contact-social-icons img {
  width: 24px;
  height: 24px;
  object-fit: contain;
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
}

.contact-social-icons .social-icon-light {
  display: block;
}

.contact-social-icons .social-icon-dark {
  display: none;
}

body.dark-mode .contact-social-section {
  border-top-color: #374151;
}

body.dark-mode .contact-social-section .social-title {
  color: #ffffff;
}

body.dark-mode .contact-social-icons a {
  background-color: #1f2937;
}

body.dark-mode .contact-social-icons .social-icon-light {
  display: none;
}

body.dark-mode .contact-social-icons .social-icon-dark {
  display: block;
}

/* Responsive */
@media (max-width: 1024px) {
  .contact-content {
    grid-template-columns: 1fr;
    gap: 2rem;
  }

  .contact-info-sidebar {
    order: -1;
  }
}

@media (max-width: 768px) {
  .contact-page {
    padding: 2rem 0;
  }

  .contact-header h1 {
    font-size: 2rem;
  }

  .contact-form-container,
  .contact-card {
    padding: 1.5rem;
  }

  .form-row {
    grid-template-columns: 1fr;
    gap: 1rem;
  }

  .contact-info-sidebar {
    flex-direction: row;
    overflow-x: auto;
    gap: 1rem;
  }

  .contact-card {
    min-width: 280px;
    flex-shrink: 0;
  }

  /* Ajuste para checkbox en móvil */
  .authorization-label {
    align-items: flex-start;
  }

  .checkmark {
    margin-top: 3px;
  }
}

@media (max-width: 480px) {
  .contact-header h1 {
    font-size: 1.75rem;
  }

  .contact-form-container,
  .contact-card {
    padding: 1rem;
  }

  .submit-button {
    padding: 0.875rem 2rem;
    font-size: 1rem;
  }

  .contact-info-sidebar {
    flex-direction: column;
  }

  .contact-card {
    min-width: auto;
  }

  .authorization-container {
    padding: 0.75rem;
  }
}

/* ==============================
   NOTIFICACIONES DE VALIDACIÓN
   ============================== */

/* Notificación de campo requerido (temporal) */
.field-required-notification {
  background-color: #fff3cd;
  border: 1px solid #ffeaa7;
  color: #856404;
  padding: 0.75rem 1rem;
  border-radius: 6px;
  margin-top: 0.5rem;
  font-size: 0.9rem;
  display: flex;
  align-items: center;
  animation: slideInDown 0.3s ease;
}

.field-required-notification::before {
  content: "⚠️";
  margin-right: 0.5rem;
}

/* Campo con error requerido */
.form-group input.required-error,
.form-group textarea.required-error {
  border-color: #ffc107;
  box-shadow: 0 0 0 3px rgba(255, 193, 7, 0.2);
  animation: shake 0.5s ease-in-out;
}

/* Notificación de éxito para archivos */
.field-success {
  background-color: #d4edda;
  border: 1px solid #c3e6cb;
  color: #155724;
  padding: 0.75rem 1rem;
  border-radius: 6px;
  margin-top: 0.5rem;
  font-size: 0.9rem;
  display: flex;
  align-items: center;
}

.field-success::before {
  content: "✅";
  margin-right: 0.5rem;
}

/* Resumen de validación del formulario */
.form-validation-summary {
  background-color: #f8d7da;
  border: 1px solid #f5c6cb;
  color: #721c24;
  padding: 1rem;
  border-radius: 6px;
  margin-bottom: 1.5rem;
  text-align: center;
  font-weight: 500;
  animation: slideInDown 0.3s ease;
}

.form-validation-summary::before {
  content: "❌";
  margin-right: 0.5rem;
}

/* Notificación de envío */
.form-sending-notification {
  background-color: #cce7ff;
  border: 1px solid #99d6ff;
  color: #0066cc;
  padding: 0.75rem 1rem;
  border-radius: 6px;
  margin-top: 1rem;
  text-align: center;
  font-weight: 500;
  animation: pulse 1.5s infinite;
}

/* Información sobre respuesta automática */
.contact-info-notice {
  background: linear-gradient(135deg, #e3f2fd 0%, #f3e5f5 100%);
  border: 1px solid #90caf9;
  border-radius: 8px;
  padding: 1.5rem;
  margin: 1.5rem 0;
  text-align: center;
}

.contact-info-notice p {
  margin: 0;
  color: #1565c0;
  font-size: 0.95rem;
  line-height: 1.5;
}

/* Animaciones */
@keyframes slideInDown {
  from {
    opacity: 0;
    transform: translateY(-10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes shake {
  0%,
  100% {
    transform: translateX(0);
  }
  25% {
    transform: translateX(-5px);
  }
  75% {
    transform: translateX(5px);
  }
}

@keyframes pulse {
  0%,
  100% {
    opacity: 1;
  }
  50% {
    opacity: 0.7;
  }
}

/* Modo oscuro para notificaciones */
body.dark-mode .field-required-notification {
  background-color: #2d1b00;
  border-color: #664d00;
  color: #ffcc00;
}

body.dark-mode .field-success {
  background-color: #0d2818;
  border-color: #1e5128;
  color: #4caf50;
}

body.dark-mode .form-validation-summary {
  background-color: #2d1b1e;
  border-color: #5a1a1a;
  color: #ff6b6b;
}

body.dark-mode .form-sending-notification {
  background-color: #1a2332;
  border-color: #2d4a66;
  color: #64b5f6;
}

body.dark-mode .contact-info-notice {
  background: linear-gradient(135deg, #1a2332 0%, #2d1b2f 100%);
  border-color: #2d4a66;
}

body.dark-mode .contact-info-notice p {
  color: #90caf9;
}

/* Responsive para notificaciones */
@media (max-width: 768px) {
  .contact-info-notice {
    padding: 1rem;
    margin: 1rem 0;
  }

  .contact-info-notice p {
    font-size: 0.9rem;
  }

  .field-required-notification,
  .field-success,
  .form-validation-summary,
  .form-sending-notification {
    font-size: 0.85rem;
    padding: 0.6rem 0.8rem;
  }
}
