:root {
    /* Color Scheme - Centralized place to change colors */
    --primary-color: #FF6347; /* Coral/tomato color similar to the example */
    --secondary-color: #50E3C2;
    --accent-color: #F5A623;
    --text-color: #333333;
    --light-text: #666666;
    --background-color: #FFFFFF;
    --nav-background: #ffffff;
    --footer-background: #f8f8f8;
    --section-spacing: 20px; /* Further reduced spacing between sections from 40px to 20px */
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    scroll-behavior: smooth; /* For smooth scrolling to sections */
}

body {
    font-family: 'Segoe UI', 'Arial', sans-serif;
    line-height: 1.8; /* Increased line height for better readability */
    color: var(--text-color);
    background-color: var(--background-color);
    font-size: 18px; /* Base font size increased */
}

/* Header and Navigation */
header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 30px 60px; /* Increased padding */
    background-color: var(--nav-background);
    box-shadow: 0 2px 10px rgba(0,0,0,0.05); /* Subtle shadow for depth */
    position: sticky; /* Make header sticky */
    top: 0;
    z-index: 1000;
}

.logo-container {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
}

.logo {
    font-size: 28px; /* Larger logo text */
    font-weight: 600;
    color: var(--primary-color);
    letter-spacing: 0.5px;
}

.motto {
    font-size: 16px;
    font-style: italic;
    color: var(--light-text);
    margin-top: 5px;
}

.motto::before {
    content: "— ";
}

.motto-emphasis {
    color: var(--primary-color);
    font-weight: bold;
    position: relative;
    padding-left: 10px;
}

.motto-emphasis::before {
    content: "";
    position: absolute;
    left: 0;
    top: 50%;
    height: 70%;
    width: 2px;
    background-color: var(--primary-color);
    transform: translateY(-50%);
}

.menu {
    display: flex;
    list-style: none;
    align-items: center;
}

.menu li {
    margin-left: 45px; /* Increased from 40px for more spacing between items */
}

.menu a {
    text-decoration: none;
    color: var(--text-color);
    font-weight: 600; /* Increased from 500 to make it bolder */
    font-size: 20px; /* Increased from 18px */
    transition: color 0.3s;
    position: relative;
    padding: 8px 0; /* Added vertical padding for larger click area */
    letter-spacing: 0.3px; /* Slightly more spacing between letters */
}

.menu a::after {
    content: '';
    position: absolute;
    width: 0;
    height: 2px;
    bottom: 0;
    left: 0;
    background-color: var(--primary-color);
    transition: width 0.3s;
}

.menu a:hover, .menu a.active {
    color: var(--primary-color);
}

.menu a:hover::after, .menu a.active::after {
    width: 100%;
}

/* Language Selector with Flag Emojis */
.language-selector {
    display: flex;
    align-items: center;
    margin-left: 20px;
}

.flag-icon {
    margin: 0 5px;
    cursor: pointer;
    display: inline-block;
    text-decoration: none;
    padding: 4px;
    border-radius: 4px;
    transition: all 0.3s ease;
    position: relative;
}

.flag-emoji {
    font-size: 2rem; /* Increased from 1.8rem */
    display: inline-block;
}

/* Simplified active flag style - just underline */
.flag-icon.active::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    width: 100%;
    height: 2px;
    background-color: var(--primary-color);
}

.flag-icon:hover .flag-emoji {
    transform: scale(1.2);
}

/* Main Content */
main {
    max-width: 1400px; /* Increased max width */
    margin: 0 auto;
    padding: 40px;
}

/* Simple scroll animation - MODIFIED to ensure sections are visible by default */
section {
    opacity: 1; 
    transition: opacity 0.8s ease, transform 0.8s ease;
    margin-bottom: var(--section-spacing);
    padding: 10px 0; /* Reduced padding from 20px to 10px */
}

section.visible {
    opacity: 1;
    transform: translateY(0);
}

/* Section Headings */
section h1 {
    color: var(--primary-color);
    font-size: 3rem; /* Much larger titles */
    margin-bottom: 30px; /* Reduced from 40px */
    position: relative;
    font-weight: 600;
    letter-spacing: 0.5px;
}

section h2 {
    color: var(--text-color);
    font-size: 2rem; /* Larger subtitles */
    margin: 40px 0 20px;
    font-weight: 600;
}

section p {
    margin-bottom: 25px;
    font-size: 19px; /* Larger paragraph text */
    max-width: 900px; /* Limit paragraph width for readability */
    line-height: 1.8;
}

section ul {
    padding-left: 30px;
    margin-bottom: 30px;
}

section li {
    margin-bottom: 15px;
    font-size: 19px; /* Larger list text */
}

/* Foundation details styling - improved professional look */
.foundation-details {
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
    padding-left: 0;
    list-style: none;
    margin-top: 30px;
}

.foundation-details li {
    background-color: white;
    padding: 0;
    margin-bottom: 0;
    flex: 1 0 300px;
    max-width: 400px;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    box-shadow: 0 4px 6px rgba(0,0,0,0.04);
    transition: all 0.25s ease;
    overflow: hidden;
}

.foundation-details li:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 12px rgba(0,0,0,0.08);
}

.foundation-details .item-content {
    padding: 16px 20px;
    display: flex;
    align-items: center;
    min-height: 72px;
}

.foundation-details .icon {
    margin-right: 15px;
    display: flex;
    justify-content: center;
    align-items: center;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background-color: #f0f0f0;
    color: var(--primary-color);
}

.foundation-details .text {
    flex: 1;
}

.foundation-details a {
    color: var(--text-color);
    text-decoration: none;
    font-weight: 500;
    display: block;
    height: 100%;
    width: 100%;
}

.foundation-details a:hover {
    color: var(--primary-color);
}

.foundation-details a .item-content {
    position: relative;
}

.foundation-details a .item-content:after {
    content: "→";
    position: absolute;
    right: 20px;
    opacity: 0;
    transform: translateX(-10px);
    transition: all 0.2s ease;
}

.foundation-details a:hover .item-content:after {
    opacity: 1;
    transform: translateX(0);
}

.foundation-details .label {
    display: block;
    font-size: 14px;
    color: var(--light-text);
    margin-bottom: 3px;
}

.foundation-details .value {
    font-weight: 600;
    font-size: 17px;
    word-break: break-word;
}

.foundation-details .document-link .icon {
    background-color: #feefef;
    color: #e63946;
}

.foundation-details .web-link .icon {
    background-color: #e6f3ff;
    color: #0077cc;
}

.foundation-details .info-item .icon {
    background-color: #f0f7ee;
    color: #2e7d32;
}

/* Donation details specific styling */
.donation-details {
    margin-bottom: 20px; /* Reduced from 40px */
    max-width: 800px;
    margin-left: auto;
    margin-right: auto;
    justify-content: center;
}

.donation-details .info-item .icon {
    background-color: #fff3ea;
    color: #ff8c38;
}

/* Make document links match other elements in the donation section */
.donation-details .document-link .icon {
    background-color: #fff3ea;
    color: #ff8c38;
}

.donation-details .document-link .item-content {
    background-color: #ffffff;
}

.donation-details li {
    border-color: #ffe0cc;
}

/* Contact details styling that matches foundation-details */
.contact-details {
    max-width: 800px;
    margin: 20px auto; /* Reduced from 40px auto */
    justify-content: center;
}

.contact-details .info-item .icon {
    background-color: #e6f3ff;
    color: #0077cc;
}

.contact-details address {
    font-style: normal;
    line-height: 1.4;
    margin: 0;
    padding: 0;
}

.contact-details .value {
    display: inline-block;
}

/* About section with image */
.about-flex-container {
    display: flex;
    flex-wrap: wrap;
    gap: 30px;
    align-items: center;
    margin-bottom: 20px;
}

.about-text {
    flex: 1;
    min-width: 300px;
}

.about-image {
    flex: 0 0 300px;
    display: flex;
    justify-content: center;
    align-items: center;
}

/* About section with image - new layout */
.who-we-are-container {
    display: block; /* Default to stacked layout for mobile */
    margin-bottom: 20px; /* Reduced from 30px */
}

.who-we-are-text {
    margin-bottom: 20px;
}

.about-image-container {
    text-align: center;
    margin: 20px 0; /* Standardize margin */
}

.feature-image {
    max-width: 100%;
    height: auto;
    border-radius: 10px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.feature-image:hover {
    transform: scale(1.02);
    box-shadow: 0 8px 20px rgba(0,0,0,0.15);
}

/* Project Cards */
.project {
    background-color: #f9f9f9;
    border-radius: 12px;
    padding: 40px;
    margin-bottom: 60px;
    box-shadow: 0 5px 20px rgba(0,0,0,0.05);
    transition: transform 0.3s ease;
}

.project:hover {
    transform: translateY(-5px);
}

.project h2 {
    color: var(--primary-color);
    margin-top: 0;
}

/* Project Gallery */
.project-gallery {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
    margin: 30px 0;
}

.gallery-item {
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    cursor: pointer;
}

.gallery-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 20px rgba(0,0,0,0.15);
}

.gallery-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.gallery-caption {
    padding: 12px;
    background-color: rgba(255,255,255,0.9);
    color: var(--text-color);
    font-size: 0.9rem;
    text-align: center;
}

/* Image Modal/Lightbox */
.modal {
    display: none;
    position: fixed;
    z-index: 2000;
    padding-top: 50px;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    overflow: auto;
    background-color: rgba(0, 0, 0, 0.9);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.modal.show {
    display: block;
    opacity: 1;
}

.modal-content {
    margin: auto;
    display: block;
    max-width: 90%;
    max-height: 90vh;
    opacity: 0;
    transform: scale(0.95);
    transition: all 0.3s ease;
}

.modal.show .modal-content {
    opacity: 1;
    transform: scale(1);
}

.modal-close {
    position: absolute;
    top: 20px;
    right: 35px;
    color: white;
    font-size: 50px;
    font-weight: bold;
    cursor: pointer;
    z-index: 2001;
    transition: color 0.2s ease;
}

.modal-close:hover {
    color: var(--primary-color);
}

#modalCaption {
    margin: 20px auto 0;
    display: block;
    width: 80%;
    max-width: 700px;
    text-align: center;
    color: white;
    font-size: 1.1rem;
}

/* Team Member Grid */
.team-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 60px; /* Increased gap */
    max-width: 1000px;
    margin: 30px auto; /* Reduced from 60px auto */
}

.team-member {
    text-align: center;
}

.member-photo {
    width: 240px; /* Larger photos */
    height: 240px;
    border-radius: 50%;
    border: 8px solid var(--primary-color);
    overflow: hidden;
    margin: 0 auto 30px;
    box-shadow: 0 10px 20px rgba(0,0,0,0.1);
    transition: transform 0.3s ease;
}

.member-photo:hover {
    transform: scale(1.05);
}

.member-photo img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.team-member h3 {
    margin-bottom: 10px;
    color: var(--primary-color);
    font-size: 1.5rem;
}

.team-member p {
    margin-top: 0;
    color: var(--light-text);
    font-style: italic;
    font-size: 1.1rem;
}

/* Contact Details */
.contact-details {
    display: flex;
    flex-wrap: wrap;
    gap: 40px;
    max-width: 800px;
    margin: 30px auto;
    justify-content: center;
}

.contact-info {
    min-width: 280px;
    padding: 20px 30px;
    background-color: #f9f9f9;
    border-radius: 10px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.05);
    text-align: center;
}

.contact-info h3 {
    color: var(--primary-color);
    margin-bottom: 15px;
    font-size: 1.4rem;
}

.contact-info address {
    font-style: normal;
    line-height: 1.6;
    font-size: 1.1rem;
}

.contact-info a {
    color: var(--primary-color);
    text-decoration: none;
    font-weight: 600;
    font-size: 1.1rem;
}

.contact-info a:hover {
    text-decoration: underline;
}

/* Remove previous complex animation classes if they exist */
.fade-in, .slide-in-left, .slide-in-right, .stagger,
.fade-in.appear, .slide-in-left.appear, .slide-in-right.appear, .stagger.appear,
.delay-1, .delay-2, .delay-3, .delay-4 {
    opacity: 1;
    transform: none;
    transition: none;
}

/* Disable animations for users who prefer reduced motion */
@media (prefers-reduced-motion: reduce) {
    section {
        transition: none;
        opacity: 1;
        transform: none;
    }
}

/* Footer */
footer {
    text-align: center;
    padding: 40px 20px;
    background-color: var(--footer-background);
    color: var(--light-text);
    font-size: 16px;
    border-top: 1px solid #eaeaea;
}

footer .credits {
    font-size: 14px;
    color: #999;
    margin-top: 10px;
}

footer .credits a {
    color: #999;
    text-decoration: none;
    border-bottom: 1px dotted #999;
}

footer .credits a:hover {
    color: var(--primary-color);
    border-color: var(--primary-color);
}

/* Responsive adjustments */
@media (max-width: 992px) {
    body {
        font-size: 17px;
    }
    
    main {
        padding: 30px; /* Reduced padding from 40px */
    }
    
    section h1 {
        font-size: 2.5rem;
    }
    
    section h2 {
        font-size: 1.8rem;
    }
    
    .project-gallery {
        grid-template-columns: 1fr;
    }
    
    .project {
        padding: 30px; /* Reduced padding from 40px */
    }
    
    .about-image {
        flex: 0 0 250px;
    }
}

@media (max-width: 768px) {
    header {
        flex-direction: column;
        padding: 10px; /* Reduced from 20px */
    }
    
    .logo-container {
        align-items: center;
        margin-bottom: 10px; /* Reduced from 20px */
        width: 100%; /* Ensure container takes full width */
        text-align: center; /* Center text content */
    }
    
    .logo {
        font-size: 22px; /* Reduced from 28px */
        margin-bottom: 2px; /* Reduced from 5px */
        text-align: center; /* Ensure logo text is centered */
    }
    
    .motto {
        font-size: 14px; /* Reduced from 16px */
        text-align: center; /* Ensure motto text is centered */
        width: 100%; /* Take full width to ensure proper centering */
    }
    
    main {
        padding: 20px; /* Further reduced padding */
    }
    
    .project {
        padding: 25px; /* Further reduced padding */
    }
    
    .foundation-details li {
        flex: 1 0 280px; /* Slightly smaller to fit better */
    }
    
    .team-grid {
        grid-template-columns: 1fr;
    }
    
    .member-photo {
        width: 200px;
        height: 200px;
    }
    
    section h1 {
        font-size: 2.2rem;
    }
    
    .about-flex-container {
        flex-direction: column;
        gap: 20px;
    }
    
    .about-image {
        order: 1; /* Explicitly place image after text */
        margin-top: 10px; /* Added top margin instead of bottom */
        margin-bottom: 0; /* Remove bottom margin */
        flex: 0 0 auto;
        width: 100%;
    }
    
    .about-image-container {
        margin: 20px 0;
    }
    
    .feature-image {
        max-width: 90%;
    }
    
    .language-selector {
        margin-left: 5px; /* Reduced from 10px */
    }
    
    .flag-icon {
        margin: 0 3px; /* Reduced side margins */
        padding: 3px; /* Smaller padding */
    }
    
    .flag-emoji {
        font-size: 1.4rem; /* Further reduced from 1.5rem */
    }
}

@media (min-width: 768px) {
    /* Side-by-side layout for larger screens */
    .who-we-are-container {
        display: flex;
        align-items: center;
        gap: 30px; /* Reduced from 40px */
    }
    
    .who-we-are-text {
        flex: 1;
        margin-bottom: 0;
    }
    
    .about-image-container {
        flex: 0 0 auto;
        width: 300px; /* Reduced from 400px to make image smaller */
        margin: 0; /* Remove margin when in side-by-side layout */
    }
    
    .feature-image {
        max-width: 100%; /* Use the container's width */
    }
}

@media (max-width: 480px) {
    main {
        padding: 15px 12px; /* Much smaller padding, especially on sides */
    }
    
    .project {
        padding: 20px 15px; /* Smaller padding, especially horizontally */
        border-radius: 8px; /* Smaller radius */
    }
    
    section p {
        margin-bottom: 20px; /* Reduce paragraph bottom margin */
    }
    
    .foundation-details {
        gap: 15px; /* Reduce gap between cards */
    }
    
    .foundation-details li {
        flex: 1 0 100%; /* Full width on very small screens */
        max-width: 100%; /* Remove max-width limit */
    }
    
    .foundation-details .item-content {
        padding: 12px 15px; /* Smaller padding in cards */
    }
    
    .menu {
        gap: 2px;
    }
    
    .menu li {
        margin: 2px;
    }
    
    .menu a {
        font-size: 14px;
        padding: 3px 0;
    }
    
    .language-selector {
        margin-left: 3px;
    }
    
    .flag-icon {
        margin: 0 2px;
        padding: 2px;
    }
    
    .flag-emoji {
        font-size: 1.2rem; /* Even smaller on very small screens */
    }
    
    .logo {
        font-size: 20px;
    }
    
    .motto {
        font-size: 13px;
    }
    
    .about-image-container {
        margin: 15px 0;
    }
    
    .feature-image {
        max-width: 100%;
    }
}
