/********** Template CSS **********/
:root {
    --primary: #FF6F0F;
    --secondary: #FFF0E6;
    --light: #F8F8F9;
    --dark: #001D23;
}

.back-to-top {
    position: fixed;
    display: none;
    right: 30px;
    bottom: 30px;
    z-index: 99;
}


/*** Spinner ***/
#spinner {
    opacity: 0;
    visibility: hidden;
    transition: opacity .5s ease-out, visibility 0s linear .5s;
    z-index: 99999;
}

#spinner.show {
    transition: opacity .5s ease-out, visibility 0s linear 0s;
    visibility: visible;
    opacity: 1;
}


/*** Button ***/
.btn {
    font-weight: 500;
    transition: .5s;
}

.btn.btn-primary,
.btn.btn-outline-primary:hover {
    color: #FFFFFF;
}

.btn.btn-primary:hover {
    color: var(--primary);
    background: transparent;
}

.btn-square {
    width: 38px;
    height: 38px;
}

.btn-sm-square {
    width: 32px;
    height: 32px;
}

.btn-lg-square {
    width: 48px;
    height: 48px;
}

.btn-square,
.btn-sm-square,
.btn-lg-square {
    padding: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: normal;
}


/*** Navbar ***/
.fixed-top {
    transition: .5s;
}

.top-bar {
    height: 45px;
    border-bottom: 1px solid rgba(255, 255, 255, .07);
}

.navbar .dropdown-toggle::after {
    border: none;
    content: "\f107";
    font-family: "Font Awesome 5 Free";
    font-weight: 900;
    vertical-align: middle;
    margin-left: 8px;
}

.navbar .navbar-nav .nav-link {
    margin-right: 30px;
    padding: 25px 0;
    color: #FFFFFF;
    font-weight: 500;
    outline: none;
}

.navbar .navbar-nav .nav-link:hover,
.navbar .navbar-nav .nav-link.active {
    color: var(--primary);
}

@media (max-width: 991.98px) {
    .navbar .navbar-nav {
        margin-top: 10px;
        border-top: 1px solid rgba(0, 0, 0, .07);
        background: var(--dark);
    }

    .navbar .navbar-nav .nav-link {
        padding: 10px 0;
    }
}

@media (min-width: 992px) {
    .navbar .nav-item .dropdown-menu {
        display: block;
        visibility: hidden;
        top: 100%;
        transform: rotateX(-75deg);
        transform-origin: 0% 0%;
        transition: .5s;
        opacity: 0;
    }

    .navbar .nav-item:hover .dropdown-menu {
        transform: rotateX(0deg);
        visibility: visible;
        transition: .5s;
        opacity: 1;
    }
}


/*** Header ***/
.carousel-caption {
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    background: rgba(0, 29, 35, .4);
    z-index: 1;
}

.carousel-control-prev,
.carousel-control-next {
    width: 15%;
}

.carousel-control-prev-icon,
.carousel-control-next-icon {
    width: 3rem;
    height: 3rem;
    background-color: var(--dark);
    border: 12px solid var(--dark);
    border-radius: 3rem;
}

@media (max-width: 768px) {
    #header-carousel .carousel-item {
        position: relative;
        min-height: 450px;
    }
    
    #header-carousel .carousel-item img {
        position: absolute;
        width: 100%;
        height: 100%;
        object-fit: cover;
    }
}

.page-header {
    padding-top: 12rem;
    padding-bottom: 6rem;
    background: linear-gradient(rgba(0, 29, 35, .8), rgba(0, 29, 35, .8)), url(../img/carousel-1.jpg) center center no-repeat;
    background-size: cover;
}

.page-header .breadcrumb-item+.breadcrumb-item::before {
    color: #999999;
}


/*** Causes ***/
.causes-item .progress {
    height: 5px;
    border-radius: 0;
    overflow: visible;
}

.causes-item .progress .progress-bar {
    position: relative;
    overflow: visible;
    width: 0px;
    border-radius: 0;
    transition: 5s;
}

.causes-item .progress .progress-bar span {
    position: absolute;
    top: -7px;
    right: 0;
    width: 40px;
    height: 19px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    background: var(--primary);
    color: #FFFFFF;
}

.causes-item .causes-overlay {
    position: absolute;
    width: 100%;
    height: 0;
    top: 0;
    left: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(0, 0, 0, .5);
    overflow: hidden;
    opacity: 0;
    transition: .5s;
}

.causes-item:hover .causes-overlay {
    height: 100%;
    opacity: 1;
}


/*** Service ***/
.service-item {
    box-shadow: 0 0 45px rgba(0, 0, 0, .06);
}


/*** Donate ***/
.donate {
    background: rgba(0, 29, 35, .8);
}

.btn-group .btn-light:hover,
.btn-group input[type="radio"]:checked+label {
    color: var(--primary);
    border-color: var(--primary);
}


/*** Team ***/
.team-item img {
    position: relative;
    top: 0;
    transition: .5s;
}

.team-item:hover img {
    top: -30px;
}

.team-item .team-text {
    position: relative;
    height: 100px;
    transition: .5s;
}

.team-item:hover .team-text {
    margin-top: -60px;
    height: 160px;
}

.team-item .team-text .team-social {
    opacity: 0;
    transition: .5s;
}

.team-item:hover .team-text .team-social {
    opacity: 1;
}

.team-item .team-social .btn {
    display: inline-flex;
    color: var(--primary);
    background: #FFFFFF;
    border-radius: 40px;
}

.team-item .team-social .btn:hover {
    color: #FFFFFF;
    background: var(--primary);
}


/*** Testimonial ***/
.testimonial-carousel::before {
    position: absolute;
    content: "";
    top: 0;
    left: 0;
    height: 100%;
    width: 0;
    background: linear-gradient(to right, rgba(255, 255, 255, 1) 0%, rgba(255, 255, 255, 0) 100%);
    z-index: 1;
}

.testimonial-carousel::after {
    position: absolute;
    content: "";
    top: 0;
    right: 0;
    height: 100%;
    width: 0;
    background: linear-gradient(to left, rgba(255, 255, 255, 1) 0%, rgba(255, 255, 255, 0) 100%);
    z-index: 1;
}

@media (min-width: 768px) {
    .testimonial-carousel::before,
    .testimonial-carousel::after {
        width: 200px;
    }
}

@media (min-width: 992px) {
    .testimonial-carousel::before,
    .testimonial-carousel::after {
        width: 300px;
    }
}

.testimonial-carousel .owl-item .testimonial-text {
    background: var(--light);
    transform: scale(.8);
    transition: .5s;
}

.testimonial-carousel .owl-item.center .testimonial-text {
    background: var(--primary);
    transform: scale(1);
}

.testimonial-carousel .owl-item .testimonial-text *,
.testimonial-carousel .owl-item .testimonial-item img {
    transition: .5s;
}

.testimonial-carousel .owl-item.center .testimonial-text * {
    color: var(--light) !important;
}

.testimonial-carousel .owl-item.center .testimonial-item img {
    background: var(--primary) !important;
} 

.testimonial-carousel .owl-nav {
    position: absolute;
    width: 350px;
    top: 15px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    justify-content: space-between;
    opacity: 0;
    transition: .5s;
    z-index: 1;
}

.testimonial-carousel:hover .owl-nav {
    width: 300px;
    opacity: 1;
}

.testimonial-carousel .owl-nav .owl-prev,
.testimonial-carousel .owl-nav .owl-next {
    position: relative;
    color: var(--primary);
    font-size: 45px;
    transition: .5s;
}

.testimonial-carousel .owl-nav .owl-prev:hover,
.testimonial-carousel .owl-nav .owl-next:hover {
    color: var(--dark);
}


/*** Footer ***/

.footer .btn.btn-link {
    display: block;
    margin-bottom: 5px;
    padding: 0;
    text-align: left;
    color: rgba(255,255,255,0.5);
    font-weight: normal;
    text-transform: capitalize;
    transition: .3s;
}

.footer .btn.btn-link::before {
    position: relative;
    content: "\f105";
    font-family: "Font Awesome 5 Free";
    font-weight: 900;
    color: rgba(255,255,255,0.5);
    margin-right: 10px;
}

.footer .btn.btn-link:hover {
    color: var(--light);
    letter-spacing: 1px;
    box-shadow: none;
}

.footer .btn.btn-square {
    color: rgba(255,255,255,0.5);
    border: 1px solid rgba(255,255,255,0.5);
}

.footer .btn.btn-square:hover {
    color: var(--secondary);
    border-color: var(--light);
}

.footer .copyright {
    padding: 25px 0;
    font-size: 15px;
    border-top: 1px solid rgba(256, 256, 256, .1);
}

.footer .copyright a {
    color: var(--secondary);
}

.footer .copyright a:hover {
    color: var(--primary);
}

/* --- VARIABLES MAESTRAS --- */
:root {
    --fides-primary: #007bff;
    --fides-secondary: #00d2ff;
    --fides-dark: #001D23;
    --fides-glass: rgba(255, 255, 255, 0.1);
    --fides-glass-border: rgba(255, 255, 255, 0.2);
    --transition-smooth: all 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}

/* --- EFECTO REVEAL AL HACER SCROLL --- */
.reveal {
    opacity: 0;
    transform: translateY(30px);
    transition: var(--transition-smooth);
}
.reveal.active {
    opacity: 1;
    transform: translateY(0);
}

/* --- BOTONES PREMIUM CON EFECTO DE LUZ --- */
.btn-premium {
    position: relative;
    overflow: hidden;
    z-index: 1;
    border-radius: 50px;
    padding: 12px 35px;
    font-weight: 600;
    transition: var(--transition-smooth);
    background: linear-gradient(45deg, var(--fides-primary), var(--fides-secondary));
    border: none;
    color: white !important;
}

.btn-premium::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.4), transparent);
    transition: 0.6s;
}

.btn-premium:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 20px rgba(0, 123, 255, 0.4);
}

.btn-premium:hover::before {
    left: 100%;
}

/* --- TARJETAS DE IMPACTO (GLASSMORPHISM) --- */
.fact-item {
    background: white;
    border-radius: 20px;
    padding: 40px;
    border: 1px solid rgba(0,0,0,0.05);
    transition: var(--transition-smooth);
    position: relative;
}

.fact-item:hover {
    transform: translateY(-15px) rotate(2deg);
    background: var(--fides-primary);
    color: white !important;
}

.fact-item:hover i, .fact-item:hover h2 {
    color: white !important;
}

/* --- CARRUSEL DE TESTIMONIOS (EXPERTO UX) --- */
.testimonial-carousel .testimonial-item {
    padding: 30px;
    border-radius: 25px;
    transition: var(--transition-smooth);
    transform: scale(0.9);
    filter: blur(2px);
    opacity: 0.6;
}

.testimonial-carousel .owl-item.center .testimonial-item {
    transform: scale(1.05);
    filter: blur(0);
    opacity: 1;
    box-shadow: 0 20px 40px rgba(0,0,0,0.1);
}

.testimonial-carousel .owl-dot {
    height: 10px;
    width: 10px;
    background: #ccc !important;
    margin: 5px;
    border-radius: 10px;
    transition: 0.3s;
}

.testimonial-carousel .owl-dot.active {
    width: 30px;
    background: var(--fides-primary) !important;
}

/* ================================================================
   EFECTO GLASSMORPHISM Y HOVER PREMIUM (TARJETAS DE PROYECTOS)
   ================================================================ */

/* Estilo base de la tarjeta */
.project-item {
    background: rgba(255, 255, 255, 0.7); /* Transparencia blanca */
    backdrop-filter: blur(12px); /* El "vidrio" esmerilado */
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid rgba(255, 255, 255, 0.3); /* Borde sutil como reflejo */
    border-radius: 20px; /* Esquinas redondeadas modernas */
    overflow: hidden;
    transition: all 0.5s cubic-bezier(0.4, 0, 0.2, 1); /* Transición fluida estilo Apple */
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.05); /* Sombra base suave */
}

/* Contenedor de la imagen para que no pierda el estilo */
.project-item img {
    transition: transform 0.8s ease;
    border-bottom: 1px solid rgba(0, 0, 0, 0.05);
}

/* --- EFECTO HOVER (AL PASAR EL MOUSE) --- */
.project-item:hover {
    transform: translateY(-15px) scale(1.02); /* Se eleva y crece un poco */
    background: rgba(255, 255, 255, 0.9); /* Se vuelve un poco más sólido */
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.12); /* Sombra más profunda para dar altura */
    border: 1px solid var(--primary); /* El borde cambia al color de FIDES */
}

/* Efecto de zoom en la imagen interna */
.project-item:hover img {
    transform: scale(1.1);
}

/* Estilo del texto dentro de la tarjeta glass */
.project-item .p-4 {
    position: relative;
    z-index: 1;
}

/* Opcional: Pequeño destello de luz al pasar el mouse */
.project-item::after {
    content: "";
    position: absolute;
    top: 0;
    left: -100%;
    width: 50%;
    height: 100%;
    background: linear-gradient(
        to right,
        rgba(255, 255, 255, 0) 0%,
        rgba(255, 255, 255, 0.3) 50%,
        rgba(255, 255, 255, 0) 100%
    );
    transform: skewX(-25deg);
    transition: 0.7s;
}

.project-item:hover::after {
    left: 150%;
}

/* Contenedor Premium de Contadores */
.fact-item {
    background: rgba(255, 255, 255, 0.03);
    backdrop-filter: blur(15px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 24px;
    padding: 3rem 2rem;
    position: relative;
    overflow: hidden;
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.fact-item::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, rgba(0, 123, 255, 0.1) 0%, transparent 70%);
    opacity: 0;
    transition: opacity 0.4s;
}

.fact-item:hover {
    transform: translateY(-12px) scale(1.03);
    border-color: var(--fides-primary);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.2);
}

.fact-item:hover::before {
    opacity: 1;
}

/* Animación de los números */
.fact-item h2 {
    font-size: 3.5rem;
    font-weight: 800;
    background: linear-gradient(45deg, var(--fides-primary), var(--fides-accent));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    margin-bottom: 0.5rem;
    display: inline-block;
}

/* Símbolo "+" animado */
.counter-plus {
    font-size: 2rem;
    vertical-align: top;
    color: var(--fides-primary);
    margin-left: 2px;
}

/* Estilos Espectaculares para Contadores */
.fact-item-premium {
    background: #ffffff;
    border-radius: 25px;
    padding: 40px 30px;
    text-align: center;
    position: relative;
    overflow: hidden;
    transition: all 0.5s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.05);
    border: 1px solid rgba(0, 123, 255, 0.1);
}

.fact-item-premium:hover {
    transform: translateY(-15px);
    box-shadow: 0 25px 50px rgba(0, 123, 255, 0.15);
    background: linear-gradient(145deg, #ffffff 0%, #f0f7ff 100%);
}

.fact-icon {
    margin-bottom: 20px;
    color: var(--fides-primary);
    transition: 0.5s;
}

.fact-item-premium:hover .fact-icon {
    transform: scale(1.2) rotate(10deg);
}

.counter-value {
    display: inline-block;
    font-size: 3.5rem;
    font-weight: 800;
    line-height: 1;
    background: linear-gradient(45deg, #002d5b, #007bff);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    margin-bottom: 10px;
}

.counter-suffix {
    font-size: 2rem;
    font-weight: 700;
    color: #007bff;
    vertical-align: top;
}

.fact-item-premium p {
    font-size: 1.1rem;
    font-weight: 600;
    color: #555;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin: 0;
}

/* Efecto decorativo de fondo */
.fact-item-premium::after {
    content: '';
    position: absolute;
    bottom: -20px;
    right: -20px;
    width: 100px;
    height: 100px;
    background: rgba(0, 123, 255, 0.05);
    border-radius: 50%;
    z-index: 0;
}

/* Efecto de iluminación en los números */
[data-toggle="counter-up"] {
    transition: all 0.3s ease;
    display: inline-block;
}

.fact-item:hover [data-toggle="counter-up"] {
    transform: scale(1.1);
    text-shadow: 0 0 20px rgba(0, 123, 255, 0.4);
}

/* Estilo para los iconos en hover */
.fact-item i {
    transition: 0.5s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.fact-item:hover i {
    transform: translateY(-10px) rotate(360deg);
    color: #00d2ff !important; /* Cambia a un azul más claro al girar */
}

/* Tarjeta de Spotify con resplandor */
.spotify-card {
    background: #191414; /* Color oscuro oficial de Spotify */
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
    transition: all 0.4s ease;
    border: 1px solid rgba(30, 215, 96, 0.1);
}

.spotify-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 20px 40px rgba(30, 215, 96, 0.2); /* Resplandor verde */
    border-color: rgba(30, 215, 96, 0.5);
}

/* Botón personalizado de Spotify */
.btn-spotify {
    display: inline-block;
    padding: 12px 30px;
    background-color: #1DB954;
    color: white;
    border-radius: 50px;
    font-weight: bold;
    text-decoration: none;
    transition: 0.3s;
    border: none;
}

.btn-spotify:hover {
    background-color: #1ed760;
    color: white;
    box-shadow: 0 5px 15px rgba(29, 185, 84, 0.4);
    transform: scale(1.05);
}

/* Iconos pequeños */
.btn-sm-square {
    width: 35px;
    height: 35px;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Estilo para el contenedor del Chatbot de IA */
#ia-chat-container {
    border: 1px solid var(--primary);
    border-radius: 15px;
    overflow: hidden;
    box-shadow: 0 10px 25px rgba(0,0,0,0.1);
}

/* Etiqueta de "Powered by AI" minimalista */
.ai-badge {
    font-size: 10px;
    background: var(--dark);
    color: var(--primary);
    padding: 2px 8px;
    border-radius: 10px;
    text-transform: uppercase;
    font-weight: bold;
    margin-left: 10px;
}

.whatsapp-float {
    position: fixed;
    bottom: 30px;
    right: 30px; /* Lo ponemos a la derecha para no tapar otros elementos */
    background-color: #25d366;
    color: #FFF;
    border-radius: 50px;
    text-align: center;
    font-size: 30px;
    box-shadow: 2px 2px 10px rgba(0,0,0,0.2);
    z-index: 9999; /* Z-index muy alto para que siempre esté al frente */
    width: 60px;
    height: 60px;
    display: flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    transition: all 0.3s ease;
}

.whatsapp-float:hover {
    background-color: #128c7e;
    color: white;
    transform: scale(1.1);
}

/* --- ESTILO DE CINTA DE ALIADOS --- */
.logo-aliado {
    max-height: 60px; /* Ajusta esto según el tamaño de tus logos */
    width: auto;
    filter: grayscale(100%); /* Efecto sobrio inicial */
    opacity: 0.6;
    transition: all 0.4s ease;
    cursor: pointer;
}

.logo-aliado:hover {
    filter: grayscale(0%); /* El logo recupera su color original */
    opacity: 1;
    transform: scale(1.1); /* Ligero aumento de tamaño */
}

.sello-transparencia {
    opacity: 0.7;
    transition: all 0.3s ease;
}

.sello-transparencia img {
    display: block;
    margin: 0 auto 5px;
}

.sello-transparencia:hover {
    opacity: 1;
    transform: translateY(-3px);
}

/* Color verde para el sello de seguridad si no usas imagen */
.fa-shield-alt {
    color: #28a745 !important;
}