/* ====================================
   Homepage Specific Styles
   ==================================== */

/* Hero Section */
.hero-section {
    position: relative;
    margin-bottom: 40px;
}

.hero-slider {
    position: relative;
    overflow: hidden;
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-lg);
}

.hero-slide {
    display: none;
    position: relative;
}

.hero-slide.active {
    display: block;
}

.hero-slide-image {
    width: 100%;
    height: 500px;
    object-fit: cover;
}

.hero-slide-content {
    position: absolute;
    bottom: 50px;
    left: 50px;
    max-width: 600px;
    background-color: rgba(255, 255, 255, 0.95);
    padding: 30px;
    border-radius: var(--radius-md);
}

.hero-slide-subtitle {
    font-size: 14px;
    color: var(--primary-color);
    font-weight: 600;
    text-transform: uppercase;
    margin-bottom: 10px;
}

.hero-slide-title {
    font-size: 36px;
    font-weight: 700;
    color: var(--text-dark);
    margin-bottom: 15px;
    line-height: 1.2;
}

.hero-slide-description {
    font-size: 16px;
    color: var(--text-gray);
    margin-bottom: 20px;
    line-height: 1.6;
}

/* Hero Slider Controls */
.hero-slider-dots {
    position: absolute;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 10px;
    z-index: 2;
}

.hero-slider-dot {
    width: 12px;
    height: 12px;
    border-radius: var(--radius-full);
    background-color: rgba(255, 255, 255, 0.5);
    cursor: pointer;
    transition: all var(--transition-base);
}

.hero-slider-dot.active {
    background-color: var(--primary-color);
    width: 30px;
}

/* Hero Sidebar */
.hero-sidebar {
    display: grid;
    gap: 20px;
}

.promo-card {
    position: relative;
    overflow: hidden;
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-md);
    height: 240px;
}

.promo-card-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.promo-card-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(to bottom, rgba(0,0,0,0.2), rgba(0,0,0,0.7));
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    padding: 20px;
    color: var(--white);
}

.promo-card-title {
    font-size: 20px;
    font-weight: 600;
    margin-bottom: 10px;
}

.promo-card-cta {
    color: var(--primary-color);
    font-weight: 600;
    font-size: 14px;
}

/* News Section */
.news-section {
    background-color: var(--white);
    padding: 30px;
    height: 400px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.news-section-title {
    font-size: 20px;
    font-weight: 600;
    color: var(--text-dark);
    margin-bottom: 20px;
    padding-bottom: 10px;
    border-bottom: 2px solid var(--primary-color);
}

.news-item {
    margin-bottom: 20px;
}

.news-item-image {
    width: 100%;
    object-fit: cover;
    border-radius: var(--radius-sm);
    margin-bottom: 15px;
}

.news-item-title {
    font-size: 16px;
    font-weight: 600;
    color: var(--text-dark);
    margin-bottom: 10px;
}

.news-item-excerpt {
    font-size: 14px;
    color: var(--text-gray);
    line-height: 1.6;
    margin-bottom: 10px;
}

/* Slider Section */
.slider-section {
    margin-top: 40px;
    position: relative;
}

.slider-container {
    position: relative;
    overflow: hidden;
    padding: 0 50px 5px;
}

.slider-track {
    display: flex;
    gap: 20px;
    transition: transform 0.4s ease-in-out;
    padding-top: 4px;
}

.slider-item {
    flex: 0 0 calc(25% - 15px);
    background-color: var(--white);
    border-radius: var(--radius-md);
    overflow: hidden;
    box-shadow: var(--shadow-sm);
    display: flex;
    flex-direction: column;
}

.slider-item-image-overlay {
    min-height: 200px;
    max-height: 200px;
}

.slider-item-image {
    height: 100%;
    max-width: 100%;
    object-fit: contain;
    object-position: center;
    display: block;
    margin: 0 auto;
}

.slider-item-content {
    padding: 20px;
    display: flex;
    flex-direction: column;
    flex: 1;
}

.slider-item-text {
    font-size: 14px;
    color: var(--text-gray);
    margin-bottom: 15px;
    line-height: 1.6;
}

.read-more-link {
    justify-self: end;
    margin-top: auto;
}

.slider-arrow {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 40px;
    height: 40px;
    border-radius: var(--radius-full);
    background-color: var(--primary-color);
    color: var(--text-dark);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    z-index: 2;
    transition: all var(--transition-base);
    border: none;
}

.slider-arrow:hover {
    background-color: var(--primary-dark);
}

.slider-arrow.left {
    left: 8px;
}

.slider-arrow.right {
    right: 8px;
}

/* Rotator */
.rotator-section {
    position: relative;
    background-color: var(--white);
    border-radius: var(--radius-md);
    overflow: hidden;
    box-shadow: var(--shadow-md);
    margin-top: 30px;
    margin-bottom: 30px;
}

.rotator-slide {
    display: none;
    position: relative;
}

.rotator-slide.active {
    display: flex;
    justify-content: center;
    align-items: center;
}

.rotator-image {
    display: flex;
    flex: 0 0 50%;
    min-height: 320px;
    max-height: 320px;
    justify-content: center;
    align-items: center;
}

.rotator-image img {
    margin: 0 auto;
}

.rotator-content {
    flex: 1;
    padding: 50px;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.rotator-subtitle {
    font-size: 14px;
    color: var(--primary-color);
    font-weight: 600;
    text-transform: uppercase;
    margin-bottom: 10px;
}

.rotator-title {
    font-size: 32px;
    font-weight: 700;
    color: var(--text-dark);
    margin-bottom: 15px;
    line-height: 1.2;
}

.rotator-description {
    font-size: 16px;
    color: var(--text-gray);
    line-height: 1.6;
    margin-bottom: 25px;
}

.rotator-dots {
    display: flex;
    gap: 10px;
    margin-top: 20px;
    margin-bottom: 10px;
    justify-content: center;
}

.rotator-dot {
    width: 12px;
    height: 12px;
    border-radius: var(--radius-full);
    background-color: var(--border-color);
    cursor: pointer;
    transition: all var(--transition-base);
}

.rotator-dot.active {
    background-color: var(--primary-color);
}

/* Make rotator full width when no news section */
.row:has(> .col-8 > .rotator-section):not(:has(.col-4 .news-section)) .col-8 {
    flex: 0 0 100%;
    max-width: 100%;
}

/* Banners Section */
.banners-section {
    margin-bottom: 40px;
}

.banners-container {
    position: relative;
    width: 100%;
    overflow: hidden;
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-md);
}

.banner-slide {
    display: none;
    width: 100%;
}

.banner-slide.active {
    display: block;
}

.banner-link {
    display: block;
    width: 100%;
}

.banner-image {
    width: 100%;
    height: auto;
    display: block;
    cursor: pointer;
    transition: opacity 0.3s ease;
}

.banner-link:hover .banner-image {
    opacity: 0.9;
}

.banner-dots {
    display: flex;
    gap: 10px;
    padding: 15px 0;
    justify-content: center;
    background-color: var(--white);
    margin: 0;
    list-style: none;
}

.banner-dot {
    width: 12px;
    height: 12px;
    border-radius: var(--radius-full);
    background-color: var(--border-color);
    cursor: pointer;
    transition: all var(--transition-base);
}

.banner-dot:hover {
    background-color: var(--primary-light);
}

.banner-dot.active {
    background-color: var(--primary-color);
    transform: scale(1.2);
}

/* Media Queries */
@media (max-width: 1200px) {
    .hero-section .col-8,
    .hero-section .col-4 {
        flex: 0 0 100%;
        max-width: 100%;
    }

    .hero-section .col-4 .news-section {
        padding: 10px;
        height: auto;
    }
}

/* Responsive Homepage */
@media (max-width: 992px) {
    .hero-slide-content {
        max-width: 500px;
        padding: 25px;
    }
    
    .hero-slide-title {
        font-size: 28px;
    }
    
    .rotator-slide {
        flex-direction: column;
    }
    
    .rotator-image {
        flex: 1;
    }
    
    .slider-item {
        flex: 0 0 calc(50% - 10px);
    }
}

@media (max-width: 768px) {
    .hero-slide-image {
        height: 350px;
    }
    
    .hero-slide-content {
        bottom: 30px;
        left: 30px;
        right: 30px;
        max-width: 100%;
        padding: 20px;
    }
    
    .hero-slide-title {
        font-size: 24px;
    }
    
    .promo-card {
        height: 180px;
    }
    
    .rotator-content {
        padding: 30px;
    }
    
    .rotator-title {
        font-size: 24px;
    }
    
    .slider-container {
        padding: 0 40px 5px;
    }
    
    .slider-item {
        flex: 0 0 100%;
    }

    .slider-item-text {
        text-align: center;
    }

    /* Hide banners below 768px */
    .banners-section {
        display: none;
    }
}

@media (max-width: 576px) {
    .hero-slide-image {
        height: 250px;
    }
    
    .hero-slide-content {
        position: relative;
        bottom: auto;
        left: auto;
        right: auto;
        border-radius: 0;
    }
    
    .hero-slide-title {
        font-size: 20px;
    }
    
    .slider-container {
        padding: 0 30px 5px;
    }

    .slider-arrow {
        width: 32px;
        height: 32px;
        font-size: 14px;
    }
}
