:root {
    --primary-color: #1977cc;
    --secondary-color: #1977cc;
    --accent-color: #FFD700;
    --bg-color: #f0f4f7;
    --text-color: #1a2c3e;
    --light-text-color: #4a6272;
    --white: #ffffff;
    --shadow-light: 0 4px 15px rgba(0, 0, 0, 0.05);
    --shadow-dark: 0 10px 30px rgba(0, 0, 0, 0.1);
    --border-radius: 20px;
}

html {
  scroll-behavior: smooth;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html, body {
    overflow-x: hidden;
    width: 100%;
    position: relative;
}

section {
    overflow-x: hidden;
    width: 100%;
    max-width: 100%;
}

[dir="rtl"] {
    font-family: 'Tajawal', 'Poppins', sans-serif;
}

body {
    font-family: 'Poppins', 'Inter', sans-serif;
    background-color: var(--bg-color);
    color: var(--text-color);
    line-height: 1.6;
    scroll-behavior: smooth;
}

.container {
    max-width: 1320px;
    margin: 0 auto;
    padding: 0 40px;
    width: 100%;
    box-sizing: border-box;
}

/* ── Header & Nav ── */
header {
    background: rgba(255, 255, 255, 0.97);
    backdrop-filter: blur(10px);
    box-shadow: var(--shadow-light);
    position: sticky;
    top: 0;
    z-index: 1000;
}

.nav-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 0;
    flex-wrap: nowrap;
    gap: 12px;
}

.logo {
    flex-shrink: 0;
    min-width: 0;
}

.logo h1 {
    font-size: clamp(1rem, 3vw, 2rem);
    font-weight: 800;
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
    display: flex;
    align-items: center;
    gap: 8px;
    white-space: nowrap;
    flex-wrap: nowrap;
}

.logo i {
    color: var(--primary-color);
    flex-shrink: 0;
}

.logo span {
    font-size: clamp(0.6rem, 1.5vw, 0.9rem);
    font-weight: 500;
    color: #0b4f8a;
    background: #dbeeff;
    padding: 3px 8px;
    border-radius: 20px;
    vertical-align: middle;
    white-space: nowrap;
}

.logo-tagline {
    font-size: clamp(0.55rem, 1.2vw, 0.7rem);
    color: var(--light-text-color);
    font-weight: 400;
    margin-top: -2px;
    letter-spacing: 0.3px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.nav-links {
    display: flex;
    gap: 20px;
    list-style: none;
    align-items: center;
    flex-shrink: 0;
}

.nav-links a {
    text-decoration: none;
    font-weight: 500;
    color: var(--text-color);
    transition: 0.3s;
    font-size: 0.95rem;
    white-space: nowrap;
}

.nav-links a:hover {
    color: var(--secondary-color);
}

.btn-outline-sm {
    border: 2px solid var(--secondary-color);
    background: transparent;
    padding: 8px 20px;
    border-radius: 30px;
    font-weight: 600;
    color: var(--secondary-color);
}

.btn-outline-sm:hover {
    background: var(--secondary-color);
    color: white;
}

.lang-btn {
    background: #dbeeff;
    color: #0b4f8a;
    border: 1px solid #0b4f8a;
    padding: 5px 12px;
    border-radius: 15px;
    cursor: pointer;
    font-weight: 600;
    font-family: inherit;
    transition: 0.3s;
    white-space: nowrap;
}

.lang-btn:hover {
    background: #0b4f8a;
    color: #fff;
}

/* ── Hamburger ── */
.hamburger {
    display: none;
    flex-direction: column;
    gap: 5px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 6px;
    flex-shrink: 0;
    z-index: 1100;
}

.hamburger span {
    display: block;
    width: 24px;
    height: 2px;
    background: var(--text-color);
    border-radius: 2px;
    transition: 0.3s;
}

/* ── Mobile Nav Drawer ── */
.mobile-nav {
    display: none;
    background: rgba(255, 255, 255, 0.98);
    border-top: 1px solid #e8edf2;
    padding: 16px 0 20px;
}

.mobile-nav ul {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.mobile-nav ul li a {
    display: block;
    padding: 10px 4px;
    font-size: 1rem;
    font-weight: 500;
    color: var(--text-color);
    text-decoration: none;
    border-bottom: 1px solid #f0f4f7;
    transition: color 0.2s;
}

.mobile-nav ul li a:hover {
    color: var(--primary-color);
}

.mobile-nav ul li .lang-btn {
    margin-top: 8px;
}

.mobile-nav.open {
    display: block;
}

/* ── Buttons ── */
.btn {
    padding: 14px 30px;
    border-radius: 30px;
    font-weight: 600;
    font-size: 1rem;
    cursor: pointer;
    transition: 0.3s;
    display: inline-flex;
    align-items: center;
    gap: 10px;
    text-decoration: none;
    border: none;
}

.btn-primary {
    background: var(--primary-color);
    color: white;
}

.btn-primary:hover {
    background: #0f5faa;
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(25, 119, 204, 0.35);
}

.btn-secondary {
    background: rgba(255, 255, 255, 0.12);
    color: white;
    border: 1.5px solid rgba(255, 255, 255, 0.5);
    backdrop-filter: blur(6px);
}

.btn-secondary:hover {
    background: rgba(255, 255, 255, 0.22);
    border-color: rgba(255, 255, 255, 0.8);
}

/* ── Hero Section ── */
.hero {
    position: relative;
    min-height: 100vh;
    color: white;
    display: flex;
    align-items: center;
    overflow: hidden;
    z-index: 0;
    isolation: isolate;
    max-width: 100%;
}

.video-background {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    z-index: 0;
}

.hero-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(
        to bottom,
        rgba(25, 119, 204, 0.72) 0%,
        rgba(25, 119, 204, 0.72) 100%
    );
    z-index: 1;
    pointer-events: none;
}

/* ── Hero Content ── */
.hero-content {
    position: relative;
    z-index: 2;
    width: 100%;
    text-align: center;
    padding: 6rem 0 4rem;
}

.hero-badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: rgba(255, 255, 255, 0.12);
    border: 1px solid rgba(255, 255, 255, 0.28);
    backdrop-filter: blur(8px);
    color: #fff;
    font-size: 13px;
    font-weight: 500;
    padding: 7px 18px;
    border-radius: 999px;
    margin-bottom: 1.4rem;
    letter-spacing: 0.02em;
}

.hero-badge i {
    color: var(--accent-color);
    font-size: 14px;
}

[dir="rtl"] .hero-badge i {
    margin-right: 0;
    margin-left: 8px;
}

.hero h1 {
    font-size: clamp(1.8rem, 4.5vw, 3.5rem);
    font-weight: 800;
    line-height: 1.2;
    margin-bottom: 1.1rem;
    text-shadow: 0 2px 12px rgba(0, 0, 0, 0.3);
}

.hero > .container > p,
.hero p {
    font-size: 1.1rem;
    margin-bottom: 2rem;
    opacity: 0.88;
    max-width: 660px;
    margin-left: auto;
    margin-right: auto;
    line-height: 1.75;
}

.hero-btns {
    display: flex;
    gap: 16px;
    justify-content: center;
    margin-bottom: 3rem;
    flex-wrap: wrap;
}

/* ── Hero 3 Boxes ── */
.hero-boxes {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 16px;
    margin-top: 0.5rem;
}

.hero-box {
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.18);
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
    border-radius: 16px;
    padding: 1.3rem 1.3rem 1.5rem;
    color: #fff;
    text-align: left;
    transition: background 0.25s ease, transform 0.25s ease, border-color 0.25s ease;
}

[dir="rtl"] .hero-box {
    text-align: right;
}

[dir="rtl"] .hero-box-header {
    flex-direction: row-reverse;
}

.hero-box:hover {
    background: rgba(255, 255, 255, 0.14);
    border-color: rgba(255, 255, 255, 0.32);
    transform: translateY(-4px);
}

.hero-box-header {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 1rem;
    padding-bottom: 0.85rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.15);
}

.hero-box-icon {
    width: 38px;
    height: 38px;
    border-radius: 10px;
    background: rgba(255, 255, 255, 0.15);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 15px;
    flex-shrink: 0;
    color: var(--accent-color);
}

.hero-box-header h3 {
    font-size: 14px;
    font-weight: 600;
    margin: 0;
    color: #fff;
    line-height: 1.3;
}

.hero-box ul {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.hero-box ul li {
    display: flex;
    align-items: flex-start;
    gap: 9px;
    font-size: 13px;
    color: rgba(255, 255, 255, 0.82);
    line-height: 1.6;
    width: 100%;
}

.hero-box ul li i {
    font-size: 12px;
    color: #4ade80;
    margin-top: 3px;
    flex-shrink: 0;
    align-self: flex-start;
}

[dir="rtl"] .hero-box ul li {
    flex-direction: row;
    text-align: right;
    direction: rtl;
    justify-content: flex-start;
    align-items: flex-start;
}

[dir="rtl"] .hero-box ul li i {
    margin: 0;
    margin-top: 3px;
    flex-shrink: 0;
    align-self: flex-start;
}

[dir="rtl"] .hero-box ul li span {
    flex: 1;
    text-align: right;
    display: block;
    width: 100%;
}

/* ── Integration & Quote Section ── */
.hero-integration {
    margin-top: 2.5rem;
    text-align: center;
    padding: 0 1rem;
}

.hero-integration-divider {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    margin-bottom: 1.25rem;
}

.hero-integration-line {
    display: block;
    height: 1px;
    width: 48px;
    background: rgba(255, 255, 255, 0.35);
}

.hero-integration-label {
    font-size: 11px;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    font-weight: 500;
    color: rgba(255, 255, 255, 0.55);
}

.hero-integration-text {
    font-size: 15px;
    color: rgba(255, 255, 255, 0.8);
    max-width: 580px;
    margin: 0 auto 1.75rem;
    line-height: 1.8;
    opacity: 1;
}

.hero-integration-text strong {
    color: #ffffff;
    font-weight: 600;
}

.hero-integration-quote-wrap {
    border-top: 1px solid rgba(255, 255, 255, 0.15);
    padding-top: 1.5rem;
    max-width: 580px;
    margin: 0 auto;
    padding-bottom: 1rem;
}

.hero-integration-quote {
    font-size: 17px;
    font-style: italic;
    font-weight: 500;
    color: #ffffff;
    line-height: 1.75;
    margin: 0;
    quotes: none;
}

[dir="rtl"] .hero-integration-divider {
    flex-direction: row-reverse;
}

[dir="rtl"] .hero-integration-text,
[dir="rtl"] .hero-integration-quote {
    direction: rtl;
}

/* ── Sections ── */
section {
    padding: 100px 0;
}

.section-header {
    text-align: center;
    margin-bottom: 60px;
}

.section-title {
    font-size: 2.5rem;
    font-weight: 800;
    color: var(--primary-color);
    margin-bottom: 15px;
}

.section-subtitle {
    font-size: 1.1rem;
    color: var(--light-text-color);
    max-width: 700px;
    margin: 0 auto;
}

/* ── Feature Cards ── */
.cards-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 40px;
}

.card {
    background: var(--white);
    border-radius: var(--border-radius);
    padding: 40px;
    box-shadow: var(--shadow-light);
    transition: 0.3s;
    border: 1px solid transparent;
    position: relative;
    overflow: hidden;
}

.card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 4px;
    background: linear-gradient(90deg, var(--primary-color), var(--secondary-color));
    transform: scaleX(0);
    transition: 0.3s;
}

.card:hover {
    transform: translateY(-10px);
    box-shadow: var(--shadow-dark);
    border-color: #eee;
}

.card:hover::before {
    transform: scaleX(1);
}

.card-icon {
    font-size: 3rem;
    color: var(--primary-color);
    margin-bottom: 25px;
}

.card h3 {
    font-size: 1.6rem;
    font-weight: 700;
    margin-bottom: 15px;
    color: var(--text-color);
}

.card p {
    font-size: 1rem;
    color: var(--light-text-color);
    margin-bottom: 20px;
}

.card .btn-text {
    color: var(--secondary-color);
    font-weight: 600;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 5px;
}

/* ── Radiology Subspecialties ── */
.subspec-section {
    position: relative;
    padding: 100px 0;
    background:
        radial-gradient(900px 420px at 12% 0%, rgba(25, 119, 204, 0.08), transparent 60%),
        radial-gradient(760px 380px at 92% 100%, rgba(25, 119, 204, 0.07), transparent 55%),
        linear-gradient(180deg, #f5f9fd 0%, #ffffff 100%);
    overflow: hidden;
}

.section-eyebrow {
    display: inline-block;
    padding: 6px 16px;
    margin-bottom: 18px;
    border-radius: 999px;
    background: rgba(25, 119, 204, 0.1);
    color: var(--primary-color);
    font-size: 0.78rem;
    font-weight: 700;
    letter-spacing: 0.12em;
    text-transform: uppercase;
}

.subspec-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 24px;
}

.subspec-card {
    position: relative;
    background: var(--white);
    border: 1px solid #e7eef6;
    border-radius: 18px;
    padding: 34px 30px 32px;
    text-align: left;
    box-shadow: 0 2px 6px rgba(16, 42, 67, 0.04);
    overflow: hidden;
    /* scroll-reveal start state */
    opacity: 0;
    transform: translateY(26px);
    transition:
        opacity 0.5s cubic-bezier(0.22, 1, 0.36, 1),
        transform 0.5s cubic-bezier(0.22, 1, 0.36, 1),
        box-shadow 0.35s ease,
        border-color 0.35s ease;
}

.subspec-card.in-view {
    opacity: 1;
    transform: translateY(0);
}

/* top accent bar */
.subspec-card::before {
    content: '';
    position: absolute;
    inset: 0 0 auto 0;
    height: 3px;
    background: linear-gradient(90deg, var(--primary-color), #4aa3e6);
    transform: scaleX(0);
    transform-origin: left;
    transition: transform 0.35s ease;
    z-index: 2;
}

/* light sweep on hover */
.subspec-card::after {
    content: '';
    position: absolute;
    top: 0;
    left: -80%;
    width: 55%;
    height: 100%;
    background: linear-gradient(120deg, transparent, rgba(255, 255, 255, 0.55), transparent);
    transform: skewX(-20deg);
    transition: left 0.7s ease;
    pointer-events: none;
    z-index: 1;
}

.subspec-card:hover {
    transform: translateY(-10px);
    border-color: transparent;
    box-shadow: 0 24px 48px -14px rgba(25, 119, 204, 0.38);
}

.subspec-card:hover::before {
    transform: scaleX(1);
}

.subspec-card:hover::after {
    left: 130%;
}

.subspec-icon,
.subspec-card h3,
.subspec-card p {
    position: relative;
    z-index: 2;
}

.subspec-icon {
    display: grid;
    place-items: center;
    width: 58px;
    height: 58px;
    margin-bottom: 18px;
    border-radius: 16px;
    background: linear-gradient(135deg, #e8f2fc, #d5e8f9);
    color: var(--primary-color);
    font-size: 1.55rem;
    transition: transform 0.35s ease, background 0.35s ease, color 0.35s ease, box-shadow 0.35s ease;
}

/* gentle idle float on the glyph */
.subspec-icon i {
    animation: subspecFloat 3.6s ease-in-out infinite;
}
.subspec-card:nth-child(3n) .subspec-icon i { animation-delay: -1.2s; }
.subspec-card:nth-child(3n + 1) .subspec-icon i { animation-delay: -2.4s; }

@keyframes subspecFloat {
    0%, 100% { transform: translateY(0); }
    50%      { transform: translateY(-4px); }
}

.subspec-card:hover .subspec-icon {
    background: linear-gradient(135deg, var(--primary-color), #155fa0);
    color: #fff;
    transform: translateY(-2px) rotate(-4deg) scale(1.05);
    box-shadow: 0 12px 22px -6px rgba(25, 119, 204, 0.5);
}

.subspec-card:hover .subspec-icon i {
    animation-play-state: paused;
}

.subspec-card h3 {
    font-size: 1.18rem;
    font-weight: 700;
    line-height: 1.35;
    margin-bottom: 10px;
    color: var(--text-color);
    transition: color 0.3s ease;
}

.subspec-card:hover h3 {
    color: var(--primary-color);
}

.subspec-card p {
    font-size: 0.94rem;
    line-height: 1.65;
    color: var(--light-text-color);
}

@media (prefers-reduced-motion: reduce) {
    .subspec-card { opacity: 1; transform: none; transition: box-shadow 0.35s ease, border-color 0.35s ease; }
    .subspec-card::after { display: none; }
    .subspec-icon i { animation: none; }
}

[dir="rtl"] .subspec-card {
    text-align: right;
}

[dir="rtl"] .subspec-card::before {
    transform-origin: right;
}

@media (max-width: 600px) {
    .subspec-section { padding: 70px 0; }
    .subspec-card { padding: 28px 24px; }
}

/* ── Two Column Layout ── */
.two-col {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 60px;
    align-items: center;
}

.col-image img {
    width: 100%;
    border-radius: var(--border-radius);
    box-shadow: var(--shadow-dark);
}

/* ── For Radiologists — "live" image treatment ── */
#for-radiologists .rad-visual {
    position: relative;
    perspective: 1200px;
    opacity: 0;
    transform: translateY(30px) scale(0.97);
    transition: opacity 0.7s cubic-bezier(0.22, 1, 0.36, 1),
                transform 0.7s cubic-bezier(0.22, 1, 0.36, 1);
}

#for-radiologists .rad-visual.in-view {
    opacity: 1;
    transform: translateY(0) scale(1);
}

#for-radiologists .rad-frame {
    position: relative;
    border-radius: var(--border-radius);
    transition: transform 0.4s cubic-bezier(0.22, 1, 0.36, 1),
                box-shadow 0.4s ease;
    transform-style: preserve-3d;
    will-change: transform;
}

#for-radiologists .rad-visual-inner {
    position: relative;
    border-radius: var(--border-radius);
    overflow: hidden;
    box-shadow: var(--shadow-dark);
    animation: radFloat 6s ease-in-out infinite;
}

#for-radiologists .rad-visual-inner img {
    display: block;
    width: 100%;
    border-radius: inherit;
    box-shadow: none;
}

/* glossy gradient edge */
#for-radiologists .rad-visual-inner::before {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: inherit;
    padding: 2px;
    background: linear-gradient(135deg,
        rgba(25, 119, 204, 0.9),
        rgba(25, 119, 204, 0) 38%,
        rgba(25, 119, 204, 0) 62%,
        rgba(11, 94, 94, 0.75));
    -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
    -webkit-mask-composite: xor;
            mask-composite: exclude;
    pointer-events: none;
    z-index: 3;
}

/* soft inner activity glow */
#for-radiologists .rad-visual-inner::after {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: inherit;
    animation: radGlowPulse 4.5s ease-in-out infinite;
    pointer-events: none;
    z-index: 2;
}

/* periodic diagnostic scan sweep */
#for-radiologists .rad-scan {
    position: absolute;
    inset: 0;
    z-index: 2;
    pointer-events: none;
    background: linear-gradient(115deg,
        transparent 43%,
        rgba(255, 255, 255, 0.38) 50%,
        transparent 57%);
    transform: translateX(-100%);
    animation: radScan 6s ease-in-out infinite;
}

/* live badge */
#for-radiologists .rad-live {
    position: absolute;
    top: 16px;
    left: 16px;
    z-index: 4;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 6px 12px;
    border-radius: 999px;
    background: rgba(10, 25, 40, 0.55);
    -webkit-backdrop-filter: blur(6px);
            backdrop-filter: blur(6px);
    color: #fff;
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.09em;
    text-transform: uppercase;
}

#for-radiologists .rad-live-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #22c55e;
    animation: radLiveDot 1.8s ease-out infinite;
}

/* drifting ambient blobs */
#for-radiologists .rad-blob {
    position: absolute;
    border-radius: 50%;
    filter: blur(42px);
    opacity: 0.55;
    z-index: 0;
    pointer-events: none;
}

#for-radiologists .rad-blob-1 {
    width: 170px;
    height: 170px;
    background: rgba(25, 119, 204, 0.5);
    top: -35px;
    right: -30px;
    animation: radBlob1 9s ease-in-out infinite;
}

#for-radiologists .rad-blob-2 {
    width: 150px;
    height: 150px;
    background: rgba(11, 94, 94, 0.4);
    bottom: -45px;
    left: -25px;
    animation: radBlob2 11s ease-in-out infinite;
}

@keyframes radFloat {
    0%, 100% { transform: translateY(0); }
    50%      { transform: translateY(-12px); }
}

@keyframes radScan {
    0%, 12%   { transform: translateX(-100%); }
    52%, 100% { transform: translateX(100%); }
}

@keyframes radGlowPulse {
    0%, 100% { box-shadow: inset 0 0 40px rgba(25, 119, 204, 0); }
    50%      { box-shadow: inset 0 0 55px rgba(25, 119, 204, 0.18); }
}

@keyframes radLiveDot {
    0%   { box-shadow: 0 0 0 0 rgba(34, 197, 94, 0.7); }
    70%  { box-shadow: 0 0 0 10px rgba(34, 197, 94, 0); }
    100% { box-shadow: 0 0 0 0 rgba(34, 197, 94, 0); }
}

@keyframes radBlob1 {
    0%, 100% { transform: translate(0, 0) scale(1); }
    50%      { transform: translate(-22px, 20px) scale(1.12); }
}

@keyframes radBlob2 {
    0%, 100% { transform: translate(0, 0) scale(1); }
    50%      { transform: translate(16px, -18px) scale(1.09); }
}

[dir="rtl"] #for-radiologists .rad-live {
    left: auto;
    right: 16px;
}

@media (prefers-reduced-motion: reduce) {
    #for-radiologists .rad-visual { opacity: 1; transform: none; }
    #for-radiologists .rad-visual-inner,
    #for-radiologists .rad-visual-inner::after,
    #for-radiologists .rad-live-dot,
    #for-radiologists .rad-blob { animation: none; }
    #for-radiologists .rad-scan { display: none; }
}

.feature-list {
    list-style: none;
    margin-top: 30px;
}

.feature-list li {
    font-size: 1.1rem;
    color: var(--light-text-color);
    margin-bottom: 15px;
    display: flex;
    align-items: center;
    gap: 10px;
}

[dir="rtl"] .feature-list {
    padding-right: 0;
}

[dir="rtl"] .feature-list li {
    flex-direction: row-reverse;
    justify-content: flex-end;
    text-align: right;
    direction: rtl;
    width: 100%;
}

[dir="rtl"] .feature-list li i {
    margin: 0;
    flex-shrink: 0;
}

.feature-list li i {
    color: #2c7a4d;
    font-size: 1.3rem;
    flex-shrink: 0;
}

[dir="rtl"] .feature-list li {
    flex-direction: row-reverse;
    text-align: right;
}

[dir="rtl"] .feature-list li span,
[dir="rtl"] .feature-list li {
    text-align: right;
    direction: rtl;
}

[dir="rtl"] .feature-list li i {
    margin-right: 0;
    margin-left: 0;
}

/* RTL fix for services & radiologist sections */
[dir="rtl"] #services .feature-list,
[dir="rtl"] #for-radiologists .feature-list {
    text-align: right;
    direction: rtl;
}

[dir="rtl"] #services .feature-list li,
[dir="rtl"] #for-radiologists .feature-list li {
    flex-direction: row-reverse;
    text-align: right;
    direction: rtl;
    justify-content: flex-start;
}

[dir="rtl"] #services .feature-list li i,
[dir="rtl"] #for-radiologists .feature-list li i {
    margin-left: 0;
    margin-right: 0;
    order: 1;
}

/* ── Enrollment Section ── */
#enroll {
    background-color: var(--white);
    border-radius: 40px;
    padding: 80px;
    box-shadow: var(--shadow-dark);
    margin-top: -50px;
    position: relative;
    z-index: 10;
}

.enroll-split {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 60px;
}

.enroll-info h3 {
    font-size: 2.2rem;
    color: var(--primary-color);
    margin-bottom: 20px;
}

/* ── FIX 1: Contact icons on RIGHT side in Arabic/RTL ──
   direction:rtl on the flex <p> places the first child <i> icon
   at the right (RTL start). Text follows to the left — correct.
   No row-reverse (that would flip phone numbers). */
[dir="rtl"] .enroll-info p {
    direction: rtl;
    text-align: right;
    display: flex;
    align-items: center;
    gap: 10px;
}

[dir="rtl"] .enroll-info p i {
    margin: 0;
    flex-shrink: 0;
}

.form-group {
    margin-bottom: 20px;
}

input, select, textarea {
    width: 100%;
    padding: 16px 20px;
    border: 1px solid #ddd;
    border-radius: 30px;
    font-family: inherit;
    font-size: 1rem;
    background: #f9f9f9;
}

/* ── FIX 2: WhatsApp (tel) field alignment in Arabic/RTL ── */
[dir="rtl"] input[type="tel"] {
    direction: rtl;
    text-align: right;
    unicode-bidi: plaintext;
}

[dir="rtl"] input[type="tel"]::placeholder {
    text-align: right;
    direction: rtl;
}

.file-upload-box {
    width: 100%;
    padding: 16px 20px;
    border: 1px solid #ddd;
    border-radius: 30px;
    font-family: inherit;
    font-size: 1rem;
    background: #f9f9f9;
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
}

.file-upload-label {
    color: var(--light-text-color);
    font-weight: 500;
    white-space: nowrap;
}

.file-upload-box input[type="file"] {
    padding: 0;
    border: 0;
    background: transparent;
    border-radius: 0;
    min-width: 0;
    flex: 1;
}

.file-upload-box input[type="file"]::-webkit-file-upload-button,
.file-upload-box input[type="file"]::file-selector-button {
    padding: 10px 16px;
    border: none;
    border-radius: 20px;
    background: var(--primary-color);
    color: var(--white);
    font-weight: 600;
    cursor: pointer;
    margin-right: 12px;
}

input:focus, select:focus, textarea:focus,
.file-upload-box:focus-within {
    outline: none;
    border-color: var(--secondary-color);
    background: white;
}

textarea {
    border-radius: 20px;
    height: 120px;
    resize: vertical;
}

.btn-form {
    width: 100%;
    justify-content: center;
}

/* ── Footer ── */
footer {
    background: #081a1f;
    color: #cbdbe0;
    padding: 80px 0 30px;
    margin-top: 100px;
}
footer a,
footer a:visited {
    color: var(--primary-color);
    text-decoration: none;
    transition: color 0.3s ease;
}

footer a:hover {
    text-decoration: underline;
    color: var(--secondary-color);
}

.footer-grid {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr 1fr;
    gap: 40px;
    margin-bottom: 50px;
}

.footer-col h4 {
    color: white;
    font-size: 1.2rem;
    margin-bottom: 20px;
}

.footer-col p {
    margin-bottom: 15px;
    font-size: 0.95rem;
}

.footer-links {
    list-style: none;
}

.footer-links li {
    margin-bottom: 10px;
}

.footer-links a {
    color: #cbdbe0;
    text-decoration: none;
    transition: 0.3s;
}

.footer-links a:hover {
    color: var(--accent-color);
}

.social-links {
    display: flex;
    gap: 15px;
    margin-top: 20px;
}

.social-links a,
.social-links a:visited {
    color: white;
    font-size: 1.2rem;
    background: rgba(255,255,255,0.1);
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: 0.3s;
}

.social-links a:hover {
    background: var(--secondary-color);
}

/* ── Responsive ── */
@media (max-width: 1024px) {
    .hero-boxes {
        grid-template-columns: 1fr 1fr;
        gap: 14px;
    }

    .hero-boxes .hero-box:last-child {
        grid-column: span 2;
        max-width: 560px;
        margin: 0 auto;
        width: 100%;
    }

    .hero-integration-text,
    .hero-integration-quote-wrap {
        max-width: 480px;
    }
}

@media (max-width: 992px) {
    .hero h1 { font-size: 2.4rem; }
    .two-col, .enroll-split { grid-template-columns: 1fr; gap: 40px; }
    .footer-grid { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 768px) {
    html, body {
        overflow-x: hidden;
        width: 100%;
        margin: 0;
        padding: 0;
    }

    main, header, footer, section {
        overflow-x: hidden;
        width: 100%;
        max-width: 100vw;
    }

    .container {
        padding: 0 16px;
        width: 100%;
        max-width: 100%;
    }

    /* Header mobile */
    .nav-links {
        display: none;
    }

    .hamburger {
        display: flex;
    }

    .nav-bar {
        padding: 10px 0;
    }

    .logo h1 {
        font-size: clamp(0.9rem, 4vw, 1.3rem);
        gap: 6px;
    }

    .logo span {
        font-size: 0.6rem;
        padding: 2px 6px;
    }

    .logo-tagline {
        font-size: 0.55rem;
        max-width: none;
        white-space: normal;
        overflow: visible;
        text-overflow: unset;
    }

    /* Hero mobile */
    .hero-content {
        padding: 4.5rem 0 2.5rem;
        width: 100%;
        overflow: hidden;
    }

    .hero h1 {
        font-size: clamp(1.5rem, 5vw, 2rem);
    }

    .hero > .container > p,
    .hero p {
        font-size: 0.97rem;
        padding: 0 4px;
    }

    .hero-btns {
        flex-direction: column;
        align-items: center;
        gap: 12px;
        margin-bottom: 2rem;
    }

    .hero-badge {
        font-size: 11px;
        padding: 6px 14px;
        text-align: center;
        max-width: 90%;
        white-space: normal;
        word-break: break-word;
    }

    /* Boxes mobile */
    .hero-boxes {
        grid-template-columns: 1fr;
        gap: 12px;
    }

    .hero-boxes .hero-box:last-child {
        grid-column: span 1;
        max-width: 100%;
    }

    /* Integration mobile */
    .hero-integration {
        margin-top: 1.75rem;
        padding: 0;
    }

    .hero-integration-text {
        font-size: 13.5px;
        max-width: 100%;
        padding: 0 4px;
    }

    .hero-integration-quote {
        font-size: 14.5px;
    }

    .hero-integration-line {
        width: 28px;
    }

    .hero-integration-label {
        font-size: 10px;
        letter-spacing: 0.07em;
    }

    /* Section */
    section {
        padding: 60px 0;
    }

    .section-title {
        font-size: 1.8rem;
    }

    #enroll {
        padding: 32px 20px;
        border-radius: 20px;
    }

    .enroll-info h3 {
        font-size: 1.6rem;
    }

    .footer-grid {
        grid-template-columns: 1fr 1fr;
        gap: 24px;
    }
}

@media (max-width: 480px) {
    .hero h1 {
        font-size: 1.45rem;
    }

    .hero > .container > p,
    .hero p {
        font-size: 0.92rem;
    }

    .hero-box-header h3 {
        font-size: 13px;
    }

    .hero-box ul li {
        font-size: 12px;
    }

    .hero-integration-quote {
        font-size: 13.5px;
    }

    .footer-grid {
        grid-template-columns: 1fr;
    }

    .btn {
        font-size: 0.9rem;
        padding: 12px 22px;
    }
}
#scroll-top {
  position: fixed;
  bottom: 30px;
  right: 30px;
  width: 45px;
  height: 45px;
  background-color: #1977cc;
  color: #fff;
  font-size: 24px;
  text-align: center;
  line-height: 45px;
  border-radius: 50%;
  text-decoration: none;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.3s, visibility 0.3s;
  z-index: 999;
}

#scroll-top.visible {
  opacity: 1;
  visibility: visible;
}

/* ── OTP verification gate ── */
.verify-intro {
  color: #555;
  font-size: 0.95rem;
  line-height: 1.6;
  margin-bottom: 20px;
}
.verify-msg {
  margin-top: 12px;
  font-size: 0.9rem;
  min-height: 18px;
  font-weight: 500;
}
.verify-links {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  margin-top: 16px;
}
.verify-links a {
  color: #0057a8;
  font-size: 0.9rem;
  text-decoration: none;
  font-weight: 500;
}
.verify-links a:hover {
  text-decoration: underline;
}
#v_otp {
  letter-spacing: 6px;
  text-align: center;
  font-size: 1.2rem;
  font-weight: 600;
}
/* ── Inline application-form validation messages ──────────────────────────── */
/* Each message sits under the field it belongs to, so a rejected file or a
   mistyped value never sends the applicant back to the start of the form. */
.field-error {
  color: #c02626;
  font-size: 0.85rem;
  font-weight: 500;
  line-height: 1.45;
  margin: 8px 20px 0;
}

.field-error:empty {
  display: none;
}

input.input-invalid,
select.input-invalid,
.file-upload-box.input-invalid {
  border-color: #e05252;
  background: #fff6f6;
}

.form-notice {
  border-radius: 14px;
  padding: 14px 18px;
  margin-bottom: 20px;
  font-size: 0.92rem;
  font-weight: 500;
  line-height: 1.5;
}

.form-notice-error {
  background: #fee2e2;
  color: #991b1b;
  border: 1px solid #fca5a5;
}

.form-notice-success {
  background: #d1fae5;
  color: #065f46;
  border: 1px solid #6ee7b7;
}

.form-notice .reverify-link {
  display: inline-block;
  margin-top: 8px;
  color: #0057a8;
  font-weight: 600;
  text-decoration: underline;
}
