/* --- GLOBAL STYLES --- */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Montserrat', sans-serif;
    background-color: #1a1a1a;
    color: #fff;
    line-height: 1.6;
    overflow-x: hidden;
}

/* --- NAVIGATION (COMPACT) --- */
.navbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 5%;
    background: rgba(0, 0, 0, 0.95);
    position: sticky;
    top: 0;
    z-index: 1000;
    border-bottom: 1px solid #333;
}

.logo {
    font-family: 'Oswald', sans-serif;
    font-size: 1.5rem;
    font-weight: bold;
    letter-spacing: 1px;
}

.logo span {
    color: #eb9971; /* Sunset Orange */
    margin-left: 5px;
}

.nav-links {
    list-style: none;
    display: flex;
    align-items: center;
}

.nav-links li {
    margin-left: 15px;
}

.nav-links a {
    text-decoration: none;
    color: #fff;
    font-weight: 700;
    font-size: 0.8rem;
    text-transform: uppercase;
    transition: 0.3s;
    white-space: nowrap;
}

.nav-links a:hover {
    color: #eb9971;
}

/* --- HERO SECTION (UPDATED FOR ROXWOOD) --- */
.hero {
    height: 80vh;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 0 20px;
    position: relative;
    
    /* Default Image (Fallback) pointing to local file */
    background-image: linear-gradient(rgba(0,0,0,0.7), rgba(0,0,0,0.7)), 
                      url('images/roxwood1.png');
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    transition: background-image 0.5s ease-in-out; /* Smooth transition for the JS randomizer */
}

/* Ensures content stacks vertically and centers correctly */
.hero-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    width: 100%;
    max-width: 900px;
    z-index: 2;
}

.hero h1 {
    font-size: clamp(2.5rem, 8vw, 4.5rem);
    text-transform: uppercase;
    margin-bottom: 15px;
    font-family: 'Oswald', sans-serif;
    letter-spacing: 3px;
    line-height: 1.1;
}

.hero p {
    font-size: 1.2rem;
    max-width: 700px;
    margin: 0 auto 30px;
    color: #ccc;
}

/* --- HERO LOGO --- */
.hero-logo {
    max-width: 360px; /* Specific requested size */
    width: 100%;
    height: auto;
    margin-bottom: 20px;
    filter: drop-shadow(0 5px 15px rgba(0,0,0,0.5));
    animation: fadeIn 1.5s ease-out;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

/* --- BUTTONS & UNIVERSAL ACTIONS --- */
.btn-primary, .btn-secondary, .btn-dept {
    display: inline-block;
    padding: 14px 35px;
    margin: 10px;
    text-decoration: none;
    border-radius: 5px;
    font-weight: bold;
    text-transform: uppercase;
    letter-spacing: 1px;
    transition: 0.3s ease;
    cursor: pointer;
    border: none;
}

.btn-primary {
    background: #eb9971;
    color: #111;
}

.btn-primary:hover {
    background: #d48560;
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(235, 153, 113, 0.3);
}

.btn-secondary {
    background: transparent;
    border: 2px solid #fff;
    color: #fff;
}

.btn-secondary:hover {
    background: #fff;
    color: #111;
}

/* --- FEATURES SECTION --- */
.features {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 30px;
    padding: 80px 10%;
    background: #1a1a1a;
}

.feature-card {
    background: #262626;
    padding: 40px;
    border-radius: 12px;
    text-align: center;
    transition: 0.3s;
}

.feature-card .icon {
    font-size: 2.5rem;
    margin-bottom: 15px;
}

.feature-card:hover {
    border-bottom: 4px solid #eb9971;
    background: #3a3a3a;
    transform: translateY(-5px);
}

/* --- DEPARTMENTS SECTION --- */
.dept-hero {
    padding: 120px 20px;
    text-align: center;
    background: linear-gradient(rgba(26, 26, 26, 0.85), rgba(26, 26, 26, 0.85)), 
                url('https://images.unsplash.com/photo-1508349177119-83c02a71f2aa?q=80&w=2000');
    background-size: cover;
    background-position: center;
}

.dept-container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 30px;
    padding: 80px 10%;
}

.dept-card {
    background: #262626;
    padding: 40px 30px;
    border-radius: 15px;
    position: relative;
    border: 1px solid #333;
    transition: 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.dept-card:hover {
    transform: scale(1.03);
    border-color: #eb9971;
}

.dept-badge {
    position: absolute;
    top: 20px;
    right: 20px;
    padding: 5px 15px;
    border-radius: 20px;
    font-size: 0.7rem;
    font-weight: 800;
    text-transform: uppercase;
}

.hiring { background: #eb9971; color: #111; }
.limited { background: #ffcc00; color: #111; }
.closed { background: #ff4444; color: #fff; }
.open { background: #00aaff; color: #fff; }

.dept-actions {
    display: flex;
    gap: 10px;
    margin-top: 20px;
}

.btn-dept-primary, .btn-dept-secondary, .btn-dept-disabled {
    flex: 1;
    text-align: center;
    padding: 10px;
    border-radius: 5px;
    font-weight: bold;
    text-decoration: none;
    text-transform: uppercase;
    font-size: 0.8rem;
    transition: 0.3s;
    border: none;
}

.btn-dept-primary { background: #eb9971; color: #111; }
.btn-dept-secondary { background: #333; color: #fff; border: 1px solid #444; }
.btn-dept-disabled { background: #222; color: #555; cursor: not-allowed; border: 1px solid #333; }

.dept-closed { opacity: 0.7; filter: grayscale(0.5); }
.civ-card { border: 1px solid #00aaff !important; background: linear-gradient(145deg, #262626, #1a1a1a); }
.civ-note { font-size: 0.8rem; margin-top: 15px; color: #00aaff; font-style: italic; }

/* --- DISCORD COMMUNITY SECTION --- */
.discord-cta {
    padding: 80px 10%;
    background: linear-gradient(45deg, #1a1a1a, #2c2f33);
    text-align: center;
    border-top: 2px solid #5865F2;
}

.discord-content h2 {
    font-family: 'Oswald', sans-serif;
    font-size: 2.5rem;
    margin-bottom: 20px;
    text-transform: uppercase;
}

.discord-content p {
    margin-bottom: 40px;
    color: #ccc;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
}

.discord-content iframe {
    border-radius: 15px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.5);
    max-width: 100%;
}

/* --- DOCUMENT PORTAL --- */
.doc-header {
    padding: 60px 20px;
    text-align: center;
    background: #222;
    border-bottom: 2px solid #eb9971;
}

.container { padding: 40px 10%; }

.doc-grid { display: grid; grid-template-columns: 1fr; gap: 20px; }

.doc-card {
    background: #262626;
    padding: 20px;
    border-radius: 8px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    transition: 0.3s;
}

.doc-info { display: flex; align-items: center; }
.doc-icon { font-size: 2rem; margin-right: 20px; background: #1a1a1a; padding: 15px; border-radius: 8px; }

.btn-view {
    text-decoration: none;
    color: #eb9971;
    font-weight: bold;
    border: 1px solid #eb9971;
    padding: 10px 20px;
    border-radius: 5px;
    transition: 0.3s;
    background: transparent;
}

.btn-view:hover { background: #eb9971; color: #111; }

/* --- PENAL CODE STYLES --- */
.pc-controls { margin-bottom: 30px; text-align: center; }
#pcSearch {
    width: 100%;
    max-width: 600px;
    padding: 15px;
    background: #111;
    border: 1px solid #444;
    border-radius: 5px;
    color: #fff;
    outline: none;
}

#pcSearch:focus { border-color: #eb9971; }

.pc-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(350px, 1fr)); gap: 20px; }

.pc-category-section { margin-bottom: 60px; }

.category-title {
    font-family: 'Oswald', sans-serif;
    color: #eb9971;
    border-bottom: 2px solid #333;
    padding-bottom: 10px;
    margin-bottom: 25px;
    text-transform: uppercase;
    letter-spacing: 2px;
}

.pc-card {
    background: #262626;
    padding: 25px;
    border-radius: 10px;
    border-left: 4px solid #eb9971;
    transition: 0.3s;
    text-align: left;
}

.pc-card:hover {
    background: #2d2d2d;
    transform: translateY(-3px);
}

.pc-card.felony-border { border-left: 4px solid #ff4444; }
.pc-card.misdemeanor-border { border-left: 4px solid #ffcc00; }
.pc-card.infraction-border { border-left: 4px solid #00aaff; }

.class-felony { color: #ff4444; font-weight: bold; }
.class-misdemeanor { color: #ffcc00; font-weight: bold; }
.class-infraction { color: #00aaff; font-weight: bold; }

.pc-meta { display: flex; justify-content: space-between; margin-bottom: 10px; }
.pc-id { color: #eb9971; font-weight: bold; font-family: 'Oswald', sans-serif; }
.pc-class { font-size: 0.7rem; text-transform: uppercase; background: #333; padding: 2px 8px; border-radius: 3px; }
.pc-desc { font-size: 0.9rem; color: #ccc; margin-bottom: 15px; }
.pc-footer { display: flex; justify-content: space-between; font-size: 0.85rem; border-top: 1px solid #333; padding-top: 10px; color: #eb9971; }

/* --- FOOTER & ADMIN --- */
footer {
    text-align: center;
    padding: 60px 20px;
    background: #111;
    font-size: 0.9rem;
    color: #666;
    border-top: 1px solid #222;
}

.admin-trigger {
    cursor: pointer;
    opacity: 0.1;
    margin-left: 8px;
    transition: 0.3s ease;
    display: inline-block;
    vertical-align: middle;
}

.admin-trigger:hover { opacity: 1; color: #eb9971; }

/* --- RESPONSIVE --- */
@media (max-width: 768px) {
    .nav-links { display: none; }
    .hero h1 { font-size: 2.8rem; }
    .pc-grid { grid-template-columns: 1fr; }
}

/* --- SERVER STATUS BANNER --- */
.server-status-box {
    display: inline-flex;
    align-items: center;
    background: rgba(0, 0, 0, 0.6);
    border: 1px solid #4caf50; /* Green Border */
    padding: 8px 20px;
    border-radius: 50px;
    margin-bottom: 25px;
    font-family: 'Oswald', sans-serif;
    font-size: 0.9rem;
    letter-spacing: 1px;
    color: #fff;
    backdrop-filter: blur(5px);
    text-transform: uppercase;
}

.status-dot {
    height: 10px;
    width: 10px;
    background-color: #4caf50; /* Green Dot */
    border-radius: 50%;
    display: inline-block;
    margin-right: 12px;
    box-shadow: 0 0 10px #4caf50;
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0% { box-shadow: 0 0 0 0 rgba(76, 175, 80, 0.7); }
    70% { box-shadow: 0 0 0 10px rgba(76, 175, 80, 0); }
    100% { box-shadow: 0 0 0 0 rgba(76, 175, 80, 0); }
}

/* --- FORMS & APPLICATIONS --- */
.form-container {
    max-width: 800px;
    margin: 50px auto;
    background: #262626;
    padding: 40px;
    border-radius: 15px;
    border: 1px solid #333;
    box-shadow: 0 10px 30px rgba(0,0,0,0.5);
}

.form-group { margin-bottom: 25px; }

label {
    display: block;
    margin-bottom: 10px;
    font-weight: bold;
    color: #eb9971;
    font-family: 'Oswald', sans-serif;
    letter-spacing: 1px;
}

input, textarea, select {
    width: 100%;
    padding: 15px;
    background: #1a1a1a;
    border: 1px solid #444;
    color: #fff;
    border-radius: 5px;
    font-family: 'Montserrat', sans-serif;
    font-size: 1rem;
    outline: none;
}

input:focus, textarea:focus, select:focus { border-color: #eb9971; }
textarea { height: 120px; resize: vertical; }

.dept-selection-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
    margin-bottom: 30px;
}

.dept-btn {
    background: #1a1a1a;
    border: 2px solid #333;
    padding: 30px 10px;
    border-radius: 10px;
    color: #fff;
    font-family: 'Oswald', sans-serif;
    font-size: 1.5rem;
    cursor: pointer;
    transition: 0.3s;
    text-transform: uppercase;
}

.dept-btn:hover {
    border-color: #eb9971;
    background: #2a2a2a;
    transform: translateY(-5px);
}

#applicationFormSection { display: none; }

.selected-badge {
    background: #eb9971;
    color: #000;
    padding: 5px 15px;
    border-radius: 5px;
    font-weight: bold;
    display: inline-block;
    margin-bottom: 20px;
    font-family: 'Oswald', sans-serif;
}

.checkbox-group {
    display: flex;
    align-items: center;
    gap: 15px;
    background: #1a1a1a;
    padding: 15px;
    border-radius: 5px;
    border: 1px solid #444;
}

.checkbox-group input[type="checkbox"] {
    width: 20px;
    height: 20px;
    margin: 0;
    accent-color: #eb9971;
}

.checkbox-group label {
    margin: 0;
    color: #ccc;
    font-family: 'Montserrat', sans-serif;
    font-size: 0.9rem;
    text-transform: none;
    letter-spacing: 0;
}

.success-message {
    text-align: center;
    color: #4caf50;
    display: none;
    padding: 20px;
    border: 1px solid #4caf50;
    border-radius: 5px;
    background: rgba(76, 175, 80, 0.1);
}