/* CSS Reset and Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Georgia', 'Times New Roman', serif;
    line-height: 1.6;
    color: #555555;
    background-color: #FFFFFF;
}

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

/* Navigation */
.navbar {
    position: fixed;
    top: 0;
    width: 100%;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    z-index: 1000;
    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;
    height: 70px;
}

.nav-logo h1 {
    font-size: 1.5rem;
    font-weight: bold;
    color: #2D7D32;
}

.foundation-text {
    color: #2C2C2C;
    font-weight: 300;
}

.logo-image {
    height: 50px;
    width: auto;
    object-fit: contain;
}

.nav-menu {
    display: flex;
    gap: 2rem;
}

.nav-link {
    text-decoration: none;
    color: #555555;
    font-weight: 500;
    transition: color 0.3s ease;
    position: relative;
}

.nav-link:hover, .nav-link.active {
    color: #2D7D32;
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: -5px;
    left: 0;
    width: 0;
    height: 2px;
    background: #B8860B;
    transition: width 0.3s ease;
}

.nav-link:hover::after, .nav-link.active::after {
    width: 100%;
}

.nav-toggle {
    display: none;
    flex-direction: column;
    cursor: pointer;
}

.bar {
    width: 25px;
    height: 3px;
    background: #2D7D32;
    margin: 3px 0;
    transition: 0.3s;
}

/* Page Header */
.page-header {
    padding: 180px 0 100px;
    background: url('../image/charity6.jpeg') center/cover no-repeat;
    text-align: center;
    position: relative;
    overflow: hidden;
}

.page-header::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.7);
    z-index: 1;
}

.page-header-content {
    position: relative;
    z-index: 2;
}

.page-title {
    font-size: clamp(2.5rem, 5vw, 3.5rem);
    color: white;
    margin-bottom: 1rem;
    font-weight: bold;
}

.page-subtitle {
    font-size: clamp(1rem, 2.5vw, 1.3rem);
    color: #B8860B;
    margin-bottom: 1.5rem;
    font-style: italic;
}

.page-description {
    font-size: clamp(1rem, 2vw, 1.1rem);
    color: #555555;
    max-width: 600px;
    margin: 0 auto;
    line-height: 1.8;
}

/* Events Section */
.events-section {
    padding: 5rem 0;
    background: #FFFFFF;
}

.section-title {
    text-align: center;
    font-size: 2.5rem;
    color: #2D7D32;
    margin-bottom: 3rem;
    position: relative;
}

.section-title::after {
    content: '';
    position: absolute;
    bottom: -10px;
    left: 50%;
    transform: translateX(-50%);
    width: 80px;
    height: 3px;
    background: #B8860B;
}

.events-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: 2rem;
    margin-top: 3rem;
}

.event-card {
    background: #F8F8F8;
    border-radius: 15px;
    overflow: hidden;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    border: 1px solid rgba(184, 134, 11, 0.1);
}

.event-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.15);
}

.event-image {
    height: 200px;
    background: linear-gradient(135deg, #2D7D32 0%, #4CAF50 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 3rem;
    position: relative;
}

.event-date-badge {
    position: absolute;
    top: 15px;
    right: 15px;
    background: rgba(255, 255, 255, 0.9);
    color: #2D7D32;
    padding: 8px 12px;
    border-radius: 8px;
    font-size: 0.9rem;
    font-weight: bold;
    text-align: center;
}

.event-content {
    padding: 2rem;
}

.event-title {
    font-size: 1.5rem;
    color: #2D7D32;
    margin-bottom: 1rem;
    font-weight: bold;
}

.event-details {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    margin-bottom: 1.5rem;
}

.event-detail {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: #555555;
    font-size: 0.95rem;
}

.event-detail-icon {
    color: #B8860B;
    font-size: 1.1rem;
    width: 20px;
    text-align: center;
}

.event-description {
    color: #555555;
    line-height: 1.7;
    margin-bottom: 1.5rem;
}

.event-actions {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
}

.btn {
    padding: 12px 24px;
    border: none;
    border-radius: 8px;
    text-decoration: none;
    font-weight: 600;
    transition: all 0.3s ease;
    cursor: pointer;
    display: inline-block;
    text-align: center;
    font-size: 0.9rem;
}

.btn-primary {
    background: #2D7D32;
    color: white;
}

.btn-primary:hover {
    background: #4CAF50;
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(45, 125, 50, 0.3);
}

.btn-secondary {
    background: #B8860B;
    color: white;
}

.btn-secondary:hover {
    background: #CD853F;
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(184, 134, 11, 0.3);
}

.btn-outline {
    background: transparent;
    color: #2D7D32;
    border: 2px solid #2D7D32;
}

.btn-outline:hover {
    background: #2D7D32;
    color: white;
}

/* Event Status Badges */
.event-status {
    display: inline-block;
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 1rem;
}

.status-upcoming {
    background: #E8F5E8;
    color: #2D7D32;
}

.status-registration {
    background: #FFF3E0;
    color: #B8860B;
}

.status-full {
    background: #FFE6E6;
    color: #D32F2F;
}

/* Past Events Section */
.past-events {
    padding: 4rem 0;
    background: linear-gradient(135deg, #F4E4BC 0%, #F8F8F8 100%);
}

.past-events-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 1.5rem;
    margin-top: 2rem;
}

.past-event-card {
    background: rgba(255, 255, 255, 0.8);
    padding: 1.5rem;
    border-radius: 10px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s ease;
}

.past-event-card:hover {
    transform: translateY(-3px);
}

.past-event-title {
    color: #2D7D32;
    font-size: 1.2rem;
    margin-bottom: 0.5rem;
    font-weight: bold;
}

.past-event-date {
    color: #B8860B;
    font-size: 0.9rem;
    margin-bottom: 1rem;
    font-style: italic;
}

.past-event-summary {
    color: #555555;
    font-size: 0.95rem;
    line-height: 1.6;
}

/* Newsletter Section */
.newsletter {
    padding: 4rem 0;
    background: #2D7D32;
    color: white;
    text-align: center;
}

.newsletter h2 {
    font-size: 2.2rem;
    margin-bottom: 1rem;
    color: white;
}

.newsletter p {
    font-size: 1.1rem;
    margin-bottom: 2rem;
    color: #F4E4BC;
}

.newsletter-form {
    display: flex;
    max-width: 500px;
    margin: 0 auto;
    gap: 1rem;
    flex-wrap: wrap;
    justify-content: center;
}

.newsletter-input {
    flex: 1;
    min-width: 250px;
    padding: 12px 16px;
    border: none;
    border-radius: 8px;
    font-size: 1rem;
}

.newsletter-input:focus {
    outline: none;
    box-shadow: 0 0 0 3px rgba(244, 228, 188, 0.3);
}

.newsletter-btn {
    background: #B8860B;
    color: white;
    border: none;
    padding: 12px 24px;
    border-radius: 8px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
}

.newsletter-btn:hover {
    background: #CD853F;
    transform: translateY(-2px);
}

/* Footer */
.footer {
    background: #2C2C2C;
    color: white;
    padding: 3rem 0 1rem;
}

.footer-content {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
    margin-bottom: 2rem;
}

.footer-section h3,
.footer-section h4 {
    color: #2D7D32;
    margin-bottom: 1rem;
}

.footer-section ul {
    list-style: none;
}

.footer-section ul li {
    margin-bottom: 0.5rem;
}

.footer-section a {
    color: #F4E4BC;
    text-decoration: none;
    transition: color 0.3s ease;
}

.footer-section a:hover {
    color: #B8860B;
}

.social-links {
    display: flex;
    gap: 1rem;
}

.social-link {
    padding: 0.5rem;
    background: #2D7D32;
    border-radius: 5px;
    transition: background 0.3s ease;
}

.social-link:hover {
    background: #4CAF50;
}

.social-link.disabled {
    color: #999;
    cursor: not-allowed;
    opacity: 0.6;
}

.social-link.disabled:hover {
    color: #999;
    transform: none;
}

.footer-bottom {
    text-align: center;
    padding-top: 2rem;
    border-top: 1px solid rgba(255, 255, 255, 0.2);
    opacity: 0.8;
}

.footer-bottom a {
    color: #B8860B;
    text-decoration: none;
    transition: color 0.3s ease;
}

.footer-bottom a:hover {
    color: #FFFFFF;
    text-decoration: underline;
}

/* Scroll to Top Button */
.scroll-to-top {
    position: fixed;
    bottom: 20px;
    right: 20px;
    background: #2D7D32;
    color: white;
    border: none;
    border-radius: 50%;
    width: 50px;
    height: 50px;
    font-size: 1.5rem;
    cursor: pointer;
    opacity: 0;
    transform: translateY(100px);
    transition: all 0.3s ease;
    z-index: 1000;
}

.scroll-to-top.visible {
    opacity: 1;
    transform: translateY(0);
}

.scroll-to-top:hover {
    background: #4CAF50;
    transform: translateY(-2px);
}

/* Modal Styles */
.modal {
    display: none;
    position: fixed;
    z-index: 2000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.8);
    backdrop-filter: blur(5px);
}

.modal-content {
    background-color: #FFFFFF;
    margin: 5% auto;
    padding: 2rem;
    border-radius: 15px;
    width: 90%;
    max-width: 600px;
    position: relative;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
}

.close {
    position: absolute;
    right: 20px;
    top: 15px;
    color: #aaa;
    font-size: 28px;
    font-weight: bold;
    cursor: pointer;
    transition: color 0.3s ease;
}

.close:hover {
    color: #2D7D32;
}

.modal h2 {
    color: #2D7D32;
    margin-bottom: 1rem;
}

.modal p {
    color: #555555;
    line-height: 1.7;
    margin-bottom: 1rem;
}

.flyer-placeholder {
    width: 100%;
    height: 300px;
    background: linear-gradient(135deg, #F4E4BC 0%, #F8F8F8 100%);
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #B8860B;
    font-size: 3rem;
    margin: 1rem 0;
    border: 2px dashed #B8860B;
}

/* Responsive Design */
@media (max-width: 768px) {
    .nav-menu {
        position: fixed;
        left: -100%;
        top: 70px;
        flex-direction: column;
        background-color: rgba(255, 255, 255, 0.98);
        width: 100%;
        text-align: center;
        transition: 0.3s;
        padding: 2rem 0;
        box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    }

    .nav-menu.active {
        left: 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);
    }

    .page-header {
        padding: 180px 0 80px;
    }

    .events-grid {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }

    .event-actions {
        flex-direction: column;
    }

    .btn {
        width: 100%;
        text-align: center;
    }

    .newsletter-form {
        flex-direction: column;
        align-items: center;
    }

    .newsletter-input {
        width: 100%;
        max-width: 300px;
    }

    .newsletter-btn {
        width: 100%;
        max-width: 300px;
    }

    .modal-content {
        width: 95%;
        margin: 10% auto;
        padding: 1.5rem;
    }
}

@media (max-width: 480px) {
    .page-title {
        font-size: 2rem;
    }

    .events-grid {
        grid-template-columns: 1fr;
    }

    .event-card {
        margin: 0 10px;
    }

    .event-content {
        padding: 1.5rem;
    }

    .past-events-grid {
        grid-template-columns: 1fr;
    }

    .footer-content {
        grid-template-columns: 1fr;
        text-align: center;
    }
}

/* Animations */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.fade-in-up {
    animation: fadeInUp 0.6s ease forwards;
}

/* Loading Animation */
.loading {
    opacity: 0;
    transform: translateY(20px);
    transition: all 0.6s ease;
}

.loading.loaded {
    opacity: 1;
    transform: translateY(0);
}