:root {
    --matte-black: #121212;
    --chrome-silver: #c0c0c0;
    --blood-red: #8b0000;
    --dark-grey: #222;
}

/* --- GLOBAL STYLES --- */
body {
    background-color: var(--matte-black);
    color: var(--chrome-silver);
    font-family: 'Oswald', sans-serif;
    margin: 0;
    padding: 0;
    text-transform: uppercase;
    line-height: 1.6;
}

/* --- HEADER & BRANDING --- */
header {
    min-height: 250px; 
    padding: 20px;
    /* Increased darkness slightly for better text contrast */
    background: linear-gradient(rgba(0,0,0,0.8), rgba(0,0,0,0.8)), 
                url('https://www.transparenttextures.com/patterns/carbon-fibre.png');
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
    border-bottom: 5px solid var(--blood-red);
}

h1 {
    font-family: 'Pirata One', system-ui;
    font-size: clamp(2.5rem, 8vw, 4.5rem); 
    margin: 0;
    color: #fff;
    text-shadow: 3px 3px 10px #000;
    letter-spacing: 5px;
}

.subtitle {
    font-size: 1.1rem;
    letter-spacing: 3px;
    color: var(--blood-red);
    font-weight: bold;
    margin-top: 5px;
}

/* --- NAVIGATION FIX: ENSURES NO OVERLAP --- */
nav {
    background: #000;
    padding: 15px 0;
    position: sticky;
    top: 0;
    z-index: 9999; /* Keeps nav on top layer */
    text-align: center;
    border-bottom: 2px solid var(--blood-red);
}

nav a {
    color: var(--chrome-silver);
    text-decoration: none;
    margin: 0 12px;
    font-weight: bold;
    font-size: 0.85rem;
    transition: 0.3s;
}

nav a:hover { color: var(--blood-red); }

/* --- CONTAINERS & SPACING --- */
.container {
    max-width: 1100px;
    margin: 40px auto; /* Pushes content down away from nav */
    padding: 0 20px;
    clear: both; /* Prevents floating elements from overlapping */
}

.section-title {
    font-family: 'Pirata One', cursive;
    font-size: 2.2rem;
    text-align: center;
    color: #fff;
    margin: 20px auto 30px auto;
    border-bottom: 2px solid var(--blood-red);
    display: table;
}

/* Standard Crew/Territory Grid */
.grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 20px;
}

/* Standard Page Cards */
.card {
    background: var(--dark-grey);
    padding: 25px;
    border-left: 5px solid var(--blood-red);
    text-align: center;
}

/* --- COMPACT MEMORIAL GRID --- */
.memorial-grid { 
    display: grid; 
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); 
    gap: 30px; 
    margin-top: 40px;
    justify-items: center; 
}

.legend-card { 
    background: #0d0d0d; 
    border: 1px solid #222; 
    padding: 15px; 
    text-align: center; 
    width: 200px; 
    transition: 0.3s;
}

.legend-card:hover { 
    border-color: var(--blood-red); 
    transform: translateY(-5px); 
}

.thumb-frame { 
    width: 100%; 
    aspect-ratio: 1 / 1; 
    overflow: hidden; 
    border-bottom: 2px solid var(--blood-red); 
    margin-bottom: 15px; 
}

.thumb-frame img { 
    width: 100%; 
    height: 100%; 
    object-fit: cover; 
    filter: grayscale(1); 
    transition: 0.5s; 
}

.legend-card:hover img { filter: grayscale(0.2) contrast(1.1); }

.dog-name {
    font-family: 'Pirata One', cursive;
    font-size: 1.8rem;
    color: #fff;
    margin: 5px 0 0 0;
    letter-spacing: 2px;
}

.legend-dates {
    font-family: 'Oswald', sans-serif;
    color: var(--blood-red);
    font-size: 0.85rem;
    font-weight: bold;
    display: block;
    margin-top: 5px;
}

.legend-quote {
    font-family: 'Special Elite', monospace;
    font-size: 0.75rem;
    color: #666;
    line-height: 1.4;
    margin-top: 12px;
    font-style: italic;
    text-transform: none; /* Keeps bios readable */
}

/* --- BUTTONS & FOOTER --- */
.btn {
    background: #000;
    color: #fff;
    padding: 12px 24px;
    text-decoration: none;
    border: 1px solid var(--chrome-silver);
    display: inline-block;
    transition: 0.3s;
    cursor: pointer;
    margin-bottom: 20px;
}

.btn:hover { background: var(--blood-red); border-color: #fff; }

footer { 
    text-align: center; 
    padding: 40px; 
    background: #000; 
    color: #555; 
    font-size: 0.7rem; 
    margin-top: 50px; 
}