/**
 * Sweets Website
 * =============================================================
 * File: latest-news.css
 * Description: Styles for the Latest News Updates section
 * =============================================================
 */

.c-latest-news {
    position: relative;
    overflow: hidden;
}

.c-latest-news .container {
    position: relative;
    z-index: 2;
}

/* ── Decorative Background Elements ── */
.c-latest-news::before {
    content: '';
    position: absolute;
    top: 50%;
    left: -10px;
    width: clamp(150px, 10vw, 100px);
    height: 100%;
    background-image: url('../../images/homepage/ChatGPT_Image_Mar_10__2026__02_50_06_PM-removebg-preview 14.png');
    background-repeat: no-repeat;
    background-size: contain;
    background-position: left center;
    pointer-events: none;
    transform: translateY(-50%);
    z-index: 1;
    opacity: 0.6;
}

.c-latest-news::after {
    content: '';
    position: absolute;
    top: 20%;
    right: 10px;
    width: clamp(150px, 10vw,100px);
    height: 100%;
    background-image: url('../../images/homepage/ChatGPT_Image_Mar_10__2026__02_50_06_PM-removebg-preview 12.png');
    background-repeat: no-repeat;
    background-size: contain;
    background-position: right center;
    pointer-events: none;
    transform: translateY(-50%);
    z-index: 1;
    opacity: 0.6;
}

.c-latest-news__title {
    font-family: var(--ff-heading, 'Quando', serif);
    font-size: clamp(1.8rem, 5vw, 2.5rem);
    color: #7b1d1d; /* Maroon to match branding */
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 1.5rem;
    width: 100%;
}

.c-header-icon {
    flex-shrink: 0;
   width: clamp(55px, 15vw, 200px);/* Increased size per USER request */
    height: auto;
    display: block;
}

.c-header-text {
    flex: 0 1 auto;
}

.c-latest-news__swiper {
    padding-bottom: 50px !important;
}

.c-latest-news__swiper .swiper-wrapper {
    height: auto !important;
}

.c-news-card {
    background: #fff;
    border-radius: 12px;
    overflow: hidden;
    height: 100%;
    display: flex;
    flex-direction: column;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.05);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    border: 1px solid #f0f0f0;
}

.c-news-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 12px 30px rgba(74, 29, 26, 0.1);
}

.c-news-card__img-wrap {
    width: 100%;
    overflow: hidden;
    background: #f8f8f8;
}

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

.c-news-card:hover .c-news-card__img-wrap img {
    transform: scale(1.05);
}

.c-news-card__content {
    padding: clamp(1rem, 3vw, 1.5rem);
    flex-grow: 1;
    display: flex;
    flex-direction: column;
}

.c-news-card__date {
    font-size: clamp(0.75rem, 2vw, 0.85rem);
    color: #d67a18;
    font-weight: 600;
    margin-bottom: 0.5rem;
}

.c-news-card__headline {
    font-family: var(--ff-heading, 'Quando', serif);
    font-size: clamp(1.1rem, 3vw, 1.35rem);
    color: #4a1d1a;
    font-weight: 700;
    line-height: 1.3;
    margin-bottom: 1rem;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.c-news-card__desc {
    font-size: clamp(0.85rem, 2vw, 0.95rem);
    color: #666;
    line-height: 1.6;
    margin-bottom: 1.5rem;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.c-news-card__btn {
    background: linear-gradient(90deg, #7b1d1d 0%, #d67a18 100%);
    color: #fff !important;
    font-weight: 700;
    padding: 10px 25px;
    border-radius: 6px;
    font-size: 0.9rem;
    align-self: flex-start;
    border: none;
    transition: all 0.3s ease;
    margin-top: auto;
}

.c-news-card__btn:hover {
    box-shadow: 0 5px 15px rgba(214, 122, 24, 0.3);
    transform: scale(1.02);
}

/* ── Autoplay Toggle ── */
.c-latest-news__toggle {
    background: #fff;
    border: 1px solid rgba(74, 29, 26, 0.1);
    color: #4a1d1a;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.05);
}

.c-latest-news__toggle:hover {
    background: #4a1d1a;
    color: #fff;
    transform: scale(1.1);
}

/* Custom Pagination with Progress effect */
.latest-news-pagination {
    bottom: 0px !important;
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 12px;
    margin-top: 30px;
}

.latest-news-pagination .swiper-pagination-bullet {
    width: 40px;
    height: 4px;
    background: rgba(214, 122, 24, 0.15);
    opacity: 1;
    border-radius: 10px;
    margin: 0 !important;
    position: relative;
    overflow: hidden;
    transition: all 0.3s ease;
    cursor: pointer;
}

.latest-news-pagination .swiper-pagination-bullet-active {
    background: rgba(214, 122, 24, 0.3);
}

/* Internal fill bar for progress */
.latest-news-pagination .swiper-pagination-bullet::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    height: 100%;
    width: 0;
    background: #d67a18;
    border-radius: 10px;
}

/* Active slide progress fill */
.latest-news-pagination .swiper-pagination-bullet-active::before {
    width: calc(var(--progress, 0) * 100%);
    background: #7b1d1d;
}

@media (max-width: 991.98px) {
    .latest-news-next,
    .latest-news-prev {
        display: none !important;
    }

    .c-latest-news::before,
    .c-latest-news::after {
        display: none !important;
    }
}

@media (max-width: 767.98px) {
    .c-latest-news {
        padding: 3rem 0 !important;
    }

    .c-latest-news__title {
        font-size: 1.75rem !important;
        text-align: center;
        width: 100%;
    }
}

/* ── Mobile Optimization (426px) ── */
@media (max-width: 426px) {
    .c-latest-news {
        padding: 2.5rem 0 !important;
    }

    .c-latest-news__title {
        font-size: 1.45rem !important;
        gap: 1rem !important;
        justify-content: center !important;
    }

    .c-header-icon {
        width: 110px !important;
    }

    .c-news-card__content {
        padding: 1.25rem 1rem !important;
    }

    .c-news-card__headline {
        font-size: 1.15rem !important;
        margin-bottom: 0.75rem !important;
    }

    .c-news-card__desc {
        font-size: 0.85rem !important;
        line-height: 1.5;
        margin-bottom: 1.25rem !important;
    }

    .c-news-card__date {
        font-size: 0.75rem !important;
    }
}

@media (max-width: 320px) {
    .c-latest-news__title {
        font-size: 1.25rem !important;
    }
    .c-header-icon {
        width: 90px !important;
    }
        .c-latest-news__title       {
            font-size: 0.99rem !important;
        }
}