.glass-search {
  background: rgba(255, 255, 255, 0.1);
  backdrop-filter: blur(4px);
  border: 1px solid rgba(255, 255, 255, 0.3);
}

.text-outline {
  -webkit-text-stroke: 1px rgba(255, 255, 255, 0.1);
}

.liquid-overlay {
  background: linear-gradient(
    135deg,
    rgba(54, 12, 104, 0.85) 0%,
    rgba(35, 98, 195, 0.7) 100%
  );
}

/* Fallback para gradientes (si Tailwind no llegara a aplicar clases custom) */
.footer-gradient {
  background: linear-gradient(90deg, #a78bfa 0%, #60a5fa 100%);
}

/* Layout responsive - footer ajustado dinámicamente */
html {
  overflow-x: hidden;
  height: 100%;
}

body {
  min-height: 100vh;
  overflow-x: hidden;
  margin: 0;
  padding: 0;
}

main {
  display: flex;
  flex-direction: column;
  flex: 1;
  min-height: 0;
}

main > *:last-child {
  margin-top: auto;
}

/* Evitar espacios extra que causen scroll innecesario */
* {
  box-sizing: border-box;
}

nav, header, section, footer {
  flex-shrink: 0;
}

/* Hero - ajuste responsive */
header {
  height: auto;
}

/* Hero ocupa todo el espacio disponible menos navbar y footer */
@media (min-width: 768px) {
  header {
    min-height: calc(100vh - 200px); /* viewport - navbar - footer */
    height: auto;
  }
}

@media (min-width: 1024px) {
  header {
    min-height: calc(100vh - 190px);
    height: auto;
  }
}

@media (min-width: 1280px) {
  header {
    min-height: calc(100vh - 180px);
    height: auto;
  }
}

/* ====================================
   CSS DINÁMICO PARA DISPOSITIVOS MÓVILES
   ==================================== */

/* Detección de dispositivos móviles (max 767px) */
@media (max-width: 767px) {
  /* Navbar móvil optimizado (logo h-11 + padding compacto) */
  nav {
    min-height: 72px;
    padding-top: 0.75rem;
    padding-bottom: 0.75rem;
  }
  
  .navbar-container {
    min-height: 52px;
  }
  
  .navbar-logo span {
    font-size: 1.25rem;
  }
  
  /* Hero móvil optimizado */
  header {
    min-height: calc(100vh - 220px) !important;
    height: auto;
  }
  
  header .relative.z-10.w-full {
    padding-left: 1rem;
    padding-right: 1rem;
    padding-top: 2rem;
    padding-bottom: 2rem;
  }
  
  /* Footer móvil optimizado */
  .footer-gradient .relative.z-10.w-full {
    padding-left: 1rem;
    padding-right: 1rem;
    padding-top: 2rem;
    padding-bottom: 2rem;
  }
  
  .footer-gradient .grid {
    gap: 1.5rem;
  }
  
  /* Tipografía móvil */
  .footer-gradient h3 {
    font-size: 1.5rem;
    line-height: 1.3;
  }
  
  .footer-gradient p {
    font-size: 0.875rem;
    line-height: 1.6;
  }
}

/* Móvil en orientación portrait */
@media (max-width: 767px) and (orientation: portrait) {
  header {
    min-height: calc(100vh - 220px) !important;
  }
  
  .footer-gradient {
    min-height: auto;
  }
}

/* Móvil en orientación landscape */
@media (max-width: 767px) and (orientation: landscape) {
  header {
    min-height: calc(100vh - 180px) !important;
  }
  
  nav {
    min-height: 72px;
  }
}

/* Dispositivos muy pequeños (max 375px) */
@media (max-width: 375px) {
  nav {
    padding-left: 0.75rem;
    padding-right: 0.75rem;
  }
  
  header .relative.z-10.w-full {
    padding-left: 0.75rem;
    padding-right: 0.75rem;
  }
  
  .footer-gradient .relative.z-10.w-full {
    padding-left: 0.75rem;
    padding-right: 0.75rem;
  }
  
  .navbar-logo span {
    font-size: 1.125rem;
  }
}

/* Touch devices - áreas táctiles más grandes */
@media (hover: none) and (pointer: coarse) {
  /* Links y botones más grandes para touch */
  .navbar-links a {
    padding: 0.75rem 1rem;
    min-height: 44px;
    display: flex;
    align-items: center;
  }
  
  button, a {
    min-height: 44px;
    min-width: 44px;
  }
  
  /* Social icons más grandes para touch */
  .navbar-right .social-icons a,
  .navbar-right .login-btn {
    width: 44px;
    height: 44px;
  }
}

/* Soporte para notch (iPhone X+) */
@supports (padding: max(0px)) {
  header,
  nav,
  .footer-gradient {
    padding-left: max(1rem, env(safe-area-inset-left));
    padding-right: max(1rem, env(safe-area-inset-right));
  }
}

/* Optimización para pantallas de alta densidad */
@media (-webkit-min-device-pixel-ratio: 2), (min-resolution: 192dpi) {
  header img {
    image-rendering: -webkit-optimize-contrast;
    image-rendering: crisp-edges;
  }
}

/* Hero - optimización de calidad de imagen */
.hero-image-zoom {
  /* Reducir zoom manteniendo object-cover */
  transform: scale(1);
  transform-origin: center center;
  /* Mejorar rendering de imagen */
  image-rendering: -webkit-optimize-contrast;
  image-rendering: -moz-crisp-edges;
  image-rendering: crisp-edges;
  /* Anti-aliasing mejorado */
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  /* Calidad de transformación */
  backface-visibility: hidden;
  -webkit-backface-visibility: hidden;
}

/* Usar altura de viewport calculada dinámicamente (fix barra de direcciones móvil) */
.mobile-device header {
  min-height: calc(var(--vh, 1vh) * 70);
}

.mobile-device .footer-gradient {
  min-height: calc(var(--vh, 1vh) * 30);
}

/* Optimizaciones adicionales para touch devices */
.touch-device button,
.touch-device a,
.touch-device input {
  -webkit-tap-highlight-color: rgba(96, 53, 208, 0.2);
}

.touch-device * {
  -webkit-touch-callout: none;
  -webkit-user-select: none;
  user-select: none;
}

.touch-device input,
.touch-device textarea {
  -webkit-user-select: text;
  user-select: text;
}


/* Navbar responsive styles */
/* Navbar mejorado - mayor altura, fijo y mejor espaciado */
nav {
  min-height: 72px;
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  width: 100%;
  z-index: 50;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

@media (min-width: 768px) {
  nav {
    min-height: 104px;
  }
}

/* Agregar padding-top al body para compensar el navbar fijo */
body {
  padding-top: 72px;
}

@media (min-width: 768px) {
  body {
    padding-top: 104px;
  }
}

.navbar-container {
  position: relative;
  min-height: 64px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

/* Logo - totalmente a la izquierda (sin margen extra) */
.navbar-logo {
  flex-shrink: 0;
  z-index: 10;
  margin: 0;
  padding: 0;
}

/* Nav links centrados - ajuste responsive */
.navbar-links {
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 5;
}

/* Espaciado base para links */
.navbar-links a {
  font-size: 0.75rem;
  padding: 0.5rem 0.75rem;
}

/* Ajuste de espaciado según viewport */
@media (min-width: 768px) and (max-width: 1023px) {
  .navbar-links {
    gap: 0.5rem;
  }
  
  .navbar-links a {
    font-size: 0.7rem;
    padding: 0.5rem 0.5rem;
  }
}

@media (min-width: 1024px) and (max-width: 1279px) {
  .navbar-links {
    gap: 1rem;
  }
  
  .navbar-links a {
    font-size: 0.8rem;
    padding: 0.5rem 1rem;
  }
}

@media (min-width: 1280px) and (max-width: 1535px) {
  .navbar-links {
    gap: 1.5rem;
  }
  
  .navbar-links a {
    font-size: 0.85rem;
    padding: 0.5rem 1.25rem;
  }
}

@media (min-width: 1536px) {
  .navbar-links {
    gap: 2rem;
  }
  
  .navbar-links a {
    font-size: 0.875rem;
    padding: 0.5rem 1.5rem;
  }
}

/* Redes sociales y login - totalmente a la derecha (sin margen extra) */
.navbar-right {
  flex-shrink: 0;
  z-index: 10;
  margin: 0;
  padding: 0;
}

/* Asegurar que no se solapen en pantallas medianas */
@media (min-width: 768px) and (max-width: 1023px) {
  .navbar-right {
    gap: 0.5rem;
  }
  
  .navbar-right .social-icons {
    gap: 0.25rem;
  }
  
  .navbar-right .social-icons a {
    width: 28px;
    height: 28px;
  }
  
  .navbar-right .login-btn {
    width: 32px;
    height: 32px;
  }
}

/* Ajuste para pantallas muy pequeñas (tablets pequeñas) */
@media (min-width: 640px) and (max-width: 767px) {
  .navbar-links {
    font-size: 0.6rem;
    gap: 0.25rem;
  }
  
  .navbar-logo span {
    font-size: 1.25rem;
  }
}

/* Estructura de 3 columnas para desktop */
@media (min-width: 768px) {
  .navbar-container {
    display: grid;
    grid-template-columns: auto 1fr auto;
    align-items: center;
    gap: 2rem;
  }
  
  .navbar-logo {
    grid-column: 1;
    justify-self: start;
  }
  
  .navbar-links {
    grid-column: 2;
    justify-self: center;
    position: relative;
    left: 0;
    transform: none;
  }
  
  .navbar-right {
    grid-column: 3;
    justify-self: end;
  }
}

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

/* Imagen espejo (flip horizontal) en página de contacto */
.contacto-image-mirror {
  transform: scaleX(-1);
  /* Mantener calidad de imagen durante transformación */
  backface-visibility: hidden;
  -webkit-backface-visibility: hidden;
}

/* Contenedor del formulario de contacto */
.contacto-form-container {
  position: relative;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

/* Efecto de textura sutil en el fondo del formulario */
.contacto-form-container::before {
  content: '';
  position: absolute;
  inset: 0;
  background-image: url('data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSI0IiBoZWlnaHQ9IjQiPgo8cmVjdCB3aWR0aD0iNCIgaGVpZ2h0PSI0IiBmaWxsPSIjZmZmIiBmaWxsLW9wYWNpdHk9IjAuMDUiLz4KPC9zdmc+');
  opacity: 0.3;
  pointer-events: none;
}

/* Asegurar que el contenido del formulario esté sobre el patrón */
.contacto-form-container > * {
  position: relative;
  z-index: 1;
}

/* Animación suave para los inputs al hacer focus */
.contacto-form-container input:focus,
.contacto-form-container textarea:focus {
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

/* Animación sutil de entrada para el formulario */
@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.contacto-form-container {
  animation: fadeInUp 0.6s ease-out;
}

/* Responsive: en móvil, ajustar la imagen espejo */
@media (max-width: 1023px) {
  .contacto-image-mirror {
    object-position: center;
  }
}