/* ===========================================
   COMPREHENSIVE LAYOUT & IMAGE FIXES
   For RevvedUpCars.com - Professional Automotive Magazine
   =========================================== */

/* ===== RESET PROBLEMATIC PHASE 2 RULES ===== */
/* Remove global padding-top aspect ratio - it breaks too many layouts */
.revved-thumb,
.revved-thumb {
    padding-top: unset !important;
    position: relative !important;
}

/* ===== GRID CARD IMAGES (Main content cards) ===== */
/* Only apply aspect ratio to grid-style cards, not list/sidebar items */
.revved-post-item:not(.revved-flex):not(.revved-ch) > .revved-thumb,
.revved-post-item.revved-scale.revved-img-style > .revved-thumb,
.revved-post-grid .revved-thumb,
.revved-post-grid .revved-thumb {
    aspect-ratio: 16 / 10 !important;
    width: 100% !important;
    overflow: hidden !important;
}

.revved-post-item:not(.revved-flex):not(.revved-ch) > .revved-thumb img,
.revved-post-item.revved-scale.revved-img-style > .revved-thumb img,
.revved-post-grid .revved-thumb img,
.revved-post-grid .revved-thumb img {
    width: 100% !important;
    height: 100% !important;
    object-fit: cover !important;
    object-position: center !important;
    position: relative !important;
    display: block !important;
}

/* ===== HERO SECTION (Large featured cards) ===== */
.revved-hero .revved-thumb,
.revved-feature-area .revved-thumb,
.revved-hero .revved-thumb {
    aspect-ratio: 16 / 9 !important;
    width: 100% !important;
}

.revved-hero .revved-thumb img,
.revved-feature-area .revved-thumb img {
    width: 100% !important;
    height: 100% !important;
    object-fit: cover !important;
    object-position: center !important;
}

/* ===== OVERLAY STYLE CARDS ===== */
.revved-post-overlay .revved-thumb,
.revved-post-overlay .revved-thumb,
.revved-post-overlay-v2 .revved-thumb {
    aspect-ratio: 4 / 3 !important;
    width: 100% !important;
    height: auto !important;
}

/* ===== LIST-STYLE CARDS (Horizontal layout with revved-flex) ===== */
.revved-post-item.revved-flex {
    display: flex !important;
    flex-direction: row !important;
    align-items: flex-start !important;
    gap: 16px !important;
}

.revved-post-item.revved-flex > .revved-thumb,
.revved-post-list .revved-thumb {
    flex: 0 0 120px !important;
    width: 120px !important;
    height: 90px !important;
    aspect-ratio: unset !important;
    border-radius: 8px !important;
    overflow: hidden !important;
}

.revved-post-item.revved-flex > .revved-thumb img,
.revved-post-list .revved-thumb img {
    width: 100% !important;
    height: 100% !important;
    object-fit: cover !important;
    object-position: center !important;
    position: relative !important;
}

.revved-post-item.revved-flex > .revved-post-content {
    flex: 1 !important;
    min-width: 0 !important;
}

/* ===== SIDEBAR & WIDGET THUMBNAILS ===== */
.sidebar .revved-post-item,
.widget .revved-post-item,
aside .revved-post-item {
    display: flex !important;
    flex-direction: row !important;
    align-items: flex-start !important;
    gap: 12px !important;
    padding: 12px 0 !important;
    border-bottom: 1px solid #eef1f0 !important;
}

.sidebar .revved-post-item:last-child,
.widget .revved-post-item:last-child {
    border-bottom: none !important;
}

.sidebar .revved-thumb,
.widget .revved-thumb,
aside .revved-thumb {
    flex: 0 0 80px !important;
    width: 80px !important;
    height: 60px !important;
    aspect-ratio: unset !important;
    border-radius: 6px !important;
    overflow: hidden !important;
}

.sidebar .revved-thumb img,
.widget .revved-thumb img,
aside .revved-thumb img {
    width: 100% !important;
    height: 100% !important;
    object-fit: cover !important;
    object-position: center !important;
    position: relative !important;
}

.sidebar .revved-post-data,
.widget .revved-post-data,
.sidebar .revved-post-content,
.widget .revved-post-content {
    flex: 1 !important;
    padding: 0 !important;
    min-width: 0 !important;
}

.sidebar .revved-post-title h4,
.widget .revved-post-title h4 {
    font-size: 14px !important;
    line-height: 1.4 !important;
    margin: 0 0 6px !important;
}

.sidebar .revved-post-meta,
.widget .revved-post-meta {
    border: none !important;
    padding: 0 !important;
    margin: 0 !important;
    font-size: 11px !important;
}

/* ===== CAROUSEL/SLIDER CARDS ===== */
.owl-carousel .revved-post-item .revved-thumb,
.slick-slider .revved-post-item .revved-thumb,
.swiper .revved-post-item .revved-thumb {
    aspect-ratio: 16 / 10 !important;
    width: 100% !important;
}

.owl-carousel .revved-thumb img,
.slick-slider .revved-thumb img,
.swiper .revved-thumb img {
    width: 100% !important;
    height: 100% !important;
    object-fit: cover !important;
    object-position: center !important;
}

/* ===== TRENDING/FEATURED SECTIONS ===== */
.revved-trending-carousel .revved-thumb,
.trending-section .revved-thumb {
    aspect-ratio: 16 / 10 !important;
}

/* ===== CARD CONTENT ALIGNMENT ===== */
.revved-post-item {
    display: flex !important;
    flex-direction: column !important;
}

.revved-post-item.revved-flex {
    flex-direction: row !important;
}

.revved-post-data,
.revved-post-content,
.revved-post-data {
    display: flex !important;
    flex-direction: column !important;
}

/* ===== CARD UNIFORM HEIGHTS (Grid only) ===== */
.row > [class*="col-"] > .revved-post-item:not(.revved-flex) {
    height: 100% !important;
}

.row > [class*="col-"] > .revved-post-item:not(.revved-flex) > .revved-post-data {
    flex: 1 !important;
}

/* ===== SINGLE ARTICLE PAGE ===== */
.single-post .post-thumbnail,
.single-post .revved-thumb,
.single-post .featured-image {
    aspect-ratio: 16 / 9 !important;
    width: 100% !important;
    max-height: 500px !important;
    overflow: hidden !important;
    border-radius: 12px !important;
    margin-bottom: 32px !important;
}

.single-post .post-thumbnail img,
.single-post .revved-thumb img,
.single-post .featured-image img {
    width: 100% !important;
    height: 100% !important;
    object-fit: cover !important;
    object-position: center !important;
}

/* ===== "YOU MAY ALSO LIKE" CARDS ===== */
.related-posts .revved-thumb,
.revved-related-post .revved-thumb {
    aspect-ratio: 16 / 10 !important;
    width: 100% !important;
}

/* ===== CENTERING FIXES ===== */
.revved-thumb a,
.revved-thumb a {
    display: block !important;
    width: 100% !important;
    height: 100% !important;
}

/* Text centering in cards */
.revved-post-title,
.revved-post-title {
    margin: 0 !important;
}

/* Meta alignment */
.revved-post-meta,
.revved-post-meta {
    display: flex !important;
    align-items: center !important;
    flex-wrap: wrap !important;
    gap: 8px !important;
}

/* ===== CATEGORY BADGES ===== */
.revved-category-badge,
.revved-category {
    display: inline-flex !important;
    align-items: center !important;
}

/* ===== TABS SECTION CARDS ===== */
.tab-content .revved-post-item .revved-thumb {
    aspect-ratio: 16 / 10 !important;
}

/* ===== BLOG ARCHIVE/CATEGORY PAGES ===== */
.archive .revved-thumb,
.category .revved-thumb,
.search-results .revved-thumb {
    aspect-ratio: 16 / 10 !important;
    width: 100% !important;
}

.archive .revved-thumb img,
.category .revved-thumb img,
.search-results .revved-thumb img {
    width: 100% !important;
    height: 100% !important;
    object-fit: cover !important;
    object-position: center !important;
}

/* ===== FOOTER WIDGETS ===== */
footer .revved-post-item {
    display: flex !important;
    flex-direction: row !important;
    gap: 12px !important;
    padding: 10px 0 !important;
}

footer .revved-thumb {
    flex: 0 0 70px !important;
    width: 70px !important;
    height: 52px !important;
    aspect-ratio: unset !important;
    border-radius: 4px !important;
    overflow: hidden !important;
}

footer .revved-thumb img {
    width: 100% !important;
    height: 100% !important;
    object-fit: cover !important;
}

footer .revved-post-data,
footer .revved-post-content {
    flex: 1 !important;
    padding: 0 !important;
}

footer .revved-post-title h4 {
    font-size: 13px !important;
    line-height: 1.35 !important;
    margin: 0 0 4px !important;
}

/* ===== RESPONSIVE ADJUSTMENTS ===== */
@media (max-width: 991px) {
    .revved-post-item.revved-flex > .revved-thumb {
        flex: 0 0 100px !important;
        width: 100px !important;
        height: 75px !important;
    }
    
    .sidebar .revved-thumb,
    .widget .revved-thumb {
        flex: 0 0 70px !important;
        width: 70px !important;
        height: 52px !important;
    }
}

@media (max-width: 767px) {
    .revved-post-item.revved-flex > .revved-thumb {
        flex: 0 0 90px !important;
        width: 90px !important;
        height: 68px !important;
    }
    
    .sidebar .revved-thumb,
    .widget .revved-thumb {
        flex: 0 0 65px !important;
        width: 65px !important;
        height: 48px !important;
    }
    
    .single-post .post-thumbnail,
    .single-post .revved-thumb {
        max-height: 300px !important;
        border-radius: 8px !important;
    }
}

@media (max-width: 480px) {
    .revved-post-item.revved-flex > .revved-thumb {
        flex: 0 0 80px !important;
        width: 80px !important;
        height: 60px !important;
    }
}
