/* 
    ONG Sin Límites 360 - MASTER STYLE SHEET (PRODUCTION READY)
    Diseño Robusto, Sin Desbordamientos, Estética Profesional
*/

:root {
    --primary: #f7a714;
    --primary-dark: #e07a00;
    --secondary: #2c3e50;
    --text-main: #333333;
    --text-muted: #666666;
    --white: #ffffff;
    --bg-light: #f8f9fa;
    --bg-dark: #1a1a1a;
    --container: 1170px;
    --transition: all 0.4s cubic-bezier(0.165, 0.84, 0.44, 1);
    --shadow: 0 10px 30px rgba(0,0,0,0.08);
}

/* 1. RESET & SAFETY (EVITA DESBORDAMIENTOS) */
* { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; overflow-x: hidden; width: 100%; }
body { 
    font-family: 'Roboto', sans-serif; 
    color: var(--text-main); 
    line-height: 1.6; 
    overflow-x: hidden;
    width: 100%;
    background: #fff;
    -webkit-font-smoothing: antialiased;
}

/* Control Universal de Imágenes */
img { 
    max-width: 100%; 
    height: auto; 
    display: block; 
    object-fit: cover; 
}

/* 2. LAYOUT CORE */
.container { 
    max-width: var(--container); 
    margin: 0 auto; 
    padding: 0 20px; 
    width: 100%;
}
.section { padding: 80px 0; overflow: hidden; position: relative; }
.bg-light { background-color: var(--bg-light); }
.bg-dark { background-color: var(--bg-dark); color: #fff !important; }
.bg-primary { background-color: var(--primary) !important; color: #fff !important; }
.centered { text-align: center; }
.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 40px; align-items: center; width: 100%; }
.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 30px; width: 100%; }
.text-primary { color: var(--primary) !important; }
.text-white { color: #fff !important; }

/* 3. COMPONENTES: BOTONES */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 12px 32px;
    border-radius: 50px;
    font-weight: 600;
    transition: var(--transition);
    text-decoration: none;
    cursor: pointer;
    font-size: 1rem;
    border: none;
}
.btn-primary { background: var(--primary); color: #fff; box-shadow: 0 4px 15px rgba(247, 167, 20, 0.3); }
.btn-primary:hover { background: var(--primary-dark); transform: translateY(-3px); }
.btn-outline-white { border: 2px solid #fff; color: #fff; background: transparent; }
.btn-outline-white:hover { background: #fff; color: var(--primary); }

/* 4. HEADER & NAV */
.main-header {
    background: rgba(255,255,255,0.98);
    height: 85px;
    display: flex;
    align-items: center;
    position: sticky;
    top: 0;
    z-index: 2000;
    box-shadow: 0 2px 15px rgba(0,0,0,0.05);
}
.header-container { display: flex; justify-content: space-between; align-items: center; width: 100%; }
.logo { display: flex; align-items: center; gap: 12px; text-decoration: none; }
.logo img { height: 50px; width: auto; flex-shrink: 0; }
.logo-text { color: var(--primary); font-weight: 800; font-size: 0.8rem; line-height: 1.1; }

.nav-menu ul { display: flex; gap: 20px; list-style: none; align-items: center; }
.nav-menu a { font-weight: 600; font-size: 0.9rem; color: var(--secondary); text-decoration: none; }
.nav-menu a:hover { color: var(--primary); }

/* BOTONES ESPECIALES HEADER */
.btn-donar {
    background: var(--primary) !important;
    color: var(--white) !important;
    padding: 10px 25px !important;
    font-size: 0.85rem !important;
    border-radius: 50px;
    font-weight: 700;
    box-shadow: 0 4px 15px rgba(247, 167, 20, 0.4);
    animation: pulse-orange 2s infinite;
    border: none;
    text-decoration: none;
}
.btn-donar:hover { background: var(--primary-dark) !important; transform: scale(1.05) translateY(-2px); }

.btn-aula {
    background: var(--secondary) !important;
    color: var(--white) !important;
    padding: 10px 25px !important;
    font-size: 0.85rem !important;
    border-radius: 50px;
    font-weight: 700;
    border: 2px solid rgba(255,255,255,0.1) !important;
    box-shadow: 0 4px 15px rgba(44, 62, 80, 0.3);
    text-decoration: none;
}
.btn-aula:hover { background: #1a252f !important; transform: scale(1.05) translateY(-2px); }

@keyframes pulse-orange {
    0% { box-shadow: 0 0 0 0 rgba(247, 167, 20, 0.7); }
    70% { box-shadow: 0 0 0 10px rgba(247, 167, 20, 0); }
    100% { box-shadow: 0 0 0 0 rgba(247, 167, 20, 0); }
}

.mobile-toggle { display: none; font-size: 1.8rem; cursor: pointer; color: var(--secondary); z-index: 2100; }

/* 5. SECCIÓN HERO */
.hero {
    height: 70vh;
    background: linear-gradient(rgba(0,0,0,0.55), rgba(0,0,0,0.55)), url('../img/IMG_5518.jpg');
    background-size: cover;
    background-position: center;
    display: flex;
    align-items: center;
    color: #fff;
}
.hero h1 { font-size: clamp(2rem, 5vw, 3.5rem); font-family: 'Poppins', sans-serif; margin-bottom: 20px; }
.hero p { font-size: 1.1rem; margin-bottom: 30px; opacity: 0.95; max-width: 700px; }
.badge { background: var(--primary); color: #fff; padding: 6px 18px; border-radius: 50px; font-size: 0.8rem; font-weight: 700; text-transform: uppercase; margin-bottom: 15px; display: inline-block; }

/* 6. MISIÓN & VISIÓN */
.about-image img { border-radius: 20px; box-shadow: var(--shadow); width: 100%; max-width: 480px; margin: 0 auto; }
.mission-vision { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; margin-top: 30px; }
.mv-box { background: #fff; padding: 30px; border-radius: 15px; border: 1px solid #eee; box-shadow: var(--shadow); transition: var(--transition); }
.mv-box h3 { color: var(--primary); font-size: 1.25rem; margin-bottom: 10px; display: flex; align-items: center; gap: 10px; }
.commitment-box { background: var(--bg-light); padding: 25px; border-radius: 12px; border-left: 5px solid var(--primary); margin: 30px 0; }

/* Filosofía */
.philosophy-section { background: linear-gradient(to right, #ffffff, #fcfcfc); }
.philosophy-badge { color: var(--primary); font-weight: 700; text-transform: uppercase; font-size: 0.8rem; letter-spacing: 2px; display: block; margin-bottom: 10px; }
.philosophy-quote { background: var(--bg-light); padding: 30px; border-radius: 0 30px 30px 30px; border-left: 6px solid var(--primary); margin: 25px 0; position: relative; box-shadow: 0 10px 25px rgba(0,0,0,0.03); }
.philosophy-quote i { font-size: 1.5rem; color: var(--primary); opacity: 0.4; margin-bottom: 15px; display: block; }
.philosophy-quote p { font-size: 1.4rem; font-family: 'Poppins', sans-serif; color: var(--secondary); line-height: 1.3; }
.philosophy-quote p strong { color: var(--primary); }
.philosophy-description { font-size: 1.05rem; color: var(--text-muted); line-height: 1.8; }
.img-balanced { width: 100%; max-width: 500px; height: 450px; object-fit: cover; border-radius: 30px; box-shadow: 0 20px 50px rgba(0,0,0,0.1); margin: 0 auto; }

/* 7. QUÉ HACEMOS (PILARES) */
.services-grid { 
    display: grid; 
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); 
    gap: 30px; 
    margin-top: 50px; 
    width: 100%;
}
.service-card {
    background: #fff;
    padding: 0;
    border-radius: 20px;
    overflow: hidden;
    box-shadow: var(--shadow);
    transition: var(--transition);
    position: relative;
}
.service-card img { width: 100%; height: 200px; object-fit: cover; }
.card-content { padding: 30px; position: relative; }
.card-number { 
    position: absolute; 
    top: -25px; 
    right: 25px; 
    background: var(--primary); 
    color: #fff; 
    width: 50px; 
    height: 50px; 
    display: flex; 
    align-items: center; 
    justify-content: center; 
    border-radius: 50%; 
    font-weight: 900; 
    border: 4px solid #fff;
}
.service-card:hover { transform: translateY(-10px); }

/* 8. HISTORIAS */
.story-card { background: #fff; padding: 40px; border-radius: 20px; box-shadow: var(--shadow); border-top: 5px solid var(--primary); display: flex; flex-direction: column; height: 100%; }
.quote-icon { color: var(--primary); font-size: 2.2rem; opacity: 0.2; margin-bottom: 15px; }
.story-footer { margin-top: auto; padding-top: 25px; }
.btn-story {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    color: var(--primary);
    text-decoration: none;
    font-weight: 700;
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    transition: 0.3s;
}
.btn-story i { font-size: 0.8rem; transition: transform 0.3s; }
.btn-story:hover { color: var(--primary-dark); }
.btn-story:hover i { transform: translateX(5px); }

/* Impact Section Counters */
.counter-box { font-size: 3.5rem; font-weight: 800; color: var(--white); margin: 10px 0; font-family: 'Poppins', sans-serif; }
.impact-card i { font-size: 3rem; margin-bottom: 15px; }

/* Noticias y Actualidad */
.news-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(320px, 1fr)); gap: 30px; }
.news-card { background: var(--white); border-radius: 20px; overflow: hidden; box-shadow: var(--shadow); transition: var(--transition); display: flex; flex-direction: column; }
.news-card:hover { transform: translateY(-10px); box-shadow: 0 15px 40px rgba(0,0,0,0.1); }
.news-image { position: relative; height: 200px; overflow: hidden; }
.news-image img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.5s ease; }
.news-tag { position: absolute; top: 15px; left: 15px; background: var(--primary); color: var(--white); padding: 5px 15px; border-radius: 50px; font-size: 0.75rem; font-weight: 700; text-transform: uppercase; }
.news-body { padding: 25px; display: flex; flex-direction: column; flex-grow: 1; }
.news-date { font-size: 0.85rem; color: var(--text-muted); margin-bottom: 10px; display: block; }
.news-link { margin-top: auto; color: var(--primary); text-decoration: none; font-weight: 700; font-size: 0.9rem; display: inline-flex; align-items: center; gap: 8px; }

/* 9. NUBE DE SOCIOS */
.partners-mosaic { display: flex; flex-direction: row; flex-wrap: wrap; justify-content: center; align-items: center; gap: 30px; margin-top: 50px; width: 100%; }
.partner-card { background: #fff; flex: 0 1 auto; width: clamp(140px, 15vw, 180px); height: 110px; padding: 20px; border-radius: 20px; display: flex; align-items: center; justify-content: center; box-shadow: 0 5px 15px rgba(0,0,0,0.05); transition: var(--transition); border: 1px solid #eee; }
.partner-card img { max-width: 85%; max-height: 75%; object-fit: contain; filter: grayscale(1); opacity: 0.6; transition: 0.4s; }
.partner-card:hover { transform: translateY(-10px); border-color: var(--primary); }

/* 10. FORMULARIO DE CONTACTO */
.contact-info .contact-list { list-style: none; margin: 30px 0; }
.contact-list li { display: flex; align-items: center; gap: 15px; margin-bottom: 25px; font-size: 1.1rem; color: #eee; }
.contact-list i { width: 40px; height: 40px; background: rgba(247, 167, 20, 0.1); border-radius: 50%; display: flex; align-items: center; justify-content: center; font-size: 1.2rem; }
.contact-form-area { background: var(--white); padding: 50px; border-radius: 25px; box-shadow: 0 25px 60px rgba(0,0,0,0.3); color: var(--text-main); }
.contact-form .form-group { margin-bottom: 25px; }
.contact-form label { display: block; margin-bottom: 8px; font-weight: 600; color: var(--secondary); font-size: 0.9rem; }
.contact-form input, .contact-form textarea { width: 100%; padding: 15px 20px; border-radius: 12px; border: 2px solid #f0f0f0; background: #fdfdfd; font-size: 1rem; transition: var(--transition); color: var(--text-main); }
.contact-form input:focus, .contact-form textarea:focus { border-color: var(--primary); outline: none; }
.btn-block { width: 100%; padding: 16px !important; text-transform: uppercase; letter-spacing: 1px; }

/* 11. FOOTER */
.main-footer { padding: 60px 0 30px; background: #111; color: #999; }
.footer-grid { display: grid; grid-template-columns: 1.5fr 1fr 1fr; gap: 40px; align-items: start; }
.footer-banner { width: 100%; max-width: 320px; height: auto; max-height: 200px; object-fit: contain; border-radius: 10px; background: #1a1a1a; margin-bottom: 15px; display: block; }
.footer-nav h4, .footer-social h4 { color: #fff; margin-bottom: 20px; font-size: 1.1rem; }
.footer-nav ul { list-style: none; }
.footer-nav li { margin-bottom: 10px; }
.footer-nav a { color: #999; text-decoration: none; font-size: 0.9rem; transition: 0.3s; }
.footer-nav a:hover { color: var(--primary); padding-left: 5px; }
.social-links { display: flex; gap: 12px; }
.social-links a { width: 38px; height: 38px; background: #222; display: flex; align-items: center; justify-content: center; border-radius: 50%; color: #fff; transition: 0.3s; text-decoration: none; }
.social-links a:hover { background: var(--primary); transform: translateY(-3px); }
.footer-bottom { margin-top: 40px; padding-top: 20px; border-top: 1px solid #222; font-size: 0.85rem; }

/* 12. ANIMACIONES */
[data-reveal] { opacity: 0; transform: translateY(30px); transition: 0.8s cubic-bezier(0.165, 0.84, 0.44, 1); }
[data-reveal].active { opacity: 1; transform: translateY(0); }

/* 13. RESPONSIVE FINETUNING */
@media (max-width: 1024px) {
    .grid-2, .grid-3 { grid-template-columns: 1fr; text-align: center; }
    .hero { text-align: center; }
    .hero-content { margin: 0 auto; }
    .mission-vision { grid-template-columns: 1fr; }
    .footer-grid { grid-template-columns: 1fr 1fr; }
    .footer-banner { margin: 0 auto 20px; }
    .counter-box { font-size: 2.8rem; }
}

@media (max-width: 768px) {
    .main-header { height: 70px; background: #fff; }
    .mobile-toggle { display: block; }
    .nav-menu {
        position: fixed;
        top: 0;
        right: -100%;
        width: 80%;
        max-width: 300px;
        height: 100vh;
        background: #fff;
        z-index: 3000;
        padding: 80px 30px;
        transition: var(--transition);
        box-shadow: -5px 0 30px rgba(0,0,0,0.1);
        display: block !important;
    }
    .nav-menu.active { right: 0; }
    .nav-menu ul { flex-direction: column; align-items: flex-start; gap: 25px; }
    .nav-menu a { font-size: 1.1rem; width: 100%; display: block; }
    .btn-donar, .btn-aula { width: 100%; text-align: center; margin-top: 10px; }
    .footer-grid { grid-template-columns: 1fr; text-align: center; }
    .social-links { justify-content: center; }
}
