/* ===========================================
   ASOGROVALLE - Estilos Premium Optimizados
   =========================================== */

/* Variables CSS Base (Light Mode) - Paleta Sobria y Elegante */
:root,
[data-bs-theme="light"] {
    --primary-color: #1b3022; /* Verde bosque profundo muy sobrio */
    --primary-light: #3a5a40; /* Verde oliva oscuro */
    --accent-color: #bc8f65; /* Tierra tostada */
    --accent-hover: #9c7652;

    --bg-body: #fdfdfc;
    --bg-surface: #ffffff;
    --bg-surface-alt: #f4f6f3; /* Gris verdoso muy claro */
    --bg-overlay: rgba(255, 255, 255, 0.96);

    --text-main: #1a1c1a;
    --text-muted: #5a5e5a;
    --text-inverse: #ffffff;

    --border-color: #e2e8e2;

    --box-shadow: 0 4px 20px rgba(27, 48, 34, 0.05);
    --box-shadow-hover: 0 10px 40px rgba(27, 48, 34, 0.12);

    --transition: all 0.4s cubic-bezier(0.165, 0.84, 0.44, 1);
    --border-radius: 6px;
}

/* Dark Mode - Elegancia Nocturna */
[data-bs-theme="dark"] {
    --primary-color: #7aa288;
    --primary-light: #4c6656;
    --accent-color: #d4a373;
    --accent-hover: #e8c6a5;

    --bg-body: #0d110e; /* Negro verdoso profundo */
    --bg-surface: #141a16;
    --bg-surface-alt: #1a221d;
    --bg-overlay: rgba(13, 17, 14, 0.96);

    --text-main: #f0f2f0;
    --text-muted: #a3a8a3;
    --text-inverse: #0d110e;

    --border-color: #263028;

    --box-shadow: 0 4px 15px rgba(0, 0, 0, 0.4);
    --box-shadow-hover: 0 10px 30px rgba(0, 0, 0, 0.6);
}

/* ... Estilos Base ... */
body {
    font-family: 'Inter', sans-serif;
    font-weight: 300;
    background-color: var(--bg-body);
    color: var(--text-main);
    line-height: 1.8;
    padding-top: 80px; /* Ajustado para el nuevo navbar */
    transition: background-color 0.4s ease, color 0.4s ease;
}

/* NAVEGACIÓN - Alineación Nivelada */
.navbar {
    background: var(--bg-overlay);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-bottom: 1px solid var(--border-color);
    padding: 12px 0;
    min-height: 80px;
    display: flex;
    align-items: center;
}

.navbar .container {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.navbar-brand {
    display: flex;
    align-items: center;
    gap: 12px;
}

.brand-logo {
    height: 44px;
    width: auto;
    object-fit: contain;
    transition: var(--transition);
    border-radius: 8px;
    mix-blend-mode: multiply;
    margin-right: 10px;
}

.brand-logo:hover {
    transform: scale(1.05) rotate(-2deg);
}

[data-bs-theme="dark"] .brand-logo {
    mix-blend-mode: normal;
    background-color: #FFFFFF;
    padding: 2px;
    border: 1px solid var(--primary-color);
    box-shadow: 0 0 8px rgba(122, 162, 136, 0.2);
}

.brand-text {
    font-family: 'Lora', serif;
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--text-main) !important;
    letter-spacing: 0.5px;
}

.nav-link {
    color: var(--text-muted) !important;
    font-weight: 500;
    font-size: 0.92rem;
    padding: 5px 12px !important;
    border-radius: 4px;
    margin: 0 2px;
    transition: var(--transition);
}

.nav-link:hover,
.nav-link.active {
    color: var(--primary-color) !important;
    background: transparent;
}

/* Estilo Premium para el Offcanvas (Menú Lateral) */
.offcanvas {
    background-color: var(--bg-surface);
    border-left: 1px solid var(--border-color);
    width: 280px !important;
}

.offcanvas-header {
    padding: 1.5rem;
    border-bottom: 1px solid var(--border-color);
}

.offcanvas-body {
    padding: 0;
}

.offcanvas .nav-link {
    padding: 12px 25px !important;
    border-radius: 0;
    margin: 0;
    font-size: 1rem;
    display: flex;
    align-items: center;
    border-left: 4px solid transparent;
}

.offcanvas .nav-link i {
    width: 25px;
    font-size: 1.1rem;
    color: var(--primary-color);
    opacity: 0.8;
}

.offcanvas .nav-link:hover,
.offcanvas .nav-link.active {
    background: var(--bg-surface-alt);
    color: var(--primary-color) !important;
    border-left-color: var(--primary-color);
}

[data-bs-theme="dark"] .offcanvas .nav-link:hover {
    background: rgba(255, 255, 255, 0.05);
}

/* Botón de tema en móvil */
#themeToggleMobile {
    font-size: 1.2rem;
    color: var(--text-main);
    transition: var(--transition);
}

#themeToggleMobile:hover {
    color: var(--primary-color);
    transform: rotate(15deg);
}

#themeToggle {
    border: 1px solid var(--border-color);
    color: var(--text-main);
    background: transparent;
    width: 38px;
    height: 38px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    cursor: pointer;
    box-shadow: var(--box-shadow);
    position: relative;
    overflow: hidden;
    font-size: 0.95rem;
}

#themeToggle:hover {
    background: var(--bg-surface-alt);
    border-color: var(--primary-color);
    color: var(--primary-color);
    transform: translateY(-3px) rotate(15deg);
    box-shadow: var(--box-shadow-hover);
}

/* ====================
   HERO SECTION
==================== */
.hero-section {
    background: transparent;
    color: #FFF;
    padding: 220px 0 200px;
    position: relative;
    overflow: hidden;
    min-height: 92vh;
    display: flex;
    align-items: center;
}

.hero-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-image: url('../assets/images/hero_background_1773798262791.png');
    background-size: cover;
    background-position: center center;
    z-index: -2;
    animation: zoomInOut 20s infinite alternate ease-in-out;
}

@keyframes zoomInOut {
    0% { transform: scale(1.5); }
    100% { transform: scale(1.55); }
}

.hero-section::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    /* Oscurecer la imagen y crear un gradiente verde oscuro encima a la izquierda */
    background: linear-gradient(90deg, var(--bg-surface) 5%, rgba(10, 17, 13, 0.3) 100%);
    z-index: -1;
}

[data-bs-theme="dark"] .hero-section::after {
    background: linear-gradient(90deg, var(--bg-surface) 10%, rgba(10, 17, 13, 0.7) 100%);
}

.display-4 {
    font-size: 4.5rem;
    font-weight: 800;
    line-height: 1.1;
    color: var(--text-main);
    animation: fadeInSlideUp 1.2s cubic-bezier(0.165, 0.84, 0.44, 1) forwards;
}

@keyframes fadeInSlideUp {
    0% {
        opacity: 0;
        transform: translateY(30px);
    }

    100% {
        opacity: 1;
        transform: translateY(0);
    }
}

.text-highlight {
    color: var(--primary-light);
}

.hero-lead {
    font-size: 1.3rem;
    opacity: 0;
    /* Starts hidden for animation */
    color: var(--text-muted);
    animation: fadeInSlideUp 1.2s cubic-bezier(0.165, 0.84, 0.44, 1) 0.4s forwards;
}

/* Icono decorativo hero */
.hero-icon-container {
    width: 350px;
    height: 350px;
    background: rgba(255, 255, 255, 0.05);
    border: 2px solid rgba(255, 255, 255, 0.1);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 10rem;
    margin: auto;
    backdrop-filter: blur(10px);
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.2);
    animation: float 6s ease-in-out infinite;
}

@keyframes float {

    0%,
    100% {
        transform: translateY(0);
    }

    50% {
        transform: translateY(-20px);
    }
}

/* Botones Premium - Flat y Elegantes */
.btn-primary-custom {
    background: var(--accent-color);
    color: #111 !important;
    border: none;
    padding: 14px 32px;
    font-family: 'Inter', sans-serif;
    font-weight: 500;
    letter-spacing: 0.5px;
    border-radius: 4px;
    transition: var(--transition);
    box-shadow: 0 4px 10px rgba(212, 163, 115, 0.2);
}

.btn-primary-custom:hover {
    background: var(--accent-hover);
    transform: translateY(-2px);
    box-shadow: 0 6px 15px rgba(212, 163, 115, 0.3);
}

.btn-outline-custom {
    background: transparent;
    color: #FFF !important;
    border: 1px solid rgba(255, 255, 255, 0.5);
    padding: 12px 32px;
    font-family: 'Inter', sans-serif;
    font-weight: 500;
    letter-spacing: 0.5px;
    border-radius: 4px;
    backdrop-filter: blur(5px);
    transition: var(--transition);
}

.btn-outline-custom:hover {
    background: rgba(255, 255, 255, 0.1);
    color: #FFF !important;
    border-color: #FFF;
}

/* ====================
   TARJETAS Y ESTADÍSTICAS
==================== */
.stats-card {
    background: var(--bg-surface);
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius);
    padding: 40px 20px;
    text-align: center;
    box-shadow: var(--box-shadow);
    transition: var(--transition);
    height: 100%;
}

.stats-card:hover {
    transform: translateY(-10px);
    box-shadow: var(--box-shadow-hover);
    border-color: var(--primary-color);
}

.stats-card i {
    font-size: 3rem;
    color: var(--primary-color);
    margin-bottom: 20px;
    display: inline-block;
    padding: 20px;
    background: var(--bg-surface-alt);
    border-radius: 50%;
}

.stats-card h3 {
    font-size: 3.5rem;
    color: var(--text-main);
    margin-bottom: 5px;
    font-family: 'Poppins', sans-serif;
}

/* ====================
   PROYECTOS Y EQUIPO
==================== */
.custom-card {
    background: var(--bg-surface);
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius);
    overflow: hidden;
    box-shadow: var(--box-shadow);
    transition: var(--transition);
    height: 100%;
}

.custom-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--box-shadow-hover);
}

.custom-card .card-body {
    padding: 35px 30px;
}

.card-title-custom {
    color: var(--text-main);
    font-size: 1.4rem;
    margin-bottom: 15px;
    font-weight: 600;
}

.card-text-custom {
    color: var(--text-muted);
    font-size: 0.95rem;
    font-weight: 300;
}

.team-image {
    width: 100px;
    height: 100px;
    background: var(--bg-surface-alt);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 20px;
    font-size: 3rem;
    color: var(--primary-color);
    border: 1px solid var(--border-color);
    transition: var(--transition);
}

.custom-card:hover .team-image {
    border-color: var(--primary-color);
    background: var(--bg-surface-alt);
    color: var(--primary-light);
}

/* Badges y Filtros */
.badge-custom {
    padding: 8px 16px;
    border-radius: 30px;
    font-weight: 600;
    font-size: 0.85rem;
    display: inline-block;
    letter-spacing: 0.5px;
}

.badge-success-c {
    background: rgba(91, 210, 143, 0.15);
    color: var(--primary-color);
    border: 1px solid rgba(91, 210, 143, 0.3);
}

.badge-warning-c {
    background: rgba(245, 166, 35, 0.15);
    color: var(--accent-color);
    border: 1px solid rgba(245, 166, 35, 0.3);
}

.badge-secondary-c {
    background: rgba(156, 179, 164, 0.15);
    color: var(--text-muted);
    border: 1px solid rgba(156, 179, 164, 0.3);
}

.filter-btn {
    border: 1px solid var(--border-color);
    background: var(--bg-surface);
    color: var(--text-main);
    padding: 10px 24px;
    border-radius: 30px;
    font-weight: 600;
    transition: var(--transition);
}

.filter-btn:hover,
.filter-btn.active {
    background: var(--primary-color);
    color: var(--text-inverse);
    border-color: var(--primary-color);
    transform: translateY(-2px);
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
}

/* Search input */
.search-input-group {
    background: var(--bg-surface);
    border: 1px solid var(--border-color);
    border-radius: 30px;
    overflow: hidden;
    display: flex;
    transition: var(--transition);
}

.search-input-group:focus-within {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 0.25rem rgba(91, 210, 143, 0.25);
}

.search-input-group span {
    background: transparent;
    border: none;
    color: var(--text-muted);
    padding-left: 20px;
    display: flex;
    align-items: center;
}

.search-input-group input {
    background: transparent;
    border: none;
    color: var(--text-main);
    padding: 14px 20px;
    width: 100%;
}

.search-input-group input:focus {
    outline: none;
}

/* ====================
   TABLA
==================== */
.table-custom-wrapper {
    background: var(--bg-surface);
    border-radius: var(--border-radius);
    padding: 25px;
    box-shadow: var(--box-shadow);
    border: 1px solid var(--border-color);
    overflow: hidden;
}

.table-custom {
    color: var(--text-main);
    margin: 0;
    width: 100%;
}

.table-custom thead th {
    background: var(--bg-surface-alt);
    color: var(--text-main);
    font-weight: 700;
    border-bottom: 2px solid var(--border-color);
    padding: 18px;
}

.table-custom tbody td {
    border-bottom: 1px solid var(--border-color);
    padding: 18px;
    vertical-align: middle;
    color: var(--text-muted);
}

.table-custom tbody tr {
    transition: var(--transition);
}

.table-custom tbody tr:hover {
    background: var(--bg-surface-alt);
}

/* ====================
   CONTACTO Y FOOTER
==================== */
.contact-section {
    background: var(--bg-surface-alt);
    border-top: 1px solid var(--border-color);
}

.contact-info-block h3 {
    color: var(--text-main);
    margin-bottom: 25px;
    font-weight: 800;
}

.contact-info-block h5 {
    color: var(--primary-color);
    margin-bottom: 10px;
    font-size: 1.15rem;
    display: flex;
    align-items: center;
    gap: 12px;
}

.contact-info-block p {
    color: var(--text-muted);
    margin-bottom: 25px;
    padding-left: 36px;
    font-size: 1.05rem;
}

.contact-info-block i {
    color: var(--accent-color);
    font-size: 1.3rem;
}

.form-control-c {
    background: var(--bg-surface);
    border: 1px solid var(--border-color);
    color: var(--text-main);
    border-radius: 12px;
    padding: 16px 20px;
    transition: var(--transition);
}

.form-control-c:focus {
    background: var(--bg-surface);
    border-color: var(--primary-color);
    color: var(--text-main);
    box-shadow: 0 0 0 4px rgba(91, 210, 143, 0.15);
}

.form-label-c {
    color: var(--text-main);
    font-weight: 600;
    margin-bottom: 10px;
}

/* Modal Personalizado */
.modal-content {
    background: var(--bg-surface);
    color: var(--text-main);
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius);
    box-shadow: var(--box-shadow-hover);
}

.modal-header {
    background: var(--bg-surface-alt);
    border-bottom: 1px solid var(--border-color);
}

.modal-title {
    color: var(--text-main);
    font-weight: 700;
}

.modal-footer {
    border-top: 1px solid var(--border-color);
}

.btn-close {
    filter: var(--bs-btn-close-color);
}

[data-bs-theme="dark"] .btn-close {
    filter: invert(1) grayscale(100%) brightness(200%);
}

.list-unstyled li {
    color: var(--text-muted);
}

.bg-light {
    background-color: var(--bg-surface-alt) !important;
    color: var(--text-main) !important;
}

.footer {
    background: var(--bg-surface);
    border-top: 1px solid var(--border-color);
    color: var(--text-muted);
    padding: 50px 0 30px;
}

.social-links a {
    color: var(--text-main);
    width: 45px;
    height: 45px;
    background: var(--bg-surface-alt);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    margin: 0 8px;
    transition: var(--transition);
    border: 1px solid var(--border-color);
}

.social-links a:hover {
    background: var(--primary-color);
    color: #FFF;
    border-color: var(--primary-color);
    transform: translateY(-5px);
}

/* Utils */
.py-6 {
    padding-top: 5rem;
    padding-bottom: 5rem;
}

.radius-custom {
    border-radius: 12px;
}

.max-w-700 {
    max-width: 700px;
}

.letter-spacing-2 {
    letter-spacing: 2px;
}

/* ====================
   DONAR Y LENGUAJE (NGO Features)
==================== */
.btn-donate {
    background: var(--accent-color);
    color: #111 !important;
    font-family: 'Inter', sans-serif;
    font-weight: 600;
    padding: 7px 18px !important;
    font-size: 0.88rem;
    border-radius: 4px;
    letter-spacing: 0.5px;
    transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    box-shadow: 0 4px 15px rgba(212, 163, 115, 0.2);
    border: 1px solid var(--accent-color);
}

.btn-donate:hover {
    background: transparent;
    color: var(--accent-color) !important;
    transform: translateY(-2px);
    box-shadow: 0 6px 15px rgba(212, 163, 115, 0.3);
}

.lang-toggle a {
    font-size: 0.9rem;
    padding: 0 4px !important;
}

.lang-toggle .text-muted {
    font-size: 0.8rem;
    opacity: 0.5;
}

[data-bs-theme="dark"] .lang-toggle a.text-primary {
    color: var(--accent-color) !important;
}

/* ====================
   TRANSPARENCIA (Pie Charts)
==================== */
.transparency-chart {
    border: 1px solid var(--border-color);
    transition: var(--transition);
}

.transparency-chart:hover {
    transform: translateY(-5px);
    box-shadow: var(--box-shadow-hover) !important;
}

.pie-wrapper {
    width: 120px;
    height: 120px;
    margin: 0 auto;
    position: relative;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: conic-gradient(var(--color) calc(var(--val) * 1%), var(--bg-surface-alt) 0);
    box-shadow: inset 0 0 0 15px var(--bg-surface);
}

.pie-wrapper .label {
    font-size: 2rem;
    font-weight: 800;
    color: var(--text-main);
    z-index: 2;
}

.pie-wrapper .label small {
    font-size: 1rem;
    font-weight: 600;
}

/* ====================
   NOTICIAS Y BLOG (News Cards)
==================== */
.news-card {
    transition: var(--transition);
    border-width: 1px;
}

.news-card:hover {
    transform: translateY(-8px);
    box-shadow: var(--box-shadow-hover) !important;
}

.news-card img {
    transition: transform 0.6s ease;
}

.news-card:hover img {
    transform: scale(1.05);
}

/* ====================
   ALIADOS CORPORATIVOS
==================== */
.hover-partners i {
    transition: var(--transition);
    cursor: pointer;
    filter: grayscale(100%);
}

.hover-partners i:hover {
    color: var(--primary-color) !important;
    filter: grayscale(0%);
    opacity: 1 !important;
    transform: scale(1.2);
}

/*=============================================
   ACORDEONES DE BOOTSTRAP (SOPORTE DARK/LIGHT MODE)
=============================================*/
.custom-accordion .accordion-item {
    background-color: var(--bg-surface);
    border-color: var(--border-color);
}

.custom-accordion .accordion-button {
    background-color: var(--bg-surface);
    color: var(--text-main);
    box-shadow: none;
    transition: var(--transition);
}

.custom-accordion .accordion-button:not(.collapsed) {
    background-color: var(--bg-surface-alt);
    color: var(--primary-color);
    box-shadow: inset 0 -1px 0 var(--border-color);
}

.custom-accordion .accordion-button::after {
    filter: brightness(0.5);
    /* Icono de flecha visible */
}

[data-bs-theme="dark"] .custom-accordion .accordion-button::after {
    filter: invert(1) brightness(0.8);
}

/* Corrección general textos oscuros */
.text-main {
    color: var(--text-main) !important;
}

.text-accent {
    color: var(--accent-color) !important;
}