/* DeSoto County Sheriff's Office Recruiting Website */
/* Global Styles - Base, Navigation, Footer */
/* Colors: #000000 (Black), #989C9C (Gray), #FFFFFF (White), #DEB42A (Gold) */
/* Primary Font: IBM Plex Sans, Secondary: Source Serif 4, Tertiary: Arial */

:root {
    --primary-black: #000000;
    --primary-gray: #989C9C;
    --primary-white: #FFFFFF;
    --secondary-gold: #DEB42A;
    --secondary-green: #365420;
    --secondary-tan: #858876;
    --light-gray: #f5f5f5;
    --dark-gray: #333333;
    --transition: all 0.3s ease;
    --body-font: "IBM Plex Sans", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    --headlines-font: "Source Serif 4", "Times New Roman", serif;
    --headlines2-font: "Source Serif 4", "Times New Roman", serif;
}

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

html {
    scroll-behavior: smooth;
}

body {
    font-family: var(--body-font);
    line-height: 1.5;
    color: var(--primary-black);
    background-color: var(--primary-white);
}

/* ==================== SKIP NAVIGATION ==================== */

.skip-link {
    position: absolute;
    top: -100%;
    left: 1rem;
    z-index: 10000;
    padding: 0.75rem 1.5rem;
    background-color: var(--secondary-gold);
    color: var(--primary-black);
    text-decoration: none;
    font-weight: bold;
    border-radius: 0 0 4px 4px;
    transition: top 0.2s ease;
}

.skip-link:focus {
    top: 0;
    outline: 2px solid var(--primary-black);
    outline-offset: 2px;
}

/* ==================== NAVIGATION ==================== */

.navbar {
    background-color: transparent;
    padding: 0.5rem 0;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    width: 100%;
    z-index: 1000;
    box-shadow: none;
    transition: all 0.3s ease;
}

.navbar.scrolled {
    background-color: rgba(0, 0, 0, 0.95);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
    padding: 0.25rem 0;
}

.nav-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 1rem;
    transition: var(--transition);
}

.navbar.scrolled .nav-container {
    padding: 0.5rem 1rem;
}

.nav-logo {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    transition: var(--transition);
}

.nav-logo .sheriff-name {
    display: block;
    font-size: 1.75rem;
    text-transform: none;
    color: var(--primary-gray);
    font-weight: normal;
    font-style: normal;
    font-variant: small-caps;
    transition: var(--transition);
    text-shadow: 1px 1px 3px rgba(0, 0, 0, 0.5);
}

.navbar.scrolled .nav-logo .sheriff-name {
    font-size: 1.2rem;
}

.nav-logo a {
    display: flex;
    align-items: center;
    gap: 1rem;
    text-decoration: none;
    font-variant: small-caps;
    color: var(--primary-white);
    font-weight: bold;
    font-size: 2.0rem;
    line-height: 2rem;
    transition: var(--transition);
    text-shadow: 1px 1px 3px rgba(0, 0, 0, 0.5);
}

.navbar.scrolled .nav-logo a {
    font-size: 1.3rem;
    line-height: 1.3rem;
}

.nav-logo .logo {
    height: 80px;
    width: auto;
    transition: var(--transition);
}

.navbar.scrolled .nav-logo .logo {
    height: 50px;
}

.nav-menu {
    display: flex;
    list-style: none;
    gap: 2rem;
}

.nav-link {
    color: var(--primary-white);
    margin-top: auto;
    text-decoration: none;
    font-weight: bold;
    transition: var(--transition);
    border-bottom: 3px solid transparent;
    padding-bottom: 0.25rem;
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.5);
}

.nav-link:hover,
.nav-link.active {
    color: var(--secondary-gold);
    border-bottom-color: var(--secondary-gold);
}

.nav-link:focus-visible {
    outline: 2px solid var(--secondary-gold);
    outline-offset: 4px;
}

/* ==================== NAV DROPDOWN ==================== */

.nav-item-dropdown {
    position: relative;
}

.nav-dropdown {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    background-color: rgba(0, 0, 0, 0.98);
    list-style: none;
    padding: 0.5rem 0;
    min-width: 180px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.5);
    z-index: 999;
    border-top: 3px solid var(--secondary-gold);
    margin: 0;
    margin-top: -4px;
}

.nav-item-dropdown:hover .nav-dropdown,
.nav-item-dropdown.active .nav-dropdown {
    display: block;
}

.nav-dropdown-link {
    display: block;
    color: var(--primary-white) !important;
    text-decoration: none !important;
    padding: 0.8rem 1.5rem;
    transition: all 0.3s ease;
    font-weight: bold;
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.5);
    border-bottom: none !important;
    border-left: 3px solid transparent;
}

.nav-dropdown-link:hover {
    background-color: rgba(222, 180, 42, 0.1);
    color: var(--secondary-gold) !important;
    border-bottom: none !important;
    border-left: 3px solid var(--secondary-gold);
    padding-left: 1.5rem;
}

.nav-dropdown-link:focus-visible {
    outline: 2px solid var(--secondary-gold);
    outline-offset: -2px;
}

.hamburger {
    display: none;
    flex-direction: column;
    cursor: pointer;
    gap: 0.4rem;
    background: none;
    border: none;
    padding: 0.5rem;
}

.hamburger:focus-visible {
    outline: 2px solid var(--secondary-gold);
    outline-offset: 4px;
}

.hamburger span {
    width: 25px;
    height: 3px;
    background-color: var(--primary-white);
    transition: var(--transition);
    display: block;
}

@media (max-width: 768px) {
    .nav-menu {
        display: none;
        position: absolute;
        top: 60px;
        left: 0;
        right: 0;
        flex-direction: column;
        background-color: var(--primary-black);
        padding: 2rem;
        gap: 1rem;
    }

    .nav-menu.active {
        display: flex;
    }

    .nav-dropdown {
        position: static;
        display: none;
        background-color: var(--dark-gray);
        box-shadow: none;
        padding: 0.5rem 1rem 0.5rem 2rem;
        margin-top: 0;
        border-top: none;
        border-radius: 0;
        margin: 0;
    }

    .nav-item-dropdown.active .nav-dropdown {
        display: block;
    }

    .nav-dropdown-link {
        padding: 0.5rem 0;
        font-size: 0.9rem;
        border-left: none;
    }

    .nav-dropdown-link:hover {
        border-left: none;
        padding-left: 0;
    }

    .hamburger {
        display: flex;
    }

    .nav-logo .logo {
        height: 60px;
    }

    .nav-logo span {
        display: none;
    }
}

/* ==================== CONTAINER ==================== */

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

/* ==================== FORM STATUS MESSAGES ==================== */

.form-status {
    max-width: 1200px;
    margin: 1rem auto;
    padding: 1rem 1.5rem;
    border-radius: 4px;
    font-weight: bold;
    text-align: center;
}

.form-status.success {
    background-color: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}

.form-status.error {
    background-color: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}

/* ==================== FIELD VALIDATION ERRORS ==================== */

.field-error {
    color: #dc3545;
    font-size: 0.85rem;
    margin-top: 0.25rem;
    min-height: 0;
}

.field-error:not(:empty) {
    min-height: 1.2em;
}

/* ==================== FOOTER ==================== */

.footer {
    background-color: var(--primary-black);
    color: var(--primary-white);
    padding: 3rem 2rem 1rem;
}

.footer-container {
    max-width: 1200px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
    margin-bottom: 2rem;
}

.footer-content h4,
.footer-contact h4 {
    font-size: 1.3rem;
    text-transform: uppercase;
    margin-bottom: 1rem;
    color: var(--secondary-gold);
}

.footer-content p,
.footer-contact p {
    font-size: 0.95rem;
    line-height: 1.6;
    color: var(--primary-gray);
}

.footer-bottom {
    text-align: center;
    padding-top: 1rem;
    border-top: 1px solid var(--primary-gray);
    color: var(--primary-gray);
    font-size: 0.9rem;
}

.footer-bottom p {
    margin: 0.5rem 0;
}

.footer-bottom a {
    color: var(--primary-gray);
    text-decoration: none;
    transition: var(--transition);
}

.footer-bottom a:hover {
    color: var(--secondary-gold);
    text-decoration: underline;
}

.footer-bottom a:focus-visible {
    outline: 2px solid var(--secondary-gold);
    outline-offset: 2px;
}

@media (max-width: 768px) {
    .footer-container {
        grid-template-columns: 1fr;
    }
}

/* ==================== FOCUS-VISIBLE GLOBAL ==================== */

button:focus-visible,
a:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible {
    outline: 2px solid var(--secondary-gold);
    outline-offset: 2px;
}

/* ==================== REDUCED MOTION ==================== */

@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
        scroll-behavior: auto !important;
    }

    .hero-video {
        display: none;
    }
}

/* ==================== PRINT STYLES ==================== */

@media print {
    .navbar,
    .hamburger,
    .footer,
    .skip-link,
    .hero-video,
    .hero-overlay,
    .cta-button,
    .submit-btn,
    .related-positions,
    .contact-positions,
    .application-cta,
    iframe {
        display: none !important;
    }

    body {
        font-size: 11pt;
        color: #000;
        background: #fff;
        line-height: 1.4;
    }

    .page-header {
        background: none !important;
        color: #000 !important;
        padding: 1rem 0 !important;
        min-height: auto !important;
    }

    .page-header::before {
        display: none !important;
    }

    .page-header h1 {
        color: #000 !important;
        font-size: 2rem !important;
    }

    a[href]::after {
        content: " (" attr(href) ")";
        font-size: 0.8em;
        color: #666;
    }

    a[href^="#"]::after,
    a[href^="javascript"]::after {
        content: "";
    }
}

/* ==================== RESPONSIVE ==================== */

@media (max-width: 480px) {
    .nav-container {
        padding: 0 1rem;
    }
}
