/*
Theme Name: NCEI Theme
Theme URI: https://nceiafrica.org
Author: NCEI Team
Author URI: https://nceiafrica.org
Description: Custom WordPress theme for Nsangi Community Empowerment Initiative
Version: 1.0.0
License: GPL v2 or later
Text Domain: ncei
*/

/*/* =============================================
   TABLE OF CONTENTS
   =============================================
   1. Custom Properties
   2. Reset & Base Styles
   3. Typography
   4. Navigation
   5. Hero Sections
   6. Components
   7. Page Templates
   8. Team Styles
   9. Contact Styles
   10. Gallery Styles
   11. Donation Styles
   12. Programs Styles
   13. Responsive Design
   14. Animations
   15. Utilities
   16. Accessibility
   17. Print Styles
   ============================================= */

/* 1. Custom Properties */

/* Ultra-Fast Loader Styles */
.page-loader {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: #ffffff;
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 1;
    transition: opacity 0.3s ease, transform 0.3s ease;
    will-change: opacity, transform;
}

.loader-content {
    text-align: center;
    padding: 2rem;
}

.loader-logo {
    margin-bottom: 2rem;
}

.loader-logo-img {
    max-width: 80px;
    height: auto;
    animation: gentlePulse 1.5s ease-in-out infinite;
}

.loader-progress {
    width: 120px;
    height: 4px;
    background: #e9ecef;
    border-radius: 2px;
    overflow: hidden;
    margin: 0 auto;
}

.progress-bar {
    height: 100%;
    background: var(--primary-color, #0d6efd);
    width: 0%;
    transition: width 0.3s ease;
    border-radius: 2px;
}

@keyframes gentlePulse {
    0%, 100% {
        opacity: 1;
        transform: scale(1);
    }
    50% {
        opacity: 0.9;
        transform: scale(1.02);
    }
}

/* Performance Optimizations */
img[loading="lazy"] {
    opacity: 0;
    transition: opacity 0.3s ease;
}

img.loaded {
    opacity: 1;
}

/* Content Loaded State */
.content-loaded {
    animation: contentFadeIn 0.5s ease forwards;
    opacity: 0;
}

@keyframes contentFadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Optimize animations */
.counter-number, .progress-fill, .goal-progress-bar {
    transition: all 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Critical CSS for immediate display */
.hero-slide, .cta-button, .section-title {
    will-change: transform, opacity;
}

/* Disable animations for users who prefer reduced motion */
@media (prefers-reduced-motion: reduce) {
    .page-loader,
    .loader-logo-img,
    .content-loaded,
    .counter-number,
    .progress-fill,
    .goal-progress-bar {
        animation: none !important;
        transition: none !important;
    }
}


:root {
    /* Colors */
    --primary-color: #0066cc;
    --secondary-color: #00a859;
    --accent-color: #ff6b35;
    --dark-color: #1a365d;
    --light-color: #f8f9fa;
    --text-color: #333333;
    --text-light: #666666;
    --border-color: #e9ecef;
    --success-color: #28a745;
    --warning-color: #ffc107;
    --danger-color: #dc3545;
    --info-color: #17a2b8;
    
    /* Gradients */
    --gradient-primary: linear-gradient(135deg, #0066cc 0%, #00a859 100%);
    --gradient-secondary: linear-gradient(135deg, #ff6b35 0%, #ffa500 100%);
    --gradient-dark: linear-gradient(135deg, #1a365d 0%, #2d3748 100%);
    
    /* Shadows */
    --shadow-light: 0 5px 15px rgba(0, 0, 0, 0.05);
    --shadow-medium: 0 10px 30px rgba(0, 0, 0, 0.1);
    --shadow-dark: 0 15px 40px rgba(0, 0, 0, 0.15);
    --shadow-card: 0 2px 10px rgba(0, 0, 0, 0.08);
    
    /* Border Radius */
    --radius-sm: 4px;
    --radius-md: 8px;
    --radius-lg: 12px;
    --radius-xl: 16px;
    --radius-circle: 50%;
    
    /* Spacing */
    --space-xs: 0.25rem;
    --space-sm: 0.5rem;
    --space-md: 1rem;
    --space-lg: 1.5rem;
    --space-xl: 2rem;
    --space-xxl: 3rem;
    
    /* Transitions */
    --transition-fast: 0.2s ease;
    --transition-normal: 0.3s ease;
    --transition-slow: 0.5s ease;
    
    /* Z-index */
    --z-dropdown: 1000;
    --z-sticky: 1020;
    --z-fixed: 1030;
    --z-modal-backdrop: 1040;
    --z-modal: 1050;
    --z-popover: 1060;
    --z-tooltip: 1070;
}

/* 2. Reset & Base Styles */
*,
*::before,
*::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
    scroll-padding-top: 100px;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, sans-serif;
    font-size: 16px;
    line-height: 1.6;
    color: var(--text-color);
    background-color: #ffffff;
    overflow-x: hidden;
    padding-top: 76px; /* For fixed navbar */
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 var(--space-md);
}

section {
    padding: var(--space-xxl) 0;
}

img {
    max-width: 100%;
    height: auto;
    display: block;
}

a {
    color: var(--primary-color);
    text-decoration: none;
    transition: color var(--transition-fast);
}

a:hover {
    color: var(--secondary-color);
}

ul, ol {
    list-style-position: inside;
}

/* 3. Typography */
h1, h2, h3, h4, h5, h6 {
    font-family: 'Poppins', sans-serif;
    font-weight: 600;
    line-height: 1.2;
    margin-bottom: var(--space-md);
    color: #ffffff;
}

.display-1, .display-2, .display-3, .display-4 {
    font-family: 'Montserrat', sans-serif;
    font-weight: 700;
}

h1 {
    font-size: 2.5rem;
}

h2 {
    font-size: 2rem;
}

h3 {
    font-size: 1.5rem;
}

h4 {
    font-size: 1.25rem;
}

h5 {
    font-size: 1rem;
}

p {
    margin-bottom: var(--space-md);
}

.lead {
    font-size: 1.125rem;
    font-weight: 400;
    color: var(--text-light);
}

.text-primary { color: var(--primary-color) !important; }
.text-secondary { color: var(--secondary-color) !important; }
.text-accent { color: var(--accent-color) !important; }
.text-dark { color: var(--dark-color) !important; }
.text-light { color: var(--light-color) !important; }
.text-muted { color: var(--text-light) !important; }

/* 4. Navigation */
.navbar {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    box-shadow: var(--shadow-light);
    transition: all var(--transition-normal);
    padding: 1rem 0;
}

.navbar-scrolled {
    background: rgba(255, 255, 255, 0.98);
    box-shadow: var(--shadow-medium);
}

.navbar-brand img {
    height: 60px;
}

.nav-link {
    font-weight: 500;
    padding: 0.5rem 1rem !important;
    position: relative;
    color: var(--dark-color) !important;
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 0;
    height: 2px;
    background: var(--accent-color);
    transition: width var(--transition-normal);
}

.nav-link:hover::after,
.nav-link.active::after {
    width: 70%;
}

.dropdown-menu {
    border: none;
    box-shadow: var(--shadow-medium);
    animation: fadeIn 0.3s ease;
    border-radius: var(--radius-md);
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(-10px); }
    to { opacity: 1; transform: translateY(0); }
}

/* 5. Hero Sections - FIXED */
.page-header {
    background: var(--gradient-dark);
    color: white;
    padding: 6rem 0 4rem;
    position: relative;
    overflow: hidden;
    min-height: 300px;
    display: flex;
    align-items: center;
}

.page-header::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url('../img/pattern.svg') repeat;
    opacity: 0.1;
}

.page-header .container {
    position: relative;
    z-index: 2;
    width: 100%;
}

.page-header h1 {
    color: white;
    font-size: 3rem;
    margin-bottom: var(--space-md);
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.3);
}

.page-header .lead {
    color: rgba(255, 255, 255, 0.9);
    font-size: 1.25rem;
    max-width: 800px;
    margin: 0 auto;
}

.hero-slide {
    height: 90vh;
    min-height: 600px;
    position: relative;
}

.hero-overlay {
    background: linear-gradient(rgba(0, 0, 0, 0.3), rgba(0, 102, 204, 0.4));
}

.hero-content {
    position: relative;
    z-index: 2;
}

/* 6. Components */
.section-title {
    position: relative;
    margin-bottom: var(--space-xxl);
    text-align: center;
}

.section-title::after {
    content: '';
    position: absolute;
    bottom: -10px;
    left: 50%;
    transform: translateX(-50%);
    width: 60px;
    height: 3px;
    background: var(--accent-color);
}

.card {
    border: none;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-card);
    transition: transform var(--transition-normal), box-shadow var(--transition-normal);
    overflow: hidden;
}

.card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-medium);
}

.btn {
    font-weight: 600;
    padding: 0.75rem 1.5rem;
    border-radius: var(--radius-md);
    transition: all var(--transition-normal);
    border: none;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
}

.btn-primary {
    background: var(--gradient-primary);
    color: white;
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 20px rgba(0, 102, 204, 0.3);
    color: white;
}

.btn-secondary {
    background: var(--gradient-secondary);
    color: white;
}

.btn-outline-primary {
    border: 2px solid var(--primary-color);
    color: var(--primary-color);
    background: transparent;
}

.btn-outline-primary:hover {
    background: var(--primary-color);
    color: white;
}

.cta-button {
    background: var(--gradient-primary);
    color: white;
    padding: 1rem 2rem;
    border-radius: 50px;
    font-weight: 600;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    transition: all var(--transition-normal);
}

.cta-button:hover {
    transform: translateY(-3px);
    box-shadow: 0 10px 20px rgba(0, 102, 204, 0.3);
    color: white;
}

.cta-button-secondary {
    background: var(--gradient-secondary);
}

/* 7. Page Templates Common Styles */
.breadcrumb {
    background: transparent;
    padding: 0;
    margin-bottom: var(--space-xl);
}

.breadcrumb-item a {
    color: var(--text-light);
}

.breadcrumb-item.active {
    color: var(--primary-color);
}

.page-content {
    padding: var(--space-xl) 0;
}

/* 8. Team Page Styles */
.team-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: var(--space-xl);
    margin: var(--space-xl) 0;
}

.team-member {
    text-align: center;
    background: white;
    border-radius: var(--radius-lg);
    padding: var(--space-xl);
    box-shadow: var(--shadow-card);
    transition: all var(--transition-normal);
    height: 100%;
}

.team-member:hover {
    transform: translateY(-10px);
    box-shadow: var(--shadow-medium);
}

.team-img {
    width: 180px;
    height: 180px;
    border-radius: var(--radius-circle);
    object-fit: cover;
    margin: 0 auto var(--space-lg);
    border: 5px solid var(--primary-color);
}

.team-role {
    color: var(--secondary-color);
    font-weight: 500;
    margin-bottom: var(--space-sm);
}

.team-bio {
    color: var(--text-light);
    margin-bottom: var(--space-lg);
}

.team-social {
    display: flex;
    justify-content: center;
    gap: var(--space-sm);
    margin-top: var(--space-lg);
}

.team-social a {
    width: 40px;
    height: 40px;
    border-radius: var(--radius-circle);
    background: var(--light-color);
    color: var(--dark-color);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all var(--transition-fast);
}

.team-social a:hover {
    background: var(--primary-color);
    color: white;
    transform: translateY(-2px);
}

.team-categories {
    display: flex;
    flex-wrap: wrap;
    gap: var(--space-sm);
    margin: var(--space-xl) 0;
    justify-content: center;
}

.team-category {
    padding: 0.5rem 1.5rem;
    background: var(--light-color);
    color: var(--dark-color);
    border-radius: 50px;
    font-weight: 500;
    transition: all var(--transition-fast);
    cursor: pointer;
}

.team-category:hover,
.team-category.active {
    background: var(--primary-color);
    color: white;
}

.team-modal .modal-content {
    border-radius: var(--radius-lg);
    border: none;
    overflow: hidden;
}

.team-modal-img {
    width: 200px;
    height: 200px;
    border-radius: var(--radius-circle);
    object-fit: cover;
    margin: 0 auto;
    border: 5px solid var(--primary-color);
}

/* 9. Contact Page Styles */
.contact-info-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: var(--space-lg);
    margin: var(--space-xl) 0;
}

.contact-info-card {
    background: white;
    padding: var(--space-lg);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-card);
    text-align: center;
    transition: transform var(--transition-normal);
}

.contact-info-card:hover {
    transform: translateY(-5px);
}

.contact-icon {
    width: 60px;
    height: 60px;
    background: var(--gradient-primary);
    border-radius: var(--radius-circle);
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto var(--space-md);
    color: white;
    font-size: 1.5rem;
}

.contact-form {
    background: white;
    padding: var(--space-xl);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-card);
}

.form-control,
.form-select {
    border: 2px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: 0.75rem 1rem;
    transition: all var(--transition-fast);
}

.form-control:focus,
.form-select:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 0.25rem rgba(0, 102, 204, 0.25);
}

.contact-map {
    border-radius: var(--radius-lg);
    overflow: hidden;
    box-shadow: var(--shadow-card);
    height: 400px;
}

.contact-map iframe {
    width: 100%;
    height: 100%;
    border: none;
}

.department-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: var(--space-lg);
}

.department-card {
    background: white;
    padding: var(--space-lg);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-card);
    transition: transform var(--transition-normal);
}

.department-card:hover {
    transform: translateY(-5px);
}

.department-head {
    display: flex;
    align-items: center;
    gap: var(--space-md);
    margin-bottom: var(--space-lg);
}

.department-avatar {
    width: 60px;
    height: 60px;
    border-radius: var(--radius-circle);
    object-fit: cover;
}

/* 10. Gallery Page Styles */
.gallery-filter {
    display: flex;
    flex-wrap: wrap;
    gap: var(--space-sm);
    margin: var(--space-xl) 0;
    justify-content: center;
}

.gallery-filter-btn {
    padding: 0.5rem 1.5rem;
    background: var(--light-color);
    color: var(--dark-color);
    border-radius: 50px;
    font-weight: 500;
    border: none;
    transition: all var(--transition-fast);
    cursor: pointer;
}

.gallery-filter-btn:hover,
.gallery-filter-btn.active {
    background: var(--primary-color);
    color: white;
}

.gallery-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: var(--space-lg);
    margin: var(--space-xl) 0;
}

.gallery-item {
    position: relative;
    border-radius: var(--radius-lg);
    overflow: hidden;
    cursor: pointer;
    aspect-ratio: 1;
}

.gallery-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform var(--transition-slow);
}

.gallery-item:hover .gallery-img {
    transform: scale(1.1);
}

.gallery-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(to bottom, transparent 50%, rgba(0, 0, 0, 0.8) 100%);
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    padding: var(--space-lg);
    color: white;
    opacity: 0;
    transition: opacity var(--transition-normal);
}

.gallery-item:hover .gallery-overlay {
    opacity: 1;
}

.gallery-category {
    display: inline-block;
    background: var(--primary-color);
    color: white;
    padding: 0.25rem 0.75rem;
    border-radius: 50px;
    font-size: 0.875rem;
    margin-bottom: var(--space-sm);
}

.gallery-modal .modal-content {
    background: transparent;
    border: none;
}

.gallery-modal-img {
    width: 100%;
    max-height: 80vh;
    object-fit: contain;
}

.gallery-nav-btn {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(255, 255, 255, 0.2);
    color: white;
    border: none;
    width: 50px;
    height: 50px;
    border-radius: var(--radius-circle);
    display: flex;
    align-items: center;
    justify-content: center;
    backdrop-filter: blur(10px);
    transition: all var(--transition-fast);
    z-index: 1;
}

.gallery-nav-btn:hover {
    background: rgba(255, 255, 255, 0.3);
    transform: translateY(-50%) scale(1.1);
}

.gallery-nav-prev {
    left: 20px;
}

.gallery-nav-next {
    right: 20px;
}

/* 11. Donation Page Styles */
.donation-options {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: var(--space-lg);
    margin: var(--space-xl) 0;
}

.donation-option {
    background: white;
    padding: var(--space-lg);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-card);
    text-align: center;
    transition: all var(--transition-normal);
    cursor: pointer;
    border: 2px solid transparent;
}

.donation-option:hover,
.donation-option.selected {
    border-color: var(--primary-color);
    transform: translateY(-5px);
}

.donation-icon {
    width: 70px;
    height: 70px;
    background: var(--gradient-primary);
    border-radius: var(--radius-circle);
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto var(--space-md);
    color: white;
    font-size: 1.75rem;
}

.donation-amount-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(100px, 1fr));
    gap: var(--space-md);
    margin: var(--space-lg) 0;
}

.donation-amount {
    padding: var(--space-md);
    background: var(--light-color);
    border-radius: var(--radius-md);
    text-align: center;
    font-weight: 600;
    cursor: pointer;
    transition: all var(--transition-fast);
    border: 2px solid transparent;
}

.donation-amount:hover,
.donation-amount.selected {
    background: var(--primary-color);
    color: white;
    border-color: var(--primary-color);
}

.donation-progress {
    background: var(--light-color);
    border-radius: var(--radius-md);
    overflow: hidden;
    margin: var(--space-lg) 0;
}

.donation-progress-bar {
    height: 10px;
    background: var(--gradient-primary);
    border-radius: var(--radius-md);
    transition: width var(--transition-slow);
}

.donation-stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: var(--space-lg);
    margin: var(--space-xl) 0;
}

.donation-stat {
    text-align: center;
}

.donation-stat-number {
    font-size: 2rem;
    font-weight: 700;
    color: var(--primary-color);
    margin-bottom: var(--space-xs);
}

.donation-payment-methods {
    display: flex;
    flex-wrap: wrap;
    gap: var(--space-md);
    margin: var(--space-lg) 0;
}

.payment-method {
    flex: 1;
    min-width: 120px;
    padding: var(--space-md);
    background: var(--light-color);
    border-radius: var(--radius-md);
    text-align: center;
    cursor: pointer;
    transition: all var(--transition-fast);
    border: 2px solid transparent;
}

.payment-method:hover,
.payment-method.selected {
    border-color: var(--primary-color);
    background: white;
}

.payment-method img {
    height: 30px;
    margin: 0 auto var(--space-sm);
}

/* 12. Programs Page Styles */
.programs-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: var(--space-xl);
    margin: var(--space-xl) 0;
}

.program-card {
    background: white;
    border-radius: var(--radius-lg);
    overflow: hidden;
    box-shadow: var(--shadow-card);
    transition: all var(--transition-normal);
    height: 100%;
}

.program-card:hover {
    transform: translateY(-10px);
    box-shadow: var(--shadow-medium);
}

.program-header {
    position: relative;
    overflow: hidden;
}

.program-img {
    width: 100%;
    height: 250px;
    object-fit: cover;
    transition: transform var(--transition-slow);
}

.program-card:hover .program-img {
    transform: scale(1.05);
}

.program-icon {
    position: absolute;
    top: 20px;
    right: 20px;
    width: 60px;
    height: 60px;
    background: var(--gradient-primary);
    border-radius: var(--radius-lg);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 1.5rem;
}

.program-body {
    padding: var(--space-lg);
}

.program-stats {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: var(--space-md);
    margin: var(--space-lg) 0;
    text-align: center;
}

.program-stat {
    padding: var(--space-md);
    background: var(--light-color);
    border-radius: var(--radius-md);
}

.program-stat-number {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--primary-color);
    margin-bottom: var(--space-xs);
}

.program-progress {
    margin: var(--space-lg) 0;
}

.program-progress-bar {
    height: 6px;
    background: var(--light-color);
    border-radius: var(--radius-md);
    overflow: hidden;
}

.program-progress-fill {
    height: 100%;
    background: var(--gradient-primary);
    border-radius: var(--radius-md);
    transition: width var(--transition-slow);
}

.program-details {
    background: var(--light-color);
    border-radius: var(--radius-lg);
    padding: var(--space-xl);
    margin: var(--space-xxl) 0;
}

.details-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: var(--space-lg);
    margin: var(--space-lg) 0;
}

.detail-item {
    display: flex;
    align-items: flex-start;
    gap: var(--space-md);
}

.detail-icon {
    width: 40px;
    height: 40px;
    background: var(--primary-color);
    color: white;
    border-radius: var(--radius-circle);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.testimonial-slider {
    margin: var(--space-xxl) 0;
}

.testimonial-slide {
    background: white;
    padding: var(--space-xl);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-card);
    text-align: center;
}

.testimonial-avatar {
    width: 80px;
    height: 80px;
    border-radius: var(--radius-circle);
    object-fit: cover;
    margin: 0 auto var(--space-md);
    border: 3px solid var(--primary-color);
}

/* 13. Responsive Design */
@media (max-width: 1200px) {
    .container {
        max-width: 960px;
    }
}

@media (max-width: 992px) {
    .container {
        max-width: 720px;
    }
    
    h1 { font-size: 2rem; }
    h2 { font-size: 1.75rem; }
    h3 { font-size: 1.5rem; }
    
    section {
        padding: var(--space-xl) 0;
    }
    
    .team-grid,
    .gallery-grid,
    .programs-grid {
        grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    }
    
    .page-header h1 {
        font-size: 2.5rem;
    }
}

@media (max-width: 768px) {
    .container {
        max-width: 540px;
    }
    
    body {
        padding-top: 56px;
    }
    
    h1 { font-size: 1.75rem; }
    h2 { font-size: 1.5rem; }
    h3 { font-size: 1.25rem; }
    
    .hero-slide {
        height: 70vh;
        min-height: 400px;
    }
    
    .team-grid,
    .gallery-grid,
    .programs-grid {
        grid-template-columns: 1fr;
        gap: var(--space-lg);
    }
    
    .contact-form,
    .department-card,
    .program-card {
        padding: var(--space-lg);
    }
    
    .page-header {
        padding: 4rem 0 3rem;
        min-height: 250px;
    }
    
    .page-header h1 {
        font-size: 2rem;
    }
}

@media (max-width: 576px) {
    .container {
        padding: 0 var(--space-sm);
    }
    
    section {
        padding: var(--space-lg) 0;
    }
    
    .btn,
    .cta-button {
        width: 100%;
        justify-content: center;
    }
    
    .team-categories,
    .gallery-filter {
        justify-content: flex-start;
        overflow-x: auto;
        padding-bottom: var(--space-sm);
        -webkit-overflow-scrolling: touch;
    }
    
    .team-category,
    .gallery-filter-btn {
        white-space: nowrap;
    }
    
    .page-header {
        padding: 3rem 0 2rem;
        min-height: 200px;
    }
    
    .page-header h1 {
        font-size: 1.75rem;
    }
}

/* 14. Animations */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.fade-in-up {
    animation: fadeInUp 0.6s ease-out;
}

@keyframes pulse {
    0% { transform: scale(1); }
    50% { transform: scale(1.05); }
    100% { transform: scale(1); }
}

.pulse {
    animation: pulse 2s infinite;
}

/* 15. Utilities */
.text-center { text-align: center !important; }
.text-left { text-align: left !important; }
.text-right { text-align: right !important; }

.mb-0 { margin-bottom: 0 !important; }
.mb-1 { margin-bottom: var(--space-xs) !important; }
.mb-2 { margin-bottom: var(--space-sm) !important; }
.mb-3 { margin-bottom: var(--space-md) !important; }
.mb-4 { margin-bottom: var(--space-lg) !important; }
.mb-5 { margin-bottom: var(--space-xl) !important; }

.mt-0 { margin-top: 0 !important; }
.mt-1 { margin-top: var(--space-xs) !important; }
.mt-2 { margin-top: var(--space-sm) !important; }
.mt-3 { margin-top: var(--space-md) !important; }
.mt-4 { margin-top: var(--space-lg) !important; }
.mt-5 { margin-top: var(--space-xl) !important; }

.p-0 { padding: 0 !important; }
.p-1 { padding: var(--space-xs) !important; }
.p-2 { padding: var(--space-sm) !important; }
.p-3 { padding: var(--space-md) !important; }
.p-4 { padding: var(--space-lg) !important; }
.p-5 { padding: var(--space-xl) !important; }

.rounded { border-radius: var(--radius-md) !important; }
.rounded-circle { border-radius: var(--radius-circle) !important; }

.shadow-sm { box-shadow: var(--shadow-light) !important; }
.shadow { box-shadow: var(--shadow-medium) !important; }
.shadow-lg { box-shadow: var(--shadow-dark) !important; }

.d-none { display: none !important; }
.d-block { display: block !important; }
.d-flex { display: flex !important; }
.d-grid { display: grid !important; }

.flex-column { flex-direction: column !important; }
.justify-content-center { justify-content: center !important; }
.justify-content-between { justify-content: space-between !important; }
.align-items-center { align-items: center !important; }

.w-100 { width: 100% !important; }
.h-100 { height: 100% !important; }

.position-relative { position: relative !important; }
.position-absolute { position: absolute !important; }
.position-fixed { position: fixed !important; }
.position-sticky { position: sticky !important; }

.top-0 { top: 0 !important; }
.bottom-0 { bottom: 0 !important; }
.start-0 { left: 0 !important; }
.end-0 { right: 0 !important; }

.opacity-0 { opacity: 0 !important; }
.opacity-25 { opacity: 0.25 !important; }
.opacity-50 { opacity: 0.5 !important; }
.opacity-75 { opacity: 0.75 !important; }
.opacity-100 { opacity: 1 !important; }

/* 16. Accessibility - FIXED */
.skip-to-content {
    position: absolute;
    top: -60px;
    left: 50%;
    transform: translateX(-50%);
    background: var(--primary-color);
    color: white;
    padding: 12px 24px;
    border-radius: var(--radius-md);
    font-weight: 600;
    text-decoration: none;
    z-index: var(--z-tooltip);
    transition: top 0.3s ease;
    box-shadow: var(--shadow-medium);
}

.skip-to-content:focus {
    top: 20px;
    outline: 3px solid var(--accent-color);
    outline-offset: 2px;
}

.skip-to-content:hover {
    background: var(--secondary-color);
    color: white;
}

.screen-reader-text {
    border: 0;
    clip: rect(1px, 1px, 1px, 1px);
    clip-path: inset(50%);
    height: 1px;
    margin: -1px;
    overflow: hidden;
    padding: 0;
    position: absolute;
    width: 1px;
    word-wrap: normal !important;
}

.screen-reader-text:focus {
    background-color: var(--light-color);
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-medium);
    clip: auto !important;
    clip-path: none;
    color: var(--primary-color);
    display: block;
    font-size: 16px;
    font-weight: bold;
    height: auto;
    left: 5px;
    line-height: normal;
    padding: 15px 23px 14px;
    text-decoration: none;
    top: 5px;
    width: auto;
    z-index: 100000;
    outline: 3px solid var(--accent-color);
    outline-offset: 2px;
}

/* 17. Print Styles */
@media print {
    .navbar,
    .footer,
    .cta-button,
    .btn,
    .gallery-nav-btn,
    .team-social,
    .contact-form,
    .skip-to-content {
        display: none !important;
    }
    
    body {
        padding-top: 0;
        font-size: 12pt;
        line-height: 1.5;
    }
    
    a {
        color: #000;
        text-decoration: underline;
    }
    
    .container {
        max-width: 100%;
        padding: 0;
    }
    
    .card,
    .team-member,
    .program-card,
    .contact-info-card {
        box-shadow: none;
        border: 1px solid #ddd;
        break-inside: avoid;
    }
    
    .page-header {
        background: none !important;
        color: #000 !important;
        min-height: auto;
        padding: 2rem 0;
    }
    
    .page-header h1 {
        color: #000 !important;
        text-shadow: none !important;
    }
    
    .page-header .lead {
        color: #666 !important;
    }
}