/* ===================================================================== */
/* ARQUIVO STUDY.CSS COMPLETO E CORRIGIDO         */
/* ===================================================================== */

/* Estilos para a página de estudos */
.study-page {
    padding: 40px 0;
    min-height: calc(100vh - 200px);
}

.nav-link.active {
    background: rgba(255, 255, 255, 0.2);
    border-radius: 6px;
}

/* Header da página */
.page-header {
    text-align: center;
    margin-bottom: 60px;
    padding: 40px;
    background: linear-gradient(135deg, #e3f2fd 0%, #bbdefb 100%);
    border-radius: 16px;
}

.page-header h1 {
    font-size: 3rem;
    font-weight: 700;
    color: #0056b3;
    margin-bottom: 16px;
}

.page-header p {
    font-size: 1.2rem;
    color: #666;
    margin-bottom: 40px;
}

.study-stats {
    display: flex;
    justify-content: center;
    gap: 60px;
}

.study-stats .stat {
    text-align: center;
}

.study-stats .stat-number {
    display: block;
    font-size: 2.5rem;
    font-weight: 700;
    color: #28a745;
}

.study-stats .stat-label {
    font-size: 1rem;
    color: #666;
}

/* Tópicos de Estudo */
.study-topics {
    margin-bottom: 60px;
}

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

.study-card {
    background: white;
    border-radius: 16px;
    padding: 30px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
    border: 2px solid transparent;
}

.study-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.15);
    border-color: #0056b3;
}

.study-icon {
    font-size: 3.5rem;
    text-align: center;
    margin-bottom: 20px;
}

.study-card h3 {
    font-size: 1.5rem;
    font-weight: 600;
    color: #0056b3;
    margin-bottom: 15px;
    text-align: center;
}

.study-description {
    color: #666;
    font-style: italic;
    text-align: center;
    margin-bottom: 25px;
    padding: 15px;
    background: #f8f9fa;
    border-radius: 8px;
    border-left: 4px solid #28a745;
}

.study-content {
    margin-bottom: 25px;
}

.study-content h4 {
    font-size: 1.1rem;
    font-weight: 600;
    color: #333;
    margin-bottom: 15px;
}

.study-content ul {
    list-style: none;
    padding: 0;
}

.study-content li {
    padding: 8px 0;
    padding-left: 25px;
    position: relative;
    color: #666;
    line-height: 1.5;
}

.study-content li::before {
    content: '✓';
    position: absolute;
    left: 0;
    color: #28a745;
    font-weight: bold;
}

.study-card .btn {
    width: 100%;
    margin-top: 10px;
}

/* ================================================= */
/* REGRAS DO MODAL (CORRIGIDAS)             */
/* ================================================= */

/* O contentor principal do modal. Fica escondido por defeito. */
.modal {
    display: none; /* Começa escondido */
    position: fixed; /* Fica fixo na tela */
    z-index: 1000;   /* Garante que fique à frente de tudo */
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    overflow-y: auto; /* Permite scroll se o conteúdo for grande */
    background-color: rgba(0, 0, 0, 0.6); /* Fundo escuro semi-transparente */
}

/* Classe que o JavaScript adiciona para MOSTRAR o modal */
.modal.is-visible {
    display: block; /* Torna o modal um bloco para ocupar espaço */
}

/* O seu estilo para a caixa de conteúdo do modal */
.modal-content.study-modal {
    max-width: 900px;
    max-height: 90vh; /* Aumenta a altura máxima para 90% da altura da tela */
    overflow-y: auto;
    background-color: #fefefe;
    margin: 5vh auto; /* Aumenta a margem superior para 5% da altura da tela */
    padding: 30px; /* Aumenta o preenchimento */
    border: 1px solid #888;
    width: 90%; /* Aumenta a largura para 90% da tela */
    border-radius: 8px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.3);
}


/* Outros estilos do modal */
.study-modal-content {
    padding: 20px 0;
    line-height: 1.8;
}

.study-modal-content h4 {
    color: #0056b3;
    font-size: 1.3rem;
    font-weight: 600;
    margin: 25px 0 15px 0;
    border-bottom: 2px solid #e1e5e9;
    padding-bottom: 8px;
}

.study-modal-content p {
    color: #333;
    margin-bottom: 15px;
    text-align: left; /* justificado deixava buracos entre as palavras */
}

.study-modal-content ul {
    margin: 15px 0;
    padding-left: 20px;
}

.study-modal-content li {
    color: #666;
    margin-bottom: 8px;
}

.study-modal-content .highlight {
    background: #fff3cd;
    padding: 15px;
    border-radius: 8px;
    border-left: 4px solid #ffc107;
    margin: 20px 0;
}

.study-modal-content .important {
    background: #d1ecf1;
    padding: 15px;
    border-radius: 8px;
    border-left: 4px solid #0056b3;
    margin: 20px 0;
}

.modal-footer {
    display: flex;
    justify-content: space-between;
    gap: 15px;
    padding-top: 20px;
    border-top: 1px solid #e1e5e9;
}

.modal-footer .btn {
    flex: 1;
}

/* Responsividade */
@media (max-width: 768px) {
    .page-header h1 {
        font-size: 2.5rem;
    }
    
    .study-stats {
        flex-direction: column;
        gap: 30px;
    }
    
    .topics-grid {
        grid-template-columns: 1fr;
    }
    
    .study-card {
        padding: 25px 20px;
    }
    
    .modal-content.study-modal {
        max-width: 95vw;
        margin: 5vh auto;
    }
    
    .modal-footer {
        flex-direction: column;
    }
}

@media (max-width: 480px) {
    .page-header {
        padding: 30px 20px;
    }
    
    .page-header h1 {
        font-size: 2rem;
    }
    
    .study-icon {
        font-size: 3rem;
    }
    
    .study-card h3 {
        font-size: 1.3rem;
    }
    
    .study-stats .stat-number {
        font-size: 2rem;
    }
}

/* Animações */
@keyframes slideInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.study-card {
    animation: slideInUp 0.6s ease forwards;
}

.study-card:nth-child(1) { animation-delay: 0.1s; }
.study-card:nth-child(2) { animation-delay: 0.2s; }
.study-card:nth-child(3) { animation-delay: 0.3s; }
.study-card:nth-child(4) { animation-delay: 0.4s; }
.study-card:nth-child(5) { animation-delay: 0.5s; }
.study-card:nth-child(6) { animation-delay: 0.6s; }
.study-card:nth-child(7) { animation-delay: 0.7s; }

/* Estados especiais */
.study-card.completed {
    border-color: #28a745;
    background: linear-gradient(135deg, #ffffff 0%, #f8fff9 100%);
}

.study-card.completed::after {
    content: '✓ Estudado';
    position: absolute;
    top: 15px;
    right: 15px;
    background: #28a745;
    color: white;
    padding: 4px 8px;
    border-radius: 12px;
    font-size: 0.8rem;
    font-weight: 600;
}



/* 🌟 Modal com rolagem interna e fundo branco-azulado */
.study-modal {
  background: #f7faff;
  border-radius: 10px;
  max-height: 85vh; /* limita o tamanho do modal */
  overflow-y: auto; /* ativa rolagem interna */
  padding: 20px;
  color: #1a1a1a;
}

.study-modal::-webkit-scrollbar {
  width: 8px;
}
.study-modal::-webkit-scrollbar-thumb {
  background: #007bff;
  border-radius: 10px;
}
.study-modal::-webkit-scrollbar-thumb:hover {
  background: #0056b3;
}

.study-modal-content img {
  max-width: 100%;
  border-radius: 8px;
  margin: 10px 0;
  box-shadow: 0 2px 6px rgba(0,0,0,0.1);
}
.study-modal-content h4 {
  color: #0056b3;
  border-bottom: 2px solid #007bff;
  padding-bottom: 4px;
}
.study-modal-content .highlight-box {
  background: #e8f1ff;
  border-left: 5px solid #007bff;
  padding: 10px 15px;
  margin: 15px 0;
  border-radius: 6px;
}




.topic-section{margin:18px 0}
.topic-subtitle{color:#0b63d7;margin:0 0 8px 0}
.highlight-box{
  background:#e7f1ff;border-left:5px solid #0b63d7;
  padding:12px 15px;border-radius:10px;color:#0a2a4a
}
.mini-table table{width:100%;border-collapse:collapse;margin-top:8px}
.mini-table th,.mini-table td{border:1px solid #bcd3ff;padding:8px;text-align:left}
.mini-table th{background:#edf4ff;color:#0a2a4a}
.bullet{list-style:disc;margin-left:22px}
.check{list-style:"✅  ";margin-left:6px}
.dash{list-style:"—  ";margin-left:6px}



.subtitle {
  color: #2563eb;
  font-weight: 600;
  margin-top: 18px;
}

.highlight {
  color: #1d4ed8;
  font-weight: 500;
}

.cta-container {
  background: #f0f9ff;
  border: 1px solid #dbeafe;
  padding: 12px;
  border-radius: 8px;
  text-align: center;
  margin-top: 16px;
}

.cta-text {
  color: #0f172a;
  font-weight: 500;
  margin-bottom: 8px;
}




.placas-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
    gap: 15px;
    margin-top: 20px;
}

.placa-card {
    text-align: center;
    background: #fff;
    border: 1px solid #ddd;
    border-radius: 10px;
    padding: 10px;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
}

.placa-card img {
    width: 120px;
    height: 120px;
    margin-bottom: 8px;
}

.placa-card p {
    font-size: 0.9rem;
    color: #333;
}
