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

/* Body and background */
body {
    font-family: Arial, sans-serif;
    line-height: 1.6;
    color: #01003B;
    background: url('oregon.jpg') no-repeat center center fixed; /* Centered vertically and horizontally */
    background-size: 60% auto; /* Scales background flag width */
    position: relative;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

/* Background dimmer */
.background-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    z-index: 0;
}

/* Oregon flags on sides */
body::before,
body::after {
    content: "";
    position: fixed;
    top: 0;
    bottom: 0;
    width: 15%;
    background: url('oregon-flag.png') no-repeat center center;
    background-size: contain;
    opacity: 0.7;
    z-index: 1;
}
body::before { left: 0; }
body::after { right: 0; }

/* Header */
header {
    text-align: center;
    padding: 2rem 1rem;
    background: #01003B;
    border-bottom: 4px solid #d62027;
}
h2 {
    font-size: 1.8rem;
    color: #d62027;
}

/* Navigation bar */
.main-nav {
    text-align: center;
    background: #d62027;
    padding: 0.8rem;
    border-bottom: 2px solid #01003B;
    position: relative;
    z-index: 3; /* ensures links stay clickable */
}
.main-nav a {
    color: #ffffff;
    text-decoration: none;
    margin: 0 1rem;
    font-weight: bold;
    display: inline-block;
}
.main-nav a:hover {
    text-decoration: underline;
    color: #01003B;
}

/* Main content wrapper */
.content-container {
    max-width: 900px;
    margin: 2rem auto;
    background: rgba(255, 255, 255, 0.95);
    padding: 2rem;
    border-radius: 15px;
    position: relative;
    z-index: 2;
    display: flex;
    flex-direction: column;
    gap: 2rem;
}

/* General section styles */
.candidate-section,
.contact-section,
.vision-section {
    display: flex;
    flex-wrap: wrap;
    gap: 2rem;
    border: 1px solid #d62027;
    padding: 1.5rem;
    border-radius: 15px;
}

.candidate-photo {
    flex: 1;
    min-width: 200px;
    text-align: center;
    display: flex;
    justify-content: center;
}
.candidate-photo img {
    width: 100%;
    max-width: 200px;
    height: auto;
    aspect-ratio: 1 / 1;
    border-radius: 50%;
    border: 5px solid #d62027;
    object-fit: cover;
}

.candidate-info {
    flex: 2;
    min-width: 300px;
}

/* Headings */
h3 {
    color: #01003B;
    margin-bottom: 1rem;
}
h4 {
    color: #d62027;
    margin-top: 1.5rem;
    margin-bottom: 0.8rem;
    font-size: 1.2rem;
}

/* Text content */
p {
    margin-bottom: 1rem;
    line-height: 1.7;
}

/* Lists */
ul {
    margin-left: 1.5rem;
    margin-bottom: 1rem;
}
li {
    margin-bottom: 0.5rem;
    line-height: 1.6rem;
}

/* Links */
a {
    color: #01003B;
    text-decoration: none;
}
a:hover {
    text-decoration: underline;
}

/* Footer */
footer {
    text-align: center;
    padding: 1rem;
    background: #01003B;
    border-top: 4px solid #d62027;
    color: #ffffff;
    line-height: 1.4;
}

/* =============================== */
/* RESPONSIVE DESIGN BREAKPOINTS   */
/* =============================== */

/* Tablets (768px and below) */
@media (max-width: 768px) {
    body::before,
    body::after {
        display: none; /* remove side flags */
    }

    body {
        background-size: 90% auto; /* make background flag slightly larger */
        background-position: center center;
    }

    header {
        padding: 1.5rem 0.5rem;
    }

    h2 {
        font-size: 1.5rem;
    }

    .main-nav a {
        display: inline-block;
        margin: 0.5rem 0.5rem;
    }

    .content-container {
        max-width: 95%;
        margin: 1rem auto;
        padding: 1.5rem;
    }

    .candidate-section,
    .vision-section {
        flex-direction: column;
        align-items: center;
        text-align: center;
    }

    .candidate-photo img {
        max-width: 160px;
        border-width: 4px;
    }
}

/* Mobile phones (480px and below) */
@media (max-width: 480px) {
    body {
        background-size: 100% auto;
        background-position: center center;
    }

    header {
        padding: 1rem;
    }

    h2 {
        font-size: 1.3rem;
    }

    .main-nav {
        padding: 0.5rem;
    }

    .main-nav a {
        display: block;
        margin: 0.3rem 0;
        font-size: 0.95rem;
    }

    .content-container {
        padding: 1rem;
        max-width: 95%;
    }

    .candidate-photo img {
        max-width: 140px;
        border-width: 4px;
    }

    p, li {
        font-size: 0.95rem;
        line-height: 1.5;
    }

    footer {
        font-size: 0.85rem;
        padding: 0.8rem;
    }
}
