/* ===================================
   MEJORAS VISUALES - MENÚ Y SECTION-TITLE
   =================================== */

/* === LOGO === */
.logo {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    font-size: 1.5rem;
    font-weight: bold;
    color: var(--primary-color) !important;
    transition: var(--transition);
}

.logo:hover {
    transform: scale(1.05);
    color: var(--secondary-color) !important;
}

.logo-img {
    max-height: 60px;
    width: auto;
    object-fit: contain;
}

.logo-text {
    font-size: 1.25rem;
    font-weight: 700;
}

.logo i {
    font-size: 1.75rem;
}

/* === MENÚ MEJORADO === */
.navbar {
    padding: 1.25rem 0;
    background: var(--white);
}

.nav-menu {
    display: flex;
    list-style: none;
    gap: 0.5rem;
    align-items: center;
}

.nav-menu li {
    position: relative;
}

/* Ocultar header del menú móvil en desktop */
.nav-menu-header {
    display: none !important;
}

.nav-menu a {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: var(--dark-color);
    font-weight: 500;
    padding: 0.75rem 1.25rem;
    border-radius: 8px;
    position: relative;
    transition: var(--transition);
}

.nav-menu a i {
    font-size: 1rem;
    opacity: 0.8;
}

.nav-menu a:hover {
    background: var(--light-color);
    color: var(--primary-color);
}

.nav-menu a.active {
    background: linear-gradient(135deg, var(--primary-color), var(--accent-color));
    color: var(--white);
    box-shadow: var(--shadow);
}

.nav-menu a.active i {
    opacity: 1;
}

/* Efecto de línea inferior - eliminar */
.nav-menu a:after {
    display: none;
}

/* Botón de donar especial */
.nav-cta {
    margin-left: 1rem;
}

.btn-donate {
    background: linear-gradient(135deg, var(--primary-color), #c0392b) !important;
    color: var(--white) !important;
    padding: 0.75rem 1.5rem !important;
    border-radius: 50px !important;
    font-weight: 600;
    box-shadow: 0 4px 15px rgba(231, 76, 60, 0.3);
    transition: all 0.3s ease;
    border: 2px solid transparent;
}

.btn-donate:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(231, 76, 60, 0.4);
    background: linear-gradient(135deg, #c0392b, var(--primary-color)) !important;
}

.btn-donate i {
    opacity: 1 !important;
}

/* === SECTION-TITLE MEJORADO === */
.section-title {
    text-align: center;
    padding: 4rem 2rem;
    margin: 0 0 3rem 0;
    position: relative;
    overflow: hidden;
    border-radius: 0;
    width: 100%;
    margin-left: calc(-50vw + 50%);
    margin-right: calc(-50vw + 50%);
}

/* Estilo sin fondo (limpio) para página principal */
.section-title.clean {
    background: transparent !important;
    padding: 3rem 2rem 1rem;
    margin-bottom: 0 !important;
}

.section-title.clean h2 {
    color: var(--dark-color) !important;
    position: relative;
    display: inline-block;
    padding-bottom: 1rem;
}

.section-title.clean h2::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 60px;
    height: 3px;
    background: linear-gradient(90deg, var(--primary-color), var(--accent-color));
    border-radius: 2px;
}

.section-title.clean p {
    color: var(--text-color) !important;
    opacity: 0.8;
}

/* Con imagen de fondo */
.section-title.has-image {
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    color: var(--white);
    position: relative;
}

.section-title.has-image::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, rgba(44, 62, 80, 0.85), rgba(231, 76, 60, 0.75));
    z-index: 1;
}

.section-title.has-image * {
    position: relative;
    z-index: 2;
    color: var(--white) !important;
    text-shadow: 0 2px 10px rgba(0,0,0,0.3);
}

/* Sin imagen de fondo - usar color */
.section-title.has-color {
    background: linear-gradient(135deg, var(--section-bg-color, var(--primary-color)), var(--accent-color));
    color: var(--white);
}

.section-title.has-color * {
    color: var(--white) !important;
}

/* Estilo por defecto si no hay imagen ni color personalizado ni clean */
.section-title:not(.has-image):not(.has-color):not(.clean) {
    background: linear-gradient(135deg, var(--primary-color), var(--accent-color));
    color: var(--white);
}

.section-title:not(.has-image):not(.has-color):not(.clean) * {
    color: var(--white) !important;
}

.section-title h2 {
    font-size: 2.5rem;
    margin-bottom: 1rem;
    font-weight: 700;
    position: relative;
    display: inline-block;
}

.section-title:not(.clean) h2::after {
    content: '';
    display: block;
    width: 80px;
    height: 4px;
    background: currentColor;
    margin: 1rem auto 0;
    border-radius: 2px;
    opacity: 0.8;
}

.section-title p {
    font-size: 1.125rem;
    margin-bottom: 0;
    opacity: 0.95;
    max-width: 700px;
    margin-left: auto;
    margin-right: auto;
    line-height: 1.6;
}

/* Efectos decorativos */
.section-title:not(.clean)::after {
    content: '';
    position: absolute;
    top: -50%;
    right: -10%;
    width: 400px;
    height: 400px;
    background: radial-gradient(circle, rgba(255,255,255,0.1) 0%, transparent 70%);
    border-radius: 50%;
    pointer-events: none;
    z-index: 1;
}

.section-title.has-image::after,
.section-title.has-color::after,
.section-title:not(.has-image):not(.has-color):not(.clean)::after {
    z-index: 2;
}

/* === FOOTER LOGO === */
.footer-logo {
    max-height: 80px;
    width: auto;
    margin-bottom: 1rem;
    filter: brightness(0) invert(1); /* Convertir a blanco */
    opacity: 0.9;
    transition: var(--transition);
}

.footer-logo:hover {
    opacity: 1;
    transform: scale(1.05);
}

/* === RESPONSIVE === */
@media (max-width: 768px) {
    /* Botón hamburguesa */
    .menu-toggle {
        display: block !important;
        background: none;
        border: none;
        font-size: 1.5rem;
        color: var(--dark-color);
        cursor: pointer;
        padding: 0.5rem;
        transition: var(--transition);
        z-index: 1000;
    }

    .menu-toggle:hover {
        color: var(--primary-color);
    }

    /* Menú móvil */
    .nav-menu {
        display: flex !important; /* Sobrescribir display: none de style.css */
        position: fixed !important;
        top: 0 !important;
        right: -100%;
        left: auto !important;
        bottom: 0 !important;
        width: 85%;
        max-width: 320px;
        height: 100vh;
        background: var(--white);
        flex-direction: column;
        padding: 0;
        box-shadow: -5px 0 20px rgba(0,0,0,0.15);
        transition: right 0.35s cubic-bezier(0.4, 0, 0.2, 1);
        gap: 0;
        align-items: stretch;
        z-index: 9999;
        overflow-y: auto;
        overflow-x: hidden;
        will-change: right;
    }

    /* Menú móvil abierto */
    .nav-menu.active {
        right: 0 !important;
    }

    /* Header del menú móvil con logo - solo visible en móvil */
    .nav-menu-header {
        display: block;
        padding: 1.5rem 2rem;
        padding-right: 4rem;
        border-bottom: 2px solid var(--light-color);
        background: var(--white);
        position: relative;
        box-shadow: 0 2px 8px rgba(0,0,0,0.05);
        list-style: none;
    }

    .nav-menu-logo {
        display: flex;
        align-items: center;
        gap: 0.75rem;
        color: var(--primary-color);
    }

    .nav-menu-logo img {
        max-height: 50px;
        width: auto;
        object-fit: contain;
        filter: none;
    }

    .nav-menu-logo-text {
        font-size: 1.25rem;
        font-weight: 700;
        color: var(--primary-color);
    }

    .nav-menu-logo i {
        font-size: 2rem;
        color: var(--primary-color);
    }

    .nav-menu li {
        margin-bottom: 0;
        border-bottom: 1px solid var(--light-color);
    }

    .nav-menu li:last-child {
        border-bottom: none;
    }

    .nav-menu a {
        width: 100%;
        padding: 1.25rem 2rem;
        justify-content: flex-start;
        border-radius: 0;
        font-size: 1.05rem;
    }

    .nav-menu a:hover {
        background: var(--light-color);
        padding-left: 2.5rem;
    }

    .nav-menu a.active {
        border-radius: 0;
        border-left: 4px solid var(--primary-color);
    }

    .nav-cta {
        margin-left: 0;
        margin-top: auto;
        padding: 2rem;
        border-top: 2px solid var(--light-color);
    }

    .btn-donate {
        width: 100%;
        justify-content: center;
        padding: 1rem 1.5rem !important;
    }

    /* Logo móvil */
    .logo-img {
        max-height: 45px;
    }

    .logo-text {
        font-size: 1.1rem;
    }

    /* Section title responsive */
    .section-title {
        padding: 3rem 1.5rem;
    }

    .section-title h2 {
        font-size: 1.75rem;
    }

    .section-title p {
        font-size: 1rem;
    }

    /* Footer logo */
    .footer-logo {
        max-height: 60px;
    }
}

@media (max-width: 480px) {
    .logo-text {
        display: none;
    }

    .nav-menu a span {
        font-size: 0.95rem;
    }

    .section-title {
        padding: 2.5rem 1rem;
    }

    .section-title h2 {
        font-size: 1.5rem;
    }
}

/* Overlay para cerrar menú móvil */
.menu-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    z-index: -1;
    opacity: 0;
    transition: opacity 0.3s ease;
    pointer-events: none;
}

.menu-overlay.active {
    display: block;
    opacity: 1;
    pointer-events: auto;
}

/* Botón cerrar en menú móvil */
.nav-menu-close {
    position: absolute;
    top: 1rem;
    right: 1rem;
    width: 45px;
    height: 45px;
    display: none;
    align-items: center;
    justify-content: center;
    background: rgba(255, 255, 255, 0.9);
    border: 2px solid var(--primary-color);
    border-radius: 50%;
    cursor: pointer;
    z-index: 10000;
    transition: var(--transition);
    font-size: 1.5rem;
    color: var(--primary-color);
    box-shadow: 0 2px 8px rgba(0,0,0,0.15);
}

.nav-menu-close:hover {
    background: var(--primary-color);
    color: var(--white);
    transform: rotate(90deg) scale(1.1);
    box-shadow: 0 4px 12px rgba(231, 76, 60, 0.3);
}

@media (max-width: 768px) {
    .nav-menu-close {
        display: flex !important;
    }
}
