/* =========================
   VARIABLES DE TEMA
   ========================= */

:root {
    --bg-main: #0f172a;
    --bg-card: #020617;
    --bg-bar: #020617;

    --text-main: #e5e7eb;
    --text-secondary: #cbd5f5;
    --text-muted: #94a3b8;
    --heading: #ffffff;

    --neural-color: 255,255,255;
}

[data-theme="light"] {
    --bg-main: #ffffff;
    --bg-card: #f1f5f9;
    --bg-bar: #f1f5f9;

    --text-main: #0f172a;
    --text-secondary: #334155;
    --text-muted: #475569;
    --heading: #020617;

    --neural-color: 15,23,42;
}

/* =========================
   BASE
   ========================= */

body {
    min-height: 100vh; /* 🔥 clave */
    margin: 0;
    font-family: 'Montserrat', sans-serif;
    background-color: var(--bg-main);
    color: var(--text-main);
    line-height: 1.6;
    padding-top: 64px;

    display: flex;
    flex-direction: column;
}

/* =========================
   FONDO NEURONAL
   ========================= */

.neural-bg {
    position: fixed;
    bottom: 0;
    left: 0;
    width: 100vw;
    height: 90vh;
    pointer-events: none;
    z-index: 0;
    opacity: 0.45;
    overflow: hidden;
}

section,
footer {
    position: relative;
    z-index: 1;
}

/* =========================
   SECCIONES
   ========================= */

section {
    padding: 80px 10%;
}

h1, h2 {
    color: var(--heading);
    letter-spacing: 0.02em;
    font-weight: 600;
}

h1 {
    font-size: 2.4rem;
    margin-bottom: 20px;
}

h2 {
    font-size: 2.2rem;
    margin-bottom: 30px;
}

h3{
    color: var(--heading);
    letter-spacing: 0.02em;
    font-weight: 600;
}

h3 {
    font-size: 1.4rem;
    margin-bottom: 40px;
}

p {
    max-width: 700px;
    color: var(--text-secondary);
    text-align: justify;
    line-height: 1.6;
    margin-bottom: 1rem;
}

/* =========================
   BOTÓN
   ========================= */

.btn {
    display: inline-block;
    margin-top: 30px;
    padding: 14px 32px;
    background-color: transparent;
    color: var(--heading);
    border: 2px solid var(--heading);
    text-decoration: none;
    font-weight: 600;
    border-radius: 999px;
    transition: all 0.2s ease;
}

.btn:hover {
    background-color: var(--heading);
    color: var(--bg-main);
}

/* =========================
   GRID
   ========================= */

.grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 30px;
    margin-top: 40px;
}

.card {
    background-color: var(--bg-card);
    padding: 30px;
    border-radius: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
}

/* =========================
   FOOTER
   ========================= */

footer.footer {
    padding: 40px;
    background-color: var(--bg-card);
    color: var(--text-muted);
    text-align: center;
    position: relative;
    margin-top: auto;
}

.footer-logo {
    position: absolute;
    right: 40px;
    top: 50%;
    transform: translateY(-50%);
    height: 95px;
}

/* =========================
   TOP BAR
   ========================= */

.top-bar {
    position: fixed;
    top: 0;
    width: 100%;
    height: 64px;
    background: var(--bg-bar);
    backdrop-filter: blur(10px);
    z-index: 10;
}

.top-bar__content {
    max-width: 1200px;
    height: 100%;
    margin: 0 auto;
    padding-left: 4%;
    padding-right: 10%;
    display: flex;
    align-items: center;
}

.brand-name {
    font-weight: 600;
    letter-spacing: 0.08em;
    font-size: 1.4rem;
    color: var(--text-main);
    text-decoration: none;
}

.theme-toggle {
    margin-left: 19px;
    background: none;
    border: none;
    font-size: 1.3rem;
    cursor: pointer;
    color: var(--text-main);
}

[data-theme="light"] .top-bar {
    box-shadow: 0 2px 12px rgba(15, 23, 42, 0.08);
}

.nav-menu {
    margin-left: auto;
    display: flex;
    gap: 24px;
    align-items: center;
}

.nav-menu a {
    text-decoration: none;
    color: var(--text-main);
    font-size: 0.95rem;
    font-weight: 500;
    transition: opacity 0.2s ease;
}

.nav-menu a:hover {
    opacity: 0.7;
}

/* =========================
   SECCIÓN DOBLE
   ========================= */

.dual-section {
    display: grid;
    grid-template-columns: 1.3fr 1fr;
    gap: 80px;
    align-items: start;
}

@media (max-width: 900px) {
    .dual-section {
        grid-template-columns: 1fr;
        gap: 60px;
    }
}

/* =========================
   ANIMACIÓN ON SCROLL
   ========================= */

.reveal {
    opacity: 0;
    transform: translateY(40px);
    transition: opacity 0.8s ease, transform 0.8s ease;
}

.reveal.visible {
    opacity: 1;
    transform: translateY(0);
}

/* =========================
   DASHBOARDS
   ========================= */

.dashboards {
    text-align: center;
}

.dashboards p {
    margin: 0 auto 50px;
}

.dashboards-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 40px;
}

.dashboard-card {
    background-color: var(--bg-card);
    border-radius: 20px;
    padding: 20px;
    transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.dashboard-card:hover {
    transform: translateY(-6px);
    box-shadow: 0 20px 40px rgba(0,0,0,0.15);
}

/* =========================
   ICONOS DE HERRAMIENTAS
   ========================= */

.tools-icons {
    display: flex;
    gap: 36px;
    margin-top: 40px;
    flex-wrap: wrap;
}

.tool-icon {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
    opacity: 0.9;
    transition: all 0.25s ease;
}

/* 🔵 CÍRCULO */
.icon-circle {
    width: 56px;
    height: 56px;
    border-radius: 50%;
    border: 2px solid var(--text-muted);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.25s ease;
}

/* 🔹 ICONO */
.icon-circle img {
    width: 22px;
    height: 22px;
}

/* Hover */
.tool-icon:hover .icon-circle {
    border-color: var(--heading);
    transform: scale(1.08);
}

.tool-icon span {
    font-size: 0.85rem;
    color: var(--text-muted);
}

.tool-icon:hover span {
    color: var(--heading);
}

/* Dark / Light */
[data-theme="dark"] .icon-circle img {
    filter: invert(100%);
}

[data-theme="light"] .icon-circle img {
    filter: none;
}

.contact-icons a {
    text-decoration: none;
}

/* 🔹 CONTENEDOR COMÚN DE ICONOS */
.icons-row {
    margin-top: 40px; /* MISMA referencia para ambos lados */
}

/* Contactos */
.contact-icons {
    display: flex;
    gap: 36px;
    margin-top: 30px;
    flex-wrap: wrap;
}

/* Opcional: centrar iconos de contacto */
.contact-icons .tool-icon {
    align-items: center;
}

.dual-block {
    display: flex;
    flex-direction: column;
}

.dual-block p {
    min-height: 72px; /* ajusta si quieres */
}

/* =========================
   IMAGEN DENTRO DE DASHBOARD
   ========================= */

.dashboard-card img {
    width: 100%;
    height: auto;
    border-radius: 14px;
    display: block;
    object-fit: contain;
}

/* =========================
   RESPONSIVE MOBILE
   ========================= */

@media (max-width: 768px) {

    section {
        padding: 60px 6%;
    }

    h1 {
        font-size: 1.6rem;
    }

    h2 {
        font-size: 1.4rem;
    }

    .dashboards-grid {
        grid-template-columns: 1fr;
    }

    .tools-icons,
    .contact-icons {
        justify-content: center;
        gap: 24px;
    }

    .footer-logo {
        position: static;
        transform: none;
        margin-top: 20px;
        height: 70px;
    }

    .top-bar__content {
        padding-right: 6%;
    }
}

.demo-container {
    text-align: center;
    margin-top: 30px;
}

.btn-demo {
    background-color: #0f172a;
    color: white;
    padding: 12px 28px;
    font-size: 16px;
    border: none;
    border-radius: 6px;
    cursor: not-allowed;
    opacity: 0.8;
}

/* =========================
   MODAL
   ========================= */

/* FONDO OSCURO */
.modal {
    display: none;
    position: fixed;
    z-index: 100;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(5px);
}

/* CAJA DEL MODAL */
.modal-content {
    background: var(--bg-main);
    margin: 10% auto;
    padding: 30px;
    border-radius: 12px;
    width: 90%;
    max-width: 500px;
    color: var(--text-main);
    position: relative;
}

/* BOTÓN CERRAR */
.close-btn {
    position: absolute;
    top: 10px;
    right: 15px;
    font-size: 1.5rem;
    cursor: pointer;
}

.modal-content img {
    width: 190px;
    height: 190px;
    object-fit: cover;
    border-radius: 50%;
    display: block;
    margin: 0 auto 20px;
    border: 2px solid var(--text-muted);
}

.hero {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    padding-top: 12vh;
    padding-bottom: 40px;
}