@import url('https://fonts.googleapis.com/css2?family=Poppins:wght@300;400;500;600;700&display=swap');

body {
  background: #1C1E6D;
  font-family: 'Poppins', sans-serif;
  margin: 0;
  padding: 0;
  min-height: 100vh;
}

/* ===== NAVBAR GENERAL ===== */
nav {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  z-index: 1000;
  background-color: #1C1E6D;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
  backdrop-filter: blur(10px);
}

/* ===== CONTENEDOR DE NAVBAR ===== */
.navbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 20px;
  height: 50px;
  max-width: 1200px;
  margin: 0 auto;
}

/* ===== LOGO ===== */
.navbar img.logo {
  height: 40px;
  object-fit: contain;
}

/* ===== LISTA DE ENLACES ===== */
.navbar ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
}

/* ===== CADA ITEM DE LA LISTA ===== */
.navbar ul li {
  padding: 0 10px;
}

/* ===== ENLACES ===== */
.navbar ul li a {
  text-decoration: none;
  color: #fff;
  font-size: 14px;
  position: relative;
  transition: color 0.3s ease;
  padding: 0.5rem 1rem;
  border-radius: 5px;
}

/* ===== LÍNEA DEBAJO ENLACE ===== */
.navbar ul li a::after {
  content: '';
  width: 0%;
  height: 2px;
  background-color: #4B58F4;
  position: absolute;
  bottom: -4px;
  left: 0;
  transition: width 0.3s ease;
}

.navbar ul li a:hover::after {
  width: 100%;
}

.navbar ul li a:hover {
  background: rgba(255, 255, 255, 0.1);
}

/* ===== SECCIÓN DEBAJO DEL NAVBAR ===== */
section {
  padding-top: 60px;
}

/* ===== CONTENIDO PRINCIPAL DE CONTACTO ===== */
.main-content {
  padding-top: 80px;
  min-height: calc(100vh - 140px);
  display: flex;
  align-items: center;
  justify-content: center;
}

.contact-container {
  max-width: 1200px;
  width: 100%;
  padding: 2rem;
  margin: 0 auto;
}

.contact-header {
  text-align: center;
  margin-bottom: 3rem;
}

.contact-title {
  font-size: 3rem;
  font-weight: bold;
  margin-bottom: 1rem;
  background: linear-gradient(45deg, #ffffff, #c7c7ff);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  color: white;
}

.contact-subtitle {
  font-size: 1.2rem;
  color: rgba(255, 255, 255, 0.8);
  max-width: 600px;
  margin: 0 auto;
}

.contact-content {
  display: grid;
  grid-template-columns: 1fr 2fr;
  gap: 3rem;
  align-items: start;
}

/* ===== INFORMACIÓN DE CONTACTO ===== */
.contact-info {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.info-card {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 15px;
  padding: 1.5rem;
  text-align: center;
  transition: all 0.3s ease;
  backdrop-filter: blur(10px);
}

.info-card:hover {
  background: rgba(255, 255, 255, 0.1);
  transform: translateY(-5px);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
}

.info-icon {
  font-size: 2rem;
  margin-bottom: 1rem;
}

.info-card h3 {
  font-size: 1.2rem;
  margin-bottom: 0.5rem;
  color: white;
}

.info-card p {
  color: rgba(255, 255, 255, 0.8);
  margin: 0;
}

/* ===== FORMULARIO ===== */
.contact-form {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 20px;
  padding: 2rem;
  backdrop-filter: blur(10px);
}

.form-group {
  margin-bottom: 1.5rem;
}

.form-label {
  display: block;
  margin-bottom: 0.5rem;
  color: white;
  font-weight: 500;
}

.form-input,
.form-textarea {
  width: 100%;
  padding: 1rem;
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 10px;
  color: white;
  font-size: 1rem;
  font-family: 'Poppins', sans-serif;
  transition: all 0.3s ease;
  backdrop-filter: blur(5px);
  box-sizing: border-box;
}

.form-input:focus,
.form-textarea:focus {
  outline: none;
  border-color: #4B58F4;
  background: rgba(255, 255, 255, 0.15);
  box-shadow: 0 0 20px rgba(75, 88, 244, 0.3);
}

.form-input::placeholder,
.form-textarea::placeholder {
  color: rgba(255, 255, 255, 0.5);
}

.form-button {
  width: 100%;
  padding: 1rem 2rem;
  background: linear-gradient(45deg, #4B58F4, #586EFF);
  border: none;
  border-radius: 10px;
  color: white;
  font-size: 1.1rem;
  font-weight: 600;
  font-family: 'Poppins', sans-serif;
  cursor: pointer;
  transition: all 0.3s ease;
  position: relative;
  overflow: hidden;
}

.form-button:hover {
  transform: translateY(-2px);
  box-shadow: 0 10px 30px rgba(75, 88, 244, 0.4);
}

.form-button:active {
  transform: translateY(0);
}

.button-text {
  transition: opacity 0.3s ease;
}

.button-loader {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 20px;
  height: 20px;
  border: 2px solid transparent;
  border-top: 2px solid white;
  border-radius: 50%;
  opacity: 0;
  animation: spin 1s linear infinite;
}

.form-button.loading .button-text {
  opacity: 0;
}

.form-button.loading .button-loader {
  opacity: 1;
}

@keyframes spin {
  0% { transform: translate(-50%, -50%) rotate(0deg); }
  100% { transform: translate(-50%, -50%) rotate(360deg); }
}

/* ===== ERRORES DE VALIDACIÓN ===== */
.field-error {
  color: #ef4444;
  font-size: 0.8rem;
  margin-top: 0.25rem;
  display: block;
  animation: slideDown 0.3s ease;
}

@keyframes slideDown {
  from {
    opacity: 0;
    transform: translateY(-10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* ===== ESTILOS ORIGINALES MANTENIDOS ===== */
h2, .text1 {
  color: white;
  text-align: center;
  font-size: 100px;
  margin-top: 0;
  margin-bottom: 50px;
  line-height: 1;
  padding: 0;
}

/* ===== BOTÓN AZUL ===== */
.text2 {
  border: 2px solid #586EFF;
  background-color: #586EFF;
  padding: 10px 20px;
  width: 600px;
  border-radius: 35px;
  color: #FFFFFF;
  opacity: 0.9;
  text-align: center;
  margin: 0 auto;
  white-space: nowrap;
  line-height: 1.2;
  display: block;
  font-size: 30px;
}

/* ===== IMAGEN LOGO DEBAJO ===== */
.l {
  width: 250px;
  height: 170px;
  display: block;
  margin: auto;
}

/* ===== FOOTER ===== */
.footer {
  background-color: #1A1B4B;
  color: #FFFFFF;
  padding: 30px 20px;
  text-align: center;
  margin-top: 60px;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.footer-content {
  max-width: 1200px;
  margin: 0 auto;
}

.footer p {
  margin: 0;
  font-size: 14px;
  color: rgba(255, 255, 255, 0.7);
}

.footer-links {
  list-style: none;
  padding: 10px 0 0;
  margin: 0;
  display: flex;
  justify-content: center;
  gap: 20px;
}

.footer-links li a {
  color: #CCCCFF;
  text-decoration: none;
  font-size: 14px;
  transition: color 0.3s ease;
}

/* ===== ANIMACIÓN puff-in-center ===== */
@-webkit-keyframes puff-in-center {
  0% {
    -webkit-transform: scale(2);
    transform: scale(2);
    -webkit-filter: blur(4px);
    filter: blur(4px);
    opacity: 0;
  }
  100% {
    -webkit-transform: scale(1);
    transform: scale(1);
    -webkit-filter: blur(0px);
    filter: blur(0px);
    opacity: 1;
  }
}
@keyframes puff-in-center {
  0% {
    -webkit-transform: scale(2);
    transform: scale(2);
    -webkit-filter: blur(4px);
    filter: blur(4px);
    opacity: 0;
  }
  100% {
    -webkit-transform: scale(1);
    transform: scale(1);
    -webkit-filter: blur(0px);
    filter: blur(0px);
    opacity: 1;
  }
}
.puff-in-center {
  -webkit-animation: puff-in-center 0.7s ease-out both;
  animation: puff-in-center 0.7s ease-out both;
}

/* ===== ANIMACIÓN scale-in-hor-left ===== */
@keyframes scale-in-hor-left {
  0% {
    transform: scaleX(0);
    transform-origin: 0% 0%;
    opacity: 1;
  }
  100% {
    transform: scaleX(1);
    transform-origin: 0% 0%;
    opacity: 1;
  }
}
.scale-in-hor-left {
  animation: scale-in-hor-left 1s cubic-bezier(0.250, 0.460, 0.450, 0.940) both;
}

/* ===== BLOQUE INFORMATIVO SIN BORDE ===== */
.dpt {
  border: none;
  border-radius: 15px;
  padding: 20px;
  background-color: #ffffff;
  text-align: left;
  width: 320px;
  margin: 40px 40px;
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
  font-size: 16px;
  line-height: 1.5;
}

/* ===== TEXTO CON DEGRADADO ===== */
.gradient-text {
  background: linear-gradient(90deg, #FF7E5F, #FEB47B);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  font-weight: 700;
  font-size: 1.8em;
}

/* ===== FONDO ALTERNATIVO ===== */
.obc {
  background-color: #B2C2D9;
  padding: 20px;
}

/* ===== NOTIFICACIÓN FIJA ===== */
.notificacion {
  position: fixed;
  bottom: 20px;
  right: 20px;
  background-color: #586EFF;
  color: white;
  padding: 15px 20px;
  border-radius: 10px;
  box-shadow: 0 4px 10px rgba(0,0,0,0.3);
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 16px;
  max-width: 300px;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.5s ease;
  z-index: 9999;
}

.notificacion.mostrar {
  opacity: 1;
  pointer-events: auto;
}

.notificacion-logo {
  width: 40px;
  height: 40px;
  object-fit: contain;
  border-radius: 5px;
}

/* ===== ANIMACIONES PARA NOTIFICACIONES ===== */
@keyframes slideInRight {
  from {
    opacity: 0;
    transform: translateX(100%);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

@keyframes fadeOut {
  from {
    opacity: 1;
  }
  to {
    opacity: 0;
  }
}

/* ===== RESPONSIVE SOLO PARA FORMULARIO DE CONTACTO ===== */

@media (max-width: 768px) {
  /* Contenido principal más compacto */
  .main-content {
    padding-top: 80px;
    padding-left: 1rem;
    padding-right: 1rem;
  }
  
  .contact-container {
    padding: 1rem;
  }

  /* Título más pequeño en móvil */
  .contact-title {
    font-size: 2.5rem !important;
    margin-bottom: 1rem;
  }

  .contact-subtitle {
    font-size: 1rem !important;
    padding: 0 1rem;
  }

  /* Layout en columna para móvil */
  .contact-content {
    grid-template-columns: 1fr !important;
    gap: 2rem !important;
  }

  /* Tarjetas de información más compactas */
  .contact-info {
    gap: 1rem;
  }

  .info-card {
    padding: 1rem !important;
    margin-bottom: 1rem;
  }

  .info-card h3 {
    font-size: 1rem;
  }

  .info-card p {
    font-size: 0.9rem;
  }

  /* Formulario optimizado para móvil */
  .contact-form {
    padding: 1.5rem !important;
    border-radius: 15px;
  }

  .form-input,
  .form-textarea {
    padding: 0.8rem !important;
    font-size: 16px !important; /* Evita zoom en iOS */
    border-radius: 8px;
  }

  .form-label {
    font-size: 0.9rem;
    margin-bottom: 0.3rem;
  }

  .form-button {
    padding: 1rem !important;
    font-size: 1rem !important;
    border-radius: 8px;
    margin-top: 1rem;
  }

  /* Footer compacto */
  .footer {
    padding: 20px 1rem !important;
    margin-top: 3rem;
  }

  .footer p {
    font-size: 13px !important;
  }
}

@media (max-width: 480px) {
  /* Título aún más pequeño en pantallas muy pequeñas */
  .contact-title {
    font-size: 2rem !important;
  }

  .contact-subtitle {
    font-size: 0.9rem !important;
  }

  /* Tarjetas de información en stack */
  .info-card {
    padding: 0.8rem !important;
  }

  .info-icon {
    font-size: 1.5rem !important;
  }

  /* Formulario muy compacto */
  .contact-form {
    padding: 1rem !important;
  }

  .form-group {
    margin-bottom: 1rem !important;
  }

  /* Botón más grande para fácil toque */
  .form-button {
    padding: 1.2rem !important;
    font-size: 1.1rem !important;
    font-weight: bold;
  }
}

/* ===== MEJORAS ESPECÍFICAS PARA TÁCTIL ===== */
@media (hover: none) and (pointer: coarse) {
  /* Elementos más grandes para pantallas táctiles */
  .form-input,
  .form-textarea {
    min-height: 48px; /* Tamaño mínimo recomendado para táctil */
  }

  .form-button {
    min-height: 48px;
  }

  .info-card {
    min-height: 100px;
  }

  /* Espaciado mayor entre elementos tocables */
  .form-group {
    margin-bottom: 1.5rem;
  }
}

/* ===== ORIENTACIÓN HORIZONTAL EN MÓVIL ===== */
@media (max-width: 768px) and (orientation: landscape) {
  .main-content {
    padding-top: 80px;
  }

  .contact-title {
    font-size: 2rem !important;
    margin-bottom: 0.5rem;
  }

  .contact-subtitle {
    font-size: 0.9rem !important;
    margin-bottom: 1.5rem;
  }

  .contact-content {
    gap: 1.5rem !important;
  }
}

/* ===== SCROLL SUAVE EN MÓVIL ===== */
html {
  scroll-behavior: smooth;
  -webkit-overflow-scrolling: touch;
}

/* ===== EVITAR ZOOM EN INPUTS EN iOS ===== */
@media screen and (-webkit-min-device-pixel-ratio: 0) {
  .form-input,
  .form-textarea {
    font-size: 16px !important;
  }
}