/* 
  Design System - TruckCarFerreira Academy
  Tema: Industrial, Mecânico, Escuro com detalhes Laranjas
*/

:root {
    /* Cores */
    --bg-dark: #0f1115;
    /* Fundo base muito escuro */
    --bg-panel: #1a1d24;
    /* Fundo de painéis e cartões */
    --bg-panel-hover: #22262f;
    --accent-orange: #e52620;
    /* Laranja vibrante industrial */
    --accent-orange-hover: #e52620;
    --accent-orange-glow: rgba(65, 41, 41, 0.3);

    --text-main: #94a3b8;
    /* Texto principal de leitura */
    --text-light: #f8fafc;
    /* Títulos e destaques */
    --border-color: #2a2f3a;

    --success: #10b981;
    --error: #ef4444;

    /* Fontes */
    --font-heading: 'Teko', sans-serif;
    /* Fonte industrial apertada para títulos */
    --font-body: 'Inter', sans-serif;
    /* Fonte moderna e limpa para leitura */

    /* Efeitos */
    --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.5);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.5), 0 2px 4px -1px rgba(0, 0, 0, 0.3);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.5), 0 4px 6px -2px rgba(0, 0, 0, 0.3);
    --shadow-neon: 0 0 15px var(--accent-orange-glow);

    /* Outros */
    --radius-md: 8px;
    --radius-lg: 12px;
    --transition-fast: 0.2s ease;
}

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

body {
    background-color: var(--bg-dark);
    background-image: 
        linear-gradient(rgba(15, 17, 21, 0.9), rgba(15, 17, 21, 0.9)),
        repeating-linear-gradient(45deg, #16181d 0, #16181d 2px, transparent 2px, transparent 8px);
    color: var(--text-main);
    font-family: var(--font-body);
    font-size: 16px;
    line-height: 1.5;
    -webkit-font-smoothing: antialiased;
}

/* Custom Scrollbar Industrial */
::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}
::-webkit-scrollbar-track {
    background: var(--bg-dark);
    border-left: 1px solid var(--border-color);
}
::-webkit-scrollbar-thumb {
    background: var(--border-color);
    border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover {
    background: var(--accent-orange);
}

h1,
h2,
h3,
h4,
h5,
h6 {
    font-family: var(--font-heading);
    color: var(--text-light);
    text-transform: uppercase;
    letter-spacing: 1px;
    line-height: 1.1;
}

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

ul {
    list-style: none;
}

/* Base Layout */
.app-container {
    display: flex;
    min-height: 100vh;
}

/* Sidebar */
.sidebar {
    width: 260px;
    background-color: var(--bg-panel);
    border-right: 1px solid var(--border-color);
    display: flex;
    flex-direction: column;
    padding: 24px 0;
    position: fixed;
    height: 100vh;
    z-index: 10;
}

.logo {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 0 24px;
    margin-bottom: 40px;
}

.logo h1 {
    font-size: 36px;
    color: var(--accent-orange);
    margin: 0;
}

.logo-icon {
    font-size: 28px;
    filter: drop-shadow(0 0 5px var(--accent-orange-glow));
}

.nav-links {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.nav-links li a {
    display: block;
    padding: 12px 24px;
    font-weight: 500;
    color: var(--text-main);
    border-left: 3px solid transparent;
}

.nav-links li a:hover,
.nav-links li.active a {
    background-color: rgba(229, 38, 32, 0.05);
    color: var(--text-light);
    border-left-color: var(--accent-orange);
}

.sidebar-footer {
    padding: 24px;
}

/* Botões */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 10px 20px;
    border-radius: var(--radius-md);
    font-weight: 700;
    font-size: 14px;
    cursor: pointer;
    border: none;
    transition: all var(--transition-fast);
    width: 100%;
    text-transform: uppercase;
    letter-spacing: 1px;
    position: relative;
    overflow: hidden;
}

.btn::after {
    content: '';
    position: absolute;
    top: 0; left: -100%;
    width: 50%; height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.2), transparent);
    transform: skewX(-20deg);
    transition: left 0.5s ease;
}

.btn:hover::after {
    left: 150%;
}

.btn-primary {
    background-color: var(--accent-orange);
    color: #fff;
    box-shadow: 0 4px 10px rgba(229, 38, 32, 0.2);
}

.btn-primary:hover {
    background-color: var(--accent-orange-hover);
    box-shadow: 0 4px 15px rgba(229, 38, 32, 0.4);
    transform: translateY(-2px);
}

.btn-secondary {
    background-color: transparent;
    color: var(--text-light);
    border: 1px solid var(--border-color);
}

.btn-secondary:hover {
    background-color: var(--bg-panel-hover);
    border-color: var(--accent-orange);
}

.btn-large {
    padding: 14px 28px;
    font-size: 16px;
    width: auto;
}

/* Main Content */
.main-content {
    flex: 1;
    margin-left: 260px;
    /* offset sidebar */
    padding: 0 40px 40px;
    display: flex;
    flex-direction: column;
}

/* Top Header */
.top-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 0;
    margin-bottom: 40px;
    border-bottom: 1px solid var(--border-color);
}

.search-bar input {
    width: 350px;
    padding: 12px 16px;
    background-color: var(--bg-panel);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    color: var(--text-light);
    font-size: 14px;
    outline: none;
    transition: border-color var(--transition-fast);
}

.search-bar input:focus {
    border-color: var(--accent-orange);
    box-shadow: 0 0 0 2px var(--accent-orange-glow);
}

.user-profile {
    display: flex;
    align-items: center;
    gap: 12px;
}

.avatar-placeholder {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background-color: var(--border-color);
    border: 2px solid var(--accent-orange);
}

/* Hero Section */
.hero-section {
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: linear-gradient(135deg, var(--bg-panel) 0%, rgba(26, 29, 36, 0) 100%);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    padding: 60px;
    margin-bottom: 40px;
    position: relative;
    overflow: hidden;
}

.hero-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-image:
        radial-gradient(var(--border-color) 1px, transparent 1px);
    background-size: 20px 20px;
    opacity: 0.1;
    pointer-events: none;
}

.hero-content {
    max-width: 600px;
    position: relative;
    z-index: 2;
}

.badge {
    display: inline-block;
    padding: 6px 12px;
    background-color: rgba(229, 38, 32, 0.1);
    color: var(--accent-orange);
    border: 1px solid var(--accent-orange);
    border-radius: 20px;
    font-size: 12px;
    font-weight: 700;
    text-transform: uppercase;
    margin-bottom: 20px;
}

.hero-title {
    font-size: 64px;
    margin-bottom: 16px;
}

.hero-title span {
    color: var(--accent-orange);
}

.hero-subtitle {
    font-size: 18px;
    margin-bottom: 32px;
}

.hero-buttons {
    display: flex;
    gap: 16px;
}

.hero-visual {
    width: 300px;
    height: 300px;
    position: relative;
    z-index: 2;
}

.abstract-engine {
    width: 100%;
    height: 100%;
    border-radius: 50%;
    border: 8px dashed var(--accent-orange);
    animation: rotate 20s linear infinite;
    position: relative;
}

.abstract-engine::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 150px;
    height: 150px;
    background-color: var(--bg-panel);
    border-radius: 50%;
    border: 4px solid var(--border-color);
}

@keyframes rotate {
    0% {
        transform: rotate(0deg);
    }

    100% {
        transform: rotate(360deg);
    }
}

/* Metrics Section */
.metrics-section {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 20px;
}

.metric-card {
    background-color: var(--bg-panel);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: 24px;
    text-align: center;
    transition: transform var(--transition-fast);
}

.metric-card:hover {
    transform: translateY(-5px);
    border-color: var(--accent-orange);
}

.metric-value {
    font-family: var(--font-heading);
    font-size: 48px;
    color: var(--text-light);
    margin-bottom: 4px;
}

.metric-label {
    font-size: 14px;
    font-weight: 500;
    color: var(--text-main);
    text-transform: uppercase;
    letter-spacing: 1px;
}

/* ==================================
   MOBILE / RESPONSIVE (FASE 3)
   ================================== */

/* Mobile Header / Hamburger Menu */
.mobile-menu-btn {
    display: none;
    background: transparent;
    border: none;
    color: var(--accent-orange);
    font-size: 28px;
    cursor: pointer;
}

@media (max-width: 1024px) {
    /* Tablet Styles */
    .metrics-section {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .hero-title { font-size: 48px; }
    
    .courses-grid, .certificates-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .course-player-container {
        flex-direction: column;
    }
    
    .playlist-sidebar {
        width: 100%;
        border-left: none;
        border-top: 1px solid var(--border-color);
    }
    
    .dashboard-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 768px) {
    /* Smartphone Styles */
    
    /* Mostrar Hambúrguer */
    .mobile-menu-btn {
        display: block;
    }

    /* Ocultar e Transacionar Sidebar Mobile */
    .sidebar {
        transform: translateX(-100%);
        transition: transform 0.3s ease;
        z-index: 1000;
        width: 280px;
    }

    .sidebar.open {
        transform: translateX(0);
        box-shadow: 20px 0 50px rgba(0,0,0,0.8);
    }

    /* Remover offset do main content */
    .main-content {
        margin-left: 0;
        padding: 0 15px 30px;
    }
    
    /* Top Header e Busca Mobile */
    .top-header {
        flex-direction: column;
        gap: 15px;
        align-items: flex-start;
    }
    
    .top-header .search-bar input {
        width: 100%;
    }

    /* Hero Section Mobile */
    .hero-section {
        padding: 30px 20px;
        flex-direction: column;
        text-align: center;
    }
    .hero-title { font-size: 36px; }
    .hero-visual {
        width: 150px;
        height: 150px;
        margin-top: 30px;
    }
    .hero-buttons {
        flex-direction: column;
        width: 100%;
    }

    /* Grids Mobile */
    .metrics-section, .courses-grid, .certificates-grid {
        grid-template-columns: 1fr;
    }

    /* Formulários (Login/Registro/Checkout) */
    .auth-card {
        padding: 30px 20px;
        margin: 20px;
    }

    /* Area do aluno Flex Mobile */
    .progress-item {
        flex-direction: column;
        align-items: flex-start;
        text-align: left;
    }
    .progress-thumb {
        width: 100%;
        height: 120px;
        margin-bottom: 15px;
    }
    .progress-info {
        width: 100%;
        margin-bottom: 20px;
    }
    .progress-item .btn {
        width: 100%;
    }

    /* Checkout Flow (Se existirem side-by-side) */
    .checkout-columns {
        flex-direction: column;
    }
}