/* ==========================================================================
   1. RESET GENERAL, COLORES Y TIPOGRAFÍA
   ========================================================================== */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

body {
  background-color: #f9fbfd;
  color: #1e293b;
}
/* ==========================================================================
   2. ENCABEZADO Y BARRA DE NAVEGACIÓN
   ========================================================================== */
header {
  background: linear-gradient(135deg, #4169e1, #0033aa); /* Azul rey degradado */
  color: #ffffff;
  padding: 20px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
  width: 100%;
  min-height: 150px;
}

.header-center-block {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 15px;
  margin-bottom: 15px;
}

.logo {
  width: 120px;
  height: auto;
}

.header-text {
  text-align: center;
}

.header-text h1 {
  font-size: 42px; 
  font-weight: 700; 
  color: #ffffff;
}
  
.header-text p {
  font-size: 22px; 
  color: #cbd5e1;
}

.header-nav {
  display: flex;
  justify-content: center;
  gap: 20px;
  margin-top: 10px;
}

nav {
  display: flex;
  justify-content: center;
  gap: 20px;
}

nav a {
  color: #ffffff;
  text-decoration: none;
  font-weight: 600;
  transition: color 0.2s;
}

nav a:hover {
  text-decoration: underline;
}
/* ==========================================================================
   3. CARRUSEL DE OFERTAS (CON EFECTO BLUR TRANSLÚCIDO)
   ========================================================================== */
.carousel {
  position: relative;
  max-width: 800px;
  height: 400px;
  margin: 30px auto;
  background: #000000;
  border-radius: 8px;
  box-shadow: 0 4px 10px rgba(0,0,0,0.05);
  overflow: hidden;
}

.slide {
  display: none; 
  width: 100%;
  height: 100%;
  position: absolute;
  top: 0;
  left: 0;
}

.slide.active {
  display: flex;
  align-items: center;
  justify-content: center;
}

.slide img {
  width: auto;
  max-width: 500px;
  height: 100%;
  object-fit: contain;
  margin: 0 auto;
}

/* Animación de transición suave */
.fade {
  animation: fadeAnimation 0.6s ease-in-out;
}

@keyframes fadeAnimation {
  from { opacity: 0.5; } 
  to { opacity: 1; }
}

/* Controles de flechas circulares flotantes */
.prev, .next {
  cursor: pointer;
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  padding: 10px;
  color: #000000;
  font-weight: bold;
  font-size: 16px;
  z-index: 15; 
  background-color: rgba(255, 255, 255, 0.4);
  border-radius: 50%;
  width: 35px;
  height: 35px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background-color 0.2s ease;
}

.prev:hover, .next:hover { 
  background-color: rgba(255, 255, 255, 0.8); 
}

.prev { left: 20px; }
.next { right: 20px; }

/* Tarjeta translúcida flotante para los textos */
.caption {
  position: absolute;
  bottom: 0px;
  left: 50%;
  transform: translateX(-50%);
  width: 95%;
  max-width: 650px;
  background: rgba(0, 0, 0, 0.6);
  -webkit-backdrop-filter: blur(6px);
  backdrop-filter: blur(6px);
  padding: 15px 25px;
  border-radius: 8px;
  z-index: 10;
  display: flex;
  flex-direction: row;
  align-items: flex-end;
  justify-content: space-between;
  gap: 20px;
}

.caption-text-block {
  display: flex;
  flex-direction: column;
  gap: 6px;
  text-align: left;
  flex-grow: 1;
}

.caption h2 {
  color: #4169e1;
  font-size: 15px;
  font-weight: 700;
  margin-bottom: 2px;
  text-shadow: 2px 2px 4px rgba(0,0,0,0.6);
}

.caption p {
  font-size: 14px;
  color: #cbd5e1;
  line-height: 1.4;
}

/* Indicadores de puntitos inferiores */
.dots {
  text-align: center;
  padding: 12px 0;
  position: relative;
  z-index: 5;
  background: #ffffff;
  display: block;
  width: 100%;
}

.dot {
  cursor: pointer;
  height: 10px;
  width: 10px;
  margin: 0 6px;
  background-color: #cccccc;
  border-radius: 50%;
  display: inline-block;
  transition: all 0.2s ease;
}

.dot:hover {
  background-color: #666666;
  transform: scale(1.2);
}

.dot.active { 
  background-color: #0056b3;
  transform: scale(1.2);
}
/* ==========================================================================
   4. CATÁLOGO PRINCIPAL Y TARJETAS (GRID)
   ========================================================================== */
main {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 25px;
  max-width: 1200px;
  margin: 40px auto;
  padding: 0 20px;
}

.card {
  background: #ffffff;
  padding: 25px;
  border-radius: 8px;
  box-shadow: 0 4px 10px rgba(0,0,0,0.05);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  text-align: justify;
}

.card h2 { 
  color: #003366; 
  margin-bottom: 10px; 
  text-align: center;
}

.card p { 
  color: #666666; 
  font-size: 14px; 
  margin-bottom: 15px; 
  line-height: 1.5; 
}

.card img { 
  width: 100%; 
  height: 180px; 
  object-fit: cover; 
  border-radius: 6px; 
  margin-bottom: 15px; 
}
/* ==========================================================================
   5. SIMULADOR DE CÓDIGO (ESTILO VS CODE)
   ========================================================================== */
.code-simulator {
  background-color: #1e1e1e;
  border-radius: 6px;
  padding: 15px;
  margin-bottom: 15px;
  font-family: 'Courier New', Courier, monospace;
}

.code-header {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-bottom: 10px;
  border-bottom: 1px solid #333333;
  padding-bottom: 6px;
}

.dot-win { 
  width: 10px; 
  height: 10px; 
  border-radius: 50%; 
  display: inline-block; 
}

.red { background-color: #ff5f56; }
.yellow { background-color: #ffbd2e; }
.green { background-color: #27c93f; }

.code-title { 
  color: #aaaaaa; 
  font-size: 11px; 
  margin-left: 5px; 
}

.code-simulator pre { 
  color: #d4d4d4; 
  font-size: 12px; 
  overflow-x: auto; 
}

/* Resaltado de sintaxis */
.keyword { color: #569cd6; }
.function { color: #dcdcaa; }
.string { color: #ce9178; }
/* ==========================================================================
   6. SECCIONES SECUNDARIAS (ACERCA DE Y BLOG)
   ========================================================================== */
.about, .blog-container { 
  max-width: 1200px; 
  margin: 50px auto; 
  padding: 0 20px; 
}
.about h2, .blog-container h2 {
  text-align: center;
  color: #003366;
  margin-bottom: 15px;
}

.about p {
  text-align: justify;
  color: #334155;
  line-height: 1.6;
}

.blog-subtitle { 
  color: #484747; 
  margin-bottom: 20px; 
}

.blog-unavailable-card {
  text-align: center;
  background: #ffffff;
  padding: 40px 20px;
  border-radius: 8px;
  box-shadow: 0 4px 10px rgba(0,0,0,0.05);
  margin-top: 20px;
}

.blog-unavailable-card i {
  font-size: 48px;
  color: #94a3b8;
  margin-bottom: 15px;
  display: block;
}

.blog-unavailable-card h3 { 
  color: #003366; 
  margin-bottom: 10px; 
}

.blog-unavailable-card p {
  color: #666666;
  font-size: 15px;
  max-width: 500px;
  margin: 0 auto;
  line-height: 1.5;
}
/* ==========================================================================
   7. SISTEMA DE BOTONES COMPONENTES
   ========================================================================== */
.btn-card {
  color: #ffffff;
  border: none;
  padding: 10px 20px;
  border-radius: 4px;
  cursor: pointer;
  width: 100%;
  font-weight: bold;
  transition: background-color 0.2s ease, transform 0.2s ease;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}

/* Botón principal de tarjetas */
#productos .btn-card {
  background-color: #0056b3;
}

#productos .btn-card:hover { 
  background-color: #003366; 
}

/* Deshabilitados (Próximamente / En Desarrollo) */
.btn-disabled:disabled {
  background-color: #cbd5e1 !important;
  color: #64748b !important;
  cursor: not-allowed !important;
}

.card-buttons-container {
  display: flex;
  gap: 12px;
  flex-direction: column;
  margin-top: 15px;
}

.download-link-wrapper {
  width: 100%;
  text-decoration: none;
  display: block;
}

/* Modificadores comerciales para los botones del Modal */
.btn-card-whatsapp { background-color: #25d366 !important; color: #ffffff !important; }
.btn-card-whatsapp:hover { background-color: #128c7e !important; }

.btn-card-secondary { background-color: #f1f5f9 !important; color: #0056b3 !important; border: 2px solid #0056b3 !important; }
.btn-card-secondary:hover { background-color: #e2e8f0 !important; }

.btn-card-customize { background-color: #8b5cf6 !important; color: #ffffff !important; }
.btn-card-customize:hover { background-color: #6d28d9 !important; }
/* ==========================================================================
   8. VENTANAS EMERGENTES (MODALES) Y FORMULARIOS
   ========================================================================== */
.modal-container {
  display: none;
  position: fixed;
  z-index: 9999;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.5);
  -webkit-backdrop-filter: blur(4px); 
  backdrop-filter: blur(4px);
  align-items: center;
  justify-content: center;
}

.modal-container.active { 
  display: flex; 
}

.modal-content {
  background-color: #ffffff;
  padding: 25px;
  border-radius: 8px;
  width: 90%;
  max-width: 500px;
  max-height: 90vh;
  overflow-y: auto;
  position: relative;
  box-shadow: 0 5px 15px rgba(0,0,0,0.2);
  color: #333333;
}

/* Botones de salida (X) */
.close-modal, button.close-cobertura {
  position: absolute;
  top: 15px;
  right: 20px;
  font-size: 28px;
  cursor: pointer;
  color: #aaaaaa;
  background: none;
  border: none;
  padding: 0;
  line-height: 1;
  transition: color 0.2s;
}

.close-modal:hover, button.close-cobertura:hover { 
  color: #ff0000; 
}

.modal-content h2 { 
  color: #0056b3; 
  margin-bottom: 5px; 
  font-size: 22px; 
}

.modal-subtitle { 
  color: #64748b; 
  font-size: 13px; 
  margin-bottom: 20px; 
}

.modal-actions-layout {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-top: 15px;
  width: 100%;
}

#btn-ir-cobertura {
  background-color: #0056b3 !important;
  color: #ffffff !important;
  margin-top: 10px;
}

#btn-ir-cobertura:hover {
  background-color: #003366 !important;
}

/* Caja de viñetas dinámicas */
.note-box-info {
  display: none; 
  margin-top: 15px; 
  padding: 15px; 
  background-color: #f0f7ff;
  border-left: 5px solid #0056b3; 
  border-radius: 6px;
}

/* Estructura Interna del Formulario */
.form-row-block { 
  display: flex !important; 
  gap: 12px !important; 
  width: 100% !important; 
}

.flex-1 { flex: 1 !important; }

.form-group {
  margin-bottom: 15px;
  display: flex;
  flex-direction: column;
  gap: 5px;
  text-align: left;
}

.form-group label { 
  font-size: 14px; 
  font-weight: 600; 
  color: #0056b3; 
}

.form-group input { 
  padding: 10px; 
  border: 1px solid #cccccc; 
  border-radius: 4px; 
  font-size: 14px; 
  width: 100%; 
  outline: none; 
}

.form-group input:focus { 
  border-color: #0056b3; 
}

.form-group input[readonly] { 
  background-color: #f1f5f9; 
  cursor: not-allowed; 
  color: #475569; 
}

/* Bloque GPS */
.coords-layout-block { 
  display: flex; 
  gap: 10px; 
  width: 100%; 
}

.coords-layout-block input { 
  flex-grow: 1; 
}

#btn-get-location {
  background-color: #0056b3; 
  color: #ffffff; 
  border: none; 
  padding: 0 15px; 
  border-radius: 4px;
  cursor: pointer; 
  font-size: 13px; 
  font-weight: 600; 
  display: inline-flex; 
  align-items: center; 
  gap: 8px;
  white-space: nowrap; 
  transition: background-color 0.2s;
}

#btn-get-location:hover { 
  background-color: #003366; 
}

.btn-submit-info {
  background-color: #25d366; 
  color: #ffffff; 
  border: none; 
  padding: 12px; 
  border-radius: 4px; 
  cursor: pointer;
  width: 100%; 
  font-weight: bold; 
  font-size: 16px; 
  margin-top: 10px; 
  display: flex; 
  align-items: center;
  justify-content: center; 
  gap: 8px; 
  transition: background 0.2s;
}

.btn-submit-info:hover { 
  background-color: #128c7e; 
}
/* ==========================================================================
   9. BOTÓN FLOTANTE WHATSAPP Y FOOTER
   ========================================================================== */
.whatsapp-fixed {
  position: fixed;
  bottom: 25px;
  right: 25px;
  width: 60px;
  height: 60px;
  background-color: #25d366;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
  z-index: 999;
  transition: transform 0.3s ease, background-color 0.2s;
  cursor: pointer;
}

.whatsapp-fixed img {
  width: 35px;
  height: 35px;
}

.whatsapp-fixed:hover {
  transform: scale(1.1) rotate(5deg);
  background-color: #128c7e;
}

footer { 
  background: #002244; 
  color: #ffffff; 
  text-align: center; 
  padding: 20px; 
  margin-top: 40px; 
}

.facebook-link { 
  color: #ffffff; 
  text-decoration: none; 
  margin-left: 5px; 
  font-weight: 600; 
  transition: color 0.2s; 
}

.facebook-link:hover { 
  color: #1877f2; 
  text-decoration: underline; 
}

.facebook-link i { 
  margin-right: 4px; 
  font-size: 15px; 
}
/* ==========================================================================
   10. BLOQUE UNIFICADO DE OPTIMIZACIÓN ULTRA-COMPACTA MÓVIL
   ========================================================================== */
@media (max-width: 600px) {
    /* Encabezado */
    header.main-header-grad {
        padding: 15px 12px;
        min-height: 0; /* Solución limpia: Cancela el min-height de 120px fijado en desktop sin causar alertas de compatibilidad */
    }

    
    .header-text-nav h1 {
        font-size: 24px;
    }
    
    .header-text-nav p {
        font-size: 14px;
    }

    /* Navegación de pestañas */
    nav {
        gap: 10px;
        flex-wrap: wrap;
    }

    nav a {
        font-size: 12px;
        padding: 4px 6px;
    }

    /* Carrusel de ofertas */
    .carousel {
        height: 250px;
        margin: 15px auto;
    }

    .slide img {
        width: 100%;
        height: 100%;
        object-fit: contain; /* Evita que se corten los textos de tus promociones */
    }

    .caption {
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
        padding: 10px 15px;
        width: 100%;
    }

    /* Flechas del carrusel chicas */
    .prev, .next {
        width: 32px;
        height: 32px;
        font-size: 14px;
    }

    /* Cuadrícula de paquetes de fibra óptica */
    .packages-grid {
        gap: 15px;
        margin: 20px auto;
    }

    /* Formulario dentro del modal (pasa de filas a columnas) */
    .form-row-block {
        flex-direction: column;
        gap: 0;
    }

    /* Ajuste de tamaño del modal */
    .modal-content {
        padding: 15px;
        width: 95%;
    }

    /* Botones interactivos generales */
    .btn-info-trigger {
        width: 100%;
        text-align: center;
    }
} /* <--- Una sola llave de cierre al final de todo el bloque móvil */
