/* ============================================
   Almasar Homepage — Targeted Fixes Only
   Works WITH the theme, not against it.
   ============================================ */

/* === 1. CRITICAL: Remove content bloat === */

/* Hide full-paragraph excerpts from all homepage items */
#home-newsroom .item-description {
    display: none !important;
}

/* Re-show description ONLY in hero slider overlay */
#home-newsroom .slider-outer .item-description {
    display: block !important;
}

/* Hide the duplicate post-meta that appears after description */
#home-newsroom .item-description + .post-meta {
    display: none !important;
}

/* Hide phantom filler items the theme injects for grid alignment */
#home-newsroom .item-dummy {
    display: none !important;
}


/* === 2. HOME_4 — Today/Week Tabbed Section (Full Rebuild) === */

/* The tabbed container */
#home-newsroom #widgets-area-home_4 .widgets-list-inner {
    padding: 20px !important;
}

/* Tab buttons: simple underline style */
#home-newsroom #widgets-area-home_4 .widget-tabs {
    display: flex !important;
    flex-wrap: nowrap !important;
    gap: 0 !important;
    margin-bottom: 18px !important;
    padding: 0 !important;
    border: none !important;
    border-bottom: 2px solid var(--divider) !important;
    background: transparent !important;
}

#home-newsroom #widgets-area-home_4 .widget-tabs a {
    flex: 1 1 0% !important;
    text-decoration: none !important;
    margin: 0 !important;
    border: none !important;
}

#home-newsroom #widgets-area-home_4 .widget-tabs a div {
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    width: 100% !important;
    min-height: 44px !important;
    padding: 0 8px !important;
    margin-bottom: -2px !important;
    border: none !important;
    border-bottom: 3px solid transparent !important;
    border-radius: 0 !important;
    background: transparent !important;
    box-shadow: none !important;
    color: var(--color-2) !important;
    font-size: 0.9rem !important;
    font-weight: 800 !important;
    transition: color 0.2s, border-color 0.2s !important;
}

#home-newsroom #widgets-area-home_4 .widget-tabs a.active div {
    color: var(--site-color) !important;
    border-bottom-color: var(--site-color) !important;
    background: transparent !important;
    box-shadow: none !important;
}

#home-newsroom #widgets-area-home_4 .widget-tabs a:hover div {
    color: var(--site-color) !important;
}

/* Force posts-list to single-column vertical layout */
#home-newsroom #widgets-area-home_4 .widgets-area-inner .posts-list {
    display: flex !important;
    flex-direction: column !important;
    gap: 0 !important;
    margin: 0 !important;
    padding: 0 !important;
}

/* Reset each list-item to fill full width */
#home-newsroom #widgets-area-home_4 .widgets-area-inner .posts-list > .item {
    width: 100% !important;
    max-width: 100% !important;
    padding: 0 !important;
    margin: 0 !important;
}

/* Each news row: horizontal image + text, full width */
#home-newsroom #widgets-area-home_4 .widgets-area-inner .posts-list > .item .item-inner {
    display: grid !important;
    grid-template-columns: 84px 1fr !important;
    gap: 12px !important;
    align-items: center !important;
    width: 100% !important;
    padding: 12px 0 !important;
    margin: 0 !important;
    background: transparent !important;
    border: none !important;
    border-bottom: 1px solid var(--divider) !important;
    box-shadow: none !important;
    border-radius: 0 !important;
    height: auto !important;
    min-height: 0 !important;
}

#home-newsroom #widgets-area-home_4 .widgets-area-inner .posts-list > .item:last-child .item-inner {
    border-bottom: none !important;
}

/* Kill any pseudo-element from previous attempts */
#home-newsroom #widgets-area-home_4 .widgets-area-inner .posts-list > .item .item-inner::before {
    display: none !important;
    content: none !important;
}

/* Thumbnail */
#home-newsroom #widgets-area-home_4 .widgets-area-inner .posts-list > .item .item-image {
    aspect-ratio: 1 !important;
    border-radius: 10px !important;
    overflow: hidden !important;
    flex-basis: auto !important;
    width: 100% !important;
}

#home-newsroom #widgets-area-home_4 .widgets-area-inner .posts-list > .item .item-image::after {
    display: none !important;
}

/* Content fills remaining space */
#home-newsroom #widgets-area-home_4 .widgets-area-inner .posts-list > .item .item-content {
    min-height: 0 !important;
    min-width: 0 !important;
    padding: 0 !important;
    gap: 4px !important;
    display: flex !important;
    flex-direction: column !important;
    justify-content: center !important;
}

#home-newsroom #widgets-area-home_4 .widgets-area-inner .posts-list > .item .item-title {
    font-size: 0.92rem !important;
    line-height: 1.55 !important;
    font-weight: 700 !important;
    -webkit-line-clamp: 2 !important;
    line-clamp: 2 !important;
}

#home-newsroom #widgets-area-home_4 .widgets-area-inner .posts-list > .item .post-meta {
    margin-top: 0 !important;
    padding-top: 0 !important;
    border-top: none !important;
    font-size: 0.72rem !important;
}


/* === 3. RESPONSIVE FIXES === */

@media (max-width: 991px) {
    #home-newsroom #widgets-area-home_4 .widgets-area-inner .posts-list > .item .item-inner {
        grid-template-columns: 72px 1fr !important;
        gap: 10px !important;
    }
}

@media (max-width: 767px) {
    #home-newsroom #widgets-area-home_4 .widgets-area-inner .posts-list > .item .item-inner {
        grid-template-columns: 68px 1fr !important;
        gap: 10px !important;
    }

    #home-newsroom #widgets-area-home_4 .widget-tabs a div {
        min-height: 40px !important;
        font-size: 0.84rem !important;
    }

    #home-newsroom #widgets-area-home_4 .widgets-area-inner .posts-list > .item .item-title {
        font-size: 0.88rem !important;
    }
}

@media (max-width: 575px) {
    #home-newsroom #widgets-area-home_4 .widgets-list-inner {
        padding: 14px !important;
    }

    #home-newsroom #widgets-area-home_4 .widgets-area-inner .posts-list > .item .item-inner {
        grid-template-columns: 60px 1fr !important;
        gap: 8px !important;
        padding: 10px 0 !important;
    }

    #home-newsroom #widgets-area-home_4 .widget-tabs a div {
        min-height: 36px !important;
        font-size: 0.78rem !important;
    }

    #home-newsroom #widgets-area-home_4 .widgets-area-inner .posts-list > .item .item-title {
        font-size: 0.86rem !important;
    }
}
