/* Custom Styles */
html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Nunito', sans-serif;
    background-color: #F5F5F5;
    color: #003087;
    position: relative;
    overflow-x: hidden;
    margin: 0;
}

.preloader {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: #F5F5F5;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999;
    transition: opacity 0.5s ease;
}

.preloader.hidden {
    opacity: 0;
    pointer-events: none;
}

.preloader i {
    font-size: 3rem;
    color: #28A745;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    100% {
        transform: rotate(360deg);
    }
}

.animation-container {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
    pointer-events: none;
}

.animation-line {
    fill: none;
    opacity: 1;
}

.animation-line:nth-child(1),
.animation-line:nth-child(3) {
    stroke: #9fce68; /* Light green from logo */
}

.animation-line:nth-child(2),
.animation-line:nth-child(4) {
    stroke: #29466b; /* Dark blue from logo */
}

header {
    background: linear-gradient(90deg, rgba(255, 255, 255, 0.2), rgba(232, 245, 233, 0.2));
    border-bottom: 2px solid #28A745;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
    position: sticky;
    top: 0;
    z-index: 50;
    transition: all 0.3s ease;
}

header.scrolled {
    background: rgba(255, 255, 255, 0.95);
    padding: 8px 0;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}

.navbar {
    padding: 1rem 3rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    max-width: 1200px;
    margin: 0 auto;
}

.navbar-logo {
    display: flex;
    align-items: center;
}

.navbar-logo img {
    height: 60px;
    width: auto;
}

.navbar-links {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.navbar-link {
    color: #003087;
    font-weight: 600;
    font-size: 0.85rem;
    padding: 0.4rem 0.8rem;
    position: relative;
    transition: color 0.3s ease;
}

.navbar-link:hover {
    color: #28A745;
}

.navbar-link::after {
    content: '';
    position: absolute;
    bottom: -5px;
    left: 50%;
    transform: translateX(-50%);
    width: 0;
    height: 2px;
    background: #28A745;
    transition: width 0.3s ease;
}

.navbar-link:hover::after {
    width: 50%;
}

.navbar-donate {
    background-color: #00B4D8;
    color: #FFFFFF;
    padding: 0.4rem 1.2rem;
    border-radius: 25px;
    font-weight: 600;
    font-size: 0.85rem;
    transition: background 0.3s ease, transform 0.3s ease;
}

.navbar-donate:hover {
    background-color: #28A745;
    transform: scale(1.05);
}

.mobile-menu {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    z-index: 1000;
    display: flex;
    justify-content: center;
    align-items: center;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
}

.mobile-menu.active {
    opacity: 1 !important;
    visibility: visible !important;
}

.mobile-menu-card {
    background: #FFFFFF;
    padding: 3rem;
    border-radius: 15px;
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.2);
    width: 90%;
    max-width: 400px;
    text-align: center;
}

.mobile-menu-item {
    color: #29466b;
    font-size: 1.1rem;
    font-weight: 600;
    padding: 1rem;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    transition: color 0.3s ease;
}

.mobile-menu-item:hover {
    color: #9fce68;
}

.mobile-menu-item i {
    color: #29466b;
    transition: color 0.3s ease;
}

.mobile-menu-item:hover i {
    color: #9fce68;
}

.mobile-donate-btn {
    background: #00B4D8;
    color: #FFFFFF;
    padding: 0.75rem 1.5rem;
    border-radius: 25px;
    font-weight: 600;
    font-size: 1rem;
    margin-top: 1rem;
    transition: background 0.3s ease, transform 0.3s ease;
}

.mobile-donate-btn:hover {
    background: #28A745;
    transform: scale(1.05);
}

.mobile-donate-btn i {
    margin-right: 0.5rem;
}

.hamburger {
    display: none;
    font-size: 1.5rem;
    color: #003087;
    cursor: pointer;
    transition: color 0.3s ease;
    z-index: 1001;
    padding: 0.5rem;
}

.hamburger:hover {
    color: #28A745;
}

@media (max-width: 768px) {
    .navbar-links {
        display: none !important;
    }
    .navbar .hamburger {
        display: block !important;
    }
}

@media (min-width: 769px) {
    .mobile-menu {
        display: none !important;
    }
    .navbar .hamburger {
        display: none !important;
    }
}

.hero {
    position: relative;
    height: 85vh;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    background: linear-gradient(135deg, rgba(0, 48, 135, 0.8), rgba(40, 167, 69, 0.5)), url('img/hero-village.jpg');
    background-size: cover;
    background-position: center;
    border-bottom: 5px solid #28A745;
}

.hero-content {
    position: relative;
    z-index: 1;
    color: #FFFFFF;
    padding: 2rem;
    max-width: 90%;
    margin: 0 auto;
}

.hero-content h1 {
    font-size: 3.5rem;
    font-weight: 800;
    margin-bottom: 1.5rem;
    text-shadow: 3px 3px 6px rgba(0, 0, 0, 0.3);
    line-height: 1.2;
}

.hero-content p {
    font-size: 1.5rem;
    margin-bottom: 2rem;
    max-width: 800px;
    font-weight: 300;
    margin-left: auto;
    margin-right: auto;
}

.hero-content .btn-primary {
    margin: 0 auto;
}

/* Semi-transparent background for all sections */
section {
    background: rgba(255, 255, 255, 0.2);
    position: relative;
    z-index: 1;
}

.section-bg {
    background: rgba(255, 255, 255, 0.2);
    border-radius: 15px;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.05);
    padding: 40px;
    margin: 20px 0;
}

.section-heading {
    font-size: 2.5rem;
    font-weight: 700;
    text-align: center;
    position: relative;
    margin-bottom: 3rem;
    color: #003087;
}

.section-heading::after {
    content: '';
    position: absolute;
    bottom: -10px;
    left: 50%;
    transform: translateX(-50%);
    width: 60px;
    height: 3px;
    background: #28A745;
    border-radius: 2px;
}

.card-hover {
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    background: #FFFFFF;
    border-radius: 15px;
    overflow: hidden;
    border: 1px solid #E5E7EB;
    display: flex;
    flex-direction: column;
    height: 100%;
}

.card-hover:hover {
    transform: translateY(-8px) scale(1.02);
    box-shadow: 0 15px 40px rgba(0, 48, 135, 0.15);
}

.card-icon {
    position: relative;
    height: 180px;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #E8F5E9;
}

.card-icon i {
    font-size: 4rem;
    color: #28A745;
    transition: transform 0.3s ease;
    display: block;
}

.card-icon:hover i {
    transform: scale(1.1);
}

.card-content {
    padding: 20px;
    flex-grow: 1;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.card-content h3 {
    font-size: 1.5rem;
    font-weight: 600;
    margin-bottom: 0.75rem;
    color: #003087;
}

.card-content p {
    font-size: 0.95rem;
    color: #4B5563;
    margin-bottom: 1rem;
}

.btn-primary {
    background-color: #28A745;
    color: #FFFFFF;
    font-weight: 600;
    transition: all 0.3s ease;
    border: 2px solid transparent;
    padding: 10px 20px;
    border-radius: 25px;
    width: fit-content;
    align-self: center;
    text-align: center;
}

.btn-primary:hover {
    background-color: #FFFFFF;
    color: #28A745;
    border: 2px solid #28A745;
    transform: scale(1.05);
}

.partner-icon {
    font-size: 4rem;
    color: #28A745;
    margin: 0 auto;
    transition: transform 0.3s ease;
}

.partner-icon:hover {
    transform: scale(1.1);
}

.testimonial-icon {
    font-size: 2.5rem;
    color: #28A745;
    margin: 0 auto;
    display: block;
}

.donate-form {
    background: rgba(249, 250, 251, 0.2);
    padding: 2rem;
    border-radius: 10px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
}

.donate-form label {
    display: block;
    font-weight: 600;
    color: #003087;
    margin-bottom: 0.5rem;
}

.donate-form input,
.donate-form textarea {
    width: 100%;
    padding: 0.75rem;
    border: 1px solid #E5E7EB;
    border-radius: 5px;
    font-size: 1rem;
    color: #4B5563;
    transition: border-color 0.3s ease;
}

.donate-form input:focus,
.donate-form textarea:focus {
    outline: none;
    border-color: #28A745;
}

.donate-form textarea {
    resize: vertical;
}

.donate-form .btn-primary {
    width: 100%;
    padding: 0.75rem;
    font-size: 1.1rem;
}

/* Updated About Section to Match Overall Theme */
#about .about-card {
    display: flex;
    flex-direction: row;
    align-items: center;
    gap: 4rem;
    background: rgba(255, 255, 255, 0.2); /* Match section background */
    border-radius: 15px; /* Match section border radius */
    padding: 4rem;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.05); /* Match section shadow */
}

#about .about-icon {
    flex: 0 0 auto;
    display: flex;
    justify-content: center;
    align-items: center;
    width: 150px;
    height: 150px;
    background: #E8F5E9; /* Match card-icon background */
    border-radius: 50%;
    transition: transform 0.3s ease;
}

#about .about-icon:hover {
    transform: scale(1.1); /* Match card-icon hover effect */
}

#about .about-icon i {
    font-size: 5rem;
    color: #28A745; /* Match icon color */
}

#about .about-content {
    flex: 1;
}

#about .about-content .content-block {
    display: flex;
    align-items: flex-start;
    gap: 1.5rem;
    margin-bottom: 3rem;
    background: #FFFFFF; /* Match card background */
    border: 1px solid #E5E7EB; /* Match card border */
    border-radius: 15px; /* Match card border radius */
    padding: 1.5rem;
    transition: transform 0.3s ease, box-shadow 0.3s ease; /* Match card-hover */
    opacity: 0;
    transform: translateY(20px);
    animation: fadeInUp 0.8s ease forwards;
    animation-delay: calc(var(--delay) * 0.2s);
}

#about .about-content .content-block:hover {
    transform: translateY(-8px) scale(1.02); /* Match card-hover effect */
    box-shadow: 0 15px 40px rgba(0, 48, 135, 0.15);
}

#about .about-content .content-block:last-child {
    margin-bottom: 0;
}

@keyframes fadeInUp {
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

#about .about-content .block-icon {
    display: flex;
    justify-content: center;
    align-items: center;
    width: 60px;
    height: 60px;
    background: #E8F5E9; /* Match card-icon background */
    border-radius: 50%;
    transition: transform 0.3s ease;
}

#about .about-content .block-icon:hover {
    transform: scale(1.1); /* Match card-icon hover effect */
}

#about .about-content .block-icon i {
    font-size: 2rem;
    color: #28A745; /* Match icon color */
}

#about .about-content .block-text h3 {
    font-size: 1.5rem;
    font-weight: 600; /* Match card-content h3 */
    color: #003087; /* Match heading color */
    margin-bottom: 0.75rem;
    position: relative;
}

#about .about-content .block-text h3::after {
    content: '';
    position: absolute;
    bottom: -5px;
    left: 0;
    width: 40px;
    height: 2px;
    background: #28A745; /* Match section-heading underline */
    border-radius: 2px;
}

#about .about-content .block-text p {
    font-size: 1.1rem;
    font-weight: 400;
    line-height: 2;
    color: #4B5563; /* Match paragraph color */
}

/* Contact Section */
#about .grid,
#contact .grid {
    display: flex;
    flex-direction: row;
    align-items: flex-start;
    gap: 2rem;
}

#contact .contact-card {
    flex: 1;
    background: rgba(255, 255, 255, 0.3);
    border: 1px solid #29466b;
    border-radius: 20px;
    padding: 2rem;
    transition: all 0.3s ease;
}

#contact .contact-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.1);
}

#contact .contact-card h3 {
    font-size: 1.5rem;
    font-weight: 600;
    color: #29466b;
    margin-bottom: 1rem;
    position: relative;
}

#contact .contact-card h3::after {
    content: '';
    position: absolute;
    bottom: -5px;
    left: 0;
    width: 40px;
    height: 2px;
    background: #9fce68;
}

#contact .contact-card p {
    font-size: 1rem;
    color: #4B5563;
    margin-bottom: 0.5rem;
}

#contact .contact-card a {
    color: #29466b;
    transition: color 0.3s ease;
}

#contact .contact-card a:hover {
    color: #9fce68;
}

#contact .contact-card iframe {
    border-radius: 10px;
}

#contact .contact-form-card {
    flex: 1;
    background: rgba(255, 255, 255, 0.2);
    border: 1px solid #29466b;
    border-radius: 20px;
    padding: 2rem;
    transition: all 0.3s ease;
}

#contact .contact-form-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.1);
}

#contact .contact-form-card label {
    display: block;
    font-weight: 600;
    color: #29466b;
    margin-bottom: 0.5rem;
}

#contact .contact-form-card input,
#contact .contact-form-card textarea {
    width: 100%;
    padding: 0.75rem 0;
    border: none;
    border-bottom: 2px solid #E5E7EB;
    background: transparent;
    font-size: 1rem;
    color: #4B5563;
    transition: border-color 0.3s ease;
}

#contact .contact-form-card input:focus,
#contact .contact-form-card textarea:focus {
    outline: none;
    border-color: #9fce68;
}

#contact .contact-form-card textarea {
    resize: vertical;
}

#contact .contact-form-card .btn-primary {
    width: 100%;
    padding: 0.75rem;
    font-size: 1.1rem;
    background: #29466b;
    border: none;
}

#contact .contact-form-card .btn-primary:hover {
    background: #9fce68;
    color: #29466b;
    border: none;
}

/* Responsive Adjustments */
@media (max-width: 768px) {
    #about .about-card,
    #contact .grid {
        flex-direction: column;
        gap: 2.5rem;
    }

    #about .about-card {
        padding: 2.5rem;
    }

    #about .about-icon {
        width: 120px;
        height: 120px;
    }

    #about .about-icon i {
        font-size: 4rem;
    }

    #about .about-content .content-block {
        margin-bottom: 2rem;
        padding: 1rem;
    }

    #about .about-content .block-icon {
        width: 50px;
        height: 50px;
    }

    #about .about-content .block-icon i {
        font-size: 1.5rem;
    }

    #about .about-content .block-text h3 {
        font-size: 1.25rem;
    }

    #about .about-content .block-text p {
        font-size: 0.95rem;
        line-height: 1.8;
    }

    #contact .contact-card iframe {
        height: 300px;
    }
}

footer {
    background: rgba(232, 245, 233, 0.2);
    color: #003087;
    padding: 40px 0;
    border-top: 2px solid #28A745;
    position: relative;
    z-index: 1;
}

footer a {
    color: #003087;
    transition: color 0.3s ease;
}

footer a:hover {
    color: #28A745;
}

.footer-logo {
    display: flex;
    align-items: center;
    gap: 10px;
}

.footer-logo img {
    height: 50px;
    width: auto;
}

.footer-logo .logo-text {
    font-size: 1.25rem;
    font-weight: 700;
    color: #003087;
}

@media (max-width: 768px) {
    .footer-logo .logo-text {
        display: none;
    }
}

.back-to-top {
    position: fixed;
    bottom: 30px;
    right: 30px;
    background: #28A745;
    color: #FFFFFF;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.2);
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
    z-index: 100;
}

.back-to-top.visible {
    opacity: 1;
    visibility: visible;
}

.back-to-top:hover {
    background: #003087;
    transform: scale(1.1);
}

.fade-in {
    opacity: 0;
    transform: translateY(20px);
    animation: fadeIn 1s ease forwards;
}

@keyframes fadeIn {
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@media (max-width: 1024px) {
    .section-heading {
        font-size: 2rem;
    }
    .hero-content h1 {
        font-size: 2.5rem;
    }
    .hero-content p {
        font-size: 1.2rem;
    }
    .card-icon {
        height: 160px;
    }
}

@media (max-width: 640px) {
    .section-bg {
        padding: 20px;
    }
    .section-heading {
        font-size: 1.75rem;
    }
    .hero {
        height: 70vh;
    }
    .hero-content h1 {
        font-size: 2rem;
    }
    .hero-content p {
        font-size: 1rem;
    }
    .card-content h3 {
        font-size: 1.3rem;
    }
    .card-content p {
        font-size: 0.9rem;
    }
    .donate-form {
        padding: 1.5rem;
    }
}