/* Sidebar editorial + showcase con screenshots */

:root {
    --paper: #faf8f5;
    --paper-2: #f3f0eb;
    --ink: #14120f;
    --ink-2: #4a4540;
    --ink-3: #8a8278;
    --line: #e5e0d8;
    --accent: #c45c26;
    --sidebar-w: 260px;
    --font-serif: 'Newsreader', Georgia, serif;
    --font-sans: 'Figtree', system-ui, sans-serif;
    --ease: cubic-bezier(0.33, 1, 0.68, 1);
}

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

html { scroll-behavior: smooth; }

body {
    font-family: var(--font-sans);
    background: var(--paper);
    color: var(--ink);
    line-height: 1.55;
    -webkit-font-smoothing: antialiased;
}

.layout { display: flex; min-height: 100vh; }

/* ═══ SIDEBAR ═══ */
.sidebar {
    position: fixed;
    top: 0;
    left: 0;
    width: var(--sidebar-w);
    height: 100vh;
    height: 100dvh;
    background: var(--ink);
    color: #f5f2ed;
    display: flex;
    flex-direction: column;
    padding: 1.5rem 1.25rem;
    z-index: 300;
    overflow-y: auto;
}

.sidebar-top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 1.25rem;
}

.brand {
    display: flex;
    align-items: center;
    gap: 0.55rem;
    text-decoration: none;
    color: inherit;
}

.brand-mark {
    width: 32px;
    height: 32px;
    background: var(--accent);
    color: #fff;
    border-radius: 7px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: var(--font-serif);
    font-size: 1.05rem;
    font-weight: 600;
}

.brand-name { font-weight: 600; font-size: 0.88rem; }

.sidebar-close {
    display: none;
    background: none;
    border: none;
    color: #fff;
    font-size: 1.6rem;
    cursor: pointer;
    opacity: 0.6;
}

.sidebar-intro {
    font-size: 0.78rem;
    color: rgba(245, 242, 237, 0.48);
    line-height: 1.5;
    margin-bottom: 1.5rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.nav-label {
    display: block;
    font-size: 0.6rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.13em;
    color: rgba(245, 242, 237, 0.3);
    margin-bottom: 0.5rem;
}

.sidebar-nav { margin-bottom: 1.5rem; }

.nav-item {
    display: block;
    padding: 0.35rem 0;
    color: rgba(245, 242, 237, 0.55);
    text-decoration: none;
    font-size: 0.85rem;
    font-weight: 500;
    transition: color 0.2s;
}

.nav-item:hover, .nav-item.active { color: #fff; }

.sidebar-filters { flex: 1; margin-bottom: 1rem; }

.cat-btn {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
    padding: 0.35rem 0.55rem;
    margin-bottom: 0.1rem;
    background: transparent;
    border: none;
    border-radius: 5px;
    color: rgba(245, 242, 237, 0.48);
    font-family: var(--font-sans);
    font-size: 0.74rem;
    font-weight: 500;
    text-align: left;
    cursor: pointer;
    transition: background 0.2s, color 0.2s;
}

.cat-btn em { font-style: normal; font-size: 0.65rem; opacity: 0.4; }

.cat-btn:hover { background: rgba(255, 255, 255, 0.06); color: #fff; }

.cat-btn.active {
    background: rgba(196, 92, 38, 0.28);
    color: #fff;
}

.sidebar-stats {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.5rem;
    padding: 0.75rem 0;
    border-top: 1px solid rgba(255, 255, 255, 0.08);
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    margin-bottom: 0.75rem;
}

.sidebar-stats div {
    text-align: center;
    font-size: 0.62rem;
    color: rgba(245, 242, 237, 0.38);
}

.sidebar-stats strong {
    display: block;
    font-family: var(--font-serif);
    font-size: 1.2rem;
    color: #fff;
    line-height: 1.2;
}

.sidebar-foot { font-size: 0.7rem; color: rgba(245, 242, 237, 0.35); }

.sidebar-foot a {
    display: inline-block;
    margin-top: 0.25rem;
    color: var(--accent);
    text-decoration: none;
    font-weight: 500;
}

.sidebar-backdrop {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.5);
    z-index: 250;
}

/* ═══ MAIN ═══ */
.main {
    flex: 1;
    margin-left: var(--sidebar-w);
    min-width: 0;
}

.mobile-bar {
    display: none;
    align-items: center;
    gap: 1rem;
    padding: 0.8rem 1.15rem;
    background: var(--paper);
    border-bottom: 1px solid var(--line);
    position: sticky;
    top: 0;
    z-index: 100;
}

.menu-btn {
    background: none;
    border: 1px solid var(--line);
    border-radius: 7px;
    padding: 5px;
    cursor: pointer;
    display: flex;
    color: var(--ink);
}

.mobile-bar span { font-weight: 600; font-size: 0.88rem; }

.intro {
    padding: 3rem 2.5rem 2rem;
    max-width: 560px;
}

.intro-kicker {
    font-size: 0.7rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.12em;
    color: var(--accent);
    margin-bottom: 0.85rem;
}

.intro h1 {
    font-family: var(--font-serif);
    font-size: clamp(1.9rem, 3.5vw, 2.6rem);
    font-weight: 500;
    line-height: 1.12;
    letter-spacing: -0.02em;
    margin-bottom: 0.85rem;
}

.intro-text {
    font-size: 0.95rem;
    color: var(--ink-2);
    line-height: 1.6;
}

/* ═══ GALLERY / SHOWCASE ═══ */
.gallery {
    padding: 0 2.5rem 3rem;
}

.gallery-head {
    display: flex;
    align-items: baseline;
    gap: 0.75rem;
    margin-bottom: 1.75rem;
    padding-bottom: 0.75rem;
    border-bottom: 1px solid var(--line);
}

.gallery-head h2 {
    font-family: var(--font-serif);
    font-size: 1.25rem;
    font-weight: 500;
}

#gallery-count {
    font-size: 0.75rem;
    color: var(--ink-3);
    background: var(--paper-2);
    padding: 0.2rem 0.55rem;
    border-radius: 100px;
}

.gallery-list {
    display: flex;
    flex-direction: column;
    gap: 3rem;
}

.showcase {
    display: grid;
    grid-template-columns: 1.15fr 1fr;
    gap: 2rem;
    align-items: start;
    opacity: 1;
    transition: opacity 0.3s;
}

.showcase.hidden { display: none; }

.showcase-reverse {
    direction: rtl;
}

.showcase-reverse > * {
    direction: ltr;
}

/* Screenshot */
.showcase-shot {
    position: relative;
    border-radius: 12px;
    overflow: hidden;
    border: 1px solid var(--line);
    background: var(--paper-2);
    box-shadow: 0 8px 32px rgba(20, 18, 15, 0.08);
    aspect-ratio: 16 / 10;
}

.shot-link {
    display: block;
    width: 100%;
    height: 100%;
    text-decoration: none;
}

.shot-expand {
    position: absolute;
    top: 0.65rem;
    left: 0.65rem;
    z-index: 3;
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(255, 255, 255, 0.92);
    border: 1px solid var(--line);
    border-radius: 8px;
    color: var(--ink);
    cursor: pointer;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.12);
    transition: background 0.2s, transform 0.2s, color 0.2s;
}

.shot-expand:hover {
    background: var(--ink);
    color: #fff;
    transform: scale(1.05);
}

.showcase-shot.img-fallback .shot-expand {
    display: none;
}

.showcase-shot img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: top center;
    display: block;
    transition: transform 0.5s var(--ease);
}

.shot-link:hover img {
    transform: scale(1.03);
}

.showcase-shot.img-fallback {
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(145deg, color-mix(in srgb, var(--accent) 12%, #fff), var(--paper-2));
}

.showcase-shot.img-fallback::after {
    content: attr(data-icon);
    font-size: 4rem;
    opacity: 0.5;
}

.shot-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(0deg, rgba(20, 18, 15, 0.55) 0%, transparent 50%);
    display: flex;
    align-items: flex-end;
    justify-content: center;
    padding: 1.25rem;
    opacity: 0;
    transition: opacity 0.3s;
}

.shot-link:hover .shot-overlay { opacity: 1; }

/* Modal imagen */
.img-modal {
    position: fixed;
    inset: 0;
    z-index: 500;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1.5rem;
}

.img-modal[hidden] { display: none; }

.img-modal-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(20, 18, 15, 0.75);
    backdrop-filter: blur(4px);
}

.img-modal-box {
    position: relative;
    z-index: 1;
    width: min(1100px, 100%);
    max-height: calc(100vh - 3rem);
    background: var(--paper);
    border-radius: 14px;
    overflow: hidden;
    box-shadow: 0 24px 80px rgba(0, 0, 0, 0.35);
    display: flex;
    flex-direction: column;
}

.img-modal-title {
    padding: 1rem 1.25rem 0.5rem;
    font-family: var(--font-serif);
    font-size: 1.15rem;
    font-weight: 500;
    color: var(--ink);
}

.img-modal-close {
    position: absolute;
    top: 0.65rem;
    right: 0.65rem;
    z-index: 2;
    width: 36px;
    height: 36px;
    border: none;
    border-radius: 8px;
    background: var(--ink);
    color: #fff;
    font-size: 1.4rem;
    line-height: 1;
    cursor: pointer;
    transition: opacity 0.2s;
}

.img-modal-close:hover { opacity: 0.85; }

.img-modal-body {
    padding: 0.5rem 1.25rem 1.25rem;
    overflow: auto;
}

.img-modal-body img {
    display: block;
    width: 100%;
    height: auto;
    border-radius: 8px;
    border: 1px solid var(--line);
}

.shot-visit {
    color: #fff;
    font-size: 0.85rem;
    font-weight: 600;
    padding: 0.5rem 1rem;
    background: rgba(255, 255, 255, 0.15);
    backdrop-filter: blur(8px);
    border-radius: 100px;
    border: 1px solid rgba(255, 255, 255, 0.25);
}

/* Info panel */
.showcase-info {
    padding-top: 0.25rem;
}

.showcase-meta {
    display: flex;
    align-items: center;
    gap: 0.65rem;
    margin-bottom: 0.65rem;
}

.showcase-num {
    font-family: var(--font-serif);
    font-size: 0.85rem;
    color: var(--ink-3);
}

.showcase-cat {
    font-size: 0.65rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--accent);
    padding: 0.2rem 0.45rem;
    background: color-mix(in srgb, var(--accent) 10%, #fff);
    border-radius: 4px;
}

.showcase-name {
    font-family: var(--font-serif);
    font-size: 1.65rem;
    font-weight: 500;
    line-height: 1.15;
    margin-bottom: 0.25rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.showcase-icon { font-size: 1.35rem; }

.showcase-domain {
    display: inline-block;
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--accent);
    text-decoration: none;
    margin-bottom: 0.85rem;
}

.showcase-domain:hover { text-decoration: underline; }

.showcase-hook {
    font-weight: 600;
    font-size: 0.92rem;
    margin-bottom: 0.4rem;
    line-height: 1.4;
}

.showcase-desc {
    font-size: 0.86rem;
    color: var(--ink-2);
    line-height: 1.6;
    margin-bottom: 0.85rem;
}

.showcase-stats {
    display: flex;
    flex-wrap: wrap;
    gap: 0.35rem;
    margin-bottom: 1.25rem;
}

.showcase-stats span {
    font-size: 0.72rem;
    font-weight: 600;
    padding: 0.25rem 0.55rem;
    background: var(--paper-2);
    border-radius: 5px;
    color: var(--ink-2);
}

.showcase-features {
    margin-bottom: 1.25rem;
}

.showcase-features h4 {
    font-size: 0.65rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: var(--ink-3);
    margin-bottom: 0.65rem;
}

.showcase-features ul {
    list-style: none;
    display: grid;
    grid-template-columns: 1fr;
    gap: 0.3rem;
}

.showcase-features li {
    font-size: 0.8rem;
    color: var(--ink-2);
    padding-left: 0.85rem;
    position: relative;
    line-height: 1.45;
}

.showcase-features li::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0.55em;
    width: 4px;
    height: 4px;
    border-radius: 50%;
    background: var(--accent);
}

.showcase-btn {
    display: inline-block;
    padding: 0.6rem 1.15rem;
    background: var(--ink);
    color: #fff;
    font-size: 0.82rem;
    font-weight: 600;
    text-decoration: none;
    border-radius: 8px;
    transition: opacity 0.2s;
}

.showcase-btn:hover { opacity: 0.85; }

.gallery-empty {
    text-align: center;
    padding: 2rem;
    color: var(--ink-3);
}

/* Map */
.map-section {
    padding: 2.5rem;
    background: var(--paper-2);
    border-top: 1px solid var(--line);
}

.map-section h2 {
    font-family: var(--font-serif);
    font-size: 1.35rem;
    font-weight: 500;
    margin-bottom: 0.35rem;
}

.map-lead {
    color: var(--ink-2);
    font-size: 0.88rem;
    margin-bottom: 1.5rem;
}

.map-tree { display: flex; flex-direction: column; gap: 1rem; }

.map-root {
    display: flex;
    align-items: center;
    gap: 0.85rem;
    padding: 1rem 1.25rem;
    background: var(--ink);
    color: #fff;
    border-radius: 10px;
    max-width: 280px;
}

.map-root span { font-size: 1.5rem; }

.map-root strong {
    display: block;
    font-family: var(--font-serif);
    font-size: 1rem;
}

.map-root small { font-size: 0.7rem; opacity: 0.5; }

.map-branches {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1rem;
}

.map-group-label {
    display: block;
    font-size: 0.62rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: var(--ink-3);
    margin-bottom: 0.4rem;
}

.map-items span {
    display: block;
    font-size: 0.8rem;
    color: var(--ink-2);
    padding: 0.3rem 0;
    border-bottom: 1px solid var(--line);
}

.page-foot {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.25rem 2.5rem 2rem;
    font-size: 0.75rem;
    color: var(--ink-3);
    flex-wrap: wrap;
    gap: 0.75rem;
}

.foot-links { display: flex; gap: 1rem; }

.foot-links a {
    color: var(--ink-2);
    text-decoration: none;
    font-weight: 500;
}

.foot-links a:hover { color: var(--accent); }

/* ═══ Responsive ═══ */
@media (max-width: 900px) {
    .showcase,
    .showcase-reverse {
        grid-template-columns: 1fr;
        direction: ltr;
    }

    .showcase-features ul {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 768px) {
    .sidebar {
        transform: translateX(-100%);
        transition: transform 0.35s var(--ease);
    }
    .sidebar.open { transform: translateX(0); }
    .sidebar-close { display: block; }
    .sidebar-backdrop.open { display: block; }
    .main { margin-left: 0; }
    .mobile-bar { display: flex; }
    .intro { padding: 2rem 1.15rem 1.5rem; }
    .gallery { padding: 0 1.15rem 2.5rem; }
    .map-section { padding: 2rem 1.15rem; }
    .map-branches { grid-template-columns: 1fr; }
    .page-foot { padding: 1.15rem; flex-direction: column; align-items: flex-start; }
}
