/* 
 * NCGLD Design System
 * Theme: Navy Blue & Red (Healthcare Professional)
 * Style: Clean, Borderless, Modern
 */

@import url('https://fonts.googleapis.com/css2?family=Cairo:wght@300;400;600;700&family=Inter:wght@300;400;500;600;700&family=Poppins:wght@500;600;700&display=swap');

:root {
    /* Primary - Navy Blue */
    --primary-900: #1a2d4d;
    --primary-800: #243a5e;
    --primary-700: #2e4a7d;
    /* Main Navy Blue */
    --primary-600: #3a5a8f;
    --primary-500: #4a6a9f;
    --primary-100: #e8eff9;

    /* Accent - Red (From Logo) */
    --accent-700: #c0392b;
    --accent-600: #d63c2f;
    --accent-500: #e74c3c;
    /* Main Red */
    --accent-400: #ec6b5e;
    --accent-100: #fde8e7;

    /* Secondary - Medical Teal */
    --secondary-500: #0d9488;
    --secondary-400: #14b8a6;
    --secondary-100: #e0f2f1;

    /* Neutral Colors */
    --neutral-900: #1a1a1a;
    /* Black */
    --neutral-800: #2d2d2d;
    --neutral-700: #3d3d3d;
    /* Dark Charcoal - Body Text */
    --neutral-600: #6b6b6b;
    /* Gray */
    --neutral-500: #9ca3af;
    --neutral-400: #d1d5db;
    /* Light Gray - Borders if needed */
    --neutral-200: #e5e5e5;
    --neutral-100: #f5f5f5;
    /* Light Background */
    --neutral-50: #ffffff;
    /* White */

    /* Semantic Colors */
    --success: #22c55e;
    --warning: #f59e0b;
    --error: #ef4444;
    --info: #3b82f6;

    /* Typography */
    --font-arabic: 'Cairo', 'Noto Kufi Arabic', sans-serif;
    --font-english: 'Inter', 'Segoe UI', sans-serif;
    --font-heading: 'Poppins', var(--font-english);

    /* Spacing */
    --spacing-xs: 0.25rem;
    --spacing-sm: 0.5rem;
    --spacing-md: 1rem;
    --spacing-lg: 1.5rem;
    --spacing-xl: 2rem;
    --spacing-2xl: 3rem;
    --spacing-3xl: 4rem;

    /* Border Radius */
    --radius-sm: 0.25rem;
    --radius-md: 0.5rem;
    --radius-lg: 1rem;
    --radius-full: 9999px;

    /* Shadows */
    --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.05);
    --shadow-md: 0 4px 6px rgba(0, 0, 0, 0.05);
    --shadow-lg: 0 10px 15px rgba(0, 0, 0, 0.05);
    --shadow-hover: 0 10px 25px rgba(0, 0, 0, 0.08);

    /* Transitions */
    --transition-fast: 150ms ease;
    --transition-normal: 300ms ease;
}

/* Reset & Base */
*,
*::before,
*::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    scroll-behavior: smooth;
    font-size: 16px;
}

body {
    font-family: var(--font-english);
    color: var(--neutral-700);
    background-color: var(--neutral-50);
    line-height: 1.6;
    overflow-x: hidden;
}

/* Typography */
h1,
h2,
h3,
h4,
h5,
h6 {
    font-family: var(--font-heading);
    color: var(--primary-900);
    line-height: 1.2;
    margin-bottom: var(--spacing-md);
    font-weight: 700;
}

h1 {
    font-size: 2.5rem;
}

h2 {
    font-size: 2rem;
}

h3 {
    font-size: 1.75rem;
}

h4 {
    font-size: 1.5rem;
}

h5 {
    font-size: 1.25rem;
}

h6 {
    font-size: 1rem;
}

p {
    margin-bottom: var(--spacing-md);
}

a {
    color: var(--primary-600);
    text-decoration: none;
    transition: var(--transition-fast);
}

a:hover {
    color: var(--primary-800);
}

/* Layout Containers */
.container {
    width: 100%;
    max-width: 1280px;
    margin: 0 auto;
    padding: 0 var(--spacing-md);
}

.section {
    padding: var(--spacing-3xl) 0;
}

.section-light {
    background-color: var(--neutral-100);
}

.section-white {
    background-color: var(--neutral-50);
}

.section-dark {
    background-color: var(--primary-900);
    color: var(--neutral-50);
}

.section-dark h1,
.section-dark h2,
.section-dark h3,
.section-dark p,
.section-dark a {
    color: var(--neutral-50);
}

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.75rem 1.5rem;
    font-weight: 600;
    border-radius: var(--radius-md);
    cursor: pointer;
    transition: var(--transition-fast);
    border: 2px solid transparent;
    font-family: var(--font-heading);
    gap: 0.5rem;
}

.btn-primary {
    background-color: var(--accent-500);
    color: white;
}

.btn-primary:hover {
    background-color: var(--accent-600);
    color: white;
    transform: translateY(-1px);
}

.btn-secondary {
    background-color: transparent;
    border-color: var(--primary-500);
    color: var(--primary-700);
}

.btn-secondary:hover {
    background-color: var(--primary-500);
    color: white;
}

.btn-outline-white {
    background-color: transparent;
    border-color: white;
    color: white;
}

.btn-outline-white:hover {
    background-color: white;
    color: var(--primary-900);
}

/* Cards - Borderless & Clean */
.card {
    background: var(--neutral-50);
    border: 1px solid var(--neutral-200);
    border-radius: var(--radius-md);
    padding: var(--spacing-lg);
    transition: var(--transition-normal);
}

.card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-hover);
    background: var(--neutral-50);
    /* Slight highlight on hover */
}

.card-img {
    width: 100%;
    height: 240px;
    object-fit: cover;
    border-radius: var(--radius-md);
    margin-bottom: var(--spacing-md);
    background-color: var(--neutral-200);
    /* Placeholder color */
}

.card-title {
    font-size: 1.25rem;
    margin-bottom: var(--spacing-sm);
    color: var(--primary-800);
}

.card-text {
    color: var(--neutral-600);
    font-size: 0.95rem;
}

/* Forms */
.form-group {
    margin-bottom: var(--spacing-lg);
}

.form-label {
    display: block;
    margin-bottom: var(--spacing-sm);
    font-weight: 500;
    color: var(--neutral-800);
}

.form-control {
    width: 100%;
    padding: 0.75rem;
    border: 1px solid var(--neutral-400);
    border-radius: var(--radius-sm);
    font-family: inherit;
    transition: var(--transition-fast);
    background-color: var(--neutral-50);
}

.form-control:focus {
    outline: none;
    border-color: var(--primary-500);
    box-shadow: 0 0 0 3px var(--primary-100);
}

/* Utilities */
.text-center {
    text-align: center;
}

.text-primary {
    color: var(--primary-700);
}

.text-accent {
    color: var(--accent-500);
}

.bg-primary {
    background-color: var(--primary-700);
}

.bg-accent {
    background-color: var(--accent-500);
}

.d-flex {
    display: flex;
}

.flex-column {
    flex-direction: column;
}

.align-center {
    align-items: center;
}

.justify-center {
    justify-content: center;
}

.justify-between {
    justify-content: space-between;
}

.gap-md {
    gap: var(--spacing-md);
}

.grid-2 {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: var(--spacing-lg);
}

.grid-3 {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: var(--spacing-lg);
}

.grid-4 {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: var(--spacing-lg);
}

/* RTL Support */
html[dir="rtl"] {
    direction: rtl;
    text-align: right;
}

html[dir="rtl"] body {
    font-family: var(--font-arabic);
}

html[dir="rtl"] h1,
html[dir="rtl"] h2,
html[dir="rtl"] h3,
html[dir="rtl"] h4,
html[dir="rtl"] h5,
html[dir="rtl"] h6,
html[dir="rtl"] .btn {
    font-family: var(--font-arabic);
}

html[dir="rtl"] .mr-auto {
    margin-right: 0;
    margin-left: auto;
}

html[dir="rtl"] .ml-auto {
    margin-left: 0;
    margin-right: auto;
}

/* Responsive */
@media (max-width: 1024px) {
    .grid-4 {
        grid-template-columns: repeat(2, 1fr);
    }

    .grid-3 {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 768px) {
    h1 {
        font-size: 2rem;
    }

    h2 {
        font-size: 1.75rem;
    }

    .grid-4,
    .grid-3,
    .grid-2 {
        grid-template-columns: 1fr;
    }

    .container {
        padding: 0 var(--spacing-md);
    }

    .section {
        padding: var(--spacing-xl) 0;
    }
}

/* Consolidated Component Styles */

/* Filter Buttons (News & Reports) */
.filter-btn.active,
.filter-btn:hover {
    background: var(--primary-700) !important;
    color: white !important;
    border-color: var(--primary-700) !important;
}

/* Timeline (About Page) */
html[dir="rtl"] .timeline-left {
    text-align: left !important;
}

html[dir="rtl"] .timeline-right {
    text-align: right !important;
}

/* =====================================================
   ANIMATION UTILITIES
   ===================================================== */

/* Card Hover Effects */
.card-hover {
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.card-hover:hover {
    transform: translateY(-8px);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.1);
}

/* Button Animations */
.btn {
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.btn:active {
    transform: translateY(0);
}

/* Button Ripple Effect */
.btn::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 50%;
    transform: translate(-50%, -50%);
    transition: width 0.6s ease, height 0.6s ease;
}

.btn:active::after {
    width: 200px;
    height: 200px;
}

/* Image Hover Zoom */
.img-zoom {
    overflow: hidden;
}

.img-zoom img {
    transition: transform 0.5s ease;
}

.img-zoom:hover img {
    transform: scale(1.05);
}

/* Form Input Focus */
.form-control {
    transition: border-color 0.3s ease, box-shadow 0.3s ease;
}

.form-control:focus {
    border-color: var(--primary-500);
    box-shadow: 0 0 0 3px rgba(46, 74, 125, 0.15);
    outline: none;
}

/* Link Hover Underline */
.link-underline {
    position: relative;
    text-decoration: none;
}

.link-underline::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    width: 0;
    height: 2px;
    background: currentColor;
    transition: width 0.3s ease;
}

.link-underline:hover::after {
    width: 100%;
}

/* Icon Bounce on Hover */
.icon-bounce:hover {
    animation: bounce 0.5s ease;
}

@keyframes bounce {

    0%,
    100% {
        transform: translateY(0);
    }

    50% {
        transform: translateY(-5px);
    }
}

/* Pulse Animation */
.pulse {
    animation: pulse 2s infinite;
}

@keyframes pulse {

    0%,
    100% {
        opacity: 1;
    }

    50% {
        opacity: 0.5;
    }
}

/* Fade Animations */
.fade-in {
    animation: fadeIn 0.5s ease-out forwards;
}

.fade-up {
    animation: fadeUp 0.6s ease-out forwards;
}

.fade-down {
    animation: fadeDown 0.6s ease-out forwards;
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}

@keyframes fadeUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes fadeDown {
    from {
        opacity: 0;
        transform: translateY(-20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Slide Animations */
.slide-left {
    animation: slideLeft 0.6s ease-out forwards;
}

.slide-right {
    animation: slideRight 0.6s ease-out forwards;
}

@keyframes slideLeft {
    from {
        opacity: 0;
        transform: translateX(-30px);
    }

    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes slideRight {
    from {
        opacity: 0;
        transform: translateX(30px);
    }

    to {
        opacity: 1;
        transform: translateX(0);
    }
}

/* Scale In */
.scale-in {
    animation: scaleIn 0.4s ease-out forwards;
}

@keyframes scaleIn {
    from {
        opacity: 0;
        transform: scale(0.9);
    }

    to {
        opacity: 1;
        transform: scale(1);
    }
}

/* Staggered Animation Delays */
.delay-100 {
    animation-delay: 100ms;
}

.delay-200 {
    animation-delay: 200ms;
}

.delay-300 {
    animation-delay: 300ms;
}

.delay-400 {
    animation-delay: 400ms;
}

.delay-500 {
    animation-delay: 500ms;
}

/* Statistics Count Up Container */
.stat-number {
    display: inline-block;
    transition: transform 0.3s ease;
}

.stat-number:hover {
    transform: scale(1.1);
}

/* Loading Skeleton */
.skeleton {
    background: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%);
    background-size: 200% 100%;
    animation: skeleton 1.5s infinite;
    border-radius: 4px;
}

@keyframes skeleton {
    0% {
        background-position: 200% 0;
    }

    100% {
        background-position: -200% 0;
    }
}

/* Respect Reduced Motion */
@media (prefers-reduced-motion: reduce) {

    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}

/* RTL Animation Adjustments */
html[dir="rtl"] .slide-left {
    animation-name: slideRight;
}

html[dir="rtl"] .slide-right {
    animation-name: slideLeft;
}

/* Responsive Mobile Menu Styles */

/* Mobile Toggle Button */
.mobile-menu-toggle {
    display: none;
    flex-direction: column;
    justify-content: space-between;
    width: 30px;
    height: 21px;
    background: transparent;
    border: none;
    cursor: pointer;
    padding: 0;
    z-index: 1100;
    margin-inline-start: 1rem;
}

.mobile-menu-toggle span {
    width: 100%;
    height: 3px;
    background-color: var(--primary-900);
    border-radius: 3px;
    transition: all 0.3s ease;
}

/* RTL support for toggle margin */
html[dir="rtl"] .mobile-menu-toggle {
    margin-inline-start: 1rem;
}

@media (max-width: 768px) {
    .mobile-menu-toggle {
        display: flex;
    }

    .main-nav {
        position: fixed;
        top: 0;
        left: 0;
        width: 100%;
        height: 100vh;
        background-color: white;
        flex-direction: column;
        justify-content: center;
        align-items: center;
        gap: 2rem;
        transform: translateX(100%);
        /* Start off-screen */
        transition: transform 0.3s ease-in-out;
        z-index: 1000;
        box-shadow: -5px 0 15px rgba(0, 0, 0, 0.1);
    }

    html[dir="rtl"] .main-nav {
        transform: translateX(-100%);
        box-shadow: 5px 0 15px rgba(0, 0, 0, 0.1);
    }

    .main-nav.active {
        transform: translateX(0);
    }

    /* Hamburger Animation */
    .mobile-menu-toggle.active span:nth-child(1) {
        transform: translateY(9px) rotate(45deg);
    }

    .mobile-menu-toggle.active span:nth-child(2) {
        opacity: 0;
    }

    .mobile-menu-toggle.active span:nth-child(3) {
        transform: translateY(-9px) rotate(-45deg);
    }

    body.no-scroll {
        overflow: hidden;
    }

    .nav-link {
        font-size: 1.25rem;
    }
}

/* Pagination */
.pagination {
    display: flex;
    justify-content: center;
    list-style: none;
    gap: 0.5rem;
    padding: 2rem 0;
}

.pagination li a,
.pagination li span {
    display: flex;
    align-items: center;
    justify-content: center;
    min-width: 40px;
    height: 40px;
    padding: 0 1rem;
    border-radius: var(--radius-md);
    background: white;
    border: 1px solid var(--neutral-300);
    color: var(--primary-700);
    text-decoration: none;
    transition: all 0.2s;
    font-weight: 500;
}

.pagination li a:hover {
    background: var(--primary-100);
    border-color: var(--primary-500);
    color: var(--primary-900);
}

.pagination li.active a,
.pagination li.active span {
    background: var(--primary-700);
    border-color: var(--primary-700);
    color: white;
}

.pagination li.disabled span {
    background: var(--neutral-100);
    color: var(--neutral-400);
    cursor: not-allowed;
}