body {
    font-family: 'Poppins', sans-serif;
    background-color: #f5f8fc;
    color: #222;
    scroll-behavior: smooth;
}

/* ------------ TOP BAR ------------ */
.top-bar {
    background: #0072CE;
    padding: 12px 0;
}

.plan-logo {
    height: 55px;
}

.menu-btn {
    color: white;
    padding: 10px 22px;
    background: rgba(255,255,255,0.20);
    border-radius: 40px;
    text-decoration: none;
    font-weight: 500;
    font-size: 0.9rem;
}

.menu-btn:hover {
    background: rgba(255,255,255,0.30);
}

/* ------------ HERO ------------ */
.hero-section {
    background: #0072ce;
    color: white;
    padding: 60px 0 70px;
}

.hero-text h1 {
    line-height: 1.1;
}

.hero-image img {
    border-radius: 20px;
}

/* ------------ FILTROS + BUSCADOR ------------ */
.filters-bar {
    background: white;
    border-bottom: 1px solid #ddd;
    position: sticky;
    top: 0;
    z-index: 100;
}


.filtro-select {
    background: #F0F6FF;
    border: 2px solid #D3E7FF;
    border-radius: 30px;
    color: #004B8D;
    font-weight: 500;
    cursor: pointer; 
    
    
    padding: 0.375rem 0.75rem; 
    font-size: 0.9rem;
    height: calc(1.5em + 0.75rem + 2px); 
}

.filtro-select:focus {
    outline: none;
    border-color: #0072CE;
}


.filters-bar > .container {
    display: flex;
    flex-wrap: nowrap; /* Desktop: keep in one line */
    gap: 10px;  
    justify-content: flex-start; /* Alinea al inicio */
    align-items: center;
    padding-top: 8px !important;
    padding-bottom: 8px !important;
}


#filtroAOGD, 
#filtroPais, 
#filtroDonante, 
#filtroPeriodo {
    max-width: 120px; 
    white-space: nowrap; 
    overflow: hidden;
    text-overflow: ellipsis;
    flex-shrink: 1; 
}


/* 1. Botón de Reset MUY Compacto */
.reset-btn {
    height: calc(1.5em + 0.75rem + 2px); 
    width: calc(1.5em + 0.75rem + 2px); 
    padding: 0; 
    text-align: center;
    flex-shrink: 0; 
    background-color: #f0f8ff; 
    border: 1px solid #dee2e6; 
    border-radius: 0.375rem;
    color: #0d6efd; 
    display: flex;
    justify-content: center;
    align-items: center;
}

.reset-btn i {
    font-size: 1.2rem;
    line-height: 1; 
}

.reset-btn:hover {
    background-color: #e6f1ff;
}


/* BUSCADOR */
.search-wrapper {
    position: relative;
    flex: 1 1 260px;
    max-width: 300px; /* Consolidado */
    flex-grow: 1; /* Consolidado */
}

.search-input {
    width: 100%;
    border-radius: 30px;
    border: 2px solid #D3E7FF;
    padding: 10px 40px 10px 18px;
    font-size: 14px;
}

.search-input:focus {
    outline: none;
    border-color: #0072CE;
}

.search-icon {
    position: absolute;
    right: 14px;
    top: 50%;
    transform: translateY(-50%);
    color: #7a8ba3;
}


#contadorResultados {
    font-size: 0.85rem;
}


.project-card {
    border-radius: 18px;
    overflow: hidden;
    transition: 0.25s;
    background-color: white;
}

.project-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 18px 40px rgba(0,0,0,0.08);
}

.project-img {
    height: 220px;
    object-fit: cover;
}

.badge.bg-pink {
    background: #ff3f8a;
}

.project-card .card-body {
    padding: 18px 18px 20px;
}

/* ------------ PAGINACIÓN ------------ */
.pagination-container {
    gap: 10px;
    align-items: center;
}

.page-btn {
    border-radius: 30px;
    border: 1px solid #D3E7FF;
    background: #fff;
    padding: 8px 18px;
    font-size: 0.9rem;
    color: #0057A5;
    font-weight: 500;
}

.page-btn:disabled {
    opacity: 0.4;
    cursor: default;
}

.page-btn:not(:disabled):hover {
    background: #F0F6FF;
}

.page-status {
    font-size: 0.9rem;
    color: #555;
}

#resumen-regional {
    border-top: 1px solid #ddd;
}

#contacto {
    border-top: 1px solid #ddd;
}


.btn-hero-pill{
    background: #ffffff;
    color: #0072CE;
    font-weight: 600;
    padding: 14px 38px;
    border-radius: 999px;
    border: 2px solid #ffffff;
    font-size: 1rem;
    box-shadow: 0 6px 14px rgba(0,0,0,0.10);
    transition: all .2s ease;
    text-decoration: none;
    display: inline-block;
}
.btn-hero-pill:hover{
    background: #f2f6ff !important; 
    border-color: #ffffff !important;
    color: #0072CE !important;
    transform: translateY(-3px);
    box-shadow: 0 10px 20px rgba(0,0,0,0.15);
}


.lang-switcher {
    margin-left: auto;
    display: flex;
    gap: 8px;
}
.lang-btn {
    color: #fff;
    text-decoration: none;
    font-weight: 600;
    font-size: 0.85rem;
    padding: 6px 12px;
    border-radius: 20px;
    background: rgba(255,255,255,0.20);
    transition: all 0.3s;
}
.lang-btn.active, .lang-btn:hover {
    background: #fff;
    color: #0072CE; 
}


.text-limit {
    display: -webkit-box;
    -webkit-box-orient: vertical;
    overflow: hidden;
    text-align: justify;
    -webkit-line-clamp: 4; 
    text-overflow: ellipsis;
}


@media (min-width: 992px) {
    .filters-bar .container {
        display: flex;
        justify-content: center;
        align-items: center;
        gap: 15px;
    }

    #filtroAOGD,
    #filtroPais,
    #filtroReset {
        width: 220px; 
        flex-shrink: 0;
    }

    .search-wrapper {
        width: 320px; 
        flex-shrink: 0;
    }
}

@media (max-width: 768px) {
    .filters-bar > .container {
        flex-wrap: wrap; 
        justify-content: space-between; 
    }
    
    .filters-bar > .container > *:not(.search-wrapper):not(.reset-btn) {
        flex-basis: calc(50% - 5px); 
        max-width: 50%;
    }

    .reset-btn {
        flex-basis: auto; 
        order: 1; 
    }

    .search-wrapper {
        flex-basis: 100%; 
        max-width: 100%;
        order: 5; 
    }

    @media (max-width: 500px) {
        .filters-bar > .container > * {
            flex-basis: 100%; 
            max-width: 100%;
        }
    }
}
