/* ==========================================================================
   MAGAZINE PAGE STYLES - TIỆM MAY ĐỎ
   Chuyên trang Tạp chí Âu Phục
   ========================================================================== */

/* 1. MAGAZINE HERO */
.magazine-hero {
    position: relative;
    padding: 190px 0 90px;
    background: radial-gradient(circle at 50% 20%, #2b0607 0%, #140304 80%, #0a0102 100%);
    color: #ffffff;
    text-align: center;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.magazine-hero::before {
    content: '';
    position: absolute;
    inset: 0;
    background: radial-gradient(rgba(255, 255, 255, 0.04) 1px, transparent 0);
    background-size: 24px 24px;
    pointer-events: none;
}

.magazine-hero .page-tag {
    font-family: var(--font-sans);
    font-size: 0.72rem;
    font-weight: 600;
    letter-spacing: 3.5px;
    text-transform: uppercase;
    color: #e5b2b4;
    display: inline-block;
    margin-bottom: 16px;
}

.magazine-hero .page-title {
    font-family: var(--font-serif);
    font-size: 3.6rem;
    font-style: normal;
    font-weight: 400;
    line-height: 1.25;
    margin-bottom: 22px;
    text-shadow: 0 4px 25px rgba(0, 0, 0, 0.6);
}

.magazine-hero .page-desc {
    max-width: 720px;
    margin: 0 auto;
    font-size: 1.15rem;
    line-height: 1.85;
    color: rgba(255, 255, 255, 0.85);
    font-weight: 300;
}

/* 2. LƯỚI ẢNH TẠP CHÍ */
.magazine-main-section {
    padding: clamp(48px, 7vw, 90px) 0 clamp(72px, 9vw, 120px);
    background: var(--bg-cream);
}

.mag-feed-header {
    padding-bottom: 16px;
    margin-bottom: clamp(22px, 3vw, 42px);
    border-bottom: 1px solid var(--border-color);
}

.mag-feed-header h2 {
    font-size: clamp(1.8rem, 3vw, 2.35rem);
    line-height: 1.25;
    color: var(--text-dark);
}

.magazine-spreads {
    display: grid;
    gap: clamp(36px, 5vw, 72px);
}

.magazine-spread {
    --story-gap: clamp(12px, 1.55vw, 22px);
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    grid-template-areas: "lead" "small";
    gap: var(--story-gap);
}

.magazine-spread__small {
    grid-area: small;
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: var(--story-gap);
}

.magazine-story {
    min-width: 0;
}

.magazine-story--lead {
    grid-area: lead;
}

.magazine-story__link {
    position: relative;
    isolation: isolate;
    display: flex;
    flex-direction: column;
    height: 100%;
    overflow: hidden;
    border-radius: 2px;
    background: var(--bg-sand);
}

.magazine-story__image {
    width: 100%;
    height: auto;
    aspect-ratio: 4 / 3;
    object-fit: cover;
    object-position: center;
}

.magazine-story__caption {
    position: relative;
    z-index: 2;
    padding: clamp(12px, 2.4vw, 20px);
    overflow-wrap: anywhere;
}

.magazine-story__category {
    display: block;
    margin-bottom: 6px;
    color: var(--primary);
    font-size: 0.68rem;
    font-weight: 600;
    letter-spacing: 0.09em;
    line-height: 1.45;
    text-transform: uppercase;
}

.magazine-story__caption h3 {
    font-size: clamp(1.03rem, 2.5vw, 1.44rem);
    line-height: 1.35;
    text-wrap: pretty;
}

.magazine-story--lead .magazine-story__link {
    min-height: clamp(22rem, 57vw, 29rem);
    justify-content: flex-end;
    background: #211716;
    color: #fff;
}

.magazine-story--lead .magazine-story__caption {
    padding: clamp(20px, 4vw, 42px);
}

.magazine-story--lead .magazine-story__caption h3 {
    font-size: clamp(1.75rem, 4.2vw, 3.1rem);
    line-height: 1.16;
}

.magazine-story--lead .magazine-story__caption p {
    max-width: 48ch;
    margin-top: 10px;
    color: #f3e9e3;
    font-size: clamp(0.85rem, 1.4vw, 1rem);
    line-height: 1.6;
}

.magazine-story__link:focus-visible {
    outline: 2px solid var(--primary);
    outline-offset: 4px;
}

.magazine-story--lead .magazine-story__image {
    position: absolute;
    inset: 0;
    height: 100%;
    aspect-ratio: auto;
}

.magazine-story--lead .magazine-story__link::after {
    position: absolute;
    z-index: 1;
    inset: 0;
    content: "";
    background: linear-gradient(0deg, #180d0c 0%, rgb(24 13 12 / 92%) 30%, rgb(24 13 12 / 18%) 79%, transparent);
}

.magazine-story--lead .magazine-story__category {
    color: #f4d2c1;
}

@media (min-width: 900px) {
    .magazine-spread {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        grid-template-areas: "lead small";
    }

    .magazine-spread:nth-child(even) {
        grid-template-areas: "small lead";
    }

    .magazine-spread__small {
        width: 100%;
        aspect-ratio: 1;
        min-height: 27rem;
        grid-template-rows: repeat(2, minmax(0, 1fr));
    }

    .magazine-story__link {
        justify-content: flex-end;
        background: #211716;
        color: #fff;
    }

    .magazine-story--lead .magazine-story__link {
        min-height: 0;
    }

    .magazine-story__image {
        position: absolute;
        inset: 0;
        height: 100%;
        aspect-ratio: auto;
    }

    .magazine-story__link::after {
        position: absolute;
        z-index: 1;
        inset: 0;
        content: "";
        background: linear-gradient(0deg, #180d0c 0%, rgb(24 13 12 / 87%) 28%, rgb(24 13 12 / 16%) 75%, transparent);
    }

    .magazine-story__category {
        color: #f4d2c1;
    }
}

@media (hover: hover) and (prefers-reduced-motion: no-preference) {
    .magazine-story__image {
        transition: transform 0.65s cubic-bezier(0.25, 1, 0.5, 1);
    }

    .magazine-story__link:is(:hover, :focus-visible) .magazine-story__image {
        transform: scale(1.045);
    }
}

/* RESPONSIVE */
@media (max-width: 768px) {
    .magazine-hero {
        padding: 140px 0 50px;
    }
    .magazine-hero .page-title {
        font-size: 2.2rem;
    }
}
