/* Optronova LMS - Main Stylesheet
    Brand: Root IT System
    Theme: Modern Dark / Sky Blue Accent
*/

/* 1. Root Variables & Reset */
:root {
    --bg-dark: #0f172a;
    --card-bg: #1e293b;
    --accent: #38bdf8; /* Sky Blue accent */
    --text-main: #f8fafc;
    --text-dim: #ffffff;
    --success: #22c55e;
    --danger: #ef4444;
    --nav-blur: rgba(15, 23, 42, 0.9);
    --border-color: #334155;
}

* {
    box-sizing: border-box;
}

body {
    background-color: var(--bg-dark);
    color: var(--text-main);
    font-family: 'Inter', system-ui, -apple-system, sans-serif;
    margin: 0;
    line-height: 1.6;
    scroll-behavior: smooth;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* 2. Navbar & Navigation */
.navbar {
    background: var(--nav-blur);
    backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--border-color);
    padding: 1rem 0;
    position: sticky;
    top: 0;
    z-index: 1000;
}

.navbar .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    font-size: 1.5rem;
    font-weight: 800;
    text-decoration: none;
    color: var(--text-main);
    letter-spacing: -0.5px;
}

.logo span { color: var(--accent); }

.nav-links {
    list-style: none;
    display: flex;
    align-items: center;
    gap: 15px;
    margin: 0;
    padding: 0;
}

.nav-links a {
    text-decoration: none;
    color: var(--text-dim);
    font-weight: 600;
    font-size: 0.9rem;
    padding: 8px 14px;
    border-radius: 8px;
    transition: all 0.2s ease;
}

.nav-links a:hover {
    color: var(--accent);
}

.dashboard-link {
    color: var(--text-main) !important;
}

.dashboard-link:hover {
    background: rgba(56, 189, 248, 0.1);
}

.btn-logout {
    color: var(--danger) !important;
    border: 1px solid rgba(239, 68, 68, 0.3) !important;
    background: rgba(239, 68, 68, 0.05);
    white-space: nowrap;
}

.btn-logout:hover {
    background: var(--danger) !important;
    color: white !important;
    border-color: var(--danger) !important;
}

/* 3. Tiled Hero & Bento Grid */
.hero-tile-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    grid-template-rows: repeat(2, 1fr);
    gap: 20px;
    max-width: 1200px;
    margin: 40px auto 0;
    padding: 0 20px;
}

.hero-main-tile {
    grid-column: span 2;
    grid-row: span 2;
    background: linear-gradient(135deg, #1e293b 0%, #0f172a 100%);
    padding: 60px;
    border-radius: 24px;
    border: 1px solid var(--border-color);
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.hero-main-tile h1 {
    font-size: 3.5rem;
    margin-bottom: 20px;
    font-weight: 800;
    line-height: 1.1;
}

.tile {
    background: var(--card-bg);
    padding: 30px;
    border-radius: 24px;
    border: 1px solid var(--border-color);
    transition: all 0.3s ease;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.feature-tile:hover {
    border-color: var(--accent);
    transform: translateY(-5px);
}

.feature-tile h3 { margin: 10px 0 5px; font-size: 1.25rem; }
.feature-tile .icon { font-size: 2.2rem; }
.feature-tile p { color: var(--text-dim); font-size: 0.9rem; line-height: 1.4; margin: 0; }

/* 4. Section Headers & Layout */
.section-padding { padding: 80px 0; }

.section-header-tiled {
    margin-bottom: 40px;
    text-align: left;
}

.section-header-tiled h2 {
    font-size: 2.2rem;
    margin-bottom: 10px;
}

.accent { color: var(--accent); }
.text-dim { color: var(--text-dim); }

/* 5. Course Grid & Tiled Cards */
.course-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 25px;
}

.course-card-tiled {
    background: var(--card-bg);
    border-radius: 24px;
    overflow: hidden;
    border: 1px solid var(--border-color);
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    transition: all 0.3s ease;
}

.course-card-tiled:hover {
    border-color: var(--accent);
    transform: scale(1.02);
}

.card-content { padding: 30px; }

.category-tag {
    background: rgba(34, 197, 94, 0.15);
    color: var(--success);
    font-size: 0.7rem;
    font-weight: 800;
    text-transform: uppercase;
    padding: 5px 14px;
    border-radius: 50px;
    display: inline-block;
    margin-bottom: 15px;
}

.course-card-tiled h3 { margin-bottom: 10px; font-size: 1.4rem; }

/* 6. Buttons */
.hero-btns {
    display: flex;
    gap: 15px;
    margin-top: 30px;
}

.btn-primary {
    background: var(--accent);
    color: #0f172a;
    padding: 14px 28px;
    border-radius: 12px;
    text-decoration: none;
    font-weight: 700;
    display: inline-block;
    transition: transform 0.2s, opacity 0.2s;
}

.btn-primary:hover {
    opacity: 0.9;
    transform: translateY(-2px);
}

.btn-sub {
    background: #334155;
    color: white;
    padding: 14px 28px;
    border-radius: 12px;
    text-decoration: none;
    font-weight: 600;
    transition: background 0.2s;
}

.btn-sub:hover { background: #475569; }

.btn-view-tiled {
    background: #334155;
    color: white;
    text-align: center;
    padding: 18px;
    text-decoration: none;
    font-weight: 700;
    font-size: 0.95rem;
    transition: all 0.2s;
}

.btn-view-tiled:hover {
    background: var(--accent);
    color: #0f172a;
}

/* 7. Forms */
form {
    max-width: 450px;
    background: var(--card-bg);
    padding: 3rem;
    border-radius: 24px;
    margin: 4rem auto;
    border: 1px solid var(--border-color);
}

input, select {
    width: 100%;
    padding: 14px;
    margin-bottom: 1.2rem;
    background: #0f172a;
    border: 1px solid var(--border-color);
    color: white;
    border-radius: 10px;
}

input:focus {
    outline: none;
    border-color: var(--accent);
    box-shadow: 0 0 0 2px rgba(56, 189, 248, 0.2);
}

/* 8. Footer Redesign */
.footer-tiled {
    margin-top: 100px;
    padding: 80px 0 40px;
    border-top: 1px solid var(--border-color);
    background: rgba(15, 23, 42, 0.5);
}

.footer-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 30px;
}

.footer-brand p {
    margin-top: 10px;
    color: var(--text-dim);
}

.footer-bottom {
    width: 100%;
    margin-top: 40px;
    padding-top: 20px;
    border-top: 1px solid rgba(51, 65, 85, 0.4);
    text-align: center;
    color: var(--text-dim);
    font-size: 0.85rem;
}

/* 9. Responsive Queries */
@media (max-width: 992px) {
    .hero-tile-grid {
        grid-template-columns: 1fr 1fr;
        grid-template-rows: auto;
    }
    .hero-main-tile {
        grid-column: span 2;
    }
    .hero-main-tile h1 { font-size: 3rem; }
}

@media (max-width: 768px) {
    .navbar .container {
        flex-direction: column;
        gap: 15px;
    }
    .hero-main-tile {
        padding: 40px;
    }
    .hero-main-tile h1 { font-size: 2.5rem; }
    .hero-btns {
        flex-direction: column;
    }
    .btn-primary, .btn-sub { text-align: center; }
}

@media (max-width: 600px) {
    .hero-tile-grid {
        grid-template-columns: 1fr;
    }
    .hero-main-tile {
        grid-column: span 1;
    }
    .nav-links {
        gap: 10px;
        font-size: 0.8rem;
    }
    .nav-links a { padding: 6px 10px; }
}