/* Reset and Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    line-height: 1.6;
    color: #333;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* Navigation */
.navbar {
    background: #fff;
    padding: 1rem 0;
    position: fixed;
    top: 0;
    width: 100%;
    z-index: 1000;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    transition: all 0.3s ease;
}

.nav-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.nav-logo h2 {
    color: #2c5aa0;
    font-size: 1.8rem;
    font-weight: 700;
}

.nav-menu {
    display: flex;
    list-style: none;
    margin: 0;
}

.nav-item {
    margin-left: 2rem;
}

.nav-link {
    text-decoration: none;
    color: #333;
    font-weight: 500;
    transition: color 0.3s ease;
    position: relative;
}

.nav-link:hover {
    color: #2c5aa0;
}

.nav-link::after {
    content: '';
    position: absolute;
    width: 0;
    height: 2px;
    bottom: -5px;
    left: 0;
    background-color: #2c5aa0;
    transition: width 0.3s ease;
}

.nav-link:hover::after {
    width: 100%;
}

.nav-toggle {
    display: none;
    flex-direction: column;
    cursor: pointer;
}

.bar {
    width: 25px;
    height: 3px;
    background-color: #333;
    margin: 3px 0;
    transition: 0.3s;
}

/* Hero Section */
.hero {
    height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    color: white;
    position: relative;
    overflow: hidden;
}

.hero-background {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1;
}

.hero-bg-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
}

.hero-container {
    z-index: 3;
    position: relative;
}

.hero-title {
    font-size: 3.5rem;
    font-weight: 700;
    margin-bottom: 1rem;
    animation: fadeInUp 1s ease;
}

.hero-subtitle {
    font-size: 2rem;
    font-weight: 400;
    margin-bottom: 1.5rem;
    opacity: 0.9;
    animation: fadeInUp 1s ease 0.2s both;
}

.hero-description {
    font-size: 1.2rem;
    max-width: 600px;
    margin: 0 auto 2rem;
    opacity: 0.9;
    animation: fadeInUp 1s ease 0.4s both;
}

.hero-buttons {
    animation: fadeInUp 1s ease 0.6s both;
}

.btn {
    display: inline-block;
    padding: 12px 30px;
    margin: 0 10px;
    text-decoration: none;
    border-radius: 50px;
    font-weight: 600;
    transition: all 0.3s ease;
    border: 2px solid transparent;
    cursor: pointer;
    font-size: 1rem;
}

.btn-primary {
    background: #4CAF50;
    color: white;
    border-color: #4CAF50;
}

.btn-primary:hover {
    background: transparent;
    border-color: #4CAF50;
    color: #4CAF50;
}

.btn-secondary {
    background: transparent;
    color: white;
    border-color: white;
}

.btn-secondary:hover {
    background: white;
    color: #2c5aa0;
}

.hero-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, rgba(44, 90, 160, 0.8) 0%, rgba(76, 175, 80, 0.8) 100%);
    z-index: 2;
}

/* Section Styles */
section {
    padding: 80px 0;
}

.section-header {
    text-align: center;
    margin-bottom: 60px;
}

.section-header h2 {
    font-size: 2.5rem;
    color: #2c5aa0;
    margin-bottom: 1rem;
    font-weight: 700;
}

.section-header p {
    font-size: 1.1rem;
    color: #666;
    max-width: 600px;
    margin: 0 auto;
}

/* About Section */
.about {
    background: #f8f9fa;
}

.about-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 60px;
    align-items: start;
}

.about-image {
    position: relative;
}

.about-img {
    width: 100%;
    height: 300px;
    object-fit: cover;
    border-radius: 15px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.2);
    margin-bottom: 30px;
}

.about-text h3 {
    color: #2c5aa0;
    font-size: 1.5rem;
    margin-bottom: 1rem;
    font-weight: 600;
}

.about-text p {
    margin-bottom: 2rem;
    color: #666;
    line-height: 1.8;
}

.certification-badge {
    display: flex;
    align-items: center;
    background: #4CAF50;
    color: white;
    padding: 10px 20px;
    border-radius: 25px;
    display: inline-flex;
    font-weight: 600;
}

.certification-badge i {
    margin-right: 10px;
    font-size: 1.2rem;
}

.about-stats {
    display: grid;
    grid-template-columns: 1fr;
    gap: 20px;
}

.stat-item {
    text-align: center;
    padding: 30px;
    background: white;
    border-radius: 15px;
    box-shadow: 0 5px 20px rgba(0,0,0,0.1);
    transition: transform 0.3s ease;
}

.stat-item:hover {
    transform: translateY(-5px);
}

.stat-number {
    font-size: 2.5rem;
    font-weight: 700;
    color: #2c5aa0;
    margin-bottom: 10px;
}

.stat-label {
    color: #666;
    font-weight: 500;
}

/* Services Section */
.services-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 40px;
}

.service-card {
    background: white;
    border-radius: 15px;
    box-shadow: 0 5px 20px rgba(0,0,0,0.1);
    text-align: center;
    transition: transform 0.3s ease;
    overflow: hidden;
    position: relative;
}

.service-card:hover {
    transform: translateY(-10px);
}

.service-image {
    width: 100%;
    height: 200px;
    overflow: hidden;
}

.service-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.service-card:hover .service-image img {
    transform: scale(1.1);
}

.service-card > div:not(.service-image),
.service-card h3,
.service-card p {
    padding: 0 30px;
}

.service-card h3 {
    padding-top: 20px;
}

.service-card p {
    padding-bottom: 30px;
}

.service-icon {
    width: 60px;
    height: 60px;
    background: linear-gradient(135deg, #2c5aa0, #4CAF50);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 20px auto;
    position: relative;
    z-index: 2;
}

.service-icon i {
    font-size: 1.5rem;
    color: white;
}

.service-card h3 {
    color: #2c5aa0;
    margin-bottom: 15px;
    font-size: 1.3rem;
    font-weight: 600;
}

.service-card p {
    color: #666;
    line-height: 1.6;
}

/* Gallery Section */
.gallery {
    background: #f8f9fa;
}

.gallery-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
}

.gallery-item {
    position: relative;
    border-radius: 15px;
    overflow: hidden;
    box-shadow: 0 5px 20px rgba(0,0,0,0.1);
    transition: transform 0.3s ease;
    cursor: pointer;
}

.gallery-item:hover {
    transform: translateY(-5px);
}

.gallery-item img {
    width: 100%;
    height: 250px;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.gallery-item:hover img {
    transform: scale(1.1);
}

.gallery-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: linear-gradient(transparent, rgba(0,0,0,0.8));
    color: white;
    padding: 30px 20px 20px;
    transform: translateY(100%);
    transition: transform 0.3s ease;
}

.gallery-item:hover .gallery-overlay {
    transform: translateY(0);
}

.gallery-overlay h4 {
    font-size: 1.2rem;
    font-weight: 600;
    margin-bottom: 8px;
}

.gallery-overlay p {
    font-size: 0.9rem;
    opacity: 0.9;
    line-height: 1.4;
}

/* Donation Section */
.donate {
    background: linear-gradient(135deg, #2c5aa0 0%, #4CAF50 100%);
    color: white;
}

.donate .section-header h2,
.donate .section-header p {
    color: white;
}

.donate-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 60px;
    align-items: start;
}

.donate-info h3 {
    font-size: 1.5rem;
    margin-bottom: 20px;
    font-weight: 600;
}

.donate-benefits {
    list-style: none;
    margin-bottom: 30px;
}

.donate-benefits li {
    margin-bottom: 10px;
    display: flex;
    align-items: center;
}

.donate-benefits i {
    margin-right: 10px;
    color: #4CAF50;
    background: white;
    border-radius: 50%;
    width: 20px;
    height: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.8rem;
}

.tax-info {
    background: rgba(255,255,255,0.1);
    padding: 20px;
    border-radius: 10px;
    backdrop-filter: blur(10px);
}

.tax-info h4 {
    margin-bottom: 15px;
    font-size: 1.2rem;
}

.tax-info p {
    margin-bottom: 5px;
}

.donate-form {
    background: white;
    padding: 40px;
    border-radius: 15px;
    color: #333;
    position: relative;
}

.donate-image {
    text-align: center;
    margin-bottom: 25px;
}

.donate-image img {
    width: 120px;
    height: 120px;
    border-radius: 50%;
    object-fit: cover;
    border: 5px solid #f0f0f0;
}

.donate-form h3 {
    color: #2c5aa0;
    margin-bottom: 25px;
    font-size: 1.5rem;
    text-align: center;
}

.amount-buttons {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 15px;
    margin-bottom: 20px;
}

.amount-btn {
    padding: 15px;
    border: 2px solid #e0e0e0;
    background: white;
    border-radius: 8px;
    font-size: 1.1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
}

.amount-btn:hover,
.amount-btn.active {
    border-color: #2c5aa0;
    background: #2c5aa0;
    color: white;
}

.custom-amount {
    margin-bottom: 25px;
}

.custom-amount input {
    width: 100%;
    padding: 15px;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    font-size: 1.1rem;
    transition: border-color 0.3s ease;
}

.custom-amount input:focus {
    outline: none;
    border-color: #2c5aa0;
}

.donate-btn {
    width: 100%;
    padding: 15px;
    font-size: 1.1rem;
    background: #4CAF50;
    border: none;
    margin-bottom: 15px;
}

.donation-note {
    font-size: 0.9rem;
    color: #666;
    text-align: center;
    line-height: 1.4;
}

/* Contact Section */
.contact {
    background: #f8f9fa;
}

.contact-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 60px;
}

.contact-item {
    display: flex;
    margin-bottom: 30px;
}

.contact-icon {
    width: 60px;
    height: 60px;
    background: linear-gradient(135deg, #2c5aa0, #4CAF50);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-right: 20px;
    flex-shrink: 0;
}

.contact-icon i {
    color: white;
    font-size: 1.2rem;
}

.contact-details h4 {
    color: #2c5aa0;
    margin-bottom: 5px;
    font-weight: 600;
}

.contact-details p {
    color: #666;
    line-height: 1.4;
}

.contact-form {
    background: white;
    padding: 40px;
    border-radius: 15px;
    box-shadow: 0 5px 20px rgba(0,0,0,0.1);
}

.form-group {
    margin-bottom: 20px;
}

.form-group input,
.form-group textarea {
    width: 100%;
    padding: 15px;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    font-size: 1rem;
    transition: border-color 0.3s ease;
    font-family: inherit;
}

.form-group input:focus,
.form-group textarea:focus {
    outline: none;
    border-color: #2c5aa0;
}

.form-group textarea {
    resize: vertical;
    min-height: 120px;
}

/* Footer */
.footer {
    background: #2c5aa0;
    color: white;
    padding: 50px 0 20px;
}

.footer-content {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 40px;
    margin-bottom: 30px;
}

.footer-section h3,
.footer-section h4 {
    margin-bottom: 20px;
    font-weight: 600;
}

.footer-section ul {
    list-style: none;
}

.footer-section ul li {
    margin-bottom: 10px;
}

.footer-section ul li a {
    color: rgba(255,255,255,0.8);
    text-decoration: none;
    transition: color 0.3s ease;
}

.footer-section ul li a:hover {
    color: white;
}

.footer-bottom {
    border-top: 1px solid rgba(255,255,255,0.2);
    padding-top: 20px;
    text-align: center;
    color: rgba(255,255,255,0.8);
}

/* Animations */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Responsive Design */
@media screen and (max-width: 768px) {
    .nav-menu {
        position: fixed;
        left: -100%;
        top: 70px;
        flex-direction: column;
        background-color: white;
        width: 100%;
        text-align: center;
        transition: 0.3s;
        box-shadow: 0 10px 27px rgba(0,0,0,0.05);
        z-index: 999;
    }

    .nav-menu.active {
        left: 0;
    }

    .nav-item {
        margin: 1rem 0;
    }

    .nav-toggle {
        display: flex;
    }

    .nav-toggle.active .bar:nth-child(2) {
        opacity: 0;
    }

    .nav-toggle.active .bar:nth-child(1) {
        transform: translateY(8px) rotate(45deg);
    }

    .nav-toggle.active .bar:nth-child(3) {
        transform: translateY(-8px) rotate(-45deg);
    }

    .hero-title {
        font-size: 2.5rem;
    }

    .hero-subtitle {
        font-size: 1.5rem;
    }

    .hero-description {
        font-size: 1rem;
    }

    .about-grid,
    .donate-content,
    .contact-content {
        grid-template-columns: 1fr;
        gap: 40px;
    }

    .about-img {
        height: 250px;
    }

    .gallery-grid {
        grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
        gap: 20px;
    }

    .gallery-item img {
        height: 200px;
    }

    .about-stats {
        grid-template-columns: repeat(3, 1fr);
        gap: 15px;
    }

    .stat-item {
        padding: 20px 10px;
    }

    .stat-number {
        font-size: 2rem;
    }

    .service-image {
        height: 150px;
    }

    .amount-buttons {
        grid-template-columns: 1fr;
    }

    .section-header h2 {
        font-size: 2rem;
    }

    .container {
        padding: 0 15px;
    }

    section {
        padding: 60px 0;
    }
}

@media screen and (max-width: 480px) {
    .hero-title {
        font-size: 2rem;
    }

    .hero-subtitle {
        font-size: 1.2rem;
    }

    .btn {
        padding: 10px 20px;
        font-size: 0.9rem;
        margin: 5px;
    }

    .donate-form,
    .contact-form {
        padding: 25px;
    }

    .about-stats {
        grid-template-columns: 1fr;
        gap: 20px;
    }

    .stat-item {
        margin: 0;
    }

    .gallery-grid {
        grid-template-columns: 1fr;
    }

    .gallery-item img {
        height: 180px;
    }

    .donate-image img {
        width: 80px;
        height: 80px;
    }
}

/* Smooth scrolling */
html {
    scroll-behavior: smooth;
}

/* Loading animations for dynamic content */
.loading {
    opacity: 0;
    transform: translateY(20px);
    transition: all 0.6s ease;
}

.loading.loaded {
    opacity: 1;
    transform: translateY(0);
}

/* Image optimization */
img {
    max-width: 100%;
    height: auto;
}

.lazy {
    opacity: 0;
    transition: opacity 0.3s;
}

.lazy.loaded {
    opacity: 1;
}

/* Image hover effects */
.gallery-item,
.service-card,
.about-image {
    overflow: hidden;
}

/* Preload important images */
.hero-bg-image {
    will-change: transform;
}

/* Progressive image loading */
.progressive-image {
    background: #f0f0f0;
    background-image: linear-gradient(45deg, #f0f0f0 25%, transparent 25%),
                      linear-gradient(-45deg, #f0f0f0 25%, transparent 25%),
                      linear-gradient(45deg, transparent 75%, #f0f0f0 75%),
                      linear-gradient(-45deg, transparent 75%, #f0f0f0 75%);
    background-size: 20px 20px;
    background-position: 0 0, 0 10px, 10px -10px, -10px 0px;
    animation: shimmer 2s infinite;
}

@keyframes shimmer {
    0% { background-position: 0 0, 0 10px, 10px -10px, -10px 0px; }
    100% { background-position: 20px 0, 20px 10px, 30px -10px, 10px 0px; }
}
