/* ===== VARIABLES DE COLOR ===== */
:root {
    /* Paleta */
    --color-white: #ffffff;
    --color-light-gray: #b6babc;
    --color-blue: #0c557c;
    --color-red: #b02524;
    --color-dark-gray: #1d1d1c;
    --color-charcoal: #262624;
    --color-cream: #faf7f4;
    --color-beige: #f5ece6;
    /* Alias semánticos */
    --primary-color: var(--color-red);
    --secondary-color: var(--color-blue);
    --accent-color: var(--color-light-gray);
    --text-dark: var(--color-dark-gray);
    --text-light: var(--color-white);
    --background-light: var(--color-cream);
    --background-dark: var(--color-charcoal);
    --shadow-light: 0 2px 10px rgba(0,0,0,0.1);
    --shadow-medium: 0 4px 20px rgba(0,0,0,0.15);
    --surface-light: var(--color-beige);
    --transition: all 0.3s ease;
}

/* ===== CONFIGURACIÓN BASE ===== */
html {
    font-size: 14px;
    position: relative;
    min-height: 100%;
}

@media (min-width: 768px) {
    html {
        font-size: 16px;
    }
}

body {
    margin-bottom: 60px;
}

/* ===== FORMULARIOS ===== */
.btn:focus,
.btn:active:focus,
.btn-link.nav-link:focus,
.form-control:focus,
.form-check-input:focus {
    box-shadow: 0 0 0 0.1rem var(--color-white), 0 0 0 0.25rem var(--primary-color);
}

.form-floating > .form-control-plaintext::placeholder,
.form-floating > .form-control::placeholder {
    color: var(--bs-secondary-color);
    text-align: end;
}

.form-floating > .form-control-plaintext:focus::placeholder,
.form-floating > .form-control:focus::placeholder {
    text-align: start;
}

/* ===== NAVEGACIÓN ===== */
.navbar {
    min-height: 80px;
    background-color: var(--background-light);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.logo {
    height: 70px;
    width: auto;
}

.navbar-nav {
    gap: 1rem;
    align-items: center;
}

.nav-link {
    font-weight: 500;
    position: relative;
    transition: all 0.3s ease;
    padding: 0.5rem 1rem;
    border-radius: 0.375rem;
}

    .nav-link:hover {
        color: var(--primary-color) !important;
    }

    /* Estados activos */
    .nav-item.active .nav-link,
    .nav-link.active {
        color: var(--primary-color) !important;
        font-weight: 600;
    }

/* Efecto de subrayado animado */
.nav-link-highlight {
    position: relative;
}

    .nav-link-highlight::after {
        content: '';
        position: absolute;
        bottom: -2px;
        left: 50%;
        width: 0;
        height: 2px;
        background-color: var(--primary-color);
        transform: translateX(-50%);
        transition: width 0.3s ease;
        border-radius: 1px;
    }

    /* Mostrar subrayado en hover Y cuando está activo */
    .nav-link-highlight:hover::after,
    .nav-link-highlight.active::after,
    .nav-item.active .nav-link-highlight::after {
        width: 80%;
    }

/* ===== BOTÓN GRADIENTE ===== */
.btn-gradient {
    background: linear-gradient(45deg, var(--primary-color), var(--secondary-color));
    color: var(--text-light);
    border: none;
    border-radius: 0.5rem;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    font-weight: bold;
    text-align: center;
    text-decoration: none;
    text-transform: uppercase;
    transition: all 0.3s ease-in-out;
}

    .btn-gradient:hover {
        background: linear-gradient(45deg, var(--secondary-color), var(--primary-color));
        color: var(--text-light);
        box-shadow: 0 8px 16px rgba(0, 0, 0, 0.3);
        transform: scale(1.05);
    }

/* ===== FOOTER ===== */
footer {
    position: absolute;
    bottom: 0;
    width: 100%;
    line-height: 60px;
    white-space: nowrap;
    background-color: var(--background-light);
    border-top: 1px solid var(--accent-color);
}

.admin-link {
    text-decoration: none;
    transition: color 0.3s ease;
}

    .admin-link:hover {
        color: var(--primary-color) !important;
    }

.hidden-link {
    opacity: 0.1;
    text-decoration: none;
    transition: opacity 0.3s;
}

    .hidden-link:hover {
        opacity: 1;
        color: #ccc;
    }

    .hidden-link:visited {
        color: #ccc !important;
    }

/* ===== UTILIDADES ===== */
.shadow-sm {
    box-shadow: 0 0.125rem 0.25rem rgba(0, 0, 0, 0.075) !important;
}

.loading {
    opacity: 0.6;
    pointer-events: none;
}

/* ===== ANIMACIONES ADICIONALES ===== */
.nav-item {
    animation: fadeInUp 0.5s ease;
}

.fade-in-up {
    animation: fadeInUp 0.6s ease-out;
}

.fade-in-down {
    animation: fadeInDown 0.6s ease-out;
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes fadeInDown {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* ===== TRANSICIONES GLOBALES ===== */
* {
    transition: color 0.3s ease, background-color 0.3s ease, border-color 0.3s ease;
}

/* ===== CARRUSEL DE INICIO ===== */
#carruselProgen {
    border-radius: 1rem;
    overflow: hidden;
    height: calc(100vh - 200px);
    min-height: 450px;
    background-color: var(--background-light);
}

    #carruselProgen .carousel-item {
        height: 100%;
        width: 100%;
    }

        #carruselProgen .carousel-item img {
            width: 100%;
            height: 100%;
            object-fit: contain;
            object-position: center;
        }

    #carruselProgen .carousel-indicators button {
        width: 12px;
        height: 12px;
        border-radius: 50%;
        background-color: rgba(255, 255, 255, 0.5);
        border: none;
        transition: var(--transition);
    }

        #carruselProgen .carousel-indicators button.active {
            background-color: var(--color-white);
            transform: scale(1.2);
        }

@media (max-width: 992px) {
    #carruselProgen {
        height: 50vh;
        min-height: 350px;
    }
}

/* ===== TARJETA FACEBOOK ===== */
#facebookCard {
    display: flex;
    flex-direction: column;
}

    #facebookCard .card-body {
        flex-grow: 1;
        display: flex;
        flex-direction: column;
    }

    #facebookCard .fb-page {
        flex-grow: 1;
        min-height: 500px;
        position: relative;
    }

        #facebookCard .fb-page span,
        #facebookCard .fb-page iframe {
            position: absolute;
            top: 0;
            left: 0;
            width: 100% !important;
            height: 100% !important;
        }

/* ===== RESPONSIVE ===== */
@media (max-width: 768px) {
    .navbar-nav {
        gap: 0.5rem;
        margin-top: 1rem;
        width: 100%;
    }

    .nav-link-highlight::after {
        display: none;
    }

    .nav-item {
        border-bottom: 1px solid rgba(182, 186, 188, 0.3);
        width: 100%;
    }

        .nav-item:last-child {
            border-bottom: none;
        }

    .nav-link {
        padding: 0.75rem 1rem;
        width: 100%;
        text-align: left;
    }

    .btn-gradient {
        width: 100%;
        text-align: center;
        margin-top: 0.5rem;
    }
}
