/* Responsividade extra para quiz, simulados e calculadora de multas */
@media (max-width: 900px) {
    .container {
        max-width: 98vw;
        padding: 0 0.5rem;
    }
    .hero-content {
        padding: 1rem;
    }
    .about-section, .quiz-section, .simulado-section, .multas-section {
        padding: 2.5rem 0 !important;
    }
}

@media (max-width: 600px) {
    .navbar {
        flex-direction: column;
        gap: 0.5rem;
        padding: 0.7rem 0.5rem;
    }
    .logo-container h1 {
        font-size: 1.2rem;
    }
    .hero-title {
        font-size: 1.3rem;
    }
    .hero-content {
        padding: 0.5rem;
    }
    .cta-buttons {
        flex-direction: column;
        gap: 0.5rem;
    }
    .curso-card, .feature-card {
        padding: 1.2rem 0.7rem;
        font-size: 0.98rem;
    }
    .curso-card h3, .feature-card h3 {
        font-size: 1.1rem;
    }
    .curso-icon-card, .feature-icon {
        font-size: 2rem !important;
    }
    .quiz-section h2, .simulado-section h2, .multas-section h2 {
        font-size: 1.2rem !important;
    }
    #quiz-container, #simulado-container, #multas-calculadora {
        font-size: 0.98rem;
    }
    .quiz-question, .simulado-question {
        padding: 0.5rem 0;
    }
    .modal-content, .login-modal .modal-content {
        padding: 1rem 0.5rem !important;
        max-width: 98vw !important;
    }
    .login-modal .form-group input {
        font-size: 0.98rem;
    }
}

@media (max-width: 400px) {
    .navbar, .container, .about-section, .quiz-section, .simulado-section, .multas-section {
        padding: 0.2rem !important;
    }
    .hero-title, .about-content h2 {
        font-size: 1rem !important;
    }
    .curso-card, .feature-card {
        padding: 0.5rem 0.2rem;
        font-size: 0.92rem;
    }
    .curso-card h3, .feature-card h3 {
        font-size: 0.95rem;
    }
}
/* Reset e configurações básicas */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    /* Cores inspiradas no trânsito */
    --red-signal: #ff3333;
    --yellow-signal: #ffcc00;
    --green-signal: #00ff66;
    --road-gray: #2c3e50;
    --asphalt-dark: #1a1a1a;
    --lane-yellow: #ffd700;
    --safety-orange: #ff6b35;
    --sky-blue: #74b9ff;
    --white-signal: #ffffff;
    --shadow-dark: rgba(0, 0, 0, 0.2);
    
    /* Gradientes */
    --gradient-primary: linear-gradient(135deg, var(--sky-blue), var(--green-signal));
    --gradient-road: linear-gradient(90deg, var(--asphalt-dark), var(--road-gray), var(--asphalt-dark));
    --gradient-hero: linear-gradient(135deg, rgba(116, 185, 255, 0.9), rgba(0, 255, 102, 0.7));
}

body {
    font-family: 'Inter', sans-serif;
    line-height: 1.6;
    color: #e3eaf7;
    overflow-x: hidden;
    background: linear-gradient(135deg, #181c22 0%, #23272f 100%);
}

/* Animação de trânsito no background */
.traffic-animation {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100vh;
    z-index: -1;
    overflow: hidden;
}

.road {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 60px;
    background: var(--gradient-road);
    background-size: 200px 100%;
    animation: roadMovement 3s linear infinite;
}

.road::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 0;
    width: 100%;
    height: 4px;
    background: repeating-linear-gradient(
        90deg,
        var(--lane-yellow) 0px,
        var(--lane-yellow) 40px,
        transparent 40px,
        transparent 80px
    );
    animation: laneMovement 2s linear infinite;
}

@keyframes roadMovement {
    0% { background-position: 0 0; }
    100% { background-position: 200px 0; }
}

@keyframes laneMovement {
    0% { transform: translateX(0); }
    100% { transform: translateX(80px); }
}

/* Carros animados */
.car {
    position: absolute;
    bottom: 15px;
    width: 60px;
    height: 30px;
    border-radius: 15px 15px 5px 5px;
    animation: carMove 8s linear infinite;
}

.car-1 {
    background: linear-gradient(135deg, var(--red-signal), #cc0000);
    left: -100px;
    animation-delay: 0s;
}

.car-2 {
    background: linear-gradient(135deg, var(--sky-blue), #0066cc);
    left: -100px;
    animation-delay: 4s;
}

.car::before {
    content: '';
    position: absolute;
    top: -8px;
    left: 15px;
    width: 30px;
    height: 15px;
    background: rgba(255, 255, 255, 0.3);
    border-radius: 8px;
    box-shadow: inset 0 0 10px rgba(255, 255, 255, 0.5);
}

@keyframes carMove {
    0% { left: -100px; }
    100% { left: calc(100% + 100px); }
}

/* Semáforo animado */
.traffic-light {
    position: absolute;
    top: 20%;
    right: 5%;
    width: 20px;
    height: 60px;
    background: var(--asphalt-dark);
    border-radius: 10px;
    padding: 5px;
    box-shadow: 0 0 20px var(--shadow-dark);
}

.light {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    margin: 2px 0;
    opacity: 0.3;
    transition: all 0.5s ease;
}

.light.red { background: var(--red-signal); }
.light.yellow { background: var(--yellow-signal); }
.light.green { background: var(--green-signal); }

.light.active {
    opacity: 1;
    box-shadow: 0 0 10px currentColor;
}

/* Header */
.navbar {
    background: rgba(30, 34, 44, 0.98);
    backdrop-filter: blur(10px);
    padding: 1rem 2rem;
    position: fixed;
    top: 0;
    width: 100%;
    z-index: 1000;
    box-shadow: 0 2px 20px #000a;
    display: flex;
    justify-content: space-between;
    align-items: center;
    animation: slideDown 0.8s ease-out;
    border-bottom: 2px solid var(--lane-yellow);
}

.logo-container {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.logo-icon {
    font-size: 2rem;
    animation: pulse 2s infinite;
}

.navbar h1 {
    font-size: 1.8rem;
    font-weight: 700;
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.tagline {
    font-size: 0.9rem;
    color: #ffe066;
    font-weight: 400;
    letter-spacing: 1px;
    text-shadow: 0 1px 8px #000a;
}

@keyframes slideDown {
    from {
        transform: translateY(-100%);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

@keyframes pulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.1); }
}

/* Seção Hero */
.hero-section {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    background: linear-gradient(135deg, #23272f 60%, #181c22 100%);
    position: relative;
    overflow: hidden;
    border-bottom: 4px solid var(--lane-yellow);
}

.hero-content {
    max-width: 800px;
    padding: 2rem;
    animation: fadeInUp 1s ease-out 0.5s both;
}

.hero-title {
    font-size: 3.5rem;
    font-weight: 700;
    color: #ffe066;
    margin-bottom: 1rem;
    text-shadow: 2px 2px 4px var(--shadow-dark);
    animation: slideInLeft 1s ease-out 0.8s both;
    letter-spacing: 2px;
}

.hero-subtitle {
    font-size: 1.3rem;
    color: #e3eaf7;
    margin-bottom: 2rem;
    animation: slideInRight 1s ease-out 1s both;
    text-shadow: 0 1px 8px #000a;
}

.cta-buttons {
    display: flex;
    gap: 1rem;
    justify-content: center;
    flex-wrap: wrap;
    animation: fadeIn 1s ease-out 1.2s both;
}

.btn-primary, .btn-secondary {
    padding: 15px 30px;
    border: none;
    border-radius: 50px;
    font-size: 1.1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.btn-primary {
    background: linear-gradient(135deg, #ffe066, #ff3333 80%);
    color: #23272f;
    box-shadow: 0 5px 15px #ff333355;
    border: 2px solid #ffe066;
}

.btn-primary:hover {
    transform: translateY(-2px) scale(1.04);
    box-shadow: 0 8px 25px #ff333388;
    background: linear-gradient(135deg, #ff3333, #ffe066 80%);
    color: #fff;
}

.btn-secondary {
    background: transparent;
    color: #ffe066;
    border: 2px solid #ffe066;
}

.btn-secondary:hover {
    background: #ffe066;
    color: #23272f;
    transform: translateY(-2px);
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes slideInLeft {
    from {
        opacity: 0;
        transform: translateX(-50px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes slideInRight {
    from {
        opacity: 0;
        transform: translateX(50px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

/* Container */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 2rem;
}


/* Seção Sobre */
.about-section {
    padding: 5rem 0;
    background: linear-gradient(120deg, #23272f 60%, #181c22 100%);
    position: relative;
    border-radius: 0 0 40px 40px;
    box-shadow: 0 8px 32px rgba(0,0,0,0.06);
    border-bottom: 2px solid var(--lane-yellow);
}

.about-content h2 {
    font-size: 2.5rem;
    text-align: center;
    margin-bottom: 2rem;
    color: #ffe066;
    position: relative;
    text-shadow: 0 1px 8px #000a;
}

.about-content h2::after {
    content: '';
    position: absolute;
    bottom: -10px;
    left: 50%;
    transform: translateX(-50%);
    width: 100px;
    height: 4px;
    background: var(--gradient-primary);
    border-radius: 2px;
}

.about-content p {
    font-size: 1.2rem;
    text-align: center;
    margin-bottom: 3rem;
    color: #e3eaf7;
    line-height: 1.8;
}

.features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
    margin-top: 3rem;
}


.feature-card {
    background: linear-gradient(135deg, #23272f 60%, #23272f 100%);
    padding: 2.5rem 2rem;
    border-radius: 22px;
    text-align: center;
    box-shadow: 0 8px 32px #0004;
    transition: all 0.3s cubic-bezier(.4,2,.3,1);
    border: 2px solid #ffe06633;
    position: relative;
    overflow: hidden;
}

.feature-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: var(--gradient-primary);
    transition: left 0.5s ease;
    z-index: -1;
    opacity: 0.1;
}

.feature-card:hover::before {
    left: 0;
}

.feature-card:hover {
    transform: scale(1.04) translateY(-8px) rotate(-1deg);
    box-shadow: 0 24px 48px 0 rgba(0, 200, 255, 0.13);
    border-color: var(--sky-blue);
    background: linear-gradient(135deg, #e3f6fd 40%, #fff 100%);
}

.feature-icon {
    font-size: 3.2rem;
    margin-bottom: 1.2rem;
    animation: bounce 2s infinite;
    filter: drop-shadow(0 2px 8px #b2ebf2);
}

.feature-card h3 {
    font-size: 1.6rem;
    margin-bottom: 1rem;
    color: #ffe066;
    letter-spacing: 1px;
    font-weight: 700;
    text-shadow: 0 1px 8px #000a;
}

.feature-card p {
    color: #e3eaf7;
    line-height: 1.7;
    font-size: 1.08rem;
}

@keyframes bounce {
    0%, 20%, 50%, 80%, 100% { transform: translateY(0); }
    40% { transform: translateY(-10px); }
    60% { transform: translateY(-5px); }
}

/* Seção de Estatísticas */
.stats-section {
    padding: 4rem 0;
    background: var(--gradient-primary);
    color: white;
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 2rem;
    text-align: center;
}

.stat-item {
    display: flex;
    flex-direction: column;
    align-items: center;
}

.stat-number {
    font-size: 3rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
    text-shadow: 2px 2px 4px var(--shadow-dark);
}

.stat-label {
    font-size: 1.1rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    opacity: 0.9;
}

/* Footer */
footer {
    background: linear-gradient(90deg, #181c22 0%, #23272f 100%);
    color: #fff;
    text-align: center;
    padding: 2.5rem 0 1.5rem 0;
    border-radius: 32px 32px 0 0;
    box-shadow: 0 -4px 24px rgba(0,0,0,0.08);
    font-size: 1.1rem;
    border-top: 2px solid var(--lane-yellow);
}

footer p {
    margin: 0;
    opacity: 0.85;
    letter-spacing: 1px;
}

/* Animações de scroll */
.scroll-animate {
    opacity: 0;
    transform: translateY(30px);
    transition: all 0.6s ease;
}

.scroll-animate.active {
    opacity: 1;
    transform: translateY(0);
}

/* Responsividade */
@media (max-width: 768px) {
    .navbar {
        flex-direction: column;
        gap: 0.5rem;
        padding: 1rem;
    }
    
    .hero-title {
        font-size: 2.5rem;
    }
    
    .hero-subtitle {
        font-size: 1.1rem;
    }
    
    .cta-buttons {
        flex-direction: column;
        align-items: center;
    }
    
    .features-grid {
        grid-template-columns: 1fr;
    }
    
    .stats-grid {
        grid-template-columns: 1fr;
        gap: 3rem;
    }
    
    .traffic-light {
        right: 2%;
        top: 15%;
    }
    
    .car {
        width: 40px;
        height: 20px;
    }
}

@media (max-width: 480px) {
    .hero-title {
        font-size: 2rem;
    }
    
    .container {
        padding: 0 1rem;
    }
    
    .about-content h2 {
        font-size: 2rem;
    }
}

/* Otimizações de performance */
* {
    will-change: auto;
}

.car, .traffic-light .light, .logo-icon {
    will-change: transform;
}

/* Smooth scrolling */
html {
    scroll-behavior: smooth;
}

/* Preload de animações críticas */
.hero-section,
.navbar,
.traffic-animation {
    transform: translateZ(0);
    backface-visibility: hidden;
}


/* Estilos para os cards de cursos */
.curso-card {
    background: linear-gradient(120deg, #23272f 60%, #181c22 100%);
    border-radius: 20px;
    box-shadow: 0 8px 32px rgba(0,0,0,0.10);
    border: 2px solid #ffe06633;
    transition: all 0.3s cubic-bezier(.4,2,.3,1);
    animation: slideInUp 0.6s ease-out;
    position: relative;
    overflow: hidden;
}

.curso-card:hover {
    transform: scale(1.04) translateY(-8px) rotate(-1deg);
    box-shadow: 0 24px 48px 0 #ffe06622 !important;
    border-color: #ffe066;
    background: linear-gradient(120deg, #181c22 40%, #23272f 100%);
}

.curso-card a {
    transition: all 0.2s cubic-bezier(.4,2,.3,1);
    color: #ffe066 !important;
    background: #23272f !important;
    border: 1px solid #ffe06644;
}

.curso-card a:hover {
    transform: scale(1.03) translateY(-2px);
    box-shadow: 0 5px 15px rgba(0,0,0,0.13);
    filter: brightness(1.08);
    background: #ffe066 !important;
    color: #23272f !important;
}
.curso-card:nth-child(1) { animation-delay: 0.1s; border-left: 6px solid #ffe066; }
.curso-card:nth-child(2) { animation-delay: 0.2s; border-left: 6px solid #ff3333; }
.curso-card:nth-child(3) { animation-delay: 0.3s; border-left: 6px solid #00ff66; }
.curso-card:nth-child(4) { animation-delay: 0.4s; border-left: 6px solid #74b9ff; }
.curso-card:nth-child(5) { animation-delay: 0.5s; border-left: 6px solid #fdcb6e; }

.cursos-grid {
    animation: fadeInUp 0.8s ease-out;
}

.curso-card:nth-child(1) { animation-delay: 0.1s; }
.curso-card:nth-child(2) { animation-delay: 0.2s; }
.curso-card:nth-child(3) { animation-delay: 0.3s; }
.curso-card:nth-child(4) { animation-delay: 0.4s; }
.curso-card:nth-child(5) { animation-delay: 0.5s; }

@keyframes slideInUp {
    from {
        opacity: 0;
        transform: translateY(50px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}
