/* Custom Styles for خطة النجاة Landing Page */

/* Color Variables */
:root {
    --primary: #0050A8;
    --secondary: #00C8FF;
    --accent: #FF2AA5;
    --text: #222222;
    --bg: #FFFFFF;
    --font-main: 'Tajawal', system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    /* Reveal Animation Direction - Default LTR (enters from left) */
    --revealX: -18px;
    /* Typography Colors - Improved Contrast for WCAG AA (4.5:1) */
    --text-strong: #0F172A;   /* Strong text on light backgrounds - WCAG AA compliant */
    --text-muted: #1F2937;   /* Secondary text but still clear - WCAG AA compliant */
    --text-on-dark: #EAF2FF; /* Text on dark backgrounds */
}

/* RTL: Enters from right */
html[dir="rtl"],
body.rtl {
    --revealX: 18px;
}

/* LTR: Enters from left */
html[dir="ltr"],
body.ltr {
    --revealX: -18px;
}

/* Prevent horizontal scroll */
html, body {
    overflow-x: hidden;
    max-width: 100%;
}

/* RTL/LTR Support - Auto Direction Based on lang attribute */
body.rtl {
    direction: rtl;
    text-align: right;
}

body.ltr {
    direction: ltr;
    text-align: left;
}

/* Apply direction to html and body */
html[dir="rtl"],
html[dir="rtl"] body,
body.rtl {
    direction: rtl;
    text-align: right;
}

html[dir="ltr"],
html[dir="ltr"] body,
body.ltr {
    direction: ltr;
    text-align: left;
}

/* Text alignment classes - Auto swap for RTL/LTR */
html[dir="rtl"] .text-right,
body.rtl .text-right,
html[dir="rtl"] [class*="text-right"],
body.rtl [class*="text-right"] {
    text-align: right !important;
}

html[dir="ltr"] .text-right,
body.ltr .text-right,
html[dir="ltr"] [class*="text-right"],
body.ltr [class*="text-right"] {
    text-align: left !important;
}

html[dir="rtl"] .text-left,
body.rtl .text-left,
html[dir="rtl"] [class*="text-left"],
body.rtl [class*="text-left"] {
    text-align: left !important;
}

html[dir="ltr"] .text-left,
body.ltr .text-left,
html[dir="ltr"] [class*="text-left"],
body.ltr [class*="text-left"] {
    text-align: right !important;
}

/* Ensure text-center always stays centered regardless of RTL/LTR */
html[dir="rtl"] .text-center,
html[dir="ltr"] .text-center,
body.rtl .text-center,
body.ltr .text-center,
html[dir="rtl"] [class*="text-center"],
html[dir="ltr"] [class*="text-center"],
body.rtl [class*="text-center"],
body.ltr [class*="text-center"] {
    text-align: center !important;
}

/* Flex direction for RTL/LTR - Important for proper layout */
html[dir="rtl"] .flex,
body.rtl .flex {
    flex-direction: row;
}

html[dir="ltr"] .flex,
body.ltr .flex {
    flex-direction: row-reverse;
}

/* Ensure flex items align correctly - Keep normal row for items-start/center/end */
html[dir="ltr"] .flex.items-start,
body.ltr .flex.items-start,
html[dir="ltr"] .flex.items-center,
body.ltr .flex.items-center,
html[dir="ltr"] .flex.items-end,
body.ltr .flex.items-end,
html[dir="ltr"] .flex.items-between,
body.ltr .flex.items-between {
    flex-direction: row;
}

/* Fix for justify-between and justify-end */
html[dir="ltr"] .flex.justify-between,
body.ltr .flex.justify-between,
html[dir="ltr"] .flex.justify-end,
body.ltr .flex.justify-end {
    flex-direction: row;
}

/* Container and section alignment */
html[dir="rtl"] .container,
html[dir="rtl"] section,
html[dir="rtl"] div,
body.rtl .container,
body.rtl section,
body.rtl div {
    direction: rtl;
    text-align: inherit;
}

html[dir="ltr"] .container,
html[dir="ltr"] section,
html[dir="ltr"] div,
body.ltr .container,
body.ltr section,
body.ltr div {
    direction: ltr;
    text-align: inherit;
}

/* Specific fix for "Why Choose Us" section and similar - Force LTR alignment */
html[dir="ltr"] .text-right,
body.ltr .text-right,
html[dir="ltr"] [class*="text-right"],
body.ltr [class*="text-right"] {
    text-align: left !important;
    direction: ltr !important;
}

html[dir="ltr"] div.text-right,
body.ltr div.text-right,
html[dir="ltr"] div[class*="text-right"],
body.ltr div[class*="text-right"] {
    text-align: left !important;
    direction: ltr !important;
}

html[dir="ltr"] ul.text-right,
body.ltr ul.text-right,
html[dir="ltr"] ul[class*="text-right"],
body.ltr ul[class*="text-right"] {
    text-align: left !important;
    direction: ltr !important;
}

html[dir="ltr"] .grid.text-right,
body.ltr .grid.text-right,
html[dir="ltr"] .grid[class*="text-right"],
body.ltr .grid[class*="text-right"] {
    text-align: left !important;
    direction: ltr !important;
}

html[dir="ltr"] section .text-right,
body.ltr section .text-right,
html[dir="ltr"] section [class*="text-right"],
body.ltr section [class*="text-right"] {
    text-align: left !important;
    direction: ltr !important;
}

html[dir="ltr"] .container .text-right,
body.ltr .container .text-right,
html[dir="ltr"] .container [class*="text-right"],
body.ltr .container [class*="text-right"] {
    text-align: left !important;
    direction: ltr !important;
}

/* Ensure all text elements in LTR mode align left */
html[dir="ltr"] p,
html[dir="ltr"] h1,
html[dir="ltr"] h2,
html[dir="ltr"] h3,
html[dir="ltr"] h4,
html[dir="ltr"] h5,
html[dir="ltr"] h6,
html[dir="ltr"] span,
html[dir="ltr"] li,
body.ltr p,
body.ltr h1,
body.ltr h2,
body.ltr h3,
body.ltr h4,
body.ltr h5,
body.ltr h6,
body.ltr span,
body.ltr li {
    text-align: inherit;
    direction: inherit;
}

/* Override for elements with text-right class in LTR */
html[dir="ltr"] p.text-right,
html[dir="ltr"] h1.text-right,
html[dir="ltr"] h2.text-right,
html[dir="ltr"] h3.text-right,
html[dir="ltr"] h4.text-right,
html[dir="ltr"] h5.text-right,
html[dir="ltr"] h6.text-right,
html[dir="ltr"] span.text-right,
html[dir="ltr"] li.text-right,
body.ltr p.text-right,
body.ltr h1.text-right,
body.ltr h2.text-right,
body.ltr h3.text-right,
body.ltr h4.text-right,
body.ltr h5.text-right,
body.ltr h6.text-right,
body.ltr span.text-right,
body.ltr li.text-right {
    text-align: left !important;
    direction: ltr !important;
}

/* Fix for flex items with justify-end in LTR mode */
html[dir="ltr"] .flex.justify-end,
body.ltr .flex.justify-end {
    justify-content: flex-start !important;
}

html[dir="ltr"] li.flex.justify-end,
body.ltr li.flex.justify-end {
    justify-content: flex-start !important;
    flex-direction: row !important;
}

html[dir="rtl"] .flex.justify-end,
body.rtl .flex.justify-end {
    justify-content: flex-end !important;
}

html[dir="rtl"] li.flex.justify-end,
body.rtl li.flex.justify-end {
    justify-content: flex-end !important;
    flex-direction: row !important;
}

/* Footer contact list - Reset and fix */
footer .footer-contact-list {
    list-style: none !important;
    padding: 0 !important;
    margin: 0 !important;
}

footer .footer-contact-list li {
    display: flex !important;
    align-items: center !important;
    margin: 0 !important;
    padding: 0 !important;
    gap: 1rem !important;
}

/* Footer contact items - RTL mode */
html[dir="rtl"] footer .footer-contact-item,
body.rtl footer .footer-contact-item {
    flex-direction: row !important;
    justify-content: flex-end !important;
    text-align: right !important;
}

/* Contact Items - Use gap instead of margin for better spacing */
.contact-item {
    gap: 1rem !important;
}

.contact-item i {
    flex-shrink: 0;
    margin: 0 !important;
}

.contact-item a,
.contact-item span {
    margin: 0 !important;
}

html[dir="rtl"] footer .footer-contact-item i,
body.rtl footer .footer-contact-item i {
    order: 2 !important;
    margin-right: 0 !important;
    margin-left: 0 !important;
}

html[dir="rtl"] footer .footer-contact-item a,
html[dir="rtl"] footer .footer-contact-item span,
body.rtl footer .footer-contact-item a,
body.rtl footer .footer-contact-item span {
    order: 1 !important;
    text-align: right !important;
}

/* Footer contact items - LTR mode */
html[dir="ltr"] footer .footer-contact-item,
body.ltr footer .footer-contact-item {
    flex-direction: row !important;
    justify-content: flex-start !important;
    text-align: left !important;
}

html[dir="ltr"] footer .footer-contact-item i,
body.ltr footer .footer-contact-item i {
    order: 1 !important;
    margin-left: 0 !important;
    margin-right: 0 !important;
}

html[dir="ltr"] footer .footer-contact-item a,
html[dir="ltr"] footer .footer-contact-item span,
body.ltr footer .footer-contact-item a,
body.ltr footer .footer-contact-item span {
    order: 2 !important;
    text-align: left !important;
}

/* Footer Logo Styling */
.footer-logo {
    display: block;
    max-width: 100%;
    height: auto;
    transition: opacity 0.3s ease;
    /* Remove filter to show original logo colors */
}

.footer-logo:hover {
    opacity: 0.9;
}

/* Ensure logo alignment */
html[dir="ltr"] .footer-logo,
body.ltr .footer-logo {
    margin-left: 0;
    margin-right: auto;
}

html[dir="rtl"] .footer-logo,
body.rtl .footer-logo {
    margin-right: 0;
    margin-left: auto;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: var(--font-main);
    /* No padding-top here - hero section handles its own spacing */
}

h1, h2, h3, h4, h5, h6, button, .cta {
    font-family: var(--font-main);
    font-weight: 700;
    color: var(--text-strong);
    margin-bottom: 1rem; /* Space after headings */
    line-height: 1.3;
}

/* Additional spacing for different heading levels */
h1 {
    margin-bottom: 1.25rem;
}

h2 {
    margin-bottom: 1rem;
}

h3 {
    margin-bottom: 1rem; /* Increased spacing for h3 */
}

h4, h5, h6 {
    margin-bottom: 0.75rem;
}

/* Space between headings and following elements (p, ul, div, etc.) */
h1 + *,
h2 + *,
h3 + *,
h4 + *,
h5 + *,
h6 + * {
    margin-top: 0.75rem !important; /* Additional space after headings */
}

/* Specific spacing for h3 followed by ul (service cards) */
h3 + ul {
    margin-top: 0.875rem !important;
}

/* Ensure proper spacing in service cards */
.bg-white h3,
.bg-gray-50 h3 {
    margin-bottom: 1rem;
}

/* Service Cards - Fixed Width 400px */
.reveal-stagger .reveal-item {
    width: 400px;
    max-width: 100%;
    margin: 0 auto;
}

/* Responsive: Full width on mobile */
@media (max-width: 767px) {
    .reveal-stagger .reveal-item {
        width: 100%;
    }
}

p, li, input, textarea, a {
    font-family: var(--font-main);
    font-weight: 400;
}

/* Custom Scrollbar */
::-webkit-scrollbar {
    width: 10px;
}

::-webkit-scrollbar-track {
    background: #f1f1f1;
}

::-webkit-scrollbar-thumb {
    background: var(--primary);
    border-radius: 5px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--secondary);
}

/* Smooth Transitions */
a, button {
    transition: all 0.3s ease;
}

/* Form Input Focus Styles */
input:focus,
textarea:focus,
select:focus {
    outline: none;
}

/* Image Responsive */
img {
    max-width: 100%;
    height: auto;
}

/* Ensure all images use object-fit: cover */
img[class*="object-cover"],
img[style*="object-fit"] {
    object-fit: cover;
    object-position: center;
}

/* Service card images */
section img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* Section Spacing */
section {
    scroll-margin-top: 80px;
    max-width: 100%;
    overflow-x: hidden;
}

/* ============================================
   About Section - Trust & Credibility B2B Design
   ============================================ */
.about-section {
    background: linear-gradient(135deg, rgba(0, 80, 168, 0.03) 0%, rgba(0, 200, 255, 0.02) 100%);
    position: relative;
    /* Subtle pattern overlay */
    background-image: 
        radial-gradient(circle at 20% 50%, rgba(0, 80, 168, 0.02) 0%, transparent 50%),
        radial-gradient(circle at 80% 50%, rgba(0, 200, 255, 0.02) 0%, transparent 50%);
    background-size: 100% 100%;
}

/* Section Title and Subtitle */
.section-title {
    font-size: clamp(22px, 2.2vw, 32px);
    font-weight: 800;
    color: #0050A8;
    text-align: center;
    margin-bottom: 10px;
    font-family: var(--font-main);
    line-height: 1.3;
}

.section-subtitle {
    max-width: 70ch;
    margin: 0 auto 28px;
    text-align: center;
    color: #1F2937;
    line-height: 1.7;
    font-size: 0.9375rem; /* 15px */
    font-weight: 400;
    font-family: var(--font-main);
}

@media (min-width: 768px) {
    .section-subtitle {
        font-size: 1rem; /* 16px */
        margin-bottom: 32px;
    }
}

.about-container {
    max-width: 1200px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: 1fr; /* Mobile: 1 column */
    gap: 2rem;
}

/* Desktop: 2 columns */
@media (min-width: 1024px) {
    .about-container {
        grid-template-columns: 1fr 1fr;
        gap: 3rem;
        align-items: start;
    }
}

/* RTL/LTR Support - Column order */
html[dir="rtl"] .about-container,
body.rtl .about-container {
    direction: rtl;
}

html[dir="ltr"] .about-container,
body.ltr .about-container {
    direction: ltr;
}

.about-content {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
    max-width: 60ch; /* Limit text width for readability */
    width: 100%;
}

.about-copy {
    display: flex;
    flex-direction: column;
    gap: 1.25rem;
}

.about-lead {
    font-size: 1rem; /* 16px */
    font-weight: 400;
    line-height: 1.7;
    color: var(--text-strong);
    margin: 0;
}

@media (min-width: 768px) {
    .about-lead {
        font-size: 1.125rem; /* 18px */
    }
}

.about-subtitle {
    font-size: 1.25rem; /* 20px */
    font-weight: 700;
    line-height: 1.4;
    margin: 0;
    color: var(--primary);
}

@media (min-width: 768px) {
    .about-subtitle {
        font-size: 1.375rem; /* 22px */
    }
}

.about-list {
    list-style: none;
    padding: 0;
    margin: 14px 0 0;
    display: grid;
    gap: 10px;
}

.about-list li {
    display: flex;
    align-items: flex-start;
    gap: 10px;
}

/* RTL/LTR Support */
html[dir="rtl"] .about-list li,
body.rtl .about-list li {
    flex-direction: row-reverse;
}

html[dir="ltr"] .about-list li,
body.ltr .about-list li {
    flex-direction: row;
}

.about-list .tick {
    width: 22px;
    height: 22px;
    flex: 0 0 22px;
    border-radius: 999px;
    background: rgba(0, 200, 255, 0.14);
    position: relative;
    margin-top: 2px;
}

.about-list .tick::after {
    content: '✓';
    position: absolute;
    inset: 0;
    display: grid;
    place-items: center;
    color: #0050A8;
    font-weight: 800;
    font-size: 14px;
}

.about-list .txt {
    flex: 1;
    min-width: 0;
    line-height: 1.8;
    color: #1F2937;
    font-size: 0.9375rem; /* 15px */
}

@media (min-width: 768px) {
    .about-list .txt {
        font-size: 1rem; /* 16px */
    }
}

/* Trust Cards Grid - 2x2 on Desktop */
.about-trust-cards {
    display: grid;
    grid-template-columns: 1fr; /* Mobile: 1 column */
    gap: 1rem;
}

/* Mobile: 2 columns */
@media (min-width: 640px) {
    .about-trust-cards {
        grid-template-columns: repeat(2, 1fr);
        gap: 1rem;
    }
}

/* Desktop: 2x2 grid */
@media (min-width: 1024px) {
    .about-trust-cards {
        grid-template-columns: repeat(2, 1fr);
        gap: 1rem;
    }
}

.trust-card {
    background: #FFFFFF;
    border-radius: 0.75rem;
    padding: 1.25rem 1.5rem;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    border: 1px solid #E5E7EB;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    min-height: 120px; /* Unified height for visual balance */
    justify-content: flex-start;
}

.trust-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.12);
}

/* Respect prefers-reduced-motion */
@media (prefers-reduced-motion: reduce) {
    .trust-card {
        transition: box-shadow 0.2s ease;
    }
    
    .trust-card:hover {
        transform: none;
    }
}

.trust-icon {
    width: 40px;
    height: 40px;
    background: rgba(0, 80, 168, 0.1);
    color: var(--primary);
    border-radius: 0.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.25rem;
    flex-shrink: 0;
}

.trust-title {
    font-size: 1rem; /* 16px */
    font-weight: 700;
    line-height: 1.4;
    margin: 0;
    color: var(--text-strong);
}

@media (min-width: 768px) {
    .trust-title {
        font-size: 1.125rem; /* 18px */
    }
}

.trust-desc {
    font-size: 0.875rem; /* 14px */
    font-weight: 400;
    line-height: 1.5;
    margin: 0;
    color: var(--text-muted);
}

@media (min-width: 768px) {
    .trust-desc {
        font-size: 0.9375rem; /* 15px */
    }
}

/* Hero Section Gradient Animation */
@keyframes gradient-shift {
    0% {
        background-position: 0% 50%;
    }
    50% {
        background-position: 100% 50%;
    }
    100% {
        background-position: 0% 50%;
    }
}

.bg-gradient-to-br {
    background-size: 200% 200%;
    animation: gradient-shift 15s ease infinite;
}

/* Card Hover Effects */
.card-hover {
    transition: all 0.3s ease;
}

.card-hover:hover {
    transform: translateY(-5px);
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
}

/* Button Pulse Animation */
@keyframes pulse-primary {
    0%, 100% {
        box-shadow: 0 0 0 0 rgba(0, 80, 168, 0.7);
    }
    50% {
        box-shadow: 0 0 0 10px rgba(0, 80, 168, 0);
    }
}

.btn-pulse:hover {
    animation: pulse-primary 2s infinite;
}

/* Loading Spinner */
.spinner {
    border: 3px solid #f3f3f3;
    border-top: 3px solid var(--primary);
    border-radius: 50%;
    width: 30px;
    height: 30px;
    animation: spin 1s linear infinite;
    display: inline-block;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Success Message */
.success-message {
    background-color: #10b981;
    color: white;
    padding: 1rem;
    border-radius: 0.5rem;
    margin-top: 1rem;
    text-align: center;
}

/* Error Message */
.error-message {
    background-color: var(--primary);
    color: white;
    padding: 1rem;
    border-radius: 0.5rem;
    margin-top: 1rem;
    text-align: center;
}

/* Responsive Typography */
@media (max-width: 640px) {
    h1 {
        font-size: 2rem;
    }
    h2 {
        font-size: 1.75rem;
    }
}

/* Print Styles */
@media print {
    .no-print {
        display: none;
    }
}

/* Override Tailwind colors with CSS variables */
.text-primary {
    color: var(--primary) !important;
}

.bg-primary {
    background-color: var(--primary) !important;
}

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

.text-secondary {
    color: var(--secondary) !important;
}

.bg-secondary {
    background-color: var(--secondary) !important;
}

.border-secondary {
    border-color: var(--secondary) !important;
}

.text-accent {
    color: var(--accent) !important;
}

.bg-accent {
    background-color: var(--accent) !important;
}

.hover\:text-primary:hover {
    color: var(--primary) !important;
}

.hover\:bg-primary:hover {
    background-color: var(--primary) !important;
}

.hover\:border-primary:hover {
    border-color: var(--primary) !important;
}

.hover\:border-secondary:hover {
    border-color: var(--secondary) !important;
}

/* ============================================
   Header / Navbar Styles
   ============================================ */
.header-navbar {
    position: fixed;
    top: 0;
    width: 100%;
    z-index: 100;
    background: #FFFFFF;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

/* Increase header height to accommodate larger logo */
.header-navbar nav > div {
    min-height: 5rem; /* Increased for mobile */
}

@media (min-width: 768px) {
    .header-navbar nav > div {
        min-height: 6rem; /* Increased for tablet */
    }
}

@media (min-width: 1024px) {
    .header-navbar nav > div {
        min-height: 7rem; /* Increased for desktop */
    }
}

/* Navigation Links Container */
.nav-links-container {
    gap: 1.5rem; /* Increased gap between links */
}

/* Navigation Links */
.nav-link {
    color: var(--text); /* Dark text on white background */
    font-size: 16px; /* Increased from 15px */
    font-weight: 600; /* Increased from 500 */
    text-decoration: none;
    padding: 0.5rem 0;
    transition: all 0.3s ease;
    border-bottom: 2px solid transparent;
    font-family: var(--font-main);
    position: relative;
}

.nav-link:hover {
    color: var(--primary);
    border-bottom: 2px solid var(--primary);
}

/* Active state for navigation links */
.nav-link.active {
    color: var(--primary);
    border-bottom: 2px solid var(--primary);
}

/* Header Logo - Larger size, especially on mobile */
.header-logo {
    height: 4.5rem; /* Much larger on mobile */
    width: auto;
    object-fit: contain;
}

@media (min-width: 768px) {
    .header-logo {
        height: 5.5rem; /* Larger on tablet */
    }
}

@media (min-width: 1024px) {
    .header-logo {
        height: 6rem; /* Even larger on desktop */
    }
}

/* Mobile Navigation Links */
.nav-link-mobile {
    color: var(--text); /* Dark text on white background */
    font-size: 16px; /* Increased from 15px */
    font-weight: 600; /* Increased from 500 */
    text-decoration: none;
    padding: 0.75rem 0;
    transition: all 0.3s ease;
    border-bottom: 2px solid transparent;
    font-family: var(--font-main);
}

.nav-link-mobile:hover,
.nav-link-mobile.active {
    color: var(--primary);
    border-bottom: 2px solid var(--primary);
}

/* Language Toggle Button */
.lang-toggle-btn {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 1rem;
    background: rgba(0, 80, 168, 0.1);
    border: 1px solid rgba(0, 80, 168, 0.2);
    border-radius: 0.5rem;
    color: var(--primary);
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    font-family: var(--font-main);
}

.lang-toggle-btn:hover {
    background: rgba(0, 200, 255, 0.1);
    border-color: var(--secondary);
    color: var(--secondary);
}

.lang-toggle-btn i {
    font-size: 14px;
}

/* Mobile Menu Button */
.mobile-menu-btn {
    color: var(--text);
    font-size: 1.25rem;
    background: transparent;
    border: none;
    cursor: pointer;
    padding: 0.5rem;
    transition: color 0.3s ease;
    display: none; /* Hidden by default, shown on mobile */
}

.mobile-menu-btn:hover {
    color: var(--primary);
}

/* Show mobile menu button on mobile */
@media (max-width: 991px) {
    .mobile-menu-btn {
        display: block;
    }
}

/* RTL/LTR Support for Header */
html[dir="rtl"] .header-navbar,
body.rtl .header-navbar {
    direction: rtl;
}

html[dir="ltr"] .header-navbar,
body.ltr .header-navbar {
    direction: ltr;
}

/* Hide desktop nav links on mobile */
@media (max-width: 991px) {
    .nav-links-container {
        display: none !important;
    }
}

/* ============================================
   Mobile Drawer Sidebar Styles
   ============================================ */
.drawer-backdrop {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.45);
    opacity: 0;
    pointer-events: none;
    transition: opacity 200ms ease;
    z-index: 999;
}

.drawer {
    position: fixed;
    top: 0;
    height: 100vh;
    width: min(86vw, 320px);
    background: #020918;
    border-left: 1px solid rgba(255, 255, 255, 0.08);
    transform: translateX(110%);
    transition: transform 240ms ease;
    z-index: 1000;
    padding: 0;
    display: flex;
    flex-direction: column;
    box-shadow: -4px 0 24px rgba(0, 0, 0, 0.5);
}

/* RTL: Drawer opens from right */
body.rtl .drawer,
html[dir="rtl"] .drawer {
    right: 0;
    left: auto;
    transform: translateX(110%);
    border-left: 1px solid rgba(255, 255, 255, 0.08);
    border-right: none;
}

/* LTR: Drawer opens from left */
body.ltr .drawer,
html[dir="ltr"] .drawer {
    left: 0;
    right: auto;
    transform: translateX(-110%);
    border-left: none;
    border-right: 1px solid rgba(255, 255, 255, 0.08);
}

/* Drawer Header */
.drawer-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1.25rem 1.5rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.drawer-title {
    color: #FFFFFF;
    font-size: 18px;
    font-weight: 700;
    font-family: var(--font-main);
}

.drawer-close {
    background: transparent;
    border: none;
    color: #E5F4FF;
    font-size: 1.5rem;
    cursor: pointer;
    padding: 0.5rem;
    transition: color 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 2.5rem;
    height: 2.5rem;
    border-radius: 0.5rem;
}

.drawer-close:hover {
    color: #00C8FF;
    background: rgba(0, 200, 255, 0.1);
}

/* Drawer Navigation */
.drawer-nav {
    display: flex;
    flex-direction: column;
    padding: 1rem 0;
    overflow-y: auto;
    flex: 1;
}

.drawer-link {
    color: #E5F4FF;
    font-size: 16px;
    font-weight: 600;
    text-decoration: none;
    padding: 1rem 1.5rem;
    transition: all 0.3s ease;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    font-family: var(--font-main);
    display: block;
}

.drawer-link:hover,
.drawer-link.active {
    color: #00C8FF;
    background: rgba(0, 200, 255, 0.1);
    border-left: 3px solid #00C8FF;
    padding-left: calc(1.5rem - 3px);
}

/* RTL: Border on right side */
body.rtl .drawer-link:hover,
body.rtl .drawer-link.active,
html[dir="rtl"] .drawer-link:hover,
html[dir="rtl"] .drawer-link.active {
    border-left: none;
    border-right: 3px solid #00C8FF;
    padding-left: 1.5rem;
    padding-right: calc(1.5rem - 3px);
}

/* LTR: Border on left side */
body.ltr .drawer-link:hover,
body.ltr .drawer-link.active,
html[dir="ltr"] .drawer-link:hover,
html[dir="ltr"] .drawer-link.active {
    border-left: 3px solid #00C8FF;
    border-right: none;
    padding-left: calc(1.5rem - 3px);
    padding-right: 1.5rem;
}

/* Drawer Open State */
body.drawer-open .drawer-backdrop {
    opacity: 1;
    pointer-events: auto;
}

body.drawer-open .drawer,
body.drawer-open body.rtl .drawer,
body.drawer-open body.ltr .drawer,
html[dir="rtl"] body.drawer-open .drawer,
html[dir="ltr"] body.drawer-open .drawer {
    transform: translateX(0);
}

/* Hide drawer on desktop */
@media (min-width: 992px) {
    .drawer-backdrop,
    .drawer {
        display: none !important;
    }
}

/* ============================================
   Hero Section Styles
   ============================================ */
.hero-section {
    position: relative;
    min-height: 85vh;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    color: #FFFFFF;
    /* صورة أنظمة الحماية المتقدمة */
    background-image: url('https://boldtarget.sa/wp-content/uploads/2024/01/testing-commission-MEP-5-scaled.jpg');
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    padding-top: 5.5rem; /* Space for fixed header (h-16 = 4rem + 1.5rem spacing) */
    padding-bottom: 4rem;
    padding-inline: 1rem;
}

.hero-overlay {
    position: absolute;
    inset: 0;
    /* Overlay أقوى لضمان وضوح النص وتحقيق التباين WCAG AA */
    background: rgba(2, 9, 24, 0.55);
    z-index: 1;
}

/* Hero Content - بدون Card */
.hero-content {
    position: relative;
    z-index: 2;
    max-width: 780px;
    margin: 0 auto;
    padding: 0 1.5rem;
}

.hero-title {
    font-size: clamp(28px, 4vw, 44px); /* Slightly reduced max size */
    font-weight: 800;
    margin-bottom: 1rem;
    line-height: 1.3;
    color: #FFFFFF;
    font-family: var(--font-main);
    /* Limit to 2-3 lines max */
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
    max-width: 100%;
}

.hero-subtitle {
    font-size: 17px;
    font-weight: 400;
    line-height: 1.7;
    /* Limit to 2 lines on desktop */
    max-width: 95%;
    margin: 0 auto 1.75rem;
    color: var(--text-on-dark) !important; /* High contrast on dark background */
    font-family: var(--font-main);
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.hero-cta {
    display: inline-block;
    margin-top: 0.5rem;
    padding: 0.875rem 2.5rem;
    min-height: 44px; /* Minimum touch target size */
    background: #00C8FF;
    color: #020918;
    border-radius: 999px;
    font-weight: 700;
    font-size: 16px; /* Increased from 15px */
    text-decoration: none;
    transition: all 0.3s ease;
    font-family: var(--font-main);
    box-shadow: 0 4px 16px rgba(0, 200, 255, 0.4);
    border: 2px solid transparent;
}

.hero-cta:hover {
    background: #FFFFFF;
    color: #0050A8;
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(255, 255, 255, 0.5);
    border-color: rgba(255, 255, 255, 0.3);
}

.hero-cta:active {
    transform: translateY(0);
}

/* Responsive Hero Section */
@media (max-width: 768px) {
    .hero-section {
        min-height: 75vh;
        padding-top: 5rem; /* Space for fixed header on mobile (h-16 = 4rem + 1rem spacing) */
        padding-bottom: 2.5rem;
    }
    
    .hero-card {
        padding: 24px 20px;
        border-radius: 16px;
        max-width: 95%;
    }
    
    .hero-title {
        font-size: clamp(24px, 6vw, 32px);
        margin-bottom: 0.75rem;
        -webkit-line-clamp: 4; /* Allow more lines on mobile */
    }
    
    .hero-subtitle {
        font-size: 15px;
        max-width: 100%;
        margin-bottom: 1.5rem;
        -webkit-line-clamp: 3; /* Allow more lines on mobile */
    }
    
    .hero-cta {
        padding: 0.875rem 2rem;
        font-size: 15px;
        min-height: 44px;
    }
}

/* Desktop specific adjustments */
@media (min-width: 1024px) {
    .hero-section {
        padding-top: 6rem; /* Space for fixed header on desktop (h-20 = 5rem + 1rem spacing) */
        padding-bottom: 5rem;
    }
    
    .hero-card {
        padding: 32px 30px;
    }
}

/* RTL/LTR Support for Hero - Always centered */
html[dir="rtl"] .hero-section,
html[dir="rtl"] .hero-card,
body.rtl .hero-section,
body.rtl .hero-card {
    text-align: center;
    direction: rtl; /* For text direction inside */
}

html[dir="ltr"] .hero-section,
html[dir="ltr"] .hero-card,
body.ltr .hero-section,
body.ltr .hero-card {
    text-align: center;
    direction: ltr; /* For text direction inside */
}

/* Ensure hero card content is always centered */
.hero-card {
    text-align: center;
}

/* ============================================
   Reveal on Scroll Animations
   ============================================ */
.reveal {
    opacity: 0;
    transform: translateX(var(--revealX)) translateY(12px);
    filter: blur(2px);
    transition: opacity 600ms ease, transform 600ms ease, filter 600ms ease;
    will-change: transform, opacity;
}

.reveal.is-visible {
    opacity: 1;
    transform: translateX(0) translateY(0);
    filter: blur(0);
}

/* Stagger for cards */
.reveal-stagger .reveal-item {
    transition-delay: calc(var(--i) * 90ms);
    width: 400px;
    max-width: 100%;
    margin: 0 auto;
}

/* Responsive: Full width on mobile for service cards */
@media (max-width: 767px) {
    .reveal-stagger .reveal-item {
        width: 100%;
    }
}

/* Line-by-line reveal */
.reveal-lines .line {
    display: block;
    opacity: 0;
    transform: translateX(var(--revealX)) translateY(8px);
    transition: 500ms ease;
    transition-property: opacity, transform;
}

.reveal-lines.is-visible .line {
    opacity: 1;
    transform: translateX(0) translateY(0);
}

.reveal-lines.is-visible .line:nth-child(1) {
    transition-delay: 0ms;
}

.reveal-lines.is-visible .line:nth-child(2) {
    transition-delay: 120ms;
}

.reveal-lines.is-visible .line:nth-child(3) {
    transition-delay: 240ms;
}

.reveal-lines.is-visible .line:nth-child(4) {
    transition-delay: 360ms;
}

.reveal-lines.is-visible .line:nth-child(5) {
    transition-delay: 480ms;
}

.reveal-lines.is-visible .line:nth-child(6) {
    transition-delay: 600ms;
}

/* Accessibility: Respect prefers-reduced-motion */
@media (prefers-reduced-motion: reduce) {
    .reveal,
    .reveal * {
        transition: none !important;
        transform: none !important;
        filter: none !important;
    }
    
    .reveal {
        opacity: 1 !important;
    }
    
    .reveal-lines .line {
        opacity: 1 !important;
        transform: none !important;
    }
}

/* ============================================
   Text on Dark Backgrounds (Hero, Footer, etc.)
   ============================================ */
.on-dark,
.hero-section,
.hero-content,
.hero-title,
.hero-subtitle {
    color: var(--text-on-dark) !important;
}

.on-dark p,
.hero-section p,
.hero-subtitle {
    color: var(--text-on-dark) !important;
    max-width: 100%; /* Remove max-width restriction on dark backgrounds */
}

/* Footer text - ensure white/light color on dark background */
footer {
    color: var(--text-on-dark) !important;
}

footer p,
footer a,
footer span,
footer li {
    color: var(--text-on-dark) !important;
}

footer .text-white,
footer [data-i18n="footer-description"],
footer [data-i18n="footer-copyright"] {
    color: var(--text-on-dark) !important;
}

/* Override any gray colors in footer */
footer .text-gray-400,
footer .text-gray-300,
footer .text-gray-500 {
    color: var(--text-on-dark) !important;
}

/* Section-specific paragraph improvements */
section p {
    margin-bottom: 16px;
}

section p:last-child {
    margin-bottom: 0;
}

/* Improve contrast for text in cards and sections */
.bg-white p,
.bg-gray-50 p,
.card p,
.bg-white li,
.bg-gray-50 li {
    color: var(--text-muted);
}

/* Ensure headings maintain good contrast */
h1, h2, h3, h4, h5, h6 {
    color: var(--text-strong);
    line-height: 1.3;
}

/* ============================================
   Feature List Styling (Service Cards)
   ============================================ */
.feat-list {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.feat-item {
    display: flex;
    align-items: flex-start; /* الأيقونة مع أول سطر */
    gap: 0.625rem; /* 10px - works for both RTL and LTR */
}

.feat-icon {
    flex: 0 0 auto; /* لا تتمدد ولا تنزل سطر لوحدها */
    line-height: 1.6;
    margin-top: 2px;
    font-size: 1em;
    font-weight: bold;
    color: var(--primary);
}

.feat-text {
    flex: 1 1 auto; /* النص هو الذي يلف */
    min-width: 0;
    overflow-wrap: anywhere;
}

/* ============================================
   Why Choose Us Section - Professional Grid Layout
   ============================================ */
.why-us-grid {
    display: flex;
    flex-direction: column;
    gap: 1rem; /* Increased gap between cards */
}

@media (min-width: 768px) {
    .why-us-grid {
        gap: 1.25rem; /* Larger gap on desktop */
    }
}

.why-us-card {
    display: flex;
    align-items: flex-start;
    gap: 16px;
    background: #F9FAFB; /* bg-gray-50 */
    padding: 1rem 1.25rem; /* Reduced padding */
    border-radius: 0.5rem;
    transition: transform 0.2s ease, box-shadow 0.2s ease, background-color 0.2s ease;
}

/* RTL: Reverse flex direction (icon on right, text on left) */
/* High specificity to override any conflicting rules */
html[dir="rtl"] .why-us-card,
html[dir="rtl"] body .why-us-card,
html[dir="rtl"] .why-us-grid .why-us-card,
body.rtl .why-us-card,
body.rtl .why-us-grid .why-us-card {
    flex-direction: row-reverse !important;
    direction: rtl !important; /* Ensure RTL direction */
}

/* LTR: Normal flex direction (icon on left, text on right) */
html[dir="ltr"] .why-us-card,
html[dir="ltr"] body .why-us-card,
html[dir="ltr"] .why-us-grid .why-us-card,
body.ltr .why-us-card,
body.ltr .why-us-grid .why-us-card {
    flex-direction: row !important;
    direction: ltr !important; /* Ensure LTR direction */
}

@media (min-width: 768px) {
    .why-us-card {
        padding: 1.25rem 1.5rem; /* Slightly more padding on desktop */
        gap: 1.25rem;
    }
}

/* Icon styling - Unified */
.why-us-icon {
    width: 52px;
    height: 52px;
    flex: 0 0 52px;
    background: var(--primary);
    color: #FFFFFF;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.25rem;
    /* Remove any absolute positioning or fixed margins */
    position: static !important;
    margin-inline-start: 0 !important;
    margin-inline-end: 0 !important;
    margin-left: 0 !important;
    margin-right: 0 !important;
    float: none !important;
}

/* Content positioning */
.why-us-content {
    flex: 1;
    min-width: 0; /* Prevent overflow */
}

.why-us-title {
    font-size: 1.125rem; /* 18px */
    font-weight: 700; /* Bold */
    line-height: 1.4;
    margin-bottom: 0.5rem;
    color: var(--text-strong);
}

@media (min-width: 768px) {
    .why-us-title {
        font-size: 1.25rem; /* 20px */
    }
}

.why-us-desc {
    font-size: 0.9375rem; /* 15px */
    font-weight: 400; /* Regular */
    line-height: 1.6;
    color: var(--text-muted);
    margin: 0;
}

@media (min-width: 768px) {
    .why-us-desc {
        font-size: 1rem; /* 16px */
    }
}

/* Hover effect - Professional lift with shadow */
@media (prefers-reduced-motion: no-preference) {
    .why-us-card:hover {
        transform: translateY(-2px);
        box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
        background-color: #FFFFFF;
    }
}

/* Respect prefers-reduced-motion */
@media (prefers-reduced-motion: reduce) {
    .why-us-card {
        transition: background-color 0.2s ease;
    }
    
    .why-us-card:hover {
        transform: none;
        box-shadow: none;
        background-color: #FFFFFF;
    }
}

/* ============================================
   Required Documents Section - Professional List Layout
   ============================================ */
.docs-card {
    max-width: 900px;
    margin: 0 auto;
    background: #FFFFFF;
    border-radius: 0.5rem;
    padding: 1.5rem 1.25rem;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

@media (min-width: 768px) {
    .docs-card {
        padding: 2rem 2.5rem;
    }
}

.docs-list {
    list-style: none;
    padding: 0;
    margin: 0;
    display: grid;
    gap: 14px;
}

.docs-item {
    display: flex;
    align-items: flex-start;
    gap: 14px;
}

/* RTL/LTR Support - Icon position using flex-direction */
/* High specificity to override any conflicting rules */
html[dir="rtl"] .docs-item,
html[dir="rtl"] body .docs-item,
html[dir="rtl"] .docs-list .docs-item,
body.rtl .docs-item,
body.rtl .docs-list .docs-item {
    flex-direction: row-reverse !important; /* Icon on right, text on left in RTL */
    direction: rtl !important; /* Ensure RTL direction */
}

html[dir="ltr"] .docs-item,
html[dir="ltr"] body .docs-item,
html[dir="ltr"] .docs-list .docs-item,
body.ltr .docs-item,
body.ltr .docs-list .docs-item {
    flex-direction: row !important; /* Icon on left, text on right in LTR */
    direction: ltr !important; /* Ensure LTR direction */
}

.docs-icon {
    width: 44px;
    height: 44px;
    flex: 0 0 44px;
    display: grid;
    place-items: center;
    border-radius: 12px;
    background: rgba(0, 200, 255, 0.12);
    color: #0050A8;
    font-size: 1.25rem;
    /* Remove any absolute positioning or fixed margins */
    position: static !important;
    margin-inline-start: 0 !important;
    margin-inline-end: 0 !important;
    margin-left: 0 !important;
    margin-right: 0 !important;
    float: none !important;
}

.docs-text {
    flex: 1;
    min-width: 0;
    color: #0F172A; /* Strong text color for good contrast */
    line-height: 1.7;
    font-size: 0.9375rem; /* 15px */
    font-weight: 400;
}

@media (min-width: 768px) {
    .docs-text {
        font-size: 1rem; /* 16px */
    }
}

/* ============================================
   Target Facilities Section - Professional Grid Layout
   ============================================ */
.facilities-grid {
    display: grid;
    grid-template-columns: 1fr; /* Mobile: 1 column */
    gap: 1rem;
}

/* Tablet: 2 columns */
@media (min-width: 640px) {
    .facilities-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 1.25rem;
    }
}

/* Desktop: 3 columns */
@media (min-width: 1024px) {
    .facilities-grid {
        grid-template-columns: repeat(3, 1fr);
        gap: 1.5rem;
    }
}

/* Large Desktop: 4 columns */
@media (min-width: 1280px) {
    .facilities-grid {
        grid-template-columns: repeat(4, 1fr);
    }
}

.facility-card {
    background: #FFFFFF;
    border-radius: 0.5rem; /* Unified radius */
    overflow: hidden;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1); /* Light shadow */
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    display: flex;
    flex-direction: column;
}

.facility-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

/* Respect prefers-reduced-motion */
@media (prefers-reduced-motion: reduce) {
    .facility-card {
        transition: box-shadow 0.2s ease;
    }
    
    .facility-card:hover {
        transform: none;
    }
}

.facility-image {
    width: 100%;
    height: 130px; /* Unified height: 120-140px range */
    overflow: hidden;
    background: #F3F4F6; /* Placeholder background */
}

@media (min-width: 768px) {
    .facility-image {
        height: 140px;
    }
}

.facility-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
}

.facility-content {
    padding: 1rem; /* Unified padding */
    text-align: center;
}

.facility-title {
    font-size: 0.875rem; /* 14px */
    font-weight: 600;
    line-height: 1.5;
    margin: 0;
    color: var(--text-strong);
    /* Limit to 2 lines max */
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    text-overflow: ellipsis;
}

@media (min-width: 768px) {
    .facility-title {
        font-size: 0.9375rem; /* 15px */
    }
}

/* RTL/LTR Support - Text alignment */
html[dir="rtl"] .facility-content,
body.rtl .facility-content {
    text-align: center;
}

html[dir="ltr"] .facility-content,
body.ltr .facility-content {
    text-align: center;
}

/* ============================================
   Services Section - Premium Card Design
   ============================================ */
.services-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 18px;
    width: 100%;
    max-width: 100%;
}

.services-grid > * {
    min-width: 0; /* Important to prevent card content overflow */
}

.service-card {
    background: #FFFFFF;
    border-radius: 0.75rem;
    overflow: hidden;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
    border: 2px solid #E5E7EB;
    transition: transform 0.3s ease, box-shadow 0.3s ease, border-color 0.3s ease;
    display: flex;
    flex-direction: column;
    min-height: 420px; /* Unified min-height */
}

.service-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.12);
    border-color: var(--secondary);
}

/* Respect prefers-reduced-motion */
@media (prefers-reduced-motion: reduce) {
    .service-card {
        transition: border-color 0.2s ease;
    }
    
    .service-card:hover {
        transform: none;
        box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
    }
}

.service-image {
    position: relative;
    width: 100%;
    height: 140px; /* Fixed height */
    overflow: hidden;
    background: #F3F4F6;
    max-width: 100%;
}

.service-image img {
    width: 100%;
    height: 140px;
    object-fit: cover;
    object-position: center;
    display: block;
    max-width: 100%;
}

.service-image-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(to bottom, rgba(0, 0, 0, 0.2), rgba(0, 0, 0, 0.4));
    z-index: 1;
}

.service-icon {
    position: absolute;
    bottom: 1rem;
    width: 56px;
    height: 56px;
    background: var(--primary);
    color: #FFFFFF;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    z-index: 2;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

/* RTL/LTR Support - Icon position */
html[dir="rtl"] .service-icon,
body.rtl .service-icon {
    right: 1rem;
    left: auto;
}

html[dir="ltr"] .service-icon,
body.ltr .service-icon {
    left: 1rem;
    right: auto;
}

.service-content {
    padding: 1.5rem;
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    min-width: 0; /* Prevent overflow */
    max-width: 100%;
}

.service-title {
    font-size: 1.125rem; /* 18px */
    font-weight: 700;
    line-height: 1.4;
    margin: 0;
    color: var(--text-strong);
    /* Limit to 1 line */
    display: -webkit-box;
    -webkit-line-clamp: 1;
    -webkit-box-orient: vertical;
    overflow: hidden;
    text-overflow: ellipsis;
}

@media (min-width: 768px) {
    .service-title {
        font-size: 1.25rem; /* 20px */
    }
}

.service-description {
    font-size: 0.875rem; /* 14px */
    font-weight: 400;
    line-height: 1.6;
    color: var(--text-muted);
    margin: 0;
    /* Limit to 2 lines */
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

@media (min-width: 768px) {
    .service-description {
        font-size: 0.9375rem; /* 15px */
    }
}

.service-features {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.service-feature-item {
    display: flex;
    align-items: flex-start;
    gap: 0.625rem;
}

.service-feature-item .feat-icon {
    flex: 0 0 auto;
    color: var(--primary);
    font-weight: bold;
    font-size: 0.875rem;
    margin-top: 2px;
}

.service-feature-item .feat-text {
    flex: 1 1 auto;
    min-width: 0;
    font-size: 0.875rem;
    line-height: 1.5;
    color: var(--text-muted);
}

    min-width: 0; /* مهم داخل flex لمنع مشاكل الالتفاف */
    overflow-wrap: anywhere; /* حتى ما يصير قص بالكلمات الطويلة */
    word-break: break-word;
    line-height: 1.6;
}

/* RTL/LTR Support - gap handles spacing automatically */
html[dir="rtl"] .feat-item,
body.rtl .feat-item {
    flex-direction: row;
    text-align: right;
}

html[dir="ltr"] .feat-item,
body.ltr .feat-item {
    flex-direction: row;
    text-align: left;
}

/* Override for headings on dark backgrounds */
.on-dark h1,
.on-dark h2,
.on-dark h3,
.on-dark h4,
.on-dark h5,
.on-dark h6,
.hero-section h1,
.hero-section h2,
.hero-section h3,
footer h1,
footer h2,
footer h3,
footer h4,
footer h5,
footer h6 {
    color: var(--text-on-dark);
}

