/* --- Slider --- */
#home-slider {
    margin-bottom: 40px;
    position: relative;
}

.slider-item {
    width: 100%;
    height: 450px;
    background-size: cover;
    background-position: center;
    position: relative;
    display: flex;
    align-items: center;
}

.slider-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0,0,0,0.4); /* Qoramtir fon */
    z-index: 1;
}

.slider-content {
    position: relative;
    z-index: 2;
    width: 100%;
}

.slider-title a {
    color: #fff;
    font-size: 36px;
    font-weight: 700;
    text-shadow: 0 2px 4px rgba(0,0,0,0.5);
    background: none;
}

.slider-title a:hover {
    color: var(--secondary-color);
}

/* Mobil uchun slider balandligi */
@media (max-width: 768px) {
    .slider-item {
        height: 300px;
    }
    .slider-title a {
        font-size: 24px;
    }
}

/* --- Custom Slider Styles --- */
.custom-slider {
    position: relative;
    overflow: hidden;
    width: 100%;
}

.slider-wrapper {
    display: flex;
    transition: transform 0.5s ease-in-out;
    width: 100%;
}

.slider-slide {
    flex: 0 0 100%; /* Default 1 item */
    max-width: 100%;
    box-sizing: border-box;
    padding: 0 10px; /* Spacing between items */
}

/* Hero Slider Specifics */
.hero-slider .slider-slide {
    padding: 0;
}

.slider-nav {
    position: absolute;
    top: 50%;
    width: 100%;
    transform: translateY(-50%);
    display: flex;
    justify-content: space-between;
    pointer-events: none;
    z-index: 10;
}

.slider-nav button {
    pointer-events: auto;
    width: 45px;
    height: 45px;
    border-radius: 50%;
    background: var(--primary-color);
    color: #fff;
    border: none;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 30px;
    line-height: 1;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(0,0,0,0.2);
    opacity: 0.9;
    margin: 0 20px;
}

.slider-nav button:hover {
    background: var(--secondary-color);
    transform: scale(1.1);
    opacity: 1;
}

@media (max-width: 768px) {
    .slider-nav button {
        width: 35px;
        height: 35px;
        font-size: 24px;
        margin: 0 10px;
    }
}

/* --- Hero Video --- */
#hero-video {
    position: relative;
    width: 100%;
    height: 600px;
    overflow: hidden;
    background: #000;
}

.video-container {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
}

.video-container iframe {
    position: absolute;
    top: 50%;
    left: 50%;
    width: 100vw;
    height: 56.25vw;
    min-height: 100vh;
    min-width: 177.77vh;
    transform: translate(-50%, -50%) scale(1.2);
    pointer-events: none;
    border: 0;
}

.video-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.75);
    z-index: 1;
}

@media (max-width: 768px) {
    #hero-video {
        height: 500px;
    }
}

/* --- Hero Content --- */
.hero-content {
    position: absolute;
    top: 50%;
    left: 0;
    width: 100%;
    transform: translateY(-50%);
    z-index: 2;
    text-align: center;
    color: #fff;
}

.hero-content h1 {
    font-size: 48px;
    font-weight: 700;
    margin-bottom: 0;
    text-transform: uppercase;
    text-shadow: 0 2px 10px rgba(0,0,0,0.5);
    color: #fff;
}

.hero-content p {
    font-size: 20px;
    margin-bottom: 30px;
    max-width: 800px;
    margin-left: auto;
    margin-right: auto;
    text-shadow: 0 1px 5px rgba(0,0,0,0.5);
}

.hero-buttons .btn {
    display: inline-block;
    padding: 15px 40px;
    margin: 0 10px;
    border-radius: 50px;
    font-weight: 600;
    text-transform: uppercase;
    text-decoration: none;
    transition: all 0.3s ease;
}

.hero-buttons .btn-primary {
    background: var(--primary-color);
    color: #fff;
    border: 2px solid var(--primary-color);
}

.hero-buttons .btn-primary:hover {
    background: var(--secondary-color);
    border-color: var(--secondary-color);
    transform: translateY(-3px);
}

.hero-buttons .btn-outline {
    background: transparent;
    color: #fff;
    border: 2px solid #fff;
}

.hero-buttons .btn-outline:hover {
    background: #fff;
    color: var(--primary-color);
    transform: translateY(-3px);
}

@media (max-width: 768px) {
    .hero-content h1 {
        font-size: 28px;
    }
    .hero-content p {
        font-size: 16px;
    }
    .hero-buttons .btn {
        padding: 10px 25px;
        font-size: 14px;
        margin-bottom: 10px;
    }
}

/* --- Hero Rotating Title --- */
.rotating-title-wrapper {
    display: grid;
    grid-template-areas: "stack";
    justify-content: center;
    align-items: center;
    margin-bottom: 20px;
}

.rotating-item {
    grid-area: stack;
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.8s cubic-bezier(0.25, 0.46, 0.45, 0.94), transform 0.8s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

.rotating-item.active {
    opacity: 1;
    transform: translateY(0);
}

/* --- Company Stats --- */
#company-stats {
    padding: 80px 0 130px;
    background-color: var(--primary-color);
    background-image: linear-gradient(135deg, var(--primary-color) 0%, #2c326b 100%);
    color: #fff;
    text-align: center;
    position: relative;
    overflow: hidden;
}

.stat-box {
    padding: 20px 20px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: var(--radius);
    height: 100%;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    transition: all 0.3s ease;
}

.stat-box:hover {
    background: rgba(255, 255, 255, 0.15);
    transform: translateY(-10px);
    box-shadow: 0 15px 30px rgba(0,0,0,0.2);
    border-color: rgba(255, 255, 255, 0.3);
}

.stat-icon {
    margin-bottom: 20px;
    width: 70px;
    height: 70px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 50%;
    transition: all 0.3s ease;
}

.stat-box:hover .stat-icon {
    background: var(--secondary-color);
    transform: scale(1.1) rotate(5deg);
}

.stat-icon svg {
    width: 32px;
    height: 32px;
    fill: #fff;
}

.stat-number {
    display: block;
    font-size: 48px;
    font-weight: 700;
    margin-bottom: 10px;
    color: #fff;
    line-height: 1;
    transition: color 0.3s ease;
}

.stat-box:hover .stat-number {
    color: #fff;
}

.stat-label {
    font-size: 16px;
    font-weight: 500;
    line-height: 1.4;
    opacity: 0.9;
}

@media (max-width: 768px) {
    #company-stats .row {
        display: flex;
        flex-wrap: nowrap;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
        scroll-snap-type: x mandatory;
        padding-bottom: 10px;
        scrollbar-width: none; /* Firefox uchun scrollbarni yashirish */
        -ms-overflow-style: none; /* IE/Edge uchun */
    }

    #company-stats .row::-webkit-scrollbar {
        display: none; /* Chrome/Safari uchun scrollbarni yashirish */
    }

    #company-stats .three.columns {
        width: 80%;
        flex: 0 0 80%;
        scroll-snap-align: center;
        margin-bottom: 0;
    }

    .stat-box {
        padding: 8px 10px;
    }
}

/* --- Partners Carousel --- */
.partners-carousel-section {
    width: 100%;
    overflow: hidden;
    padding: 50px 0;
    position: relative;
}

.logo-slider {
    position: relative;
    width: 100%;
    margin: 0 auto;
    z-index: 1;
}

.slide-track {
    display: flex;
    width: calc(250px * 18);
    animation: scroll 30s linear infinite;
}

.slide {
    width: 250px;
    height: 120px;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0 30px;
}

.slide img {
    max-width: 100%;
    max-height: 120px;
    object-fit: contain;
    filter: grayscale(100%);
    opacity: 0.6;
    transition: all 0.4s ease;
}

.slide img:hover {
    filter: grayscale(0%);
    opacity: 1;
    transform: scale(1.05);
}

@keyframes scroll {
    0% {
        transform: translateX(0);
    }
    100% {
        transform: translateX(calc(-250px * 9));
    }
}

@media (max-width: 768px) {
    .slide {
        width: 180px;
        padding: 0 15px;
    }
    .slide-track {
        width: calc(180px * 18);
    }
    @keyframes scroll {
        0% { transform: translateX(0); }
        100% { transform: translateX(calc(-180px * 9)); }
    }
}

/* --- Home Promo Sections --- */
.home-promo-section {
    position: relative;
    background-size: cover;
    background-position: center;
    height: 500px;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    color: #fff;
}

.home-promo-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0,0,0,0.5);
    z-index: 1;
}

.home-promo-content {
    position: relative;
    z-index: 2;
    width: 100%;
    padding: 0;
}

.home-promo-content h2 {
    color: #fff;
    font-size: 42px;
    font-weight: 700;
    text-transform: uppercase;
    margin-bottom: 30px;
    text-shadow: 0 2px 4px rgba(0,0,0,0.5);
}

@media (max-width: 768px) {
    .home-promo-section {
        height: 350px;
    }
    .home-promo-content h2 {
        font-size: 24px;
    }
}

/* --- Catalog & Project Items (Home) --- */
.cat_item {
    background: #fff;
    border-radius: var(--radius);
    box-shadow: var(--shadow-sm);
    transition: all 0.3s ease;
    overflow: hidden;
    margin-bottom: 30px;
    border: 1px solid #f0f0f0;
    text-align: center;
    padding: 0;
}

.cat_item:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-md);
    border-color: transparent;
}

.cat_item img {
    width: 100%;
    height: auto;
    aspect-ratio: 4 / 3;
    object-fit: cover;
    border-bottom: 1px solid #f9f9f9;
}

.cat_item p {
    padding: 15px;
    margin: 0;
    font-weight: 600;
    color: var(--primary-color);
    font-size: 16px;
}

/* --- Blog Card UI/UX (Home) --- */
.blog-card {
    background: #fff;
    border-radius: var(--radius);
    box-shadow: var(--shadow-sm);
    transition: all 0.3s ease;
    overflow: hidden;
    height: 100%;
    display: flex;
    flex-direction: column;
    border: 1px solid #eee;
}

.blog-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-md);
    border-color: transparent;
}

.blog-card-image {
    display: block;
    height: 180px;
    overflow: hidden;
    position: relative;
}

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

.blog-card:hover .blog-card-image img {
    transform: scale(1.05);
}

.blog-card-content {
    padding: 20px;
    display: flex;
    flex-direction: column;
    flex-grow: 1;
}

.blog-card-meta {
    font-size: 12px;
    color: #999;
    margin-bottom: 10px;
}

.blog-card-title {
    font-size: 18px;
    font-weight: 700;
    margin: 0 0 15px;
    line-height: 1.4;
}

.blog-card-title a {
    color: var(--text-color);
    text-decoration: none;
    transition: color 0.3s;
}

.blog-card-title a:hover {
    color: var(--primary-color);
}

.blog-card-link {
    margin-top: auto;
    font-weight: 600;
    font-size: 12px;
    border: 1px solid var(--primary-color);
    color: var(--primary-color);
    padding: 6px 15px;
    border-radius: 50px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    box-shadow: 0 4px 6px rgba(58, 66, 140, 0.2);
    width: fit-content;
}

.blog-card-link:hover {
    background-color: var(--primary-color);
    color: #fff;
    transform: translateY(-2px);
    box-shadow: 0 6px 12px rgba(34, 107, 243, 0.3);
    text-decoration: none;
}
