:root {
    --primary-color: #CC0000;
    --primary-dark: #a30000;
    --secondary-color: #212529;
    --text-color: #333333;
    --light-bg: #f8f9fa;
    --white: #ffffff;
    --font-main: 'Roboto', sans-serif;
    --container-width: 1200px;
    --transition: all 0.3s ease;
}

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

body {
    font-family: var(--font-main);
    color: var(--text-color);
    line-height: 1.6;
    background-color: var(--white);
}

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

ul {
    list-style: none;
}

.container {
    max-width: var(--container-width);
    margin: 0 auto;
    padding: 0 20px;
}

/* Utilities */
.btn {
    display: inline-block;
    padding: 12px 30px;
    background-color: var(--primary-color);
    color: var(--white);
    font-weight: 700;
    text-transform: uppercase;
    border-radius: 4px;
    border: none;
    cursor: pointer;
    font-size: 0.9rem;
    letter-spacing: 1px;
}

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

.btn-lg {
    padding: 15px 40px;
    font-size: 1.1rem;
}

.section-padding {
    padding: 80px 0;
}

.section-title {
    font-size: 2.5rem;
    color: var(--secondary-color);
    text-align: center;
    margin-bottom: 3rem;
    position: relative;
    padding-bottom: 1rem;
    font-weight: 700;
}

.section-title::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 60px;
    height: 4px;
    background-color: var(--primary-color);
}

/* Header */
header {
    background-color: var(--white);
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    position: sticky;
    top: 0;
    z-index: 1000;
    padding: 15px 0;
    transition: var(--transition);
}

header.scrolled {
    padding: 10px 0;
}

.header-inner {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.main-nav ul {
    display: flex;
    gap: 30px;
}

.main-nav a {
    font-weight: 500;
    color: var(--secondary-color);
    font-size: 1.05rem;
}

.main-nav a:hover,
.main-nav a.active {
    color: var(--primary-color);
}


.mobile-toggle {
    display: none;
    background: none;
    border: none;
    cursor: pointer;
    flex-direction: column;
    gap: 5px;
}

.mobile-toggle span {
    width: 25px;
    height: 3px;
    background-color: var(--secondary-color);
    transition: var(--transition);
}

/* Hero Section */
.hero {
    height: 600px;
    background-color: #222;
    /* Fallback color */
    position: relative;
    display: flex;
    align-items: center;
    text-align: center;
    color: var(--white);
    overflow: hidden;
    /* Ensure video doesn't overflow */
}

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

.hero-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.6);
    /* Overlay for text readability */
    z-index: 2;
}

.hero-content {
    max-width: 800px;
    position: relative;
    z-index: 3;
    /* Ensure content is above video and overlay */
}

.hero h1 {
    font-size: 3.5rem;
    font-weight: 900;
    margin-bottom: 20px;
    line-height: 1.2;
}

.hero p {
    font-size: 1.2rem;
    margin-bottom: 30px;
    opacity: 0.9;
}

/* Stats Section */
.stats {
    background-color: var(--white);
    padding: 60px 0;
    border-bottom: 1px solid #eee;
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 30px;
    text-align: center;
}

.stat-item .number {
    display: block;
    font-size: 2.5rem;
    font-weight: 900;
    color: var(--primary-color);
    margin-bottom: 5px;
}

.stat-item .label {
    color: #666;
    font-weight: 500;
}

/* Products Carousel */
.carousel-wrapper {
    position: relative;
    padding: 0 50px;
    /* Space for arrows */
}

.carousel-container {
    overflow: hidden;
    margin: 0 -15px;
    /* Offset gap */
    padding: 20px 15px;
    /* Add padding for shadow/hover effects so they don't get cut off */
}

.carousel-track {
    display: flex;
    transition: transform 0.5s ease;
    gap: 30px;
    /* Use gap for spacing between items */
}

.product-card {
    flex: 0 0 calc(25% - 22.5px);
    /* 4 items minus gap adjustment (30px * 3 / 4 = 22.5px) */
    /* Mobile fallback handled in media query */
    background: var(--white);
    border: 1px solid #eee;
    border-radius: 8px;
    overflow: hidden;
    transition: var(--transition);
    text-align: center;
    padding-bottom: 20px;
    height: 100%;
}

.product-card:hover {
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
    transform: translateY(-5px);
}

.product-card h3 {
    color: var(--secondary-color);
    margin: 15px 0 10px;
    font-size: 1.4rem;
}

.product-card p {
    color: #666;
    padding: 0 15px;
}

.carousel-btn {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: var(--white);
    border: 1px solid #eee;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    cursor: pointer;
    font-size: 1.2rem;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
    z-index: 10;
    transition: var(--transition);
}

.carousel-btn:hover {
    background: var(--primary-color);
    color: var(--white);
    border-color: var(--primary-color);
}

.carousel-btn.prev {
    left: 0;
}

.carousel-btn.next {
    right: 0;
}

/* Applications */
.applications-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 20px;
}

.app-item {
    background: var(--white);
    padding: 30px 20px;
    text-align: center;
    border-radius: 8px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.05);
    font-weight: 700;
    color: var(--secondary-color);
    transition: var(--transition);
    border-bottom: 3px solid transparent;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 15px;
}

.app-item img {
    height: 60px;
    object-fit: contain;
    margin-bottom: 10px;
}

.app-item:hover {
    border-bottom-color: var(--primary-color);
    color: var(--primary-color);
    transform: translateY(-5px);
}

.featured-apps-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 30px;
}

.featured-app-block {
    position: relative;
    border-radius: 8px;
    overflow: hidden;
    height: 300px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}

.featured-app-block img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.featured-app-block:hover img {
    transform: scale(1.05);
}

.featured-text {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    background: linear-gradient(to top, rgba(0, 0, 0, 0.8), transparent);
    padding: 20px;
    color: #fff;
}

.featured-text h3 {
    font-size: 1.4rem;
    margin-bottom: 5px;
}

.featured-text p {
    font-size: 0.9rem;
    opacity: 0.9;
}

/* Global Partners */
.partners-grid {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 30px;
    flex-wrap: wrap;
    padding: 20px 0;
}

.partners-grid img {
    max-height: 80px;
    filter: none;
    opacity: 1;
    transition: var(--transition);
}

.partners-grid img:hover {
    transform: scale(1.1);
}

/* Latest News */
.news-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
}

.news-item {
    background: var(--white);
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.05);
    transition: var(--transition);
}

.news-item:hover {
    transform: translateY(-5px);
}

.news-img {
    height: 200px;
    overflow: hidden;
}

.news-img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.news-item:hover .news-img img {
    transform: scale(1.05);
}

.news-content {
    padding: 20px;
}

.news-content .date {
    font-size: 0.85rem;
    color: #888;
    display: block;
    margin-bottom: 10px;
}

.news-content h3 {
    font-size: 1.2rem;
    margin-bottom: 15px;
    color: var(--secondary-color);
}

.read-more {
    font-size: 0.9rem;
    color: var(--primary-color);
    font-weight: 500;
}

/* Distributor Section */
.distributor-section {
    background-size: cover;
    background-position: center;
    background-attachment: fixed;
    padding: 100px 0;
    text-align: center;
    color: var(--white);
}

.distributor-content h2 {
    font-size: 2.5rem;
    margin-bottom: 20px;
}

.distributor-content p {
    font-size: 1.2rem;
    max-width: 700px;
    margin: 0 auto 30px;
    opacity: 0.9;
}

/* Footer */
footer {
    background-color: #1a1a1a;
    color: #ccc;
    padding: 60px 0 20px;
}

.footer-content {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 40px;
    margin-bottom: 40px;
}

.footer-col h3 {
    color: var(--white);
    margin-bottom: 20px;
    font-size: 1.2rem;
    border-left: 3px solid var(--primary-color);
    padding-left: 10px;
}

.footer-col ul li {
    margin-bottom: 10px;
}

.footer-col ul li a:hover {
    color: var(--primary-color);
    padding-left: 5px;
}

.footer-bottom {
    border-top: 1px solid #333;
    padding-top: 20px;
    text-align: center;
    font-size: 0.9rem;
}

/* Responsive */
@media (max-width: 768px) {
    .header-inner {
        flex-wrap: wrap;
    }

    .mobile-toggle {
        display: flex;
    }

    .main-nav {
        display: none;
        width: 100%;
        order: 3;
        margin-top: 20px;
    }

    .main-nav.active {
        display: block;
    }

    .main-nav ul {
        flex-direction: column;
        gap: 15px;
        text-align: center;
    }

    .header-actions {
        display: flex;
        align-items: center;
        gap: 15px;
    }

    .hero h1 {
        font-size: 2.5rem;
    }

    .featured-apps-grid {
        grid-template-columns: 1fr;
    }

    .featured-app-block {
        height: 250px;
    }

    .partners-grid {
        gap: 30px;
    }

    /* Carousel Responsive */
    .carousel-wrapper {
        padding: 0;
        /* Remove side padding on mobile */
    }

    .carousel-btn {
        display: none;
        /* Hide buttons on mobile if touch scroll preferred, or adjust pos */
    }

    /* Keep buttons but make them smaller/overlay if needed, or just let user scroll */
    .carousel-container {
        overflow-x: auto;
        /* Allow native scroll on mobile */
        scroll-snap-type: x mandatory;
        padding-bottom: 20px;
        /* Space for scrollbar if visible */
    }

    .carousel-track {
        gap: 15px;
    }

    .product-card {
        flex: 0 0 85%;
        /* Show part of next card */
        scroll-snap-align: center;
    }
}