/**
 * Enhanced AEI News Sections Styling
 * Improved grid layouts, responsive design, and modern styling
 * Self-contained CSS - defines its own color variables and grid utilities
 * 
 * Table of Contents:
 * 0. Brand Color Variables
 * 1. Section Layout & Spacing
 * 2. Grid Layout System (3 & 4 columns)
 * 3. View More Links
 * 4. Post Title Links
 * 5. Display Template Styles
 * 6. Slider Text Position Styles
 * 7. Column Post Item Styles
 * 8. Carousel Styles
 * 9. Responsive Adjustments
 */

/* ========================================
   0. Brand Color Variables
   ======================================== */

.homepage-section,
.blog-eight-section,
.main-slider-section,
.blog-carousel-section,
.rss-section {
    --brand-blue: #0B132B;
    --brand-teal: #98C1D9;
    --brand-gray: #4A4A4A;
    --brand-white: #FFFFFF;
    --brand-light-bg: #F5F1E8;
}

/* ========================================
   1. Section Layout & Spacing
   ======================================== */

.homepage-section {
    padding: 60px 0;
    margin: 0;
    background-color: #fff;
    position: relative;
    z-index: 1;
    transition: background-color 0.3s ease;
}

.homepage-section:nth-child(even) {
    background-color: var(--brand-white);
}

.homepage-section.section-first {
    padding-top: 40px;
    padding-bottom: 60px;
}

.homepage-section:hover {
    background-color: var(--brand-light-bg);
}

.homepage-section:nth-child(even):hover {
    background-color: var(--brand-light-bg);
}

/* Title wrap - consistent across ALL sections */
.title-wrap {
    display: flex !important;
    align-items: center !important;
    justify-content: space-between !important;
    gap: 10px;
    width: 100%;
    margin-bottom: 20px;
    padding-bottom: 15px;
    border-bottom: 2px solid rgba(152, 193, 217, 0.25);
    position: relative;
}

.title-wrap::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    width: 160px;
    height: 3px;
    background: linear-gradient(90deg, var(--brand-teal), var(--brand-blue));
    border-radius: 3px;
}



/* Section subtitle */
.section-subtitle {
    position: relative;
    font-size: 18px;
    color: inherit;
    margin: 0 auto 25px auto;
    padding: 10px 0;
    line-height: 1.5;
    text-align: center;
    font-weight: 400;
    font-style: normal;
    letter-spacing: 0.5px;
    max-width: 700px;
}

.section-subtitle::before,
.section-subtitle::after {
    content: '';
    display: block;
    width: 80px;
    height: 1px;
    background: var(--brand-teal);
    opacity: 0.4;
    margin: 0 auto 12px auto;
}

.section-subtitle::after {
    margin: 12px auto 0 auto;
}

/* Custom colors - all child elements inherit text color from section's inline style */
.homepage-section.has-custom-colors .title-wrap h3,
.homepage-section.has-custom-colors .section-subtitle,
.homepage-section.has-custom-colors .view-more-link,
.homepage-section.has-custom-colors h3,
.homepage-section.has-custom-colors h4,
.homepage-section.has-custom-colors p,
.homepage-section.has-custom-colors a,
.homepage-section.has-custom-colors span,
.homepage-section.has-custom-colors time,
.homepage-section.has-custom-colors .post-title,
.homepage-section.has-custom-colors .post-title a,
.homepage-section.has-custom-colors .post-content,
.homepage-section.has-custom-colors .post-content a,
.homepage-section.has-custom-colors .post-content h3,
.homepage-section.has-custom-colors .post-content h3 a,
.homepage-section.has-custom-colors .post-meta,
.homepage-section.has-custom-colors .post-meta a,
.homepage-section.has-custom-colors .post-date,
.homepage-section.has-custom-colors .post-excerpt,
.homepage-section.has-custom-colors .column-post-item,
.homepage-section.has-custom-colors .column-post-item a,
.homepage-section.has-custom-colors .column-post-item h4,
.homepage-section.has-custom-colors .column-post-item h4 a,
.homepage-section.has-custom-colors .column-post-item p {
    color: inherit !important;
}

.homepage-section.has-custom-colors .title-wrap {
    border-bottom-color: currentColor;
}

/* Ensure carousel/four-column section title goes full width */
.blog-carousel-section .title-wrap,
.homepage-section .title-wrap {
    width: 100% !important;
    max-width: 100% !important;
    box-sizing: border-box;
}

/* Ensure title container row spans full width */
.blog-carousel-section .col-md-12,
.homepage-section .col-md-12 {
    width: 100%;
    padding-left: 15px;
    padding-right: 15px;
}

.title-wrap h3 {
    position: relative;
    text-align: left !important;
    float: none !important;
    display: block !important;
    margin: 0;
    padding: 0 0 0 18px;
    font-size: 1rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.title-wrap h3::before {
    content: '';
    position: absolute;
    left: 0;
    top: 50%;
    transform: translateY(-50%);
    width: 5px;
    height: 20px;
    background: var(--brand-teal);
    border-radius: 3px;
}

.title-wrap .view-more-link {
    margin-left: auto;
    white-space: nowrap;
    float: none !important;
    flex: 0 0 auto;
}


.homepage-section .container {

    margin: 0 auto;
}

/* ========================================
   2. View More Links
   ======================================== */

.view-more-link,
.view-more-link:visited,
.view-more-link:link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    float: right;
    position: relative;
    padding: 6px 14px;
    z-index: 1;
    font-size: 13px;
    color: var(--brand-teal) !important;
    text-decoration: none;
    font-weight: 600;
    border: 1px solid var(--brand-teal);
    border-radius: 20px;
    background: transparent;
    transition: all 0.3s ease;
    min-height: 34px;
}

.view-more-link::after {
    content: '→';
    transition: transform 0.3s ease;
}

.view-more-link:hover::after {
    transform: translateX(3px);
}

.view-more-link:hover,
.view-more-link:visited:hover {
    color: var(--brand-white) !important;
    background: var(--brand-teal);
    border-color: var(--brand-teal);
    text-decoration: none;
}

/* ========================================
   3. Post Title Links
   ======================================== */

.blog-eight-section .post-content h3 a,
.blog-eight-section .post-content h3 a:visited,
.blog-eight-section .post-content h3 a:link {
    color: var(--brand-blue) !important;
}

.blog-eight-section .post-content h3 a:hover {
    color: var(--brand-teal) !important;
}

/* ========================================
   2. Enhanced Grid Layout System
   ======================================== */

/* Base grid styles - clean professional cards */
.blog-eight-section.section {
    padding: 30px 0;
}

.blog-eight-section .card-eight-wrap {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 30px;
    align-items: start;
}

/* 4-column grid override */
.blog-eight-section.grid-cols-4 .card-eight-wrap {
    grid-template-columns: repeat(4, 1fr);
    gap: 25px;
}

/* Enhanced card styling */
.blog-eight-section .eight-wraps {
    background: #fff;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 4px 20px rgba(11, 19, 43, 0.08);
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
}

.blog-eight-section .eight-wraps::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, var(--brand-teal), var(--brand-blue));
    transform: scaleX(0);
    transition: transform 0.3s ease;
}

.blog-eight-section .eight-wraps:hover::before {
    transform: scaleX(1);
}

.blog-eight-section .eight-wraps:hover {
    box-shadow: 0 12px 40px rgba(11, 19, 43, 0.15);
    transform: translateY(-8px);
}

/* Enhanced image container */
.blog-eight-section .eight-thumb {
    aspect-ratio: 3 / 2;
    overflow: hidden;
    position: relative;
    background: var(--brand-white);
}

.blog-eight-section .eight-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}

.blog-eight-section .eight-wraps:hover .eight-thumb img {
    transform: scale(1.1);
}

/* Enhanced content area */
.blog-eight-section .post-content {
    padding: 25px;
}

.blog-eight-section .post-content h3 {
    font-size: 18px;
    font-weight: 600;
    line-height: 1.4;
    margin: 0 0 15px 0;
}

.blog-eight-section .post-content h3 a {
    color: var(--brand-blue) !important;
    text-decoration: none;
    transition: color 0.3s ease;
}

.blog-eight-section .post-content h3 a:hover {
    color: var(--brand-teal) !important;
}

/* Enhanced meta information */
.blog-eight-section .post-meta {
    font-size: 14px;
    color: var(--brand-gray);
    margin-bottom: 15px;
    display: flex;
    align-items: center;
    gap: 15px;
}

.blog-eight-section .post-meta span {
    display: flex;
    align-items: center;
    gap: 5px;
}

.blog-eight-section .post-excerpt {
    font-size: 15px;
    line-height: 1.6;
    color: var(--brand-gray);
    margin-bottom: 20px;
}

/* Enhanced read more link */
.blog-eight-section .more-link {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: var(--brand-teal);
    font-weight: 500;
    text-decoration: none;
    transition: all 0.3s ease;
    position: relative;
}

.blog-eight-section .more-link::after {
    content: '→';
    transition: transform 0.3s ease;
}

.blog-eight-section .more-link:hover::after {
    transform: translateX(4px);
}

.blog-eight-section .more-link:hover {
    color: var(--brand-blue);
}

.blog-eight-section .eight-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.4s ease;
}

.blog-eight-section .eight-wraps:hover .eight-thumb img {
    transform: scale(1.05);
}

.blog-eight-section .eight-content-wrap {
    padding: 16px;
}

.blog-eight-section .eight-content-wrap h3 {
    font-size: 14px;
    font-weight: 600;
    line-height: 1.4;
    margin: 0 0 8px 0;
}

.blog-eight-section .eight-content-wrap h3 a {
    color: var(--brand-blue);
    text-decoration: none;
    transition: color 0.2s ease;
}

.blog-eight-section .eight-content-wrap h3 a:hover {
    color: var(--brand-teal);
}

.blog-eight-section .post-meta {
    font-size: 12px;
    color: var(--brand-gray);
}

/* ========================================
   9. Enhanced Responsive Design
   ======================================== */

/* Tablet responsiveness */
@media (max-width: 991px) {
    .homepage-section {
        padding: 40px 0;
    }
    
    .homepage-section.section-first {
        padding-top: 30px;
        padding-bottom: 40px;
    }
    
    .title-wrap {
        margin-bottom: 15px;
        padding-bottom: 12px;
    }
    
    /* Grid adjustments for tablet */
    .blog-eight-section .card-eight-wrap,
    .blog-eight-section.grid-cols-4 .card-eight-wrap {
        grid-template-columns: repeat(2, 1fr);
        gap: 20px;
    }
    
    .blog-eight-section .post-content {
        padding: 20px;
    }
    
    .blog-eight-section .post-content h3 {
        font-size: 17px;
    }
    
    .blog-eight-section .post-excerpt {
        font-size: 14px;
    }
}

/* Mobile responsiveness */
@media (max-width: 767px) {
    .homepage-section {
        padding: 30px 0;
    }
    
    .homepage-section.section-first {
        padding-top: 20px;
        padding-bottom: 30px;
    }
    
    .title-wrap {
        padding-bottom: 12px;
        gap: 8px;
    }
    
    .title-wrap h3 {
        text-align: left !important;
        font-size: 1.05rem;
        padding-left: 14px;
    }
    
    .title-wrap h3::before {
        height: 16px;
    }
    
    .title-wrap .view-more-link {
        margin-left: auto;
        float: none !important;
        flex: 0 0 auto;
        padding: 4px 10px;
        font-size: 11px;
        min-height: 44px;
    }
    
    .section-subtitle {
        font-size: 16px;
        text-align: center;
        margin-bottom: 15px;
    }
    
    /* Single column on mobile */
    .blog-eight-section .card-eight-wrap {
        grid-template-columns: 1fr;
        gap: 20px;
    }
    
    .blog-eight-section .eight-wraps {
        border-radius: 8px;
    }
    
    .blog-eight-section .post-content {
        padding: 18px;
    }
    
    .blog-eight-section .post-content h3 {
        font-size: 16px;
        margin-bottom: 12px;
    }
    
    .blog-eight-section .post-meta {
        font-size: 13px;
        margin-bottom: 12px;
        flex-wrap: wrap;
        gap: 10px;
    }
    
    .blog-eight-section .post-excerpt {
        font-size: 14px;
        margin-bottom: 15px;
    }
    
    .blog-eight-section .more-link {
        font-size: 14px;
    }
    
    /* Stack slider/carousel columns on mobile */
    .main-slider-section .col-md-3,
    .main-slider-section .col-md-6,
    .blog-carousel-section .col-md-3,
    .blog-carousel-section .col-md-6 {
        width: 100%;
        max-width: 100%;
    }
}

/* Small mobile adjustments */
@media (max-width: 480px) {
    .homepage-section {
        padding: 25px 0;
    }
    
    .section-title {
        font-size: 22px;
    }
    
    .blog-eight-section .card-eight-wrap {
        gap: 16px;
    }
    
    .blog-eight-section .post-content {
        padding: 15px;
    }
    
    .blog-eight-section .post-content h3 {
        font-size: 15px;
        line-height: 1.3;
    }
    
    .blog-eight-section .post-excerpt {
        font-size: 13px;
    }
}

/* Default template - FORCE image on top, text below layout */
/* Override ALL overlay/background styles for grid sections */
/* Grid - default styles (not overlay) */
.blog-eight-section .eight-wraps:not(.text-overlay):not(.image-background),
.blog-eight-section .eight-wraps.image-top {
    background: #fff !important;
    position: relative !important;
}


.blog-eight-section .eight-wraps:not(.text-overlay):not(.image-background) .eight-content-wrap {
    display: block !important;
    position: relative !important;
    min-height: auto !important;
    background: transparent !important;
}

.blog-eight-section .eight-wraps:not(.text-overlay):not(.image-background) .eight-thumb {
    position: relative !important;
    margin-bottom: 15px;
    width: auto !important;
    top: auto !important;
    left: auto !important;
    right: auto !important;
    bottom: auto !important;
}

/* Remove gradients for non-overlay cards */
.blog-eight-section .eight-wraps:not(.text-overlay):not(.image-background) .eight-thumb::after,
.blog-eight-section .eight-wraps:not(.text-overlay):not(.image-background) .eight-content-wrap::before,
.blog-eight-section .eight-wraps:not(.text-overlay):not(.image-background) .eight-content-wrap::after {
    display: none !important;
    content: none !important;
}

.blog-eight-section .eight-wraps:not(.text-overlay):not(.image-background) .post-content {
    position: relative !important;
    padding: 0 !important;
    color: var(--brand-blue) !important;
    background: transparent !important;
    z-index: auto !important;
}

.blog-eight-section .eight-wraps:not(.text-overlay):not(.image-background) .post-content h3 a {
    color: var(--brand-blue) !important;
    text-shadow: none !important;
}

.blog-eight-section .eight-wraps:not(.text-overlay):not(.image-background) .post-content p,
.blog-eight-section .eight-wraps:not(.text-overlay):not(.image-background) .post-content .post-excerpt {
    color: var(--brand-gray) !important;
}

.blog-eight-section .eight-wraps:not(.text-overlay):not(.image-background) .post-meta,
.blog-eight-section .eight-wraps:not(.text-overlay):not(.image-background) .post-meta span,
.blog-eight-section .eight-wraps:not(.text-overlay):not(.image-background) .post-meta a {
    color: var(--brand-gray) !important;
}

/* Responsive eight-post grid - handled in style.css */

/* Image Position: Left */
.eight-wraps.image-left .eight-content-wrap {
    display: flex;
    flex-direction: row;
    align-items: flex-start;
}

.eight-wraps.image-left .eight-thumb {
    flex: 0 0 auto;

    margin-bottom: 0;
}

.eight-wraps.image-left .post-content {
    flex: 1;
}

/* Image Position: Right */
.eight-wraps.image-right .eight-content-wrap {
    display: flex;
    flex-direction: row-reverse;
    align-items: flex-start;
}

.eight-wraps.image-right .eight-thumb {
    flex: 0 0 auto;

    margin-bottom: 0;
}

.eight-wraps.image-right .post-content {
    flex: 1;
}

/* Image Position: Background (Overlay) - uses unified overlay card styles */
.eight-wraps.image-background .eight-content-wrap {
    position: relative;
    overflow: hidden;
}

/* Removed - using unified overlay card styles below */

/* Text Overlay - uses unified overlay card styles */
.eight-wraps.text-overlay .eight-content-wrap {
    position: relative;
    overflow: hidden;
}

/* Removed - using unified overlay card styles below */

/* Image Sizes */
.eight-wraps.image-size-small .eight-thumb {
    max-width: 120px;
}




.eight-wraps.image-size-full .eight-thumb {
    width: 100%;
}

/* Image Cropping */
.eight-wraps.image-cropped .eight-thumb {
    overflow: hidden;
}

.eight-wraps.image-cropped .eight-thumb img {
    width: 100%;
    aspect-ratio: 3 / 2;
    object-fit: cover;
}

.eight-wraps.image-cropped.image-size-small .eight-thumb img {
    height: 100px;
    aspect-ratio: 3 / 2;

}

.eight-wraps.image-cropped.image-size-large .eight-thumb img {
    height: 250px;
    aspect-ratio: 3 / 2;

}

.eight-wraps.image-cropped.image-size-full .eight-thumb img {
    height: 300px;
    aspect-ratio: 3 / 2;

}

/* No Image */
.eight-wraps.no-image .eight-thumb {
    display: none;
}

/* Template: Overlay */
.template-overlay .eight-wraps {
    margin-bottom: 20px;
}

.template-overlay .eight-wraps .eight-content-wrap {
    position: relative;
    border-radius: 8px;
    overflow: hidden;
}

.template-overlay .eight-wraps .eight-thumb {
    transition: transform 0.4s ease;
}

.template-overlay .eight-wraps .eight-thumb img {
    transition: transform 0.4s ease;
}

.template-overlay .eight-wraps:hover .eight-thumb img {
    transform: scale(1.05);
}

.template-overlay .eight-wraps .eight-thumb::after {
    transition: opacity 0.4s ease;
}

.template-overlay .eight-wraps:hover .eight-thumb::after {
    opacity: 0.5;
}

.template-overlay .eight-wraps .post-content h3 a {
    transition: all 0.3s ease;
}

.template-overlay .eight-wraps:hover .post-content h3 a {
    text-shadow: 0 2px 8px rgba(11,19,43,0.3);
}

/* Template: Minimal */
.template-minimal .eight-wraps {
    border-bottom: 1px solid rgba(11, 19, 43, 0.1);
    padding-bottom: 15px;
    margin-bottom: 15px;
}

.template-minimal .post-content {
    padding: 0;
}

/* Template: Compact */
.template-compact .eight-wraps {
    margin-bottom: 15px;
}

.template-compact .post-content h3 {
    font-size: 16px;
    margin-bottom: 5px;
}

.template-compact .post-meta {
    font-size: 12px;
}

/* Template: Magazine */
.template-magazine .eight-wraps:first-child {
    grid-column: 1 / -1;
}

.template-magazine .eight-wraps:first-child .eight-thumb img {
    height: 400px;
}

.template-magazine .eight-wraps:first-child .post-content h3 {
    font-size: 28px;
}

/* Post Meta Styling */
.post-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 15px;
    font-size: 13px;
    color: var(--brand-gray);
}

.post-meta .post-author {
    font-style: italic;
}

/* Responsive Adjustments */
@media (max-width: 768px) {
    .eight-wraps.image-left .eight-content-wrap,
    .eight-wraps.image-right .eight-content-wrap {
        flex-direction: column;
    }
    
    .eight-wraps.image-left .eight-thumb,
    .eight-wraps.image-right .eight-thumb {
        margin: 0 0 15px 0;
        max-width: 100%;
    }
    
    .eight-wraps.image-background .eight-content-wrap {
        min-height: 250px;
    }
    
    .template-magazine .eight-wraps:first-child .eight-thumb img {
        height: 250px;
    }
}

/* ========================================
   5. Slider Containment & Image Sizing
   ======================================== */

/* Main slider arrows - positioned to image only */
.main-slider .slick-prev,
.main-slider .slick-next {
    position: absolute;
    top: 40%; /* Center to image area (image is ~80% of slide height) */
    transform: translateY(-50%);
    z-index: 10;
    width: 40px;
    height: 40px;
    background: rgba(11, 19, 43, 0.9);
    border: 2px solid rgba(255, 255, 255, 0.6);
    border-radius: 50%;
    cursor: pointer;
    transition: all 0.3s ease;
    opacity: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 2px 10px rgba(11, 19, 43, 0.3);
}

/* For text-below layout, adjust positioning */
.main-slider.text-position-below .slick-prev,
.main-slider.text-position-below .slick-next {
    top: 35%; /* More adjustment for text-below layout */
}

/* For text-overlay layout, center to full slide */
.main-slider.text-position-overlay .slick-prev,
.main-slider.text-position-overlay .slick-next {
    top: 50%;
}

/* SVG chevron styling for main slider */
.main-slider .slick-prev svg,
.main-slider .slick-next svg {
    width: 12px;
    height: 12px;
    transition: transform 0.3s ease;
}

.main-slider .slick-prev:hover svg,
.main-slider .slick-next:hover svg {
    transform: scale(1.1);
}

.main-slider:hover .slick-prev,
.main-slider:hover .slick-next {
    opacity: 1 !important;
}

.main-slider .slick-prev:hover,
.main-slider .slick-next:hover {
    background: rgba(11, 19, 43, 1);
    border-color: rgba(255, 255, 255, 0.9);
    transform: translateY(-50%) scale(1.1);
    box-shadow: 0 4px 15px rgba(11, 19, 43, 0.4);
}

.main-slider .slick-prev {
    left: 20px !important;
}

.main-slider .slick-next {
    right: 20px !important;
}

.main-slider .slick-list {
    overflow: hidden;
}

/* CRITICAL: Force Slick defaults to prevent width accumulation bug */
.main-slider .slick-track {
    display: block !important;
}

.main-slider .slick-slide {
    float: left !important;
    height: 100%;
    min-height: 1px;
}

.main-slider.slick-initialized .slick-slide {
    display: block !important;
}

/* Before Slick initializes - hide all but first slide */
.main-slider:not(.slick-initialized) .main-slider-wrap {
    display: none;
}

.main-slider:not(.slick-initialized) .main-slider-wrap:first-child {
    display: block;
}

/* Slide wrapper */
.main-slider-wrap {
    box-sizing: border-box;
}

.main-slider-wrap .carousel-thumb {
    overflow: hidden;
}

.main-slider-wrap .carousel-thumb img,
.main-slider-wrap img {
    display: block;
    max-width: 100%;
    height: auto;
}

/* Main slider container - no background, transparent */
.main-slider {
    position: relative;
    background: transparent;
    overflow: hidden;
}

.main-slider .slick-list {
    overflow: hidden;
}

.main-slider-wrap {
    position: relative;
}

.main-slider-wrap .carousel-thumb {
    position: relative;
    overflow: hidden;
    width: 100%;
    aspect-ratio: 3 / 2;
}

.main-slider-wrap .carousel-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform 0.4s ease;
    max-width: none;
}

.main-slider-wrap:hover .carousel-thumb img {
    transform: scale(1.02);
}

.main-slider .post-content {
    padding: 15px 0;
    background: transparent;
}

.main-slider .post-content h3 {
    font-size: 18px;
    font-weight: 600;
    line-height: 1.4;
    margin: 0 0 10px 0;
}

.main-slider .post-content h3 a {

    text-decoration: none;
    transition: color 0.2s ease;
}

.main-slider .post-content h3 a:hover {

}

.main-slider .post-content .post-meta {
    font-size: 12px;
    color: var(--brand-gray);
    margin-bottom: 8px;
}

.main-slider .post-content .post-meta li {
    list-style: none;
}

.main-slider .post-content p {
    font-size: 14px;
    line-height: 1.6;
    color: var(--brand-gray);
    margin: 0;
}

/* Unified professional arrow styling for sliders and carousels - using divs with icons */
.main-slider .slick-arrow,
.card-slider-wrap .slick-arrow {
    position: absolute !important;
    top: 50% !important;
    transform: translateY(-50%) !important;
    z-index: 100 !important;
    width: 44px !important;
    height: 44px !important;
    background: rgba(11, 19, 43, 0.95) !important;
    border: none !important;
    border-radius: 50% !important;
    cursor: pointer !important;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1) !important;
    opacity: 0 !important;
    box-shadow: 0 4px 12px rgba(11, 19, 43, 0.3) !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
}

.main-slider:hover .slick-arrow,
.card-slider-wrap:hover .slick-arrow {
    opacity: 1 !important;
}

.main-slider .slick-arrow:hover,
.card-slider-wrap .slick-arrow:hover {
    background: var(--brand-blue) !important;
    box-shadow: 0 6px 20px rgba(11, 19, 43, 0.4) !important;
    transform: translateY(-50%) scale(1.15) !important;
}

.main-slider .slick-prev,
.card-slider-wrap .slick-prev {
    left: 20px !important;
}

.main-slider .slick-next,
.card-slider-wrap .slick-next {
    right: 20px !important;
}

.main-slider .slick-arrow i,
.card-slider-wrap .slick-arrow i {
    color: #fff !important;
    font-size: 18px !important;
    line-height: 1 !important;
}

/* Remove default Slick button styling - but keep our chevrons for carousel */
.main-slider .slick-arrow:before,
.card-slider-wrap.main-slider .slick-arrow:before {
    content: none !important;
    display: none !important;
}

/* Keep chevron content for carousel sliders - Enhanced specificity */
.card-slider-wrap:not(.main-slider) .slick-prev:before,
.card-slider-wrap:not(.main-slider) .slick-next:before {
    content: '' !important;
    display: block !important;
    position: absolute !important;
    top: 50% !important;
    left: 50% !important;
    transform: translate(-50%, -50%) !important;
    width: 0 !important;
    height: 0 !important;
    border-style: solid !important;
    z-index: 1 !important;
}

.card-slider-wrap:not(.main-slider) .slick-prev:before {
    border-width: 6px 10px 6px 0 !important;
    border-color: transparent rgba(255, 255, 255, 0.9) transparent transparent !important;
    margin-left: -1px !important;
}

.card-slider-wrap:not(.main-slider) .slick-next:before {
    border-width: 6px 0 6px 10px !important;
    border-color: transparent transparent transparent rgba(255, 255, 255, 0.9) !important;
    margin-right: -1px !important;
}

.card-slider-wrap:not(.main-slider) .slick-prev:hover:before {
    border-color: transparent #ffffff transparent transparent !important;
}

.card-slider-wrap:not(.main-slider) .slick-next:hover:before {
    border-color: transparent transparent transparent #ffffff !important;
}

/* Main slider dots - positioned over the image */
.main-slider .slick-dots {
    position: absolute;
    bottom: 15px;
    left: 0;
    right: 0;
    display: flex !important;
    justify-content: center;
    align-items: center;
    list-style: none;
    padding: 0;
    margin: 0;
    gap: 10px;
    z-index: 10;
}

.main-slider .slick-dots li {
    display: inline-block;
    width: 10px;
    height: 10px;
    margin: 0;
    padding: 0;
}

.main-slider .slick-dots li button {
    width: 10px;
    height: 10px;
    padding: 0;
    border: 2px solid #fff;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.3);
    font-size: 0;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 2px 4px rgba(11, 19, 43, 0.2);
}

.main-slider .slick-dots li button:hover {
    background: rgba(255, 255, 255, 0.6);
    transform: scale(1.2);
}

.main-slider .slick-dots li.slick-active button {
    background: #fff;
    transform: scale(1.3);
}

/* Three column section layout */
.main-slider-section {
    background: var(--brand-white);
    padding: 40px 0;
}

/* CRITICAL: Constrain slider parent to prevent width growth */
.main-slider-section .col-md-6 {
    overflow: hidden;
    max-width: 50%;
}

@media (max-width: 991px) {
    .main-slider-section .col-md-6 {
        max-width: 100%;
    }
}

/* Side columns - clean card style */

/* Column sections - match heights */
.main-slider-section .col-md-6,
.main-slider-section .col-md-3 {
    display: flex;
    flex-direction: column;
}

/* With-thumbnail column styles */
.with-thumbnail-section {
    width: 100%;
    flex: 1;
    display: flex;
    flex-direction: column;
}

.with-thumbnail-wrap {
    display: flex;
    align-items: flex-start;
    padding: 10px 0;
    border-bottom: 1px solid rgba(11, 19, 43, 0.1);
}

.with-thumbnail-wrap:first-child {
    padding-top: 0;
}

.with-thumbnail-wrap:last-child {
    border-bottom: none;
    padding-bottom: 0;
}

.with-thumbnail-wrap .carousel-thumb {
    flex: 0 0 90px;
    width: 90px;
    aspect-ratio: 3 / 2;
    margin-right: 12px;
    overflow: hidden;
}

.with-thumbnail-wrap .carousel-thumb img {
    width: 100% !important;
    height: 100% !important;
    object-fit: cover;
    display: block;
}

/* Default template in 3-column section - 3:2 aspect ratio */
.main-slider-section .col-md-3 .column-post-item .post-thumb {

    overflow: hidden;
}

.main-slider-section .col-md-3 .column-post-item .post-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* Default template cards in 3-column section - Enhanced with hover effects */
.main-slider-section .col-md-3 .column-post-item:not(.image-left):not(.image-right) .post-thumb {
    aspect-ratio: 3 / 2;
    margin-bottom: 10px;
    border-radius: 8px;
    overflow: hidden;
    position: relative;
}

.main-slider-section .col-md-3 .column-post-item:not(.image-left):not(.image-right) .post-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Minimal non-slider columns in 3-column sections - No cards to maximize space */
.main-slider-section .col-md-3 .column-post-item {
    margin-bottom: 15px;
    padding-bottom: 15px;
    border-bottom: 1px solid rgba(11, 19, 43, 0.1);
    background: transparent;
    border-radius: 0;
    box-shadow: none;
    border: none;
    transition: none;
    position: static;
}

.main-slider-section .col-md-3 .column-post-item:last-child {
    border-bottom: none;
    margin-bottom: 0;
    padding-bottom: 0;
}

.main-slider-section .col-md-3 .column-post-item:hover {
    box-shadow: none;
    transform: none;
    background: transparent;
}

.main-slider-section .col-md-3 .column-post-item::before {
    display: none;
}

/* Minimal image-left template - No card styling */
.main-slider-section .col-md-3 .column-post-item.image-left {
    padding: 0;
    background: transparent;
    border-radius: 0;
    box-shadow: none;
    transition: none;
    border: none;
    margin-bottom: 15px;
    border-bottom: 1px solid rgba(11, 19, 43, 0.1);
}

.main-slider-section .col-md-3 .column-post-item.image-left:last-child {
    border-bottom: none;
    margin-bottom: 0;
}

.main-slider-section .col-md-3 .column-post-item.image-left:hover {
    box-shadow: none;
    transform: none;
    background: transparent;
}

.main-slider-section .col-md-3 .column-post-item.image-left .post-thumb {
    flex: 0 0 70px;
    width: 70px;
    height: 70px;
    margin-right: 12px;
    border-radius: 6px;
    overflow: hidden;
    box-shadow: 0 2px 6px rgba(11, 19, 43, 0.1);
}

.main-slider-section .col-md-3 .column-post-item.image-left .post-thumb img {
    width: 70px;
    height: 70px;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.main-slider-section .col-md-3 .column-post-item.image-left:hover .post-thumb img {
    transform: scale(1.05);
}

.main-slider-section .col-md-3 .column-post-item.image-left .post-content {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding: 0;
}

.main-slider-section .col-md-3 .column-post-item.image-left .post-title {
    font-size: 13px;
    line-height: 1.3;
    margin: 0 0 4px 0;
    font-weight: 600;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.main-slider-section .col-md-3 .column-post-item.image-left .post-title a {
    color: var(--brand-blue) !important;
    text-decoration: none;
    transition: color 0.3s ease;
}

.main-slider-section .col-md-3 .column-post-item.image-left:hover .post-title a {
    color: var(--brand-teal) !important;
}

.main-slider-section .col-md-3 .column-post-item.image-left .post-meta {
    font-size: 11px;
    color: var(--brand-gray);
    margin: 0 0 4px 0;
    line-height: 1.2;
}

.main-slider-section .col-md-3 .column-post-item.image-left .post-excerpt {
    font-size: 11px;
    line-height: 1.3;
    color: var(--brand-gray);
    margin: 0;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.with-thumbnail-wrap .post-content {
    flex: 1;
    min-width: 0;
}

.with-thumbnail-wrap .post-content h3 {
    font-size: 14px;
    font-weight: 600;
    line-height: 1.3;
    margin: 0 0 5px 0;
}

.with-thumbnail-wrap .post-content h3 a {
    color: var(--brand-blue);
    text-decoration: none;
    transition: color 0.2s ease;
}

.with-thumbnail-wrap .post-content h3 a:hover {
    color: var(--brand-teal);
}

.with-thumbnail-wrap .post-meta {
    font-size: 11px;
    color: var(--brand-gray);
    list-style: none;
    padding: 0;
    margin: 0;
}

/* No-thumbnail column styles */
.no-thumbnail-section {
    width: 100%;
    flex: 1;
    display: flex;
    flex-direction: column;
}

.no-thumbnail-wrap {
    padding: 12px 0;
    border-bottom: 1px solid rgba(11, 19, 43, 0.1);
}

.no-thumbnail-wrap:first-child {
    padding-top: 0;
}

.no-thumbnail-wrap:last-child {
    border-bottom: none;
    padding-bottom: 0;
}

.no-thumbnail-wrap .post-content h3 {
    font-size: 14px;
    font-weight: 600;
    line-height: 1.3;
    margin: 0 0 5px 0;
}

.no-thumbnail-wrap .post-content h3 a {
    color: var(--brand-blue);
    text-decoration: none;
    transition: color 0.2s ease;
}

.no-thumbnail-wrap .post-content h3 a:hover {
    color: var(--brand-teal);
}

.no-thumbnail-wrap .post-meta {
    font-size: 11px;
    color: var(--brand-gray);
    list-style: none;
    padding: 0;
    margin: 0;
}

/* ========================================
   Slider Text Position Styles
   ======================================== */

/* Default: Text below image */
.main-slider.text-position-below .main-slider-wrap {
    position: relative;
}

.main-slider.text-position-below .carousel-thumb {
    position: relative;
}

.main-slider.text-position-below .post-content {
    position: relative;
    padding: 15px 0;
    background: transparent;
}

/* Overlay: Text over image - uses unified overlay card styles */
.main-slider.text-position-overlay .main-slider-wrap {
    position: relative;
}

.main-slider.text-position-overlay .carousel-thumb {
    position: relative;
}

.main-slider.text-position-overlay .carousel-thumb::after {
    display: none;
}

/* ========================================
   6. Unified Overlay Card Styles
   All overlay cards share the same hover behavior
   ======================================== */

/* Base overlay card styles - applies to all overlay cards */
.overlay-card,
.column-post-item.image-background,
.eight-wraps.image-background,
.carousel-wraps.overlay-style,
.main-slider-wrap.overlay-style,
.carousel-wraps.text-overlay,
.main-slider-wrap.text-overlay {
    position: relative;
    overflow: hidden;
}

/* Overlay card thumbnail container */
.overlay-card .post-thumb,
.overlay-card .carousel-thumb,
.overlay-card .eight-thumb,
.column-post-item.image-background .post-thumb,
.eight-wraps.image-background .eight-thumb,
.carousel-wraps.overlay-style .carousel-thumb,
.carousel-wraps.text-overlay .carousel-thumb,
.main-slider-wrap.overlay-style .carousel-thumb,
.main-slider-wrap.text-overlay .carousel-thumb {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1;
}

/* Overlay card images - standardized height */
.overlay-card .post-thumb img,
.overlay-card .carousel-thumb img,
.overlay-card .eight-thumb img,
.column-post-item.image-background .post-thumb img,
.eight-wraps.image-background .eight-thumb img,
.carousel-wraps.overlay-style .carousel-thumb img,
.carousel-wraps.text-overlay .carousel-thumb img,
.main-slider-wrap.overlay-style .carousel-thumb img,
.main-slider-wrap.text-overlay .carousel-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
    transition: transform 0.4s ease;
}

/* Overlay gradient - removed for white background style */
.overlay-card .post-thumb::after,
.overlay-card .carousel-thumb::after,
.overlay-card .eight-thumb::after,
.column-post-item.image-background .post-thumb::after,
.eight-wraps.image-background .eight-thumb::after {
    display: none;
}

/* Unified hover effects for all overlay cards */
.overlay-card:hover .post-thumb img,
.overlay-card:hover .carousel-thumb img,
.overlay-card:hover .eight-thumb img,
.column-post-item.image-background:hover .post-thumb img,
.eight-wraps.image-background:hover .eight-thumb img,
.carousel-wraps.overlay-style:hover .carousel-thumb img,
.carousel-wraps.text-overlay:hover .carousel-thumb img,
.main-slider-wrap.overlay-style:hover .carousel-thumb img,
.main-slider-wrap.text-overlay:hover .carousel-thumb img {
    transform: scale(1.05);
}


/* Overlay card content positioning - sterile medical aesthetic */
.overlay-card .post-content,
.column-post-item.image-background .post-content,
.eight-wraps.image-background .post-content,
.carousel-wraps.overlay-style .post-content,
.carousel-wraps.text-overlay .post-content,
.main-slider-wrap.overlay-style .post-content,
.main-slider-wrap.text-overlay .post-content {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    z-index: 2;
    padding: 14px 16px;
    color: var(--brand-blue);
    background: rgba(255, 255, 255, 0.96);
    backdrop-filter: blur(4px);
    border-radius: 0;
    border-top: 2px solid rgba(152, 193, 217, 0.2);
    box-shadow: 0 -2px 12px rgba(11, 19, 43, 0.08);
}

/* Overlay card text styles - clinical typography */
.overlay-card .post-title a,
.overlay-card .post-title a:visited,
.column-post-item.image-background .post-title a,
.column-post-item.image-background .post-title a:visited,
.eight-wraps.image-background .post-content h3 a,
.eight-wraps.image-background .post-content h3 a:visited,
.carousel-wraps.overlay-style .post-content h3 a,
.carousel-wraps.overlay-style .post-content h3 a:visited,
.carousel-wraps.text-overlay .post-content h3 a,
.carousel-wraps.text-overlay .post-content h3 a:visited,
.main-slider-wrap.overlay-style .post-content h3 a,
.main-slider-wrap.overlay-style .post-content h3 a:visited,
.main-slider-wrap.text-overlay .post-content h3 a,
.main-slider-wrap.text-overlay .post-content h3 a:visited {
    color: var(--brand-blue) !important;
    text-shadow: none;
    transition: all 0.25s ease;
    font-weight: 500;
    letter-spacing: 0.01em;
}

.overlay-card:hover .post-title a,
.column-post-item.image-background:hover .post-title a,
.eight-wraps.image-background:hover .post-content h3 a,
.carousel-wraps.overlay-style:hover .post-content h3 a,
.carousel-wraps.text-overlay:hover .post-content h3 a,
.main-slider-wrap.overlay-style:hover .post-content h3 a,
.main-slider-wrap.text-overlay:hover .post-content h3 a {
    color: var(--brand-teal) !important;
}

.overlay-card .post-meta,
.column-post-item.image-background .post-meta,
.eight-wraps.image-background .post-meta,
.carousel-wraps.overlay-style .post-meta,
.carousel-wraps.text-overlay .post-meta,
.main-slider-wrap.overlay-style .post-meta,
.main-slider-wrap.text-overlay .post-meta {
    color: var(--brand-gray);
    text-shadow: none;
    font-size: 12px;
    font-weight: 400;
    letter-spacing: 0.02em;
}

.overlay-card .post-meta a,
.column-post-item.image-background .post-meta a,
.eight-wraps.image-background .post-meta a,
.carousel-wraps.overlay-style .post-meta a,
.carousel-wraps.text-overlay .post-meta a,
.main-slider-wrap.overlay-style .post-meta a,
.main-slider-wrap.text-overlay .post-meta a {
    color: var(--brand-gray) !important;
    transition: color 0.25s ease;
}

.overlay-card .post-meta a:hover,
.column-post-item.image-background .post-meta a:hover,
.eight-wraps.image-background .post-meta a:hover,
.carousel-wraps.overlay-style .post-meta a:hover,
.carousel-wraps.text-overlay .post-meta a:hover,
.main-slider-wrap.overlay-style .post-meta a:hover,
.main-slider-wrap.text-overlay .post-meta a:hover {
    color: var(--brand-teal) !important;
}

.overlay-card .post-excerpt,
.overlay-card .post-excerpt p,
.column-post-item.image-background .post-excerpt p,
.eight-wraps.image-background .post-excerpt p {
    color: var(--brand-gray);
    text-shadow: none;
    line-height: 1.6;
    font-size: 14px;
}

/* Standardized card heights for all overlay types */
.column-post-item.image-background,
.carousel-wraps.overlay-style,
.carousel-wraps.text-overlay {
    height: 250px;
    margin-bottom: 12px;
}

.eight-wraps.image-background {
    height: 250px;
    margin-bottom: 12px;
}

.main-slider-wrap.overlay-style,
.main-slider-wrap.text-overlay {
    height: 400px;
}

/* 3-column + slider section - smaller column cards to match slider */
.main-slider-section .column-post-item.image-background {
    height: 130px;
    margin-bottom: 8px;
}

.column-post-item.image-background .post-content {
    /* min-height removed - auto height based on content */
}

.column-post-item.image-background .post-title {
    font-size: 15px;
    line-height: 1.3;
    margin: 0;
}

/* Default and other templates for column posts */
.column-post-item:not(.image-background) {
    margin-bottom: 15px;
    border-bottom: 1px solid rgba(11, 19, 43, 0.1);
    padding-bottom: 15px;
}

.column-post-item:not(.image-background):last-child {
    border-bottom: none;
}

.column-post-item:not(.image-background) .post-thumb {
    margin-bottom: 10px;
}

.column-post-item:not(.image-background) .post-thumb img {
    width: 100%;
    height: auto;
    display: block;
}

/* Compact template - Image on left */
.column-post-item.image-left {
    display: flex;
    flex-direction: row;
    align-items: center;
    margin-bottom: 15px;
    padding-bottom: 15px;
    border-bottom: 1px solid rgba(11, 19, 43, 0.1);
}

.column-post-item.image-left .post-thumb {
    flex: 0 0 70px;
    width: 70px;
    height: 70px;
    margin-right: 12px;
    margin-bottom: 0;
    border-radius: 6px;
    overflow: hidden;
}

.column-post-item.image-left .post-thumb img {
    width: 70px;
    height: 70px;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.column-post-item.image-left:hover .post-thumb img {
    transform: scale(1.05);
}

.column-post-item.image-left .post-content {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding: 2px 0;
}

.column-post-item.image-left .post-title {
    font-size: 13px;
    line-height: 1.3;
    margin: 0 0 4px 0;
    font-weight: 600;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.column-post-item.image-left .post-title a {
    color: var(--brand-blue) !important;
    text-decoration: none;
    transition: color 0.3s ease;
}

.column-post-item.image-left:hover .post-title a {
    color: var(--brand-teal) !important;
}

.column-post-item.image-left .post-meta {
    font-size: 11px;
    color: var(--brand-gray);
    margin: 0 0 4px 0;
    line-height: 1.2;
}

.column-post-item.image-left .post-excerpt {
    font-size: 11px;
    line-height: 1.3;
    color: var(--brand-gray);
    margin: 0;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* Image on right */
.column-post-item.image-right {
    display: flex;
    flex-direction: row-reverse;
    align-items: flex-start;
}

.column-post-item.image-right .post-thumb {
    flex: 0 0 80px;
    width: 80px;
    margin-left: 12px;
    margin-bottom: 0;
}

.column-post-item.image-right .post-thumb img {
    width: 80px;
    height: 80px;
    object-fit: cover;
}

.column-post-item.image-right .post-content {
    flex: 1;
    min-width: 0;
}

.column-post-item:not(.image-background) .post-title {
    margin: 0 0 8px 0;
    font-size: 16px;
    line-height: 1.4;
}

.column-post-item:not(.image-background) .post-title a {
    color: var(--brand-blue) !important;
    text-decoration: none;
    transition: color 0.3s;
}

.column-post-item:not(.image-background) .post-title a:hover {
    color: var(--brand-teal) !important;
}

.column-post-item:not(.image-background) .post-meta {
    font-size: 12px;
    color: var(--brand-gray);
    margin-top: 5px;
}

.column-post-item:not(.image-background) .post-excerpt {
    font-size: 14px;
    color: var(--brand-gray);
    margin-top: 8px;
}

/* ========================================
   7. Carousel Styles
   ======================================== */

/* Prevent FOUC - hide carousel items until Slick initializes */
.card-slider-wrap:not(.slick-initialized) {
    display: flex;
    flex-wrap: nowrap;
    overflow: hidden;
}

.card-slider-wrap:not(.slick-initialized) .carousel-wraps {
    flex: 0 0 25%;
    max-width: 25%;
    min-width: 25%;
}

/* Carousel slides per view - Desktop sizing (only before slick init) */
.card-slider-wrap.slides-per-view-3:not(.slick-initialized) .carousel-wraps {
    flex: 0 0 33.333%;
    max-width: 33.333%;
}

.card-slider-wrap.slides-per-view-4:not(.slick-initialized) .carousel-wraps {
    flex: 0 0 25%;
    max-width: 25%;
}

.card-slider-wrap.slides-per-view-5:not(.slick-initialized) .carousel-wraps {
    flex: 0 0 20%;
    max-width: 20%;
}

/* After slick initializes, let slick control widths */
.card-slider-wrap.slick-initialized .carousel-wraps {
    flex: none;
    max-width: none;
    min-width: auto;
}

/* CRITICAL: Constrain the carousel container to prevent width expansion */
.card-slider-wrap,
.threecolumn {
    width: 100%;
    max-width: 100%;
    overflow: hidden;
}

.card-slider-wrap .slick-list,
.threecolumn .slick-list {
    overflow: hidden;
}

/* Slick slide styling */
.card-slider-wrap.slick-initialized .slick-slide {
    margin: 0 10px;
}

.card-slider-wrap.slick-initialized .slick-list {
    margin: 0 -10px;
}

/* Carousel image sizing - 3:2 aspect ratio */
.card-slider-wrap .carousel-thumb {
    position: relative;
    overflow: hidden;
    aspect-ratio: 3 / 2;
}

.card-slider-wrap .carousel-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
}

/* Enhanced carousel arrows with proper chevron styling - centered to image only */
.card-slider-wrap .slick-prev,
.card-slider-wrap .slick-next {
    position: absolute;
    top: 40%; /* Center to image area (image is ~80% of slide height) */
    transform: translateY(-50%);
    z-index: 10;
    width: 40px;
    height: 40px;
    background: rgba(11, 19, 43, 0.9);
    border: 2px solid rgba(255, 255, 255, 0.6);
    border-radius: 50%;
    cursor: pointer;
    transition: all 0.3s ease;
    opacity: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 2px 10px rgba(11, 19, 43, 0.3);
}

/* For text-below layout, center to image area */
.card-slider-wrap.carousel-text-below .slick-prev,
.card-slider-wrap.carousel-text-below .slick-next {
    top: 35%; /* Adjust for text-below layout */
}

/* For text-overlay layout, center to full slide */
.card-slider-wrap.carousel-text-overlay .slick-prev,
.card-slider-wrap.carousel-text-overlay .slick-next {
    top: 50%;
}

.card-slider-wrap:hover .slick-prev,
.card-slider-wrap:hover .slick-next {
    opacity: 1;
}

.card-slider-wrap .slick-prev:hover,
.card-slider-wrap .slick-next:hover {
    background: rgba(11, 19, 43, 1);
    border-color: rgba(255, 255, 255, 0.9);
    transform: translateY(-50%) scale(1.1);
    box-shadow: 0 4px 15px rgba(11, 19, 43, 0.4);
}

.card-slider-wrap .slick-prev {
    left: 15px;
}

.card-slider-wrap .slick-next {
    right: 15px;
}

/* SVG chevron styling */
.card-slider-wrap .slick-prev svg,
.card-slider-wrap .slick-next svg {
    width: 12px;
    height: 12px;
    transition: transform 0.3s ease;
}

.card-slider-wrap .slick-prev:hover svg,
.card-slider-wrap .slick-next:hover svg {
    transform: scale(1.1);
}

.card-slider-wrap:hover .slick-prev,
.card-slider-wrap:hover .slick-next {
    opacity: 1 !important;
}

.card-slider-wrap .slick-prev:hover,
.card-slider-wrap .slick-next:hover {
    background: rgba(11, 19, 43, 0.95);
    border-color: rgba(255, 255, 255, 0.8);
    transform: translateY(-50%) scale(1.15);
    box-shadow: 0 6px 20px rgba(11, 19, 43, 0.3);
}

.card-slider-wrap .slick-prev {
    left: 20px;
}

.card-slider-wrap .slick-next {
    right: 20px;
}

/* Smooth looping transitions */
.card-slider-wrap.slick-looping .slick-track {
    transition: transform 0.8s cubic-bezier(0.4, 0, 0.2, 1) !important;
}

.card-slider-wrap .slick-track {
    transition: transform 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Seamless loop transitions */
.card-slider-wrap.seamless-loop .slick-track {
    transition: transform 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}

.card-slider-wrap.loop-transition .slick-track {
    transition: transform 0.8s cubic-bezier(0.4, 0, 0.2, 1) !important;
}

.card-slider-wrap.loop-transition-reverse .slick-track {
    transition: transform 0.8s cubic-bezier(0.4, 0, 0.2, 1) !important;
}

/* Minimal text-only and default templates in 3-column sections */
.main-slider-section .col-md-3 .column-post-item:not(.image-left):not(.image-right) {
    padding: 0;
    background: transparent;
    border-radius: 0;
    box-shadow: none;
    border: none;
    margin-bottom: 15px;
    border-bottom: 1px solid rgba(11, 19, 43, 0.1);
}

.main-slider-section .col-md-3 .column-post-item:not(.image-left):not(.image-right):last-child {
    border-bottom: none;
    margin-bottom: 0;
}

.main-slider-section .col-md-3 .column-post-item:not(.image-left):not(.image-right):hover {
    box-shadow: none;
    transform: none;
    background: transparent;
}

.main-slider-section .col-md-3 .column-post-item:not(.image-left):not(.image-right) .post-content {
    padding: 0;
}

.main-slider-section .col-md-3 .column-post-item:not(.image-left):not(.image-right) .post-title {
    font-size: 13px;
    line-height: 1.3;
    margin: 0 0 4px 0;
    font-weight: 600;
}

.main-slider-section .col-md-3 .column-post-item:not(.image-left):not(.image-right) .post-title a {
    color: var(--brand-blue) !important;
    text-decoration: none;
    transition: color 0.3s ease;
}

.main-slider-section .col-md-3 .column-post-item:not(.image-left):not(.image-right):hover .post-title a {
    color: var(--brand-teal) !important;
}

.main-slider-section .col-md-3 .column-post-item:not(.image-left):not(.image-right) .post-meta {
    font-size: 11px;
    color: var(--brand-gray);
    margin: 0 0 4px 0;
    line-height: 1.2;
}

.main-slider-section .col-md-3 .column-post-item:not(.image-left):not(.image-right) .post-excerpt {
    font-size: 11px;
    line-height: 1.3;
    color: var(--brand-gray);
    margin: 0;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* Carousel dots - horizontal layout */
.card-slider-wrap .slick-dots {
    display: flex !important;
    flex-direction: row;
    justify-content: center;
    align-items: center;
    list-style: none;
    padding: 0;
    margin: 20px 0 0 0;
    gap: 8px;
}

.card-slider-wrap .slick-dots li {
    display: inline-block;
    width: 12px;
    height: 12px;
    margin: 0;
    padding: 0;
}

.card-slider-wrap .slick-dots li button {
    width: 12px;
    height: 12px;
    padding: 0;
    border: 2px solid rgba(11, 19, 43, 0.5);
    border-radius: 50%;
    background: rgba(11, 19, 43, 0.3);
    font-size: 0;
    cursor: pointer;
    transition: all 0.3s ease;
}

.card-slider-wrap .slick-dots li button:hover {
    background: rgba(11, 19, 43, 0.6);
    border-color: rgba(11, 19, 43, 0.8);
    transform: scale(1.2);
}

.card-slider-wrap .slick-dots li.slick-active button {
    background: var(--brand-teal);
    border-color: var(--brand-teal);
    transform: scale(1.3);
    box-shadow: 0 2px 8px rgba(11, 19, 43, 0.3);
}

.card-slider-wrap .slick-dots li.slick-active button::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 4px;
    height: 4px;
    background: #ffffff;
    border-radius: 50%;
    animation: dotPulse 2s ease-in-out infinite;
}

@keyframes dotPulse {
    0%, 100% {
        opacity: 1;
        transform: translate(-50%, -50%) scale(1);
    }
    50% {
        opacity: 0.7;
        transform: translate(-50%, -50%) scale(0.8);
    }
}

/* Enhanced carousel cards with hover effects */
.card-slider-wrap .carousel-wraps {
    background: #fff;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 4px 20px rgba(11, 19, 43, 0.08);
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    margin: 0 10px;
}

.card-slider-wrap .carousel-wraps::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, var(--brand-teal), var(--brand-blue));
    transform: scaleX(0);
    transition: transform 0.3s ease;
}

.card-slider-wrap .carousel-wraps:hover::before {
    transform: scaleX(1);
}

.card-slider-wrap .carousel-wraps:hover {
    box-shadow: 0 12px 40px rgba(11, 19, 43, 0.15);
    transform: translateY(-8px);
}

.card-slider-wrap.carousel-text-below .carousel-wraps {
    background: #fff;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 4px 20px rgba(11, 19, 43, 0.08);
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    margin: 0 10px;
}

.card-slider-wrap.carousel-text-below .carousel-wraps:hover {
    box-shadow: 0 12px 40px rgba(11, 19, 43, 0.15);
    transform: translateY(-8px);
}

.card-slider-wrap.carousel-text-below .carousel-thumb img {
    transition: transform 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}

.card-slider-wrap.carousel-text-below .carousel-wraps:hover .carousel-thumb img {
    transform: scale(1.08);
}

.card-slider-wrap.carousel-text-below .post-content {
    padding: 20px;
}

.card-slider-wrap.carousel-text-below .post-content h3 {
    font-size: 16px;
    font-weight: 600;
    line-height: 1.4;
    margin: 0 0 10px 0;
}

.card-slider-wrap.carousel-text-below .post-content h3 a {
    color: var(--brand-blue) !important;
    text-decoration: none;
    transition: color 0.3s ease;
}

.card-slider-wrap.carousel-text-below .carousel-wraps:hover .post-content h3 a {
    color: var(--brand-teal) !important;
}

.card-slider-wrap.carousel-text-below .post-meta {
    font-size: 13px;
    color: var(--brand-gray);
    margin-bottom: 10px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.card-slider-wrap.carousel-text-below .post-excerpt {
    font-size: 14px;
    line-height: 1.5;
    color: var(--brand-gray);
    margin-bottom: 12px;
}

.card-slider-wrap.carousel-text-below .more-link {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    color: var(--brand-teal);
    font-weight: 500;
    text-decoration: none;
    transition: all 0.3s ease;
    font-size: 13px;
}

.card-slider-wrap.carousel-text-below .more-link::after {
    content: '→';
    transition: transform 0.3s ease;
}

.card-slider-wrap.carousel-text-below .carousel-wraps:hover .more-link::after {
    transform: translateX(3px);
}

.card-slider-wrap.carousel-text-below .carousel-wraps:hover .more-link {
    color: var(--brand-blue);
}

/* Loading states and micro-interactions */
.blog-eight-section .eight-wraps,
.main-slider-section .col-md-3 .column-post-item,
.card-slider-wrap .carousel-wraps {
    position: relative;
    overflow: hidden;
}

/* Skeleton loading animation */
.blog-eight-section .eight-wraps.loading,
.main-slider-section .col-md-3 .column-post-item.loading,
.card-slider-wrap .carousel-wraps.loading {
    pointer-events: none;
}

.blog-eight-section .eight-wraps.loading::after,
.main-slider-section .col-md-3 .column-post-item.loading::after,
.card-slider-wrap .carousel-wraps.loading::after {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.4), transparent);
    animation: shimmer 1.5s infinite;
}

@keyframes shimmer {
    0% {
        left: -100%;
    }
    100% {
        left: 100%;
    }
}

/* Enhanced focus states for accessibility */
.blog-eight-section .eight-wraps:focus-within,
.main-slider-section .col-md-3 .column-post-item:focus-within,
.card-slider-wrap .carousel-wraps:focus-within {
    outline: 3px solid var(--brand-teal);
    outline-offset: 2px;
}

/* Smooth image loading */
.blog-eight-section .eight-thumb img,
.main-slider-section .col-md-3 .column-post-item .post-thumb img,
.card-slider-wrap .carousel-thumb img {
    opacity: 0;
    transition: opacity 0.3s ease;
}

.blog-eight-section .eight-thumb img.loaded,
.main-slider-section .col-md-3 .column-post-item .post-thumb img.loaded,
.card-slider-wrap .carousel-thumb img.loaded {
    opacity: 1;
}

/* Improved touch targets for mobile */
@media (max-width: 767px) {
    .card-slider-wrap .slick-prev,
    .card-slider-wrap .slick-next {
        width: 40px;
        height: 40px;
        opacity: 0.8 !important;
    }
    
    .card-slider-wrap .slick-prev {
        left: 10px;
    }
    
    .card-slider-wrap .slick-next {
        right: 10px;
    }
    
    .card-slider-wrap .slick-dots {
        gap: 8px;
        margin: 20px 0 0 0;
    }
    
    .card-slider-wrap .slick-dots li button {
        width: 8px;
        height: 8px;
    }
}

/* Carousel - Text overlay on image */
.card-slider-wrap.carousel-text-overlay .carousel-wraps {
    position: relative;
    overflow: hidden;
}

.card-slider-wrap.carousel-text-overlay .carousel-content-wrap {
    position: relative;
    overflow: hidden;
}

.card-slider-wrap.carousel-text-overlay .carousel-thumb {
    position: relative;
}

.card-slider-wrap.carousel-text-overlay .carousel-thumb img {
    transition: transform 0.4s ease;
}

.card-slider-wrap.carousel-text-overlay .carousel-thumb::after {
    display: none;
}

/* Carousel overlay hover effects - matches unified overlay cards */
.card-slider-wrap.carousel-text-overlay .carousel-wraps:hover .carousel-thumb img {
    transform: scale(1.05);
}

.card-slider-wrap.carousel-text-overlay .post-content {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 14px 16px;
    background: rgba(255, 255, 255, 0.96);
    backdrop-filter: blur(4px);
    border-radius: 0;
    border-top: 2px solid rgba(152, 193, 217, 0.2);
    box-shadow: 0 -2px 12px rgba(11, 19, 43, 0.08);
    color: var(--brand-blue);
    z-index: 2;
}
.card-slider-wrap.carousel-text-overlay .post-content h3 {
    margin: 0;
    padding: 0;
}
.card-slider-wrap.carousel-text-overlay .post-content h3 a {
    color: var(--brand-blue) !important;
    text-shadow: none;
    transition: all 0.25s ease;
    font-weight: 500;
    letter-spacing: 0.01em;
}

.card-slider-wrap.carousel-text-overlay .carousel-wraps:hover .post-content h3 a {
    color: var(--brand-teal) !important;
}



.card-slider-wrap.carousel-text-overlay .post-content .post-meta,
.card-slider-wrap.carousel-text-overlay .post-content .post-meta a,
.card-slider-wrap.carousel-text-overlay .post-content .post-meta time {
    color: var(--brand-gray) !important;
    text-shadow: none;
    font-size: 12px;
    font-weight: 400;
    letter-spacing: 0.02em;
    transition: color 0.25s ease;
}

.card-slider-wrap.carousel-text-overlay .post-content .post-meta a:hover {
    color: var(--brand-teal) !important;
}

.card-slider-wrap.carousel-text-overlay .post-content p {
    color: var(--brand-gray);
    text-shadow: none;
    line-height: 1.6;
    font-size: 14px;
}

/* Template-specific adjustments */
.template-default .column-post-item:not(.image-left):not(.image-right):not(.image-background) .post-thumb img {
    object-fit: cover;
}

.template-minimal .column-post-item {
    margin-bottom: 8px;
    padding-bottom: 8px;
}

.template-minimal .column-post-item .post-title {
    font-size: 14px;
    line-height: 1.3;
}

.template-minimal .column-post-item .post-meta {
    font-size: 11px;
}

.template-magazine .column-post-item:first-child {
    margin-bottom: 20px;
}

.template-magazine .column-post-item:first-child .post-thumb img {
    max-height: 200px;
    object-fit: cover;
}

.template-magazine .column-post-item:not(:first-child) {
    margin-bottom: 10px;
}

.template-magazine .column-post-item:not(:first-child) .post-title {
    font-size: 14px;
}

/* ========================================
   8. Responsive Adjustments
   ======================================== */

@media (max-width: 991px) {
    .homepage-section {
        padding: 25px 0;
    }
    
    .homepage-section.section-first {
        padding-top: 35px;
        margin-top: 15px;
    }
}

@media (max-width: 991px) {
    .main-slider-section .col-md-3,
    .main-slider-section .col-md-6 {
        margin-bottom: 20px;
    }
    
    /* Ensure slider container doesn't exceed screen width on mobile */
    .main-slider,
    .main-slider-section .main-slider,
    .col-md-6 .main-slider {
        max-width: 100%;
        width: 100%;
        overflow: hidden;
    }
    
    .main-slider .slick-list {
        overflow: hidden;
    }
    
    .main-slider-wrap .carousel-thumb {
        height: auto;
        aspect-ratio: 16 / 9;
    }
    
    .main-slider-wrap .carousel-thumb img {
        width: 100%;
        height: 100%;
        object-fit: cover;
    }
}

@media (max-width: 768px) {
    .homepage-section {
        padding: 20px 0;
    }
    
    .homepage-section.section-first {
        padding-top: 25px;
        margin-top: 10px;
    }
    
    /* Mobile slider container */
    .main-slider,
    .main-slider-section .main-slider {
        max-width: 100%;
        overflow: hidden;
    }
    
    .main-slider-wrap .carousel-thumb {
        height: auto;
        aspect-ratio: 16 / 9;
    }
}

/* ========================================
   HTML Section Styles
   ======================================== */

.html-section {
    padding: 30px 0;
}

.html-section.full-width {
    padding: 30px 0;
}

/* ========================================
   9. Accessibility - Focus Outlines
   ======================================== */

.view-more-link:focus-visible,
.eight-wraps a:focus-visible,
.carousel-wraps a:focus-visible,
.column-post-item a:focus-visible,
.with-thumbnail-wrap a:focus-visible,
.no-thumbnail-wrap a:focus-visible,
.main-slider-wrap a:focus-visible,
.slick-arrow:focus-visible,
.slick-dots button:focus-visible,
.card-slider-wrap a:focus-visible {
    outline: 2px solid var(--brand-teal);
    outline-offset: 2px;
}

/* ========================================
   10. Thumbnail Aspect Ratio Consistency
   ======================================== */

.eight-thumb,
.carousel-thumb,
.column-post-item:not(.image-left):not(.image-right):not(.image-background) .post-thumb,
.no-thumbnail-wrap .post-thumb {
    aspect-ratio: 3 / 2;
    overflow: hidden;
}

.eight-thumb img,
.carousel-thumb img,
.post-thumb img,
.no-thumbnail-wrap .post-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
}

/* Hide any leftover line-dots from cached markup */
.line-dots {
    display: none !important;
}

.html-section.full-width .html-content {
    max-width: 100%;
}

.html-section .html-content {
    line-height: 1.7;
}

.html-section .html-content img {
    max-width: 100%;
    height: auto;
}

.html-section .html-content p {
    margin-bottom: 1em;
}

.html-section .html-content h1,
.html-section .html-content h2,
.html-section .html-content h3,
.html-section .html-content h4,
.html-section .html-content h5,
.html-section .html-content h6 {
    margin-top: 1.5em;
    margin-bottom: 0.5em;
}

.html-section .html-content ul,
.html-section .html-content ol {
    margin-bottom: 1em;
    padding-left: 2em;
}

.html-section .html-content blockquote {
    border-left: 4px solid var(--brand-teal);
    padding-left: 20px;
    margin: 1.5em 0;
    font-style: italic;
    color: var(--brand-gray);
}
