/* ========================================
   Filmoteca Narcisa Hirsch — Stylesheet
   Multi-page version
   ======================================== */

:root {
    --color-bg: #f5f2ed;
    --color-bg-dark: #1a1a1a;
    --color-text: #2c2c2c;
    --color-text-light: #e8e4df;
    --color-text-muted: #7a7a7a;
    --color-accent: #c45a2d;
    --color-accent-light: #d4764f;
    --color-border: #d4cfc7;
    --color-border-dark: #3a3a3a;
    --color-card: #ffffff;
    --color-card-dark: #242424;
    --font-serif: 'EB Garamond', Georgia, 'Times New Roman', serif;
    --font-sans: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    --max-width: 1200px;
    --transition: 0.3s ease;
}

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

html { font-size: 16px; }

body {
    font-family: var(--font-sans);
    color: var(--color-text);
    background-color: var(--color-bg);
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

body.page-dark {
    background-color: var(--color-bg-dark);
    color: var(--color-text-light);
}

/* ---- Typography ---- */
h1, h2, h3 {
    font-family: var(--font-serif);
    font-weight: 500;
    line-height: 1.2;
}

h2 { font-size: 2.4rem; }
h3 { font-size: 1.6rem; }
p { margin-bottom: 1rem; }

.text-large {
    font-family: var(--font-serif);
    font-size: 1.3rem;
    line-height: 1.75;
}

/* ---- Layout ---- */
.container {
    max-width: var(--max-width);
    margin: 0 auto;
    padding: 0 2rem;
}

.section-dark {
    background-color: var(--color-bg-dark);
    color: var(--color-text-light);
}

.label-tag {
    font-family: var(--font-sans);
    font-size: 0.75rem;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.12em;
    color: var(--color-accent);
    display: block;
}

/* ---- Navigation ---- */
#main-nav {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    background: rgba(245, 242, 237, 0.92);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--color-border);
    transition: background var(--transition);
}

#main-nav.nav-dark {
    background: rgba(26, 26, 26, 0.92);
    border-bottom-color: var(--color-border-dark);
}

#main-nav.nav-transparent {
    background: transparent;
    border-bottom-color: transparent;
}

.nav-inner {
    max-width: var(--max-width);
    margin: 0 auto;
    padding: 0 2rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 60px;
}

.nav-logo {
    display: flex;
    align-items: center;
    text-decoration: none;
    flex-shrink: 0;
}

.nav-logo-img {
    height: 26px !important;
    width: auto !important;
    display: block;
    opacity: 0.62;
    transition: opacity var(--transition);
}

.nav-logo:hover .nav-logo-img {
    opacity: 1;
}

.nav-links {
    display: flex;
    gap: 2.5rem;
    align-items: center;
}

.nav-link {
    font-size: 0.82rem;
    font-weight: 400;
    text-decoration: none;
    color: var(--color-text-muted);
    text-transform: uppercase;
    letter-spacing: 0.1em;
    transition: color var(--transition);
}

.nav-link:hover {
    color: var(--color-text);
}

.nav-link.active {
    color: var(--color-text);
}

.nav-dark .nav-link {
    color: #777;
}

.nav-dark .nav-link:hover,
.nav-dark .nav-link.active {
    color: var(--color-text-light);
}

.nav-transparent .nav-link {
    color: #888;
}

.nav-transparent .nav-link:hover {
    color: var(--color-text-light);
}

/* ---- Nav Dropdown (Cineastas) ---- */
.nav-dropdown {
    position: relative;
}

.nav-dropdown-trigger {
    cursor: pointer;
    position: relative;
}

.nav-dropdown-menu {
    position: absolute;
    top: 100%;
    left: 50%;
    transform: translateX(-50%);
    min-width: 220px;
    padding: 0.8rem 0;
    background: var(--color-bg);
    border: 1px solid var(--color-border);
    opacity: 0;
    visibility: hidden;
    transform: translateX(-50%) translateY(4px);
    transition: opacity 0.25s ease, transform 0.25s ease, visibility 0.25s ease;
    margin-top: 12px;
    box-shadow: 0 8px 30px rgba(0,0,0,0.08);
}

.nav-dropdown-menu::before {
    content: '';
    position: absolute;
    top: -12px;
    left: 0;
    right: 0;
    height: 12px;
}

.nav-dropdown:hover .nav-dropdown-menu {
    opacity: 1;
    visibility: visible;
    transform: translateX(-50%) translateY(0);
}

.nav-dark .nav-dropdown-menu {
    background: #222;
    border-color: var(--color-border-dark);
    box-shadow: 0 8px 30px rgba(0,0,0,0.3);
}

.nav-transparent .nav-dropdown-menu {
    background: rgba(26, 26, 26, 0.95);
    border-color: var(--color-border-dark);
    box-shadow: 0 8px 30px rgba(0,0,0,0.3);
}

.nav-dropdown-item {
    display: block;
    padding: 0.55rem 1.5rem;
    font-family: var(--font-serif);
    font-size: 1rem;
    font-style: italic;
    color: var(--color-text);
    text-decoration: none;
    transition: all 0.2s ease;
    cursor: pointer;
    white-space: nowrap;
}

.nav-dropdown-item:hover {
    color: var(--color-accent);
    padding-left: 1.8rem;
}

.nav-dark .nav-dropdown-item,
.nav-transparent .nav-dropdown-item {
    color: #aaa;
}

.nav-dark .nav-dropdown-item:hover,
.nav-transparent .nav-dropdown-item:hover {
    color: var(--color-accent);
}

/* ---- Filmmaker View (sidebar + main) ---- */
.filmmaker-view {
    display: flex;
    position: fixed;
    top: 60px;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 900;
    background: var(--color-bg-dark);
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease;
}

.filmmaker-view.open {
    opacity: 1;
    pointer-events: auto;
}

.filmmaker-view .sidebar-panel {
    transform: translateX(-24px);
    transition: transform 0.35s cubic-bezier(0.16, 1, 0.3, 1);
}

.filmmaker-view.open .sidebar-panel {
    transform: translateX(0);
}

.sidebar-panel {
    width: 340px;
    min-width: 340px;
    background: var(--color-bg);
    display: flex;
    flex-direction: column;
    border-right: 1px solid var(--color-border);
    height: 100%;
}

.sidebar-header {
    padding: 1.5rem 2rem;
    border-bottom: 1px solid var(--color-border);
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-shrink: 0;
}

.sidebar-filmmaker-name {
    font-family: var(--font-serif);
    font-size: 1.4rem;
    font-style: italic;
    font-weight: 500;
    color: var(--color-text);
}

.sidebar-close {
    background: none;
    border: none;
    font-size: 1.5rem;
    color: var(--color-text-muted);
    cursor: pointer;
    line-height: 1;
    padding: 0.2rem;
    transition: color var(--transition);
}

.sidebar-close:hover {
    color: var(--color-text);
}

.sidebar-body {
    flex: 1;
    overflow-y: auto;
    padding: 1rem 0;
}

.sidebar-count {
    padding: 0 2rem;
    font-size: 0.72rem;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: var(--color-text-muted);
    margin-bottom: 0.8rem;
}

.sidebar-film {
    display: block;
    padding: 0.7rem 2rem;
    text-decoration: none;
    transition: background 0.2s ease;
    cursor: pointer;
    border-left: 2px solid transparent;
}

.sidebar-subsections .sidebar-film {
    padding-left: 2.75rem;
}

.sidebar-film:hover {
    background: rgba(0,0,0,0.03);
    border-left-color: var(--color-accent);
}

.sidebar-film-title {
    font-family: var(--font-serif);
    font-size: 1rem;
    font-style: italic;
    font-weight: 500;
    color: var(--color-text-muted);
    display: block;
    line-height: 1.3;
    transition: color 0.2s ease;
}

.sidebar-film:hover .sidebar-film-title,
.sidebar-film.active .sidebar-film-title {
    color: var(--color-accent);
}

.sidebar-film-meta {
    font-family: var(--font-sans);
    font-size: 0.75rem;
    color: var(--color-text-muted);
    margin-top: 0.15rem;
    display: block;
}

.sidebar-footer {
    padding: 1rem 2rem;
    border-top: 1px solid var(--color-border);
    flex-shrink: 0;
}

.sidebar-viewall {
    font-family: var(--font-sans);
    font-size: 0.75rem;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.12em;
    color: var(--color-accent);
    text-decoration: none;
    transition: color var(--transition);
}

.sidebar-viewall:hover {
    color: var(--color-accent-light);
}

/* Top-level nav items (Bio, Films, Instalations, etc.) */
.sidebar-nav-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1rem 2rem;
    border-bottom: 1px solid var(--color-border);
    user-select: none;
    cursor: pointer;
    transition: background 0.2s ease;
}

.sidebar-nav-item:hover {
    background: rgba(0,0,0,0.03);
}

.sidebar-nav-label {
    font-family: var(--font-sans);
    font-size: 0.75rem;
    font-weight: 600;
    letter-spacing: 0.15em;
    text-transform: uppercase;
    color: var(--color-text-muted);
    transition: color 0.2s ease;
}

.sidebar-nav-item:hover .sidebar-nav-label,
.sidebar-nav-item.active .sidebar-nav-label,
.sidebar-nav-item.expanded .sidebar-nav-label {
    color: var(--color-accent);
}

.sidebar-nav-arrow {
    font-size: 0.6rem;
    color: var(--color-text-muted);
    transition: transform 0.3s ease;
}

.sidebar-nav-item.expanded .sidebar-nav-arrow {
    transform: rotate(90deg);
}

/* Sub-sections container (Films sub-menu) */
.sidebar-subsections {
    overflow: hidden;
    height: 0;
    transition: height 0.3s ease;
    border-bottom: 1px solid var(--color-border);
}

.sidebar-subsections.open {
    /* height managed by JS */
}

/* Sidebar collapsible sections */
.sidebar-section-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.65rem 2rem 0.65rem 2.75rem;
    margin-top: 0;
    border-bottom: 1px solid var(--color-border);
    cursor: pointer;
    transition: background 0.2s ease;
    user-select: none;
    background: rgba(0,0,0,0.015);
}

.sidebar-section-header:hover {
    background: rgba(0,0,0,0.03);
}

.sidebar-section-label {
    font-family: var(--font-sans);
    font-size: 0.7rem;
    font-weight: 600;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: var(--color-text-muted);
    transition: color 0.2s ease;
}


.sidebar-subsections.open .sidebar-section-label {
    color: var(--color-accent);
}

.sidebar-section-count {
    font-family: var(--font-sans);
    font-size: 0.65rem;
    font-weight: 500;
    color: var(--color-text-muted);
}

.sidebar-section-arrow {
    font-size: 0.6rem;
    color: var(--color-text-muted);
    margin-left: 0.5rem;
    display: inline-block;
    transition: transform 0.3s ease;
}

.sidebar-section-header.expanded .sidebar-section-arrow {
    transform: rotate(90deg);
}

.sidebar-section-films {
    overflow: hidden;
    height: 0;
    transition: height 0.3s ease;
}

.sidebar-film.active {
    background: rgba(0,0,0,0.05);
    border-left-color: var(--color-accent);
}

/* Bio content */
.bio-image-wrap {
    position: relative;
    margin-bottom: 2.75rem;
    border-radius: 8px;
    overflow: hidden;
}

.bio-image-wrap::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 45%;
    background: linear-gradient(to bottom, transparent, #1a1a1a);
    pointer-events: none;
}

.bio-image {
    display: block;
    width: 100%;
    height: auto;
}

.bio-content p {
    font-family: var(--font-serif);
    font-size: 1.2rem;
    line-height: 1.8;
    color: rgba(255,255,255,0.88);
    margin-bottom: 1.5rem;
    text-align: justify;
}

.bio-english p {
    font-style: italic;
}

.bio-author {
    font-family: var(--font-serif);
    font-size: 1.2rem;
    font-weight: 400;
    color: var(--color-accent) !important;
    margin-top: 1.5rem !important;
    margin-bottom: 0 !important;
    display: block;
    text-align: right;
}

/* Microscope Gallery credit block */
.bio-gallery-credit {
    margin-bottom: 2.5rem;
    padding: 1.5rem 0;
    border-top: 1px solid rgba(255,255,255,0.1);
    border-bottom: 1px solid rgba(255,255,255,0.1);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.9rem;
}

.bio-gallery-label {
    font-family: var(--font-sans);
    font-size: 0.65rem;
    font-weight: 400;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: rgba(255,255,255,0.4);
    text-align: center;
}

.bio-gallery-location {
    font-family: var(--font-sans);
    font-size: 0.62rem;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: rgba(255,255,255,0.3);
}

.microscope-logo {
    display: block;
    max-width: 190px;
    height: auto;
    filter: invert(1);
    mix-blend-mode: screen;
    opacity: 0.75;
    transition: opacity 0.2s;
}

.microscope-logo:hover {
    opacity: 1;
}

.bio-lang-divider {
    border: none;
    border-top: 1px solid rgba(255,255,255,0.1);
    margin: 2rem 0 2.5rem;
}

/* Main content area */
.film-main {
    flex: 1;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    background: var(--color-bg-dark);
    position: relative;
}

.film-main-inner {
    max-width: 780px;
    margin: 0;
    padding: 3rem 2.5rem 4rem;
}

.film-main-placeholder {
    color: rgba(255,255,255,0.35);
    font-family: var(--font-serif);
    font-style: italic;
    font-size: 1.1rem;
    text-align: center;
    padding-top: 30vh;
}

.nav-toggle {
    display: none;
    background: none;
    border: none;
    cursor: pointer;
    flex-direction: column;
    gap: 5px;
    padding: 4px;
}

.nav-toggle span {
    display: block;
    width: 22px;
    height: 1.5px;
    background: var(--color-text);
    transition: var(--transition);
}

.nav-dark .nav-toggle span,
.nav-transparent .nav-toggle span {
    background: var(--color-text-light);
}

.nav-mobile {
    display: none;
    flex-direction: column;
    padding: 1rem 2rem 1.5rem;
    gap: 1rem;
    border-top: 1px solid var(--color-border);
}

.nav-dark .nav-mobile {
    border-top-color: var(--color-border-dark);
}

.nav-mobile.open {
    display: flex;
}

/* ---- Page Header (inner pages) ---- */
.page-header {
    padding: 8rem 0 3rem;
    background-color: var(--color-bg);
}

.page-header-dark {
    background-color: var(--color-bg-dark);
}

.page-header .label-tag {
    margin-bottom: 1rem;
}

.page-title {
    font-family: var(--font-serif);
    font-size: clamp(2rem, 5vw, 3.2rem);
    font-weight: 400;
    font-style: italic;
    letter-spacing: -0.02em;
    max-width: 700px;
}

.page-header-dark .page-title {
    color: var(--color-text-light);
}

/* ---- Page Content ---- */
.page-content {
    flex: 1;
    padding: 3rem 0 5rem;
}

/* ---- Hero (home only) ---- */
#hero {
    background-color: var(--color-bg-dark);
    color: var(--color-text-light);
    position: relative;
    overflow: hidden;
    padding-top: 8rem;
    padding-bottom: 3rem;
    text-align: center;
}

#hero::before {
    content: '';
    position: absolute;
    inset: 0;
    background:
        radial-gradient(ellipse at 20% 50%, rgba(196, 90, 45, 0.08) 0%, transparent 60%),
        radial-gradient(ellipse at 80% 50%, rgba(196, 90, 45, 0.05) 0%, transparent 60%);
    pointer-events: none;
}

.hero-content {
    position: relative;
    z-index: 1;
    padding: 0 2rem 2rem;
}

.hero-pre {
    font-family: var(--font-sans);
    font-size: 0.78rem;
    font-weight: 400;
    text-transform: uppercase;
    letter-spacing: 0.25em;
    color: var(--color-accent);
    margin-bottom: 1rem;
}

.hero-title {
    font-family: var(--font-serif);
    font-size: clamp(2rem, 5vw, 3.8rem);
    font-weight: 400;
    letter-spacing: -0.02em;
    line-height: 1;
    margin-bottom: 1rem;
    font-style: italic;
}

.hero-logo-img {
    width: clamp(200px, 30vw, 360px);
    height: auto;
    display: block;
    margin: 0 auto 1.4rem;
}

.hero-sub {
    font-size: 0.9rem;
    font-weight: 300;
    color: #999;
    max-width: 420px;
    margin: 0 auto;
    line-height: 1.6;
}

/* ---- Sobre page: Content Columns ---- */
.content-columns {
    display: grid;
    grid-template-columns: 1fr 320px;
    gap: 4rem;
}

.content-main p {
    margin-bottom: 1.2rem;
}

.aside-block {
    margin-bottom: 2.5rem;
}

.aside-title {
    font-family: var(--font-sans);
    font-size: 0.72rem;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.12em;
    color: var(--color-text-muted);
    margin-bottom: 0.8rem;
}

.aside-list {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.aside-list li {
    font-size: 0.9rem;
    color: var(--color-text);
    padding-left: 1rem;
    position: relative;
}

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

.aside-link {
    font-family: var(--font-sans);
    font-size: 0.82rem;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: var(--color-accent);
    text-decoration: none;
    transition: color var(--transition);
}

.aside-link:hover {
    color: var(--color-accent-light);
}

/* ---- Cineastas page ---- */
.filmmakers-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 2rem;
}

.filmmakers-grid-full {
    grid-template-columns: 1fr;
    gap: 0;
}

.filmmaker-card {
    background: var(--color-card-dark);
    border: 1px solid var(--color-border-dark);
    padding: 2.5rem;
    transition: border-color var(--transition);
}

.filmmaker-card:hover {
    border-color: var(--color-accent);
}

.filmmaker-card-large {
    padding: 3rem;
    border-bottom: none;
}

.filmmaker-card-large:last-child {
    border-bottom: 1px solid var(--color-border-dark);
}

.filmmaker-card-large:hover {
    border-color: var(--color-accent);
}

.filmmaker-card h2,
.filmmaker-card h3 {
    font-size: 1.8rem;
    margin-bottom: 0.3rem;
    color: var(--color-text-light);
    font-style: italic;
}

.film-detail-sinopsis--cita {
    font-style: italic;
}

.bio-photo-credit {
    font-size: 0.75rem;
    color: var(--color-text-muted);
    margin-top: -2rem;
    margin-bottom: 2rem;
    padding: 0 0.25rem;
}

.filmmaker-name-link {
    color: inherit;
    text-decoration: none;
    cursor: pointer;
}
.filmmaker-name-link:hover {
    text-decoration: underline;
    text-underline-offset: 3px;
}

.filmmaker-dates {
    font-size: 0.82rem;
    color: var(--color-text-muted);
    margin-bottom: 1.2rem;
}

.filmmaker-bio {
    font-size: 0.92rem;
    line-height: 1.7;
    color: #aaa;
    margin-bottom: 1rem;
}

.btn-filmography {
    display: inline-block;
    background: none;
    border: 1px solid var(--color-border-dark);
    color: var(--color-text-light);
    font-size: 0.75rem;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.12em;
    padding: 0.65rem 1.5rem;
    cursor: pointer;
    transition: all var(--transition);
    font-family: var(--font-sans);
    text-decoration: none;
    margin-top: 0.5rem;
}

.btn-filmography:hover {
    border-color: var(--color-accent);
    color: var(--color-accent);
}

/* ---- Contacto page ---- */
.contact-layout {
    display: grid;
    grid-template-columns: 1fr 360px;
    gap: 4rem;
}

.contact-email {
    font-family: var(--font-serif);
    font-size: 1.6rem;
    font-style: italic;
    color: var(--color-accent-light);
    margin-bottom: 1rem;
}

.contact-note {
    font-size: 0.9rem;
    color: #888;
    line-height: 1.6;
}

.contact-block {
    margin-bottom: 2rem;
}

/* ---- Filters ---- */
.filters {
    margin-bottom: 2rem;
    display: flex;
    flex-direction: column;
    gap: 1.2rem;
    padding-bottom: 2rem;
    border-bottom: 1px solid var(--color-border);
}

.filter-group label {
    display: block;
    font-size: 0.7rem;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.12em;
    color: var(--color-text-muted);
    margin-bottom: 0.5rem;
}

.filter-buttons {
    display: flex;
    flex-wrap: wrap;
    gap: 0.4rem;
}

.filter-btn {
    background: none;
    border: 1px solid var(--color-border);
    color: var(--color-text-muted);
    font-family: var(--font-sans);
    font-size: 0.78rem;
    padding: 0.4rem 0.9rem;
    cursor: pointer;
    transition: all var(--transition);
    white-space: nowrap;
}

.filter-btn:hover {
    color: var(--color-text);
    border-color: var(--color-text);
}

.filter-btn.active {
    background: var(--color-text);
    color: var(--color-bg);
    border-color: var(--color-text);
}

.search-group input {
    font-family: var(--font-sans);
    font-size: 0.9rem;
    padding: 0.5rem 0;
    border: none;
    border-bottom: 1px solid var(--color-border);
    background: transparent;
    color: var(--color-text);
    width: 100%;
    max-width: 400px;
    outline: none;
    transition: border-color var(--transition);
}

.search-group input:focus {
    border-bottom-color: var(--color-accent);
}

.search-group input::placeholder {
    color: var(--color-text-muted);
}

/* ---- Results ---- */
.results-info {
    font-size: 0.8rem;
    color: var(--color-text-muted);
    margin-bottom: 1.5rem;
}

/* ---- Film List ---- */
.film-list {
    display: flex;
    flex-direction: column;
}

.film-item {
    display: grid;
    grid-template-columns: minmax(100px, 140px) 1fr auto;
    gap: 1.5rem;
    align-items: baseline;
    padding: 1.1rem 0;
    border-bottom: 1px solid var(--color-border);
    cursor: pointer;
    transition: background var(--transition);
}

.film-item:hover {
    background: rgba(0,0,0,0.02);
    padding-left: 0.5rem;
    padding-right: 0.5rem;
}

.film-year {
    font-family: var(--font-serif);
    font-size: 1.05rem;
    color: var(--color-text-muted);
}

.film-title-col {
    display: flex;
    flex-direction: column;
    gap: 0.2rem;
}

.film-title {
    font-family: var(--font-serif);
    font-size: 1.15rem;
    font-weight: 500;
    font-style: italic;
    color: var(--color-text);
    transition: color var(--transition);
}

.film-item:hover .film-title {
    color: var(--color-accent);
}

.film-director {
    font-size: 0.78rem;
    color: var(--color-text-muted);
}

.film-meta {
    text-align: right;
    white-space: nowrap;
}

.film-format-tag {
    font-size: 0.7rem;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    padding: 0.2rem 0.6rem;
    border: 1px solid var(--color-border);
    color: var(--color-text-muted);
    display: inline-block;
}

.film-duration {
    font-size: 0.78rem;
    color: var(--color-text-muted);
    margin-top: 0.3rem;
}

/* ---- Modal ---- */
.modal {
    display: none;
    position: fixed;
    inset: 0;
    z-index: 2000;
    background: rgba(0,0,0,0.6);
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
    justify-content: center;
    align-items: flex-start;
    padding: 4rem 2rem;
    overflow-y: auto;
}

.modal.open {
    display: flex;
}

.modal-content {
    background: var(--color-bg);
    max-width: 700px;
    width: 100%;
    padding: 3rem;
    position: relative;
    border: 1px solid var(--color-border);
}

.modal-close {
    position: absolute;
    top: 1rem;
    right: 1.2rem;
    background: none;
    border: none;
    font-size: 1.8rem;
    color: var(--color-text-muted);
    cursor: pointer;
    line-height: 1;
    transition: color var(--transition);
}

.modal-close:hover {
    color: var(--color-text);
}

.modal-filmmaker {
    font-size: 0.7rem;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.12em;
    color: var(--color-accent);
    margin-bottom: 0.5rem;
}

.modal-title {
    font-family: var(--font-serif);
    font-size: 2rem;
    font-style: italic;
    font-weight: 500;
    margin-bottom: 0.3rem;
}

.modal-year {
    font-family: var(--font-serif);
    font-size: 1.1rem;
    color: var(--color-text-muted);
    margin-bottom: 1.5rem;
}

.modal-details {
    display: flex;
    flex-direction: column;
    gap: 0.8rem;
    margin-bottom: 2rem;
    padding-bottom: 1.5rem;
    border-bottom: 1px solid var(--color-border);
}

.modal-detail {
    display: grid;
    grid-template-columns: 120px 1fr;
    gap: 1rem;
    font-size: 0.88rem;
}

.modal-detail-label {
    font-weight: 500;
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--color-text-muted);
    padding-top: 0.1rem;
}

.modal-detail-value {
    color: var(--color-text);
    line-height: 1.5;
}

.modal-sinopsis {
    font-family: var(--font-serif);
    font-size: 1.05rem;
    line-height: 1.8;
    color: var(--color-text);
}

.modal-sinopsis-label {
    font-family: var(--font-sans);
    font-weight: 500;
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--color-text-muted);
    margin-bottom: 0.5rem;
}

/* ---- News section (homepage) ---- */
#news-section {
    padding: 0 0 5rem;
    background: var(--color-bg-dark);
}

.news-section-header {
    margin-bottom: 2rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid var(--color-border-dark);
    display: flex;
    align-items: baseline;
    justify-content: space-between;
}

.news-section-title {
    font-family: var(--font-serif);
    font-size: 1.5rem;
    font-weight: 400;
    font-style: italic;
    color: var(--color-text-light);
}

.news-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 2.5rem 2rem;
    align-items: start;
}

.news-card-link {
    text-decoration: none;
    color: inherit;
    display: flex;
    flex-direction: column;
}

.news-card-img-wrap {
    position: relative;
    aspect-ratio: 16 / 10;
    overflow: hidden;
    background: var(--color-border);
    margin-bottom: 1rem;
    border-radius: 8px;
}

.news-card-img-wrap.portrait {
    aspect-ratio: 3 / 4;
}

.news-card-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
    display: block;
}

.news-card-img-wrap::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(to bottom, rgba(0,0,0,0.28) 0%, transparent 45%);
    pointer-events: none;
    border-radius: 8px;
}

.news-card-link:hover .news-card-img {
    transform: scale(1.04);
}

.news-card-category {
    position: absolute;
    top: 0.7rem;
    left: 0.75rem;
    font-family: var(--font-sans);
    font-size: 0.763rem;
    font-weight: 400;
    letter-spacing: 0.02em;
    color: rgba(255, 255, 255, 0.92);
    text-shadow: 0 1px 6px rgba(0, 0, 0, 0.7), 0 0 2px rgba(0, 0, 0, 0.4);
}

.news-card-title {
    font-family: var(--font-serif);
    font-size: 1.45rem;
    font-weight: 500;
    line-height: 1.3;
    color: var(--color-text-light);
    margin-bottom: 0.45rem;
    transition: color var(--transition);
}

.news-card-link:hover .news-card-title {
    color: var(--color-accent);
}

.news-card-excerpt {
    font-size: 0.82rem;
    line-height: 1.65;
    color: #888;
    margin-bottom: 0;
}

@media (max-width: 900px) {
    .news-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 580px) {
    .news-grid { grid-template-columns: 1fr; }
}

/* ---- Footer ---- */
#footer {
    padding: 2rem 0;
    border-top: 1px solid var(--color-border);
    margin-top: auto;
}

#footer.footer-dark {
    border-top-color: var(--color-border-dark);
    background-color: var(--color-bg-dark);
}

.footer-inner {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.footer-logo {
    font-family: var(--font-serif);
    font-size: 0.95rem;
    font-weight: 500;
}

.footer-dark .footer-logo {
    color: var(--color-text-light);
}

.footer-copy {
    font-size: 0.75rem;
    color: var(--color-text-muted);
}

/* ---- Responsive ---- */
@media (max-width: 900px) {
    .content-columns {
        grid-template-columns: 1fr;
        gap: 3rem;
    }

    .contact-layout {
        grid-template-columns: 1fr;
        gap: 3rem;
    }

    .filmmakers-grid:not(.filmmakers-grid-full) {
        grid-template-columns: 1fr;
    }

    .film-item {
        grid-template-columns: 80px 1fr;
        gap: 1rem;
    }

    .film-meta {
        grid-column: 2;
        text-align: left;
    }
}

@media (max-width: 640px) {
    .nav-links {
        display: none;
    }

    .sidebar-panel {
        width: 100%;
        min-width: 100%;
    }

    .nav-toggle {
        display: flex;
    }

    .hero-title {
        font-size: 2.8rem;
    }

    .page-header {
        padding: 6.5rem 0 2rem;
    }

    .page-content {
        padding: 2rem 0 3rem;
    }

    .modal-content {
        padding: 2rem 1.5rem;
    }

    .modal-detail {
        grid-template-columns: 1fr;
        gap: 0.2rem;
    }

    .footer-inner {
        flex-direction: column;
        gap: 0.5rem;
        text-align: center;
    }

    .filter-buttons {
        gap: 0.3rem;
    }

    .filter-btn {
        font-size: 0.72rem;
        padding: 0.35rem 0.7rem;
    }
}

/* ==============================
   Film Carousel
   ============================== */

.film-carousel {
    position: relative;
    width: 100%;
    max-width: 580px;
    margin: 0 0 1rem;
    aspect-ratio: 4/3;
    overflow: hidden;
}

.film-carousel-placeholder {
    width: 100%;
    max-width: 580px;
    aspect-ratio: 4/3;
    background-color: var(--color-accent);
    margin: 0 0 2rem;
}

.film-detail-nota-documentacion {
    font-size: 0.82rem;
    color: var(--color-text-light);
    font-style: italic;
    margin-top: 1.5rem;
    margin-bottom: 2rem;
    line-height: 1.5;
}

.film-carousel img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.film-carousel--contain img {
    object-fit: contain;
    background: #000;
}

.film-carousel-nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(255,255,255,0.85);
    border: none;
    width: 2rem;
    height: 2rem;
    border-radius: 50%;
    font-size: 1.1rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #222;
    opacity: 0;
    transition: opacity 0.2s ease;
    box-shadow: 0 1px 4px rgba(0,0,0,0.2);
}

.film-carousel:hover .film-carousel-nav {
    opacity: 1;
}

.film-carousel-prev { left: 0.75rem; }
.film-carousel-next { right: 0.75rem; }

.film-carousel-dots {
    display: flex;
    justify-content: flex-start;
    gap: 0.35rem;
    padding: 0.75rem 0;
}

.film-carousel-dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: rgba(255,255,255,0.25);
    border: none;
    padding: 0;
    cursor: pointer;
    transition: background 0.2s;
}

.film-carousel-dot.active {
    background: rgba(255,255,255,0.7);
}

/* Film info section */
.film-detail-title {
    font-family: var(--font-serif);
    font-size: 2.2rem;
    font-weight: 400;
    font-style: italic;
    margin-bottom: 0.25rem;
    color: var(--color-text-light);
}

.film-detail-year {
    font-family: var(--font-sans);
    font-size: 0.8rem;
    letter-spacing: 0.08em;
    color: rgba(255,255,255,0.45);
    margin-bottom: 0.4rem;
}

.film-detail-year + .film-detail-section-label {
    margin-top: 1.6rem;
}

.film-detail-autores {
    font-family: var(--font-sans);
    font-size: 0.85rem;
    letter-spacing: 0.04em;
    color: rgba(255,255,255,0.6);
    margin-top: 0.2rem;
    margin-bottom: 0.4rem;
}

.film-detail-creditos {
    font-family: var(--font-sans);
    font-size: 0.8rem;
    letter-spacing: 0.08em;
    color: rgba(255,255,255,0.45);
    margin-top: 0;
    margin-bottom: 2.5rem;
}

.film-detail-nota-distribucion {
    font-size: 0.82rem;
    color: var(--color-text-light);
    font-style: italic;
    margin-top: -1.8rem;
    margin-bottom: 2.5rem;
    line-height: 1.5;
}

.film-detail-section-label {
    font-family: var(--font-sans);
    font-size: 0.65rem;
    font-weight: 600;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: var(--color-accent);
    margin-bottom: 1rem;
    padding-bottom: 0.5rem;
    border-bottom: 1px solid var(--color-border-dark);
}

.film-detail-meta {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.6rem 2rem;
    margin-bottom: 2.5rem;
}

.film-detail-meta-row {
    font-size: 0.82rem;
    line-height: 1.5;
    color: var(--color-text-light);
}

.film-detail-meta-row strong {
    font-weight: 500;
    color: rgba(255,255,255,0.45);
    font-size: 0.72rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    display: block;
    margin-bottom: 0.1rem;
}

.film-detail-sinopsis {
    font-family: var(--font-serif);
    font-size: 1.05rem;
    line-height: 1.8;
    color: var(--color-text-light);
    margin-bottom: 1.5rem;
}

.film-detail-sinopsis-en {
    margin-top: 0;
    color: var(--color-text-light);
    font-style: italic;
    border-top: 1px solid var(--color-border-dark);
    padding-top: 1rem;
    margin-bottom: 2.5rem;
}

.film-detail-screenings {
    margin-bottom: 2rem;
}

.film-detail-screenings ul {
    list-style: none;
    padding: 0;
}

.film-detail-screenings li {
    font-size: 0.82rem;
    line-height: 1.6;
    color: var(--color-text-light);
    padding: 0.3rem 0;
    border-bottom: 1px solid rgba(255,255,255,0.08);
}

.film-detail-screenings li.screening-row {
    display: flex;
    align-items: baseline;
    gap: 0.5em;
}

.film-detail-screenings .screening-year {
    flex-shrink: 0;
    white-space: nowrap;
    color: var(--color-text-light);
}

.film-detail-screenings .screening-text {
    flex: 1;
    min-width: 0;
}

.film-detail-screenings li:last-child {
    border-bottom: none;
}

.film-detail-contact {
    font-family: var(--font-sans);
    font-size: 0.78rem;
    color: rgba(255,255,255,0.35);
    font-style: italic;
    margin-top: 2.5rem;
    padding-top: 1.5rem;
    border-top: 1px solid var(--color-border-dark);
}

.film-detail-contact a {
    color: var(--color-accent);
    text-decoration: none;
}

.film-detail-contact a:hover {
    text-decoration: underline;
}

/* ==============================
   Responsive: Filmmaker View
   ============================== */

@media (max-width: 768px) {
    .filmmaker-view {
        flex-direction: column;
    }

    .filmmaker-view .sidebar-panel {
        transform: translateY(-24px);
    }

    .filmmaker-view.open .sidebar-panel {
        transform: translateY(0);
    }

    .sidebar-panel {
        width: 100%;
        min-width: 100%;
        height: 45vh;
        min-height: 200px;
        border-right: none;
        border-bottom: 1px solid var(--color-border);
    }

    .film-main-inner {
        padding: 2rem 1.5rem 3rem;
    }

    .film-detail-title {
        font-size: 1.8rem;
    }

    .film-detail-meta {
        grid-template-columns: 1fr;
    }
}

/* ========================================
   Link Preview Card
   ======================================== */
.lp-card {
    position: fixed;
    z-index: 9999;
    pointer-events: none;
    top: 0;
    left: 0;
}

.lp-inner {
    opacity: 0;
    transform: translateX(-50%) translateY(20px) scale(0.6);
    transition:
        opacity 0.15s ease,
        transform 0.35s cubic-bezier(0.34, 1.56, 0.64, 1);
    transform-origin: center bottom;
}

.lp-card.lp-visible .lp-inner {
    opacity: 1;
    transform: translateX(-50%) translateY(0) scale(1);
}

.lp-trigger {
    color: inherit;
}

.lp-link {
    display: block;
    padding: 4px;
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.45);
    border: 2px solid transparent;
    line-height: 0;
    pointer-events: auto;
    transition: border-color 0.15s ease;
}

.lp-link:hover {
    border-color: rgba(0, 0, 0, 0.15);
}

.lp-img {
    display: block;
    width: 200px;
    height: 125px;
    object-fit: cover;
    border-radius: 8px;
    background: #1a1a1a;
}

/* ── Document cards ──────────────────────────────────── */
.film-detail-documents {
    margin: 0 0 24px;
}

.film-doc-card {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 14px 16px;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid var(--color-border-dark);
    border-radius: 6px;
    text-decoration: none;
    color: var(--color-text-light);
    cursor: pointer;
    transition: background 0.15s ease, border-color 0.15s ease;
    margin-bottom: 8px;
}

.film-doc-card:hover {
    background: rgba(255, 255, 255, 0.08);
    border-color: var(--color-accent);
}

.film-doc-thumb {
    flex-shrink: 0;
    width: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.film-doc-paper {
    position: relative;
    width: 28px;
    height: 36px;
    background: var(--color-text-light);
    border-radius: 2px;
    opacity: 0.8;
}

.film-doc-paper::before {
    content: '';
    position: absolute;
    top: 0;
    right: 0;
    width: 9px;
    height: 9px;
    background: var(--color-bg-dark);
    clip-path: polygon(0 0, 100% 100%, 100% 0);
}

.film-doc-paper::after {
    content: '';
    position: absolute;
    top: 0;
    right: 0;
    width: 9px;
    height: 9px;
    border-left: 1px solid rgba(0, 0, 0, 0.2);
    border-bottom: 1px solid rgba(0, 0, 0, 0.2);
}

.film-doc-meta {
    flex: 1;
    min-width: 0;
}

.film-doc-title {
    font-family: var(--font-serif);
    font-size: 15px;
    color: var(--color-text-light);
    margin-bottom: 3px;
}

.film-doc-info {
    font-size: 11px;
    font-family: var(--font-sans);
    color: rgba(232, 228, 223, 0.5);
    letter-spacing: 0.03em;
}

.film-doc-context {
    font-size: 11px;
    font-family: var(--font-sans);
    color: rgba(232, 228, 223, 0.38);
    margin-top: 2px;
    font-style: italic;
}

.film-doc-cta {
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    font-size: 16px;
    font-family: var(--font-sans);
    text-decoration: none;
    color: var(--color-accent);
    border: 1px solid var(--color-accent);
    border-radius: 50%;
    transition: background 0.15s ease, color 0.15s ease;
    line-height: 1;
}

.film-doc-card:hover .film-doc-cta {
    background: var(--color-accent);
    color: #fff;
}

/* ── PDF viewer overlay ─────────────────────────────── */
.pdf-overlay {
    display: none;
    position: absolute;
    inset: 0;
    z-index: 500;
    background: rgba(0, 0, 0, 0.92);
    align-items: center;
    justify-content: center;
    padding: 24px;
}

.pdf-overlay--fixed {
    position: fixed;
    z-index: 3000;
}

.pdf-overlay.open {
    display: flex;
}

.pdf-overlay-panel {
    position: relative;
    width: 100%;
    max-width: 860px;
    height: 100%;
    background: var(--color-bg-dark);
    border-radius: 6px;
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

.pdf-overlay-close {
    position: absolute;
    top: 10px;
    right: 12px;
    z-index: 10;
    background: rgba(0, 0, 0, 0.55);
    border: 1px solid rgba(255, 255, 255, 0.25);
    border-radius: 50%;
    color: #fff;
    font-size: 18px;
    line-height: 1;
    cursor: pointer;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.15s ease;
}

.pdf-overlay-close:hover {
    background: rgba(0, 0, 0, 0.85);
}

.pdf-overlay-frame {
    flex: 1;
    width: 100%;
    border: none;
    background: #fff;
}

/* card inside light modal */
.modal .film-doc-card {
    background: rgba(0, 0, 0, 0.04);
    border-color: var(--color-border);
    color: var(--color-text);
}

.modal .film-doc-card:hover {
    background: rgba(0, 0, 0, 0.07);
    border-color: var(--color-accent);
}

.modal .film-doc-paper {
    background: var(--color-text);
    opacity: 0.7;
}

.modal .film-doc-paper::before {
    background: var(--color-bg);
}

.modal .film-doc-title {
    color: var(--color-text);
}

.modal .film-doc-info {
    color: var(--color-text-muted);
}

.modal .film-doc-context {
    color: var(--color-text-muted);
    opacity: 0.7;
}

/* ---- Textos / Bibliografía ---- */
.textos-panel {
    position: absolute;
    inset: 0;
    overflow-y: auto;
    background: var(--color-bg);
    padding: 3rem 2.5rem 4rem;
}


.textos-section {
    padding: 5rem 0 6rem;
    border-top: 1px solid var(--color-border);
}

.textos-main-title {
    font-family: var(--font-serif);
    font-size: 2rem;
    font-weight: 400;
    color: var(--color-text);
    margin-top: 0.4rem;
    margin-bottom: 3.5rem;
}

.textos-body {
    max-width: 830px;
}

.textos-cat {
    margin-bottom: 3rem;
    padding-bottom: 3rem;
    border-bottom: 1px solid var(--color-border);
}

.textos-cat:last-child {
    border-bottom: none;
    padding-bottom: 0;
    margin-bottom: 0;
}

.textos-cat-title {
    font-family: var(--font-sans);
    font-size: 0.7rem;
    font-weight: 500;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: var(--color-accent);
    margin-bottom: 1.4rem;
}

.textos-entry {
    font-family: var(--font-serif);
    font-size: 0.97rem;
    line-height: 1.7;
    color: var(--color-text);
    margin-bottom: 0.85rem;
    padding-left: 1.4em;
    text-indent: -1.4em;
}

.textos-entry:last-child {
    margin-bottom: 0;
}

.textos-entry a:not(.bib-pdf-btn) {
    color: inherit;
    text-decoration: underline;
}

.bib-pdf-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 20px;
    height: 20px;
    text-decoration: none;
    color: var(--color-accent);
    background: #2a2a2a;
    border: none;
    border-radius: 50%;
    vertical-align: middle;
    margin-left: 0.45em;
    flex-shrink: 0;
    opacity: 0.85;
    transition: opacity 0.15s, background 0.15s;
}
.bib-pdf-btn svg {
    display: block;
}
.bib-pdf-btn:hover {
    opacity: 1;
    background: #111;
}

.textos-entry--flex {
    display: flex;
    align-items: flex-end;
    text-indent: 0;
    padding-left: 0;
    gap: 0.35em;
}
.textos-entry--flex .entry-text {
    flex: 1;
    min-width: 0;
}

.textos-entry--interview {
    display: flex;
    align-items: baseline;
    gap: 0.4em;
    text-indent: 0;
    padding-left: 0;
}
.textos-entry--interview .entry-year {
    flex-shrink: 0;
    white-space: nowrap;
}
.textos-entry--interview .entry-body {
    flex: 1;
    min-width: 0;
}

/* ── Video Interviews ── */
.video-interviews-panel {
    background: var(--color-bg-dark, #1a1a1a);
    padding: 1rem 1rem 2rem;
    min-height: 100%;
    box-sizing: border-box;
}

.video-interviews-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1.4rem;
    max-width: 820px;
    margin: 0 auto;
}

.video-card {
    display: flex;
    flex-direction: column;
}

.video-thumb-wrap {
    position: relative;
    aspect-ratio: 16 / 9;
    background: #000;
    overflow: hidden;
    cursor: pointer;
    border-radius: 10px;
}

.video-thumb {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: opacity 0.2s;
}

.video-thumb-wrap:hover .video-thumb {
    opacity: 0.75;
}

.video-play-btn {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    font-size: 2rem;
    opacity: 0;
    transition: opacity 0.2s;
    pointer-events: none;
    text-shadow: 0 1px 6px rgba(0,0,0,0.7);
}

.video-thumb-wrap:hover .video-play-btn {
    opacity: 1;
}

.video-thumb-vimeo {
    background: #1a1a2e;
}

.video-thumb-vimeo .video-play-btn {
    opacity: 0.55;
    font-size: 2.4rem;
}

.video-thumb-vimeo:hover .video-play-btn {
    opacity: 1;
}

.video-thumb-wrap iframe {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    border: none;
}

.video-card-desc {
    font-family: var(--font-serif);
    font-size: 0.82rem;
    line-height: 1.5;
    color: #aaa;
    margin-top: 0.55rem;
}

.textos-lang-sep {
    font-family: var(--font-sans);
    font-size: 0.7rem;
    font-weight: 500;
    font-style: italic;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: var(--color-accent);
    margin: 1.6rem 0 1.4rem;
    padding-top: 1.2rem;
    border-top: 1px solid var(--color-border);
}

.textos-link {
    color: var(--color-accent);
    text-decoration: underline;
    text-decoration-color: rgba(196, 90, 45, 0.4);
    text-underline-offset: 2px;
    font-size: 0.88rem;
}

/* ── Postales grid ── */
.postales-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1.4rem;
    margin: 1.5rem 0 2rem;
}

.postal-card {
    display: flex;
    flex-direction: column;
    cursor: pointer;
}

.postal-thumb-wrap {
    height: 260px;
    overflow: hidden;
    border-radius: 6px;
    background: #1e1e1e;
    display: flex;
    align-items: center;
    justify-content: center;
}

.postal-thumb {
    max-width: 100%;
    max-height: 100%;
    width: auto;
    height: auto;
    object-fit: contain;
    display: block;
    transition: opacity 0.2s;
}

.postal-card:hover .postal-thumb {
    opacity: 0.82;
}

.postal-title {
    font-size: 0.74rem;
    color: var(--color-text-muted, #888);
    margin: 0.45rem 0 0;
    text-align: center;
    text-transform: uppercase;
    letter-spacing: 0.06em;
}

/* ── Postales lightbox ── */
.postal-lightbox {
    position: fixed;
    inset: 0;
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
}

.postal-lb-overlay {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.45);
    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);
    animation: postalOverlayIn 0.32s ease;
}

@keyframes postalOverlayIn {
    from { opacity: 0; }
    to   { opacity: 1; }
}

.postal-lb-content {
    position: relative;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    z-index: 1;
    perspective: 1200px;
    animation: postalLbOpen 0.52s cubic-bezier(0.34, 1.56, 0.64, 1);
}

@keyframes postalLbOpen {
    0%   { opacity: 0; transform: scale(0.72) translateY(36px); }
    100% { opacity: 1; transform: scale(1) translateY(0); }
}

.postal-card-3d {
    transform-style: preserve-3d;
    transition: transform 0.6s cubic-bezier(0.4, 0, 0.2, 1);
    display: grid;
    cursor: default;
}

.postal-card-3d.flipped {
    transform: rotateY(180deg);
}

.postal-front,
.postal-back {
    grid-row: 1;
    grid-column: 1;
    backface-visibility: hidden;
    -webkit-backface-visibility: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
}

.postal-back {
    transform: rotateY(180deg);
}

.postal-lb-img {
    max-width: 80vw;
    max-height: 82vh;
    object-fit: contain;
    display: block;
    border-radius: 3px;
    box-shadow: 0 28px 70px rgba(0,0,0,0.6), 0 8px 20px rgba(0,0,0,0.35);
}

.postal-lb-close {
    position: absolute;
    top: -2.4rem;
    right: 0;
    background: none;
    border: none;
    color: #fff;
    font-size: 2rem;
    cursor: pointer;
    opacity: 0.75;
    line-height: 1;
    padding: 0;
}

.postal-lb-close:hover { opacity: 1; }

.postal-lb-nav {
    background: none;
    border: none;
    color: #fff;
    font-size: 3.5rem;
    cursor: pointer;
    opacity: 0.65;
    line-height: 1;
    padding: 0 0.4rem;
    transition: opacity 0.15s;
    flex-shrink: 0;
}

.postal-lb-nav:hover { opacity: 1; }

.postal-lb-dots {
    position: absolute;
    bottom: -2rem;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 0.5rem;
}

.postal-lb-dot {
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.35);
    border: none;
    cursor: pointer;
    padding: 0;
    transition: background 0.15s;
}

.postal-lb-dot.active { background: #fff; }
