/* CSS Variables */
:root {
    --primary-color: #092851;
    --primary-light: #092851;
    --primary-dark: #092851;
    --secondary-color: #f59e0b;
    --accent-color: #06b6d4;
    --gradient-primary: linear-gradient(135deg, #1e40af 20%, #059669 100%);
    --gradient-secondary: linear-gradient(135deg, #f093fb 20%, #f5576c 100%);
    --gradient-blue: linear-gradient(135deg, #3b82f6 20%, #10b981 100%);
    --gradient-purple: linear-gradient(135deg, #06b6d4 0%, #34d399 100%);
    --text-dark: #1f2937;
    --text-light: #6b7280;
    --text-lighter: #9ca3af;
    --white: #ffffff;
    --light-bg: #f9fafb;
    --dark-bg: #111827;
    --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
    --shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
    --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.1);
    --border-radius: 12px;
    --border-radius-lg: 16px;
    --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    --transition-fast: all 0.15s ease-out;
}

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

html {
    font-size: 16px;
    -webkit-text-size-adjust: 100%;
    -moz-text-size-adjust: 100%;
    -ms-text-size-adjust: 100%;
    scroll-behavior: smooth;
}

html, body {
    width: 100%;
    overflow-x: hidden;
    margin: 0;
    padding: 0;
}

body {
    font-family: 'Inter', 'Poppins', sans-serif;
    line-height: 1.6;
    color: var(--text-dark);
    overflow-x: hidden;
    background: var(--white);
    max-width: 100%;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    text-rendering: optimizeLegibility;
    font-display: swap;
}

.container, 
.container-fluid {
    max-width: 100%;
    padding-right: 15px;
    padding-left: 15px;
}

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

/* Performance optimizations */
* {
    box-sizing: border-box;
    -webkit-tap-highlight-color: transparent;
}

/* Responsive Design */
@media (max-width: 768px) {
    body {
        overflow-x: hidden;
        padding-top: 60px;
    }
    
    .modern-nav {
        position: fixed;
        width: 100%;
        top: 0;
        z-index: 1000;
        height: auto;
        padding: 0.5rem 0;
    }
    
    .navbar-nav .nav-link {
        padding: 0.5rem 0.8rem !important;
        font-size: 0.85rem;
        margin: 0.1rem 0;
    }
    
    .container, .container-fluid {
        padding-left: 10px;
        padding-right: 10px;
    }
    
    .hero-section {
        padding-top: 60px;
        min-height: 90vh;
    }
}

@media (max-width: 576px) {
    body {
        padding-top: 50px;
    }
    
    .hero-title {
        font-size: 1.8rem;
        line-height: 1.2;
    }
    
    .donate-btn {
        padding: 0.4rem 0.8rem !important;
        margin-left: 0.2rem !important;
    }
    
    .hero-subtitle {
        font-size: 0.9rem;
    }
    
    .section-title {
        font-size: 1.6rem;
    }
    
    .modern-btn {
        padding: 0.6rem 1rem;
        font-size: 0.8rem;
    }
    
    .mission-card {
        padding: 1rem 0.8rem;
    }
}

@media (prefers-reduced-motion: reduce) {
    * {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
        scroll-behavior: auto !important;
    }
}

/* Viewport handling */
@viewport {
    width: device-width;
    zoom: 1.0;
}

/* Improve touch targets */
a, button, input, textarea {
    touch-action: manipulation;
}

/* Focus states for accessibility */
.navbar-nav .nav-link:focus,
.modern-btn:focus {
    outline: 2px solid var(--secondary-color);
    outline-offset: 2px;
}

/* Lazy loading */
.lazy-load {
    opacity: 0;
    transition: opacity 0.3s;
}

.lazy-load.loaded {
    opacity: 1;
}

img[loading="lazy"] {
    width: 100%;
    aspect-ratio: attr(width) / attr(height);
}