:root {
    --color-tema: var(--nexo-installers);
    --color-hover: var(--nexo-installers-hover);
}

html,
body {
    overflow-x: hidden;
    width: 100%;
    margin: 0;
    padding: 0;
}

body {
    background-color: var(--fondo-boton-nav);
}

/* Header */
header {
    text-align: center;
    width: 100%;
    margin-top: 5rem;
}

h1 {
    font-family: 'Montserrat', sans-serif !important;
    font-weight: 900;
    text-transform: uppercase;
    letter-spacing: -1px;
    margin: 2rem auto; 
    font-size: clamp(2.5rem, 6vw, 4.5rem);
    color: var(--color-tema);
    border-bottom: 2px solid var(--gris-borde-divisor);
    width: 60vw;
    display: inline-block;
    padding-bottom: 2vh;
    max-width: 90%;
    text-align: center;
}

.em-color {
    color: var(--color-tema);
    font-weight: 700;
}

.installers-grid .google-auto-placed {
    display: none !important;
}

.hero-container {
    max-width: 1200px;
    margin: 2vh auto 5vh auto;
    padding: 0 20px;
    text-align: center;
}

.hero-title {
    font-size: clamp(2.5rem, 6vw, 4.5rem);
    font-weight: 900;
    line-height: 1.1;
    margin-bottom: 1rem;
    color: var(--color-tema);
}

.hero-desc {
    font-size: 1.1rem;
    color: var(--color-texto-gris); 
}

/* Menú Izquierdo (Categorías) */
.pc-nav-container {
    position: fixed;
    left: 20px; 
    top: 50%; 
    transform: translateY(-50%);
    display: flex; 
    flex-direction: column;
    gap: 15px;
    padding: 25px 20px; 
    border-radius: 20px;
    z-index: 10; 
    max-height: 60vh; 
    overflow-y: auto; 
    width: 200px;
    scrollbar-width: thin; 
    scrollbar-color: var(--color-tema) #f0f0f0;
    background: var(--fondo-navegacion);
    border: 2px solid var(--borde-navegacion);
}

.pc-nav-container h2 {
    font-size: 1.2rem;
    font-weight: 800;
    text-align: center;
    margin-bottom: 10px;
    margin-top: 10px;
    color: var(--texto-negro);
}

.nav-anchor {
    padding: 12px;
    text-decoration: none;
    font-weight: 700;
    border-radius: 10px;
    font-size: 0.9rem;
    text-align: center;
    transition: all 0.2s ease;
    color: var(--texto-boton-nav);
    border: 2px solid var(--borde-boton-nav);
    background: var(--fondo-boton-nav);
}

.nav-anchor:hover {
    background: var(--color-tema); 
    color: var(--texto-contraste-hover); 
    border-color: #000;
    transform: scale(1.02);
}

.nav-anchor-pack {
    padding: 12px; 
    text-decoration: none; 
    font-weight: 700;
    border-radius: 10px; 
    font-size: 0.9rem; 
    text-align: center;
    transition: all 0.2s ease;
    color: var(--texto-boton-nav);
    border: 2px solid var(--borde-boton-nav);
    background: var(--fondo-boton-nav);
}

.nav-anchor-pack:hover {
    background: linear-gradient(45deg, #FFD700, #FFA500) !important;
    border-color: #000 !important;
    color: #000 !important;
    transform: scale(1.05);
    box-shadow: 0 0 15px rgba(255, 215, 0, 0.6);
}

/* Menú Derecho (Interés) */
.right-nav-container {
    position: fixed;
    right: 20px;
    top: 50%;
    transform: translateY(-50%);
    width: 200px;
    border-radius: 15px;
    padding: 25px 20px;
    display: flex;
    flex-direction: column;
    gap: 15px;
    z-index: 10000;
    background: var(--fondo-navegacion);
    border: 2px solid var(--borde-navegacion);
}

.right-nav-container h2 {
    font-size: 1.1rem;
    margin: 0 0 15px 0;
    text-align: center;
    font-weight: 800;
    color: var(--texto-negro);
}

.right-nav-links {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

/* Starter Pack */
.starter-pack-container {
    background: var(--starter-gradient, linear-gradient(180deg, rgba(255, 215, 0, 0.05) 0%, transparent 100%));
    padding: 4rem 3rem;
    border-radius: 20px;
    border: 1px solid rgba(255, 215, 0, 0.2);
    width: 85%;
    max-width: 1100px;
    margin: 5rem auto;
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
    position: relative;
    z-index: 1;
}

.starter-pack-container .installers-grid {
    padding: 0 !important;
    width: 100%;
    margin: 0;
}

.starter-label {
    background-color: #FFD700;
    color: #000;
    padding: 8px 20px;
    border-radius: 20px;
    font-size: 0.9rem;
    font-weight: 900;
    box-shadow: 0 4px 10px rgba(255, 215, 0, 0.2);
    display: inline-block;
    margin-bottom: 2.5rem;
}

.starter-card {
    border: 2px solid #FFD700 !important;
}

.starter-card:hover {
    border-color: #FFA500 !important;
    box-shadow: 0 12px 25px rgba(255, 165, 0, 0.2) !important;
    transform: translateY(-5px);
}

.starter-badge {
    position: absolute;
    top: 0;
    left: 50%;
    transform: translateX(-50%);
    background-color: #FFD700;
    color: #111;
    font-size: 0.65rem;
    font-weight: 900;
    padding: 2px 12px;
    border-radius: 0 0 8px 8px;
    z-index: 2;
}

.starter-separator {
    border: 0;
    height: 1px;
    background-image: linear-gradient(to right, rgba(0, 0, 0, 0), rgba(0, 0, 0, 0.1), rgba(0, 0, 0, 0));
    margin: 2rem 0 3rem 0;
}   

.installers-titles-h {
    margin: 3em 0 1.5em;
    font-size: 3rem;
    text-align: center;
    font-weight: 800;
    scroll-margin-top: 100px;
    width: 100%;
    color: var(--texto-negro);
}

/* Grid Principal */
.installers-grid {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 2rem;
    width: 100%;
    max-width: 1400px;
    margin: 0 auto 6rem auto;
    padding: 0 220px;
}

.armory-card {
    flex: 0 1 240px;
    height: 180px;
    max-width: 260px !important;
    border-radius: 15px;
    padding: 1.5rem;
    display: flex !important;
    flex-direction: column !important;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    transition: all 0.2s ease;
    box-sizing: border-box;
    position: relative;
    background-color: var(--fondo-card);
    border: 2px solid var(--borde-card);
    box-shadow: var(--sombra-industrial);
}

.armory-card:hover {
    transform: translateY(-8px);
    border-color: var(--color-tema);
    background-color: var(--fondo-card-hover, #f9fff9); 
    box-shadow: 8px 8px 0px var(--color-tema);
}

.card-logo-img {
    width: 75px;
    height: 75px;
    margin-bottom: 15px;
    object-fit: contain;
}

.card-title {
    font-weight: 800;
    color: var(--texto-negro);
    font-size: 1.2rem;
    display: block;
    width: 100%;
    text-align: center;
    margin-bottom: 6px;
}

.card-desc {
    font-size: 0.95rem;
    color: var(--color-texto-gris);
    display: block;
    width: 100%;
    text-align: center;
    line-height: 1.3;
}

/* Sección Inferior */
.nexo-seccion-interes {
    width: 100%;
    margin: 6rem 0;
    display: none;
}

.nexo-interes-contenedor {
    display: flex;
    flex-direction: row;
    justify-content: center;
    gap: 1.5rem;
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
}

/* Media Queries */
@media (max-width: 1450px) {
    .right-nav-container { display: none; } 
    .nexo-seccion-interes { display: block; } 
    .installers-grid { padding-left: 100px; padding-right: 100px; }
    .starter-pack-container { width: 90%; padding: 3rem 1.5rem; }
}

@media (max-width: 1250px) {
    body { padding-top: 100px; }
    .installers-grid, h1, .hero-container { padding-left: 20px; padding-right: 20px; }
    
    .pc-nav-container {
        position: fixed; 
        top: 0; 
        left: 0; 
        right: 0; 
        transform: none;
        width: 100%; 
        max-width: 100%; 
        max-height: 80px; 
        border-radius: 0; 
        border: none; 
        display: flex; 
        flex-direction: row; 
        flex-wrap: wrap; 
        justify-content: center;
        overflow-y: auto; 
        overflow-x: auto;
        padding: 10px;
        background: rgba(255, 255, 255, 0.98);
        backdrop-filter: blur(5px);
        border-bottom: 2px solid var(--borde-navegacion);
        box-shadow: 0 4px 10px rgba(0,0,0,0.1);
    }
    
    /* Forzamos fondo oscuro en móvil dark mode */
    @media (prefers-color-scheme: dark) { .pc-nav-container { background: rgba(30, 30, 30, 0.95); } }
    
    .pc-nav-container h2 { display: none; }
    .nav-anchor { flex: 0 1 auto; min-width: 110px; padding: 8px 12px; font-size: 0.8rem; margin: 0; border-width: 2px; }
    .armory-card { flex: 0 1 200px; height: 130px; max-width: 180px !important; padding: 1rem; }
    .card-logo-img { width: 48px; height: 48px; margin-bottom: 8px; }
    .card-title { font-size: 1rem; margin-bottom: 4px; }
    .card-desc { font-size: 0.75rem; }
    .boton-nexo-universal { min-width: 160px; font-size: 0.9rem; padding: 0.8rem; }
}

@media (max-width: 768px) {
    body { 
        padding-top: 100px; 
    }

    h1 { 
        font-size: 2.2rem; 
        width: 90%; 
        margin-top: 2rem; 
    }

    .pc-nav-container {
        max-height: 130px;
        padding: 8px;
    }

    .nav-anchor {
        padding: 6px 10px;
        font-size: 0.75rem;
        min-width: 100px;
        place-content: center;
        max-height: 20px;
    }

    .nav-anchor-pack {
        padding: 6px 10px;
        font-size: 0.75rem;
        min-width: 100px;
        place-content: center;
        max-height: 20px;
    }

    .installers-grid { 
        gap: 10px; 
        padding: 0 10px; 
    }

    .armory-card { 
        flex: 0 1 45%; 
        max-width: 165px !important; 
        height: auto; 
        min-height: 125px; 
        padding: 10px; 
        margin: 0; 
    }

    .card-desc { 
        display: none; 
    }

    .nexo-interes-contenedor { 
        flex-direction: column; 
        align-items: center; 
        gap: 15px; 
        padding: 0 20px; 
    }

    .boton-nexo-universal { 
        width: 100%; 
        max-width: 300px; 
        margin: 0; 
    }
}

body.dark-mode {
    --color-tema: #38f838; /* Verde Neón */
    --color-texto-hover: #000000; 
}

body.dark-mode h1 {
    color: var(--color-tema); /* Título Verde */
    border-bottom-color: #444;
}

body.dark-mode .hero-title {
    color: var(--color-tema);
}

body.dark-mode .em-color {
    color: var(--color-tema);
}

body.dark-mode .p-h3-size {
    color: var(--texto-boton-nav);
}

body.dark-mode .nav-anchor {
    /* Estado reposo: Gris oscuro */
    background: #18181b; 
    color: #e0e0e0;
    border-color: #555;
}

body.dark-mode .nav-anchor:hover {
    /* Estado Hover: Verde Neón */
    background: var(--color-tema) !important;
    color: #000000 !important;
    border-color: rgb(0, 151, 0) !important;
    box-shadow: 0 0 15px rgba(94, 255, 94, 0.4);
}

/* Botón Starter Pack */
body.dark-mode .nav-anchor-pack {
    background: #18181b; 
    color: #e0e0e0;
    border-color: #555;
}

body.dark-mode .nav-anchor-pack:hover {
    background: linear-gradient(45deg, #d4af37, #ffd700) !important;
}

body.dark-mode .armory-card {
    background-color: #27272a;
    border-color: #444;
    box-shadow: 0 4px 6px rgba(0,0,0,0.5); 
    color: #e0e0e0;
}

body.dark-mode .card-title {
    color: #fff;
}

body.dark-mode .card-desc {
    color: #aaa;
}

/* Hover Tarjetas: Estilo Industrial */
body.dark-mode .armory-card:hover {
    transform: translateY(-5px);
    border-color: var(--color-tema); /* Borde Verde */
    background-color: #1a1a1a; 
    box-shadow: 8px 8px 0px var(--color-tema); 
}

body.dark-mode .starter-pack-container {
    background: linear-gradient(180deg, rgba(94, 255, 94, 0.05) 0%, transparent 100%);
    border-color: rgba(94, 255, 94, 0.2);
}

body.dark-mode .starter-label,
body.dark-mode .starter-badge {
    background-color: gold;
    color: #000;
}

body.dark-mode .boton-nexo-universal {
    background: #27272a;
    color: #fff;
    border-color: #555;
}

body.dark-mode .boton-nexo-universal:hover {
    background: var(--color-tema);
    color: #000;
    border-color: var(--color-tema);
}