* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Inter', 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background-color: #f8fafc;
    color: #2d3748;
    line-height: 1.7;
    scroll-behavior: smooth;
}

.header {
    background: linear-gradient(135deg, #064420 0%, #0b6e4f 100%);
    color: white;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 20px 40px;
    flex-wrap: wrap;
    position: sticky;
    top: 0;
    z-index: 1000;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.logo {
    display: flex;
    align-items: center;
    gap: 12px;
    transition: transform 0.3s ease;
}

.logo:hover {
    transform: scale(1.05);
}

.logo img {
    height: 60px;
    width: auto;
    border-radius: 10px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
}

.logo span {
    font-weight: 700;
    font-size: 1.4em;
    letter-spacing: 0.5px;
}

.menu-toggle {
    display: none;
    font-size: 32px;
    cursor: pointer;
    color: white;
    order: 2;
    transition: transform 0.2s ease;
}

.menu-toggle:hover {
    transform: rotate(90deg);
}

.menu {
    list-style: none;
    display: flex;
    gap: 30px;
    order: 1;
}

.menu li {
    position: relative;
}

.menu li a {
    color: white;
    text-decoration: none;
    padding: 12px 18px;
    display: block;
    transition: all 0.3s ease;
    font-weight: 600;
    border-radius: 8px;
    position: relative;
    overflow: hidden;
}

.menu li a::after {
    content: "";
    position: absolute;
    left: 0;
    bottom: 0;
    width: 0;
    height: 3px;
    background: linear-gradient(to right, #f4a261, #ffbc80);
    transition: width 0.4s ease-in-out;
}

.menu li a:hover::after {
    width: 100%;
}

.menu li a:hover {
    background: rgba(255, 255, 255, 0.1);
    color: #ffbc80;
    transform: scale(1.05);
    box-shadow: 0 3px 8px rgba(0, 0, 0, 0.2);
}

.submenu {
    display: none;
    position: absolute;
    background: linear-gradient(135deg, #0b6e4f 0%, #064420 100%);
    top: 100%;
    left: 0;
    list-style: none;
    min-width: 240px;
    z-index: 999;
    border-radius: 8px;
    box-shadow: 0 6px 12px rgba(0, 0, 0, 0.25);
    opacity: 0;
    transform: translateY(-10px);
    transition: opacity 0.3s ease, transform 0.3s ease;
}

.menu li:hover .submenu {
    display: block;
    opacity: 1;
    transform: translateY(0);
}

.submenu li a {
    padding: 14px 18px;
    white-space: nowrap;
    color: white;
    transition: all 0.3s ease;
}

.submenu li a:hover {
    background: rgba(255, 255, 255, 0.15);
    color: #ffbc80;
}

.donate-btn {
    background: linear-gradient(135deg, #f4a261 0%, #e76f51 100%);
    color: white;
    padding: 12px 24px;
    text-decoration: none;
    border-radius: 50px;
    font-weight: 700;
    transition: all 0.3s ease;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
    display: inline-block;
    margin-left: auto; /* Mueve el botón a la esquina derecha */
    order: 3; /* Asegura que esté después del menú y el toggle */
    position: relative;
    overflow: hidden;
}

.donate-btn::after {
    content: "";
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    background: rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    transform: translate(-50%, -50%);
    transition: width 0.5s ease, height 0.5s ease;
}

.donate-btn:hover::after {
    width: 200%;
    height: 200%;
}

.donate-btn:hover {
    background: linear-gradient(135deg, #e76f51 0%, #f4a261 100%);
    transform: translateY(-3px);
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.4);
}

.container {
    max-width: 1280px;
    margin: 60px auto;
    padding: 0 30px;
}

.container h1 {
    text-align: center;
    font-size: 2.8em;
    margin-bottom: 50px;
    color: #064420;
    font-weight: 800;
    letter-spacing: -0.5px;
    text-shadow: 1px 1px 3px rgba(0, 0, 0, 0.15);
}

.news-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 35px;
    justify-content: center;
}

.news-item {
    background: #ffffff;
    padding: 25px;
    border-radius: 12px;
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.1);
    transition: all 0.4s ease;
    border: 1px solid rgba(0, 0, 0, 0.05);
}

.news-item:hover {
    transform: translateY(-10px);
    box-shadow: 0 12px 30px rgba(0, 0, 0, 0.2);
}

.news-image {
    width: 100%;
    height: 220px;
    object-fit: cover;
    border-radius: 8px;
    margin-bottom: 20px;
    transition: opacity 0.3s ease;
}

.news-item:hover .news-image {
    opacity: 0.9;
}

.news-title {
    font-size: 1.5em;
    font-weight: 700;
    color: #007BFF;
    margin-bottom: 12px;
}

.news-title a {
    text-decoration: none;
    color: inherit;
    transition: color 0.3s ease;
}

.news-title a:hover {
    color: #064420;
    text-decoration: underline;
}

.news-description {
    margin: 12px 0;
    color: #4a5568;
    font-size: 1em;
    line-height: 1.6;
}

.news-source {
    font-size: 0.85em;
    color: #718096;
    font-style: italic;
    margin-top: 12px;
}

footer {
    background: linear-gradient(135deg, #064420 0%, #0b6e4f 100%);
    color: white;
    padding: 50px 30px 30px;
    font-size: 15px;
    margin-top: 60px;
}

.footer-container {
    display: flex;
    flex-wrap: wrap;
    gap: 40px;
    justify-content: space-between;
    max-width: 1280px;
    margin: 0 auto;
}

.footer-section {
    flex: 1 1 280px;
}

.footer-section h3,
.footer-section h4 {
    margin-bottom: 20px;
    font-size: 1.4em;
    font-weight: 700;
    border-bottom: 2px solid #ffbc80;
    padding-bottom: 8px;
}

.footer-section ul {
    list-style: none;
    padding: 0;
}

.footer-section ul li {
    margin-bottom: 12px;
}

.footer-section ul li a {
    color: white;
    text-decoration: none;
    transition: color 0.3s ease;
}

.footer-section ul li a:hover {
    color: #ffbc80;
    text-decoration: underline;
}

.social-icons img {
    height: 35px;
    margin-right: 20px;
    transition: transform 0.3s ease, filter 0.3s ease;
}

.social-icons img:hover {
    transform: scale(1.2);
    filter: brightness(1.2);
}

.footer-bottom {
    text-align: center;
    border-top: 1px solid rgba(255, 255, 255, 0.2);
    padding-top: 25px;
    margin-top: 40px;
}

.footer-bottom a {
    margin: 0 20px;
    color: white;
    text-decoration: none;
    transition: color 0.3s ease;
}

.footer-bottom a:hover {
    color: #ffbc80;
    text-decoration: underline;
}

/* Responsive */
@media (max-width: 768px) {
    .header {
        padding: 15px 25px;
    }

    .logo span {
        font-size: 1.1em;
    }

    .menu-toggle {
        display: block;
        order: 2;
    }

    .menu {
        display: none;
        flex-direction: column;
        width: 100%;
        position: absolute;
        top: 70px;
        left: 0;
        background: linear-gradient(135deg, #064420 0%, #0b6e4f 100%);
        padding: 15px 0;
        box-shadow: 0 6px 12px rgba(0, 0, 0, 0.2);
        order: 3;
    }

    .menu.active {
        display: flex;
    }

    .menu li {
        width: 100%;
        text-align: center;
    }

    .menu li a {
        padding: 15px 12px;
        font-size: 1.1em;
    }

    .submenu {
        position: static;
        background: linear-gradient(135deg, #0b6e4f 0%, #064420 100%);
        width: 100%;
        box-shadow: none;
        border-radius: 0;
        opacity: 1;
        transform: none; /* Corregido el error tipográfico */
    }

    .donate-btn {
        margin-left: auto; /* Mantiene el botón en la esquina derecha */
        padding: 10px 20px;
        font-size: 0.95em;
        order: 3; /* Asegura que esté después del toggle */
    }

    .container h1 {
        font-size: 2.2em;
        margin-bottom: 40px;
    }

    .news-grid {
        grid-template-columns: 1fr;
        gap: 25px;
    }

    .footer-container {
        flex-direction: column;
        align-items: center;
        text-align: center;
    }

    .footer-section {
        width: 100%;
    }

    .social-icons {
        display: flex;
        justify-content: center;
    }

    .footer-bottom a {
        display: block;
        margin: 12px 0;
    }
}