/* ============================================================
   IFTECH 2026 - Estilos
   Paleta: navy #051D38 / #112C4C | verde #649C2A
           amarelo #F5B31A | azul #2898D5 | cinza #F4F6F6
   ============================================================ */

:root {
    --navy:        #051D38;
    --navy-2:      #112C4C;
    --navy-3:      #1B3B63;
    --green:       #649C2A;
    --green-dark:  #4E7A1E;
    --yellow:      #F5B31A;
    --blue:        #2898D5;
    --blue-dark:   #126FB0;
    --red:         #D50B18;
    --gray-50:     #F4F6F6;
    --gray-100:    #E9EDEE;
    --gray-300:    #C7CED2;
    --gray-500:    #64717C;
    --gray-700:    #37454F;
    --white:       #FFFFFF;
    --radius:      14px;
    --radius-sm:   8px;
    --shadow:      0 10px 30px rgba(5, 29, 56, 0.10);
    --shadow-lg:   0 20px 50px rgba(5, 29, 56, 0.18);
    --font:        'Inter', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
}

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

html {
    scroll-behavior: smooth;
}

body {
    font-family: var(--font);
    font-size: 16px;
    line-height: 1.6;
    color: var(--gray-700);
    background-color: var(--gray-50);
    -webkit-font-smoothing: antialiased;
}

img {
    max-width: 100%;
    display: block;
}

a {
    color: var(--blue-dark);
    text-decoration: none;
}

strong {
    color: var(--navy);
}

.container {
    width: 100%;
    max-width: 1120px;
    margin: 0 auto;
    padding: 0 24px;
}

/* ============ Botões ============ */

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 12px 24px;
    border-radius: var(--radius-sm);
    border: 2px solid transparent;
    font-family: inherit;
    font-size: 15px;
    font-weight: 700;
    line-height: 1.2;
    cursor: pointer;
    transition: background-color 0.2s ease, color 0.2s ease, border-color 0.2s ease, transform 0.15s ease;
    text-align: center;
}

.btn:hover { transform: translateY(-1px); }

.btn-primary {
    background-color: var(--green);
    color: var(--white);
}
.btn-primary:hover {
    background-color: var(--green-dark);
}

.btn-accent {
    background-color: var(--yellow);
    color: var(--navy);
}
.btn-accent:hover {
    background-color: #ffc53d;
}

.btn-ghost {
    background-color: transparent;
    border-color: rgba(255, 255, 255, 0.4);
    color: var(--white);
}
.btn-ghost:hover {
    border-color: var(--white);
    background-color: rgba(255, 255, 255, 0.08);
}

.btn-outline {
    background-color: transparent;
    border-color: var(--green);
    color: var(--green);
}
.btn-outline:hover {
    background-color: var(--green);
    color: var(--white);
}

.btn-sm { padding: 8px 16px; font-size: 14px; }
.btn-lg { padding: 16px 36px; font-size: 17px; }

.btn-icon {
    flex: 0 0 auto;
    width: 38px;
    height: 38px;
    border-radius: 50%;
    border: 1px solid var(--gray-300);
    background-color: var(--white);
    color: var(--red);
    font-size: 22px;
    line-height: 1;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    transition: background-color 0.2s ease, color 0.2s ease;
}
.btn-icon:hover {
    background-color: var(--red);
    color: var(--white);
}

/* ============ Header ============ */

.site-header {
    position: sticky;
    top: 0;
    z-index: 50;
    background-color: rgba(5, 29, 56, 0.92);
    backdrop-filter: blur(8px);
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.header-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    padding-top: 12px;
    padding-bottom: 12px;
}

.brand {
    display: inline-flex;
    align-items: center;
    gap: 12px;
}

.brand-logo {
    width: 48px;
    height: auto;
}

.brand-text {
    color: var(--white);
    font-size: 20px;
    font-weight: 800;
    letter-spacing: 0.5px;
}
.brand-text strong {
    color: var(--yellow);
}

.site-nav {
    display: flex;
    align-items: center;
    gap: 24px;
}

.site-nav a:not(.btn) {
    color: rgba(255, 255, 255, 0.85);
    font-weight: 600;
    font-size: 15px;
    transition: color 0.2s ease;
}
.site-nav a:not(.btn):hover {
    color: var(--yellow);
}

/* ============ Hero ============ */

.hero {
    background:
        radial-gradient(1100px 500px at 85% -10%, rgba(40, 152, 213, 0.35), transparent 60%),
        radial-gradient(900px 500px at -10% 30%, rgba(100, 156, 42, 0.22), transparent 55%),
        linear-gradient(135deg, var(--navy) 0%, var(--navy-2) 100%);
    color: var(--white);
    padding: 80px 0 96px;
    overflow: hidden;
}

.hero-grid {
    display: grid;
    grid-template-columns: 1.15fr 0.85fr;
    gap: 56px;
    align-items: center;
}

.hero-tag {
    display: inline-block;
    background-color: rgba(245, 179, 26, 0.15);
    border: 1px solid var(--yellow);
    color: var(--yellow);
    font-size: 13px;
    font-weight: 700;
    letter-spacing: 1.5px;
    text-transform: uppercase;
    padding: 6px 14px;
    border-radius: 999px;
    margin-bottom: 20px;
}

.hero-title {
    font-size: clamp(34px, 4.5vw, 54px);
    font-weight: 900;
    line-height: 1.08;
    color: var(--white);
    margin-bottom: 20px;
}

.hero-title span {
    color: var(--yellow);
}

.hero-subtitle {
    font-size: 18px;
    color: rgba(255, 255, 255, 0.85);
    max-width: 540px;
    margin-bottom: 32px;
}

.hero-subtitle strong {
    color: var(--white);
}

.hero-meta {
    list-style: none;
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 16px;
    margin-bottom: 36px;
}

.hero-meta li {
    display: flex;
    gap: 12px;
    align-items: flex-start;
    background-color: rgba(255, 255, 255, 0.06);
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: var(--radius-sm);
    padding: 14px;
}

.meta-icon {
    font-size: 22px;
    line-height: 1;
}

.hero-meta strong {
    display: block;
    color: var(--white);
    font-size: 13px;
    font-weight: 700;
    margin-bottom: 2px;
}

.hero-meta li div {
    font-size: 13px;
    color: rgba(255, 255, 255, 0.75);
    line-height: 1.35;
}

.hero-actions {
    display: flex;
    gap: 14px;
    flex-wrap: wrap;
}

.hero-visual {
    display: flex;
    justify-content: center;
}

.hero-poster {
    width: min(380px, 100%);
    border-radius: var(--radius);
    box-shadow: var(--shadow-lg);
    border: 4px solid rgba(255, 255, 255, 0.15);
    transform: rotate(2deg);
    transition: transform 0.3s ease;
}
.hero-poster:hover {
    transform: rotate(0deg) scale(1.02);
}

/* ============ Seções ============ */

.section {
    padding: 88px 0;
}

.section-form {
    background-color: var(--white);
}

.section-duvidas {
    background-color: var(--gray-50);
}

.section-head {
    text-align: center;
    max-width: 720px;
    margin: 0 auto 52px;
}

.section-kicker {
    display: inline-block;
    color: var(--green);
    font-weight: 800;
    letter-spacing: 2px;
    text-transform: uppercase;
    font-size: 13px;
    margin-bottom: 12px;
}

.section-title {
    font-size: clamp(28px, 3.5vw, 40px);
    font-weight: 800;
    color: var(--navy);
    line-height: 1.2;
    margin-bottom: 16px;
}

.section-desc {
    font-size: 17px;
    color: var(--gray-500);
}

.section-desc strong {
    color: var(--green);
}

/* ============ Cards ============ */

.cards {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 28px;
}

.card {
    background-color: var(--white);
    border-radius: var(--radius);
    padding: 32px 28px;
    box-shadow: var(--shadow);
    border-top: 4px solid var(--green);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.card:hover {
    transform: translateY(-6px);
    box-shadow: var(--shadow-lg);
}

.card:nth-child(2) {
    border-top-color: var(--yellow);
}

.card:nth-child(3) {
    border-top-color: var(--blue);
}

.card-icon {
    font-size: 34px;
    margin-bottom: 16px;
}

.card h3 {
    color: var(--navy);
    font-size: 19px;
    font-weight: 800;
    margin-bottom: 10px;
}

.card p {
    font-size: 15px;
    color: var(--gray-500);
}

/* ============ Formulário ============ */

.form {
    max-width: 860px;
    margin: 0 auto;
    display: grid;
    gap: 28px;
}

.fieldset {
    border: 1px solid var(--gray-100);
    background-color: var(--gray-50);
    border-radius: var(--radius);
    padding: 28px;
    display: grid;
    gap: 18px;
}

.fieldset legend {
    font-size: 18px;
    font-weight: 800;
    color: var(--navy);
    background-color: var(--white);
    border: 1px solid var(--gray-100);
    padding: 8px 18px;
    border-radius: 999px;
}

.field-hint {
    font-size: 14px;
    color: var(--gray-500);
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.form-group > label {
    font-weight: 700;
    font-size: 15px;
    color: var(--navy);
}

.field-label {
    font-weight: 700;
    font-size: 15px;
    color: var(--navy);
}

.req { color: var(--red); }
.muted-label {
    color: var(--gray-500);
    font-weight: 500;
}

.input {
    width: 100%;
    padding: 12px 14px;
    font-size: 15px;
    font-family: inherit;
    color: var(--gray-700);
    background-color: var(--white);
    border: 1.5px solid var(--gray-300);
    border-radius: var(--radius-sm);
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
    resize: vertical;
}

.input:focus {
    outline: none;
    border-color: var(--blue);
    box-shadow: 0 0 0 4px rgba(40, 152, 213, 0.15);
}

.input-error {
    border-color: var(--red);
}
.input-error:focus {
    box-shadow: 0 0 0 4px rgba(213, 11, 24, 0.12);
}

.field-error {
    color: var(--red);
    font-size: 13.5px;
    font-weight: 600;
}

/* ---------- Editor de texto rico (Quill) ---------- */

.editor {
    border: 1.5px solid var(--gray-300);
    border-radius: var(--radius-sm);
    overflow: hidden;
    background-color: var(--white);
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.editor:focus-within {
    border-color: var(--blue);
    box-shadow: 0 0 0 4px rgba(40, 152, 213, 0.15);
}

.editor.input-error {
    border-color: var(--red);
}
.editor.input-error:focus-within {
    box-shadow: 0 0 0 4px rgba(213, 11, 24, 0.12);
}

.editor .ql-toolbar {
    border: none;
    border-bottom: 1px solid var(--gray-100);
    background-color: var(--gray-50);
    font-family: var(--font);
}

.editor .ql-container {
    position: relative;
    border: none;
    font-family: var(--font);
    font-size: 15px;
    min-height: 160px;
}

.editor .ql-editor {
    min-height: 160px;
    color: var(--gray-700);
}

.editor .ql-editor img {
    max-width: 100%;
    height: auto;
}

.editor .ql-editor table {
    border-collapse: collapse;
    width: 100%;
    margin: 10px 0;
}

.editor .ql-editor th,
.editor .ql-editor td {
    border: 1px solid var(--gray-300);
    padding: 6px 10px;
    vertical-align: top;
}

.editor .ql-editor th {
    background-color: var(--gray-50);
    font-weight: 700;
    color: var(--navy);
}

/* ---------- Alças de redimensionamento de imagem ---------- */

.ql-resize-overlay {
    position: absolute;
    border: 1.5px solid var(--blue);
    box-sizing: border-box;
    pointer-events: none;
    z-index: 5;
}

.ql-resize-alca {
    position: absolute;
    width: 13px;
    height: 13px;
    background-color: var(--white);
    border: 2px solid var(--blue);
    border-radius: 3px;
    box-sizing: border-box;
    pointer-events: auto;
    touch-action: none;
}

.ql-resize-alca.tl { top: -8px;  left: -8px;  cursor: nwse-resize; }
.ql-resize-alca.tr { top: -8px;  right: -8px; cursor: nesw-resize; }
.ql-resize-alca.bl { bottom: -8px; left: -8px; cursor: nesw-resize; }
.ql-resize-alca.br { bottom: -8px; right: -8px; cursor: nwse-resize; }

.ql-resize-label {
    position: absolute;
    right: 6px;
    bottom: 6px;
    background-color: var(--navy);
    color: var(--white);
    font-size: 12px;
    font-weight: 700;
    line-height: 1;
    padding: 4px 8px;
    border-radius: 4px;
    white-space: nowrap;
    pointer-events: none;
}

/* ---------- Resumo HTML (painel admin) ---------- */

.resumo-html {
    line-height: 1.7;
}

.resumo-html img {
    max-width: 100%;
    height: auto;
    margin: 12px 0;
}

.resumo-html table {
    border-collapse: collapse;
    width: 100%;
    margin: 12px 0;
}

.resumo-html th,
.resumo-html td {
    border: 1px solid var(--gray-300);
    padding: 8px 10px;
    text-align: left;
    vertical-align: top;
}

.resumo-html th {
    background-color: var(--gray-50);
    font-weight: 700;
    color: var(--navy);
}

.resumo-html ul,
.resumo-html ol {
    padding-left: 24px;
    margin: 8px 0;
}

.resumo-html h1,
.resumo-html h2,
.resumo-html h3 {
    color: var(--navy);
    margin: 14px 0 8px;
}

.resumo-html blockquote {
    border-left: 4px solid var(--green);
    padding-left: 14px;
    color: var(--gray-500);
    margin: 10px 0;
}

.resumo-html a {
    color: var(--blue-dark);
    text-decoration: underline;
}

.resumo-html pre,
.resumo-html code {
    background-color: var(--gray-100);
    border-radius: 4px;
    font-family: monospace;
    font-size: 14px;
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 18px;
}

.radio-group {
    display: flex;
    gap: 16px;
}

.radio {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 18px;
    background-color: var(--white);
    border: 1.5px solid var(--gray-300);
    border-radius: var(--radius-sm);
    cursor: pointer;
    font-weight: 600;
    font-size: 15px;
    color: var(--gray-700);
    transition: border-color 0.2s ease, background-color 0.2s ease;
}

.radio input {
    accent-color: var(--green);
    width: 17px;
    height: 17px;
}

.radio:has(input:checked) {
    border-color: var(--green);
    background-color: rgba(100, 156, 42, 0.08);
    color: var(--green-dark);
}

/* Alunos dinâmicos */
#alunos-container {
    display: grid;
    gap: 12px;
}

.aluno-row {
    display: grid;
    grid-template-columns: 36px 2fr 2fr 1.2fr 40px;
    gap: 12px;
    align-items: center;
    padding: 12px;
    background-color: var(--white);
    border: 1px solid var(--gray-100);
    border-radius: var(--radius-sm);
}

.aluno-index {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background-color: var(--navy);
    color: var(--white);
    font-weight: 800;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 15px;
}

.aluno-row .form-group-periodo {
    min-width: 0;
}

/* Alerts */
.alert {
    padding: 14px 18px;
    border-radius: var(--radius-sm);
    font-size: 15px;
    font-weight: 600;
    margin-bottom: 20px;
}

.alert-error {
    background-color: rgba(213, 11, 24, 0.08);
    border: 1px solid rgba(213, 11, 24, 0.3);
    color: var(--red);
}

.form-actions {
    display: grid;
    justify-items: center;
    gap: 12px;
}

.form-note {
    font-size: 13.5px;
    color: var(--gray-500);
    text-align: center;
    max-width: 480px;
}

/* Honeypot (invisível para humanos) */
.hp-field {
    position: absolute;
    left: -9999px;
    width: 1px;
    height: 1px;
    overflow: hidden;
}

/* ============ FAQ ============ */

.faq {
    max-width: 720px;
    margin: 0 auto;
    display: grid;
    gap: 14px;
}

.faq-item {
    background-color: var(--white);
    border: 1px solid var(--gray-100);
    border-radius: var(--radius-sm);
    padding: 18px 22px;
}

.faq-item summary {
    font-weight: 700;
    font-size: 16px;
    color: var(--navy);
    cursor: pointer;
    list-style: none;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.faq-item summary::after {
    content: '+';
    font-size: 22px;
    color: var(--green);
    font-weight: 700;
    transition: transform 0.2s ease;
}

.faq-item[open] summary::after {
    transform: rotate(45deg);
}

.faq-item p {
    margin-top: 12px;
    color: var(--gray-500);
    font-size: 15px;
}

/* ============ Footer ============ */

.site-footer {
    background-color: var(--navy);
    color: rgba(255, 255, 255, 0.7);
    padding: 32px 0;
}

.footer-inner {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 16px;
    flex-wrap: wrap;
    text-align: center;
}

.footer-logo {
    width: 42px;
    height: auto;
}

.footer-inner p {
    font-size: 14px;
}

/* ============ Página de sucesso ============ */

.sucesso {
    min-height: calc(100vh - 160px);
    display: flex;
    align-items: center;
    padding: 60px 0;
}

.sucesso-box {
    background-color: var(--white);
    border-radius: var(--radius);
    box-shadow: var(--shadow-lg);
    padding: 56px 40px;
    text-align: center;
    max-width: 620px;
    margin: 0 auto;
}

.sucesso-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 76px;
    height: 76px;
    border-radius: 50%;
    background-color: rgba(100, 156, 42, 0.12);
    color: var(--green);
    font-size: 38px;
    margin-bottom: 20px;
}

.sucesso-box h1 {
    color: var(--navy);
    font-size: 30px;
    font-weight: 800;
    margin-bottom: 16px;
}

.sucesso-box p {
    color: var(--gray-500);
    font-size: 16px;
    margin-bottom: 12px;
}

.sucesso-box .btn {
    margin-top: 20px;
}

/* ============ Inscrições encerradas ============ */

.encerrado {
    background-color: var(--white);
    border: 2px dashed var(--gray-300);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    padding: 56px 40px;
    text-align: center;
    max-width: 620px;
    margin: 0 auto;
}

.encerrado-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 76px;
    height: 76px;
    border-radius: 50%;
    background-color: rgba(213, 11, 24, 0.08);
    color: var(--red);
    font-size: 38px;
    margin-bottom: 20px;
}

.encerrado h3 {
    color: var(--navy);
    font-size: 26px;
    font-weight: 800;
    margin-bottom: 14px;
}

.encerrado p {
    color: var(--gray-500);
    font-size: 16px;
    margin-bottom: 10px;
}

/* ============ Responsivo ============ */

@media (max-width: 960px) {
    .hero-grid {
        grid-template-columns: 1fr;
        gap: 40px;
    }
    .hero-poster {
        width: min(320px, 100%);
    }
    .cards {
        grid-template-columns: 1fr;
    }
    .site-nav a:not(.btn) {
        display: none;
    }
}

@media (max-width: 720px) {
    .hero { padding: 56px 0 72px; }
    .hero-meta { grid-template-columns: 1fr; }
    .form-row { grid-template-columns: 1fr; }
    .fieldset { padding: 22px; }
    .aluno-row {
        grid-template-columns: 32px 1fr 40px;
        grid-template-areas:
            "idx nome remove"
            "idx curso remove"
            "idx periodo remove";
    }
    .aluno-row .aluno-index { grid-area: idx; }
    .aluno-row .form-group:nth-child(2) { grid-area: nome; }
    .aluno-row .form-group:nth-child(3) { grid-area: curso; }
    .aluno-row .form-group-periodo { grid-area: periodo; }
    .aluno-row .btn-icon { grid-area: remove; }
    .section { padding: 64px 0; }
}
