/*
 * Triple e Digital - Blog Listing Styles
 * File: /templates/wavo/css/blog.css
 */

/* -----------------------------------------------------------------------
   FULL BLEED BREAKOUT
----------------------------------------------------------------------- */

#sp-component .sp-column .blogblog-page,
#sp-component .sp-column .com-content-category-blog {
    position: relative;
    width: 100vw !important;
    max-width: 100vw !important;
    margin-left: calc(-50vw + 50%) !important;
    margin-right: calc(-50vw + 50%) !important;
    padding: 0 !important;
    left: 0;
    box-sizing: border-box;
    overflow-x: hidden;
}

/* -----------------------------------------------------------------------
   RESET JOOMLA WRAPPERS
----------------------------------------------------------------------- */

.com-content-category-blog__items,
.com-content-category-blog__item,
.article-list,
.article-list .row,
.article-list .col-lg-12,
.article-list .article {
    margin: 0 !important;
    padding: 0 !important;
    width: 100% !important;
    max-width: 100% !important;
    flex: 0 0 100% !important;
    box-sizing: border-box;
}

.article-list .row {
    margin-left: 0 !important;
    margin-right: 0 !important;
}

.com-content-category-blog__children {
    display: none;
}

/* -----------------------------------------------------------------------
   ROW - BASE STRUCTURE
   80px stripe | 420px image | 1fr text (odd)
   1fr text | 420px image | 80px stripe (even)
----------------------------------------------------------------------- */

.brief-row {
    display: grid;
    grid-template-columns: 80px 420px 1fr;
    height: 260px;
    max-height: 260px;
    width: 100%;
    overflow: hidden;
    box-sizing: border-box;
    position: relative;
    isolation: isolate;
}

.brief-row.even {
    grid-template-columns: 1fr 420px 80px;
}

/* -----------------------------------------------------------------------
   GRID COLUMN PLACEMENT
----------------------------------------------------------------------- */

.brief-row.odd .brief-stripe.labeled  { grid-column: 1; grid-row: 1; z-index: 2; }
.brief-row.odd .brief-img             { grid-column: 1 / 3; grid-row: 1; z-index: 1; }
.brief-row.odd .brief-text            { grid-column: 3; grid-row: 1; z-index: 1; }

.brief-row.even .brief-text           { grid-column: 1; grid-row: 1; z-index: 1; }
.brief-row.even .brief-img            { grid-column: 2 / 4; grid-row: 1; z-index: 1; }
.brief-row.even .brief-stripe.labeled { grid-column: 3; grid-row: 1; z-index: 2; }

.brief-stripe.plain {
    display: none !important;
}

/* -----------------------------------------------------------------------
   STRIPES - BASE
----------------------------------------------------------------------- */

.brief-stripe {
    display: block;
    overflow: hidden;
    flex-shrink: 0;
    width: 80px;
    min-width: 80px;
    position: relative;
    z-index: 2;
    transition: transform 0.9s cubic-bezier(0.22, 1, 0.36, 1);
}

.tee-row.odd .brief-stripe.labeled,
.brief-row.odd .brief-stripe.labeled {
    transform: translateX(-80px);
}

.tee-row.even .brief-stripe.labeled,
.brief-row.even .brief-stripe.labeled {
    transform: translateX(80px);
}

.brief-row.stripe-in .brief-stripe {
    transform: translateX(0);
}

/* -----------------------------------------------------------------------
   STRIPES - LABELED
----------------------------------------------------------------------- */

.brief-stripe.labeled {
    font-family: 'Bayon', sans-serif;
    font-size: 110px;
    letter-spacing: 0;
    text-transform: uppercase;
    color: rgba(255, 255, 255, 0.3);
    white-space: nowrap;
    padding: 0;
    line-height: 80px;
    overflow: hidden;
    height: 260px;
    max-height: 260px;
    width: 80px;
    max-width: 80px;
    text-align: center;
    position: relative;
}

.brief-row.odd .brief-stripe.labeled {
    writing-mode: vertical-rl;
    transform: translateX(-80px) rotate(180deg);
    padding-right: 5px;
}

.brief-row.odd.stripe-in .brief-stripe.labeled {
    transform: translateX(0) rotate(180deg);
}

.brief-row.even .brief-stripe.labeled {
    writing-mode: vertical-rl;
    transform: translateX(80px);
    padding-right: 5px;
}

.brief-row.even.stripe-in .brief-stripe.labeled {
    transform: translateX(0);
}

/* -----------------------------------------------------------------------
   IMAGE COLUMN
----------------------------------------------------------------------- */

.brief-img {
    overflow: hidden;
    height: 100%;
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #b8b8b8;
    position: relative;
    z-index: 1;
}

.brief-img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform 0.6s cubic-bezier(0.22, 1, 0.36, 1);
    will-change: transform;
}

.brief-row:hover .brief-img img {
    transform: scale(1.06);
}

.brief-img span {
    font-family: 'Questrial', sans-serif;
    font-size: 11px;
    color: #888;
    letter-spacing: 1px;
    text-transform: uppercase;
}

/* -----------------------------------------------------------------------
   TEXT BODY
----------------------------------------------------------------------- */

.brief-text {
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding: 28px 48px;
    overflow: hidden;
    box-sizing: border-box;
    height: 100%;
    gap: 12px;
    position: relative;
    z-index: 1;
}

.brief-top {
    display: flex;
    flex-direction: column;
    gap: 8px;
    overflow: visible;
}

/* -----------------------------------------------------------------------
   HEADLINE
----------------------------------------------------------------------- */

.brief-headline {
    font-family: 'Geist', sans-serif;
    font-size: clamp(18px, 2.4vw, 38px);
    font-weight: 800;
    line-height: 1.15;
    text-transform: none;
    margin: 0;
    color: #ffffff;
    word-wrap: break-word;
    overflow-wrap: break-word;
}

.brief-headline a {
    color: inherit;
    text-decoration: none;
}

.brief-headline a:hover {
    text-decoration: none;
}

/* -----------------------------------------------------------------------
   EXCERPT
----------------------------------------------------------------------- */

.brief-excerpt {
    font-family: 'Questrial', sans-serif;
    font-size: clamp(12px, 1.1vw, 15px);
    line-height: 1.5;
    margin: 0;
    overflow: hidden;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
}

/* -----------------------------------------------------------------------
   META + BUTTON ROW
----------------------------------------------------------------------- */

.brief-bottom {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: nowrap;
    gap: 12px;
    flex-shrink: 0;
}

.brief-meta {
    font-family: 'Questrial', sans-serif;
    font-size: clamp(10px, 0.85vw, 12px);
    opacity: 0.75;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* -----------------------------------------------------------------------
   BUTTON
----------------------------------------------------------------------- */

.brief-btn {
    display: inline-block;
    background: transparent;
    padding: 10px 22px;
    border-radius: 0;
    position: relative;
    overflow: hidden;
    cursor: pointer;
    flex-shrink: 0;
    text-decoration: none;
    transition: none;
}

.brief-btn span {
    font-family: 'Questrial', sans-serif;
    font-size: clamp(10px, 0.85vw, 12px);
    text-transform: uppercase;
    letter-spacing: 2px;
    position: relative;
    z-index: 2;
    transition: color 0.8s;
    white-space: nowrap;
    display: block;
}

.brief-btn::after {
    content: '';
    position: absolute;
    top: -10px;
    left: -10px;
    right: -10px;
    bottom: 100%;
    border-radius: 0 0 100% 100% / 0 0 100% 100%;
    transition: all 0.6s cubic-bezier(1, 0, 0.55, 1);
}

.brief-btn:hover::after {
    bottom: -10px;
    border-radius: 0;
}

/* -----------------------------------------------------------------------
   COLOR RULES - YELLOW ROWS
----------------------------------------------------------------------- */

.row-yellow .brief-stripe         { background: #F5E333; }
.row-yellow .brief-text           { background: #F5E333; }
.row-yellow .brief-headline       { color: #ffffff; }
.row-yellow .brief-excerpt        { color: rgba(0, 0, 0, 0.8); }
.row-yellow .brief-meta           { color: #000000; }
.row-yellow .brief-btn            { border: 1px solid #545555; }
.row-yellow .brief-btn span       { color: #545555; }
.row-yellow .brief-btn::after     { background: #545555; }
.row-yellow .brief-btn:hover span { color: #ffffff; }

/* -----------------------------------------------------------------------
   COLOR RULES - BLUE ROWS
----------------------------------------------------------------------- */

.row-blue .brief-stripe           { background: #63CAEB; }
.row-blue .brief-text             { background: #63CAEB; }
.row-blue .brief-headline         { color: #ffffff; }
.row-blue .brief-excerpt          { color: rgba(255, 255, 255, 0.8); }
.row-blue .brief-meta             { color: #ffffff; }
.row-blue .brief-btn              { border: 1px solid #ffffff; }
.row-blue .brief-btn span         { color: #ffffff; }
.row-blue .brief-btn::after       { background: #F5E333; }
.row-blue .brief-btn:hover span   { color: #545555; }

/* -----------------------------------------------------------------------
   COLOR RULES - CHARCOAL ROWS
----------------------------------------------------------------------- */

.row-charcoal .brief-stripe           { background: #545555; }
.row-charcoal .brief-text             { background: #545555; }
.row-charcoal .brief-headline         { color: #ffffff; }
.row-charcoal .brief-excerpt          { color: rgba(255, 255, 255, 0.8); }
.row-charcoal .brief-meta             { color: #ffffff; }
.row-charcoal .brief-btn              { border: 1px solid #ffffff; }
.row-charcoal .brief-btn span         { color: #ffffff; }
.row-charcoal .brief-btn::after       { background: #F5E333; }
.row-charcoal .brief-btn:hover span   { color: #545555; }


/* -----------------------------------------------------------------------
   RESPONSIVE - 768px and below
----------------------------------------------------------------------- */

@media (max-width: 768px) {

    #sp-component .sp-column .blogblog-page,
    #sp-component .sp-column .com-content-category-blog {
        margin-left: 0 !important;
        margin-right: 0 !important;
        width: 100% !important;
    }

    .brief-row,
    .brief-row.even {
        display: flex;
        flex-direction: column;
        height: auto !important;
        max-height: none !important;
        overflow: visible;
        width: 100%;
    }

    .brief-stripe.labeled,
    .brief-stripe.plain {
        display: none !important;
    }

    .brief-row::before {
        content: '';
        display: block;
        height: 12px;
        width: 100%;
        flex-shrink: 0;
        order: -1;
    }

    .row-yellow::before   { background: #F5E333; }
    .row-blue::before     { background: #63CAEB; }
    .row-charcoal::before { background: #545555; }

    .brief-img {
        width: 100% !important;
        height: 260px !important;
        flex-shrink: 0;
        order: 0;
    }

    .brief-text {
        padding: 20px 24px 24px;
        height: auto !important;
        justify-content: flex-start;
        gap: 12px;
        order: 1;
        width: 100%;
        box-sizing: border-box;
    }

    .brief-headline {
        font-size: clamp(20px, 5vw, 28px);
    }

    .brief-excerpt {
        font-size: 15px;
        -webkit-line-clamp: unset;
    }

    .brief-meta {
        font-size: 12px;
        white-space: normal;
    }

    .brief-bottom {
        flex-wrap: wrap;
    }
}

/* -----------------------------------------------------------------------
   RESPONSIVE - 480px and below
----------------------------------------------------------------------- */

@media (max-width: 480px) {

    .brief-img {
        height: 200px !important;
    }

    .brief-headline {
        font-size: clamp(18px, 5.5vw, 24px);
    }

    .brief-text {
        padding: 16px 18px 20px;
    }
}

/* -----------------------------------------------------------------------
   ACCESSIBILITY - Reduced motion
----------------------------------------------------------------------- */

@media (prefers-reduced-motion: reduce) {

    .brief-stripe,
    .brief-img img,
    .brief-btn::after,
    .brief-btn span {
        transition: none !important;
        transform: none !important;
    }

    .brief-row.stripe-in .brief-stripe {
        transform: translateX(0);
    }
}

#brief-carousel-section {
    width: 100% !important;
    max-width: 100% !important;
    left: 0 !important;
}

#brief-carousel-section .sppb-container-inner,
#brief-carousel-section .sppb-row {
    width: 100% !important;
    max-width: 100% !important;
    margin-left: 0 !important;
    margin-right: 0 !important;
    padding-left: 0 !important;
    padding-right: 0 !important;
}

#brief-carousel-section .sppb-articles-carousel-wrap {
    width: 100% !important;
    max-width: 100% !important;
}

/* -----------------------------------------------------------------------
   ARTICLE CAROUSEL - CARD STYLING
----------------------------------------------------------------------- */

#brief-carousel-section {
    width: 100% !important;
    max-width: 100% !important;
    left: 0 !important;
}

#brief-carousel-section .sppb-container-inner,
#brief-carousel-section .sppb-row {
    width: 100% !important;
    max-width: 100% !important;
    margin-left: 0 !important;
    margin-right: 0 !important;
    padding-left: 0 !important;
    padding-right: 0 !important;
}

#brief-carousel-section .sppb-articles-carousel-wrap {
    width: 100% !important;
    max-width: 100% !important;
}

/* Equal height cards */
#brief-carousel-section .slick-track {
    display: flex !important;
}

#brief-carousel-section .slick-slide {
    height: inherit !important;
}

#brief-carousel-section .slick-slide > div,
#brief-carousel-section .sppb-articles-carousel-column {
    height: 100%;
    display: flex;
    flex-direction: column;
    position: relative;
}

/* Color bar at top of image */
#brief-carousel-section .sppb-articles-carousel-img {
    position: relative;
    overflow: hidden;
    flex-shrink: 0;
}

#brief-carousel-section .sppb-articles-carousel-img::before {
    content: '';
    display: block;
    height: 6px;
    width: 100%;
    position: absolute;
    top: 0;
    left: 0;
    z-index: 2;
}

#brief-carousel-section .slick-slide:nth-child(3n+1) .sppb-articles-carousel-img::before { background: #F5E333; }
#brief-carousel-section .slick-slide:nth-child(3n+2) .sppb-articles-carousel-img::before { background: #63CAEB; }
#brief-carousel-section .slick-slide:nth-child(3n+3) .sppb-articles-carousel-img::before { background: #545555; }

/* Image zoom */
#brief-carousel-section .sppb-articles-carousel-img img {
    display: block;
    width: 100%;
    transition: transform 0.5s cubic-bezier(0.22, 1, 0.36, 1);
}

#brief-carousel-section .sppb-articles-carousel-column:hover .sppb-articles-carousel-img img {
    transform: scale(1.06);
}

/* Content area */
#brief-carousel-section .sppb-articles-carousel-content {
    position: relative;
    padding-bottom: 50px;
    flex: 1;
}

/* Hide Trending */
#brief-carousel-section .sppb-articles-carousel-meta-category {
    display: none;
}

/* Bottom color rule - cycling to match top bar */
#brief-carousel-section .sppb-articles-carousel-content::after {
    content: '';
    display: block;
    height: 1px;
    position: absolute;
    bottom: 16px;
    left: 22px;
    right: 22px;
}

#brief-carousel-section .slick-slide:nth-child(3n+1) .sppb-articles-carousel-content::after { background: #F5E333; }
#brief-carousel-section .slick-slide:nth-child(3n+2) .sppb-articles-carousel-content::after { background: #63CAEB; }
#brief-carousel-section .slick-slide:nth-child(3n+3) .sppb-articles-carousel-content::after { background: #545555; }

/* Arrows */
#brief-carousel-section .fa.slick-arrow {
    position: absolute;
    top: 35%;
    width: 40px;
    height: 40px;
    background: #F5E333;
    border-radius: 50%;
    z-index: 10;
    cursor: pointer;
    font-size: 0;
    color: transparent;
}

#brief-carousel-section .fa.slick-arrow::before {
    content: '';
    display: block;
    width: 10px;
    height: 10px;
    border-top: 2px solid #ffffff;
    border-right: 2px solid #ffffff;
    position: absolute;
    top: 50%;
    left: 50%;
}

#brief-carousel-section .fa-angle-left.slick-arrow {
    left: -20px;
}

#brief-carousel-section .fa-angle-left.slick-arrow::before {
    transform: translate(-30%, -50%) rotate(-135deg);
}

#brief-carousel-section .fa-angle-right.slick-arrow {
    right: -20px;
}

#brief-carousel-section .fa-angle-right.slick-arrow::before {
    transform: translate(-70%, -50%) rotate(45deg);
}

/* Dots */
#brief-carousel-section .slick-dots li button {
    width: 14px;
    height: 14px;
}

#brief-carousel-section .slick-dots li button:before {
    font-size: 14px;
    color: #545555;
    opacity: 0.3;
}

#brief-carousel-section .slick-dots li.slick-active button:before {
    color: #F5E333;
    opacity: 1;
    font-size: 14px;
}

@media (max-width: 991.98px) {
    #brief-carousel-section .slick-slide {
        width: 50vw !important;
        max-width: 50vw !important;
    }
}

@media (max-width: 575.98px) {
    #brief-carousel-section .slick-slide {
        width: 100vw !important;
        max-width: 100vw !important;
    }
}
/* Title hover color matching card accent */
#brief-carousel-section .slick-slide:nth-child(3n+1) .sppb-articles-carousel-link:hover { color: #F5E333; }
#brief-carousel-section .slick-slide:nth-child(3n+2) .sppb-articles-carousel-link:hover { color: #63CAEB; }
#brief-carousel-section .slick-slide:nth-child(3n+3) .sppb-articles-carousel-link:hover { color: #000000; }

