/* ===================== PAGE LOADER ===================== */
#page-loader {
    position: fixed;
    inset: 0;
    background: #050505;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    z-index: 9999;
    transition: opacity 0.5s ease, visibility 0.5s ease;
}

#page-loader.hidden {
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
}

.loader-ring {
    width: 52px;
    height: 52px;
    border: 3px solid rgba(198, 168, 124, 0.15);
    border-top-color: #c6a87c;
    border-radius: 50%;
    animation: loader-spin 0.75s linear infinite;
}

#page-loader::after {
    content: 'نرسم المستقبل';
    display: block;
    margin-top: 20px;
    font-family: 'Cairo', sans-serif;
    font-size: 0.85rem;
    letter-spacing: 0.18em;
    color: rgba(198, 168, 124, 0.6);
}

@keyframes loader-spin {
    to {
        transform: rotate(360deg);
    }
}

/* ====================================================== */

/* Variables */
:root {
    --color-navy: #050505;
    /* Dark Theme Background */
    --color-light-navy: #1a1a1a;
    /* Dark Grey */
    --color-lightest-navy: #2d2d2d;
    /* Lighter Grey */
    --color-slate: #9e9e9e;
    /* Silver/Grey */
    --color-light-slate: #cfcfcf;
    /* Light Grey */
    --color-white: #ffffff;
    --color-gold: #c6a87c;
    /* Muted Architectural Gold */
    /* Gold accent */
    --color-teal: #64ffda;
    /* Teal accent option */

    --font-heading: 'Cairo', sans-serif;
    --font-body: 'Cairo', sans-serif;

    --transition: all 0.3s ease-in-out;

    /* Premium Architectural Strips Pattern */
    --bg-pattern: repeating-linear-gradient(45deg,
            transparent,
            transparent 40px,
            rgba(198, 168, 124, 0.08) 40px,
            /* Thin lead-in */
            rgba(198, 168, 124, 0.12) 41px,
            /* Core bright strip */
            rgba(198, 168, 124, 0.08) 42px,
            /* Thin lead-out */
            transparent 42px,
            transparent 60px,
            /* Space */
            rgba(198, 168, 124, 0.05) 60px,
            /* Secondary faint strip */
            rgba(198, 168, 124, 0.05) 61px,
            transparent 61px);

    /* Glassmorphism Backgrounds */
    --glass-navy: rgba(5, 5, 5, 0.85);
    --glass-light: rgba(26, 26, 26, 0.85);
}

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

html {
    scroll-behavior: smooth;
}

body {
    font-family: var(--font-body);
    background-color: var(--color-navy);
    /* Dark Theme Default */
    color: var(--color-light-slate);
    line-height: 1.6;
    overflow-x: hidden;
    position: relative;
}

/* Diagonal Kufic geometric background - covers one half, fades out */
body::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image: var(--bg-pattern);
    /* Gradient handles repetition, size auto ensures it flows naturally */
    background-repeat: no-repeat;
    background-size: cover;
    pointer-events: none;
    z-index: 0;
    -webkit-mask-image: linear-gradient(135deg, rgba(0, 0, 0, 1) 0%, rgba(0, 0, 0, 0.8) 40%, rgba(0, 0, 0, 0) 80%);
    mask-image: linear-gradient(135deg, rgba(0, 0, 0, 1) 0%, rgba(0, 0, 0, 0.8) 40%, rgba(0, 0, 0, 0) 80%);
}

/* Bilingual Toggle Logic */
html[lang="en"] .ar {
    display: none !important;
}

html[lang="ar"] .en {
    display: none !important;
}

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

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

/* Typography */
h1,
h2,
h3,
h4,
h5,
h6 {
    font-family: var(--font-heading);
    color: var(--color-white);
    font-weight: 700;
}

a {
    text-decoration: none;
    color: inherit;
    transition: var(--transition);
}

ul {
    list-style: none;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

.section {
    padding: 80px 0;
    position: relative;
    z-index: 1;
}

.bg-light {
    background-color: var(--color-light-navy);
}

.bg-dark {
    background-color: var(--color-navy);
    color: var(--color-white);
}

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

.text-gray {
    color: var(--color-slate);
}

/* Buttons */
.btn {
    display: inline-block;
    padding: 12px 28px;
    border-radius: 4px;
    font-weight: 600;
    cursor: pointer;
    border: 2px solid transparent;
    transition: var(--transition);
    text-transform: uppercase;
    font-size: 0.9rem;
    letter-spacing: 1px;
}

.btn-primary {
    background-color: var(--color-gold);
    color: var(--color-navy);
}

.btn-primary:hover {
    background-color: transparent;
    border-color: var(--color-gold);
    color: var(--color-gold);
}

.btn-outline-gold {
    background-color: transparent;
    border-color: var(--color-gold);
    color: var(--color-gold);
}

.btn-outline-gold:hover {
    background-color: var(--color-gold);
    color: var(--color-navy);
}

.btn-secondary {
    background-color: transparent;
    border-color: var(--color-navy);
    color: var(--color-navy);
}

.btn-secondary:hover {
    background-color: var(--color-gold);
    color: var(--color-navy);
    border-color: var(--color-gold);
}

/* Header */
header {
    background: rgba(0, 0, 0, 0.25);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    height: 70px;
    position: fixed;
    width: 100%;
    top: 0;
    z-index: 1000;
    display: flex;
    align-items: center;
    border-bottom: 1px solid rgba(198, 168, 124, 0.35);
    transition: transform 0.4s ease, background 0.4s ease;
}

header.scrolled {
    background: rgba(0, 0, 0, 0.25);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    box-shadow: none;
}

header.header-hidden {
    transform: translateY(-100%);
}

header .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
}

.logo a {
    display: flex;
    align-items: center;
    border: none;
    padding: 0;
}

.logo a img {
    height: 60px;
    /* Adjusted height */
    width: auto;
    object-fit: contain;
    transition: var(--transition);
}

.scrolled .logo a img {
    height: 50px;
    /* Slightly smaller on scroll */
}

nav ul {
    display: flex;
    gap: 30px;
}

.nav-link {
    color: var(--color-light-slate);
    font-size: 0.82rem;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.08em;
}

/* Logo Glow on Nav Hover */
header:has(.nav-link:hover) .logo img {
    filter: drop-shadow(0 0 8px var(--color-gold));
    transform: scale(1.05);
}

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

/* =============================================
   MEGA MENU
   ============================================= */
.has-mega {
    position: static;
}

.mega-chevron {
    font-size: 0.65rem;
    margin-left: 5px;
    display: inline-block;
    vertical-align: middle;
    transition: transform 0.3s ease;
}

.has-mega:hover .mega-chevron {
    transform: rotate(180deg);
}

.mega-menu {
    position: fixed;
    top: 70px;
    left: 0;
    right: 0;
    background: rgba(0, 0, 0, 0.25);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: none;
    visibility: hidden;
    opacity: 0;
    transform: translateY(-6px);
    transition: opacity 0.3s ease, transform 0.3s ease, visibility 0.3s ease;
    z-index: 200;
    pointer-events: none;
}

.has-mega:hover .mega-menu,
.has-mega.is-open .mega-menu,
.mega-menu.is-open {
    visibility: visible;
    opacity: 1;
    transform: translateY(0);
    pointer-events: auto;
}

.mega-inner {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    max-width: 1200px;
    margin: 0 auto;
    padding: 28px 20px;
}

.mega-col {
    padding: 0 28px;
    border-right: 1px solid rgba(198, 168, 124, 0.1);
}

.mega-col:first-child {
    padding-left: 0;
}

.mega-col:last-child {
    border-right: none;
    padding-right: 0;
}

.mega-col-title {
    color: var(--color-gold);
    font-size: 0.68rem;
    font-weight: 700;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    padding-bottom: 10px;
    margin-bottom: 10px;
    border-bottom: 1px solid rgba(198, 168, 124, 0.2);
    font-family: 'Inter', sans-serif;
    white-space: nowrap;
}

.mega-col ul {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    flex-direction: column;
    gap: 0;
}

.mega-col ul li a {
    color: var(--color-light-slate);
    font-size: 0.875rem;
    padding: 7px 0 7px 10px;
    display: block;
    text-decoration: none;
    border-left: 2px solid transparent;
    transition: all 0.25s ease;
    line-height: 1.4;
    white-space: nowrap;
}

.mega-col ul li a:hover {
    color: var(--color-gold);
    border-left-color: var(--color-gold);
    padding-left: 16px;
}

/* RTL Mega Menu */
html[dir="rtl"] .mega-col {
    border-right: none;
    border-left: 1px solid rgba(198, 168, 124, 0.1);
}

html[dir="rtl"] .mega-col:first-child {
    padding-left: 28px;
    padding-right: 0;
}

html[dir="rtl"] .mega-col:last-child {
    border-left: none;
    padding-right: 28px;
    padding-left: 0;
}

html[dir="rtl"] .mega-col ul li a {
    padding: 7px 10px 7px 0;
    border-left: none;
    border-right: 2px solid transparent;
}

html[dir="rtl"] .mega-col ul li a:hover {
    border-right-color: var(--color-gold);
    padding-right: 16px;
    padding-left: 0;
}

html[dir="rtl"] .mega-chevron {
    margin-left: 0;
    margin-right: 5px;
}

/* Header Actions */
.header-actions {
    display: flex;
    align-items: center;
    gap: 20px;
}

#lang-toggle {
    background: transparent;
    border: none;
    color: var(--color-light-slate);
    padding: 0;
    margin: 0;
    font-size: 0.82rem;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    line-height: 1;
    cursor: pointer;
    transition: var(--transition);
    font-family: inherit;
    display: inline-flex;
    align-items: center;
    vertical-align: middle;
}

#lang-toggle:hover {
    color: var(--color-gold) !important;
}

/* Hamburger */
.hamburger {
    display: none;
    cursor: pointer;
    min-width: 44px;
    min-height: 44px;
    align-items: center;
    justify-content: center;
    flex-direction: column;
}

.bar {
    display: block;
    width: 28px;
    height: 3px;
    margin: 5px auto;
    background-color: var(--color-gold);
    transition: var(--transition);
}

/* Hero Section */
.hero {
    height: 100vh;
    position: relative;
    overflow: hidden;
    padding: 0;
    /* Override section padding */
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--color-white);
    background-color: var(--color-navy);
}

.hero-bg {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
}

.hero-bg::before {
    content: '';
    position: absolute;
    inset: 0;
    background-image:
        linear-gradient(rgba(255,255,255,0.07) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255,255,255,0.07) 1px, transparent 1px);
    background-size: 60px 60px;
    pointer-events: none;
    z-index: 1;
}

.hero-bg::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(to bottom, rgba(0,0,0,0.3), rgba(0,0,0,0.75));
    z-index: 1;
}

/* Golden LED underlight below hero */
.hero-led-underlight {
    position: relative;
    z-index: 5;
    height: 4px;
    margin-top: -4px;
    background: linear-gradient(to right, transparent 0%, rgba(198,168,124,0.6) 20%, #c6a87c 50%, rgba(198,168,124,0.6) 80%, transparent 100%);
    box-shadow:
        0 0 18px 6px rgba(198,168,124,0.55),
        0 0 45px 18px rgba(198,168,124,0.28),
        0 0 90px 35px rgba(198,168,124,0.12);
    pointer-events: none;
}

/* Nav lang-toggle item */
.nav-lang-item {
    list-style: none;
    display: flex;
    align-items: center;
}

/* Legacy slider — kept for any page that still uses it */
.hero-slider {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
}

.hero-slider .slide {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-size: cover;
    background-position: center;
    opacity: 0;
    transition: opacity 1s ease-in-out;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
}

.hero-slider .slide.active {
    opacity: 1;
    z-index: 1;
}

.slide-content {
    max-width: 800px;
    padding: 20px;
    z-index: 2;
}

.monogram-large {
    font-family: var(--font-heading);
    font-size: 5rem;
    color: rgba(212, 175, 55, 0.2);
    margin-bottom: -40px;
    display: block;
}

.slide-content h1 {
    font-size: 3.5rem;
    color: var(--color-white);
    margin-bottom: 20px;
}

.slide-content h2 {
    font-size: 2rem;
    color: var(--color-gold);
    font-weight: 400;
    margin-bottom: 20px;
}

.slide-content p {
    font-size: 1.2rem;
    color: var(--color-light-slate);
    margin-bottom: 30px;
}

/* Nav Link Contrast Handling */

/* Scrolled (Dark Header) -> Default Text */
header.scrolled .nav-link {
    color: var(--color-light-slate);
    text-shadow: none;
}

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

header.scrolled #lang-toggle {
    color: var(--color-light-slate);
}

header.scrolled #lang-toggle:hover {
    color: var(--color-gold);
}

/* Logo Contrast Handling */
/* Scrolled Header -> No Invert needed for Dark Theme */
header.scrolled .logo img {
    filter: none;
}

/* Footer Logo -> No Invert needed for Dark Theme */
footer .logo img {
    filter: none;
}

.hero-stats {
    position: absolute;
    bottom: 0;
    right: 0;
    /* Align right */
    background: rgba(10, 25, 47, 0.4);
    display: flex;
    padding: 30px 60px;
    gap: 50px;
    z-index: 10;
    border-top-left-radius: 10px;
}

/* RTL overrides for hero stats */
html[dir="rtl"] .hero-stats {
    right: auto;
    left: 0;
    border-top-left-radius: 0;
    border-top-right-radius: 10px;
    flex-direction: row;
    flex-direction: row-reverse;
}


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

.stat-number {
    display: block;
    font-size: 2.5rem;
    font-weight: 700;
    color: var(--color-gold);
    font-family: var(--font-heading);
}

.stat-label {
    font-size: 0.9rem;
    color: #cfcfcf;
    /* Light text for stats on dark bg */
    text-transform: uppercase;
    letter-spacing: 1px;
}

/* Section Header */
.section-header {
    text-align: center;
    margin-bottom: 60px;
}

.section-header h2 {
    font-size: 2.5rem;
    margin-bottom: 10px;
}

.section-header p {
    color: var(--color-slate);
}

.separator {
    width: 60px;
    height: 3px;
    background-color: var(--color-gold);
    margin: 20px auto 0;
}

/* About Section */
.about-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 50px;
    align-items: center;
}

.img-placeholder {
    width: 100%;
    height: 400px;
    background-color: var(--color-light-slate);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--color-navy);
    font-weight: 600;
    text-align: center;
    border: 10px solid var(--color-white);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
}

.about-content h3 {
    color: var(--color-gold);
    margin-bottom: 15px;
}

.about-content .lead {
    font-size: 1.1rem;
    color: var(--color-navy);
    font-weight: 600;
    margin-bottom: 20px;
}

.about-features {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
    margin: 30px 0;
}

.feature {
    display: flex;
    gap: 15px;
}

.about-video {
    width: 100%;
    height: auto;
    display: block;
}

.vimeo-wrapper {
    position: relative;
    padding-top: 56.25%; /* 16:9 */
    width: 100%;
    background: #000;
}

.vimeo-wrapper iframe {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border: 0;
}

.feature i {
    color: var(--color-gold);
    font-size: 1.5rem;
    margin-top: 5px;
}

/* Services */
.services-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
}

.service-card {
    background: var(--color-navy);
    padding: 30px;
    border-radius: 8px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.05);
    transition: var(--transition);
    border-bottom: 3px solid transparent;
}

.service-card:hover {
    transform: translateY(-10px);
    border-bottom-color: var(--color-gold);
}

.icon-box {
    width: 60px;
    height: 60px;
    background: rgba(212, 175, 55, 0.1);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 20px;
}

.icon-box i {
    color: var(--color-gold);
    font-size: 1.5rem;
}

/* --- Portfolio Section (3D Viewer) --- */
#threejs-container {
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
}

#threejs-container canvas {
    display: block;
    /* Removes bottom extra space */
    width: 100% !important;
    height: 100% !important;
    z-index: 1;
    /* Below UI elements */
    outline: none;
}

/* Navigation Arrows */
.nav-arrow {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(10, 25, 47, 0.7);
    color: var(--color-gold);
    border: 1px solid var(--color-gold);
    border-radius: 50%;
    width: 40px;
    height: 40px;
    cursor: pointer;
    z-index: 10;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
}

.nav-arrow:hover {
    background: var(--color-gold);
    color: var(--color-navy);
}

.nav-arrow.left {
    left: 20px;
}

.nav-arrow.right {
    right: 20px;
}

/* View Toggle */
.view-toggle {
    position: absolute;
    top: 20px;
    right: 20px;
    display: flex;
    background: rgba(10, 25, 47, 0.8);
    border-radius: 30px;
    padding: 5px;
    z-index: 10;
    border: 1px solid var(--color-lightest-navy);
}

.toggle-btn {
    background: transparent;
    border: none;
    color: var(--color-slate);
    padding: 8px 15px;
    border-radius: 20px;
    cursor: pointer;
    font-family: var(--font-body);
    font-size: 0.85rem;
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 5px;
    transition: all 0.3s ease;
}

.toggle-btn.active {
    background: var(--color-gold);
    color: var(--color-navy);
    font-weight: 600;
}

/* Project Info Overlay */
.project-info-overlay {
    position: absolute;
    bottom: 20px;
    left: 20px;
    background: rgba(10, 25, 47, 0.85);
    backdrop-filter: blur(5px);
    -webkit-backdrop-filter: blur(5px);
    padding: 15px 25px;
    border-radius: 8px;
    border-left: 3px solid var(--color-gold);
    z-index: 10;
    max-width: 300px;
}

.project-info-overlay h3 {
    color: var(--color-white);
    font-size: 1.1rem;
    margin-bottom: 5px;
}

.project-info-overlay p {
    color: var(--color-light-slate);
    font-size: 0.85rem;
    margin: 0;
}

/* --- Services Grid (Redesign) --- */
.section-subtitle {
    color: var(--color-gold);
    margin-bottom: 40px;
    font-weight: 500;
}

.services-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
}

.service-item {
    background-color: var(--glass-navy);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    padding: 40px 30px;
    border: 1px solid var(--color-lightest-navy);
    transition: var(--transition);
    position: relative;
    overflow: hidden;
    display: block;
    /* Critical for a tags wrapping content */
    cursor: pointer;
    z-index: 5;
    /* Ensure above background elements */
    text-decoration: none;
    /* Ensure no underline on block */
}

.service-item:hover {
    transform: translateY(-5px);
    border-color: var(--color-gold);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
}

/* Split Image Container Glow Effect - Global */
.split-image-container,
.single-image-container,
.project-image,
.split-image,
.slideshow-container {
    flex: 1;
    border: 1px solid var(--color-gold);
    padding: 5px;
    border-radius: 4px;
    background: rgba(198, 168, 124, 0.05);
    box-shadow: 0 0 15px rgba(198, 168, 124, 0.4), 0 15px 40px -10px rgba(0, 0, 0, 0.6);
    overflow: hidden;
    transition: all 0.3s ease;
}

.split-image-container:hover,
.single-image-container:hover,
.project-image:hover,
.split-image:hover,
.slideshow-container:hover {
    box-shadow: 0 0 25px rgba(198, 168, 124, 0.6), 0 20px 50px -10px rgba(0, 0, 0, 0.8);
    border-color: #d4b87a;
    transform: translateY(-5px);
}

/* Villa grid image glow */
.villa-grid img:hover {
    box-shadow: 0 0 20px rgba(198, 168, 124, 0.5), 0 10px 30px -5px rgba(0, 0, 0, 0.6);
}

/* Photo grid item glow */
.photo-grid .photo-item {
    transition: box-shadow 0.3s ease, border-color 0.3s ease;
}

.photo-grid .photo-item:hover {
    box-shadow: 0 0 20px rgba(198, 168, 124, 0.5), 0 10px 30px -5px rgba(0, 0, 0, 0.6);
    border-color: var(--color-gold);
}

.split-image-container img,
.single-image-container img,
.project-image img,
.split-image img {
    width: 100%;
    height: 400px;
    object-fit: cover;
    border-radius: 2px;
    display: block;
    animation: zoomOutReveal 25s ease-out forwards;
}

.split-image-container .image-placeholder,
.project-image .image-placeholder,
.split-image .image-placeholder {
    width: 100%;
    height: 400px;
    background-color: var(--color-light-navy);
    display: flex;
    align-items: center;
    justify-content: center;
    color: rgba(198, 168, 124, 0.4);
    font-family: var(--font-heading);
    font-size: 1.2rem;
    border-radius: 2px;
}

.split-image-container .image-placeholder i,
.project-image .image-placeholder i,
.split-image .image-placeholder i {
    font-size: 3rem;
    display: block;
    margin-bottom: 15px;
}


.service-item .icon-box {
    font-size: 2.5rem;
    color: var(--color-slate);
    margin-bottom: 20px;
    transition: var(--transition);
}

.service-item:hover .icon-box {
    color: var(--color-gold);
}

.service-item h3 {
    font-size: 1.5rem;
    color: var(--color-white);
    margin-bottom: 15px;
}

.service-item p {
    color: var(--color-slate);
    line-height: 1.6;
}

/* Responsive */
@media (max-width: 768px) {
    .services-grid {
        grid-template-columns: 1fr;
    }
}

.project-info {
    padding: 20px;
}

.project-info .category {
    font-size: 0.8rem;
    color: var(--color-gold);
    text-transform: uppercase;
    font-weight: 600;
}

.project-info h4 {
    margin: 10px 0;
    font-size: 1.2rem;
    color: var(--color-white);
}

.details-link {
    display: inline-block;
    margin-top: 15px;
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--color-navy);
}

.details-link i {
    margin-left: 5px;
    transition: var(--transition);
}

.details-link:hover {
    color: var(--color-gold);
}

.details-link:hover i {
    transform: translateX(5px);
}

/* Clients */
.clients-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 30px;
    align-items: center;
    justify-items: center;
}

.client-logo {
    font-weight: 700;
    color: var(--color-slate);
    font-size: 1.5rem;
    opacity: 0.6;
    transition: var(--transition);
}

.client-logo:hover {
    opacity: 1;
    color: var(--color-navy);
}

/* Credentials */
.credentials-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 30px;
}

.credential-item {
    text-align: center;
    padding: 30px;
    background: var(--glass-navy);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid var(--color-lightest-navy);
    transition: var(--transition);
}

.credential-item:hover {
    border-color: var(--color-gold);
}

.credential-item i {
    font-size: 2.5rem;
    color: var(--color-gold);
    margin-bottom: 20px;
}

.credential-item h4 {
    color: var(--color-white);
}

/* Contact */
.contact-wrapper {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 50px;
}

.info-item {
    display: flex;
    gap: 20px;
    margin-bottom: 30px;
}

.info-item i {
    width: 50px;
    height: 50px;
    background: rgba(255, 255, 255, 0.1);
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    color: var(--color-gold);
    font-size: 1.2rem;
}

.info-item h5 {
    color: var(--color-white);
    margin-bottom: 5px;
}

.info-item p {
    color: var(--color-slate);
}

.social-links-big {
    margin-top: 40px;
}

.social-links-big a {
    display: inline-flex;
    width: 45px;
    height: 45px;
    background: rgba(255, 255, 255, 0.1);
    color: var(--color-white);
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    margin-right: 15px;
    transition: var(--transition);
}

.social-links-big a:hover {
    background: var(--color-gold);
    color: var(--color-navy);
    transform: translateY(-3px);
}

.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-size: 0.9rem;
    color: var(--color-slate);
}

.form-group input,
.form-group textarea {
    width: 100%;
    padding: 12px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: var(--color-white);
    border-radius: 4px;
    font-family: inherit;
}

.form-group input:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--color-gold);
}

.contact-form-container input,
.contact-form-container textarea {
    width: 100%;
    padding: 15px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--color-lightest-navy);
    border-radius: 4px;
    margin-bottom: 20px;
    color: var(--color-white);
    font-family: var(--font-body);
    transition: var(--transition);
}

.contact-form-container input:focus,
.contact-form-container textarea:focus {
    outline: none;
    border-color: var(--color-gold);
    background: rgba(255, 255, 255, 0.1);
}

.contact-form-container label {
    display: block;
    margin-bottom: 5px;
    color: var(--color-slate);
    font-size: 0.9rem;
}

/* =============================================
   VILLA-STYLE PROJECT CARDS (global reuse)
   ============================================= */
.villa-cards-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 22px;
    padding: 48px 0;
    overflow: visible;
}

.villa-card.villa-hero {
    grid-column: 1 / -1;
    max-width: 780px;
    margin: 0 auto;
    width: 100%;
}

.villa-card.villa-hero .villa-card-img { aspect-ratio: 16/9; }

.villa-card {
    position: relative;
    border-radius: 10px;
    overflow: hidden;
    background: #080808;
    border: 1px solid rgba(198,168,124,0.18);
    box-shadow: 0 8px 32px rgba(0,0,0,0.5);
    transition: transform 0.35s ease, box-shadow 0.35s ease, border-color 0.35s ease;
}

.villa-card:hover {
    transform: translateY(-6px);
    box-shadow: 0 20px 56px rgba(0,0,0,0.65), 0 0 28px rgba(198,168,124,0.1);
    border-color: rgba(198,168,124,0.4);
}

.villa-card-img {
    position: relative;
    width: 100%;
    aspect-ratio: 16/10;
    overflow: hidden;
}

.villa-card-img img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform 0.5s ease;
}

.villa-card-body {
    padding: 20px 22px 22px;
}

.villa-card-body h3 {
    font-family: var(--font-heading);
    font-size: 1.1rem;
    color: var(--color-white);
    margin-bottom: 5px;
}

.villa-card-loc {
    font-size: 0.75rem;
    color: var(--color-gold);
    letter-spacing: 1px;
    text-transform: uppercase;
    font-weight: 600;
    margin-bottom: 11px;
}

.villa-card-body p {
    font-size: 0.84rem;
    color: var(--color-slate);
    line-height: 1.7;
}

/* Multi-image cycling (2 or 3 angles) */
.villa-card-img.multi-angle img {
    opacity: 0;
    transition: opacity 0.45s ease !important;
}
.villa-card-img.multi-angle img.angle-active {
    opacity: 1;
}

/* 3-column grid variant */
.villa-cards-grid.col-3 {
    grid-template-columns: repeat(3, 1fr);
}
@media (max-width: 900px) {
    .villa-cards-grid.col-3 {
        grid-template-columns: repeat(2, 1fr);
    }
}

/* View More trigger row */
.view-more-trigger {
    grid-column: 1 / -1;
    display: flex;
    justify-content: center;
    padding: 12px 0 4px;
}

.view-more-btn {
    display: inline-flex;
    align-items: center;
    gap: 9px;
    padding: 11px 28px;
    background: transparent;
    border: 1px solid rgba(198,168,124,0.35);
    color: var(--color-gold);
    font-family: var(--font-body);
    font-size: 0.78rem;
    font-weight: 600;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    border-radius: 6px;
    cursor: pointer;
    transition: background 0.25s ease, border-color 0.25s ease;
}
.view-more-btn:hover {
    background: rgba(198,168,124,0.1);
    border-color: var(--color-gold);
}

/* Hidden cards container */
.view-more-cards {
    grid-column: 1 / -1;
    display: none;
    grid-template-columns: repeat(3, 1fr);
    gap: 22px;
}
.view-more-cards.expanded {
    display: grid;
}
@media (max-width: 900px) {
    .view-more-cards { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 768px) {
    .view-more-cards { grid-template-columns: 1fr; }
}

/* Different Angle toggle (2-image, used on offices) */
.villa-card-img .img-alt {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    opacity: 0;
    transition: opacity 0.45s ease;
    pointer-events: none;
}

.villa-card-img.show-alt img:first-child {
    opacity: 0;
}

.villa-card-img.show-alt .img-alt {
    opacity: 1;
}

.angle-btn {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    margin-top: 13px;
    padding: 6px 13px;
    background: transparent;
    border: 1px solid rgba(198,168,124,0.35);
    color: var(--color-gold);
    font-family: var(--font-body);
    font-size: 0.72rem;
    font-weight: 600;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    border-radius: 4px;
    cursor: pointer;
    transition: background 0.25s ease, border-color 0.25s ease;
}

.angle-btn:hover {
    background: rgba(198,168,124,0.1);
    border-color: var(--color-gold);
}

/* Exactly 2 cards: sit side by side, no full-width hero */
.villa-cards-grid:has(.villa-card:nth-child(2):last-child) .villa-card.villa-hero {
    grid-column: auto;
    max-width: 100%;
}

@media (max-width: 768px) {
    .villa-cards-grid {
        grid-template-columns: 1fr;
    }
    .villa-card.villa-hero {
        max-width: 100%;
    }
}

/* =============================================
   IMAGE-FIRST PROJECT PAGE LAYOUT
   Applies to all project pages except:
   Villas, Residential Communities, Gated,
   Apartments, Resort, Corporate Interior
   ============================================= */
.image-first .projects-glass-wrapper {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 28px;
    background: none;
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
    border: none;
    box-shadow: none;
    padding: 40px 0;
    margin-top: 20px;
}

.image-first .projects-glass-wrapper::before {
    display: none !important;
}

.image-first .split-content {
    flex-direction: column !important;
    gap: 10px !important;
    padding: 0 !important;
    margin-bottom: 0 !important;
    position: relative;
    z-index: 1;
}

.image-first .split-content.reverse {
    flex-direction: column !important;
}

/* Hide long description text, keep title + location */
.image-first .split-text p {
    display: none !important;
}

.image-first .split-text {
    flex: unset !important;
    padding: 10px 4px 0;
}

.image-first .split-text h2 {
    font-size: 1rem !important;
    margin-bottom: 2px !important;
    color: var(--color-light-slate) !important;
    font-weight: 500 !important;
    text-shadow: none !important;
}

.image-first .split-image-container {
    flex: unset !important;
    width: 100%;
}

.image-first .split-image-container img {
    height: 320px !important;
    width: 100% !important;
    object-fit: cover !important;
}

/* First item spans full width when total count is odd (1-2-2 pattern) */
.image-first .split-content:first-child:nth-last-child(odd) {
    grid-column: span 2;
}

.image-first .split-content:first-child:nth-last-child(odd) .split-image-container img {
    height: 520px !important;
}

/* Single item also spans full width */
.image-first .split-content:only-child {
    grid-column: span 2;
}

@media (max-width: 768px) {
    .image-first .projects-glass-wrapper {
        grid-template-columns: 1fr;
    }
    .image-first .split-content:first-child:nth-last-child(odd) {
        grid-column: span 1;
    }
    .image-first .split-content:first-child:nth-last-child(odd) .split-image-container img {
        height: 280px !important;
    }
    .image-first .split-image-container img {
        height: 240px !important;
    }
}

/* Footer */
footer {
    background-color: #020c1b;
    color: var(--color-slate);
    padding: 60px 0 20px;
    position: relative;
    z-index: 1;
}

.footer-grid {
    display: grid;
    grid-template-columns: 1.5fr 1fr 1fr 1fr;
    gap: 40px;
    margin-bottom: 40px;
}

.footer-col h4 {
    color: var(--color-white);
    margin-bottom: 20px;
    font-size: 1.1rem;
}

.footer-col ul li {
    margin-bottom: 10px;
}

.footer-col ul li a:hover {
    color: var(--color-gold);
    padding-left: 5px;
}

.social-icons a {
    color: var(--color-slate);
    margin-right: 15px;
    font-size: 1.2rem;
}

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

.copyright {
    text-align: center;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    padding-top: 20px;
    margin-top: 20px;
    font-size: 0.9rem;
    grid-column: 1 / -1;
}

/* --- Intro Overlay --- */
#intro-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: var(--color-navy);
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: opacity 0.8s ease-out, visibility 0.8s ease-out;
    overflow: hidden;
}

.intro-bg-video {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transform: scale(1.3);
    filter: blur(12px) brightness(0.3);
    z-index: 0;
}

#intro-overlay.hidden {
    opacity: 0;
    visibility: hidden;
}

.intro-build {
    position: relative;
    z-index: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

/* Building blocks that rise from below */
.build-blocks {
    display: flex;
    align-items: flex-end;
    gap: 6px;
    height: 120px;
    margin-bottom: 30px;
    margin-left: auto;
    margin-right: auto;
}

.block {
    width: 14px;
    background: var(--color-gold);
    border-radius: 2px 2px 0 0;
    transform-origin: bottom;
    animation: buildUp 0.6s cubic-bezier(0.22, 1, 0.36, 1) forwards;
    opacity: 0;
    height: 0;
}

.block-1 {
    animation-delay: 0.1s;
    --target-height: 40px;
}

.block-2 {
    animation-delay: 0.25s;
    --target-height: 65px;
}

.block-3 {
    animation-delay: 0.4s;
    --target-height: 100px;
}

.block-4 {
    animation-delay: 0.55s;
    --target-height: 75px;
}

.block-5 {
    animation-delay: 0.7s;
    --target-height: 50px;
}

@keyframes buildUp {
    0% {
        opacity: 0;
        height: 0;
    }

    30% {
        opacity: 1;
    }

    100% {
        opacity: 1;
        height: var(--target-height);
    }
}

/* Horizontal construction line that sweeps */
.build-line {
    width: 0;
    height: 2px;
    background: linear-gradient(90deg, transparent, var(--color-gold), transparent);
    animation: sweepLine 0.6s ease-out 1s forwards;
    margin-bottom: 30px;
    margin-left: auto;
    margin-right: auto;
}

@keyframes sweepLine {
    to {
        width: 200px;
    }
}

/* Logo reveal */
.intro-build .intro-logo {
    display: flex;
    justify-content: center;
    align-items: center;
    opacity: 0;
    transform: translateY(20px) scale(0.9);
    animation: buildReveal 0.8s cubic-bezier(0.22, 1, 0.36, 1) 1.4s forwards;
    width: 100%;
    text-align: center;
    margin-bottom: 24px;
}

.intro-build .intro-logo img {
    display: block;
    margin: 0 auto;
}

@keyframes buildReveal {
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}



/* Tagline */
.intro-tagline {
    font-family: var(--font-heading);
    font-size: 1.1rem;
    color: var(--color-gold);
    letter-spacing: 4px;
    text-transform: uppercase;
    opacity: 0;
    transform: translateY(10px);
    animation: fadeInUp 0.6s ease-out 1.8s forwards;
    margin-top: 15px;
}

/* Loading text below tagline */
.intro-loading-text {
    font-family: var(--font-body);
    font-size: 0.7rem;
    color: rgba(198, 168, 124, 0.55);
    letter-spacing: 3px;
    text-transform: uppercase;
    margin-top: 28px;
    opacity: 0;
    animation: fadeInUp 0.5s ease-out 2.4s forwards;
}

.intro-dots::after {
    content: '';
    animation: loadingDots 1.4s steps(1) 2.9s infinite;
}

@keyframes loadingDots {
    0%   { content: ''; }
    25%  { content: '.'; }
    50%  { content: '..'; }
    75%  { content: '...'; }
    100% { content: ''; }
}

/* Animations */
@keyframes scaleIn {
    to {
        opacity: 1;
        transform: scale(1);
    }
}

@keyframes fadeInUp {
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Animations - Removed old scaleIn/fadeInUp as we are doing custom JS animation */




/* --- Autoscroll Marquee --- */
.marquee-container {
    width: 100%;
    overflow: hidden;
    background-color: var(--color-navy);
    padding: 20px 0;
    border-top: 1px solid var(--color-lightest-navy);
    border-bottom: 1px solid var(--color-lightest-navy);
    position: relative;
    z-index: 1;
    /* GPU layer for smooth mobile animation */
    -webkit-transform: translateZ(0);
    transform: translateZ(0);
    contain: layout style;
}

.marquee-content {
    display: flex;
    gap: 16px;
    width: max-content;
    -webkit-animation: marquee-scroll 40s linear infinite;
    animation: marquee-scroll 40s linear infinite;
    will-change: transform;
    -webkit-backface-visibility: hidden;
    backface-visibility: hidden;
}

.marquee-content img {
    width: 280px;
    height: 200px;
    object-fit: cover;
    flex-shrink: 0;
    border-radius: 4px;
    opacity: 0.85;
    transition: opacity 0.3s ease, border-color 0.3s ease;
    border: 1px solid var(--color-lightest-navy);
    display: block;
}

.marquee-content img:hover {
    opacity: 1;
    border-color: var(--color-gold);
}

@-webkit-keyframes marquee-scroll {
    0%   { -webkit-transform: translate3d(0, 0, 0); transform: translate3d(0, 0, 0); }
    100% { -webkit-transform: translate3d(-50%, 0, 0); transform: translate3d(-50%, 0, 0); }
}
@keyframes marquee-scroll {
    0%   { transform: translate3d(0, 0, 0); }
    100% { transform: translate3d(-50%, 0, 0); }
}

/* RTL Scroll Direction */
html[dir="rtl"] .marquee-content {
    -webkit-animation: marquee-scroll-rtl 30s linear infinite;
    animation: marquee-scroll-rtl 30s linear infinite;
}

@-webkit-keyframes marquee-scroll-rtl {
    0%   { -webkit-transform: translate3d(0, 0, 0); transform: translate3d(0, 0, 0); }
    100% { -webkit-transform: translate3d(50%, 0, 0); transform: translate3d(50%, 0, 0); }
}
@keyframes marquee-scroll-rtl {
    0%   { transform: translate3d(0, 0, 0); }
    100% { transform: translate3d(50%, 0, 0); }
}

/* Redesign Tweaks (Abraj-SA Inspiration) */
.hero-slider::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: url('data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSI0MCIgaGVpZ2h0PSI0MCI+CjxwYXRoIGQ9Ik0wIDBoNDB2NDBIMHoiIGZpbGw9Im5vbmUiIHN0cm9rZT0icmdiYSgyNTUsMjU1LDI1NSwwLjAzKSIgc3Ryb2tlLXdpZHRoPSIxIi8+Cjwvc3ZnPg==');
    /* Subtle Grid Pattern */
    pointer-events: none;
    z-index: 1;
}

/* --- About Section (Split) --- */
.about-split {
    padding: 100px 0;
    position: relative;
    background-color: rgba(26, 26, 26, 0.7);
    /* Semi-transparent to show body pattern */
    backdrop-filter: blur(5px);
}

.about-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 60px;
    align-items: center;
}

.about-image {
    position: relative;
}

.image-frame {
    position: relative;
    border-radius: 4px;
    overflow: hidden;
    box-shadow: 20px 20px 0px rgba(198, 168, 124, 0.1);
    /* Gold shadow offset */
}

.image-frame img {
    width: 100%;
    display: block;
    transition: var(--transition);
}

.experience-badge {
    position: absolute;
    bottom: -30px;
    right: -30px;
    background-color: var(--color-gold);
    color: var(--color-navy);
    padding: 30px;
    border-radius: 50%;
    width: 150px;
    height: 150px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
    z-index: 2;
}

.experience-badge .count {
    font-size: 2.5rem;
    font-weight: 700;
    line-height: 1;
}

.experience-badge .text {
    font-size: 0.9rem;
    font-weight: 500;
    margin-top: 5px;
}

.about-text .sub-heading {
    color: var(--color-gold);
    text-transform: uppercase;
    letter-spacing: 2px;
    font-size: 0.9rem;
    margin-bottom: 15px;
}

.about-text h2 {
    font-size: 2.5rem;
    margin-bottom: 20px;
    color: var(--color-white);
}

.checklist {
    margin: 30px 0;
}

.checklist .item {
    display: flex;
    align-items: center;
    margin-bottom: 15px;
    font-size: 1.1rem;
    color: var(--color-slate);
}

.checklist .item i {
    color: var(--color-gold);
    margin-right: 15px;
    background: rgba(198, 168, 124, 0.1);
    padding: 8px;
    border-radius: 50%;
    font-size: 0.8rem;
}

/* --- Floating WhatsApp --- */
.whatsapp-float {
    position: fixed;
    bottom: 30px;
    right: 30px;
    background-color: #25d366;
    color: white;
    width: 60px;
    height: 60px;
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 30px;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.3);
    z-index: 1000;
    transition: var(--transition);
}

.whatsapp-float:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.4);
}

/* Responsive adjustments */
@media (max-width: 992px) {
    .about-grid {
        grid-template-columns: 1fr;
        text-align: center;
    }

    .checklist .item {
        justify-content: center;
    }

    .experience-badge {
        right: 0;
        bottom: -20px;
    }

    .about-grid,
    .contact-wrapper {
        grid-template-columns: 1fr;
    }

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

@media (max-width: 768px) {
    .hamburger {
        display: block;
        z-index: 1001;
        /* Above mobile menu */
    }

    #nav-menu {
        position: fixed;
        top: 0;
        right: -100%;
        width: 70%;
        height: 100vh;
        background-color: var(--color-light-navy);
        padding-top: 80px;
        transition: var(--transition);
        box-shadow: -5px 0 15px rgba(0, 0, 0, 0.3);
    }

    html[dir="rtl"] #nav-menu {
        right: auto;
        left: -100%;
        box-shadow: 5px 0 15px rgba(0, 0, 0, 0.3);
    }

    #nav-menu.active {
        right: 0;
    }

    html[dir="rtl"] #nav-menu.active {
        left: 0;
        right: auto;
    }

    nav ul {
        flex-direction: column;
        padding: 0 30px;
    }



    .slide-content h1 {
        font-size: 2.5rem;
    }

    .monogram-large {
        font-size: 3.5rem;
    }

    .slider-controls {
        display: none;
        /* Hide on mobile for cleanliness */
    }
}

/* --- Scroll Reveal Animations --- */
.reveal {
    opacity: 0;
    transform: translateY(40px);
    transition: opacity 0.8s ease-out, transform 0.8s ease-out;
}

.reveal.revealed {
    opacity: 1;
    transform: translateY(0);
}

/* Stagger children: service items, project cards, credentials */
.service-item.reveal {
    transition-delay: 0s;
}

.service-item.reveal:nth-child(2) {
    transition-delay: 0.1s;
}

.service-item.reveal:nth-child(3) {
    transition-delay: 0.2s;
}

.service-item.reveal:nth-child(4) {
    transition-delay: 0.3s;
}

.service-item.reveal:nth-child(5) {
    transition-delay: 0.4s;
}

.service-item.reveal:nth-child(6) {
    transition-delay: 0.5s;
}

.project-card.reveal {
    transition-delay: 0s;
}

.project-card.reveal:nth-child(2) {
    transition-delay: 0.15s;
}

.project-card.reveal:nth-child(3) {
    transition-delay: 0.3s;
}

.credential-item.reveal {
    transition-delay: 0s;
}

.credential-item.reveal:nth-child(2) {
    transition-delay: 0.1s;
}

.credential-item.reveal:nth-child(3) {
    transition-delay: 0.2s;
}

.credential-item.reveal:nth-child(4) {
    transition-delay: 0.3s;
}

.stat-item.reveal {
    transition-delay: 0s;
}

.stat-item.reveal:nth-child(2) {
    transition-delay: 0.15s;
}

.stat-item.reveal:nth-child(3) {
    transition-delay: 0.3s;
}

.checklist .item.reveal {
    transition-delay: 0s;
}

.checklist .item.reveal:nth-child(2) {
    transition-delay: 0.1s;
}

.checklist .item.reveal:nth-child(3) {
    transition-delay: 0.2s;
}

/* About section: image slides from left, text from right */
.about-image.reveal {
    transform: translateX(-40px);
}

.about-image.reveal.revealed {
    transform: translateX(0);
}

.about-text.reveal {
    transform: translateX(40px);
}

.about-text.reveal.revealed {
    transform: translateX(0);
}

/* Contact: info from left, form from right */
.contact-info.reveal {
    transform: translateX(-40px);
}

.contact-info.reveal.revealed {
    transform: translateX(0);
}

.contact-form-container.reveal {
    transform: translateX(40px);
}

.contact-form-container.reveal.revealed {
    transform: translateX(0);
}

/* Hero section should not be hidden */
.hero {
    opacity: 1 !important;
    transform: none !important;
}

/* --- Portfolio Split Viewer (3D + Image) --- */
.portfolio-split {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
    align-items: stretch;
}

.portfolio-split-left,
.portfolio-split-right {
    display: flex;
    flex-direction: column;
}

.split-label {
    display: flex;
    align-items: center;
    gap: 8px;
    color: var(--color-gold);
    font-size: 0.8rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    margin-bottom: 12px;
}

.split-label i {
    font-size: 0.75rem;
}

#threejs-container {
    width: 100%;
    height: 500px;
    background: var(--glass-navy);
    border-radius: 6px;
    overflow: hidden;
    position: relative;
    border: 1px solid var(--color-lightest-navy);
    flex: 1;
}

#loading-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(0, 0, 0, 0.7);
    z-index: 10;
}

#loading-overlay span {
    color: var(--color-gold);
    font-family: var(--font-heading);
}

#image-view {
    width: 100%;
    height: 500px;
    border-radius: 6px;
    overflow: hidden;
    border: 1px solid var(--color-lightest-navy);
    position: relative;
    flex: 1;
    padding: 0;
}

#image-view img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
    display: block;
    transition: transform 0.6s ease;
}

#image-view:hover img {
    transform: scale(1.03);
}

.split-controls {
    margin-top: 10px;
    color: var(--color-slate);
    text-align: center;
    font-size: 0.8rem;
}

.split-info {
    margin-top: 16px;
}

.split-info h3 {
    font-size: 1.3rem;
    color: var(--color-white);
    margin-bottom: 6px;
}

.split-info p {
    color: var(--color-slate);
    font-size: 0.9rem;
    line-height: 1.6;
}

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

    #threejs-container,
    #image-view {
        height: 400px;
    }
}

@media (max-width: 576px) {

    #threejs-container,
    #image-view {
        height: 300px;
    }
}

/* --- Show More Projects --- */
.hidden-project {
    display: none;
}

#show-more-projects {
    padding: 12px 30px;
    font-size: 1rem;
    border-radius: 4px;
    transition: all 0.3s ease;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

#show-more-projects:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(100, 255, 218, 0.1);
}

#show-more-projects i {
    transition: transform 0.3s ease;
}

#show-more-projects.expanded i {
    transform: rotate(180deg);
}

/* Projects Showcase - New 3 Column Layout */
.projects-showcase {
    display: flex;
    width: 100%;
    height: 600px;
    background: #050510;
    /* Dark Navy Base */
    position: relative;
    z-index: 10;
    /* Ensure it sits above subsequent content */
    box-shadow: 0 10px 40px rgba(198, 168, 124, 0.4), 0 5px 15px rgba(198, 168, 124, 0.2);
    border-bottom: 2px solid rgba(198, 168, 124, 0.3);
}

.project-column {
    flex: 1;
    position: relative;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    border-right: 1px solid rgba(198, 168, 124, 0.15);
    transition: all 0.5s ease;
}

.project-column:last-child {
    border-right: none;
}

.project-column .bg-image {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-size: cover;
    background-position: center;
    /* Pan-Out effect: Start zoomed in */
    transform: scale(1.15);
    /* Initial state: Blurred */
    filter: blur(5px) brightness(0.65);
    transition: transform 1.2s cubic-bezier(0.2, 0.8, 0.2, 1), filter 0.8s ease;
    z-index: 1;
}

.project-column .content {
    position: relative;
    z-index: 2;
    text-align: center;
    padding: 20px;
    transition: transform 0.4s ease;
    /* Add subtle glass effect behind text for readability if needed */
}

.project-column h3 {
    font-family: var(--font-heading);
    font-size: clamp(0.75rem, 1.4vw, 1.8rem);
    color: var(--color-white);
    text-shadow: 0 4px 15px rgba(0, 0, 0, 0.9);
    margin: 0;
    letter-spacing: 1px;
    font-weight: 500;
    text-transform: uppercase;
    line-height: 1.3;
}

/* Hover Effects */
.project-column:hover .bg-image {
    /* Pan Out: Zoom to normal */
    transform: scale(1.0);
    /* Clear blur */
    filter: blur(0px) brightness(0.9);
}

.project-column:hover .content {
    transform: scale(1.08);
    /* Slight pop for text */
}

/* Mobile Responsiveness */
@media (max-width: 900px) {
    .projects-showcase {
        flex-direction: column;
        height: auto;
    }

    .project-column {
        height: 280px;
        /* Taller on mobile for better touch targets */
        border-right: none;
        border-bottom: 4px solid var(--color-gold);
        /* Separator */
    }

    .project-column h3 {
        font-size: clamp(0.8rem, 4vw, 1.6rem);
    }
}

/* All Projects Page Grid */
.all-projects-grid {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    width: 100%;
    background: #050510;
}

/* Responsive adjustments for smaller screens */
@media (max-width: 1400px) {
    .all-projects-grid {
        grid-template-columns: repeat(4, 1fr);
    }
}

@media (max-width: 900px) {
    .all-projects-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

@media (max-width: 600px) {
    .all-projects-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

/* Clients Page Grid Override (3 Columns) */
.clients-grid-override {
    grid-template-columns: repeat(3, 1fr) !important;
}

@media (max-width: 900px) {
    .clients-grid-override {
        grid-template-columns: 1fr !important;
    }
}

/* Client Column Specific Styles */
.client-column .bg-image {
    background-size: 70%;
    /* Keep logos contained and not too huge */
    background-repeat: no-repeat;
    background-color: #000;
    /* Black background */
    filter: none !important;
    /* No blur or darken */
    transform: scale(1) !important;
    /* No zoom on hover (unless desired) */
    opacity: 1;
}

.client-column .content {
    background: rgba(0, 0, 0, 0.45);
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    opacity: 1;
    transition: background 0.3s ease;
}

.client-column .content img {
    opacity: 1;
    transition: transform 0.3s ease;
}

.client-column .content h3,
.client-column .content p {
    opacity: 0;
    transform: translateY(10px);
    transition: opacity 0.3s ease, transform 0.3s ease;
}

.client-column:hover .content {
    background: rgba(0, 0, 0, 0.7);
}

.client-column:hover .content h3,
.client-column:hover .content p {
    opacity: 1;
    transform: translateY(0);
}

.client-column:hover .content img {
    transform: scale(1.08);
}

.client-column h3 {
    font-size: 1.5rem;
    margin-bottom: 10px;
    color: var(--color-gold);
}

.client-column p {
    font-size: 0.9rem;
    color: #fff;
    max-width: 80%;
    line-height: 1.5;
}

.all-projects-grid .project-column {
    height: 400px;
    border-right: 1px solid rgba(198, 168, 124, 0.15);
    border-bottom: 1px solid rgba(198, 168, 124, 0.15);
}

.all-projects-grid .project-column:hover {
    z-index: 5;
    box-shadow: 0 0 30px rgba(0, 0, 0, 0.5);
}

/* ── Project Pages: Small Screen Typography ── */
@media (max-width: 480px) {

    .project-hero h1,
    .residential-hero h1 {
        font-size: clamp(1.4rem, 8vw, 2rem);
        line-height: 1.25;
    }

    .project-hero p,
    .residential-hero p {
        font-size: clamp(0.85rem, 3.5vw, 1rem);
    }

    .split-text h2 {
        font-size: clamp(1.1rem, 5vw, 1.5rem);
    }

    .split-text p {
        font-size: 0.9rem;
    }

    .example-title {
        font-size: clamp(1rem, 4.5vw, 1.3rem);
    }

    .projects-glass-wrapper {
        padding: 30px 16px;
    }

    .split-content {
        gap: 24px;
        padding: 40px 0;
    }
}

/* ============================================================
   COMPREHENSIVE MOBILE OVERHAUL — max-width: 768px
   Same design, scaled down for phone screens
   ============================================================ */
@media (max-width: 768px) {

    /* ── Global spacing ── */
    .section {
        padding: 50px 0;
    }

    .container {
        padding: 0 16px;
    }

    /* ── Section headers ── */
    .section-header h2,
    .section-title h2 {
        font-size: 1.6rem;
        line-height: 1.3;
    }

    .section-header p,
    .section-title p {
        font-size: 0.9rem;
    }

    /* ── Hero / Slider ── */
    .slide-content {
        padding: 0 20px;
        text-align: center;
    }

    .slide-content h1 {
        font-size: 1.8rem;
        line-height: 1.2;
        margin-bottom: 10px;
    }

    .slide-content h2 {
        font-size: 1.1rem;
        margin-bottom: 10px;
    }

    .slide-content p {
        font-size: 0.88rem;
        margin-bottom: 20px;
    }

    .monogram-large {
        font-size: 2.8rem;
    }

    .slide-cta {
        flex-direction: column;
        align-items: center;
        gap: 10px;
    }

    .btn {
        width: 100%;
        max-width: 260px;
        text-align: center;
        padding: 12px 20px;
        font-size: 0.85rem;
    }

    /* ── About section — keep 2-column desktop layout, just smaller ── */
    .about-grid {
        grid-template-columns: 1fr 1fr;
        gap: 16px;
        text-align: left;
    }

    .about-text h2 {
        font-size: 1.05rem;
    }

    .about-text h4 {
        font-size: 0.7rem;
    }

    .about-text p.lead {
        font-size: 0.72rem;
        line-height: 1.6;
    }

    .about-text p {
        font-size: 0.72rem;
        line-height: 1.6;
    }

    .checklist .item {
        font-size: 0.7rem;
        gap: 6px;
    }

    .about-text .btn {
        font-size: 0.72rem;
        padding: 9px 12px;
        margin-top: 8px;
    }

    .image-frame {
        max-height: 220px;
        overflow: hidden;
    }

    .image-frame img {
        width: 100%;
        height: 220px;
        object-fit: cover;
    }

    .experience-badge {
        width: 70px;
        height: 70px;
        padding: 6px;
        font-size: 0.48rem;
        right: 6px;
        bottom: 6px;
    }

    .experience-badge .count,
    .experience-badge .badge-number {
        font-size: 1.1rem;
    }

    .stats-grid {
        gap: 16px;
    }

    .stat-item {
        padding: 16px 12px;
    }

    .stats-number {
        font-size: 2.2rem;
    }

    .stats-label {
        font-size: 0.75rem;
    }

    .checklist {
        text-align: left;
    }

    /* ── Portfolio / 3D viewer — keep 2-column ── */
    .portfolio-split {
        grid-template-columns: 1fr 1fr;
        gap: 10px;
    }

    #threejs-container,
    #image-view {
        height: 200px;
    }

    .split-info h3 {
        font-size: 0.85rem;
    }

    .split-info p {
        font-size: 0.72rem;
    }

    .split-label {
        font-size: 0.65rem;
    }

    /* ── Projects showcase — keep horizontal ── */
    .projects-showcase {
        flex-direction: row;
        height: 280px;
    }

    .project-column h3 {
        font-size: 0.72rem;
    }

    /* ── Services / Expertise ── */
    .service-item {
        padding: 24px 18px;
    }

    .service-item h3 {
        font-size: 1.1rem;
    }

    .service-item p {
        font-size: 0.85rem;
    }

    .service-icon {
        width: 48px;
        height: 48px;
        font-size: 1.2rem;
    }

    /* ── Project columns (showcase) ── */
    .project-column {
        height: 220px;
    }

    .project-column h3 {
        font-size: 0.95rem;
        padding: 0 12px;
    }

    .project-column p {
        font-size: 0.78rem;
        padding: 0 12px;
    }

    /* ── Credentials ── */
    .credential-item {
        padding: 20px 16px;
    }

    .credential-icon {
        width: 52px;
        height: 52px;
        font-size: 1.3rem;
    }

    .credential-item h3 {
        font-size: 1rem;
    }

    .credential-item p {
        font-size: 0.82rem;
    }

    /* ── Clients marquee ── */
    .marquee-item img {
        height: 50px;
    }

    /* ── Contact section — keep 2-column ── */
    .contact-wrapper {
        grid-template-columns: 1fr 1fr;
        gap: 16px;
    }

    .contact-info h2 {
        font-size: 1rem;
    }

    .contact-info p {
        font-size: 0.72rem;
    }

    .info-item {
        gap: 8px;
    }

    .info-item i {
        font-size: 0.9rem;
    }

    .info-item h5 {
        font-size: 0.7rem;
    }

    .info-item p,
    .info-item a {
        font-size: 0.7rem;
    }

    .contact-form-container {
        padding: 16px 12px;
    }

    .form-group label {
        font-size: 0.7rem;
    }

    .form-group input,
    .form-group textarea {
        font-size: 0.75rem;
        padding: 8px 10px;
    }

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

    /* ── Footer — keep 2-column ── */
    .footer-grid {
        grid-template-columns: 1fr 1fr;
        gap: 20px;
        text-align: left;
    }

    .footer-grid p,
    .footer-grid a,
    .copyright {
        font-size: 0.72rem;
    }

    .footer-grid h4 {
        font-size: 0.82rem;
    }

    .footer-bottom {
        flex-direction: row;
        gap: 8px;
        font-size: 0.7rem;
    }

    /* ── WhatsApp float ── */
    .whatsapp-float {
        width: 46px;
        height: 46px;
        font-size: 22px;
        bottom: 16px;
        right: 16px;
    }

    /* ── Intro overlay ── */
    .intro-tagline {
        font-size: 0.75rem;
        letter-spacing: 2px;
    }

    .intro-logo img {
        width: 80px;
    }
}

/* ── Extra small phones (≤ 390px) ── */
@media (max-width: 390px) {

    .slide-content h1 {
        font-size: 1.3rem;
    }

    .slide-content h2 {
        font-size: 0.85rem;
    }

    .monogram-large {
        font-size: 1.8rem;
    }

    .section-header h2,
    .section-title h2 {
        font-size: 1.1rem;
    }

    .about-text h2 {
        font-size: 0.88rem;
    }

    .about-text p.lead,
    .about-text p {
        font-size: 0.65rem;
    }

    .image-frame,
    .image-frame video,
    .image-frame img {
        max-height: 170px;
        height: 170px;
    }

    .experience-badge {
        width: 58px;
        height: 58px;
        padding: 4px;
        right: 4px;
        bottom: 4px;
    }

    .experience-badge .count,
    .experience-badge .badge-number {
        font-size: 0.95rem;
    }

    #threejs-container,
    #image-view {
        height: 160px;
    }

    .projects-showcase {
        height: 220px;
    }

    .project-column h3 {
        font-size: 0.62rem;
    }

    .stats-number {
        font-size: 1.6rem;
    }
}
/* ── Project image click cursor ── */
.split-image-container img,
.project-image img,
.single-image-container img,
img.split-image {
    cursor: zoom-in;
}

/* ── Lightbox ── */
#lb-overlay {
    position: fixed;
    inset: 0;
    z-index: 10000;
    display: flex;
    align-items: center;
    justify-content: center;
    visibility: hidden;
    pointer-events: none;
}
#lb-overlay.lb-open {
    visibility: visible;
    pointer-events: auto;
}
#lb-overlay.lb-closing {
    visibility: visible;
    pointer-events: none;
}
#lb-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(8, 12, 28, 0.95);
    opacity: 0;
    transition: opacity 0.4s ease;
    cursor: zoom-out;
}
#lb-overlay.lb-open #lb-backdrop {
    opacity: 1;
}
#lb-img {
    position: relative;
    z-index: 1;
    max-width: 88vw;
    max-height: 88vh;
    width: auto;
    height: auto;
    object-fit: contain;
    display: block;
    box-shadow: 0 40px 120px rgba(0, 0, 0, 0.8);
    cursor: zoom-out;
    will-change: transform;
}
#lb-close {
    position: absolute;
    top: 20px;
    right: 28px;
    z-index: 2;
    background: none;
    border: none;
    color: rgba(255, 255, 255, 0.7);
    font-size: 2.2rem;
    line-height: 1;
    cursor: pointer;
    transition: color 0.2s, transform 0.25s;
    padding: 4px 10px;
}
#lb-close:hover {
    color: #fff;
    transform: rotate(90deg);
}

#lb-angle-btn {
    position: absolute;
    top: 20px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 2;
    display: none;
    align-items: center;
    gap: 8px;
    padding: 8px 20px;
    background: rgba(0,0,0,0.55);
    border: 1px solid rgba(198,168,124,0.5);
    color: var(--color-gold);
    font-family: var(--font-body);
    font-size: 0.78rem;
    font-weight: 600;
    letter-spacing: 0.07em;
    text-transform: uppercase;
    border-radius: 30px;
    cursor: pointer;
    backdrop-filter: blur(8px);
    transition: background 0.25s ease, border-color 0.25s ease, opacity 0.3s ease;
    opacity: 0;
}

#lb-overlay.lb-open #lb-angle-btn {
    display: inline-flex;
    opacity: 1;
    transition-delay: 0.35s;
}

#lb-angle-btn:hover {
    background: rgba(198,168,124,0.15);
    border-color: var(--color-gold);
}
