/* ==========================================
   Design System & Styling Variables
   ========================================== */
:root {
    /* Color Palette */
    --color-bg: #090d16;
    --color-bg-alt: #111827;
    --color-card-bg: rgba(17, 24, 39, 0.6);
    --color-border: rgba(255, 255, 255, 0.08);
    --color-border-glow: rgba(14, 165, 233, 0.15);
    
    --color-primary: #0ea5e9; /* Teal Accent */
    --color-primary-glow: rgba(14, 165, 233, 0.4);
    --color-secondary: #06b6d4; /* Cyan Accent */
    --color-success: #10b981; /* Clinical Emerald / ISO */
    --color-success-glow: rgba(16, 185, 129, 0.4);
    --color-whatsapp: #25d366;
    --color-whatsapp-glow: rgba(37, 211, 102, 0.3);
    
    --color-text-main: #f8fafc;
    --color-text-muted: #94a3b8;
    --color-text-dark: #64748b;
    
    /* Fonts */
    --font-ar: 'Cairo', sans-serif;
    --font-ku: 'Vazirmatn', 'Noto Sans Arabic', 'Cairo', sans-serif;
    --font-en: 'Outfit', 'Inter', sans-serif;
    
    /* Layout Variables */
    --header-height: 80px;
    --transition-smooth: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    --border-radius-sm: 8px;
    --border-radius-md: 16px;
    --border-radius-lg: 24px;
    --glass-blur: blur(16px);
}

/* ==========================================
   Base styles & Typography
   ========================================== */
* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
    scroll-behavior: smooth;
}

body {
    background-color: var(--color-bg);
    color: var(--color-text-main);
    overflow-x: hidden;
    position: relative;
}

/* Font assignment by language */
html[lang="ar"] body {
    font-family: var(--font-ar);
}

html[lang="ku"] body {
    font-family: var(--font-ku);
}

html[lang="en"] body {
    font-family: var(--font-en);
}

a {
    color: inherit;
    text-decoration: none;
    transition: var(--transition-smooth);
}

button {
    font-family: inherit;
    border: none;
    background: none;
    cursor: pointer;
}

/* ==========================================
   Typography Helpers
   ========================================== */
h1, h2, h3, h4 {
    font-weight: 700;
    line-height: 1.3;
}

p {
    line-height: 1.6;
    color: var(--color-text-muted);
}

/* ==========================================
   Reusable Premium Components
   ========================================== */
.section-container {
    max-width: 1280px;
    margin: 0 auto;
    padding: 100px 24px;
    position: relative;
    z-index: 10;
}

/* Badges */
.badge {
    display: inline-block;
    padding: 6px 14px;
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--color-primary);
    background: rgba(14, 165, 233, 0.08);
    border: 1px solid rgba(14, 165, 233, 0.2);
    border-radius: 50px;
    margin-bottom: 20px;
    backdrop-filter: var(--glass-blur);
}

.badge-accent {
    color: var(--color-success);
    background: rgba(16, 185, 129, 0.08);
    border: 1px solid rgba(16, 185, 129, 0.2);
}

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 14px 28px;
    font-size: 1rem;
    font-weight: 600;
    border-radius: var(--border-radius-sm);
    transition: var(--transition-smooth);
    border: 1px solid transparent;
}

.btn-icon {
    width: 20px;
    height: 20px;
}

.btn-primary {
    background: linear-gradient(135deg, var(--color-primary), var(--color-secondary));
    color: #fff;
    box-shadow: 0 4px 20px rgba(14, 165, 233, 0.3);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 24px rgba(14, 165, 233, 0.5);
}

.btn-secondary {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--color-border);
    color: var(--color-text-main);
    backdrop-filter: var(--glass-blur);
}

.btn-secondary:hover {
    background: rgba(255, 255, 255, 0.07);
    transform: translateY(-2px);
    border-color: rgba(255, 255, 255, 0.2);
}

.btn-teal-glow {
    background: rgba(6, 182, 212, 0.15);
    border: 1px solid rgba(6, 182, 212, 0.3);
    color: var(--color-secondary);
    box-shadow: 0 0 15px rgba(6, 182, 212, 0.1);
}

.btn-teal-glow:hover {
    background: rgba(6, 182, 212, 0.25);
    border-color: rgba(6, 182, 212, 0.5);
    box-shadow: 0 0 20px rgba(6, 182, 212, 0.3);
}

/* Accent Colors */
.text-teal { color: var(--color-primary); }
.text-green { color: var(--color-whatsapp); }
.text-blue { color: #3b82f6; }
.text-purple { color: #a855f7; }
.text-amber { color: #f59e0b; }
.text-rose { color: #f43f5e; }
.text-indigo { color: #6366f1; }

/* Background Glow Effects */
.hero-glow-1, .hero-glow-2, .features-glow-1, .faq-glow, .trial-glow {
    position: absolute;
    border-radius: 50%;
    filter: blur(120px);
    z-index: 1;
    pointer-events: none;
    opacity: 0.15;
}

.hero-glow-1 {
    width: 400px;
    height: 400px;
    background: var(--color-primary);
    top: 10%;
    right: 5%;
}

.hero-glow-2 {
    width: 350px;
    height: 350px;
    background: var(--color-success);
    bottom: 10%;
    left: 5%;
}

.features-glow-1 {
    width: 500px;
    height: 500px;
    background: #6366f1;
    top: 30%;
    left: 10%;
}

.trial-glow {
    width: 600px;
    height: 600px;
    background: var(--color-success);
    top: 20%;
    right: 10%;
    opacity: 0.1;
}

.faq-glow {
    width: 400px;
    height: 400px;
    background: var(--color-primary);
    bottom: 5%;
    right: 5%;
}

/* ==========================================
   Header / Sticky Navbar
   ========================================== */
.main-header {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: var(--header-height);
    background: rgba(9, 13, 22, 0.7);
    backdrop-filter: var(--glass-blur);
    border-bottom: 1px solid var(--color-border);
    z-index: 1000;
    transition: var(--transition-smooth);
}

.main-header.scrolled {
    background: rgba(9, 13, 22, 0.9);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
    border-bottom-color: rgba(255, 255, 255, 0.12);
}

.header-container {
    max-width: 1280px;
    margin: 0 auto;
    height: 100%;
    padding: 0 24px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.logo-area {
    display: flex;
    align-items: center;
    gap: 12px;
}

.logo-icon-wrap {
    width: 40px;
    height: 40px;
    background: linear-gradient(135deg, var(--color-primary), var(--color-secondary));
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 15px var(--color-primary-glow);
}

.logo-icon {
    width: 22px;
    height: 22px;
    color: #fff;
}

.logo-text {
    font-size: 1.3rem;
    font-weight: 800;
    letter-spacing: -0.5px;
    background: linear-gradient(135deg, #fff, #94a3b8);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

/* Pulse Animation for Logo Icon */
.pulse-animation {
    animation: heartbeat 2s infinite ease-in-out;
}

@keyframes heartbeat {
    0%, 100% { transform: scale(1); }
    30% { transform: scale(1.15); }
    45% { transform: scale(1); }
    60% { transform: scale(1.15); }
}

.nav-links {
    display: flex;
    align-items: center;
    gap: 32px;
}

.nav-link {
    font-size: 0.95rem;
    font-weight: 500;
    color: var(--color-text-muted);
    position: relative;
    padding: 8px 0;
}

.nav-link:hover, .nav-link.active {
    color: var(--color-text-main);
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--color-primary);
    transition: var(--transition-smooth);
}

html[dir="rtl"] .nav-link::after {
    left: auto;
    right: 0;
}

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

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

.header-cta {
    background: var(--color-primary);
    color: #fff;
    padding: 8px 20px;
    border-radius: 6px;
    font-weight: 600;
    font-size: 0.9rem;
    box-shadow: 0 4px 12px var(--color-primary-glow);
}

.header-cta:hover {
    background: var(--color-secondary);
    transform: translateY(-1px);
    box-shadow: 0 6px 16px var(--color-primary-glow);
}

/* Language Dropdown Selector */
.lang-selector-wrapper {
    position: relative;
}

.lang-select-btn {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 14px;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--color-border);
    border-radius: 8px;
    color: var(--color-text-muted);
    font-size: 0.9rem;
    font-weight: 600;
    transition: var(--transition-smooth);
}

.lang-select-btn:hover {
    background: rgba(255, 255, 255, 0.08);
    border-color: rgba(255, 255, 255, 0.2);
    color: var(--color-text-main);
}

.globe-icon, .chevron-icon {
    width: 16px;
    height: 16px;
}

.lang-dropdown {
    position: absolute;
    top: calc(100% + 8px);
    right: 0;
    background: rgba(17, 24, 39, 0.95);
    border: 1px solid var(--color-border);
    border-radius: 8px;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.4);
    min-width: 130px;
    padding: 6px;
    display: flex;
    flex-direction: column;
    gap: 4px;
    opacity: 0;
    transform: translateY(-10px);
    pointer-events: none;
    transition: var(--transition-smooth);
    z-index: 1100;
    backdrop-filter: var(--glass-blur);
}

html[dir="rtl"] .lang-dropdown {
    right: auto;
    left: 0;
}

.lang-dropdown.show {
    opacity: 1;
    transform: translateY(0);
    pointer-events: auto;
}

.lang-opt {
    padding: 8px 14px;
    border-radius: 6px;
    font-size: 0.9rem;
    font-weight: 500;
    text-align: start;
    color: var(--color-text-muted);
    transition: var(--transition-smooth);
    width: 100%;
}

.lang-opt:hover, .lang-opt.active {
    background: rgba(14, 165, 233, 0.1);
    color: var(--color-primary);
}

/* Mobile Nav Toggle */
.mobile-nav-toggle {
    display: none;
    color: var(--color-text-main);
    padding: 6px;
}

/* ==========================================
   Hero Section Layout
   ========================================== */
.hero-section {
    padding-top: calc(var(--header-height) + 40px);
    position: relative;
}

.hero-grid {
    display: grid;
    grid-template-columns: 1.2fr 1fr;
    gap: 48px;
    align-items: center;
}

.hero-content {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
}

.hero-title {
    font-size: 2.7rem;
    line-height: 1.25;
    margin-bottom: 24px;
    background: linear-gradient(135deg, #fff 40%, #94a3b8);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.hero-subtitle {
    font-size: 1.2rem;
    font-weight: 500;
    margin-bottom: 16px;
    color: var(--color-text-main);
}

.hero-desc {
    font-size: 1rem;
    margin-bottom: 30px;
}

.hero-points {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-bottom: 36px;
    width: 100%;
}

.hero-points li {
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 1rem;
    font-weight: 500;
}

.point-icon {
    width: 22px;
    height: 22px;
    flex-shrink: 0;
}

.hero-ctas {
    display: flex;
    gap: 16px;
    flex-wrap: wrap;
}

/* ==========================================
   Interactive Simulator Card (Right Hero)
   ========================================== */
.simulator-card {
    background: var(--color-card-bg);
    border: 1px solid var(--color-border);
    border-radius: var(--border-radius-lg);
    overflow: hidden;
    backdrop-filter: var(--glass-blur);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.4), 
                inset 0 1px 0 rgba(255, 255, 255, 0.05);
    position: relative;
    z-index: 10;
}

.sim-header {
    background: rgba(9, 13, 22, 0.5);
    padding: 16px 20px;
    border-bottom: 1px solid var(--color-border);
    display: flex;
    align-items: center;
    gap: 16px;
}

.sim-dots {
    display: flex;
    gap: 6px;
}

.sim-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
}

.dot-red { background-color: #ef4444; }
.dot-yellow { background-color: #f59e0b; }
.dot-green { background-color: #10b981; }

.sim-title {
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--color-text-dark);
}

.sim-body {
    padding: 24px;
}

.sim-controls {
    display: flex;
    gap: 16px;
    margin-bottom: 30px;
    align-items: flex-end;
    flex-wrap: wrap;
}

.sim-input-group {
    display: flex;
    flex-direction: column;
    gap: 8px;
    flex-grow: 1;
}

.sim-input-group label {
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--color-text-muted);
}

.sim-input-group input {
    background: rgba(0, 0, 0, 0.2);
    border: 1px solid var(--color-border);
    color: var(--color-primary);
    padding: 12px 16px;
    border-radius: var(--border-radius-sm);
    font-family: monospace;
    font-size: 1rem;
    font-weight: 600;
    letter-spacing: 0.5px;
    outline: none;
    text-align: center;
}

/* Progress Timeline */
.sim-timeline {
    position: relative;
    display: flex;
    justify-content: space-between;
    margin-bottom: 30px;
    padding-top: 10px;
}

.sim-progress-bar {
    position: absolute;
    top: 30px;
    left: 20px;
    right: 20px;
    height: 4px;
    background: rgba(255, 255, 255, 0.05);
    z-index: 1;
}

.sim-progress-fill {
    width: 0%;
    height: 100%;
    background: linear-gradient(90deg, var(--color-primary), var(--color-success));
    transition: width 0.1s linear;
}

.sim-node {
    position: relative;
    z-index: 2;
    display: flex;
    flex-direction: column;
    align-items: center;
    width: 80px;
}

.node-icon-wrap {
    width: 44px;
    height: 44px;
    background: var(--color-bg-alt);
    border: 2px solid var(--color-border);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--color-text-dark);
    margin-bottom: 10px;
    transition: var(--transition-smooth);
}

.node-icon {
    width: 20px;
    height: 20px;
}

.node-label {
    font-size: 0.75rem;
    font-weight: 700;
    color: var(--color-text-dark);
    text-align: center;
    white-space: nowrap;
    margin-bottom: 4px;
}

.node-time {
    font-size: 0.65rem;
    color: var(--color-text-dark);
    font-family: monospace;
}

/* Simulator States */
.sim-node.active .node-icon-wrap {
    color: var(--color-primary);
    border-color: var(--color-primary);
    box-shadow: 0 0 15px var(--color-primary-glow);
}

.sim-node.active .node-label {
    color: var(--color-primary);
}

.sim-node.completed .node-icon-wrap {
    color: #fff;
    border-color: var(--color-success);
    background: var(--color-success);
    box-shadow: 0 0 15px var(--color-success-glow);
}

.sim-node.completed .node-label {
    color: var(--color-success);
}

/* Pulsing node state */
.animate-pulse-teal {
    animation: pulse-node 1.5s infinite;
}

@keyframes pulse-node {
    0%, 100% { box-shadow: 0 0 0 0 rgba(6, 182, 212, 0.4); }
    50% { box-shadow: 0 0 0 8px rgba(6, 182, 212, 0); }
}

/* Log Panel */
.sim-log-panel {
    background: rgba(0, 0, 0, 0.25);
    border: 1px solid var(--color-border);
    border-radius: var(--border-radius-sm);
    padding: 16px;
    font-family: monospace;
    font-size: 0.8rem;
    color: var(--color-text-muted);
}

.log-title {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 12px;
    color: var(--color-text-main);
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    padding-bottom: 8px;
    font-weight: 600;
}

.log-icon {
    width: 14px;
    height: 14px;
}

.log-output {
    display: flex;
    flex-direction: column;
    gap: 8px;
    max-height: 120px;
    overflow-y: auto;
    padding-inline-start: 4px;
}

.log-entry {
    line-height: 1.4;
}

.log-time {
    color: var(--color-primary);
    margin-inline-end: 6px;
}

.log-highlight {
    color: var(--color-success);
    font-weight: bold;
}

/* Certificate Mockup (End of Sim) */
.certificate-mockup {
    margin-top: 20px;
    background: linear-gradient(135deg, rgba(16, 185, 129, 0.1), rgba(6, 182, 212, 0.1));
    border: 1px dashed rgba(16, 185, 129, 0.4);
    border-radius: var(--border-radius-sm);
    padding: 16px;
    display: flex;
    align-items: center;
    gap: 16px;
    animation: slideUpFade 0.4s ease-out;
}

.certificate-mockup.hidden {
    display: none !important;
}

.cert-check {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: var(--color-success);
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    flex-shrink: 0;
}

.cert-icon-check {
    width: 24px;
    height: 24px;
}

.cert-content {
    flex-grow: 1;
}

.cert-content h4 {
    color: var(--color-success);
    font-size: 0.95rem;
    margin-bottom: 4px;
}

.cert-content p {
    font-size: 0.8rem;
    color: var(--color-text-muted);
}

.btn-cert-download {
    width: 36px;
    height: 36px;
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--color-border);
    color: var(--color-text-main);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: var(--transition-smooth);
}

.btn-cert-download:hover {
    background: var(--color-success);
    color: #fff;
    border-color: var(--color-success);
}

@keyframes slideUpFade {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* ==========================================
   Features Section
   ========================================== */
.features-section {
    position: relative;
    background-color: var(--color-bg-alt);
}

.section-header {
    max-width: 700px;
    margin: 0 auto 60px auto;
    text-align: center;
}

.section-header-left {
    margin-bottom: 40px;
}

.section-title {
    font-size: 2.3rem;
    margin-bottom: 16px;
    background: linear-gradient(135deg, #fff, #94a3b8);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.section-subtitle {
    font-size: 1.05rem;
}

.features-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 24px;
    margin-bottom: 50px;
}

.feature-card {
    background: var(--color-card-bg);
    border: 1px solid var(--color-border);
    border-radius: var(--border-radius-md);
    padding: 36px;
    backdrop-filter: var(--glass-blur);
    transition: var(--transition-smooth);
    display: flex;
    flex-direction: column;
    position: relative;
    overflow: hidden;
}

/* Card hover glow accent */
.feature-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 4px;
    background: transparent;
    transition: var(--transition-smooth);
}

.feature-card:hover {
    transform: translateY(-8px);
    border-color: var(--color-border-glow);
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.4), 
                0 0 20px rgba(14, 165, 233, 0.1);
}

.feature-card:hover::before {
    background: linear-gradient(90deg, var(--color-primary), var(--color-secondary));
}

.feature-icon-wrap {
    width: 60px;
    height: 60px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 24px;
}

.feature-icon {
    width: 28px;
    height: 28px;
}

/* Colors for Feature Cards Icon wraps */
.color-blue { background: rgba(59, 130, 246, 0.1); color: #3b82f6; }
.color-purple { background: rgba(168, 85, 247, 0.1); color: #a855f7; }
.color-amber { background: rgba(245, 158, 11, 0.1); color: #f59e0b; }
.color-teal { background: rgba(14, 165, 233, 0.1); color: #0ea5e9; }
.color-rose { background: rgba(244, 63, 94, 0.1); color: #f43f5e; }
.color-indigo { background: rgba(99, 102, 241, 0.1); color: #6366f1; }

.feature-card-title {
    font-size: 1.25rem;
    margin-bottom: 16px;
    color: var(--color-text-main);
}

.feature-card-desc {
    font-size: 0.95rem;
    margin-bottom: 24px;
    flex-grow: 1;
}

.feature-bullets {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.feature-bullets li {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    font-size: 0.9rem;
    font-weight: 500;
    color: var(--color-text-muted);
}

.bullet-check {
    width: 16px;
    height: 16px;
    flex-shrink: 0;
    margin-top: 3px;
}

.section-cta-footer {
    display: flex;
    justify-content: center;
    gap: 16px;
    flex-wrap: wrap;
    margin-top: 40px;
}

/* ==========================================
   Free Trial Section
   ========================================== */
.trial-section {
    position: relative;
    background-color: var(--color-bg);
}

.trial-card-wrapper {
    position: relative;
    z-index: 10;
}

.trial-card {
    background: radial-gradient(100% 100% at 50% 0%, rgba(14, 165, 233, 0.08) 0%, rgba(9, 13, 22, 0) 100%), 
                var(--color-card-bg);
    border: 1px solid var(--color-border);
    border-radius: var(--border-radius-lg);
    padding: 60px;
    backdrop-filter: var(--glass-blur);
    text-align: center;
    box-shadow: 0 30px 60px rgba(0, 0, 0, 0.5);
    max-width: 1000px;
    margin: 0 auto;
}

.trial-title {
    font-size: 2.5rem;
    margin-bottom: 16px;
    background: linear-gradient(135deg, #fff, #94a3b8);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.trial-subtitle {
    font-size: 1.2rem;
    font-weight: 600;
    color: var(--color-primary);
    margin-bottom: 24px;
}

.trial-desc {
    max-width: 750px;
    margin: 0 auto 40px auto;
    font-size: 1.05rem;
}

.trial-perks-grid {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 20px;
    margin-bottom: 50px;
}

.perk-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
}

.perk-icon-circle {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background: rgba(16, 185, 129, 0.1);
    border: 1px solid rgba(16, 185, 129, 0.2);
    color: var(--color-success);
    display: flex;
    align-items: center;
    justify-content: center;
}

.perk-icon-circle i {
    width: 22px;
    height: 22px;
}

.perk-item span {
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--color-text-muted);
}

.trial-cta-block {
    background: rgba(0, 0, 0, 0.2);
    border: 1px solid var(--color-border);
    border-radius: var(--border-radius-md);
    padding: 36px;
    max-width: 600px;
    margin: 0 auto;
}

.trial-cta-title {
    font-size: 1.3rem;
    margin-bottom: 10px;
    color: #fff;
}

.trial-cta-desc {
    font-size: 0.95rem;
    margin-bottom: 24px;
    color: var(--color-text-muted);
}

.btn-whatsapp-large {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    padding: 16px 36px;
    font-size: 1.1rem;
    font-weight: 700;
    border-radius: var(--border-radius-sm);
    color: #fff;
    background-color: var(--color-whatsapp);
    box-shadow: 0 4px 20px var(--color-whatsapp-glow);
    transition: var(--transition-smooth);
}

.btn-whatsapp-large:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 24px var(--color-whatsapp-glow);
    background-color: #20ba56;
}

.wa-svg-icon {
    width: 24px;
    height: 24px;
}

/* ==========================================
   FAQ & Contact Combined Section
   ========================================== */
.faq-section {
    position: relative;
    background-color: var(--color-bg-alt);
}

.faq-grid-layout {
    display: grid;
    grid-template-columns: 1.2fr 1fr;
    gap: 60px;
    align-items: start;
}

.faq-accordion {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.faq-item {
    background: var(--color-card-bg);
    border: 1px solid var(--color-border);
    border-radius: var(--border-radius-sm);
    overflow: hidden;
    backdrop-filter: var(--glass-blur);
    transition: var(--transition-smooth);
}

.faq-item:hover, .faq-item.open {
    border-color: var(--color-border-glow);
}

.faq-question {
    width: 100%;
    padding: 20px 24px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    text-align: start;
    font-size: 1.05rem;
    font-weight: 700;
    color: var(--color-text-main);
    transition: var(--transition-smooth);
}

.faq-icon {
    width: 18px;
    height: 18px;
    color: var(--color-primary);
    transition: transform 0.3s ease;
}

.faq-item.open .faq-icon {
    transform: rotate(45deg);
}

.faq-answer {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    padding: 0 24px;
}

.faq-item.open .faq-answer {
    padding-bottom: 20px;
}

.faq-answer p {
    font-size: 0.95rem;
    color: var(--color-text-muted);
}

/* Contact Card Styling (Right FAQ) */
.contact-card-area {
    position: sticky;
    top: calc(var(--header-height) + 20px);
}

.contact-card {
    background: linear-gradient(135deg, rgba(14, 165, 233, 0.05), rgba(9, 13, 22, 0.5)), 
                var(--color-card-bg);
    border: 1px solid var(--color-border);
    border-radius: var(--border-radius-lg);
    padding: 40px;
    backdrop-filter: var(--glass-blur);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.3);
    position: relative;
    overflow: hidden;
}

.contact-card-glow {
    position: absolute;
    width: 200px;
    height: 200px;
    background: var(--color-primary);
    top: -50px;
    right: -50px;
    filter: blur(80px);
    opacity: 0.15;
    pointer-events: none;
}

.contact-icon-wrap {
    width: 64px;
    height: 64px;
    border-radius: 16px;
    background: rgba(14, 165, 233, 0.08);
    border: 1px solid rgba(14, 165, 233, 0.2);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--color-primary);
    margin-bottom: 24px;
}

.contact-main-icon {
    width: 32px;
    height: 32px;
}

.contact-title {
    font-size: 1.6rem;
    margin-bottom: 12px;
    color: #fff;
}

.contact-subtitle {
    font-size: 0.95rem;
    margin-bottom: 30px;
}

.contact-method {
    background: rgba(0, 0, 0, 0.2);
    border: 1px solid var(--color-border);
    border-radius: var(--border-radius-md);
    padding: 24px;
}

.method-header {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 10px;
}

.method-icon {
    width: 20px;
    height: 20px;
}

.method-name {
    font-size: 1rem;
    font-weight: 700;
    color: #fff;
}

.method-desc {
    font-size: 0.9rem;
    color: var(--color-text-muted);
    margin-bottom: 20px;
}

.contact-whatsapp-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    width: 100%;
    padding: 14px 20px;
    font-size: 1.1rem;
    font-weight: 700;
    border-radius: var(--border-radius-sm);
    color: #fff;
    background-color: var(--color-whatsapp);
    box-shadow: 0 4px 15px var(--color-whatsapp-glow);
    transition: var(--transition-smooth);
}

.contact-whatsapp-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px var(--color-whatsapp-glow);
    background-color: #20ba56;
}

/* ==========================================
   Footer
   ========================================== */
.main-footer {
    background-color: var(--color-bg);
    border-top: 1px solid var(--color-border);
    padding: 60px 0 30px 0;
}

.footer-container {
    max-width: 1280px;
    margin: 0 auto;
    padding: 0 24px;
    display: grid;
    grid-template-columns: 1.5fr 1fr 1fr;
    gap: 48px;
    margin-bottom: 40px;
}

.footer-tagline {
    font-size: 0.95rem;
    margin-top: 16px;
    max-width: 350px;
}

.footer-link-title {
    font-size: 1rem;
    font-weight: 700;
    color: #fff;
    margin-bottom: 20px;
}

.footer-links {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.footer-links a {
    color: var(--color-text-muted);
    font-size: 0.9rem;
}

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

.footer-bottom {
    max-width: 1280px;
    margin: 0 auto;
    padding: 30px 24px 0 24px;
    border-top: 1px solid rgba(255, 255, 255, 0.05);
    text-align: center;
}

.footer-bottom p {
    font-size: 0.85rem;
    color: var(--color-text-dark);
}

/* ==========================================
   Floating WhatsApp Button
   ========================================== */
.floating-whatsapp-widget {
    position: fixed;
    bottom: 30px;
    right: 30px;
    z-index: 999;
    display: flex;
    align-items: center;
    gap: 12px;
    pointer-events: none;
}

html[dir="rtl"] .floating-whatsapp-widget {
    right: auto;
    left: 30px;
    flex-direction: row-reverse;
}

.wa-float-btn {
    pointer-events: auto;
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background-color: var(--color-whatsapp);
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3), 
                0 0 0 0 rgba(37, 211, 102, 0.4);
    animation: wa-pulse 2s infinite;
    transition: var(--transition-smooth);
}

.wa-float-btn:hover {
    transform: scale(1.1) rotate(10deg);
}

.wa-svg-icon-float {
    width: 32px;
    height: 32px;
}

/* Pulse animation for floating button */
@keyframes wa-pulse {
    0% {
        box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3), 0 0 0 0 rgba(37, 211, 102, 0.5);
    }
    70% {
        box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3), 0 0 0 15px rgba(37, 211, 102, 0);
    }
    100% {
        box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3), 0 0 0 0 rgba(37, 211, 102, 0);
    }
}

.wa-tooltip {
    background-color: #1f2937;
    border: 1px solid var(--color-border);
    color: #fff;
    padding: 8px 16px;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 600;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
    white-space: nowrap;
    opacity: 0;
    transform: translateY(10px);
    transition: var(--transition-smooth);
    backdrop-filter: var(--glass-blur);
}

.floating-whatsapp-widget:hover .wa-tooltip {
    opacity: 1;
    transform: translateY(0);
}

/* ==========================================
   Responsive Mobile Adjustments
   ========================================== */
@media (max-width: 1024px) {
    .hero-grid {
        grid-template-columns: 1fr;
        gap: 60px;
    }
    
    .hero-content {
        align-items: center;
        text-align: center;
    }
    
    .hero-title {
        font-size: 2.2rem;
    }
    
    .hero-points {
        align-items: center;
    }
    
    .hero-ctas {
        justify-content: center;
    }
    
    .features-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .trial-perks-grid {
        grid-template-columns: repeat(3, 1fr);
    }
    
    .faq-grid-layout {
        grid-template-columns: 1fr;
    }
    
    .contact-card-area {
        position: relative;
        top: 0;
    }
}

@media (max-width: 768px) {
    :root {
        --header-height: 70px;
    }
    
    .section-container {
        padding: 60px 16px;
    }
    
    .main-header {
        position: fixed;
    }
    
    .nav-links {
        position: fixed;
        top: var(--header-height);
        left: -100%;
        width: 100%;
        height: calc(100vh - var(--header-height));
        background: rgba(9, 13, 22, 0.98);
        backdrop-filter: var(--glass-blur);
        flex-direction: column;
        justify-content: center;
        gap: 36px;
        transition: var(--transition-smooth);
        padding: 40px;
        border-top: 1px solid var(--color-border);
    }
    
    html[dir="rtl"] .nav-links {
        left: auto;
        right: -100%;
    }
    
    .nav-links.active {
        left: 0;
    }
    
    html[dir="rtl"] .nav-links.active {
        right: 0;
    }
    
    .mobile-nav-toggle {
        display: block;
    }
    
    .header-actions {
        gap: 12px;
    }
    
    .header-cta {
        display: none; /* Hide secondary cta on header for mobile */
    }
    
    .features-grid {
        grid-template-columns: 1fr;
    }
    
    .trial-card {
        padding: 30px 16px;
    }
    
    .trial-perks-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .footer-container {
        grid-template-columns: 1fr;
        gap: 30px;
    }
}

@media (max-width: 480px) {
    .trial-perks-grid {
        grid-template-columns: 1fr;
        align-items: start;
    }
    
    .perk-item {
        flex-direction: row;
        align-items: center;
        gap: 16px;
    }
    
    .sim-timeline {
        flex-direction: column;
        gap: 20px;
        align-items: flex-start;
        padding-inline-start: 30px;
    }
    
    .sim-progress-bar {
        left: 20px;
        top: 20px;
        bottom: 20px;
        width: 4px;
        height: auto;
    }
    
    .sim-node {
        flex-direction: row;
        width: 100%;
        gap: 16px;
        align-items: center;
    }
    
    .node-icon-wrap {
        margin-bottom: 0;
    }
    
    .node-label {
    }
}

/* ==========================================
   Light Theme Override Variables & Classes
   ========================================== */
body.light-theme {
    --color-bg: #f1f5f9; /* Soft Light Gray background */
    --color-bg-alt: #ffffff; /* pure white secondary bg */
    --color-card-bg: rgba(255, 255, 255, 0.85);
    --color-border: rgba(15, 23, 42, 0.08);
    --color-border-glow: rgba(14, 165, 233, 0.25);
    
    --color-primary-glow: rgba(14, 165, 233, 0.2);
    --color-text-main: #0f172a; /* Slate 900 */
    --color-text-muted: #475569; /* Slate 600 */
    --color-text-dark: #64748b; /* Slate 500 */
}

/* Light Theme Card Borders and Shadows */
body.light-theme .simulator-card,
body.light-theme .feature-card,
body.light-theme .trial-card,
body.light-theme .faq-item,
body.light-theme .contact-card,
body.light-theme .lang-dropdown,
body.light-theme .lang-select-btn,
body.light-theme .sim-log-panel,
body.light-theme .contact-method,
body.light-theme .trial-cta-block,
body.light-theme .sim-role-selector {
    border-color: rgba(15, 23, 42, 0.08);
    box-shadow: 0 10px 25px rgba(15, 23, 42, 0.04),
                inset 0 1px 0 rgba(255, 255, 255, 0.9);
}

body.light-theme .main-header {
    background: rgba(241, 245, 249, 0.8);
    border-bottom-color: rgba(15, 23, 42, 0.08);
}
body.light-theme .main-header.scrolled {
    background: rgba(241, 245, 249, 0.95);
    box-shadow: 0 10px 30px rgba(15, 23, 42, 0.04);
}

body.light-theme .logo-text,
body.light-theme .hero-title,
body.light-theme .section-title,
body.light-theme .trial-title {
    background: none;
    -webkit-background-clip: unset;
    -webkit-text-fill-color: unset;
    color: #0f172a;
}

body.light-theme .sim-header {
    background: rgba(0, 0, 0, 0.02);
}
body.light-theme .sim-input-group input {
    background: rgba(255, 255, 255, 0.8);
    border-color: rgba(15, 23, 42, 0.1);
    color: var(--color-primary);
}
body.light-theme .node-icon-wrap {
    background: #f8fafc;
}
body.light-theme .sim-log-panel {
    background: rgba(0, 0, 0, 0.02);
}

body.light-theme .role-tab:hover {
    background: rgba(0, 0, 0, 0.03);
}

body.light-theme .faq-question {
    color: #0f172a;
}

body.light-theme .faq-answer p {
    color: #475569;
}

/* ==========================================
   Theme Toggle Button Styling
   ========================================== */
.theme-toggle-btn {
    width: 42px;
    height: 42px;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--color-border);
    border-radius: 8px;
    color: var(--color-text-muted);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: var(--transition-smooth);
}

.theme-toggle-btn:hover {
    background: rgba(255, 255, 255, 0.08);
    border-color: rgba(255, 255, 255, 0.2);
    color: var(--color-primary);
    transform: rotate(15deg) scale(1.05);
}

body.light-theme .theme-toggle-btn {
    background: rgba(0, 0, 0, 0.03);
}
body.light-theme .theme-toggle-btn:hover {
    background: rgba(0, 0, 0, 0.06);
    color: var(--color-primary);
}

.theme-icon {
    width: 18px;
    height: 18px;
    transition: var(--transition-smooth);
}

.hidden {
    display: none !important;
}

/* ==========================================
   Dynamic Stats Row Styling (Hero)
   ========================================== */
.hero-stats-row {
    display: flex;
    gap: 40px;
    margin: 10px 0 36px 0;
    width: 100%;
}

.stat-item {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
}

.stat-num-wrapper {
    display: flex;
    align-items: baseline;
}

.stat-number {
    font-size: 2.4rem;
    font-weight: 800;
    color: var(--color-primary);
    font-family: var(--font-en);
}

.stat-suffix {
    font-size: 1.4rem;
    font-weight: 700;
    color: var(--color-secondary);
    margin-inline-start: 2px;
}

.stat-label {
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--color-text-muted);
}

/* ==========================================
   Role Switcher Tabs Styling
   ========================================== */
.sim-role-selector {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 8px;
    margin-bottom: 24px;
    background: rgba(0, 0, 0, 0.2);
    padding: 6px;
    border-radius: 12px;
    border: 1px solid var(--color-border);
}

body.light-theme .sim-role-selector {
    background: rgba(0, 0, 0, 0.03);
}

.role-tab {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 10px 4px;
    font-size: 0.85rem;
    font-weight: 700;
    color: var(--color-text-muted);
    border-radius: 8px;
    transition: var(--transition-smooth);
}

.role-tab-icon {
    width: 16px;
    height: 16px;
}

.role-tab:hover {
    color: var(--color-text-main);
    background: rgba(255, 255, 255, 0.03);
}

.role-tab.active {
    color: #fff !important;
    background: linear-gradient(135deg, var(--color-primary), var(--color-secondary));
    box-shadow: 0 4px 15px var(--color-primary-glow);
}

/* ==========================================
   Director Dashboard Widget Styling
   ========================================== */
.director-dashboard {
    display: flex;
    flex-direction: column;
    gap: 20px;
    animation: slideUpFade 0.4s ease-out;
}

.dir-title-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid var(--color-border);
    padding-bottom: 12px;
}

.dir-title-row h4 {
    font-size: 1.05rem;
    color: #fff;
}

body.light-theme .dir-title-row h4 {
    color: #0f172a;
}

.dir-live-badge {
    font-size: 0.75rem;
    font-weight: 800;
    color: var(--color-success);
    background: rgba(16, 185, 129, 0.1);
    padding: 4px 10px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    gap: 6px;
}

.live-dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background-color: var(--color-success);
}

.dir-metrics-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 12px;
}

.dir-metric-card {
    background: rgba(0, 0, 0, 0.2);
    border: 1px solid var(--color-border);
    padding: 16px 12px;
    border-radius: var(--border-radius-sm);
    display: flex;
    align-items: center;
    gap: 12px;
}

body.light-theme .dir-metric-card {
    background: rgba(0, 0, 0, 0.02);
}

.bg-blue-dim { background: rgba(59, 130, 246, 0.12); }
.bg-purple-dim { background: rgba(168, 85, 247, 0.12); }
.bg-green-dim { background: rgba(16, 185, 129, 0.12); }

.metric-val {
    display: block;
    font-size: 1.3rem;
    font-weight: 800;
    color: #fff;
    font-family: var(--font-en);
}

body.light-theme .metric-val {
    color: #0f172a;
}

.metric-lbl {
    font-size: 0.7rem;
    font-weight: 600;
    color: var(--color-text-muted);
}

.dir-charts-row {
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.dir-chart-card {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.chart-header {
    display: flex;
    justify-content: space-between;
    font-size: 0.8rem;
    font-weight: 700;
}

.chart-title {
    color: var(--color-text-muted);
}

.chart-percent {
    color: var(--color-primary);
    font-family: var(--font-en);
}

.chart-bar-wrap {
    height: 8px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 4px;
    overflow: hidden;
}

body.light-theme .chart-bar-wrap {
    background: rgba(0, 0, 0, 0.05);
}

.chart-bar-fill {
    height: 100%;
    border-radius: 4px;
}

.chart-bar-fill.bg-teal {
    background: linear-gradient(90deg, var(--color-primary), var(--color-secondary));
}

.chart-bar-fill.bg-green {
    background: var(--color-success);
}

.dir-alerts-box {
    background: rgba(14, 165, 233, 0.04);
    border: 1px solid rgba(14, 165, 233, 0.15);
    padding: 12px 16px;
    border-radius: var(--border-radius-sm);
}

.alert-item {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--color-primary);
}

.alert-icon {
    width: 14px;
    height: 14px;
    flex-shrink: 0;
}

/* ==========================================
   Scroll Reveal Animations
   ========================================== */
.reveal {
    opacity: 0;
    transform: translateY(35px);
    transition: opacity 0.8s cubic-bezier(0.16, 1, 0.3, 1),
                transform 0.8s cubic-bezier(0.16, 1, 0.3, 1);
}

.reveal.active {
    opacity: 1;
    transform: translateY(0);
}

/* Delay modifiers for staggered animations */
.reveal-delay-1 { transition-delay: 0.1s; }
.reveal-delay-2 { transition-delay: 0.2s; }
.reveal-delay-3 { transition-delay: 0.3s; }
.reveal-delay-4 { transition-delay: 0.4s; }
.reveal-delay-5 { transition-delay: 0.5s; }

/* Responsive tweaks for new widgets */

/* ==========================================
   Lab ROI Calculator Section Styling
   ========================================== */
.calculator-section {
    position: relative;
    background-color: var(--color-bg);
}

.calculator-glow {
    position: absolute;
    width: 500px;
    height: 500px;
    background: var(--color-primary);
    top: 25%;
    right: 15%;
    filter: blur(140px);
    opacity: 0.08;
    pointer-events: none;
}

.calculator-box {
    background: var(--color-card-bg);
    border: 1px solid var(--color-border);
    border-radius: var(--border-radius-lg);
    padding: 48px;
    backdrop-filter: var(--glass-blur);
    box-shadow: 0 30px 60px rgba(0, 0, 0, 0.4);
    display: flex;
    flex-direction: column;
    gap: 40px;
}

.calc-inputs {
    width: 100%;
}

.calc-input-card {
    background: rgba(0, 0, 0, 0.2);
    border: 1px solid var(--color-border);
    border-radius: var(--border-radius-md);
    padding: 30px;
}

body.light-theme .calc-input-card {
    background: rgba(255, 255, 255, 0.8);
    border-color: rgba(15, 23, 42, 0.1);
}

.calc-label-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}

.calc-input-label {
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--color-text-main);
}

.calc-val-highlight {
    font-size: 2rem;
    font-weight: 800;
    color: var(--color-primary);
    font-family: var(--font-en);
    background: rgba(14, 165, 233, 0.1);
    padding: 4px 16px;
    border-radius: 8px;
    border: 1px solid rgba(14, 165, 233, 0.2);
}

.premium-slider {
    -webkit-appearance: none;
    width: 100%;
    height: 8px;
    border-radius: 5px;
    background: rgba(255, 255, 255, 0.08);
    outline: none;
    transition: var(--transition-smooth);
}

body.light-theme .premium-slider {
    background: rgba(0, 0, 0, 0.08);
}

.premium-slider::-webkit-slider-runnable-track {
    width: 100%;
    height: 8px;
    cursor: pointer;
}

.premium-slider::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 24px;
    height: 24px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--color-primary), var(--color-secondary));
    cursor: pointer;
    box-shadow: 0 0 10px var(--color-primary-glow);
    margin-top: -8px; /* Centers thumb vertically on Webkit */
    border: none;
    transition: var(--transition-smooth);
}

.premium-slider::-webkit-slider-thumb:hover {
    transform: scale(1.2);
    box-shadow: 0 0 18px var(--color-primary-glow);
}

/* Firefox support */
.premium-slider::-moz-range-thumb {
    width: 24px;
    height: 24px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--color-primary), var(--color-secondary));
    cursor: pointer;
    box-shadow: 0 0 10px var(--color-primary-glow);
    border: none;
    transition: var(--transition-smooth);
}

.premium-slider::-moz-range-thumb:hover {
    transform: scale(1.2);
    box-shadow: 0 0 18px var(--color-primary-glow);
}

.slider-endpoints {
    display: flex;
    justify-content: space-between;
    margin-top: 12px;
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--color-text-dark);
    font-family: var(--font-en);
}

.calc-outputs-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 20px;
}

.calc-out-card {
    background: rgba(0, 0, 0, 0.15);
    border: 1px solid var(--color-border);
    border-radius: var(--border-radius-md);
    padding: 28px 20px;
    text-align: center;
    backdrop-filter: var(--glass-blur);
    transition: var(--transition-smooth);
}

body.light-theme .calc-out-card {
    background: rgba(255, 255, 255, 0.5);
}

.calc-out-card:hover {
    transform: translateY(-5px);
    border-color: var(--color-border-glow);
    box-shadow: 0 15px 30px rgba(0, 0, 0, 0.2);
}

.out-icon-circle {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 16px auto;
}

.out-icon-circle i {
    width: 22px;
    height: 22px;
}

.calc-out-card h4 {
    font-size: 0.95rem;
    color: var(--color-text-main);
    margin-bottom: 8px;
    font-weight: 700;
}

.out-val {
    display: block;
    font-size: 1.8rem;
    font-weight: 800;
    color: var(--color-secondary);
    margin-bottom: 8px;
    font-family: var(--font-en);
    letter-spacing: -0.5px;
}

.calc-out-card p {
    font-size: 0.8rem;
    line-height: 1.4;
}

/* ==========================================
   Back to Top Button Styling
   ========================================== */
.back-to-top-btn {
    position: fixed;
    bottom: 105px;
    right: 38px;
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background-color: var(--color-card-bg);
    border: 1px solid var(--color-border);
    color: var(--color-text-main);
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
    z-index: 998;
    transition: var(--transition-smooth);
}

html[dir="rtl"] .back-to-top-btn {
    right: auto;
    left: 38px;
}

.back-to-top-btn:hover {
    background: var(--color-primary);
    color: #fff;
    transform: translateY(-3px);
    box-shadow: 0 8px 20px var(--color-primary-glow);
}

/* ==========================================
   Medical Report Modal Box Styling
   ========================================== */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(9, 13, 22, 0.8);
    backdrop-filter: blur(8px);
    z-index: 2000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 24px;
    transition: var(--transition-smooth);
}

.modal-card {
    background: var(--color-bg-alt);
    border: 1px solid var(--color-border);
    border-radius: var(--border-radius-lg);
    width: 100%;
    max-width: 650px;
    padding: 40px;
    box-shadow: 0 30px 60px rgba(0, 0, 0, 0.6);
    position: relative;
    max-height: 90vh;
    overflow-y: auto;
    animation: zoomIn 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}

body.light-theme .modal-card {
    background: #ffffff;
    box-shadow: 0 30px 60px rgba(15, 23, 42, 0.15);
}

@keyframes zoomIn {
    from {
        transform: scale(0.9);
        opacity: 0;
    }
    to {
        transform: scale(1);
        opacity: 1;
    }
}

.modal-close {
    position: absolute;
    top: 24px;
    right: 24px;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--color-border);
    color: var(--color-text-muted);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: var(--transition-smooth);
}

html[dir="rtl"] .modal-close {
    right: auto;
    left: 24px;
}

.modal-close:hover {
    background: rgba(239, 68, 68, 0.1);
    color: #ef4444;
    border-color: rgba(239, 68, 68, 0.2);
    transform: rotate(90deg);
}

.modal-header-print {
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 2px solid var(--color-border);
    padding-bottom: 20px;
    margin-bottom: 24px;
}

.modal-logo {
    display: flex;
    align-items: center;
    gap: 10px;
}

.modal-logo-icon {
    width: 24px;
    height: 24px;
}

.modal-doc-info {
    text-align: end;
}

html[dir="rtl"] .modal-doc-info {
    text-align: start;
}

.modal-doc-info h3 {
    font-size: 1.25rem;
    color: var(--color-text-main);
    margin-bottom: 6px;
}

.modal-badge-secure {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 0.75rem;
    font-weight: 700;
    color: var(--color-success);
    background: rgba(16, 185, 129, 0.1);
    padding: 4px 10px;
    border-radius: 12px;
}

.modal-badge-secure i {
    width: 14px;
    height: 14px;
}

.modal-patient-info {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 16px;
    margin-bottom: 24px;
    background: rgba(0, 0, 0, 0.15);
    padding: 16px;
    border-radius: var(--border-radius-sm);
    font-size: 0.9rem;
}

body.light-theme .modal-patient-info {
    background: rgba(15, 23, 42, 0.03);
}

.pat-field {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.pat-field strong {
    color: var(--color-text-dark);
    font-size: 0.75rem;
    text-transform: uppercase;
}

.pat-field span {
    font-weight: 600;
    color: var(--color-text-main);
}

.modal-results-table {
    width: 100%;
    border-collapse: collapse;
    margin-bottom: 30px;
    font-size: 0.9rem;
}

.modal-results-table th, .modal-results-table td {
    padding: 14px 16px;
    text-align: start;
    border-bottom: 1px solid var(--color-border);
}

.modal-results-table th {
    background: rgba(0, 0, 0, 0.1);
    color: var(--color-text-muted);
    font-weight: 700;
}

body.light-theme .modal-results-table th {
    background: rgba(15, 23, 42, 0.02);
}

.text-bold {
    font-weight: 700;
    font-family: var(--font-en);
}

.text-red {
    color: #ef4444;
}

.status-indicator {
    display: inline-block;
    padding: 4px 10px;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 700;
}

.bg-green-dim { background: rgba(16, 185, 129, 0.1); }
.bg-red-dim { background: rgba(239, 68, 68, 0.1); }

.modal-footer-signature {
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-top: 1px dashed var(--color-border);
    padding-top: 24px;
    margin-bottom: 30px;
}

.sig-section {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.sig-label {
    font-size: 0.75rem;
    color: var(--color-text-dark);
}

.sig-name {
    font-size: 1rem;
    color: var(--color-text-main);
}

.sig-stamp {
    font-size: 0.7rem;
    color: var(--color-success);
    border: 1px solid var(--color-success);
    padding: 2px 8px;
    border-radius: 4px;
    display: inline-block;
    width: fit-content;
    font-weight: 700;
    text-transform: uppercase;
}

.modal-qr-code {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
}

.qr-mock-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    width: 44px;
    height: 44px;
    gap: 2px;
    border: 1px solid var(--color-border);
    padding: 2px;
    background: #fff;
}

.qr-block {
    width: 12px;
    height: 12px;
}

.qr-lbl {
    font-size: 0.65rem;
    color: var(--color-text-dark);
    font-family: monospace;
}

.modal-actions-print {
    display: flex;
    justify-content: flex-end;
}

.modal-actions-print button {
    padding: 12px 24px;
}

/* Print CSS Styles */
@media print {
    body * {
        visibility: hidden;
    }
    .modal-overlay, .modal-card, .modal-card * {
        visibility: visible;
    }
    .modal-overlay {
        position: absolute;
        left: 0;
        top: 0;
        width: 100%;
        background: none;
        backdrop-filter: none;
        padding: 0;
    }
    .modal-card {
        border: none;
        box-shadow: none;
        max-height: none;
        overflow: visible;
        width: 100%;
    }
    .modal-close, .modal-actions-print {
        display: none !important;
    }
}

/* Responsiveness tweaks */
@media (max-width: 1024px) {
    .calc-outputs-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

/* ==========================================
   Video Guides Section Styling
   ========================================== */
.guides-section {
    position: relative;
    background-color: var(--color-bg);
}

.guides-glow {
    position: absolute;
    width: 600px;
    height: 600px;
    background: var(--color-secondary);
    top: 10%;
    left: 5%;
    filter: blur(160px);
    opacity: 0.05;
    pointer-events: none;
}

.guides-grid {
    display: grid;
    grid-template-columns: 1.4fr 1fr;
    gap: 30px;
    align-items: start;
}

.player-container {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.video-iframe-wrap {
    position: relative;
    width: 100%;
    aspect-ratio: 16 / 9;
    border-radius: var(--border-radius-lg);
    overflow: hidden;
    border: 1px solid var(--color-border);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.3);
}

.video-iframe-wrap iframe {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border: 0;
}

.player-info-card {
    background: var(--color-card-bg);
    border: 1px solid var(--color-border);
    padding: 20px;
    border-radius: var(--border-radius-md);
    display: flex;
    align-items: center;
    gap: 16px;
    backdrop-filter: var(--glass-blur);
}

.play-icon-glow {
    width: 36px;
    height: 36px;
    color: var(--color-primary);
    flex-shrink: 0;
    animation: simplePulse 2s infinite;
}

@keyframes simplePulse {
    0% { transform: scale(1); opacity: 0.8; }
    50% { transform: scale(1.08); opacity: 1; }
    100% { transform: scale(1); opacity: 0.8; }
}

.player-info-card h4 {
    font-size: 1.05rem;
    font-weight: 700;
    color: var(--color-text-main);
    margin-bottom: 4px;
}

.player-info-card p {
    font-size: 0.8rem;
    color: var(--color-text-muted);
}

/* Playlist Wrapper */
.playlist-container {
    background: var(--color-card-bg);
    border: 1px solid var(--color-border);
    border-radius: var(--border-radius-lg);
    display: flex;
    flex-direction: column;
    backdrop-filter: var(--glass-blur);
    overflow: hidden;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.2);
}

.playlist-header {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 20px 24px;
    border-bottom: 1px solid var(--color-border);
    background: rgba(0, 0, 0, 0.1);
}

body.light-theme .playlist-header {
    background: rgba(15, 23, 42, 0.02);
}

.playlist-header span {
    font-size: 1rem;
    font-weight: 700;
    color: var(--color-text-main);
}

.playlist-hdr-icon {
    width: 20px;
    height: 20px;
    color: var(--color-primary);
}

.playlist-scroll {
    max-height: 410px;
    overflow-y: auto;
}

/* Custom scrollbar for playlist */
.playlist-scroll::-webkit-scrollbar {
    width: 6px;
}

.playlist-scroll::-webkit-scrollbar-track {
    background: rgba(0, 0, 0, 0.05);
}

.playlist-scroll::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.05);
    border-radius: 3px;
}

body.light-theme .playlist-scroll::-webkit-scrollbar-thumb {
    background: rgba(0, 0, 0, 0.1);
}

.playlist-item {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 16px 24px;
    width: 100%;
    text-align: start;
    border-bottom: 1px solid var(--color-border);
    transition: var(--transition-smooth);
    background: transparent;
    cursor: pointer;
}

.playlist-item:last-child {
    border-bottom: none;
}

.playlist-item:hover {
    background: rgba(255, 255, 255, 0.02);
}

body.light-theme .playlist-item:hover {
    background: rgba(15, 23, 42, 0.01);
}

.playlist-item.active {
    background: rgba(14, 165, 233, 0.08);
    border-inline-start: 4px solid var(--color-primary);
    padding-inline-start: 20px; /* Adjust padding for border */
}

body.light-theme .playlist-item.active {
    background: rgba(14, 165, 233, 0.06);
}

.playlist-item-num {
    font-size: 0.8rem;
    font-weight: 700;
    color: var(--color-text-dark);
    font-family: var(--font-en);
    background: rgba(255, 255, 255, 0.05);
    padding: 4px 8px;
    border-radius: 6px;
    min-width: 32px;
    text-align: center;
}

body.light-theme .playlist-item-num {
    background: rgba(15, 23, 42, 0.04);
}

.playlist-item.active .playlist-item-num {
    background: var(--color-primary);
    color: #fff;
}

.playlist-item-title {
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--color-text-main);
    line-height: 1.5;
    flex-grow: 1;
}

.playlist-item.active .playlist-item-title {
    color: var(--color-primary);
    font-weight: 700;
}

button, input, select, textarea, .playlist-item, .playlist-item-title, .playlist-item-num {
    font-family: inherit !important;
}

.playlist-badge {
    background: var(--color-primary);
    color: #fff;
    font-size: 0.75rem;
    padding: 2px 8px;
    border-radius: 12px;
    font-family: var(--font-en);
    margin-inline-start: auto;
    font-weight: 700;
}

/* ==========================================
   Responsiveness Overrides for All Devices
   ========================================== */
@media (max-width: 1024px) {
    .calc-outputs-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    .guides-grid {
        grid-template-columns: 1fr;
        gap: 30px;
    }
    .playlist-scroll {
        max-height: 350px;
    }
}

@media (max-width: 768px) {
    .hero-stats-row {
        gap: 20px;
        flex-wrap: wrap;
        justify-content: center;
        margin-bottom: 28px;
    }
    .stat-number {
        font-size: 2rem;
    }
    .sim-role-selector {
        grid-template-columns: repeat(2, 1fr);
    }
    .back-to-top-btn {
        bottom: 90px;
        right: 20px;
        width: 38px;
        height: 38px;
    }
    html[dir="rtl"] .back-to-top-btn {
        right: auto;
        left: 20px;
    }
}

@media (max-width: 600px) {
    .calculator-box {
        padding: 24px 16px;
        gap: 24px;
    }
    .calc-input-card {
        padding: 20px 16px;
    }
    .calc-val-highlight {
        font-size: 1.5rem;
        padding: 2px 10px;
    }
    .calc-input-label {
        font-size: 0.95rem;
    }
    .calc-outputs-grid {
        grid-template-columns: 1fr;
        gap: 16px;
    }
    .modal-card {
        padding: 30px 16px 24px 16px;
        margin: 10px;
    }
    .modal-patient-info {
        grid-template-columns: 1fr;
        gap: 10px;
        padding: 12px;
    }
    .modal-close {
        top: 12px;
        right: 12px;
        width: 32px;
        height: 32px;
    }
    html[dir="rtl"] .modal-close {
        right: auto;
        left: 12px;
    }
    .modal-header-print {
        flex-direction: column;
        align-items: flex-start;
        gap: 12px;
        padding-bottom: 16px;
        margin-bottom: 16px;
    }
    .modal-doc-info {
        text-align: start;
    }
    html[dir="rtl"] .modal-doc-info {
        text-align: start;
    }
    .modal-footer-signature {
        flex-direction: column;
        align-items: flex-start;
        gap: 20px;
    }
    .modal-table-responsive {
        width: 100%;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
        margin-bottom: 24px;
        border: 1px solid var(--color-border);
        border-radius: 6px;
    }
    .modal-results-table {
        margin-bottom: 0;
        min-width: 500px; /* Force scrollable container to protect layout */
    }
    .modal-results-table th, .modal-results-table td {
        padding: 10px 12px;
    }
}

@media (max-width: 480px) {
    .hero-stats-row {
        flex-direction: column;
        align-items: center;
        gap: 16px;
    }
    .stat-item {
        align-items: center;
        text-align: center;
    }
}

/* ==========================================
   Clinical Lab Calculator Dashboard Styling
   ========================================== */
.nav-btn-special {
    display: inline-flex !important;
    align-items: center;
    gap: 8px;
    background: rgba(14, 165, 233, 0.08);
    border: 1px solid rgba(14, 165, 233, 0.25) !important;
    padding: 6px 14px !important;
    border-radius: 30px !important;
    color: var(--color-primary) !important;
    font-weight: 700 !important;
    font-size: 0.85rem !important;
    transition: var(--transition-smooth);
    cursor: pointer;
}

body.light-theme .nav-btn-special {
    background: rgba(14, 165, 233, 0.06);
    border-color: rgba(14, 165, 233, 0.2) !important;
}

.nav-btn-special:hover {
    background: var(--color-primary) !important;
    color: #fff !important;
    border-color: var(--color-primary) !important;
    box-shadow: 0 0 15px var(--color-primary-glow);
}

.nav-btn-special:hover i {
    color: #fff !important;
}

.nav-btn-icon {
    width: 15px;
    height: 15px;
}

/* Calculator Modal Card */
.calc-dashboard-card {
    background: var(--color-bg-alt);
    border: 1px solid var(--color-border);
    border-radius: var(--border-radius-lg);
    width: 95%;
    max-width: 1050px;
    height: 85vh;
    display: grid;
    grid-template-columns: 280px 1fr;
    box-shadow: 0 30px 60px rgba(0, 0, 0, 0.6);
    position: relative;
    overflow: hidden;
    animation: zoomIn 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}

body.light-theme .calc-dashboard-card {
    background: #ffffff;
    box-shadow: 0 30px 60px rgba(15, 23, 42, 0.15);
}

/* Sidebar Layout */
.calc-sidebar {
    background: rgba(0, 0, 0, 0.25);
    border-inline-end: 1px solid var(--color-border);
    display: flex;
    flex-direction: column;
    padding: 30px 20px;
    overflow-y: auto;
}

body.light-theme .calc-sidebar {
    background: #f8fafc;
}

.calc-sidebar-header {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 30px;
    padding-bottom: 20px;
    border-bottom: 1px solid var(--color-border);
}

.calc-header-icon {
    width: 28px;
    height: 28px;
    flex-shrink: 0;
}

.calc-sidebar-header h3 {
    font-size: 1.15rem;
    font-weight: 800;
    color: var(--color-text-main);
}

.calc-sidebar-header p {
    font-size: 0.75rem;
    color: var(--color-text-muted);
}

.calc-sidebar-menu {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.calc-cat-btn {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 16px;
    border-radius: 8px;
    width: 100%;
    text-align: start;
    border: 1px solid transparent;
    background: transparent;
    color: var(--color-text-muted);
    font-weight: 600;
    font-size: 0.88rem;
    transition: var(--transition-smooth);
    cursor: pointer;
}

.calc-cat-btn:hover {
    background: rgba(255, 255, 255, 0.02);
    color: var(--color-text-main);
}

body.light-theme .calc-cat-btn:hover {
    background: rgba(15, 23, 42, 0.02);
}

.calc-cat-btn.active {
    background: rgba(14, 165, 233, 0.08);
    border-color: rgba(14, 165, 233, 0.2);
    color: var(--color-primary);
}

body.light-theme .calc-cat-btn.active {
    background: rgba(14, 165, 233, 0.06);
}

.cat-icon {
    width: 18px;
    height: 18px;
}

/* Content Area */
.calc-content-panel {
    padding: 40px;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 30px;
}

.calc-group {
    display: none;
    flex-direction: column;
    gap: 24px;
}

.calc-group.active {
    display: flex;
}

.calc-group-title {
    font-size: 1.4rem;
    font-weight: 800;
    color: var(--color-text-main);
    border-bottom: 2px solid var(--color-primary);
    padding-bottom: 12px;
    margin-bottom: 10px;
}

.calc-card {
    background: var(--color-card-bg);
    border: 1px solid var(--color-border);
    border-radius: var(--border-radius-md);
    padding: 24px;
    display: flex;
    flex-direction: column;
    gap: 16px;
    backdrop-filter: var(--glass-blur);
}

.calc-card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 10px;
}

.calc-card-header h4 {
    font-size: 1.05rem;
    font-weight: 700;
    color: var(--color-text-main);
}

.calc-card-badge {
    background: rgba(20, 184, 166, 0.1);
    color: var(--color-secondary);
    font-size: 0.72rem;
    font-weight: 700;
    padding: 2px 8px;
    border-radius: 4px;
    font-family: var(--font-en);
}

.calc-card-desc {
    font-size: 0.82rem;
    color: var(--color-text-muted);
    line-height: 1.5;
}

/* Input Styles */
.calc-inputs-row {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 16px;
    margin-top: 8px;
}

.calc-input-group {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.calc-input-group label {
    font-size: 0.8rem;
    font-weight: 700;
    color: var(--color-text-dark);
}

.calc-input-val {
    width: 100%;
    background: rgba(0, 0, 0, 0.2);
    border: 1px solid var(--color-border);
    border-radius: 6px;
    padding: 10px 14px;
    color: var(--color-text-main);
    font-size: 0.9rem;
    outline: none;
    transition: var(--transition-smooth);
}

body.light-theme .calc-input-val {
    background: #f8fafc;
    border-color: rgba(15, 23, 42, 0.1);
    color: #0f172a;
}

.calc-input-val:focus {
    border-color: var(--color-primary);
    box-shadow: 0 0 10px var(--color-primary-glow);
}

/* Results Display */
.calc-results-wrap {
    background: rgba(0, 0, 0, 0.15);
    border-radius: 8px;
    padding: 20px;
    border-inline-start: 4px solid var(--color-secondary);
    display: flex;
    flex-direction: column;
    gap: 12px;
}

body.light-theme .calc-results-wrap {
    background: #f1f5f9;
}

.result-block {
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px dashed rgba(255, 255, 255, 0.05);
    padding-bottom: 8px;
}

body.light-theme .result-block {
    border-color: rgba(15, 23, 42, 0.05);
}

.result-block:last-of-type {
    border-bottom: none;
    padding-bottom: 0;
}

.result-label {
    font-size: 0.85rem;
    color: var(--color-text-dark);
    font-weight: 600;
}

.result-value {
    font-size: 1.15rem;
    font-weight: 800;
    color: var(--color-secondary);
    font-family: var(--font-en);
}

.result-status-text {
    font-size: 0.82rem;
    font-weight: 700;
    color: var(--color-primary);
    margin-top: 4px;
}

.calc-divider {
    height: 1px;
    background: var(--color-border);
    margin: 16px 0;
}

.calc-formula-desc {
    font-size: 0.72rem;
    color: var(--color-text-muted);
    font-family: var(--font-en);
}

/* Responsive Overrides for Calculator Modal */
@media (max-width: 900px) {
    .calc-dashboard-card {
        grid-template-columns: 1fr;
        grid-template-rows: auto 1fr;
        height: 90vh;
    }
    
    .calc-sidebar {
        border-inline-end: none;
        border-bottom: 1px solid var(--color-border);
        padding: 20px;
        flex-direction: row;
        align-items: center;
        gap: 16px;
        overflow-x: auto;
    }
    
    .calc-sidebar-header {
        display: none; /* Hide header on mobile sidebar to save space */
    }
    
    .calc-sidebar-menu {
        flex-direction: row;
        width: max-content;
        gap: 10px;
    }
    
    .calc-cat-btn {
        padding: 10px 14px;
        white-space: nowrap;
        width: auto;
    }
    
    .calc-content-panel {
        padding: 24px 16px;
    }
}
