/* 
   Enoor Trade - Final Production Styles
   Visual Identity: Deep Luxury Gradient, Metallic Gold, Full Screen Imagery
   Updated: Mobile Redesign & Smart Header
*/

/* --- Variables --- */
:root {
    /* User Requested Specific Gradient: Bottom to Top #3a4252 -> #455165 */
    --bg-dark-bottom: #3a4252;
    --bg-dark-top: #455165;

    --bg-card: rgba(255, 255, 255, 0.05);

    --gold-gradient: linear-gradient(135deg,
            #bf953f 0%,
            #fcf6ba 40%,
            #b38728 60%,
            #fbf5b7 80%,
            #aa771c 100%);
    --accent-gold-solid: #d4af37;

    --text-white: #ffffff;
    --text-muted: #e0e0e0;

    --border-glass: rgba(255, 255, 255, 0.1);

    --font-heading: 'Segoe UI', 'Roboto', Helvetica, Arial, sans-serif;
    --font-body: 'Segoe UI', 'Roboto', Helvetica, sans-serif;

    --ease-out: cubic-bezier(0.215, 0.61, 0.355, 1);
}

/* --- Reset & Base --- */
*,
*::before,
*::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    scroll-behavior: smooth;
}

body {
    /* Vertical Gradient Bottom -> Top */
    background: linear-gradient(to top, var(--bg-dark-bottom), var(--bg-dark-top));
    background-attachment: fixed;
    font-family: var(--font-body);
    font-weight: 300;
    color: var(--text-white);
    line-height: 1.7;
    overflow-x: hidden;
    min-height: 100vh;
}

/* Subtle pattern overlay placeholder */
body::before {
    content: "";
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    /* PLACEHOLDER FOR GRASS PATTERN */
    /* background-image: url('images/pattern.png'); */
    opacity: 0.05;
    pointer-events: none;
    z-index: -1;
    background-image: radial-gradient(rgba(255, 255, 255, 0.1) 1px, transparent 1px);
    background-size: 20px 20px;
}

a {
    text-decoration: none;
    color: inherit;
    transition: all 0.3s ease;
}

/* --- Typography --- */
h1,
h2,
h3 {
    font-family: var(--font-heading);
    text-transform: uppercase;
    line-height: 1.1;
}

.text-gold-gradient {
    background: var(--gold-gradient);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
    text-shadow: none;
}

h1 {
    font-size: 5rem;
    letter-spacing: 2px;
    margin-bottom: 1.5rem;
}

h2 {
    font-size: 3.5rem;
    margin-bottom: 2rem;
    color: var(--text-white);
}

h2 .highlight {
    background: var(--gold-gradient);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}

p {
    color: var(--text-muted);
    font-size: 1.1rem;
    margin-bottom: 1.5rem;
    max-width: 800px;
}

/* --- Layout Utilities --- */
.container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 2rem;
}

section {
    padding: 6rem 0;
    position: relative;
}

/* --- Smart Header --- */
header {
    padding: 1.5rem 0;
    position: fixed;
    /* Stick to top */
    width: 100%;
    z-index: 1000;
    top: 0;
    transition: transform 0.4s ease, background 0.3s ease, padding 0.3s ease;
    background: linear-gradient(to bottom, rgba(0, 0, 0, 0.8), transparent);
}

header.header-scrolled {
    background: rgba(40, 48, 60, 0.95);
    /* Matches theme dark blue-grey */
    backdrop-filter: blur(10px);
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.3);
    padding: 1rem 0;
}

.header-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 2rem;
    direction: ltr;
    /* Force LTR for consistent Brand-Left / Menu-Right layout */
}

.brand-name {
    font-family: var(--font-heading);
    font-size: 2.5rem;
    background: var(--gold-gradient);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
    font-weight: bold;
}

/* Language Switcher - Desktop */
.lang-switcher a {
    font-family: var(--font-heading);
    font-size: 1.2rem;
    margin-left: 1.5rem;
    opacity: 0.7;
    color: #fff;
    border-bottom: 2px solid transparent;
}

[dir="rtl"] .lang-switcher a {
    margin-left: 0;
    margin-right: 1.5rem;
}

.lang-switcher a:hover,
.lang-switcher a.active {
    opacity: 1;
    color: var(--accent-gold-solid);
    border-color: var(--accent-gold-solid);
}

/* --- Full Screen Hero --- */
.hero-full {
    height: 100vh;
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    position: relative;
    background-color: #000;
    /* Start with black background */
    overflow: hidden;
}

/* 
   We separate the Background Image and the Dark Overlay into two pseudo-elements.
   ::before -> The Image (fades in)
   ::after  -> The Dark Overlay (always present)
*/

.hero-full::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    /* Image is set via JS to avoid pop-in */
    background-image: var(--hero-bg-image);
    opacity: 0;
    transition: opacity 1.5s ease-in-out;
    z-index: 0;
}

.hero-full.bg-loaded::before {
    opacity: 1;
}

.hero-full::after {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    /* Constant Dark Overlay */
    z-index: 1;
}

.hero-content {
    position: relative;
    z-index: 2;
    max-width: 900px;
    padding: 0 20px;
}

.hero-subtitle {
    display: inline-block;
    font-size: 1.2rem;
    letter-spacing: 4px;
    color: var(--accent-gold-solid);
    text-transform: uppercase;
    margin-bottom: 1rem;
}

.hero-actions {
    display: flex;
    justify-content: center;
    gap: 1.5rem;
    margin-top: 2.5rem;
}

/* --- Buttons --- */
.btn {
    padding: 1rem 3rem;
    font-family: var(--font-heading);
    font-size: 1.4rem;
    letter-spacing: 1px;
    text-transform: uppercase;
    transition: all 0.3s ease;
    display: inline-flex;
    align-items: center;
    gap: 10px;
    cursor: pointer;
}

.btn-gold {
    background: var(--gold-gradient);
    color: #1a1e26;
    font-weight: bold;
    border: none;
    box-shadow: 0 5px 15px rgba(212, 175, 55, 0.4);
}

.btn-gold:hover {
    transform: translateY(-3px);
    box-shadow: 0 10px 25px rgba(212, 175, 55, 0.6);
}

.btn-outline {
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.5);
    color: #fff;
    backdrop-filter: blur(5px);
}

.btn-outline:hover {
    background: #fff;
    color: #000;
}

/* --- Trust Strip --- */
.trust-strip {
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid var(--border-glass);
    padding: 3rem 0;
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    text-align: center;
}

.trust-item h4 {
    font-size: 3rem;
    color: var(--accent-gold-solid);
    margin-bottom: 0;
}

.trust-item span {
    font-size: 1rem;
    text-transform: uppercase;
    letter-spacing: 2px;
}

/* --- Cards & Grid --- */
.grid-3 {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 30px;
}

.feature-card {
    background: var(--bg-card);
    border: 1px solid var(--border-glass);
    padding: 3rem 2rem;
    transition: transform 0.4s ease;
    position: relative;
    overflow: hidden;
}

.feature-card:hover {
    transform: translateY(-10px);
    background: rgba(255, 255, 255, 0.08);
    border-color: var(--accent-gold-solid);
}

.feature-card svg {
    width: 64px;
    height: 64px;
    margin-bottom: 1.5rem;
    fill: var(--accent-gold-solid);
    transition: transform 0.3s ease;
}

.feature-card:hover svg {
    transform: scale(1.1);
}

.feature-card h3 {
    font-size: 2rem;
    color: var(--text-white);
    margin-bottom: 1rem;
}

/* --- Content Blocks --- */
.content-block {
    display: flex;
    align-items: center;
    gap: 4rem;
    margin-bottom: 4rem;
}

.content-block:nth-child(even) {
    flex-direction: row-reverse;
}

[dir="rtl"] .content-block:nth-child(even) {
    flex-direction: row;
}

.content-text {
    flex: 1;
}

.content-image {
    flex: 1;
}

.content-image img {
    width: 100%;
    border-radius: 4px;
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.5);
    border: 1px solid var(--border-glass);
}

/* --- Contact Section --- */
.contact-container {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2rem;
}

.contact-card {
    background: var(--bg-card);
    padding: 3rem;
    border: 1px solid var(--border-glass);
    text-align: center;
    transition: 0.3s;
}

.contact-card:hover {
    border-color: var(--accent-gold-solid);
}

.contact-name {
    display: block;
    font-family: var(--font-heading);
    font-size: 2.2rem;
    background: var(--gold-gradient);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
    margin-bottom: 1.5rem;
}

.contact-actions {
    display: flex;
    justify-content: center;
    gap: 15px;
    flex-wrap: wrap;
}

.btn-icon {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px 24px;
    border: 1px solid rgba(255, 255, 255, 0.2);
    background: rgba(255, 255, 255, 0.05);
    color: white;
    font-size: 1rem;
    border-radius: 5px;
    transition: 0.3s;
    text-transform: uppercase;
    font-weight: 500;
}

.btn-icon svg {
    width: 20px;
    height: 20px;
    fill: currentColor;
}

.btn-icon:hover {
    background: white;
    color: black;
}

.btn-whatsapp {
    background: rgba(37, 211, 102, 0.1);
    border-color: rgba(37, 211, 102, 0.4);
    color: #4ade80;
}

.btn-whatsapp:hover {
    background: #25D366;
    color: white;
}

/* --- Footer --- */
footer {
    border-top: 1px solid var(--border-glass);
    padding: 3rem 0;
    text-align: center;
    font-size: 0.9rem;
    color: rgba(255, 255, 255, 0.4);
    background: rgba(0, 0, 0, 0.2);
}

/* --- Animations --- */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.animate-up {
    animation: fadeInUp 0.8s var(--ease-out) forwards;
    opacity: 0;
}

.delay-100 {
    animation-delay: 0.1s;
}

.delay-200 {
    animation-delay: 0.2s;
}

.delay-300 {
    animation-delay: 0.3s;
}


/* --- MOBILE REDESIGN (COMPLETE OVERHAUL) --- */
@media (max-width: 900px) {

    /* 1. Global Reset for Mobile */
    html {
        font-size: 15px;
    }

    body {
        /* Ensure background matches requested spec on mobile too */
        background: linear-gradient(to top, var(--bg-dark-bottom), var(--bg-dark-top));
        background-attachment: scroll;
        /* Fixed attachment can be buggy on mobile */
    }

    .container {
        padding: 0 1.5rem;
    }

    section {
        padding: 4rem 0;
        text-align: center;
    }

    /* FORCE CENTER ALIGNMENT */

    /* 2. Header & Language Switcher Fixed */
    header {
        position: fixed;
        background: rgba(40, 48, 60, 0.98);
        padding: 10px 0;
        z-index: 999;
    }

    .header-container {
        flex-direction: row;
        /* Keep row */
        align-items: center;
        justify-content: center;
        /* Center Brand */
        position: relative;
        /* Anchor for absolute dropdown */
        padding: 0 1.5rem;
        direction: ltr;
        height: 50px;
        /* Explicit height to contain aligned items */
    }

    .brand-name {
        font-size: 1.5rem;
        position: absolute;
        /* Absolute center the brand */
        left: 50%;
        transform: translateX(-50%);
        width: auto;
        white-space: nowrap;
    }

    /* Dropdown Positioned to Right */
    .lang-dropdown {
        position: absolute;
        right: 1.5rem;
        top: 50%;
        transform: translateY(-50%);
        display: block !important;
        /* Override any potential hide */
    }

    /* Adjust dropdown button for mobile */
    .lang-btn {
        padding: 0.3rem 0.6rem;
        font-size: 0.8rem;
        border: none;
        /* Cleaner look on mobile header */
    }

    /* 3. Hero Fixes */
    .hero-full {
        padding-top: 90px;
        /* Reduced since header is thinner now */
        /* Space for double header */
        min-height: 100vh;
        height: auto;
        align-items: center;
        /* Center vertically */
    }

    .hero-content {
        width: 100%;
        padding: 0 10px;
    }

    h1 {
        font-size: 3rem;
        /* Readable on mobile */
        line-height: 1.1;
    }

    .hero-subtitle {
        font-size: 1rem;
    }

    .hero-actions {
        flex-direction: column;
        align-items: center;
        /* Added to prevent buttons from stretching */
        gap: 15px;
        width: 100%;
        padding: 0 10px;
    }

    .btn {
        width: auto;
        margin: 0 5px;
        justify-content: center;
    }

    /* 4. Content Alignment - No Side Skewing */
    p {
        text-align: center;
        margin-left: auto;
        margin-right: auto;
    }

    .trust-strip {
        grid-template-columns: 1fr;
        gap: 2rem;
    }

    .trust-item {
        border-right: none;
        border-bottom: 1px solid var(--border-glass);
        padding-bottom: 1.5rem;
    }

    .trust-item:last-child {
        border: none;
    }

    /* 5. Images Stack Correctly */
    .content-block,
    .content-block:nth-child(even),
    /* Fix alternating flip */
    [dir="rtl"] .content-block:nth-child(even) {
        flex-direction: column;
        gap: 2rem;
    }

    .content-image {
        width: 100%;
        order: -1;
    }

    /* Image on top */

    /* 6. Cards & Contacts */
    .grid-3,
    .contact-container {
        grid-template-columns: 1fr;
    }

    .contact-actions {
        flex-direction: column;
    }

    .btn-icon {
        width: 100%;
        justify-content: center;
    }

    /* --- RUSSIAN & TURKISH MOBILE FIXES --- */
    /* Prevents long words (e.g. ВОЗМОЖНОСТИ, БЕСПЕРЕБОЙНАЯ) from causing overflow */
    [lang="ru"] body,
    [lang="tr"] body {
        overflow-x: hidden;
        width: 100%;
    }

    [lang="ru"] h1,
    [lang="tr"] h1,
    [lang="ru"] h2,
    [lang="tr"] h2,
    [lang="ru"] h3,
    [lang="tr"] h3,
    [lang="ru"] .highlight,
    [lang="tr"] .highlight,
    [lang="ru"] p,
    [lang="tr"] p,
    [lang="ru"] .hero-subtitle,
    [lang="tr"] .hero-subtitle,
    [lang="ru"] .brand-name,
    [lang="tr"] .brand-name,
    [lang="ru"] .lang-switcher,
    [lang="tr"] .lang-switcher {
        word-wrap: break-word;
        overflow-wrap: break-word;
        word-break: break-word;
        /* Ensure wrapping */
        hyphens: auto;
        max-width: 100%;
        /* Force respect for container */
    }

    /* Force subtitle to wrap if needed */
    [lang="ru"] .hero-subtitle,
    [lang="tr"] .hero-subtitle {
        white-space: normal;
        font-size: 0.9rem;
        /* Smaller for RU */
        letter-spacing: 2px;
        /* Reduce spacing */
    }

    [lang="ru"] h1,
    [lang="tr"] h1 {
        font-size: 2rem;
        /* Drastic reduction for RU (was 5rem) */
        line-height: 1.2;
    }

    [lang="ru"] h2,
    [lang="tr"] h2 {
        font-size: 1.8rem;
        /* Drastic reduction for RU */
    }

    /* Fix Trust Strip Overflow in RU */
    [lang="ru"] .trust-item h4,
    [lang="tr"] .trust-item h4 {
        font-size: 2rem;
    }

    [lang="ru"] .trust-item span,
    [lang="tr"] .trust-item span {
        font-size: 0.8rem;
    }
}

/* --- LANGUAGE DROPDOWN STYLES --- */
.lang-dropdown {
    position: relative;
    display: inline-block;
}

.lang-btn {
    background: transparent;
    color: var(--text-light);
    border: 1px solid var(--accent-gold);
    padding: 0.5rem 1rem;
    font-size: 0.9rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    border-radius: 4px;
    transition: all 0.3s ease;
}

.lang-btn:hover {
    background: rgba(212, 175, 55, 0.1);
    color: var(--accent-gold);
}

.lang-content {
    display: none;
    position: absolute;
    top: 100%;
    right: 0;
    /* Align right for LTR/RTL safety */
    background-color: #0b0f19;
    /* Dark background */
    min-width: 160px;
    box-shadow: 0 8px 16px rgba(0, 0, 0, 0.5);
    border: 1px solid var(--accent-gold-dim);
    z-index: 1000;
    border-radius: 4px;
    margin-top: 5px;
}

.lang-content a {
    color: var(--text-gray);
    padding: 12px 16px;
    text-decoration: none;
    display: block;
    font-size: 0.9rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    display: flex;
    align-items: center;
    gap: 10px;
}

.lang-content a:last-child {
    border-bottom: none;
}

.lang-content a:hover {
    background-color: var(--accent-gold-dim);
    color: var(--text-light);
}

.lang-dropdown:hover .lang-content {
    display: block;
}

/* Mobile Responsive Dropdown */
@media (max-width: 900px) {
    .lang-content {
        position: fixed;
        /* Better mobile handling */
        top: 60px;
        right: 20px;
        left: auto;
    }
}

/* --- FORCE MOBILE HEADER OVERRIDES (Must be last) --- */
@media (max-width: 900px) {
    .header-container {
        flex-direction: row !important;
        justify-content: center !important;
        align-items: center !important;
        position: relative !important;
        height: 60px !important;
        padding: 0 10px !important;
        width: 100% !important;
        /* Fix 500px overflow issue */
        max-width: 100vw !important;
        direction: ltr !important;
        /* Force LTR layout for header elements */
    }

    .brand-name {
        position: absolute !important;
        left: 50% !important;
        transform: translateX(-50%) !important;
        font-size: 1.25rem !important;
        /* Smaller to prevent overlap */
        white-space: nowrap !important;
        width: auto !important;
        z-index: 10;
        margin: 0 !important;
        right: auto !important;
        /* Reset right */
    }

    /* Force Dropdown to Right */
    .lang-dropdown {
        position: absolute !important;
        right: 15px !important;
        top: 50% !important;
        transform: translateY(-50%) !important;
        display: block !important;
        width: auto !important;
        margin: 0 !important;
        z-index: 20;
        left: auto !important;
        /* Reset left */
    }

    /* Compact Button */
    .lang-btn {
        padding: 4px 8px !important;
        font-size: 0.8rem !important;
        background: rgba(0, 0, 0, 0.2) !important;
        /* Slight bg for contrast */
        border: 1px solid rgba(212, 175, 55, 0.4) !important;
    }

    /* Ensure Dropdown Menu doesn't break layout */
    .lang-content {
        position: fixed !important;
        top: 65px !important;
        right: 10px !important;
        width: 160px !important;
    }
}