/* ================================
   Media Lab - Grayscale Creative
   ================================ */

:root {
    --primary: #111111;
    --primary-light: #2a2a2a;
    --accent: #888888;
    --accent-light: #aaaaaa;
    --bg-light: #f5f5f5;
    --text-dark: #111111;
    --text-muted: #6b6b6b;
    --silver: #c0c0c0;
    --charcoal: #333333;
    --smoke: #e8e8e8;
}

/* ---- Skip to Content (Accessibility) ---- */
.skip-to-content {
    position: absolute;
    top: -100%;
    left: 50%;
    transform: translateX(-50%);
    background: var(--primary);
    color: #fff;
    padding: 0.75rem 1.5rem;
    border-radius: 0 0 8px 8px;
    z-index: 9999;
    text-decoration: none;
    font-weight: 600;
    transition: top 0.2s ease;
}
.skip-to-content:focus {
    top: 0;
    color: #fff;
}

/* ---- Animated Gradient Keyframes ---- */
@keyframes gradientShift {
    0% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}

@keyframes gradientDiagonal {
    0% { background-position: 0% 0%; }
    25% { background-position: 100% 0%; }
    50% { background-position: 100% 100%; }
    75% { background-position: 0% 100%; }
    100% { background-position: 0% 0%; }
}

@keyframes shimmer {
    0% { background-position: -200% 0; }
    100% { background-position: 200% 0; }
}

@keyframes pulseGlow {
    0%, 100% { box-shadow: 0 0 20px rgba(255,255,255,0.05); }
    50% { box-shadow: 0 0 40px rgba(255,255,255,0.15); }
}

@keyframes subtlePulse {
    0%, 100% { opacity: 0.03; }
    50% { opacity: 0.08; }
}

@keyframes floatOrb {
    0%, 100% { transform: translate(0, 0) scale(1); }
    33% { transform: translate(30px, -20px) scale(1.05); }
    66% { transform: translate(-20px, 15px) scale(0.95); }
}

@keyframes rotateSlow {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

@keyframes borderFlow {
    0% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}

@keyframes textShimmer {
    0% { background-position: -100% 0; }
    100% { background-position: 200% 0; }
}

/* ---- Base ---- */
body {
    font-family: 'Tajawal', 'Inter', sans-serif;
    color: var(--text-dark);
    overflow-x: hidden;
}

html[lang="en"] body {
    font-family: 'Inter', 'Tajawal', sans-serif;
}

/* ---- Navbar ---- */
.navbar {
    padding: 0.8rem 0;
    transition: all 0.3s ease;
}

.navbar.scrolled {
    padding: 0.4rem 0;
    box-shadow: 0 2px 20px rgba(0,0,0,0.1) !important;
}

.navbar-brand {
    font-size: 1.4rem;
}

.navbar-brand .text-primary {
    color: var(--primary) !important;
}

.nav-link {
    font-weight: 500;
    color: var(--text-dark) !important;
    padding: 0.5rem 1rem !important;
    transition: color 0.3s ease;
    position: relative;
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 0;
    height: 2px;
    background: linear-gradient(90deg, transparent, var(--charcoal), transparent);
    background-size: 200% 100%;
    animation: shimmer 2s linear infinite;
    transition: width 0.3s ease;
}

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

.nav-link:hover,
.nav-link.active {
    color: var(--charcoal) !important;
}

.lang-switch {
    border-color: var(--primary) !important;
    color: var(--primary) !important;
    font-weight: 500;
}

.lang-switch:hover {
    background: var(--primary) !important;
    color: #fff !important;
}

/* ---- Hero Section ---- */
.hero-section {
    min-height: 100dvh;
    display: flex;
    align-items: center;
    background: #0a0a0a;
    color: #fff;
    position: relative;
    overflow: hidden;
    padding-top: 130px;
}

.hero-bg-slider {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 0;
}

.hero-slide {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-size: cover;
    background-position: center;
    opacity: 0;
    transition: opacity 1.5s ease-in-out;
    transform: scale(1.05);
    animation: heroZoom 8s ease-in-out infinite alternate;
}

.hero-slide.active {
    opacity: 1;
}

@keyframes heroZoom {
    0% { transform: scale(1); }
    100% { transform: scale(1.08); }
}

.hero-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(to bottom, rgba(0,0,0,0.65) 0%, rgba(0,0,0,0.55) 50%, rgba(0,0,0,0.75) 100%);
    z-index: 1;
}

.hero-section::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -20%;
    width: 600px;
    height: 600px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(255,255,255,0.06) 0%, transparent 70%);
    animation: floatOrb 8s ease-in-out infinite;
    z-index: 2;
}

.hero-section::after {
    content: '';
    position: absolute;
    bottom: -30%;
    left: -10%;
    width: 500px;
    height: 500px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(255,255,255,0.04) 0%, transparent 70%);
    animation: floatOrb 10s ease-in-out infinite reverse;
    z-index: 2;
}

.hero-title {
    font-size: 3.5rem;
    font-weight: 800;
    line-height: 1.2;
}

.hero-subtitle {
    font-size: 1.25rem;
    font-weight: 300;
    opacity: 0.9;
    max-width: 600px;
}

.btn-hero {
    padding: 0.75rem 2rem;
    font-weight: 600;
    border-radius: 50px;
    transition: all 0.3s ease;
}

.btn-hero-primary {
    background: #fff;
    color: var(--primary);
    border: 2px solid #fff;
    position: relative;
    overflow: hidden;
}

.btn-hero-primary::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.4), transparent);
    transition: left 0.5s ease;
}

.btn-hero-primary:hover::before {
    left: 100%;
}

.btn-hero-primary:hover {
    background: transparent;
    color: #fff;
    border-color: #fff;
}

.btn-hero-outline {
    background: transparent;
    color: #fff;
    border: 2px solid rgba(255,255,255,0.3);
    position: relative;
    overflow: hidden;
}

.btn-hero-outline::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.1), transparent);
    transition: left 0.5s ease;
}

.btn-hero-outline:hover::before {
    left: 100%;
}

.btn-hero-outline:hover {
    background: rgba(255,255,255,0.1);
    color: #fff;
    border-color: rgba(255,255,255,0.6);
}

/* ---- Sections ---- */
.section {
    padding: 5rem 0;
}

.section-alt {
    background: var(--bg-light);
}

.section-title {
    font-size: 2.2rem;
    font-weight: 700;
    color: var(--primary);
    margin-bottom: 1rem;
}

.section-line {
    width: 60px;
    height: 4px;
    background: linear-gradient(90deg, var(--charcoal), var(--silver), var(--charcoal));
    background-size: 200% 100%;
    animation: shimmer 3s linear infinite;
    border-radius: 2px;
    margin-bottom: 2.5rem;
}

/* ---- Page Header ---- */
.page-header {
    background: #0a0a0a;
    color: #fff;
    padding: 16rem 0 8rem;
    text-align: center;
    position: relative;
    overflow: hidden;
}

.page-header-bg {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-size: cover;
    background-position: center;
    z-index: 0;
}

.page-header-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(to bottom, rgba(0,0,0,0.6) 0%, rgba(0,0,0,0.5) 50%, rgba(0,0,0,0.7) 100%);
    z-index: 1;
}

.page-header h1 {
    font-size: 2.5rem;
    font-weight: 700;
}

/* ---- Cards ---- */
.card-service {
    border: none;
    border-radius: 16px;
    padding: 2rem;
    background: #fff;
    box-shadow: 0 4px 20px rgba(0,0,0,0.06);
    transition: all 0.3s ease;
    height: 100%;
}

.card-service:hover {
    transform: translateY(-8px);
    box-shadow: 0 12px 40px rgba(0,0,0,0.15);
}

.card-service .icon {
    width: 64px;
    height: 64px;
    border-radius: 16px;
    background: linear-gradient(-45deg, #111, #333, #555, #333);
    background-size: 300% 300%;
    animation: gradientShift 6s ease infinite;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    font-size: 1.5rem;
    margin-bottom: 1.5rem;
    position: relative;
}

.card-service:hover .icon {
    animation: gradientShift 3s ease infinite;
}

.card-service h4 {
    color: var(--primary);
    font-weight: 700;
    margin-bottom: 1rem;
}

.card-service p {
    color: var(--text-muted);
    line-height: 1.8;
}

/* ---- Project Cards ---- */
.card-project {
    border: none;
    border-radius: 16px;
    overflow: hidden;
    background: #fff;
    box-shadow: 0 4px 20px rgba(0,0,0,0.06);
    transition: all 0.3s ease;
    height: 100%;
}

.card-project:hover {
    transform: translateY(-5px);
    box-shadow: 0 12px 40px rgba(0,0,0,0.12);
}

.card-project .card-img-top {
    height: 200px;
    object-fit: cover;
}

.card-project .project-icon {
    width: 100%;
    height: 200px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 4rem;
    color: #fff;
}

.card-project .project-logo {
    width: 120px;
    height: 120px;
    object-fit: contain;
    filter: drop-shadow(0 4px 12px rgba(0, 0, 0, 0.3));
    transition: transform 0.3s ease;
}

.card-project:hover .project-logo {
    transform: scale(1.08);
}

.card-project .project-text-logo {
    font-family: 'Amiri', serif;
    font-weight: 700;
    font-size: 4rem;
    color: #fff;
    line-height: 1;
    text-shadow: 0 4px 12px rgba(0, 0, 0, 0.4);
    transition: transform 0.3s ease;
    direction: rtl;
}

.card-project:hover .project-text-logo {
    transform: scale(1.08);
}

.project-bg-1 {
    background: linear-gradient(-45deg, #111, #222, #333, #222);
    background-size: 300% 300%;
    animation: gradientShift 8s ease infinite;
}

.project-bg-2 {
    background: linear-gradient(-45deg, #222, #444, #333, #555);
    background-size: 300% 300%;
    animation: gradientShift 8s ease infinite 2s;
}

.project-bg-3 {
    background: linear-gradient(-45deg, #1a1a1a, #3a3a3a, #2a2a2a, #4a4a4a);
    background-size: 300% 300%;
    animation: gradientShift 8s ease infinite 4s;
}

/* ---- Partner Cards ---- */
.card-partner {
    border: 2px solid #e2e8f0;
    border-radius: 16px;
    padding: 2rem;
    text-align: center;
    transition: all 0.3s ease;
    height: 100%;
    background: #fff;
}

.card-partner:hover {
    border-color: var(--charcoal);
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.1);
}

.card-partner .partner-icon {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    background: var(--bg-light);
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 1rem;
    font-size: 2rem;
    color: var(--charcoal);
    transition: all 0.4s ease;
}

.card-partner:hover .partner-icon {
    background: var(--primary);
    color: #fff;
}

.card-partner h5 {
    font-weight: 700;
    color: var(--primary);
}

/* ---- Team ---- */
.card-team {
    border: none;
    border-radius: 16px;
    padding: 2rem;
    text-align: center;
    background: #fff;
    box-shadow: 0 4px 20px rgba(0,0,0,0.06);
    transition: all 0.3s ease;
    height: 100%;
}

.card-team:hover {
    transform: translateY(-5px);
    box-shadow: 0 12px 40px rgba(0,0,0,0.12);
}

.card-team .avatar {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    background: linear-gradient(-45deg, #111, #333, #555, #333);
    background-size: 300% 300%;
    animation: gradientShift 6s ease infinite;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 1rem;
    color: #fff;
    font-size: 2rem;
    font-weight: 700;
}

.card-team h5 {
    color: var(--primary);
    font-weight: 700;
}

.card-team p {
    color: var(--text-muted);
}

/* ---- Vision/Mission Cards ---- */
.card-info {
    border: none;
    border-radius: 16px;
    padding: 2.5rem;
    background: #fff;
    box-shadow: 0 4px 20px rgba(0,0,0,0.06);
    height: 100%;
    text-align: center;
}

.card-info .info-icon {
    width: 72px;
    height: 72px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 1.5rem;
    font-size: 1.75rem;
    color: #fff;
}

.card-info h4 {
    color: var(--primary);
    font-weight: 700;
    margin-bottom: 1rem;
}

.card-info p {
    color: var(--text-muted);
    line-height: 1.8;
}

.bg-primary-gradient {
    background: linear-gradient(-45deg, #111, #2a2a2a, #444, #2a2a2a);
    background-size: 300% 300%;
    animation: gradientShift 6s ease infinite;
}

.bg-accent-gradient {
    background: linear-gradient(-45deg, #333, #555, #777, #555);
    background-size: 300% 300%;
    animation: gradientShift 6s ease infinite 2s;
}

.bg-purple-gradient {
    background: linear-gradient(-45deg, #1a1a1a, #3a3a3a, #555, #3a3a3a);
    background-size: 300% 300%;
    animation: gradientShift 6s ease infinite 4s;
}

/* ---- Objectives ---- */
.objective-item {
    display: flex;
    align-items: flex-start;
    gap: 1rem;
    padding: 1rem 0;
    border-bottom: 1px solid #e2e8f0;
}

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

.objective-item .num {
    width: 36px;
    height: 36px;
    min-width: 36px;
    border-radius: 50%;
    background: linear-gradient(-45deg, #222, #444, #333);
    background-size: 200% 200%;
    animation: gradientShift 4s ease infinite;
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 0.875rem;
}

.objective-item p {
    margin: 0;
    color: var(--text-muted);
    line-height: 1.8;
}

/* ---- CTA Section ---- */
.cta-section {
    background: linear-gradient(-45deg, #0a0a0a, #1a1a1a, #2d2d2d, #1a1a1a, #0a0a0a);
    background-size: 400% 400%;
    animation: gradientShift 10s ease infinite;
    color: #fff;
    padding: 5rem 0;
    text-align: center;
    position: relative;
    overflow: hidden;
}

.cta-section::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(ellipse, rgba(255,255,255,0.02) 0%, transparent 50%);
    animation: rotateSlow 20s linear infinite;
}

.cta-section h2 {
    font-weight: 700;
    margin-bottom: 1rem;
}

.cta-section p {
    opacity: 0.9;
    font-size: 1.1rem;
}

.btn-cta {
    background: #fff;
    color: var(--primary);
    padding: 0.75rem 2.5rem;
    border-radius: 50px;
    font-weight: 600;
    border: 2px solid #fff;
    transition: all 0.3s ease;
}

.btn-cta:hover {
    background: transparent;
    color: #fff;
}

/* ---- Contact Form ---- */
.form-control,
.form-select {
    border: 2px solid #e2e8f0;
    border-radius: 12px;
    padding: 0.75rem 1rem;
    transition: border-color 0.3s ease;
}

.form-control:focus,
.form-select:focus {
    border-color: var(--charcoal);
    box-shadow: 0 0 0 0.2rem rgba(0, 0, 0, 0.08);
}

.btn-submit {
    background: linear-gradient(-45deg, #111, #333, #555, #333);
    background-size: 300% 300%;
    animation: gradientShift 6s ease infinite;
    color: #fff;
    padding: 0.75rem 3rem;
    border-radius: 50px;
    font-weight: 600;
    border: none;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.btn-submit::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.15), transparent);
    transition: left 0.5s ease;
}

.btn-submit:hover::before {
    left: 100%;
}

.btn-submit:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(0,0,0,0.2);
    color: #fff;
}

/* ---- Footer ---- */
footer {
    background: var(--primary) !important;
    position: relative;
}

footer::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, transparent, var(--silver), transparent);
    background-size: 200% 100%;
    animation: shimmer 4s linear infinite;
}

.footer-logo {
    filter: brightness(0) invert(1);
}

.hover-link:hover {
    color: var(--silver) !important;
}

/* ---- Use Cases ---- */
.uc-sector-badge {
    display: inline-block;
    background: var(--bg-light);
    color: var(--charcoal);
    font-weight: 500;
    font-size: 0.8rem;
    padding: 0.3rem 0.75rem;
    border-radius: 50px;
    border: 1px solid var(--smoke);
}

.btn-uc-details {
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
    background: none;
    border: 2px solid var(--charcoal);
    color: var(--charcoal);
    padding: 0.5rem 1.25rem;
    border-radius: 50px;
    font-weight: 600;
    font-size: 0.9rem;
    transition: all 0.3s ease;
    align-self: flex-start;
}

html[dir="rtl"] .btn-uc-details i {
    transform: scaleX(-1);
}

.btn-uc-details:hover {
    background: var(--primary);
    border-color: var(--primary);
    color: #fff;
}

.uc-info-card {
    background: var(--bg-light);
    border-radius: 12px;
    padding: 1.25rem;
    height: 100%;
    border-right: 3px solid var(--smoke);
}

html[dir="rtl"] .uc-info-card {
    border-right: none;
    border-left: 3px solid var(--smoke);
}

.uc-challenge-card {
    border-right-color: var(--charcoal);
}

.uc-solution-card {
    border-right-color: var(--accent);
}

.uc-result-card {
    border-right-color: var(--primary);
}

html[dir="rtl"] .uc-challenge-card {
    border-left-color: var(--charcoal);
}

html[dir="rtl"] .uc-solution-card {
    border-left-color: var(--accent);
}

html[dir="rtl"] .uc-result-card {
    border-left-color: var(--primary);
}

.uc-info-label {
    font-weight: 700;
    font-size: 0.85rem;
    color: var(--primary);
    margin-bottom: 0.5rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.uc-info-card p {
    font-size: 0.9rem;
    color: var(--text-muted);
    line-height: 1.7;
}

.uc-steps-list {
    counter-reset: step;
    list-style: none;
    padding: 0;
}

.uc-steps-list li {
    position: relative;
    padding: 0.75rem 0 0.75rem 2.5rem;
    border-bottom: 1px solid var(--smoke);
    color: var(--text-muted);
    line-height: 1.7;
}

html[dir="rtl"] .uc-steps-list li {
    padding: 0.75rem 2.5rem 0.75rem 0;
}

.uc-steps-list li:last-child {
    border-bottom: none;
}

.uc-steps-list li::before {
    counter-increment: step;
    content: counter(step);
    position: absolute;
    left: 0;
    top: 0.75rem;
    width: 28px;
    height: 28px;
    border-radius: 50%;
    background: var(--primary);
    color: #fff;
    font-weight: 700;
    font-size: 0.8rem;
    display: flex;
    align-items: center;
    justify-content: center;
}

html[dir="rtl"] .uc-steps-list li::before {
    left: auto;
    right: 0;
}

.uc-deliverables-list {
    list-style: none;
    padding: 0;
}

.uc-deliverables-list li {
    display: flex;
    align-items: flex-start;
    gap: 0.5rem;
    padding: 0.5rem 0;
    color: var(--text-muted);
    line-height: 1.7;
}

.uc-deliverables-list li i {
    color: var(--charcoal);
    font-size: 1.1rem;
    margin-top: 0.2rem;
    flex-shrink: 0;
}

.uc-service-group-header {
    padding-bottom: 1.5rem;
    border-bottom: 1px solid var(--smoke);
}

.uc-service-group-header h2 {
    font-size: 1.6rem;
    font-weight: 700;
    color: var(--primary);
    line-height: 1.3;
}

.uc-service-group-icon {
    width: 56px;
    height: 56px;
    border-radius: 50%;
    background: var(--bg-light);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    color: var(--primary);
    font-size: 1.6rem;
}

.uc-service-group-num {
    letter-spacing: 2px;
    font-weight: 600;
}

@media (max-width: 576px) {
    .uc-service-group-header h2 {
        font-size: 1.25rem;
    }

    .uc-service-group-icon {
        width: 44px;
        height: 44px;
        font-size: 1.25rem;
    }
}

/* ---- Utilities ---- */
.text-accent {
    color: var(--charcoal) !important;
}

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

/* ---- Responsive ---- */
@media (max-width: 768px) {
    .hero-title {
        font-size: 2.5rem;
    }

    .hero-subtitle {
        font-size: 1.1rem;
    }

    .section {
        padding: 3.5rem 0;
    }

    .section-title {
        font-size: 1.8rem;
    }

    .page-header {
        padding: 14rem 0 5rem;
    }

    .page-header h1 {
        font-size: 2rem;
    }
}

@media (max-width: 576px) {
    .hero-title {
        font-size: 2rem;
    }

    .btn-hero {
        padding: 0.6rem 1.5rem;
        font-size: 0.9rem;
    }
}

/* ---- Animations ---- */
.fade-in {
    opacity: 0;
    transform: translateY(20px);
    transition: all 0.6s ease;
}

.fade-in.visible {
    opacity: 1;
    transform: translateY(0);
}

/* ---- Creative Grayscale Effects ---- */

/* Animated border on hover for all cards */
.card-service,
.card-project,
.card-partner,
.card-team,
.card-info {
    position: relative;
}

.card-service::before,
.card-project::before,
.card-team::before,
.card-info::before {
    content: '';
    position: absolute;
    top: -1px;
    left: -1px;
    right: -1px;
    bottom: -1px;
    border-radius: 17px;
    background: linear-gradient(45deg, transparent, rgba(150,150,150,0.3), transparent);
    background-size: 300% 300%;
    z-index: -1;
    opacity: 0;
    transition: opacity 0.4s ease;
    animation: gradientDiagonal 4s ease infinite;
}

.card-service:hover::before,
.card-project:hover::before,
.card-team:hover::before,
.card-info:hover::before {
    opacity: 1;
}

/* Noise texture overlay for dark sections */
.hero-section > .container,
.cta-section > *,
.page-header > .container {
    position: relative;
    z-index: 2;
}

/* Scrollbar styling */
::-webkit-scrollbar {
    width: 8px;
}

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

::-webkit-scrollbar-thumb {
    background: linear-gradient(to bottom, #999, #555);
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: linear-gradient(to bottom, #777, #333);
}

/* Selection color */
::selection {
    background: rgba(50, 50, 50, 0.3);
    color: #111;
}

/* Smooth scrolling */
html {
    scroll-behavior: smooth;
}

/* ---- Reduced Motion (Accessibility) ---- */
@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
        scroll-behavior: auto !important;
    }

    .hero-slide {
        transition: none;
    }

    [data-aos] {
        opacity: 1 !important;
        transform: none !important;
        transition: none !important;
    }
}

/* ---- Scroll to Top Button ---- */
.scroll-top-btn {
    position: fixed;
    bottom: 2rem;
    right: 2rem;
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background: var(--primary);
    color: #fff;
    border: none;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    box-shadow: 0 4px 15px rgba(0,0,0,0.2);
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease, transform 0.3s ease;
    z-index: 1000;
    cursor: pointer;
}

html[dir="rtl"] .scroll-top-btn {
    right: auto;
    left: 2rem;
}

.scroll-top-btn.visible {
    opacity: 1;
    visibility: visible;
}

.scroll-top-btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 6px 20px rgba(0,0,0,0.3);
}

/* ---- Breadcrumbs ---- */
.breadcrumb-nav {
    padding: 1rem 0;
    background: var(--bg-light);
    border-bottom: 1px solid var(--smoke);
}

.breadcrumb-nav .breadcrumb {
    margin-bottom: 0;
    font-size: 0.9rem;
}

.breadcrumb-nav .breadcrumb-item a {
    color: var(--text-muted);
    text-decoration: none;
    transition: color 0.3s ease;
}

.breadcrumb-nav .breadcrumb-item a:hover {
    color: var(--primary);
}

.breadcrumb-nav .breadcrumb-item.active {
    color: var(--primary);
    font-weight: 500;
}

/* ---- Loading State ---- */
.btn-submit.loading {
    pointer-events: none;
    opacity: 0.7;
}

.btn-submit .spinner-border {
    width: 1rem;
    height: 1rem;
    border-width: 2px;
}

/* ---- Workflow Timeline (Two-Row Snake) ---- */
.workflow-timeline {
    --wf-cols: 5;
    --wf-gap: 1.25rem;
    --wf-marker: 56px;
    --wf-marker-center: 28px;
    --wf-bend-w: 6rem;
    --wf-bend-r: var(--wf-bend-w);
    --wf-row-gap: 4rem;
    --wf-line: #bdbdbd;
    --wf-col-w: calc((100% - (var(--wf-cols) - 1) * var(--wf-gap)) / var(--wf-cols));
    position: relative;
    padding: 2.5rem 0 1.5rem;
    padding-inline-end: var(--wf-bend-w);
}

.workflow-row {
    display: flex;
    gap: var(--wf-gap);
    position: relative;
}

.workflow-row-bottom {
    flex-direction: row-reverse;
    justify-content: center;
    margin-top: var(--wf-row-gap);
}

/* Bend area: anchored to the inline-end of row-top, spans row 1 line → row 2 line.
   Aspect-ratio 1/2 makes width = height/2 so the arc is always a TRUE half-circle. */
.workflow-bend-area {
    position: absolute;
    top: var(--wf-marker-center);
    height: calc(100% + var(--wf-row-gap));
    aspect-ratio: 1 / 2;
    inset-inline-start: 100%;
    pointer-events: none;
}

.workflow-bend-arc {
    display: block;
    width: 100%;
    height: 100%;
    box-sizing: border-box;
    border: 2px solid var(--wf-line);
    border-inline-start: none;
    /* Radius = (width, height/2) where width = height/2, so both = height/2: true quarter-circle.
       Top-right and bottom-right corners meet at the middle = full semicircle. */
    border-start-end-radius: 100% 50%;
    border-end-end-radius: 100% 50%;
}

.workflow-step {
    flex: 0 0 var(--wf-col-w);
    position: relative;
    z-index: 1;
    text-align: center;
}

/* Horizontal line from each marker center to the next marker center */
.workflow-step::after {
    content: "";
    position: absolute;
    top: var(--wf-marker-center);
    inset-inline-start: 50%;
    width: calc(100% + var(--wf-gap));
    height: 2px;
    background: var(--wf-line);
    z-index: 0;
}

/* Row 2 is row-reverse: line extends toward the inline-start side */
.workflow-row-bottom .workflow-step::after {
    inset-inline-start: auto;
    inset-inline-end: 50%;
}

/* Last marker in row 2 has no further item to connect to */
.workflow-row-bottom .workflow-step:last-child::after {
    display: none;
}

/* Step 5 (last step in row 1; bend-area is the actual :last-child): clip the line at the column edge */
.workflow-row-top .workflow-step:nth-last-of-type(1)::after,
.workflow-row-top .workflow-step:nth-child(5)::after {
    inset-inline-start: 50%;
    inset-inline-end: 0;
    width: auto;
}

/* First DOM step of row 2 (snake-bend side): extension from marker center to column edge (meets the arc's bottom-left) */
.workflow-row-bottom .workflow-step:first-child::before {
    content: "";
    position: absolute;
    top: var(--wf-marker-center);
    inset-inline-start: 50%;
    inset-inline-end: 0;
    height: 2px;
    background: var(--wf-line);
    z-index: 0;
}


.workflow-marker {
    width: var(--wf-marker);
    height: var(--wf-marker);
    border-radius: 50%;
    margin: 0 auto 1.25rem;
    background: #fff;
    border: 2px solid var(--primary);
    color: var(--primary);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    box-shadow: 0 4px 14px rgba(0, 0, 0, 0.08);
    transition: all 0.3s ease;
    position: relative;
    z-index: 1;
}

.workflow-step:hover .workflow-marker {
    background: var(--primary);
    color: #fff;
    transform: translateY(-3px);
    box-shadow: 0 8px 22px rgba(0, 0, 0, 0.18);
}

.workflow-num {
    font-size: 1rem;
    letter-spacing: 0.5px;
    font-feature-settings: "tnum" 1;
}

.workflow-step-title {
    color: var(--primary);
    font-weight: 700;
    font-size: 1.05rem;
    margin-bottom: 0.6rem;
}

.workflow-step-text {
    color: var(--text-muted);
    font-size: 0.9rem;
    line-height: 1.7;
    margin: 0;
}

/* Tablet: tighter gaps and smaller marker */
@media (max-width: 991.98px) {
    .workflow-timeline {
        --wf-gap: 0.75rem;
        --wf-marker: 48px;
        --wf-marker-center: 24px;
        --wf-row-gap: 5rem;
        --wf-bend-r: 2rem;
    }
    .workflow-step-text {
        font-size: 0.85rem;
        line-height: 1.6;
    }
}

/* Mobile: collapse to a single vertical column with side line */
@media (max-width: 767.98px) {
    .workflow-timeline {
        padding: 1.5rem 0 0.5rem;
        padding-inline-end: 0;
    }
    .workflow-row,
    .workflow-row-bottom {
        flex-direction: column;
        gap: 2rem;
        margin-top: 0;
    }
    .workflow-row-bottom {
        margin-top: 2rem;
    }
    .workflow-step {
        flex: 1 1 auto;
        width: 100%;
        text-align: start;
        display: grid;
        grid-template-columns: auto 1fr;
        column-gap: 1rem;
        align-items: start;
    }
    .workflow-marker {
        margin: 0;
        grid-row: span 2;
    }
    .workflow-step-title {
        margin-top: 0.4rem;
    }
    /* Hide desktop connector pieces on mobile */
    .workflow-step::after,
    .workflow-row-top::after,
    .workflow-row-bottom::after,
    .workflow-row-bottom .workflow-step:first-child::before,
    .workflow-bend-area {
        display: none;
    }
}
