* {
    box-sizing: border-box;
}

:root {
    --bg: #f5f1e8;
    --surface: #ffffff;
    --surface-2: #f0eadf;
    --text: #27311c;
    --muted: #66705b;
    --brand: #647148;
    --brand-2: #8f6b32;
    --accent: #ebbf76;
    --border: rgba(39, 49, 28, 0.12);
    --shadow: 0 20px 50px rgba(39, 49, 28, 0.08);
    --radius-xl: 28px;
    --radius-lg: 20px;
    --radius-md: 14px;
    --radius-sm: 10px;
}

html {
    scroll-behavior: smooth;
}

body.site-body {
    margin: 0;
    color: var(--text);
    background:
        radial-gradient(circle at top left, rgba(235, 191, 118, 0.22), transparent 34%),
        radial-gradient(circle at top right, rgba(100, 113, 72, 0.16), transparent 30%),
        linear-gradient(180deg, #fbfaf7 0%, #f6f1e8 100%);
    font-family: Arial, Helvetica, sans-serif;
    line-height: 1.65;
}

img {
    max-width: 100%;
    display: block;
}

a {
    color: inherit;
    text-decoration: none;
}

button,
input,
select,
textarea {
    font: inherit;
}

button,
.site-nav-cta,
.site-nav-link,
.pagination-link,
.action-link,
.btn,
.btn-secondary,
.btn-danger,
.editor-chip,
.back-link {
    cursor: pointer;
}

:focus-visible {
    outline: 3px solid rgba(100, 113, 72, 0.45);
    outline-offset: 3px;
}

.site-shell {
    width: min(1180px, calc(100% - 32px));
    margin: 0 auto;
}

.site-header {
    background-color: #647148;
    position: sticky;
    top: 0;
    width: 100%;
    z-index: 1000;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.site-header-inner {
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: 80px;
}

.site-brand {
    display: inline-flex;
    align-items: center;
}

.site-logo-img {
    height: 50px;
    width: auto;
    display: block;
}

.site-nav-menu {
    display: flex;
    justify-content: space-between;
    align-items: center;
    list-style: none;
    gap: 4px;
    margin: 0;
    padding: 0;
}

.site-nav-item {
    list-style: none;
}

.site-nav-link {
    color: #ebbf76;
    text-decoration: none;
    font-weight: 500;
    transition: color 0.3s ease, background-color 0.3s ease;
    padding: 10px 15px;
    border-radius: 5px;
    display: inline-block;
}

.site-nav-link:hover,
.site-nav-link.is-active {
    color: #fff;
    background-color: rgba(255, 255, 255, 0.1);
}

.whatsapp-btn {
    background-color: #fff;
    color: #25d366 !important;
    padding: 12px;
    border-radius: 50%;
    text-decoration: none;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 45px;
    height: 45px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    font-size: 1.2rem;
    margin-left: 12px;
}

.whatsapp-btn:hover {
    background-color: #25d366;
    color: #fff !important;
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(37, 211, 102, 0.3);
}

.hamburger {
    display: none;
    flex-direction: column;
    cursor: pointer;
    background: none;
    border: none;
    padding: 4px;
}

.bar {
    width: 25px;
    height: 3px;
    background-color: #ebbf76;
    margin: 3px 0;
    transition: 0.3s;
    display: block;
}

@media (max-width: 768px) {
    .hamburger {
        display: flex;
    }

    .site-nav-menu {
        display: none;
        flex-direction: column;
        align-items: flex-start;
        gap: 0;
        position: absolute;
        top: 80px;
        left: 0;
        width: 100%;
        background-color: #647148;
        padding: 12px 0;
        box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
        z-index: 999;
    }

    .site-nav-menu.is-open {
        display: flex;
    }

    .site-nav-item {
        width: 100%;
    }

    .site-nav-link {
        display: block;
        width: 100%;
        padding: 14px 24px;
        border-radius: 0;
    }

    .whatsapp-btn {
        margin: 10px 24px;
    }
}

.pagination-link:hover,
.btn:hover,
.btn-secondary:hover,
.btn-danger:hover,
.action-link:hover,
.editor-chip:hover,
.back-link:hover {
    transform: translateY(-1px);
}

.site-main {
    padding: 28px 0 72px;
}

.hero {
    padding: 28px 0 20px;
}

.hero-grid {
    display: grid;
    grid-template-columns: 1.35fr 0.85fr;
    gap: 24px;
    align-items: stretch;
}

.hero-panel,
.sidebar-panel,
.card,
.post-card,
.article-card,
.admin-panel,
.flash,
.auth-card,
.empty-state,
.metric,
.info-box {
    background: rgba(255, 255, 255, 0.78);
    border: 1px solid var(--border);
    border-radius: var(--radius-xl);
    box-shadow: var(--shadow);
    backdrop-filter: blur(10px);
}

.hero-panel {
    padding: clamp(28px, 4vw, 44px);
}

.hero-kicker,
.section-kicker,
.card-kicker {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    text-transform: uppercase;
    letter-spacing: 0.14em;
    font-size: 0.76rem;
    color: var(--brand);
    font-weight: 700;
}

.hero h1,
.page-title,
.auth-card h1,
.admin-title,
.article-title {
    margin: 12px 0 14px;
    color: var(--text);
    font-family: Georgia, 'Times New Roman', serif;
    line-height: 1.08;
}

.hero h1 {
    font-size: clamp(2.3rem, 5vw, 4.6rem);
    max-width: 12ch;
}

.hero p,
.page-intro,
.article-lead,
.auth-subtitle,
.empty-state p,
.metric-label,
.admin-hint,
.info-box p {
    color: var(--muted);
    font-size: 1.03rem;
}

.hero-actions,
.toolbar,
.card-actions,
.admin-actions,
.filter-row,
.meta-row,
.post-meta-row,
.article-meta,
.auth-actions,
.form-actions,
.inline-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    align-items: center;
}

.btn,
.btn-secondary,
.btn-danger,
.back-link,
.editor-chip,
.action-link,
.pagination-link {
    min-height: 44px;
    border: 0;
    border-radius: 999px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0 18px;
    text-decoration: none;
    transition: transform 180ms ease, background-color 180ms ease, color 180ms ease, border-color 180ms ease, box-shadow 180ms ease;
}

.btn {
    background: linear-gradient(135deg, var(--brand), #55603d);
    color: #fff;
    box-shadow: 0 10px 24px rgba(100, 113, 72, 0.24);
}

.btn-secondary,
.back-link,
.pagination-link {
    background: rgba(100, 113, 72, 0.08);
    color: var(--brand);
    border: 1px solid rgba(100, 113, 72, 0.14);
}

.btn-danger {
    background: rgba(153, 65, 38, 0.1);
    color: #9b4b2b;
    border: 1px solid rgba(153, 65, 38, 0.16);
}

.hero-stats,
.metrics-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 16px;
    margin-top: 22px;
}

.metric {
    padding: 18px;
}

.metric strong {
    display: block;
    font-size: 1.45rem;
    color: var(--brand);
}

.sidebar-panel {
    padding: 24px;
    display: grid;
    gap: 16px;
}

.sidebar-panel h2,
.sidebar-panel h3,
.section-title,
.admin-section-title,
.form-title {
    margin: 0;
    color: var(--text);
    font-family: Georgia, 'Times New Roman', serif;
    line-height: 1.2;
}

.section-title {
    font-size: clamp(1.7rem, 3vw, 2.5rem);
    margin-bottom: 12px;
}

.section-lead {
    max-width: 72ch;
    color: var(--muted);
    margin-bottom: 28px;
}

.posts-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 22px;
}

.post-card {
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

.post-cover {
    aspect-ratio: 16 / 9;
    background: linear-gradient(135deg, rgba(100, 113, 72, 0.16), rgba(235, 191, 118, 0.36));
    overflow: hidden;
}

.post-cover img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.post-content {
    padding: 22px;
    display: grid;
    gap: 12px;
}

.post-content h2,
.post-content h3,
.card-title,
.article-content h2,
.article-content h3 {
    font-family: Georgia, 'Times New Roman', serif;
    line-height: 1.25;
    margin: 0;
}

.card-title,
.post-content h2 {
    font-size: 1.45rem;
}

.post-excerpt,
.card-text,
.list-muted,
.article-content p,
.article-content li,
.article-content blockquote {
    color: var(--muted);
}

.post-meta-row,
.article-meta,
.list-meta {
    color: var(--muted);
    font-size: 0.92rem;
    gap: 10px 16px;
}

.badge,
.status-badge,
.category-pill,
.tag-pill {
    display: inline-flex;
    align-items: center;
    padding: 6px 12px;
    border-radius: 999px;
    background: rgba(100, 113, 72, 0.1);
    color: var(--brand);
    font-size: 0.78rem;
    font-weight: 700;
}

.status-badge.is-draft {
    background: rgba(153, 65, 38, 0.1);
    color: #9b4b2b;
}

.status-badge.is-published {
    background: rgba(54, 120, 72, 0.12);
    color: #2e6f47;
}

.article-shell {
    display: grid;
    grid-template-columns: 1fr 280px;
    gap: 24px;
    align-items: start;
}

.article-card {
    padding: clamp(24px, 4vw, 44px);
}

.article-title {
    font-size: clamp(2.2rem, 4.8vw, 4rem);
    max-width: 14ch;
}

.article-hero {
    margin: 18px 0 28px;
    border-radius: var(--radius-xl);
    overflow: hidden;
    aspect-ratio: 16 / 8.6;
    background: linear-gradient(135deg, rgba(100, 113, 72, 0.16), rgba(235, 191, 118, 0.34));
}

.article-hero img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.article-content {
    display: grid;
    gap: 18px;
    font-size: 1.06rem;
}

.article-content p,
.article-content ul,
.article-content ol,
.article-content blockquote {
    margin: 0;
}

.article-content h2 {
    font-size: 1.9rem;
    margin-top: 18px;
}

.article-content h3 {
    font-size: 1.35rem;
    margin-top: 10px;
}

.article-content blockquote {
    padding: 18px 20px;
    border-left: 4px solid var(--brand);
    background: rgba(100, 113, 72, 0.06);
    border-radius: 0 16px 16px 0;
}

.article-content img,
.article-content iframe {
    width: 100%;
    max-width: 100%;
    border: 0;
    border-radius: var(--radius-lg);
}

.article-content iframe {
    aspect-ratio: 16 / 9;
}

.article-content ul,
.article-content ol {
    padding-left: 20px;
}

.article-content li + li {
    margin-top: 8px;
}

.article-toc,
.article-sidebar,
.info-box {
    padding: 22px;
}

.article-toc ol,
.article-toc ul {
    margin: 0;
    padding-left: 20px;
}

.article-toc li + li {
    margin-top: 8px;
}

.article-toc a,
.article-sidebar a,
.site-footer a,
.admin-table a {
    color: var(--brand);
}

.article-cta {
    margin-top: 28px;
    padding: 22px;
    border-radius: var(--radius-xl);
    background: linear-gradient(135deg, rgba(100, 113, 72, 0.1), rgba(235, 191, 118, 0.2));
    border: 1px solid rgba(100, 113, 72, 0.14);
}

.faq-list {
    display: grid;
    gap: 14px;
}

.faq-item {
    border-radius: var(--radius-lg);
    border: 1px solid rgba(100, 113, 72, 0.12);
    background: rgba(255, 255, 255, 0.6);
    overflow: hidden;
}

.faq-item summary {
    list-style: none;
    padding: 18px 20px;
    font-weight: 700;
    color: var(--text);
    cursor: pointer;
}

.faq-item summary::-webkit-details-marker {
    display: none;
}

.faq-item .faq-answer {
    padding: 0 20px 18px;
    color: var(--muted);
}

.pagination {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 30px;
}

.pagination-link.is-active {
    background: var(--brand);
    color: #fff;
    border-color: var(--brand);
}

.search-form,
.filter-form,
.auth-form,
.post-form,
.inline-form {
    display: grid;
    gap: 14px;
}

.input,
.textarea,
.select {
    width: 100%;
    padding: 14px 16px;
    border-radius: 16px;
    border: 1px solid rgba(39, 49, 28, 0.14);
    background: rgba(255, 255, 255, 0.9);
    color: var(--text);
    transition: border-color 180ms ease, box-shadow 180ms ease, background-color 180ms ease;
}

.textarea {
    min-height: 220px;
    resize: vertical;
}

.input:focus,
.textarea:focus,
.select:focus {
    outline: none;
    border-color: rgba(100, 113, 72, 0.38);
    box-shadow: 0 0 0 4px rgba(100, 113, 72, 0.1);
}

.field-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 14px;
}

.field-stack {
    display: grid;
    gap: 8px;
}

.field-stack label {
    font-weight: 700;
    color: var(--text);
    font-size: 0.95rem;
}

.admin-layout {
    display: grid;
    grid-template-columns: 270px 1fr;
    gap: 22px;
    align-items: start;
}

.admin-sidebar,
.admin-panel {
    padding: 24px;
}

.admin-sidebar {
    position: sticky;
    top: 102px;
}

.admin-nav {
    display: grid;
    gap: 10px;
    margin-top: 18px;
}

.admin-nav a,
.admin-nav button {
    width: 100%;
    justify-content: flex-start;
}

.admin-nav a.active {
    background: rgba(100, 113, 72, 0.12);
    color: var(--brand);
    border-color: rgba(100, 113, 72, 0.2);
}

.admin-main {
    display: grid;
    gap: 22px;
}

.admin-panel {
    overflow: hidden;
}

.admin-table-wrap {
    overflow-x: auto;
}

.admin-table {
    width: 100%;
    border-collapse: collapse;
}

.admin-table th,
.admin-table td {
    text-align: left;
    padding: 14px 12px;
    border-bottom: 1px solid rgba(39, 49, 28, 0.1);
    vertical-align: top;
}

.admin-table th {
    font-size: 0.82rem;
    color: var(--muted);
    text-transform: uppercase;
    letter-spacing: 0.08em;
}

.admin-table tr:hover td {
    background: rgba(100, 113, 72, 0.03);
}

.flash {
    padding: 16px 18px;
    color: var(--text);
}

.flash-success {
    background: rgba(54, 120, 72, 0.12);
    border-color: rgba(54, 120, 72, 0.18);
}

.flash-error {
    background: rgba(153, 65, 38, 0.12);
    border-color: rgba(153, 65, 38, 0.18);
}

.auth-shell {
    min-height: calc(100vh - 40px);
    display: grid;
    place-items: center;
    padding: 24px 0 56px;
}

.auth-card {
    width: min(560px, 100% - 32px);
    padding: clamp(24px, 4vw, 40px);
}

.auth-card h1 {
    font-size: clamp(2rem, 4vw, 3.2rem);
}

.helper-text,
.small-text,
.admin-hint,
.eyebrow,
.muted {
    color: var(--muted);
}

.editor-toolbar {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.editor-chip {
    background: rgba(100, 113, 72, 0.08);
    color: var(--brand);
    border: 1px solid rgba(100, 113, 72, 0.14);
}

.repeatable-group {
    display: grid;
    gap: 12px;
}

.repeatable-row {
    display: grid;
    grid-template-columns: 1fr 1fr auto;
    gap: 10px;
    align-items: start;
}

.repeatable-row .textarea {
    min-height: 120px;
}

.empty-state {
    padding: 30px;
    text-align: center;
}

.footer-note {
    color: var(--muted);
    font-size: 0.92rem;
}

.site-footer {
    padding: 28px 0 42px;
}

.site-footer-inner {
    padding-top: 24px;
    border-top: 1px solid rgba(39, 49, 28, 0.12);
    display: flex;
    justify-content: space-between;
    gap: 20px;
    align-items: center;
    flex-wrap: wrap;
}

.site-footer p {
    margin: 6px 0 0;
    color: var(--muted);
}

.site-footer-links {
    display: flex;
    flex-wrap: wrap;
    gap: 14px;
}

.info-box {
    display: grid;
    gap: 8px;
}

/* Featured Section & Search Card */
.featured-section {
    display: grid;
    grid-template-columns: 1.4fr 0.85fr;
    gap: 24px;
    margin-bottom: 40px;
    align-items: start;
}

.featured-post {
    display: flex;
    flex-direction: column;
    overflow: hidden;
    background: rgba(255, 255, 255, 0.78);
    border: 1px solid var(--border);
    border-radius: var(--radius-xl);
    box-shadow: var(--shadow);
    backdrop-filter: blur(10px);
}

.featured-cover {
    display: block;
    aspect-ratio: 16 / 9;
    background: linear-gradient(135deg, rgba(100, 113, 72, 0.16), rgba(235, 191, 118, 0.36));
    overflow: hidden;
}

.featured-cover img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.featured-post:hover .featured-cover img {
    transform: scale(1.04);
}

.featured-content {
    padding: clamp(24px, 4vw, 32px);
    display: grid;
    gap: 14px;
    flex: 1;
}

.featured-content h2 {
    font-family: Georgia, 'Times New Roman', serif;
    font-size: clamp(1.6rem, 3vw, 2.2rem);
    line-height: 1.25;
    margin: 0;
    color: var(--text);
}

.featured-content h2 a {
    color: inherit;
    transition: color 0.3s ease;
}

.featured-content h2 a:hover {
    color: var(--brand);
}

.featured-excerpt {
    color: var(--muted);
    font-size: 1.05rem;
    line-height: 1.6;
    margin: 0;
}

.search-card {
    background: rgba(255, 255, 255, 0.78);
    border: 1px solid var(--border);
    border-radius: var(--radius-xl);
    box-shadow: var(--shadow);
    backdrop-filter: blur(10px);
    padding: clamp(24px, 4vw, 32px);
    display: grid;
    gap: 18px;
    height: fit-content;
    position: sticky;
    top: 100px;
}

.search-card > div:first-child {
    display: grid;
    gap: 8px;
}

.search-form-inline {
    display: grid;
    gap: 14px;
}

.search-input-wrapper {
    display: flex;
    gap: 8px;
    align-items: center;
}

.search-input-wrapper .input {
    flex: 1;
    margin: 0;
    padding: 12px 16px;
}

.btn-search-icon {
    min-width: 44px;
    min-height: 44px;
    padding: 0;
    background: linear-gradient(135deg, var(--brand), #55603d);
    color: #fff;
    border: 0;
    border-radius: 999px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: transform 180ms ease, box-shadow 180ms ease;
    flex-shrink: 0;
}

.btn-search-icon:hover {
    transform: translateY(-1px);
    box-shadow: 0 10px 24px rgba(100, 113, 72, 0.24);
}

.btn-search-icon svg {
    display: block;
    width: 20px;
    height: 20px;
}

/* Posts List */
.posts-list {
    display: grid;
    gap: 18px;
}

.post-list-item {
    display: grid;
    grid-template-columns: 160px 1fr;
    gap: 20px;
    padding: 18px;
    background: rgba(255, 255, 255, 0.78);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow);
    backdrop-filter: blur(10px);
    transition: all 0.3s ease;
}

.post-list-item:hover {
    border-color: rgba(100, 113, 72, 0.2);
    box-shadow: 0 25px 50px rgba(39, 49, 28, 0.1);
}

.post-list-cover {
    display: block;
    aspect-ratio: 3 / 2;
    background: linear-gradient(135deg, rgba(100, 113, 72, 0.16), rgba(235, 191, 118, 0.36));
    overflow: hidden;
    border-radius: var(--radius-md);
    flex-shrink: 0;
}

.post-list-cover img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.post-list-item:hover .post-list-cover img {
    transform: scale(1.08);
}

.post-list-content {
    display: grid;
    gap: 10px;
    align-content: start;
}

.post-list-content h3 {
    font-family: Georgia, 'Times New Roman', serif;
    font-size: 1.35rem;
    line-height: 1.3;
    margin: 0;
    color: var(--text);
}

.post-list-content h3 a {
    color: inherit;
    transition: color 0.3s ease;
}

.post-list-content h3 a:hover {
    color: var(--brand);
}

.post-list-content .post-excerpt {
    color: var(--muted);
    font-size: 0.98rem;
    margin: 0;
    line-height: 1.5;
}

.post-list-content .action-link {
    color: var(--brand);
    font-weight: 600;
    font-size: 0.95rem;
    transition: color 0.3s ease;
    width: fit-content;
}

.post-list-content .action-link:hover {
    color: var(--brand-2);
}

@media (max-width: 1080px) {
    .hero-grid,
    .article-shell,
    .admin-layout,
    .posts-grid,
    .featured-section {
        grid-template-columns: 1fr;
    }

    .search-card {
        position: static;
        top: auto;
    }

    .admin-sidebar {
        position: static;
    }
}

@media (max-width: 768px) {
    .site-header-inner {
        flex-direction: column;
        align-items: stretch;
        padding: 16px 0;
    }

    .site-nav {
        justify-content: flex-start;
    }

    .hero {
        padding-top: 12px;
    }

    .hero h1,
    .article-title {
        max-width: none;
    }

    .field-grid,
    .repeatable-row,
    .hero-stats,
    .metrics-grid {
        grid-template-columns: 1fr;
    }

    .site-footer-inner {
        align-items: flex-start;
    }

    /* Featured Section Mobile */
    .featured-section {
        grid-template-columns: 1fr;
        gap: 18px;
        margin-bottom: 28px;
    }

    .featured-cover {
        aspect-ratio: 16 / 9;
    }

    .featured-content {
        padding: 20px;
    }

    .featured-content h2 {
        font-size: 1.45rem;
    }

    .search-card {
        padding: 20px;
    }

    /* Post List Mobile */
    .post-list-item {
        grid-template-columns: 1fr;
        gap: 14px;
        padding: 14px;
    }

    .post-list-cover {
        aspect-ratio: 16 / 9;
        width: 100%;
    }

    .post-list-content {
        gap: 8px;
    }

    .post-list-content h3 {
        font-size: 1.15rem;
    }

    .search-input-wrapper {
        flex-direction: column;
        gap: 10px;
    }

    .search-input-wrapper .input {
        width: 100%;
    }

    .btn-search-icon {
        width: 100%;
    }
}

@media (prefers-reduced-motion: reduce) {
    html {
        scroll-behavior: auto;
    }

    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
        scroll-behavior: auto !important;
    }
}
