/* ============================================================
   THROUGHYEARS.RU — Modern Memorial
   Clean, contemporary design with warm undertones
   ============================================================ */

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

:root {
    --bg: #FAFAF8;
    --bg-warm: #F5F0EB;
    --bg-dark: #1A1915;
    --bg-card: #FFFFFF;

    --text: #1A1915;
    --text-secondary: #6B6560;
    --text-muted: #9B9590;
    --text-on-dark: #F5F0EB;

    --accent: #8B3A2F;
    --accent-hover: #A04535;
    --gold: #C4973C;
    --gold-light: #D4AA55;

    --ribbon-orange: #E87B33;
    --ribbon-black: #1A1A1A;

    --border: #E8E2DC;
    --border-dark: #D0C8C0;
    --radius: 12px;
    --radius-sm: 6px;
    --shadow-sm: 0 1px 3px rgba(0,0,0,0.06);
    --shadow: 0 2px 12px rgba(0,0,0,0.08);
    --shadow-lg: 0 8px 30px rgba(0,0,0,0.12);
    --shadow-xl: 0 20px 60px rgba(0,0,0,0.15);
    --transition: 0.25s ease;
}

html { scroll-behavior: smooth; }

body {
    font-family: 'PT Serif', Georgia, serif;
    background: var(--bg);
    color: var(--text);
    line-height: 1.7;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    -webkit-font-smoothing: antialiased;
}

a { color: var(--accent); text-decoration: none; transition: color var(--transition); }
a:hover { color: var(--accent-hover); }

img { max-width: 100%; height: auto; }

h1, h2, h3, h4 { font-family: 'Playfair Display', Georgia, serif; font-weight: 700; }

/* === NAVBAR === */
.navbar {
    background: rgba(26, 25, 21, 0.95);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    padding: 0 2rem;
    position: sticky;
    top: 0;
    z-index: 1000;
    border-bottom: 1px solid rgba(255,255,255,0.06);
}

.navbar-inner {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 64px;
}

.navbar-brand {
    font-family: 'Playfair Display', serif;
    font-size: 1.2rem;
    font-weight: 700;
    color: #F5F0EB;
    letter-spacing: 0.02em;
}

.navbar-brand:hover { color: var(--gold-light); }

.navbar-links { display: flex; gap: 0.3rem; list-style: none; }

.navbar-links a {
    color: rgba(245, 240, 235, 0.65);
    font-family: 'PT Serif', serif;
    font-size: 0.88rem;
    padding: 0.4rem 0.8rem;
    border-radius: var(--radius-sm);
    transition: all var(--transition);
}

.navbar-links a:hover { color: #fff; background: rgba(255,255,255,0.08); }
.navbar-links a.active { color: #fff; background: rgba(255,255,255,0.1); }

.navbar-burger {
    display: none;
    background: none;
    border: none;
    color: #F5F0EB;
    font-size: 1.5rem;
    cursor: pointer;
}

/* === GEORGE RIBBON === */
.ribbon-bar {
    height: 3px;
    background: repeating-linear-gradient(
        90deg,
        var(--ribbon-orange) 0px, var(--ribbon-orange) 8px,
        var(--ribbon-black) 8px, var(--ribbon-black) 16px
    );
    opacity: 0.5;
}

/* === CONTAINER === */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 2rem;
}

/* === BUTTONS === */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.65rem 1.6rem;
    border-radius: 50px;
    font-family: 'PT Serif', serif;
    font-size: 0.9rem;
    cursor: pointer;
    transition: all var(--transition);
    border: none;
    text-align: center;
    text-decoration: none;
    gap: 0.4rem;
}

.btn-primary {
    background: var(--accent);
    color: #fff;
}
.btn-primary:hover {
    background: var(--accent-hover);
    color: #fff;
    box-shadow: 0 4px 15px rgba(139, 58, 47, 0.3);
    transform: translateY(-1px);
}

.btn-outline {
    background: transparent;
    border: 1.5px solid var(--border-dark);
    color: var(--text);
}
.btn-outline:hover {
    border-color: var(--text);
    background: var(--text);
    color: #fff;
}

.btn-gold {
    background: var(--gold);
    color: #fff;
    font-weight: 600;
}
.btn-gold:hover {
    background: var(--gold-light);
    color: #fff;
    box-shadow: 0 4px 15px rgba(196, 151, 60, 0.35);
    transform: translateY(-1px);
}

.btn-outline-gold {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.65rem 1.6rem;
    border-radius: 50px;
    font-family: 'PT Serif', serif;
    font-size: 0.9rem;
    cursor: pointer;
    transition: all var(--transition);
    text-align: center;
    text-decoration: none;
    background: rgba(255,255,255,0.05);
    border: 1.5px solid rgba(196, 151, 60, 0.4);
    color: var(--gold-light);
}
.btn-outline-gold:hover {
    border-color: var(--gold-light);
    background: rgba(196, 151, 60, 0.15);
    color: var(--gold-light);
}

.btn-sm { padding: 0.35rem 1rem; font-size: 0.82rem; }
.btn-lg { padding: 0.8rem 2.2rem; font-size: 1rem; }

.cta-row {
    display: flex;
    gap: 0.8rem;
    justify-content: center;
    flex-wrap: wrap;
}

/* === HERO / ALBUM COVER === */
.album-cover {
    background: var(--bg-dark);
    text-align: center;
    position: relative;
    overflow: hidden;
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Subtle vignette */
.album-cover::before {
    content: '';
    position: absolute;
    inset: 0;
    background: radial-gradient(ellipse at center, transparent 50%, rgba(0,0,0,0.4) 100%);
    pointer-events: none;
}

.album-cover-star {
    position: absolute;
    top: 3rem;
    left: 50%;
    transform: translateX(-50%);
    font-size: 1.5rem;
    color: var(--gold);
    opacity: 0.35;
    z-index: 2;
}

.album-cover-inner {
    position: relative;
    z-index: 2;
    padding: 4rem 2rem;
    max-width: 700px;
}

.album-cover-fade {
    display: none;
}

.album-cover-frame {
    margin-bottom: 3rem;
}

.album-cover-ornament { display: none; }

.album-years-top {
    font-family: 'Courier Prime', monospace;
    font-size: 0.65rem;
    letter-spacing: 0.4em;
    text-transform: uppercase;
    color: var(--gold);
    opacity: 0.5;
    margin-bottom: 1.5rem;
}

.album-cover h1 {
    font-size: 3.5rem;
    color: #fff;
    line-height: 1.15;
    letter-spacing: -0.01em;
}

.album-divider {
    width: 40px;
    height: 2px;
    background: var(--gold);
    margin: 1.2rem auto;
    opacity: 0.5;
}

.album-cover .years {
    font-family: 'Courier Prime', monospace;
    font-size: 1.1rem;
    color: var(--gold);
    letter-spacing: 0.5em;
    font-weight: 400;
}

.album-cover .subtitle {
    font-family: 'PT Serif', serif;
    font-size: 1.2rem;
    color: rgba(245, 240, 235, 0.7);
    margin-top: 1rem;
    font-weight: 400;
    letter-spacing: 0.02em;
}

.cover-description {
    font-family: 'PT Serif', serif;
    font-size: 0.95rem;
    color: rgba(245, 240, 235, 0.45);
    margin-top: 1rem;
    line-height: 1.8;
    max-width: 480px;
    margin-left: auto;
    margin-right: auto;
}

/* === STATS === */
.stats-row {
    display: flex;
    justify-content: center;
    gap: 3rem;
    margin: 2.5rem 0;
    flex-wrap: wrap;
}

.stat-item { text-align: center; }

.stat-number {
    font-family: 'Playfair Display', serif;
    font-size: 3rem;
    font-weight: 700;
    color: #fff;
    display: block;
    line-height: 1.1;
}

.stat-label {
    font-size: 0.85rem;
    color: rgba(245, 240, 235, 0.45);
    margin-top: 0.2rem;
}

/* === PHOTO CARDS === */
.photo-card {
    background: var(--bg-card);
    border-radius: var(--radius);
    overflow: hidden;
    box-shadow: var(--shadow);
    transition: all var(--transition);
    display: block;
    text-decoration: none;
    color: var(--text);
}

.photo-card:hover {
    transform: translateY(-4px) !important;
    box-shadow: var(--shadow-lg);
    color: var(--text);
}

.photo-card img {
    width: 100%;
    aspect-ratio: 3/4;
    object-fit: cover;
    display: block;
}

.photo-card .card-name {
    font-family: 'PT Serif', serif;
    font-size: 0.88rem;
    font-weight: 600;
    padding: 0.7rem 0.8rem 0.15rem;
    color: var(--text);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.photo-card .card-years {
    font-family: 'Courier Prime', monospace;
    font-size: 0.72rem;
    padding: 0 0.8rem 0.7rem;
    color: var(--text-muted);
}

/* Initials when no photo */
.photo-card-initials {
    width: 100%;
    aspect-ratio: 3/4;
    background: linear-gradient(135deg, var(--bg-warm) 0%, #EDE5DB 100%);
    display: flex;
    align-items: center;
    justify-content: center;
}

.photo-card-initials span {
    font-family: 'Playfair Display', serif;
    font-size: 2rem;
    color: var(--text-muted);
    opacity: 0.5;
    font-weight: 700;
}

.photo-card-placeholder {
    width: 100%;
    aspect-ratio: 3/4;
    background: linear-gradient(135deg, var(--bg-warm) 0%, #EDE5DB 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-muted);
    font-size: 0.85rem;
}

/* Cards grid */
.cards-scatter {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(170px, 1fr));
    gap: 1.2rem;
    padding: 1rem 0;
}

/* No rotation in modern style */
.cards-scatter .photo-card:nth-child(n) { transform: none; }

/* === SECTIONS === */
.section-heroes {
    background: var(--bg);
    padding: 4rem 0;
}

.section-timeline {
    background: var(--bg-warm);
    padding: 4rem 0;
}

.section-features {
    background: var(--bg);
    padding: 3rem 0 4rem;
}

.section-heading {
    display: flex;
    align-items: center;
    gap: 1.5rem;
    justify-content: center;
    margin-bottom: 0.5rem;
}

.section-heading h2 {
    font-size: 2rem;
    color: var(--text);
}

.section-heading-line {
    height: 1px;
    width: 40px;
    background: var(--border-dark);
}

.section-subtitle {
    text-align: center;
    font-size: 0.95rem;
    color: var(--text-muted);
    margin-bottom: 2.5rem;
}

/* === TIMELINE === */
.timeline {
    position: relative;
    max-width: 600px;
    margin: 2rem auto;
    padding: 0 0 0 28px;
}

.timeline::before {
    content: '';
    position: absolute;
    left: 5px;
    top: 8px;
    bottom: 8px;
    width: 1px;
    background: var(--border-dark);
}

.timeline-item {
    position: relative;
    margin-bottom: 1.8rem;
    padding-left: 1.5rem;
}

.timeline-item::before {
    content: '';
    position: absolute;
    left: -24px;
    top: 8px;
    width: 8px;
    height: 8px;
    background: var(--gold);
    border-radius: 50%;
}

.timeline-year {
    font-family: 'Courier Prime', monospace;
    font-weight: 700;
    color: var(--accent);
    font-size: 0.88rem;
}

.timeline-text {
    color: var(--text-secondary);
    font-size: 0.95rem;
    margin-top: 0.1rem;
}

.timeline-item.last::before {
    width: 12px;
    height: 12px;
    left: -26px;
    top: 6px;
    background: var(--accent);
}

.timeline-item.last .timeline-year { font-size: 0.95rem; }
.timeline-item.last .timeline-text { font-weight: 600; color: var(--text); }

/* === FEATURES === */
.features {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 1rem;
}

.feature-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 1.5rem 1.2rem;
    text-align: center;
    transition: all var(--transition);
    text-decoration: none;
    display: block;
    color: var(--text);
}

.feature-card:hover {
    border-color: var(--gold);
    box-shadow: var(--shadow);
    transform: translateY(-2px);
    color: var(--text);
}

.feature-icon { font-size: 1.5rem; margin-bottom: 0.6rem; }

.feature-card h3 {
    font-size: 0.95rem;
    margin-bottom: 0.3rem;
}

.feature-card p {
    color: var(--text-muted);
    font-size: 0.82rem;
    line-height: 1.5;
}

/* === HERO DETAIL === */
.personal-file {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 2.5rem;
    margin: 2rem 0;
    box-shadow: var(--shadow);
}

.file-stamp {
    font-family: 'Courier Prime', monospace;
    font-size: 0.75rem;
    font-weight: 700;
    color: var(--accent);
    text-transform: uppercase;
    letter-spacing: 0.2em;
    display: inline-block;
    border: 1.5px solid var(--accent);
    padding: 0.25rem 0.8rem;
    border-radius: var(--radius-sm);
    opacity: 0.7;
    margin-bottom: 1.5rem;
    transform: none;
}

.hero-detail {
    display: grid;
    grid-template-columns: 280px 1fr;
    gap: 2.5rem;
}

.hero-photo-wrap { position: relative; }

.hero-photo-frame {
    border-radius: var(--radius);
    overflow: hidden;
    box-shadow: var(--shadow);
    display: inline-block;
    background: none;
    padding: 0;
    transform: none;
}

.hero-photo {
    width: 280px;
    aspect-ratio: 3/4;
    object-fit: cover;
    display: block;
    border-radius: var(--radius);
}

.hero-photo-placeholder {
    width: 280px;
    aspect-ratio: 3/4;
    background: linear-gradient(135deg, var(--bg-warm) 0%, #EDE5DB 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-muted);
    font-size: 0.95rem;
    border-radius: var(--radius);
}

.paperclip { display: none; }

.hero-info h1 {
    font-size: 1.8rem;
    margin-bottom: 0.3rem;
}

.hero-info .years {
    font-family: 'Courier Prime', monospace;
    color: var(--text-muted);
    font-size: 0.9rem;
    margin-bottom: 1.5rem;
}

.hero-field { margin-bottom: 1rem; }

.hero-field-label {
    font-family: 'Courier Prime', monospace;
    font-size: 0.7rem;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.1em;
    margin-bottom: 0.15rem;
}

.hero-field-value {
    color: var(--text);
    font-size: 1rem;
}

.hero-field-value a {
    color: var(--accent);
}

/* Biography */
.biography {
    background: var(--bg-warm);
    border-radius: var(--radius);
    padding: 1.5rem;
    margin-top: 1.5rem;
    font-size: 1rem;
    line-height: 1.85;
    color: var(--text-secondary);
    white-space: pre-line;
    font-family: 'PT Serif', serif;
    background-image: none;
}

/* Fellows */
.fellows-section {
    margin-top: 2rem;
    padding-top: 1.5rem;
    border-top: 1px solid var(--border);
}

.fellows-section h3 {
    font-size: 1.1rem;
    margin-bottom: 1rem;
}

.fellows-grid {
    display: flex;
    gap: 0.8rem;
    flex-wrap: wrap;
}

.fellow-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    overflow: hidden;
    width: 90px;
    text-align: center;
    transition: all var(--transition);
    display: block;
    text-decoration: none;
    color: var(--text);
    box-shadow: var(--shadow-sm);
    padding: 0;
}

.fellow-card:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow);
    color: var(--text);
}

.fellow-card img {
    width: 90px;
    height: 90px;
    object-fit: cover;
    display: block;
}

.fellow-card .fellow-placeholder {
    width: 90px;
    height: 90px;
    background: var(--bg-warm);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-muted);
    font-size: 0.65rem;
}

.fellow-card .fellow-name {
    font-size: 0.7rem;
    padding: 0.3rem 0.3rem;
    color: var(--text-secondary);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

/* Hero nav */
.hero-nav {
    display: flex;
    justify-content: space-between;
    margin-top: 2rem;
    padding-top: 1.5rem;
    border-top: 1px solid var(--border);
}

.hero-nav a {
    color: var(--text-secondary);
    font-size: 0.9rem;
}
.hero-nav a:hover { color: var(--accent); }

/* === MEMORY WALL === */
.wall-header {
    text-align: center;
    padding: 2.5rem 0 1.5rem;
}

.wall-header h1 { font-size: 2rem; margin-bottom: 0.3rem; }
.wall-header p { color: var(--text-muted); font-size: 0.95rem; }

.wall-filter {
    display: flex;
    justify-content: center;
    margin-bottom: 1.5rem;
}

.wall-filter input {
    width: 100%;
    max-width: 400px;
    padding: 0.7rem 1.2rem;
    background: var(--bg-card);
    color: var(--text);
    border: 1.5px solid var(--border);
    border-radius: 50px;
    font-family: 'PT Serif', serif;
    font-size: 0.9rem;
    transition: border-color var(--transition);
}

.wall-filter input:focus {
    outline: none;
    border-color: var(--gold);
    box-shadow: 0 0 0 3px rgba(196, 151, 60, 0.1);
}

.wall-filter input::placeholder { color: var(--text-muted); }

.wall-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(170px, 1fr));
    gap: 1.2rem;
}

.wall-count {
    text-align: center;
    font-family: 'Courier Prime', monospace;
    color: var(--text-muted);
    font-size: 0.78rem;
    margin-bottom: 1rem;
}

/* === SEARCH === */
.search-box {
    display: flex;
    gap: 0.5rem;
    max-width: 500px;
    margin: 2rem auto;
}

.search-input {
    flex: 1;
    padding: 0.7rem 1.2rem;
    background: var(--bg-card);
    color: var(--text);
    border: 1.5px solid var(--border);
    border-radius: 50px;
    font-family: 'PT Serif', serif;
    font-size: 0.9rem;
    transition: border-color var(--transition);
}

.search-input:focus {
    outline: none;
    border-color: var(--gold);
    box-shadow: 0 0 0 3px rgba(196, 151, 60, 0.1);
}

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

.search-results {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 1rem;
    margin-top: 2rem;
}

.search-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 1rem;
    display: flex;
    gap: 1rem;
    align-items: center;
    transition: all var(--transition);
}

.search-card:hover {
    border-color: var(--gold);
    box-shadow: var(--shadow);
    transform: translateY(-2px);
    color: var(--text);
}

.search-card-photo {
    width: 52px;
    height: 52px;
    border-radius: var(--radius-sm);
    object-fit: cover;
    flex-shrink: 0;
}

.search-card-info h3 { font-size: 0.92rem; margin-bottom: 0.1rem; color: var(--text); }
.search-card-info p { color: var(--text-muted); font-size: 0.82rem; }

/* === FORM === */
.form-vintage {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 2.5rem;
    box-shadow: var(--shadow);
    max-width: 750px;
    margin: 0 auto;
}

.form-group { margin-bottom: 1.2rem; }

.form-label {
    display: block;
    margin-bottom: 0.35rem;
    font-size: 0.82rem;
    color: var(--text-secondary);
    font-weight: 600;
}

.form-control {
    width: 100%;
    padding: 0.6rem 0.9rem;
    background: var(--bg);
    color: var(--text);
    border: 1.5px solid var(--border);
    border-radius: var(--radius-sm);
    font-family: 'PT Serif', serif;
    font-size: 0.9rem;
    transition: border-color var(--transition);
}

.form-control:focus {
    outline: none;
    border-color: var(--gold);
    box-shadow: 0 0 0 3px rgba(196, 151, 60, 0.08);
    background: #fff;
}

textarea.form-control { min-height: 120px; resize: vertical; }

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
}

.form-hint {
    font-size: 0.75rem;
    color: var(--text-muted);
    margin-top: 0.2rem;
}

.photo-preview-area {
    margin-top: 0.5rem;
    display: flex;
    gap: 0.5rem;
    align-items: center;
}

.photo-preview-img {
    width: 80px;
    height: 80px;
    object-fit: cover;
    border-radius: var(--radius-sm);
    box-shadow: var(--shadow-sm);
    display: none;
}

.fieldset-map {
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 1.2rem;
    margin-bottom: 1.2rem;
    background: var(--bg);
}

.fieldset-map legend {
    font-size: 0.82rem;
    color: var(--text-secondary);
    font-weight: 600;
    padding: 0 0.5rem;
}

.mini-map {
    width: 100%;
    height: 250px;
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    margin-top: 0.5rem;
}

.geocoder-row {
    display: flex;
    gap: 0.5rem;
    margin-top: 0.5rem;
}

.geocoder-row input { flex: 1; }

.btn-find {
    padding: 0.5rem 1rem;
    background: var(--gold);
    color: #fff;
    border: none;
    border-radius: var(--radius-sm);
    font-size: 0.82rem;
    cursor: pointer;
    white-space: nowrap;
    transition: all var(--transition);
}

.btn-find:hover { background: var(--gold-light); }

/* === MAP PAGE === */
.map-layout {
    display: flex;
    height: calc(100vh - 68px);
}

.map-sidebar {
    width: 280px;
    background: var(--bg-card);
    border-right: 1px solid var(--border);
    padding: 1.5rem;
    overflow-y: auto;
    flex-shrink: 0;
}

.map-sidebar h3 {
    font-size: 1rem;
    margin-bottom: 1rem;
}

.filter-group { margin-bottom: 1.2rem; }

.filter-group label {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.88rem;
    color: var(--text-secondary);
    cursor: pointer;
    margin-bottom: 0.3rem;
}

.filter-group input[type="checkbox"] {
    accent-color: var(--gold);
    width: 16px;
    height: 16px;
}

.filter-group input[type="range"] {
    width: 100%;
    accent-color: var(--gold);
    margin-top: 0.3rem;
}

.filter-group input[type="text"] {
    width: 100%;
    padding: 0.45rem 0.7rem;
    background: var(--bg);
    border: 1.5px solid var(--border);
    border-radius: var(--radius-sm);
    font-family: 'PT Serif', serif;
    font-size: 0.85rem;
    color: var(--text);
}

.filter-group input[type="text"]:focus {
    outline: none;
    border-color: var(--gold);
}

.filter-label {
    font-size: 0.72rem;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.08em;
    margin-bottom: 0.4rem;
    display: block;
    font-weight: 600;
}

.range-values {
    display: flex;
    justify-content: space-between;
    font-family: 'Courier Prime', monospace;
    font-size: 0.72rem;
    color: var(--text-muted);
}

.map-area { flex: 1; position: relative; }
#map { width: 100%; height: 100%; }

.map-legend {
    position: absolute;
    bottom: 1.5rem;
    right: 1.5rem;
    background: rgba(255,255,255,0.95);
    backdrop-filter: blur(10px);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 0.8rem 1rem;
    z-index: 100;
    box-shadow: var(--shadow);
}

.map-legend h4 {
    margin-bottom: 0.4rem;
    font-size: 0.72rem;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.08em;
}

.legend-item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 0.2rem;
    font-size: 0.8rem;
    color: var(--text-secondary);
}

.legend-dot { width: 8px; height: 8px; border-radius: 50%; flex-shrink: 0; }
.legend-dot.birth { background: var(--accent); }
.legend-dot.conscription { background: #4A7C9B; }

.map-sidebar-toggle {
    display: none;
    position: absolute;
    top: 0.8rem;
    left: 0.8rem;
    z-index: 200;
    background: rgba(255,255,255,0.95);
    backdrop-filter: blur(10px);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    padding: 0.5rem 0.8rem;
    font-size: 0.82rem;
    color: var(--text);
    cursor: pointer;
    box-shadow: var(--shadow);
}

/* === CONTACT === */
.contact-content {
    max-width: 600px;
    margin: 0 auto;
    text-align: center;
    padding: 2rem 0;
}

.contact-content h1 { margin-bottom: 1.5rem; }
.contact-content p { color: var(--text-secondary); margin-bottom: 1rem; }

/* === FOOTER === */
.footer {
    margin-top: auto;
    background: var(--bg-dark);
    padding: 1.5rem 2rem;
    text-align: center;
    color: rgba(245, 240, 235, 0.4);
    font-size: 0.82rem;
}

/* === ALERTS === */
.alert {
    padding: 0.8rem 1.2rem;
    border-radius: var(--radius-sm);
    margin-bottom: 1rem;
    font-size: 0.88rem;
}

.alert-success {
    background: #F0F8EE;
    border: 1px solid #B5D6A7;
    color: #2E6B1E;
}

.alert-error {
    background: #FEF0EE;
    border: 1px solid #E8A8A0;
    color: var(--accent);
}

/* === PAGE HEADER === */
.page-header {
    text-align: center;
    padding: 2.5rem 0 1rem;
}

.page-header h1 { font-size: 2rem; margin-bottom: 0.3rem; }
.page-header p { color: var(--text-muted); font-size: 0.95rem; }

/* === 404 === */
.not-found {
    text-align: center;
    padding: 4rem 2rem;
    color: var(--text-muted);
}
.not-found h2 { font-size: 1.5rem; margin-bottom: 0.5rem; color: var(--text); }

/* === TABLE === */
.table-wrapper { overflow-x: auto; }

table {
    width: 100%;
    border-collapse: collapse;
    background: var(--bg-card);
    border-radius: var(--radius);
    overflow: hidden;
    box-shadow: var(--shadow);
}

thead { background: var(--bg-warm); }

th {
    padding: 0.8rem 1rem;
    text-align: left;
    color: var(--text-muted);
    font-size: 0.72rem;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    font-weight: 600;
}

td {
    padding: 0.7rem 1rem;
    border-top: 1px solid var(--border);
    font-size: 0.9rem;
}

tr:hover { background: rgba(196, 151, 60, 0.04); }

.table-photo {
    width: 40px;
    height: 40px;
    border-radius: var(--radius-sm);
    object-fit: cover;
}

/* === RESPONSIVE === */
@media (max-width: 768px) {
    .navbar-links { display: none; }
    .navbar-links.open {
        display: flex;
        flex-direction: column;
        position: absolute;
        top: 64px;
        left: 0;
        right: 0;
        background: rgba(26, 25, 21, 0.98);
        backdrop-filter: blur(20px);
        padding: 0.5rem;
        z-index: 999;
    }
    .navbar-burger { display: block; }

    .album-cover { min-height: auto; }
    .album-cover-inner { padding: 5rem 1.5rem 4rem; }
    .album-cover h1 { font-size: 2.2rem; }
    .album-cover .years { font-size: 0.95rem; }
    .album-cover-star { font-size: 1.2rem; top: 1.5rem; }

    .stats-row { gap: 2rem; }
    .stat-number { font-size: 2.2rem; }

    .hero-detail { grid-template-columns: 1fr; }
    .hero-photo, .hero-photo-placeholder { width: 100%; max-width: 280px; }
    .personal-file { padding: 1.5rem; }

    .form-row { grid-template-columns: 1fr; }
    .form-vintage { padding: 1.5rem; }

    .search-results { grid-template-columns: 1fr; }

    .cards-scatter { grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 0.8rem; }
    .wall-grid { grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 0.8rem; }

    .features { grid-template-columns: repeat(2, 1fr); }

    .map-layout { flex-direction: column; }
    .map-sidebar {
        width: 100%;
        max-height: 0;
        overflow: hidden;
        border-right: none;
        border-bottom: 1px solid var(--border);
        transition: max-height 0.3s ease;
    }
    .map-sidebar.open { max-height: 60vh; overflow-y: auto; }
    .map-sidebar-toggle { display: block; }
    .map-area { min-height: 400px; }

    .section-heading-line { width: 20px; }
    .section-heading h2 { font-size: 1.5rem; }
}

@media (max-width: 480px) {
    .container { padding: 1rem; }
    .album-cover h1 { font-size: 1.8rem; }
    .cards-scatter { grid-template-columns: repeat(2, 1fr); }
    .wall-grid { grid-template-columns: repeat(2, 1fr); }
    .features { grid-template-columns: 1fr; }
}

/* ============================================================
   MAGAZINE WALL LAYOUT
   ============================================================ */

.wall-magazine {
    display: grid;
    grid-template-columns: 1fr 1fr;
    grid-template-rows: auto auto;
    gap: 1rem;
    margin-bottom: 2rem;
}

.wall-spotlight {
    grid-column: 1;
    grid-row: 1 / 3;
    border-radius: var(--radius);
    overflow: hidden;
    position: relative;
    text-decoration: none;
    color: #fff;
    display: block;
    min-height: 420px;
}

.wall-spotlight-photo {
    width: 100%;
    height: 100%;
    position: relative;
}

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

.wall-spotlight:hover .wall-spotlight-photo img {
    transform: scale(1.03);
}

.wall-spotlight-star {
    width: 100%;
    height: 100%;
    min-height: 420px;
    background: linear-gradient(135deg, #3a2f28 0%, #2a2520 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 5rem;
    color: var(--gold);
    opacity: 0.3;
}

.wall-spotlight-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: linear-gradient(transparent, rgba(0,0,0,0.85));
    padding: 2rem 1.5rem 1.5rem;
}

.wall-spotlight-name {
    font-family: 'Playfair Display', serif;
    font-size: 1.6rem;
    font-weight: 700;
    line-height: 1.2;
    margin-bottom: 0.3rem;
}

.wall-spotlight-years {
    font-family: 'Courier Prime', monospace;
    font-size: 0.88rem;
    color: var(--gold-light);
    margin-bottom: 0.3rem;
}

.wall-spotlight-rank {
    font-size: 0.85rem;
    color: rgba(255,255,255,0.7);
    margin-bottom: 0.5rem;
}

.wall-spotlight-bio {
    font-size: 0.82rem;
    color: rgba(255,255,255,0.55);
    line-height: 1.5;
    max-height: 3.9em;
    overflow: hidden;
}

/* Side cards in magazine header */
.wall-side-card {
    border-radius: var(--radius);
    overflow: hidden;
    background: var(--bg-card);
    box-shadow: var(--shadow);
    display: flex;
    flex-direction: column;
    text-decoration: none;
    color: var(--text);
    transition: all var(--transition);
}

.wall-side-card:hover {
    transform: translateY(-3px);
    box-shadow: var(--shadow-lg);
    color: var(--text);
}

.wall-side-card img {
    width: 100%;
    aspect-ratio: 4/3;
    object-fit: cover;
    display: block;
    transition: filter 0.3s ease;
}

.wall-side-card:hover img {
    filter: sepia(0.15);
}

.wall-side-info {
    padding: 0.6rem 0.8rem;
}

.wall-side-info .card-name {
    font-family: 'PT Serif', serif;
    font-size: 0.82rem;
    font-weight: 600;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.wall-side-info .card-years {
    font-family: 'Courier Prime', monospace;
    font-size: 0.7rem;
    color: var(--text-muted);
}

/* Grid cards with photos */
.wall-card-photo {
    border-radius: var(--radius);
    overflow: hidden;
    background: var(--bg-card);
    box-shadow: var(--shadow);
    display: block;
    text-decoration: none;
    color: var(--text);
    transition: all var(--transition);
}

.wall-card-photo:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-lg);
    color: var(--text);
}

.wall-card-photo img {
    width: 100%;
    aspect-ratio: 3/4;
    object-fit: cover;
    display: block;
    transition: filter 0.3s ease;
}

.wall-card-photo:hover img {
    filter: sepia(0.2);
}

.wall-card-bottom {
    padding: 0.7rem 0.8rem;
}

.wall-card-bottom .card-name {
    font-family: 'PT Serif', serif;
    font-size: 0.85rem;
    font-weight: 600;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    color: var(--text);
}

.wall-card-bottom .card-years {
    font-family: 'Courier Prime', monospace;
    font-size: 0.7rem;
    color: var(--text-muted);
}

/* Text cards for heroes without photos */
.wall-card-text {
    border-radius: var(--radius);
    overflow: hidden;
    background: linear-gradient(145deg, var(--bg-warm) 0%, #EDE5DB 100%);
    box-shadow: var(--shadow-sm);
    display: block;
    text-decoration: none;
    color: var(--text);
    transition: all var(--transition);
    border: 1px solid var(--border);
}

.wall-card-text:hover {
    transform: translateY(-3px);
    box-shadow: var(--shadow);
    border-color: var(--gold);
    color: var(--text);
}

.wall-card-text-inner {
    width: 100%;
    aspect-ratio: 3/4;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 1rem 0.6rem;
    text-align: center;
}

.wall-card-star {
    font-size: 1.5rem;
    color: var(--gold);
    opacity: 0.4;
    margin-bottom: 0.5rem;
}

.wall-card-text-name {
    font-family: 'Playfair Display', serif;
    font-size: 0.88rem;
    font-weight: 700;
    line-height: 1.3;
    color: var(--text);
    margin-bottom: 0.2rem;
}

.wall-card-text-years {
    font-family: 'Courier Prime', monospace;
    font-size: 0.72rem;
    color: var(--text-muted);
    margin-bottom: 0.2rem;
}

.wall-card-text-rank {
    font-family: 'PT Serif', serif;
    font-size: 0.72rem;
    color: var(--text-secondary);
    font-style: italic;
}

/* Updated wall-grid for mixed card types */
.wall-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
    gap: 1.2rem;
}

/* ============================================================
   HERO DETAIL GALLERY
   ============================================================ */

.hero-thumbnails {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
    margin-top: 0.8rem;
}

.hero-thumb {
    width: 56px;
    height: 56px;
    border-radius: var(--radius-sm);
    overflow: hidden;
    cursor: pointer;
    border: 2px solid transparent;
    transition: all var(--transition);
    opacity: 0.7;
}

.hero-thumb:hover, .hero-thumb.active {
    opacity: 1;
    border-color: var(--gold);
}

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

.hero-gallery {
    margin-top: 2rem;
    padding-top: 1.5rem;
    border-top: 1px solid var(--border);
}

.gallery-category {
    margin-bottom: 1.5rem;
}

.gallery-category-title {
    font-size: 1rem;
    color: var(--text-secondary);
    margin-bottom: 0.8rem;
    font-weight: 600;
}

.gallery-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
    gap: 0.8rem;
}

.gallery-item {
    border-radius: var(--radius-sm);
    overflow: hidden;
    cursor: pointer;
    box-shadow: var(--shadow-sm);
    transition: all var(--transition);
    background: var(--bg-card);
}

.gallery-item:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow);
}

.gallery-item img {
    width: 100%;
    aspect-ratio: 1;
    object-fit: cover;
    display: block;
}

.gallery-caption {
    font-size: 0.72rem;
    color: var(--text-secondary);
    padding: 0.3rem 0.5rem;
    text-align: center;
}

/* ============================================================
   LIGHTBOX
   ============================================================ */

.lightbox {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.92);
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-direction: column;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.25s ease;
}

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

.lightbox-close {
    position: absolute;
    top: 1.5rem;
    right: 1.5rem;
    background: none;
    border: none;
    color: rgba(255,255,255,0.7);
    font-size: 2.5rem;
    cursor: pointer;
    line-height: 1;
    transition: color var(--transition);
    z-index: 10;
}

.lightbox-close:hover { color: #fff; }

.lightbox-img {
    max-width: 90vw;
    max-height: 85vh;
    object-fit: contain;
    border-radius: var(--radius);
    box-shadow: 0 20px 60px rgba(0,0,0,0.5);
}

.lightbox-caption {
    color: rgba(255,255,255,0.75);
    font-size: 0.9rem;
    margin-top: 1rem;
    text-align: center;
    max-width: 600px;
}

/* ============================================================
   MULTI-PHOTO FORM
   ============================================================ */

.photo-entry {
    background: var(--bg-warm);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    padding: 0.8rem;
    margin-bottom: 0.6rem;
}

.photo-entry-row {
    display: flex;
    gap: 0.8rem;
    align-items: flex-start;
}

.photo-entry-preview {
    width: 72px;
    height: 72px;
    flex-shrink: 0;
    border-radius: var(--radius-sm);
    overflow: hidden;
    background: var(--bg-card);
    border: 1px solid var(--border);
}

.photo-entry-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.photo-entry-placeholder {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-muted);
    font-size: 0.7rem;
}

.photo-entry-fields {
    flex: 1;
    min-width: 0;
}

.photo-entry-fields .form-row {
    gap: 0.5rem;
}

.photo-entry-remove {
    background: none;
    border: none;
    color: var(--text-muted);
    font-size: 1.5rem;
    cursor: pointer;
    padding: 0 0.3rem;
    line-height: 1;
    transition: color var(--transition);
    flex-shrink: 0;
}

.photo-entry-remove:hover {
    color: var(--accent);
}

/* ============================================================
   MAGAZINE LAYOUT RESPONSIVE
   ============================================================ */

@media (max-width: 768px) {
    .wall-magazine {
        grid-template-columns: 1fr;
    }
    .wall-spotlight {
        grid-column: 1;
        grid-row: auto;
        min-height: 300px;
    }
    .wall-side-card img {
        aspect-ratio: 16/9;
    }
    .wall-grid {
        grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
        gap: 0.8rem;
    }
    .gallery-grid {
        grid-template-columns: repeat(auto-fill, minmax(100px, 1fr));
    }
    .photo-entry-row {
        flex-wrap: wrap;
    }
}

@media (max-width: 480px) {
    .wall-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 0.6rem;
    }
    .wall-spotlight { min-height: 250px; }
    .wall-spotlight-name { font-size: 1.2rem; }
}
