/* ========================================
   MEJORAS DE RESPONSIVIDAD PARA SINSARRO
   UPDATED 2025 - MODO OSCURO DESACTIVADO
   ======================================== */

/* Variables CSS mejoradas para responsividad */
:root {
  /* Breakpoints */
  --breakpoint-xs: 320px;
  --breakpoint-sm: 576px;
  --breakpoint-md: 768px;
  --breakpoint-lg: 992px;
  --breakpoint-xl: 1200px;
  --breakpoint-xxl: 1400px;
  
  /* Espaciados fluidos */
  --spacing-xs: clamp(0.5rem, 2vw, 1rem);
  --spacing-sm: clamp(1rem, 3vw, 1.5rem);
  --spacing-md: clamp(1.5rem, 4vw, 2rem);
  --spacing-lg: clamp(2rem, 5vw, 3rem);
  --spacing-xl: clamp(3rem, 8vw, 5rem);
  
  /* Tipografía fluida */
  --font-size-xs: clamp(0.75rem, 2vw, 0.875rem);
  --font-size-sm: clamp(0.875rem, 2.5vw, 1rem);
  --font-size-base: clamp(1rem, 3vw, 1.125rem);
  --font-size-lg: clamp(1.125rem, 3.5vw, 1.25rem);
  --font-size-xl: clamp(1.25rem, 4vw, 1.5rem);
  --font-size-2xl: clamp(1.5rem, 5vw, 2rem);
  --font-size-3xl: clamp(2rem, 6vw, 3rem);
  --font-size-4xl: clamp(2.5rem, 8vw, 4rem);
}

/* ========================================
   MEJORAS GENERALES
   ======================================== */

/* Prevención de overflow horizontal */
html {
  overflow-x: hidden;
  scroll-behavior: smooth;
}

body {
  overflow-x: hidden;
  max-width: 100vw;
  font-size: var(--font-size-base);
  line-height: 1.6;
}

/* Container mejorado */
.container {
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 var(--spacing-sm);
}

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

.header {
  position: fixed;
  width: 100%;
  top: 0;
  z-index: 1000;
  background-color: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  box-shadow: 0 2px 20px rgba(0, 0, 0, 0.1);
}

.header-container {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: var(--spacing-sm);
  min-height: 70px;
}

.logo img {
  height: clamp(35px, 8vw, 50px);
  width: auto;
}

/* Navegación responsive */
.nav-menu {
  display: flex;
  list-style: none;
  margin: 0;
  padding: 0;
  gap: var(--spacing-md);
}

.nav-link {
  font-family: 'Montserrat', sans-serif;
  font-weight: 600;
  font-size: var(--font-size-sm);
  color: var(--dark-gray);
  text-decoration: none;
  padding: var(--spacing-xs);
  border-radius: 4px;
  transition: all 0.3s ease;
}

/* ========================================
   HERO SECTION RESPONSIVE
   ======================================== */

.hero {
  background: var(--gradient-primary);
  color: var(--white);
  padding: clamp(100px, 15vh, 220px) 0 clamp(60px, 10vh, 120px);
  text-align: center;
  position: relative;
  overflow: hidden;
  min-height: 60vh;
}

.hero-content {
  max-width: 800px;
  margin: 0 auto;
  position: relative;
  z-index: 2;
  padding: 0 var(--spacing-sm);
}

.hero h1 {
  font-size: clamp(1.75rem, 8vw, 3.5rem);
  font-weight: 700;
  color: var(--white);
  margin-bottom: var(--spacing-md);
  line-height: 1.2;
  text-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.hero p {
  font-size: clamp(1rem, 4vw, 1.25rem);
  margin-bottom: var(--spacing-lg);
  opacity: 0.9;
  max-width: 700px;
  margin-left: auto;
  margin-right: auto;
}

/* Hero banner responsive */
.hero-banner {
  position: absolute;
  top: clamp(70px, 12vh, 100px);
  left: 50%;
  transform: translateX(-50%);
  background: linear-gradient(135deg, #FFD700, #FFFF00, #FFF8DC);
  color: #333;
  padding: clamp(10px, 3vw, 15px) clamp(15px, 4vw, 20px);
  font-family: 'Montserrat', sans-serif;
  font-weight: 800;
  font-size: clamp(10px, 2.5vw, 12px);
  text-transform: uppercase;
  letter-spacing: 1px;
  border-radius: 20px;
  box-shadow: 0 10px 30px rgba(255, 215, 0, 0.4);
  z-index: 1001;
  animation: floatBubble 4s ease-in-out infinite;
  border: 3px solid rgba(255, 255, 255, 0.9);
  text-align: center;
  width: clamp(200px, 60vw, 300px);
  max-width: 90vw;
}

/* Botones responsive */
.hero-buttons {
  display: flex;
  justify-content: center;
  gap: var(--spacing-sm);
  flex-wrap: wrap;
  margin-top: var(--spacing-lg);
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: clamp(12px, 3vw, 16px) clamp(20px, 5vw, 32px);
  background: var(--gradient-primary);
  color: var(--white);
  border: none;
  border-radius: 50px;
  font-family: 'Montserrat', sans-serif;
  font-weight: 600;
  text-transform: uppercase;
  font-size: clamp(12px, 2.5vw, 14px);
  letter-spacing: 1px;
  cursor: pointer;
  transition: all 0.3s ease;
  box-shadow: 0 5px 20px rgba(0, 0, 0, 0.1);
  text-decoration: none;
  min-height: 44px;
  white-space: nowrap;
}

.btn:hover {
  transform: translateY(-3px);
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
}

.btn-distributor {
  background: linear-gradient(135deg, #FF6B35, #F7931E);
  font-size: clamp(12px, 2.5vw, 16px);
  padding: clamp(14px, 3.5vw, 18px) clamp(24px, 6vw, 40px);
}

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

.features-grid,
.products-grid,
.benefits-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: var(--spacing-lg);
  margin-top: var(--spacing-xl);
}

/* Cards responsive */
.feature-card,
.product-card,
.benefit-card {
  background-color: var(--white);
  border-radius: var(--border-radius);
  padding: var(--spacing-lg);
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.08);
  transition: all 0.3s ease;
  margin: 10px;
}

.feature-card:hover,
.product-card:hover,
.benefit-card:hover {
  transform: translateY(-10px);
  box-shadow: 0 15px 35px rgba(0, 0, 0, 0.12);
}

/* ========================================
   IMÁGENES RESPONSIVE
   ======================================== */

.product-image {
  width: 100%;
  height: clamp(200px, 40vw, 280px);
  object-fit: cover;
  border-radius: var(--border-radius);
  transition: transform 0.3s ease;
}

img {
  max-width: 100%;
  height: auto;
}

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

.contact-form {
  max-width: 700px;
  margin: 0 auto;
  background-color: var(--white);
  border-radius: var(--border-radius);
  padding: var(--spacing-xl);
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.08);
}

.form-control {
  width: 100%;
  padding: var(--spacing-sm);
  border: 2px solid #eee;
  border-radius: 8px;
  font-family: 'Roboto', sans-serif;
  font-size: 16px; /* Evita zoom en iOS */
  transition: all 0.3s ease;
  background-color: #f9f9f9;
}

.form-control:focus {
  outline: none;
  border-color: var(--primary);
  background-color: var(--white);
  box-shadow: 0 0 0 4px rgba(98, 0, 234, 0.1);
}

/* ========================================
   WHATSAPP BUTTON RESPONSIVE
   ======================================== */

.whatsapp-float {
  position: fixed;
  width: clamp(50px, 12vw, 60px);
  height: clamp(50px, 12vw, 60px);
  bottom: clamp(20px, 5vw, 40px);
  right: clamp(20px, 5vw, 40px);
  background-color: #25d366;
  color: #FFF;
  border-radius: 50%;
  text-align: center;
  font-size: clamp(24px, 6vw, 30px);
  box-shadow: 0 4px 15px rgba(37, 211, 102, 0.3);
  z-index: 100;
  transition: all 0.3s ease;
  display: flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
}

.whatsapp-float:hover {
  background-color: #128c7e;
  color: #FFF;
  transform: scale(1.1);
  box-shadow: 0 6px 20px rgba(37, 211, 102, 0.4);
}

/* ========================================
   MEDIA QUERIES ESPECÍFICAS
   ======================================== */

/* Dispositivos muy pequeños (320px y más) */
@media (max-width: 320px) {
  .container {
    padding: 0 15px;
  }
  
  .hero-banner {
    width: 90vw;
    font-size: 9px;
    padding: 8px 12px;
  }
  
  .btn {
    font-size: 11px;
    padding: 10px 18px;
  }
}

/* iPhone 15 Pro Max y dispositivos similares */
@media (max-width: 428px) {
  .hero h1 {
    font-size: 2rem;
  }
  
  .hero p {
    font-size: 1rem;
  }
  
  .features-grid,
  .products-grid,
  .benefits-grid {
    grid-template-columns: 1fr;
    gap: var(--spacing-md);
  }
}

/* Samsung Galaxy S25 y dispositivos similares */
@media (max-width: 390px) {
  .hero-buttons {
    flex-direction: column;
    align-items: center;
  }
  
  .btn {
    width: 100%;
    max-width: 280px;
  }
}

/* Tablets en modo portrait */
@media (min-width: 768px) and (max-width: 1024px) {
  .features-grid,
  .products-grid,
  .benefits-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  
  .hero h1 {
    font-size: 2.5rem;
  }
  
  .container {
    padding: 0 30px;
  }
}

/* Navegación móvil */
@media (max-width: 768px) {
  .mobile-menu-btn {
    display: block;
    background: none;
    border: none;
    font-size: 24px;
    color: var(--primary);
    cursor: pointer;
  }
  
  .nav-menu {
    position: fixed;
    top: 70px;
    left: -100%;
    flex-direction: column;
    background-color: var(--white);
    width: 100%;
    height: calc(100vh - 70px);
    text-align: center;
    transition: left 0.3s ease;
    box-shadow: 0 10px 10px rgba(0, 0, 0, 0.1);
    padding: var(--spacing-md) 0;
    overflow-y: auto;
    z-index: 999;
  }
  
  .nav-menu.active {
    left: 0;
  }
  
  .nav-item {
    margin: 0;
    border-bottom: 1px solid var(--light-gray);
  }
  
  .nav-link {
    display: block;
    padding: var(--spacing-md);
    font-size: var(--font-size-lg);
  }
  
  .hero {
    padding: clamp(120px, 20vh, 160px) 0 clamp(60px, 10vh, 80px);
  }
}

/* Mejoras para comercios */
@media (max-width: 768px) {
  .comercio-info {
    display: none;
  }
  
  .comparison-table-container {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    margin: 0 -20px;
    padding: 0 20px;
  }
  
  .comparison-table {
    min-width: 600px;
    font-size: 14px;
  }
  
  .process-step,
  .process-step:nth-child(even) {
    flex-direction: column;
  }
  
  .process-image,
  .process-content {
    width: 100%;
    min-width: auto;
  }
}

/* Mejoras de accesibilidad */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}

/* Modo oscuro desactivado temporalmente */
/*
@media (prefers-color-scheme: dark) {
  :root {
    --white: #1a1a1a;
    --light-gray: #2a2a2a;
    --dark-gray: #e0e0e0;
    --medium-gray: #b0b0b0;
  }
}
*/

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

/* Clases de utilidad para mostrar/ocultar en diferentes tamaños */
.d-none { display: none !important; }
.d-block { display: block !important; }
.d-flex { display: flex !important; }

@media (max-width: 576px) {
  .d-sm-none { display: none !important; }
  .d-sm-block { display: block !important; }
  .d-sm-flex { display: flex !important; }
}

@media (max-width: 768px) {
  .d-md-none { display: none !important; }
  .d-md-block { display: block !important; }
  .d-md-flex { display: flex !important; }
}

@media (max-width: 992px) {
  .d-lg-none { display: none !important; }
  .d-lg-block { display: block !important; }
  .d-lg-flex { display: flex !important; }
}

/* Espaciados responsive */
.p-responsive { padding: var(--spacing-sm); }
.m-responsive { margin: var(--spacing-sm); }
.gap-responsive { gap: var(--spacing-sm); }

/* Texto responsive */
.text-responsive {
  font-size: var(--font-size-base);
  line-height: 1.6;
}

.text-center { text-align: center; }
.text-left { text-align: left; }
.text-right { text-align: right; }

@media (max-width: 768px) {
  .text-md-center { text-align: center; }
  .text-md-left { text-align: left; }
}