/* ============================================
   MEMORIAL SITE STYLES
   Dark theme with green and red accents
   Minimal, accessible, respectful design
   ============================================ */

/* Color Variables */
:root {
    --dark: #0a0a0a;
    --darker: #050505;
    --card: #111111;
    --border: #1a1a1a;
    --border-light: #2a2a2a;
    --green: #5a8f6b;
    --green-glow: rgba(90, 143, 107, 0.1);
    --red: #9a5a5a;
    --red-glow: rgba(154, 90, 90, 0.1);
    --white: #ffffff;
    --gray-100: #f5f5f5;
    --gray-300: #d4d4d4;
    --gray-500: #737373;
    --gray-700: #404040;
}

/* Reset & Base */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Inter', sans-serif;
    line-height: 1.6;
    color: var(--white);
    background: var(--darker);
    overflow-x: hidden;
    position: relative;
}

body::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: 
        radial-gradient(circle at 20% 50%, var(--green-glow) 0%, transparent 50%),
        radial-gradient(circle at 80% 50%, var(--red-glow) 0%, transparent 50%);
    pointer-events: none;
    z-index: 0;
}

/* Content Wrapper */
.content-wrapper {
    position: relative;
    z-index: 1;
}

/* Typography */
h1 {
    font-size: clamp(2rem, 8vw, 5rem);
    font-weight: 700;
    letter-spacing: -0.03em;
    margin: 2rem 0 1rem 0;
    line-height: 1.1;
    background: linear-gradient(180deg, var(--white) 0%, var(--gray-300) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

h2 {
    font-size: clamp(1.5rem, 5vw, 2rem);
    font-weight: 600;
    margin: 2rem 0 1rem 0;
    line-height: 1.3;
    color: var(--white);
}

h3 {
    font-size: 1.25rem;
    font-weight: 600;
    margin: 1.5rem 0 0.5rem 0;
    color: var(--white);
}

p {
    margin: 1rem 0;
    max-width: 70ch;
    color: var(--gray-300);
}

a {
    color: var(--green);
    text-decoration: underline;
    text-decoration-thickness: 1.5px;
    text-underline-offset: 0.25em;
    transition: opacity 0.2s ease;
}

a:hover {
    opacity: 0.8;
}

a:focus-visible {
    outline: 2px solid var(--green);
    outline-offset: 0.25rem;
}

ul {
    margin: 1rem 0;
    padding-left: 1.5em;
}

li {
    margin: 0.5rem 0;
}

/* Layout */
header {
    border-bottom: 1px solid var(--border-light);
    padding: 2rem 1rem;
    max-width: 90rem;
    margin: 0 auto;
    position: relative;
    z-index: 1;
}

main {
    max-width: 90rem;
    margin: 0 auto;
    padding: 2rem 1rem;
    position: relative;
    z-index: 1;
}

footer {
    border-top: 1px solid var(--border);
    padding: 3rem 1.5rem;
    text-align: center;
    color: var(--gray-700);
    font-size: 0.875rem;
    margin-top: 4rem;
    position: relative;
    z-index: 1;
}

footer p {
    margin-bottom: 0.5rem;
}

/* Sections */
.content {
    margin: 2rem 0;
    padding: 0;
}

.content h2:first-child {
    margin-top: 0;
}

ul {
    margin: 1rem 0;
    padding-left: 1.5em;
    color: var(--gray-300);
}

li {
    margin: 0.5rem 0;
}

/* Dedication & Statement Boxes */
.dedication {
    max-width: 800px;
    margin: 0 auto 4rem;
    padding: 0 1.5rem;
}

.dedication-box {
    background: var(--card);
    border: 1px solid var(--border);
    border-left: 3px solid var(--green);
    border-radius: 12px;
    padding: 2.5rem;
}

.dedication-box p {
    font-size: 1.125rem;
    line-height: 1.8;
    color: var(--gray-300);
    margin-bottom: 1.5rem;
}

.dedication-box p:last-child {
    margin-bottom: 0;
    font-weight: 500;
    color: var(--white);
}

.statement {
    max-width: 900px;
    margin: 0 auto 5rem;
    padding: 0 1.5rem;
}

.statement-box {
    background: linear-gradient(135deg, var(--card) 0%, var(--darker) 100%);
    border: 1px solid var(--border-light);
    border-radius: 16px;
    padding: 3rem 2.5rem;
    position: relative;
    overflow: hidden;
}

.statement-box::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 1px;
    background: linear-gradient(90deg, transparent, var(--green), transparent);
}

.statement-box h2 {
    font-size: 2rem;
    margin-bottom: 1.5rem;
    color: var(--white);
    font-weight: 700;
}

.statement-box p {
    font-size: 1.125rem;
    line-height: 1.9;
    color: var(--gray-300);
}

/* Hero Section */
.hero {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    padding: 3rem 1.5rem;
    position: relative;
}

.hero::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 1px;
    background: linear-gradient(90deg, transparent, var(--border-light), transparent);
}

.subtitle {
    font-size: clamp(1.25rem, 4vw, 2rem);
    color: var(--green);
    text-align: center;
    margin-bottom: 1rem;
    font-weight: 600;
    text-shadow: 0 0 20px var(--green-glow);
}

.date-context {
    font-size: clamp(0.875rem, 2vw, 1rem);
    color: var(--gray-500);
    text-align: center;
    margin-bottom: 3rem;
    font-style: italic;
}

.flag-symbol {
    height: 80px;
    margin-bottom: 2rem;
    position: relative;
}

.flag-symbol img {
    height: 100%;
    display: block;
}
.stats-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1.5rem;
    max-width: 1000px;
    margin: 0 auto 4rem;
}

.stat-card {
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 2rem 1.5rem;
    text-align: center;
    position: relative;
    overflow: hidden;
}

.stat-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 2px;
    background: var(--red);
    box-shadow: 0 0 10px var(--red);
}

.stat-number {
    font-size: 2.5rem;
    font-weight: 800;
    color: var(--red);
    margin-bottom: 0.5rem;
    text-shadow: 0 0 15px var(--red-glow);
}

.stat-label {
    font-size: 0.875rem;
    color: var(--gray-500);
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.scroll-hint {
    position: absolute;
    bottom: 2rem;
    left: 50%;
    transform: translateX(-50%);
    animation: bounce 2.5s infinite;
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes bounce {
    0%, 20%, 50%, 80%, 100% {
        transform: translate(-50%, 0);
    }
    40% {
        transform: translate(-50%, -12px);
    }
    60% {
        transform: translate(-50%, -6px);
    }
}

.scroll-hint svg {
    width: 28px;
    height: 28px;
    color: var(--gray-700);
}

.nav-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 2rem;
    max-width: 1100px;
    margin: 0 auto;
}

.nav-card {
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: 16px;
    padding: 2.5rem 2rem;
    text-decoration: none;
    color: var(--white);
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
}

.nav-card::before {
    content: '';
    position: absolute;
    inset: -100%;
    background: radial-gradient(circle, var(--green-glow) 0%, transparent 70%);
    opacity: 0;
    transition: opacity 0.4s ease;
}

.nav-card:hover {
    transform: translateY(-8px);
    border-color: var(--green);
    box-shadow: 0 12px 40px rgba(22, 163, 74, 0.25);
}

.nav-card:hover::before {
    opacity: 1;
}

.nav-icon {
    width: 56px;
    height: 56px;
    margin-bottom: 1.5rem;
    color: var(--green);
    position: relative;
    z-index: 1;
    transition: transform 0.3s ease;
}

.nav-card:hover .nav-icon {
    transform: scale(1.1);
}

.nav-card h3 {
    font-size: 1.5rem;
    margin-bottom: 0.75rem;
    position: relative;
    z-index: 1;
    font-weight: 600;
}

.nav-card p {
    color: var(--gray-500);
    font-size: 1rem;
    line-height: 1.7;
    position: relative;
    z-index: 1;
}

/* Names Page */
.search-section {
    margin: 2rem 0 3rem 0;
    display: flex;
    gap: 1rem;
    flex-direction: column;
}

#search-box {
    padding: 0.75rem 1rem;
    font-size: 1rem;
    border: 1px solid var(--border);
    border-radius: 0.25rem;
    font-family: inherit;
    background: var(--card);
    color: var(--white);
    max-width: 30rem;
    transition: border-color 0.2s ease;
}

#search-box:focus {
    outline: none;
    border-color: var(--green);
    box-shadow: 0 0 10px var(--green-glow);
}

#search-box::placeholder {
    color: var(--gray-500);
}

.search-count {
    font-size: 0.9rem;
    color: var(--gray-500);
}

.names-list {
    display: grid;
    gap: 1.5rem;
    margin: 2rem 0;
}

.name-entry {
    padding: 1.5rem;
    border-left: 3px solid var(--green);
    background: var(--card);
    border: 1px solid var(--border);
    border-left: 3px solid var(--green);
    border-radius: 0.25rem;
    transition: all 0.2s ease;
}

.name-entry:hover {
    background-color: rgba(22, 163, 74, 0.05);
    border-color: var(--green);
}

.name-entry-content {
    display: flex;
    gap: 1.5rem;
    align-items: flex-start;
}

.victim-photo {
    flex-shrink: 0;
    width: 120px;
    height: 150px;
    border: 1px solid var(--border);
    object-fit: cover;
    border-radius: 0.25rem;
    display: block;
}

.name-entry-text {
    flex: 1;
    min-width: 0;
}

.name-entry h3 {
    margin: 0 0 0.75rem 0;
    color: var(--white);
}

.entry-detail {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
    font-size: 0.95rem;
    color: var(--gray-500);
    margin: 0.5rem 0;
}

.entry-detail strong {
    min-width: 6rem;
    color: var(--green);
}

.entry-detail time {
    color: var(--gray-300);
}

.no-results {
    text-align: center;
    color: var(--gray-500);
    padding: 2rem;
    font-style: italic;
}

/* Sources & About */
.sources-list {
    margin: 2rem 0;
    display: grid;
    gap: 1.5rem;
    border-radius: 0.25rem;
    background: var(--card);
}

.source-item h3 {
    margin: 0 0 0.5rem 0;
    color: var(--white);
}

.source-item p {
    margin: 0.25rem 0;
    font-size: 0.95rem;
    color: var(--gray-300);
}

.source-item a {
    color: var(--green);
}

.note {
    padding: 1rem;
    border-left: 3px solid var(--green);
    background: var(--card);
    border: 1px solid var(--border);
    border-left: 3px solid var(--green);
    color: var(--gray-300);
    margin: 2rem 0;
    border-radius: 0.25rem;
    padding: 1rem;
    border-left: 3px solid #999;
    background-color: #f5f5f5;
    color: #555;
    margin: 2rem 0;
}

/* Back links */
header p {
    margin: 0.5rem 0 0 0;
}

/* Responsive Design */
@media (max-width: 1024px) {
    .stats-grid {
        grid-template-columns: repeat(3, 1fr);
    }

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

@media (max-width: 768px) {
    h1 {
        font-size: 2rem;
    }

    h2 {
        font-size: 1.5rem;
    }

    main {
        padding: 1.5rem 1rem;
    }

    header {
        padding: 1.5rem 1rem;
    }

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

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

    #search-box {
        max-width: 100%;
    }

    .entry-detail {
        flex-direction: column;
        gap: 0.25rem;
    }

    .entry-detail strong {
        min-width: auto;
    }

    .name-entry-content {
        flex-direction: column;
        align-items: center;
    }

    .victim-photo {
        width: 100px;
        height: 130px;
    }

    .name-entry-text {
        text-align: center;
    }

    .dedication-box,
    .statement-box {
        padding: 2rem 1.5rem;
    }

    .flag-symbol {
        height: 70px;
        margin-bottom: 1.5rem;
    }
}

@media (max-width: 480px) {
    h1 {
        font-size: 1.5rem;
    }

    h2 {
        font-size: 1.25rem;
    }

    main {
        padding: 1rem;
    }

    header {
        padding: 1rem;
    }

    .name-entry {
        padding: 1rem;
    }

    .stats-grid {
        grid-template-columns: 1fr;
        gap: 0.75rem;
    }

    .flag-symbol {
        height: 60px;
        margin-bottom: 1rem;
    }
}

/* Accessibility */
@media (prefers-reduced-motion: reduce) {
    * {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}

@media (prefers-contrast: more) {
    body {
        color: var(--white);
    }

    a {
        text-decoration: underline;
        text-decoration-thickness: 2px;
    }
}
