/* ==========================================================================
   Blog Standard — Editorial magazine layout
   Theme: ALONSO-Art · Dark/Light compatible

   © 2025 ALONSO-Art — A WordPress Theme Developed and Designed by DESiGNiA Web
   @version 1.0.4
   @author  DESiGNiA Web — https://designiawebspain.com/
   ========================================================================== */

.aa-blog--standard {
    display: flex;
    flex-direction: column;
    gap: clamp(2.5rem, 5vw, 4rem);
    max-width: 960px;
    margin: 0 auto;
}

/* --- Hero (first post) --- */
.aa-blog__hero {
    position: relative;
    overflow: hidden;
    border-radius: var(--aa-radius-lg, 6px);
}

.aa-blog__hero-image {
    display: block;
    position: relative;
    overflow: hidden;
}

.aa-blog__hero-image img {
    width: 100%;
    height: auto;
    aspect-ratio: 16 / 9;
    object-fit: cover;
    display: block;
    transition: transform 0.8s cubic-bezier(0.4, 0, 0.2, 1);
}

.aa-blog__hero:hover .aa-blog__hero-image img:not(.scp-watermark-img) {
    transform: scale(1.03);
}

.aa-blog__hero-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(
        to top,
        rgba(0, 0, 0, 0.82) 0%,
        rgba(0, 0, 0, 0.45) 40%,
        rgba(0, 0, 0, 0.15) 70%,
        transparent 100%
    );
    pointer-events: none;
    transition: opacity var(--aa-transition);
}

[data-theme="light"] .aa-blog__hero-overlay {
    background: linear-gradient(
        to top,
        rgba(0, 0, 0, 0.78) 0%,
        rgba(0, 0, 0, 0.42) 40%,
        rgba(0, 0, 0, 0.12) 70%,
        transparent 100%
    );
}

.aa-blog__hero-body {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    padding: clamp(1.5rem, 4vw, 2.5rem);
    z-index: 1;
}

.aa-blog__hero-body .aa-blog__cats a {
    color: rgba(255, 255, 255, 0.85);
    border: 1px solid rgba(255, 255, 255, 0.25);
    padding: 0.2rem 0.625rem;
    border-radius: 2px;
    font-size: 0.625rem;
    transition: all var(--aa-transition);
}

.aa-blog__hero-body .aa-blog__cats a:hover {
    color: #fff;
    border-color: rgba(255, 255, 255, 0.6);
}

.aa-blog__hero-title {
    font-family: var(--wp--preset--font-family--heading);
    font-weight: 300;
    font-size: clamp(1.75rem, 4vw, 2.75rem);
    line-height: 1.15;
    margin: 0.625rem 0 0.75rem;
    text-shadow: 0 1px 6px rgba(0, 0, 0, 0.6);
}

.aa-blog__hero-title a {
    color: #fff;
    text-decoration: none;
    transition: opacity var(--aa-transition);
}

.aa-blog__hero-title a:hover {
    opacity: 0.85;
}

.aa-blog__hero-body .aa-blog__meta {
    color: rgba(255, 255, 255, 0.75);
    text-shadow: 0 1px 4px rgba(0, 0, 0, 0.5);
}

.aa-blog__hero-body .aa-blog__meta .aa-blog__author::before {
    color: rgba(255, 255, 255, 0.4);
}

.aa-blog__hero-excerpt {
    font-size: 0.9375rem;
    line-height: 1.65;
    color: rgba(154, 154, 154, 0.97) !important;
    margin: 0 0 1.25rem;
    max-width: 600px;
    text-shadow: 0 1px 4px rgba(0, 0, 0, 0.6);
}

.aa-blog__hero-body .aa-blog__cta {
    color: #fff;
    border: 1px solid rgba(255, 255, 255, 0.35);
    padding: 0.5rem 1.5rem;
    border-radius: var(--aa-radius, 0);
    font-size: 0.75rem;
    letter-spacing: 0.1em;
    transition: all var(--aa-transition);
}

.aa-blog__hero-body .aa-blog__cta:hover {
    border-color: #fff;
    background: rgba(255, 255, 255, 0.1);
}

/* --- Row posts (alternating image/text) --- */
.aa-blog__row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: clamp(1.5rem, 3vw, 2.5rem);
    align-items: center;
}

.aa-blog__row--reverse {
    direction: rtl;
}

.aa-blog__row--reverse > * {
    direction: ltr;
}

.aa-blog__row-image {
    display: block;
    overflow: hidden;
    border-radius: var(--aa-radius-lg, 6px);
    position: relative;
}

.aa-blog__row-image img {
    width: 100%;
    height: auto;
    aspect-ratio: 4 / 3;
    object-fit: cover;
    display: block;
    transition: transform 0.7s cubic-bezier(0.4, 0, 0.2, 1);
}

.aa-blog__row:hover .aa-blog__row-image img:not(.scp-watermark-img) {
    transform: scale(1.04);
}

.aa-blog__row-body {
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.aa-blog__row-body .aa-blog__title {
    font-size: clamp(1.25rem, 2.5vw, 1.75rem);
}

.aa-blog__row-body .aa-blog__cta {
    margin-top: 0.25rem;
}

/* --- Separator line between row posts --- */
.aa-blog__row + .aa-blog__row {
    padding-top: clamp(2.5rem, 5vw, 4rem);
    border-top: 1px solid var(--aa-border);
}

/* --- Separator between hero and first row --- */
.aa-blog__hero + .aa-blog__row {
    padding-top: clamp(2.5rem, 5vw, 4rem);
}

/* --- Responsive --- */
@media (max-width: 768px) {
    .aa-blog__row {
        grid-template-columns: 1fr;
        gap: 1.25rem;
    }

    .aa-blog__row--reverse {
        direction: ltr;
    }

    .aa-blog__hero {
        overflow: visible;
        border-radius: 0;
    }

    .aa-blog__hero-body {
        position: relative;
        padding: 1.25rem 0 0;
    }

    .aa-blog__hero-overlay {
        display: none;
    }

    .aa-blog__hero-title {
        text-shadow: none;
    }

    .aa-blog__hero-title a {
        color: var(--aa-text-primary);
    }

    .aa-blog__hero-body .aa-blog__meta {
        color: var(--aa-text-muted);
        text-shadow: none;
    }

    .aa-blog__hero-excerpt {
        color: var(--aa-text-secondary) !important;
        text-shadow: none;
    }

    .aa-blog__hero-body .aa-blog__cats a {
        color: var(--aa-accent);
        border-color: var(--aa-border);
    }

    .aa-blog__hero-body .aa-blog__cta {
        color: var(--aa-accent);
        border: 1px solid var(--aa-border);
    }

    .aa-blog__hero-image {
        border-radius: var(--aa-radius-lg, 6px);
    }

    .aa-blog__row-image {
        width: 100%;
    }

    .aa-blog__row-image img {
        width: 100%;
    }
}
