/* public/assets/css/main.css */
@import url('./variables.css');

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: var(--font-sans);
    background-color: var(--bg-dark);
    color: var(--text-main);
    line-height: 1.6;
}

/* ==========================================================================
   1. HEADER & NAVEGACIÓN (Barra Blanca Limpia)
   ========================================================================== */

nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 5%;
    height: 70px;
    background-color: #ffffff !important; /* Blanco puro */
    border-bottom: 1px solid #e1e4e8;      /* Borde gris sutil en la base */
    position: sticky;
    top: 0;
    z-index: 1000;
}

/* Contenedor del Logo (Excluido de estilos de píldora) */
.logo-brand {
    display: inline-flex;
    align-items: center;
    text-decoration: none;
    background: transparent !important;
    border: none !important;
    padding: 0 !important;
    box-shadow: none !important;
    border-radius: 0 !important;
}

.logo-img {
    height: 59px;
    width: auto;
    object-fit: contain;
    mix-blend-mode: multiply; /* Fusiona el fondo blanco de la imagen con la barra */
    filter: none !important;
}

/* Lista de opciones del menú */
nav ul {
    display: flex;
    list-style: none;
    gap: 0.8rem; /* Espaciado entre píldoras */
    align-items: center;
}

/* Píldoras EXCLUSIVAS para los enlaces del menú (nav ul a) */
nav ul a {
    text-decoration: none;
    color: #1e293b !important;          /* Texto oscuro legible */
    font-size: 0.88rem;
    font-weight: 600;
    padding: 8px 18px;                  /* Forma de cápsula */
    border-radius: 20px;
    background: #f1f5f9;                /* Fondo suave estilo badge */
    border: 1px solid #cbd5e1;          /* Borde fino */
    transition: all 0.2s ease-in-out;
    display: inline-block;
    box-shadow: 0 1px 3px rgba(0,0,0,0.05);
    cursor: pointer;
}

/* Hover: Se ilumina en azul con texto en NEGRO PURO */
nav ul a:hover {
    color: #000000 !important;
    background-color: var(--accent-blue) !important; /* #00d4ff */
    border-color: var(--accent-blue) !important;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 212, 255, 0.4);
}

/* Estado Activo: Opción seleccionada */
nav ul a.active {
    color: #000000 !important;
    background-color: var(--accent-blue) !important;
    border-color: var(--accent-blue) !important;
    font-weight: 700;
    box-shadow: 0 2px 8px rgba(0, 212, 255, 0.4);
}

/* ==========================================================================
   2. CONTROL DE SECCIONES SPA & COMPONENTES
   ========================================================================== */

/* Oculta las secciones por defecto */
.view-section {
    display: none;
}

/* Muestra ÚNICAMENTE la sección que tiene la clase active */
.view-section.active {
    display: block !important;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(6px); }
    to { opacity: 1; transform: translateY(0); }
}

.btn {
    display: inline-block;
    padding: 12px 28px;
    background: var(--accent-blue);
    color: #000;
    text-decoration: none;
    border-radius: 6px;
    font-weight: bold;
    transition: opacity 0.3s;
    border: none;
    cursor: pointer;
}

.btn:hover {
    opacity: 0.85;
}

footer {
    padding: 40px 5%;
    text-align: center;
    border-top: 1px solid var(--border);
    color: var(--text-dim);
    font-size: 0.85rem;
}

/* ==========================================================================
   3. MÓDULO DE SERVICIOS
   ========================================================================== */

.filter-btn {
    padding: 8px 18px;
    background: var(--surface-dark);
    border: 1px solid var(--border);
    color: var(--text-dim);
    border-radius: 20px;
    cursor: pointer;
    font-size: 0.85rem;
    transition: all 0.3s ease;
}

.filter-btn:hover, .filter-btn.active {
    background: var(--accent-blue);
    color: #000;
    border-color: var(--accent-blue);
    font-weight: bold;
}

.service-card {
    background: var(--surface-dark);
    padding: 2rem;
    border-radius: 10px;
    border: 1px solid var(--border);
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    transition: transform 0.3s, border-color 0.3s;
}

.service-card:hover {
    transform: translateY(-4px);
    border-color: var(--accent-blue);
}

.service-card h3 {
    font-size: 1.3rem;
    color: var(--text-main);
    margin: 0.8rem 0;
}

.service-card p {
    color: var(--text-dim);
    font-size: 0.92rem;
    margin-bottom: 1.5rem;
}

.badge {
    display: inline-block;
    padding: 4px 10px;
    border-radius: 12px;
    font-size: 0.7rem;
    background: rgba(0, 212, 255, 0.1);
    color: var(--accent-blue);
    align-self: flex-start;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.btn-detail {
    background: transparent;
    border: none;
    color: var(--accent-blue);
    font-size: 0.85rem;
    cursor: pointer;
    text-align: left;
    padding: 0;
    font-weight: bold;
}

.btn-detail:hover {
    text-decoration: underline;
}

/* Modal */
.modal-overlay {
    position: fixed;
    top: 0; left: 0; width: 100%; height: 100%;
    background: rgba(0, 0, 0, 0.8);
    backdrop-filter: blur(4px);
    z-index: 1000;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 20px;
}

.modal-content {
    background: var(--surface-dark);
    border: 1px solid var(--border);
    padding: 2.5rem;
    border-radius: 10px;
    max-width: 600px;
    width: 100%;
    position: relative;
    box-shadow: 0 10px 30px rgba(0,0,0,0.5);
}

.modal-close {
    position: absolute;
    top: 15px;
    right: 20px;
    font-size: 1.8rem;
    color: var(--text-dim);
    cursor: pointer;
}

.modal-close:hover {
    color: var(--text-main);
}

/* ==========================================================================
   4. MÓDULO RD-ANALYTICS & VISOR
   ========================================================================== */

.gateway-tab {
    background: transparent;
    border: none;
    color: var(--text-dim);
    font-size: 0.95rem;
    padding: 8px 16px;
    cursor: pointer;
    border-radius: 4px;
    transition: all 0.3s ease;
}

.gateway-tab:hover {
    color: var(--text-main);
}

.gateway-tab.active {
    background: var(--bg-dark);
    color: var(--accent-blue);
    font-weight: bold;
    border: 1px solid var(--border);
}

.preview-container {
    max-width: 950px;
    margin: 0 auto;
    background: var(--surface-dark);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 12px;
    box-shadow: 0 15px 35px rgba(0,0,0,0.6);
    position: relative;
    z-index: 1;
}

.preview-image-box {
    position: relative;
    width: 100%;
    max-height: 500px;
    overflow-y: auto;
    border-radius: 6px;
    background: #000;
}

.preview-image-box img {
    width: 100%;
    height: auto;
    display: block;
    object-fit: contain;
    transition: opacity 0.25s ease-in-out;
}

/* ==========================================================================
   5. BOTÓN FLOTANTE WHATSAPP
   ========================================================================== */

.whatsapp-float {
    position: fixed;
    width: 58px;
    height: 58px;
    bottom: 25px;
    right: 25px;
    background-color: #25d366;
    color: #FFF;
    border-radius: 50px;
    text-align: center;
    box-shadow: 0px 4px 15px rgba(0, 0, 0, 0.4);
    z-index: 2000;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    text-decoration: none;
}

.whatsapp-float:hover {
    transform: scale(1.1);
    box-shadow: 0px 6px 20px rgba(37, 211, 102, 0.5);
}

.whatsapp-icon {
    width: 32px;
    height: 32px;
}