@import url('https://fonts.googleapis.com/css2?family=Almarai:wght@300;400;700;800&family=Outfit:wght@300;400;600;800&display=swap');

:root {
    --primary: #ef233c; /* Bright Vivid Red */
    --primary-dark: #d90429;
    --secondary: #2b2d42; /* Deep Navy */
    --accent: #00b4d8; /* Medical Blue */
    --success: #2a9d8f;
    --warning: #f4a261;
    --light: #edf2f4;
    --white: #ffffff;
    --glass: rgba(255, 255, 255, 0.85);
    --shadow-sm: 0 4px 6px rgba(0, 0, 0, 0.05);
    --shadow-md: 0 10px 30px rgba(0, 0, 0, 0.1);
    --transition: all 0.4s cubic-bezier(0.165, 0.84, 0.44, 1);
    --gradient-red: linear-gradient(135deg, #ef233c 0%, #d90429 100%);
    --gradient-dark: linear-gradient(135deg, #2b2d42 0%, #1a1c2c 100%);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Almarai', 'Outfit', sans-serif;
}

body {
    background-color: #f0f2f5;
    color: var(--secondary);
    line-height: 1.6;
    direction: rtl;
    text-align: right;
    overflow-x: hidden;
    word-wrap: break-word;
}

/* Glassmorphism Header */
header {
    background: var(--glass);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    padding: 1.2rem 8%;
    display: flex;
    justify-content: space-between;
    align-items: center;
    box-shadow: var(--shadow-sm);
    position: sticky;
    top: 0;
    z-index: 1000;
    border-bottom: 1px solid rgba(255, 255, 255, 0.3);
}

.logo {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 1.5rem;
    font-weight: 800;
    background: var(--gradient-red);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    text-decoration: none;
}

.logo img {
    height: 40px;
    width: auto;
    object-fit: contain;
}

nav ul {
    display: flex;
    list-style: none;
    gap: 25px;
}

nav ul li a {
    text-decoration: none;
    color: var(--secondary);
    font-weight: 700;
    position: relative;
    padding: 5px 0;
    transition: var(--transition);
}

nav ul li a::after {
    content: '';
    position: absolute;
    width: 0;
    height: 3px;
    bottom: -5px;
    right: 0;
    background-color: var(--primary);
    transition: var(--transition);
}

nav ul li a:hover::after,
nav ul li a.active::after {
    width: 100%;
}

nav ul li a:hover,
nav ul li a.active {
    color: var(--primary);
}

nav ul li a i {
    display: none; /* Hide icons on desktop */
}

/* Hero Section Refinement */
.hero {
    position: relative;
    overflow: hidden;
    padding: 120px 8%;
    background: var(--gradient-dark);
    color: var(--white);
    border-radius: 0 0 60px 60px;
}

.hero::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, rgba(239, 35, 60, 0.1) 0%, transparent 70%);
    z-index: 0;
}

.hero-content {
    position: relative;
    z-index: 1;
    max-width: 900px;
}

.hero-title {
    font-size: 3.2rem;
    line-height: 1.2;
    font-weight: 800;
    margin-bottom: 25px;
    text-shadow: 0 10px 20px rgba(0,0,0,0.2);
}

.hero-subtitle {
    font-size: 1.15rem;
    opacity: 0.9;
    margin-bottom: 35px;
    max-width: 600px;
}

/* Modern Cards */
.card {
    background: var(--white);
    padding: 3rem 2rem;
    border-radius: 24px;
    box-shadow: var(--shadow-md);
    transition: var(--transition);
    border: 1px solid rgba(0,0,0,0.02);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 20px;
    text-align: center;
}

.card:hover {
    transform: translateY(-15px) scale(1.02);
    box-shadow: 0 20px 40px rgba(0,0,0,0.15);
}

.card-icon-wrapper {
    width: 80px;
    height: 80px;
    background: #fff0f0;
    border-radius: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: var(--transition);
}

.card:hover .card-icon-wrapper {
    background: var(--primary);
    transform: rotate(10deg);
}

.card:hover .card-icon-wrapper i {
    color: white;
}

.card i {
    font-size: 2.5rem;
    color: var(--primary);
}

/* Buttons */
.btn {
    padding: 1.2rem 3rem;
    border-radius: 100px;
    font-weight: 800;
    font-size: 1rem;
    cursor: pointer;
    transition: var(--transition);
    display: inline-flex;
    align-items: center;
    gap: 12px;
    text-decoration: none;
    border: none;
}

.btn-primary {
    background: var(--gradient-red);
    color: white;
    box-shadow: 0 8px 25px rgba(239, 35, 60, 0.3);
}

.btn-primary:hover {
    transform: translateY(-5px);
    box-shadow: 0 12px 30px rgba(239, 35, 60, 0.5);
}

.btn-glass {
    background: rgba(255, 255, 255, 0.1);
    color: white;
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.btn-glass:hover {
    background: rgba(255, 255, 255, 0.2);
    transform: translateY(-5px);
}

/* Content Blocks */
.container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 8%;
}

.section {
    padding: 100px 0;
}

.section-tag {
    color: var(--primary);
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 2px;
    display: block;
    margin-bottom: 15px;
}

.section-title {
    font-size: 2.2rem;
    margin-bottom: 30px;
    font-weight: 800;
    color: var(--secondary);
}

/* Grid Layouts */
.grid-3 {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 40px;
}

/* Animations */
@keyframes fadeInUp {
    from { opacity: 0; transform: translateY(40px); }
    to { opacity: 1; transform: translateY(0); }
}

.animate {
    animation: fadeInUp 0.8s ease forwards;
}

/* Emergency Stats/Quick Info */
.stats-banner {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 30px;
    margin-top: -60px;
    position: relative;
    z-index: 10;
}

.stat-item {
    background: var(--white);
    padding: 2.5rem;
    border-radius: 30px;
    box-shadow: var(--shadow-md);
    text-align: center;
}

.stat-num {
    font-size: 2.2rem;
    font-weight: 900;
    color: var(--primary);
    display: block;
}

.stat-label {
    font-weight: 700;
    color: var(--secondary);
    opacity: 0.7;
}

/* Footer Premium */
footer {
    background: var(--secondary);
    color: var(--white);
    padding: 80px 8% 40px;
    border-radius: 60px 60px 0 0;
}

.footer-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 60px;
    margin-bottom: 60px;
}

.footer-logo {
    font-size: 2rem;
    font-weight: 800;
    margin-bottom: 25px;
    display: flex;
    align-items: center;
    gap: 12px;
    color: var(--white);
    text-decoration: none;
    transition: var(--transition);
}

.footer-logo:hover {
    color: var(--primary);
}

.footer-logo i {
    color: var(--primary);
}

.social-links {
    display: flex;
    gap: 15px;
}

.social-icon {
    width: 45px;
    height: 45px;
    border-radius: 12px;
    background: rgba(255,255,255,0.05);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    color: white;
    transition: var(--transition);
}

.social-icon:hover {
    background: var(--primary);
    transform: translateY(-5px);
}

/* Helper Classes for Responsiveness */
.emergency-btn-header {
    padding: 0.8rem 1.5rem;
    font-size: 0.9rem;
}

.responsive-grid-2 {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: 60px;
    align-items: center;
}

.description-text {
    font-size: 1.05rem;
    margin-bottom: 30px;
}

.info-box-light {
    background: white;
    padding: 30px;
    border-radius: 20px;
    box-shadow: var(--shadow-sm);
    border-right: 5px solid var(--primary);
}

.feature-list {
    list-style: none;
    padding-right: 0;
}

.feature-list li {
    margin-bottom: 15px;
    display: flex;
    align-items: center;
    gap: 12px;
}

.feature-list li i {
    color: var(--success);
    font-size: 1.2rem;
}

.image-wrapper {
    position: relative;
}

.main-img {
    width: 100%;
    border-radius: 40px;
    box-shadow: var(--shadow-md);
}

.floating-badge {
    position: absolute;
    bottom: -20px;
    right: -20px;
    background: var(--primary);
    color: white;
    padding: 30px;
    border-radius: 24px;
    box-shadow: var(--shadow-md);
}

.cta-banner-dark {
    background: var(--gradient-dark);
    border-radius: 50px;
    padding: 50px;
    color: white;
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 40px;
}

.cta-content {
    flex: 1;
    min-width: 300px;
}

.cta-title {
    font-size: 1.8rem;
    margin-bottom: 20px;
}

.cta-text {
    font-size: 1.1rem;
    opacity: 0.8;
    margin-bottom: 30px;
}

.cta-images {
    flex: 1;
    min-width: 300px;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
}

.cta-images img {
    width: 100%;
    border-radius: 20px;
}

.page-hero-small {
    padding: 80px 8%;
    border-radius: 0 0 40px 40px;
}

.hero-title-about {
    font-size: 2.5rem;
}

.cta-banner-light-responsive {
    background: white;
    padding: 50px;
    border-radius: 40px;
    box-shadow: var(--shadow-md);
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 40px;
}

.cta-images-single {
    flex: 1;
    min-width: 300px;
}

.rounded-img {
    width: 100%;
    border-radius: 30px;
}

.details-hero {
    height: 400px;
    border-radius: 0;
    display: flex;
    align-items: center;
    justify-content: center;
}

.icon-badge-large {
    font-size: 4rem;
    color: var(--primary);
    margin-bottom: 20px;
    background: white;
    width: 100px;
    height: 100px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 30px;
    box-shadow: var(--shadow-md);
}

.sub-title-detail {
    font-size: 1.6rem;
}

.description-text-large {
    font-size: 1.1rem;
    line-height: 2;
    opacity: 0.9;
    margin-bottom: 40px;
}

.color-warning { color: var(--warning) !important; }
.color-success { color: var(--success) !important; }
.color-primary { color: var(--primary) !important; }

.feature-card-small {
    background: #f8f9fa;
    padding: 30px;
    border-radius: 20px;
}

.myth-container-responsive {
    display: grid;
    grid-template-columns: 1fr 1fr;
    background: white;
    border-radius: 40px;
    overflow: hidden;
    box-shadow: var(--shadow-md);
    margin-bottom: 40px;
}

.emergency-notice-large {
    background: #fff0f0;
    border: 2px dashed var(--primary);
    padding: 60px;
    border-radius: 40px;
}

.warning-list-centered {
    list-style: none;
    display: inline-block;
    text-align: right;
    font-size: 1.2rem;
    line-height: 2;
}

.rounded-img-shadow {
    width: 100%;
    border-radius: 30px;
    box-shadow: var(--shadow-md);
    margin-bottom: 40px;
}

@media (max-width: 768px) {
    .page-hero-small { padding: 60px 5%; }
    .hero-title-about { font-size: 2rem; }
    .details-hero { height: auto; padding: 60px 5%; }
    .icon-badge-large { width: 80px; height: 80px; font-size: 2.5rem; }
    .cta-banner-light-responsive, .cta-banner-dark { padding: 30px; gap: 30px; }
    .cta-content, .cta-images, .cta-images-single { min-width: 100%; }
    .location-card { padding: 30px; gap: 20px; flex-direction: column; text-align: center; }
    .location-icon { font-size: 3rem; }
    .kit-box { padding: 30px 20px; }
    .myth-container-responsive { grid-template-columns: 1fr; }
    .emergency-notice-large { padding: 30px 20px; }
    .warning-list-centered { font-size: 1rem; }
}

/* Mobile Navigation Toggle & Actions */
.mobile-nav-toggle {
    display: none !important; /* Force hide on desktop */
    font-size: 1.8rem;
    color: var(--secondary);
    cursor: pointer;
    z-index: 1001;
}

.header-mobile-actions {
    display: flex;
    align-items: center;
    gap: 15px;
}

/* Media Queries */
@media (max-width: 992px) {
    .container { padding: 0 5%; }
    .hero { padding: 80px 5%; }
}
@media (max-width: 768px) {
    header { 
        padding: 0.8rem 5%; 
        display: flex;
        justify-content: space-between;
        align-items: center;
    }
    
    .logo {
        order: 1;
        margin-left: auto; /* Push everything else to the left */
    }

    .header-mobile-actions {
        gap: 16px;
        order: 2;
    }

    .mobile-nav-toggle { 
        display: flex !important; 
        align-items: center;
        justify-content: center;
        width: 42px;
        height: 42px;
        margin: 0;
        font-size: 1.4rem;
        background: #f1f3f5;
        border-radius: 12px;
        order: 2; /* Menu on the far left */
    }

    .header-actions {
        order: 1; /* Button to the right of the menu */
        margin: 0;
    }
    
    .emergency-btn-header span {
        display: none;
    }
    
    .emergency-btn-header {
        padding: 0.8rem !important;
        width: auto !important;
        min-width: 45px;
        height: 45px;
        display: flex;
        align-items: center;
        justify-content: center;
        border-radius: 12px;
    }

    .emergency-btn-header i {
        margin: 0;
        font-size: 1.2rem;
        transform: scaleX(-1); /* Flip icon */
    }
    
    nav {
        position: fixed;
        top: 0;
        right: 0; /* Start from right in RTL */
        width: 300px;
        max-width: 85vw;
        height: 100vh;
        background: #1a1c2c; /* Solid dark color for maximum clarity */
        display: flex;
        flex-direction: column;
        padding: 80px 40px;
        text-align: right;
        transform: translateX(100%); /* Slide right */
        transition: var(--transition);
        z-index: 3000; /* Extremely high inside the header */
        box-shadow: -10px 0 30px rgba(0,0,0,0.5);
        backdrop-filter: none !important;
        -webkit-backdrop-filter: none !important;
    }
    
    nav.active {
        transform: translateX(0);
    }
    
    /* Overlay background */
    .nav-overlay {
        position: fixed;
        top: 0;
        left: 0;
        width: 100%;
        height: 100%;
        background: rgba(0, 0, 0, 0.6);
        backdrop-filter: blur(5px);
        z-index: 950; /* MUST be lower than header (1000) */
        opacity: 0;
        visibility: hidden;
        transition: var(--transition);
    }

    .nav-overlay.active {
        opacity: 1;
        visibility: visible;
    }
    
    nav ul {
        flex-direction: column;
        gap: 20px;
        align-items: flex-start;
    }
    
    nav ul li {
        width: 100%;
        opacity: 0;
        transform: translateX(20px);
        transition: all 0.4s ease;
    }

    nav.active ul li {
        opacity: 1;
        transform: translateX(0);
    }

    /* Staggered animation for menu items */
    nav.active ul li:nth-child(1) { transition-delay: 0.1s; }
    nav.active ul li:nth-child(2) { transition-delay: 0.2s; }
    nav.active ul li:nth-child(3) { transition-delay: 0.3s; }
    nav.active ul li:nth-child(4) { transition-delay: 0.4s; }
    nav.active ul li:nth-child(5) { transition-delay: 0.5s; }
    nav.active ul li:nth-child(6) { transition-delay: 0.6s; }
    nav.active ul li:nth-child(7) { transition-delay: 0.7s; }
    
    nav ul li a {
        font-size: 1.2rem;
        color: rgba(255, 255, 255, 0.8) !important;
        display: flex;
        align-items: center;
        gap: 15px;
        padding: 10px 0;
        border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    }

    nav ul li a:hover,
    nav ul li a.active {
        color: var(--primary) !important;
        padding-right: 10px;
    }

    nav ul li a i {
        display: inline-block; /* Show icons on mobile */
        font-size: 1.1rem;
        width: 20px;
        text-align: center;
    }
    
    .hero-title { 
        font-size: 2.2rem;
        line-height: 1.3;
    }

    .hero-subtitle {
        font-size: 1rem;
    }
    
    .section-title { 
        font-size: 1.8rem;
    }
    
    .section { padding: 60px 0; }
    
    .grid-3 { grid-template-columns: 1fr; }
    
    /* Footer responsiveness */
    footer {
        padding: 60px 5% 30px;
        border-radius: 40px 40px 0 0;
    }
    
    .footer-grid {
        gap: 40px;
    }

    .stats-banner {
        grid-template-columns: 1fr;
        margin-top: 30px; /* Push it down on mobile */
    }
    
    /* Case details overlap fix for tablets/small laptops */
    .case-details-container {
        margin-top: -50px;
    }
    
    .details-hero {
        padding: 80px 5% 100px;
    }
}

@media (max-width: 480px) {
    .container { padding: 0 4%; }
    
    .hero { padding: 50px 4%; }
    
    .hero-title {
        font-size: 1.8rem;
    }
    
    .section-title {
        font-size: 1.5rem;
    }

    [class*="grid-"], .responsive-grid-2 {
        grid-template-columns: 1fr !important;
        gap: 25px !important;
    }

    .card {
        padding: 2rem 1.5rem;
    }
    
    .btn {
        width: 100%;
        justify-content: center;
        padding: 1rem 1.5rem;
    }

    .footer-grid {
        grid-template-columns: 1fr;
    }

    .emergency-card {
        flex-direction: column;
        text-align: center;
        gap: 20px;
        padding: 20px;
    }
    
    .number-box {
        font-size: 2rem;
    }
    
    .case-details-container {
        padding: 30px 20px;
        margin-top: -40px; /* Reduced overlap for very small screens */
        border-radius: 30px;
        position: relative;
        z-index: 5;
    }
    
    .details-hero {
        padding: 60px 4% 110px !important; /* Extra bottom padding for title space */
    }

    .info-list li {
        padding: 15px 45px 15px 15px;
        font-size: 0.85rem;
    }
    
    .info-list li::before {
        right: 12px;
        top: 15px;
        font-size: 1.1rem;
    }

    /* Handle grids with inline min-widths */
    [style*="grid-template-columns"] {
        grid-template-columns: 1fr !important;
    }

    /* Handle flex with wrap */
    [style*="display: flex"][style*="flex-wrap: wrap"] {
        flex-direction: column !important;
    }
}
