
/* =========================================
   CSS Variables — Dark Theme (Default)
========================================= */
:root {
    --bg-color: #000000;
    --surface-color: #0a0a0a;
    --text-primary: #ffffff;
    --text-secondary: #a0a0a0;
    --accent-blue: #00B4F0;
    --border-color: #222222;

    --header-bg: rgba(0, 0, 0, 0.9);
    --hero-overlay-start: rgba(0, 0, 0, 0.8);
    --hero-overlay-end: rgba(0, 0, 0, 0.4);
    --hero-stats-bg: rgba(0, 0, 0, 0.7);
    --case-study-overlay: rgba(0, 0, 0, 0.85);

    --font-body: 'Ubuntu', sans-serif;
    --font-arabic: 'Cairo', 'Tajawal', sans-serif;

    /* Unified design system — rounded, consistent across EN + AR */
    --radius-sm: 8px;
    --radius-md: 14px;
    --radius-lg: 20px;
    --radius-pill: 999px;
    --shadow-soft: 0 8px 30px rgba(0, 0, 0, 0.45);
    --shadow-glow: 0 0 24px rgba(0, 180, 240, 0.25);
    --transition-smooth: all 0.35s cubic-bezier(0.4, 0, 0.2, 1);
}

/* =========================================
   Reset & Base
========================================= */
*, *::before, *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: var(--font-body);
    background-color: var(--bg-color);
    color: var(--text-primary);
    overflow-x: hidden;
    line-height: 1.6;
    transition: background-color 0.3s ease, color 0.3s ease;
}

/* Film grain texture — subtle analog feel */
body::before {
    content: '';
    position: fixed;
    inset: 0;
    pointer-events: none;
    z-index: 9999;
    opacity: 0.03;
    background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noise'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noise)' opacity='0.03'/%3E%3C/svg%3E");
    background-repeat: repeat;
}

body.rtl,
html[dir="rtl"] body {
    font-family: var(--font-arabic);
}

.container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 2rem;
}

h1, h2, h3, h4, h5, h6 {
    font-weight: 700;
    line-height: 1.2;
    color: var(--text-primary);
}

a {
    text-decoration: none;
    color: var(--text-primary);
    transition: color 0.3s ease;
}

a:hover {
    color: var(--accent-blue);
}

img {
    max-width: 100%;
    height: auto;
    display: block;
}

ul {
    list-style: none;
}

/* =========================================
   Header & Navigation
========================================= */
#header {
    position: fixed;
    top: 0;
    width: 100%;
    padding: 0;
    z-index: 1000;
    transition: background-color 0.4s cubic-bezier(0.16, 1, 0.3, 1),
                backdrop-filter 0.4s cubic-bezier(0.16, 1, 0.3, 1),
                border-color 0.4s ease,
                box-shadow 0.4s ease;
    border-bottom: 1px solid transparent;
}

#header .container,
#header .nav-inner {
    max-width: 100%;
    width: 100%;
    padding: 0 4%;
    margin: 0;
    box-sizing: border-box;
}

#header.scrolled,
#header.header-opaque {
    background-color: rgba(0, 0, 0, 0.85);
    backdrop-filter: blur(20px) saturate(1.2);
    -webkit-backdrop-filter: blur(20px) saturate(1.2);
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
    box-shadow: 0 1px 30px rgba(0, 0, 0, 0.3);
}

.nav-inner {
    display: flex;
    justify-content: space-between;
    align-items: center;
    max-width: 100%;
    width: 100%;
    height: 72px;
    padding: 0 4%;
    margin: 0;
    box-sizing: border-box;
}

/* Logo */
.logo {
    display: flex;
    align-items: center;
    flex-shrink: 0;
    position: relative;
    z-index: 2;
}

.custom-logo-link {
    display: flex;
    align-items: center;
    line-height: 0;
}

.brand-logo,
.custom-logo-link img,
.custom-logo {
    height: 70px;
    width: auto;
    object-fit: contain;
    transition: filter 0.3s ease, opacity 0.3s ease;
    display: block;
}

/* Inline SVG logo sizing */
svg.miran-svg-logo {
    height: 70px;
    width: auto;
    display: block;
}

.brand-logo:hover,
.custom-logo-link:hover img {
    opacity: 0.8;
}


.site-name-fallback {
    font-size: 1.5rem;
    font-weight: 700;
    letter-spacing: 3px;
    text-transform: uppercase;
    color: var(--text-primary);
}

.site-name-fallback .accent {
    color: var(--accent-blue);
}

/* Desktop Navigation — right-aligned */
.nav-right {
    display: flex;
    align-items: center;
    gap: 2rem;
    margin-left: auto;
    flex-shrink: 0;
}

.nav-desktop {
    /* flows inside .nav-right */
}

.nav-links {
    display: flex;
    gap: 2rem;
    list-style: none;
    align-items: center;
    margin: 0;
    padding: 0;
    flex-wrap: nowrap;
    white-space: nowrap;
}

.nav-links li {
    list-style: none;
    margin: 0;
    padding: 0;
}

.nav-links a {
    font-size: 0.8rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    position: relative;
    color: var(--text-secondary);
    transition: color 0.3s ease;
    padding: 0.5rem 0;
    text-decoration: none;
}

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

.nav-links a::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%) scaleX(0);
    width: 100%;
    height: 2px;
    background: var(--accent-blue);
    transition: transform 0.35s cubic-bezier(0.16, 1, 0.3, 1);
    transform-origin: center;
    border-radius: 1px;
}

.nav-links a:hover::after,
.nav-links .current-menu-item a::after {
    transform: translateX(-50%) scaleX(1);
}

.nav-links .current-menu-item a {
    color: var(--text-primary);
}

/* Language Toggle */
.lang-toggle {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    font-size: 0.75rem;
    font-weight: 700;
    letter-spacing: 1px;
    text-transform: uppercase;
    border: 2px solid rgba(255, 255, 255, 0.15);
    border-radius: 50px;
    padding: 0.5rem 1rem;
    transition: all 0.4s ease;
    color: var(--text-primary);
    text-decoration: none;
    background: rgba(255, 255, 255, 0.03);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    white-space: nowrap;
    flex-shrink: 0;
}

.lang-toggle:hover {
    border-color: var(--accent-blue);
    color: var(--accent-blue);
    background: rgba(0, 180, 240, 0.05);
    transform: translateY(-2px);
}

/* Header CTA Button */
.header-cta {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.78rem;
    font-weight: 600;
    letter-spacing: 0.5px;
    text-transform: uppercase;
    padding: 0.55rem 1.25rem;
    border-radius: 6px;
    background: var(--accent-blue);
    color: #000;
    text-decoration: none;
    transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
    white-space: nowrap;
}

.header-cta svg {
    transition: transform 0.3s ease;
}

.header-cta:hover {
    background: #fff;
    color: #000;
    box-shadow: 0 0 20px rgba(0, 180, 240, 0.25);
}

.header-cta:hover svg {
    transform: translateX(3px);
}

/* ---- Mobile Nav Toggle (hamburger) ---- */
.mobile-nav-toggle {
    display: none;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 5px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 0.5rem;
    width: 40px;
    height: 40px;
    position: relative;
    z-index: 1001;
}

.hamburger-line {
    display: block;
    width: 22px;
    height: 2px;
    background: var(--text-primary);
    border-radius: 2px;
    transition: all 0.35s cubic-bezier(0.16, 1, 0.3, 1);
    transform-origin: center;
}

/* Animate hamburger to X when nav is open */
.mobile-nav-toggle.active .hamburger-line:nth-child(1) {
    transform: translateY(7px) rotate(45deg);
}
.mobile-nav-toggle.active .hamburger-line:nth-child(2) {
    opacity: 0;
    transform: scaleX(0);
}
.mobile-nav-toggle.active .hamburger-line:nth-child(3) {
    transform: translateY(-7px) rotate(-45deg);
}

/* ---- Mobile Nav Drawer ---- */
.mobile-nav {
    position: fixed;
    top: 0;
    right: -100%;
    width: 100%;
    max-width: 420px;
    height: 100%;
    background: var(--bg-color);
    z-index: 1050;
    display: flex;
    flex-direction: column;
    transition: right 0.45s cubic-bezier(0.16, 1, 0.3, 1);
    overflow-y: auto;
    border-left: 1px solid rgba(255, 255, 255, 0.06);
}

html[dir="rtl"] .mobile-nav {
    right: auto;
    left: -100%;
    border-left: none;
    border-right: 1px solid rgba(255, 255, 255, 0.06);
}

.mobile-nav.open {
    right: 0;
}

html[dir="rtl"] .mobile-nav.open {
    left: 0;
}

.mobile-nav-top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 2rem;
    height: 72px;
    flex-shrink: 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.mobile-nav-close {
    background: none;
    border: none;
    cursor: pointer;
    color: var(--text-secondary);
    padding: 0.25rem;
    transition: color 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.mobile-nav-close:hover {
    color: var(--text-primary);
}

.mobile-nav-links {
    flex: 1;
    display: flex;
    flex-direction: column;
    padding: 2rem;
    gap: 0;
}

.mobile-nav-links a {
    font-size: 1.6rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 2px;
    color: var(--text-secondary);
    text-decoration: none;
    padding: 1rem 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.04);
    transition: color 0.3s ease, padding-left 0.3s ease;
    display: block;
}

html[dir="rtl"] .mobile-nav-links a {
    padding-left: 0;
    transition: color 0.3s ease, padding-right 0.3s ease;
}

.mobile-nav-links a:hover,
.mobile-nav-links a.current-menu-item {
    color: var(--accent-blue);
    padding-left: 0.5rem;
}

html[dir="rtl"] .mobile-nav-links a:hover,
html[dir="rtl"] .mobile-nav-links a.current-menu-item {
    padding-left: 0;
    padding-right: 0.5rem;
}

.mobile-nav-links a:last-child {
    border-bottom: none;
}

.mobile-nav-footer {
    padding: 1.5rem 2rem;
    display: flex;
    align-items: center;
    gap: 1rem;
    border-top: 1px solid rgba(255, 255, 255, 0.06);
    flex-shrink: 0;
}

.mobile-nav-footer .header-cta {
    flex: 1;
    justify-content: center;
}

/* Overlay */
.mobile-nav-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
    z-index: 1049;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.4s ease, visibility 0.4s ease;
}

.mobile-nav-overlay.active {
    opacity: 1;
    visibility: visible;
}

/* =========================================
   Buttons & CTAs
========================================= */
.btn-miran-primary,
.btn-miran-secondary {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.8rem;
    padding: 1rem 2.5rem;
    font-size: 0.9rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    border-radius: 50px;
    cursor: pointer;
    transition: all 0.4s cubic-bezier(0.165, 0.84, 0.44, 1);
    font-family: inherit;
    text-decoration: none;
    white-space: nowrap;
    position: relative;
    overflow: hidden;
}

/* Variant 1: Primary (Solid Accent) */
.btn-miran-primary {
    background: var(--accent-blue);
    color: #000;
    border: 2px solid var(--accent-blue);
    box-shadow: 0 4px 15px rgba(0, 180, 240, 0.2);
}

.btn-miran-primary:hover {
    background: #fff;
    border-color: #fff;
    color: #000;
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(0, 180, 240, 0.4);
}

.btn-miran-primary:active {
    transform: translateY(-1px);
}

/* Variant 2: Secondary (Glass/Outline) */
.btn-miran-secondary {
    background: rgba(255, 255, 255, 0.03);
    color: var(--text-primary);
    border: 2px solid rgba(255, 255, 255, 0.15);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
}

.btn-miran-secondary:hover {
    background: var(--accent-blue);
    border-color: var(--accent-blue);
    color: #000;
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(0, 180, 240, 0.3);
}

.btn-miran-secondary:active {
    transform: translateY(-1px);
}

/* Legacy & Specific Overrides */
.btn,
.btn-accent {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.8rem;
    padding: 1rem 2.5rem;
    font-size: 0.9rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    border-radius: 50px;
    cursor: pointer;
    transition: all 0.4s cubic-bezier(0.165, 0.84, 0.44, 1);
    font-family: inherit;
    text-decoration: none;
    white-space: nowrap;
    position: relative;
    overflow: hidden;
    background: rgba(255, 255, 255, 0.03);
    color: var(--text-primary);
    border: 2px solid rgba(255, 255, 255, 0.15);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
}

.btn:hover,
.btn-accent:hover {
    background: var(--accent-blue);
    border-color: var(--accent-blue);
    color: #000;
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(0, 180, 240, 0.3);
}

.header-cta {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.6rem 1.5rem;
    font-size: 0.75rem;
    background: var(--accent-blue);
    color: #000;
    border-radius: 50px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
    transition: all 0.3s ease;
    text-decoration: none;
}

.header-cta:hover {
    background: #fff;
    transform: scale(1.05);
}

.btn-submit {
    width: 100%;
    margin-top: 1rem;
    background: var(--accent-blue);
    color: #000;
    border: none;
    padding: 1.2rem;
    font-size: 1rem;
    font-weight: 800;
    border-radius: 50px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.btn-submit:hover {
    background: #fff;
    transform: translateY(-2px);
}

.btn-accent {
    border-color: var(--accent-blue);
    color: var(--accent-blue);
}

.btn-accent:hover {
    background: var(--accent-blue);
    color: #000;
}

/* =========================================
   Section Utilities
========================================= */
.section-padding {
    padding: 8rem 0;
}

.section-title {
    font-size: 3rem;
    margin-bottom: 4rem;
    border-inline-start: 4px solid var(--accent-blue);
    padding-inline-start: 1.5rem;
}

.section-subtitle {
    color: var(--accent-blue);
    font-size: 1rem;
    font-weight: 700;
    letter-spacing: 2px;
    text-transform: uppercase;
    margin-bottom: 1rem;
    display: block;
}

/* =========================================
   Hero Section
========================================= */
.hero {
    position: relative;
    height: 100vh;
    min-height: 600px;
    display: flex;
    align-items: center;
    background: linear-gradient(to right, var(--hero-overlay-start) 0%, var(--hero-overlay-end) 100%),
                url('https://images.unsplash.com/photo-1601506521937-0121a7fc2a6b?q=80&w=2071&auto=format&fit=crop') center/cover no-repeat;
    padding-top: 80px;
}

.hero-content {
    max-width: 800px;
}

.hero h1 {
    font-size: 4.5rem;
    margin-bottom: 1.5rem;
    color: var(--text-primary);
}

.hero h1 span {
    color: var(--accent-blue);
}

.hero p {
    font-size: 1.2rem;
    color: var(--text-secondary);
    margin-bottom: 2.5rem;
    max-width: 600px;
}

.hero-cta {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    align-items: center;
}

.hero-cta .btn-accent {
    margin-inline-start: 0;
}

/* Hero Stats Bar */
.hero-stats {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    display: flex;
    background: var(--hero-stats-bg);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border-top: 1px solid var(--border-color);
}

.stat-box {
    flex: 1;
    padding: 2rem;
    border-inline-end: 1px solid var(--border-color);
}

.stat-box:last-child {
    border-inline-end: none;
}

.stat-label {
    display: block;
    font-size: 0.8rem;
    color: var(--text-secondary);
    text-transform: uppercase;
    margin-bottom: 0.5rem;
    letter-spacing: 1px;
}

.stat-value {
    font-size: 2rem;
    font-weight: 700;
    color: var(--text-primary);
}

/* =========================================
   Clients Marquee
========================================= */
.clients-marquee {
    padding: 5rem 0;
    overflow: hidden;
    position: relative;
}

.marquee-title {
    text-align: center;
    font-size: 1.1rem;
    color: var(--text-secondary);
    margin-bottom: 2rem;
    font-weight: 600;
    letter-spacing: 1px;
}

.marquee-container {
    width: 100%;
    overflow: hidden;
    white-space: nowrap;
    position: relative;
    direction: ltr;
}

.marquee-container::before,
.marquee-container::after {
    position: absolute;
    top: 0;
    width: 150px;
    height: 100%;
    content: "";
    z-index: 2;
    pointer-events: none;
}

.marquee-container::before {
    left: 0;
    background: linear-gradient(to right, var(--bg-color) 0%, transparent 100%);
}

.marquee-container::after {
    right: 0;
    background: linear-gradient(to left, var(--bg-color) 0%, transparent 100%);
}

.marquee-track {
    display: flex;
    align-items: center;
    gap: 5rem;
    width: max-content;
    animation: marqueeScroll 64s linear infinite;
}

.marquee-track:hover {
    animation-play-state: paused;
}

.marquee-part {
    display: flex;
    align-items: center;
    gap: 5.5rem;
    padding-right: 5.5rem;
}

.marquee-part img,
.marquee-track > img {
    height: 240px;
    max-width: none;
    object-fit: contain;
    flex-shrink: 0;
    transition: transform 0.3s ease;
    cursor: pointer;
}


.marquee-part img:hover,
.marquee-track > img:hover {
    transform: scale(1.15);
}

/* Logos wrapped in links */
.marquee-part a,
.marquee-track > a {
    display: inline-flex;
    align-items: center;
    flex-shrink: 0;
}

.marquee-track > a img {
    height: 240px;
    max-width: none;
    object-fit: contain;
    flex-shrink: 0;
    transition: transform 0.3s ease;
    cursor: pointer;
}

.marquee-track > a img:hover {
    transform: scale(1.15);
}

@keyframes marqueeScroll {
    0% { transform: translateX(0); }
    100% { transform: translateX(-50%); }
}

/* =========================================
   Inspirational Quote Section
========================================= */
.inspire-section {
    padding: 8rem var(--container-padding, 2rem);
    text-align: center;
    border-top: 1px solid var(--border-color);
    border-bottom: 1px solid var(--border-color);
}

.inspire-quote {
    font-size: clamp(2.2rem, 5vw, 4rem);
    font-weight: 800;
    line-height: 1.2;
    color: var(--text-primary);
    max-width: 1000px;
    margin: 0 auto 1.5rem;
    letter-spacing: -0.02em;
}

.inspire-word {
    display: inline-block;
    transition: color 0.2s ease;
    cursor: default;
}

.inspire-word:hover {
    color: var(--accent-blue);
}

.inspire-sub {
    font-size: 1.15rem;
    color: var(--text-secondary);
    max-width: 580px;
    margin: 0 auto;
}

/* =========================================
   Talents Section
========================================= */
.talents-section {
    min-height: 80vh;
    display: flex;
    align-items: center;
    padding: 8rem var(--container-padding, 2rem);
}

.talents-inner {
    max-width: 900px;
}

.talents-label {
    display: block;
    font-size: 0.8rem;
    font-weight: 700;
    letter-spacing: 3px;
    text-transform: uppercase;
    color: var(--accent-blue);
    margin-bottom: 1.5rem;
}

.talents-section h2 {
    font-size: clamp(2.8rem, 7vw, 5.5rem);
    line-height: 1.05;
    margin: 0;
    color: var(--text-primary);
}

/* =========================================
   Services Section
========================================= */
.services-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
}

.service-card {
    background: var(--surface-color);
    border: 1px solid var(--border-color);
    padding: 3rem 2rem;
    transition: all 0.3s ease;
}

.service-card:hover {
    border-color: var(--accent-blue);
    transform: translateY(-10px);
    background: var(--bg-color);
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.05);
}

.service-num {
    font-family: monospace;
    font-size: 1.2rem;
    color: var(--accent-blue);
    margin-bottom: 1.5rem;
    display: block;
}

.service-card h3 {
    font-size: 1.5rem;
    margin-bottom: 1rem;
}

.service-card p {
    color: var(--text-secondary);
    font-size: 0.95rem;
    line-height: 1.7;
}

/* =========================================
   Portfolio Section
========================================= */
.portfolio-item {
    display: flex;
    align-items: center;
    gap: 4rem;
    margin-bottom: 8rem;
}

.portfolio-item:nth-child(even) {
    flex-direction: row-reverse;
}

.portfolio-img {
    flex: 1;
    position: relative;
    border: 1px solid var(--border-color);
    overflow: hidden;
    aspect-ratio: 4/3;
}

.portfolio-img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.7s ease;
    filter: grayscale(10%);
}

.portfolio-item:hover .portfolio-img img {
    transform: scale(1.05);
    filter: grayscale(0%);
}

.portfolio-content {
    flex: 1;
}

.client-name {
    color: var(--accent-blue);
    font-size: 1rem;
    font-weight: 700;
    letter-spacing: 1px;
    margin-bottom: 1rem;
    text-transform: uppercase;
    display: block;
}

.portfolio-content h3 {
    font-size: 2.5rem;
    margin-bottom: 1.5rem;
}

.portfolio-content p {
    color: var(--text-secondary);
    font-size: 1rem;
    line-height: 1.7;
}

.task-list {
    list-style: none;
    margin-top: 1.5rem;
}

.task-list li {
    position: relative;
    padding-inline-start: 1.5rem;
    margin-bottom: 0.8rem;
    color: var(--text-secondary);
    font-size: 1.05rem;
    line-height: 1.6;
}

.task-list li::before {
    content: '▹';
    position: absolute;
    inset-inline-start: 0;
    color: var(--accent-blue);
    font-size: 1.2rem;
}

/* Portfolio Archive Grid */
.portfolio-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(380px, 1fr));
    gap: 2rem;
}

.portfolio-card {
    position: relative;
    overflow: hidden;
    border: 1px solid var(--border-color);
    aspect-ratio: 4/3;
    display: block;
    background: var(--surface-color);
    border-radius: 12px;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

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

.portfolio-card img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.6s ease;
    display: block;
}

.portfolio-card:hover img {
    transform: scale(1.06);
}

/* Overlay always visible — title shows at bottom, more info on hover */
.portfolio-card-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(to top, rgba(0,0,0,0.78) 0%, transparent 55%);
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    padding: 1.5rem;
    opacity: 1;
    transition: background 0.4s ease;
}

.portfolio-card:hover .portfolio-card-overlay {
    background: linear-gradient(to top, rgba(0,0,0,0.92) 0%, rgba(0,0,0,0.45) 65%);
}

/* Client name hidden by default, slides up on hover */
.portfolio-card-overlay .client-name {
    color: var(--accent-blue);
    font-size: 0.82rem;
    font-weight: 700;
    letter-spacing: 0.5px;
    margin-bottom: 0.4rem;
    opacity: 0;
    transform: translateY(6px);
    transition: opacity 0.3s ease, transform 0.3s ease;
}

.portfolio-card:hover .portfolio-card-overlay .client-name {
    opacity: 1;
    transform: translateY(0);
}

.portfolio-card-overlay h3 {
    color: #ffffff;
    font-size: 1.15rem;
    line-height: 1.3;
    margin-bottom: 0;
}

/* Project type — hidden by default, shown on hover */
.portfolio-card-overlay .project-type,
.portfolio-card-overlay > span:last-child {
    color: rgba(255,255,255,0.7);
    font-size: 0.82rem;
    margin-top: 0.35rem;
    opacity: 0;
    transform: translateY(4px);
    transition: opacity 0.3s ease 0.05s, transform 0.3s ease 0.05s;
}

.portfolio-card:hover .portfolio-card-overlay .project-type,
.portfolio-card:hover .portfolio-card-overlay > span:last-child {
    opacity: 1;
    transform: translateY(0);
}

/* Single Portfolio */
.single-portfolio-hero {
    padding-top: 120px;
    padding-bottom: 4rem;
}

.single-portfolio-hero .client-name {
    font-size: 1rem;
    margin-bottom: 1rem;
}

.single-portfolio-hero h1 {
    font-size: 3.5rem;
    margin-bottom: 2rem;
}

.portfolio-gallery {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(340px, 1fr));
    gap: 1.5rem;
    margin-top: 4rem;
}

.portfolio-gallery img {
    width: 100%;
    aspect-ratio: 4/3;
    object-fit: cover;
    border: 1px solid var(--border-color);
    transition: transform 0.4s ease;
}

.portfolio-gallery img:hover {
    transform: scale(1.02);
}

/* =========================================
   Case Study Section
========================================= */
.case-study {
    background: linear-gradient(var(--case-study-overlay), var(--case-study-overlay)),
                url('https://images.unsplash.com/photo-1516280440544-64b18485cd07?q=80&w=2070&auto=format&fit=crop') center/cover fixed;
    padding: 8rem 0;
    text-align: center;
    border-top: 1px solid var(--border-color);
    border-bottom: 1px solid var(--border-color);
}

.case-study .subtitle {
    color: var(--accent-blue);
    font-weight: 700;
    font-size: 1.1rem;
    margin-bottom: 1rem;
    letter-spacing: 2px;
    display: block;
}

.case-study h2 {
    font-size: 3.5rem;
    margin-bottom: 2rem;
    max-width: 900px;
    margin-left: auto;
    margin-right: auto;
}

.case-study p {
    font-size: 1.2rem;
    max-width: 800px;
    margin: 0 auto 3rem auto;
    color: var(--text-secondary);
    line-height: 1.8;
}

/* =========================================
   About Page
========================================= */
.about-team-photo {
    padding-top: 100px;
    border-radius: 12px;
    overflow: hidden;
    margin-bottom: 3rem;
}

.about-team-photo img {
    width: 100%;
    height: auto;
    border-radius: 12px;
    object-fit: cover;
    max-height: 500px;
}

.about-hero {
    padding-bottom: 6rem;
}

.about-hero h1 {
    font-size: 4rem;
    margin-bottom: 2rem;
}

.about-hero h1 span {
    color: var(--accent-blue);
}

.about-body {
    font-size: 1.2rem;
    color: var(--text-secondary);
    max-width: 800px;
    line-height: 1.9;
}

.team-section {
    padding: 6rem 0;
    background: var(--surface-color);
    border-top: 1px solid var(--border-color);
}

/* =========================================
   Team Cards
========================================= */
.team-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 2rem;
}

.team-card {
    background: var(--bg-color);
    border: 1px solid var(--border-color);
    overflow: hidden;
    transition: border-color 0.3s ease, transform 0.3s ease;
}

.team-card:hover {
    border-color: var(--accent-blue);
    transform: translateY(-6px);
}

.team-card-img {
    aspect-ratio: 1/1;
    overflow: hidden;
    border-radius: 12px;
}

.team-card-img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
    filter: grayscale(20%);
    border-radius: 12px;
}

.team-card:hover .team-card-img img {
    transform: scale(1.05);
    filter: grayscale(0%);
}

.team-card-body {
    padding: 1.5rem;
}

.team-card-body h3 {
    font-size: 1.2rem;
    margin-bottom: 0.4rem;
}

.team-card-role {
    color: var(--accent-blue);
    font-size: 0.9rem;
    font-weight: 600;
    letter-spacing: 0.5px;
    margin-bottom: 1rem;
    display: block;
}

.team-card-socials {
    display: flex;
    gap: 1rem;
}

.team-card-socials a {
    color: var(--text-secondary);
    font-size: 0.85rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    transition: color 0.3s ease;
}

.team-card-socials a:hover {
    color: var(--accent-blue);
}

/* Single Team Member */
.single-team-hero {
    padding-top: 140px;
    padding-bottom: 6rem;
    display: flex;
    gap: 5rem;
    align-items: flex-start;
}

.single-team-img {
    width: 380px;
    flex-shrink: 0;
    border: 1px solid var(--border-color);
    overflow: hidden;
    border-radius: 16px;
}

.single-team-img img {
    width: 100%;
    aspect-ratio: 3/4;
    object-fit: cover;
    border-radius: 16px;
}

.single-team-info h1 {
    font-size: 3rem;
    margin-bottom: 0.5rem;
}

.single-team-info .role {
    color: var(--accent-blue);
    font-size: 1.1rem;
    font-weight: 600;
    margin-bottom: 2rem;
    display: block;
}

.single-team-info p {
    color: var(--text-secondary);
    font-size: 1.1rem;
    line-height: 1.8;
    margin-bottom: 2rem;
}

/* =========================================
   Services Page
========================================= */
.services-page-hero {
    padding-top: 140px;
    padding-bottom: 6rem;
}

.services-page-hero h1 {
    font-size: 4rem;
    margin-bottom: 1.5rem;
}

.services-page-hero h1 span {
    color: var(--accent-blue);
}

.services-page-hero p {
    font-size: 1.2rem;
    color: var(--text-secondary);
    max-width: 700px;
}

.process-section {
    padding: 6rem 0;
    background: var(--surface-color);
    border-top: 1px solid var(--border-color);
    border-bottom: 1px solid var(--border-color);
}

.process-steps {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 2rem;
    counter-reset: process-counter;
}

.process-step {
    position: relative;
    padding: 2.5rem 2rem;
    background: var(--bg-color);
    border: 1px solid var(--border-color);
    counter-increment: process-counter;
    transition: border-color 0.3s ease;
}

.process-step:hover {
    border-color: var(--accent-blue);
}

.process-step::before {
    content: counter(process-counter, decimal-leading-zero);
    display: block;
    font-family: monospace;
    font-size: 1.1rem;
    color: var(--accent-blue);
    margin-bottom: 1rem;
}

.process-step h3 {
    font-size: 1.3rem;
    margin-bottom: 1rem;
}

.process-step p {
    color: var(--text-secondary);
    font-size: 0.95rem;
    line-height: 1.7;
}

/* Services CTA */
.services-cta {
    padding: 8rem 0;
    text-align: center;
}

.services-cta h2 {
    font-size: 3rem;
    margin-bottom: 1.5rem;
}

.services-cta p {
    font-size: 1.2rem;
    color: var(--text-secondary);
    max-width: 600px;
    margin: 0 auto 3rem auto;
}

/* =========================================
   Contact Page
========================================= */
.contact-page {
    padding-top: 140px;
    padding-bottom: 8rem;
}

.contact-split {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 6rem;
    align-items: start;
}

.contact-info h1 {
    font-size: 3.5rem;
    margin-bottom: 1.5rem;
}

.contact-info h1 span {
    color: var(--accent-blue);
}

.contact-info p {
    color: var(--text-secondary);
    font-size: 1.1rem;
    line-height: 1.8;
    margin-bottom: 3rem;
}

.contact-details {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.contact-detail-item {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.contact-detail-item .label {
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: var(--text-secondary);
    font-weight: 600;
}

.contact-detail-item .value {
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--text-primary);
}

.contact-detail-item .value a {
    color: var(--text-primary);
}

.contact-detail-item .value a:hover {
    color: var(--accent-blue);
}

/* Contact Form (Page) */
.contact-form-wrapper {
    background: var(--surface-color);
    border: 1px solid var(--border-color);
    padding: 3rem;
}

.contact-form-wrapper h2 {
    font-size: 1.8rem;
    margin-bottom: 2rem;
}

/* =========================================
   Blog / Archive — Cinematic Dark Design
   Ported from miran.css v2.0
   Deep #0A0A0A with electric blue #00B4F0
   Film grain, desaturated→live images, card elevation
========================================= */

/* ── Archive Hero ── */
.archive-hero {
    padding-top: 150px;
    padding-bottom: 4rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.archive-hero h1 {
    font-size: 3.5rem;
    letter-spacing: -0.04em;
    margin-bottom: 1rem;
}

.archive-hero > p {
    color: rgba(255, 255, 255, 0.5);
    font-size: 1rem;
}

/* ── Category Filter Bar ── */
.blog-category-filter {
    display: flex;
    gap: 0.25rem;
    padding: 2.5rem 0 0;
    flex-wrap: wrap;
}

.blog-category-filter a {
    padding: 0.55rem 1.25rem;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: rgba(255, 255, 255, 0.45);
    border: 1px solid rgba(255, 255, 255, 0.08);
    background: transparent;
    transition: all 0.28s cubic-bezier(0.4, 0, 0.2, 1);
}

.blog-category-filter a:hover {
    color: #fff;
    border-color: rgba(255, 255, 255, 0.2);
    background: rgba(255, 255, 255, 0.04);
}

.blog-category-filter a.active {
    color: #0a0a0a;
    background: var(--accent-blue);
    border-color: var(--accent-blue);
}

/* ── Featured First Post (Hero Card) ── */
.blog-hero-featured {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0;
    border: 1px solid rgba(255, 255, 255, 0.06);
    background: rgba(255, 255, 255, 0.02);
    margin: 3rem 0 2rem;
    overflow: hidden;
    transition: all 0.28s cubic-bezier(0.4, 0, 0.2, 1);
}

.blog-hero-featured:hover {
    border-color: rgba(255, 255, 255, 0.12);
    box-shadow: 0 16px 48px rgba(0, 0, 0, 0.7);
}

.blog-featured-img {
    aspect-ratio: 16/10;
    overflow: hidden;
}

.blog-featured-img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    filter: saturate(0.75);
    transition: transform 0.55s ease, filter 0.55s ease;
}

.blog-hero-featured:hover .blog-featured-img img {
    transform: scale(1.04);
    filter: saturate(1);
}

.blog-featured-body {
    padding: 3rem;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.blog-featured-body h2 {
    font-size: 2rem;
    letter-spacing: -0.03em;
    line-height: 1.25;
    margin-bottom: 1rem;
}

.blog-featured-body h2 a {
    color: #fff;
}

.blog-featured-body h2 a:hover {
    color: var(--accent-blue);
}

.blog-featured-body > p {
    color: rgba(255, 255, 255, 0.5);
    font-size: 0.95rem;
    line-height: 1.7;
    margin-bottom: 1.5rem;
}

/* ── Blog Grid ── */
.blog-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(340px, 1fr));
    gap: 2rem;
    padding: 3rem 0 5rem;
}

/* ── Blog Card ── */
.blog-card {
    border: 1px solid rgba(255, 255, 255, 0.06);
    background: rgba(255, 255, 255, 0.02);
    overflow: hidden;
    display: flex;
    flex-direction: column;
    transition: all 0.28s cubic-bezier(0.4, 0, 0.2, 1);
}

.blog-card:hover {
    border-color: rgba(255, 255, 255, 0.15);
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.5);
    transform: translateY(-3px);
}

/* ── Card Image ── */
.blog-card-img {
    aspect-ratio: 16 / 9;
    overflow: hidden;
}

.blog-card-img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.55s ease, filter 0.55s ease;
    filter: saturate(0.75);
}

.blog-card:hover .blog-card-img img {
    transform: scale(1.04);
    filter: saturate(1);
}

/* ── Card Body ── */
.blog-card-body {
    padding: 1.75rem 2rem;
    flex: 1;
    display: flex;
    flex-direction: column;
}

.blog-card-meta {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 1rem;
}

.blog-card-date {
    font-size: 0.72rem;
    color: rgba(255, 255, 255, 0.35);
    text-transform: uppercase;
    letter-spacing: 0.1em;
    font-weight: 500;
}

.blog-card-category {
    font-size: 0.72rem;
    color: var(--accent-blue);
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.1em;
}

.blog-card-read-time {
    font-size: 0.7rem;
    color: rgba(255, 255, 255, 0.25);
    text-transform: uppercase;
    letter-spacing: 0.08em;
    font-weight: 400;
    margin-left: auto;
}

.blog-card h3 {
    font-size: 1.2rem;
    letter-spacing: -0.02em;
    margin-bottom: 0.85rem;
    line-height: 1.35;
    flex: 1;
}

.blog-card h3 a {
    color: #fff;
}

.blog-card h3 a:hover {
    color: var(--accent-blue);
}

.blog-card-excerpt {
    color: rgba(255, 255, 255, 0.45);
    font-size: 0.88rem;
    line-height: 1.7;
    margin-bottom: 1.5rem;
}

/* ── Read More Link ── */
.read-more {
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.12em;
    color: var(--accent-blue);
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    transition: gap 0.28s cubic-bezier(0.4, 0, 0.2, 1), color 0.28s ease;
}

.read-more:hover {
    gap: 0.8rem;
    color: var(--accent-blue);
}

.read-more svg {
    width: 14px;
    height: 14px;
}

/* ── Newsletter Section ── */
.blog-newsletter-section {
    background: rgba(255, 255, 255, 0.03);
    border-top: 1px solid rgba(255, 255, 255, 0.06);
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
    padding: 5rem 0;
    text-align: center;
}

.blog-newsletter-section h3 {
    font-size: 1.75rem;
    letter-spacing: -0.03em;
    margin-bottom: 0.6rem;
}

.blog-newsletter-section p {
    color: rgba(255, 255, 255, 0.45);
    margin-bottom: 2.5rem;
    font-size: 0.95rem;
}

/* Single Post */
.single-post {
    padding-top: 140px;
    padding-bottom: 8rem;
}

.single-post-header {
    max-width: 800px;
    margin-bottom: 3rem;
}

.single-post-meta {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.single-post-header h1 {
    font-size: 3.5rem;
    line-height: 1.25;
    margin-bottom: 2rem;
}

.single-post-featured {
    width: 100%;
    aspect-ratio: 16/9;
    object-fit: cover;
    border: 1px solid var(--border-color);
    margin-bottom: 4rem;
}

.post-content {
    max-width: 800px;
    font-size: 1.1rem;
    line-height: 1.9;
    color: var(--text-secondary);
}

.post-content h2,
.post-content h3 {
    color: var(--text-primary);
    margin: 2.5rem 0 1rem;
}

.post-content p {
    margin-bottom: 1.5rem;
}

.post-content a {
    color: var(--accent-blue);
    text-decoration: underline;
}

.post-content ul,
.post-content ol {
    list-style: initial;
    margin-left: 2rem;
    margin-bottom: 1.5rem;
}

.post-content blockquote {
    border-inline-start: 4px solid var(--accent-blue);
    padding-inline-start: 1.5rem;
    margin: 2rem 0;
    color: var(--text-secondary);
    font-style: italic;
    font-size: 1.2rem;
}

.post-content img {
    width: 100%;
    border: 1px solid var(--border-color);
    margin: 2rem 0;
}

.related-posts {
    padding: 5rem 0;
    border-top: 1px solid var(--border-color);
}

.related-posts h2 {
    font-size: 2rem;
    margin-bottom: 3rem;
    border-inline-start: 4px solid var(--accent-blue);
    padding-inline-start: 1rem;
}

/* =========================================
   Search Page
========================================= */
.search-page {
    padding-top: 140px;
    padding-bottom: 8rem;
}

.search-page h1 {
    font-size: 2.5rem;
    margin-bottom: 0.5rem;
}

.search-page .search-term {
    color: var(--accent-blue);
}

.search-page .search-count {
    color: var(--text-secondary);
    margin-bottom: 3rem;
    font-size: 1rem;
}

.search-results-list {
    display: flex;
    flex-direction: column;
    gap: 2rem;
}

.search-result-item {
    padding: 2rem;
    border: 1px solid var(--border-color);
    background: var(--surface-color);
    transition: border-color 0.3s ease;
}

.search-result-item:hover {
    border-color: var(--accent-blue);
}

.search-result-item h2 {
    font-size: 1.5rem;
    margin-bottom: 0.5rem;
}

.search-result-item h2 a {
    color: var(--text-primary);
}

.search-result-item h2 a:hover {
    color: var(--accent-blue);
}

.search-result-item p {
    color: var(--text-secondary);
    font-size: 0.95rem;
}

.no-results {
    text-align: center;
    padding: 5rem 0;
}

.no-results h2 {
    font-size: 2rem;
    margin-bottom: 1rem;
}

.no-results p {
    color: var(--text-secondary);
    margin-bottom: 2rem;
}

/* Search Form */
.search-form {
    display: flex;
    gap: 0;
    max-width: 600px;
    margin: 2rem 0;
}

.search-form input[type="search"] {
    flex: 1;
    padding: 1rem 1.5rem;
    background: var(--surface-color);
    border: 1px solid var(--border-color);
    border-right: none;
    color: var(--text-primary);
    font-size: 1rem;
    font-family: inherit;
    outline: none;
    transition: border-color 0.3s ease;
}

.search-form input[type="search"]:focus {
    border-color: var(--accent-blue);
}

.search-form button {
    padding: 1rem 1.5rem;
    background: var(--accent-blue);
    border: 1px solid var(--accent-blue);
    color: #fff;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
    cursor: pointer;
    font-family: inherit;
    font-size: 0.9rem;
    transition: filter 0.3s ease;
}

.search-form button:hover {
    filter: brightness(0.9);
}

/* =========================================
   404 Page
========================================= */
.error-404 {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 2rem;
}

.error-404-content {
    max-width: 600px;
}

.error-404-num {
    font-size: 10rem;
    font-weight: 700;
    color: var(--border-color);
    line-height: 1;
    display: block;
    margin-bottom: 0;
}

.error-404-content h1 {
    font-size: 2.5rem;
    margin-bottom: 1.5rem;
}

.error-404-content p {
    color: var(--text-secondary);
    margin-bottom: 3rem;
    font-size: 1.1rem;
}

/* =========================================
   Footer
========================================= */
#footer {
    background: var(--surface-color);
    padding: 5rem 0 2rem 0;
    border-top: 1px solid var(--border-color);
}

.footer-grid {
    display: grid;
    grid-template-columns: 2fr repeat(3, 1fr);
    gap: 3rem;
    margin-bottom: 4rem;
}

.footer-brand p {
    color: var(--text-secondary);
    font-size: 0.9rem;
    line-height: 1.7;
    margin-top: 1.5rem;
    max-width: 280px;
}

.footer-title {
    font-size: 1rem;
    margin-bottom: 1.5rem;
    color: var(--text-primary);
    text-transform: uppercase;
    letter-spacing: 1px;
}

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

.footer-links a {
    color: var(--text-secondary);
    font-size: 0.95rem;
    transition: color 0.3s ease;
}

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

.footer-bottom {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-top: 2rem;
    border-top: 1px solid var(--border-color);
    color: var(--text-secondary);
    font-size: 0.9rem;
    flex-wrap: wrap;
    gap: 1rem;
}

/* =========================================
   Newsletter — inside footer (Redesigned)
========================================= */
.footer-newsletter {
    background: var(--bg-alt);
    padding: 6rem 0;
    margin-bottom: 5rem;
    text-align: center;
    border-bottom: 1px solid var(--border-color);
}

.footer-newsletter-content {
    max-width: 800px;
    margin: 0 auto;
}

.footer-newsletter-content h2 {
    font-size: clamp(2rem, 4vw, 3.2rem);
    margin: 1.5rem 0 3rem;
    line-height: 1.2;
    letter-spacing: -0.02em;
}

.newsletter-form {
    display: block;
    max-width: 550px;
    margin: 0 auto;
    border: none;
    background: transparent;
    overflow: visible;
}

.newsletter-input-group {
    display: flex;
    background: var(--bg-color);
    border: 2px solid var(--border-color);
    border-radius: 60px;
    padding: 0.4rem;
    transition: all 0.4s ease;
}

.newsletter-input-group:focus-within {
    border-color: var(--accent-blue);
    box-shadow: 0 10px 30px rgba(0, 180, 240, 0.1);
    transform: translateY(-2px);
}

.newsletter-form input[type="email"] {
    flex: 1;
    padding: 0.8rem 2rem;
    background: transparent;
    border: none;
    color: var(--text-primary);
    font-size: 1.05rem;
}

.newsletter-form button {
    border-radius: 50px;
    padding: 1rem 2.5rem;
    height: auto;
}

/* =========================================
   Arabic & RTL Adjustments
========================================= */

/* Logo sizing for Arabic */
html[dir="rtl"] .brand-logo img,
html[dir="rtl"] .custom-logo-link img,
html[dir="rtl"] svg.miran-svg-logo {
    height: 65px; /* Slightly smaller for RTL if needed */
}

/* Header styling — same glassy bg for both AR and EN (via #header.scrolled / .header-opaque) */

html[dir="rtl"] .nav-links a {
    font-size: 1.05rem; /* Larger Arabic font */
    font-weight: 700;
}

/* Logo size — matches the bigger header logo */
.brand-logo img,
.custom-logo-link img,
svg.miran-svg-logo {
    height: 70px;
    width: auto;
    transition: all 0.4s ease;
}

.newsletter-message {
    margin-top: 1rem;
    font-size: 0.9rem;
    min-height: 1.2em;
}

.newsletter-message.success { color: #22c55e; }
.newsletter-message.error { color: #ef4444; }

/* =========================================
   Modal Contact Form
========================================= */
.modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(5px);
    -webkit-backdrop-filter: blur(5px);
    z-index: 2000;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
}

.modal-overlay.active {
    opacity: 1;
    visibility: visible;
}

.modal-content {
    background: var(--bg-color);
    padding: 3rem;
    border-radius: 4px;
    width: 90%;
    max-width: 600px;
    max-height: 90vh;
    overflow-y: auto;
    position: relative;
    transform: translateY(20px);
    transition: transform 0.3s ease;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5);
    border: 1px solid var(--border-color);
}

.modal-overlay.active .modal-content {
    transform: translateY(0);
}

.modal-close {
    position: absolute;
    top: 1.2rem;
    right: 1.5rem;
    font-size: 2rem;
    background: none;
    border: none;
    color: var(--text-secondary);
    cursor: pointer;
    transition: color 0.3s ease;
    line-height: 1;
}

.modal-close:hover {
    color: var(--accent-blue);
}

.modal-title {
    font-size: 1.8rem;
    margin-bottom: 2rem;
}

/* Form Fields */
.form-row {
    display: flex;
    gap: 1.5rem;
}

.form-row .form-group {
    flex: 1;
}

.form-group {
    margin-bottom: 1.5rem;
}

.form-group label {
    display: block;
    margin-bottom: 0.6rem;
    font-size: 0.95rem;
    font-weight: 600;
    color: var(--text-primary);
}

.form-group input,
.form-group textarea,
.form-group select {
    width: 100%;
    padding: 0.9rem 1rem;
    border: 1px solid var(--border-color);
    border-radius: 4px;
    font-family: inherit;
    font-size: 1rem;
    background: var(--surface-color);
    color: var(--text-primary);
    transition: border-color 0.3s ease, box-shadow 0.3s ease;
    outline: none;
}

.form-group input:focus,
.form-group textarea:focus,
.form-group select:focus {
    border-color: var(--accent-blue);
    box-shadow: 0 0 0 3px rgba(0, 153, 204, 0.15);
    background: var(--bg-color);
}

.form-success {
    display: none;
    text-align: center;
    padding: 2rem;
}

.form-success.visible {
    display: block;
}

.form-success svg {
    color: #22c55e;
    margin-bottom: 1rem;
}

.form-success h3 {
    font-size: 1.5rem;
    margin-bottom: 0.5rem;
}

.form-success p {
    color: var(--text-secondary);
}

/* =========================================
   Pagination
========================================= */
.pagination {
    display: flex;
    justify-content: center;
    gap: 0.4rem;
    padding: 3rem 0;
}

.pagination .page-numbers {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border: 1px solid rgba(255, 255, 255, 0.08);
    color: rgba(255, 255, 255, 0.45);
    font-size: 0.85rem;
    font-weight: 600;
    transition: all 0.28s cubic-bezier(0.4, 0, 0.2, 1);
    background: transparent;
}

.pagination .page-numbers:hover,
.pagination .page-numbers.current {
    background: var(--accent-blue);
    border-color: var(--accent-blue);
    color: #fff;
}

/* =========================================
   Breadcrumb
========================================= */
.breadcrumb {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.9rem;
    color: var(--text-secondary);
    margin-bottom: 2rem;
    flex-wrap: wrap;
}

.breadcrumb a {
    color: var(--text-secondary);
}

.breadcrumb a:hover {
    color: var(--accent-blue);
}

.breadcrumb-sep {
    color: var(--border-color);
}

/* =========================================
   Animations
========================================= */
.fade-in {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.8s ease-out, transform 0.8s ease-out;
}

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

.fade-in:nth-child(2) { transition-delay: 0.1s; }
.fade-in:nth-child(3) { transition-delay: 0.2s; }
.fade-in:nth-child(4) { transition-delay: 0.3s; }
.fade-in:nth-child(5) { transition-delay: 0.4s; }

/* =========================================
   Responsive — Tablet (≤992px)
========================================= */
@media (max-width: 992px) {
    .hero h1 { font-size: 3rem; }
    .section-title { font-size: 2.2rem; }
    .case-study h2 { font-size: 2.5rem; }

    .portfolio-item,
    .portfolio-item:nth-child(even) {
        flex-direction: column;
        gap: 2.5rem;
    }

    .footer-grid {
        grid-template-columns: 1fr 1fr;
    }

    .contact-split {
        grid-template-columns: 1fr;
        gap: 4rem;
    }

    .single-team-hero {
        flex-direction: column;
        gap: 2rem;
    }

    .single-team-img {
        width: 100%;
        max-width: 380px;
    }
}

/* =========================================
   Responsive — Mobile (≤768px)
========================================= */
@media (max-width: 768px) {
    .nav-right { display: none; }
    .mobile-nav-toggle { display: flex; }

    .nav-inner {
        padding: 0 4%;
        height: 64px;
    }

    .hero h1 { font-size: 2.4rem; }

    .hero-stats {
        position: relative;
        flex-direction: column;
    }

    .stat-box {
        border-inline-end: none;
        border-bottom: 1px solid var(--border-color);
        padding: 1.5rem;
    }

    .stat-box:last-child { border-bottom: none; }

    .hero {
        height: auto;
        padding-bottom: 0;
        min-height: 100vh;
    }

    .hero-cta .btn-accent {
        margin-inline-start: 0;
    }

    .marquee-part img, .marquee-track > img, .marquee-track > a img { height: 176px; }
    .marquee-part { gap: 3rem; padding-right: 3rem; }
    .marquee-container::before,
    .marquee-container::after { width: 60px; }

    .section-padding { padding: 5rem 0; }
    .section-title { font-size: 2rem; }

    .about-hero h1,
    .services-page-hero h1,
    .contact-info h1,
    .archive-hero h1 { font-size: 2.5rem; }

    .single-post-header h1,
    .single-portfolio-hero h1 { font-size: 2.2rem; }

    .portfolio-grid {
        grid-template-columns: 1fr;
    }

    .blog-grid {
        grid-template-columns: 1fr;
    }

    .blog-hero-featured {
        grid-template-columns: 1fr;
    }

    .blog-featured-body {
        padding: 2rem;
    }

    .blog-featured-body h2 {
        font-size: 1.5rem;
    }

    .blog-category-filter {
        gap: 0.4rem;
    }

    .team-grid {
        grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
    }

    .footer-grid {
        grid-template-columns: 1fr;
        gap: 2rem;
    }

    .footer-bottom {
        flex-direction: column;
        text-align: center;
    }

    .form-row {
        flex-direction: column;
        gap: 0;
    }

    .modal-content {
        padding: 2.5rem 1.5rem;
    }

    .contact-form-wrapper {
        padding: 2rem 1.5rem;
    }

    .footer-newsletter-inner {
        flex-direction: column;
        align-items: flex-start;
        gap: 1.5rem;
    }

    .newsletter-form {
        width: 100%;
        max-width: 100%;
    }

    .error-404-num { font-size: 6rem; }

    .case-study h2 { font-size: 2rem; }
    .services-cta h2 { font-size: 2rem; }
}

/* ── Service Landing Hero ── */
.service-landing-hero {
  position: relative;
  min-height: 85vh;
  display: flex;
  align-items: center;
  padding-top: 100px;
  padding-bottom: 0;
  overflow: hidden;
}
.service-landing-hero .hero-bg {
  position: absolute;
  inset: 0;
  background-size: cover;
  background-position: center;
  background-attachment: fixed;
  z-index: 0;
}
.service-landing-hero .hero-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(to right, var(--hero-overlay-start) 40%, var(--hero-overlay-end) 100%);
  z-index: 1;
}
.service-landing-hero .container {
  position: relative;
  z-index: 2;
}
.service-landing-hero h1 { font-size: 4.5rem; margin-bottom: 1.5rem; }
.service-landing-hero h1 span { color: var(--accent-blue); }
.service-landing-hero p { font-size: 1.2rem; color: var(--text-secondary); max-width: 600px; margin-bottom: 2.5rem; line-height: 1.8; }
.service-badge {
  display: inline-block;
  border: 1px solid var(--accent-blue);
  color: var(--accent-blue);
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 2px;
  text-transform: uppercase;
  padding: 0.4rem 1rem;
  margin-bottom: 1.5rem;
}
/* ── What's included list ── */
.included-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 1.5rem;
}
.included-item {
  display: flex;
  gap: 1.2rem;
  align-items: flex-start;
  padding: 1.8rem;
  background: var(--surface-color);
  border: 1px solid var(--border-color);
  transition: border-color 0.3s ease;
}
.included-item:hover { border-color: var(--accent-blue); }
.included-icon {
  flex-shrink: 0;
  width: 44px;
  height: 44px;
  border: 1px solid var(--accent-blue);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--accent-blue);
}
.included-item h4 { font-size: 1rem; margin-bottom: 0.4rem; }
.included-item p { color: var(--text-secondary); font-size: 0.9rem; line-height: 1.6; margin: 0; }
/* ── Ideal for ── */
.ideal-for-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 1rem;
}
.ideal-for-item {
  padding: 1.5rem;
  background: var(--surface-color);
  border: 1px solid var(--border-color);
  text-align: center;
  font-weight: 600;
  font-size: 0.95rem;
  transition: all 0.3s ease;
}
.ideal-for-item:hover { border-color: var(--accent-blue); color: var(--accent-blue); }
/* ── Split image/text block ── */
.split-section {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 5rem;
  align-items: center;
  padding: 7rem 0;
}
.split-section.reverse { direction: rtl; }
.split-section.reverse > * { direction: ltr; }
.split-img {
  border: 1px solid var(--border-color);
  overflow: hidden;
  aspect-ratio: 4/3;
}
.split-img img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.6s ease; filter: grayscale(10%); }
.split-img:hover img { transform: scale(1.04); filter: grayscale(0%); }
.split-text h2 { font-size: 2.5rem; margin-bottom: 1.5rem; }
.split-text h2 span { color: var(--accent-blue); }
.split-text p { color: var(--text-secondary); font-size: 1.05rem; line-height: 1.8; margin-bottom: 1.5rem; }
/* ── Testimonial card ── */
.testimonial-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 2rem;
}
.testimonial-card {
  background: var(--surface-color);
  border: 1px solid var(--border-color);
  padding: 2.5rem;
  position: relative;
  transition: border-color 0.3s ease;
}
.testimonial-card:hover { border-color: var(--accent-blue); }
.testimonial-card::before {
  content: '"';
  position: absolute;
  top: 1rem;
  right: 1.5rem;
  font-size: 5rem;
  line-height: 1;
  color: var(--accent-blue);
  opacity: 0.15;
  font-family: Georgia, serif;
}
.testimonial-text { font-size: 1rem; color: var(--text-secondary); line-height: 1.8; margin-bottom: 1.5rem; font-style: italic; }
.testimonial-author { display: flex; align-items: center; gap: 1rem; }
.testimonial-avatar { width: 44px; height: 44px; border-radius: 50%; object-fit: cover; border: 2px solid var(--accent-blue); }
.testimonial-name { font-weight: 700; font-size: 0.95rem; }
.testimonial-role { font-size: 0.8rem; color: var(--text-secondary); }
/* ── Portfolio mini-grid ── */
.mini-portfolio {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1rem;
}
.mini-portfolio-item {
  aspect-ratio: 4/3;
  overflow: hidden;
  border: 1px solid var(--border-color);
  position: relative;
}
.mini-portfolio-item img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.5s ease; filter: grayscale(10%); }
.mini-portfolio-item:hover img { transform: scale(1.06); filter: grayscale(0%); }
/* ── Stats row ── */
.stats-row {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 0;
  border: 1px solid var(--border-color);
  margin: 4rem 0;
}
.stats-row .stat-box {
  border-inline-end: 1px solid var(--border-color);
  border-bottom: none;
}
.stats-row .stat-box:last-child { border-inline-end: none; }
/* ── Big CTA band ── */
.cta-band {
  background: var(--accent-blue);
  padding: 5rem 0;
  text-align: center;
}
.cta-band h2 { font-size: 3rem; color: #fff; margin-bottom: 1rem; }
.cta-band p { color: rgba(255,255,255,0.85); font-size: 1.15rem; max-width: 600px; margin: 0 auto 2.5rem; }
.cta-band .btn { border-color: #fff; color: #fff; }
.cta-band .btn:hover { background: #fff; color: var(--accent-blue); }
/* Fix: primary button was cyan-on-cyan (invisible until hover).
   On the cyan band it is white by default, dark on hover. */
.cta-band .btn-miran-primary {
  background: #fff;
  border-color: #fff;
  color: #000;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.18);
}
.cta-band .btn-miran-primary:hover {
  background: #000;
  border-color: #000;
  color: #fff;
  box-shadow: 0 14px 40px rgba(0, 0, 0, 0.3);
}
/* ── Thank you page ── */
.thankyou-page {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 2rem;
}
.thankyou-content { max-width: 600px; }
.thankyou-icon {
  width: 80px;
  height: 80px;
  border: 2px solid var(--accent-blue);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 2rem;
  color: var(--accent-blue);
}
.thankyou-content h1 { font-size: 3rem; margin-bottom: 1rem; }
.thankyou-content p { color: var(--text-secondary); font-size: 1.15rem; line-height: 1.8; margin-bottom: 2rem; }
/* ── Privacy / Terms ── */
.legal-page { padding-top: 140px; padding-bottom: 8rem; }
.legal-page h1 { font-size: 3rem; margin-bottom: 0.5rem; }
.legal-page .last-updated { color: var(--text-secondary); font-size: 0.9rem; margin-bottom: 4rem; }
.legal-body { max-width: 800px; }
.legal-body h2 { font-size: 1.5rem; margin: 3rem 0 1rem; border-inline-start: 3px solid var(--accent-blue); padding-inline-start: 1rem; }
.legal-body p { color: var(--text-secondary); font-size: 1rem; line-height: 1.9; margin-bottom: 1.2rem; }
.legal-body ul { list-style: disc; padding-inline-start: 2rem; color: var(--text-secondary); line-height: 1.9; margin-bottom: 1.2rem; }
.legal-body a { color: var(--accent-blue); }
/* ── Responsive for new stuff ── */
@media (max-width: 992px) {
  .split-section, .split-section.reverse { grid-template-columns: 1fr; direction: ltr; gap: 2.5rem; }
  .service-landing-hero h1 { font-size: 3rem; }
  .mini-portfolio { grid-template-columns: 1fr 1fr; }
  .cta-band h2 { font-size: 2.2rem; }
}
@media (max-width: 768px) {
  .service-landing-hero h1 { font-size: 2.3rem; }
  .mini-portfolio { grid-template-columns: 1fr; }
  .stats-row { grid-template-columns: 1fr 1fr; }
  .stats-row .stat-box { border-bottom: 1px solid var(--border-color); border-inline-end: none; }
  .stats-row .stat-box:nth-child(odd) { border-inline-end: 1px solid var(--border-color); }
}

/* =========================================
   Blog Archive — Enhanced Layout
========================================= */
/* Featured post, category filter, and read-time badge — removed.
   Old blog design uses a single uniform grid only. */


/* =========================================
   Single Post — Author Box
========================================= */
.post-author-box {
    display: flex;
    gap: 1.5rem;
    align-items: center;
    padding: 2rem;
    background: var(--surface-color);
    border: 1px solid var(--border-color);
    margin-top: 3rem;
}

.post-author-box .author-avatar {
    width: 64px;
    height: 64px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid var(--accent-blue);
    flex-shrink: 0;
}

.post-author-box .author-info h4 {
    font-size: 1rem;
    margin-bottom: 0.25rem;
}

.post-author-box .author-info span {
    font-size: 0.85rem;
    color: var(--accent-blue);
    font-weight: 600;
}

.post-author-box .author-info p {
    font-size: 0.9rem;
    color: var(--text-secondary);
    margin-top: 0.5rem;
    line-height: 1.6;
}

/* =========================================
   Post Navigation (prev/next)
========================================= */
.post-navigation {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2rem;
    margin-top: 3rem;
    padding-top: 3rem;
    border-top: 1px solid var(--border-color);
}

.post-nav-item {
    padding: 1.5rem;
    border: 1px solid var(--border-color);
    transition: border-color 0.3s ease;
}

.post-nav-item:hover {
    border-color: var(--accent-blue);
}

.post-nav-item .post-nav-label {
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: var(--accent-blue);
    font-weight: 700;
    margin-bottom: 0.5rem;
    display: block;
}

.post-nav-item .post-nav-title {
    font-size: 1rem;
    font-weight: 700;
    color: var(--text-primary);
    line-height: 1.4;
}

.post-nav-item:last-child {
    text-align: right;
}

/* =========================================
   Comments Section — Redesigned
========================================= */
.miran-comments {
    margin-top: 4rem;
    padding-top: 3rem;
    border-top: 1px solid var(--border-color);
    max-width: 800px;
}

.miran-comments .comments-heading {
    font-size: 1.5rem;
    margin-bottom: 2.5rem;
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.miran-comments .comments-heading .comment-count-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: var(--accent-blue);
    color: #fff;
    font-size: 0.8rem;
    font-weight: 700;
    min-width: 28px;
    height: 28px;
    padding: 0 0.5rem;
}

/* Individual comment */
.miran-comment {
    display: flex;
    gap: 1.2rem;
    padding: 1.5rem;
    margin-bottom: 1rem;
    background: var(--surface-color);
    border: 1px solid var(--border-color);
    transition: border-color 0.3s ease;
}

.miran-comment:hover {
    border-color: var(--accent-blue);
}

.miran-comment .comment-avatar {
    flex-shrink: 0;
}

.miran-comment .comment-avatar img {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    border: 2px solid var(--border-color);
}

.miran-comment .comment-body-inner {
    flex: 1;
    min-width: 0;
}

.miran-comment .comment-meta-line {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 0.5rem;
    flex-wrap: wrap;
}

.miran-comment .comment-author-name {
    font-weight: 700;
    font-size: 0.95rem;
    color: var(--text-primary);
}

.miran-comment .comment-date {
    font-size: 0.8rem;
    color: var(--text-secondary);
}

.miran-comment .comment-text {
    color: var(--text-secondary);
    font-size: 0.95rem;
    line-height: 1.7;
}

.miran-comment .comment-text p {
    margin: 0;
}

.miran-comment .comment-reply-link {
    display: inline-block;
    margin-top: 0.75rem;
    font-size: 0.8rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: var(--accent-blue);
    transition: opacity 0.3s ease;
}

.miran-comment .comment-reply-link:hover {
    opacity: 0.7;
}

/* Nested replies */
.miran-comment-children {
    margin-left: 2.5rem;
    padding-left: 1.5rem;
    border-left: 2px solid var(--border-color);
}

/* Comment form */
.miran-comment-form {
    margin-top: 3rem;
    padding-top: 2rem;
    border-top: 1px solid var(--border-color);
}

.miran-comment-form .comment-form-heading {
    font-size: 1.3rem;
    margin-bottom: 1.5rem;
}

.miran-comment-form .comment-form-fields {
    display: flex;
    flex-direction: column;
    gap: 1.2rem;
}

.miran-comment-form .comment-form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1.2rem;
}

.miran-comment-form label {
    display: block;
    margin-bottom: 0.5rem;
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--text-primary);
}

.miran-comment-form input[type="text"],
.miran-comment-form input[type="email"],
.miran-comment-form input[type="url"],
.miran-comment-form textarea {
    width: 100%;
    padding: 0.9rem 1rem;
    border: 1px solid var(--border-color);
    border-radius: 4px;
    font-family: inherit;
    font-size: 1rem;
    background: var(--surface-color);
    color: var(--text-primary);
    transition: border-color 0.3s ease, box-shadow 0.3s ease;
    outline: none;
}

.miran-comment-form input:focus,
.miran-comment-form textarea:focus {
    border-color: var(--accent-blue);
    box-shadow: 0 0 0 3px rgba(0, 153, 204, 0.15);
    background: var(--bg-color);
}

.miran-comment-form textarea {
    resize: vertical;
    min-height: 120px;
}

.miran-comment-form .comment-submit-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.6rem;
    padding: 1rem 2.6rem;
    font-size: 0.95rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: #fff;
    background: var(--accent-blue);
    border: none;
    cursor: pointer;
    font-family: inherit;
    transition: filter 0.3s ease;
}

.miran-comment-form .comment-submit-btn:hover {
    filter: brightness(0.9);
}

/* Responsive */
@media (max-width: 768px) {
    .miran-comment-form .comment-form-row {
        grid-template-columns: 1fr;
    }
    .post-navigation {
        grid-template-columns: 1fr;
    }
    .post-nav-item:last-child {
        text-align: left;
    }
    .miran-comment-children {
        margin-left: 1rem;
        padding-left: 1rem;
    }
}

/* =========================================
   Testimonials Slider
========================================= */
.testimonials-slider-section {
    padding: 6rem 0;
    background: var(--surface-color);
    border-top: 1px solid var(--border-color);
    border-bottom: 1px solid var(--border-color);
    text-align: center;
}

.testimonials-slider-section .section-subtitle {
    margin-bottom: 3rem;
}

.testimonials-slider {
    position: relative;
    max-width: 750px;
    margin: 0 auto;
    min-height: 250px;
}

.testimonial-slide {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    opacity: 0;
    transform: translateY(15px);
    transition: opacity 0.5s ease, transform 0.5s ease;
    pointer-events: none;
}

.testimonial-slide.active {
    position: relative;
    opacity: 1;
    transform: translateY(0);
    pointer-events: auto;
}

.testimonial-slider-quote {
    position: relative;
    font-size: 1.4rem;
    font-weight: 700;
    line-height: 1.6;
    color: var(--text-primary);
    margin: 0 0 2.5rem 0;
    padding: 2rem 2.5rem 0;
    border: none;
    font-style: normal;
}

.testimonial-slider-quote::before,
.testimonial-slider-quote::after {
    font-family: Georgia, 'Times New Roman', serif;
    font-size: 5rem;
    line-height: 0;
    color: var(--accent-blue);
    opacity: 0.25;
    position: absolute;
}

.testimonial-slider-quote::before {
    content: '\201C';
    top: 1.2rem;
    left: 0;
}

.testimonial-slider-quote::after {
    content: '\201D';
    bottom: -1.8rem;
    right: 0;
}

.testimonial-slider-author {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.6rem;
}

.testimonial-slider-avatar {
    width: 72px;
    height: 72px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid var(--accent-blue);
    margin-bottom: 0.25rem;
}

.testimonial-slider-name {
    font-weight: 700;
    font-size: 1rem;
    color: var(--text-primary);
    display: block;
    text-align: center;
}

.testimonial-slider-role {
    font-size: 0.85rem;
    color: var(--accent-blue);
    font-weight: 600;
    display: block;
    text-align: center;
}

.testimonial-project-link {
    display: inline-block;
    margin-top: 0.4rem;
    font-size: 0.85rem;
    font-weight: 700;
    color: var(--text-secondary);
    text-decoration: none;
    letter-spacing: 0.5px;
    transition: color 0.25s ease;
}

.testimonial-project-link:hover {
    color: var(--accent-blue);
}

/* Dots */
.testimonial-slider-dots {
    display: flex;
    justify-content: center;
    gap: 0.6rem;
    margin-top: 2.5rem;
}

.testimonial-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    border: 1px solid var(--border-color);
    background: transparent;
    cursor: pointer;
    padding: 0;
    transition: all 0.3s ease;
}

.testimonial-dot:hover {
    border-color: var(--accent-blue);
}

.testimonial-dot.active {
    background: var(--accent-blue);
    border-color: var(--accent-blue);
    transform: scale(1.2);
}

@media (max-width: 768px) {
    .testimonial-slider-quote {
        font-size: 1.1rem;
    }
}

/* =========================================
   Hero Video Background
========================================= */
.hero {
    position: relative;
    overflow: hidden;
}

.hero-video-bg {
    position: absolute;
    top: 50%;
    left: 50%;
    min-width: 100%;
    min-height: 100%;
    width: auto;
    height: auto;
    transform: translate(-50%, -50%);
    z-index: 0;
    object-fit: cover;
}

.hero-video-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(to right, var(--hero-overlay-start) 0%, var(--hero-overlay-end) 100%);
    z-index: 1;
}

.hero .hero-content {
    position: relative;
    z-index: 2;
}

.hero .hero-stats {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    z-index: 2;
}

/* =========================================
   Testimonial Progress Bar
========================================= */
.testimonial-progress-wrap {
    width: 100%;
    height: 2px;
    background: var(--border-color);
    margin: 2.5rem 0 0;
    overflow: hidden;
    border-radius: 0;
}

.testimonial-progress-bar {
    height: 100%;
    width: 0%;
    background: var(--accent-blue);
    border-radius: 2px;
    transition: none;
}

.testimonial-progress-bar.animating {
    transition: width 5s linear;
    width: 100%;
}

/* =========================================
   Force Ubuntu Font Everywhere
========================================= */
body,
h1, h2, h3, h4, h5, h6,
p, a, span, li, input, textarea, select, button,
.btn, .btn-submit, .btn-accent,
.nav-links a,
.footer-links a,
.service-card,
.blog-card,
.team-card,
.testimonial-slider-quote {
    font-family: 'Ubuntu', sans-serif !important;
}

/* Keep Arabic font only for RTL pages */
html[dir="rtl"] body,
html[dir="rtl"] h1, html[dir="rtl"] h2, html[dir="rtl"] h3,
html[dir="rtl"] h4, html[dir="rtl"] h5, html[dir="rtl"] h6,
html[dir="rtl"] p, html[dir="rtl"] a, html[dir="rtl"] span,
html[dir="rtl"] input, html[dir="rtl"] textarea, html[dir="rtl"] select, html[dir="rtl"] button {
    font-family: 'Cairo', 'Tajawal', 'Ubuntu', sans-serif !important;
}

/* =========================================
   Homepage Portfolio — Client Name Larger
========================================= */
.portfolio-item .client-name {
    font-size: 1.8rem;
    letter-spacing: 2px;
    margin-bottom: 0.5rem;
}

.portfolio-item .portfolio-content h3 {
    font-size: 1.4rem;
    font-weight: 500;
    color: var(--text-secondary);
}

.portfolio-item .portfolio-content h3 a {
    color: var(--text-secondary);
}

.portfolio-item .portfolio-content h3 a:hover {
    color: var(--accent-blue);
}

/* =========================================
   Portfolio — Single Project Hero
========================================= */
.portfolio-hero-section {
    padding-top: 140px;
    padding-bottom: 4rem;
}

.portfolio-hero-layout {
    display: grid;
    grid-template-columns: 1.4fr 1fr;
    gap: 4rem;
    align-items: start;
}

.portfolio-hero-media {
    border: 1px solid var(--border-color);
    overflow: hidden;
    border-radius: 8px;
}

.portfolio-hero-img {
    overflow: hidden;
    border: 1px solid var(--border-color);
    border-radius: 8px;
}

.portfolio-hero-img img {
    width: 100%;
    aspect-ratio: 16/10;
    object-fit: cover;
    display: block;
    transition: transform 0.6s ease;
}

.portfolio-hero-img:hover img {
    transform: scale(1.03);
}

.portfolio-video-embed {
    position: relative;
    padding-bottom: 56.25%;
    height: 0;
    overflow: hidden;
}

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

.portfolio-hero-info h1 {
    font-size: 2.5rem;
    margin-bottom: 1rem;
    line-height: 1.2;
}

.portfolio-hero-excerpt {
    color: var(--text-secondary);
    font-size: 1.05rem;
    line-height: 1.7;
    margin-bottom: 2rem;
}

/* Project Details Grid */
.portfolio-details-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
    margin-bottom: 2rem;
    padding: 1.5rem;
    background: var(--surface-color);
    border: 1px solid var(--border-color);
}

.portfolio-detail-label {
    display: block;
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: var(--text-secondary);
    font-weight: 600;
    margin-bottom: 0.3rem;
}

.portfolio-detail-value {
    font-size: 0.95rem;
    font-weight: 700;
    color: var(--text-primary);
}

.portfolio-tasks {
    padding-top: 1rem;
    border-top: 1px solid var(--border-color);
}

.portfolio-tasks .portfolio-detail-label {
    margin-bottom: 0.75rem;
}

/* Portfolio Editor Content */
.portfolio-content-section {
    padding: 4rem 0;
    border-top: 1px solid var(--border-color);
}

.portfolio-editor-content {
    font-size: 1.1rem;
    line-height: 1.9;
    color: var(--text-secondary);
}

.portfolio-editor-content h2,
.portfolio-editor-content h3 {
    color: var(--text-primary);
    margin: 2.5rem 0 1rem;
}

.portfolio-editor-content p {
    margin-bottom: 1.5rem;
}

.portfolio-editor-content img {
    width: 100%;
    border: 1px solid var(--border-color);
    margin: 2rem 0;
}

.portfolio-editor-content .wp-block-gallery {
    margin: 2rem 0;
}

.portfolio-editor-content .wp-block-embed {
    margin: 2rem 0;
}

.portfolio-editor-content blockquote {
    border-inline-start: 4px solid var(--accent-blue);
    padding-inline-start: 1.5rem;
    margin: 2rem 0;
    color: var(--text-secondary);
    font-style: italic;
    font-size: 1.2rem;
}

/* =========================================
   Portfolio — Archive Featured Project
========================================= */
.portfolio-featured-hero {
    display: grid;
    grid-template-columns: 1.3fr 1fr;
    gap: 3rem;
    align-items: center;
    padding: 2rem 0 3rem;
    border-bottom: 1px solid var(--border-color);
    margin-bottom: 2rem;
}

.portfolio-featured-media {
    position: relative;
    overflow: hidden;
    border: 1px solid var(--border-color);
    aspect-ratio: 16/10;
    border-radius: 8px;
}

.portfolio-featured-media img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.6s ease;
}

.portfolio-featured-hero:hover .portfolio-featured-media img {
    transform: scale(1.03);
}

.portfolio-featured-badge {
    position: absolute;
    top: 1rem;
    left: 1rem;
    background: var(--accent-blue);
    color: #fff;
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
    padding: 0.4rem 1rem;
}

.portfolio-featured-info h2 {
    font-size: 2rem;
    margin-bottom: 1rem;
    line-height: 1.3;
}

.portfolio-featured-info h2 a {
    color: var(--text-primary);
    transition: color 0.3s ease;
}

.portfolio-featured-info h2 a:hover {
    color: var(--accent-blue);
}

.portfolio-featured-info p {
    color: var(--text-secondary);
    font-size: 1rem;
    line-height: 1.7;
    margin-bottom: 1rem;
}

.portfolio-type-tag {
    display: inline-block;
    border: 1px solid var(--border-color);
    font-size: 0.8rem;
    font-weight: 600;
    padding: 0.3rem 0.8rem;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* =========================================
   Portfolio Responsive
========================================= */
@media (max-width: 992px) {
    .portfolio-hero-layout {
        grid-template-columns: 1fr;
        gap: 2rem;
    }
    .portfolio-featured-hero {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }
    .portfolio-hero-info h1 {
        font-size: 2rem;
    }
}

@media (max-width: 768px) {
    .portfolio-details-grid {
        grid-template-columns: 1fr;
    }
}

/* Single portfolio — no media fallback (no featured image or video) */
.portfolio-hero-layout.layout-no-media {
    grid-template-columns: 1fr;
}
.portfolio-hero-layout.layout-no-media .portfolio-hero-media {
    display: none;
}

/* =========================================
   Portfolio — Team Credit Block
========================================= */
.portfolio-team-credit {
    margin-top: 2rem;
    padding-top: 1.5rem;
    border-top: 1px solid var(--border-color);
}

.portfolio-team-link {
    display: inline-flex;
    align-items: center;
    gap: 0.85rem;
    margin-top: 0.75rem;
    text-decoration: none;
    transition: opacity 0.25s ease;
}

.portfolio-team-link:hover {
    opacity: 0.75;
}

.portfolio-team-avatar {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid var(--border-color);
    flex-shrink: 0;
}

.portfolio-team-info {
    display: flex;
    flex-direction: column;
    gap: 0.15rem;
}

.portfolio-team-info strong {
    color: var(--text-primary);
    font-size: 1rem;
}

.portfolio-team-info span {
    color: var(--accent-blue);
    font-size: 0.85rem;
    font-weight: 600;
}

/* =========================================
   Footer — social icon row + icon links
========================================= */
.footer-socials {
    display: flex;
    gap: 0.75rem;
    margin-top: 1.5rem;
}

.footer-socials a {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    border: 1px solid var(--border-color);
    border-radius: 50%;
    color: var(--text-secondary);
    transition: color 0.25s ease, border-color 0.25s ease;
}

.footer-socials a:hover {
    color: var(--accent-blue);
    border-color: var(--accent-blue);
}

/* Footer links with inline icons */
.footer-links-icons {
    display: flex;
    flex-direction: column;
    gap: 0.8rem;
}

.footer-links-icons li a {
    display: flex;
    align-items: center;
    gap: 0.55rem;
}

.footer-links-icons li a svg {
    flex-shrink: 0;
    opacity: 0.6;
}

/* =========================================
   Team Member — social links + role link
========================================= */
.team-member-socials {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
    margin-top: 2rem;
}

.team-social-link {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.55rem 1.1rem;
    border: 1px solid var(--border-color);
    border-radius: 24px;
    color: var(--text-secondary);
    font-size: 0.88rem;
    font-weight: 600;
    text-decoration: none;
    transition: color 0.25s ease, border-color 0.25s ease;
}

.team-social-link:hover {
    color: var(--accent-blue);
    border-color: var(--accent-blue);
}

.role-service-link {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    color: var(--accent-blue);
    text-decoration: none;
    transition: opacity 0.2s ease;
}

.role-service-link:hover {
    opacity: 0.75;
}

/* =========================================
   RTL Layout — Desktop Header & Nav
========================================= */

/*
 * Arabic DOM order (header.php):
 *   [nav-right: lang-toggle + menu] · [logo]
 * nav-inner is flex row with space-between, so:
 *   nav-right → far left | logo → far right
 */

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

html[dir="rtl"] .nav-links {
    flex-direction: row-reverse;
}

/* RTL front page: header starts transparent, dark only after scroll */
html[dir="rtl"] #header:not(.scrolled):not(.header-opaque) {
    background-color: transparent;
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
    border-bottom-color: transparent;
    box-shadow: none;
}

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

/* RTL — Hero content */
html[dir="rtl"] .fp-hero-frame {
    padding-left: 0;
    padding-right: 4%;
}

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

html[dir="rtl"] .fp-scroll-indicator {
    right: auto;
    left: 30px;
}

/* RTL — Focus reveal: Arabic text is left-aligned, section centered */
html[dir="rtl"] .fp-reveal-section {
    align-items: center;
}
html[dir="rtl"] .fp-reveal-content {
    text-align: right;
}
html[dir="rtl"] .fp-sentence {
    direction: rtl;
    text-align: right;
}

/* RTL — Services overlay nav */
html[dir="rtl"] .fp-services-nav {
    left: auto;
    right: 4%;
    align-items: flex-end;
}

/* RTL — Breadcrumb */
html[dir="rtl"] .breadcrumb {
    direction: rtl;
}

/* RTL — Blog cards & post meta */
html[dir="rtl"] .blog-card-body,
html[dir="rtl"] .single-post-header {
    text-align: right;
}

/* RTL — Contact split layout */
html[dir="rtl"] .contact-split {
    direction: rtl;
}

html[dir="rtl"] .contact-info {
    text-align: right;
}

/* RTL — Footer */
html[dir="rtl"] .footer-grid {
    direction: rtl;
}

html[dir="rtl"] .footer-brand {
    text-align: right;
}

html[dir="rtl"] .footer-bottom {
    flex-direction: row-reverse;
}

html[dir="rtl"] .footer-links-icons li {
    flex-direction: row-reverse;
}

/* RTL — Post navigation */
html[dir="rtl"] .post-navigation {
    direction: rtl;
}

/* RTL — Single team member */
html[dir="rtl"] .single-team-hero {
    direction: rtl;
}

html[dir="rtl"] .single-team-info {
    text-align: right;
}

/* RTL — Mobile nav top bar */
html[dir="rtl"] .mobile-nav-top {
    flex-direction: row-reverse;
}

html[dir="rtl"] .mobile-nav-footer {
    direction: rtl;
}

html[dir="rtl"] .mobile-nav-links a {
    text-align: right;
}

/* RTL — Form layouts */
html[dir="rtl"] .form-group label,
html[dir="rtl"] .form-group input,
html[dir="rtl"] .form-group textarea,
html[dir="rtl"] .form-group select {
    text-align: right;
}

html[dir="rtl"] .form-row {
    direction: rtl;
}

/* RTL — Archive hero */
html[dir="rtl"] .archive-hero {
    text-align: right;
}

/* RTL — Service cards */
html[dir="rtl"] .service-card {
    text-align: right;
}

/* RTL — Projects header */
html[dir="rtl"] .fp-projects-header {
    text-align: right;
}
html[dir="rtl"] .fp-controls-left {
    justify-self: end;
}
/* RTL — Force slider track to LTR so translate3d offset math stays correct */
html[dir="rtl"] .fp-slider-track {
    direction: ltr;
}
html[dir="rtl"] .fp-slider-controls {
    direction: rtl;
}

@media (max-width: 768px) {
    .footer-newsletter-inner {
        gap: 1.25rem;
    }
}

/* =========================================
   Service Detail Layout (Alternating Zigzag)
   Matches the "Our Work & Partners" style:
   dark bg, text left / image right, then flipped
========================================= */
.services-page-section {
    padding: 6rem 0 2rem;
}

.services-page-heading {
    font-size: clamp(2.8rem, 5vw, 4.5rem);
    font-weight: 800;
    color: var(--text-primary);
    margin-bottom: 1rem;
    letter-spacing: -0.03em;
    line-height: 1.1;
}

.services-page-desc {
    color: var(--text-secondary);
    font-size: 1.15rem;
    line-height: 1.8;
    max-width: 600px;
}

.services-detail-list {
    margin-top: 2rem;
}

.service-detail-item {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 5rem;
    align-items: center;
    padding: 5rem 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

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

/* True zigzag — CSS-driven alternation, regardless of DOM order.
   Odd rows:  [ Text  | Photo ]
   Even rows: [ Photo | Text  ]   */
.service-detail-item:nth-child(odd) .service-detail-content {
    order: 1;
}
.service-detail-item:nth-child(odd) .service-detail-img {
    order: 2;
}
.service-detail-item:nth-child(even) .service-detail-img {
    order: 1;
}
.service-detail-item:nth-child(even) .service-detail-content {
    order: 2;
}

/* RTL mirrors the zigzag so it still alternates visually for Arabic */
html[dir="rtl"] .service-detail-item:nth-child(odd) .service-detail-content {
    order: 2;
}
html[dir="rtl"] .service-detail-item:nth-child(odd) .service-detail-img {
    order: 1;
}
html[dir="rtl"] .service-detail-item:nth-child(even) .service-detail-img {
    order: 2;
}
html[dir="rtl"] .service-detail-item:nth-child(even) .service-detail-content {
    order: 1;
}

/* Subtle vertical stagger to reinforce the zigzag rhythm on desktop */
@media (min-width: 1025px) {
    .service-detail-item:nth-child(even) .service-detail-img {
        transform: translateY(-2rem);
    }
    .service-detail-item:nth-child(odd) .service-detail-img {
        transform: translateY(2rem);
    }
}

.service-detail-img {
    position: relative;
    overflow: hidden;
    border: 1px solid rgba(0, 180, 240, 0.15);
    box-shadow:
        0 0 0 1px rgba(0, 180, 240, 0.08),
        0 25px 60px -12px rgba(0, 0, 0, 0.5);
}

.service-detail-img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    aspect-ratio: 16 / 10;
    transition: transform 1.4s cubic-bezier(0.16, 1, 0.3, 1),
                filter 0.8s ease;
    filter: saturate(0.85) contrast(1.05);
}

.service-detail-item:hover .service-detail-img img {
    transform: scale(1.05);
    filter: saturate(1) contrast(1);
}

.service-placeholder {
    aspect-ratio: 16 / 10 !important;
}

/* Badge / label line */
.service-badge-label {
    font-size: 0.7rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 4px;
    color: var(--accent-blue);
    margin-bottom: 1.5rem;
    display: flex;
    align-items: center;
    gap: 1rem;
}

.service-badge-label::before {
    content: '';
    display: block;
    width: 36px;
    height: 1.5px;
    background: var(--accent-blue);
    flex-shrink: 0;
}

/* Title */
.service-detail-content h3 {
    font-size: clamp(2rem, 3.5vw, 3rem);
    font-weight: 800;
    margin-bottom: 1.5rem;
    line-height: 1.1;
    letter-spacing: -0.02em;
    color: var(--text-primary);
}

/* Description */
.service-detail-content p {
    color: var(--text-secondary);
    font-size: 1.05rem;
    line-height: 1.85;
    margin-bottom: 2rem;
    max-width: 95%;
}

/* Included items / task list */
.service-task-list {
    margin-bottom: 2.5rem;
    display: flex;
    flex-direction: column;
    gap: 0.9rem;
    padding-left: 0;
}

.service-task-list li {
    position: relative;
    padding-left: 2rem;
    color: var(--text-primary);
    font-size: 0.95rem;
    font-weight: 400;
    list-style: none;
    transition: transform 0.3s ease, color 0.3s ease;
    line-height: 1.5;
}

.service-task-list li:hover {
    transform: translateX(6px);
    color: var(--accent-blue);
}

.service-task-list li::before {
    content: '→';
    position: absolute;
    left: 0;
    color: var(--accent-blue);
    font-weight: 600;
    font-size: 1rem;
}

/* CTA button inside service block */
.service-detail-cta {
    margin-top: 0.5rem;
}

/* RTL support */
html[dir="rtl"] .service-badge-label {
    flex-direction: row-reverse;
    letter-spacing: 0;
}
html[dir="rtl"] .service-badge-label::before {
    display: none;
}
html[dir="rtl"] .service-badge-label::after {
    content: '';
    display: block;
    width: 36px;
    height: 1.5px;
    background: var(--accent-blue);
    flex-shrink: 0;
}

html[dir="rtl"] .service-detail-content p {
    max-width: 100%;
}

html[dir="rtl"] .service-task-list li {
    padding-left: 0;
    padding-right: 2rem;
    text-align: right;
}

html[dir="rtl"] .service-task-list li:hover {
    transform: translateX(-6px);
}

html[dir="rtl"] .service-task-list li::before {
    left: auto;
    right: 0;
    content: '←';
}

html[dir="rtl"] .services-page-heading,
html[dir="rtl"] .services-page-desc {
    text-align: right;
}

/* Responsive */
@media (max-width: 1024px) {
    .service-detail-item {
        grid-template-columns: 1fr;
        gap: 2.5rem;
        padding: 3.5rem 0;
    }
    .service-detail-content h3 {
        font-size: 2rem;
    }
    .service-detail-content p {
        max-width: 100%;
    }
    .services-page-heading {
        font-size: 2.5rem;
    }
    /* When stacked, always photo on top of text for every card.
       Override the desktop zigzag order so reading flow stays consistent. */
    .service-detail-item .service-detail-img,
    html[dir="rtl"] .service-detail-item .service-detail-img {
        order: 1;
        transform: none;
    }
    .service-detail-item .service-detail-content,
    html[dir="rtl"] .service-detail-item .service-detail-content {
        order: 2;
    }
}

@media (max-width: 600px) {
    .service-detail-item {
        padding: 2.5rem 0;
        gap: 2rem;
    }
    .service-detail-content h3 {
        font-size: 1.6rem;
    }
    .service-badge-label {
        font-size: 0.65rem;
        letter-spacing: 3px;
    }
}



/* =====================================================================
   UNIFIED UI LAYER — Consistency pass (EN + AR)
   One rounded design language across every page and both directions.
   ===================================================================== */

/* --- Buttons: everything pill-shaped and consistent --- */
.btn-miran-primary,
.fp-cta-btn,
.fp-case-btn,
.btn-submit,
button[type="submit"],
input[type="submit"] {
    border-radius: var(--radius-pill) !important;
    transition: var(--transition-smooth);
}

.btn-miran-primary:hover,
button[type="submit"]:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-glow);
}

/* --- Inputs: rounded, consistent focus ring --- */
input[type="text"],
input[type="email"],
input[type="tel"],
input[type="url"],
select,
textarea {
    border-radius: var(--radius-md) !important;
    transition: border-color 0.25s ease, box-shadow 0.25s ease;
}

input:focus,
select:focus,
textarea:focus {
    outline: none;
    border-color: var(--accent-blue) !important;
    box-shadow: 0 0 0 3px rgba(0, 180, 240, 0.18);
}

/* Newsletter input group keeps its pill silhouette */
.newsletter-input-group {
    border-radius: var(--radius-pill);
    overflow: hidden;
}
.newsletter-input-group input {
    border-radius: 0 !important;
}

/* --- Cards & imagery: same rounding everywhere --- */
.portfolio-card,
.blog-card,
.team-card,
.testimonial-card,
.service-card,
.svc-img-wrap,
.widget {
    border-radius: var(--radius-lg) !important;
    overflow: hidden;
}

.portfolio-card img,
.blog-card img,
.team-card img {
    transition: transform 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}

.portfolio-card:hover,
.blog-card:hover {
    transform: translateY(-6px);
    box-shadow: var(--shadow-soft);
    border-color: rgba(0, 180, 240, 0.4);
    transition: var(--transition-smooth);
}

.portfolio-card:hover img,
.blog-card:hover img {
    transform: scale(1.05);
}

/* --- Filter pills (Work + Blog category filters) --- */
.blog-category-filter a {
    border-radius: var(--radius-pill) !important;
    transition: var(--transition-smooth);
}

/* =====================================================================
   WORK PAGE — Breathing room between elements
   ===================================================================== */
.projects-page .archive-hero {
    padding-top: 9rem;
    padding-bottom: 3.5rem;
}

.projects-page .blog-category-filter {
    margin: 0 0 3.5rem;
}

.projects-page .portfolio-grid,
.portfolio-grid {
    gap: 2.75rem;               /* wider gutters between project cards */
    row-gap: 3.25rem;
    margin-bottom: 6rem;         /* space before the footer */
}

@media (max-width: 768px) {
    .portfolio-grid {
        gap: 2rem;
        row-gap: 2.25rem;
        margin-bottom: 4rem;
    }
}

/* =====================================================================
   COOKIE CONSENT BANNER
   ===================================================================== */
.cookie-banner {
    position: fixed;
    inset-inline-start: 50%;
    transform: translate(-50%, 130%);
    bottom: 1.5rem;
    z-index: 9999;
    width: min(92vw, 640px);
    display: flex;
    align-items: center;
    gap: 1.25rem;
    padding: 1.1rem 1.5rem;
    background: rgba(12, 12, 14, 0.92);
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-soft);
    opacity: 0;
    transition: transform 0.5s cubic-bezier(0.4, 0, 0.2, 1), opacity 0.5s ease;
}

.cookie-banner.is-visible {
    transform: translate(-50%, 0);
    opacity: 1;
}

/* RTL: logical inset keeps it centered, but flip the translate axis anchor */
[dir="rtl"] .cookie-banner {
    transform: translate(50%, 130%);
}
[dir="rtl"] .cookie-banner.is-visible {
    transform: translate(50%, 0);
}

.cookie-banner p {
    margin: 0;
    font-size: 0.85rem;
    line-height: 1.55;
    color: var(--text-secondary);
    flex: 1;
}

.cookie-banner-accept {
    flex-shrink: 0;
    padding: 0.6rem 1.4rem;
    font-size: 0.8rem;
    cursor: pointer;
    border: none;
}

@media (max-width: 560px) {
    .cookie-banner {
        flex-direction: column;
        align-items: stretch;
        text-align: center;
    }
}

/* =====================================================================
   RTL / ARABIC CONSISTENCY
   Make the Arabic experience mirror the English one, not diverge.
   ===================================================================== */
[dir="rtl"] body,
body.miran-arabic,
body.rtl {
    font-family: var(--font-arabic);
}

[dir="rtl"] h1, [dir="rtl"] h2, [dir="rtl"] h3,
[dir="rtl"] h4, [dir="rtl"] h5, [dir="rtl"] h6,
body.miran-arabic h1, body.miran-arabic h2, body.miran-arabic h3,
body.miran-arabic h4, body.miran-arabic h5, body.miran-arabic h6 {
    font-family: var(--font-arabic);
    letter-spacing: 0; /* Arabic script shouldn't be letter-spaced */
}

/* Arabic text shouldn't be force-uppercased (has no case) but keep sizing */
[dir="rtl"] .section-subtitle,
body.miran-arabic .section-subtitle {
    letter-spacing: 0.05em;
}

/* Mirror directional icons/arrows in RTL */
[dir="rtl"] .header-cta svg,
[dir="rtl"] .fp-cta-btn svg {
    transform: scaleX(-1);
}

/* Keep the newsletter pill visually identical in RTL */
[dir="rtl"] .newsletter-input-group {
    flex-direction: row;
}

/* =====================================================================
   CREATIVE POLISH — small touches expected of a media-production studio
   ===================================================================== */

/* Brand-colored text selection */
::selection {
    background: var(--accent-blue);
    color: #000;
}

/* Slim custom scrollbar to match the dark aesthetic */
::-webkit-scrollbar { width: 10px; }
::-webkit-scrollbar-track { background: var(--bg-color); }
::-webkit-scrollbar-thumb {
    background: #2a2a2a;
    border-radius: var(--radius-pill);
    border: 2px solid var(--bg-color);
}
::-webkit-scrollbar-thumb:hover { background: var(--accent-blue); }

/* Visible keyboard focus for accessibility */
a:focus-visible,
button:focus-visible {
    outline: 2px solid var(--accent-blue);
    outline-offset: 3px;
    border-radius: var(--radius-sm);
}

/* Underline-reveal on nav links (both directions) */
.nav-links a {
    position: relative;
}
.nav-links a::after {
    content: '';
    position: absolute;
    inset-inline-start: 0;
    bottom: -4px;
    width: 100%;
    height: 2px;
    background: var(--accent-blue);
    border-radius: var(--radius-pill);
    transform: scaleX(0);
    transform-origin: center;
    transition: transform 0.3s ease;
}
.nav-links a:hover::after,
.nav-links .current-menu-item a::after {
    transform: scaleX(1);
}

/* Reduced motion: respect user preference */
@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after {
        animation-duration: 0.01ms !important;
        transition-duration: 0.01ms !important;
    }
}

/* =====================================================================
   SERVICE — CUSTOM CONTENT SECTIONS
   Flexible per-service blocks that still follow the site design pattern
   ===================================================================== */
.svc-custom-prose {
    max-width: 780px;
    margin: 0 auto;
}
.svc-custom-prose p,
.svc-custom-text p {
    color: var(--text-secondary);
    line-height: 1.85;
    font-size: 1.05rem;
    margin-bottom: 1.4rem;
}

.svc-custom-split {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
    align-items: center;
}
.svc-custom-split.is-reversed .svc-custom-text  { order: 2; }
.svc-custom-split.is-reversed .svc-custom-media { order: 1; }

.svc-custom-media img {
    width: 100%;
    height: auto;
    display: block;
    border-radius: var(--radius-lg);
    border: 1px solid var(--border-color);
    box-shadow: var(--shadow-soft);
}

.svc-custom-banner {
    position: relative;
    background-size: cover;
    background-position: center;
    background-attachment: fixed;
    margin: 4rem 0;
}
.svc-custom-banner-overlay {
    background: linear-gradient(rgba(0,0,0,0.72), rgba(0,0,0,0.72));
    padding: 6rem 2rem;
    text-align: center;
}
.svc-custom-banner-overlay h2 {
    font-size: clamp(1.8rem, 4vw, 2.6rem);
    margin-bottom: 1.2rem;
}
.svc-custom-banner-overlay p {
    color: var(--text-secondary);
    max-width: 720px;
    margin: 0 auto 1rem;
    line-height: 1.8;
}

/* =====================================================================
   MOBILE PASS — the whole site tuned for phones
   ===================================================================== */
@media (max-width: 768px) {

    /* Base rhythm */
    html { -webkit-text-size-adjust: 100%; }
    .container { padding-left: 1.25rem; padding-right: 1.25rem; }
    .section-padding { padding-top: 3.5rem; padding-bottom: 3.5rem; }

    /* Typography scales down gracefully */
    h1 { font-size: clamp(1.9rem, 8vw, 2.6rem) !important; line-height: 1.2; }
    h2 { font-size: clamp(1.5rem, 6vw, 2rem) !important; line-height: 1.25; }
    .archive-hero { padding-top: 6.5rem; padding-bottom: 2.5rem; }

    /* Buttons: full comfortable tap targets, never overflow */
    .btn-miran-primary,
    .fp-cta-btn,
    .fp-case-btn,
    .btn-submit {
        padding: 0.95rem 2rem !important;
        font-size: 0.85rem !important;
        letter-spacing: 1px !important;
        width: auto;
        max-width: 100%;
        white-space: normal;
        text-align: center;
    }

    /* Newsletter: stack input and button vertically */
    .newsletter-input-group {
        flex-direction: column !important;
        border-radius: var(--radius-lg) !important;
        gap: 0.75rem;
        background: transparent;
        overflow: visible;
    }
    .newsletter-input-group input {
        border-radius: var(--radius-pill) !important;
        width: 100%;
        text-align: center;
    }
    .newsletter-input-group button {
        width: 100%;
    }

    /* Footer: single readable column */
    .footer-grid {
        grid-template-columns: 1fr !important;
        gap: 2.5rem;
        text-align: start;
    }
    .footer-bottom {
        flex-direction: column;
        gap: 0.5rem;
        text-align: center;
    }
    .footer-newsletter-content h2 { font-size: 1.5rem; }

    /* Service zigzag & custom splits: stack, image first */
    .svc-custom-split {
        grid-template-columns: 1fr;
        gap: 2rem;
    }
    .svc-custom-split.is-reversed .svc-custom-text  { order: 1; }
    .svc-custom-split.is-reversed .svc-custom-media { order: 2; }
    .svc-custom-banner { background-attachment: scroll; } /* fixed bg janks on mobile */
    .svc-custom-banner-overlay { padding: 4rem 1.25rem; }

    /* Included grid / process steps: one column */
    .included-grid,
    .process-steps {
        grid-template-columns: 1fr !important;
        gap: 1rem !important;
    }

    /* Filter pills wrap nicely and scroll if needed */
    .blog-category-filter {
        display: flex;
        flex-wrap: wrap;
        gap: 0.6rem;
        justify-content: center;
    }

    /* Modal fits the viewport */
    .modal-content {
        width: calc(100vw - 2rem);
        max-height: 88vh;
        overflow-y: auto;
        border-radius: var(--radius-lg);
        padding: 1.5rem 1.25rem;
    }
    .form-row { grid-template-columns: 1fr !important; }

    /* Tables/media never overflow */
    img, video, iframe { max-width: 100%; height: auto; }
    .post-content { overflow-wrap: break-word; }
}

@media (max-width: 480px) {
    .section-padding { padding-top: 2.75rem; padding-bottom: 2.75rem; }
    .portfolio-grid { grid-template-columns: 1fr !important; }
    .footer-newsletter-content h2 { font-size: 1.3rem; }
    .cookie-banner { bottom: 0.75rem; padding: 1rem 1.1rem; }
}

/* Larger comfortable tap targets everywhere on touch devices */
@media (hover: none) and (pointer: coarse) {
    a, button, input[type="submit"], select {
        min-height: 44px;
    }
    .nav-links a::after { display: none; } /* no hover underline on touch */
}

/* =====================================================================
   FAQ ACCORDION
   ===================================================================== */
.faq-list {
    max-width: 780px;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    gap: 1rem;
}
.faq-item {
    background: var(--surface-color);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    overflow: hidden;
    transition: border-color 0.3s ease;
}
.faq-item[open] { border-color: rgba(0, 180, 240, 0.5); }
.faq-item summary {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    padding: 1.2rem 1.5rem;
    cursor: pointer;
    font-weight: 600;
    font-size: 1.02rem;
    list-style: none;
    user-select: none;
}
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item summary:hover { color: var(--accent-blue); }
.faq-chevron {
    flex-shrink: 0;
    color: var(--accent-blue);
    transition: transform 0.3s ease;
}
.faq-item[open] .faq-chevron { transform: rotate(180deg); }
.faq-answer { padding: 0 1.5rem 1.3rem; }
.faq-answer p {
    color: var(--text-secondary);
    line-height: 1.8;
    margin: 0;
}

/* =====================================================================
   WHATSAPP FLOATING BUTTON
   ===================================================================== */
.whatsapp-fab {
    position: fixed;
    bottom: 1.5rem;
    inset-inline-end: 1.5rem;
    z-index: 9998;
    width: 56px;
    height: 56px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #25D366;
    color: #fff;
    border-radius: var(--radius-pill);
    box-shadow: 0 8px 24px rgba(37, 211, 102, 0.45);
    transition: var(--transition-smooth);
}
.whatsapp-fab:hover {
    transform: translateY(-4px) scale(1.05);
    box-shadow: 0 12px 32px rgba(37, 211, 102, 0.6);
}
.whatsapp-fab-tooltip {
    position: absolute;
    inset-inline-end: calc(100% + 12px);
    background: rgba(12, 12, 14, 0.95);
    border: 1px solid var(--border-color);
    color: var(--text-primary);
    font-size: 0.78rem;
    padding: 0.5rem 0.9rem;
    border-radius: var(--radius-pill);
    white-space: nowrap;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.25s ease;
}
.whatsapp-fab:hover .whatsapp-fab-tooltip { opacity: 1; }

@media (max-width: 768px) {
    .whatsapp-fab { bottom: 1rem; inset-inline-end: 1rem; width: 52px; height: 52px; }
    .whatsapp-fab-tooltip { display: none; }
    /* Cookie banner sits above the WhatsApp button when both are visible */
    .cookie-banner { bottom: 4.75rem; }
}

/* =====================================================================
   SERVICE HERO v2 — modern split layout with glass stat cards
   One design, consistent across every service, EN and AR.
   ===================================================================== */
.svc-hero {
    position: relative;
    padding: 10rem 0 5rem;
    overflow: hidden;
}

/* Ambient brand glow instead of a washed-out photo backdrop */
.svc-hero-glow {
    position: absolute;
    top: -20%;
    inset-inline-start: -10%;
    width: 60vw;
    height: 60vw;
    max-width: 900px;
    max-height: 900px;
    background: radial-gradient(circle,
        rgba(0, 180, 240, 0.16) 0%,
        rgba(0, 180, 240, 0.05) 40%,
        transparent 70%);
    pointer-events: none;
    filter: blur(20px);
}

.svc-hero-inner {
    position: relative;
    display: grid;
    grid-template-columns: minmax(0, 1.1fr) minmax(0, 0.9fr);
    gap: 4rem;
    align-items: center;
}
.svc-hero.no-media .svc-hero-inner {
    grid-template-columns: minmax(0, 1fr);
    max-width: 860px;
}

/* Badge: pill with pulsing dot */
.svc-hero-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.55rem;
    padding: 0.45rem 1.1rem;
    border: 1px solid rgba(0, 180, 240, 0.4);
    background: rgba(0, 180, 240, 0.08);
    color: var(--accent-blue);
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.18em;
    text-transform: uppercase;
    border-radius: var(--radius-pill);
    margin-bottom: 1.75rem;
}
.svc-hero-badge-dot {
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: var(--accent-blue);
    animation: svcPulse 2s ease-in-out infinite;
}
@keyframes svcPulse {
    0%, 100% { opacity: 1; box-shadow: 0 0 0 0 rgba(0,180,240,0.5); }
    50%      { opacity: 0.6; box-shadow: 0 0 0 6px rgba(0,180,240,0); }
}

.svc-hero-title {
    font-size: clamp(2.4rem, 5.2vw, 4.2rem);
    line-height: 1.08;
    margin-bottom: 1.5rem;
    background: linear-gradient(135deg, #ffffff 55%, rgba(0, 180, 240, 0.85));
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

.svc-hero-desc {
    color: var(--text-secondary);
    font-size: 1.1rem;
    line-height: 1.85;
    max-width: 560px;
    margin-bottom: 2.5rem;
}

.svc-hero-cta {
    display: flex;
    align-items: center;
    gap: 1.25rem;
    flex-wrap: wrap;
}
.svc-hero-btn-ghost {
    display: inline-flex;
    align-items: center;
    gap: 0.6rem;
    color: var(--text-primary);
    text-decoration: none;
    font-weight: 600;
    font-size: 0.9rem;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    padding: 0.9rem 1.6rem;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-pill);
    transition: var(--transition-smooth);
}
.svc-hero-btn-ghost:hover {
    border-color: var(--accent-blue);
    color: var(--accent-blue);
    transform: translateY(-2px);
}
.svc-hero-btn-ghost svg { transition: transform 0.3s ease; }
.svc-hero-btn-ghost:hover svg { transform: translateX(4px); }
[dir="rtl"] .svc-hero-btn-ghost svg { transform: scaleX(-1); }
[dir="rtl"] .svc-hero-btn-ghost:hover svg { transform: scaleX(-1) translateX(4px); }

/* Media: image inside a rounded, glowing frame with a floating tilt */
.svc-hero-media-frame {
    position: relative;
    border-radius: var(--radius-lg);
    overflow: hidden;
    border: 1px solid rgba(0, 180, 240, 0.25);
    box-shadow: 0 25px 70px rgba(0, 0, 0, 0.6), 0 0 60px rgba(0, 180, 240, 0.12);
    transform: rotate(1.5deg);
    transition: transform 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}
.svc-hero-media-frame:hover { transform: rotate(0deg) scale(1.015); }
[dir="rtl"] .svc-hero-media-frame { transform: rotate(-1.5deg); }
[dir="rtl"] .svc-hero-media-frame:hover { transform: rotate(0deg) scale(1.015); }
.svc-hero-media-frame::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(to top, rgba(0,0,0,0.35), transparent 45%);
    pointer-events: none;
}
.svc-hero-media-frame img {
    width: 100%;
    height: 100%;
    aspect-ratio: 4/3;
    object-fit: cover;
    display: block;
}

/* Stats: glass cards, cyan numbers first, hover lift */
.svc-stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
    gap: 1.25rem;
    margin-top: 4.5rem;
}
.svc-stat-card {
    position: relative;
    padding: 1.6rem 1.5rem;
    background: rgba(255, 255, 255, 0.025);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    backdrop-filter: blur(8px);
    transition: var(--transition-smooth);
    overflow: hidden;
}
.svc-stat-card::before {
    content: '';
    position: absolute;
    top: 0;
    inset-inline-start: 0;
    width: 100%;
    height: 2px;
    background: linear-gradient(90deg, var(--accent-blue), transparent);
    opacity: 0;
    transition: opacity 0.3s ease;
}
.svc-stat-card:hover {
    transform: translateY(-4px);
    border-color: rgba(0, 180, 240, 0.4);
    background: rgba(0, 180, 240, 0.05);
}
.svc-stat-card:hover::before { opacity: 1; }
.svc-stat-value {
    display: block;
    font-size: clamp(1.7rem, 3vw, 2.3rem);
    font-weight: 700;
    color: var(--accent-blue);
    line-height: 1.1;
    margin-bottom: 0.4rem;
}
.svc-stat-label {
    display: block;
    font-size: 0.74rem;
    font-weight: 600;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: var(--text-secondary);
}
[dir="rtl"] .svc-stat-label { letter-spacing: 0; font-size: 0.85rem; }

/* Mobile */
@media (max-width: 900px) {
    .svc-hero { padding: 7.5rem 0 3.5rem; }
    .svc-hero-inner {
        grid-template-columns: 1fr;
        gap: 2.5rem;
    }
    .svc-hero-media { order: -1; } /* image on top on mobile */
    .svc-hero-media-frame { transform: rotate(0); }
    .svc-stats {
        grid-template-columns: repeat(2, 1fr);
        gap: 0.9rem;
        margin-top: 3rem;
    }
    .svc-stat-card { padding: 1.2rem 1.1rem; }
}
@media (max-width: 420px) {
    .svc-stats { grid-template-columns: 1fr 1fr; }
}

/* =====================================================================
   SERVICE HERO — photo backdrop restored (cinematic layer)
   The hero image now appears BOTH as a full-bleed dimmed backdrop
   and inside the rounded frame, like a movie poster treatment.
   ===================================================================== */
.svc-hero-bg {
    position: absolute;
    inset: 0;
    background-size: cover;
    background-position: center;
    filter: blur(2px) saturate(1.05);
    transform: scale(1.05); /* hide blur edges */
}
.svc-hero-bg-overlay {
    position: absolute;
    inset: 0;
    background:
        linear-gradient(to bottom, rgba(0,0,0,0.82) 0%, rgba(0,0,0,0.88) 55%, var(--bg-color) 100%),
        radial-gradient(ellipse at 25% 30%, rgba(0,180,240,0.10), transparent 55%);
}
.svc-hero > .container { position: relative; }

/* =====================================================================
   PROJECT PAGE — "Services used" chips
   ===================================================================== */
.project-services { padding: 1rem 0 3rem; }
.project-services-title {
    font-size: 0.8rem;
    font-weight: 700;
    letter-spacing: 0.16em;
    text-transform: uppercase;
    color: var(--text-secondary);
    margin-bottom: 1.1rem;
}
[dir="rtl"] .project-services-title { letter-spacing: 0; font-size: 0.95rem; }
.project-services-chips {
    display: flex;
    flex-wrap: wrap;
    gap: 0.8rem;
}
.project-service-chip {
    display: inline-flex;
    align-items: center;
    gap: 0.55rem;
    padding: 0.65rem 1.3rem;
    background: rgba(0, 180, 240, 0.07);
    border: 1px solid rgba(0, 180, 240, 0.35);
    color: var(--text-primary);
    font-size: 0.85rem;
    font-weight: 600;
    text-decoration: none;
    border-radius: var(--radius-pill);
    transition: var(--transition-smooth);
}
.project-service-chip svg { color: var(--accent-blue); flex-shrink: 0; }
.project-service-chip:hover {
    background: var(--accent-blue);
    border-color: var(--accent-blue);
    color: #000;
    transform: translateY(-2px);
    box-shadow: var(--shadow-glow);
}
.project-service-chip:hover svg { color: #000; }

/* Related projects grid inherits .portfolio-grid — just tune spacing */
.related-projects .portfolio-grid { margin-bottom: 0; }
