:root {
    --primary: #8e1819;
    --primary-dark: #6d1213;
    --secondary: #000000;
    --light: #ffffff;
    --gray: #f4f4f4;
    --text-dark: #333333;
    --text-light: #f0f0f0;
    --gradient: linear-gradient(135deg, #1a1a1a 0%, #8e1819 100%);
    --glass: rgba(255, 255, 255, 0.1);
    --glass-border: rgba(255, 255, 255, 0.2);
    --shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
    --transition: all 0.3s ease;
}

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

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Manrope', sans-serif;
    color: var(--text-dark);
    line-height: 1.6;
    background-color: var(--light);
}

h1,
h2,
h3,
h4,
h5,
h6 {
    font-family: 'Montserrat', sans-serif;
    font-weight: 700;
    line-height: 1.2;
}

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

ul {
    list-style: none;
}

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

/* --- Navigation --- */
.navbar {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 1000;
    padding: 20px 0;
    transition: var(--transition);
    background: transparent;
}

.navbar.scrolled {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    box-shadow: 0 2px 20px rgba(0, 0, 0, 0.1);
    padding: 15px 0;
}

.nav-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    display: flex;
    align-items: center;
    position: relative;
}

.logo-img {
    height: 50px;
    width: auto;
    object-fit: contain;
    transition: opacity 0.3s ease;
}

/* Logo handling for sticky header:
   Reverting to simple black filter for visibility on white background. */
.navbar.scrolled .logo-img {
    height: 45px;
    opacity: 1;
    filter: brightness(0);
}

/* Remove the mask pseudo-element */
.navbar.scrolled .logo::after {
    display: none;
    content: none;
}

.nav-links {
    display: flex;
    align-items: center;
    gap: 30px;
}

.nav-links li a {
    color: var(--light);
    font-weight: 500;
    font-size: 0.95rem;
    position: relative;
}

.navbar.scrolled .nav-links li a {
    color: var(--text-dark);
}

.nav-links li a::after {
    content: '';
    position: absolute;
    bottom: -5px;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--primary);
    transition: width 0.3s;
}

.nav-links li a:hover::after {
    width: 100%;
}

.nav-phone {
    background: var(--primary);
    padding: 8px 18px;
    border-radius: 50px;
    color: var(--light) !important;
    font-weight: 600;
}

.nav-phone:hover {
    background: var(--primary-dark);
    transform: translateY(-2px);
}

.hamburger {
    display: none;
    color: var(--light);
    font-size: 1.5rem;
    cursor: pointer;
}

.navbar.scrolled .hamburger {
    color: var(--secondary);
}

/* --- Hero Section --- */
.hero {
    height: 100vh;
    min-height: 700px;
    background: url('https://images.unsplash.com/photo-1541888946425-d81bb19240f5?q=80&w=2670&auto=format&fit=crop') no-repeat center center/cover;
    position: relative;
    display: flex;
    align-items: center;
    color: var(--light);
    overflow: hidden;
}

.hero-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(to right, rgba(0, 0, 0, 0.9), rgba(0, 0, 0, 0.5), rgba(142, 24, 25, 0.4));
}

.hero-content {
    position: relative;
    z-index: 2;
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
}

.hero-text {
    flex: 1;
    max-width: 600px;
}

.hero-title {
    font-size: 4rem;
    line-height: 1.1;
    margin-bottom: 20px;
}

.highlight {
    color: var(--primary);
    text-shadow: 0 0 20px rgba(142, 24, 25, 0.3);
}

.hero-subtitle {
    font-size: 1.1rem;
    margin-bottom: 40px;
    color: rgba(255, 255, 255, 0.85);
    max-width: 500px;
}

.hero-buttons {
    display: flex;
    gap: 20px;
}

.btn {
    padding: 14px 32px;
    border-radius: 50px;
    font-weight: 600;
    font-size: 1rem;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 10px;
}

.btn-primary {
    background: var(--primary);
    color: var(--light);
    border: 2px solid var(--primary);
}

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

.btn-outline {
    background: transparent;
    color: var(--light);
    border: 2px solid var(--light);
}

.btn-outline:hover {
    background: var(--light);
    color: var(--secondary);
}

.hero-stats {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.glass-card {
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 16px;
    padding: 20px;
    display: flex;
    align-items: center;
    gap: 15px;
    min-width: 200px;
    transition: var(--transition);
}

.stat-card:hover {
    background: rgba(255, 255, 255, 0.2);
    transform: translateX(-10px);
}

.stat-icon {
    font-size: 2rem;
    color: var(--primary);
}

.stat-info h3 {
    font-size: 1.2rem;
    margin-bottom: 2px;
}

.stat-info p {
    font-size: 0.9rem;
    opacity: 0.8;
}

/* --- Features Section --- */
.section-padding {
    padding: 80px 0;
}

.section-header {
    text-align: center;
    margin-bottom: 60px;
}

.section-header h2 {
    font-size: 2.5rem;
    color: var(--secondary);
}

.text-primary {
    color: var(--primary);
}

.line {
    width: 60px;
    height: 4px;
    background: var(--primary);
    margin: 15px auto;
    border-radius: 2px;
}

.section-header p {
    color: #666;
    max-width: 600px;
    margin: 0 auto;
}

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

.feature-box {
    padding: 40px 30px;
    background: var(--light);
    border-radius: 20px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.05);
    text-align: center;
    border-bottom: 4px solid transparent;
    transition: var(--transition);
}

.feature-box:hover {
    transform: translateY(-10px);
    border-bottom-color: var(--primary);
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.1);
}

.feature-icon {
    width: 70px;
    height: 70px;
    background: rgba(142, 24, 25, 0.1);
    color: var(--primary);
    font-size: 1.8rem;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 20px;
    transition: var(--transition);
}

.feature-box:hover .feature-icon {
    background: var(--primary);
    color: var(--light);
}

.feature-box h3 {
    margin-bottom: 15px;
    font-size: 1.3rem;
}

.feature-box p {
    color: #666;
    font-size: 0.95rem;
}

/* --- Products Section --- */
.bg-light {
    background-color: var(--gray);
}

.products-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 25px;
}

.product-card {
    background: var(--light);
    border-radius: 16px;
    overflow: hidden;
    position: relative;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.05);
    transition: var(--transition);
    border: 1px solid transparent;
}

.product-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 30px rgba(0, 0, 0, 0.1);
    border-color: rgba(142, 24, 25, 0.1);
}

.product-content {
    padding: 30px;
}

.product-icon {
    font-size: 2rem;
    color: var(--primary);
    margin-bottom: 20px;
}

.product-card h3 {
    font-size: 1.25rem;
    margin-bottom: 10px;
    color: var(--text-dark);
}

.product-card p {
    color: #666;
    font-size: 0.9rem;
    line-height: 1.5;
}

.highlight-card {
    background: var(--primary);
    color: var(--light);
}

.highlight-card .product-icon,
.highlight-card h3,
.highlight-card p {
    color: var(--light);
}

/* --- Contact Section --- */
.contact {
    background: url(https://images.unsplash.com/photo-1504917595217-d4dc5ebe6122?q=80&w=2070&auto=format&fit=crop) no-repeat center center/cover;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
}

.contact::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
}

.contact-wrapper {
    position: relative;
    z-index: 2;
    text-align: center;
    max-width: 800px;
    margin: 0 auto;
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(15px);
    padding: 60px 40px;
}

.contact-text h2 {
    color: var(--light);
    font-size: 2.5rem;
    margin-bottom: 15px;
}

.contact-text p {
    color: rgba(255, 255, 255, 0.8);
    margin-bottom: 30px;
    font-size: 1.1rem;
}

.contact-links {
    display: flex;
    justify-content: center;
    gap: 20px;
    margin-bottom: 30px;
}

.social-btn {
    padding: 12px 28px;
    border-radius: 50px;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 10px;
    transition: var(--transition);
}

.telegram {
    background: #0088cc;
    color: white;
}

.telegram:hover {
    background: #0077b5;
    transform: translateY(-3px);
}

.whatsapp {
    background: #25D366;
    color: white;
}

.whatsapp:hover {
    background: #20bd5a;
    transform: translateY(-3px);
}

.phone-block a {
    color: var(--light);
    font-size: 1.5rem;
    font-weight: 700;
}

.phone-block a:hover {
    color: var(--primary);
}

/* --- Footer --- */
.footer {
    background: var(--secondary);
    color: var(--light);
    padding: 30px 0;
    text-align: center;
}

.footer-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
}

.footer-logo {
    font-size: 1.2rem;
    font-weight: 800;
}

.footer-logo-img {
    height: 60px;
    margin-bottom: 10px;
}

.copyright {
    font-size: 0.8rem;
    opacity: 0.5;
}


/* --- Responsive Fixes --- */
html,
body {
    overflow-x: hidden;
    width: 100%;
    position: relative;
}

@media (max-width: 1024px) {
    .container {
        width: 90%;
        padding: 0 15px;
    }

    .hero-title {
        font-size: 3rem;
    }
}

@media (max-width: 768px) {
    .nav-links {
        position: fixed;
        right: -100%;
        top: 0;
        height: 100vh;
        width: 80%;
        /* Slightly wider menu for better mobile feel */
        background: var(--light);
        flex-direction: column;
        justify-content: center;
        box-shadow: -5px 0 30px rgba(0, 0, 0, 0.1);
        transition: var(--transition);
        padding: 40px;
    }

    .nav-links.active {
        right: 0;
    }

    .nav-links li a {
        color: var(--text-dark);
        font-size: 1.2rem;
    }

    .hamburger {
        display: block;
        z-index: 1001;
    }

    .navbar.scrolled .hamburger,
    .nav-links.active~.hamburger {
        color: var(--text-dark);
    }

    /* Ensure hero content fits */
    .hero-content {
        flex-direction: column;
        text-align: center;
        justify-content: center;
        width: 100%;
    }

    .hero-text {
        margin-bottom: 40px;
        width: 100%;
    }

    .hero-title {
        font-size: 2.5rem;
        /* Smaller font to prevent overflow */
        word-wrap: break-word;
    }

    .hero-stats {
        flex-direction: row;
        width: 100%;
        overflow-x: auto;
        padding-bottom: 20px;
        scroll-snap-type: x mandatory;
        /* Snap scrolling */
        gap: 15px;
        justify-content: flex-start;
        /* Allow scroll */
    }

    .stat-card {
        min-width: 220px;
        /* Wider cards for better content fit */
        scroll-snap-align: center;
        flex-shrink: 0;
    }

    .hero-buttons {
        flex-direction: column;
        width: 100%;
        gap: 15px;
    }

    .section-header h2 {
        font-size: 2rem;
    }

    /* Fix Contact Wrapper Padding */
    .contact-wrapper {
        padding: 40px 20px;
        width: 100%;
        margin-top: 0;
    }

    .contact-text h2 {
        font-size: 1.8rem;
    }

    .contact-links {
        flex-direction: column;
        width: 100%;
    }

    .social-btn {
        width: 100%;
        justify-content: center;
    }

    /* Ensure marquee doesn't break layout */
    .partners-marquee {
        width: 100%;
        margin-left: 0;
    }
}

@media (max-width: 480px) {
    .hero-title {
        font-size: 2.2rem;
    }

    .hero-subtitle {
        font-size: 1rem;
    }
}

/* --- Partners Marquee --- */
.partners-marquee {
    overflow: hidden;
    padding: 20px 0;
    position: relative;
    background: var(--light);
    width: 100%;
}

.partners-marquee::before,
.partners-marquee::after {
    top: 0;
    width: 100px;
    height: 100%;
    z-index: 2;
}

.partners-marquee::before {
    left: 0;
    background: linear-gradient(to right, var(--light), transparent);
}

.partners-marquee::after {
    right: 0;
    background: linear-gradient(to left, var(--light), transparent);
}

.marquee-content {
    display: flex;
    width: max-content;
    animation: scroll 30s linear infinite;
}

.partner-logo {
    font-size: 1.5rem;
    color: #ccc;
    font-weight: 700;
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 0 40px;
    white-space: nowrap;
    transition: var(--transition);
}

.partner-logo:hover {
    color: var(--primary);
    transform: scale(1.05);
}

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

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

/* Adjust contact section padding if needed */
.contact-wrapper {
    margin-top: 20px;
}