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

:root {
    --page-bg: #f6f6f7;
    --surface: #ffffff;
    --surface-subdued: #f1f2f4;
    --surface-soft: #f9fafb;
    --border: #d2d5d8;
    --border-soft: #e3e5e7;
    --text: #202223;
    --text-subdued: #6d7175;
    --text-soft: #8c9196;
    --accent: #008060;
    --accent-hover: #006f51;
    --accent-soft: #e3f1df;
    --radius-lg: 18px;
    --radius-md: 14px;
    --radius-sm: 10px;
    --shadow-sm: 0 1px 0 rgba(22, 29, 37, 0.05);
    --shadow-md: 0 8px 24px rgba(31, 33, 36, 0.06);
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    min-height: 100vh;
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    background: var(--page-bg);
    color: var(--text);
}

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

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

.public-shell {
    min-height: 100vh;
}

.public-header {
    position: sticky;
    top: 0;
    z-index: 30;
    background: rgba(246, 246, 247, 0.94);
    backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--border-soft);
}

.public-header-inner,
.public-main,
.public-footer-inner {
    width: min(1120px, calc(100% - 32px));
    margin: 0 auto;
}

.public-header-inner {
    min-height: 72px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    padding: 12px 0;
}

.public-brand {
    display: flex;
    align-items: center;
    min-width: 0;
}

.public-brand-name {
    display: block;
    font-size: 18px;
    font-weight: 700;
    letter-spacing: -0.02em;
}

.public-brand-subtitle {
    display: block;
    margin-top: 1px;
    font-size: 12px;
    color: var(--text-subdued);
}

.public-nav {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}

.public-nav a {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 36px;
    padding: 0 12px;
    border-radius: 10px;
    font-size: 14px;
    font-weight: 600;
    color: var(--text-subdued);
    transition: background 160ms ease, color 160ms ease;
}

.public-nav a:hover {
    background: var(--surface);
    color: var(--text);
}

.public-nav a.active {
    background: #edf7f3;
    color: var(--accent);
}

.public-main {
    padding: 24px 0 48px;
}

.hero-featured,
.post-card,
.post-body-card,
.post-cover-card {
    background: var(--surface);
    border: 1px solid var(--border-soft);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-sm);
}

.editorial-intro {
    margin-bottom: 18px;
}

.editorial-copy {
    max-width: 760px;
}

.eyebrow,
.post-type-pill {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    min-height: 28px;
    padding: 0 10px;
    border-radius: 999px;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.eyebrow {
    background: #edf7f3;
    color: var(--accent);
}

.editorial-copy h1 {
    margin: 14px 0 10px;
    font-size: clamp(1.7rem, 2.7vw, 2.25rem);
    line-height: 1.04;
    letter-spacing: -0.05em;
}

.editorial-copy p {
    margin: 0;
    font-size: 15px;
    line-height: 1.7;
    color: var(--text-subdued);
}

.editorial-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 16px;
    margin-bottom: 12px;
}

.btn-link,
.section-link,
.filter-chip {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    min-height: 38px;
    padding: 0 14px;
    border-radius: 10px;
    font-size: 14px;
    font-weight: 600;
    border: 1px solid transparent;
    transition: border-color 160ms ease, background 160ms ease, color 160ms ease;
}

.btn-link-primary {
    background: var(--accent);
    color: #fff;
}

.btn-link-primary:hover {
    background: var(--accent-hover);
}

.btn-link-secondary,
.section-link,
.filter-chip {
    background: var(--surface);
    color: var(--text);
    border-color: var(--border);
}

.btn-link-secondary:hover,
.section-link:hover,
.filter-chip:hover {
    background: var(--surface-soft);
    border-color: #b9bdc1;
}

.filter-chip {
    min-height: 34px;
    padding: 0 12px;
    font-size: 13px;
    color: var(--text-subdued);
}

.filter-chip.active {
    background: #edf7f3;
    border-color: #c7e7d8;
    color: var(--accent);
}

.featured-lead {
    margin-bottom: 30px;
}

.featured-compact-section {
    margin-bottom: 30px;
}

.featured-compact-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 16px;
}

.featured-compact-card {
    display: flex;
    overflow: hidden;
    background: var(--surface);
    border: 1px solid var(--border-soft);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-sm);
    transition: border-color 180ms ease, box-shadow 180ms ease, transform 180ms ease;
}

.featured-compact-card:hover {
    border-color: #c1c7cd;
    box-shadow: var(--shadow-md);
    transform: translateY(-2px);
}

.featured-compact-card > a {
    display: flex;
    align-items: stretch;
    flex: 1 1 auto;
    min-height: 168px;
}

.featured-compact-media {
    flex: 0 0 168px;
    margin: -1px 0 -1px -1px;
    background: linear-gradient(180deg, #eef7f3 0%, #f5f6f7 100%);
}

.featured-compact-media img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 220ms ease;
}

.featured-compact-media.placeholder {
    display: grid;
    place-items: center;
    color: var(--accent);
    font-size: 32px;
}

.featured-compact-body {
    flex: 1 1 auto;
    align-self: stretch;
    height: 100%;
    padding: 18px 20px;
}

.featured-compact-body h3 {
    margin: 12px 0 8px;
    font-size: 1.55rem;
    line-height: 1.12;
    letter-spacing: -0.03em;
}

.featured-compact-body p {
    margin: 0;
    font-size: 14px;
    line-height: 1.6;
    color: var(--text-subdued);
}

.hero-featured {
    overflow: hidden;
    padding: 0;
    transition: border-color 180ms ease, box-shadow 180ms ease, transform 180ms ease;
}

.hero-featured:hover {
    border-color: #c1c7cd;
    box-shadow: var(--shadow-md);
    transform: translateY(-2px);
}

.hero-featured > a,
.post-card > a,
.section-post > a {
    display: block;
}

.featured-media {
    min-height: 100%;
    background: linear-gradient(180deg, #eef7f3 0%, #f5f6f7 100%);
}

.hero-featured > a {
    display: grid;
    grid-template-columns: minmax(260px, 0.78fr) minmax(0, 1fr);
}

.featured-kicker,
.featured-link {
    font-size: 12px;
    font-weight: 600;
    color: var(--text-subdued);
}

.featured-link {
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.featured-media img,
.post-card-media img,
.post-cover-card img,
.section-post-media img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 220ms ease;
}

.featured-media.placeholder,
.post-card-media.placeholder,
.section-post-media.placeholder {
    display: grid;
    place-items: center;
    color: var(--accent);
    font-size: 34px;
}

.featured-body {
    padding: 22px 24px;
}

.featured-topline {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    margin-bottom: 14px;
}

.meta-row,
.section-post-meta {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
    font-size: 12px;
    color: var(--text-soft);
}

.post-type-pill {
    background: #edf7f3;
    color: var(--accent);
}

.post-type-pill.actualizacion {
    background: #eef3ff;
    color: #3057d5;
}

.featured-body h2,
.post-card h3,
.section-post h3 {
    margin: 12px 0 8px;
    letter-spacing: -0.03em;
}

.featured-body h2 {
    font-size: 2rem;
    line-height: 1.08;
}

.featured-body p {
    margin: 0;
    color: var(--text-subdued);
    font-size: 15px;
    line-height: 1.65;
}

.section-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 36px;
    margin-bottom: 30px;
}

.section-group,
.archive-section {
    margin-bottom: 8px;
}

.section-card-header,
.archive-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 16px;
    margin-bottom: 16px;
}

.section-card-header h2,
.archive-header h2,
.post-body-card h2 {
    margin: 0;
    font-size: 19px;
    letter-spacing: -0.02em;
}

.section-card-header p,
.archive-header p {
    margin: 6px 0 0;
    font-size: 14px;
    line-height: 1.5;
    color: var(--text-subdued);
}

.section-list {
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.section-post {
    border: 1px solid var(--border-soft);
    border-radius: var(--radius-md);
    overflow: hidden;
    background: var(--surface);
    height: 178px;
    transition: border-color 160ms ease, box-shadow 160ms ease;
}

.section-post:hover {
    border-color: #c1c7cd;
    box-shadow: var(--shadow-md);
    transform: translateY(-2px);
}

.section-post > a {
    display: grid;
    grid-template-columns: 132px minmax(0, 1fr);
    height: 100%;
}

.section-post-media {
    height: 100%;
    background: linear-gradient(180deg, #eef7f3 0%, #f5f6f7 100%);
}

.section-post-body {
    display: flex;
    flex-direction: column;
    justify-content: center;
    min-width: 0;
    padding: 16px 18px 18px;
}

.section-post h3 {
    font-size: 17px;
    line-height: 1.28;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.section-post p {
    margin: 0;
    font-size: 14px;
    line-height: 1.6;
    color: var(--text-subdued);
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.archive-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 16px;
}

.archive-header {
    margin-bottom: 18px;
}

.post-card {
    overflow: hidden;
    transition: border-color 180ms ease, box-shadow 180ms ease, transform 180ms ease;
}

.post-card:hover {
    border-color: #c1c7cd;
    box-shadow: var(--shadow-md);
    transform: translateY(-2px);
}

.hero-featured:hover .featured-media img,
.featured-compact-card:hover .featured-compact-media img,
.section-post:hover .section-post-media img,
.post-card:hover .post-card-media img {
    transform: scale(1.025);
}

.post-card-media {
    aspect-ratio: 16 / 9;
    overflow: hidden;
    background: linear-gradient(180deg, #eef7f3 0%, #f5f6f7 100%);
}

.post-card-body {
    padding: 18px;
}

.post-card h3 {
    font-size: 17px;
    line-height: 1.22;
}

.post-card p {
    margin: 0;
    font-size: 14px;
    line-height: 1.6;
    color: var(--text-subdued);
}

.empty-state {
    padding: 26px;
    border: 1px dashed var(--border);
    border-radius: var(--radius-md);
    font-size: 14px;
    color: var(--text-subdued);
    text-align: center;
    background: var(--surface-soft);
}

.pagination {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    margin-top: 22px;
    flex-wrap: wrap;
}

.pagination-meta {
    font-size: 13px;
    color: var(--text-subdued);
}

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

.pagination-links a {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 38px;
    min-height: 38px;
    padding: 0 12px;
    border: 1px solid var(--border);
    border-radius: 10px;
    background: var(--surface);
    font-size: 14px;
    font-weight: 600;
}

.pagination-links a.current,
.pagination-links a:hover {
    border-color: var(--accent);
    color: var(--accent);
    background: #edf7f3;
}

.post-intro {
    margin-bottom: 20px;
}

.post-intro .editorial-copy {
    max-width: 960px;
}

.post-intro-meta {
    margin-bottom: 8px;
}

.post-intro h1 {
    margin: 0 0 10px;
    font-size: clamp(1.7rem, 2.7vw, 2.25rem);
    line-height: 1.04;
    letter-spacing: -0.05em;
}

.post-intro p {
    margin: 0;
    font-size: 16px;
    line-height: 1.7;
    color: var(--text-subdued);
}

.post-cover-lead {
    margin-bottom: 24px;
}

.post-cover-card {
    min-height: 320px;
    overflow: hidden;
    background: linear-gradient(180deg, #eef7f3 0%, #f5f6f7 100%);
}

.post-body-card {
    width: 100%;
    max-width: 100%;
    margin: 0 0 24px;
    padding: 28px 30px;
}

.post-body-prose {
    line-height: 1.72;
}

.content-block + .content-block {
    margin-top: 20px;
}

.content-block h2 {
    margin: 0 0 10px;
    font-size: 18px;
    letter-spacing: -0.02em;
}

.content-block p,
.content-block li {
    margin: 0;
    font-size: 15px;
    line-height: 1.75;
    color: #454f5b;
}

.content-block ul {
    margin: 0;
    padding-left: 20px;
}

.content-block-highlight {
    padding: 18px;
    border: 1px solid #d7ebe3;
    border-radius: var(--radius-md);
    background: #f4fbf8;
}

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

.post-related {
    margin-top: 26px;
}

.public-footer {
    padding: 0 0 32px;
}

.public-footer-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    padding-top: 18px;
    border-top: 1px solid var(--border-soft);
    font-size: 13px;
    color: var(--text-subdued);
}

.public-footer-links {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
}

.public-footer-links a:hover {
    color: var(--text);
}

@media (max-width: 1080px) {
    .section-grid,
    .archive-grid,
    .featured-compact-grid,
    .post-grid {
        grid-template-columns: 1fr;
    }

    .hero-featured > a {
        grid-template-columns: 1fr;
    }

    .featured-media {
        min-height: 220px;
    }

    .featured-compact-card > a {
        flex-direction: column;
        min-height: 0;
    }

    .featured-compact-media {
        flex: 0 0 auto;
        min-height: 160px;
    }
}

@media (max-width: 860px) {
    .public-header-inner {
        align-items: flex-start;
        flex-direction: column;
        gap: 12px;
        padding: 10px 0;
    }

    .public-nav {
        width: 100%;
        flex-wrap: nowrap;
        overflow-x: auto;
        padding-bottom: 2px;
        scrollbar-width: none;
        -ms-overflow-style: none;
    }

    .public-nav::-webkit-scrollbar {
        display: none;
    }

    .section-post > a {
        grid-template-columns: 112px minmax(0, 1fr);
    }

    .section-post {
        height: 166px;
    }
}

@media (max-width: 640px) {
    .public-header-inner,
    .public-main,
    .public-footer-inner {
        width: min(100% - 24px, 1120px);
    }

    .public-header-inner {
        gap: 10px;
        padding: 8px 0 10px;
    }

    .public-brand-name {
        font-size: 15px;
    }

    .public-brand-subtitle {
        font-size: 11px;
    }

    .public-nav {
        gap: 6px;
        padding-bottom: 0;
    }

    .public-nav a {
        min-height: 32px;
        padding: 0 10px;
        white-space: nowrap;
        font-size: 13px;
        border-radius: 9px;
    }

    .public-main {
        padding-top: 16px;
    }

    .featured-body,
    .post-body-card {
        padding: 18px;
    }

    .editorial-copy h1 {
        margin: 12px 0 10px;
        font-size: 2rem;
    }

    .post-intro h1 {
        font-size: 2rem;
    }

    .editorial-copy p {
        font-size: 14px;
        line-height: 1.65;
    }

    .post-intro p {
        font-size: 14px;
        line-height: 1.65;
    }

    .editorial-actions {
        margin-top: 14px;
        margin-bottom: 10px;
    }

    .section-card-header,
    .archive-header,
    .public-footer-inner {
        flex-direction: column;
        align-items: flex-start;
    }

    .section-post > a {
        grid-template-columns: 1fr;
        height: auto;
    }

    .section-post-media {
        min-height: 116px;
    }

    .section-post {
        height: auto;
    }

    .featured-media,
    .post-card-media {
        min-height: 0;
    }

    .featured-compact-body {
        padding: 16px 18px 18px;
    }

    .featured-compact-body h3 {
        font-size: 1.35rem;
    }

    .post-cover-card {
        min-height: 220px;
    }

    .pagination {
        align-items: flex-start;
    }
}
