:root {
    --primary: #c40000;
    --secondary: #1a1a1a;
    --accent: #ffffff;
    --glass: rgba(20, 20, 20, 0.7);
    --glass-border: rgba(255, 255, 255, 0.1);
    --text-color: #ffffff;
    --neon-glow: 0 0 10px rgba(196, 0, 0, 0.7), 0 0 20px rgba(196, 0, 0, 0.5);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Tajawal', sans-serif;
}

body {
    background-color: #000;
    color: var(--text-color);
    overflow-x: hidden;
    scroll-behavior: smooth;
}

/* Loading Screen */
.loader {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: #000;
    z-index: 9999;
    display: flex;
    justify-content: center;
    align-items: center;
    transition: opacity 0.5s ease;
}

.loader-content {
    text-align: center;
}

/* Video Background */
.video-bg {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
    overflow: hidden;
}

#bgVideo {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    background: radial-gradient(circle, rgba(0,0,0,0.4) 0%, rgba(0,0,0,0.9) 100%);
}

/* Navigation */
nav {
    position: fixed;
    top: 0;
    width: 100%;
    padding: 20px 50px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    z-index: 100;
    background: linear-gradient(to bottom, rgba(0,0,0,0.8), transparent);
}

.logo {
    font-size: 1.5rem;
    font-weight: 800;
    letter-spacing: 2px;
    color: var(--primary);
    text-shadow: var(--neon-glow);
}

/* Hero Section */
.hero {
    height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    position: relative;
}

.hero-content {
    z-index: 2;
}

.hero-title {
    font-size: 5rem;
    font-weight: 800;
    margin-bottom: 10px;
    text-transform: uppercase;
    position: relative;
}

.hero-subtitle {
    font-size: 2rem;
    color: #ccc;
    margin-bottom: 20px;
    font-weight: 300;
}

.hero-desc {
    font-size: 1.2rem;
    letter-spacing: 5px;
    color: var(--primary);
    text-transform: uppercase;
}

/* Scroll Indicator */
.scroll-indicator {
    position: absolute;
    bottom: 30px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.scroll-indicator span {
    width: 20px;
    height: 20px;
    border-bottom: 2px solid #fff;
    border-right: 2px solid #fff;
    transform: rotate(45deg);
    animation: scrollAnim 2s infinite;
}

.scroll-indicator span:nth-child(2) { animation-delay: 0.2s; }
.scroll-indicator span:nth-child(3) { animation-delay: 0.4s; }

@keyframes scrollAnim {
    0% { opacity: 0; transform: rotate(45deg) translate(-20px, -20px); }
    50% { opacity: 1; }
    100% { opacity: 0; transform: rotate(45deg) translate(20px, 20px); }
}

/* General Layout */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

.section {
    padding: 100px 0;
    position: relative;
}

.section-title {
    font-size: 3rem;
    margin-bottom: 50px;
    text-align: center;
    position: relative;
    display: inline-block;
    left: 50%;
    transform: translateX(-50%);
}

.section-title::after {
    content: '';
    position: absolute;
    bottom: -10px;
    left: 0;
    width: 100%;
    height: 3px;
    background: var(--primary);
    box-shadow: var(--neon-glow);
}

/* Cards & Grid */
.glass-card {
    background: var(--glass);
    backdrop-filter: blur(10px);
    border: 1px solid var(--glass-border);
    padding: 40px;
    border-radius: 20px;
    box-shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.37);
    transition: transform 0.3s ease;
}

.grid-3 {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
}

.grid-2 {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(400px, 1fr));
    gap: 30px;
}

/* Feature Cards */
.feature-card {
    background: rgba(30, 30, 30, 0.6);
    padding: 30px;
    border-radius: 15px;
    text-align: center;
    border: 1px solid transparent;
    transition: border-color 0.4s ease, box-shadow 0.4s ease, background-color 0.4s ease;
}

.feature-card:hover {
    border-color: var(--primary);
    box-shadow: var(--neon-glow);
    /* transform handled by GSAP or separate rule if needed, but avoiding conflict */
    transform: translateY(-10px); 
}

.feature-card .icon {
    font-size: 3rem;
    color: var(--primary);
    margin-bottom: 20px;
}

/* Tasks Timeline style */
.tasks-container {
    display: flex;
    flex-direction: column;
    gap: 20px;
    position: relative;
}

.task-item {
    display: flex;
    align-items: center;
    gap: 20px;
    background: rgba(255, 255, 255, 0.05);
    padding: 20px;
    border-radius: 10px;
    border-right: 4px solid var(--primary);
    transition: background-color 0.3s ease;
}

.task-item:hover {
    background: rgba(196, 0, 0, 0.2);
    transform: scale(1.02);
}

.task-number {
    font-size: 2rem;
    font-weight: bold;
    color: rgba(255, 255, 255, 0.1);
}

/* Vehicles List */
.vehicle-list {
    list-style: none;
    margin-top: 20px;
}

.vehicle-list li {
    padding: 10px;
    border-bottom: 1px solid rgba(255,255,255,0.1);
    font-size: 1.1rem;
}

.vehicle-list li:before {
    content: '>';
    color: var(--primary);
    margin-left: 10px;
    font-weight: bold;
}

/* Warnings */
.warning-grid {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 20px;
}

.warning-card {
    background: rgba(50, 0, 0, 0.6);
    padding: 20px;
    border-radius: 10px;
    width: 200px;
    text-align: center;
    border: 1px solid #ff4444;
    transition: 0.3s;
}

.warning-card:hover {
    background: #ff0000;
    color: white;
    transform: scale(1.1);
}

.warning-card i {
    font-size: 2rem;
    margin-bottom: 10px;
    display: block;
}

/* Uniforms */
.uniforms-grid {
    display: flex;
    justify-content: center;
    gap: 40px;
    flex-wrap: wrap;
}

.uniform-card {
    width: 300px;
    height: 400px;
    perspective: 1000px;
}

.card-inner {
    position: relative;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, #1a1a1a, #000);
    border: 1px solid #333;
    border-radius: 20px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    transition: transform 0.6s;
    box-shadow: 0 0 15px rgba(0,0,0,0.5);
}

.uniform-card:hover .card-inner {
    transform: rotateY(10deg);
    border-color: var(--primary);
    box-shadow: var(--neon-glow);
}

.uniform-icon {
    font-size: 5rem;
    color: #333;
    margin-top: 20px;
    transition: 0.3s;
}

.uniform-card:hover .uniform-icon {
    color: var(--primary);
}

.code-display {
    background: #000;
    padding: 10px 20px;
    border-radius: 5px;
    border: 1px dashed var(--primary);
    margin-top: 20px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.copy-btn {
    background: none;
    border: none;
    color: #fff;
    cursor: pointer;
    transition: 0.3s;
}

.copy-btn:hover {
    color: var(--primary);
}

/* Horse Image */
.horse-image-container {
    position: relative;
    max-width: 800px;
    margin: 0 auto;
    overflow: hidden;
    border-radius: 20px;
    box-shadow: 0 10px 50px rgba(0,0,0,0.8);
}

.horse-img {
    width: 100%;
    height: auto;
    display: block;
    transition: transform 0.5s ease;
}

.horse-image-container:hover .horse-img {
    transform: scale(1.05);
}

.horse-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    background: linear-gradient(to top, rgba(0,0,0,0.9), transparent);
    padding: 30px;
    text-align: center;
}

/* Glitch Effect */
.glitch {
    position: relative;
}

.glitch::before, .glitch::after {
    content: attr(data-text);
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: #000; /* Matches bg */
}

.glitch::before {
    left: 2px;
    text-shadow: -1px 0 red;
    clip: rect(24px, 550px, 90px, 0);
    animation: glitch-anim-2 3s infinite linear alternate-reverse;
}

.glitch::after {
    left: -2px;
    text-shadow: -1px 0 blue;
    clip: rect(85px, 550px, 140px, 0);
    animation: glitch-anim-1 2.5s infinite linear alternate-reverse;
}

@keyframes glitch-anim-1 {
    0% { clip: rect(20px, 9999px, 80px, 0); }
    100% { clip: rect(100px, 9999px, 160px, 0); }
}

@keyframes glitch-anim-2 {
    0% { clip: rect(120px, 9999px, 20px, 0); }
    100% { clip: rect(10px, 9999px, 90px, 0); }
}

/* Footer */
footer {
    padding: 40px;
    text-align: center;
    background: #000;
    border-top: 1px solid #333;
}

/* Uniform Gallery */
.uniform-gallery {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 20px;
    margin-top: 30px;
}

.gallery-item {
    position: relative;
    border-radius: 15px;
    overflow: hidden;
    border: 1px solid var(--glass-border);
    box-shadow: 0 5px 15px rgba(0,0,0,0.5);
    transition: transform 0.4s ease, border-color 0.4s ease, box-shadow 0.4s ease;
    cursor: pointer;
    background: #000;
}

.gallery-item:hover {
    transform: translateY(-10px);
    border-color: var(--primary);
    box-shadow: var(--neon-glow);
    z-index: 10;
}

.gallery-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.6s ease;
    display: block;
}

.gallery-item:hover img {
    transform: scale(1.1);
}

/* Lightbox */
.lightbox {
    display: none;
    position: fixed;
    z-index: 9999;
    padding-top: 50px;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    overflow: auto;
    background-color: rgba(0, 0, 0, 0.95);
    backdrop-filter: blur(5px);
}

.lightbox-content {
    margin: auto;
    display: block;
    width: 80%;
    max-width: 1200px;
    max-height: 90vh;
    object-fit: contain;
    animation-name: zoom;
    animation-duration: 0.6s;
    border: 2px solid var(--primary);
    box-shadow: 0 0 50px rgba(196, 0, 0, 0.5);
    border-radius: 5px;
}

@keyframes zoom {
    from {transform:scale(0)}
    to {transform:scale(1)}
}

.close-lightbox {
    position: absolute;
    top: 20px;
    right: 40px;
    color: #f1f1f1;
    font-size: 50px;
    font-weight: bold;
    transition: 0.3s;
    cursor: pointer;
    z-index: 10000;
}

.close-lightbox:hover,
.close-lightbox:focus {
    color: var(--primary);
    text-decoration: none;
    cursor: pointer;
}

#lightbox-caption {
    margin: auto;
    display: block;
    width: 80%;
    max-width: 700px;
    text-align: center;
    color: #ccc;
    padding: 10px 0;
    height: 150px;
    font-size: 1.2rem;
}

/* Responsive */
@media (max-width: 768px) {
    .hero-title { font-size: 3rem; }
    .grid-3, .grid-2 { grid-template-columns: 1fr; }
}
