/* ================== Harmony Bridge NGO - Custom Styles ================== */

/* Font Face - Jameel Noori Nastaleeq for Urdu */
@font-face {
    font-family: 'Jameel Noori Nastaleeq';
    src: url('../fonts/JameelNooriNastaleeq.ttf') format('truetype');
    font-weight: normal;
    font-style: normal;
    font-display: swap;
}

/* Urdu Typography Class */
.font-urdu {
    font-family: 'Jameel Noori Nastaleeq', 'Noto Nastaliq Urdu', serif;
    direction: rtl;
    text-align: right;
    line-height: 2;
}

/* Urdu text centered (for sections with centered English text) */
.font-urdu-center {
    font-family: 'Jameel Noori Nastaleeq', 'Noto Nastaliq Urdu', serif;
    direction: rtl;
    text-align: center;
    line-height: 2;
}

/* Custom Color Variables */
:root {
    --primary-50: #EDF9F9;
    --primary-100: #D1F0F0;
    --primary-300: #7DD3D5;
    --primary-400: #3BBEC0;
    --primary-500: #14A8AA;
    --primary-600: #108486;
    --primary-700: #0D7273;
    --primary-900: #0A4D4E;

    --secondary-50: #F1FBF5;
    --secondary-100: #D8F3DC;
    --secondary-300: #95D5B2;
    --secondary-400: #74C69D;
    --secondary-500: #52B788;
    --secondary-600: #40916C;
    --secondary-700: #2D6A4F;
    --secondary-900: #1B4332;

    --accent-50: #FFF7ED;
    --accent-100: #FED7AA;
    --accent-300: #FDBA74;
    --accent-400: #FB923C;
    --accent-500: #F97316;
    --accent-600: #EA580C;
    --accent-700: #C2410C;
    --accent-900: #7C2D12;
}

/* Smooth Scrolling */
html {
    scroll-behavior: smooth;
}

/* Base Body Styles */
body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    color: #44403C;
    line-height: 1.65;
}

/* Custom Scrollbar */
::-webkit-scrollbar {
    width: 10px;
}

::-webkit-scrollbar-track {
    background: #F5F5F4;
}

::-webkit-scrollbar-thumb {
    background: #108486;
    border-radius: 5px;
}

::-webkit-scrollbar-thumb:hover {
    background: #0D7273;
}

/* Gradient Text */
.gradient-text {
    background: linear-gradient(135deg, #108486 0%, #52B788 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* Card Hover Effects */
.card-hover {
    transition: all 0.3s ease;
}

.card-hover:hover {
    transform: translateY(-8px);
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 8px 10px -6px rgba(0, 0, 0, 0.1);
}

/* Button Styles */
.btn-primary {
    background-color: #F97316;
    color: white;
    padding: 0.75rem 1.5rem;
    border-radius: 0.375rem;
    font-weight: 600;
    transition: all 0.2s ease;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.btn-primary:hover {
    background-color: #EA580C;
    transform: scale(1.05);
    box-shadow: 0 10px 15px -3px rgba(249, 115, 22, 0.3);
}

.btn-secondary {
    background-color: #108486;
    color: white;
    padding: 0.75rem 1.5rem;
    border-radius: 0.375rem;
    font-weight: 600;
    transition: all 0.2s ease;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.btn-secondary:hover {
    background-color: #0D7273;
    box-shadow: 0 10px 15px -3px rgba(16, 132, 134, 0.3);
}

.btn-outline {
    border: 2px solid #108486;
    color: #108486;
    padding: 0.75rem 1.5rem;
    border-radius: 0.375rem;
    font-weight: 600;
    transition: all 0.2s ease;
    background: transparent;
}

.btn-outline:hover {
    background-color: #EDF9F9;
}

/* Navigation Active State */
.nav-link {
    position: relative;
    transition: color 0.2s ease;
}

.nav-link::after {
    content: '';
    position: absolute;
    width: 0;
    height: 2px;
    bottom: -4px;
    left: 0;
    background-color: #F97316;
    transition: width 0.3s ease;
}

.nav-link:hover::after,
.nav-link.active::after {
    width: 100%;
}

/* Hero Section Gradient Overlay */
.hero-overlay {
    background: linear-gradient(135deg, rgba(10, 77, 78, 0.9) 0%, rgba(16, 132, 134, 0.7) 50%, rgba(82, 183, 136, 0.5) 100%);
}

/* Section Backgrounds */
.bg-pattern {
    background-image: url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cg fill='%23108486' fill-opacity='0.05'%3E%3Cpath d='M36 34v-4h-2v4h-4v2h4v4h2v-4h4v-2h-4zm0-30V0h-2v4h-4v2h4v4h2V6h4V4h-4zM6 34v-4H4v4H0v2h4v4h2v-4h4v-2H6zM6 4V0H4v4H0v2h4v4h2V6h4V4H6z'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E");
}

/* Fade In Animation */
.fade-in {
    opacity: 0;
    transform: translateY(20px);
    transition: all 0.6s ease;
}

.fade-in.visible {
    opacity: 1;
    transform: translateY(0);
}

/* Counter Animation */
.counter {
    display: inline-block;
}

/* Quote Styles */
.quote-mark {
    font-family: Georgia, serif;
    font-size: 6rem;
    line-height: 1;
    color: #D1F0F0;
    position: absolute;
    top: -20px;
    left: -10px;
}

/* Accordion Styles */
.accordion-content {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease-out;
}

.accordion-content.active {
    max-height: 500px;
}

.accordion-icon {
    transition: transform 0.3s ease;
}

.accordion-icon.rotated {
    transform: rotate(180deg);
}

/* Form Styles */
.form-input {
    width: 100%;
    padding: 0.75rem 1rem;
    border: 1px solid #D6D3D1;
    border-radius: 0.375rem;
    transition: all 0.2s ease;
    background-color: white;
}

.form-input:focus {
    outline: none;
    border-color: #108486;
    box-shadow: 0 0 0 3px rgba(16, 132, 134, 0.1);
}

.form-input:invalid:not(:placeholder-shown) {
    border-color: #EF4444;
}

/* Stats Counter */
.stat-number {
    font-size: 3rem;
    font-weight: 700;
    color: #0A4D4E;
    line-height: 1;
}

/* Timeline Styles */
.timeline-item {
    position: relative;
    padding-left: 2rem;
    border-left: 2px solid #D1F0F0;
}

.timeline-item::before {
    content: '';
    position: absolute;
    left: -8px;
    top: 0;
    width: 14px;
    height: 14px;
    background-color: #108486;
    border-radius: 50%;
    border: 3px solid #EDF9F9;
}

/* Team Card Styles */
.team-card {
    position: relative;
    overflow: hidden;
    border-radius: 1rem;
    background: white;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
}

.team-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1);
}

.team-card-image {
    position: relative;
    height: 280px;
    overflow: hidden;
}

.team-card-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.team-card:hover .team-card-image img {
    transform: scale(1.1);
}

.team-card-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(to top, rgba(10, 77, 78, 0.9) 0%, transparent 60%);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.team-card:hover .team-card-overlay {
    opacity: 1;
}

/* Focus Area Icons */
.focus-icon {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2rem;
    margin: 0 auto 1rem;
    transition: all 0.3s ease;
}

.focus-icon.child {
    background: linear-gradient(135deg, #FEF3C7 0%, #FDE68A 100%);
    color: #B45309;
}

.focus-icon.women {
    background: linear-gradient(135deg, #FCE7F3 0%, #FBCFE8 100%);
    color: #BE185D;
}

.focus-icon.transgender {
    background: linear-gradient(135deg, #EDE9FE 0%, #DDD6FE 100%);
    color: #7C3AED;
}

.focus-icon.advocacy {
    background: linear-gradient(135deg, #DBEAFE 0%, #BFDBFE 100%);
    color: #1D4ED8;
}

.focus-icon.climate {
    background: linear-gradient(135deg, #D1FAE5 0%, #A7F3D0 100%);
    color: #059669;
}

.focus-icon.policy {
    background: linear-gradient(135deg, #FEE2E2 0%, #FECACA 100%);
    color: #DC2626;
}

/* Mobile Menu */
.mobile-menu {
    visibility: hidden;
    opacity: 0;
    transition: visibility 0.3s ease, opacity 0.3s ease;
}

.mobile-menu > div:first-child {
    opacity: 0;
    transition: opacity 0.3s ease;
}

.mobile-menu > div:last-child {
    transform: translateX(100%);
    transition: transform 0.3s ease;
}

.mobile-menu.active {
    visibility: visible;
    opacity: 1;
}

.mobile-menu.active > div:first-child {
    opacity: 1;
}

.mobile-menu.active > div:last-child {
    transform: translateX(0);
}

/* Helpline Bar */
.helpline-bar {
    background: linear-gradient(90deg, #F97316 0%, #FB923C 100%);
    animation: pulse-glow 2s infinite;
}

@keyframes pulse-glow {
    0%, 100% {
        box-shadow: 0 0 5px rgba(249, 115, 22, 0.5);
    }
    50% {
        box-shadow: 0 0 20px rgba(249, 115, 22, 0.8);
    }
}

/* Loading Spinner */
.spinner {
    border: 3px solid #D1F0F0;
    border-top: 3px solid #108486;
    border-radius: 50%;
    width: 24px;
    height: 24px;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Skip Link for Accessibility */
.skip-link {
    position: absolute;
    top: -40px;
    left: 0;
    background: #108486;
    color: white;
    padding: 8px 16px;
    z-index: 100;
    transition: top 0.3s;
}

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

/* Print Styles */
@media print {
    .no-print {
        display: none !important;
    }

    body {
        font-size: 12pt;
        color: black;
    }

    a {
        text-decoration: underline;
    }
}

/* Responsive Adjustments */
@media (max-width: 768px) {
    .font-urdu {
        font-size: 1.1rem;
        line-height: 1.8;
    }

    .stat-number {
        font-size: 2rem;
    }

    .focus-icon {
        width: 60px;
        height: 60px;
        font-size: 1.5rem;
    }

    /* Mobile button touch targets */
    .btn-primary,
    .btn-secondary,
    .btn-outline {
        min-height: 44px;
        padding: 0.875rem 1.25rem;
    }

    /* Mobile form inputs */
    .form-input {
        min-height: 44px;
        font-size: 16px; /* Prevents zoom on iOS */
    }

    /* Mobile navigation touch targets */
    #mobile-menu nav a {
        min-height: 48px;
        display: flex;
        align-items: center;
    }

    /* Mobile card adjustments */
    .card-hover:hover {
        transform: none;
    }

    /* Team card mobile */
    .team-card-image {
        height: 220px;
    }
}

/* Small mobile devices */
@media (max-width: 480px) {
    .stat-number {
        font-size: 1.75rem;
    }

    .btn-primary,
    .btn-secondary,
    .btn-outline {
        width: 100%;
        justify-content: center;
    }

    /* Helpline bar mobile */
    .helpline-bar {
        font-size: 0.8rem;
        padding: 0.5rem 0.75rem;
    }
}

/* Touch device optimizations */
@media (hover: none) and (pointer: coarse) {
    .card-hover:hover {
        transform: none;
        box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
    }

    .team-card:hover {
        transform: none;
    }

    .team-card:hover .team-card-image img {
        transform: none;
    }

    .btn-primary:hover {
        transform: none;
    }
}

/* Landscape mobile */
@media (max-width: 896px) and (orientation: landscape) {
    .mobile-menu > div:last-child {
        max-height: 100vh;
        overflow-y: auto;
    }
}

/* High contrast mode support */
@media (prefers-contrast: high) {
    .btn-primary,
    .btn-secondary {
        border: 2px solid currentColor;
    }
}

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

    .helpline-bar {
        animation: none;
    }
}
