/* ========================= VARIABLES ========================= */
:root {
    --color-primary: #0f5c2e;
    --color-secondary: #1f7a45;
    --bg-main: #ffffff;
    --text-main: #111111;
    --text-soft: #555555;
}

.dark-mode {
    --bg-main: #0d0d0d;
    --text-main: #ffffff;
    --text-soft: #cccccc;
}

/* ========================= RESET ========================= */
*,
*::before,
*::after {
    box-sizing: border-box;
}

body {
    margin: 0;
    font-family: -apple-system, BlinkMacSystemFont, "SF Pro Display", sans-serif;
    background: var(--bg-main);
    color: var(--text-main);
    overflow-x: hidden;
}

/* ========================= TIPOGRAFÍA ========================= */
h1,
h2,
h3 {
    letter-spacing: -0.02em;
}

/* ========================= NAVBAR ========================= */
.header {
    position: fixed;
    width: 100%;
    z-index: 1000;
    backdrop-filter: blur(4px);
    background: rgba(255, 255, 255, 0.209);
}

/* NAVBAR OSCURA */
.dark-mode .header {
    background: rgba(13, 13, 13, 0.176);
}

/* SEPARACIÓN ENTRE ENLACES */
.navbar-nav {
    gap: 28px;
}

/* ENLACES SUAVES */
.nav-link {
    font-weight: 500;
    opacity: 0.7;
    color: rgb(0, 0, 0);
}

.dark-mode .nav-link {
    color: rgb(255, 255, 255);
}

/* HOVER SUAVE */
.nav-link:hover {
    opacity: 1;
    color: var(--color-primary);
}

/* ========================= BOTONES ========================= */
.btn-soft {
    background: var(--color-primary);
    color: #fff;
    border-radius: 999px;
    padding: 10px 22px;
    transition: all 0.25s ease;
}

.btn-soft:hover {
    transform: translateY(-2px);
    opacity: 0.9;
}

/* ========================= FOOTER ========================= */
.footer {
    text-align: center;
    padding: 30px;
    color: var(--text-soft);
}

/* =========================
   THEME TOGGLE (PRO)
========================= */

.theme-toggle {
    cursor: pointer;
    display: flex;
    align-items: center;
}

.toggle-track {
    width: 52px;
    height: 28px;
    border-radius: 999px;
    background: rgba(0, 0, 0, 0.1);
    position: relative;
    display: flex;
    align-items: center;
    padding: 3px;
    transition: background 0.3s ease;
}

.dark-mode .toggle-track {
    background: rgba(255, 255, 255, 0.2);
}

.toggle-thumb {
    width: 22px;
    height: 22px;
    background: white;
    border-radius: 50%;
    position: absolute;
    left: 3px;
    transition: all 0.3s ease;
}

/* POSICIÓN DARK */
.dark-mode .toggle-thumb {
    left: 27px;
}

/* ICONOS */
.icon {
    position: absolute;
    width: 14px;
    height: 14px;
    stroke: currentColor;
    stroke-width: 2;
    fill: none;
    opacity: 0.5;
}

.sun {
    left: 6px;
}

.moon {
    right: 6px;
}


/* CONTENEDOR DE PARTICULAS (FONDO GLOBAL) */
#particles-bg {
    position: fixed;
    inset: 0;
    /* top:0 left:0 right:0 bottom:0 */
    width: 100%;
    height: 100vh;

    z-index: 0;
    /* fondo base */
    pointer-events: none;
    /* no bloquea clicks */

    /* opcional: mejora visual */
    opacity: 1;
}

/* ASEGURA QUE TODO EL CONTENIDO ESTÉ ENCIMA */
body.home-page {
    position: relative;
    z-index: 1;
}

/* TODAS LAS SECCIONES POR ENCIMA */
header,
main,
footer,
section {
    position: relative;
    z-index: 2;
}

/* =========================
   BOTONES (ESTILO GLOBAL SB)
========================= */

.btn,
.btn-soft,
.btn-outline,
.btn-outline-soft {
    display: inline-block;
    text-decoration: none !important;
    border: none;
    border-radius: 999px;
    padding: 12px 26px;
    font-weight: 500;
    font-size: 0.95rem;
    transition: all 0.25s ease;
    cursor: pointer;
}

/* BOTÓN PRINCIPAL (verde) */
.btn,
.btn-soft {
    background: #145c2c;
    /* un poco más profundo que tu primary */
    color: #ffffff;
}

/* HOVER */
.btn:hover,
.btn-soft:hover {
    transform: translateY(-2px);
    opacity: 0.9;
}

/* BOTÓN OUTLINE */
.btn-outline,
.btn-outline-soft {
    background: transparent;
    color: #145c2c;
    border: 1.5px solid rgba(20, 92, 44, 0.3);
}

/* HOVER OUTLINE */
.btn-outline:hover,
.btn-outline-soft:hover {
    background: rgba(20, 92, 44, 0.08);
    transform: translateY(-2px);
}

/* EVITAR ESTILO LINK */
a.btn,
a.btn-soft,
a.btn-outline,
a.btn-outline-soft {
    text-decoration: none !important;
}

/* OPCIONAL: CENTRADO EN MOBILE */
@media (max-width: 768px) {

    .btn,
    .btn-soft,
    .btn-outline,
    .btn-outline-soft {
        width: auto;
    }
}