/*
Arquivo: styles.css
Caminho Sugerido: /css/styles.css
Descrição: Estilos sofisticados e responsivos para o sistema de cursos NR da Hxm Engenharia.
*/

/* 1. Reset Básico, Fontes e Variáveis */
@import url('https://fonts.googleapis.com/css2?family=Poppins:wght@300;400;600;700&display=swap');

:root {
    --primary-color: #004d99;      /* Azul Corporativo (Hxm) */
    --secondary-color: #ff9900;    /* Laranja (Destaque) */
    --accent-color: #007bff;       /* Azul Claro para Links/Foco */
    --text-dark: #212529;          /* Preto Suave */
    --text-light: #ffffff;
    --bg-light: #f8f9fa;           /* Cinza muito claro */
    --bg-dark: #343a40;            /* Cinza Escuro */
    --font-family: 'Poppins', sans-serif;
    --shadow-subtle: 0 4px 12px rgba(0, 0, 0, 0.08); /* Sombra mais refinada */
    --border-radius: 8px;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: var(--font-family);
    line-height: 1.6;
    color: var(--text-dark);
    background: var(--bg-light);
}

h1, h2, h3 {
    font-weight: 600; /* Mais peso para títulos */
    color: var(--text-dark);
}

/* Container para Centralizar Conteúdo */
.container {
    width: 90%;
    max-width: 1200px;
    margin: auto;
    overflow: hidden;
}

/* 2. Botões Sofisticados */
.btn {
    display: inline-block;
    padding: 12px 25px;
    margin: 10px 0;
    text-decoration: none;
    border-radius: var(--border-radius);
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    text-align: center;
    border: none;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.btn-primary {
    background: var(--primary-color);
    color: var(--text-light);
}

.btn-primary:hover {
    background: #003a73;
    box-shadow: 0 6px 15px rgba(0, 77, 153, 0.3);
    transform: translateY(-2px);
}

.btn-secondary {
    background: var(--secondary-color);
    color: var(--text-dark);
}

.btn-secondary:hover {
    background: #cc7a00;
    box-shadow: 0 6px 15px rgba(255, 153, 0, 0.3);
    transform: translateY(-2px);
}

.btn-full-width {
    width: 100%;
    font-size: 1.1em;
    padding: 15px;
}

/* 3. Estilização do Cabeçalho (Header) */
#header {
    background: var(--bg-dark);
    color: var(--text-light);
    padding: 15px 0;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.15);
}

.header-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo img {
    height: 40px;
}

.main-nav ul {
    list-style: none;
    display: flex;
}

.main-nav ul li a {
    color: var(--text-light);
    text-decoration: none;
    padding: 0 18px;
    font-weight: 400;
    transition: color 0.3s ease, border-bottom 0.3s ease;
}

.main-nav ul li a:hover {
    color: var(--secondary-color);
    border-bottom: 2px solid var(--secondary-color);
}

/* 4. Banner Principal (Hero Section) */
#hero, #curso-header {
    background: linear-gradient(135deg, var(--primary-color) 0%, #0066cc 100%); /* Gradiente Azul */
    color: var(--text-light);
    text-align: center;
    padding: 120px 0 80px 0;
    position: relative;
    overflow: hidden;
}

#hero h1, #curso-header h1 {
    font-size: 3em;
    margin-bottom: 10px;
    font-weight: 700;
    color: var(--text-light); /* Títulos brancos no banner */
}

#hero p, #curso-header p {
    font-size: 1.1em;
    font-weight: 300;
    opacity: 0.9;
}

/* 5. Seções Genéricas */
section {
    padding: 70px 0;
    text-align: center;
}

section h2 {
    font-size: 2.2em;
    margin-bottom: 40px;
    color: var(--primary-color);
    border-bottom: 3px solid var(--secondary-color);
    display: inline-block;
    padding-bottom: 5px;
}

.bg-light {
    background: var(--bg-light);
}

/* 6. Diferenciais */
.diferenciais-grid {
    display: flex;
    justify-content: space-around;
    gap: 30px;
    margin-top: 30px;
    text-align: left;
}

.diferencial-item {
    flex: 1;
    padding: 30px;
    background: white;
    border-radius: var(--border-radius);
    box-shadow: var(--shadow-subtle);
    transition: transform 0.3s ease;
}

.diferencial-item:hover {
    transform: translateY(-5px);
}

.diferencial-item h3 {
    color: var(--secondary-color);
    margin-bottom: 15px;
    font-size: 1.4em;
}

/* 7. Catálogo de Cursos (Tabela) */
.cursos-table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 30px;
    box-shadow: var(--shadow-subtle);
    text-align: left;
    border-radius: var(--border-radius);
    overflow: hidden;
}

.cursos-table th, .cursos-table td {
    padding: 18px;
    border-bottom: 1px solid #e9ecef;
}

.cursos-table th {
    background-color: var(--primary-color);
    color: var(--text-light);
    font-weight: 600;
    text-transform: uppercase;
}

.cursos-table tr:nth-child(even) {
    background-color: #f6f6f6;
}

.cursos-table tr:hover {
    background-color: #e9ecef;
}

/* 8. Estilos para Páginas de Curso (Detalhes e Formulário) */

/* Layout de duas colunas para detalhes e matrícula */
.curso-layout {
    display: flex;
    gap: 50px;
    align-items: flex-start; 
}

/* Coluna Principal (Conteúdo Detalhado) */
.curso-detalhes {
    flex: 3; 
    text-align: left;
}

/* Informações Rápidas */
.info-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
    margin-bottom: 40px;
}

.info-box {
    background: white;
    padding: 20px;
    border-radius: var(--border-radius);
    border-left: 5px solid var(--secondary-color);
    box-shadow: var(--shadow-subtle);
}

.info-box h3 {
    font-size: 1.1em;
    color: var(--primary-color);
    margin-bottom: 5px;
}
.info-box p {
    font-weight: 600;
}

/* Listas de Programa e Vantagens */
.programa-lista, .vantagens-lista {
    list-style: none;
    padding-left: 0;
    margin-top: 20px;
}

.programa-lista li, .vantagens-lista li {
    padding: 10px 0 10px 0;
    margin-bottom: 5px;
    border-bottom: 1px solid #e9ecef;
    position: relative;
    padding-left: 30px;
    text-align: left;
}
.programa-lista li::before, .vantagens-lista li::before {
    content: '✓'; /* Ícone de check */
    color: var(--secondary-color);
    font-weight: bold;
    position: absolute;
    left: 0;
}


/* Coluna de Matrícula (Formulário) */
.curso-matricula {
    flex: 2;
    position: sticky;
    top: 30px;
    /* Adicionado para responsividade em layout flexível */
    width: 100%; 
}

/* FORMULÁRIO APRIMORADO */
.form-card {
    background: white;
    padding: 35px;
    border-radius: var(--border-radius);
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.15);
    border: 1px solid #ced4da;
    transition: transform 0.4s ease, box-shadow 0.4s ease;
    
    position: relative;
    padding-top: 45px; /* Espaço para o novo head */
    text-align: center;
}

/* Estilo do cabeçalho do formulário */
.form-card h3 {
    background: var(--primary-color);
    color: var(--text-light);
    font-size: 1.5em;
    padding: 15px 10px;
    /* Puxa para fora do padding do form-card, usando o padding original (35px) */
    margin: -45px -35px 30px -35px; 
    border-top-left-radius: var(--border-radius);
    border-top-right-radius: var(--border-radius);
    font-weight: 700;
}


/* Estilos dos Campos do Formulário */
.form-group {
    text-align: left;
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    font-weight: 600;
    margin-bottom: 5px;
    font-size: 0.9em;
    color: var(--text-dark);
}

.form-group input, .form-group select {
    width: 100%;
    padding: 12px;
    border: 1px solid #ced4da;
    border-radius: var(--border-radius);
    font-size: 1em;
    transition: border-color 0.3s ease, box-shadow 0.3s ease;
}

.form-group input:focus, .form-group select:focus {
    border-color: var(--accent-color);
    box-shadow: 0 0 0 0.2rem rgba(0, 123, 255, 0.25);
    outline: none;
}

/* Estilo para a mensagem de urgência/preço (Chamada para Ação Forte) */
.cta-urgencia {
    background: #fff3cd; /* Fundo amarelo claro */
    border: 2px solid var(--secondary-color); /* Borda laranja forte */
    color: var(--text-dark);
    text-align: center;
    padding: 20px;
    margin: 25px 0;
    border-radius: var(--border-radius);
    animation: pulse-border 1.5s infinite alternate; /* Aplica animação */
}

.cta-urgencia strong {
    color: #dc3545; /* Cor vermelha para chamar atenção */
    font-size: 2.2em;
}

.cta-urgencia span {
    display: block;
    font-size: 0.9em;
    font-style: italic;
    margin-top: 5px;
}

/* Definição da Animação (Pulsação sutil na borda) */
@keyframes pulse-border {
    from {
        box-shadow: 0 0 0 0 rgba(255, 153, 0, 0.4);
    }
    to {
        box-shadow: 0 0 0 10px rgba(255, 153, 0, 0);
    }
}


.garantia {
    font-size: 0.85em;
    color: #6c757d;
    margin-top: 10px;
}

/* 9. Rodapé (Footer) */
#footer {
    background: var(--bg-dark);
    color: var(--text-light);
    padding: 40px 0 20px 0;
    box-shadow: 0 -2px 5px rgba(0, 0, 0, 0.1);
}

.footer-content {
    display: flex;
    justify-content: space-between;
    text-align: left;
}

.footer-content h4 {
    color: var(--secondary-color);
    margin-bottom: 15px;
    font-weight: 600;
}

.footer-links ul {
    list-style: none;
}

.footer-links ul li a {
    color: #bdbdbd; /* Cinza claro */
    text-decoration: none;
    display: block;
    padding: 6px 0;
    transition: color 0.3s ease;
}

.footer-links ul li a:hover {
    color: var(--secondary-color);
}

.footer-bottom {
    text-align: center;
    margin-top: 30px;
    padding-top: 15px;
    border-top: 1px solid #495057;
    font-size: 0.8em;
}

/* 10. Responsividade Aprimorada */
@media screen and (max-width: 992px) {
    /* Layout de duas colunas empilha */
    .curso-layout {
        flex-direction: column; 
    }
    
    .curso-matricula {
        position: static; /* Desativa o sticky no mobile/tablet */
        margin-top: 30px;
    }

    /* Outras seções empilham */
    .diferenciais-grid {
        flex-direction: column;
        gap: 20px;
    }
}

@media screen and (max-width: 768px) {
    #hero h1, #curso-header h1 {
        font-size: 2em; /* Reduz o tamanho da fonte principal */
    }
    
    .header-content {
        flex-direction: column;
        text-align: center;
    }
    
    .main-nav ul {
        margin-top: 10px;
        flex-direction: column;
        align-items: center;
    }
    
    .footer-content {
        flex-direction: column;
        gap: 30px;
    }
    
    .footer-info, .footer-links {
        width: 100%;
        text-align: center;
    }

    /* Ajusta o padding do form-card e o margin do H3 no mobile */
    .form-card {
        padding: 25px; 
    }
    
    .form-card h3 {
        /* Ajusta o puxamento para fora para o padding de 25px */
        margin: -35px -25px 20px -25px; 
        font-size: 1.3em;
    }
    
    /* Ajusta a tabela para responsividade (Lista) */
    .cursos-table td {
        text-align: right;
        padding-left: 50%;
    }
}