/* ========================================
   ESTILOS ESPECÍFICOS PARA PÁGINA DE CONTACTO
   ======================================== */

/* Variables CSS */
:root {
    --primary-color: #2c7be5;
    --primary-dark: #1a5cc2;
    --secondary-color: #f1f5f9;
    --text-dark: #1e293b;
    --text-light: #64748b;
    --white: #ffffff;
    --accent-gold: #d4af37;
    --success-color: #10b981;
    --bg-light: #f8fafc;
    --shadow-sm: 0 2px 4px rgba(0, 0, 0, 0.1);
    --shadow-md: 0 4px 6px rgba(0, 0, 0, 0.15);
    --shadow-lg: 0 10px 25px rgba(0, 0, 0, 0.2);
    --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* ========================================
   HERO SECTION MEJORADA
   ======================================== */
.img-principal {
  position: relative;
  width: 100%;
  height: 50vh;
  overflow: hidden;
  margin-bottom: 3rem;
}

.img-principal img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: brightness(0.6);
}

.img-principal::after {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(to bottom, rgba(0,0,0,0.3), rgba(0,0,0,0.6));
}

.hero-overlay {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  text-align: center;
  color: var(--white);
  z-index: 2;
  width: 90%;
  max-width: 800px;
}

.hero-overlay h1 {
  font-size: clamp(2rem, 5vw, 3.5rem);
  font-weight: 800;
  margin-bottom: 1rem;
  text-shadow: 0 2px 10px rgba(0, 0, 0, 0.5);
  letter-spacing: 1px;
  line-height: 1.2;
}

.hero-overlay p {
  font-size: clamp(1rem, 3vw, 1.3rem);
  font-weight: 300;
  opacity: 0.9;
  text-shadow: 0 1px 5px rgba(0, 0, 0, 0.5);
  line-height: 1.4;
}

/* ========================================
   SECCIÓN DE CONTACTO MEJORADA
   ======================================== */
.main-contenedor {
  max-width: 1400px;
  margin: 0 auto;
  padding: 0 clamp(1rem, 3vw, 5%);
}

.caja-contact {
  text-align: center;
  margin-bottom: 3rem;
  padding: 0 2rem;
}

.caja-contact h2 {
  font-size: 1rem;
  color: var(--primary-color);
  font-weight: 700;
  letter-spacing: 3px;
  text-transform: uppercase;
  margin-bottom: 0.5rem;
}

.caja-contact h3 {
  font-size: 2.5rem;
  color: var(--text-dark);
  font-weight: 800;
  margin-bottom: 1rem;
}

.caja-contact::after {
  content: '';
  display: block;
  width: 80px;
  height: 4px;
  background: var(--primary-color);
  margin: 1rem auto;
  border-radius: 10px;
}

/* Contenedor principal del formulario */
.caja-formulario {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 2rem 4rem;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4rem;
  align-items: start;
}

/* Información de contacto */
.contacto-info {
  background: var(--white);
  border-radius: 20px;
  padding: 2.5rem;
  box-shadow: var(--shadow-lg);
  border: 1px solid rgba(44, 123, 229, 0.1);
  height: fit-content;
}

.contacto-info h4 {
  font-size: 1.4rem;
  color: var(--text-dark);
  margin-bottom: 1.5rem;
  font-weight: 700;
  text-align: center;
  padding-bottom: 1rem;
  border-bottom: 2px solid rgba(44, 123, 229, 0.1);
}

.contacto-info p {
  margin-bottom: 1.5rem;
  font-size: 1rem;
  color: var(--text-light);
  display: flex;
  align-items: flex-start;
  gap: 0.8rem;
  line-height: 1.6;
}

.contacto-info p strong {
  color: var(--text-dark);
  min-width: 180px;
}

/* ========================================
   FORMULARIO DE CONTACTO ESPECÍFICO
   ======================================== */
.formulario-contacto {
  background: var(--white);
  border-radius: 20px;
  padding: 2.5rem;
  box-shadow: var(--shadow-lg);
  border: 1px solid rgba(44, 123, 229, 0.1);
}

.formulario-contacto .caja-nombre,
.formulario-contacto .caja-email,
.formulario-contacto .caja-telefono,
.formulario-contacto .caja-mensaje {
  margin-bottom: 1.5rem;
}

.formulario-contacto label {
  display: block;
  margin-bottom: 0.5rem;
  font-weight: 600;
  color: var(--text-dark);
  font-size: 0.95rem;
}

.formulario-contacto input[type="text"],
.formulario-contacto input[type="email"],
.formulario-contacto input[type="tel"],
.formulario-contacto textarea {
  width: 100%;
  padding: 1rem 1.2rem;
  border: 2px solid #d1d5db;
  border-radius: 12px;
  font-size: 1rem;
  font-family: inherit;
  transition: var(--transition);
  background: var(--white);
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.formulario-contacto input[type="text"]:focus,
.formulario-contacto input[type="email"]:focus,
.formulario-contacto input[type="tel"]:focus,
.formulario-contacto textarea:focus {
  outline: none;
  border-color: var(--primary-color);
  box-shadow: 0 0 0 3px rgba(44, 123, 229, 0.1);
}

.formulario-contacto textarea {
  resize: vertical;
  min-height: 150px;
}

.formulario-contacto .caja-boton {
  text-align: center;
  margin-top: 2rem;
}

.formulario-contacto .caja-boton button {
  padding: 1.2rem 3rem;
  background: linear-gradient(135deg, var(--primary-color), var(--primary-dark));
  color: var(--white);
  border: none;
  border-radius: 50px;
  font-size: 1.1rem;
  font-weight: 700;
  cursor: pointer;
  transition: var(--transition);
  box-shadow: 0 8px 25px rgba(44, 123, 229, 0.35);
}

.formulario-contacto .caja-boton button:hover {
  transform: translateY(-3px);
  box-shadow: 0 12px 30px rgba(44, 123, 229, 0.5);
}

/* ========================================
   MODALES ESPECÍFICOS PARA CONTACTO
   ======================================== */

/* MODAL DE CONFIRMACIÓN DE CONTACTO */
.modal-contacto {
  display: none;
  position: fixed;
  z-index: 1000;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.7);
  backdrop-filter: blur(5px);
  animation: fadeIn 0.3s ease;
  overflow-y: auto;
  padding: 10px;
}

.modal-contacto-contenido {
  background: linear-gradient(135deg, #ffffff 0%, #f8fafc 100%);
  margin: 5% auto;
  padding: 0;
  border-radius: 20px;
  width: 95%;
  max-width: 500px;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
  animation: slideIn 0.3s ease;
  position: relative;
  overflow: hidden;
  max-height: 90vh;
}

.modal-contacto-header {
  background: linear-gradient(135deg, var(--primary-color) 0%, var(--primary-dark) 100%);
  color: white;
  padding: 2rem;
  text-align: center;
  position: relative;
}

.modal-contacto-header h3 {
  margin: 0;
  font-size: 1.5rem;
  font-weight: 700;
  letter-spacing: 0.5px;
  line-height: 1.3;
}

.modal-contacto-cerrar {
  position: absolute;
  top: 1rem;
  right: 1.5rem;
  font-size: 2rem;
  font-weight: bold;
  cursor: pointer;
  transition: var(--transition);
  line-height: 1;
  min-width: 30px;
  min-height: 30px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.modal-contacto-cerrar:hover {
  transform: scale(1.2);
  color: var(--accent-gold);
}

.modal-contacto-body {
  padding: 2.5rem;
  text-align: center;
}

.modal-contacto-footer {
  display: flex;
  gap: 1rem;
  padding: 1.5rem 2.5rem 2.5rem;
  background: rgba(0, 0, 0, 0.02);
  border-top: 1px solid rgba(0, 0, 0, 0.1);
}

/* MODAL DE LOGOUT */
.modal-logout {
  display: none;
  position: fixed;
  z-index: 9999;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.5);
  animation: fadeIn 0.3s ease;
}

.modal-logout-content {
  background-color: #fff;
  margin: 15% auto;
  padding: 0;
  border-radius: 15px;
  width: 90%;
  max-width: 420px;
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.4);
  animation: slideIn 0.3s ease;
  overflow: hidden;
  position: relative;
}

.modal-logout-header {
  background: linear-gradient(135deg, var(--primary-color), var(--primary-dark));
  color: white;
  padding: 1.5rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.modal-logout-header h3 {
  margin: 0;
  font-size: 1.3rem;
  font-weight: 600;
  display: flex;
  align-items: center;
}

.close-logout {
  color: white;
  font-size: 1.8rem;
  font-weight: bold;
  cursor: pointer;
  line-height: 1;
  transition: var(--transition);
  width: 30px;
  height: 30px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
}

.close-logout:hover {
  background-color: rgba(255, 255, 255, 0.2);
  transform: scale(1.1);
}

.modal-logout-body {
  padding: 2.5rem 1.5rem;
  text-align: center;
  background-color: white;
}

.modal-logout-body p {
  margin: 0;
  color: var(--text-dark);
  font-size: 1.1rem;
  line-height: 1.6;
}

.modal-logout-footer {
  padding: 1.5rem;
  display: flex;
  gap: 1rem;
  justify-content: flex-end;
  background-color: var(--bg-light);
  border-top: 1px solid #e2e8f0;
}

/* Botones específicos para modales de contacto */
.btn-cancelar-contacto,
.btn-confirmar-contacto {
  flex: 1;
  padding: 1rem 1.5rem;
  border: none;
  border-radius: 12px;
  font-weight: 600;
  font-size: 1rem;
  cursor: pointer;
  transition: var(--transition);
  letter-spacing: 0.5px;
  min-height: 44px;
}

.btn-cancelar-contacto {
  background: transparent;
  border: 2px solid var(--text-light);
  color: var(--text-light);
}

.btn-cancelar-contacto:hover {
  background: var(--text-light);
  color: var(--white);
  transform: translateY(-2px);
}

.btn-confirmar-contacto {
  background: linear-gradient(135deg, var(--primary-color) 0%, var(--primary-dark) 100%);
  color: var(--white);
  box-shadow: 0 4px 15px rgba(44, 123, 229, 0.3);
}

.btn-confirmar-contacto:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(44, 123, 229, 0.4);
}

/* Botones de logout */
.btn-cancel-logout,
.btn-confirm-logout {
  padding: 0.8rem 1.8rem;
  border: none;
  border-radius: 8px;
  font-weight: 600;
  cursor: pointer;
  transition: var(--transition);
  font-size: 0.95rem;
  min-width: 120px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.btn-cancel-logout {
  background-color: #6b7280;
  color: white;
}

.btn-cancel-logout:hover {
  background-color: #4b5563;
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(107, 114, 128, 0.3);
}

.btn-confirm-logout {
  background-color: #dc3545;
  color: white;
}

.btn-confirm-logout:hover {
  background-color: #c82333;
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(220, 53, 69, 0.3);
}

/* Deshabilitar scroll del body cuando cualquier modal está abierto */
body.modal-open {
  overflow: hidden;
}

/* ========================================
   ESTILOS PARA CONFIRMACIÓN DE CONTACTO
   ======================================== */

.confirmacion-icono {
  width: 80px;
  height: 80px;
  margin: 0 auto 1.5rem;
  border-radius: 50%;
  background: linear-gradient(135deg, rgba(44, 123, 229, 0.1) 0%, rgba(212, 175, 55, 0.1) 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  border: 3px solid var(--primary-color);
}

.confirmacion-icono img {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  object-fit: cover;
}

.modal-contacto-body h4 {
  color: var(--text-dark);
  font-size: 1.3rem;
  margin-bottom: 1rem;
  font-weight: 600;
  line-height: 1.4;
}

.confirmacion-detalles {
  background: rgba(44, 123, 229, 0.05);
  border-radius: 15px;
  padding: 1.5rem;
  margin-bottom: 1.5rem;
  border-left: 4px solid var(--primary-color);
}

.detalle-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.8rem 0;
  border-bottom: 1px solid rgba(0, 0, 0, 0.05);
  flex-wrap: wrap;
  gap: 0.5rem;
}

.detalle-item:last-child {
  border-bottom: none;
}

.detalle-item strong {
  color: var(--text-dark);
  font-weight: 600;
  font-size: 0.95rem;
}

.detalle-item span {
  color: var(--text-light);
  text-align: right;
  font-size: 0.95rem;
  word-break: break-word;
}

.confirmacion-texto {
  color: var(--text-light);
  font-size: 0.9rem;
  line-height: 1.5;
  margin-bottom: 0;
}

/* ========================================
   BOTÓN SCROLL TO TOP
   ======================================== */
#scrollTopBtn {
  display: none;
  position: fixed;
  bottom: 30px;
  right: 30px;
  z-index: 9999;
  font-size: 22px;
  border: none;
  background-color: var(--primary-color);
  color: white;
  cursor: pointer;
  padding: 12px 16px;
  border-radius: 50%;
  box-shadow: var(--shadow-lg);
  transition: var(--transition);
}

#scrollTopBtn:hover {
  background-color: var(--primary-dark);
  transform: translateY(-4px);
}

/* ========================================
   FOOTER
   ======================================== */
footer {
  background: var(--primary-color);
  color: var(--white);
  padding: 3rem 5% 1rem;
  margin-top: 4rem;
}

.footer-content {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 2.5rem;
  margin-bottom: 2rem;
}

.footer-col h4 {
  font-size: 1.2rem;
  margin-bottom: 1.2rem;
  color: var(--white);
  font-weight: 700;
  position: relative;
  padding-bottom: 0.5rem;
}

.footer-col h4::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 40px;
  height: 2px;
  background: var(--accent-gold);
}

.footer-logo img {
  width: 100px;
  height: 100px;
  border-radius: 50%;
  margin-bottom: 1.2rem;
  border: 3px solid rgba(255, 255, 255, 0.2);
}

.footer-logo p {
  color: rgba(255, 255, 255, 0.8);
  line-height: 1.7;
}

.footer-col a {
  display: block;
  color: rgba(255, 255, 255, 0.8);
  text-decoration: none;
  margin-bottom: 0.7rem;
  transition: var(--transition);
}

.footer-col a:hover {
  color: var(--white);
  transform: translateX(5px);
}

.footer-col p {
  color: rgba(255, 255, 255, 0.8);
  margin-bottom: 0.7rem;
  line-height: 1.6;
}

.footer-social {
  display: flex;
  gap: 1rem;
  margin-top: 1rem;
}

.footer-social a {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  background: rgba(255, 255, 255, 0.1);
  border-radius: 50%;
  transition: var(--transition);
  margin-bottom: 0;
  text-decoration: none;
}

.footer-social a:hover {
  background: var(--accent-gold);
  transform: translateY(-3px);
}

.footer-social i {
  font-size: 1.2rem;
  color: var(--white);
}

.footer-bottom {
  text-align: center;
  padding-top: 2rem;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  color: rgba(255, 255, 255, 0.7);
  font-size: 0.9rem;
}

/* ========================================
   ANIMACIONES COMPARTIDAS
   ======================================== */
@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

@keyframes slideIn {
  from {
    opacity: 0;
    transform: translateY(-50px) scale(0.9);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

/* ========================================
   RESPONSIVE DESIGN
   ======================================== */
@media (max-width: 1024px) {
  .caja-formulario {
    grid-template-columns: 1fr;
    gap: 3rem;
  }

  .contacto-info {
    order: 2;
  }

  .formulario-contacto {
    order: 1;
  }
}

@media (max-width: 768px) {
  .caja-formulario {
    padding: 0 1rem 3rem;
  }

  .contacto-info,
  .formulario-contacto {
    padding: 2rem;
  }

  .contacto-info p {
    flex-direction: column;
    gap: 0.3rem;
  }

  .contacto-info p strong {
    min-width: auto;
  }

  .modal-contacto-contenido {
    margin: 10% auto;
    width: 98%;
  }

  .modal-contacto-body {
    padding: 1.5rem;
  }

  .modal-contacto-footer {
    flex-direction: column;
    padding: 1rem 1.5rem 1.5rem;
  }

  /* Footer responsive */
  footer {
    text-align: center;
  }

  .footer-col h4 {
    border-left: none;
    border-bottom: 2px solid rgba(255, 255, 255, 0.3);
    display: inline-block;
    padding: 0 0 6px 0;
  }

  .footer-col h4::after {
    display: none;
  }

  .footer-social {
    justify-content: center;
  }

  .footer-col a:hover {
    transform: none;
  }

  /* Modal logout responsive */
  .modal-logout-content {
    margin: 20% auto;
    width: 95%;
  }

  .modal-logout-footer {
    flex-direction: column;
  }

  .btn-cancel-logout,
  .btn-confirm-logout {
    width: 100%;
    min-width: auto;
  }

  .modal-logout-body {
    padding: 2rem 1rem;
  }
}

@media (max-width: 480px) {
  .caja-contact h3 {
    font-size: 2rem;
  }

  .contacto-info,
  .formulario-contacto {
    padding: 1.5rem;
    border-radius: 15px;
  }

  .formulario-contacto input[type="text"],
  .formulario-contacto input[type="email"],
  .formulario-contacto input[type="tel"],
  .formulario-contacto textarea {
    padding: 0.9rem 1rem;
    font-size: 16px; /* Prevenir zoom en iOS */
  }

  .formulario-contacto .caja-boton button {
    width: 100%;
    padding: 1.1rem 2rem;
  }

  .modal-contacto-contenido {
    width: 98%;
    margin: 5% auto;
  }

  .modal-contacto-header {
    padding: 1.5rem;
  }

  .modal-contacto-body {
    padding: 1.5rem 1rem;
  }

  .confirmacion-detalles {
    padding: 1rem;
  }

  .detalle-item {
    flex-direction: column;
    align-items: flex-start;
    gap: 0.25rem;
  }

  .detalle-item span {
    text-align: left;
  }
}

/* Dispositivos muy pequeños */
@media (max-width: 360px) {
  .hero-overlay h1 {
    font-size: 1.5rem;
  }

  .hero-overlay p {
    font-size: 0.8rem;
  }

  .caja-contact {
    padding: 0 0.5rem;
  }

  .caja-contact h3 {
    font-size: 1.8rem;
  }

  .contacto-info,
  .formulario-contacto {
    padding: 1rem;
  }

  .modal-contacto-contenido {
    width: 99%;
    margin: 2% auto;
  }

  .modal-contacto-header h3 {
    font-size: 1.2rem;
  }

  .modal-contacto-body h4 {
    font-size: 1.1rem;
  }
}