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

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: linear-gradient(120deg, #e0e7ef 0%, #b6d0f7 60%, #3b82f6 100%);
    background-attachment: fixed;
    min-height: 100vh;
    color: #222;
}

/* ===== HEADER / CABEÇALHO ===== */
#cabecalho {
    background: linear-gradient(135deg, #1e3a8a 0%, #2563eb 50%, #3b82f6 100%);
    color: white;
    padding: 30px 20px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
    border-bottom: 3px solid #60a5fa;
    margin-bottom: 30px;
}

header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    background: linear-gradient(135deg, #1e3a8a 0%, #2563eb 50%, #3b82f6 100%);
    color: white;
    padding: 20px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.15);
    border-bottom: 3px solid #60a5fa;
}

.cabecalho-top {
    text-align: center;
    margin-bottom: 25px;
}

#cabecalho h1 {
    font-size: 2.5em;
    margin-bottom: 10px;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.3);
}

#cabecalho p {
    font-size: 1.1em;
    opacity: 0.95;
}

header h1 {
    font-size: 1.8em;
    margin: 0;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.3);
}

.header-top {
    text-align: center;
    margin-bottom: 15px;
}

header p {
    font-size: 0.95em;
    opacity: 0.95;
}

/* ===== BARRA DE PROGRESSO ===== */
.barra-progresso {
    width: 100%;
    height: 8px;
    background-color: rgba(255, 255, 255, 0.3);
    border-radius: 10px;
    overflow: hidden;
    margin-top: 15px;
}

.progresso {
    height: 100%;
    background: linear-gradient(90deg, #60a5fa 0%, #fbbf24 100%);
    border-radius: 10px;
    transition: width 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: flex-end;
    padding-right: 10px;
    color: white;
    font-size: 0.8em;
    font-weight: bold;
}

/* ===== NAVEGAÇÃO ===== */
.cabecalho-nav {
    display: flex;
    justify-content: center;
    gap: 30px;
    flex-wrap: wrap;
}

.nav-links {
    display: flex;
    justify-content: center;
    gap: 20px;
    flex-wrap: wrap;
}

nav a, .nav-links a {
    color: white;
    text-decoration: none;
    font-size: 1em;
    padding: 10px 20px;
    border-radius: 5px;
    transition: all 0.3s ease;
    background-color: rgba(255, 255, 255, 0.1);
    border: 2px solid rgba(255, 255, 255, 0.3);
}

nav a:hover, .nav-links a:hover {
    background-color: rgba(255, 255, 255, 0.3);
    border-color: white;
    transform: translateY(-2px);
}

/* ===== CONTEÚDO PRINCIPAL ===== */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
}

.conteudo {
    background: white;
    border-radius: 15px;
    padding: 40px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.1);
    margin-bottom: 30px;
}

.conteudo h2 {
    color: #1e3a8a;
    margin-bottom: 20px;
    font-size: 2em;
    border-bottom: 3px solid #3b82f6;
    padding-bottom: 10px;
}

.conteudo h3 {
    color: #2563eb;
    margin-top: 25px;
    margin-bottom: 15px;
    font-size: 1.4em;
}

.conteudo p {
    line-height: 1.8;
    margin-bottom: 15px;
    color: #444;
    font-size: 1.05em;
}

/* ===== TEMAS E SUBTEMAS ===== */
.temas {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 20px;
    margin: 30px 0;
}

.tema-card {
    background: linear-gradient(135deg, #3b82f6 0%, #60a5fa 100%);
    color: white;
    padding: 25px;
    border-radius: 10px;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.tema-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
}

.tema-card h3 {
    color: white;
    margin-bottom: 15px;
}

.tema-card ul {
    list-style: none;
    padding: 0;
}

.tema-card li {
    padding: 8px 0;
    padding-left: 20px;
    position: relative;
}



/* ===== MATERIAL DIDÁTICO ===== */
.material-didatico {
    background: linear-gradient(135deg, #f3f4f6 0%, #e5e7eb 100%);
    padding: 25px;
    border-radius: 10px;
    margin: 20px 0;
    border-left: 5px solid #3b82f6;
}

.material-didatico h3 {
    color: #1e3a8a;
}

.material-didatico p {
    color: #333;
}

/* ===== VÍDEO ===== */
.video-container {
    position: relative;
    width: 100%;
    max-width: 800px;
    margin: 30px auto;
    padding-bottom: 56.25%;
    height: 0;
    overflow: hidden;
    border-radius: 10px;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.1);
}

.video-container iframe {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border: none;
}

.video-placeholder {
    background: linear-gradient(135deg, #1e3a8a 0%, #2563eb 50%, #3b82f6 100%);
    width: 100%;
    height: 400px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 1.2em;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.1);
    margin: 30px 0;
}

/* ===== QUIZ ===== */
.quiz-container {
    background: linear-gradient(135deg, #f9fafb 0%, #f3f4f6 100%);
    padding: 30px;
    border-radius: 10px;
    margin: 30px 0;
    border: 2px solid #3b82f6;
}

.questao {
    margin: 25px 0;
    padding: 20px;
    background: white;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}

.questao p {
    font-weight: bold;
    color: #1e3a8a;
    margin-bottom: 15px;
}

.opcoes {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.opcoes label {
    display: flex;
    align-items: center;
    padding: 12px;
    background: #f9fafb;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.2s ease;
    border: 2px solid transparent;
}

.opcoes label:hover {
    background: #f3f4f6;
    border-color: #3b82f6;
}

.opcoes input[type="radio"] {
    margin-right: 12px;
    cursor: pointer;
    accent-color: #3b82f6;
}

/* ===== BOTÕES ===== */
.botoes {
    display: flex;
    gap: 15px;
    justify-content: center;
    flex-wrap: wrap;
    margin-top: 30px;
}

.btn {
    padding: 12px 30px;
    font-size: 1em;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
    font-weight: bold;
    text-decoration: none;
    display: inline-block;
}

.btn-primary {
    background: linear-gradient(135deg, #3b82f6 0%, #2563eb 100%);
    color: white;
    box-shadow: 0 4px 15px rgba(59, 130, 246, 0.4);
}

.btn-primary:hover {
    transform: translateY(-3px);
    box-shadow: 0 6px 20px rgba(59, 130, 246, 0.6);
}

.btn-secondary {
    background: linear-gradient(135deg, #6b7280 0%, #4b5563 100%);
    color: white;
}

.btn-secondary:hover {
    transform: translateY(-3px);
    box-shadow: 0 6px 20px rgba(107, 114, 128, 0.4);
}

.btn-success {
    background: linear-gradient(135deg, #10b981 0%, #059669 100%);
    color: white;
}

.btn-success:hover {
    transform: translateY(-3px);
    box-shadow: 0 6px 20px rgba(16, 185, 129, 0.4);
}

.btn-logout {
    background: linear-gradient(135deg, #ef4444 0%, #dc2626 100%);
    color: white;
    padding: 8px 16px;
    font-size: 0.9em;
}

.btn-logout:hover {
    box-shadow: 0 6px 20px rgba(239, 68, 68, 0.4);
}

/* ===== CONCLUSÃO ===== */
.conclusao {
    background: linear-gradient(135deg, #10b981 0%, #059669 100%);
    color: white;
    padding: 30px;
    border-radius: 10px;
    text-align: center;
    margin: 30px 0;
    box-shadow: 0 5px 20px rgba(16, 185, 129, 0.3);
}

.conclusao h3 {
    color: white;
    font-size: 1.8em;
    margin-bottom: 15px;
}

.conclusao p {
    color: rgba(255, 255, 255, 0.95);
    font-size: 1.1em;
}

/* ===== CERTIFICADO ===== */
.certificado {
    background: linear-gradient(135deg, #fef3c7 0%, #fde68a 100%);
    border: 10px solid #1e3a8a;
    border-radius: 15px;
    padding: 60px 40px;
    text-align: center;
    max-width: 900px;
    margin: 40px auto;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.15);
    font-family: 'Georgia', serif;
}

.certificado-titulo {
    font-size: 3em;
    color: #1e3a8a;
    margin-bottom: 20px;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.1);
}

.certificado-nome {
    font-size: 2.5em;
    color: #d97706;
    margin: 30px 0;
    border-bottom: 3px solid #1e3a8a;
    padding-bottom: 15px;
}

.certificado-texto {
    font-size: 1.2em;
    color: #333;
    line-height: 1.8;
    margin: 25px 0;
}

.certificado-data {
    margin-top: 50px;
    color: #555;
}

/* ===== RESPONSIVIDADE ===== */

/* Tablets (768px e abaixo) */
@media (max-width: 768px) {
    body {
        padding-top: 0;
    }

    header {
        position: fixed;
        padding: 15px 10px;
        top: 0;
        left: 0;
        right: 0;
    }

    .container {
        padding-top: 200px;
        padding-left: 15px;
        padding-right: 15px;
    }

    #cabecalho h1 {
        font-size: 1.8em;
        margin-bottom: 5px;
    }

    #cabecalho p {
        font-size: 0.95em;
    }

    header h1 {
        font-size: 1.5em;
    }

    header p {
        font-size: 0.85em;
    }

    .conteudo {
        padding: 20px;
        margin-bottom: 25px;
    }

    .conteudo h2 {
        font-size: 1.6em;
    }

    .conteudo h3 {
        font-size: 1.2em;
    }

    .conteudo p {
        font-size: 1em;
    }

    .temas {
        grid-template-columns: 1fr;
        gap: 15px;
    }

    .tema-card {
        padding: 20px;
    }

    .cabecalho-nav {
        flex-direction: row;
        gap: 10px;
    }

    .video-placeholder {
        height: 300px;
    }

    .certificado {
        padding: 30px 20px;
        border: 5px solid #1e3a8a;
        margin: 20px 10px;
    }

    .certificado-titulo {
        font-size: 2em;
    }

    .certificado-nome {
        font-size: 1.6em;
    }

    .certificado-texto {
        font-size: 1em;
    }

    .material-didatico {
        padding: 20px;
        margin: 15px 0;
    }

    .botoes {
        flex-direction: row;
        gap: 10px;
        flex-wrap: wrap;
    }

    .btn {
        padding: 10px 15px;
        font-size: 0.95em;
        flex: 1;
        min-width: 120px;
    }

    .quiz-container {
        padding: 20px;
        margin: 20px 0;
    }

    .questao {
        padding: 15px;
        margin: 15px 0;
    }
}

/* Smartphones - Médios (600px e abaixo) */
@media (max-width: 600px) {
    .container {
        padding-top: 180px;
        padding-left: 10px;
        padding-right: 10px;
    }

    #cabecalho h1 {
        font-size: 1.5em;
    }

    header h1 {
        font-size: 1.3em;
    }

    .header-top {
        margin-bottom: 10px;
    }

    .conteudo {
        padding: 15px;
        border-radius: 10px;
    }

    .conteudo h2 {
        font-size: 1.4em;
        margin-bottom: 15px;
    }

    .conteudo h3 {
        font-size: 1.1em;
        margin-top: 15px;
    }

    .conteudo p {
        font-size: 0.95em;
        line-height: 1.6;
    }

    .temas {
        grid-template-columns: 1fr;
        gap: 12px;
    }

    .tema-card {
        padding: 15px;
        border-radius: 8px;
    }

    .tema-card h3 {
        margin-bottom: 10px;
        font-size: 1.1em;
    }

    .tema-card li {
        padding: 6px 0;
        font-size: 0.95em;
    }

    .botoes {
        flex-direction: column;
        gap: 10px;
    }

    .btn {
        width: 100%;
        padding: 12px 20px;
        font-size: 0.95em;
    }

    .btn-primary, .btn-secondary, .btn-success {
        min-height: 44px;
    }

    .quiz-container {
        padding: 15px;
        border-radius: 8px;
    }

    .questao {
        padding: 12px;
        margin: 12px 0;
    }

    .questao p {
        font-size: 0.95em;
    }

    .opcoes label {
        padding: 10px;
        font-size: 0.95em;
    }

    .opcoes input[type="radio"] {
        margin-right: 10px;
    }

    .video-placeholder {
        height: 250px;
    }

    .material-didatico {
        padding: 15px;
        margin: 15px 0;
        border-left: 4px solid #3b82f6;
    }

    .certificado {
        padding: 20px 15px;
        border: 3px solid #1e3a8a;
        margin: 15px 0;
    }

    .certificado-titulo {
        font-size: 1.6em;
    }

    .certificado-nome {
        font-size: 1.3em;
    }

    .certificado-texto {
        font-size: 0.95em;
    }

    .conclusao {
        padding: 20px;
    }

    .conclusao h3 {
        font-size: 1.4em;
    }
}

/* Smartphones - Pequenos (480px e abaixo) */
@media (max-width: 480px) {
    .container {
        padding-top: 160px;
        padding-left: 8px;
        padding-right: 8px;
    }

    header {
        padding: 12px 8px;
    }

    #cabecalho h1 {
        font-size: 1.3em;
        margin-bottom: 3px;
    }

    #cabecalho p {
        font-size: 0.85em;
    }

    header h1 {
        font-size: 1.1em;
        margin-bottom: 2px;
    }

    header p {
        font-size: 0.75em;
    }

    .conteudo {
        padding: 12px;
        margin-bottom: 20px;
    }

    .conteudo h2 {
        font-size: 1.2em;
        margin-bottom: 12px;
        padding-bottom: 8px;
    }

    .conteudo h3 {
        font-size: 1em;
        margin-top: 12px;
        margin-bottom: 10px;
    }

    .conteudo p {
        font-size: 0.9em;
        margin-bottom: 10px;
        line-height: 1.5;
    }

    .conteudo ul li {
        font-size: 0.9em;
        margin-bottom: 5px;
    }

    .temas {
        grid-template-columns: 1fr;
        gap: 10px;
    }

    .tema-card {
        padding: 12px;
    }

    .tema-card h3 {
        margin-bottom: 8px;
        font-size: 1em;
    }

    .tema-card ul {
        list-style: none;
    }

    .tema-card li {
        padding: 4px 0;
        font-size: 0.9em;
        padding-left: 15px;
    }

    .tema-card li:before {
        left: 0;
    }

    .botoes {
        flex-direction: column;
        gap: 8px;
    }

    .btn {
        width: 100%;
        padding: 11px 15px;
        font-size: 0.9em;
        min-height: 44px;
    }

    .btn-logout {
        padding: 6px 12px;
        font-size: 0.8em;
    }

    .quiz-container {
        padding: 12px;
        border-radius: 6px;
    }

    .questao {
        padding: 10px;
        margin: 10px 0;
        border-radius: 6px;
    }

    .questao p {
        font-size: 0.9em;
        margin-bottom: 10px;
    }

    .opcoes {
        gap: 8px;
    }

    .opcoes label {
        padding: 8px;
        font-size: 0.9em;
    }

    .opcoes input[type="radio"] {
        margin-right: 8px;
    }

    .video-placeholder {
        height: 200px;
    }

    .material-didatico {
        padding: 12px;
        margin: 12px 0;
    }

    .material-didatico h3 {
        font-size: 1em;
    }

    .material-didatico p {
        font-size: 0.9em;
    }

    .certificado {
        padding: 15px 10px;
        border: 2px solid #1e3a8a;
        margin: 10px 0;
        border-radius: 10px;
    }

    .certificado-titulo {
        font-size: 1.3em;
    }

    .certificado-nome {
        font-size: 1.1em;
        margin: 15px 0;
    }

    .certificado-texto {
        font-size: 0.85em;
        line-height: 1.4;
    }

    .certificado-data {
        font-size: 0.85em;
        margin-top: 20px;
    }

    .conclusao {
        padding: 15px;
        margin: 15px 0;
    }

    .conclusao h3 {
        font-size: 1.2em;
        margin-bottom: 10px;
    }

    .conclusao p {
        font-size: 0.9em;
    }

    footer {
        padding: 15px 8px;
    }

    footer p {
        font-size: 0.85em;
    }

    .barra-progresso {
        height: 6px;
    }

    .progresso {
        font-size: 0.7em;
    }
}

/* ===== ACESSIBILIDADE ===== */
@media (prefers-reduced-motion: reduce) {
    * {
        animation: none !important;
        transition: none !important;
    }
}

button:focus,
a:focus,
input:focus {
    outline: 3px solid #fbbf24;
    outline-offset: 2px;
}

/* ===== FOOTER ===== */
footer {
    background: linear-gradient(135deg, #1e3a8a 0%, #2563eb 50%, #3b82f6 100%);
    color: white;
    text-align: center;
    padding: 20px;
    margin-top: 40px;
}

footer p {
    margin: 0;
    color: white;
}
