/* Reset and Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --primary-color: #3A7CA5; /* A more muted, professional blue */
    --secondary-color: #D9D9D9; /* Light grey for backgrounds */
    --accent-color: #ff6347; /* Tomato for main CTA */
    --accent-hover-color: #e5533f;
    --donate-color: #0070ba; /* PayPal blue */
    --donate-hover-color: #005f99;
    --text-dark: #333333;
    --text-light: #ffffff;
    --text-muted: #555555;
    --font-primary: 'Open Sans', sans-serif; /* Modern, readable font */
    --font-headings: 'Montserrat', sans-serif; /* Slightly bolder for headings */
    --border-radius: 8px;
    --box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    --transition-speed: 0.3s ease;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: var(--font-primary);
    line-height: 1.7;
    background-color: #f8f9fa; /* Very light off-white */
    color: var(--text-dark);
    overflow-x: hidden; /* Prevent horizontal scroll */
}

.container {
    max-width: 1200px; /* Slightly wider for modern feel */
    margin: 0 auto;
    padding: 0 20px; /* Consistent horizontal padding */
}

/* Typography */
h1, h2, h3, h4, h5, h6 {
    font-family: var(--font-headings);
    margin-bottom: 0.75em;
    color: var(--primary-color);
    line-height: 1.3;
}

h1 {
    font-size: 2.8rem;
}

h2 {
    font-size: 2.2rem;
}

h3 {
    font-size: 1.5rem;
    color: var(--text-dark);
}

p {
    margin-bottom: 1.5em;
    color: var(--text-muted);
}

a {
    color: var(--accent-color);
    text-decoration: none;
    transition: color var(--transition-speed);
}

    a:hover {
        color: var(--accent-hover-color);
    }

/* Buttons */
.btn {
    display: inline-block;
    padding: 12px 28px;
    font-family: var(--font-headings);
    font-size: 1.1rem;
    font-weight: 600;
    text-decoration: none;
    border-radius: var(--border-radius);
    transition: background-color var(--transition-speed), transform var(--transition-speed), box-shadow var(--transition-speed);
    cursor: pointer;
    border: none;
    text-align: center;
}

.btn-primary {
    background-color: var(--accent-color);
    color: var(--text-light);
}

    .btn-primary:hover {
        background-color: var(--accent-hover-color);
        color: var(--text-light); /* Mantiene el texto blanco en hover */
        transform: translateY(-3px);
        box-shadow: 0 6px 20px rgba(0,0,0,0.15);
    }

    .btn-primary:active {
        transform: translateY(-1px);
        box-shadow: 0 4px 10px rgba(0,0,0,0.1);
    }

.btn-donate {
    background-color: var(--donate-color);
    color: var(--text-light);
    display: inline-flex; /* For icon alignment */
    align-items: center;
}

    .btn-donate img {
        width: 20px;
        height: auto;
        margin-right: 10px;
        filter: brightness(0) invert(1); /* Make SVG white */
    }

    .btn-donate:hover {
        background-color: var(--donate-hover-color);
        color: var(--text-light); /* Mantiene el texto blanco en hover */
        transform: translateY(-3px);
        box-shadow: 0 6px 20px rgba(0,0,0,0.15);
    }

    .btn-donate:active {
        transform: translateY(-1px);
        box-shadow: 0 4px 10px rgba(0,0,0,0.1);
    }

/* Section Styling */
.section {
    padding: 80px 0;
    text-align: center;
}

.section-title {
    margin-bottom: 50px;
    font-size: 2.5rem;
}

.section-subtitle {
    font-size: 1.1rem;
    color: var(--text-muted);
    max-width: 700px;
    margin: 0 auto 40px auto;
}

.bg-light-gray {
    background-color: var(--secondary-color);
}

.bg-white {
    background-color: var(--text-light);
}


/* Header / Hero Section */
.hero-section {
    background: linear-gradient(135deg, var(--primary-color) 0%, #5a9bd5 100%); /* Gradient background */
    color: var(--text-light);
    padding: 100px 0 80px;
    text-align: center;
    position: relative;
    overflow: hidden; /* For potential future pseudo-element decorations */
}

.hero-content {
    display: flex;
    flex-direction: column;
    align-items: center;
}

.hero-icon {
    width: 120px;
    height: auto;
    margin-bottom: 25px;
}

.hero-section h1 {
    font-size: 3.2rem;
    margin-bottom: 20px;
    color: var(--text-light);
    font-weight: 700;
}

.hero-section p {
    font-size: 1.3rem;
    margin-bottom: 40px;
    max-width: 700px;
    color: rgba(255,255,255,0.9);
}

/* Video Section */
.video-feature-item {
    display: flex;
    flex-wrap: wrap; /* Allow wrapping on smaller screens */
    align-items: center;
    justify-content: space-between;
    margin-bottom: 60px;
    text-align: left;
}

    .video-feature-item:last-child {
        margin-bottom: 0;
    }

.video-container {
    flex: 1 1 500px; /* Grow, shrink, base width */
    padding: 20px;
    min-width: 300px; /* Ensure video doesn't get too small */
}

.video-text {
    flex: 1 1 400px; /* Grow, shrink, base width */
    padding: 20px;
}

    .video-text h2 {
        font-size: 1.8rem;
        margin-bottom: 15px;
    }

.video-feature-item.reverse .video-container {
    order: 2;
}

.video-feature-item.reverse .video-text {
    order: 1;
}

.video-container iframe {
    width: 100%;
    min-height: 315px; /* Maintain aspect ratio better */
    border-radius: var(--border-radius);
    box-shadow: var(--box-shadow);
    border: none; /* Remove default iframe border */
}

/* Features / Image Grid Section (Card-based) */
.features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
    margin-top: 50px;
}

.feature-card {
    background-color: var(--text-light);
    border-radius: var(--border-radius);
    box-shadow: var(--box-shadow);
    padding: 30px;
    text-align: center;
    transition: transform var(--transition-speed), box-shadow var(--transition-speed);
}

    .feature-card:hover {
        transform: translateY(-5px);
        box-shadow: 0 8px 25px rgba(0,0,0,0.12);
    }

    .feature-card img {
        max-width: 100%;
        height: auto;
        border-radius: calc(var(--border-radius) - 5px); /* Slightly smaller radius for internal image */
        margin-bottom: 20px;
        aspect-ratio: 16/9; /* Or your image's aspect ratio */
        object-fit: cover;
    }

    .feature-card h3 {
        margin-bottom: 10px;
        font-size: 1.3rem;
    }

/* Call to Action Section (Download) */
.cta-section {
    background-color: var(--primary-color);
    color: var(--text-light);
}

    .cta-section h2 {
        color: var(--text-light);
    }

    .cta-section p {
        color: rgba(255,255,255,0.85);
    }

/* Donations Section */
.payment-methods-img {
    display: block;
    margin-left: auto;
    margin-right: auto;
    max-width: 300px; /* Control size */
    margin-top: 30px;
}

/* Contact Section */
.contact-section a {
    font-weight: 600;
}

/* Social Media Section */
.social-icons {
    margin-top: 20px;
}

    .social-icons a {
        display: inline-block;
        margin: 0 15px;
    }

    .social-icons img {
        width: 40px;
        height: 40px;
        transition: transform var(--transition-speed), filter var(--transition-speed);
    }

        .social-icons img:hover {
            transform: scale(1.15) translateY(-3px);
            filter: brightness(1.1);
        }

/* Footer */
.main-footer {
    background-color: var(--text-dark);
    color: rgba(255,255,255,0.7);
    padding: 40px 0;
    text-align: center;
    font-size: 0.9rem;
}

    .main-footer p {
        margin-bottom: 0;
        color: rgba(255,255,255,0.7);
    }

/* Responsive Adjustments */
@media (max-width: 992px) {
    h1 {
        font-size: 2.5rem;
    }

    .hero-section h1 {
        font-size: 2.8rem;
    }

    .hero-section p {
        font-size: 1.1rem;
    }

    .section {
        padding: 60px 0;
    }

    .video-text h2 {
        font-size: 1.6rem;
    }
}

@media (max-width: 768px) {
    h1 {
        font-size: 2.2rem;
    }

    .hero-section h1 {
        font-size: 2.4rem;
    }

    h2 {
        font-size: 1.8rem;
    }

    .section-title {
        font-size: 2rem;
        margin-bottom: 30px;
    }

    .video-feature-item,
    .video-feature-item.reverse { /* Aplica a todos los items de video */
        flex-direction: column; /* Apila los elementos hijos verticalmente */
        text-align: center;
    }

        .video-feature-item .video-container,
        .video-feature-item .video-text { /* Aplica a los hijos de todos los items de video */
            flex: 1 1 100%; /* Full width */
            padding: 15px 0; /* Adjust padding for stacked layout */
        }

        /* --- INICIO DE LA CORRECCIÓN IMPORTANTE PARA EL ORDEN EN MÓVILES --- */
        .video-feature-item .video-text {
            order: 1; /* El texto SIEMPRE será el primer elemento en la columna */
        }

        .video-feature-item .video-container {
            order: 2; /* El video SIEMPRE será el segundo elemento en la columna */
        }
    /* --- FIN DE LA CORRECCIÓN IMPORTANTE PARA EL ORDEN EN MÓVILES --- */
    /* La regla anterior que causaba el problema:
        .video-feature-item.reverse .video-container,
        .video-feature-item.reverse .video-text {
            order: initial; 
        }
       HA SIDO ELIMINADA Y REEMPLAZADA POR LA CORRECCIÓN DE ARRIBA.
    */


    .video-container iframe {
        min-height: 250px;
    }

    .features-grid {
        grid-template-columns: 1fr; /* Stack cards */
    }

    .btn {
        padding: 10px 22px;
        font-size: 1rem;
    }

    .social-icons img {
        width: 35px;
        height: 35px;
    }

    .social-icons a {
        margin: 0 10px;
    }
}

@media (max-width: 480px) {
    .hero-section {
        padding: 60px 0 40px;
    }

    .hero-icon {
        width: 90px;
    }

    .hero-section h1 {
        font-size: 2rem;
    }

    .hero-section p {
        font-size: 1rem;
    }

    .section {
        padding: 40px 0;
    }

    .section-title {
        font-size: 1.8rem;
    }

    h2 {
        font-size: 1.6rem;
    }

    .btn {
        width: 100%;
        max-width: 300px; /* Prevent overly wide buttons on small screens */
    }

    .btn-donate {
        justify-content: center; /* Center icon and text in full-width button */
    }
}
