/* ========================================
   VCPD & VCSD - Modern Police Theme
   ======================================== */

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --bg-primary: #0a0e14;
    --bg-secondary: #0f1419;
    --bg-card: #141a22;
    --bg-elevated: #1a222d;
    --bg-hover: #1f2937;
    
    --accent-blue: #3b82f6;
    --accent-blue-dim: rgba(59, 130, 246, 0.15);
    
    --text-primary: #f1f5f9;
    --text-secondary: #94a3b8;
    --text-muted: #64748b;
    
    --border: rgba(255, 255, 255, 0.06);
    --border-light: rgba(255, 255, 255, 0.1);
    
    --green: #22c55e;
    --blue: #3b82f6;
    --orange: #f59e0b;
    --purple: #a855f7;
    --gold: #eab308;
    --red: #ef4444;
    
    --sidebar-width: 280px;
    --radius: 12px;
    --radius-sm: 8px;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    background: var(--bg-primary);
    color: var(--text-primary);
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
}

/* ========================================
   SIDEBAR
   ======================================== */

.sidebar {
    position: fixed;
    left: 0;
    top: 0;
    bottom: 0;
    width: var(--sidebar-width);
    background: var(--bg-secondary);
    border-right: 1px solid var(--border);
    display: flex;
    flex-direction: column;
    z-index: 100;
    transition: transform 0.3s ease;
}

.sidebar-header {
    padding: 24px;
    border-bottom: 1px solid var(--border);
}

.logos {
    display: flex;
    justify-content: center;
    gap: 16px;
    margin-bottom: 16px;
}

.logo {
    width: 56px;
    height: 56px;
    object-fit: contain;
    filter: drop-shadow(0 2px 8px rgba(0, 0, 0, 0.3));
}

.brand {
    text-align: center;
}

.brand-name {
    display: block;
    font-size: 1rem;
    font-weight: 700;
    color: var(--text-primary);
    letter-spacing: 0.15em;
}

.brand-sub {
    display: block;
    font-size: 0.7rem;
    color: var(--accent-blue);
    text-transform: uppercase;
    letter-spacing: 0.2em;
    margin-top: 4px;
}

.sidebar-nav {
    flex: 1;
    padding: 16px 12px;
    overflow-y: auto;
}

.nav-section {
    margin-bottom: 24px;
}

.nav-title {
    display: block;
    font-size: 0.65rem;
    font-weight: 600;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.1em;
    padding: 0 12px;
    margin-bottom: 8px;
}

.nav-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 12px;
    color: var(--text-secondary);
    text-decoration: none;
    font-size: 0.875rem;
    font-weight: 500;
    border-radius: var(--radius-sm);
    transition: all 0.15s ease;
    margin-bottom: 2px;
}

.nav-item i {
    width: 18px;
    text-align: center;
    font-size: 0.9rem;
    opacity: 0.7;
}

.nav-item:hover {
    background: var(--bg-hover);
    color: var(--text-primary);
}

.nav-item:hover i {
    opacity: 1;
}

.nav-item.active {
    background: var(--accent-blue-dim);
    color: var(--accent-blue);
}

.nav-item.active i {
    opacity: 1;
}

.nav-item.swat {
    color: var(--red);
}

.nav-item.swat:hover,
.nav-item.swat.active {
    background: rgba(239, 68, 68, 0.1);
    color: var(--red);
}

.sidebar-footer {
    padding: 16px 24px;
    border-top: 1px solid var(--border);
    text-align: center;
}

.sidebar-footer span {
    font-size: 0.7rem;
    color: var(--text-muted);
}

/* ========================================
   MOBILE HEADER
   ======================================== */

.mobile-header {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    height: 60px;
    background: var(--bg-secondary);
    border-bottom: 1px solid var(--border);
    padding: 0 16px;
    align-items: center;
    gap: 16px;
    z-index: 90;
}

.menu-toggle {
    width: 40px;
    height: 40px;
    background: var(--bg-elevated);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    color: var(--text-primary);
    font-size: 1.1rem;
    cursor: pointer;
    transition: all 0.15s ease;
}

.menu-toggle:hover {
    background: var(--bg-hover);
}

.mobile-brand span {
    font-weight: 600;
    font-size: 0.95rem;
    letter-spacing: 0.05em;
}

/* ========================================
   MAIN CONTENT
   ======================================== */

.main-content {
    margin-left: var(--sidebar-width);
    min-height: 100vh;
}

/* Hero Section */
.hero {
    background: linear-gradient(135deg, var(--bg-secondary) 0%, var(--bg-card) 100%);
    padding: 60px 40px;
    border-bottom: 1px solid var(--border);
}

.hero-content {
    max-width: 800px;
}

.hero-badge {
    display: inline-block;
    padding: 6px 14px;
    background: var(--accent-blue-dim);
    color: var(--accent-blue);
    font-size: 0.7rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    border-radius: 100px;
    margin-bottom: 20px;
}

.hero h1 {
    font-size: 2.5rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 8px;
    letter-spacing: -0.02em;
}

.hero p {
    font-size: 1.1rem;
    color: var(--text-secondary);
}

.hero-stats {
    display: flex;
    gap: 48px;
    margin-top: 40px;
}

.stat {
    display: flex;
    flex-direction: column;
}

.stat-number {
    font-size: 2rem;
    font-weight: 700;
    color: var(--text-primary);
}

.stat-label {
    font-size: 0.8rem;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

/* ========================================
   TRAINING CARDS
   ======================================== */

.training-card {
    margin: 32px;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    overflow: hidden;
    transition: all 0.2s ease;
}

.training-card:hover {
    border-color: var(--border-light);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.2);
}

.training-card.swat-card {
    border-color: rgba(239, 68, 68, 0.2);
}

.training-card.swat-card:hover {
    border-color: rgba(239, 68, 68, 0.4);
}

/* Card Header */
.card-header {
    display: flex;
    align-items: center;
    gap: 20px;
    padding: 24px 28px;
    background: var(--bg-elevated);
    border-bottom: 1px solid var(--border);
}

.card-icon {
    width: 48px;
    height: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: var(--radius-sm);
    font-size: 1.25rem;
}

.card-icon.green { background: rgba(34, 197, 94, 0.15); color: var(--green); }
.card-icon.blue { background: rgba(59, 130, 246, 0.15); color: var(--blue); }
.card-icon.orange { background: rgba(245, 158, 11, 0.15); color: var(--orange); }
.card-icon.purple { background: rgba(168, 85, 247, 0.15); color: var(--purple); }
.card-icon.gold { background: rgba(234, 179, 8, 0.15); color: var(--gold); }
.card-icon.red { background: rgba(239, 68, 68, 0.15); color: var(--red); }

.card-title {
    flex: 1;
}

.card-title h2 {
    font-size: 1.25rem;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 4px;
}

.badge {
    display: inline-block;
    padding: 4px 10px;
    font-size: 0.65rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    border-radius: 100px;
}

.badge.green { background: rgba(34, 197, 94, 0.15); color: var(--green); }
.badge.blue { background: rgba(59, 130, 246, 0.15); color: var(--blue); }
.badge.orange { background: rgba(245, 158, 11, 0.15); color: var(--orange); }
.badge.purple { background: rgba(168, 85, 247, 0.15); color: var(--purple); }
.badge.gold { background: rgba(234, 179, 8, 0.15); color: var(--gold); }
.badge.red { background: rgba(239, 68, 68, 0.15); color: var(--red); }

/* Card Body */
.card-body {
    padding: 28px;
}

.card-desc {
    color: var(--text-secondary);
    font-size: 0.95rem;
    line-height: 1.7;
    margin-bottom: 28px;
    max-width: 800px;
}

/* Modules Grid */
.modules-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
    gap: 16px;
    margin-bottom: 28px;
}

.module {
    background: var(--bg-secondary);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    padding: 20px;
    transition: all 0.15s ease;
}

.module:hover {
    border-color: var(--border-light);
    background: var(--bg-elevated);
}

.swat-card .module {
    border-color: rgba(239, 68, 68, 0.1);
}

.swat-card .module:hover {
    border-color: rgba(239, 68, 68, 0.25);
}

.module-header {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 14px;
    padding-bottom: 12px;
    border-bottom: 1px solid var(--border);
}

.module-header i {
    color: var(--accent-blue);
    font-size: 0.95rem;
}

.swat-card .module-header i {
    color: var(--red);
}

.module-header h3 {
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--text-primary);
}

.module ul {
    list-style: none;
}

.module li {
    padding: 6px 0;
    padding-left: 16px;
    color: var(--text-secondary);
    font-size: 0.85rem;
    position: relative;
}

.module li::before {
    content: '';
    position: absolute;
    left: 0;
    top: 50%;
    transform: translateY(-50%);
    width: 5px;
    height: 5px;
    background: var(--text-muted);
    border-radius: 50%;
}

/* Requirements */
.requirements {
    background: rgba(34, 197, 94, 0.05);
    border: 1px solid rgba(34, 197, 94, 0.15);
    border-radius: var(--radius-sm);
    padding: 20px 24px;
}

.requirements.swat-req {
    background: rgba(239, 68, 68, 0.05);
    border-color: rgba(239, 68, 68, 0.15);
}

.requirements h4 {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--green);
    margin-bottom: 14px;
}

.requirements.swat-req h4 {
    color: var(--red);
}

.req-list {
    display: flex;
    flex-wrap: wrap;
    gap: 8px 20px;
}

.req-item {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.85rem;
    color: var(--text-secondary);
}

.req-item i {
    color: var(--green);
    font-size: 0.7rem;
}

.swat-req .req-item i {
    color: var(--red);
}

/* ========================================
   FOOTER
   ======================================== */

.footer {
    margin: 32px;
    margin-top: 60px;
    padding: 32px;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
}

.footer-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.footer-title {
    display: block;
    font-size: 0.95rem;
    font-weight: 600;
    color: var(--text-primary);
}

.footer-sub {
    display: block;
    font-size: 0.8rem;
    color: var(--text-muted);
    margin-top: 4px;
}

.footer-copy {
    font-size: 0.8rem;
    color: var(--text-muted);
}

/* ========================================
   OVERLAY
   ======================================== */

.overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(4px);
    z-index: 95;
}

.overlay.active {
    display: block;
}

/* ========================================
   SCROLLBAR
   ======================================== */

::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}

::-webkit-scrollbar-track {
    background: var(--bg-primary);
}

::-webkit-scrollbar-thumb {
    background: var(--bg-elevated);
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--bg-hover);
}

/* ========================================
   ANIMATIONS
   ======================================== */

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(16px); }
    to { opacity: 1; transform: translateY(0); }
}

.training-card {
    animation: fadeIn 0.4s ease forwards;
    opacity: 0;
}

.training-card:nth-child(2) { animation-delay: 0.05s; }
.training-card:nth-child(3) { animation-delay: 0.1s; }
.training-card:nth-child(4) { animation-delay: 0.15s; }
.training-card:nth-child(5) { animation-delay: 0.2s; }
.training-card:nth-child(6) { animation-delay: 0.25s; }
.training-card:nth-child(7) { animation-delay: 0.3s; }
.training-card:nth-child(8) { animation-delay: 0.35s; }
.training-card:nth-child(9) { animation-delay: 0.4s; }

/* ========================================
   RESPONSIVE
   ======================================== */

@media (max-width: 1024px) {
    .sidebar {
        transform: translateX(-100%);
    }
    
    .sidebar.open {
        transform: translateX(0);
    }
    
    .mobile-header {
        display: flex;
    }
    
    .main-content {
        margin-left: 0;
        padding-top: 60px;
    }
    
    .hero {
        padding: 40px 24px;
    }
    
    .hero h1 {
        font-size: 2rem;
    }
    
    .hero-stats {
        gap: 32px;
    }
    
    .training-card {
        margin: 16px;
    }
    
    .footer {
        margin: 16px;
    }
}

@media (max-width: 768px) {
    .hero-stats {
        flex-wrap: wrap;
        gap: 24px;
    }
    
    .stat-number {
        font-size: 1.5rem;
    }
    
    .card-header {
        padding: 20px;
    }
    
    .card-body {
        padding: 20px;
    }
    
    .modules-grid {
        grid-template-columns: 1fr;
    }
    
    .footer-content {
        flex-direction: column;
        text-align: center;
        gap: 16px;
    }
}

@media (max-width: 480px) {
    .hero {
        padding: 32px 16px;
    }
    
    .hero h1 {
        font-size: 1.5rem;
    }
    
    .hero p {
        font-size: 0.95rem;
    }
    
    .training-card {
        margin: 12px;
    }
    
    .card-icon {
        width: 40px;
        height: 40px;
        font-size: 1rem;
    }
    
    .card-title h2 {
        font-size: 1.1rem;
    }
    
    .module {
        padding: 16px;
    }
    
    .req-list {
        flex-direction: column;
        gap: 8px;
    }
}

/* ========================================
   PRINT
   ======================================== */

@media print {
    .sidebar, .mobile-header, .overlay {
        display: none !important;
    }
    
    .main-content {
        margin-left: 0;
    }
    
    .training-card {
        break-inside: avoid;
    }
}
