/* ==========================================================================
   1. VARIABLES Y CONFIGURACIÓN GLOBAL
   ========================================================================== */

/* Definición de Color Primario (Basado en logoFinal.png) */
:root {
    --bs-primary: #1a3a5f; /* Azul oscuro del logo */
    --bs-primary-rgb: 26, 58, 95;
}

/* Ajustes Globales de HTML y Body */
html {
    font-size: 14px;
    height: 100%; /* Para sticky footer */
}

@media (min-width: 768px) {
    html {
        font-size: 16px;
    }
}

body {
    display: flex;
    flex-direction: column;
    min-height: 100%; /* Para sticky footer */
    color: #495057; /* Texto global suave */
}

main {
    flex-grow: 1; /* Empuja el footer hacia abajo */
}

/* Quitar Outline/Box-Shadow en Focus (Mejora visual) */
.btn:focus, .btn:active:focus, .btn.active:focus,
.form-control:focus, .form-control:active:focus, .form-control.active:focus,
button:focus, button:active:focus, button.active:focus {
    outline: none !important;
    box-shadow: none !important;
}

/* ==========================================================================
   2. ESTILOS DE COMPONENTES REUTILIZABLES
   ========================================================================== */

/* --- Navbar --- */
.navbar .nav-link {
    font-size: 1.05rem; /* Tamaño de fuente aumentado */
    transition: color 0.2s ease-in-out, background-color 0.2s ease-in-out;
    padding-left: 1rem;
    padding-right: 1rem;
    border-radius: 0.25rem; /* Bordes para hover */
}

    .navbar .nav-link:hover {
        color: var(--bs-primary);
        background-color: rgba(255, 255, 255, 0.1); /* Fondo sutil hover */
    }

/* Estilo para el link ACTIVO */
.navbar .nav-item .nav-link.active {
    color: white !important; /* CAMBIO: Texto blanco para contraste */
    background-color: rgba(255, 255, 255, 0.1); /* Mismo fondo que hover */
    font-weight: 500;
}

/* --- Botones --- */
/* Sobrescribir colores primarios de Bootstrap */
.btn-primary {
    --bs-btn-bg: var(--bs-primary);
    --bs-btn-border-color: var(--bs-primary);
    --bs-btn-hover-bg: #152f4f; /* Hover más oscuro */
    --bs-btn-hover-border-color: #152f4f;
    --bs-btn-active-bg: #10253f; /* Active aún más oscuro */
    --bs-btn-active-border-color: #10253f;
    --bs-btn-disabled-bg: var(--bs-primary);
    --bs-btn-disabled-border-color: var(--bs-primary);
}

.btn-outline-primary {
    --bs-btn-color: var(--bs-primary);
    --bs-btn-border-color: var(--bs-primary);
    --bs-btn-hover-color: #fff;
    --bs-btn-hover-bg: var(--bs-primary);
    --bs-btn-hover-border-color: var(--bs-primary);
    --bs-btn-active-color: #fff;
    --bs-btn-active-bg: var(--bs-primary);
    --bs-btn-active-border-color: var(--bs-primary);
    --bs-btn-disabled-color: var(--bs-primary);
    --bs-btn-disabled-border-color: var(--bs-primary);
}

/* --- Botón Volver Arriba --- */
#btnVolverArriba {
    position: fixed;
    bottom: 20px;
    right: 20px;
    z-index: 99;
    display: none;
    width: 50px;
    height: 50px;
    border-radius: 0.5rem; /* Cuadrado redondeado */
    font-size: 1.2rem;
    transition: opacity 0.3s ease-in-out, background-color 0.3s ease-in-out;
}

    #btnVolverArriba:hover {
        opacity: 0.85; /* Hover sutil */
    }

/* --- Links de Texto --- */
a.text-primary {
    color: var(--bs-primary) !important;
}

    a.text-primary:hover {
        color: #152f4f !important; /* Hover más oscuro */
    }

/* ==========================================================================
   3. ESTILOS ESPECÍFICOS DE PÁGINAS
   ========================================================================== */

/* --- Estilos Comunes a las Páginas (Hero, Cards, etc.) --- */
.hero-section {
    background-size: cover;
    background-position: center 75%;
    color: white;
}

.hero-home,
.hero-servicios,
.hero-contacto {
    height: 70vh; /* Altura unificada */
}

.service-card-link {
    text-decoration: none;
}

.service-card {
    position: relative;
    overflow: hidden;
    border: none;
    height: 300px;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
}

.service-card-bg {
    background-size: cover;
    background-position: center;
    position: absolute;
    top: -10px;
    left: -10px;
    right: -10px;
    bottom: -10px;
    z-index: 1;
    filter: blur(3px) brightness(0.7);
    transition: filter 0.3s ease-in-out, transform 0.3s ease-in-out;
}

.service-card-link:hover .service-card-bg {
    filter: blur(0px) brightness(1);
    transform: scale(1.05);
}

.service-card .card-body {
    position: relative;
    z-index: 2;
    color: white;
    transition: transform 0.3s ease-in-out;
    flex-grow: 0;
    text-align: center;
}

.service-card-link:hover .card-body {
    transform: scale(1.1);
}

/* --- Estilos Página Servicios --- */
.service-detail-img {
    width: 100%;
    height: 400px;
    object-fit: cover; /* Recorta imagen */
}

.service-detail-list {
    margin-left: 0;
    padding-left: 0;
}

.service-detail-item {
    display: flex;
    align-items: center;
    padding: 0.75rem 0;
    border-bottom: 1px solid #eee;
}

    .service-detail-item:last-child {
        border-bottom: none;
    }

    .service-detail-item i {
        color: var(--bs-primary);
        font-size: 1.2rem;
        margin-right: 1rem;
    }

    .service-detail-item span,
    .service-detail-item div { /* Afecta al <div> contenedor */
        color: #495057;
        font-weight: 500;
    }
#consultoria,
#analisis,
#capacitaciones,
#checkpoint {
    scroll-margin-top: 80px; /* Ajusta este valor si es necesario (altura del navbar + un poco de margen) */
}

/* --- Estilos Página Contacto --- */
.contact-list {
    list-style: none;
    padding-left: 0;
}

    .contact-list li {
        font-size: 1.1rem;
        margin-bottom: 1.5rem;
        display: flex;
        align-items: flex-start;
    }

    .contact-list .icon {
        font-size: 1.5rem;
        width: 40px;
        margin-right: 15px;
        color: var(--bs-primary);
    }

.map-responsive {
    overflow: hidden;
    padding-bottom: 56.25%;
    position: relative;
    height: 0;
    border-radius: 0.375rem;
    box-shadow: 0 4px 8px rgba(0,0,0,0.1);
}

    .map-responsive iframe {
        left: 0;
        top: 0;
        height: 100%;
        width: 100%;
        position: absolute;
    }

/* --- Estilos Página Index --- */
.separator-section {
    background-size: cover;
    background-position: center;
    background-attachment: fixed; /* Parallax */
    color: white;
    min-height: 40vh;
}

/* Carrusel de Logos */
.logo-carousel .swiper-slide img {
    max-height: 60px;
    width: auto;
    margin: 0 auto;
    opacity: 0.5;
    transition: filter 0.3s ease, opacity 0.3s ease;
}

.logo-carousel:hover .swiper-slide img {
    filter: grayscale(0%);
    opacity: 1;
}

.client-name-placeholder {
    display: inline-block;
    padding: 1rem 1.5rem;
    font-size: 1rem;
    font-weight: 500;
    color: #6c757d;
    border: 1px dashed #ced4da;
    border-radius: 0.25rem;
    opacity: 0.6;
    transition: opacity 0.3s ease;
}

.logo-carousel:hover .client-name-placeholder {
    opacity: 1;
}

.logo-carousel .swiper-wrapper {
    transition-timing-function: linear !important; /* Movimiento continuo */
}

/* Sección Equipo */
.team-member-card {
    text-align: center;
    border: 1px solid #eee;
    border-radius: 0.5rem;
    background-color: #fff;
    height: 100%;
    transition: box-shadow 0.3s ease;
}

    .team-member-card:hover {
        box-shadow: 0 0.5rem 1rem rgba(0, 0, 0, 0.1);
    }

    .team-member-card h4 {
        font-size: 1.1rem;
        font-weight: bold;
        color: var(--bs-primary);
    }

/* ==========================================================================
   4. ESTILOS DEL FOOTER
   ========================================================================== */
.site-footer {
    font-size: 0.9rem;
}

    .site-footer h5 {
        color: var(--bs-primary);
    }

.footer-links li {
    margin-bottom: 0.5rem;
}

.footer-links a {
    text-decoration: none;
    color: var(--bs-light);
    transition: color 0.2s;
}

    .footer-links a:hover {
        color: var(--bs-primary);
        text-decoration: underline;
    }

.contact-list-footer li {
    display: flex;
    align-items: center;
    margin-bottom: 0.75rem;
    color: var(--bs-light);
}

.contact-list-footer i {
    width: 25px;
    margin-right: 10px;
    font-size: 1.1rem;
    color: var(--bs-primary);
}

.social-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background-color: rgba(255, 255, 255, 0.1);
    color: var(--bs-light);
    text-decoration: none;
    margin-right: 10px;
    transition: background-color 0.2s, color 0.2s;
}

    .social-icon:hover {
        background-color: var(--bs-primary);
        color: white;
    }
