/* PREMIUM CORPORATE THEME - REBUILT FROM SCRATCH */
/* FLUID TYPOGRAPHY & RESPONSIVE CALCULATIONS */

/* 1. Fonts - Single Source of Truth */
@font-face {
    font-family: 'IranYekan';
    src: url('../fonts/IranYekan.woff2') format('woff2');
    font-weight: normal;
    font-style: normal;
}

/* 2. Variables & Tokens */
:root {
    /* Colors - Metallic Gold Gradient */
    --gold-start: #e1c070;
    --gold-mid: #cfa038;
    --gold-end: #9e7b2b;
    --gold-gradient: linear-gradient(135deg, var(--gold-start) 0%, var(--gold-mid) 50%, var(--gold-end) 100%);

    /* Colors - Solids */
    --primary-bg: #ffffff;
    --secondary-bg: #f8f9fa;
    --text-dark: #2c3e50;
    --text-muted: #64748b;
    --shadow-color: rgba(148, 163, 184, 0.15);

    /* Dimensions */
    --border-radius: 16px;
    --nav-height: 80px;
}

/* Typography & Titles */
.section-title {
    position: relative;
    display: inline-block;
    padding-bottom: 15px;
    margin-bottom: 25px;
    color: var(--text-dark);
    /* Dark text for contrast */
}

.section-title::after {
    content: '';
    position: absolute;
    left: 50%;
    bottom: 0;
    transform: translateX(-50%);
    width: 80px;
    height: 3px;
    background: var(--gold-gradient);
    /* Keep gold accent for the line only */
    border-radius: 2px;
}

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

body {
    font-family: 'IranYekan', system-ui, -apple-system, sans-serif;
    direction: rtl;
    text-align: right;
    background: var(--primary-bg);
    color: var(--text-dark);
    line-height: 1.7;
    overflow-x: hidden;
}

/* 4. FLUID TYPOGRAPHY (The Core Fix) */
/* Calculates size based on viewport width (vw), ensuring perfect mobile scaling */
h1 {
    font-size: clamp(2rem, 5vw + 1rem, 4rem);
    font-weight: 800;
}

h2 {
    font-size: clamp(1.5rem, 4vw + 0.5rem, 2.8rem);
    font-weight: 700;
}

h3 {
    font-size: clamp(1.2rem, 3vw, 2rem);
    font-weight: 600;
}

h4 {
    font-size: clamp(1.1rem, 2vw, 1.5rem);
    font-weight: 600;
}

p,
li {
    font-size: clamp(0.9rem, 1.5vw, 1.1rem);
    color: var(--text-muted);
}

.small-text {
    font-size: clamp(0.75rem, 1vw, 0.9rem);
}

/* 5. Components */

/* Navbar */
.navbar-custom {
    background: rgba(255, 255, 255, 0.95);
    /* Increased opacity for readability */
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-bottom: 1px solid rgba(0, 0, 0, 0.05);
    min-height: var(--nav-height);
    /* Changed to min-height */
    transition: all 0.3s;
    padding: 10px 0;
}

.custom-toggler {
    border: 2px solid var(--gold-mid);
    color: var(--gold-mid);
    padding: 5px 10px;
    border-radius: 8px;
    transition: all 0.3s;
    background: white;
}

.custom-toggler:focus {
    box-shadow: 0 0 0 3px rgba(207, 160, 56, 0.25);
    outline: none;
}

/* Mobile Menu Fix */
@media (max-width: 991px) {
    .navbar-collapse {
        background: #ffffff;
        padding: 1.5rem;
        border-radius: 16px;
        box-shadow: 0 15px 40px rgba(0, 0, 0, 0.15);
        margin-top: 15px;
        border: 1px solid rgba(225, 192, 112, 0.2);
        transform-origin: top;
        animation: slideDown 0.3s ease forwards;
    }

    .nav-link {
        padding: 1rem !important;
        border-bottom: 1px solid #f0f0f0;
        text-align: center;
    }

    .nav-link:last-child {
        border-bottom: none;
    }
}

@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }

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

.nav-link {
    font-size: clamp(0.9rem, 1.2vw, 1.1rem);
    font-weight: 500;
    color: var(--text-dark) !important;
    padding: 0.5rem 1rem !important;
    position: relative;
}

/* Language Switcher */
.lang-switcher .dropdown-menu {
    border: 1px solid rgba(207, 160, 56, 0.2);
    background: rgba(255, 255, 255, 0.98);
    backdrop-filter: blur(10px);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
    transform-origin: top;
    animation: dropdownFade 0.3s ease;
}

@keyframes dropdownFade {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }

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

.dropdown-item {
    font-weight: 500;
    padding: 8px 15px;
    border-radius: 8px;
    margin-bottom: 2px;
    transition: all 0.2s;
    text-align: inherit;
    /* Inherit alignment from parent */
}

.dropdown-item:hover,
.dropdown-item:focus {
    background: #fff9e6;
    color: var(--gold-mid);
    padding-inline-start: 20px;
    /* Slide effect */
}

.dropdown-item.active {
    background: var(--gold-gradient);
    color: white;
    box-shadow: 0 4px 10px rgba(207, 160, 56, 0.3);
}

.lang-btn {
    border: 1px solid rgba(207, 160, 56, 0.4);
    color: var(--text-dark);
    padding: 0.4rem 1.2rem;
    border-radius: 50px;
    font-size: 0.9rem;
    font-weight: 600;
    background: transparent;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.lang-btn:hover,
.show>.lang-btn {
    background: var(--gold-gradient);
    color: white;
    border-color: transparent;
    box-shadow: 0 5px 15px rgba(207, 160, 56, 0.3);
    transform: translateY(-1px);
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: 5px;
    left: 50%;
    transform: translateX(-50%) scaleX(0);
    width: 20px;
    height: 3px;
    background: var(--gold-gradient);
    border-radius: 10px;
    transition: transform 0.3s ease;
}

.nav-link:hover::after,
.nav-link.active::after {
    transform: translateX(-50%) scaleX(1);
    width: 80%;
}

.navbar-brand {
    font-size: clamp(1.2rem, 2.5vw, 1.5rem);
    font-weight: 900;
}

/* Hero Section */
.hero-wrapper {
    position: relative;
    padding: 180px 0 100px;
    margin-top: 0;
    overflow: hidden;
    color: white;
}

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

.hero-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: radial-gradient(circle at center, rgba(207, 160, 56, 0.3) 0%, rgba(0, 0, 0, 0.85) 100%);
    z-index: 1;
}

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

.hero-tag {
    display: inline-block;
    padding: 0.5em 1.5em;
    background: #fff;
    border: 1px solid #e1c070;
    border-radius: 50px;
    color: #cfa038;
    font-weight: 600;
    font-size: clamp(0.8rem, 1.2vw, 1rem);
    /* Fluid */
    margin-bottom: 2rem;
    box-shadow: 0 4px 15px rgba(225, 192, 112, 0.15);
}

.hero-title {
    line-height: 1.3;
    margin-bottom: 1.5rem;
    color: #ffffff;
    text-shadow: 0 2px 10px rgba(0, 0, 0, 0.5);
    /* Shadow for readability */
}

.hero-desc {
    max-width: 600px;
    margin: 0 auto 3rem;
    color: #f8f9fa !important;
    /* Force white text */
    text-shadow: 0 1px 5px rgba(0, 0, 0, 0.5);
}

/* Premium Buttons */
.btn-premium {
    background: var(--gold-gradient);
    color: white;
    padding: 1rem 3rem;
    border-radius: 50px;
    border: none;
    font-weight: 700;
    font-size: clamp(0.9rem, 1.2vw, 1.1rem);
    box-shadow: 0 10px 25px rgba(207, 160, 56, 0.3);
    transition: transform 0.3s, box-shadow 0.3s;
}

.btn-premium:hover {
    transform: translateY(-3px);
    box-shadow: 0 15px 35px rgba(207, 160, 56, 0.4);
    color: white;
}

.btn-outline-premium {
    background: transparent;
    color: var(--text-dark);
    padding: 1rem 3rem;
    border-radius: 50px;
    border: 2px solid #e5e5e5;
    font-weight: 700;
    font-size: clamp(0.9rem, 1.2vw, 1.1rem);
    transition: all 0.3s;
}

.btn-outline-premium:hover {
    border-color: #cfa038;
    color: #cfa038;
    background: #fffcf5;
}

/* Feature Cards */
.hero-wrapper .btn-outline-premium {
    color: #ffffff;
    border-color: rgba(255, 255, 255, 0.6);
    backdrop-filter: blur(5px);
}

.hero-wrapper .btn-outline-premium:hover {
    background: #ffffff;
    color: var(--text-dark);
    border-color: #ffffff;
}

.card-premium {
    background: #fff;
    padding: 3rem 2rem;
    border-radius: var(--border-radius);
    border: 1px solid #f0f0f0;
    box-shadow: 0 10px 40px var(--shadow-color);
    transition: all 0.4s cubic-bezier(0.165, 0.84, 0.44, 1);
    height: 100%;
    position: relative;
    overflow: hidden;
    z-index: 1;
}

.card-premium::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 4px;
    height: 100%;
    background: var(--gold-gradient);
    transform: scaleY(0);
    transition: transform 0.4s ease;
    transform-origin: bottom;
}

.card-premium:hover {
    transform: translateY(-10px);
    box-shadow: 0 20px 60px rgba(148, 163, 184, 0.25);
}

.card-premium:hover::before {
    transform: scaleY(1);
}

.icon-circle {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    background: #fffcf5;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2rem;
    color: #cfa038;
    margin-bottom: 2rem;
    transition: transform 0.4s;
    border: 1px solid rgba(207, 160, 56, 0.1);
}

.card-premium:hover .icon-circle {
    transform: rotate(360deg) scale(1.1);
    background: var(--gold-gradient);
    color: white;
    border-color: transparent;
}

/* Project Cards */
.project-item {
    border-radius: var(--border-radius);
    overflow: hidden;
    position: relative;
    box-shadow: 0 10px 30px var(--shadow-color);
    cursor: pointer;
}

.client-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    width: 150px;
    /* Fixed width for alignment */
}

.client-name {
    margin-top: 1rem;
    font-size: 0.9rem;
    color: #666;
    font-weight: 700;
    text-align: center;
}

/* Client Logos Marquee (Premium Card Style) */
.logo-marquee {
    overflow: hidden;
    white-space: nowrap;
    position: relative;
    padding: 4rem 0;
    direction: ltr;
    background: #f8f9fa;
    /* Slight off-white background */
    border-top: 1px solid rgba(207, 160, 56, 0.2);
    border-bottom: 1px solid rgba(207, 160, 56, 0.2);
    box-shadow: inset 0 0 30px rgba(0, 0, 0, 0.03);
    /* Inner depth */
}

.logo-track {
    display: flex;
    width: max-content;
    animation: scroll 40s linear infinite;
    padding: 2rem 0;
    /* Space for item shadows */
}

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

.client-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    width: 220px;
    margin: 0 2rem;
    padding: 2rem;
    background: #ffffff;
    /* User specific styles */
    box-shadow: 3px 3px 2px #b88f3299;
    border-radius: 10px;
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    border: 1px solid rgba(0, 0, 0, 0.02);
}

.client-item:hover {
    transform: translateY(-10px) scale(1.05);
    box-shadow: 5px 5px 15px rgba(207, 160, 56, 0.4);
    /* Stronger glow on hover */
    border-color: rgba(207, 160, 56, 0.5);
}

.client-logo {
    height: 100px;
    width: auto;
    object-fit: contain;
    filter: none;
    opacity: 1;
    transition: transform 0.3s ease;
    margin-bottom: 1rem;
}

.client-name {
    margin-top: 0.5rem;
    font-size: 0.95rem;
    color: #444;
    font-weight: 700;
    text-align: center;
    transition: color 0.3s;
}

.client-item:hover .client-name {
    color: #cfa038;
    /* Gold text on hover */
}

@keyframes scroll {
    0% {
        transform: translateX(0);
    }

    100% {
        transform: translateX(-50%);
    }
}

.border-gold-light {
    border-color: rgba(207, 160, 56, 0.2) !important;
}

.project-item img {
    width: 100%;
    height: 350px;
    object-fit: cover;
    transition: transform 0.6s ease;
}

.project-item:hover img {
    transform: scale(1.1);
}

.project-info {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    padding: 2rem;
    background: linear-gradient(to top, rgba(0, 0, 0, 0.95) 0%, rgba(0, 0, 0, 0.5) 70%, transparent 100%);
    color: white;
    transform: translateY(20px);
    opacity: 0;
    transition: all 0.4s ease;
}

.project-item:hover .project-info {
    transform: translateY(0);
    opacity: 1;
}

/* Contact Box */
.contact-box {
    background: #fff;
    padding: 2rem;
    border-radius: var(--border-radius);
    text-align: center;
    border: 1px solid #f0f0f0;
    transition: 0.3s;
}

.contact-box:hover {
    border-color: #cfa038;
}

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

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

.zoom-in {
    opacity: 0;
    transform: scale(0.9);
    transition: opacity 0.8s ease, transform 0.8s ease;
}

.zoom-in.visible {
    opacity: 1;
    transform: scale(1);
}

/* Section Spacing */
.section-padding {
    padding: clamp(4rem, 8vw, 7rem) 0;
}

/* Utilities */
.text-gold {
    background: var(--gold-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    font-weight: 700;
}

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