/*
 * AYP Homepage Blog / Yoga Journal
 * Scoped to .ayp-home-blog to avoid collisions with existing homepage CSS.
 */

.ayp-home-blog {
    --ayp-blog-cream: #f8f4ea;
    --ayp-blog-white: #ffffff;
    --ayp-blog-green: #173f35;
    --ayp-blog-green-soft: #31594d;
    --ayp-blog-gold: #b7965a;
    --ayp-blog-line: rgba(23, 63, 53, 0.16);
    --ayp-blog-muted: #6b716c;
    --ayp-blog-radius: 3px;

    position: relative;
    width: 100%;
    overflow: hidden;
    background: var(--ayp-blog-cream);
    color: var(--ayp-blog-green);
    padding: 108px 24px 94px;
}

.ayp-home-blog,
.ayp-home-blog * {
    box-sizing: border-box;
}

.ayp-home-blog__container {
    width: min(1180px, 100%);
    margin: 0 auto;
}

/* ---------- Header ---------- */

.ayp-home-blog__header {
    max-width: 820px;
    margin: 0 auto 58px;
    text-align: center;
}

.ayp-home-blog__eyebrow {
    margin: 0;
    color: var(--ayp-blog-gold);
    font-family: var(--font-body, "Manrope", sans-serif);
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.24em;
    line-height: 1.5;
    text-transform: uppercase;
}

.ayp-home-blog__ornament {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    margin: 19px auto 16px;
}

.ayp-home-blog__ornament span {
    display: block;
    width: 42px;
    height: 1px;
    background: var(--ayp-blog-gold);
    opacity: 0.65;
}

.ayp-home-blog__ornament svg {
    width: 30px;
    height: 24px;
    fill: none;
    stroke: var(--ayp-blog-gold);
    stroke-width: 1.15;
}

.ayp-home-blog__title {
    max-width: 760px;
    margin: 0 auto;
    color: var(--ayp-blog-green);
    font-family: var(--font-display, "Cormorant Garamond", Georgia, serif);
    font-size: clamp(38px, 4.2vw, 58px);
    font-weight: 500;
    letter-spacing: -0.025em;
    line-height: 0.99;
}

.ayp-home-blog__title em {
    color: var(--ayp-blog-gold);
    font-style: italic;
    font-weight: 500;
}

.ayp-home-blog__intro {
    max-width: 650px;
    margin: 24px auto 0;
    color: var(--ayp-blog-muted);
    font-family: var(--font-body, "Manrope", sans-serif);
    font-size: 15px;
    font-weight: 400;
    line-height: 1.85;
}

/* ---------- Cards ---------- */

.ayp-home-blog__grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 24px;
}

.ayp-home-blog-card {
    min-width: 0;
    background: var(--ayp-blog-white);
    border: 1px solid rgba(23, 63, 53, 0.08);
    border-radius: var(--ayp-blog-radius);
    box-shadow: 0 12px 36px rgba(23, 63, 53, 0.055);
    overflow: hidden;
    transition:
        transform 280ms ease,
        box-shadow 280ms ease;
}

.ayp-home-blog-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 20px 48px rgba(23, 63, 53, 0.11);
}

.ayp-home-blog-card__media {
    position: relative;
    display: block;
    aspect-ratio: 1.42 / 1;
    overflow: hidden;
    background: #e7e1d3;
    text-decoration: none;
}

.ayp-home-blog-card__media img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 650ms cubic-bezier(.2,.65,.2,1);
}

.ayp-home-blog-card:hover .ayp-home-blog-card__media img {
    transform: scale(1.045);
}

.ayp-home-blog-card__media::after {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(
        to bottom,
        rgba(23, 63, 53, 0.02) 50%,
        rgba(23, 63, 53, 0.25) 100%
    );
    pointer-events: none;
}

.ayp-home-blog-card__media-fallback {
    display: grid;
    place-items: center;
    width: 100%;
    height: 100%;
    color: rgba(23, 63, 53, 0.55);
    font-family: var(--font-display, "Cormorant Garamond", Georgia, serif);
    font-size: 48px;
    font-style: italic;
}

.ayp-home-blog-card__date {
    position: absolute;
    z-index: 1;
    right: 15px;
    bottom: 15px;
    padding: 7px 10px;
    background: rgba(255, 255, 255, 0.94);
    color: var(--ayp-blog-green);
    font-family: var(--font-body, "Manrope", sans-serif);
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 0.1em;
    line-height: 1;
    text-transform: uppercase;
}

.ayp-home-blog-card__content {
    display: flex;
    flex-direction: column;
    min-height: 255px;
    padding: 25px 27px 27px;
}

.ayp-home-blog-card__kicker {
    margin: 0 0 10px;
    color: var(--ayp-blog-gold);
    font-family: var(--font-body, "Manrope", sans-serif);
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 0.17em;
    line-height: 1.5;
    text-transform: uppercase;
}

.ayp-home-blog-card__title {
    margin: 0;
    color: var(--ayp-blog-green);
    font-family: var(--font-display, "Cormorant Garamond", Georgia, serif);
    font-size: 28px;
    font-weight: 500;
    letter-spacing: -0.01em;
    line-height: 1.08;
}

.ayp-home-blog-card__title a {
    color: inherit;
    text-decoration: none;
}

.ayp-home-blog-card__title a:hover {
    color: var(--ayp-blog-green-soft);
}

.ayp-home-blog-card__excerpt {
    margin: 13px 0 0;
    color: var(--ayp-blog-muted);
    font-family: var(--font-body, "Manrope", sans-serif);
    font-size: 13px;
    line-height: 1.72;
}

.ayp-home-blog-card__link {
    display: inline-flex;
    align-items: center;
    gap: 9px;
    align-self: flex-start;
    margin-top: auto;
    padding-top: 20px;
    color: var(--ayp-blog-green);
    font-family: var(--font-body, "Manrope", sans-serif);
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 0.14em;
    line-height: 1.4;
    text-decoration: none;
    text-transform: uppercase;
}

.ayp-home-blog-card__link span {
    color: var(--ayp-blog-gold);
    font-size: 17px;
    font-weight: 400;
    line-height: 0;
    transition: transform 220ms ease;
}

.ayp-home-blog-card__link:hover span {
    transform: translateX(4px);
}

/* ---------- Footer CTA ---------- */

.ayp-home-blog__footer {
    display: flex;
    flex-direction: column;
    align-items: center;
    margin-top: 48px;
    text-align: center;
}

.ayp-home-blog__button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 14px;
    min-height: 49px;
    padding: 0 25px;
    border: 1px solid var(--ayp-blog-green);
    border-radius: 2px;
    background: var(--ayp-blog-green);
    color: #fff;
    font-family: var(--font-body, "Manrope", sans-serif);
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 0.16em;
    line-height: 1;
    text-decoration: none;
    text-transform: uppercase;
    transition:
        background 220ms ease,
        color 220ms ease,
        transform 220ms ease;
}

.ayp-home-blog__button span {
    color: #d7bf91;
    font-size: 17px;
    font-weight: 400;
    line-height: 0;
}

.ayp-home-blog__button:hover {
    background: transparent;
    color: var(--ayp-blog-green);
    transform: translateY(-2px);
}

.ayp-home-blog__closing {
    margin: 27px 0 0;
    color: var(--ayp-blog-green);
    font-family: var(--font-body, "Manrope", sans-serif);
    font-size: 9px;
    font-weight: 700;
    letter-spacing: 0.22em;
    line-height: 1.6;
    opacity: 0.58;
}

.ayp-home-blog__closing span {
    margin: 0 7px;
    color: var(--ayp-blog-gold);
}

/* ---------- Empty state ---------- */

.ayp-home-blog__empty {
    max-width: 680px;
    margin: 0 auto;
    padding: 54px 30px;
    border: 1px solid var(--ayp-blog-line);
    background: rgba(255, 255, 255, 0.55);
    text-align: center;
}

.ayp-home-blog__empty-mark {
    display: block;
    margin-bottom: 12px;
    color: var(--ayp-blog-gold);
    font-family: var(--font-display, "Cormorant Garamond", Georgia, serif);
    font-size: 32px;
}

.ayp-home-blog__empty h3 {
    margin: 0;
    color: var(--ayp-blog-green);
    font-family: var(--font-display, "Cormorant Garamond", Georgia, serif);
    font-size: 30px;
    font-weight: 500;
}

.ayp-home-blog__empty p {
    margin: 9px auto 0;
    color: var(--ayp-blog-muted);
    font-family: var(--font-body, "Manrope", sans-serif);
    font-size: 14px;
    line-height: 1.7;
}

/* ---------- Tablet ---------- */

@media (max-width: 980px) {
    .ayp-home-blog {
        padding: 88px 22px 78px;
    }

    .ayp-home-blog__header {
        margin-bottom: 46px;
    }

    .ayp-home-blog__grid {
        gap: 18px;
    }

    .ayp-home-blog-card__content {
        min-height: 245px;
        padding: 23px 22px 24px;
    }

    .ayp-home-blog-card__title {
        font-size: 25px;
    }
}

/* ---------- Mobile ---------- */

@media (max-width: 720px) {
    .ayp-home-blog {
        padding: 72px 17px 66px;
    }

    .ayp-home-blog__header {
        margin-bottom: 36px;
    }

    .ayp-home-blog__eyebrow {
        font-size: 9px;
        letter-spacing: 0.2em;
    }

    .ayp-home-blog__ornament {
        margin-top: 16px;
        margin-bottom: 14px;
    }

    .ayp-home-blog__ornament span {
        width: 28px;
    }

    .ayp-home-blog__title {
        font-size: clamp(35px, 10vw, 44px);
        line-height: 1.02;
    }

    .ayp-home-blog__title-break {
        display: none;
    }

    .ayp-home-blog__intro {
        margin-top: 18px;
        font-size: 13px;
        line-height: 1.75;
    }

    .ayp-home-blog__grid {
        grid-template-columns: 1fr;
        gap: 18px;
    }

    .ayp-home-blog-card__media {
        aspect-ratio: 1.55 / 1;
    }

    .ayp-home-blog-card__content {
        min-height: 0;
        padding: 22px 21px 24px;
    }

    .ayp-home-blog-card__title {
        font-size: 27px;
    }

    .ayp-home-blog-card__excerpt {
        font-size: 13px;
    }

    .ayp-home-blog-card__link {
        margin-top: 17px;
        padding-top: 0;
    }

    .ayp-home-blog__footer {
        margin-top: 34px;
    }

    .ayp-home-blog__button {
        min-height: 47px;
        padding: 0 21px;
        font-size: 9px;
    }

    .ayp-home-blog__closing {
        max-width: 280px;
        margin-top: 23px;
        font-size: 8px;
        line-height: 1.8;
    }
}

@media (prefers-reduced-motion: reduce) {
    .ayp-home-blog-card,
    .ayp-home-blog-card__media img,
    .ayp-home-blog__button,
    .ayp-home-blog-card__link span {
        transition: none;
    }
}
