/* ==========================================================================
   TEXAS POLICE DEPARTMENT - OFFICIAL PORTAL
   Theme: Dark Grunge & Metallic Gold
   ========================================================================== */

:root {
    /* Color Palette */
    --gold-primary: #D4AF37;
    --gold-light: #F3E5AB;
    --gold-dark: #AA8C2C;
    --bg-dark: #0a0a0a;
    --bg-panel: rgba(20, 20, 20, 0.85);
    --bg-panel-light: rgba(35, 35, 35, 0.9);
    --border-gold: rgba(212, 175, 55, 0.3);
    --text-main: #e0e0e0;
    --text-muted: #888;
    --danger: #ef4444;
    --success: #10b981;
    
    /* Fonts */
    --font-ar: 'Cairo', sans-serif;
    --font-en: 'Outfit', sans-serif;
}

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

body {
    background-color: var(--bg-dark);
    color: var(--text-main);
    font-family: var(--font-ar);
    line-height: 1.6;
    overflow-x: hidden;
}

/* ==========================================================================
   BACKGROUND & TEXTURES
   ========================================================================== */
.grunge-overlay {
    position: fixed;
    top: 0; left: 0; width: 100%; height: 100%;
    /* Subtle noise/grunge texture simulated via radial gradients */
    background-image: 
        radial-gradient(circle at 15% 50%, rgba(255,255,255,0.015) 1%, transparent 2%),
        radial-gradient(circle at 85% 30%, rgba(255,255,255,0.02) 1%, transparent 3%);
    background-size: 100px 100px;
    pointer-events: none;
    z-index: -2;
}

.gold-ambient-glow {
    position: fixed;
    top: -20vh;
    left: 50%;
    transform: translateX(-50%);
    width: 60vw;
    height: 40vh;
    background: radial-gradient(ellipse at center, rgba(212, 175, 55, 0.08) 0%, transparent 70%);
    pointer-events: none;
    z-index: -1;
}

/* ==========================================================================
   TYPOGRAPHY & UTILITIES
   ========================================================================== */
h1, h2, h3, h4, h5, h6 {
    font-weight: 800;
}

.gold-text {
    color: var(--gold-primary);
    text-shadow: 0 0 10px rgba(212, 175, 55, 0.3);
}

.gold-icon {
    color: var(--gold-primary);
    font-size: 1.5rem;
    filter: drop-shadow(0 0 8px rgba(212, 175, 55, 0.4));
}

.huge-gold-icon {
    color: var(--gold-primary);
    font-size: 4rem;
    margin-bottom: 20px;
    filter: drop-shadow(0 0 15px rgba(212, 175, 55, 0.5));
}

/* ==========================================================================
   NAVIGATION BAR
   ========================================================================== */
.texas-navbar {
    position: sticky;
    top: 0;
    width: 100%;
    background: rgba(10, 10, 10, 0.95);
    border-bottom: 1px solid var(--border-gold);
    box-shadow: 0 4px 30px rgba(0, 0, 0, 0.5);
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 10px 40px;
    z-index: 1000;
    backdrop-filter: blur(10px);
}

.nav-brand {
    display: flex;
    align-items: center;
    gap: 15px;
    cursor: pointer;
}

.brand-logo {
    height: 50px;
    filter: drop-shadow(0 0 5px rgba(212, 175, 55, 0.5));
}

.brand-text {
    display: flex;
    flex-direction: column;
}

.en-text {
    font-family: var(--font-en);
    font-size: 1.2rem;
    font-weight: 900;
    color: var(--gold-primary);
    letter-spacing: 2px;
    line-height: 1;
}

.ar-text {
    font-size: 0.9rem;
    font-weight: 600;
    color: #fff;
}

.nav-menu {
    list-style: none;
    display: flex;
    gap: 10px;
}

.nav-item {
    padding: 10px 20px;
    font-size: 0.95rem;
    font-weight: 700;
    color: #ccc;
    cursor: pointer;
    border-radius: 8px;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 8px;
}

.nav-item:hover {
    background: rgba(212, 175, 55, 0.1);
    color: var(--gold-primary);
}

.nav-item.active {
    background: rgba(212, 175, 55, 0.15);
    color: var(--gold-primary);
    border: 1px solid var(--border-gold);
}

.discord-btn {
    background: #5865f2;
    color: #fff;
    text-decoration: none;
    padding: 10px 20px;
    border-radius: 8px;
    font-weight: 700;
    font-size: 0.9rem;
    display: flex;
    align-items: center;
    gap: 8px;
    transition: all 0.3s ease;
}

.discord-btn:hover {
    background: #4752c4;
    transform: translateY(-2px);
}

/* ==========================================================================
   MAIN WORKSPACE & TABS
   ========================================================================== */
.main-workspace {
    max-width: 1200px;
    margin: 40px auto;
    padding: 0 20px;
    min-height: 80vh;
}

.tab-pane {
    display: none;
    animation: fadeIn 0.4s ease forwards;
}

.tab-pane.active {
    display: block;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

/* ==========================================================================
   HERO SECTION
   ========================================================================== */
.hero-section {
    text-align: center;
    padding: 40px 0 60px 0;
}

.hero-main-logo {
    width: 180px;
    margin-bottom: 20px;
    filter: drop-shadow(0 0 20px rgba(212, 175, 55, 0.3));
}

.hero-title {
    font-size: 3rem;
    margin-bottom: 15px;
    color: #fff;
}

.hero-subtitle {
    font-size: 1.1rem;
    color: var(--text-muted);
    max-width: 600px;
    margin: 0 auto;
}

/* ==========================================================================
   CARDS & GRIDS
   ========================================================================== */
.dashboard-stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 20px;
    margin-bottom: 50px;
}

.stat-card {
    background: var(--bg-panel);
    border: 1px solid rgba(255, 255, 255, 0.05);
    border-radius: 12px;
    padding: 25px;
    display: flex;
    align-items: center;
    gap: 20px;
    transition: all 0.3s ease;
}

.stat-card:hover {
    border-color: var(--border-gold);
    transform: translateY(-5px);
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.4);
}

.stat-icon {
    width: 60px;
    height: 60px;
    background: rgba(212, 175, 55, 0.1);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    color: var(--gold-primary);
    border: 1px solid var(--border-gold);
}

.stat-info h3 {
    font-size: 1.1rem;
    margin-bottom: 8px;
    color: #fff;
}

.status-badge {
    font-size: 0.75rem;
    font-weight: 800;
    padding: 4px 10px;
    border-radius: 4px;
}

.active-status {
    background: rgba(16, 185, 129, 0.15);
    color: #34d399;
    border: 1px solid rgba(16, 185, 129, 0.3);
}

.standby-status {
    background: rgba(245, 158, 11, 0.15);
    color: #fbbf24;
    border: 1px solid rgba(245, 158, 11, 0.3);
}

/* ==========================================================================
   BULLETINS
   ========================================================================== */
.section-heading {
    font-size: 1.4rem;
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    gap: 10px;
    color: #fff;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    padding-bottom: 10px;
}

.bulletin-card {
    background: var(--bg-panel);
    border-right: 4px solid var(--danger);
    padding: 20px;
    border-radius: 8px;
    margin-bottom: 15px;
}

.bulletin-header {
    display: flex;
    justify-content: space-between;
    margin-bottom: 10px;
}

.tag {
    font-size: 0.75rem;
    font-weight: 800;
    padding: 3px 8px;
    border-radius: 4px;
}

.urgent-tag {
    background: rgba(239, 68, 68, 0.15);
    color: #f87171;
}

.date {
    font-size: 0.8rem;
    color: var(--text-muted);
}

.bulletin-card h4 {
    font-size: 1.1rem;
    color: #fff;
    margin-bottom: 8px;
}

.bulletin-card p {
    font-size: 0.9rem;
    color: #bbb;
}

/* ==========================================================================
   GLASS CONTAINERS & LAWS
   ========================================================================== */
.glass-container {
    background: var(--bg-panel);
    border: 1px solid rgba(255, 255, 255, 0.05);
    border-radius: 16px;
    padding: 40px;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.5);
}

.header-banner {
    text-align: center;
    margin-bottom: 40px;
}

.header-banner h2 {
    font-size: 1.8rem;
    color: #fff;
    margin: 10px 0;
}

.header-banner p {
    color: var(--text-muted);
}

.laws-grid {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.law-card {
    background: rgba(0, 0, 0, 0.4);
    border: 1px solid rgba(255, 255, 255, 0.05);
    padding: 25px;
    border-radius: 12px;
    position: relative;
    padding-right: 70px;
}

.law-number {
    position: absolute;
    right: 20px;
    top: 25px;
    font-size: 1.5rem;
    font-family: var(--font-en);
    font-weight: 900;
    color: var(--gold-primary);
    opacity: 0.5;
}

.law-card h3 {
    font-size: 1.2rem;
    color: #fff;
    margin-bottom: 10px;
}

.law-card p {
    font-size: 0.95rem;
    color: #bbb;
}

/* ==========================================================================
   COURSES & LEADERSHIP GRIDS
   ========================================================================== */
.courses-grid, .leadership-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 25px;
}

.course-card, .leader-card {
    background: var(--bg-panel);
    border: 1px solid rgba(255, 255, 255, 0.05);
    border-radius: 12px;
    padding: 30px;
    text-align: center;
    transition: all 0.3s ease;
}

.course-card:hover, .leader-card:hover {
    border-color: var(--border-gold);
    transform: translateY(-5px);
}

.course-icon, .leader-avatar {
    width: 80px;
    height: 80px;
    margin: 0 auto 20px;
    background: rgba(212, 175, 55, 0.1);
    border: 1px solid var(--border-gold);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2rem;
    color: var(--gold-primary);
}

.badge-number {
    display: block;
    font-family: var(--font-en);
    font-size: 0.9rem;
    font-weight: 900;
    color: var(--text-muted);
    letter-spacing: 1px;
    margin-bottom: 5px;
}

.course-card h3, .leader-card h3 {
    font-size: 1.2rem;
    color: #fff;
    margin-bottom: 10px;
}

.course-card p {
    font-size: 0.9rem;
    color: #bbb;
    margin-bottom: 20px;
    min-height: 60px;
}

.btn-gold-outline {
    background: transparent;
    border: 1px solid var(--gold-primary);
    color: var(--gold-primary);
    padding: 10px 20px;
    border-radius: 6px;
    font-family: var(--font-ar);
    font-weight: 700;
    cursor: pointer;
    transition: all 0.3s ease;
    width: 100%;
}

.btn-gold-outline:hover {
    background: var(--gold-primary);
    color: #000;
}

.rank-title {
    display: inline-block;
    padding: 5px 12px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 800;
    margin-top: 5px;
}

/* ==========================================================================
   QUIZ & LOCK SCREEN
   ========================================================================== */
.lock-screen {
    text-align: center;
    max-width: 500px;
    margin: 0 auto;
}

.lock-input-group {
    display: flex;
    gap: 10px;
    margin-top: 25px;
}

.lock-input-group input {
    flex: 1;
    background: rgba(0, 0, 0, 0.5);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 8px;
    padding: 12px 15px;
    color: #fff;
    font-family: var(--font-ar);
    font-size: 1rem;
    text-align: center;
}

.lock-input-group input:focus {
    outline: none;
    border-color: var(--gold-primary);
}

.btn-gold {
    background: var(--gold-primary);
    color: #000;
    border: none;
    padding: 0 20px;
    border-radius: 8px;
    font-family: var(--font-ar);
    font-weight: 800;
    cursor: pointer;
    transition: all 0.3s ease;
}

.btn-gold:hover {
    background: var(--gold-light);
    transform: translateY(-2px);
}

.error-text {
    color: var(--danger);
    margin-top: 15px;
    font-size: 0.85rem;
    font-weight: 700;
}

.quiz-questions-list {
    display: flex;
    flex-direction: column;
    gap: 20px;
    margin-bottom: 30px;
}

.quiz-question-card {
    background: var(--bg-panel);
    border: 1px solid rgba(255, 255, 255, 0.05);
    padding: 25px;
    border-radius: 12px;
}

.quiz-question-card h3 {
    font-size: 1.1rem;
    color: #fff;
    margin-bottom: 15px;
}

.quiz-option {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px 15px;
    background: rgba(0, 0, 0, 0.3);
    border: 1px solid rgba(255, 255, 255, 0.05);
    border-radius: 8px;
    margin-bottom: 10px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.quiz-option:hover {
    border-color: rgba(212, 175, 55, 0.3);
}

.quiz-option input[type="radio"] {
    accent-color: var(--gold-primary);
    width: 18px;
    height: 18px;
}

.quiz-option span {
    font-size: 0.95rem;
}

.btn-gold-large {
    background: var(--gold-primary);
    color: #000;
    border: none;
    padding: 15px 30px;
    border-radius: 8px;
    font-family: var(--font-ar);
    font-weight: 800;
    font-size: 1.1rem;
    cursor: pointer;
    width: 100%;
    transition: all 0.3s ease;
}

.btn-gold-large:hover {
    background: var(--gold-light);
    transform: translateY(-2px);
    box-shadow: 0 10px 20px rgba(212, 175, 55, 0.2);
}

.quiz-result-box {
    margin-top: 30px;
    padding: 30px;
    border-radius: 12px;
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
}

.quiz-result-box.success {
    background: rgba(16, 185, 129, 0.1);
    border: 1px solid rgba(16, 185, 129, 0.3);
    color: #34d399;
}

.quiz-result-box.failed {
    background: rgba(239, 68, 68, 0.1);
    border: 1px solid rgba(239, 68, 68, 0.3);
    color: #f87171;
}

/* ==========================================================================
   MOBILE RESPONSIVENESS
   ========================================================================== */
@media (max-width: 992px) {
    .texas-navbar {
        flex-direction: column;
        padding: 15px 20px;
        gap: 15px;
    }
    
    .nav-menu {
        width: 100%;
        overflow-x: auto;
        padding-bottom: 5px;
        justify-content: flex-start;
        scrollbar-width: none;
    }
    
    .nav-menu::-webkit-scrollbar {
        display: none;
    }
    
    .nav-item {
        flex: 0 0 auto;
    }
    
    .discord-btn {
        width: 100%;
        justify-content: center;
    }
}

@media (max-width: 768px) {
    .hero-title {
        font-size: 2.2rem;
    }
    
    .glass-container {
        padding: 25px 15px;
    }
    
    .law-card {
        padding-right: 20px;
        padding-top: 50px;
    }
    
    .law-number {
        top: 15px;
        right: 20px;
        font-size: 1.2rem;
    }
    
    .lock-input-group {
        flex-direction: column;
    }
    
    .btn-gold {
        padding: 12px;
    }
}

/* ==========================================================================
   DOCUMENT CONTENT STYLES
   ========================================================================== */
.document-content {
    text-align: right;
    line-height: 1.8;
    padding: 20px;
}

.document-content h3 {
    margin-top: 40px;
    margin-bottom: 20px;
    font-size: 1.5rem;
    display: flex;
    align-items: center;
    gap: 10px;
}

.document-content p, 
.document-content ul, 
.document-content ol {
    margin-bottom: 20px;
    font-size: 1.1rem;
    color: #eee;
}

.document-content ul, 
.document-content ol {
    padding-right: 30px;
}

.document-content li {
    margin-bottom: 12px;
}

.doc-divider {
    border: 0;
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(212, 175, 55, 0.4), transparent);
    margin: 50px 0;
}

.radio-waves-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 25px;
    margin-top: 25px;
}

.radio-waves-grid div {
    background: rgba(0, 0, 0, 0.5);
    padding: 20px;
    border-radius: 12px;
    border: 1px solid rgba(212, 175, 55, 0.1);
    transition: all 0.3s ease;
}

.radio-waves-grid div:hover {
    border-color: rgba(212, 175, 55, 0.5);
    transform: translateY(-5px);
    box-shadow: 0 10px 20px rgba(0,0,0,0.5);
}

.radio-waves-grid h4 {
    color: var(--gold-light);
    margin-bottom: 15px;
    font-size: 1.2rem;
    border-bottom: 1px dashed rgba(212, 175, 55, 0.3);
    padding-bottom: 10px;
}

.radio-waves-grid ul {
    list-style-type: none;
    padding-right: 0;
}

.radio-waves-grid li {
    padding-right: 15px;
    position: relative;
    color: #ccc;
    font-size: 1rem;
}

.radio-waves-grid li::before {
    content: "•";
    position: absolute;
    right: 0;
    color: var(--gold-primary);
}

/* ==========================================================================
   LIVE SHEETS TAB OVERRIDES
   ========================================================================== */
#live-sheets {
    width: 95vw;
    position: relative;
    left: 50%;
    right: 50%;
    margin-left: -47.5vw;
    margin-right: -47.5vw;
}

#live-sheets .glass-container {
    height: 85vh !important;
    min-height: 700px !important;
    padding: 0px !important;
    overflow: hidden;
}
