/* ════════════════════════════════════════════════════════
   THEME VARIABLES - Now using centralized color-variables.css
   These local variables reference the main theme system
   ════════════════════════════════════════════════════════ */

:root {
    --blog-over-primary-rgb: 59, 130, 246;

    /* Featured section specific - inherits from main theme */
    --blog-over-featured-card-bg: var(--blog-over-bg-card);
    --blog-over-featured-card-shadow: var(--blog-over-shadow-card, 0 4px 15px rgba(0, 0, 0, 0.08));
    --blog-over-featured-card-shadow-hover: var(--blog-over-shadow-lg, 0 12px 30px rgba(0, 0, 0, 0.15));
    --blog-over-featured-text-primary: var(--blog-over-heading-color, #111827);
    --blog-over-featured-text-secondary: var(--blog-over-text-secondary, #4b5563);

    /* Use theme variables directly to ensure they update in dark mode */
    --blog-over-card-bg: var(--blog-over-bg-card, #ffffff);
}

/* Dark Theme - inherits from main theme automatically via CSS variables */

/* Featured Links Section */
.blog-over-featured-links-wrapper {
    margin-top: 30px;
    margin-bottom: 30px;
}

/* Section Header */
.blog-over-featured-section-header {
    text-align: left;
    margin-bottom: 30px;
}

.blog-over-featured-section-title {
    font-size: 28px;
    font-weight: 700;
    color: var(--blog-over-heading-color, #111827);
    margin: 0 0 10px;
    line-height: 1.3;
}

.blog-over-featured-section-description {
    font-size: 16px;
    color: var(--blog-over-text-secondary, #4b5563);
    margin: 0;
    max-width: 600px;
    line-height: 1.6;
}

.blog-over-featured-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 20px;
}

.blog-over-featured-item {
    position: relative;
    min-height: 180px;
    background-size: cover;
    background-position: center;
    border-radius: 8px;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    background-color: #c4c4c4;
    transition: all 0.4s ease;
    aspect-ratio: 16 / 9;
}

.blog-over-featured-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.3);
    transition: all 0.4s ease;
    z-index: 1;
}

.blog-over-featured-overlay-link {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 3;
}

.blog-over-featured-content {
    position: relative;
    z-index: 2;
    padding: 20px;
    width: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    height: 100%;
    transition: all 0.4s ease;
    text-align: center;
}

.blog-over-featured-title {
    color: #fff;
    font-size: 22px;
    font-weight: 700;
    margin: 0 0 10px;
    text-transform: uppercase;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.4);
    transition: all 0.4s ease;
    text-align: center;
}

.blog-over-featured-title a {
    color: inherit;
    text-decoration: none;
    transition: color 0.3s ease;
}

.blog-over-featured-title a:hover {
    color: var(--blog-over-primary, #3b82f6);
}

.blog-over-featured-btn {
    display: inline-block;
    padding: 10px 24px;
    background: var(--blog-over-primary, #3b82f6);
    color: #fff;
    font-size: 12px;
    font-weight: 600;
    border-radius: 4px;
    text-transform: uppercase;
    transition: all 0.3s ease;
    opacity: 0;
    transform: translateY(15px);
    border: none;
    cursor: pointer;
}

.blog-over-featured-btn:hover {
    background: var(--blog-over-secondary, #1e40af);
    border-color: var(--blog-over-secondary, #1e40af);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.25);
    color: #fff !important;
}

/* ════════════════════════════════════════════════════════
   SECTION WIDTH
   ════════════════════════════════════════════════════════ */

.blog-over-featured-links-wrapper.blog-over-section-full-width .blog-over-container {
    max-width: 100%;
    padding-left: 20px;
    padding-right: 20px;
}

/* ════════════════════════════════════════════════════════
   LAYOUT 1: GRID (Default - Equal columns)
   ════════════════════════════════════════════════════════ */

.blog-over-layout-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 20px;
}

/* Grid items - prevent overflow */
.blog-over-layout-grid .blog-over-featured-item {
    min-width: 0;
    width: 100%;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Grid item hover - box shadow effect */
.blog-over-layout-grid .blog-over-featured-item:hover {
    box-shadow: 0 12px 30px rgba(0, 0, 0, 0.2);
    transform: translateY(-3px);
}

/* Dark mode - adjusted shadows for grid */
html.blog-over-dark-mode .blog-over-layout-grid .blog-over-featured-item,
body.blog-over-dark-mode .blog-over-layout-grid .blog-over-featured-item {
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
}

html.blog-over-dark-mode .blog-over-layout-grid .blog-over-featured-item:hover,
body.blog-over-dark-mode .blog-over-layout-grid .blog-over-featured-item:hover {
    box-shadow: 0 12px 30px rgba(0, 0, 0, 0.5);
}

/* Grid text hover effects */
.blog-over-layout-grid .blog-over-featured-title {
    transition: all 0.3s ease;
}

.blog-over-layout-grid .blog-over-featured-item:hover .blog-over-featured-title {
    transform: translateY(-2px);
}

/* Grid button - show on hover */
.blog-over-layout-grid .blog-over-featured-item:hover .blog-over-featured-btn {
    opacity: 1;
    transform: translateY(0);
    background: var(--blog-over-primary, #3b82f6);
    border-color: var(--blog-over-primary, #3b82f6);
}

.blog-over-layout-grid .blog-over-featured-item:hover .blog-over-featured-btn:hover {
    background: var(--blog-over-secondary, #1e40af);
    border-color: var(--blog-over-secondary, #1e40af);
}

/* ════════════════════════════════════════════════════════
   COLUMN CLASSES (Must be after base layout to override)
   ════════════════════════════════════════════════════════ */

.blog-over-featured-grid.blog-over-layout-grid.blog-over-columns-2 {
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

.blog-over-featured-grid.blog-over-layout-grid.blog-over-columns-3 {
    grid-template-columns: repeat(3, minmax(0, 1fr));
}

.blog-over-featured-grid.blog-over-layout-grid.blog-over-columns-4 {
    grid-template-columns: repeat(4, minmax(0, 1fr));
}

/* ════════════════════════════════════════════════════════
   LAYOUT 2: CARDS (Clean vertical card with image on top)
   ════════════════════════════════════════════════════════ */

.blog-over-layout-cards {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 25px;
}

/* Cards layout - vertical card structure */
.blog-over-layout-cards .blog-over-featured-item {
    min-width: 0;
    width: 100%;
    min-height: auto;
    height: auto;
    aspect-ratio: auto;
    border-radius: 12px;
    overflow: hidden;
    position: relative;
    background: var(--blog-over-card-bg, #fff);
    box-shadow: var(--blog-over-card-shadow, 0 4px 15px rgba(0, 0, 0, 0.08));
    transition: all 0.3s ease;
    display: flex;
    flex-direction: column;
}

.blog-over-layout-cards .blog-over-featured-item:hover {
    transform: translateY(-5px);
    box-shadow: var(--blog-over-card-shadow-hover, 0 12px 30px rgba(0, 0, 0, 0.15));
}

/* Hide background image for cards layout (using actual img element) */
.blog-over-layout-cards .blog-over-featured-item {
    background-image: none !important;
}

/* Image wrapper for cards */
.blog-over-featured-image-wrapper {
    padding: 12px 12px 0 12px;
    flex-shrink: 0;
    background: var(--blog-over-card-bg, #fff);
}

.blog-over-featured-image {
    width: 100%;
    height: auto;
    object-fit: cover;
    border-radius: 8px;
    display: block;
}

/* Hide the overlay in cards layout */
.blog-over-layout-cards .blog-over-featured-overlay {
    display: none;
}

/* Overlay link covers entire card */
.blog-over-layout-cards .blog-over-featured-overlay-link {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 2;
}

/* Content area below image */
.blog-over-layout-cards .blog-over-featured-content {
    position: relative;
    padding: 20px;
    display: flex;
    flex-direction: column;
    align-items: center;
    flex: 1;
    background: var(--blog-over-card-bg, #fff);
    z-index: 1;
}

/* Title styling */
.blog-over-layout-cards .blog-over-featured-title {
    color: var(--blog-over-text-primary, #1a1a1a);
    font-size: 18px;
    font-weight: 700;
    text-transform: none;
    text-shadow: none;
    margin: 0 0 15px;
    line-height: 1.4;
}

.blog-over-layout-cards .blog-over-featured-title a {
    color: inherit;
}

.blog-over-layout-cards .blog-over-featured-title a:hover {
    color: var(--blog-over-primary, #3b82f6);
}

/* Button styling */
.blog-over-layout-cards .blog-over-featured-btn {
    opacity: 1;
    transform: none;
    background: var(--blog-over-primary, #3b82f6);
    color: #fff;
    border: none;
    padding: 10px 20px;
    border-radius: 4px;
    font-size: 13px;
    font-weight: 600;
    margin-top: auto;
    transition: all 0.3s ease;
}

.blog-over-layout-cards .blog-over-featured-btn:hover {
    background: var(--blog-over-secondary, #1e40af);
    transform: none;
    box-shadow: 0 4px 12px rgba(59, 130, 246, 0.4);
}

/* Column classes for Cards layout */
.blog-over-featured-grid.blog-over-layout-cards.blog-over-columns-2 {
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

.blog-over-featured-grid.blog-over-layout-cards.blog-over-columns-3 {
    grid-template-columns: repeat(3, minmax(0, 1fr));
}

.blog-over-featured-grid.blog-over-layout-cards.blog-over-columns-4 {
    grid-template-columns: repeat(4, minmax(0, 1fr));
}

/* Dark theme support now handled by CSS variables at :root */

/* ─────────────────────────────────────────────
   CARDS BORDER HOVER EFFECTS
   ───────────────────────────────────────────── */

/* Border effect setup for Cards - uses ::after only (::before not available) */
/* Border effect setup for Cards - uses ::after only (::before not available) */
.blog-over-layout-cards:not(.blog-over-border-none) .blog-over-featured-item::after {
    content: '';
    position: absolute;
    display: block;
    background: var(--blog-over-primary, #3b82f6);
    z-index: 10;
    pointer-events: none;
}

/* Cards - Metis effect (bottom line) */
.blog-over-layout-cards.blog-over-border-metis .blog-over-featured-item::after {
    width: 100%;
    height: 3px;
    bottom: 0;
    left: 0;
    transform-origin: 100% 50%;
    transform: scaleX(0);
    transition: transform 0.4s ease;
}

.blog-over-layout-cards.blog-over-border-metis .blog-over-featured-item:hover::after {
    transform-origin: 0% 50%;
    transform: scaleX(1);
}

/* Cards - IO effect (bottom line only for cards) */
.blog-over-layout-cards.blog-over-border-io .blog-over-featured-item::after {
    width: 100%;
    height: 3px;
    bottom: 0;
    left: 0;
    transform-origin: 100% 50%;
    transform: scaleX(0);
    transition: transform 0.3s cubic-bezier(0.7, 0, 0.2, 1);
}

.blog-over-layout-cards.blog-over-border-io .blog-over-featured-item:hover::after {
    transform-origin: 0% 50%;
    transform: scaleX(1);
    transition-timing-function: cubic-bezier(0.4, 1, 0.8, 1);
}

/* Cards - Thebe effect */
.blog-over-layout-cards.blog-over-border-thebe .blog-over-featured-item::after {
    width: 100%;
    height: 3px;
    bottom: 0;
    left: 0;
    transform-origin: 100% 50%;
    transform: scaleX(0);
    transition: transform 0.3s cubic-bezier(0.2, 1, 0.8, 1);
}

.blog-over-layout-cards.blog-over-border-thebe .blog-over-featured-item:hover::after {
    transform-origin: 0% 50%;
    transform: scaleX(1) scaleY(2);
}

/* ════════════════════════════════════════════════════════
   LAYOUT 3: MINIMAL (Horizontal strip with button on right)
   ════════════════════════════════════════════════════════ */

.blog-over-layout-minimal {
    display: flex;
    gap: 0;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
}

.blog-over-layout-minimal .blog-over-featured-item {
    flex: 1;
    height: 180px;
    border-radius: 0;
    position: relative;
}

.blog-over-layout-minimal .blog-over-featured-item:not(:last-child) {
    border-right: 1px solid rgba(255, 255, 255, 0.3);
}

.blog-over-layout-minimal .blog-over-featured-overlay {
    background: linear-gradient(to top, rgba(0, 0, 0, 0.7) 0%, rgba(0, 0, 0, 0.1) 100%);
}

.blog-over-layout-minimal .blog-over-featured-content {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 20px;
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
}

.blog-over-layout-minimal .blog-over-featured-title {
    font-size: 16px;
    margin-bottom: 0;
    letter-spacing: 1px;
    transform: none;
}

.blog-over-layout-minimal .blog-over-featured-btn {
    display: inline-block;
    opacity: 1;
    transform: none;
    padding: 6px 14px;
    font-size: 10px;
    background: transparent;
    box-shadow: none;
    border: 1px solid rgba(255, 255, 255, 0.3);
}

.blog-over-layout-minimal .blog-over-featured-item:hover .blog-over-featured-btn {
    opacity: 1;
    background: var(--blog-over-primary, #3b82f6);
    border-color: var(--blog-over-primary, #3b82f6);
}

.blog-over-layout-minimal .blog-over-featured-item:hover {
    transform: none;
}

.blog-over-layout-minimal .blog-over-featured-item:hover .blog-over-featured-overlay {
    background: linear-gradient(to top, rgba(0, 0, 0, 0.85) 0%, rgba(0, 0, 0, 0.3) 100%);
}

.blog-over-layout-minimal .blog-over-featured-item:hover .blog-over-featured-title {
    transform: none;
}

/* ════════════════════════════════════════════════════════
   HOVER EFFECT 1: FADE DARK
   ════════════════════════════════════════════════════════ */

.blog-over-hover-fade .blog-over-featured-title {
    transform: translateY(10px);
}

.blog-over-hover-fade .blog-over-featured-item:hover .blog-over-featured-overlay {
    background: rgba(0, 0, 0, 0.6);
}

.blog-over-hover-fade .blog-over-featured-item:hover .blog-over-featured-title {
    transform: translateY(0);
}

.blog-over-hover-fade .blog-over-featured-item:hover .blog-over-featured-btn {
    opacity: 1;
    transform: translateY(0);
}

/* ════════════════════════════════════════════════════════
   HOVER EFFECT 2: ZOOM IN
   ════════════════════════════════════════════════════════ */

.blog-over-hover-zoom .blog-over-featured-title {
    transform: scale(0.95);
}

.blog-over-hover-zoom .blog-over-featured-item:hover .blog-over-featured-overlay {
    background: rgba(0, 0, 0, 0.5);
}

.blog-over-hover-zoom .blog-over-featured-item:hover {
    transform: scale(1.02);
}

.blog-over-hover-zoom .blog-over-featured-item:hover .blog-over-featured-title {
    transform: scale(1);
}

.blog-over-hover-zoom .blog-over-featured-item:hover .blog-over-featured-btn {
    opacity: 1;
    transform: translateY(0);
}

/* ════════════════════════════════════════════════════════
   HOVER EFFECT 3: SLIDE UP
   ════════════════════════════════════════════════════════ */

.blog-over-hover-slide-up .blog-over-featured-content {
    transform: translateY(30px);
}

.blog-over-hover-slide-up .blog-over-featured-overlay {
    background: linear-gradient(to top, rgba(0, 0, 0, 0.7) 0%, rgba(0, 0, 0, 0) 100%);
}

.blog-over-hover-slide-up .blog-over-featured-item:hover .blog-over-featured-content {
    transform: translateY(0);
}

.blog-over-hover-slide-up .blog-over-featured-item:hover .blog-over-featured-overlay {
    background: linear-gradient(to top, rgba(0, 0, 0, 0.85) 0%, rgba(0, 0, 0, 0.2) 100%);
}

.blog-over-hover-slide-up .blog-over-featured-item:hover .blog-over-featured-btn {
    opacity: 1;
    transform: translateY(0);
}

/* ════════════════════════════════════════════════════════
   RESPONSIVE
   ════════════════════════════════════════════════════════ */

@media (max-width: 992px) {
    .blog-over-layout-cards {
        grid-template-columns: repeat(2, 1fr);
    }

    .blog-over-layout-minimal {
        flex-direction: column;
    }

    .blog-over-layout-minimal .blog-over-featured-item::after {
        display: none;
    }

    /* Cards responsive - aspect-ratio handles sizing */
}

@media (max-width: 768px) {
    .blog-over-featured-grid {
        grid-template-columns: 1fr;
    }

    /* Override column classes on mobile - match specificity */
    .blog-over-featured-grid.blog-over-layout-grid.blog-over-columns-2,
    .blog-over-featured-grid.blog-over-layout-grid.blog-over-columns-3,
    .blog-over-featured-grid.blog-over-layout-grid.blog-over-columns-4,
    .blog-over-featured-grid.blog-over-layout-cards.blog-over-columns-2,
    .blog-over-featured-grid.blog-over-layout-cards.blog-over-columns-3,
    .blog-over-featured-grid.blog-over-layout-cards.blog-over-columns-4 {
        grid-template-columns: 1fr;
    }

    .blog-over-layout-cards {
        grid-template-columns: 1fr;
        gap: 20px;
    }

    .blog-over-featured-item {
        height: auto;
        min-height: 180px;
    }

    .blog-over-featured-title {
        font-size: 18px;
    }

    .blog-over-featured-btn {
        padding: 8px 18px;
        font-size: 11px;
    }

    /* Cards layout mobile adjustments - image auto height */

    .blog-over-featured-image-wrapper {
        padding: 10px 10px 0 10px;
    }

    .blog-over-layout-cards .blog-over-featured-content {
        padding: 15px;
    }

    .blog-over-layout-cards .blog-over-featured-title {
        font-size: 16px;
        margin-bottom: 12px;
    }
}

@media (min-width: 769px) and (max-width: 992px) {

    /* 2 columns on tablet for 3 and 4 column layouts - match specificity */
    .blog-over-featured-grid.blog-over-layout-grid.blog-over-columns-3,
    .blog-over-featured-grid.blog-over-layout-grid.blog-over-columns-4,
    .blog-over-featured-grid.blog-over-layout-cards.blog-over-columns-3,
    .blog-over-featured-grid.blog-over-layout-cards.blog-over-columns-4 {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

/* ════════════════════════════════════════════════════════
   BORDER HOVER EFFECTS (Inspired by LineHoverStyles)
   ════════════════════════════════════════════════════════ */

/* Border effect setup for Grid, Minimal and Diagonal layouts */
.blog-over-layout-grid:not(.blog-over-border-none) .blog-over-featured-item::before,
.blog-over-layout-grid:not(.blog-over-border-none) .blog-over-featured-item::after,
.blog-over-layout-minimal:not(.blog-over-border-none) .blog-over-featured-item::before,
.blog-over-layout-minimal:not(.blog-over-border-none) .blog-over-featured-item::after,
.blog-over-layout-diagonal:not(.blog-over-border-none) .blog-over-featured-item::before,
.blog-over-layout-diagonal:not(.blog-over-border-none) .blog-over-featured-item::after {
    content: '';
    position: absolute;
    background: var(--blog-over-primary, #3b82f6);
    z-index: 10;
    pointer-events: none;
}

/* ─────────────────────────────────────────────
   METIS - Line Slide (Left to Right)
   ───────────────────────────────────────────── */

.blog-over-border-metis .blog-over-featured-item::before {
    width: 100%;
    height: 3px;
    bottom: 0;
    left: 0;
    transform-origin: 100% 50%;
    transform: scaleX(0);
    transition: transform 0.4s ease;
}

.blog-over-border-metis .blog-over-featured-item:hover::before {
    transform-origin: 0% 50%;
    transform: scaleX(1);
}

/* ─────────────────────────────────────────────
   IO - Double Line (Top and Bottom)
   ───────────────────────────────────────────── */

.blog-over-border-io .blog-over-featured-item::before {
    width: 100%;
    height: 3px;
    bottom: 0;
    left: 0;
    transform-origin: 100% 50%;
    transform: scaleX(0);
    transition: transform 0.3s cubic-bezier(0.7, 0, 0.2, 1);
}

.blog-over-border-io .blog-over-featured-item::after {
    width: 100%;
    height: 3px;
    top: 0;
    left: 0;
    transform-origin: 0% 50%;
    transform: scaleX(0);
    transition: transform 0.3s cubic-bezier(0.7, 0, 0.2, 1);
}

.blog-over-border-io .blog-over-featured-item:hover::before {
    transform-origin: 0% 50%;
    transform: scaleX(1);
    transition-timing-function: cubic-bezier(0.4, 1, 0.8, 1);
}

.blog-over-border-io .blog-over-featured-item:hover::after {
    transform-origin: 100% 50%;
    transform: scaleX(1);
    transition-timing-function: cubic-bezier(0.4, 1, 0.8, 1);
}

/* ─────────────────────────────────────────────
   THEBE - Grow Line (Bottom grows thicker)
   ───────────────────────────────────────────── */

.blog-over-border-thebe .blog-over-featured-item::before {
    width: 100%;
    height: 3px;
    bottom: 0;
    left: 0;
    transform-origin: 100% 50%;
    transform: scaleX(0);
    transition: transform 0.3s cubic-bezier(0.2, 1, 0.8, 1);
}

.blog-over-border-thebe .blog-over-featured-item::after {
    width: 100%;
    height: 3px;
    bottom: 6px;
    left: 0;
    transform-origin: 100% 50%;
    transform: scaleX(0);
    transition: transform 0.4s 0.1s cubic-bezier(0.2, 1, 0.8, 1);
}

.blog-over-border-thebe .blog-over-featured-item:hover::before {
    transform-origin: 0% 50%;
    transform: scaleX(1) scaleY(2);
    transition-timing-function: cubic-bezier(0.7, 0, 0.2, 1);
}

.blog-over-border-thebe .blog-over-featured-item:hover::after {
    transform-origin: 0% 50%;
    transform: scaleX(1);
    transition-timing-function: cubic-bezier(0.7, 0, 0.2, 1);
}

/* ─────────────────────────────────────────────
   KALE - Line Up Animation (Animated wave)
   ───────────────────────────────────────────── */

.blog-over-border-kale .blog-over-featured-item::before {
    width: 100%;
    height: 8px;
    bottom: 0;
    left: 0;
    opacity: 0;
}

.blog-over-border-kale .blog-over-featured-item:hover::before {
    opacity: 1;
    animation: lineUp 0.4s ease forwards;
}

@keyframes lineUp {
    0% {
        transform-origin: 50% 100%;
        transform: scaleY(0.05);
    }

    50% {
        transform-origin: 50% 100%;
        transform: scaleY(1);
    }

    51% {
        transform-origin: 50% 0%;
        transform: scaleY(1);
    }

    100% {
        transform-origin: 50% 0%;
        transform: scaleY(0.05);
    }
}

.blog-over-border-kale .blog-over-featured-item::after {
    width: 100%;
    height: 3px;
    bottom: 0;
    left: 0;
    opacity: 0;
    transition: opacity 0.3s;
    transition-delay: 0s;
}

.blog-over-border-kale .blog-over-featured-item:hover::after {
    opacity: 1;
    transition-delay: 0.4s;
}

/* ─────────────────────────────────────────────
   CARPO - Opposing Lines (Meet in middle)
   ───────────────────────────────────────────── */

.blog-over-border-carpo .blog-over-featured-item::before {
    width: 100%;
    height: 3px;
    bottom: 0;
    left: 0;
    transform-origin: 0% 50%;
    transform: scaleX(0);
    transition: transform 0.3s ease;
}

.blog-over-border-carpo .blog-over-featured-item::after {
    width: 100%;
    height: 3px;
    top: 0;
    left: 0;
    transform-origin: 100% 50%;
    transition: transform 0.3s ease;
}

.blog-over-border-carpo .blog-over-featured-item:hover::before {
    transform: scaleX(1);
}

.blog-over-border-carpo .blog-over-featured-item:hover::after {
    transform: scaleX(0);
}

/* ─────────────────────────────────────────────
   EIRENE - Rounded Bounce (Spring effect)
   ───────────────────────────────────────────── */

.blog-over-border-eirene .blog-over-featured-item::before {
    width: 100%;
    height: 6px;
    bottom: 0;
    left: 0;
    border-radius: 10px;
    transform: scaleX(1);
    transition: transform 0.2s, opacity 0.2s;
    transition-timing-function: cubic-bezier(0.2, 0.57, 0.67, 1.53);
}

.blog-over-border-eirene .blog-over-featured-item:hover::before {
    transition-timing-function: cubic-bezier(0.8, 0, 0.1, 1);
    transition-duration: 0.4s;
    opacity: 1;
    transform: scaleX(1.1) scaleY(0.3);
}

.blog-over-border-eirene .blog-over-featured-item::after {
    width: 3px;
    height: 100%;
    bottom: 0;
    left: 0;
    border-radius: 10px;
    transform: scaleY(0);
    transform-origin: 50% 100%;
    transition: transform 0.3s cubic-bezier(0.2, 0.57, 0.67, 1.53);
}

.blog-over-border-eirene .blog-over-featured-item:hover::after {
    transform: scaleY(1);
}

/* ─────────────────────────────────────────────
   LEDA - Reveal Slide (Content slides in)
   ───────────────────────────────────────────── */

.blog-over-border-leda .blog-over-featured-item::before {
    height: 3px;
    bottom: 5px;
    left: 0;
    width: 100%;
    transform-origin: 100% 50%;
    transform: scaleX(0);
    transition: transform 0.3s cubic-bezier(0.5, 0.5, 0.3, 1);
}

.blog-over-border-leda .blog-over-featured-item:hover::before {
    transform-origin: 0% 50%;
    transform: scaleX(1);
}

/* ─────────────────────────────────────────────
   ERSA - Strike Through (Line across center)
   ───────────────────────────────────────────── */

.blog-over-border-ersa .blog-over-featured-item::before {
    top: 50%;
    left: 0;
    width: 100%;
    height: 3px;
    transform-origin: 100% 50%;
    transform: scaleX(0);
    transition: transform 0.3s cubic-bezier(0.4, 1, 0.8, 1);
}

.blog-over-border-ersa .blog-over-featured-item:hover::before {
    transform-origin: 0% 50%;
    transform: scaleX(1);
}

/* ─────────────────────────────────────────────
   ELARA - Split Line (Expands from center)
   ───────────────────────────────────────────── */

.blog-over-border-elara .blog-over-featured-item::before {
    width: 100%;
    height: 3px;
    bottom: 0;
    left: 0;
    transform-origin: 50% 100%;
    transition: clip-path 0.3s, transform 0.3s cubic-bezier(0.2, 1, 0.8, 1);
    clip-path: polygon(0% 0%, 0% 100%, 0 100%, 0 0, 100% 0, 100% 100%, 0 100%, 0 100%, 100% 100%, 100% 0%);
}

.blog-over-border-elara .blog-over-featured-item:hover::before {
    transform: translateY(-2px) scaleY(2);
    clip-path: polygon(0% 0%, 0% 100%, 50% 100%, 50% 0, 50% 0, 50% 100%, 50% 100%, 0 100%, 100% 100%, 100% 0%);
}

/* ─────────────────────────────────────────────
   DIA - Fade In Lines (Two lines fade in)
   ───────────────────────────────────────────── */

.blog-over-border-dia .blog-over-featured-item::before,
.blog-over-border-dia .blog-over-featured-item::after {
    opacity: 0;
    transform-origin: 50% 0%;
    transform: translateY(3px);
    transition-property: transform, opacity;
    transition-duration: 0.3s;
    transition-timing-function: cubic-bezier(0.2, 1, 0.8, 1);
}

.blog-over-border-dia .blog-over-featured-item::before {
    width: 100%;
    height: 3px;
    bottom: 0;
    left: 0;
}

.blog-over-border-dia .blog-over-featured-item::after {
    width: 70%;
    height: 3px;
    bottom: 6px;
    left: 15%;
}

.blog-over-border-dia .blog-over-featured-item:hover::before,
.blog-over-border-dia .blog-over-featured-item:hover::after {
    opacity: 1;
    transform: translateY(0);
    transition-timing-function: cubic-bezier(0.2, 0, 0.3, 1);
}

.blog-over-border-dia .blog-over-featured-item:hover::after {
    transition-delay: 0.1s;
}

/* ─────────────────────────────────────────────
   HELIKE - Glitch (Glitch effect animation)
   ───────────────────────────────────────────── */

.blog-over-border-helike .blog-over-featured-item::before {
    width: 100%;
    height: 3px;
    bottom: 0;
    left: 0;
    opacity: 0;
}

.blog-over-border-helike .blog-over-featured-item:hover::before {
    opacity: 1;
    animation: glitchLine 0.4s steps(2, start) forwards;
}

@keyframes glitchLine {
    0% {
        transform: scaleX(1);
    }

    10% {
        transform: translateX(10px);
    }

    20% {
        transform: translateY(4px);
    }

    30% {
        transform: scaleX(0.1) translateX(0) translateY(-10px);
    }

    40% {
        transform: scaleX(1) scaleY(0.3) translateY(10px);
    }

    50% {
        transform: scaleX(0.5) translateX(-50px);
    }

    60% {
        transform: scaleX(1) translateX(10px);
    }

    70% {
        transform: scaleX(0.5) translateY(8px);
    }

    80% {
        transform: scaleX(1) scaleY(0.4) translateX(-15px);
    }

    90% {
        transform: scaleY(0.5) translateY(-10px);
    }

    100% {
        opacity: 1;
        transform: scaleX(1) scaleY(1);
    }
}

/* ─────────────────────────────────────────────
   MNEME - Cover Up (Full cover animation)
   ───────────────────────────────────────────── */

.blog-over-border-mneme .blog-over-featured-item::before {
    width: 100%;
    height: 100%;
    top: 0;
    left: 0;
    opacity: 0;
}

.blog-over-border-mneme .blog-over-featured-item:hover::before {
    opacity: 0.3;
    animation: coverUp 0.4s ease forwards;
}

@keyframes coverUp {
    0% {
        transform-origin: 50% 100%;
        transform: scaleY(0.05);
    }

    50% {
        transform-origin: 50% 100%;
        transform: scaleY(1);
    }

    51% {
        transform-origin: 50% 0%;
        transform: scaleY(1);
    }

    100% {
        transform-origin: 50% 0%;
        transform: scaleY(0.05);
    }
}

.blog-over-border-mneme .blog-over-featured-item::after {
    width: 100%;
    height: 3px;
    bottom: 0;
    left: 0;
    transition: opacity 0.3s;
}

.blog-over-border-mneme .blog-over-featured-item:hover::after {
    opacity: 0;
}

/* ─────────────────────────────────────────────
   IOCASTE - Curve Slide (Wavy line slides)
   ───────────────────────────────────────────── */

.blog-over-border-iocaste .blog-over-featured-item::before {
    width: 100%;
    height: 4px;
    bottom: 0;
    left: 0;
    background: linear-gradient(90deg, #fff 0%, rgba(255, 255, 255, 0.5) 50%, #fff 100%);
    transform: translateX(-100%);
    transition: transform 0.5s cubic-bezier(0, 0.25, 0.5, 1);
}

.blog-over-border-iocaste .blog-over-featured-item:hover::before {
    transform: translateX(0);
}

/* ─────────────────────────────────────────────
   HERSE - Arc Draw (Curved underline draws)
   ───────────────────────────────────────────── */

.blog-over-border-herse .blog-over-featured-item::before {
    width: 100%;
    height: 6px;
    bottom: 0;
    left: 0;
    border-radius: 50% 50% 0 0;
    transform: scaleX(0);
    transform-origin: 0% 50%;
    transition: transform 0.4s cubic-bezier(0.7, 0, 0.3, 1);
}

.blog-over-border-herse .blog-over-featured-item:hover::before {
    transform: scaleX(1);
    transition-timing-function: cubic-bezier(0.8, 1, 0.7, 1);
}

/* ─────────────────────────────────────────────
   CARME - Scribble (Hand-drawn style)
   ───────────────────────────────────────────── */

.blog-over-border-carme .blog-over-featured-item::before {
    width: 100%;
    height: 4px;
    bottom: 0;
    left: 0;
    background: repeating-linear-gradient(90deg,
            #fff 0px,
            #fff 4px,
            transparent 4px,
            transparent 8px);
    transform: scaleX(0);
    transform-origin: 0% 50%;
    transition: transform 0.6s cubic-bezier(0.7, 0, 0.3, 1);
}

.blog-over-border-carme .blog-over-featured-item:hover::before {
    transform: scaleX(1);
    transition-timing-function: cubic-bezier(0.8, 1, 0.7, 1);
    transition-duration: 0.3s;
}

/* ═══════════════════════════════════════════════════════
   MOBILE RESPONSIVE IMPROVEMENTS
   ═══════════════════════════════════════════════════════ */

/* ─────────────────────────────────────────
   MOBILE (576px)
   ───────────────────────────────────────── */
@media (max-width: 576px) {
    .blog-over-featured-links-wrapper {
        margin-bottom: 20px;
    }

    .blog-over-featured-section-header {
        margin-bottom: 20px;
    }

    .blog-over-featured-section-title {
        font-size: 22px;
    }

    .blog-over-featured-section-description {
        font-size: 14px;
    }

    .blog-over-featured-grid {
        gap: 15px;
    }

    .blog-over-featured-item {
        min-height: 160px;
    }

    .blog-over-featured-title {
        font-size: 16px;
    }

    .blog-over-featured-btn {
        padding: 7px 14px;
        font-size: 10px;
    }

    .blog-over-featured-content {
        padding: 15px;
    }

    /* Cards layout */
    .blog-over-layout-cards .blog-over-featured-content {
        padding: 12px;
    }

    .blog-over-layout-cards .blog-over-featured-title {
        font-size: 15px;
        margin-bottom: 10px;
    }

    .blog-over-layout-cards .blog-over-featured-btn {
        padding: 8px 16px;
        font-size: 12px;
    }

    /* Minimal layout */
    .blog-over-layout-minimal .blog-over-featured-item {
        height: 140px;
    }

    .blog-over-layout-minimal .blog-over-featured-content {
        padding: 15px;
    }

    .blog-over-layout-minimal .blog-over-featured-title {
        font-size: 14px;
    }
}

/* ─────────────────────────────────────────
   SMALL MOBILE (480px)
   ───────────────────────────────────────── */
@media (max-width: 480px) {
    .blog-over-featured-links-wrapper {
        margin-bottom: 15px;
    }

    .blog-over-featured-section-title {
        font-size: 18px;
    }

    .blog-over-featured-section-description {
        font-size: 13px;
    }

    .blog-over-featured-grid {
        gap: 12px;
    }

    .blog-over-featured-item {
        min-height: 140px;
        border-radius: 6px;
    }

    .blog-over-featured-title {
        font-size: 14px;
    }

    .blog-over-featured-content {
        padding: 12px;
    }

    /* Cards layout */
    .blog-over-featured-image-wrapper {
        padding: 8px 8px 0 8px;
    }

    .blog-over-layout-cards .blog-over-featured-item {
        border-radius: 10px;
    }

    .blog-over-layout-cards .blog-over-featured-title {
        font-size: 14px;
    }

    .blog-over-layout-cards .blog-over-featured-btn {
        padding: 6px 14px;
        font-size: 11px;
    }
}

/* ════════════════════════════════════════════════════════
   LAYOUT 4: DIAGONAL SPLIT (Pro Feature)
   ════════════════════════════════════════════════════════ */

.blog-over-layout-diagonal {
    display: flex;
    align-items: center;
    position: relative;
    /* No extra padding — same as other layouts, nav arrows use negative offset */
}

.blog-over-layout-diagonal .blog-over-featured-inner {
    display: flex;
    gap: 20px;
    width: 100%;
    overflow: hidden;
    transition: transform 0.6s cubic-bezier(0.645, 0.045, 0.355, 1);
    will-change: transform;
}

/* ── Card Item ── */
.blog-over-layout-diagonal .blog-over-featured-item {
    flex: 0 0 calc(33.333% - 13.4px);
    aspect-ratio: 16 / 8;
    background: var(--blog-over-card-bg, #ffffff);
    display: flex;
    flex-direction: row;
    align-items: stretch;
    justify-content: flex-start;
    text-align: left;
    overflow: hidden;
    position: relative;
    border-radius: 6px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.07);
    background-image: none !important;
    /* NO transform on hover — removed intentionally */
    transition: box-shadow 0.4s ease;
}

.blog-over-layout-diagonal .blog-over-featured-item:hover {
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.13);
}

/* ── Image Side (45%) ── */
.blog-over-layout-diagonal .blog-over-featured-diagonal-image {
    position: absolute;
    top: 0;
    right: 0;
    width: 45%;
    height: 100%;
    overflow: hidden;
    clip-path: polygon(18% 0%, 100% 0%, 100% 100%, 0% 100%);
    z-index: 1;
}

/* Inner image — rotates & zooms on hover, very smooth 2.8s */
.blog-over-diagonal-img-inner {
    width: 100%;
    height: 100%;
    background-size: cover;
    background-position: center;
    transform-origin: center center;
    transform: rotate(0deg) scale(1);
    transition: transform 5.6s ease-in-out;
    will-change: transform;
}

.blog-over-layout-diagonal .blog-over-featured-item:hover .blog-over-diagonal-img-inner {
    transform: rotate(10deg) scale(1.2);
}

/* ── Text Side (55%) ── */
.blog-over-layout-diagonal .blog-over-featured-content {
    position: relative;
    z-index: 2;
    padding: 24px 28px;
    width: 55%;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    justify-content: center;
    text-align: left;
    background: transparent;
    flex-shrink: 0;
}

/* ── Category Badge ── */
.blog-over-layout-diagonal .blog-over-featured-category {
    margin-bottom: 10px;
}

.blog-over-layout-diagonal .blog-over-featured-category span {
    display: inline-block;
    padding: 4px 12px;
    color: #fff;
    font-size: 10px;
    font-weight: 700;
    border-radius: 3px;
    text-transform: uppercase;
    letter-spacing: 0.8px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.12);
}

/* ── Category Badge — Grid & Minimal layouts (overlay) ── */
.blog-over-layout-grid .blog-over-featured-category,
.blog-over-layout-minimal .blog-over-featured-category {
    margin-bottom: 8px;
}

.blog-over-layout-grid .blog-over-featured-category span,
.blog-over-layout-minimal .blog-over-featured-category span {
    display: inline-block;
    padding: 4px 12px;
    color: #fff;
    font-size: 10px;
    font-weight: 700;
    border-radius: 3px;
    text-transform: uppercase;
    letter-spacing: 0.8px;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.2);
}

/* ── Category Badge — Cards layout (clean card, no overlay) ── */
.blog-over-layout-cards .blog-over-featured-category {
    margin-bottom: 8px;
}

.blog-over-layout-cards .blog-over-featured-category span {
    display: inline-block;
    padding: 4px 12px;
    color: #fff;
    font-size: 10px;
    font-weight: 700;
    border-radius: 3px;
    text-transform: uppercase;
    letter-spacing: 0.8px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.12);
}

/* ── Title ── */
.blog-over-layout-diagonal .blog-over-featured-title {
    color: var(--blog-over-heading-color, #111827);
    font-size: 15px;
    line-height: 1.5;
    text-transform: none;
    text-shadow: none;
    margin: 0;
    font-weight: 700;
    transition: color 0.3s ease;
}

.blog-over-layout-diagonal .blog-over-featured-title a {
    color: inherit;
    text-decoration: none;
}

.blog-over-layout-diagonal .blog-over-featured-title a:hover {
    color: var(--blog-over-primary, #3b82f6);
}

/* ── Nav Arrows ── */
.blog-over-featured-nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: var(--blog-over-card-bg, #ffffff);
    border: none;
    width: 42px;
    height: 42px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    z-index: 20;
    transition: background 0.3s ease, box-shadow 0.3s ease, transform 0.3s ease;
    color: var(--blog-over-heading-color, #111827);
    border-radius: 50%;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.12);
    font-size: 14px;
}

.blog-over-featured-nav:hover {
    background: var(--blog-over-primary, #3b82f6);
    color: #fff;
    transform: translateY(-50%) scale(1.1);
    box-shadow: 0 6px 18px rgba(0, 0, 0, 0.18);
}

.blog-over-featured-prev { left: 0; }
.blog-over-featured-next { right: 0; }

/* ── Dark Mode ── */
.blog-over-dark-mode .blog-over-layout-diagonal .blog-over-featured-item {
    background: #1e293b;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.35);
}

.blog-over-dark-mode .blog-over-layout-diagonal .blog-over-featured-item:hover {
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.5);
}

.blog-over-dark-mode .blog-over-layout-diagonal .blog-over-featured-title {
    color: #f1f5f9;
}

.blog-over-dark-mode .blog-over-featured-nav {
    background: #334155;
    color: #e2e8f0;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.4);
}

.blog-over-dark-mode .blog-over-featured-nav:hover {
    background: var(--blog-over-primary, #3b82f6);
    color: #fff;
}

/* ── Section Width ── */
.blog-over-featured-links-wrapper.blog-over-section-full-width .blog-over-layout-diagonal {
    /* Full width diagonal — no extra padding needed */
}

/* ── Column Classes for Diagonal (controlled by Customizer) ── */
.blog-over-featured-grid.blog-over-layout-diagonal.blog-over-columns-2 .blog-over-featured-item {
    flex: 0 0 calc(50% - 10px);
}

.blog-over-featured-grid.blog-over-layout-diagonal.blog-over-columns-3 .blog-over-featured-item {
    flex: 0 0 calc(33.333% - 13.4px);
}

.blog-over-featured-grid.blog-over-layout-diagonal.blog-over-columns-4 .blog-over-featured-item {
    flex: 0 0 calc(25% - 15px);
}

/* ── Responsive ── */
@media (max-width: 1024px) {
    /* On tablet — override column settings to max 2 cols */
    .blog-over-featured-grid.blog-over-layout-diagonal.blog-over-columns-3 .blog-over-featured-item,
    .blog-over-featured-grid.blog-over-layout-diagonal.blog-over-columns-4 .blog-over-featured-item {
        flex: 0 0 calc(50% - 10px);
    }
}

@media (max-width: 768px) {
    .blog-over-layout-diagonal .blog-over-featured-inner {
        flex-direction: column;
        overflow: visible;
        transform: none !important;
    }

    /* All column settings → 1 col on mobile */
    .blog-over-featured-grid.blog-over-layout-diagonal .blog-over-featured-item,
    .blog-over-featured-grid.blog-over-layout-diagonal.blog-over-columns-2 .blog-over-featured-item,
    .blog-over-featured-grid.blog-over-layout-diagonal.blog-over-columns-3 .blog-over-featured-item,
    .blog-over-featured-grid.blog-over-layout-diagonal.blog-over-columns-4 .blog-over-featured-item {
        flex: 0 0 100%;
        width: 100%;
        aspect-ratio: auto;
        min-height: 160px;
    }

    .blog-over-featured-nav {
        display: none;
    }

    .blog-over-layout-diagonal .blog-over-featured-diagonal-image {
        width: 45%;
    }

    .blog-over-layout-diagonal .blog-over-featured-content {
        width: 55%;
        padding: 16px 18px;
    }
}