/* ================================
   NGO Humanitarian Theme Styles
   ================================ */

/* CSS Variables for easy customization */
:root {
    --color-primary: #2563eb;
    --color-primary-dark: #1e40af;
    --color-secondary: #10b981;
    --color-accent: #f59e0b;
    --color-text: #1e40af;
    --color-text-light: #6b7280;
    --color-bg: #ffffff;
    --color-bg-light: #f9fafb;
    --color-border: #e5e7eb;
    --color-error: #ef4444;
    --color-success: #10b981;
    
    --font-sans: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    --font-serif: Georgia, Cambria, "Times New Roman", Times, serif;
    
    --container-width: 1200px;
    --border-radius: 8px;
    --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
}

/* Reset and Base Styles */
*, *::before, *::after {
    box-sizing: border-box;
}

* {
    margin: 0;
    padding: 0;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: var(--font-sans);
    font-size: 16px;
    line-height: 1.6;
    color: var(--color-text);
    background-color: var(--color-bg);
}

img {
    max-width: 100%;
    height: auto;
    display: block;
}

a {
    color: var(--color-primary);
    text-decoration: none;
    transition: color 0.2s;
}

a:hover {
    color: var(--color-primary-dark);
}

/* Typography */
h1, h2, h3, h4, h5, h6 {
    font-weight: 700;
    line-height: 1.2;
    margin-bottom: 0.5em;
    color: var(--color-text);
}

h1 { font-size: 2.5rem; }
h2 { font-size: 2rem; }
h3 { font-size: 1.5rem; }
h4 { font-size: 1.25rem; }
h5 { font-size: 1.125rem; }
h6 { font-size: 1rem; }

p {
    margin-bottom: 1rem;
}

/* Container */
.container {
    max-width: var(--container-width);
    margin: 0 auto;
    padding: 0 1.5rem;
}

/* Buttons */
.btn {
    display: inline-block;
    padding: 0.75rem 1.5rem;
    border: 2px solid transparent;
    border-radius: var(--border-radius);
    font-weight: 600;
    font-size: 1rem;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s;
    text-decoration: none;
}

.btn-primary {
    background-color: var(--color-primary);
    color: white;
    border-color: var(--color-primary);
}

.btn-primary:hover {
    background-color: var(--color-primary-dark);
    border-color: var(--color-primary-dark);
    color: white;
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

.btn-outline {
    background-color: transparent;
    color: var(--color-primary);
    border-color: var(--color-primary);
}

.btn-outline:hover {
    background-color: var(--color-primary);
    color: white;
}

.btn-large {
    padding: 1rem 2rem;
    font-size: 1.125rem;
}

.btn-small {
    padding: 0.5rem 1rem;
    font-size: 0.875rem;
}

.btn-block {
    display: block;
    width: 100%;
}

.btn-donate {
    background-color: var(--color-secondary);
    border-color: var(--color-secondary);
}

.btn-donate:hover {
    background-color: #059669;
    border-color: #059669;
}

/* Header */
.site-header {
    background-color: white;
    box-shadow: var(--shadow-sm);
    position: sticky;
    top: 0;
    z-index: 1000;
}

.header-content {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1rem 0;
    gap: 2rem;
}

.site-branding .logo img {
    height: 50px;
    width: auto;
}

.site-title h1 {
    font-size: 1.5rem;
    margin: 0;
    color: var(--color-primary);
}

.main-navigation {
    flex-grow: 1;
}

.nav-menu {
    display: flex;
    list-style: none;
    gap: 2rem;
    margin: 0;
}

.nav-link {
    font-weight: 500;
    color: var(--color-text);
    padding: 0.5rem 0;
    position: relative;
}

.nav-link:hover,
.nav-link.active {
    color: var(--color-primary);
}

.nav-link.active::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 2px;
    background-color: var(--color-primary);
}

.mobile-menu-toggle {
    display: none;
    background: none;
    border: none;
    cursor: pointer;
    padding: 0.5rem;
}

.hamburger {
    display: block;
    width: 25px;
    height: 2px;
    background-color: var(--color-text);
    position: relative;
}

.hamburger::before,
.hamburger::after {
    content: '';
    position: absolute;
    width: 25px;
    height: 2px;
    background-color: var(--color-text);
    transition: all 0.3s;
}

.hamburger::before {
    top: -8px;
}

.hamburger::after {
    top: 8px;
}

/* Hero Section */
.hero {
    position: relative;
    background-size: cover;
    background-position: center;
    background-color: var(--color-primary);
    color: white;
    padding: 8rem 0;
    text-align: center;
}

.hero-overlay {
    background: rgba(0, 0, 0, 0.4);
    padding: 4rem 0;
}

.hero-title {
    font-size: 3rem;
    margin-bottom: 1rem;
    color: white;
}

.hero-subtitle {
    font-size: 1.5rem;
    margin-bottom: 2rem;
    opacity: 0.95;
}

/* Impact Stats */
.impact-stats {
    background-color: var(--color-bg-light);
    padding: 4rem 0;
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 2rem;
    text-align: center;
}

.stat-number {
    font-size: 3rem;
    font-weight: 700;
    color: var(--color-primary);
    line-height: 1;
}

.stat-label {
    font-size: 1.125rem;
    color: var(--color-text-light);
    margin-top: 0.5rem;
}

/* Features Section */
.features {
    padding: 5rem 0;
}

.section-title {
    text-align: center;
    font-size: 2.5rem;
    margin-bottom: 3rem;
}

.features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 3rem;
}

.feature-card {
    text-align: center;
    padding: 2rem;
    border-radius: var(--border-radius);
    transition: transform 0.3s, box-shadow 0.3s;
}

.feature-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-lg);
}

.feature-icon {
    width: 60px;
    height: 60px;
    margin: 0 auto 1.5rem;
    color: var(--color-primary);
}

.feature-icon svg {
    width: 100%;
    height: 100%;
}

.feature-title {
    margin-bottom: 1rem;
}

.feature-description {
    color: var(--color-text-light);
    line-height: 1.7;
}

/* Section Header */
.section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 3rem;
}

/* Projects */
.recent-projects,
.projects-section {
    padding: 5rem 0;
    background-color: var(--color-bg-light);
}

.projects-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 2rem;
}

.project-card {
    background: white;
    border-radius: var(--border-radius);
    overflow: hidden;
    box-shadow: var(--shadow-md);
    transition: transform 0.3s, box-shadow 0.3s;
}

.project-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-lg);
}

.project-image {
    position: relative;
    overflow: hidden;
    aspect-ratio: 16/10;
}

.project-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s;
}

.project-card:hover .project-image img {
    transform: scale(1.05);
}

.project-status {
    position: absolute;
    top: 1rem;
    right: 1rem;
    padding: 0.25rem 0.75rem;
    background: white;
    border-radius: 20px;
    font-size: 0.875rem;
    font-weight: 600;
    text-transform: capitalize;
}

.status-active { color: var(--color-success); }
.status-completed { color: var(--color-primary); }
.status-planned { color: var(--color-accent); }

.project-content {
    padding: 1.5rem;
}

.project-location {
    color: var(--color-text-light);
    font-size: 0.875rem;
    margin-bottom: 0.5rem;
    display: flex;
    align-items: center;
    gap: 0.25rem;
}

.project-meta {
    margin-bottom: 1rem;
}

.project-title {
    margin-bottom: 1rem;
}

.project-title a {
    color: var(--color-text);
}

.project-title a:hover {
    color: var(--color-primary);
}

.project-excerpt {
    color: var(--color-text-light);
    margin-bottom: 1rem;
}

.project-progress {
    margin-top: 1.5rem;
}

.progress-bar {
    height: 8px;
    background-color: var(--color-border);
    border-radius: 10px;
    overflow: hidden;
    margin-bottom: 0.5rem;
}

.progress-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--color-secondary), var(--color-primary));
    transition: width 0.3s;
}

.progress-stats {
    display: flex;
    justify-content: space-between;
    font-size: 0.875rem;
}

.progress-stats .raised {
    font-weight: 600;
    color: var(--color-text);
}

.progress-stats .goal {
    color: var(--color-text-light);
}

.link-arrow {
    color: var(--color-primary);
    font-weight: 600;
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
}

.link-arrow::after {
    content: '→';
}

.link-arrow:hover {
    gap: 0.5rem;
}

/* Project Single */
.project-single,
.post-single {
    padding: 3rem 0;
}

.project-hero,
.post-hero {
    width: 100%;
    max-height: 500px;
    overflow: hidden;
    margin-bottom: 2rem;
}

.project-hero img,
.post-hero img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.project-main,
.post-main {
    max-width: 900px;
    margin: 0 auto;
}

.project-header,
.post-header {
    margin-bottom: 2rem;
}

.project-meta,
.post-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    margin-bottom: 1rem;
    color: var(--color-text-light);
    font-size: 0.875rem;
}

.meta-item {
    display: flex;
    align-items: center;
    gap: 0.25rem;
}

.icon-small {
    width: 18px;
    height: 18px;
}

.project-body {
    display: grid;
    grid-template-columns: 1fr 350px;
    gap: 3rem;
}

.project-content,
.post-content {
    line-height: 1.8;
}

.project-content h2,
.post-content h2 {
    margin-top: 2rem;
    margin-bottom: 1rem;
}

.project-content p,
.post-content p {
    margin-bottom: 1.5rem;
}

.project-content ul,
.post-content ul {
    margin-bottom: 1.5rem;
    padding-left: 1.5rem;
}

.project-sidebar {
    position: sticky;
    top: 100px;
    height: fit-content;
}

.sidebar-widget {
    background: var(--color-bg-light);
    padding: 1.5rem;
    border-radius: var(--border-radius);
    margin-bottom: 2rem;
}

.sidebar-widget h3 {
    margin-bottom: 1rem;
    font-size: 1.25rem;
}

.widget-funding {
    text-align: center;
}

.funding-amount {
    margin-bottom: 1rem;
}

.amount-raised {
    font-size: 2rem;
    font-weight: 700;
    color: var(--color-primary);
}

.amount-label {
    font-size: 0.875rem;
    color: var(--color-text-light);
}

.impact-list,
.partners-list {
    list-style: none;
    padding: 0;
}

.impact-list li,
.partners-list li {
    padding: 0.5rem 0;
    border-bottom: 1px solid var(--color-border);
}

.impact-list li:last-child,
.partners-list li:last-child {
    border-bottom: none;
}

.share-buttons {
    display: flex;
    gap: 0.75rem;
}

.share-btn {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.75rem;
    background: white;
    border-radius: var(--border-radius);
    color: var(--color-text);
    font-size: 0.875rem;
    transition: all 0.3s;
}

.share-btn:hover {
    background: var(--color-primary);
    color: white;
    transform: translateY(-2px);
}

.share-btn svg {
    width: 20px;
    height: 20px;
}

/* Gallery */
.project-gallery {
    margin-top: 3rem;
}

.gallery-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 1rem;
    margin-top: 1.5rem;
}

.gallery-item {
    aspect-ratio: 1;
    overflow: hidden;
    border-radius: var(--border-radius);
}

.gallery-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s;
}

.gallery-item:hover img {
    transform: scale(1.1);
}

/* News/Blog */
.recent-news {
    padding: 5rem 0;
}

.news-grid,
.posts-list {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 2rem;
}

.news-card,
.post-card {
    background: white;
    border-radius: var(--border-radius);
    overflow: hidden;
    box-shadow: var(--shadow-md);
    transition: transform 0.3s, box-shadow 0.3s;
}

.news-card:hover,
.post-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-lg);
}

.news-image,
.post-image {
    aspect-ratio: 16/9;
    overflow: hidden;
}

.news-image img,
.post-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s;
}

.news-card:hover .news-image img,
.post-card:hover .post-image img {
    transform: scale(1.05);
}

.news-content,
.post-content {
    padding: 1.5rem;
}

.news-date,
.post-category {
    font-size: 0.875rem;
    color: var(--color-text-light);
    display: block;
    margin-bottom: 0.75rem;
}

.post-category {
    background: var(--color-primary);
    color: white;
    padding: 0.25rem 0.75rem;
    border-radius: 20px;
    display: inline-block;
}

.news-title,
.post-title {
    margin-bottom: 1rem;
}

.news-title a,
.post-title a {
    color: var(--color-text);
}

.news-title a:hover,
.post-title a:hover {
    color: var(--color-primary);
}

.news-excerpt,
.post-excerpt {
    color: var(--color-text-light);
    line-height: 1.7;
}

/* Post Single */
.post-author {
    font-weight: 600;
}

.post-footer {
    margin-top: 3rem;
    padding-top: 2rem;
    border-top: 1px solid var(--color-border);
}

.post-tags {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.5rem;
}

.tag {
    background: var(--color-bg-light);
    padding: 0.25rem 0.75rem;
    border-radius: 20px;
    font-size: 0.875rem;
    color: var(--color-text);
}

.tag:hover {
    background: var(--color-primary);
    color: white;
}

.post-share {
    margin-top: 3rem;
    padding: 2rem;
    background: var(--color-bg-light);
    border-radius: var(--border-radius);
}

.post-share h3 {
    margin-bottom: 1rem;
}

/* Team */
.team-section {
    padding: 5rem 0;
}

.team-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 2rem;
}

.team-member {
    background: white;
    border-radius: var(--border-radius);
    overflow: hidden;
    box-shadow: var(--shadow-md);
    text-align: center;
    transition: transform 0.3s, box-shadow 0.3s;
}

.team-member:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-lg);
}

.member-image {
    aspect-ratio: 1;
    overflow: hidden;
}

.member-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.member-placeholder {
    background: linear-gradient(135deg, var(--color-primary), var(--color-secondary));
    display: flex;
    align-items: center;
    justify-content: center;
}

.placeholder-initials {
    font-size: 4rem;
    font-weight: 700;
    color: white;
    text-transform: uppercase;
}

.member-info {
    padding: 1.5rem;
}

.member-name {
    margin-bottom: 0.5rem;
}

.member-position {
    color: var(--color-primary);
    font-weight: 600;
    margin-bottom: 1rem;
}

.member-bio {
    color: var(--color-text-light);
    font-size: 0.875rem;
    line-height: 1.6;
}

.member-social {
    display: flex;
    justify-content: center;
    gap: 1rem;
    margin-top: 1rem;
}

.member-social a {
    color: var(--color-text-light);
    transition: color 0.3s;
}

.member-social a:hover {
    color: var(--color-primary);
}

/* About Page */
.about-page {
    padding: 3rem 0;
}

.mission-section {
    background: var(--color-primary);
    color: white;
    padding: 5rem 0;
    text-align: center;
    margin: 3rem 0;
}

.mission-content h2 {
    color: white;
    margin-bottom: 1.5rem;
}

.mission-text {
    font-size: 1.25rem;
    line-height: 1.8;
    max-width: 800px;
    margin: 0 auto;
}

.values-section {
    padding: 5rem 0;
}

.values-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 2rem;
}

.value-card {
    padding: 2rem;
    background: var(--color-bg-light);
    border-radius: var(--border-radius);
    border-left: 4px solid var(--color-primary);
}

.value-card h3 {
    color: var(--color-primary);
    margin-bottom: 1rem;
}

/* Contact Page */
.contact-section {
    padding: 5rem 0;
}

.contact-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
}

.contact-info h2,
.contact-form-wrapper h2 {
    margin-bottom: 1.5rem;
}

.contact-intro {
    margin-bottom: 2rem;
    color: var(--color-text-light);
}

.contact-details {
    margin-top: 2rem;
}

.contact-item {
    display: flex;
    gap: 1rem;
    margin-bottom: 2rem;
}

.contact-item .icon {
    width: 40px;
    height: 40px;
    flex-shrink: 0;
    color: var(--color-primary);
}

.contact-item strong {
    display: block;
    margin-bottom: 0.25rem;
}

.contact-item p {
    margin: 0;
    color: var(--color-text-light);
}

/* Forms */
.contact-form .form-group {
    margin-bottom: 1.5rem;
}

.contact-form label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 600;
}

.contact-form input,
.contact-form textarea {
    width: 100%;
    padding: 0.75rem;
    border: 1px solid var(--color-border);
    border-radius: var(--border-radius);
    font-family: inherit;
    font-size: 1rem;
    transition: border-color 0.3s;
}

.contact-form input:focus,
.contact-form textarea:focus {
    outline: none;
    border-color: var(--color-primary);
}

.contact-form textarea {
    resize: vertical;
}

/* CTA Section */
.cta-section {
    background: linear-gradient(135deg, var(--color-primary), var(--color-secondary));
    color: white;
    padding: 5rem 0;
    text-align: center;
}

.cta-content h2 {
    color: white;
    font-size: 2.5rem;
    margin-bottom: 1rem;
}

.cta-content p {
    font-size: 1.25rem;
    margin-bottom: 2rem;
    opacity: 0.95;
}

.cta-actions {
    display: flex;
    gap: 1rem;
    justify-content: center;
    flex-wrap: wrap;
}

/* Page Header */
.page-header {
    background: var(--color-bg-light);
    padding: 3rem 0;
    text-align: center;
}

.page-intro {
    max-width: 700px;
    margin: 1.5rem auto 0;
    color: var(--color-text-light);
    font-size: 1.125rem;
}

/* Footer */
.site-footer {
    background-color: var(--color-text);
    color: white;
    padding: 4rem 0 2rem;
}

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

.footer-section h3 {
    color: white;
    margin-bottom: 1.5rem;
}

.footer-section p,
.footer-section a {
    color: rgba(255, 255, 255, 0.8);
}

.footer-section a:hover {
    color: white;
}

.footer-links ul,
.footer-nav ul {
    list-style: none;
}

.footer-links li {
    margin-bottom: 0.75rem;
}

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

.social-links a {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 50%;
    transition: background 0.3s;
}

.social-links a:hover {
    background: var(--color-primary);
}

.social-links .icon {
    width: 20px;
    height: 20px;
}

.footer-bottom {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-top: 2rem;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    flex-wrap: wrap;
    gap: 1rem;
}

.footer-bottom p {
    margin: 0;
}

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

/* Pagination */
.pagination {
    display: flex;
    justify-content: center;
    gap: 1rem;
    margin-top: 3rem;
}

.pagination-prev,
.pagination-next {
    padding: 0.75rem 1.5rem;
    background: white;
    border: 1px solid var(--color-border);
    border-radius: var(--border-radius);
    font-weight: 600;
    transition: all 0.3s;
}

.pagination-prev:hover,
.pagination-next:hover {
    background: var(--color-primary);
    border-color: var(--color-primary);
    color: white;
}

/* Responsive Design */
@media (max-width: 768px) {
    .header-content {
        flex-wrap: wrap;
    }
    
    .mobile-menu-toggle {
        display: block;
    }
    
    .main-navigation {
        display: none;
        width: 100%;
        order: 3;
    }
    
    .main-navigation.active {
        display: block;
    }
    
    .nav-menu {
        flex-direction: column;
        gap: 0;
    }
    
    .nav-link {
        display: block;
        padding: 1rem 0;
        border-bottom: 1px solid var(--color-border);
    }
    
    .hero-title {
        font-size: 2rem;
    }
    
    .hero-subtitle {
        font-size: 1.125rem;
    }
    
    .section-title {
        font-size: 2rem;
    }
    
    .section-header {
        flex-direction: column;
        text-align: center;
        gap: 1rem;
    }
    
    .projects-grid,
    .news-grid,
    .posts-list {
        grid-template-columns: 1fr;
    }
    
    .project-body {
        grid-template-columns: 1fr;
    }
    
    .project-sidebar {
        position: static;
    }
    
    .contact-grid {
        grid-template-columns: 1fr;
        gap: 3rem;
    }
    
    .footer-content {
        grid-template-columns: 1fr;
        gap: 2rem;
    }
    
    .footer-bottom {
        flex-direction: column;
        text-align: center;
    }
    
    .footer-nav ul {
        flex-direction: column;
        gap: 0.5rem;
    }
    
    .cta-actions {
        flex-direction: column;
    }
    
    .cta-actions .btn {
        width: 100%;
    }
}

@media (max-width: 480px) {
    h1 { font-size: 2rem; }
    h2 { font-size: 1.75rem; }
    h3 { font-size: 1.25rem; }
    
    .hero {
        padding: 4rem 0;
    }
    
    .hero-title {
        font-size: 1.75rem;
    }
    
    .features-grid,
    .team-grid,
    .values-grid {
        grid-template-columns: 1fr;
    }
}

/* Accessibility */
.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border-width: 0;
}

:focus-visible {
    outline: 2px solid var(--color-primary);
    outline-offset: 2px;
}

/* Print Styles */
@media print {
    .site-header,
    .site-footer,
    .mobile-menu-toggle,
    .btn,
    .share-buttons {
        display: none;
    }
}
