:root {
    --bg-color: #050505;
    --card-bg: #111111;
    --text-primary: #ffffff;
    --text-secondary: #a0a0a0;
    --primary: #800080; /* Purple */
    --primary-glow: rgba(128, 0, 128, 0.5);
    --secondary: #0000FF; /* Blue */
    --secondary-glow: rgba(0, 0, 255, 0.5);
    --accent-orange: #FFA500;
    --accent-green: #00FF00;
    --font-main: 'Outfit', sans-serif;
    --transition: all 0.3s ease;
}

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

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

/* Typography */
h1, h2, h3, h4 {
    font-weight: 700;
    line-height: 1.2;
}

a {
    text-decoration: none;
    color: inherit;
    transition: var(--transition);
}

ul {
    list-style: none;
}

/* Animations */
@keyframes fadeIn {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

@keyframes glow {
    0% { box-shadow: 0 0 5px var(--primary-glow); }
    50% { box-shadow: 0 0 20px var(--primary-glow), 0 0 10px var(--secondary-glow); }
    100% { box-shadow: 0 0 5px var(--primary-glow); }
}

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

/* Navbar */
.navbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 0;
    margin-bottom: 40px;
    border-bottom: 1px solid rgba(255,255,255,0.1);
}

.logo {
    font-size: 1.5rem;
    font-weight: 800;
    background: linear-gradient(45deg, var(--primary), var(--secondary));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.nav-links {
    display: flex;
    gap: 30px;
}

.nav-links a:hover {
    color: var(--primary);
    text-shadow: 0 0 10px var(--primary-glow);
}

/* Buttons */
.btn {
    display: inline-block;
    padding: 10px 25px;
    border-radius: 50px;
    font-weight: 600;
    cursor: pointer;
    border: none;
    transition: var(--transition);
}

.btn-primary {
    background: linear-gradient(90deg, var(--primary), var(--secondary));
    color: white;
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 0 15px var(--primary-glow);
}

.btn-outline {
    background: transparent;
    border: 2px solid var(--primary);
    color: var(--primary);
}

.btn-outline:hover {
    background: var(--primary);
    color: white;
}

/* Hero Section */
.hero {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 80px 0;
    min-height: 80vh;
}

.hero-content {
    flex: 1;
    animation: fadeIn 1s ease-out;
}

.hero h1 {
    font-size: 4rem;
    margin-bottom: 20px;
}

.highlight {
    color: var(--secondary);
    position: relative;
}

.hero p {
    font-size: 1.2rem;
    color: var(--text-secondary);
    margin-bottom: 30px;
    max-width: 600px;
}

.hero-image {
    flex: 1;
    display: flex;
    justify-content: center;
    position: relative;
}

.hero-img-placeholder {
    width: 400px;
    height: 400px;
    background: linear-gradient(135deg, var(--card-bg), #222);
    border-radius: 20px;
    border: 1px solid rgba(255,255,255,0.1);
    /* In real apps, replace with image */
}

/* Section Headers */
.section-header {
    margin-bottom: 50px;
    text-align: center;
}

.section-header h2 {
    font-size: 2.5rem;
    margin-bottom: 10px;
}

.section-title-underline {
    height: 4px;
    width: 60px;
    background: var(--accent-orange);
    margin: 0 auto;
    border-radius: 2px;
}

/* Cards (Courses, Blog) */
.grid-3 {
    display: grid;
    grid-template-columns: repeat(3, 1fr); /* Fixed 3 columns for Desktop */
    gap: 30px;
}

.card {
    background: var(--card-bg);
    border-radius: 15px;
    overflow: hidden;
    transition: var(--transition);
    border: 1px solid rgba(255,255,255,0.05);
}

.card:hover {
    transform: translateY(-5px);
    border-color: var(--primary);
    box-shadow: 0 10px 30px rgba(0,0,0,0.5);
}

.card-img {
    width: 100%;
    height: 200px;
    object-fit: cover;
    background: #222;
}

.card-body {
    padding: 20px;
}

.card-title {
    font-size: 1.25rem;
    margin-bottom: 10px;
    color: white;
}

.card-meta {
    font-size: 0.9rem;
    color: var(--text-secondary);
    margin-bottom: 15px;
    display: flex;
    justify-content: space-between;
}

/* Badges */
.badge {
    padding: 5px 10px;
    border-radius: 4px;
    font-size: 0.8rem;
    font-weight: 600;
    text-transform: uppercase;
}

.badge-active { background: rgba(0, 128, 0, 0.2); color: var(--accent-green); border: 1px solid var(--accent-green); }
.badge-upcoming { background: rgba(0, 0, 255, 0.2); color: var(--secondary); border: 1px solid var(--secondary); }
.badge-finished { background: rgba(128, 128, 128, 0.2); color: gray; border: 1px solid gray; }

/* Forms */
.form-group {
    margin-bottom: 20px;
}

.form-control {
    width: 100%;
    padding: 15px;
    background: #1a1a1a;
    border: 1px solid #333;
    border-radius: 8px;
    color: white;
    font-family: inherit;
}

.form-control:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 2px var(--primary-glow);
}

/* Footer */
footer {
    margin-top: 100px;
    padding: 50px 0;
    border-top: 1px solid rgba(255,255,255,0.1);
    text-align: center;
    color: var(--text-secondary);
}

.social-links a {
    font-size: 1.5rem;
    margin: 0 15px;
}

.social-links a:hover {
    color: var(--primary);
}


/* ===========================
   SAFE MOBILE RESPONSIVENESS
   Overridden ONLY for small screens
   =========================== */

/* Hamburger Styles (Base) */
.hamburger {
    cursor: pointer;
    gap: 5px;
    z-index: 1001; /* Above mobile menu */
}
.hamburger span {
    width: 25px;
    height: 3px;
    background-color: white;
    transition: var(--transition);
}

/* Mobile & Tablet (< 1024px) */
@media (max-width: 1024px) {
    /* Show Hamburger, Hide Default Nav */
    .hamburger {
        display: flex !important; /* Force show on mobile */
        flex-direction: column;
        margin-left: auto; /* Push to right if needed, but flex justify-between handles it */
    }

    /* Container Padding */
    .container {
        padding: 0 20px; /* Standard pad */
    }

    /* Navbar */
    .initial-nav-links {
       /* The original class name is .nav-links. We must override accurately. */
    }

    .nav-links {
        position: fixed;
        right: -100%;
        top: 0;
        height: 100vh;
        width: 70%; /* Slide out drawer */
        background: #000;
        flex-direction: column;
        justify-content: center;
        align-items: center;
        transition: 0.3s ease-in-out;
        z-index: 1000;
        border-left: 1px solid rgba(255,255,255,0.1);
        gap: 30px;
    }

    .nav-links.active {
        right: 0;
        box-shadow: -10px 0 30px rgba(0,0,0,0.8);
    }
    
    .nav-links a {
        font-size: 1.2rem;
    }

    /* Hero */
    .hero {
        flex-direction: column-reverse; /* Stack image above text usually, or text below. Row reverse makes text below if img is 2nd child? No: img is 2nd. Column-reverse puts img (2nd) on top. Correct. */
        text-align: center;
        justify-content: center;
        gap: 40px;
        padding: 40px 0;
    }
    
    .hero h1 {
        font-size: 2.5rem;
    }
    
    .hero p {
        margin: 0 auto;
    }
    
    .hero-img-placeholder {
        width: 100%;
        max-width: 350px;
        height: 350px;
    }

    /* Grids */
    .grid-3 {
        grid-template-columns: 1fr; /* Single column */
        gap: 20px;
    }
    
    /* Hamburger Animation */
    .hamburger.active span:nth-child(1) {
        transform: rotate(45deg) translate(5px, 5px);
    }
    .hamburger.active span:nth-child(2) {
        opacity: 0;
    }
    .hamburger.active span:nth-child(3) {
        transform: rotate(-45deg) translate(5px, -5px);
    }
}
