/* ==========================================================================
   AL-SAFWA MEDICAL LABORATORY - MODERN DESIGN SYSTEM
   ========================================================================== */

/* ======== DESIGN TOKENS ======== */
:root {
    /* Primary Palette - Medical Blue / Navy */
    --color-primary-50: #eff6ff;
    --color-primary-100: #dbeafe;
    --color-primary-200: #bfdbfe;
    --color-primary-300: #93c5fd;
    --color-primary-400: #60a5fa;
    --color-primary-500: #3b82f6; /* Main Blue */
    --color-primary-600: #2563eb;
    --color-primary-700: #1d4ed8;
    --color-primary-800: #1e40af; /* Navy */
    --color-primary-900: #1e3a8a;
    --color-primary-950: #172554;

    /* Accent Palette - Medical Cyan / Teal */
    --color-accent-50: #ecfeff;
    --color-accent-100: #cffafe;
    --color-accent-500: #06b6d4;
    --color-accent-600: #0891b2;
    --color-accent-900: #164e63;

    /* Neutral Palette - Silver/Gray */
    --color-gray-50: #f8fafc;
    --color-gray-100: #f1f5f9;
    --color-gray-200: #e2e8f0;
    --color-gray-300: #cbd5e1;
    --color-gray-400: #94a3b8;
    --color-gray-500: #64748b;
    --color-gray-600: #475569;
    --color-gray-700: #334155;
    --color-gray-800: #1e293b;
    --color-gray-900: #0f172a;

    /* Semantic Colors */
    --color-success: #10b981;
    --color-error: #ef4444;
    --color-warning: #f59e0b;
    --color-surface: #ffffff;
    --color-bg: #f8fafc;
    
    /* Text Colors */
    --color-text-primary: var(--color-gray-900);
    --color-text-secondary: var(--color-gray-600);
    --color-text-muted: var(--color-gray-400);
    --color-text-on-primary: #ffffff;

    /* Gradients */
    --gradient-hero: linear-gradient(135deg, var(--color-primary-900) 0%, var(--color-primary-700) 100%);
    --gradient-hero-overlay: linear-gradient(180deg, rgba(15,23,42,0.3) 0%, rgba(15,23,42,0.8) 100%);
    --gradient-card: linear-gradient(180deg, rgba(255,255,255,0.05) 0%, rgba(255,255,255,0) 100%);

    /* 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), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
    --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
    --shadow-card: 0 10px 40px -10px rgba(30, 58, 138, 0.1);

    /* Borders */
    --radius-sm: 8px;
    --radius-md: 12px;
    --radius-lg: 16px;
    --radius-xl: 24px;
    --radius-full: 9999px;

    /* Transitions */
    --transition-fast: 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    --transition-normal: 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    --transition-slow: 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}

/* ======== RESET & BASE ======== */
*, *::before, *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

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

body {
    font-family: 'Cairo', sans-serif;
    background-color: var(--color-bg);
    color: var(--color-text-primary);
    line-height: 1.6;
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
}

a { text-decoration: none; color: inherit; }
ul { list-style: none; }
button { font-family: inherit; cursor: pointer; border: none; background: none; }
img { max-width: 100%; height: auto; display: block; }

.container {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 1.5rem;
}

/* ======== UTILITIES ======== */
.glass {
    background: rgba(255, 255, 255, 0.85);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid rgba(255, 255, 255, 0.6);
    box-shadow: 0 8px 32px rgba(30, 58, 138, 0.05);
}

.text-gradient {
    background: linear-gradient(135deg, var(--color-primary-600), var(--color-accent-500));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.section-padding {
    padding: 100px 0;
}

/* ======== TYPOGRAPHY ======== */
h1, h2, h3, h4, h5, h6 { font-weight: 700; line-height: 1.3; }
.section-title { text-align: center; margin-bottom: 3rem; }
.section-title h2 { font-size: 2.5rem; color: var(--color-primary-900); margin-bottom: 0.5rem; }
.section-title p { color: var(--color-text-secondary); max-width: 600px; margin: 0 auto; font-size: 1.1rem; }
.badge { display: inline-block; padding: 0.5rem 1rem; background: var(--color-primary-100); color: var(--color-primary-700); border-radius: var(--radius-full); font-weight: 600; font-size: 0.9rem; margin-bottom: 1rem; }

/* ======== BUTTONS ======== */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.875rem 1.5rem;
    border-radius: var(--radius-full);
    font-weight: 700;
    font-size: 1rem;
    transition: all var(--transition-normal);
    position: relative;
    overflow: hidden;
    z-index: 1;
}

.btn::before {
    content: ''; position: absolute; top: 0; left: 0; width: 0%; height: 100%;
    background: rgba(255,255,255,0.2); transition: width var(--transition-normal); z-index: -1;
}
.btn:hover::before { width: 100%; }
.btn:active { transform: scale(0.98); }

.btn--primary {
    background: var(--color-primary-600);
    color: var(--color-text-on-primary);
    box-shadow: 0 8px 20px rgba(37, 99, 235, 0.3);
}
.btn--primary:hover {
    background: var(--color-primary-700);
    transform: translateY(-2px);
    box-shadow: 0 12px 25px rgba(37, 99, 235, 0.4);
}

.btn--outline {
    background: transparent;
    color: var(--color-primary-600);
    border: 2px solid var(--color-primary-600);
}
.btn--outline:hover {
    background: var(--color-primary-50);
}

.btn--whatsapp {
    background: #25D366;
    color: white;
    box-shadow: 0 8px 20px rgba(37, 211, 102, 0.3);
}
.btn--whatsapp:hover {
    background: #128C7E;
    transform: translateY(-2px);
}

/* ======== HEADER ======== */
.header {
    position: fixed; top: 0; left: 0; width: 100%;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    z-index: 1000;
    transition: all var(--transition-normal);
    box-shadow: var(--shadow-sm);
}

.header__inner {
    display: flex; justify-content: space-between; align-items: center;
    height: 80px;
}

.header__logo { display: flex; align-items: center; gap: 0.75rem; }
.header__logo-icon { color: var(--color-primary-600); display: flex; }
.header__logo-text { display: flex; flex-direction: column; }
.header__logo-name { font-weight: 800; font-size: 1.25rem; color: var(--color-primary-900); line-height: 1; }
.header__logo-title { font-size: 0.8rem; color: var(--color-text-secondary); margin-top: 0.25rem; font-weight: 600;}

.header__nav-list { display: flex; gap: 2rem; }
.header__nav-link { color: var(--color-gray-600); font-weight: 600; transition: color var(--transition-fast); position: relative; }
.header__nav-link:hover, .header__nav-link.active { color: var(--color-primary-600); }
.header__nav-link::after {
    content: ''; position: absolute; bottom: -4px; left: 0; width: 0; height: 2px;
    background: var(--color-primary-600); transition: width var(--transition-normal);
}
.header__nav-link:hover::after, .header__nav-link.active::after { width: 100%; }

.header__burger { display: none; width: 30px; height: 20px; position: relative; flex-direction: column; justify-content: space-between; }
.header__burger span { display: block; width: 100%; height: 2px; background: var(--color-primary-900); transition: all var(--transition-fast); }

/* ======== HERO SECTION ======== */
.hero {
    position: relative;
    padding: 160px 0 100px;
    background-color: var(--color-primary-950);
    overflow: hidden;
    min-height: 100vh;
    display: flex;
    align-items: center;
}

.hero__bg {
    position: absolute; inset: 0;
    background-image: url('assets/images/lab_hero_bg.png');
    background-size: cover; background-position: center;
    opacity: 0.4;
    z-index: 1;
}

.hero__overlay {
    position: absolute; inset: 0;
    background: linear-gradient(90deg, var(--color-primary-950) 0%, rgba(23, 37, 84, 0.7) 100%);
    z-index: 2;
}

.hero__inner { position: relative; z-index: 3; display: grid; grid-template-columns: 1fr 1fr; gap: 4rem; align-items: center; }

.hero__content { color: white; }
.hero__badge { background: rgba(255,255,255,0.1); color: var(--color-primary-100); border: 1px solid rgba(255,255,255,0.2); }
.hero__title { font-size: clamp(2.5rem, 5vw, 4rem); margin-bottom: 1.5rem; line-height: 1.2; }
.hero__title-accent { color: var(--color-accent-100); }
.hero__subtitle { font-size: 1.2rem; color: var(--color-primary-100); margin-bottom: 2.5rem; opacity: 0.9; }

.hero__actions { display: flex; gap: 1rem; }

.hero__image-wrapper { position: relative; }
.hero__image-card {
    border-radius: var(--radius-2xl);
    overflow: hidden;
    box-shadow: var(--shadow-xl);
    border: 4px solid rgba(255,255,255,0.1);
    transform: rotate(2deg);
    transition: transform var(--transition-slow);
}
.hero__image-wrapper:hover .hero__image-card { transform: rotate(0deg); }

.hero__stats-card {
    position: absolute;
    bottom: -30px;
    left: -30px;
    background: white;
    padding: 1.5rem;
    border-radius: var(--radius-xl);
    box-shadow: var(--shadow-xl);
    display: flex;
    gap: 1.5rem;
    color: var(--color-gray-900);
}
.hero__stat { display: flex; flex-direction: column; align-items: center; }
.hero__stat h4 { font-size: 1.8rem; color: var(--color-primary-600); font-weight: 800; }
.hero__stat p { font-size: 0.8rem; color: var(--color-gray-500); font-weight: 600; }

/* ======== PACKAGES SECTION ======== */
.packages { background: var(--color-gray-50); }

.package-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 2rem;
}

.package-card {
    background: white;
    border-radius: var(--radius-2xl);
    padding: 2rem;
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--color-gray-100);
    transition: all var(--transition-normal);
    position: relative;
    overflow: hidden;
}
.package-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-lg);
    border-color: var(--color-primary-100);
}

.package-card--popular::before {
    content: 'الأكثر طلباً';
    position: absolute; top: 20px; left: -30px; background: var(--color-accent-500); color: white;
    padding: 4px 30px; font-size: 0.8rem; font-weight: 700; transform: rotate(-45deg);
}

.package-card__header { text-align: center; margin-bottom: 1.5rem; padding-bottom: 1.5rem; border-bottom: 1px dashed var(--color-gray-200); }
.package-card__icon {
    width: 60px; height: 60px; background: var(--color-primary-50); color: var(--color-primary-600);
    border-radius: 50%; display: flex; align-items: center; justify-content: center; margin: 0 auto 1rem;
}
.package-card__title { font-size: 1.5rem; color: var(--color-primary-900); margin-bottom: 0.5rem; }
.package-card__price { display: flex; align-items: center; justify-content: center; gap: 0.5rem; }
.package-card__price-old { color: var(--color-text-muted); text-decoration: line-through; font-size: 1.1rem; }
.package-card__price-new { color: var(--color-success); font-size: 2rem; font-weight: 800; }
.package-card__price-curr { font-size: 1rem; color: var(--color-gray-500); }

.package-card__list { margin-bottom: 2rem; }
.package-card__list li {
    display: flex; align-items: flex-start; gap: 0.75rem; margin-bottom: 0.75rem; color: var(--color-text-secondary);
}
.package-card__list li svg { color: var(--color-primary-500); flex-shrink: 0; margin-top: 4px; }

.package-card__btn { width: 100%; }

/* ======== TEST BENEFITS (ACCORDION) ======== */
.benefits { background: white; }
.benefits__grid { display: grid; grid-template-columns: 1fr 1fr; gap: 4rem; align-items: start; }
.benefits__image { border-radius: var(--radius-2xl); overflow: hidden; box-shadow: var(--shadow-lg); }

.accordion__item {
    border: 1px solid var(--color-gray-200);
    border-radius: var(--radius-lg);
    margin-bottom: 1rem;
    overflow: hidden;
}
.accordion__header {
    width: 100%; text-align: right; padding: 1.25rem; background: var(--color-gray-50);
    display: flex; justify-content: space-between; align-items: center; font-weight: 700; color: var(--color-primary-900);
    font-size: 1.1rem; transition: background var(--transition-fast);
}
.accordion__header:hover { background: var(--color-primary-50); }
.accordion__icon { transition: transform var(--transition-normal); }
.accordion__item.active .accordion__icon { transform: rotate(180deg); }
.accordion__body {
    padding: 0; max-height: 0; overflow: hidden; transition: all var(--transition-normal); background: white;
}
.accordion__item.active .accordion__body { padding: 1.25rem; max-height: 300px; border-top: 1px solid var(--color-gray-100); }
.accordion__body p { color: var(--color-text-secondary); margin-bottom: 0.5rem; }

/* ======== FEATURES ======== */
.features { background: var(--color-primary-950); color: white; }
.features .section-title h2 { color: white; }
.features .section-title p { color: var(--color-gray-300); }

.features-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)); gap: 2rem; }
.feature-card { text-align: center; padding: 2rem; border-radius: var(--radius-xl); background: rgba(255,255,255,0.05); border: 1px solid rgba(255,255,255,0.1); }
.feature-card__icon {
    width: 80px; height: 80px; background: rgba(255,255,255,0.1); border-radius: 50%;
    display: flex; align-items: center; justify-content: center; margin: 0 auto 1.5rem; color: var(--color-accent-100);
}
.feature-card h3 { font-size: 1.3rem; margin-bottom: 1rem; color: white; }
.feature-card p { color: var(--color-gray-300); }

/* ======== FOOTER ======== */
.footer { background: white; border-top: 1px solid var(--color-gray-200); padding-top: 4rem; }
.footer__grid { display: grid; grid-template-columns: 2fr 1fr 1.5fr; gap: 3rem; margin-bottom: 3rem; }
.footer__desc { color: var(--color-gray-500); margin-top: 1rem; }
.footer__title { font-size: 1.2rem; color: var(--color-primary-900); margin-bottom: 1.5rem; }
.footer__links ul { display: flex; flex-direction: column; gap: 0.75rem; }
.footer__links a { color: var(--color-gray-600); transition: color var(--transition-fast); }
.footer__links a:hover { color: var(--color-primary-600); }
.footer__contact li { display: flex; align-items: center; gap: 0.75rem; margin-bottom: 1rem; color: var(--color-gray-600); }
.footer__contact svg { color: var(--color-primary-600); }

.footer__bottom {
    text-align: center; padding: 2rem 0; border-top: 1px solid var(--color-gray-100); color: var(--color-gray-500); font-size: 0.95rem;
}

/* ======== MEDIA QUERIES ======== */
@media (max-width: 991px) {
    .hero__inner { grid-template-columns: 1fr; text-align: center; gap: 2rem; }
    .hero__actions { justify-content: center; flex-wrap: wrap; }
    .hero__stats-card { position: relative; bottom: 0; left: 0; justify-content: center; margin-top: 2rem; }
    .hero__image-card { transform: rotate(0); }
    .benefits__grid { grid-template-columns: 1fr; }
    .footer__grid { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 768px) {
    .header__nav {
        position: absolute; top: 100%; left: 0; width: 100%; background: white;
        padding: 2rem; box-shadow: var(--shadow-md); clip-path: polygon(0 0, 100% 0, 100% 0, 0 0); transition: clip-path var(--transition-normal);
    }
    .header__nav.active { clip-path: polygon(0 0, 100% 0, 100% 100%, 0 100%); }
    .header__nav-list { flex-direction: column; align-items: center; }
    .header__burger { display: flex; }
    .header__cta { display: none; }
    .hero__title { font-size: 2rem; }
    .footer__grid { grid-template-columns: 1fr; text-align: center; }
}

/* ======== STICKY WHATSAPP BUTTON ======== */
.whatsapp-sticky {
    position: fixed;
    bottom: 30px;
    right: 30px;
    width: 60px;
    height: 60px;
    background-color: #25D366;
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 15px rgba(37, 211, 102, 0.4);
    z-index: 1000;
    transition: all 0.3s ease;
    text-decoration: none;
}
.whatsapp-sticky:hover {
    transform: scale(1.1);
    background-color: #128C7E;
}
.whatsapp-sticky__pulse {
    position: absolute;
    top: 0; left: 0; width: 100%; height: 100%;
    border-radius: 50%;
    border: 2px solid #25D366;
    animation: pulse 2s infinite;
}
@keyframes pulse {
    0% { transform: scale(1); opacity: 1; }
    100% { transform: scale(1.5); opacity: 0; }
}
