/* ========================================================
   4U LUXURY INTERIOR DESIGN - PREMIUM DESIGN SYSTEM
   A cohesive, elegant design language across all pages.
   ======================================================== */

/* ---------- Design Tokens ---------- */
:root {
    --primary: #c9a96e;
    --primary-hover: #b8944f;
    --primary-glow: rgba(201, 169, 110, 0.35);
    --primary-soft: rgba(201, 169, 110, 0.08);
    
    --secondary: #141618;
    --secondary-light: #1e2124;
    
    --bg-light: #f8f7f4;
    --surface-light: #ffffff;
    
    --text-dark: #1a1a1a;
    --text-muted: #7a7a7a;
    --border-color: #e8e6e1;

    --font-heading: 'Poppins', sans-serif;
    --font-body: 'Roboto', sans-serif;
    
    --transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
    
    --shadow-soft: 0 2px 16px rgba(0, 0, 0, 0.04);
    --shadow-hover: 0 12px 40px rgba(0, 0, 0, 0.1);
    --radius-md: 16px;
    --radius-lg: 22px;
}

html[dir="rtl"] {
    --font-heading: 'Cairo', sans-serif;
    --font-body: 'Tajawal', sans-serif;
}

/* ---------- Dark Mode ---------- */
body[data-theme='dark'] {
    --bg-light: #0e1011;
    --surface-light: #181a1c;
    --text-dark: #f0ede8;
    --text-muted: #8a8a8a;
    --border-color: #2a2d30;
    --secondary: #0a0b0c;
    --secondary-light: #151719;
    --shadow-soft: 0 2px 16px rgba(0, 0, 0, 0.25);
    --shadow-hover: 0 12px 40px rgba(0, 0, 0, 0.4);
}

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

body {
    font-family: var(--font-body);
    background-color: var(--bg-light);
    color: var(--text-dark);
    line-height: 1.7;
    overflow-x: hidden;
    transition: background-color 0.5s ease, color 0.5s ease;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    scroll-behavior: smooth;
}

/* Global Reveal Transitions */
.reveal, .reveal-up, .reveal-left, .reveal-right {
    opacity: 0;
    transition: all 0.8s cubic-bezier(0.16, 1, 0.3, 1);
    transition-property: transform, opacity;
    will-change: transform, opacity;
}

.reveal-up { transform: translateY(35px); }
.reveal-left { transform: translateX(-45px); }
.reveal-right { transform: translateX(45px); }

.active.reveal, .active.reveal-up, .active.reveal-left, .active.reveal-right {
    opacity: 1;
    transform: translate(0, 0);
}

.stagger-1 { transition-delay: 0.1s; }
.stagger-2 { transition-delay: 0.2s; }
.stagger-3 { transition-delay: 0.3s; }
.stagger-4 { transition-delay: 0.4s; }
.stagger-5 { transition-delay: 0.5s; }


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

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

img { max-width: 100%; }


/* ========================================================
   HEADER & NAVIGATION
   ======================================================== */
header {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 1000;
    background: transparent;
    transition: all 0.5s ease;
    border-bottom: 1px solid transparent;
}

header.scrolled {
    background: rgba(248, 247, 244, 0.92);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-bottom: 1px solid var(--border-color);
    box-shadow: 0 1px 20px rgba(0,0,0,0.04);
}

body[data-theme='dark'] header.scrolled {
    background: rgba(14, 16, 17, 0.92);
    border-bottom: 1px solid var(--border-color);
}

.nav-container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0.6rem 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    transition: var(--transition);
    position: relative; /* Base for absolute links */
}

header.scrolled .nav-container {
    padding: 0.5rem 2rem;
}
   
.logo img {
    height: 64px;
    object-fit: contain;
    transition: var(--transition);
}

header.scrolled .logo img {
    height: 44px;
}

.nav-links {
    display: flex;
    gap: 2rem;
    list-style: none;
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
    white-space: nowrap; /* Prevent wrapping when center takes space */
}

.nav-links a {
    font-size: 0.88rem;
    font-weight: 600;
    font-family: var(--font-body);
    position: relative;
    padding-bottom: 4px;
    letter-spacing: 1.5px;
    text-transform: uppercase;
    color: var(--text-dark);
}

.nav-links a::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0%;
    height: 2px;
    background: var(--primary);
    transition: var(--transition);
    border-radius: 1px;
}

.nav-links a:hover { color: var(--primary); }
.nav-links a:hover::after { width: 100%; }

.nav-actions {
    display: flex;
    gap: 1.2rem;
    align-items: center;
}

/* Hero-dark header overrides */
header.hero-dark:not(.scrolled) .nav-links a,
header.hero-dark:not(.scrolled) .settings-trigger {
    color: #ffffff !important;
    text-shadow: 0 1px 4px rgba(0,0,0,0.4);
}

header.hero-dark:not(.scrolled) .theme-toggle {
    color: #ffffff;
    border-color: rgba(255,255,255,0.3);
}


/* ========================================================
   SETTINGS DROPDOWN
   ======================================================== */
.settings-dropdown {
    position: relative;
    display: inline-block;
}

.settings-trigger {
    background: transparent;
    border: none;
    color: var(--text-dark);
    font-size: 1rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 0.4rem;
    font-family: var(--font-body);
    font-weight: 600;
    transition: var(--transition);
    padding: 0.4rem 0.6rem;
    border-radius: 8px;
}

.settings-trigger:hover {
    color: var(--primary);
    background: var(--primary-soft);
}

.settings-menu {
    position: absolute;
    top: 150%;
    right: 0;
    background: var(--surface-light);
    border: 1px solid var(--border-color);
    box-shadow: var(--shadow-hover);
    border-radius: var(--radius-md);
    min-width: 170px;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-8px);
    transition: var(--transition);
    z-index: 1001;
    overflow: hidden;
}

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

.settings-dropdown:hover .settings-menu {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.settings-menu-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.85rem 1.2rem;
    color: var(--text-dark);
    text-decoration: none;
    font-family: var(--font-body);
    font-weight: 500;
    border-bottom: 1px solid var(--border-color);
    transition: var(--transition);
    cursor: pointer;
    background: transparent;
    width: 100%;
    border-left: none;
    border-right: none;
    border-top: none;
    text-align: left;
    font-size: 0.92rem;
}
.settings-menu-item:last-child { border-bottom: none; }
.settings-menu-item:hover { background: var(--primary-soft); color: var(--primary); }

/* Theme Toggle Switch */
.theme-switch {
    position: relative;
    display: inline-block;
    width: 40px;
    height: 22px;
    flex-shrink: 0;
}
.theme-switch input { opacity: 0; width: 0; height: 0; }
.theme-slider {
    position: absolute;
    cursor: pointer;
    top: 0; left: 0; right: 0; bottom: 0;
    background: var(--border-color);
    border-radius: 22px;
    transition: all 0.3s ease;
}
.theme-slider::before {
    content: '';
    position: absolute;
    height: 16px;
    width: 16px;
    left: 3px;
    bottom: 3px;
    background: #fff;
    border-radius: 50%;
    transition: all 0.3s ease;
    box-shadow: 0 1px 3px rgba(0,0,0,0.2);
}
.theme-switch input:checked + .theme-slider {
    background: var(--primary);
}
.theme-switch input:checked + .theme-slider::before {
    transform: translateX(18px);
}

/* ========================================================
   BUTTONS
   ======================================================== */
.btn-primary {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-hover) 100%);
    color: #ffffff !important;
    padding: 0.8rem 2.2rem;
    font-size: 0.9rem;
    font-weight: 600;
    font-family: var(--font-heading);
    border-radius: 50px;
    border: none;
    cursor: pointer;
    box-shadow: 0 4px 20px var(--primary-glow);
    transition: var(--transition);
    text-transform: uppercase;
    letter-spacing: 1.5px;
}

.btn-primary:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 30px var(--primary-glow);
    filter: brightness(1.08);
}

.btn-secondary {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: transparent;
    color: var(--text-dark) !important;
    padding: 0.8rem 2.2rem;
    font-size: 0.9rem;
    font-weight: 600;
    font-family: var(--font-heading);
    border-radius: 50px;
    border: 2px solid var(--border-color);
    cursor: pointer;
    transition: var(--transition);
    text-transform: uppercase;
    letter-spacing: 1.5px;
}

body[data-theme='dark'] .btn-secondary {
    color: #fff !important;
    border-color: rgba(255,255,255,0.15);
}

.btn-secondary:hover {
    border-color: var(--primary);
    color: var(--primary) !important;
    background: var(--primary-soft);
}


/* ========================================================
   SECTIONS & LAYOUT
   ======================================================== */
.section {
    padding: 7rem 2rem;
    max-width: 1400px;
    margin: 0 auto;
}

.section-title {
    font-size: 2.8rem;
    text-align: center;
    margin-bottom: 4rem;
    position: relative;
    letter-spacing: -0.5px;
    color: var(--text-dark);
}

.section-title::after {
    content: '';
    position: absolute;
    bottom: -12px;
    left: 50%;
    transform: translateX(-50%);
    width: 50px;
    height: 3px;
    background: var(--primary);
    border-radius: 3px;
}


/* ========================================================
   CARDS (Services & Projects)
   ======================================================== */
.luxury-card {
    background: var(--surface-light);
    border-radius: var(--radius-md);
    padding: 2.5rem 2rem;
    text-align: center;
    box-shadow: var(--shadow-soft);
    border: 1px solid var(--border-color);
    transition: var(--transition);
    position: relative;
    overflow: hidden;
    z-index: 1;
}

.luxury-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 0%;
    background: linear-gradient(180deg, var(--primary-soft) 0%, transparent 100%);
    transition: var(--transition);
    z-index: -1;
}

.luxury-card:hover {
    transform: translateY(-8px);
    box-shadow: var(--shadow-hover);
    border-color: rgba(201, 169, 110, 0.25);
}

.luxury-card:hover::before { height: 100%; }

.luxury-card-icon {
    font-size: 3rem;
    color: var(--primary);
    margin-bottom: 1.5rem;
    display: inline-block;
}

.luxury-card h3 {
    font-size: 1.35rem;
    margin-bottom: 0.8rem;
    color: var(--text-dark);
}

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


/* ========================================================
   FORMS & INPUTS
   ======================================================== */
.form-group {
    margin-bottom: 1.5rem;
}

.form-group label {
    display: block;
    font-weight: 600;
    margin-bottom: 0.5rem;
    color: var(--text-dark);
    font-size: 0.92rem;
    font-family: var(--font-heading);
}

.form-control {
    width: 100%;
    padding: 0.9rem 1.2rem;
    font-size: 1rem;
    font-family: var(--font-body);
    color: var(--text-dark);
    background-color: var(--surface-light);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    outline: none;
    transition: var(--transition);
}

.form-control:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 3px var(--primary-glow);
    background-color: var(--bg-light);
}


/* ========================================================
   FOOTER
   ======================================================== */
.site-footer {
    background: var(--secondary);
    color: #fff;
    padding: 5rem 2rem 2rem;
    margin-top: auto;
}

.site-footer-grid {
    max-width: 1400px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: 2fr 1fr 1fr;
    gap: 4rem;
    margin-bottom: 3rem;
}

.footer-brand img {
    height: 70px;
    filter: brightness(0) invert(1);
    margin-bottom: 1.5rem;
}

.footer-brand p {
    color: rgba(255,255,255,0.5);
    line-height: 1.8;
    max-width: 380px;
    font-size: 0.92rem;
}

.footer-title {
    color: #fff;
    font-size: 1.1rem;
    margin-bottom: 1.5rem;
    font-family: var(--font-heading);
    position: relative;
    padding-bottom: 0.8rem;
    letter-spacing: 0.5px;
}
.footer-title::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 28px;
    height: 2px;
    background: var(--primary);
    border-radius: 2px;
}
html[dir="rtl"] .footer-title::after {
    left: auto;
    right: 0;
}

.footer-links {
    list-style: none;
}

.footer-links li {
    margin-bottom: 0.75rem;
}

.footer-links a {
    color: rgba(255,255,255,0.5);
    transition: var(--transition);
    font-size: 0.92rem;
}

.footer-links a:hover {
    color: var(--primary);
    padding-inline-start: 5px;
}

.footer-bottom {
    max-width: 1400px;
    margin: 0 auto;
    padding-top: 2rem;
    border-top: 1px solid rgba(255,255,255,0.07);
    text-align: center;
    color: rgba(255,255,255,0.3);
    font-size: 0.85rem;
}


/* ========================================================
   RESPONSIVE - see responsive.css for comprehensive rules
   ======================================================== */

/* WhatsApp responsive handled in responsive.css */

/* ========================================================
   WHATSAPP FLOAT
   ======================================================== */
.whatsapp-float {
    position: fixed;
    bottom: 30px;
    right: 30px;
    background-color: #25d366;
    color: #fff;
    border-radius: 50px;
    padding: 10px 25px;
    display: flex;
    align-items: center;
    gap: 10px;
    text-decoration: none;
    font-family: var(--font-heading);
    font-weight: 600;
    box-shadow: 0 4px 15px rgba(37, 211, 102, 0.3);
    z-index: 1000;
    transition: var(--transition);
}

.whatsapp-float svg {
    width: 24px;
    height: 24px;
    fill: #fff;
}

.whatsapp-float:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 25px rgba(37, 211, 102, 0.4);
    background-color: #20b355;
    color: #fff !important;
}

html[dir="rtl"] .whatsapp-float {
    right: auto;
    left: 30px;
}

/* WhatsApp responsive rules in responsive.css */