/**
 * Homepage: special announcements list and featured products carousel (TCL styling).
 */

/* --- Important announcements (default: compact dark strip) --- */
.tcl-home-special-notifications {
    background: linear-gradient(180deg, #0d3b5c 0%, #0a2f4a 100%);
    color: #fff;
    padding: 1.25rem 0 1.5rem;
    margin: 0;
}

/* Homepage: match About / WHAT’S NEW — light band + white panel */
.tcl-special-notifications-home.tcl-home-special-notifications {
    background: linear-gradient(180deg, #eef4f9 0%, #f8fafc 42%, #ffffff 100%);
    border-top: 1px solid rgba(11, 92, 173, 0.1);
    border-bottom: 1px solid rgba(11, 92, 173, 0.08);
    color: #0f2f57;
    padding: 2.5rem 0;
}

.tcl-special-notifications-home .tcl-home-special-notifications__panel {
    background: #ffffff;
    border: 1px solid rgba(15, 47, 87, 0.1);
    border-radius: 14px;
    box-shadow:
        0 4px 24px rgba(15, 47, 87, 0.06),
        0 1px 0 rgba(255, 255, 255, 0.8) inset;
    padding: clamp(1.1rem, 2.5vw, 1.65rem) clamp(1.25rem, 3vw, 2rem);
    position: relative;
}

.tcl-special-notifications-home .tcl-home-special-notifications__panel::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    border-radius: 14px 14px 0 0;
    background: linear-gradient(90deg, #0b5cad 0%, #0f2f57 55%, rgba(11, 92, 173, 0.35) 100%);
    pointer-events: none;
}

.tcl-special-notifications-home .tcl-section-head {
    margin-bottom: 1rem;
    padding-bottom: 0.65rem;
    border-bottom: 1px solid rgba(15, 47, 87, 0.1);
}

.tcl-special-notifications-home .tcl-section-head__title {
    color: #0f2f57;
}

.tcl-special-notifications-home .tcl-section-head__action {
    color: #0b5cad;
    border: none;
    padding: 0;
    border-radius: 0;
    font-size: 0.95rem;
}

.tcl-special-notifications-home .tcl-section-head__action:hover {
    background: transparent;
    color: #084a8f;
    text-decoration: underline;
}

.tcl-special-notifications-home .tcl-home-special-notifications__item {
    border-bottom-color: rgba(15, 47, 87, 0.1);
}

.tcl-special-notifications-home .tcl-home-special-notifications__date {
    color: #64748b;
}

.tcl-special-notifications-home .tcl-home-special-notifications__link {
    color: #0f2f57;
    font-weight: 600;
}

.tcl-special-notifications-home .tcl-home-special-notifications__link:hover {
    color: #0b5cad;
}

@media (max-width: 768px) {
    .tcl-special-notifications-home.tcl-home-special-notifications {
        padding: 1.5rem 0;
    }

    .tcl-special-notifications-home .tcl-home-special-notifications__panel {
        padding: 1.1rem 1.15rem;
        border-radius: 12px;
    }
}

.tcl-home-special-notifications__inner {
    position: relative;
}

.tcl-home-special-notifications__list {
    list-style: none;
    margin: 0;
    padding: 0;
    display: grid;
    gap: 0;
}

.tcl-home-special-notifications__item {
    display: grid;
    grid-template-columns: 110px 1fr;
    gap: 1rem;
    align-items: baseline;
    padding: 0.65rem 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.12);
}

.tcl-home-special-notifications__item:last-child {
    border-bottom: 0;
}

.tcl-home-special-notifications__date {
    font-size: 0.82rem;
    font-weight: 600;
    color: rgba(255, 255, 255, 0.85);
    white-space: nowrap;
}

.tcl-home-special-notifications__link {
    color: #fff;
    font-weight: 500;
    text-decoration: none;
    line-height: 1.45;
}

.tcl-home-special-notifications__link:hover {
    color: #b8e6ff;
    text-decoration: underline;
}

@media (max-width: 576px) {
    .tcl-home-special-notifications__item {
        grid-template-columns: 1fr;
        gap: 0.25rem;
    }
}

/* --- Important announcements: vertical marquee (homepage, 2+ items) — bottom-to-top scroll --- */
.tcl-home-special-notifications--marquee .tcl-home-special-notifications__marquee-viewport {
    overflow: hidden;
    max-height: 11rem;
    position: relative;
}

@media (min-width: 577px) {
    .tcl-home-special-notifications--marquee .tcl-home-special-notifications__marquee-viewport {
        max-height: 12.5rem;
    }
}

.tcl-home-special-notifications--marquee .tcl-home-special-notifications__marquee-track {
    display: flex;
    flex-direction: column;
    width: 100%;
    animation: tcl-special-announce-marquee-up 40s linear infinite;
    will-change: transform;
}

.tcl-home-special-notifications--marquee .tcl-home-special-notifications__marquee-viewport:hover .tcl-home-special-notifications__marquee-track,
.tcl-home-special-notifications--marquee .tcl-home-special-notifications__marquee-viewport:focus-within .tcl-home-special-notifications__marquee-track {
    animation-play-state: paused;
}

@keyframes tcl-special-announce-marquee-up {
    from {
        transform: translate3d(0, 0, 0);
    }
    to {
        transform: translate3d(0, -50%, 0);
    }
}

@media (prefers-reduced-motion: reduce) {
    .tcl-home-special-notifications--marquee .tcl-home-special-notifications__marquee-track {
        animation: none !important;
        transform: none !important;
    }

    .tcl-home-special-notifications--marquee .tcl-home-special-notifications__marquee-viewport {
        max-height: none;
        overflow: visible;
    }

    .tcl-home-special-notifications--marquee .tcl-home-special-notifications__list[aria-hidden='true'] {
        display: none !important;
    }
}

/* --- Featured products --- */
.tcl-home-featured-products {
    background: #f4f8fb;
    padding: 2.5rem 0 3rem;
    border-top: 1px solid #dde8f0;
    border-bottom: 1px solid #dde8f0;
}

.tcl-home-featured-products__slider-wrap {
    position: relative;
    padding: 0 2.5rem;
}

/* Swiper: let slide height follow card content so images are not clipped to zero */
.tcl-home-featured-products .swiper-slide {
    display: flex;
    height: auto;
    align-items: stretch;
}

.tcl-home-featured-products .swiper-slide .tcl-home-product-card {
    width: 100%;
    min-width: 0;
}

.tcl-home-product-card {
    background: #fff;
    border-radius: 12px;
    overflow: hidden;
    border: 1px solid rgba(11, 92, 173, 0.12);
    box-shadow: 0 8px 22px rgba(15, 47, 87, 0.08);
    height: 100%;
    display: flex;
    flex-direction: column;
}

.tcl-home-product-card__media {
    display: block;
    width: 100%;
    background: #e8eef4;
    overflow: hidden;
    text-decoration: none;
}

/* Inner box: stable aspect + positioning context (works inside Swiper transforms) */
.tcl-home-product-card__media-inner {
    display: block;
    position: relative;
    width: 100%;
    height: 0;
    padding-bottom: 62.5%; /* 10 / 16 = 62.5% (16:10) */
    overflow: hidden;
    background: #e8eef4;
}

@supports (aspect-ratio: 16 / 10) {
    .tcl-home-product-card__media-inner {
        height: auto;
        padding-bottom: 0;
        aspect-ratio: 16 / 10;
        min-height: 200px;
    }
}

/* Force full-bleed cover; beat WP "sizes=auto" tiny picks + theme img rules */
.tcl-home-featured-products .tcl-home-product-card__media-inner img,
.tcl-home-featured-products .tcl-home-product-card__media-inner .tcl-home-product-card__img,
.tcl-home-featured-products .tcl-home-product-card__media-inner img.wp-post-image {
    position: absolute !important;
    top: 0 !important;
    left: 0 !important;
    right: 0 !important;
    bottom: 0 !important;
    width: 100% !important;
    height: 100% !important;
    max-width: none !important;
    max-height: none !important;
    margin: 0 !important;
    object-fit: cover !important;
    object-position: center !important;
    display: block !important;
}

.tcl-home-product-card__body {
    padding: 1rem 1rem 1.15rem;
    flex: 1;
    display: flex;
    flex-direction: column;
}

.tcl-home-product-card__title {
    margin: 0 0 0.65rem;
    font-size: 1rem;
    line-height: 1.35;
    flex: 1;
}

.tcl-home-product-card__title a {
    color: #143d67;
    text-decoration: none;
}

.tcl-home-product-card__title a:hover {
    color: #0b5cad;
}

.tcl-home-product-card__cta {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    font-weight: 700;
    font-size: 0.88rem;
    color: #0b5cad;
    text-decoration: none;
}

.tcl-home-product-card__cta:hover {
    color: #084a8f;
}

.tcl-home-featured-products .swiper-pagination-bullet-active {
    background: #0b5cad;
}

.tcl-home-featured-products .swiper-button-prev,
.tcl-home-featured-products .swiper-button-next {
    color: #0b5cad;
}

.tcl-home-featured-products .swiper-button-prev::after,
.tcl-home-featured-products .swiper-button-next::after {
    font-size: 1.25rem;
}

@media (max-width: 768px) {
    .tcl-home-featured-products__slider-wrap {
        padding: 0 0.25rem;
    }

    .tcl-home-featured-products .swiper-button-prev,
    .tcl-home-featured-products .swiper-button-next {
        display: none;
    }
}

@media (prefers-reduced-motion: reduce) {
    .tcl-home-featured-products .swiper-wrapper {
        transition-duration: 0.01ms !important;
    }
}
