/* Variables de color */
:root {
    --primary-color: #01725a;
    --secondary-color: #f8f8f8;
    --accent-color: #68c729;
    --white-color: #ffffff;
    --dark-text-color: #333333;
    --light-text-color: rgb(255, 255, 255);

    /* Fuentes */
    --heading-font: 'Poppins', sans-serif;
    --body-font: 'Poppins', sans-serif;
}

/* Reset básico */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: var(--body-font);
    color: var(--dark-text-color);
    background-color: var(--white-color);
    scroll-behavior: smooth;
    line-height: 1.6;
    overflow-x: hidden;
}

h1, h2, h3, h4, h5, h6 {
    font-family: var(--heading-font);
    color: var(--dark-text-color);
    margin-bottom: 1rem;
}

p {
    margin-bottom: 1rem;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 1.5rem;
}

/* Botones */
.btn {
    display: inline-block;
    background-color: var(--primary-color);
    color: var(--light-text-color);
    padding: 0.9rem 2rem;
    border-radius: 5px;
    text-decoration: none;
    font-weight: 600;
    transition: background-color 0.3s ease, transform 0.2s ease;
    margin-top: 1.5rem;
    letter-spacing: 0.5px;
    font-family: 'Poppins';
}

.btn:hover {
    background-color: var(--accent-color);
    transform: translateY(-3px);
    box-shadow: 0 6px 12px rgba(0,0,0,0.2);
}

/* --- NAVEGACIÓN (HEADER) --- */
.navbar {
    position: fixed;
    top: 0;
    left: 0; /* Asegura que empiece desde el borde */
    width: 100%;
    height: 90px; /* Altura fija para ayudar a la alineación */
    background-color: var(--primary-color);
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 2rem;
    z-index: 1000;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.logo a {
    display: flex;
    align-items: center;
}

.logo img {
    max-height: 70px;
    width: auto;
    transition: transform 0.3s ease;
}

.nav-links {
    list-style: none;
    display: flex;
    align-items: center;
    gap: 1.5rem; /* Espacio elegante entre links */
    margin: 0;
    padding: 0;
}

.nav-links li {
    position: relative;
    display: flex;
    align-items: center;
}

.nav-links a {
    text-decoration: none;
    color: #ffffff;
    font-weight: 600;
    font-size: 16px;
    padding: 10px 5px;
    transition: color 0.3s ease;
    white-space: nowrap;
    position: relative;
}

/* Subrayado animado */
.nav-links li a::after {
    content: "";
    position: absolute;
    left: 0;
    bottom: 0;
    width: 0;
    height: 3px;
    background: #ffcc00;
    transition: width 0.3s ease-in-out;
    bottom: -2px;
    background-color: #ffcc00;
}

.nav-links li a:hover::after {
    width: 100%;
}

.nav-links a:hover {
    color: #ffcc00;
}

/* --- DROPDOWN (DESPLEGABLE) --- */
.dropdown-content {
    display: none;
    position: absolute;
    top: 100%; /* Justo debajo del li */
    left: 50%;
    transform: translateX(-50%); /* Centra el desplegable respecto al link */
    background-color: var(--primary-color);
    min-width: 220px;
    box-shadow: 0px 8px 16px rgba(0, 0, 0, 0.3);
    border-radius: 4px;
    padding: 10px 0;
    z-index: 9999;
}

/* Mostrar al pasar el ratón */
.dropdown:hover .dropdown-content {
    display: block;
}

.dropdown-content li {
    width: 100%;
}

.dropdown-content li a {
    padding: 12px 20px;
    font-size: 14px;
    color: white;
    width: 100%;
    border: none;
}

.dropdown-content li a:hover {
    background: var(--primary-color);
    color: #ffcc00 !important;
}

/* --- RESPONSIVE --- */
.menu-toggle {
    display: none;
    font-size: 1.8rem;
    cursor: pointer;
    color: white;
}

@media (max-width: 992px) {
    /* El botón se queda arriba y siempre visible */
    .menu-toggle {
        display: block;
        position: relative;
        z-index: 2000;
        cursor: pointer;
        color: var(--light-text-color);
        font-size: 1.8rem;
    }

    /* El panel del menú */
    .nav-links {
        display: flex;
        flex-direction: column;
        position: fixed;
        top: 90px;
        right: -100%;
        width: 70%;
        max-width: 300px;
        height: calc(100vh - 90px);
        background-color: rgba(1, 114, 90, 0.98);
        transition: right 0.4s cubic-bezier(0.1, 0.7, 0.1, 1);
        z-index: 1000;
        padding: 2rem 0;
        align-items: center;
        box-shadow: -5px 0 15px rgba(0,0,0,0.2);
    }

    .nav-links.show {
        right: 0;
    }

    /* Centrado de los items */
    .nav-links li {
        width: 100%;
        text-align: center;
        margin: 1rem 0;
    }

    .nav-links li a {
        font-size: 1.2rem;
        display: block;
        padding: 10px;
    }

    /* Contenedor del Dropdown al estar activo */
    .nav-links li.dropdown.active .dropdown-content {
        display: block;
        position: static; /* Fundamental para que empuje el contenido hacia abajo */
        width: 100%;
        background: rgba(0, 0, 0, 0.15);
        box-shadow: none;
        padding: 0;
        margin-top: 10px;
        border-top: 1px solid rgba(255, 255, 255, 0.1);
        border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    }

    /* Los enlaces dentro del desplegable */
    .dropdown-content li a {
        padding: 15px 20px;
        font-size: 1.05rem;
        color: rgba(255, 255, 255, 0.9);
        text-align: center;
        border-bottom: 1px solid rgba(255, 255, 255, 0.05);
        font-weight: 400;
    }

    /* Quitamos la línea de subrayado en los hijos para no saturar */
    .dropdown-content li a::after {
        display: none;
    }

    /* Pequeño icono de flecha */
    .dropbtn::after {
        content: ' \f107'; /* Icono de flecha de FontAwesome */
        font-family: "Font Awesome 5 Free";
        font-weight: 900;
        margin-left: 8px;
        transition: transform 0.3s;
        display: inline-block;
    }

    .dropdown.active .dropbtn::after {
        transform: rotate(180deg);
    }
}