/* Self-hosted Material Symbols Rounded (subsetted: 131 icons, static wght=400) */
@font-face {
    font-family: 'Material Symbols Rounded';
    font-style: normal;
    font-weight: 400;
    font-display: swap;
    src: url('../fonts/material-symbols-rounded.woff2') format('woff2');
}

/* Parastoo — Arabic/Persian body font (self-hosted) */
@font-face {
    font-family: 'Parastoo';
    font-style: normal;
    font-weight: 400;
    font-display: swap;
    src: url('../fonts/Parastoo.woff2') format('woff2');
}
@font-face {
    font-family: 'Parastoo';
    font-style: normal;
    font-weight: 700;
    font-display: swap;
    src: url('../fonts/Parastoo-Bold.woff2') format('woff2');
}

.material-symbols-rounded {
    font-family: 'Material Symbols Rounded';
    font-weight: normal;
    font-style: normal;
    font-size: 24px;
    line-height: 1;
    letter-spacing: normal;
    text-transform: none;
    display: inline-block;
    white-space: nowrap;
    word-wrap: normal;
    direction: ltr;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    text-rendering: optimizeLegibility;
    font-feature-settings: 'liga';
}

:root {
    /* Anthropic/Claude-inspired Palette */
    --bg-paper: #FCFCF9;       /* Warm, paper-like background */
    --bg-surface: #FFFFFF;     /* Pure white for cards/dropdowns */
    --text-primary: #09263a;   /* Brand Navy (Updated to user's requested footer color) */
    --text-secondary: #526675; /* Muted Slate */
    --accent: #3BC5D6;         /* Brand Blue */
    --accent-hover: #2DAAB9;   
    --border-subtle: #E6E6E6;
    --bg-subtle: #F2F2F0;      /* For secondary sections */
    
    /* Typography */
    --font-serif: 'Merriweather', serif;
    --font-sans: 'Inter', sans-serif;
    
    /* Spacing */
    --nav-height: 72px;
    --page-width: 1400px; /* Increased from 1100px to reduce white space on large screens */
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    background-color: var(--bg-paper);
    color: var(--text-primary);
    font-family: var(--font-sans);
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
}

a {
    text-decoration: none;
    color: inherit;
    transition: color 0.2s ease;
}

/* Accessibility: Focus styles */
:focus-visible {
    outline: 2px solid var(--accent);
    outline-offset: 2px;
}

/* Programmatically-focused elements (e.g. headings after route change) should
   never show a visible focus ring — they aren't keyboard-reachable. */
[tabindex="-1"]:focus {
    outline: none;
}

.nav-link:focus-visible,
.dropdown-item:focus-visible,
.btn-primary:focus-visible,
.btn-outline:focus-visible {
    outline: 2px solid var(--accent);
    outline-offset: 2px;
    border-radius: 6px;
}

.skip-link {
    position: absolute;
    top: -40px;
    left: 0;
    background: var(--text-primary);
    color: #fff;
    padding: 8px 16px;
    z-index: 10000;
    font-size: 14px;
    border-radius: 0 0 8px 0;
    transition: top 0.2s;
}
.skip-link:focus {
    top: 0;
}

/* Page Transitions */
#app-content {
    animation: fadeIn 0.3s ease;
}

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

/* Compliance Badges */
.compliance-badges {
    display: flex;
    gap: 16px;
    flex-wrap: wrap;
    margin-top: 32px;
}

.compliance-badge {
    display: flex;
    align-items: center;
    gap: 10px;
    background: var(--bg-surface);
    border: 1px solid var(--border-subtle);
    border-radius: 10px;
    padding: 14px 20px;
    font-size: 13px;
    font-weight: 600;
    color: var(--text-primary);
    transition: box-shadow 0.2s;
}

.compliance-badge:hover {
    box-shadow: 0 4px 16px rgba(0,0,0,0.06);
}

.compliance-badge .material-symbols-rounded {
    font-size: 28px;
    color: var(--accent);
}

/* Trust Center – QM Banner */
.trust-qm-banner {
    display: flex;
    align-items: center;
    gap: 20px;
    background: var(--bg-subtle);
    border: 1px solid var(--border-subtle);
    border-radius: 12px;
    padding: 20px 28px;
    margin-top: 24px;
}
.trust-qm-banner img {
    height: 40px;
    width: auto;
}
.trust-qm-banner a {
    color: var(--accent);
    font-weight: 600;
    text-decoration: none;
}
.trust-qm-banner a:hover { text-decoration: underline; }

/* Trust Center – Sub-processor Table */
.subprocessor-wrap {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    margin-top: 32px;
    border: 1px solid var(--border-subtle);
    border-radius: 12px;
}
.subprocessor-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 14px;
    min-width: 640px;
}
.subprocessor-table th {
    text-align: left;
    padding: 14px 20px;
    background: var(--text-primary);
    color: #fff;
    font-weight: 600;
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}
.subprocessor-table th:first-child { border-radius: 11px 0 0 0; }
.subprocessor-table th:last-child  { border-radius: 0 11px 0 0; }
.subprocessor-table td {
    padding: 14px 20px;
    border-bottom: 1px solid var(--border-subtle);
    color: var(--text-primary);
}
.subprocessor-table tr:nth-child(even) td {
    background: var(--bg-subtle);
}
.subprocessor-table tr:last-child td {
    border-bottom: none;
}
.subprocessor-table .sp-name {
    font-weight: 600;
}
.sp-logo {
    width: 20px;
    height: 20px;
    object-fit: contain;
    vertical-align: middle;
    margin-right: 8px;
    border-radius: 4px;
}

/* Trust Center – Document Grid */
.doc-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 16px;
    margin-top: 32px;
}
.doc-card {
    display: flex;
    align-items: flex-start;
    gap: 14px;
    background: var(--bg-surface);
    border: 1px solid var(--border-subtle);
    border-radius: 10px;
    padding: 20px;
    text-decoration: none;
    color: var(--text-primary);
    transition: transform 0.2s, box-shadow 0.2s;
}
.doc-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(15,62,93,0.08);
}
.doc-card .material-symbols-rounded {
    font-size: 28px;
    color: var(--accent);
    flex-shrink: 0;
    margin-top: 2px;
}
.doc-card-text h4 {
    font-size: 14px;
    font-weight: 600;
    margin-bottom: 4px;
}
.doc-card-text p {
    font-size: 12px;
    color: var(--text-secondary);
    margin: 0;
}

/* Beta Badge (for beta pages) */
.beta-notice {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    background: rgba(59,197,214,0.1);
    border: 1px solid rgba(59,197,214,0.3);
    border-radius: 8px;
    padding: 10px 20px;
    margin-bottom: 48px;
}

.beta-notice .material-symbols-rounded {
    font-size: 20px;
    color: var(--accent);
}

.beta-notice span:last-child {
    font-size: 14px;
    font-weight: 600;
    color: var(--text-primary);
}

/* Dropdown Column Headers */
.dropdown-col-header {
    padding: 0 14px 8px;
    font-size: 11px;
    font-weight: 600;
    color: #999;
    text-transform: uppercase;
}

/* CTA Block (dark) */
.cta-block {
    background: var(--text-primary);
    color: #fff;
    text-align: center;
    padding: 40px;
    border-radius: 12px;
    margin-top: 60px;
}

.cta-block h2 {
    font-family: var(--font-serif);
    font-size: 32px;
    margin-bottom: 20px;
}

.cta-block .nav-actions {
    justify-content: center;
}

/* Data Grid (for security page quick stats) */
.data-grid-item h4 {
    font-weight: 600;
    font-size: 16px;
}

/* Footer Contact Card */
.footer-contact-card {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 0;
    color: rgba(255, 255, 255, 0.7);
    font-size: 14px;
    transition: color 0.2s;
}

.footer-contact-card:hover {
    color: var(--accent);
}

.footer-contact-card .material-symbols-rounded {
    font-size: 20px;
    color: var(--accent);
}

/* Inline style extractions */
.card-border {
    border: 1px solid var(--border-subtle);
    border-radius: 12px;
    padding: 32px;
    margin-bottom: 20px;
}

.bg-subtle-box {
    background: var(--bg-subtle);
    padding: 30px;
    border-radius: 12px;
    border: 1px solid var(--border-subtle);
}

.separator {
    border-top: 1px solid var(--border-subtle);
    margin: 6px 0;
}

/* Utility Classes */
.grid-2 {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(400px, 1fr));
    gap: 32px;
}
.grid-3 {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 24px;
}
.grid-4 {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 24px;
}

/* ---------------------------------------------------------
   NAVIGATION (The Core Structure)
   --------------------------------------------------------- */

.navbar {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    height: var(--nav-height);
    background: rgba(252, 252, 249, 0.95);
    backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--border-subtle);
    z-index: 1000;
    /* ALIGNMENT: We center the inner container of the navbar */
    display: flex;
    align-items: center;
    justify-content: center; /* Center the inner content horizontally */
}

/* Inner container for the navbar content to respect the max-width and padding */
.navbar-content {
    width: 100%;
    max-width: var(--page-width);
    padding: 0 24px;
    display: flex;
    align-items: center;
    gap: 48px;
}

main {
    padding-top: var(--nav-height);
    min-height: 80vh;
}

.logo {
    display: flex;
    align-items: center;
    gap: 6px;
    flex-shrink: 0;
}

.logo-symbol {
    height: 53px;
    width: 53px;
    max-height: 53px;
    object-fit: contain;
    flex-shrink: 0;
}

.logo-wordmark {
    height: 74px;
    width: auto;
    max-height: 74px;
    object-fit: contain;
    filter: invert(1);
    flex-shrink: 0;
}

/* Desktop Menu */
.nav-menu {
    display: flex;
    gap: 2px;
    height: 100%;
}

.nav-item {
    position: relative;
    height: 100%;
    display: flex;
    align-items: center;
}

.nav-link {
    padding: 0 10px;
    font-size: 13px;
    font-weight: 400;
    color: var(--text-secondary);
    cursor: pointer;
    height: 34px;
    display: flex;
    align-items: center;
    border-radius: 6px;
    white-space: nowrap;
}

.nav-link:hover {
    color: var(--text-primary);
    background: rgba(0,0,0,0.04);
}

.nav-link.active {
    font-weight: 500;
    color: var(--text-primary);
    background: rgba(59, 197, 214, 0.1);
}

.nav-link span {
    margin-left: 3px;
    font-size: 14px;
    color: var(--text-secondary);
}

/* MEGA MENU DROPDOWNS */
.dropdown {
    position: absolute;
    top: calc(100% + 8px);
    left: 50%;
    transform: translateX(-50%);
    background: var(--bg-surface);
    border: 1px solid var(--border-subtle);
    border-radius: 12px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.08);
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.2s ease, visibility 0.2s ease;
    min-width: 240px;
    padding: 12px;
    z-index: 100;
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.dropdown.wide {
    min-width: 500px;
    /* Two columns requested */
    grid-template-columns: 1fr 1fr;
    display: grid;
    gap: 12px;
}

/* Invisible bridge above dropdown to maintain hover continuity across the gap */
.dropdown::before {
    content: '';
    position: absolute;
    top: -10px;
    left: 0;
    right: 0;
    height: 10px;
}

.nav-item:hover .dropdown {
    opacity: 1;
    visibility: visible;
    transform: translateX(-50%);
}

.dropdown-item {
    padding: 10px 14px;
    border-radius: 8px;
    display: block;
}

.dropdown-item:hover {
    background: #F5F5F2;
}

.dropdown-title {
    font-size: 14px;
    font-weight: 600;
    color: var(--text-primary);
    display: block;
    margin-bottom: 2px;
}

.dropdown-desc {
    font-size: 12px;
    color: var(--text-secondary);
    display: block;
    line-height: 1.4;
}

.beta-tag {
    display: inline-block;
    font-size: 10px;
    background: #E8F5E9;
    color: #2E7D32;
    padding: 2px 6px;
    border-radius: 4px;
    margin-left: 6px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.nav-actions {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-left: 20px;
    flex-wrap: nowrap;
    flex-shrink: 0;
}

.nav-right-group {
    display: flex;
    align-items: center;
    margin-left: auto;
    min-width: 0;
    flex-shrink: 1;
}

.btn-text {
    font-size: 14px;
    font-weight: 500;
    color: var(--text-primary);
}

.btn-primary {
    background: var(--text-primary);
    color: var(--bg-surface);
    padding: 10px 18px;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 500;
    transition: background 0.2s;
    border: none;
    cursor: pointer;
    white-space: nowrap;
}

.btn-primary:hover {
    background: #09263A;
}

.btn-outline {
    background: transparent;
    color: var(--text-primary);
    border: 1px solid var(--border-subtle);
    padding: 10px 18px;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 500;
    transition: all 0.2s;
    cursor: pointer;
    white-space: nowrap;
}

.btn-outline:hover {
    border-color: var(--text-primary);
}

.mobile-toggle {
    display: none;
    cursor: pointer;
    margin-left: auto;
}

/* ---------------------------------------------------------
   LAYOUT COMPONENTS
   --------------------------------------------------------- */
.page-width {
    max-width: var(--page-width);
    margin: 0 auto;
    padding: 0 24px; /* Updated for better horizontal padding */
}

section {
    padding: 96px 0;
}

.section-header {
    max-width: 680px;
    margin-bottom: 56px;
}

.kicker {
    font-size: 12px;
    font-weight: 600;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--accent);
    margin-bottom: 16px;
    display: block;
}

.section-title {
    font-family: var(--font-serif);
    font-size: 36px;
    line-height: 1.2;
    margin-bottom: 20px;
    font-weight: 400;
}

.section-copy {
    font-size: 17px;
    color: var(--text-secondary);
    max-width: 600px;
}

/* Cards & Grids */
.card {
    background: var(--bg-surface);
    border: 1px solid var(--border-subtle);
    padding: 32px;
    border-radius: 12px;
    transition: transform 0.2s, box-shadow 0.2s;
}

.card:hover {
    transform: translateY(-2px);
    box-shadow: 0 12px 30px rgba(15, 62, 93, 0.08);
}

.card-icon {
    color: var(--accent);
    margin-bottom: 20px;
    font-size: 32px;
}

.card h3 {
    font-family: var(--font-serif);
    font-size: 18px;
    margin-bottom: 12px;
    font-weight: 700;
}

.card p {
    font-size: 14px;
    color: var(--text-secondary);
    margin-bottom: 0;
    line-height: 1.6;
}

/* Pricing Card Specifics */
.pricing-card {
    background: var(--bg-surface);
    border: 1px solid var(--border-subtle);
    padding: 32px;
    border-radius: 12px;
    display: flex;
    flex-direction: column;
    transition: transform 0.2s, box-shadow 0.2s;
}

.pricing-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 16px 40px rgba(15, 62, 93, 0.1);
}

.pricing-card.featured {
    border-color: var(--accent);
    background: #FDFDFD;
}

.plan-name {
    font-family: var(--font-serif);
    font-size: 18px;
    font-weight: 700;
    margin-bottom: 8px;
    color: var(--text-primary);
}

.plan-price {
    font-size: 32px;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 4px;
}

.plan-price span {
    font-size: 14px;
    font-weight: 400;
    color: var(--text-secondary);
}

.plan-period {
    font-size: 13px;
    color: var(--text-secondary);
    margin-bottom: 24px;
}

.plan-features {
    list-style: none;
    padding: 0;
    margin: 0 0 32px 0;
    flex-grow: 1;
}

.plan-features li {
    font-size: 14px;
    color: var(--text-secondary);
    margin-bottom: 12px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.plan-features li::before {
    content: "✓";
    color: var(--accent);
    font-weight: 700;
}

/* ---------------------------------------------------------
   HERO SECTION
   --------------------------------------------------------- */
.hero {
    padding: 37.5px 0 30px; 
    border-bottom: 1px solid var(--border-subtle);
    background: radial-gradient(circle at 75% 30%, rgba(59, 197, 214, 0.06), transparent 50%);
    overflow: hidden;
}

.hero h1 {
    font-family: var(--font-serif);
    font-size: 52px; /* Slightly smaller to accommodate form */
    font-weight: 400;
    line-height: 1.1;
    margin-bottom: 20px;
    color: var(--text-primary);
    letter-spacing: -0.03em;
}

.hero-layout {
    display: grid;
    grid-template-columns: 1fr 1.71875fr; 
    gap: 80px;
    align-items: center;
    min-height: 0.8125vh; 
}

.hero-content {
    text-align: left;
}

.hero-subtitle {
    font-size: 18px;
    color: var(--text-secondary);
    margin-bottom: 32px;
    max-width: 520px;
    line-height: 1.6;
}

/* Stats centred so the wrapped row (SOC 2 + GDPR) sits below the three above */
.hero-stats {
    display: flex;
    gap: 32px;
    justify-content: center;
    margin-top: 32px;
    padding-top: 24px;
    border-top: 1px solid var(--border-subtle);
    flex-wrap: wrap;
}

.stat-item {
    text-align: center;
}

.stat-value {
    font-size: 24px;
    margin-bottom: 2px;
    display: block;
    font-weight: 700;
}
.stat-label {
    font-size: 12px;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    white-space: nowrap;
}

/* Hero Image Styling */
.hero-image-container {
    position: relative;
    display: flex;
    justify-content: center;
    align-items: center;
    height: 100%; 
}

.hero-photo {
    width: 100%;
    height: 100%; 
    border-radius: 24px; 
    box-shadow: 
        0 32px 64px -12px rgba(15, 62, 93, 0.15),
        0 0 0 1px rgba(15, 62, 93, 0.04);
    object-fit: cover;
}

/* Container to enforce full height */
.hero-image-wrapper {
    position: relative;
    width: 85%; /* Updated: Reduced width by 15% (from 100%) */
    height: 100%; 
    min-height: 650px;
    border-radius: 24px; 
    overflow: hidden;
    box-shadow: 
        0 32px 64px -12px rgba(15, 62, 93, 0.15),
        0 0 0 1px rgba(15, 62, 93, 0.04);
}

.hero-image-wrapper .hero-photo {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 0;
}

@media (max-width: 1024px) {
    .hero-layout {
        grid-template-columns: 1fr;
        gap: 60px;
        min-height: auto; /* Allow auto height on smaller screens */
    }
    .hero-content {
        order: 1;
    }
    .hero-image-container {
        order: 2;
        height: 300px; /* Fixed height for mobile image container */
    }
    .hero-image-wrapper {
        padding-bottom: 0;
        height: 100%;
        min-height: 0;
    }
    .hero-image-wrapper .hero-photo {
        object-position: top;
    }
    .hero-stats {
        justify-content: center;
    }
}

/* ---------------------------------------------------------
   SAVINGS CALCULATOR STYLES
   --------------------------------------------------------- */
.calculator-container {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 40px;
    background: var(--bg-surface);
    border: 1px solid var(--border-subtle);
    border-radius: 16px;
    padding: 40px;
    box-shadow: 0 16px 40px rgba(15, 62, 93, 0.08);
    align-items: flex-start;
}

/* Specific Styles for the new Comparison Table */
.calculator-container.comparison-table {
    grid-template-columns: 1fr 1.5fr 1.5fr; /* Feature | Clinix | Competitor */
    gap: 0;
    padding: 0;
    background: var(--bg-subtle);
    border: 1px solid var(--border-subtle);
    box-shadow: 0 16px 40px rgba(15, 62, 93, 0.08);
}

.calculator-input-group {
    margin-bottom: 20px;
}

.calculator-input-group label {
    display: block;
    font-size: 14px;
    font-weight: 600;
    margin-bottom: 8px;
    color: var(--text-primary);
}

.slider-display {
    display: block;
    font-size: 24px;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 12px;
    font-family: var(--font-serif);
}

.fixed-value {
    font-size: 16px;
    padding: 12px;
    border: 1px solid var(--border-subtle);
    border-radius: 8px;
    color: var(--text-primary);
    background: #FDFDFD;
    font-weight: 500;
}

/* Custom Range Slider Styling (Polished Look) */
input[type=range] {
    -webkit-appearance: none;
    width: 100%;
    height: 8px;
    background: var(--border-subtle);
    border-radius: 4px;
    margin: 10px 0;
    cursor: pointer;
    transition: background 0.2s;
}

/* Thumb Styling (Slider Handle) */
input[type=range]::-webkit-slider-thumb {
    -webkit-appearance: none;
    height: 20px;
    width: 20px;
    border-radius: 50%;
    background: var(--accent);
    cursor: pointer;
    border: 2px solid var(--bg-surface);
    box-shadow: 0 0 4px rgba(0,0,0,0.2);
    margin-top: -6px;
    transition: background 0.2s;
}

input[type=range]::-moz-range-thumb {
    height: 18px;
    width: 18px;
    border-radius: 50%;
    background: var(--accent);
    cursor: pointer;
    border: none;
    box-shadow: 0 0 4px rgba(0,0,0,0.2);
}

input[type=range]:hover::-webkit-slider-thumb {
    background: var(--accent-hover);
}

/* Result Area Styling (Bold Adjustment) */
.calculator-results {
    background: var(--text-primary); /* Bold adjustment: Dark background for results */
    color: white;
    border: none;
    border-radius: 12px;
    padding: 30px;
    box-shadow: 0 16px 40px rgba(0, 0, 0, 0.3);
}

.calculator-result-item {
    margin-bottom: 24px;
    padding-bottom: 24px;
    border-bottom: 1px dashed rgba(255, 255, 255, 0.15); /* White dashed border */
    position: relative; /* For icon positioning */
}

.calculator-result-item:last-child {
    margin-bottom: 0;
    padding-bottom: 0;
    border-bottom: none;
}

.result-label {
    font-size: 14px;
    color: rgba(255, 255, 255, 0.7);
    font-weight: 500;
    margin-bottom: 4px;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.result-icon {
    font-size: 36px !important;
    color: var(--accent) !important; 
    float: right;
    margin-left: 15px;
    line-height: 1;
}

.result-value {
    font-family: var(--font-serif);
    font-size: 32px;
    font-weight: 700;
    color: var(--accent);
    line-height: 1.2;
}

.result-subtext {
    font-size: 13px;
    color: rgba(255, 255, 255, 0.7);
    margin-top: 8px;
}

/* Critical Rule Banner (No longer used on home page, but CSS kept) */
.critical-rule-banner {
    background: var(--text-primary);
    color: #fff;
    padding: 16px 24px;
    border-radius: 12px;
    text-align: center;
    font-size: 18px;
    font-weight: 600;
    margin-top: -64px; 
    margin-bottom: 96px; 
    box-shadow: 0 10px 30px rgba(0,0,0,0.2);
    position: relative;
    z-index: 50;
}

.critical-rule-banner strong {
    color: var(--accent);
}

/* Subpages Style */
.subpage-container {
    padding: 60px 0 96px;
}
.subpage-header {
    max-width: 900px;
    margin-bottom: 60px;
}
.subpage-title {
    font-family: var(--font-serif);
    font-size: 44px;
    font-weight: 400;
    margin-bottom: 16px;
}
.subpage-copy {
    font-size: 18px;
    color: var(--text-secondary);
}
.list-item-icon {
    color: var(--accent);
    font-size: 24px;
    margin-right: 12px;
}
.text-group {
    padding: 30px 0;
    border-bottom: 1px solid var(--border-subtle);
}
.text-group:last-child {
    border-bottom: none;
}
.text-group h3 {
    font-family: var(--font-serif);
    font-size: 22px;
    font-weight: 700;
    margin-bottom: 10px;
}
.text-group p {
    font-size: 15px;
    color: var(--text-secondary);
}
.text-group ul {
    list-style: none;
}
.text-group ul li {
    margin-bottom: 8px;
    font-size: 15px;
    color: var(--text-primary);
}

@media (max-width: 900px) {
    .calculator-container {
        grid-template-columns: 1fr;
    }
    /* Adjust comparison table on small screens */
    .calculator-container.comparison-table {
        grid-template-columns: 1fr;
    }
    /* IMPORTANT: We target the direct children (.comparison-cell) which flow into the grid columns */
    .comparison-table .comparison-cell { 
        grid-column: span 1 !important; /* Forces stacking */
        border-right: none !important;
    }

    /* Add separators for clarity when stacked */
    .comparison-cell.feature-cell {
        font-weight: 700 !important;
        background: var(--bg-subtle) !important;
        border-top: 1px solid var(--border-subtle);
        /* Add a distinctive border top for new rows on mobile */
        margin-top: 20px; 
    }
    .comparison-table > .comparison-cell:nth-child(4) { /* Target the first feature-cell after the header */
        margin-top: 0;
        border-top: none;
    }

    .comparison-cell.clinix-cell {
        border-left: 5px solid var(--accent) !important;
        border-top: none !important;
    }
    .comparison-table > div:first-child {
        border-bottom: none !important;
        border-top-right-radius: 12px !important;
    }
    
    /* Remove margins on the header cells to keep them tight */
    .comparison-table > div:nth-child(1), 
    .comparison-table > div:nth-child(2),
    .comparison-table > div:nth-child(3) {
         margin-top: 0 !important;
    }
    
}

/* --- FOOTER STYLES (Adjusted for better Grid layout) --- */
footer {
    background-color: var(--text-primary); /* Use dark brand color */
    padding: 100px 0 60px;
}

.footer-layout {
    display: grid;
    /* Updated grid: 1/4 of the space for the brand, 5 columns for links */
    grid-template-columns: 1fr repeat(5, minmax(120px, 1fr)); 
    gap: 40px;
}

.footer-brand-col {
    display: flex;
    flex-direction: column;
    justify-content: space-between; /* Pushes content and copyright to edges */
    align-items: flex-start;
}

.footer-logo {
    display: flex;
    align-items: center;
    gap: 10px;
    text-decoration: none;
}

.footer-logo .logo-wordmark {
    filter: none; /* White wordmark on dark footer — no invert needed */
}

.footer-symbol {
    filter: brightness(0) invert(1); /* Make dark wings icon white for dark footer */
}

.footer-col-stack {
    display: flex;
    flex-direction: column;
    gap: 30px; /* Space between the two groups of links in one column */
}

.footer-group h4 {
    color: #fff;
    font-size: 16px;
    font-weight: 600;
    margin-bottom: 16px;
}

.footer-group ul {
    list-style: none;
    padding: 0;
}

.footer-group ul li {
    margin-bottom: 8px;
}

.footer-group ul li a {
    color: rgba(255, 255, 255, 0.7);
    font-size: 14px;
    transition: color 0.2s;
}

.footer-group ul li a:hover {
    color: var(--accent);
}

/* REMOVED: .footer-logo-mark-rect CSS block */

.social-icons a {
    color: #fff;
    font-size: 18px;
    margin-right: 15px;
    transition: color 0.2s;
    text-decoration: none;
}

.social-icons a:hover {
    color: var(--accent);
}

/* Mobile Footer adjustments */
@media (max-width: 768px) {
    .footer-layout {
        /* On small screens, stack columns into 2 columns */
        grid-template-columns: 1fr 1fr; 
    }
    .footer-brand-col {
        grid-column: span 2; /* Brand takes full width */
        flex-direction: row; /* Layout brand elements side-by-side */
        justify-content: space-between;
        align-items: center;
        border-bottom: 1px solid rgba(255, 255, 255, 0.1);
        padding-bottom: 30px;
        margin-bottom: 30px;
    }
    .footer-brand-col > div:nth-child(2) {
        display: none; /* Hide copyright on smallest screens for cleaner look */
    }
    .footer-col-stack {
        gap: 20px;
    }
}

/* ---------------------------------------------------------
   FORM STYLES
   --------------------------------------------------------- */
.form-group {
    margin-bottom: 16px;
}

.form-group label {
    display: block;
    font-size: 13px;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 6px;
}

.form-group input,
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 10px 14px;
    border: 1px solid var(--border-subtle);
    border-radius: 8px;
    font-family: var(--font-sans);
    font-size: 14px;
    color: var(--text-primary);
    background: var(--bg-paper);
    transition: border-color 0.2s;
    line-height: 1.5;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--accent);
    box-shadow: 0 0 0 3px rgba(59, 197, 214, 0.15);
}

.form-group input::placeholder,
.form-group textarea::placeholder {
    color: var(--text-secondary);
    opacity: 0.6;
}

.form-group select {
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%23526675' d='M6 8L1 3h10z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 12px center;
    padding-right: 32px;
    cursor: pointer;
}

.form-group textarea {
    resize: vertical;
    min-height: 80px;
}

@media (max-width: 768px) {
    #contact {
        grid-template-columns: 1fr !important;
        gap: 40px !important;
    }
}

/* Toast Notification */
.toast {
    position: fixed;
    bottom: 30px;
    left: 50%;
    transform: translateX(-50%) translateY(20px);
    background: var(--text-primary);
    color: #fff;
    padding: 12px 24px;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 500;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.2);
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
    z-index: 9999;
}

.toast.show {
    opacity: 1;
    visibility: visible;
    transform: translateX(-50%) translateY(0);
}

/* ---------------------------------------------------------
   LANGUAGE SWITCHER
   --------------------------------------------------------- */
.lang-switcher {
    position: relative;
    margin-left: 8px;
}

.lang-switcher-btn {
    display: flex;
    align-items: center;
    gap: 4px;
    background: transparent;
    border: 1px solid var(--border-subtle);
    border-radius: 8px;
    padding: 6px 10px;
    cursor: pointer;
    font-size: 13px;
    font-weight: 500;
    color: var(--text-primary);
    transition: all 0.2s;
}

.lang-switcher-btn:hover {
    border-color: var(--text-secondary);
    background: rgba(0, 0, 0, 0.02);
}

.lang-code {
    font-weight: 600;
    font-size: 12px;
    letter-spacing: 0.04em;
}

.lang-dropdown {
    position: absolute;
    top: calc(100% + 6px);
    right: 0;
    background: var(--bg-surface);
    border: 1px solid var(--border-subtle);
    border-radius: 10px;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.1);
    min-width: 180px;
    padding: 6px;
    opacity: 0;
    visibility: hidden;
    transform: translateY(6px);
    transition: all 0.2s ease;
    z-index: 1001;
}

.lang-switcher.open .lang-dropdown {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.lang-option {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
    padding: 8px 12px;
    border: none;
    background: transparent;
    border-radius: 6px;
    cursor: pointer;
    font-size: 13px;
    color: var(--text-primary);
    transition: background 0.15s;
}

.lang-option:hover {
    background: rgba(0, 0, 0, 0.04);
}

.lang-option.active {
    background: rgba(59, 197, 214, 0.1);
    font-weight: 600;
}

.lang-native {
    font-weight: 500;
}

.lang-english {
    font-size: 12px;
    color: var(--text-secondary);
}

/* ---------------------------------------------------------
   I18N NON-TRANSLATED BANNER
   --------------------------------------------------------- */
.i18n-banner {
    background: #FFF8E1;
    border: 1px solid #FFE082;
    border-radius: 8px;
    padding: 10px 16px;
    font-size: 13px;
    color: #5D4037;
    margin-bottom: 24px;
    display: flex;
    align-items: center;
}

/* ---------------------------------------------------------
   RTL SUPPORT
   --------------------------------------------------------- */
[dir="rtl"] body {
    text-align: right;
}

[dir="rtl"] .nav-link span {
    margin-left: 0;
    margin-right: 4px;
}

[dir="rtl"] .nav-actions {
    margin-left: 0;
    margin-right: 16px;
}

[dir="rtl"] .nav-right-group {
    margin-left: 0;
    margin-right: auto;
}

[dir="rtl"] .mobile-toggle {
    margin-left: 0;
    margin-right: auto;
}

[dir="rtl"] .beta-tag {
    margin-left: 0;
    margin-right: 6px;
}

[dir="rtl"] .hero-content {
    text-align: right;
}

[dir="rtl"] .stat-item {
    text-align: right;
}

[dir="rtl"] .hero-stats {
    justify-content: center;
}

[dir="rtl"] .list-item-icon {
    margin-right: 0;
    margin-left: 12px;
}

[dir="rtl"] .result-icon {
    float: left;
    margin-left: 0;
    margin-right: 15px;
}

[dir="rtl"] .social-icons a {
    margin-right: 0;
    margin-left: 15px;
}

[dir="rtl"] .footer-brand-col {
    align-items: flex-end;
}

[dir="rtl"] .section-header {
    text-align: right;
    margin-left: auto;
}

[dir="rtl"] .section-copy {
    margin-left: auto;
}

[dir="rtl"] .subpage-header {
    margin-left: auto;
    text-align: right;
}

[dir="rtl"] .hero-subtitle {
    margin-left: auto;
}

[dir="rtl"] .dropdown {
    left: auto;
    right: 50%;
    transform: translateX(50%);
}

[dir="rtl"] .nav-item:hover .dropdown {
    transform: translateX(50%);
}

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

[dir="rtl"] .lang-switcher {
    margin-left: 0;
    margin-right: 8px;
}

/* RTL: plan features and i18n banner */
[dir="rtl"] .plan-features li {
    flex-direction: row-reverse;
}

[dir="rtl"] .i18n-banner {
    flex-direction: row-reverse;
}

/* RTL: text-group bullet items with inline icons */
[dir="rtl"] .text-group ul li {
    direction: rtl;
}

/* RTL: form select dropdown arrow */
[dir="rtl"] .form-group select {
    background-position: left 12px center;
    padding-right: 14px;
    padding-left: 32px;
}

/* RTL: toast notification centering */
[dir="rtl"] .toast {
    left: auto;
    right: 50%;
    transform: translateX(50%) translateY(20px);
}
[dir="rtl"] .toast.show {
    transform: translateX(50%) translateY(0);
}

/* ═══════════════════════════════════════════════════════
   ARABIC TYPOGRAPHY & LAYOUT
   Based on Al Arabiya / Al Jazeera patterns,
   UAE Design System, W3C Arabic Layout Requirements.
   ═══════════════════════════════════════════════════════ */

/* ── Core: font family + base adjustments ──────────── */
[lang="ar"] {
    --font-serif: 'Tajawal', sans-serif;
    --font-sans: 'Parastoo', 'Tajawal', sans-serif;
    word-break: normal;
    overflow-wrap: break-word;
}

/* Arabic headings use Tajawal (modern, clean) */
[lang="ar"] h1, [lang="ar"] h2, [lang="ar"] h3, [lang="ar"] h4,
[lang="ar"] .subpage-title,
[lang="ar"] .section-title,
[lang="ar"] .kicker,
[lang="ar"] .hero h1,
[lang="ar"] .nav-link,
[lang="ar"] .dropdown-title,
[lang="ar"] .btn-primary,
[lang="ar"] .btn-outline,
[lang="ar"] .plan-name,
[lang="ar"] .plan-price {
    font-family: 'Tajawal', sans-serif;
}

/* Arabic text appears ~20% smaller than Latin at same px.
   Bump base body and increase line-height for readability. */
[lang="ar"] body {
    font-size: 17px;
    line-height: 1.8;
}

/* ── Letter-spacing: MUST be 0 for Arabic connected script.
   Any positive or negative value breaks cursive joins. ── */
[dir="rtl"] .hero h1,
[dir="rtl"] .logo,
[dir="rtl"] .kicker,
[dir="rtl"] .stat-label,
[dir="rtl"] .result-label,
[dir="rtl"] .beta-tag,
[dir="rtl"] .lang-code,
[dir="rtl"] .leaflet-tagline,
[dir="rtl"] .leaflet-badge,
[dir="rtl"] .subpage-title,
[dir="rtl"] .section-title,
[dir="rtl"] .section-copy,
[dir="rtl"] .text-group h3 {
    letter-spacing: 0;
}

/* ── text-transform: uppercase doesn't exist in Arabic ── */
[dir="rtl"] .kicker,
[dir="rtl"] .stat-label {
    text-transform: none;
}

/* ── Headings: Arabic needs more vertical breathing room ── */
[dir="rtl"] .hero h1 {
    font-size: 48px;
    line-height: 1.3;
    font-weight: 700;
}

[dir="rtl"] .subpage-title {
    font-size: 40px;
    line-height: 1.35;
    font-weight: 700;
}

[dir="rtl"] .section-title {
    font-size: 34px;
    line-height: 1.4;
    font-weight: 700;
}

[dir="rtl"] .text-group h3 {
    line-height: 1.4;
    font-weight: 700;
}

/* ── Body copy: generous line-height for Arabic script ── */
[dir="rtl"] .hero-subtitle {
    font-size: 18px;
    line-height: 1.8;
}

[dir="rtl"] .subpage-copy {
    font-size: 18px;
    line-height: 1.8;
}

[dir="rtl"] .section-copy {
    font-size: 17px;
    line-height: 1.8;
}

/* ── Cards, text groups, pricing ────────────────────── */
[dir="rtl"] .card p,
[dir="rtl"] .text-group p,
[dir="rtl"] .pricing-card p {
    font-size: 15px;
    line-height: 1.75;
}

[dir="rtl"] .card h3 {
    font-weight: 700;
    line-height: 1.4;
}

/* ── Kicker: larger for Arabic legibility ───────────── */
[dir="rtl"] .kicker {
    font-size: 13px;
    font-weight: 700;
}

/* ── Navigation: Arabic font sizing ─────────────────── */
[dir="rtl"] .nav-link {
    font-size: 14px;
}

[dir="rtl"] .dropdown-item-title {
    font-size: 14px;
    font-weight: 600;
}

[dir="rtl"] .dropdown-label {
    font-size: 12px;
    letter-spacing: 0;
    text-transform: none;
}

/* ── Pricing cards ──────────────────────────────────── */
[dir="rtl"] .plan-name {
    letter-spacing: 0;
}

[dir="rtl"] .plan-price {
    letter-spacing: 0;
}

/* ── Footer ─────────────────────────────────────────── */
[dir="rtl"] .footer-heading {
    letter-spacing: 0;
    text-transform: none;
}

/* ── Buttons: Arabic text in buttons ────────────────── */
[dir="rtl"] .btn-primary,
[dir="rtl"] .btn-outline {
    letter-spacing: 0;
    font-size: 15px;
}

/* ── Calculator / ROI section ───────────────────────── */
[dir="rtl"] .result-value {
    letter-spacing: 0;
}

/* ── Leaflet standalone Arabic ──────────────────────── */
.leaflet-page[dir="rtl"] {
    --font-serif: 'Noto Naskh Arabic', serif;
    --font-sans: 'Noto Naskh Arabic', sans-serif;
    font-family: 'Noto Naskh Arabic', sans-serif;
}

.leaflet-page[dir="rtl"] .leaflet-heading {
    font-weight: 700;
    line-height: 1.35;
}

.leaflet-page[dir="rtl"] .leaflet-intro,
.leaflet-page[dir="rtl"] .leaflet-point p {
    line-height: 1.75;
}

.leaflet-page[dir="rtl"] .leaflet-point h3 {
    font-weight: 700;
}

.leaflet-page[dir="rtl"] .leaflet-tagline,
.leaflet-page[dir="rtl"] .leaflet-badge {
    letter-spacing: 0;
}

/* RTL leaflet layout */
[dir="rtl"] .leaflet-point,
.leaflet-page[dir="rtl"] .leaflet-point {
    flex-direction: row-reverse;
    text-align: right;
}

[dir="rtl"] .leaflet-logo,
.leaflet-page[dir="rtl"] .leaflet-logo {
    flex-direction: row-reverse;
}

.leaflet-toolbar {
    background: var(--bg-subtle);
    border-bottom: 1px solid var(--border-subtle);
    padding: 16px 0;
    margin-bottom: 32px;
}

.leaflet-lang-group {
    display: flex;
    gap: 6px;
    flex-wrap: wrap;
}

.leaflet-lang-btn {
    padding: 6px 14px;
    border: 1px solid var(--border-subtle);
    border-radius: 6px;
    background: #fff;
    color: var(--text-secondary);
    font-size: 13px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.15s;
}

.leaflet-lang-btn:hover {
    border-color: var(--accent);
    color: var(--accent);
}

.leaflet-lang-btn.active {
    background: var(--accent);
    color: #fff;
    border-color: var(--accent);
}

.leaflet-print-btn {
    font-size: 14px;
}

/* The printable A4 leaflet */
.leaflet-page {
    max-width: 794px;        /* A4 width at 96dpi */
    margin: 0 auto 60px;
    background: #fff;
    border: 1px solid var(--border-subtle);
    border-radius: 8px;
    box-shadow: 0 2px 16px rgba(0,0,0,0.06);
}

.leaflet-inner {
    padding: 48px 48px 32px;
}

/* Header */
.leaflet-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 28px;
    padding-bottom: 20px;
    border-bottom: 3px solid var(--accent);
}

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

.leaflet-logo-img {
    height: 40px;
    width: auto;
}

.leaflet-brand {
    font-family: var(--font-serif);
    font-size: 22px;
    font-weight: 700;
    color: var(--text-primary);
}

.leaflet-tagline {
    font-size: 12px;
    color: var(--text-secondary);
    letter-spacing: 0.3px;
}

/* Title block */
.leaflet-title-block {
    background: linear-gradient(135deg, #f0fafb, #e8f7f9);
    padding: 28px 32px;
    border-radius: 10px;
    margin-bottom: 28px;
    border-inline-start: 4px solid var(--accent);
}

.leaflet-heading {
    font-family: var(--font-serif);
    font-size: 26px;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 10px;
    line-height: 1.3;
}

.leaflet-intro {
    font-size: 14px;
    color: var(--text-secondary);
    line-height: 1.6;
    margin: 0;
}

/* Points */
.leaflet-points {
    display: flex;
    flex-direction: column;
    gap: 18px;
    margin-bottom: 24px;
}

.leaflet-point {
    display: flex;
    gap: 16px;
    align-items: flex-start;
}

.leaflet-icon {
    flex-shrink: 0;
    font-size: 28px;
    color: var(--accent);
    margin-top: 2px;
}

.leaflet-point h3 {
    font-size: 15px;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 4px;
}

.leaflet-point p {
    font-size: 13px;
    color: var(--text-secondary);
    line-height: 1.55;
    margin: 0;
}

/* Quote */
.leaflet-quote {
    background: var(--bg-subtle);
    border-inline-start: 4px solid var(--accent);
    padding: 18px 24px;
    border-radius: 0 8px 8px 0;
    margin-bottom: 24px;
}

.leaflet-quote p {
    font-family: var(--font-serif);
    font-style: italic;
    font-size: 15px;
    color: var(--text-primary);
    line-height: 1.5;
    margin: 0;
}

/* Badges */
.leaflet-badges {
    display: flex;
    justify-content: center;
    gap: 12px;
    flex-wrap: wrap;
    margin-bottom: 24px;
}

.leaflet-badge {
    background: var(--bg-subtle);
    color: var(--text-secondary);
    font-size: 11px;
    font-weight: 600;
    padding: 6px 16px;
    border-radius: 4px;
    letter-spacing: 0.3px;
}

/* Footer */
.leaflet-footer {
    text-align: center;
    padding-top: 16px;
    border-top: 1px solid var(--border-subtle);
}

.leaflet-footer p {
    font-size: 12px;
    color: var(--text-secondary);
    margin: 0;
}

.leaflet-url {
    display: inline-block;
    color: var(--accent);
    font-weight: 700;
    font-size: 16px;
    margin: 4px 0 8px;
    text-decoration: none;
}

.leaflet-copy {
    font-size: 10px !important;
    color: #999 !important;
    margin-top: 6px !important;
}

/* Mobile */
@media (max-width: 600px) {
    .leaflet-inner {
        padding: 24px 20px 20px;
    }
    .leaflet-heading {
        font-size: 22px;
    }
    .leaflet-title-block {
        padding: 20px;
    }
}

/* ═══════════════════════════════════════════════════════
   MOBILE RESPONSIVE — 768px (tablets & phones)
   ═══════════════════════════════════════════════════════ */
@media (max-width: 768px) {

    /* ── Phase 1: Mobile Navigation ───────────────────── */
    .mobile-toggle {
        display: block;
        font-size: 28px;
        color: var(--text-primary);
        z-index: 10;
    }

    .nav-right-group {
        display: none;
        position: absolute;
        top: var(--nav-height);
        left: 0;
        right: 0;
        background: var(--bg-paper);
        border-top: 1px solid var(--border-subtle);
        box-shadow: 0 12px 32px rgba(0, 0, 0, 0.1);
        flex-direction: column;
        padding: 12px 16px 20px;
        max-height: calc(100vh - var(--nav-height));
        overflow-y: auto;
        z-index: 999;
    }

    .nav-right-group.mobile-open {
        display: flex;
    }

    .navbar-content {
        gap: 0; /* Reset gap on mobile — nav is in dropdown, no horizontal gap needed */
    }

    .logo-symbol {
        height: 44px;
        width: 44px;
        max-height: 44px;
    }

    .logo-wordmark {
        height: 61px;
        max-height: 61px;
    }

    .nav-menu {
        flex-direction: column;
        gap: 0;
    }

    .nav-item {
        height: auto;
        flex-direction: column;
        border-bottom: 1px solid var(--border-subtle);
    }

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

    .nav-link {
        width: 100%;
        justify-content: space-between;
        padding: 14px 4px;
        height: auto;
        font-size: 15px;
    }

    /* Hide dropdowns by default on mobile */
    .nav-item .dropdown {
        position: static;
        opacity: 0;
        visibility: hidden;
        max-height: 0;
        overflow: hidden;
        transform: none;
        border: none;
        border-radius: 0;
        box-shadow: none;
        padding: 0;
        min-width: 0;
        background: var(--bg-subtle);
        transition: max-height 0.3s ease, opacity 0.2s ease, padding 0.2s ease;
    }

    /* Override hover behaviour on mobile */
    .nav-item:hover .dropdown {
        opacity: 0;
        visibility: hidden;
        max-height: 0;
        transform: none;
    }

    /* Show dropdown when accordion is open */
    .nav-item.mobile-dropdown-open .dropdown {
        opacity: 1;
        visibility: visible;
        max-height: 600px;
        padding: 8px 4px;
        border-radius: 8px;
        margin-bottom: 4px;
    }

    /* Wide dropdowns become single column on mobile */
    .dropdown.wide {
        display: flex;
        flex-direction: column;
        min-width: 0 !important;
    }

    .dropdown-item {
        padding: 10px 12px;
    }

    /* Rotate chevron when open */
    .nav-item.mobile-dropdown-open > .nav-link .material-symbols-rounded:last-child {
        transform: rotate(180deg);
    }

    .nav-link .material-symbols-rounded:last-child {
        transition: transform 0.2s;
    }

    /* Nav actions below menu items */
    .nav-actions {
        margin-left: 0;
        margin-top: 12px;
        padding-top: 12px;
        border-top: 1px solid var(--border-subtle);
        gap: 8px;
        flex-wrap: wrap;
    }

    .nav-actions .btn-primary,
    .nav-actions .btn-outline {
        flex: 1;
        text-align: center;
        min-width: 120px;
    }

    /* Language switcher in mobile menu */
    .lang-switcher {
        margin-left: 0;
        margin-top: 8px;
        align-self: flex-start;
        position: relative;
    }

    /* On mobile, render language dropdown in normal flow instead of absolute */
    .lang-switcher .lang-dropdown {
        position: static;
        opacity: 0;
        visibility: hidden;
        max-height: 0;
        overflow: hidden;
        transform: none;
        box-shadow: none;
        border: 1px solid var(--border-subtle);
        margin-top: 4px;
        transition: max-height 0.25s ease, opacity 0.2s ease;
    }

    .lang-switcher.open .lang-dropdown {
        opacity: 1;
        visibility: visible;
        max-height: 400px;
        transform: none;
    }

    /* ── Phase 2: Typography Scaling ─────────────────── */
    .hero h1 {
        font-size: 32px;
        letter-spacing: -0.02em;
    }

    .subpage-title {
        font-size: 30px;
    }

    .section-title {
        font-size: 26px;
    }

    .hero-subtitle {
        font-size: 16px;
    }

    .subpage-copy {
        font-size: 16px;
    }

    .section-copy {
        font-size: 15px;
    }

    .plan-price {
        font-size: 28px;
    }

    .text-group h3 {
        font-size: 19px;
    }

    .slider-display {
        font-size: 20px;
    }

    .result-value {
        font-size: 26px;
    }

    /* ── Phase 3: Spacing & Layout ───────────────────── */
    section {
        padding: 60px 0;
    }

    .section-header {
        margin-bottom: 36px;
    }

    .subpage-container {
        padding: 40px 0 60px;
    }

    .subpage-header {
        margin-bottom: 36px;
    }

    .card {
        padding: 24px;
    }

    .pricing-card {
        padding: 24px;
    }

    .grid-2 {
        grid-template-columns: 1fr;
        gap: 16px;
    }

    .grid-3 {
        grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
        gap: 16px;
    }

    .grid-4 {
        grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
        gap: 16px;
    }

    .calculator-container {
        padding: 24px;
        gap: 24px;
    }

    .calculator-results {
        padding: 24px;
    }

    .text-group {
        padding: 22px 0;
    }

    /* ── Phase 4: Hero Section ───────────────────────── */
    .hero {
        padding: 24px 0 20px;
    }

    .hero-layout {
        gap: 32px;
    }

    .hero-image-container {
        height: 260px;
    }

    .hero-image-wrapper {
        width: 100%;
        min-height: 260px;
    }

    .hero-stats {
        gap: 20px;
        justify-content: center;
    }

    .stat-value {
        font-size: 20px;
    }

    /* ── Phase 6: Component Fixes ────────────────────── */
    /* Prevent iOS zoom on input focus */
    .form-group input,
    .form-group select,
    .form-group textarea {
        font-size: 16px;
    }

    /* Leaflet toolbar responsive */
    .leaflet-lang-group {
        justify-content: center;
    }
}

/* ═══════════════════════════════════════════════════════
   MOBILE RESPONSIVE — 480px (small phones)
   ═══════════════════════════════════════════════════════ */
@media (max-width: 480px) {

    /* ── Phase 2: Typography further reduction ───────── */
    .hero h1 {
        font-size: 28px;
    }

    .subpage-title {
        font-size: 26px;
    }

    .section-title {
        font-size: 24px;
    }

    /* ── Phase 3: Tighter spacing ────────────────────── */
    section {
        padding: 48px 0;
    }

    .page-width {
        padding: 0 16px;
    }

    .navbar-content {
        padding: 0 16px;
        gap: 16px;
    }

    .logo-symbol {
        height: 39px;
        width: 39px;
        max-height: 39px;
    }

    .logo-wordmark {
        height: 51px;
        max-height: 51px;
    }

    .card {
        padding: 20px;
    }

    .pricing-card {
        padding: 20px;
    }

    .subpage-container {
        padding: 32px 0 48px;
    }

    .calculator-container {
        padding: 16px;
        gap: 16px;
    }

    .calculator-results {
        padding: 20px;
    }

    .result-value {
        font-size: 24px;
    }

    /* ── Phase 4: Hero further reduction ─────────────── */
    .hero-image-container {
        height: 220px;
    }

    .hero-image-wrapper {
        min-height: 220px;
    }

    .hero-layout {
        gap: 24px;
    }

    .hero-stats {
        gap: 16px;
    }

    .stat-value {
        font-size: 18px;
    }

    .stat-label {
        font-size: 11px;
    }

    /* ── Phase 5: Footer single column ───────────────── */
    .footer-layout {
        grid-template-columns: 1fr;
        gap: 24px;
    }

    .footer-brand-col {
        grid-column: span 1;
        flex-direction: column;
        align-items: flex-start;
        gap: 16px;
        border-bottom: 1px solid rgba(255, 255, 255, 0.1);
        padding-bottom: 24px;
    }

    .footer-brand-col > div:nth-child(2) {
        display: block;
    }

    footer {
        padding: 60px 0 40px;
    }

    .footer-group h4 {
        font-size: 14px;
        margin-bottom: 10px;
    }

    .footer-col-stack {
        gap: 20px;
    }

    /* ── Phase 6: Full-width buttons ─────────────────── */
    .nav-actions .btn-primary,
    .nav-actions .btn-outline {
        width: 100%;
    }

    .lang-dropdown {
        min-width: 140px;
    }

    /* Leaflet inner tight */
    .leaflet-inner {
        padding: 20px 16px 16px;
    }

    .leaflet-heading {
        font-size: 20px;
    }

    .leaflet-title-block {
        padding: 16px;
    }
}

/* ═══════════════════════════════════════════════════════
   Phase 7: RTL MOBILE ADJUSTMENTS
   ═══════════════════════════════════════════════════════ */
@media (max-width: 768px) {
    /* Arabic typography mobile: scale down from Arabic base sizes */
    [dir="rtl"] .hero h1 {
        font-size: 30px;
        line-height: 1.35;
    }

    [dir="rtl"] .subpage-title {
        font-size: 28px;
        line-height: 1.4;
    }

    [dir="rtl"] .section-title {
        font-size: 26px;
        line-height: 1.45;
    }

    [dir="rtl"] .hero-subtitle {
        font-size: 16px;
    }

    [dir="rtl"] .subpage-copy {
        font-size: 16px;
    }

    /* RTL nav mobile: text alignment */
    [dir="rtl"] .nav-right-group {
        margin-right: 0;
    }

    [dir="rtl"] .nav-link {
        text-align: right;
    }

    [dir="rtl"] .nav-actions {
        margin-right: 0;
    }

    [dir="rtl"] .lang-switcher {
        margin-right: 0;
        align-self: flex-end;
    }

    /* RTL hero stats center on mobile */
    [dir="rtl"] .hero-stats {
        justify-content: center;
    }

    /* RTL footer */
    [dir="rtl"] .footer-brand-col {
        align-items: flex-end;
    }
}

@media (max-width: 480px) {
    [dir="rtl"] .hero h1 {
        font-size: 26px;
    }

    [dir="rtl"] .subpage-title {
        font-size: 24px;
    }

    [dir="rtl"] .section-title {
        font-size: 22px;
    }

    [dir="rtl"] .footer-brand-col {
        align-items: flex-end;
    }
}

/* ═══════════════════════════════════════════════════════
   Print Styles — Single A4 page
   ═══════════════════════════════════════════════════════ */
@media print {
    /* Hide everything except the leaflet */
    body > *:not(#app-content),
    .site-nav,
    .mobile-nav-overlay,
    .site-footer,
    .leaflet-toolbar,
    .no-print,
    #lang-switcher {
        display: none !important;
    }

    body {
        margin: 0;
        padding: 0;
        background: #fff;
    }

    #app-content {
        padding: 0 !important;
        margin: 0 !important;
    }

    .leaflet-page {
        max-width: none;
        border: none;
        border-radius: 0;
        box-shadow: none;
        margin: 0;
        page-break-inside: avoid;
    }

    /* Tight spacing to fit single A4 page */
    .leaflet-inner {
        padding: 20px 28px 16px;
    }

    .leaflet-header {
        margin-bottom: 14px;
        padding-bottom: 10px;
    }

    .leaflet-logo-img {
        height: 30px;
    }

    .leaflet-brand {
        font-size: 18px;
    }

    .leaflet-tagline {
        font-size: 10px;
    }

    .leaflet-title-block {
        padding: 16px 20px;
        margin-bottom: 14px;
        border-radius: 6px;
    }

    .leaflet-heading {
        font-size: 20px;
        margin-bottom: 6px;
    }

    .leaflet-intro {
        font-size: 11.5px;
        line-height: 1.45;
    }

    .leaflet-points {
        gap: 8px;
        margin-bottom: 12px;
    }

    .leaflet-point {
        gap: 10px;
    }

    .leaflet-icon {
        font-size: 22px;
    }

    .leaflet-point h3 {
        font-size: 12.5px;
        margin-bottom: 1px;
    }

    .leaflet-point p {
        font-size: 11px;
        line-height: 1.4;
    }

    .leaflet-quote {
        padding: 10px 16px;
        margin-bottom: 12px;
    }

    .leaflet-quote p {
        font-size: 12px;
        line-height: 1.4;
    }

    .leaflet-badges {
        gap: 8px;
        margin-bottom: 12px;
    }

    .leaflet-badge {
        font-size: 9.5px;
        padding: 4px 12px;
    }

    .leaflet-footer {
        padding-top: 8px;
    }

    .leaflet-footer p {
        font-size: 10px;
    }

    .leaflet-url {
        font-size: 13px;
        margin: 2px 0 4px;
    }

    .leaflet-copy {
        font-size: 8px !important;
        margin-top: 4px !important;
    }

    /* Preserve colors in print */
    .leaflet-title-block {
        background: #f0fafb !important;
        border-inline-start-color: #3BC5D6 !important;
        -webkit-print-color-adjust: exact;
        print-color-adjust: exact;
    }

    .leaflet-quote {
        background: #f5f5f3 !important;
        border-inline-start-color: #3BC5D6 !important;
        -webkit-print-color-adjust: exact;
        print-color-adjust: exact;
    }

    .leaflet-badge {
        background: #f0f0ee !important;
        -webkit-print-color-adjust: exact;
        print-color-adjust: exact;
    }

    .leaflet-icon {
        color: #3BC5D6 !important;
        -webkit-print-color-adjust: exact;
        print-color-adjust: exact;
    }

    .leaflet-header {
        border-bottom-color: #3BC5D6 !important;
        -webkit-print-color-adjust: exact;
        print-color-adjust: exact;
    }

    .leaflet-url {
        color: #3BC5D6 !important;
        -webkit-print-color-adjust: exact;
        print-color-adjust: exact;
    }

    @page {
        size: A4;
        margin: 10mm 12mm;
    }
}
