:root {
    --bg: #f7f4ee;
    --surface: #ffffff;
    --surface-muted: #f2eee7;
    --surface-dark: #171717;
    --text: #161616;
    --muted: #68645f;
    --line: #ded8cf;
    --brand: #203f39;
    --accent: #9b6a3d;
    --danger: #934b42;
    --black: #000;
    --radius: 18px;
    --radius-sm: 14px;
    --container: 1120px;
    --font-body: "Manrope", sans-serif;
    --font-display: "Newsreader", serif;
    --bg-surface: var(--surface-muted);
    --border: var(--line);
    --text-secondary: var(--muted);
    --text-muted: var(--muted);
    --accent-gold: var(--accent);
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    min-height: 100vh;
    background: var(--bg);
    color: var(--text);
    font-family: var(--font-body);
    line-height: 1.65;
}

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

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

button,
input,
textarea {
    font: inherit;
}

button {
    color: inherit;
}

.container {
    width: min(calc(100% - 2rem), var(--container));
    margin: 0 auto;
}

.narrow {
    width: min(calc(100% - 2rem), 760px);
}

.site-header {
    position: sticky;
    top: 0;
    z-index: 20;
    background: rgba(247, 244, 238, 0.94);
    border-bottom: 1px solid var(--line);
}

.header-inner {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 2rem;
    min-height: 84px;
}

.brand img {
    width: 210px;
    height: auto;
    object-fit: contain;
}

.main-nav {
    display: flex;
    flex-wrap: wrap;
    gap: 1.2rem;
}

.main-nav a {
    padding: 0.2rem 0;
    color: var(--muted);
    font-size: 0.95rem;
    font-weight: 700;
    border-bottom: 1px solid transparent;
    transition: color 0.2s ease, border-color 0.2s ease;
}

.main-nav a:hover,
.main-nav a.is-active {
    color: var(--text);
    border-color: var(--text);
}

.menu-toggle {
    display: none;
    flex-direction: column;
    gap: 5px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 10px;
    z-index: 110;
    margin-left: auto;
}

.menu-toggle span {
    display: block;
    width: 25px;
    height: 2px;
    background-color: var(--text);
    transition: 0.3s;
}

.menu-toggle[aria-expanded="true"] span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.menu-toggle[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.menu-toggle[aria-expanded="true"] span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

.hero,
.page-hero {
    padding: 3rem 0 1rem;
}

.page-hero.has-bg {
    position: relative;
    padding: 10rem 0 6rem;
    color: #fff;
    overflow: hidden;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    background-color: #0b0f1a;
}

.page-hero-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(59, 101, 152, 0.6);
    z-index: 1;
}

.page-hero.has-bg .container {
    position: relative;
    z-index: 2;
}

.page-hero.has-bg h1 {
    color: #fff !important;
    font-size: clamp(2.5rem, 6vw, 3.8rem) !important;
    text-shadow: 0 4px 15px rgba(0,0,0,0.4);
    margin-bottom: 1rem;
}

.page-hero.has-bg .eyebrow {
    color: #ffb347 !important;
    text-shadow: 0 2px 4px rgba(0,0,0,0.3);
    font-weight: 800;
    letter-spacing: 0.12em;
}

.page-hero.has-bg p {
    color: #f1f5f9 !important;
    font-size: 1.2rem;
    max-width: 720px;
    text-shadow: 0 1px 4px rgba(0,0,0,0.3);
}

.page-hero-compact {
    padding: 3.25rem 0 0.5rem;
}

.contact-hero {
    padding-bottom: 0.75rem;
}

.contact-hero-grid {
    display: grid;
    grid-template-columns: minmax(0, 1.2fr) minmax(280px, 0.8fr);
    gap: 1rem;
    align-items: end;
}

.contact-hero-copy {
    max-width: 720px;
}

.contact-hero-panel {
    display: grid;
    gap: 1rem;
    padding: 1.5rem;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: linear-gradient(180deg, rgba(32, 63, 57, 0.05), rgba(255, 255, 255, 0.9));
}

.contact-chip-list {
    display: flex;
    flex-wrap: wrap;
    gap: 0.65rem;
}

.contact-chip {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.45rem 0.8rem;
    border: 1px solid rgba(32, 63, 57, 0.14);
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.8);
    color: var(--brand);
    font-size: 0.82rem;
    font-weight: 700;
}

.hero-simple {
    display: grid;
    gap: 2rem;
}

.hero-main {
    max-width: 760px;
}

.hero h1,
.page-hero h1,
.section-head h2,
.card h2,
.card h3,
.logo-card h2,
.logo-card h3,
.list-card h2 {
    margin: 0;
    font-family: var(--font-display);
    font-weight: 700;
    line-height: 0.95;
    letter-spacing: -0.04em;
}

.hero h1 {
    max-width: 22ch; /* Aumentado para que sea más ancho */
    font-size: clamp(2.2rem, 5vw, 3.2rem); /* Reducido un poco más */
    line-height: 1.1; /* Un poco más de aire pero controlado */
    text-wrap: balance;
    letter-spacing: -0.02em;
}

.hero-video-bg {
    position: relative;
    overflow: hidden;
    min-height: 80vh;
    display: flex;
    align-items: center;
}

.hero-video {
    position: absolute;
    top: 50%;
    left: 50%;
    min-width: 100%;
    min-height: 100%;
    width: auto;
    height: auto;
    z-index: 0;
    transform: translate(-50%, -50%);
    object-fit: cover;
}

.hero-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(59, 101, 152, 0.5);
    z-index: 1;
}

.page-hero h1 {
    font-size: clamp(2.8rem, 6vw, 4.1rem);
    text-wrap: balance;
}

.hero-copy,
.page-hero p,
.section-head p,
.card p,
.logo-card p,
.list-card p,
.detail-card p,
.meta-card p,
.form-card p,
.site-footer p,
.site-footer li,
.site-footer span {
    color: var(--muted);
}

.hero-copy,
.page-hero p {
    max-width: 64ch;
    margin: 1.35rem 0 0;
    font-size: 1.06rem;
}

.hero-note,
.card,
.detail-card,
.meta-card,
.form-card,
.logo-card,
.list-card,
.table-wrap,
.section-shell {
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: var(--radius);
}

.hero-note,
.section-shell {
    padding: 1.5rem;
}

.hero-note {
    max-width: 680px;
    display: grid;
    gap: 1rem;
}

.eyebrow,
.panel-kicker,
.footer-kicker,
.card-kicker {
    margin: 0 0 0.75rem;
    color: var(--accent);
    font-size: 0.72rem;
    font-weight: 800;
    letter-spacing: 0.16em;
    text-transform: uppercase;
}

.eyebrow {
    color: rgb(59, 101, 152) !important;
}

.section-head h2 {
    color: rgb(59, 101, 152) !important;
}

.hero-actions,
.admin-actions,
.admin-toolbar {
    display: flex;
    flex-wrap: wrap;
    gap: 0.8rem;
    align-items: center;
    margin-top: 1.6rem;
}

.logo-card {
    padding: 2.5rem;
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    text-decoration: none;
    color: inherit;
    gap: 1.25rem;
    min-height: 220px;
}

.logo-card:hover {
    transform: translateY(-5px);
    border-color: var(--accent);
    background: rgba(255, 255, 255, 0.08);
}

.logo-container {
    width: 100%;
    height: 120px; /* Un poco más alto para mejor visibilidad */
    background: #ffffff; /* Fondo blanco para unificar todos los logos */
    border-radius: var(--radius);
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 1rem;
    padding: 1.2rem; /* Espacio para que el logo respire */
    box-shadow: 0 4px 10px rgba(0,0,0,0.05);
    transition: all 0.3s ease;
}

.logo-card:hover .logo-container {
    transform: scale(1.02);
    box-shadow: 0 8px 20px rgba(0,0,0,0.1);
}

.logo-card-img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
    filter: grayscale(1) opacity(0.8);
    transition: all 0.4s ease;
}

.logo-card:hover .logo-card-img {
    filter: grayscale(0) opacity(1);
}

.logo-placeholder {
    width: 65px; /* Reducido para equilibrar con los logos reales */
    height: 65px;
    background: #f1f5f9;
    border: 2px solid #e2e8f0;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.8rem;
    color: #ffb347;
    font-weight: 800;
}

.button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.9rem 1.25rem;
    border: 1px solid var(--text);
    border-radius: 999px;
    background: var(--text);
    color: #f8f5f0;
    font-weight: 800;
    cursor: pointer;
    transition: opacity 0.2s ease;
}

.button:hover {
    opacity: 0.9;
}

.viewS:hover {
    background-color: white;
    color: black;
}

.button-secondary {
    background: transparent;
    color: var(--text);
}

.button-ghost {
    border-color: rgba(255, 255, 255, 0.24);
    background: transparent;
    color: #f8f5f0;
}

.button-ghost:hover {
    background-color: #f8f5f0;
    color: #000;
    mix-blend-mode: multiply;
}

.button-admin-link {
    display: inline-block;
    padding: 0.6rem 1.2rem;
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: rgba(247, 243, 237, 0.5);
    border: 1px solid rgba(247, 243, 237, 0.15);
    border-radius: 8px;
    transition: all 0.3s ease;
}

.button-admin-link:hover {
    color: #f7f3ed;
    border-color: rgba(247, 243, 237, 0.4);
    background: rgba(255, 255, 255, 0.03);
}

.section {
    padding: 1.25rem 0 2rem;
}

.section-tight {
    padding-top: 0.5rem;
}

.section-head {
    display: flex;
    justify-content: space-between;
    align-items: end;
    gap: 1rem;
    margin-bottom: 1.25rem;
}

.section-head h2 {
    font-size: clamp(2rem, 4vw, 2.8rem);
}

.card-grid,
.logo-grid,
.split-grid,
.detail-grid,
.contact-grid {
    display: grid;
    gap: 1rem;
}

.site-footer .footer-grid {
    display: grid;
    grid-template-columns: 1.6fr 1fr 1fr;
    gap: 5rem;
    align-items: start;
}

@media (max-width: 1080px) {
    .site-footer .footer-grid {
        grid-template-columns: 1fr 1fr;
        gap: 3rem;
    }
}

@media (max-width: 760px) {
    .site-footer .footer-grid {
        grid-template-columns: 1fr;
        gap: 2.5rem;
    }
}

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

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

/* Variación de tamaño SOLO en la imagen, la card mantiene tamaño uniforme */
.logo-card:nth-child(9n+1) .logo-card-img { max-height: 90px; }
.logo-card:nth-child(9n+2) .logo-card-img { max-height: 60px; }
.logo-card:nth-child(9n+3) .logo-card-img { max-height: 75px; }
.logo-card:nth-child(9n+4) .logo-card-img { max-height: 55px; }
.logo-card:nth-child(9n+5) .logo-card-img { max-height: 85px; }
.logo-card:nth-child(9n+6) .logo-card-img { max-height: 65px; }
.logo-card:nth-child(9n+7) .logo-card-img { max-height: 70px; }
.logo-card:nth-child(9n+8) .logo-card-img { max-height: 50px; }
.logo-card:nth-child(9n+9) .logo-card-img { max-height: 80px; }

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

.contact-stack {
    display: grid;
    grid-template-columns: minmax(280px, 0.8fr) minmax(0, 1.2fr);
    gap: 1rem;
    align-items: start;
}

.contact-layout {
    display: grid;
    grid-template-columns: minmax(280px, 0.72fr) minmax(0, 1.28fr);
    gap: 1rem;
    align-items: start;
}

.split-clean {
    align-items: start;
}

.card,
.logo-card,
.detail-card,
.meta-card,
.form-card,
.list-card {
    padding: 1.5rem;
}

.card-minimal,
.logo-card,
.list-card {
    background: #fcfbf8;
}

.card-outline,
.empty-card {
    border-style: dashed;
}

.stack-list {
    display: grid;
    gap: 0.9rem;
}

.list-card {
    display: grid;
    gap: 0.45rem;
}

.list-card-inline {
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: center;
    gap: 1rem;
}

.contact-sidebar,
.contact-form-aside {
    display: grid;
    gap: 1rem;
}

.contact-selector,
.contact-form-card {
    padding: 1.5rem;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: var(--surface);
}

.contact-selector-head {
    align-items: start;
}

.contact-selector-note {
    max-width: 18ch;
    margin: 0;
    color: var(--muted);
    font-size: 0.92rem;
}

.contact-area-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 1rem;
}

.contact-area-card {
    display: grid;
    gap: 0.8rem;
    min-height: 220px;
    padding: 1.4rem;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: linear-gradient(180deg, rgba(242, 238, 231, 0.75), rgba(255, 255, 255, 1));
    transition: transform 0.2s ease, border-color 0.2s ease;
}

.contact-area-card:hover {
    transform: translateY(-2px);
    border-color: rgba(32, 63, 57, 0.2);
}

.contact-area-card strong {
    max-width: 14ch;
    font-family: var(--font-display);
    font-size: 2rem;
    line-height: 0.95;
    letter-spacing: -0.04em;
}

.contact-area-index {
    color: rgba(32, 63, 57, 0.42);
    font-size: 0.82rem;
    font-weight: 800;
    letter-spacing: 0.14em;
}

.contact-area-link {
    align-self: end;
    color: var(--brand);
    font-weight: 800;
}

.list-card strong,
.list-card h2,
.logo-card h2,
.logo-card h3 {
    font-size: 1.35rem;
    line-height: 1.05;
}

.list-card span,
.meta-list span {
    color: var(--muted);
    font-size: 0.9rem;
}

.logo-card {
    min-height: 180px;
    display: grid;
    gap: 1rem;
    align-content: space-between;
}

.text-link {
    color: var(--brand);
    font-weight: 800;
}

.text-link:hover {
    color: #ffa600;
    font-size: 18px;
    text-shadow: #ffa600 0 0 5px;
}

.section-head-compact {
    margin-bottom: 1rem;
}

.contact-card {
    height: 100%;
}

.contact-info-card,
.contact-process-card,
.contact-brief-card {
    padding: 1.5rem;
}

.meta-list-compact {
    gap: 0.5rem;
}

.meta-list-compact li {
    padding-bottom: 0.65rem;
}

.contact-steps,
.contact-hints {
    display: grid;
    gap: 0.9rem;
    padding: 0;
    margin: 1rem 0 0;
    list-style: none;
}

.contact-steps li,
.contact-hints li {
    display: grid;
    gap: 0.2rem;
    padding-bottom: 0.9rem;
    border-bottom: 1px solid var(--line);
}

.contact-steps span {
    color: var(--muted);
    font-size: 0.92rem;
}

.contact-form-hero {
    padding-bottom: 0.75rem;
}

.contact-form-hero-inner {
    display: flex;
    justify-content: space-between;
    align-items: end;
    gap: 1rem;
}

.contact-form-layout {
    display: grid;
    grid-template-columns: minmax(260px, 0.7fr) minmax(0, 1.3fr);
    gap: 1rem;
    align-items: start;
}

.contact-brief-title {
    display: block;
    margin-top: 1rem;
    font-family: var(--font-display);
    font-size: 2.1rem;
    line-height: 0.95;
    letter-spacing: -0.04em;
}

.contact-form-grid {
    gap: 1.5rem;
}

.contact-form-section {
    display: grid;
    gap: 1rem;
}

.contact-form-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.8rem;
    align-items: center;
}

.detail-side {
    display: grid;
    gap: 1rem;
}

.meta-list,
.footer-list {
    display: grid;
    gap: 0.8rem;
    padding: 0;
    margin: 0;
    list-style: none;
}

.meta-list li {
    display: grid;
    gap: 0.2rem;
    padding-bottom: 0.8rem;
    border-bottom: 1px solid var(--line);
}

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

.field-full {
    grid-column: 1 / -1;
}

.data-form,
.admin-form {
    display: grid;
    gap: 1rem;
}

.data-form label,
.admin-form label {
    display: grid;
    gap: 0.45rem;
}

.data-form span,
.admin-form span {
    color: var(--muted);
    font-size: 0.9rem;
    font-weight: 700;
}

.data-form input,
.data-form textarea,
.admin-form input {
    width: 100%;
    padding: 0.95rem 1rem;
    border: 1px solid var(--line);
    border-radius: 14px;
    background: var(--surface);
    color: var(--text);
    outline: none;
}

.data-form input:focus,
.data-form textarea:focus,
.admin-form input:focus {
    border-color: var(--brand);
}

.data-form textarea {
    min-height: 160px;
    resize: vertical;
}

.form-errors,
.flash {
    margin-top: 1rem;
    padding: 1rem 1.2rem;
    border: 1px solid var(--line);
    border-radius: 14px;
}

.flash-ok {
    background: #eef3f1;
}

.flash-error,
.form-errors {
    background: #f7eeec;
}

.form-errors p {
    margin: 0;
}

.form-errors p+p {
    margin-top: 0.5rem;
}

.site-footer {
    margin-top: 3rem;
    padding: 3rem 0 1.8rem;
    background: var(--surface-dark);
    color: #f7f3ed;
}



.footer-grid h2 {
    margin: 0 0 1rem;
    font-family: var(--font-display);
    font-size: 2rem;
    line-height: 1;
}

.footer-list a,
.footer-bottom a {
    color: #f0d1ae;
}

.admin-box {
    padding: 1.5rem;
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: var(--radius-sm);
}

/* Cleaned redundant footer-bottom */

.table-wrap {
    overflow-x: auto;
    padding: 0;
}

.admin-table {
    width: 100%;
    border-collapse: collapse;
}

.admin-table th,
.admin-table td {
    padding: 1rem;
    text-align: left;
    border-bottom: 1px solid var(--line);
}

.actions-cell {
    display: flex;
    flex-wrap: wrap;
    gap: 0.8rem;
    align-items: center;
}

.actions-cell button {
    padding: 0;
    border: 0;
    background: none;
    color: var(--danger);
    cursor: pointer;
}

.pagination-wrap {
    margin-top: 1.5rem;
}

nav[role="navigation"] {
    display: flex;
    justify-content: center;
}

@media (max-width: 1080px) {

    .contact-hero-grid,
    .card-grid,
    .logo-grid,
    .split-grid,
    .contact-layout,
    .contact-form-layout,
    .contact-area-grid,
    .contact-stack,
    .contact-grid,
    .detail-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 760px) {
    .header-inner {
        flex-direction: row !important;
        align-items: center !important;
        justify-content: space-between !important;
        min-height: 70px;
    }

    .section-head,
    .contact-form-hero-inner,
    .footer-bottom {
        flex-direction: column;
        align-items: flex-start;
    }

    .main-nav {
        display: none; /* Se oculta para usar el menú lateral/hamburguesa */
        flex-direction: column;
        align-items: flex-start;
    }

    .menu-toggle {
        display: flex !important;
        margin-left: auto;
    }

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

    .list-card-inline {
        grid-template-columns: 1fr;
    }

    .contact-selector-note {
        max-width: none;
    }

    .hero,
    .page-hero {
        padding-top: 3rem;
    }

    .hero h1,
    .page-hero h1 {
        max-width: none;
    }
}

.admin-table th {
    background: var(--surface);
    font-weight: 700;
    font-size: 0.85rem;
    text-transform: uppercase;
    color: var(--muted);
}

/* Footer */
.site-footer {
    padding: 6rem 0 3rem;
    background: #0b0f1a;
    color: #fff;
    border-top: 1px solid rgba(255, 255, 255, 0.05);
}

.footer-info {
    display: flex;
    flex-direction: column;
    gap: 2.5rem; /* Espacio entre logo y texto */
}

.footer-logo {
    height: 90px; /* Tamaño controlado del logo */
    width: 220px;
    align-self: flex-start;
    filter: brightness(0) invert(1); /* Pone el logo totalmente blanco */
    opacity: 0.9;
}

.footer-text-block {
    margin-top: 0.5rem; /* Baja el texto un poco más */
}

.footer-grid section {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.footer-grid section:not(.footer-info) {
    padding-top: 6rem; /* Baja las columnas de contacto y enlaces para alinear con el texto de la izquierda */
}

.footer-grid h2 {
    font-size: 1.8rem;
    color: #fff;
    margin-bottom: 1.5rem;
    line-height: 1.1;
    font-family: var(--font-display);
}

.footer-grid p,
.footer-list li {
    color: rgba(255, 255, 255, 0.6);
    font-size: 0.95rem;
    margin-bottom: 0.8rem;
    line-height: 1.6;
}

.footer-list a {
    transition: color 0.3s ease;
}

.footer-list a:hover {
    color: var(--accent);
}

.footer-bottom {
    border-top: 1px solid rgba(255, 255, 255, 0.08);
    padding-top: 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.85rem;
    color: rgba(255, 255, 255, 0.4);
    margin-top: 5rem;
}

/* Responsive */
@media (max-width: 1024px) {
    .menu-toggle {
        display: flex;
    }

    .main-nav {
        position: fixed;
        top: 0;
        right: -100%;
        width: 300px;
        height: 100vh;
        background: #fff;
        flex-direction: column;
        padding: 100px 2.5rem;
        box-shadow: -10px 0 50px rgba(0, 0, 0, 0.1);
        transition: 0.5s cubic-bezier(0.77, 0.2, 0.05, 1.0);
        z-index: 105;
    }

    .main-nav.is-open {
        right: 0;
    }

    .main-nav a {
        font-size: 1.1rem;
        border: none;
    }


    .contact-grid,
    .split-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 768px) {

    .footer-bottom {
        flex-direction: column;
        gap: 1rem;
    }
}

/* Hamburger state */
.menu-toggle[aria-expanded="true"] span:nth-child(1) {
    transform: translateY(8px) rotate(45deg);
}

.menu-toggle[aria-expanded="true"] span:nth-child(2) {
    opacity: 0;
}

.menu-toggle[aria-expanded="true"] span:nth-child(3) {
    transform: translateY(-8px) rotate(-45deg);
}
@media (max-width: 1024px) {
    .menu-toggle { display: flex; }

    .main-nav {
        position: fixed;
        top: 0;
        right: -100%;
        width: 300px;
        height: 100vh;
        background: var(--bg);
        flex-direction: column;
        padding: 100px 2rem;
        gap: 1.5rem;
        box-shadow: -10px 0 30px rgba(0,0,0,0.1);
        transition: 0.4s cubic-bezier(0.4, 0, 0.2, 1);
        z-index: 105;
        flex-wrap: nowrap;
    }

    .main-nav.is-open {
        right: 0;
    }

body.menu-active {
        overflow: hidden;
    }
}

/* Extracted view styles */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.9rem 1.25rem;
    border: 1px solid var(--text);
    border-radius: 999px;
    background: var(--text);
    color: #f8f5f0;
    font-weight: 800;
    transition: opacity 0.2s ease, background 0.2s ease, color 0.2s ease;
}

.btn:hover {
    opacity: 0.92;
}

.btn-outline {
    background: transparent;
    color: var(--text);
}

.footer-bottom-links {
    display: flex;
    gap: 1.5rem;
}

.card-link-reset {
    display: block;
    color: inherit;
    text-decoration: none;
}

.listing-grid,
.sitemap-grid {
    display: grid;
}

.listing-grid {
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 2rem;
}

.listing-card {
    display: flex;
    flex-direction: column;
    padding: 0;
    overflow: hidden;
}

.listing-card-simple {
    padding: 1.5rem;
}

.listing-card-body {
    display: flex;
    flex: 1;
    flex-direction: column;
    padding: 2rem;
}

.listing-card-date {
    color: var(--accent-gold);
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
}

.listing-card-title {
    margin-top: 0.5rem;
    color: var(--accent);
    font-size: 1.25rem;
    line-height: 1.3;
}

.listing-card-title-tight {
    margin-top: 0;
}

.listing-card-text {
    margin-top: 1rem;
    color: var(--text-secondary);
    font-size: 0.95rem;
    line-height: 1.6;
    flex: 1;
}

.listing-card-text-tight {
    margin-top: 0.75rem;
}

.listing-card-text-simple {
    margin-bottom: 1.5rem;
}

.listing-card-action {
    width: 100%;
    margin-top: 2rem;;
}

.listing-card-action:hover {
    color: white;
    background-color: black;
}

.listing-card-action-tight {
    margin-top: 0;
}

.listing-pagination {
    display: flex;
    justify-content: center;
    margin-top: 4rem;
}

.listing-empty {
    padding: 6rem 0;
    border: 2px dashed var(--border);
    border-radius: var(--radius);
    background: var(--bg-surface);
    text-align: center;
}

.listing-empty-icon {
    margin-bottom: 2rem;
    color: var(--text-muted);
    opacity: 0.3;
}

.listing-empty-title {
    color: var(--accent);
    font-size: 2.5rem;
    font-weight: 800;
}

.listing-empty-text {
    margin-top: 1rem;
    color: var(--text-secondary);
    font-size: 1.1rem;
}

.project-card-media,
.project-detail-media {
    overflow: hidden;
    background: var(--bg-surface);
}

.project-card-media {
    height: 200px;
}

.project-card-image,
.project-detail-image {
    display: block;
    width: 100% !important;
    height: 100% !important;
    object-fit: contain;
}

.project-card-image {
    transition: transform 0.4s ease;
}

.listing-card:hover .project-card-image {
    transform: scale(1.05);
}

.project-card-placeholder {
    display: flex;
    align-items: center;
    justify-content: center;
    height: 200px;
    background: linear-gradient(135deg, var(--accent) 0%, #1e3a5f 100%);
}

.project-card-placeholder svg {
    width: 56px;
    height: 56px;
    stroke: rgba(255, 255, 255, 0.4);
}

.project-detail-media {
    max-height: 420px;
    margin-bottom: 2.5rem;
    border-radius: var(--radius);
}

.project-rich-text {
    color: var(--text-secondary);
    font-size: 1rem;
    line-height: 1.8;
}

.project-empty-description,
.sitemap-empty-item {
    color: var(--muted);
    font-size: 0.9rem;
    font-style: italic;
}

.project-empty-description {
    color: var(--text-muted);
}

.project-back-link-wrap {
    margin-top: 1.5rem;
}

.project-back-link {
    display: block;
    width: 100%;
    text-align: center;
}

.sitemap-grid {
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 3rem;
}

.sitemap-title {
    margin-bottom: 1.5rem;
    padding-bottom: 0.5rem;
    border-bottom: 2px solid var(--accent);
    font-family: var(--font-display);
    font-size: 1.8rem;
}

.sitemap-list {
    display: grid;
    gap: 0.8rem;
    padding: 0;
    list-style: none;
}

.sitemap-primary-link,
.sitemap-view-all {
    color: var(--brand);
    font-weight: 700;
}

.sitemap-muted-link {
    color: var(--text-secondary);
    font-size: 0.9rem;
}

.sitemap-view-all {
    font-size: 0.9rem;
}

.admin-page {
    background: #f1f5f9;
}

.admin-wrapper {
    display: grid;
    grid-template-columns: 280px 1fr;
    min-height: 100vh;
}

.admin-aside {
    position: sticky;
    top: 0;
    height: 100vh;
    padding: 2rem;
    background: #0f172a;
    color: #fff;
}

.admin-aside .brand img {
    width: 180px;
    margin-bottom: 3rem;
    filter: brightness(0) invert(1);
}

.admin-aside nav {
    display: grid;
    gap: 0.5rem;
}

.admin-aside a {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.8rem 1.2rem;
    border-radius: 8px;
    color: #94a3b8;
    font-size: 0.9rem;
    font-weight: 600;
    transition: 0.2s;
}

.admin-aside a:hover,
.admin-aside a.active {
    background: rgba(255, 255, 255, 0.1);
    color: #fff;
}

.admin-sidebar-footer {
    margin-top: auto;
    padding-top: 2rem;
}

.admin-main {
    padding: 3rem;
}

.admin-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    margin-bottom: 3rem;
}

.admin-header-title {
    letter-spacing: -0.02em;
}

.admin-card {
    padding: 2rem;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    background: #fff;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
}

.admin-card-limit {
    max-width: 1000px;
}

.admin-card-flat {
    padding: 0;
    overflow: hidden;
    border: none;
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.05);
}

.admin-info-card {
    display: flex;
    align-items: center;
    gap: 1.5rem;
    border-style: dashed;
    border-color: #cbd5e1;
    background: #f8fafc;
}

.admin-info-icon {
    color: var(--accent);
    font-size: 2.5rem;
    opacity: 0.5;
}

.admin-info-text {
    margin: 0;
    color: #475569;
    font-size: 1.1rem;
    font-weight: 500;
}

.admin-stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 1.5rem;
    margin-bottom: 3rem;
}

.stat-card {
    display: flex;
    align-items: center;
    gap: 1.5rem;
    padding: 2rem;
    border: 1px solid #e2e8f0;
    border-radius: 16px;
    background: #fff;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.02);
    transition: 0.3s;
}

.stat-card:hover {
    transform: translateY(-4px);
    border-color: var(--accent);
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.08);
}

.stat-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 56px;
    height: 56px;
    border-radius: 12px;
    background: #f8fafc;
    color: var(--accent);
    font-size: 1.5rem;
}

.stat-info span {
    display: block;
    color: #64748b;
    font-size: 0.85rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.02em;
}

.stat-info strong {
    display: block;
    color: #0f172a;
    font-size: 2rem;
    font-weight: 800;
    line-height: 1.2;
}

.badge-date {
    padding: 0.25rem 0.75rem;
    border-radius: 20px;
    background: #f1f5f9;
    color: #475569;
    font-size: 0.8rem;
    font-weight: 600;
    white-space: nowrap;
}

.admin-calendar-icon {
    margin-right: 0.4rem;
    opacity: 0.6;
}

.admin-form .ql-container {
    font-family: var(--font-body);
    font-size: 1rem;
    border-bottom-right-radius: 8px;
    border-bottom-left-radius: 8px;
    background: #f8fafc;
}

.admin-form .ql-toolbar {
    border-top-right-radius: 8px;
    border-top-left-radius: 8px;
    border-bottom: none !important;
    background: #fff;
}

.admin-form .ql-editor {
    min-height: 250px;
}

.admin-form-errors {
    margin-bottom: 2rem;
    padding: 1rem;
    border-radius: 8px;
    background: #fee2e2;
    color: #991b1b;
}

.admin-form-error-item {
    margin: 0;
    font-weight: 600;
}

.admin-form-error-item + .admin-form-error-item {
    margin-top: 0.5rem;
}

.admin-field-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1.5rem;
}

.admin-field-full {
    grid-column: 1 / -1;
}

.admin-label-text {
    display: block;
    margin-bottom: 0.5rem;
    color: #334155;
    font-weight: 700;
}

.file-input-wrapper {
    padding: 1.5rem;
    border: 2px dashed #e2e8f0;
    border-radius: 8px;
    background: #f8fafc;
    text-align: center;
    cursor: pointer;
    transition: 0.2s;
}

.file-input-wrapper:hover {
    border-color: var(--accent);
    background: #f1f5f9;
}

.admin-file-icon {
    display: block;
    margin-bottom: 1rem;
    color: #94a3b8;
}

.admin-file-name {
    color: #64748b;
}

.admin-input-hidden {
    display: none;
}

.admin-preview-wrap {
    margin-top: 1rem;
}

.admin-preview-image {
    max-height: 100px;
    border: 1px solid #e2e8f0;
    border-radius: 4px;
}

.admin-input-muted {
    background: #f8fafc !important;
}

.admin-form-actions {
    display: flex;
    gap: 1rem;
    margin-top: 3rem;
    padding-top: 2rem;
    border-top: 1px solid #e2e8f0;
}

.admin-button-pad {
    padding: 0.8rem 2rem;
}

.admin-create-button {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.admin-flash-spaced {
    margin-bottom: 2rem;
}

.admin-logout-button {
    width: 100%;
    padding: 0.8rem;
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 8px;
    background: none;
    color: #fff;
    font-weight: 600;
    cursor: pointer;
}

.admin-table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
}

.admin-table thead th {
    padding: 1.25rem 1.5rem;
    border-bottom: 2px solid #f1f5f9;
    background: #f8fafc;
    color: #64748b;
    text-align: left;
    font-size: 0.75rem;
    font-weight: 700;
    letter-spacing: 0.05em;
    text-transform: uppercase;
}

.admin-table tbody td {
    padding: 1.25rem 1.5rem;
    border-bottom: 1px solid #f1f5f9;
    vertical-align: middle;
    color: #334155;
    font-size: 0.9rem;
}

.admin-table tbody tr:hover {
    background: #fdfdfd;
}

.admin-table-actions-header,
.admin-table-actions-cell {
    text-align: right !important;
}

.admin-table-actions-wrap {
    display: flex;
    justify-content: flex-end;
    gap: 0.6rem;
}

.admin-thumb,
.admin-thumb-placeholder {
    width: 40px;
    height: 40px;
    border-radius: 8px;
}

.admin-thumb {
    border: 1px solid #e2e8f0;
    object-fit: cover;
}

.admin-thumb-placeholder {
    display: flex;
    align-items: center;
    justify-content: center;
    background: #f1f5f9;
}

.admin-thumb-placeholder i {
    color: #cbd5e1;
}

.admin-cell-text {
    font-weight: 500;
}

.action-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 38px;
    height: 38px;
    border: 1px solid #e2e8f0;
    border-radius: 10px;
    background: #fff;
    color: #64748b;
    font-size: 1rem;
    text-decoration: none;
    cursor: pointer;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

.action-btn:hover {
    transform: translateY(-2px);
    border-color: #cbd5e1;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
}

.action-btn-view:hover {
    border-color: #0f172a;
    background: #0f172a;
    color: #fff;
}

.action-btn-edit:hover {
    border-color: var(--accent);
    background: var(--accent);
    color: #fff;
}

.action-btn-delete:hover {
    border-color: #ef4444;
    background: #ef4444;
    color: #fff;
}

@media (max-width: 1024px) {
    .admin-wrapper {
        grid-template-columns: 1fr;
    }

    .admin-aside {
        position: static;
        height: auto;
    }
}

@media (max-width: 768px) {
    .admin-header,
    .admin-form-actions,
    .footer-bottom-links {
        flex-direction: column;
        align-items: flex-start;
    }

    .admin-field-grid {
        grid-template-columns: 1fr;
    }
}

/* Admin Dashboard & Layout */
.admin-layout {
    display: grid;
    grid-template-columns: 260px 1fr;
    min-height: calc(100vh - 80px);
}

.admin-sidebar {
    background: var(--surface);
    border-right: 1px solid var(--line);
    padding: 2rem;
}

.admin-sidebar nav { display: grid; gap: 0.5rem; }
.admin-sidebar a {
    display: flex; align-items: center; padding: 0.75rem 1rem;
    border-radius: var(--radius-sm); font-weight: 700; font-size: 0.9rem; color: var(--muted);
}
.admin-sidebar a:hover, .admin-sidebar a.active { background: #fff; color: var(--fg); box-shadow: 0 2px 5px rgba(0,0,0,0.05); }

.admin-content { padding: 3rem; background: #fff; }

.admin-stats {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 1.5rem;
    margin-bottom: 3rem;
}

.stat-card {
    background: var(--surface);
    padding: 1.5rem;
    border-radius: var(--radius);
    border: 1px solid var(--line);
}

.stat-card span { font-size: 0.75rem; color: var(--muted); font-weight: 800; text-transform: uppercase; }
.stat-card strong { display: block; font-size: 2rem; margin-top: 0.5rem; }

.badge {
    padding: 0.25rem 0.75rem;
    border-radius: 999px;
    font-size: 0.75rem;
    font-weight: 800;
    text-transform: uppercase;
}

.badge-info { background: #e0f2fe; color: #0369a1; }
.badge-success { background: #dcfce7; color: #15803d; }

/* Footer Admin Buttons Fix */
.admin-box .admin-actions { display: flex; gap: 0.75rem; margin-top: 1rem; }
.admin-box .button { border-color: rgba(255,255,255,0.3); color: #fff; background: transparent; }
.admin-box .button:hover { background: rgba(255,255,255,0.1); border-color: #fff; }
.admin-box .button-secondary { border-color: var(--accent); color: var(--accent); }
.admin-box .button-secondary:hover { background: var(--accent); color: #fff; }

