/* Estilos generales */
:root {
    --primary-color: #f7931e; /* Naranja principal */
    --primary-color-hover: #e0801c; /* Naranja para hover */
    --secondary-color: #030009; /* Azul oscuro */
    --secondary-color-hover: #003a6a; /* Azul para hover */
    --text-color-dark: #333; /* Texto oscuro general */
    --text-color-light: #666; /* Texto claro general */
    --text-color-white: #ffffff; /* Texto sobre fondo oscuro */
    --border-radius: 8px;
    --box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

/* --- ESTILOS GENERALES Y CORRECCIONES --- */
*, *::before, *::after {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    line-height: 1.6;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    color: var(--text-color-dark);
    background-color: #f8f8f8;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

h1, h3, h4 {
    color: var(--secondary-color);
    line-height: 1.2;
}

h2 {
    color: white;
    line-height: 1.2;
}
h1 { font-size: 3em; }
h2 { font-size: 2.2em; }
h3 { font-size: 1.6em; }
h4 { font-size: 1.3em; }

p {
    margin-bottom: 1em;
}

a {
    text-decoration: none;
    color: var(--primary-color);
}

.btn {
    display: inline-block;
    padding: 12px 25px;
    border-radius: var(--border-radius);
    font-weight: bold;
    transition: background-color 0.3s ease, color 0.3s ease, border-color 0.3s ease, transform 0.3s ease, box-shadow 0.3s ease;
    text-align: center;
    cursor: pointer;
}

.btn-primary {
    background-color: var(--primary-color);
    color: var(--text-color-white);
    border: 2px solid var(--primary-color);
}

.btn-primary:hover {
    background-color: var(--primary-color-hover);
    border-color: var(--primary-color-hover);
    transform: translateY(-3px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
}

.btn-secondary {
    background-color: var(--secondary-color);
    color: var(--text-color-white);
    border: 2px solid var(--secondary-color);
}

.btn-secondary:hover {
    background-color: var(--secondary-color-hover);
    border-color: var(--secondary-color-hover);
    transform: translateY(-3px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
}

.btn-donate {
    background-color: var(--primary-color);
    color: var(--text-color-white);
    border: none;
    padding: 10px 20px;
    border-radius: 25px;
}
.btn-donate:hover {
    background-color: var(--primary-color-hover);
    transform: translateY(-3px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
}

.btn-secondary-outline {
    background-color: transparent;
    color: var(--primary-color);
    border: 2px solid var(--primary-color);
    padding: 0.75rem 1.5rem;
    border-radius: 50px;
}
.btn-secondary-outline:hover {
    background-color: var(--primary-color);
    color: var(--text-color-white);
    transform: translateY(-3px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
}

.what-we-do-section .btn-primary,
.who-we-are-section .btn-secondary,
.how-to-help-section .btn-secondary {
    background-color: var(--primary-color);
    border-color: var(--primary-color);
    color: var(--text-color-white);
}

.what-we-do-section .btn-primary:hover,
.who-we-are-section .btn-secondary:hover,
.how-to-help-section .btn-secondary:hover {
    background-color: var(--primary-color-hover);
    border-color: var(--primary-color-hover);
}

.section-subtitle {
    font-size: 0.9em;
    color: var(--primary-color);
    text-transform: uppercase;
    font-weight: bold;
    margin-bottom: 10px;
}

.dark-bg {
    background-color: var(--secondary-color);
    color: var(--text-color-white);
}
.dark-bg h2, .dark-bg h3, .dark-bg h4 {
    color: var(--text-color-white);
}


/* ==================== HEADER STYLES ==================== */
.main-header {
    background-color: var(--secondary-color);
    color: var(--text-color-white);
    padding: 10px 0;
}

.header-top {
    display: flex;
    justify-content: flex-end; /* Alinea a la derecha */
    align-items: center;
    padding: 5px 20px;
    max-width: 1200px;
    margin: 0 auto;
}

.social-icons a {
    color: var(--text-color-white);
    margin-left: 15px;
    font-size: 1.1em;
}

.language-selector a {
    color: var(--text-color-white);
    margin-left: 20px;
    font-size: 0.9em;
}
.language-selector a.active {
    font-weight: bold;
}

.main-nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 20px;
    max-width: 1200px;
    margin: 0 auto;
}

.main-nav .logo img {
    height: 60px; /* Ajusta el tamaño del logo */
}

.nav-links {
    list-style: none;
    display: flex;
    margin: 0;
    padding: 0;
}

.nav-links li {
    margin-left: 25px;
}

.nav-links a {
    color: var(--text-color-white);
    font-weight: bold;
    font-size: 1em;
    padding: 5px 0;
    transition: color 0.3s ease;
}

.nav-links a:hover {
    color: var(--primary-color);
}

.nav-actions {
    margin-left: 20px;
}

/* ==================== HERO SECTION STYLES ==================== */
.hero-section {
    position: relative;
    color: var(--text-color-white);
    text-align: center;
    padding: 120px 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 600px;
    overflow: hidden;
    background-image: url('../Img/ciudad-inteligente-futurista-con-tecnologia-de-red-global-5g.jpg');
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
}

.video-background {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    overflow: hidden;
    z-index: 0;
}

.video-background video {
    min-width: 100%;
    min-height: 100%;
    width: auto;
    height: auto;
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    object-fit: cover;
}

.hero-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.4);
    z-index: 1;
}

.hero-content {
    position: relative;
    z-index: 2;
    max-width: 800px;
    margin: 0 auto;
}

.hero-subtitle {
    font-size: 1.1em;
    font-weight: bold;
    margin-bottom: 10px;
    color: var(--text-color-white);
}

.hero-section h1 {
    font-size: 3.8em;
    margin-bottom: 20px;
    color: var(--text-color-white);
}

.hero-section h1 .highlight {
    color: var(--primary-color);
}

.hero-description {
    font-size: 1.2em;
    margin-bottom: 30px;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
}

/* ==================== WHO WE ARE SECTION STYLES ==================== */
.who-we-are-section {
    padding: 80px 0;
    background-color: #000000;
}

.who-we-are-content {
    display: flex;
    align-items: center;
    gap: 50px;
}

.who-we-are-image {
    flex: 1;
}

.who-we-are-image img {
    width: 100%;
    height: auto;
    border-radius: var(--border-radius);
    box-shadow: var(--box-shadow);
}

.who-we-are-text {
    flex: 1;
    text-align: left;
}

.who-we-are-text h2 {
    font-size: 2.5em;
    margin-bottom: 20px;
}

.who-we-are-text p {
    font-size: 1.1em;
    line-height: 1.7;
    margin-bottom: 30px;
    color: var(--text-color-light);
}

/* ==================== ACHIEVEMENTS SECTION STYLES (SEPARADA) ==================== */
.achievements-section {
    padding: 80px 0;
    background-color: var(--secondary-color);
    text-align: center;
}

.achievements-section .achievements-text h2 {
    font-size: 2.2em;
    max-width: 800px;
    margin: 0 auto 50px;
    line-height: 1.3;
    color: var(--text-color-white);
}

.achievements-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 30px;
    margin-bottom: 80px;
}

.achievement-item .number {
    font-size: 3.5em;
    font-weight: bold;
    color: var(--primary-color);
    display: block;
    margin-bottom: 10px;
}

.achievement-item p {
    font-size: 1.1em;
    color: var(--text-color-white);
}

/* ==================== ODS SECTION STYLES (SEPARADA) ==================== */
.ods-section {
    padding: 80px 0;
    background-color: var(--secondary-color);
    text-align: center;
}

.ods-content {
    display: flex;
    align-items: center;
    gap: 50px;
    margin-top: 50px;
    text-align: left;
    flex-wrap: wrap;
    justify-content: center;
}

.ods-text {
    flex: 1;
    min-width: 300px;
    color: var(--text-color-white);
}
.ods-text h2 {
    font-size: 2.5em;
    margin-bottom: 20px;
    text-align: left;
    color: var(--text-color-white);
}

.ods-text p {
    font-size: 1.1em;
    line-height: 1.7;
    margin-bottom: 20px;
    color: var(--text-color-white);
}

.ods-images {
    flex: 1;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
    gap: 20px;
    justify-items: center;
    align-items: center;
    padding: 20px 0;
}

.ods-leaf-item {
    width: 250px;
    height: 250px;
    display: flex;
    justify-content: center;
    align-items: center;
    background-size: cover;
    background-position: center;
    color: var(--text-color-white);
    text-shadow: 0 0 5px rgba(0,0,0,0.5);
}

.ods-leaf-item svg {
    width: 80%;
    height: 80%;
}


/* ==================== WHAT WE DO SECTION STYLES ==================== */
.what-we-do-section {
    padding: 80px 0;
    text-align: center;
}

.what-we-do-section .section-subtitle {
    color: var(--primary-color);
}

.what-we-do-section h2 {
    margin-bottom: 20px;
    color: var(--text-color-white);
}

.what-we-do-section .intro-text {
    font-size: 1.1em;
    max-width: 800px;
    margin: 0 auto 50px;
    color: var(--text-color-white);
}

.what-we-do-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
}

.what-we-do-card {
    background-color: var(--text-color-white);
    border-radius: var(--border-radius);
    box-shadow: var(--box-shadow);
    overflow: hidden;
    text-align: left;
    padding-bottom: 20px;
}
.what-we-do-card h3 {
    color: var(--text-color-dark);
}
.what-we-do-card p {
    color: var(--text-color-light);
}

.what-we-do-card img {
    width: 100%;
    height: 200px;
    object-fit: cover;
    display: block;
    margin-bottom: 15px;
}

.what-we-do-card h3 {
    padding: 0 20px;
    margin-bottom: 10px;
}

.what-we-do-card p {
    padding: 0 20px;
    font-size: 0.95em;
    margin-bottom: 20px;
}

.what-we-do-card .btn {
    margin: 0 20px;
    width: calc(100% - 40px);
}

/* ==================== OUR PROJECTS DETAIL SECTION STYLES ==================== */
.our-projects-detail-section {
    padding: 80px 0;
    background-color: var(--secondary-color);
    text-align: center;
}

.our-projects-detail-section h2 {
    margin-bottom: 50px;
    color: var(--text-color-white);
}

.project-detail-card {
    display: flex;
    align-items: center;
    gap: 50px;
    margin-bottom: 60px;
    background-color: var(--text-color-white);
    border-radius: var(--border-radius);
    box-shadow: var(--box-shadow);
    padding: 30px;
}
.project-detail-card:last-child {
    margin-bottom: 0;
}
.project-detail-card.reverse {
    flex-direction: row-reverse;
}

.project-detail-image {
    flex: 1;
}

.project-detail-image img {
    width: 100%;
    height: 300px;
    object-fit: cover;
    border-radius: var(--border-radius);
}

.project-detail-text {
    flex: 1;
    text-align: left;
    position: relative;
    padding-left: 30px;
}

.project-detail-text .dot-icon {
    position: absolute;
    top: 5px;
    left: 0;
    width: 15px;
    height: 15px;
    background-color: var(--primary-color);
    border-radius: 50%;
}

.project-detail-text h3 {
    margin-top: 0;
    margin-bottom: 15px;
    font-size: 1.8em;
    color: var(--secondary-color);
}

.project-detail-text p {
    font-size: 1.1em;
    line-height: 1.6;
    margin-bottom: 30px;
    color: var(--text-color-light);
}

.project-actions {
    display: flex;
    gap: 15px;
}

/* ==================== HOW TO HELP SECTION STYLES ==================== */
.how-to-help-section {
    padding: 80px 0;
    background-color: var(--secondary-color);
    color: var(--text-color-white);
}
.how-to-help-text h2 {
    color: var(--text-color-white);
}

.how-to-help-content {
    display: flex;
    align-items: center;
    gap: 50px;
}

.how-to-help-text {
    flex: 1;
    text-align: left;
}

.how-to-help-text h2 {
    font-size: 2.5em;
    margin-bottom: 20px;
}

.how-to-help-text p {
    font-size: 1.1em;
    line-height: 1.7;
    margin-bottom: 30px;
}

.how-to-help-image {
    flex: 1;
}

.how-to-help-image img {
    width: 100%;
    height: auto;
    border-radius: var(--border-radius);
    box-shadow: var(--box-shadow);
}

/* ==================== TESTIMONIALS SECTION STYLES ==================== */
.testimonials-section {
    padding: 80px 0;
    text-align: center;
}

.testimonials-section .section-subtitle {
    color: var(--primary-color);
}

.testimonial-card {
    display: flex;
    align-items: center;
    max-width: 900px;
    margin: 50px auto 0;
    background-color: var(--secondary-color);
    border-radius: var(--border-radius);
    padding: 40px;
    box-shadow: var(--box-shadow);
    gap: 30px;
}

.testimonial-image {
    flex-shrink: 0;
}

.testimonial-image img {
    width: 150px;
    height: 150px;
    border-radius: 50%;
    object-fit: cover;
    border: 5px solid var(--primary-color);
}

.testimonial-content {
    text-align: left;
    color: var(--text-color-white);
}

.testimonial-content h4 {
    color: var(--text-color-white);
    font-size: 1.6em;
    margin-bottom: 5px;
}

.testimonial-content .testimonial-role {
    font-size: 0.9em;
    color: var(--text-color-white);
    margin-bottom: 20px;
}

.testimonial-content .testimonial-quote {
    font-style: italic;
    font-size: 1.1em;
    line-height: 1.7;
}

/* ==================== NEWS SECTION STYLES ==================== */
.news-section {
    padding: 80px 0;
    background-color: var(--secondary-color);
    text-align: center;
}

.news-section .section-subtitle {
    margin-bottom: 10px;
}

.news-section h2 {
    margin-bottom: 50px;
    color: var(--text-color-white);
}

.news-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
}

.news-card {
    background-color: var(--text-color-white);
    border-radius: var(--border-radius);
    box-shadow: var(--box-shadow);
    overflow: hidden;
    text-align: left;
    padding-bottom: 20px;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.news-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 16px rgba(0,0,0,0.2);
}
.news-card h3 {
    color: var(--secondary-color);
}
.news-card p {
    color: var(--text-color-light);
}

.news-card img {
    width: 100%;
    height: 200px;
    object-fit: cover;
    display: block;
    margin-bottom: 15px;
}

.news-card h3 {
    padding: 0 20px;
    margin-bottom: 10px;
    font-size: 1.3em;
}

.news-card p {
    padding: 0 20px;
    font-size: 0.95em;
}

.news-button-container {
    margin-top: 50px;
}

/* ==================== FOOTER STYLES ==================== */
.main-footer {
    background-color: var(--secondary-color);
    color: var(--text-color-white);
    padding: 50px 0;
}

.footer-columns {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr 2fr;
    gap: 30px;
}

.footer-col h4 {
    color: var(--text-color-white);
    font-size: 1.1em;
    margin-bottom: 20px;
    position: relative;
    padding-left: 20px;
}
.footer-col h4::before {
    content: 'I';
    color: var(--primary-color);
    position: absolute;
    left: 0;
    font-weight: bold;
}

.footer-col ul {
    list-style: none;
    padding: 0;
}

.footer-col ul li {
    margin-bottom: 10px;
}

.footer-col ul li a {
    color: var(--text-color-white);
    font-size: 0.95em;
    transition: color 0.3s ease;
}

.footer-col ul li a:hover {
    color: var(--primary-color);
}

.footer-logo-col img {
    height: 80px;
    margin-bottom: 15px;
}

.footer-logo-col p {
    font-size: 0.9em;
    color: #ccc;
}

.newsletter-form {
    display: flex;
    margin-top: 15px;
}

.newsletter-form input[type="email"] {
    flex-grow: 1;
    padding: 10px 15px;
    border: 1px solid #ccc;
    border-radius: 5px 0 0 5px;
    font-size: 0.9em;
    background-color: var(--text-color-white);
    color: var(--text-color-dark);
}

.newsletter-form button {
    background-color: var(--primary-color);
    color: var(--text-color-white);
    border: none;
    padding: 10px 20px;
    border-radius: 0 5px 5px 0;
    cursor: pointer;
    font-size: 0.9em;
    font-weight: bold;
    transition: background-color 0.3s ease;
}

.newsletter-form button:hover {
    background-color: var(--primary-color-hover);
}

/* ==================== ESTILOS MENÚ HAMBURGUESA ==================== */
.hamburger-menu {
    display: none;
    background: none;
    border: none;
    cursor: pointer;
    padding: 0;
    z-index: 1001;
}

.hamburger-menu .bar {
    display: block;
    width: 28px;
    height: 3px;
    margin: 6px auto;
    background-color: var(--text-color-white);
    transition: all 0.3s ease-in-out;
    border-radius: 2px;
}

/* =============================================================
   ================== RESPONSIVE DESIGN ========================
   ============================================================= */

/* --- Breakpoint para Tablets (992px y menos) --- */
@media (max-width: 992px) {
    .hero-section h1 { font-size: 2.8em; }
    .hero-description { font-size: 1em; }

    .who-we-are-content,
    .project-detail-card,
    .how-to-help-content,
    .testimonial-card {
        flex-direction: column;
        text-align: center;
    }

    .who-we-are-text,
    .project-detail-text,
    .how-to-help-text,
    .testimonial-content {
        text-align: center;
    }

    .project-detail-card.reverse { flex-direction: column; }
    .project-detail-text .dot-icon { display: none; }
    .project-actions { justify-content: center; }

    .achievements-grid,
    .what-we-do-grid,
    .news-grid {
        grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    }
    
    .ods-content {
        flex-direction: column;
        text-align: center;
    }
    
    .ods-text { text-align: center; }
    .ods-images { grid-template-columns: repeat(auto-fit, minmax(100px, 1fr)); }
    .ods-leaf-item { width: 120px; height: 120px; }

    .footer-columns {
        grid-template-columns: 1fr;
        text-align: center;
    }
    .footer-col h4 {
        padding-left: 0;
        text-align: center;
    }
    .footer-col h4::before { display: none; }
    .newsletter-form {
        flex-direction: column;
    }
    .newsletter-form input, .newsletter-form button {
        border-radius: 5px;
        margin-bottom: 10px;
        width: 100%;
        margin-left: 0;
    }
}

/* --- Breakpoint para Tablets Pequeñas y Móviles (768px y menos) --- */
@media (max-width: 768px) {
    h1 { font-size: 2.5em; }
    h2 { font-size: 2em; }
    h3 { font-size: 1.5em; }
    
    .header-top { display: none; }
    
    .main-nav {
        flex-wrap: nowrap;
        padding: 0.8rem 1rem;
        position: relative;
    }
    
    .main-nav .logo {
        order: 2;
    }
    
    .main-nav .logo img {
        height: 50px;
    }

    .nav-links {
        display: none;
        flex-direction: column;
        width: 100%;
        background-color: var(--secondary-color);
        position: absolute;
        top: 100%;
        left: 0;
        padding: 1rem 0;
        text-align: center;
        box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
        z-index: 1000;
    }

    .nav-links.active { display: flex; }
    .nav-links li { margin: 0.8rem 0; }
    .nav-links li a {
        padding: 0.5rem 1rem;
        display: block;
        font-size: 1.1em;
    }
    .nav-links li a:hover {
        color: var(--primary-color);
        background-color: rgba(255, 255, 255, 0.1);
    }
    .nav-actions { display: none; }

    .hamburger-menu {
        display: block;
        order: 1;
        margin-left: 0;
    }

    .hamburger-menu.active .bar:nth-child(1) { transform: translateY(9px) rotate(45deg); }
    .hamburger-menu.active .bar:nth-child(2) { opacity: 0; }
    .hamburger-menu.active .bar:nth-child(3) { transform: translateY(-9px) rotate(-45deg); }

    .what-we-do-card img,
    .news-card img {
        height: auto;
    }

    .achievements-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 20px;
    }

    .ods-images {
        grid-template-columns: repeat(3, 1fr);
        gap: 15px;
    }
}

/* --- Breakpoint para Móviles Pequeños (576px y menos) --- */
@media (max-width: 576px) {
    h1 { font-size: 2.2em; }
    h2 { font-size: 1.8em; }
    h3 { font-size: 1.4em; }

    .btn {
        padding: 10px 20px;
        font-size: 0.9em;
    }

    .who-we-are-text h2,
    .ods-text h2,
    .how-to-help-text h2 {
        font-size: 2em;
    }
    
    .testimonial-card { padding: 20px; }
    .testimonial-image img { width: 100px; height: 100px; }
    .news-card h3 { font-size: 1.1em; }

    .ods-images { grid-template-columns: repeat(2, 1fr); }
    .ods-leaf-item { width: 130px; height: 130px; }
}