/* ========================================
   TETEA JAMII - BRAND STYLESHEET
   Justice-Focused Community Organization
   ======================================== */

/* Import Distinctive Fonts */
@import url('https://fonts.googleapis.com/css2?family=Sora:wght@600;700;800&family=Public+Sans:wght@400;500;600&display=swap');

/* ========================================
   CSS VARIABLES - BRAND DESIGN SYSTEM
   ======================================== */
:root {
    /* Brand Colors */
    --justice-blue: #1E40AF;
    --empowerment-purple: #7C3AED;
    --community-green: #059669;
    --urgent-orange: #EA580C;
    
    /* Neutral Palette */
    --gray-50: #F9FAFB;
    --gray-100: #F3F4F6;
    --gray-200: #E5E7EB;
    --gray-300: #D1D5DB;
    --gray-600: #4B5563;
    --gray-700: #374151;
    --gray-800: #1F2937;
    --gray-900: #111827;
    
    /* Typography */
    --font-display: 'Sora', sans-serif;
    --font-body: 'Public Sans', sans-serif;
    
    /* Spacing */
    --spacing-xs: 0.5rem;
    --spacing-sm: 1rem;
    --spacing-md: 1.5rem;
    --spacing-lg: 2rem;
    --spacing-xl: 3rem;
    --spacing-2xl: 4rem;
    
    /* Border Radius */
    --radius-sm: 0.5rem;
    --radius-md: 0.75rem;
    --radius-lg: 1rem;
    --radius-xl: 1.5rem;
    --radius-full: 9999px;
    
    /* Shadows */
    --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);
    --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.1);
    
    /* Transitions */
    --transition-fast: 150ms ease-in-out;
    --transition-base: 300ms ease-in-out;
    --transition-slow: 500ms ease-in-out;
}

/* ========================================
   BASE STYLES
   ======================================== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
    font-size: 16px;
}

body {
    font-family: var(--font-body);
    color: var(--gray-900);
    line-height: 1.6;
    background-color: white;
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* Typography Hierarchy */
h1, h2, h3, h4, h5, h6 {
    font-family: var(--font-display);
    font-weight: 700;
    line-height: 1.2;
    margin-bottom: var(--spacing-md);
}

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

p {
    margin-bottom: var(--spacing-md);
    font-size: 1.125rem;
    color: var(--gray-700);
}

a {
    color: var(--justice-blue);
    text-decoration: none;
    transition: color var(--transition-fast);
}

a:hover {
    color: var(--empowerment-purple);
}

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

/* ========================================
   UTILITY CLASSES
   ======================================== */
.container {
    max-width: 1280px;
    margin: 0 auto;
    padding: 0 var(--spacing-md);
}

.text-center { text-align: center; }
.text-left { text-align: left; }
.text-right { text-align: right; }

.mt-1 { margin-top: var(--spacing-sm); }
.mt-2 { margin-top: var(--spacing-md); }
.mt-3 { margin-top: var(--spacing-lg); }
.mt-4 { margin-top: var(--spacing-xl); }

.mb-1 { margin-bottom: var(--spacing-sm); }
.mb-2 { margin-bottom: var(--spacing-md); }
.mb-3 { margin-bottom: var(--spacing-lg); }
.mb-4 { margin-bottom: var(--spacing-xl); }

.hidden { display: none !important; }
.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;
}

/* ========================================
   QUICK EXIT BUTTON (Safety Feature)
   ======================================== */
.quick-exit {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 9999;
    background: var(--urgent-orange);
    color: white;
    padding: 0.75rem 1.5rem;
    border-radius: var(--radius-full);
    font-weight: 600;
    border: none;
    cursor: pointer;
    box-shadow: var(--shadow-xl);
    transition: all var(--transition-base);
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.quick-exit:hover {
    background: #C2410C;
    transform: scale(1.05);
    box-shadow: 0 20px 30px rgba(234, 88, 12, 0.4);
}

/* ========================================
   EMERGENCY HELPLINE BAR
   ======================================== */
.emergency-bar {
    position: sticky;
    top: 0;
    z-index: 1000;
    background: linear-gradient(135deg, var(--urgent-orange) 0%, #C2410C 100%);
    color: white;
    padding: var(--spacing-md) 0;
    box-shadow: var(--shadow-lg);
}

.emergency-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: var(--spacing-md);
}

.helpline-info {
    display: flex;
    align-items: center;
    gap: var(--spacing-md);
}

.helpline-number {
    font-family: var(--font-display);
    font-size: 1.5rem;
    font-weight: 700;
}

.emergency-actions {
    display: flex;
    gap: var(--spacing-sm);
}

.btn-emergency {
    background: white;
    color: var(--urgent-orange);
    padding: 0.75rem 1.5rem;
    border-radius: var(--radius-full);
    font-weight: 600;
    border: none;
    cursor: pointer;
    transition: all var(--transition-fast);
}

.btn-emergency:hover {
    box-shadow: var(--shadow-xl);
    transform: translateY(-2px);
}

.btn-lang-toggle {
    background: transparent;
    color: white;
    border: 2px solid white;
    padding: 0.75rem 1.5rem;
    border-radius: var(--radius-full);
    font-weight: 600;
    cursor: pointer;
    transition: all var(--transition-fast);
}

.btn-lang-toggle:hover {
    background: white;
    color: var(--urgent-orange);
}

/* ========================================
   NAVIGATION
   ======================================== */
.main-nav {
    background: white;
    box-shadow: var(--shadow-md);
    position: sticky;
    top: 60px;
    z-index: 999;
}

.nav-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: var(--spacing-md) 0;
}

.logo {
    display: flex;
    align-items: center;
    gap: var(--spacing-sm);
    font-family: var(--font-display);
    font-size: 1.75rem;
    font-weight: 800;
    background: linear-gradient(135deg, var(--justice-blue), var(--empowerment-purple), var(--community-green));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.nav-links {
    display: flex;
    list-style: none;
    gap: var(--spacing-lg);
}

.nav-links a {
    color: var(--gray-700);
    font-weight: 500;
    padding: 0.5rem 1rem;
    border-radius: var(--radius-md);
    transition: all var(--transition-fast);
    position: relative;
}

.nav-links a:hover,
.nav-links a.active {
    color: var(--justice-blue);
    background: rgba(30, 64, 175, 0.1);
}

.nav-links a::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    width: 0;
    height: 2px;
    background: var(--justice-blue);
    transform: translateX(-50%);
    transition: width var(--transition-fast);
}

.nav-links a:hover::after,
.nav-links a.active::after {
    width: 80%;
}

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

.mobile-menu-toggle span {
    display: block;
    width: 28px;
    height: 3px;
    background: var(--gray-900);
    margin: 5px 0;
    transition: all var(--transition-fast);
    border-radius: 2px;
}

/* ========================================
   BUTTONS
   ======================================== */
.btn {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 1rem 2rem;
    border-radius: var(--radius-full);
    font-weight: 600;
    font-size: 1rem;
    border: none;
    cursor: pointer;
    transition: all var(--transition-base);
    text-decoration: none;
    justify-content: center;
}

.btn-primary {
    background: var(--justice-blue);
    color: white;
    box-shadow: var(--shadow-md);
}

.btn-primary:hover {
    background: #1E3A8A;
    box-shadow: var(--shadow-xl);
    transform: translateY(-2px);
}

.btn-secondary {
    background: transparent;
    color: var(--justice-blue);
    border: 2px solid var(--justice-blue);
}

.btn-secondary:hover {
    background: var(--justice-blue);
    color: white;
    transform: translateY(-2px);
}

.btn-purple {
    background: var(--empowerment-purple);
    color: white;
    box-shadow: var(--shadow-md);
}

.btn-purple:hover {
    background: #6D28D9;
    box-shadow: var(--shadow-xl);
    transform: translateY(-2px);
}

.btn-green {
    background: var(--community-green);
    color: white;
    box-shadow: var(--shadow-md);
}

.btn-green:hover {
    background: #047857;
    box-shadow: var(--shadow-xl);
    transform: translateY(-2px);
}

.btn-lg {
    padding: 1.25rem 2.5rem;
    font-size: 1.125rem;
}

/* ========================================
   CARDS
   ======================================== */
.card {
    background: white;
    border-radius: var(--radius-xl);
    padding: var(--spacing-lg);
    box-shadow: var(--shadow-md);
    transition: all var(--transition-base);
}

.card:hover {
    box-shadow: var(--shadow-xl);
    transform: translateY(-4px);
}

.card-icon {
    width: 64px;
    height: 64px;
    border-radius: var(--radius-lg);
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: var(--spacing-md);
}

.card-icon.blue {
    background: var(--justice-blue);
}

.card-icon.purple {
    background: var(--empowerment-purple);
}

.card-icon.green {
    background: var(--community-green);
}

.card-icon.orange {
    background: var(--urgent-orange);
}

/* ========================================
   HERO SECTIONS
   ======================================== */
.hero {
    min-height: 80vh;
    display: flex;
    align-items: center;
    position: relative;
    overflow: hidden;
    background: linear-gradient(135deg, 
        rgba(30, 64, 175, 0.05) 0%, 
        rgba(124, 58, 237, 0.05) 50%, 
        rgba(5, 150, 105, 0.05) 100%);
}

.hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 400 400' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noiseFilter'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noiseFilter)' opacity='0.03'/%3E%3C/svg%3E");
    pointer-events: none;
}

.hero-content {
    position: relative;
    z-index: 1;
    padding: var(--spacing-2xl) 0;
}

.hero-title {
    font-size: 3.5rem;
    line-height: 1.1;
    margin-bottom: var(--spacing-md);
    background: linear-gradient(135deg, var(--justice-blue), var(--empowerment-purple), var(--community-green));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.hero-subtitle {
    font-size: 1.5rem;
    color: var(--gray-700);
    margin-bottom: var(--spacing-xl);
    max-width: 700px;
}

/* ========================================
   SECTIONS
   ======================================== */
section {
    padding: var(--spacing-2xl) 0;
}

.section-header {
    text-align: center;
    margin-bottom: var(--spacing-2xl);
}

.section-title {
    font-size: 2.5rem;
    margin-bottom: var(--spacing-md);
}

.section-subtitle {
    font-size: 1.25rem;
    color: var(--gray-600);
    max-width: 700px;
    margin: 0 auto;
}

.grid {
    display: grid;
    gap: var(--spacing-lg);
}

.grid-2 { grid-template-columns: repeat(2, 1fr); }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.grid-4 { grid-template-columns: repeat(4, 1fr); }

/* ========================================
   FORMS
   ======================================== */
.form-group {
    margin-bottom: var(--spacing-md);
}

.form-label {
    display: block;
    font-weight: 600;
    margin-bottom: 0.5rem;
    color: var(--gray-700);
}

.form-input,
.form-select,
.form-textarea {
    width: 100%;
    padding: 0.75rem 1rem;
    border: 2px solid var(--gray-300);
    border-radius: var(--radius-md);
    font-family: var(--font-body);
    font-size: 1rem;
    transition: all var(--transition-fast);
}

.form-input:focus,
.form-select:focus,
.form-textarea:focus {
    outline: none;
    border-color: var(--justice-blue);
    box-shadow: 0 0 0 3px rgba(30, 64, 175, 0.1);
}

.form-textarea {
    resize: vertical;
    min-height: 120px;
}

/* ========================================
   FOOTER
   ======================================== */
.footer {
    background: var(--gray-900);
    color: white;
    padding: var(--spacing-2xl) 0 var(--spacing-lg) 0;
}

.footer-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: var(--spacing-xl);
    margin-bottom: var(--spacing-xl);
}

.footer-section h4 {
    margin-bottom: var(--spacing-md);
    color: white;
}

.footer-links {
    list-style: none;
}

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

.footer-links a {
    color: var(--gray-300);
    transition: color var(--transition-fast);
}

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

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

.social-links {
    display: flex;
    gap: var(--spacing-md);
}

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

.social-links a:hover {
    background: var(--empowerment-purple);
    transform: translateY(-3px);
}

/* ========================================
   ANIMATIONS
   ======================================== */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes float {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-20px); }
}

.animate-fadeInUp {
    animation: fadeInUp 0.6s ease-out forwards;
}

.animate-fadeIn {
    animation: fadeIn 0.8s ease-out forwards;
}

.animate-float {
    animation: float 6s ease-in-out infinite;
}

/* ========================================
   RESPONSIVE DESIGN
   ======================================== */
@media (max-width: 1024px) {
    .grid-4 { grid-template-columns: repeat(2, 1fr); }
    .grid-3 { grid-template-columns: repeat(2, 1fr); }
    .footer-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 768px) {
    html { font-size: 14px; }
    
    h1 { font-size: 2.5rem; }
    h2 { font-size: 2rem; }
    h3 { font-size: 1.5rem; }
    
    .hero-title { font-size: 2.5rem; }
    .hero-subtitle { font-size: 1.25rem; }
    
    .nav-links {
        display: none;
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        background: white;
        flex-direction: column;
        padding: var(--spacing-md);
        box-shadow: var(--shadow-lg);
    }
    
    .nav-links.active {
        display: flex;
    }
    
    .mobile-menu-toggle {
        display: block;
    }
    
    .grid-2,
    .grid-3,
    .grid-4 {
        grid-template-columns: 1fr;
    }
    
    .footer-grid {
        grid-template-columns: 1fr;
    }
    
    .emergency-content {
        flex-direction: column;
        text-align: center;
    }
    
    .footer-bottom {
        flex-direction: column;
        text-align: center;
    }
}

@media (max-width: 480px) {
    .quick-exit {
        top: 10px;
        right: 10px;
        padding: 0.5rem 1rem;
        font-size: 0.875rem;
    }
    
    .btn {
        width: 100%;
    }
    
    .hero {
        min-height: 60vh;
    }
}

/* ========================================
   IMAGE PLACEHOLDERS & VISUAL ELEMENTS
   ======================================== */
.img-placeholder {
    background: linear-gradient(135deg, var(--gray-200) 0%, var(--gray-300) 100%);
    border-radius: var(--radius-lg);
    overflow: hidden;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--gray-500);
    font-weight: 600;
}

.img-placeholder::before {
    content: '📸';
    font-size: 3rem;
    opacity: 0.5;
}

.img-hero {
    width: 100%;
    height: 500px;
    object-fit: cover;
    border-radius: var(--radius-xl);
}

.img-card {
    width: 100%;
    height: 250px;
    object-fit: cover;
    border-radius: var(--radius-lg);
    margin-bottom: var(--spacing-md);
}

.img-team {
    width: 100%;
    height: 300px;
    object-fit: cover;
    border-radius: var(--radius-lg);
}

.img-icon {
    width: 64px;
    height: 64px;
    border-radius: 50%;
}

/* Gradient Overlays for Images */
.img-overlay {
    position: relative;
}

.img-overlay::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, rgba(30,64,175,0.7) 0%, rgba(124,58,237,0.5) 100%);
    border-radius: inherit;
}

.img-overlay > * {
    position: relative;
    z-index: 1;
}

/* Icon Illustrations */
.icon-illustration {
    width: 100%;
    max-width: 400px;
    height: auto;
    margin: 2rem auto;
}

/* Data Visualization Containers */
.data-viz {
    background: white;
    border-radius: var(--radius-xl);
    padding: var(--spacing-lg);
    box-shadow: var(--shadow-md);
}

.stat-bar {
    height: 8px;
    background: var(--gray-200);
    border-radius: 4px;
    overflow: hidden;
    margin: var(--spacing-sm) 0;
}

.stat-bar-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--justice-blue), var(--empowerment-purple));
    border-radius: 4px;
    transition: width 1s ease-out;
}

/* Quote Blocks */
.quote-block {
    border-left: 4px solid var(--empowerment-purple);
    padding-left: var(--spacing-lg);
    font-style: italic;
    font-size: 1.25rem;
    color: var(--gray-700);
    margin: var(--spacing-xl) 0;
}

.quote-author {
    font-style: normal;
    font-weight: 600;
    color: var(--gray-900);
    margin-top: var(--spacing-sm);
}

/* Timeline */
.timeline {
    position: relative;
    padding-left: 3rem;
}

.timeline::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 3px;
    background: linear-gradient(180deg, var(--justice-blue), var(--empowerment-purple), var(--community-green));
}

.timeline-item {
    position: relative;
    margin-bottom: var(--spacing-xl);
    padding-bottom: var(--spacing-xl);
}

.timeline-item::before {
    content: '';
    position: absolute;
    left: -3.5rem;
    top: 0.5rem;
    width: 16px;
    height: 16px;
    background: white;
    border: 3px solid var(--justice-blue);
    border-radius: 50%;
}

/* Badge Elements */
.badge {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 1rem;
    border-radius: var(--radius-full);
    font-size: 0.875rem;
    font-weight: 600;
}

.badge-blue {
    background: rgba(30,64,175,0.1);
    color: var(--justice-blue);
    border: 2px solid rgba(30,64,175,0.3);
}

.badge-purple {
    background: rgba(124,58,237,0.1);
    color: var(--empowerment-purple);
    border: 2px solid rgba(124,58,237,0.3);
}

.badge-green {
    background: rgba(5,150,105,0.1);
    color: var(--community-green);
    border: 2px solid rgba(5,150,105,0.3);
}

.badge-orange {
    background: rgba(234,88,12,0.1);
    color: var(--urgent-orange);
    border: 2px solid rgba(234,88,12,0.3);
}

/* Feature Boxes */
.feature-box {
    background: white;
    border: 2px solid var(--gray-200);
    border-radius: var(--radius-xl);
    padding: var(--spacing-lg);
    transition: all var(--transition-base);
}

.feature-box:hover {
    border-color: var(--justice-blue);
    box-shadow: var(--shadow-lg);
    transform: translateY(-4px);
}

.feature-icon {
    width: 80px;
    height: 80px;
    background: linear-gradient(135deg, var(--justice-blue), var(--empowerment-purple));
    border-radius: var(--radius-lg);
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: var(--spacing-md);
    font-size: 2.5rem;
}

/* ========================================
   ACCESSIBILITY
   ======================================== */
.skip-link {
    position: absolute;
    top: -40px;
    left: 0;
    background: var(--justice-blue);
    color: white;
    padding: 8px;
    text-decoration: none;
    z-index: 10000;
}

.skip-link:focus {
    top: 0;
}

/* High Contrast Focus Indicators */
*:focus-visible {
    outline: 3px solid var(--justice-blue);
    outline-offset: 2px;
}

/* Reduced Motion */
@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}