:root {
    /* Paleta Michelassi (Vermelho e Cinza) */
    --primary-red: #cc0000;
    --primary-red-hover: #a30000;
    --dark-gray: #2d2d2d;
    --light-gray: #f5f5f7;
    --border-color: #e0e0e0;
    --text-main: #333333;
    --text-muted: #666666;
    --white: #ffffff;
    --shadow-soft: 0 8px 30px rgba(0, 0, 0, 0.08);
    --shadow-hover: 0 14px 40px rgba(204, 0, 0, 0.15);
    --transition-speed: 0.3s;
    --radius-lg: 16px;
    --radius-md: 8px;
}

[data-theme="dark"] {
    --primary-red: #ff4d4d;
    --primary-red-hover: #ff6666;
    --dark-gray: #e8eaed;
    /* Inverted for titles */
    --light-gray: #202124;
    /* Background */
    --border-color: #3c4043;
    --text-main: #bdc1c6;
    --text-muted: #9aa0a6;
    --white: #292a2d;
    /* Cards background */
    --shadow-soft: 0 8px 30px rgba(0, 0, 0, 0.5);
    --shadow-hover: 0 14px 40px rgba(255, 51, 51, 0.2);
}

.theme-toggle {
    background: var(--light-gray);
    border: 1px solid var(--border-color);
    width: 45px;
    height: 45px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    cursor: pointer;
    transition: all var(--transition-speed);
    color: var(--text-main);
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
    margin-left: auto;
}

.theme-toggle:hover {
    transform: scale(1.1);
    border-color: var(--primary-red);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Outfit', sans-serif;
}

html {
    scroll-behavior: smooth;
}

body {
    background-color: var(--light-gray);
    color: var(--text-main);
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* --- Header --- */
.main-header {
    background-color: var(--white);
    padding: 20px 0;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
    position: sticky;
    top: 0;
    z-index: 100;
}

.header-content {
    display: flex;
    align-items: center;
    gap: 30px;
}

.logo {
    height: 60px;
    object-fit: contain;
    transition: transform var(--transition-speed);
}

.logo:hover {
    transform: scale(1.05);
}

.header-text h1 {
    color: var(--dark-gray);
    font-weight: 800;
    font-size: 1.8rem;
    margin-bottom: 4px;
}

.header-text p {
    color: var(--text-muted);
    font-size: 0.95rem;
}

/* --- Main Content --- */
main {
    padding: 60px 20px;
}

.section-title {
    text-align: center;
    margin-bottom: 50px;
}

.section-title h2 {
    font-size: 2.5rem;
    color: var(--dark-gray);
    font-weight: 800;
}

.title-underline {
    height: 4px;
    width: 60px;
    background-color: var(--primary-red);
    margin: 10px auto 0;
    border-radius: 2px;
}

/* --- Vagas Grid --- */
.vagas-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 30px;
    align-items: start;
}

/* --- Vaga Card (Quadrado Premium) --- */
.vaga-card {
    background: var(--white);
    border-radius: var(--radius-lg);
    padding: 30px;
    text-align: left;
    box-shadow: var(--shadow-soft);
    position: relative;
    overflow: hidden;
    transition: all var(--transition-speed) ease;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    min-height: 280px; 
    cursor: auto;
    border: 1px solid var(--border-color);
}

.vaga-urgente {
    border: 3px solid var(--primary-red);
    box-shadow: 0 0 15px rgba(204, 0, 0, 0.2);
}

.vaga-card:hover {
    transform: translateY(-8px);
    box-shadow: var(--shadow-hover);
    border-color: rgba(204, 0, 0, 0.1);
}

.vaga-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 4px;
    background: var(--primary-red);
    transform: scaleX(0);
    transform-origin: left;
    transition: transform var(--transition-speed);
}

.vaga-card:hover::before {
    transform: scaleX(1);
}

.vaga-info {
    flex-grow: 1;
    display: flex;
    flex-direction: column;
}

.badge-urgente {
    display: inline-block;
    background: #ffebee;
    color: #c62828;
    border: 1px solid #ffcdd2;
    padding: 4px 10px;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 700;
    margin-bottom: 12px;
    letter-spacing: 0.5px;
}

.vaga-title {
    font-size: 1.6rem;
    color: var(--primary-red);
    font-weight: 800;
    margin-bottom: 20px;
    border-bottom: 2px solid var(--border-color);
    padding-bottom: 15px;
}

.vaga-desc {
    color: var(--text-muted);
    font-size: 0.95rem;
    margin-bottom: 15px;
    text-align: left;
}

.vaga-req {
    color: var(--dark-gray);
    font-size: 0.90rem;
    background: var(--light-gray);
    padding: 15px;
    border-radius: var(--radius-md);
    text-align: left;
    margin-top: 15px;
    margin-bottom: auto;
    border-left: 4px solid var(--primary-red);
    box-shadow: inset 0 0 0 1px rgba(0, 0, 0, 0.04);
}

.btn-candidatar {
    margin-top: 20px;
    padding: 12px 24px;
    background-color: var(--primary-red);
    color: var(--white);
    border: none;
    border-radius: 30px;
    font-weight: 600;
    font-size: 1rem;
    cursor: pointer;
    transition: background-color 0.2s, transform 0.2s;
    width: 100%;
}

.btn-candidatar:active {
    transform: scale(0.98);
}

.vaga-card:hover .btn-candidatar {
    background-color: var(--primary-red-hover);
}

.btn-linkedin {
    margin-top: 20px;
    padding: 12px;
    background-color: #0077b5; /* LinkedIn Blue */
    color: var(--white);
    border: none;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: background-color 0.2s, transform 0.2s;
    text-decoration: none;
}

.btn-linkedin:hover {
    background-color: #005a87;
    transform: scale(1.1);
}

.btn-linkedin svg {
    fill: white;
}

/* --- Modal Glassmorphism --- */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    opacity: 0;
    pointer-events: none;
    transition: opacity var(--transition-speed);
    padding: 20px;
}

.modal-overlay:not(.hidden) {
    opacity: 1;
    pointer-events: auto;
}

.modal {
    background: var(--white);
    width: 100%;
    max-width: 500px;
    border-radius: var(--radius-lg);
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
    position: relative;
    transform: translateY(20px);
    transition: transform var(--transition-speed);
    max-height: 90vh;
    overflow-y: auto;
}

.modal-overlay:not(.hidden) .modal {
    transform: translateY(0);
}

.close-modal {
    position: absolute;
    top: 20px;
    right: 20px;
    background: none;
    border: none;
    font-size: 28px;
    color: var(--text-muted);
    cursor: pointer;
    line-height: 1;
    transition: color 0.2s;
}

.close-modal:hover {
    color: var(--primary-red);
}

.modal-header {
    padding: 30px 30px 20px;
    border-bottom: 1px solid var(--border-color);
}

.modal-header h3 {
    font-size: 1.5rem;
    color: var(--dark-gray);
    margin-bottom: 5px;
}

.modal-header p {
    color: var(--primary-red);
    font-weight: 600;
    font-size: 1.1rem;
}

.form-body {
    padding: 30px;
}

.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    color: var(--dark-gray);
    font-size: 0.95rem;
}

.form-group input[type="text"],
.form-group input[type="tel"],
.form-group input[type="url"] {
    width: 100%;
    padding: 14px 16px;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    font-size: 1rem;
    transition: border-color 0.2s, box-shadow 0.2s;
    outline: none;
}

.form-group input:focus {
    border-color: var(--primary-red);
    box-shadow: 0 0 0 3px rgba(204, 0, 0, 0.1);
}

/* File Upload Premium Style */
.file-upload-group input[type="file"] {
    display: none;
}

.file-upload-label {
    display: flex !important;
    align-items: center;
    gap: 15px;
    padding: 16px;
    border: 2px dashed var(--border-color) !important;
    border-radius: var(--radius-md);
    cursor: pointer;
    transition: all 0.2s;
    color: var(--text-muted) !important;
    font-weight: 400 !important;
    background: var(--light-gray);
}

.file-upload-label:hover {
    border-color: var(--primary-red) !important;
    background: rgba(204, 0, 0, 0.02);
}

.file-upload-label.has-file {
    border-style: solid !important;
    border-color: #4caf50 !important;
    color: #2e7d32 !important;
    background: rgba(76, 175, 80, 0.05);
}

.upload-icon {
    font-size: 1.5rem;
}

/* Captcha Style */
.captcha-box {
    display: flex;
    gap: 15px;
    align-items: center;
    width: 100%;
}

#captcha-question {
    background: var(--dark-gray);
    color: var(--white);
    padding: 12px 20px;
    border-radius: var(--radius-md);
    font-weight: 600;
    letter-spacing: 2px;
    user-select: none;
    min-width: 120px;
    text-align: center;
    box-sizing: border-box;
}

.captcha-box input {
    flex: 1;
    min-width: 0;
    /* Previne expansão do input (overflow) */
    width: 100%;
    box-sizing: border-box;
    padding: 12px 16px;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    font-size: 1rem;
    outline: none;
}

.captcha-box input:focus {
    border-color: var(--primary-red);
}

/* Custom Checkbox LGPD */
.lgpd-group {
    background: var(--light-gray);
    padding: 15px;
    border-radius: var(--radius-md);
    border: 1px solid var(--border-color);
    margin-top: 30px;
}

.checkbox-container {
    display: flex;
    align-items: flex-start;
    cursor: pointer;
    user-select: none;
    gap: 10px;
}

.native-checkbox {
    width: 18px;
    height: 18px;
    position: relative;
    top: 4px; /* Ajuste fino para alinhar com o centro da primeira linha */
    flex-shrink: 0;
    cursor: pointer;
    accent-color: var(--primary-red);
}

.lgpd-text {
    font-size: 0.85rem;
    color: var(--text-muted);
    line-height: 1.4;
    font-weight: 400 !important;
}

/* Form Actions */
.form-actions {
    margin-top: 30px;
    text-align: center;
}

.btn-submit {
    background-color: var(--primary-red);
    color: var(--white);
    border: none;
    padding: 16px 32px;
    border-radius: 30px;
    font-size: 1.1rem;
    font-weight: 600;
    width: 100%;
    cursor: pointer;
    transition: all 0.2s;
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 10px;
}

.btn-submit:hover {
    background-color: var(--primary-red-hover);
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(204, 0, 0, 0.3);
}

.btn-submit:disabled {
    opacity: 0.7;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

/* Spinner Responsivo */
.spinner {
    width: 20px;
    height: 20px;
    border: 3px solid rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    border-top-color: var(--white);
    animation: spin 1s ease-in-out infinite;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

.hidden {
    display: none !important;
}

/* Mensagens de Sucesso/Erro */
.form-message {
    margin-top: 15px;
    font-size: 0.95rem;
    font-weight: 600;
    padding: 10px;
    border-radius: var(--radius-md);
    display: none;
}

.form-message.success {
    display: block;
    color: #2e7d32;
    background: #e8f5e9;
    border: 1px solid #c8e6c9;
}

.form-message.error {
    display: block;
    color: #c62828;
    background: #ffebee;
    border: 1px solid #ffcdd2;
}

/* Responsividade Mobile */
@media (max-width: 768px) {
    .main-header {
        padding: 15px 0;
    }

    .header-content {
        flex-direction: row;
        flex-wrap: wrap;
        justify-content: space-between;
        gap: 10px;
    }

    .logo {
        height: 40px;
    }

    .theme-toggle {
        margin-left: auto;
        width: 38px;
        height: 38px;
    }

    .header-text {
        flex-basis: 100%;
        text-align: center;
        margin-top: 5px;
    }

    .header-text h1 {
        font-size: 1.5rem;
        margin-bottom: 2px;
    }

    .header-text p {
        font-size: 0.9rem;
    }

    .section-title h2 {
        font-size: 2rem;
    }

    .vagas-grid {
        grid-template-columns: 1fr;
    }

    .vaga-card {
        aspect-ratio: auto;
    }

    .form-body {
        padding: 20px;
    }

    .modal-header {
        padding: 20px 20px 15px;
    }

    /* Google reCAPTCHA responsive fix */
    .g-recaptcha {
        transform: scale(0.85);
        transform-origin: 0 0;
    }

    .captcha-box {
        flex-direction: column;
        align-items: stretch;
        gap: 10px;
    }

    #captcha-question {
        width: 100%;
    }

    .faq-btn-text {
        display: none;
    }

    #duvidas {
        scroll-margin-top: 180px; /* Cabeçalho no mobile fica mais alto (duas linhas) */
    }
}

@media (max-width: 380px) {
    .g-recaptcha {
        transform: scale(0.72);
    }
    #duvidas {
        scroll-margin-top: 200px; /* Telas minúsculas */
    }
}

/* --- FAQ Accordion --- */
#duvidas {
    scroll-margin-top: 120px;
}

.faq-list {
    display: flex;
    flex-direction: column;
    gap: 15px;
    max-width: 800px;
    margin: 0 auto;
}

.faq-card {
    background: var(--white);
    border-radius: var(--radius-md);
    box-shadow: 0 4px 6px rgba(0,0,0,0.05);
    border: 1px solid var(--border-color);
    overflow: hidden;
    transition: all 0.3s ease;
}

.faq-card.active {
    border-color: var(--primary-red);
    box-shadow: 0 8px 15px rgba(204, 0, 0, 0.1);
}

.faq-question {
    padding: 20px;
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--dark-gray);
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: var(--white);
    transition: background 0.2s;
    user-select: none;
}

.faq-question:hover {
    background: rgba(0,0,0,0.02);
}

.faq-question::after {
    content: '+';
    font-size: 1.5rem;
    color: var(--primary-red);
    transition: transform 0.3s;
}

.faq-card.active .faq-question::after {
    transform: rotate(45deg);
}

.faq-answer {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease, padding 0.3s ease;
    background: var(--light-gray);
    color: var(--text-muted);
    font-size: 0.95rem;
    line-height: 1.6;
    padding: 0 20px;
}

.faq-card.active .faq-answer {
    max-height: 500px; /* arbitrary large max-height */
    padding: 20px;
    border-top: 1px solid var(--border-color);
}

/* --- Banco de Talentos Específico (Banner) --- */
.banco-talentos {
    grid-column: 1 / -1; /* Ocupa a linha inteira */
    text-align: center;
    padding: 20px 30px; /* Reduz a altura do card (padding vertical menor) */
    min-height: auto !important; /* Remove a altura mínima forçada dos cards normais */
}

.banco-talentos .vaga-info {
    align-items: center;
}

.banco-talentos .btn-candidatar {
    margin: 20px auto 0;
    max-width: 300px;
}