/**
 * Module 3-Why - CSS-Only Carousel Styles
 * 
 * @package HDev_Theme
 */

/* ========================================
   Section Container
======================================== */
.hdev-bst-section {
    padding: 80px 0;
    overflow: hidden;
    display: flex;
    align-items: center;
}

.hdev-bst-container {
    width: 100%;
    max-width: none;
    margin: 0;
    padding: 0;
}

/* ========================================
   Section Header
======================================== */
.hdev-bst-header {
    text-align: left;
    margin-bottom: 50px;
    margin-left: auto;
    margin-right: auto;
    padding-right: 135px;
    position: relative;
}

/* Large screens: max-width container-md */
@media (min-width: 1600px) {
    .hdev-bst-header {
        max-width: var(--container-width-md);
    }
}

/* Medium screens: max-width container-sm */
@media (max-width: 1599px) and (min-width: 850px) {
    .hdev-bst-header {
        max-width: var(--container-width-sm);
    }
}

/* ========================================
   Section Titles
======================================== */
.hdev-bst-title-1 {
    font-family: var(--hdev-font-subheading);
    font-size: var(--hdev-fs-subheading-opt);
    color: var(--hdev-gold);
    font-weight: 300;
    font-style: italic;
    text-shadow: none;
    text-transform: none;
    line-height: 1.2;
}

.hdev-bst-title-2 {
    font-family: var(--hdev-font-heading);
    font-size: var(--hdev-fs-heading-opt);
    color: var(--hdev-color-heading-text);
    line-height: 1.1;
    text-transform: uppercase;
}

/* ========================================
   Navigation Arrows
======================================== */
.hdev-bst-nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 60px;
    height: 60px;
    background: transparent;
    border: none;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    z-index: 10;
    transition: all 0.3s ease;
    color: #2c3e50;
    padding: 0;
}

.hdev-bst-nav:hover {
    opacity: 0.7;
}

.hdev-bst-prev {
    right: 60px;
}

.hdev-bst-next {
    right: 0;
}

/* ========================================
   Carousel Wrapper
======================================== */
/* Large screens: 1600px and above */
@media (min-width: 1600px) {
    .hdev-bst-carousel-wrapper {
        padding-left: calc((100% - var(--container-width-md)) / 2);
    }
}

/* Medium screens: 850px to 1599px */
@media (max-width: 1599px) and (min-width: 850px) {
    .hdev-bst-carousel-wrapper {
        padding-left: calc((100% - 1200px) / 2 + 60px);
    }
}

/* ========================================
   Carousel Track
======================================== */
.hdev-bst-carousel {
    overflow: hidden;
    position: relative;
}

.hdev-bst-track {
    display: flex;
    gap: 30px;
    padding-bottom: 10px;
    transition: transform 0.6s cubic-bezier(0.215, 0.610, 0.355, 1.000);
    will-change: transform;
}

/* ========================================
   Pagination Dots
======================================== */
.hdev-bst-pagination {
    display: none;
}

/* ========================================
   Card Styling
======================================== */
.hdev-bst-card-item {
    flex: 0 0 calc((100% - 90px) / 3.25);
    min-width: calc((100% - 90px) / 3.25);
    border-radius: 12px;
    overflow: hidden;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    display: flex;
    flex-direction: column;
}

.hdev-bst-card-image {
    position: relative;
    aspect-ratio: 16/9;
    overflow: hidden;
    border-radius: 12px;
}

.hdev-bst-card-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.hdev-bst-card-item:hover .hdev-bst-card-image img {
    transform: scale(1.1);
}

.hdev-bst-card-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(to top, rgba(0, 0, 0, 0.4) 0%, transparent 50%);
    pointer-events: none;
}

/* ========================================
   Card Number Badge
======================================== */
.hdev-bst-card-number {
    position: absolute;
    bottom: 15px;
    left: 15px;
    width: auto;
    height: auto;
    background: transparent;
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: var(--hdev-font-heading);
    font-size: 30px;
    font-weight: 400;
    color: #fff;
    text-shadow: 0 2px 8px rgba(0, 0, 0, 0.5);
    z-index: 2;
}

/* ========================================
   Card Title
======================================== */
.hdev-bst-card-title {
    padding: 20px 0;
    font-size: var(--hdev-fs-h5);
    line-height: 1.3;
    text-align: left;
    display: flex;
    align-items: center;
    justify-content: flex-start;
}

/* ========================================
   RESPONSIVE STYLES
======================================== */

/* Desktop & Laptop (≥850px) */
@media (min-width: 850px) {
    .hdev-bst-section {
        min-height: 100vh;
    }
}

/* Tablet (≤1024px) */
@media (max-width: 1024px) {
    .hdev-bst-section {
        padding: 60px 0;
    }

    .hdev-bst-card-item {
        flex: 0 0 calc((100% - 30px) / 2.15);
        min-width: calc((100% - 30px) / 2.15);
    }

    .hdev-bst-nav {
        width: 40px;
        height: 40px;
    }
}

/* Mobile (≤768px) */
@media (max-width: 768px) {
    .hdev-bst-section {
        padding: 0;
    }

    .hdev-bst-container {
        padding: 0 15px;
    }

    .hdev-bst-header {
        display: flex;
        justify-content: space-between;
        align-items: flex-start;
        margin-bottom: 0;
        padding: 30px;
        gap: 15px;
        position: static;
    }

    .hdev-bst-titles {
        flex: 1;
    }

    .hdev-bst-nav-group {
        display: flex;
        gap: 5px;
        flex-shrink: 0;
    }

    .hdev-bst-carousel-wrapper {
        padding-left: 0;
        padding-right: 0;
    }

    .hdev-bst-track {
        gap: 0;
    }

    .hdev-bst-card-item {
        flex: 0 0 100%;
        min-width: 100%;
        padding: 0 15px;
    }

    .hdev-bst-nav {
        position: static !important;
        transform: none;
        width: 35px;
        height: 35px;
        margin: 0 !important;
        right: auto;
    }

    .hdev-bst-nav svg {
        width: 35px;
        height: 35px;
    }

    .hdev-bst-card-number {
        width: 40px;
        height: 40px;
        font-size: 16px;
        bottom: 10px;
        left: 10px;
    }

    .hdev-bst-card-title {
        font-size: 14px;
        padding: 15px;
        min-height: 60px;
    }

    .hdev-bst-pagination {
        display: flex;
        justify-content: center;
        align-items: center;
        padding: 10px 0;
    }

    .hdev-bst-dot {
        border-radius: 50%;
        background: #717171;
        border: none;
        padding: 0;
        cursor: pointer;
        transition: all 0.3s ease;
        min-height: 0.5em;
        min-width: 0.5em;
    }

    .hdev-bst-dot.active {
        background: var(--color-primary, #004f38);
    }
}