/* ============================================
   KARACO - Industrial Automation Systems
   Premium CSS Styles
   ============================================ */

/* CSS Variables - Industrial Color Palette */
:root {
    /* Primary Colors */
    --color-primary: #003366;
    --color-primary-light: #004d99;
    --color-primary-dark: #002244;
    --color-accent: #FF6600;
    --color-accent-light: #FF8533;
    --color-accent-dark: #CC5200;
    
    /* Legacy aliases for compatibility */
    --color-gold: #FF6600;
    --color-gold-light: #FF8533;
    --color-gold-dark: #CC5200;
    
    /* Neutral Colors */
    --color-black: #0a0a0a;
    --color-black-light: #1a1a1a;
    --color-gray-dark: #2a2a2a;
    --color-gray: #4a4a4a;
    --color-gray-light: #8a8a8a;
    --color-white: #ffffff;
    --color-cream: #f5f5f5;
    
    /* Gradients */
    --gradient-gold: linear-gradient(135deg, #FF6600 0%, #FF8533 50%, #FF6600 100%);
    --gradient-primary: linear-gradient(135deg, #003366 0%, #004d99 50%, #003366 100%);
    --gradient-dark: linear-gradient(180deg, #0a0a0a 0%, #1a1a1a 100%);
    --gradient-overlay: linear-gradient(180deg, rgba(0,51,102,0.8) 0%, rgba(10,10,10,0.4) 50%, rgba(10,10,10,0.9) 100%);
    
    /* Typography */
    --font-heading: 'Montserrat', sans-serif;
    --font-body: 'Montserrat', sans-serif;
    --font-persian: 'Vazirmatn', sans-serif;
    --font-display: 'Rajdhani', 'Montserrat', sans-serif;
    
    /* Spacing */
    --space-xs: 0.5rem;
    --space-sm: 1rem;
    --space-md: 2rem;
    --space-lg: 4rem;
    --space-xl: 8rem;
    
    /* Transitions */
    --transition-fast: 0.2s ease;
    --transition-normal: 0.4s ease;
    --transition-slow: 0.6s ease;
    --transition-luxury: 0.8s cubic-bezier(0.16, 1, 0.3, 1);
    
    /* Shadows */
    --shadow-soft: 0 4px 20px rgba(0, 0, 0, 0.3);
    --shadow-gold: 0 4px 30px rgba(255, 102, 0, 0.3);
    --shadow-primary: 0 4px 30px rgba(0, 51, 102, 0.3);
    --shadow-heavy: 0 10px 60px rgba(0, 0, 0, 0.5);
}

/* Persian/RTL Specific Variables */
[dir="rtl"] {
    --font-body: 'Vazirmatn', sans-serif;
    --font-heading: 'Vazirmatn', serif;
}

/* ============================================
   Half Circle Side Navigation
   ============================================ */
.side-nav {
    position: fixed;
    right: -180px;
    top: 50%;
    transform: translateY(-50%);
    z-index: 100;
    display: none;
    transition: right 0.3s ease;
}

[dir="rtl"] .side-nav {
    right: auto;
    left: -180px;
    transition: left 0.3s ease;
}

.home-page .side-nav {
    display: block;
}

.side-nav-inner {
    position: relative;
    width: 240px;
    height: 360px;
}

/* Half circle background - 96px radius (20% bigger, 20px closer to edge) */
/* Circle passes through bullets on 96px radius arc */
.side-nav-inner::before {
    content: '';
    position: absolute;
    left: 0;
    top: 50%;
    transform: translateY(-50%);
    width: 192px;
    height: 192px;
    border-radius: 50%;
    background: rgba(0, 51, 102, 0.95);
    border: 1px solid rgba(255, 102, 0, 0.4);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    box-shadow: -5px 0 30px rgba(0, 0, 0, 0.5);
}

[dir="rtl"] .side-nav-inner::before {
    left: auto;
    right: 0;
    box-shadow: 5px 0 30px rgba(0, 0, 0, 0.5);
}

.side-nav-item {
    position: absolute;
    z-index: 1;
    display: flex;
    align-items: center;
    gap: 10px;
    text-decoration: none;
    transition: all 0.3s ease;
}

/* Position 7 items with 20° spacing on 96px radius arc */
/* Circle center at (96, 180), radius 96px */
/* Angles: 240°, 220°, 200°, 180°, 160°, 140°, 120° */
/* x = 96 + 96*cos(θ), y = 180 - 96*sin(θ) for top values */
.side-nav-item:nth-child(1) {
    top: 97px;
    left: 48px;
}
.side-nav-item:nth-child(2) {
    top: 118px;
    left: 22px;
}
.side-nav-item:nth-child(3) {
    top: 147px;
    left: 6px;
}
.side-nav-item:nth-child(4) {
    top: 50%;
    left: 0px;
    transform: translateY(-50%);
}
.side-nav-item:nth-child(5) {
    bottom: 147px;
    left: 6px;
}
.side-nav-item:nth-child(6) {
    bottom: 118px;
    left: 22px;
}
.side-nav-item:nth-child(7) {
    bottom: 97px;
    left: 48px;
}

/* RTL: mirror positions to RIGHT arc */
[dir="rtl"] .side-nav-item:nth-child(1) {
    left: auto;
    right: 48px;
}
[dir="rtl"] .side-nav-item:nth-child(2) {
    left: auto;
    right: 22px;
}
[dir="rtl"] .side-nav-item:nth-child(3) {
    left: auto;
    right: 6px;
}
[dir="rtl"] .side-nav-item:nth-child(4) {
    left: auto;
    right: 0px;
}
[dir="rtl"] .side-nav-item:nth-child(5) {
    left: auto;
    right: 6px;
}
[dir="rtl"] .side-nav-item:nth-child(6) {
    left: auto;
    right: 22px;
}
[dir="rtl"] .side-nav-item:nth-child(7) {
    left: auto;
    right: 48px;
}

[dir="rtl"] .side-nav-item {
    flex-direction: row;
}

.side-nav-dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: #666666;
    border: 2px solid #888888;
    transition: all 0.3s ease;
    flex-shrink: 0;
    cursor: pointer;
}

.side-nav-text {
    position: absolute;
    right: 100%;
    margin-right: 15px;
    font-size: 0.7rem;
    font-weight: 400;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: #888888;
    white-space: nowrap;
    transition: all 0.3s ease;
    opacity: 1;
    cursor: pointer;
}

/* RTL: text on RIGHT side of bullets */
[dir="rtl"] .side-nav-text {
    right: auto;
    left: 100%;
    margin-right: 0;
    margin-left: 15px;
}

/* Hover state */
.side-nav-item:hover .side-nav-dot {
    background: #999999;
    border-color: #aaaaaa;
    transform: scale(1.3);
    box-shadow: 0 0 10px rgba(150, 150, 150, 0.5);
}

.side-nav-item:hover .side-nav-text {
    color: var(--color-white);
}

/* Active state - dot stays on circle edge, just styling changes */
.side-nav-item.active .side-nav-dot {
    background: var(--color-gold);
    border-color: var(--color-gold-light);
    box-shadow: 0 0 20px rgba(212, 175, 55, 0.8);
    transform: scale(1.5);
}

.side-nav-item.active .side-nav-text {
    color: var(--color-gold);
    font-weight: 700;
    background: rgba(0, 51, 102, 0.9);
    padding: 0.3rem 0.8rem;
    border-radius: 3px;
    border: 1px solid rgba(255, 102, 0, 0.5);
    box-shadow: 0 0 15px rgba(255, 102, 0, 0.3);
}

/* Elbow line from dot to text (text is on LEFT of bullet in LTR) */
.side-nav-item.active .side-nav-text::before {
    content: '';
    position: absolute;
    right: -25px;
    top: 50%;
    width: 20px;
    height: 2px;
    background: linear-gradient(90deg, transparent, var(--color-gold));
}

.side-nav-item.active .side-nav-text::after {
    content: '';
    position: absolute;
    right: -7px;
    top: 50%;
    width: 2px;
    height: 15px;
    background: linear-gradient(180deg, transparent, var(--color-gold), transparent);
    transform: translateY(-50%);
}

/* RTL: text is on RIGHT of bullet, elbow on LEFT side of text */
[dir="rtl"] .side-nav-item.active .side-nav-text::before {
    right: auto;
    left: -25px;
    background: linear-gradient(90deg, var(--color-gold), transparent);
}

[dir="rtl"] .side-nav-item.active .side-nav-text::after {
    right: auto;
    left: -7px;
}

/* Hide on smaller screens */
@media (max-width: 1024px) {
    .side-nav {
        display: none !important;
    }
}

/* ============================================
   Reset & Base Styles
   ============================================ */
*, *::before, *::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
    font-size: 16px;
}

body {
    font-family: var(--font-body);
    background-color: var(--color-black);
    color: var(--color-white);
    line-height: 1.6;
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    /* Use overlay cursor (dot + ring) implemented in JS; hide native cursor */
    cursor: none;
}

/* Custom overlay cursor (dot + ring) */
.custom-cursor,
.custom-cursor-dot {
    position: fixed;
    pointer-events: none;
    z-index: 99999;
    transform: translate(-50%, -50%);
    transition: transform 0.12s ease, opacity 0.12s ease;
    will-change: transform, opacity;
}

.custom-cursor {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    border: 2px solid rgba(255,102,0,0.95);
    box-shadow: 0 0 14px rgba(255,102,0,0.18);
    background: transparent;
    opacity: 0.95;
}

.custom-cursor-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: rgba(255,255,255,0.95);
    box-shadow: 0 0 6px rgba(255,255,255,0.8);
}

/* Make sure interactive elements still show pointer when needed */
button, a, input, textarea { cursor: pointer; }

[dir="rtl"] body {
    font-family: var(--font-persian);
}

a {
    text-decoration: none;
    color: inherit;
    transition: var(--transition-fast);
}

img {
    max-width: 100%;
    height: auto;
    display: block;
}

/* Placeholder background for images that may fail to load (not applied to logos) */
.project-image img,
.team-preview-image img {
    background: linear-gradient(135deg, #1a1a1a 0%, #2a2a2a 100%);
}

ul {
    list-style: none;
}

.container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 var(--space-md);
}

/* ============================================
   Industrial Background (Homepage)
   ============================================ */
.earth-bg {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -2;
    background: 
        url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100"><defs><pattern id="grid" width="10" height="10" patternUnits="userSpaceOnUse"><path d="M 10 0 L 0 0 0 10" fill="none" stroke="%23003366" stroke-width="0.3" opacity="0.5"/></pattern><pattern id="dots" width="20" height="20" patternUnits="userSpaceOnUse"><circle cx="10" cy="10" r="1" fill="%23FF6600" opacity="0.3"/></pattern></defs><rect width="100" height="100" fill="%230a0a0a"/><rect width="100" height="100" fill="url(%23grid)"/><rect width="100" height="100" fill="url(%23dots)"/></svg>') repeat,
        linear-gradient(135deg, rgba(0,51,102,0.1) 0%, rgba(10,10,10,1) 50%, rgba(255,102,0,0.05) 100%);
    opacity: 1;
}

.luxury-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
    background: var(--gradient-overlay);
    pointer-events: none;
}

/* Page-specific backgrounds */
.team-page .earth-bg {
    background: 
        url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100"><defs><pattern id="grid" width="10" height="10" patternUnits="userSpaceOnUse"><path d="M 10 0 L 0 0 0 10" fill="none" stroke="%23003366" stroke-width="0.3"/></pattern></defs><rect width="100" height="100" fill="url(%23grid)"/></svg>') repeat,
        var(--color-black);
    filter: none;
}

.contact-page .earth-bg {
    background: 
        radial-gradient(ellipse at 20% 50%, rgba(255, 102, 0, 0.05) 0%, transparent 50%),
        radial-gradient(ellipse at 80% 50%, rgba(0, 51, 102, 0.1) 0%, transparent 50%),
        var(--color-black);
    filter: none;
}

.project-page .earth-bg {
    background: var(--color-black);
    filter: none;
}

/* ============================================
   Navigation
   ============================================ */
.navbar {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 1000;
    padding: var(--space-sm) 0;
    background: linear-gradient(180deg, rgba(0, 51, 102, 0.9) 0%, rgba(0, 51, 102, 0.5) 40%, rgba(0, 51, 102, 0.2) 70%, transparent 100%);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    transition: var(--transition-normal);
}

.navbar.scrolled {
    background: linear-gradient(180deg, rgba(0, 51, 102, 0.95) 0%, rgba(0, 51, 102, 0.7) 50%, rgba(0, 51, 102, 0.3) 80%, transparent 100%);
    backdrop-filter: blur(15px);
    -webkit-backdrop-filter: blur(15px);
}

.nav-container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 var(--space-md);
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-direction: row;
    direction: ltr;
}

/* Keep navbar layout exactly the same in RTL - force LTR direction */
[dir="rtl"] .nav-container {
    flex-direction: row;
    direction: ltr;
}

.logo {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
}

.logo-text {
    font-family: var(--font-heading);
    font-size: 1.5rem;
    font-weight: 700;
    letter-spacing: 0.3em;
    background: var(--gradient-gold);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.logo-tagline {
    font-size: 0.65rem;
    letter-spacing: 0.2em;
    color: var(--color-gray-light);
    text-transform: uppercase;
    margin-top: 2px;
}

.logo-image {
    height: 52px;
    width: auto;
    transition: var(--transition-fast);
    /* Readable over video/photo backgrounds: crisp separation instead of an orange haze */
    filter: drop-shadow(0 1px 3px rgba(0, 0, 0, 0.9)) drop-shadow(0 0 14px rgba(255, 102, 0, 0.45));
}

/* Backing plate keeps the mark legible on top of the hero showreel */
.navbar .logo {
    padding: 0.3rem 0.75rem;
    border-radius: 12px;
    background: rgba(4, 20, 38, 0.45);
    border: 1px solid rgba(255, 102, 0, 0.2);
    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);
    transition: var(--transition-fast);
}

.navbar .logo:hover {
    background: rgba(4, 20, 38, 0.7);
    border-color: rgba(255, 102, 0, 0.45);
}

.logo:hover .logo-image {
    filter: drop-shadow(0 1px 3px rgba(0, 0, 0, 0.9)) drop-shadow(0 0 22px rgba(255, 102, 0, 0.75)) brightness(1.08);
}

.footer-logo-image {
    height: 50px;
    width: auto;
    margin-bottom: var(--space-sm);
    filter: drop-shadow(0 0 20px rgba(255, 102, 0, 0.9)) drop-shadow(0 0 40px rgba(255, 102, 0, 0.6)) drop-shadow(0 0 60px rgba(255, 102, 0, 0.4));
}

.nav-links {
    display: flex;
    gap: var(--space-md);
}

.nav-link {
    font-size: 0.85rem;
    font-weight: 500;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--color-white);
    position: relative;
    padding: var(--space-xs) 0;
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 1px;
    background: var(--gradient-gold);
    transition: var(--transition-normal);
}

.nav-link:hover::after,
.nav-link.active::after {
    width: 100%;
}

.nav-link:hover,
.nav-link.active {
    color: var(--color-gold);
}

.nav-actions {
    display: flex;
    align-items: center;
    gap: var(--space-sm);
}

.lang-switch {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    background: transparent;
    border: none;
    cursor: pointer;
    padding: 0;
    font-family: var(--font-body);
}

.lang-toggle-container {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.lang-label {
    font-size: 0.75rem;
    font-weight: 600;
    letter-spacing: 0.05em;
    transition: var(--transition-fast);
}

.lang-label-en {
    color: var(--color-gold);
}

.lang-label-fa {
    color: var(--color-gray-light);
}

[dir="rtl"] .lang-label-en {
    color: var(--color-gray-light);
}

[dir="rtl"] .lang-label-fa {
    color: var(--color-gold);
}

.lang-toggle-track {
    position: relative;
    width: 44px;
    height: 22px;
    background: rgba(0, 51, 102, 0.8);
    border: 1px solid rgba(255, 102, 0, 0.5);
    border-radius: 11px;
    cursor: pointer;
    transition: var(--transition-fast);
}

.lang-toggle-track:hover {
    border-color: var(--color-gold);
    box-shadow: 0 0 10px rgba(255, 102, 0, 0.3);
}

.lang-toggle-thumb {
    position: absolute;
    top: 2px;
    left: 2px;
    width: 16px;
    height: 16px;
    background: var(--gradient-gold);
    border-radius: 50%;
    transition: var(--transition-fast);
    box-shadow: 0 0 8px rgba(255, 102, 0, 0.5);
}

[dir="rtl"] .lang-toggle-thumb {
    left: auto;
    right: 2px;
}

.lang-switch:hover .lang-toggle-track {
    background: rgba(0, 51, 102, 0.95);
}

.menu-toggle {
    display: none;
    flex-direction: column;
    gap: 5px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 5px;
}

.menu-toggle span {
    width: 25px;
    height: 2px;
    background: var(--color-gold);
    transition: var(--transition-fast);
}

.menu-toggle.active span:nth-child(1) {
    transform: rotate(45deg) translate(5px, 5px);
}

.menu-toggle.active span:nth-child(2) {
    opacity: 0;
}

.menu-toggle.active span:nth-child(3) {
    transform: rotate(-45deg) translate(5px, -5px);
}

/* Mobile Menu */
.mobile-menu {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100vh;
    background: rgba(10, 10, 10, 0.98);
    backdrop-filter: blur(20px);
    z-index: 999;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    transition: var(--transition-normal);
}

.mobile-menu.active {
    opacity: 1;
    visibility: visible;
}

.mobile-nav-links {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: var(--space-md);
}

.mobile-nav-links a {
    font-family: var(--font-heading);
    font-size: 2rem;
    color: var(--color-white);
    transition: var(--transition-fast);
}

.mobile-nav-links a:hover {
    color: var(--color-gold);
}

/* ============================================
   Hero Section
   ============================================ */
.hero-section {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
    padding: var(--space-xl) var(--space-md);
    position: relative;
}

/* Hero showreel — muted, looping, shaded to keep the site palette consistent */
.hero-media {
    position: absolute;
    inset: 0;
    overflow: hidden;
    z-index: 0;
    pointer-events: none;
}

.hero-video {
    width: 100%;
    height: 100%;
    object-fit: cover;
    filter: saturate(0.8) contrast(1.05);
}

.hero-media-shade {
    position: absolute;
    inset: 0;
    background:
        radial-gradient(ellipse at 50% 45%, rgba(10, 10, 10, 0.35) 0%, rgba(10, 10, 10, 0.82) 78%),
        linear-gradient(180deg, rgba(0, 51, 102, 0.85) 0%, rgba(10, 10, 10, 0.68) 45%, rgba(10, 10, 10, 0.95) 100%);
}

.hero-content {
    position: relative;
    z-index: 2;
    max-width: 900px;
    animation: fadeInUp 1s ease forwards;
}

.hero-badge {
    display: inline-block;
    padding: 0.6rem 2.5rem 0.8rem;
    border: none;
    border-radius: 50px 50px 0 0;
    font-size: 0.75rem;
    font-weight: 500;
    letter-spacing: 0.2em;
    text-transform: uppercase;
    color: var(--color-gold);
    margin-bottom: var(--space-md);
    animation: fadeInUp 1s ease 0.2s forwards;
    opacity: 0;
    background: linear-gradient(180deg, rgba(255, 102, 0, 0.2) 0%, rgba(255, 102, 0, 0.15) 30%, transparent 70%);
    position: relative;
}

.hero-badge::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    border-radius: 50px 50px 0 0;
    padding: 1px;
    background: linear-gradient(180deg, rgba(212, 175, 55, 0.8) 0%, rgba(212, 175, 55, 0.4) 30%, transparent 70%);
    -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
    mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
    -webkit-mask-composite: xor;
    mask-composite: exclude;
    pointer-events: none;
}

.hero-title {
    font-family: var(--font-heading);
    font-size: clamp(2.5rem, 8vw, 5rem);
    font-weight: 400;
    line-height: 1.1;
    margin-bottom: var(--space-md);
}

.hero-title .line {
    display: block;
    animation: fadeInUp 1s ease forwards;
    opacity: 0;
}

.hero-title .line:nth-child(1) {
    animation-delay: 0.4s;
}

.hero-title .line:nth-child(2) {
    animation-delay: 0.6s;
}

.hero-title .highlight {
    background: var(--gradient-gold);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    font-style: normal;
    font-weight: 600;
}

.hero-description {
    font-size: 1.1rem;
    color: var(--color-gray-light);
    max-width: 600px;
    margin: 0 auto var(--space-lg);
    line-height: 1.8;
    animation: fadeInUp 1s ease 0.8s forwards;
    opacity: 0;
}

.hero-buttons {
    display: flex;
    gap: var(--space-sm);
    justify-content: center;
    flex-wrap: wrap;
    animation: fadeInUp 1s ease 1s forwards;
    opacity: 0;
}

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 1rem 2.5rem;
    font-size: 0.85rem;
    font-weight: 600;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    border: none;
    cursor: pointer;
    transition: var(--transition-normal);
    position: relative;
    overflow: hidden;
}

.btn-primary {
    background: var(--gradient-gold);
    color: var(--color-black);
}

.btn-primary::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.3), transparent);
    transition: var(--transition-slow);
}

.btn-primary:hover::before {
    left: 100%;
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-gold);
}

.btn-secondary {
    background: transparent;
    color: var(--color-white);
    border: 1px solid var(--color-white);
}

.btn-secondary:hover {
    background: var(--color-white);
    color: var(--color-black);
}

.btn-large {
    padding: 1.25rem 3rem;
    font-size: 0.9rem;
}

/* Scroll Indicator */
.scroll-indicator {
    position: absolute;
    z-index: 2;
    bottom: var(--space-lg);
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: var(--space-sm);
    animation: fadeInUp 1s ease 1.2s forwards, float 2s ease-in-out infinite 1.5s;
    opacity: 0;
}

.mouse {
    width: 24px;
    height: 40px;
    border: 2px solid var(--color-gold);
    border-radius: 12px;
    position: relative;
}

.wheel {
    width: 4px;
    height: 8px;
    background: var(--color-gold);
    border-radius: 2px;
    position: absolute;
    top: 8px;
    left: 50%;
    transform: translateX(-50%);
    animation: scroll 2s ease infinite;
}

.scroll-indicator span {
    font-size: 0.7rem;
    letter-spacing: 0.2em;
    text-transform: uppercase;
    color: var(--color-gray-light);
}

/* ============================================
   Section Styles
   ============================================ */
section {
    padding: var(--space-xl) 0;
    position: relative;
}

.section-header {
    text-align: center;
    margin-bottom: var(--space-lg);
}

.section-badge {
    display: inline-block;
    padding: 0.5rem 1.5rem 0.6rem;
    border: none;
    border-radius: 30px 30px 0 0;
    font-size: 0.7rem;
    font-weight: 500;
    letter-spacing: 0.2em;
    text-transform: uppercase;
    color: var(--color-gold);
    margin-bottom: var(--space-sm);
    background: linear-gradient(180deg, rgba(255, 102, 0, 0.15) 0%, transparent 100%);
    position: relative;
}

.section-badge::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    border-radius: 30px 30px 0 0;
    padding: 1px;
    background: linear-gradient(180deg, rgba(212, 175, 55, 0.6) 0%, rgba(212, 175, 55, 0.3) 30%, transparent 70%);
    -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
    mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
    -webkit-mask-composite: xor;
    mask-composite: exclude;
    pointer-events: none;
}

.section-title {
    font-family: var(--font-display);
    font-size: clamp(2.15rem, 5.4vw, 3.75rem);
    font-weight: 600;
    letter-spacing: 0.03em;
    margin-bottom: var(--space-sm);
}

/* Persian has no Rajdhani glyphs — keep Vazirmatn but match the weight */
[dir="rtl"] .section-title {
    font-family: var(--font-persian);
    font-weight: 700;
    letter-spacing: 0;
}

.section-subtitle {
    font-size: 1rem;
    color: var(--color-gray-light);
    max-width: 600px;
    margin: 0 auto;
}

/* ============================================
   What We Do - Cycle Layout
   ============================================ */
.what-we-do-section {
    background: linear-gradient(180deg, transparent 0%, rgba(26, 26, 26, 0.5) 50%, transparent 100%);
}

.services-cycle {
    position: relative;
    width: 100%;
    max-width: 1100px;
    margin: 0 auto;
}

/* Central hub sits in the row gap, between the two rows of cards */
.cycle-center {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    z-index: 10;
}

.cycle-core {
    width: 120px;
    height: 120px;
    border-radius: 50%;
    background: var(--gradient-gold);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    box-shadow: var(--shadow-gold);
    animation: pulse 3s ease-in-out infinite;
}

.core-icon {
    font-size: 1.5rem;
    color: var(--color-black);
}

.core-text {
    font-size: 0.7rem;
    font-weight: 600;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--color-black);
    margin-top: 0.25rem;
}

/* 2 x 2 grid of feature cards around the hub */
.cycle-items {
    position: relative;
    z-index: 2;
    display: grid;
    grid-template-columns: 1fr 1fr;
    /* equal rows keep the gap band — and therefore the hub — exactly centred */
    grid-auto-rows: 1fr;
    column-gap: var(--space-md);
    row-gap: 180px;
}

.cycle-item {
    position: relative;
    background: rgba(17, 22, 34, 0.85);
    border: 1px solid rgba(255, 102, 0, 0.4);
    border-radius: 16px;
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    transition: var(--transition-normal);
    overflow: hidden;
}

.cycle-item:hover {
    border-color: var(--color-accent);
    transform: translateY(-4px);
    box-shadow: var(--shadow-gold);
    z-index: 3;
}

/* image left, copy right */
.cycle-item-inner {
    display: flex;
    align-items: center;
    gap: var(--space-sm);
    padding: var(--space-md);
}

.cycle-image {
    position: relative;
    flex: 0 0 130px;
    width: 130px;
    height: 130px;
    border-radius: 12px;
    overflow: hidden;
    background: #0B0F17;
    border: 1px solid rgba(255, 102, 0, 0.18);
}

.cycle-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: var(--transition-slow);
}

.cycle-item:hover .cycle-image img {
    transform: scale(1.06);
}

.cycle-body {
    flex: 1 1 auto;
    min-width: 0;
}

.cycle-icon {
    width: 30px;
    height: 30px;
    margin-bottom: 0.5rem;
}

.cycle-icon svg {
    width: 100%;
    height: 100%;
    color: var(--color-gold);
}

.cycle-item h3 {
    font-family: var(--font-heading);
    font-size: 1.1rem;
    font-weight: 500;
    margin-bottom: 0.5rem;
    color: var(--color-white);
}

.cycle-item p {
    font-size: 0.85rem;
    color: var(--color-gray-light);
    line-height: 1.6;
}

.cycle-lines {
    position: absolute;
    z-index: 1;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 400px;
    height: 400px;
    pointer-events: none;
    animation: rotate 60s linear infinite;
}

/* Update SVG gradient to orange */

/* ============================================
   Start Point Section
   ============================================ */
.start-point-section {
    background: linear-gradient(180deg, transparent 0%, rgba(10, 10, 10, 0.8) 100%);
}

.start-steps {
    max-width: 800px;
    margin: 0 auto;
    position: relative;
}

.start-step {
    display: flex;
    gap: var(--space-md);
    padding: var(--space-lg) 0;
    position: relative;
}

.step-number {
    font-family: var(--font-heading);
    font-size: 3rem;
    font-weight: 300;
    background: var(--gradient-gold);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    flex-shrink: 0;
    width: 100px;
    text-align: center;
}

.step-content h3 {
    font-family: var(--font-heading);
    font-size: 1.5rem;
    font-weight: 500;
    margin-bottom: 0.75rem;
    color: var(--color-white);
}

.step-content p {
    font-size: 1rem;
    color: var(--color-gray-light);
    line-height: 1.8;
}

.step-line {
    position: absolute;
    left: 50px;
    bottom: 0;
    width: 1px;
    height: var(--space-lg);
    background: linear-gradient(180deg, var(--color-gold) 0%, transparent 100%);
}

[dir="rtl"] .step-line {
    left: auto;
    right: 50px;
}

.start-step:last-child .step-line {
    display: none;
}

.start-cta {
    text-align: center;
    margin-top: var(--space-lg);
}

/* ============================================
   Journey / Projects Section - Timeline Layout
   ============================================ */
.journey-section {
    overflow: hidden;
}

.projects-cta {
    text-align: center;
    margin-top: var(--space-md);
}

/* Shared expand button styles */
.expand-btn,
.team-expand-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    background: transparent;
    border: 1px solid var(--color-accent);
    color: var(--color-accent);
    padding: 0.75rem 2rem;
    font-size: 0.85rem;
    font-weight: 600;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    cursor: pointer;
    transition: var(--transition-normal);
}

.expand-btn:hover,
.team-expand-btn:hover {
    background: var(--color-accent);
    color: var(--color-black);
}

.expand-btn .arrow,
.team-expand-btn .arrow {
    transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.expand-btn.expanded .arrow,
.team-expand-btn.expanded .arrow {
    transform: rotate(180deg);
}

/* Timeline Layout */
.timeline {
    position: relative;
    max-width: 1000px;
    margin: 0 auto;
    padding: var(--space-lg) 0;
    transition: max-height 0.8s cubic-bezier(0.4, 0, 0.2, 1), opacity 0.4s ease;
}

/* Timeline collapsed state - show first 3 items */
.timeline.collapsed {
    max-height: 1200px;
    overflow: hidden;
    position: relative;
}

.timeline.collapsed::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 150px;
    background: linear-gradient(transparent, var(--color-black));
    pointer-events: none;
    z-index: 5;
}

.timeline.expanded {
    max-height: 9000px;
}

.timeline.expanded::after {
    display: none;
}

/* Hidden timeline items (shown on expand) */
.timeline.collapsed .timeline-item.timeline-hidden {
    opacity: 0;
    visibility: hidden;
    max-height: 0;
    padding: 0;
    margin: 0;
    overflow: hidden;
}

.timeline.expanded .timeline-item.timeline-hidden {
    opacity: 1;
    visibility: visible;
    max-height: 600px;
    padding: var(--space-md);
    transition: all 0.6s cubic-bezier(0.4, 0, 0.2, 1);
    animation: slideInUp 0.6s ease forwards;
}

.timeline.expanded .timeline-item.timeline-hidden:nth-child(4) { animation-delay: 0.1s; }
.timeline.expanded .timeline-item.timeline-hidden:nth-child(5) { animation-delay: 0.2s; }
.timeline.expanded .timeline-item.timeline-hidden:nth-child(6) { animation-delay: 0.3s; }

@keyframes slideInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.timeline-line {
    position: absolute;
    left: 50%;
    top: 0;
    bottom: 0;
    width: 1px;
    background: linear-gradient(180deg, transparent 0%, var(--color-gold) 10%, var(--color-gold) 90%, transparent 100%);
    transform: translateX(-50%);
}

[dir="rtl"] .timeline-line {
    left: auto;
    right: 50%;
    transform: translateX(50%);
}

.timeline-item {
    position: relative;
    width: 50%;
    padding: var(--space-md);
    padding-right: var(--space-lg);
}

[dir="rtl"] .timeline-item {
    padding-right: var(--space-md);
    padding-left: var(--space-lg);
}

.timeline-item:nth-child(odd) {
    margin-left: auto;
    padding-left: var(--space-lg);
    padding-right: var(--space-md);
}

[dir="rtl"] .timeline-item:nth-child(odd) {
    margin-left: 0;
    margin-right: auto;
    padding-right: var(--space-lg);
    padding-left: var(--space-md);
}

.timeline-marker {
    position: absolute;
    width: 16px;
    height: 16px;
    background: var(--color-gold);
    border-radius: 50%;
    top: 50%;
    transform: translateY(-50%);
    box-shadow: 0 0 20px rgba(212, 175, 55, 0.5);
}

.timeline-item:nth-child(even) .timeline-marker {
    right: -8px;
}

.timeline-item:nth-child(odd) .timeline-marker {
    left: -8px;
}

[dir="rtl"] .timeline-item:nth-child(even) .timeline-marker {
    right: auto;
    left: -8px;
}

[dir="rtl"] .timeline-item:nth-child(odd) .timeline-marker {
    left: auto;
    right: -8px;
}

.timeline-item::before {
    content: attr(data-year);
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    font-family: var(--font-heading);
    font-size: 0.85rem;
    color: var(--color-gold);
    letter-spacing: 0.1em;
}

[dir="rtl"] .timeline-item::before {
    content: attr(data-year-fa);
}

.timeline-item:nth-child(even)::before {
    right: calc(100% + var(--space-md));
}

.timeline-item:nth-child(odd)::before {
    left: calc(100% + var(--space-md));
}

[dir="rtl"] .timeline-item:nth-child(even)::before {
    right: auto;
    left: calc(100% + var(--space-md));
}

[dir="rtl"] .timeline-item:nth-child(odd)::before {
    left: auto;
    right: calc(100% + var(--space-md));
}

/* Project Cards */
.project-card {
    display: block;
    background: var(--color-black-light);
    border: 1px solid rgba(212, 175, 55, 0.1);
    overflow: hidden;
    transition: var(--transition-normal);
}

.project-card:hover {
    border-color: var(--color-gold);
    transform: translateY(-5px);
    box-shadow: var(--shadow-gold);
}

.project-image {
    position: relative;
    overflow: hidden;
    aspect-ratio: 4/3;
}

.project-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: var(--transition-slow);
}

.project-card:hover .project-image img {
    transform: scale(1.1);
}

.project-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(10, 10, 10, 0.7);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: var(--transition-normal);
}

.project-card:hover .project-overlay {
    opacity: 1;
}

.view-project {
    padding: 0.75rem 1.5rem;
    border: 1px solid var(--color-gold);
    color: var(--color-gold);
    font-size: 0.75rem;
    font-weight: 600;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    transform: translateY(20px);
    transition: var(--transition-normal);
}

.project-card:hover .view-project {
    transform: translateY(0);
}

.project-info {
    padding: var(--space-sm);
}

.project-category {
    font-size: 0.7rem;
    font-weight: 600;
    letter-spacing: 0.15em;
    text-transform: uppercase;
    color: var(--color-gold);
}

.project-title {
    font-family: var(--font-heading);
    font-size: 1.25rem;
    font-weight: 500;
    margin: 0.25rem 0;
    color: var(--color-white);
}

.project-excerpt {
    font-size: 0.9rem;
    color: var(--color-gray-light);
    line-height: 1.6;
}

/* ============================================
   Partners / Logo Carousel
   ============================================ */
.partners-section {
    padding: var(--space-lg) 0;
    border-top: 1px solid rgba(212, 175, 55, 0.1);
    border-bottom: 1px solid rgba(212, 175, 55, 0.1);
    overflow: hidden;
}

.partners-title {
    text-align: center;
    font-size: 0.75rem;
    font-weight: 500;
    letter-spacing: 0.2em;
    text-transform: uppercase;
    color: var(--color-gray-light);
    margin-bottom: var(--space-md);
}

.logo-carousel {
    overflow: hidden;
    position: relative;
}

.logo-carousel::before,
.logo-carousel::after {
    content: '';
    position: absolute;
    top: 0;
    width: 150px;
    height: 100%;
    z-index: 10;
    pointer-events: none;
}

.logo-carousel::before {
    left: 0;
    background: linear-gradient(90deg, var(--color-black) 0%, transparent 100%);
}

.logo-carousel::after {
    right: 0;
    background: linear-gradient(270deg, var(--color-black) 0%, transparent 100%);
}

.carousel-track {
    display: flex;
    animation: scroll-logos 30s linear infinite;
    width: fit-content;
}

.logo-item {
    flex-shrink: 0;
    width: 190px;
    height: 78px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 var(--space-md);
    padding: 0.6rem 1rem;
    /* Partner marks are supplied on white — a light chip keeps them legible on the dark theme */
    background: rgba(255, 255, 255, 0.92);
    border-radius: 8px;
    opacity: 0.6;
    transition: var(--transition-fast);
    filter: grayscale(100%);
}

.logo-item:hover {
    opacity: 1;
    filter: grayscale(0%);
    box-shadow: 0 0 20px rgba(255, 102, 0, 0.35);
}

.logo-item img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
}

.logo-item span {
    font-size: 1.25rem;
    font-weight: 700;
    letter-spacing: 0.2em;
    color: var(--color-gray);
}

/* ============================================
   Footer
   ============================================ */
.footer {
    padding: var(--space-xl) 0 var(--space-md);
    background: var(--color-black);
    border-top: 1px solid rgba(212, 175, 55, 0.1);
}

.footer-content {
    display: flex;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: var(--space-lg);
    padding-bottom: var(--space-lg);
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.footer-brand {
    max-width: 300px;
}

.footer-logo {
    font-family: var(--font-heading);
    font-size: 1.5rem;
    font-weight: 700;
    letter-spacing: 0.3em;
    background: var(--gradient-gold);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.footer-tagline {
    font-size: 0.9rem;
    color: var(--color-gray-light);
    margin-top: var(--space-sm);
}

.footer-links {
    display: flex;
    gap: var(--space-lg);
    flex-wrap: wrap;
}

.footer-column h4 {
    font-size: 0.75rem;
    font-weight: 600;
    letter-spacing: 0.15em;
    text-transform: uppercase;
    color: var(--color-gold);
    margin-bottom: var(--space-sm);
}

.footer-column ul {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.footer-column a {
    font-size: 0.9rem;
    color: var(--color-gray-light);
}

.footer-column a:hover {
    color: var(--color-white);
}

.social-links {
    display: flex;
    gap: var(--space-sm);
    margin-top: var(--space-sm);
}

.social-link {
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 1px solid rgba(212, 175, 55, 0.3);
    font-size: 0.8rem;
    color: var(--color-gold);
    transition: var(--transition-fast);
}

.social-link:hover {
    background: var(--color-gold);
    color: var(--color-black);
    border-color: var(--color-gold);
}

.footer-bottom {
    padding-top: var(--space-md);
    display: flex;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: var(--space-sm);
}

.footer-bottom p {
    font-size: 0.8rem;
    color: var(--color-gray);
}

.footer-credits {
    font-style: italic;
}

/* ============================================
   Team Page Styles
   ============================================ */
.page-header {
    padding: calc(var(--space-xl) + 80px) 0 var(--space-lg);
    text-align: center;
}

.team-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: var(--space-lg);
    padding: var(--space-lg) 0;
}

/* Flip Card */
.team-card {
    perspective: 1000px;
    height: 450px;
}

.team-card-inner {
    position: relative;
    width: 100%;
    height: 100%;
    transition: transform 0.8s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    transform-style: preserve-3d;
}

.team-card:hover .team-card-inner {
    transform: rotateY(180deg);
}

[dir="rtl"] .team-card:hover .team-card-inner {
    transform: rotateY(-180deg);
}

.team-card-front,
.team-card-back {
    position: absolute;
    width: 100%;
    height: 100%;
    -webkit-backface-visibility: hidden;
    backface-visibility: hidden;
    border: 1px solid rgba(212, 175, 55, 0.2);
    overflow: hidden;
}

.team-card-front {
    background: var(--color-black-light);
}

.team-card-back {
    background: linear-gradient(135deg, var(--color-black-light) 0%, var(--color-gray-dark) 100%);
    transform: rotateY(180deg);
    padding: var(--space-md);
    display: flex;
    flex-direction: column;
    justify-content: center;
}

[dir="rtl"] .team-card-back {
    transform: rotateY(-180deg);
}

.member-image {
    width: 100%;
    height: 280px;
    overflow: hidden;
}

.member-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    filter: grayscale(30%);
    transition: var(--transition-normal);
}

.team-card:hover .member-image img {
    filter: grayscale(0%);
}

.member-info {
    padding: var(--space-md);
    text-align: center;
}

.member-name {
    font-family: var(--font-heading);
    font-size: 1.25rem;
    font-weight: 500;
    color: var(--color-white);
    margin-bottom: 0.25rem;
}

.member-role {
    font-size: 0.8rem;
    font-weight: 500;
    letter-spacing: 0.15em;
    text-transform: uppercase;
    color: var(--color-gold);
}

.member-bio {
    font-size: 0.9rem;
    color: var(--color-gray-light);
    line-height: 1.7;
    margin-bottom: var(--space-md);
}

.member-details {
    margin-bottom: var(--space-md);
}

.member-details h4 {
    font-size: 0.7rem;
    font-weight: 600;
    letter-spacing: 0.15em;
    text-transform: uppercase;
    color: var(--color-gold);
    margin-bottom: 0.5rem;
}

.member-details ul {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.member-details li {
    padding: 0.25rem 0.75rem;
    background: rgba(212, 175, 55, 0.1);
    font-size: 0.75rem;
    color: var(--color-white);
}

.member-social {
    display: flex;
    justify-content: center;
    gap: var(--space-sm);
}

.member-social a {
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 1px solid rgba(212, 175, 55, 0.5);
    color: var(--color-gold);
    font-size: 0.8rem;
    transition: var(--transition-fast);
}

.member-social a:hover {
    background: var(--color-gold);
    color: var(--color-black);
}

/* ============================================
   Contact Page Styles
   ============================================ */
.contact-section {
    padding: var(--space-lg) 0;
}

.contact-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: var(--space-xl);
    align-items: start;
}

.contact-info {
    padding-right: var(--space-lg);
}

[dir="rtl"] .contact-info {
    padding-right: 0;
    padding-left: var(--space-lg);
}

.contact-intro {
    font-size: 1.1rem;
    color: var(--color-gray-light);
    line-height: 1.8;
    margin-bottom: var(--space-lg);
}

.contact-details {
    margin-bottom: var(--space-lg);
}

.contact-item {
    display: flex;
    align-items: flex-start;
    gap: var(--space-sm);
    margin-bottom: var(--space-md);
}

.contact-icon {
    width: 48px;
    height: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 1px solid var(--color-gold);
    color: var(--color-gold);
    flex-shrink: 0;
}

.contact-text h4 {
    font-size: 0.75rem;
    font-weight: 600;
    letter-spacing: 0.15em;
    text-transform: uppercase;
    color: var(--color-gold);
    margin-bottom: 0.25rem;
}

.contact-text p,
.contact-text a {
    font-size: 1rem;
    color: var(--color-white);
}

.contact-text a:hover {
    color: var(--color-gold);
}

/* Contact Form */
.contact-form-wrapper {
    background: rgba(26, 26, 26, 0.5);
    border: 1px solid rgba(212, 175, 55, 0.2);
    padding: var(--space-lg);
    backdrop-filter: blur(10px);
}

.contact-form {
    display: flex;
    flex-direction: column;
    gap: var(--space-md);
}

.form-group {
    position: relative;
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: var(--space-md);
}

.form-label {
    display: block;
    font-size: 0.75rem;
    font-weight: 600;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--color-gold);
    margin-bottom: 0.5rem;
}

.form-input,
.form-textarea {
    width: 100%;
    padding: 1rem;
    background: rgba(10, 10, 10, 0.5);
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: var(--color-white);
    font-family: var(--font-body);
    font-size: 1rem;
    transition: var(--transition-fast);
}

[dir="rtl"] .form-input,
[dir="rtl"] .form-textarea {
    font-family: var(--font-persian);
}

.form-input:focus,
.form-textarea:focus {
    outline: none;
    border-color: var(--color-gold);
    box-shadow: 0 0 0 2px rgba(212, 175, 55, 0.1);
}

.form-input::placeholder,
.form-textarea::placeholder {
    color: var(--color-gray);
}

.form-textarea {
    min-height: 150px;
    resize: vertical;
}

.form-submit {
    width: 100%;
    margin-top: var(--space-sm);
}

/* ============================================
   Project Page Styles
   ============================================ */
.project-hero {
    min-height: 70vh;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: calc(var(--space-xl) + 80px) var(--space-md) var(--space-lg);
    position: relative;
}

.project-hero-bg {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
}

.project-hero-bg img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    filter: grayscale(50%);
    opacity: 0.3;
}

.project-hero-content {
    max-width: 800px;
}

.project-meta {
    display: flex;
    justify-content: center;
    gap: var(--space-md);
    margin-bottom: var(--space-md);
    flex-wrap: wrap;
}

.project-meta span {
    font-size: 0.75rem;
    font-weight: 500;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--color-gold);
    padding: 0.5rem 1rem;
    border: 1px solid rgba(212, 175, 55, 0.3);
}

.project-hero h1 {
    font-family: var(--font-heading);
    font-size: clamp(2.5rem, 6vw, 4rem);
    font-weight: 400;
    margin-bottom: var(--space-md);
}

.project-hero p {
    font-size: 1.1rem;
    color: var(--color-gray-light);
    line-height: 1.8;
}

.project-content {
    padding: var(--space-xl) 0;
}

.project-section {
    margin-bottom: var(--space-xl);
}

.project-section h2 {
    font-family: var(--font-heading);
    font-size: 1.75rem;
    font-weight: 400;
    margin-bottom: var(--space-md);
    color: var(--color-white);
}

.project-section p {
    font-size: 1rem;
    color: var(--color-gray-light);
    line-height: 1.8;
    margin-bottom: var(--space-md);
}

.project-gallery {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: var(--space-md);
    margin: var(--space-lg) 0;
}

.project-gallery img {
    width: 100%;
    height: 300px;
    object-fit: cover;
    border: 1px solid rgba(212, 175, 55, 0.1);
    transition: var(--transition-normal);
}

.project-gallery img:hover {
    border-color: var(--color-gold);
}

.project-gallery img:first-child {
    grid-column: span 2;
    height: 400px;
}

/* Project Team Members */
.project-team-member:hover {
    transform: translateY(-5px);
}

.project-team-member:hover div {
    border-color: var(--color-gold) !important;
}

/* ============================================
   Animations
   ============================================ */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes float {
    0%, 100% {
        transform: translateX(-50%) translateY(0);
    }
    50% {
        transform: translateX(-50%) translateY(-10px);
    }
}

@keyframes scroll {
    0% {
        opacity: 1;
        transform: translateX(-50%) translateY(0);
    }
    100% {
        opacity: 0;
        transform: translateX(-50%) translateY(15px);
    }
}

@keyframes pulse {
    0%, 100% {
        box-shadow: 0 0 20px rgba(212, 175, 55, 0.3);
    }
    50% {
        box-shadow: 0 0 40px rgba(212, 175, 55, 0.6);
    }
}

@keyframes rotate {
    from {
        transform: translate(-50%, -50%) rotate(0deg);
    }
    to {
        transform: translate(-50%, -50%) rotate(360deg);
    }
}

@keyframes scroll-logos {
    0% {
        transform: translateX(0);
    }
    100% {
        transform: translateX(-50%);
    }
}

/* Scroll Reveal Animation Classes */
.reveal {
    opacity: 0;
    transform: translateY(50px);
    transition: var(--transition-luxury);
}

.reveal.active {
    opacity: 1;
    transform: translateY(0);
}

/* ============================================
   Responsive Styles
   ============================================ */
@media (max-width: 1024px) {
    .cycle-items {
        row-gap: 150px;
    }

    .contact-grid {
        grid-template-columns: 1fr;
    }

    .contact-info {
        padding-right: 0;
    }

    [dir="rtl"] .contact-info {
        padding-left: 0;
    }
}

/* Below this the hub no longer fits between the rows — stack everything */
@media (max-width: 860px) {
    .services-cycle {
        display: flex;
        flex-direction: column;
        gap: var(--space-md);
    }

    .cycle-center {
        position: relative;
        top: auto;
        left: auto;
        transform: none;
        margin: 0 auto;
    }

    .cycle-items {
        grid-template-columns: 1fr;
        row-gap: var(--space-md);
    }

    .cycle-lines {
        display: none;
    }
}

@media (max-width: 520px) {
    .cycle-item-inner {
        gap: 0.85rem;
        padding: 1rem;
    }

    .cycle-image {
        flex-basis: 96px;
        width: 96px;
        height: 96px;
    }
}

@media (max-width: 768px) {
    :root {
        --space-lg: 3rem;
        --space-xl: 5rem;
    }
    
    .nav-links {
        display: none;
    }
    
    .menu-toggle {
        display: flex;
    }
    
    .timeline-item {
        width: 100%;
        padding-left: var(--space-lg) !important;
        padding-right: var(--space-md) !important;
    }
    
    [dir="rtl"] .timeline-item {
        padding-right: var(--space-lg) !important;
        padding-left: var(--space-md) !important;
    }
    
    .timeline-line {
        left: 0;
        transform: none;
    }
    
    [dir="rtl"] .timeline-line {
        left: auto;
        right: 0;
    }
    
    .timeline-marker {
        left: -8px !important;
        right: auto !important;
    }
    
    [dir="rtl"] .timeline-marker {
        right: -8px !important;
        left: auto !important;
    }
    
    .timeline-item::before {
        display: none;
    }
    
    .start-step {
        flex-direction: column;
        text-align: center;
    }
    
    .step-number {
        width: 100%;
    }
    
    .step-line {
        left: 50%;
        transform: translateX(-50%);
    }
    
    [dir="rtl"] .step-line {
        right: 50%;
        left: auto;
        transform: translateX(50%);
    }
    
    .cycle-items {
        grid-template-columns: 1fr;
    }
    
    .form-row {
        grid-template-columns: 1fr;
    }
    
    .team-grid {
        grid-template-columns: 1fr;
    }
    
    .project-gallery {
        grid-template-columns: 1fr;
    }
    
    .project-gallery img:first-child {
        grid-column: span 1;
    }
    
    .footer-content {
        flex-direction: column;
    }
    
    .footer-links {
        width: 100%;
        justify-content: space-between;
    }
    
    .footer-bottom {
        flex-direction: column;
        text-align: center;
    }
}

@media (max-width: 480px) {
    .hero-buttons {
        flex-direction: column;
        width: 100%;
    }
    
    .btn {
        width: 100%;
    }
    
    .footer-links {
        flex-direction: column;
        gap: var(--space-md);
    }
    
    .logo-item {
        width: 120px;
    }
}

/* ============================================
   Team Preview Section (Homepage)
   ============================================ */
.team-preview-section {
    padding: var(--space-xl) 0;
    background: linear-gradient(180deg, transparent 0%, rgba(0, 51, 102, 0.1) 50%, transparent 100%);
    position: relative;
}

.team-preview-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(255, 102, 0, 0.3), transparent);
}

.team-preview-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: var(--space-md);
    margin-bottom: var(--space-lg);
}

.team-preview-card {
    perspective: 1000px;
    height: 420px;
    position: relative;
}

.team-preview-card-inner {
    position: relative;
    width: 100%;
    height: 100%;
    transition: transform 0.7s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    transform-style: preserve-3d;
}

.team-preview-card:hover .team-preview-card-inner {
    transform: rotateY(180deg);
}

[dir="rtl"] .team-preview-card:hover .team-preview-card-inner {
    transform: rotateY(-180deg);
}

.team-preview-front,
.team-preview-back {
    position: absolute;
    width: 100%;
    height: 100%;
    -webkit-backface-visibility: hidden;
    backface-visibility: hidden;
    overflow: hidden;
}

.team-preview-front {
    background: rgba(26, 26, 26, 0.8);
    border: 1px solid rgba(255, 102, 0, 0.1);
}

.team-preview-back {
    background: linear-gradient(135deg, rgba(0, 51, 102, 0.95) 0%, rgba(26, 26, 26, 0.95) 100%);
    border: 1px solid rgba(255, 102, 0, 0.3);
    transform: rotateY(180deg);
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    padding: var(--space-md);
    text-align: center;
}

[dir="rtl"] .team-preview-back {
    transform: rotateY(-180deg);
}

.team-preview-back h4 {
    font-family: var(--font-heading);
    font-size: 1.1rem;
    font-weight: 500;
    color: var(--color-white);
    margin-bottom: 0.5rem;
}

.team-preview-back .back-role {
    font-size: 0.7rem;
    font-weight: 500;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--color-gold);
    margin-bottom: var(--space-sm);
}

.team-preview-back .back-skills {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    justify-content: center;
    margin-bottom: var(--space-sm);
}

.team-preview-back .skill-tag {
    padding: 4px 10px;
    background: rgba(255, 102, 0, 0.15);
    border: 1px solid rgba(255, 102, 0, 0.4);
    border-radius: 15px;
    font-size: 0.65rem;
    font-weight: 500;
    color: var(--color-accent);
    letter-spacing: 0.05em;
}

.team-preview-back .back-bio {
    font-size: 0.8rem;
    line-height: 1.5;
    color: var(--color-gray-light);
}

.team-preview-front::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: var(--gradient-gold);
    transform: scaleX(0);
    transition: var(--transition-normal);
}

.team-preview-card:hover .team-preview-front::before {
    transform: scaleX(1);
}

.team-preview-image {
    position: relative;
    width: 100%;
    height: 280px;
    overflow: hidden;
}

.team-preview-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    filter: grayscale(30%);
    transition: var(--transition-slow);
}

.team-preview-card:hover .team-preview-image img {
    filter: grayscale(0%);
    transform: scale(1.05);
}

/* Team Role Badge for Project Pages */
.team-preview-front .team-role-badge {
    position: absolute;
    top: 1rem;
    left: 50%;
    transform: translateX(-50%);
    background: rgba(0, 51, 102, 0.95);
    color: var(--color-accent);
    padding: 0.5rem 1rem;
    border-radius: 20px;
    font-size: 0.7rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    z-index: 10;
    border: 1px solid rgba(255, 102, 0, 0.5);
    white-space: nowrap;
    box-shadow: 0 4px 12px rgba(0,0,0,0.3);
    backdrop-filter: blur(5px);
}

.team-preview-info {
    padding: var(--space-xs) var(--space-sm);
    text-align: center;
}

.team-preview-info h4 {
    font-family: var(--font-heading);
    font-size: 1rem;
    font-weight: 500;
    color: var(--color-white);
    margin-bottom: 0.1rem;
}

.team-preview-info p {
    font-size: 0.75rem;
    font-weight: 500;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--color-accent);
}

.team-cta {
    text-align: center;
}

/* Team Preview Responsive */
@media (max-width: 1024px) {
    .team-preview-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 480px) {
    .team-preview-grid {
        grid-template-columns: 1fr;
    }
}

/* ============================================
   Industrial Theme Enhancements
   ============================================ */

/* Industrial corner accents */
.industrial-corners {
    position: relative;
}

.industrial-corners::before,
.industrial-corners::after {
    content: '';
    position: absolute;
    width: 20px;
    height: 20px;
    border: 2px solid var(--color-accent);
    pointer-events: none;
}

.industrial-corners::before {
    top: -1px;
    left: -1px;
    border-right: none;
    border-bottom: none;
}

.industrial-corners::after {
    bottom: -1px;
    right: -1px;
    border-left: none;
    border-top: none;
}

/* Industrial section divider */
.industrial-divider {
    display: flex;
    align-items: center;
    gap: var(--space-md);
    margin: var(--space-lg) 0;
}

.industrial-divider::before,
.industrial-divider::after {
    content: '';
    flex: 1;
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(255, 102, 0, 0.5), transparent);
}

.industrial-divider span {
    color: var(--color-accent);
    font-size: 1.2rem;
}

/* Technical pattern overlay */
.tech-pattern {
    position: relative;
}

.tech-pattern::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100"><circle cx="50" cy="50" r="48" fill="none" stroke="%23FF6600" stroke-width="0.5" stroke-dasharray="4,4" opacity="0.1"/><circle cx="50" cy="50" r="35" fill="none" stroke="%23FF6600" stroke-width="0.3" opacity="0.1"/></svg>');
    background-size: 200px 200px;
    pointer-events: none;
    opacity: 0.5;
}

/* Gear icon styling */
.gear-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border: 2px solid var(--color-accent);
    border-radius: 50%;
    position: relative;
}

.gear-icon::before {
    content: '⚙';
    font-size: 1.2rem;
    color: var(--color-accent);
}

/* Industrial number styling */
.industrial-number {
    font-family: var(--font-heading);
    font-size: 4rem;
    font-weight: 700;
    color: transparent;
    -webkit-text-stroke: 2px var(--color-accent);
    line-height: 1;
}

/* Technical badge */
.tech-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.4rem 1rem;
    background: rgba(255, 102, 0, 0.1);
    border: 1px solid rgba(255, 102, 0, 0.3);
    font-size: 0.7rem;
    font-weight: 600;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--color-accent);
    transition: var(--transition-fast);
}

.tech-badge:hover {
    background: rgba(255, 102, 0, 0.2);
    border-color: var(--color-accent);
}

/* Industrial card variant */
.industrial-card {
    background: rgba(26, 26, 26, 0.9);
    border: 1px solid rgba(255, 102, 0, 0.2);
    position: relative;
    overflow: hidden;
}

.industrial-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 3px;
    background: var(--gradient-gold);
}

.industrial-card::after {
    content: '';
    position: absolute;
    bottom: 0;
    right: 0;
    width: 60px;
    height: 60px;
    background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 60 60"><path d="M60 0 L60 60 L0 60 Z" fill="%23FF6600" opacity="0.1"/></svg>');
}

/* Progress indicator */
.industrial-progress {
    width: 100%;
    height: 4px;
    background: rgba(255, 255, 255, 0.1);
    position: relative;
    overflow: hidden;
}

.industrial-progress-bar {
    height: 100%;
    background: var(--gradient-gold);
    transition: width 0.6s ease;
}

.industrial-progress::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.3), transparent);
    animation: shimmer 2s infinite;
}

@keyframes shimmer {
    0% { transform: translateX(-100%); }
    100% { transform: translateX(100%); }
}

/* Stats counter styling */
.stat-block {
    text-align: center;
    padding: var(--space-md);
    background: rgba(0, 51, 102, 0.3);
    border: 1px solid rgba(255, 102, 0, 0.2);
    transition: var(--transition-normal);
}

.stat-block:hover {
    border-color: var(--color-accent);
    transform: translateY(-5px);
}

.stat-number {
    font-family: var(--font-heading);
    font-size: 3rem;
    font-weight: 700;
    color: var(--color-accent);
    line-height: 1;
}

.stat-label {
    font-size: 0.8rem;
    font-weight: 500;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--color-gray-light);
    margin-top: 0.5rem;
}

/* ============================================
   Utility Classes
   ============================================ */
.text-gold {
    color: var(--color-gold);
}

.text-accent {
    color: var(--color-accent);
}

.text-primary {
    color: var(--color-primary);
}

.text-center {
    text-align: center;
}

.bg-industrial {
    background: linear-gradient(135deg, rgba(0, 51, 102, 0.2) 0%, transparent 50%, rgba(255, 102, 0, 0.1) 100%);
}

.mb-sm { margin-bottom: var(--space-sm); }
.mb-md { margin-bottom: var(--space-md); }
.mb-lg { margin-bottom: var(--space-lg); }

.hidden {
    display: none !important;
}

/* Screen reader only */
.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

/* ============================================
   Contact Us Footer Section
   ============================================ */
.contact-footer-section {
    padding: var(--space-xl) 0;
    background: linear-gradient(180deg, transparent 0%, rgba(0, 51, 102, 0.3) 20%, rgba(0, 51, 102, 0.5) 100%);
    position: relative;
    overflow: hidden;
}

.contact-footer-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, transparent, var(--color-accent), transparent);
    animation: glow-pulse 3s ease-in-out infinite;
}

@keyframes glow-pulse {
    0%, 100% { 
        opacity: 0.5;
        box-shadow: 0 0 20px rgba(255, 102, 0, 0.3);
    }
    50% { 
        opacity: 1;
        box-shadow: 0 0 40px rgba(255, 102, 0, 0.6);
    }
}

.contact-footer-container {
    display: grid;
    grid-template-columns: 1fr 1.5fr;
    gap: var(--space-xl);
    align-items: start;
}

.contact-footer-info {
    text-align: center;
    animation: fadeInUp 0.8s ease forwards;
}

.contact-footer-logo {
    display: none;
}

.contact-footer-logo img {
    height: 60px;
    width: auto;
    filter: drop-shadow(0 0 15px rgba(255, 102, 0, 0.6)) drop-shadow(0 0 30px rgba(255, 102, 0, 0.4));
}

.contact-footer-details {
    display: flex;
    flex-direction: column;
    gap: var(--space-md);
}

.contact-footer-item {
    display: flex;
    align-items: center;
    gap: var(--space-sm);
    padding: var(--space-sm);
    background: rgba(0, 51, 102, 0.5);
    border: 1px solid rgba(255, 102, 0, 0.2);
    transition: var(--transition-normal);
}

.contact-footer-item:hover {
    border-color: var(--color-accent);
    transform: translateX(5px);
    box-shadow: 0 0 20px rgba(255, 102, 0, 0.2);
}

[dir="rtl"] .contact-footer-item:hover {
    transform: translateX(-5px);
}

.contact-footer-item .icon {
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 1px solid var(--color-accent);
    color: var(--color-accent);
    flex-shrink: 0;
}

.contact-footer-item .text h4 {
    font-size: 0.7rem;
    font-weight: 600;
    letter-spacing: 0.15em;
    text-transform: uppercase;
    color: var(--color-accent);
    margin-bottom: 0.25rem;
}

.contact-footer-item .text p,
.contact-footer-item .text a {
    font-size: 0.95rem;
    color: var(--color-white);
    transition: var(--transition-fast);
}

.contact-footer-item .text a:hover {
    color: var(--color-accent);
}

.contact-footer-map {
    min-height: 380px;
    height: 100%;
    border: 1px solid rgba(255, 102, 0, 0.3);
    position: relative;
    overflow: hidden;
    animation: fadeInUp 0.8s ease 0.2s forwards;
    opacity: 0;
}

.contact-footer-map iframe {
    width: 100%;
    height: 100%;
    border: 0;
    filter: grayscale(50%) contrast(1.1);
    transition: var(--transition-slow);
    opacity: 0;
}

.contact-footer-map:hover iframe {
    filter: grayscale(0%) contrast(1);
    opacity: 1;
}

/* Logo overlay on map */
.contact-footer-map .map-logo-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, rgba(0, 51, 102, 0.9) 0%, rgba(10, 10, 10, 0.95) 100%);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: var(--space-md);
    z-index: 2;
    transition: var(--transition-slow);
    cursor: pointer;
}

.contact-footer-map .map-logo-overlay img {
    height: 120px;
    width: auto;
    filter: drop-shadow(0 0 40px rgba(255, 102, 0, 1)) drop-shadow(0 0 80px rgba(255, 102, 0, 0.7)) drop-shadow(0 0 100px rgba(255, 102, 0, 0.5));
    transition: var(--transition-normal);
}

.contact-footer-map .map-logo-overlay span {
    font-size: 0.75rem;
    font-weight: 500;
    letter-spacing: 0.2em;
    text-transform: uppercase;
    color: var(--color-accent);
    opacity: 0.7;
    transition: var(--transition-normal);
}

.contact-footer-map:hover .map-logo-overlay {
    opacity: 0;
    pointer-events: none;
}

.contact-footer-map:hover .map-logo-overlay img {
    transform: scale(1.1);
}

.contact-footer-map::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    border: 2px solid transparent;
    background: linear-gradient(135deg, rgba(255, 102, 0, 0.3), transparent, rgba(255, 102, 0, 0.3)) border-box;
    pointer-events: none;
    z-index: 1;
}

/* Animated entry for contact items */
.contact-footer-item:nth-child(1) { animation: slideInLeft 0.6s ease 0.1s forwards; opacity: 0; }
.contact-footer-item:nth-child(2) { animation: slideInLeft 0.6s ease 0.2s forwards; opacity: 0; }
.contact-footer-item:nth-child(3) { animation: slideInLeft 0.6s ease 0.3s forwards; opacity: 0; }
.contact-footer-item:nth-child(4) { animation: slideInLeft 0.6s ease 0.4s forwards; opacity: 0; }

@keyframes slideInLeft {
    from {
        opacity: 0;
        transform: translateX(-30px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

[dir="rtl"] .contact-footer-item:nth-child(1),
[dir="rtl"] .contact-footer-item:nth-child(2),
[dir="rtl"] .contact-footer-item:nth-child(3),
[dir="rtl"] .contact-footer-item:nth-child(4) {
    animation-name: slideInRight;
}

@keyframes slideInRight {
    from {
        opacity: 0;
        transform: translateX(30px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

/* New minimal footer */
.footer-minimal {
    padding: var(--space-md) 0;
    background: var(--color-black);
    border-top: 1px solid rgba(255, 102, 0, 0.2);
    text-align: center;
}

.footer-minimal p {
    font-size: 0.8rem;
    color: var(--color-gray);
}

/* Contact footer responsive */
@media (max-width: 768px) {
    .contact-footer-container {
        grid-template-columns: 1fr;
    }
    
    .contact-footer-map {
        height: 250px;
    }
}

/* ============================================
   Team Section Expandable
   ============================================ */
.team-preview-grid {
    transition: max-height 0.8s cubic-bezier(0.4, 0, 0.2, 1), opacity 0.4s ease;
}

.team-preview-grid.collapsed {
    max-height: 460px;
    overflow: hidden;
    position: relative;
}

.team-preview-grid.collapsed::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 100px;
    background: linear-gradient(transparent, var(--color-black));
    pointer-events: none;
    transition: opacity 0.4s ease;
}

.team-preview-grid.expanded {
    max-height: 2000px;
}

.team-preview-grid.expanded::after {
    opacity: 0;
}

.team-preview-grid.expanded .team-preview-card {
    animation: cardReveal 0.6s ease forwards;
}

.team-preview-grid.expanded .team-preview-card:nth-child(5) { animation-delay: 0.05s; }
.team-preview-grid.expanded .team-preview-card:nth-child(6) { animation-delay: 0.1s; }
.team-preview-grid.expanded .team-preview-card:nth-child(7) { animation-delay: 0.15s; }
.team-preview-grid.expanded .team-preview-card:nth-child(8) { animation-delay: 0.2s; }

@keyframes cardReveal {
    from {
        opacity: 0;
        transform: scale(0.9) translateY(20px);
    }
    to {
        opacity: 1;
        transform: scale(1) translateY(0);
    }
}

/* ============================================
   Project Page Bilingual Content
   ============================================ */
.bilingual-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: var(--space-lg);
    padding: var(--space-md);
    background: rgba(0, 51, 102, 0.2);
    border: 1px solid rgba(255, 102, 0, 0.2);
    margin: var(--space-md) 0;
    direction: ltr;
}

.bilingual-content .lang-column {
    padding: var(--space-md);
    direction: ltr;
}

.bilingual-content .lang-column.en {
    border-right: 1px solid rgba(255, 102, 0, 0.2);
    text-align: left;
}

.bilingual-content .lang-column.fa {
    text-align: right;
    direction: rtl;
    font-family: var(--font-persian);
}

.bilingual-content .lang-label-header {
    font-size: 0.7rem;
    font-weight: 600;
    letter-spacing: 0.15em;
    text-transform: uppercase;
    color: var(--color-accent);
    margin-bottom: var(--space-sm);
    padding-bottom: 0.5rem;
    border-bottom: 1px solid rgba(255, 102, 0, 0.3);
}

.bilingual-content p {
    font-size: 1rem;
    line-height: 1.8;
    color: var(--color-gray-light);
}

@media (max-width: 768px) {
    .bilingual-content {
        grid-template-columns: 1fr;
    }
    
    .bilingual-content .lang-column.en {
        border-right: none;
        border-bottom: 1px solid rgba(255, 102, 0, 0.2);
        padding-bottom: var(--space-md);
    }
}

/* ============================================
   NEW PROJECT PAGE STYLES
   ============================================ */

/* Luxury Stats */
.luxury-stats-container {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 2rem;
    padding: 4rem 2rem;
    margin: 4rem 0;
    background: linear-gradient(135deg, rgba(0, 51, 102, 0.3) 0%, rgba(0, 20, 40, 0.6) 100%);
    border: 1px solid rgba(255, 102, 0, 0.2);
    border-radius: 8px;
    backdrop-filter: blur(10px);
    box-shadow: 0 10px 30px rgba(0,0,0,0.3);
}
.luxury-stat-item {
    text-align: center;
    position: relative;
}
.luxury-stat-item::after {
    content: '';
    position: absolute;
    right: -1rem;
    top: 20%;
    height: 60%;
    width: 1px;
    background: linear-gradient(to bottom, transparent, rgba(255, 102, 0, 0.3), transparent);
}
.luxury-stat-item:last-child::after { display: none; }
.luxury-stat-number {
    font-family: var(--font-heading);
    font-size: 3.5rem;
    font-weight: 800;
    background: linear-gradient(to right, #fff, var(--color-accent));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    margin-bottom: 0.5rem;
}
.luxury-stat-label {
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 0.15em;
    color: var(--color-gray-light);
}
@media (max-width: 768px) {
    .luxury-stats-container {
        grid-template-columns: repeat(2, 1fr);
    }
    .luxury-stat-item:nth-child(2)::after { display: none; }
}

/* Luxury Carousel */
.luxury-carousel-section {
    margin: 4rem 0;
    position: relative;
    overflow: hidden;
    border-radius: 8px;
    box-shadow: 0 20px 50px rgba(0,0,0,0.5);
    border: 1px solid rgba(255, 102, 0, 0.2);
}
.carousel-container {
    display: flex;
    transition: transform 0.8s cubic-bezier(0.25, 1, 0.5, 1);
}
.carousel-slide {
    min-width: 100%;
    position: relative;
}
.carousel-slide img {
    width: 100%;
    height: 600px;
    object-fit: cover;
    display: block;
}
.carousel-nav {
    position: absolute;
    bottom: 2rem;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 1rem;
    z-index: 10;
}
.carousel-dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: rgba(255,255,255,0.3);
    cursor: pointer;
    transition: all 0.3s;
    border: 1px solid rgba(255,255,255,0.1);
}
.carousel-dot.active {
    background: var(--color-accent);
    transform: scale(1.2);
    box-shadow: 0 0 10px var(--color-accent);
}
.carousel-arrow {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(0,0,0,0.3);
    color: white;
    border: 1px solid rgba(255,255,255,0.1);
    padding: 1rem;
    cursor: pointer;
    z-index: 10;
    transition: all 0.3s;
    backdrop-filter: blur(5px);
    border-radius: 50%;
    width: 50px;
    height: 50px;
    display: flex;
    align-items: center;
    justify-content: center;
}
.carousel-arrow:hover { 
    background: var(--color-accent); 
    border-color: var(--color-accent);
}
.carousel-prev { left: 2rem; }
.carousel-next { right: 2rem; }

/* Luxury Gallery Grid */
.luxury-gallery-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    grid-auto-rows: 200px;
    gap: 1.5rem;
    margin: 3rem 0;
}
.gallery-item {
    position: relative;
    overflow: hidden;
    border-radius: 8px;
    cursor: pointer;
    border: 1px solid rgba(255, 102, 0, 0.1);
}
.gallery-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.6s cubic-bezier(0.16, 1, 0.3, 1);
}
.gallery-item:hover img {
    transform: scale(1.15);
}
.gallery-item.large {
    grid-column: span 2;
    grid-row: span 2;
}
.gallery-item.wide {
    grid-column: span 2;
}
.gallery-item.tall {
    grid-row: span 2;
}
@media (max-width: 768px) {
    .luxury-gallery-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    .gallery-item.large, .gallery-item.wide, .gallery-item.tall {
        grid-column: span 1;
        grid-row: span 1;
    }
}

/* Team Flip Cards */
.team-flip-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
    margin: 3rem 0;
}
.team-flip-card {
    background-color: transparent;
    width: 100%;
    height: 400px;
    perspective: 1000px;
}
.team-card-inner {
    position: relative;
    width: 100%;
    height: 100%;
    text-align: center;
    transition: transform 0.8s;
    transform-style: preserve-3d;
}
.team-flip-card:hover .team-card-inner {
    transform: rotateY(180deg);
}
.team-card-front, .team-card-back {
    position: absolute;
    width: 100%;
    height: 100%;
    -webkit-backface-visibility: hidden;
    backface-visibility: hidden;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 10px 30px rgba(0,0,0,0.3);
    border: 1px solid rgba(255, 102, 0, 0.2);
}
.team-card-front {
    background-color: #1a1a1a;
}
.team-card-front img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}
.team-role-badge {
    position: absolute;
    top: 1.5rem;
    left: 50%;
    transform: translateX(-50%);
    background: rgba(0, 51, 102, 0.95);
    color: var(--color-accent);
    padding: 0.6rem 1.2rem;
    border-radius: 30px;
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    z-index: 2;
    border: 1px solid rgba(255, 102, 0, 0.5);
    width: auto;
    white-space: nowrap;
    box-shadow: 0 5px 15px rgba(0,0,0,0.3);
    backdrop-filter: blur(5px);
}
.team-card-back {
    background: linear-gradient(135deg, var(--color-primary-dark) 0%, #000 100%);
    color: white;
    transform: rotateY(180deg);
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    padding: 2rem;
    border: 1px solid var(--color-accent);
}
.team-card-back h3 {
    color: var(--color-white);
    margin-bottom: 0.5rem;
    font-size: 1.5rem;
}
.team-card-back p {
    font-size: 1rem;
    color: var(--color-accent);
    margin-bottom: 1rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}
.team-bio {
    font-size: 0.9rem !important;
    color: var(--color-gray-light) !important;
    font-weight: 400 !important;
    text-transform: none !important;
    letter-spacing: normal !important;
    line-height: 1.6;
}

/* ============================================
   PURE CSS LIGHTBOX (no JavaScript)
   Uses :target pseudo-class
   ============================================ */
.css-lightbox {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.92);
    z-index: 10000;
    display: flex;
    justify-content: center;
    align-items: center;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
    backdrop-filter: blur(8px);
}
.css-lightbox:target {
    opacity: 1;
    visibility: visible;
}
.css-lightbox img {
    max-width: 88vw;
    max-height: 85vh;
    object-fit: contain;
    border: 2px solid rgba(255, 102, 0, 0.4);
    border-radius: 4px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.8);
}
.css-lightbox .lightbox-close {
    position: absolute;
    top: 1.2rem;
    right: 1.5rem;
    color: #fff;
    font-size: 2.5rem;
    text-decoration: none;
    line-height: 1;
    z-index: 10001;
    transition: color 0.3s ease;
}
.css-lightbox .lightbox-close:hover {
    color: var(--color-accent);
}

/* Gallery items cursor */
.luxury-gallery-grid .gallery-item a {
    display: block;
    width: 100%;
    height: 100%;
    cursor: zoom-in;
}
.luxury-gallery-grid .gallery-item a img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.6s cubic-bezier(0.16, 1, 0.3, 1);
}
.luxury-gallery-grid .gallery-item:hover a img {
    transform: scale(1.15);
}

/* ============================================
   CARD BACK MINI PHOTO (top-left on flip)
   ============================================ */
.team-preview-back,
.team-card-back {
    position: relative;
}
.card-back-photo {
    position: absolute;
    top: 12px;
    left: 12px;
    width: 180px;
    height: 180px;
    border-radius: 50%;
    overflow: hidden;
    border: 2px solid rgba(255, 102, 0, 0.5);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.4);
    z-index: 2;
}
[dir="rtl"] .card-back-photo {
    left: auto;
    right: 12px;
}
.card-back-photo img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}
.card-back-photo .default-avatar {
    width: 100%;
    height: 100%;
    background: var(--color-primary);
    display: flex;
    align-items: center;
    justify-content: center;
}
.card-back-photo .default-avatar svg {
    width: 80px;
    height: 80px;
    fill: var(--color-gray-light);
}

/* ============================================
   VIDEO SECTION (project pages)
   ============================================ */
.project-video-section {
    margin: 3rem 0;
}
.project-video-container {
    position: relative;
    width: 100%;
    max-width: 900px;
    margin: 1.5rem auto;
    border: 2px solid rgba(255, 102, 0, 0.3);
    border-radius: 8px;
    overflow: hidden;
    background: #000;
    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.5);
}
.project-video-container video {
    width: 100%;
    display: block;
}

/* ============================================
   TEAM — Profile Flip Cards + Slider
   ============================================ */
.team-slider {
    position: relative;
    padding: 0 3.5rem;
    margin-bottom: var(--space-md);
    /* Cards are sized to an exact fraction of the rail, so a half-cut card can never
       show at either edge. Change this number to change how many are visible. */
    --per-view: 4;
}

.team-track {
    display: flex;
    gap: var(--space-md);
    overflow-x: auto;
    overflow-y: hidden;
    scroll-behavior: smooth;
    scroll-snap-type: x mandatory;
    scroll-padding-inline: 0;
    padding: 0.75rem 0 1.5rem;
    scrollbar-width: none;
    -ms-overflow-style: none;
}

.team-track::-webkit-scrollbar {
    display: none;
}

.team-slider-arrow {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    z-index: 6;
    width: 46px;
    height: 46px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(0, 51, 102, 0.8);
    border: 1px solid rgba(255, 102, 0, 0.5);
    color: var(--color-white);
    font-size: 1.1rem;
    cursor: pointer;
    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);
    transition: var(--transition-fast);
}

.team-slider-arrow:hover {
    background: var(--color-accent);
    border-color: var(--color-accent);
    color: var(--color-black);
}

.team-slider-prev { left: 0; }
.team-slider-next { right: 0; }

/* "Show all" turns the rail into a full grid */
.team-slider.show-all .team-track {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(270px, 1fr));
    overflow: visible;
    scroll-snap-type: none;
}

.team-slider.show-all .tcard {
    flex: none;
    width: auto;
}

.team-slider.show-all .team-slider-arrow {
    display: none;
}

/* --- the card --- */
.tcard {
    flex: 0 0 calc((100% - (var(--per-view) - 1) * var(--space-md)) / var(--per-view));
    width: auto;
    height: 430px;
    scroll-snap-align: start;
    perspective: 1000px;
}

.tcard-inner {
    position: relative;
    width: 100%;
    height: 100%;
    transform-style: preserve-3d;
    transition: transform 0.7s cubic-bezier(0.2, 0.8, 0.2, 1);
}

.tcard:hover .tcard-inner,
.tcard.flipped .tcard-inner {
    transform: rotateY(180deg);
}

[dir="rtl"] .tcard:hover .tcard-inner,
[dir="rtl"] .tcard.flipped .tcard-inner {
    transform: rotateY(-180deg);
}

.tcard-face {
    position: absolute;
    inset: 0;
    -webkit-backface-visibility: hidden;
    backface-visibility: hidden;
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 12px 30px rgba(0, 0, 0, 0.45);
}

.tcard-front {
    background: #171717;
    border: 1px solid rgba(255, 255, 255, 0.08);
    display: flex;
    flex-direction: column;
}

.tcard-photo {
    flex: 1 1 auto;
    min-height: 0;
    overflow: hidden;
    background: #0f0f0f;
}

.tcard-photo img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: top center;
    transition: var(--transition-slow);
}

.tcard:hover .tcard-photo img {
    transform: scale(1.04);
}

.tcard-id {
    flex: 0 0 auto;
    padding: 0.95rem 1.1rem 1.15rem;
}

.tcard-id h4 {
    font-family: var(--font-heading);
    font-size: 1rem;
    font-weight: 700;
    line-height: 1.3;
    color: var(--color-white);
}

[dir="rtl"] .tcard-id h4 {
    font-family: var(--font-persian);
}

.tcard-role {
    margin-top: 0.2rem;
    font-size: 0.78rem;
    font-weight: 600;
    line-height: 1.35;
    color: #C86D44;
}

/* --- back --- */
.tcard-back {
    background: #0D223A;
    border: 1px solid rgba(200, 109, 68, 0.55);
    transform: rotateY(180deg);
    padding: 1.05rem 1.1rem;
    display: flex;
    flex-direction: column;
    gap: 0.85rem;
    text-align: left;
}

[dir="rtl"] .tcard-back {
    transform: rotateY(-180deg);
    text-align: right;
}

.tcard-back-head {
    display: flex;
    align-items: center;
    gap: 0.7rem;
    flex: 0 0 auto;
}

.tcard-avatar {
    flex: 0 0 auto;
    width: 52px;
    height: 52px;
    border-radius: 50%;
    overflow: hidden;
    border: 2px solid #C86D44;
}

.tcard-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: top center;
}

.tcard-back-name b {
    display: block;
    font-size: 0.88rem;
    font-weight: 700;
    line-height: 1.25;
    color: var(--color-white);
}

.tcard-back-name i {
    display: block;
    margin-top: 2px;
    font-style: normal;
    font-size: 0.7rem;
    font-weight: 600;
    line-height: 1.3;
    color: #C86D44;
}

.tcard-rows {
    display: flex;
    flex-direction: column;
    gap: 0.7rem;
    overflow-y: auto;
    scrollbar-width: thin;
    scrollbar-color: rgba(200, 109, 68, 0.5) transparent;
}

.tcard-rows::-webkit-scrollbar { width: 4px; }
.tcard-rows::-webkit-scrollbar-thumb { background: rgba(200, 109, 68, 0.5); border-radius: 4px; }

.tcard-key {
    display: block;
    margin-bottom: 0.4rem;
    font-size: 0.66rem;
    font-weight: 600;
    letter-spacing: 0.09em;
    text-transform: uppercase;
    color: #8FB3D9;
}

.tcard-pills {
    display: flex;
    flex-wrap: wrap;
    gap: 0.35rem;
}

.pill {
    display: inline-block;
    padding: 0.2rem 0.6rem;
    border-radius: 999px;
    font-size: 0.66rem;
    font-weight: 600;
    line-height: 1.55;
    background: #0A1A2E;
    border: 1px solid rgba(200, 109, 68, 0.6);
    color: #F0C8AE;
    white-space: nowrap;
}

.pill-muted {
    background: rgba(255, 255, 255, 0.04);
    border-color: rgba(143, 179, 217, 0.35);
    color: #B9CBDD;
}

@media (max-width: 1200px) { .team-slider { --per-view: 3; } }
@media (max-width: 900px)  { .team-slider { --per-view: 2; } }

@media (max-width: 520px) {
    .team-slider { --per-view: 1; padding: 0 1rem; }
    .team-slider-arrow { width: 38px; height: 38px; }
}

/* Compact variant used on project pages */
.team-slider.team-compact .team-track,
.tcard-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(210px, 1fr));
    gap: var(--space-md);
    overflow: visible;
}

.tcard-grid .tcard {
    flex: none;
    width: auto;
    height: 360px;
}

.tcard-grid .tcard-photo { min-height: 62%; }
.tcard-grid .tcard-id { padding: 0.7rem 0.85rem 0.85rem; }
.tcard-grid .tcard-id h4 { font-size: 0.86rem; }
.tcard-grid .tcard-role { font-size: 0.68rem; }
.tcard-grid .tcard-avatar { width: 42px; height: 42px; }
.tcard-grid .tcard-back-name b { font-size: 0.78rem; }
.tcard-grid .tcard-back-name i { font-size: 0.64rem; }
.tcard-grid .pill { font-size: 0.6rem; padding: 0.15rem 0.5rem; }
.tcard-grid .tcard-back { padding: 0.85rem 0.9rem; gap: 0.65rem; }

/* ============================================
   Delmia & Catia — media collection grid
   ============================================ */
.media-collection {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: var(--space-md);
    margin: var(--space-md) 0 var(--space-lg);
}

.media-card {
    background: rgba(0, 51, 102, 0.22);
    border: 1px solid rgba(255, 102, 0, 0.22);
    border-radius: 8px;
    overflow: hidden;
    transition: var(--transition-normal);
}

.media-card:hover {
    border-color: var(--color-accent);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.45);
}

.media-card video,
.media-card img {
    width: 100%;
    display: block;
    background: #000;
    aspect-ratio: 16 / 9;
    object-fit: cover;
}

.media-card figcaption {
    padding: 0.9rem 1.1rem 1.1rem;
}

.media-card figcaption strong {
    display: block;
    font-family: var(--font-display);
    font-size: 1.05rem;
    font-weight: 600;
    letter-spacing: 0.02em;
    color: var(--color-white);
}

[dir="rtl"] .media-card figcaption strong {
    font-family: var(--font-persian);
}

.media-card figcaption span {
    display: block;
    margin-top: 0.3rem;
    font-size: 0.85rem;
    line-height: 1.6;
    color: var(--color-gray-light);
}

/* ============================================
   Utilities
   ============================================ */
/* Latin phone numbers / e-mail must not be re-ordered by the RTL layout */
.force-ltr {
    display: inline-block;
    direction: ltr;
    unicode-bidi: embed;
}

[dir="rtl"] .force-ltr {
    text-align: right;
}
