/*
Theme Name: VIVE Revista
Theme URI: https://viveblog.com/
Author: VIVE Blog
Description: Tema editorial para VIVE Blog: portada de revista, artículos con lectura cómoda y comentarios integrados.
Version: 1.0.0
Requires at least: 6.4
Requires PHP: 7.4
Text Domain: vive-revista
*/

:root {
    --vive-paper: #fbfaf7;
    --vive-surface: #ffffff;
    --vive-ink: #17211d;
    --vive-muted: #59655f;
    --vive-line: #d9d5cc;
    --vive-green: #245b4b;
    --vive-green-soft: #e8efe9;
    --vive-clay: #a14d38;
    --vive-gold: #b28b48;
    --vive-shadow: 0 14px 38px rgba(23, 33, 29, 0.07);
    --vive-width: 1200px;
    --vive-reading: 730px;
}

*,
*::before,
*::after {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    background: var(--vive-paper);
    color: var(--vive-ink);
    font-family: Arial, Helvetica, sans-serif;
    font-size: 16px;
    line-height: 1.62;
}

a {
    color: inherit;
    text-decoration: none;
}

a:hover {
    color: var(--vive-green);
}

img {
    display: block;
    max-width: 100%;
    height: auto;
}

button,
input,
textarea {
    font: inherit;
}

.screen-reader-text {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    overflow: hidden;
    clip-path: inset(50%);
    border: 0;
    white-space: nowrap;
}

.skip-link:focus {
    position: fixed;
    top: 14px;
    left: 14px;
    width: auto;
    height: auto;
    padding: 10px 14px;
    clip-path: none;
    background: var(--vive-green);
    color: #fff;
    z-index: 1000;
}

.vive-wrap {
    width: min(var(--vive-width), calc(100% - 48px));
    margin: 0 auto;
}

.site-header {
    position: sticky;
    top: 0;
    z-index: 20;
    background: rgba(251, 250, 247, 0.97);
    backdrop-filter: blur(8px);
    border-bottom: 1px solid var(--vive-line);
}

.admin-bar .site-header {
    top: 32px;
}

.edition-line {
    border-bottom: 1px solid var(--vive-line);
    color: var(--vive-muted);
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
}

.edition-line .vive-wrap {
    display: flex;
    justify-content: space-between;
    gap: 16px;
    padding-top: 8px;
    padding-bottom: 8px;
}

.masthead {
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    align-items: center;
    min-height: 112px;
    gap: 22px;
}

.brand {
    grid-column: 2;
    text-align: center;
}

.brand__title {
    display: block;
    color: var(--vive-ink);
    font-family: Georgia, "Times New Roman", serif;
    font-size: clamp(2.8rem, 8vw, 4.65rem);
    font-weight: 700;
    line-height: 0.92;
}

.brand__tagline {
    display: block;
    margin-top: 9px;
    color: var(--vive-muted);
    font-size: 0.78rem;
    font-weight: 700;
    text-transform: uppercase;
}

.primary-navigation {
    border-top: 3px solid var(--vive-ink);
}

.primary-navigation .vive-wrap {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 48px;
}

.primary-navigation ul {
    display: flex;
    align-items: center;
    justify-content: center;
    list-style: none;
    gap: 32px;
    margin: 0;
    padding: 0;
}

.primary-navigation a {
    display: block;
    padding: 13px 0;
    color: var(--vive-muted);
    font-size: 0.82rem;
    font-weight: 700;
    text-transform: uppercase;
}

.primary-navigation a:hover,
.primary-navigation .current-menu-item > a {
    color: var(--vive-green);
}

.menu-toggle {
    display: none;
    width: 44px;
    height: 44px;
    border: 1px solid var(--vive-line);
    border-radius: 4px;
    background: var(--vive-surface);
    color: var(--vive-ink);
    cursor: pointer;
}

.menu-toggle span {
    display: block;
    width: 19px;
    height: 2px;
    margin: 4px auto;
    background: currentColor;
}

.publication {
    padding-top: 34px;
    padding-bottom: 60px;
}

.intro-line {
    display: flex;
    align-items: end;
    justify-content: space-between;
    gap: 24px;
    margin-bottom: 24px;
}

.intro-line h1 {
    margin: 0;
    max-width: 700px;
    font-family: Georgia, "Times New Roman", serif;
    font-size: clamp(1.9rem, 3.5vw, 2.8rem);
    line-height: 1.13;
    font-weight: 700;
}

.intro-line p {
    margin: 0;
    max-width: 300px;
    color: var(--vive-muted);
    font-size: 0.94rem;
}

.eyebrow {
    display: block;
    margin: 0 0 10px;
    color: var(--vive-clay);
    font-size: 0.73rem;
    line-height: 1.2;
    font-weight: 700;
    text-transform: uppercase;
}

.feature-story {
    display: grid;
    grid-template-columns: minmax(0, 1.12fr) minmax(300px, 0.88fr);
    background: var(--vive-surface);
    border-top: 1px solid var(--vive-ink);
    border-bottom: 1px solid var(--vive-line);
    margin-bottom: 42px;
}

.feature-story__media {
    display: block;
    aspect-ratio: 16 / 10;
    background: var(--vive-green-soft);
    overflow: hidden;
}

.feature-story__media img,
.story-card__media img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.35s ease;
}

.feature-story:hover .feature-story__media img,
.story-card:hover .story-card__media img {
    transform: scale(1.025);
}

.feature-story__fallback,
.story-card__fallback {
    display: flex;
    align-items: center;
    justify-content: center;
    height: 100%;
    color: var(--vive-green);
    background: var(--vive-green-soft);
    font-family: Georgia, "Times New Roman", serif;
    font-size: 2rem;
    font-weight: 700;
}

.feature-story__content {
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding: clamp(25px, 4vw, 42px);
}

.feature-story h2 {
    margin: 0;
    font-family: Georgia, "Times New Roman", serif;
    font-size: clamp(2rem, 4vw, 3.05rem);
    font-weight: 700;
    line-height: 1.08;
}

.feature-story__excerpt {
    margin: 18px 0 22px;
    color: var(--vive-muted);
}

.story-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    color: var(--vive-muted);
    font-size: 0.82rem;
    font-weight: 600;
}

.story-meta span:not(:last-child)::after {
    content: "/";
    margin-left: 8px;
    color: var(--vive-gold);
}

.read-link {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    margin-top: 23px;
    color: var(--vive-green);
    font-size: 0.84rem;
    font-weight: 700;
    text-transform: uppercase;
}

.read-link::after {
    content: "\2192";
    font-size: 1.1rem;
}

.section-heading {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 20px;
    border-bottom: 2px solid var(--vive-ink);
    margin: 0 0 23px;
    padding-bottom: 12px;
}

.section-heading h2 {
    margin: 0;
    font-family: Georgia, "Times New Roman", serif;
    font-size: clamp(1.6rem, 3vw, 2.15rem);
    line-height: 1.1;
}

.section-heading span {
    color: var(--vive-muted);
    font-size: 0.86rem;
}

.stories-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 26px 22px;
}

.story-card {
    display: flex;
    flex-direction: column;
    min-width: 0;
    background: var(--vive-surface);
    border: 1px solid var(--vive-line);
    border-radius: 6px;
    overflow: hidden;
}

.story-card__media {
    display: block;
    aspect-ratio: 16 / 10;
    overflow: hidden;
}

.story-card__fallback {
    font-size: 1.4rem;
}

.story-card__content {
    display: flex;
    flex: 1;
    flex-direction: column;
    padding: 18px 18px 19px;
}

.story-card h3 {
    margin: 0;
    font-family: Georgia, "Times New Roman", serif;
    font-size: 1.48rem;
    line-height: 1.16;
}

.story-card__excerpt {
    margin: 12px 0 16px;
    color: var(--vive-muted);
    font-size: 0.94rem;
}

.story-card .read-link {
    margin-top: auto;
}

.pagination {
    display: flex;
    justify-content: center;
    margin-top: 44px;
}

.pagination .nav-links {
    display: flex;
    flex-wrap: wrap;
    gap: 7px;
}

.pagination .page-numbers {
    min-width: 42px;
    padding: 8px 13px;
    border: 1px solid var(--vive-line);
    border-radius: 4px;
    background: var(--vive-surface);
    color: var(--vive-muted);
    text-align: center;
    font-weight: 700;
}

.pagination .current,
.pagination a:hover {
    border-color: var(--vive-green);
    background: var(--vive-green);
    color: #fff;
}

.article-header {
    max-width: 900px;
    margin: 0 auto;
    padding: clamp(38px, 7vw, 68px) 24px 30px;
    text-align: center;
}

.article-header h1 {
    margin: 0 auto 18px;
    font-family: Georgia, "Times New Roman", serif;
    font-size: clamp(2.45rem, 7vw, 4.35rem);
    font-weight: 700;
    line-height: 1.07;
}

.article-header .story-meta {
    justify-content: center;
}

.article-cover {
    width: min(1040px, calc(100% - 48px));
    max-height: 660px;
    margin: 0 auto 42px;
    overflow: hidden;
    border-radius: 6px;
    box-shadow: var(--vive-shadow);
}

.article-cover img {
    width: 100%;
    max-height: 660px;
    object-fit: cover;
}

.reading-surface {
    max-width: var(--vive-reading);
    margin: 0 auto;
    padding: 0 24px 50px;
}

.entry-content {
    color: #252b28;
    font-family: Georgia, "Times New Roman", serif;
    font-size: clamp(1.12rem, 2vw, 1.22rem);
    line-height: 1.82;
}

.entry-content > * {
    margin-top: 0;
    margin-bottom: 1.45em;
}

.entry-content h2,
.entry-content h3,
.entry-content h4 {
    color: var(--vive-ink);
    font-family: Georgia, "Times New Roman", serif;
    line-height: 1.2;
}

.entry-content a {
    color: var(--vive-green);
    text-decoration: underline;
    text-underline-offset: 3px;
}

.entry-content img {
    width: auto;
    max-height: 720px;
    margin: 34px auto;
    border-radius: 4px;
}

.entry-content blockquote {
    border-left: 3px solid var(--vive-gold);
    margin-left: 0;
    padding-left: 24px;
    color: var(--vive-green);
    font-size: 1.3em;
}

.article-divider {
    border: 0;
    border-top: 1px solid var(--vive-line);
    margin: 38px 0;
}

.comments-area {
    max-width: var(--vive-reading);
    margin: 0 auto 65px;
    padding: 0 24px;
}

.comments-area h2,
.comment-reply-title {
    margin: 0 0 22px;
    font-family: Georgia, "Times New Roman", serif;
    font-size: 1.8rem;
    line-height: 1.18;
}

.comment-list {
    list-style: none;
    margin: 0 0 38px;
    padding: 0;
}

.comment-list .children {
    list-style: none;
    margin-left: 30px;
    padding: 0;
}

.comment-body {
    border-top: 1px solid var(--vive-line);
    padding: 20px 0;
}

.comment-meta {
    margin-bottom: 9px;
    color: var(--vive-muted);
    font-size: 0.85rem;
}

.comment-author {
    color: var(--vive-ink);
    font-weight: 700;
}

.comment-author .avatar {
    display: none;
}

.comment-body p {
    margin: 0 0 9px;
}

.reply {
    color: var(--vive-green);
    font-size: 0.83rem;
    font-weight: 700;
}

.comment-form {
    display: grid;
    gap: 16px;
    padding: clamp(20px, 5vw, 30px);
    border: 1px solid var(--vive-line);
    border-radius: 6px;
    background: var(--vive-surface);
}

.comment-form p {
    margin: 0;
}

.comment-notes {
    color: var(--vive-muted);
    font-size: 0.9rem;
}

.comment-form label {
    display: block;
    margin-bottom: 6px;
    color: var(--vive-muted);
    font-size: 0.88rem;
    font-weight: 700;
}

.comment-form input:not([type="submit"]):not([type="checkbox"]),
.comment-form textarea,
.search-form input {
    width: 100%;
    border: 1px solid var(--vive-line);
    border-radius: 4px;
    background: #fff;
    padding: 12px 13px;
}

.comment-form input:focus,
.comment-form textarea:focus,
.search-form input:focus {
    border-color: var(--vive-green);
    outline: 3px solid rgba(36, 91, 75, 0.14);
}

.comment-form-cookies-consent {
    display: flex;
    gap: 9px;
    color: var(--vive-muted);
    font-size: 0.9rem;
}

.comment-form-cookies-consent label {
    margin: 0;
    font-weight: 400;
}

.submit,
.button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 46px;
    border: 1px solid var(--vive-green);
    border-radius: 4px;
    background: var(--vive-green);
    color: #fff;
    cursor: pointer;
    padding: 11px 19px;
    font-size: 0.87rem;
    font-weight: 700;
    text-transform: uppercase;
}

.submit:hover,
.button:hover {
    background: #1b493c;
    color: #fff;
}

.basic-page,
.archive-page {
    padding-top: 45px;
    padding-bottom: 62px;
}

.page-title {
    border-bottom: 2px solid var(--vive-ink);
    margin: 0 0 30px;
    padding-bottom: 14px;
    font-family: Georgia, "Times New Roman", serif;
    font-size: clamp(2rem, 5vw, 3rem);
    line-height: 1.12;
}

.empty-message {
    padding: 40px 22px;
    border: 1px solid var(--vive-line);
    background: var(--vive-surface);
    color: var(--vive-muted);
    text-align: center;
}

.search-form {
    display: flex;
    gap: 10px;
    max-width: 550px;
    margin: 28px auto 0;
}

.site-footer {
    border-top: 3px solid var(--vive-ink);
    background: #15231f;
    color: #d7dbd7;
}

.site-footer .vive-wrap {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 28px;
    padding-top: 40px;
    padding-bottom: 42px;
}

.footer-brand {
    font-family: Georgia, "Times New Roman", serif;
    font-size: 2rem;
    color: #fff;
}

.footer-note {
    max-width: 470px;
    margin: 9px 0 0;
    color: #aeb6b2;
}

.footer-links {
    display: flex;
    flex-wrap: wrap;
    align-content: start;
    gap: 22px;
    padding-top: 11px;
    color: #fff;
    font-size: 0.83rem;
    font-weight: 700;
    text-transform: uppercase;
}

@media (max-width: 920px) {
    .feature-story {
        grid-template-columns: 1fr;
    }

    .feature-story__content {
        order: -1;
    }

    .stories-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .intro-line {
        align-items: start;
        flex-direction: column;
    }
}

@media (max-width: 680px) {
    .admin-bar .site-header {
        top: 46px;
    }

    .vive-wrap {
        width: min(var(--vive-width), calc(100% - 32px));
    }

    .edition-line .vive-wrap {
        flex-direction: column;
        gap: 2px;
    }

    .masthead {
        grid-template-columns: 44px 1fr 44px;
        min-height: 88px;
    }

    .brand__title {
        font-size: 2.6rem;
    }

    .menu-toggle {
        display: block;
        grid-column: 3;
    }

    .primary-navigation .vive-wrap {
        display: none;
        justify-content: flex-start;
        padding-top: 7px;
        padding-bottom: 9px;
    }

    .primary-navigation.is-open .vive-wrap {
        display: block;
    }

    .primary-navigation ul {
        align-items: stretch;
        flex-direction: column;
        gap: 0;
    }

    .publication {
        padding-top: 25px;
    }

    .feature-story {
        margin-bottom: 32px;
    }

    .stories-grid {
        grid-template-columns: 1fr;
    }

    .section-heading {
        align-items: start;
        flex-direction: column;
        gap: 5px;
    }

    .article-header {
        padding-left: 16px;
        padding-right: 16px;
    }

    .article-cover {
        width: calc(100% - 32px);
        margin-bottom: 30px;
    }

    .reading-surface,
    .comments-area {
        padding-left: 16px;
        padding-right: 16px;
    }

    .site-footer .vive-wrap {
        grid-template-columns: 1fr;
    }
}
