/* --- Global Variables & Reset --- */
:root {
    --primary-yellow: #FFC20E;
    --primary-green: #009E49;
    --text-dark: #000000;
    --text-light: #222222;
    --white: #ffffff;
    --light-bg: #ffffff; 
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    max-width: 100%;
    overflow-x: hidden;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    line-height: 1.6;
    color: var(--text-dark);
    background-color: var(--white);
    max-width: 100%;
    overflow-x: hidden;
}

a { text-decoration: none; color: inherit; }
ul { list-style: none; }
img { max-width: 100%; height: auto; display: block; }

/* Loading Spinner Styles */
.btn-loading {
    position: relative;
    pointer-events: none;
    opacity: 0.7;
}

.btn-loading::after {
    content: '';
    position: absolute;
    width: 18px;
    height: 18px;
    top: 50%;
    left: 50%;
    margin-left: -9px;
    margin-top: -9px;
    border: 2px solid transparent;
    border-top-color: currentColor;
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

.btn-loading .btn-text {
    visibility: hidden;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.container {
    max-width: 1200px;
    width: 90%;
    margin: 0 auto;
    padding: 0 15px;
}

.text-center { text-align: center; }

/* --- TOP SECTION WRAPPER --- */
.top-section-wrapper {
    position: relative;
    width: 100%;
    height: 700px; 
    overflow: hidden; 
}

/* Layers */
.layer-base, .layer-picture, .layer-film, .layer-color-panel {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* Z-Index Stacking Order */
.layer-base { z-index: 1; }
.layer-picture { z-index: 2; }

/* Layer 3: Color Panel (Behind Film) */
.layer-color-panel {
    z-index: 3;
    height: auto;
    top: 35px;
    display: flex;
    justify-content: center;
}

.layer-color-panel img {
    width: 70%;
    max-width: 900px;
    height: 50px;
    object-fit: fill;
}

/* Layer 4: Black Film (Covers Picture & Panel) */
.layer-film {
    z-index: 4;
    opacity: 0.8; 
}

/* Layer 5: Content (Topmost) */
.layer-content {
    position: relative;
    z-index: 5; 
    padding-top: 40px; 
    height: 100%;
    display: flex;
    flex-direction: column;
}

/* Header Flex Container */
.header-flex {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}

.logo img { height: 80px; }

/* --- Navigation --- */
.main-nav {
    width: 70%;
    max-width: 900px;
    margin: 0 20px;
    display: flex;
    border-radius: 5px;
    overflow: hidden;
}

.nav-list {
    display: flex;
    width: 100%;
    margin: 0;
    padding: 0;
}

.nav-item {
    flex: 1;
}

.nav-item a {
    display: block;
    color: white;
    font-weight: bold;
    font-size: 0.95rem;
    text-transform: uppercase;
    text-shadow: 1px 1px 2px rgba(0,0,0,0.5);
    white-space: nowrap;
    padding: 10px 15px;
    text-align: center;
}

/* Individual nav item colors */
.nav-item:nth-child(1) a { background-color: #B5A642; }  /* Home - Brass */
.nav-item:nth-child(2) a { background-color: #009E49; }  /* About Us - Green */
.nav-item:nth-child(3) a { background-color: #4169E1; }  /* Programmes - Royal Blue */
.nav-item:nth-child(4) a { background-color: #880085; }  /* How to Help - Mardi Gras */
.nav-item:nth-child(5) a { background-color: #987654; }  /* Gallery - Brown Pale */
.nav-item:nth-child(6) a { background-color: #A52A2A; }  /* Contact us - Red Brown */

.nav-item a:hover { opacity: 0.8; }

/* Donate Button */
.btn-donate {
    background-color: var(--primary-green);
    color: var(--white);
    padding: 10px 30px;
    border-radius: 50px;
    font-weight: bold;
    box-shadow: 0 4px 6px rgba(0,0,0,0.3);
    white-space: nowrap;
}
.btn-donate:hover { background-color: #007a38; }

/* Hero Images & Button */
.hero-content-overlay {
    text-align: center;
    color: var(--white);
    position: relative; 
    flex-grow: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
}

/* Hero Text Wrapper with Sun */
.hero-text-wrapper {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 20px;
}

.hero-sun-img {
    width: 120px;
    height: 120px;
    object-fit: contain;
    flex-shrink: 0;
}

.hero-titles {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    text-align: left;
}

.hero-subtitle-text {
    font-size: 1.1rem;
    font-weight: 500;
    color: var(--white);
    margin-bottom: 5px;
    text-shadow: 1px 1px 3px rgba(0,0,0,0.5);
}

.hero-main-title-img {
    max-width: 80%;
    height: auto;
    margin-bottom: 20px;
}

.hero-subtitle-img {
    max-width: 500px;
    height: auto;
    margin-bottom: 40px;
}

/* Volunteer Button - Bottom Right */
.btn-volunteer {
    position: absolute;
    bottom: 30px;
    right: -50px;
    background: transparent;
    border: 2px solid var(--white);
    color: var(--white);
    padding: 12px 40px;
    border-radius: 50px;
    font-size: 1.1rem;
    font-weight: bold;
    transition: all 0.3s;
}
.btn-volunteer:hover { background: var(--white); color: var(--text-dark); }

/* --- Other Sections --- */
.intro-section, .vmv-section, .founded-one-section, .feature-row-section, .cta-section {
    padding: 60px 0;
    background-color: var(--white);
}

.intro-text {
    max-width: 800px;
    margin: 0 auto;
    font-size: 1.1rem;
    font-weight: 500;
    color: var(--text-dark);
}

.vmv-image, .founded-image, .content-image {
    max-width: 100%;
    height: auto;
    margin: 0 auto;
    display: block;
}

/* The Founded One Title */
.founded-one-title {
    font-family: 'Pacifico', cursive;
    font-size: 3rem;
    color: #C8102E;
    font-weight: normal;
    text-shadow: 1px 1px 2px rgba(0,0,0,0.1);
}

/* Feature Cards */
.grid-3 {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 40px;
    align-items: stretch;
}

.feature-card {
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
    max-width: 350px; 
    margin: 0 auto;
    height: 100%;
}

.image-wrapper {
    width: 100%;
    max-width: 350px;
    aspect-ratio: 1 / 1;
    margin-bottom: 20px;
}

.smooth-square-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 30px;
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.1);
    border: 4px solid var(--white);
}

.title-image-small {
    max-width: 250px;
    height: auto;
    margin-bottom: 15px;
    display: block;
}

.feature-card p {
    font-size: 1rem;
    color: var(--text-light);
    margin-bottom: 20px;
    flex-grow: 1;
}

.btn-outline {
    border: 2px solid var(--text-dark);
    color: var(--text-dark);
    margin-top: auto;
    padding: 10px 30px;
    display: inline-block;
    border-radius: 20px;
    font-weight: bold;
}
.btn-outline:hover { background: var(--text-dark); color: var(--white); }

/* CTA */
.grid-2 {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 50px;
    align-items: center;
}

.cta-text {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
}

.cta-title-img {
    max-width: 100%;
    height: auto;
    margin-bottom: 30px;
}

.cta-img {
    width: 100%;
    max-width: 500px;
    height: auto;
    border-radius: 20px;
    box-shadow: 0 10px 20px rgba(0,0,0,0.1);
}

.btn-donate-large {
    background-color: #7CFC00; color: #222;
    padding: 15px 50px; font-size: 1.2rem;
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
    border-radius: 30px;
    font-weight: bold;
    display: inline-block;
}

/* Footer */
.site-footer {
    background: linear-gradient(to bottom, #fff 0%, #FFF8DC 100%);
    border-top: 1px solid #eee;
    padding-top: 50px;
    position: relative;
}
.footer-content {
    display: flex; justify-content: space-between; flex-wrap: wrap;
    padding-bottom: 40px; text-align: left;
}
.footer-col { flex: 1; min-width: 200px; margin-bottom: 20px; padding: 0 10px; }
.footer-col.brand { text-align: center; }
.footer-logo { width: 120px; margin: 0 auto 10px; }
.founded-text { font-weight: bold; font-style: italic; color: #C8102E; }
.footer-col i { color: var(--primary-green); margin-right: 10px; }
.forgood-logo { max-width: 120px; height: auto; margin-bottom: 10px; }
.underline { text-decoration: underline; }
.footer-bottom {
    position: relative;
    height: 40px;
    width: 100%;
    overflow: hidden;
}
.footer-bottom::before {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 40px;
    background: linear-gradient(90deg, #FFC20E 0%, #FFC20E 60%, #E91E63 60%, #E91E63 100%);
    clip-path: polygon(0 60%, 15% 30%, 30% 50%, 45% 20%, 60% 40%, 75% 15%, 90% 35%, 100% 10%, 100% 100%, 0 100%);
}
.footer-bottom::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 25px;
    background: linear-gradient(90deg, #FFC20E 0%, #FFC20E 50%, #E91E63 50%, #E91E63 100%);
}

.footer-privacy {
    text-align: center;
    padding: 15px 0;
    background-color: transparent;
}

.footer-link {
    display: inline-block;
    padding: 8px 20px;
    color: #666;
    font-size: 0.85rem;
    text-decoration: none;
}

.footer-link:hover {
    color: #009E49;
    text-decoration: underline;
}

@media (max-width: 900px) {
    .grid-3 { grid-template-columns: 1fr; }
    .header-flex { flex-direction: column; gap: 20px; }
    .main-nav { width: 100%; max-width: 100%; }
    .nav-list { flex-wrap: wrap; justify-content: center; }
    .layer-color-panel { display: none; }
    .nav-item { flex: none; }
    .nav-item a { margin: 2px; border-radius: 3px; }
    .btn-volunteer { position: relative; bottom: auto; right: auto; margin-top: 20px; margin-bottom: 30px; margin-left: auto; margin-right: 0; }
    .hero-text-wrapper { flex-direction: column; }
    .hero-titles { align-items: center; text-align: center; }
    .hero-sun-img { width: 80px; height: 80px; }
}

@media (max-width: 768px) {
    /* Hero section adjustments */
    .top-section-wrapper {
        height: auto;
        min-height: 500px;
        padding-bottom: 40px;
    }
    
    .layer-content {
        padding-top: 20px;
    }
    
    .logo img {
        height: 60px;
    }
    
    /* Hide desktop navigation on mobile */
    .main-nav {
        display: none;
    }
    
    .header-action {
        display: none;
    }
    
    .header-flex {
        flex-direction: row;
        justify-content: space-between;
    }
    
    /* Show hamburger menu */
    .mobile-menu-toggle {
        display: flex;
    }
    
    /* Grid adjustments */
    .grid-2 { grid-template-columns: 1fr; }
    .cta-text { align-items: center; text-align: center; }
    .cta-title-img { max-width: 90%; }
    .cta-image { text-align: center; }
    .cta-img { max-width: 350px; margin: 0 auto; }
    
    /* Footer */
    .footer-content { flex-direction: column; text-align: center; }
    .footer-col { text-align: center; }
    .forgood-logo { margin: 0 auto 10px; }
    
    /* Hero content */
    .hero-main-title-img {
        max-width: 90%;
    }
    
    .hero-subtitle-img {
        max-width: 90%;
        margin-bottom: 20px;
    }
    
    .hero-content-overlay {
        justify-content: flex-start;
        padding-top: 60px;
    }
}

/* Small phone breakpoint */
@media (max-width: 480px) {
    .top-section-wrapper {
        min-height: 400px;
    }
    
    .layer-content {
        padding-top: 15px;
    }
    
    .logo img {
        height: 50px;
    }
    
    .hero-sun-img {
        width: 60px;
        height: 60px;
    }
    
    .container {
        width: 95%;
        padding: 0 10px;
    }
    
    .intro-section, .vmv-section, .founded-one-section, .feature-row-section, .cta-section {
        padding: 40px 0;
    }
    
    .intro-text {
        font-size: 1rem;
    }
    
    .founded-one-title {
        font-size: 2rem;
    }
    
    .btn-donate-large {
        padding: 12px 30px;
        font-size: 1rem;
    }
    
    .footer-col {
        min-width: 100%;
        padding: 0;
    }
    
    /* Hero title images - prevent overflow on small screens */
    .hero-main-title-img,
    .hero-subtitle-img {
        max-width: 90%;
        padding: 0 10px;
        box-sizing: border-box;
    }
    
    .hero-content-overlay {
        padding: 0 15px;
    }
    
    .hero-text-wrapper {
        width: 100%;
        padding: 0 10px;
    }
    
    .hero-titles {
        width: 100%;
    }
}

/* ========================================
   MOBILE NAVIGATION STYLES
   ======================================== */

/* Hamburger Menu Toggle Button */
.mobile-menu-toggle {
    display: none; /* Hidden by default, shown on mobile */
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 10000;
    width: 50px;
    height: 50px;
    background: var(--primary-green);
    border: none;
    border-radius: 8px;
    cursor: pointer;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 5px;
    padding: 12px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
}

/* Animate hamburger lines to X when menu is open */
.mobile-menu-toggle.menu-open .hamburger-line:nth-child(1) {
    transform: translateY(8px) rotate(45deg);
}
.mobile-menu-toggle.menu-open .hamburger-line:nth-child(2) {
    opacity: 0;
}
.mobile-menu-toggle.menu-open .hamburger-line:nth-child(3) {
    transform: translateY(-8px) rotate(-45deg);
}

.hamburger-line {
    display: block;
    width: 24px;
    height: 3px;
    background: white;
    border-radius: 2px;
    transition: all 0.3s ease;
}

.mobile-menu-toggle:hover {
    background: #007a38;
}

/* Mobile Navigation Overlay */
.mobile-nav-overlay {
    display: none; /* Hidden by default */
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.95);
    z-index: 9999;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
}

.mobile-nav-overlay.active {
    opacity: 1;
    visibility: visible;
}


/* Mobile menu content */
.mobile-nav-menu {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    text-align: center;
    width: 100%;
    padding: 20px;
}

.mobile-nav-menu ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.mobile-nav-menu li {
    margin: 20px 0;
}

.mobile-nav-menu a {
    color: white;
    font-size: 1.5rem;
    font-weight: 600;
    text-transform: uppercase;
    text-decoration: none;
    display: inline-block;
    padding: 10px 20px;
    transition: all 0.3s ease;
    letter-spacing: 1px;
}

.mobile-nav-menu a:hover {
    color: var(--primary-yellow);
    transform: scale(1.1);
}

.mobile-donate-btn {
    background: var(--primary-green) !important;
    border-radius: 30px !important;
    padding: 15px 40px !important;
    margin-top: 20px;
}

.mobile-donate-btn:hover {
    background: #007a38 !important;
}

/* Show overlay and hamburger on mobile */
@media (max-width: 768px) {
    .mobile-nav-overlay {
        display: block;
    }
    
    .mobile-menu-toggle {
        display: flex !important;
    }
}

