/* ===========================
   Shared Styles — styles.css
   =========================== */

/* Reset and base styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Roboto', sans-serif;
    background-color: #0a0a0a;
    color: #e0e0e0;
    line-height: 1.6;
    position: relative;
    overflow-x: hidden;
}

body::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    opacity: 0.075;
    z-index: -1;
    background-image: url('images/favicon.png');
    background-repeat: repeat;
    background-size: 300px 300px;
    pointer-events: none;
}

/* --- Skip to content (accessibility) --- */
.skip-link {
    position: absolute;
    top: -100%;
    left: 0;
    background: #800000;
    color: #fff;
    padding: 0.75rem 1.5rem;
    z-index: 10000;
    font-family: 'Oswald', sans-serif;
    font-size: 1rem;
    text-decoration: none;
    letter-spacing: 1px;
}

.skip-link:focus {
    top: 0;
}

/* --- Focus styles (accessibility) --- */
a:focus-visible,
button:focus-visible,
input:focus-visible,
[tabindex]:focus-visible {
    outline: 2px solid #ff6666;
    outline-offset: 2px;
}

/* ===========================
   Header
   =========================== */
header {
    background-color: #800000;
    color: white;
    padding: 1rem 0;
    text-align: center;
    z-index: 100;
    box-shadow: 0 2px 15px rgba(255,0,0,0.3);
}

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

h1 {
    font-family: 'Oswald', sans-serif;
    font-weight: 700;
    font-size: 2.2rem;
    margin-bottom: 0.3rem;
    text-transform: uppercase;
    letter-spacing: 2px;
    text-shadow: 2px 2px 5px rgba(0,0,0,0.5);
}

.subtitle {
    font-family: 'Playfair Display', serif;
    font-weight: 600;
    font-size: 1.3rem;
    opacity: 0.95;
    margin-bottom: 0.3rem;
    letter-spacing: 0.5px;
    text-shadow: 1px 1px 3px rgba(0,0,0,0.5);
}

.tagline {
    font-family: 'Playfair Display', serif;
    font-style: italic;
    font-weight: 500;
    font-size: 1.1rem;
    color: #ff9999;
    letter-spacing: 0.8px;
    text-shadow: 1px 1px 3px rgba(0,0,0,0.5);
}

/* ===========================
   Navigation
   =========================== */
.navigation {
    background-color: #1a1a1a;
    box-shadow: 0 4px 10px rgba(0,0,0,0.3);
    padding: 1rem 0;
}

.nav-inner {
    display: flex;
    justify-content: center;
    align-items: center;
    position: relative;
}

.nav-links {
    display: flex;
    justify-content: center;
    list-style-type: none;
}

.nav-links li {
    margin: 0 1.5rem;
}

.nav-links a {
    color: #e0e0e0;
    text-decoration: none;
    font-size: 1.1rem;
    font-weight: 500;
    transition: color 0.3s;
    font-family: 'Oswald', sans-serif;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.nav-links a:hover {
    color: #ff6666;
}

/* Hamburger toggle (hidden on desktop) */
.hamburger {
    display: none;
    background: none;
    border: none;
    cursor: pointer;
    padding: 0.5rem;
    position: absolute;
    right: 0;
}

.hamburger span {
    display: block;
    width: 26px;
    height: 3px;
    background-color: #e0e0e0;
    margin: 5px 0;
    border-radius: 2px;
    transition: transform 0.3s, opacity 0.3s;
}

/* ===========================
   Main content
   =========================== */
main {
    padding: 1rem 0;
    position: relative;
}

/* ===========================
   Footer
   =========================== */
footer {
    background-color: #800000;
    color: white;
    text-align: center;
    padding: 2rem 0;
    margin-top: 3rem;
    box-shadow: 0 -5px 15px rgba(0,0,0,0.5);
    font-family: 'Roboto', sans-serif;
}

/* ===========================
   Watermark
   =========================== */
.watermark {
    position: fixed;
    bottom: 50px;
    right: 50px;
    width: 200px;
    height: auto;
    opacity: 0.8;
    pointer-events: none;
    z-index: 9999;
    filter: drop-shadow(0 0 5px rgba(255,0,0,0.5));
}

/* ===========================
   Back-to-top button
   =========================== */
.back-to-top {
    position: fixed;
    bottom: 2rem;
    right: 2rem;
    background-color: #800000;
    color: white;
    width: 3rem;
    height: 3rem;
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    text-decoration: none;
    box-shadow: 0 2px 10px rgba(0,0,0,0.3);
    transition: background-color 0.3s;
    font-size: 1.5rem;
    z-index: 99;
}

.back-to-top:hover {
    background-color: #ff6666;
}

/* ===========================
   Page-specific: index.html (politician cards)
   =========================== */
.search-bar {
    margin-bottom: 1rem;
}

.search-bar input {
    width: 100%;
    padding: 0.75rem 1rem;
    font-size: 1rem;
    font-family: 'Roboto', sans-serif;
    background-color: #1a1a1a;
    color: #e0e0e0;
    border: 1px solid #333;
    border-radius: 8px;
    transition: border-color 0.3s;
}

.search-bar input::placeholder {
    color: #777;
}

.search-bar input:focus {
    border-color: #800000;
    outline: none;
}

.politicians-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 1.5rem;
    margin-top: 0;
    position: relative;
    z-index: 1;
}

.politician-card {
    background-color: #1a1a1a;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 5px 15px rgba(255,0,0,0.2);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    border: 1px solid #333;
}

.politician-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 25px rgba(255,0,0,0.3);
}

.politician-card.hidden {
    display: none;
}

.politician-image {
    width: 100%;
    height: 250px;
    object-fit: cover;
    display: block;
    filter: grayscale(40%) contrast(120%);
    transition: filter 0.3s ease;
    border-bottom: 3px solid #800000;
}

.politician-card:hover .politician-image {
    filter: grayscale(20%) contrast(130%);
}

.politician-info {
    padding: 1.5rem;
    text-align: center;
}

.politician-name {
    font-family: 'Oswald', sans-serif;
    font-weight: 500;
    font-size: 1.25rem;
    margin-bottom: 0.5rem;
    color: #ffffff;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.politician-position {
    font-family: 'Roboto', sans-serif;
    font-weight: 300;
    font-size: 0.9rem;
    color: #aaa;
    margin-bottom: 1rem;
}

.politician-description {
    font-size: 0.85rem;
    color: #ccc;
    text-align: left;
    line-height: 1.4;
    border-top: 1px solid #333;
    padding-top: 1rem;
    margin-top: 1rem;
    display: none;
}

.politician-card.expanded .politician-description {
    display: block;
}

.read-more {
    font-family: 'Oswald', sans-serif;
    display: inline-block;
    margin-top: 0.5rem;
    color: #ff6666;
    font-size: 0.85rem;
    cursor: pointer;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 2px;
    transition: color 0.2s ease;
    background: none;
    border: none;
    padding: 0;
}

.read-more:hover {
    color: #ff0000;
}

.no-results {
    grid-column: 1 / -1;
    text-align: center;
    color: #777;
    font-size: 1.1rem;
    padding: 2rem 0;
}

/* ===========================
   Page-specific: about.html
   =========================== */
.intro-text {
    margin-bottom: 2rem;
    text-align: center;
    max-width: 800px;
    margin-left: auto;
    margin-right: auto;
}

.intro-text h2 {
    font-family: 'Oswald', sans-serif;
    font-size: 2.5rem;
    color: #ff6666;
    margin-bottom: 1rem;
    padding-bottom: 0.5rem;
    border-bottom: 2px solid #333;
}

.section {
    margin-bottom: 2rem;
    padding: 1rem;
    background-color: #1a1a1a;
    border-radius: 8px;
    box-shadow: 0 2px 5px rgba(0,0,0,0.2);
    transition: transform 0.3s, box-shadow 0.3s;
}

.section:hover {
    transform: translateY(-5px);
    box-shadow: 0 5px 15px rgba(255,0,0,0.15);
}

.section h3 {
    font-family: 'Oswald', sans-serif;
    font-size: 1.8rem;
    color: #ffffff;
    margin-bottom: 0.5rem;
    border-bottom: 1px solid #333;
    padding-bottom: 0.5rem;
}

.section p {
    font-size: 1rem;
    line-height: 1.6;
}

.highlight {
    display: inline-block;
    font-size: 0.9rem;
    text-transform: uppercase;
    background-color: #800000;
    color: white;
    padding: 0.2rem 0.5rem;
    border-radius: 4px;
    margin-top: 0.5rem;
}

/* ===========================
   Page-specific: glossary.html
   =========================== */
.glossary-nav {
    background-color: #1a1a1a;
    padding: 1rem;
    border-radius: 8px;
    margin-bottom: 2rem;
    text-align: center;
    box-shadow: 0 3px 10px rgba(0,0,0,0.2);
}

.letter-links {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 0.5rem;
}

.letter-links a {
    display: inline-block;
    width: 2rem;
    height: 2rem;
    line-height: 2rem;
    text-align: center;
    text-decoration: none;
    color: #e0e0e0;
    background-color: #333;
    border-radius: 4px;
    transition: all 0.3s;
    font-weight: bold;
}

.letter-links a:hover {
    background-color: #800000;
    color: white;
}

.glossary-section {
    padding: 1rem 0;
    border-bottom: 1px solid #333;
    margin-bottom: 1rem;
}

.letter-heading {
    font-family: 'Oswald', sans-serif;
    font-size: 2.5rem;
    color: #ff6666;
    margin-bottom: 1rem;
    padding-bottom: 0.5rem;
    border-bottom: 2px solid #333;
}

.term {
    margin-bottom: 1.5rem;
    padding: 1rem;
    background-color: #1a1a1a;
    border-radius: 8px;
    box-shadow: 0 2px 5px rgba(0,0,0,0.2);
    transition: transform 0.3s, box-shadow 0.3s;
}

.term:hover {
    transform: translateY(-5px);
    box-shadow: 0 5px 15px rgba(255,0,0,0.15);
}

.term h3 {
    font-family: 'Oswald', sans-serif;
    font-size: 1.5rem;
    color: #ffffff;
    margin-bottom: 0.5rem;
    border-bottom: 1px solid #333;
    padding-bottom: 0.5rem;
}

.term p {
    font-size: 1rem;
    line-height: 1.6;
}

.term-category {
    display: inline-block;
    font-size: 0.75rem;
    text-transform: uppercase;
    background-color: #800000;
    color: white;
    padding: 0.2rem 0.5rem;
    border-radius: 4px;
    margin-top: 0.5rem;
}

.related-terms {
    margin-top: 1rem;
    font-size: 0.9rem;
}

.related-terms span {
    font-weight: bold;
    color: #ff6666;
}

/* ===========================
   Page-specific: 404.html
   =========================== */
.error-page {
    text-align: center;
    padding: 4rem 2rem;
}

.error-page h2 {
    font-family: 'Oswald', sans-serif;
    font-size: 6rem;
    color: #ff6666;
    margin-bottom: 1rem;
}

.error-page p {
    font-size: 1.2rem;
    margin-bottom: 2rem;
    color: #aaa;
}

.error-page a {
    display: inline-block;
    padding: 0.75rem 2rem;
    background-color: #800000;
    color: white;
    text-decoration: none;
    border-radius: 8px;
    font-family: 'Oswald', sans-serif;
    font-size: 1.1rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    transition: background-color 0.3s;
}

.error-page a:hover {
    background-color: #ff6666;
}

/* ===========================
   Responsive
   =========================== */
@media (max-width: 768px) {
    h1 {
        font-size: 2.5rem;
    }

    .subtitle {
        font-size: 1.8rem;
    }

    .tagline {
        font-size: 1.4rem;
    }

    .politicians-grid {
        grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
        gap: 1.5rem;
    }

    .watermark {
        width: 150px;
        height: auto;
        bottom: 30px;
        right: 30px;
    }

    .section h3 {
        font-size: 1.5rem;
    }

    .term h3 {
        font-size: 1.3rem;
    }

    .letter-links a {
        width: 1.8rem;
        height: 1.8rem;
        line-height: 1.8rem;
        font-size: 0.9rem;
    }

    /* Mobile hamburger menu */
    .hamburger {
        display: block;
    }

    .nav-links {
        display: none;
        flex-direction: column;
        align-items: center;
        width: 100%;
        padding-top: 1rem;
    }

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

    .nav-links li {
        margin: 0.5rem 0;
    }
}

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

    .subtitle {
        font-size: 1.6rem;
    }

    .tagline {
        font-size: 1.2rem;
    }

    .nav-links li {
        margin: 0.5rem 0;
    }

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

    .watermark {
        width: 100px;
        height: auto;
        bottom: 20px;
        right: 20px;
    }

    .letter-links a {
        width: 1.6rem;
        height: 1.6rem;
        line-height: 1.6rem;
        font-size: 0.8rem;
    }
}
