/* CETILS 2027 - Estilos Globais */

/* ============================================================
   RESET E VARIÁVEIS
   ============================================================ */

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

/* ============================================================
   TIPOGRAFIA
   ============================================================ */

html {
    font-size: 16px;
    scroll-behavior: smooth;
}

body {
    font-family: var(--font-body);
    color: var(--dark-text);
    background-color: var(--light-bg);
    line-height: 1.6;
}

h1, h2, h3, h4, h5, h6 {
    margin-top: 1.5rem;
    margin-bottom: 1rem;
    font-family: var(--font-heading);
    font-weight: 700;
    line-height: 1.2;
    color: var(--primary-color);
}

.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

h1 { font-size: 2.5rem; }
h2 { font-size: 2rem; }
h3 { font-size: 1.5rem; }
h4 { font-size: 1.25rem; }
h5 { font-size: 1.1rem; }
h6 { font-size: 1rem; }

p {
    margin-bottom: 1rem;
}

a {
    color: var(--primary-color);
    text-decoration: none;
    transition: color 0.2s ease;
}

a:hover {
    color: var(--accent-color);
    text-decoration: underline;
}

code, pre {
    background-color: var(--surface-muted);
    border-radius: 4px;
    padding: 0.2rem 0.4rem;
    font-family: 'Monaco', 'Courier New', monospace;
}

/* ============================================================
   CONTAINER E LAYOUT
   ============================================================ */

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 1rem;
}

html, body {
    height: 100%;
}

body {
    display: flex;
    flex-direction: column;
}

main {
    flex: 1;
    padding: 2rem 0;
}

/* ============================================================
   CABEÇALHO (faixa única clara, sticky)
   ============================================================ */

.topo-marca {
    background-image: var(--gradient-masthead);
}

.site-header {
    background: transparent;
}

.site-header::before {
    content: '';
    display: block;
    height: 3px;
    width: 60%;
    max-width: 640px;
    margin: 0 auto;
    background-color: var(--accent-color);
}

.site-header-inner {
    display: flex;
    align-items: center;
    gap: 1.5rem;
    min-height: 4.5rem;
}

.marca-icone {
    width: 1.8rem;
    height: 1.7rem;
    flex-shrink: 0;
    color: var(--primary-color);
}

/* Botão hambúrguer (só aparece no mobile) */
.navbar-toggle {
    display: none;
    flex-direction: column;
    justify-content: center;
    gap: 4px;
    width: 2.25rem;
    height: 2.25rem;
    margin-left: auto;
    background: none;
    border: none;
    cursor: pointer;
    padding: 0;
}

.navbar-toggle span {
    display: block;
    height: 2px;
    width: 100%;
    background-color: var(--dark-text);
    border-radius: 2px;
}

.navbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex: 1;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.navbar-menu {
    display: flex;
    align-items: stretch;
    flex-wrap: wrap;
}

.navbar-link {
    display: flex;
    align-items: center;
    color: var(--dark-text);
    font-size: 0.9rem;
    font-weight: 600;
    letter-spacing: 0.02em;
    padding: 0.9rem 1.1rem;
    border-bottom: 3px solid transparent;
}

.navbar-link:hover {
    color: var(--primary-color);
    text-decoration: none;
}

.navbar-link.is-active {
    color: var(--primary-color);
    border-bottom-color: var(--accent-color);
}

.navbar-actions {
    display: flex;
    align-items: center;
    gap: 1rem;
    flex-wrap: wrap;
}

.idioma-switch {
    display: flex;
    align-items: center;
    gap: 0.25rem;
    padding: 0.2rem;
    border: 1px solid var(--border-color);
    border-radius: 999px;
    background-color: var(--light-bg);
}

.idioma-switch-icon {
    width: 1rem;
    height: 1rem;
    margin-left: 0.3rem;
    color: var(--text-muted);
    flex-shrink: 0;
}

.idioma-switch a {
    display: inline-block;
    padding: 0.25rem 0.65rem;
    border-radius: 999px;
    font-size: 0.8rem;
    font-weight: 600;
    line-height: 1;
    color: var(--text-muted);
}

.idioma-switch a:hover {
    color: var(--primary-color);
    background-color: var(--surface-muted);
    text-decoration: none;
}

.idioma-switch a.is-active {
    color: #fff;
    background-color: var(--primary-color);
}

.navbar-dropdown {
    position: relative;
    display: flex;
}

.navbar-dropdown-toggle {
    display: flex;
    align-items: center;
    background: none;
    border: none;
    border-bottom: 3px solid transparent;
    cursor: pointer;
    font: inherit;
    color: var(--dark-text);
    font-size: 0.9rem;
    font-weight: 600;
    letter-spacing: 0.02em;
    padding: 0.9rem 1.1rem;
}

.navbar-dropdown-toggle:hover {
    color: var(--primary-color);
}

.navbar-dropdown.is-active .navbar-dropdown-toggle {
    color: var(--primary-color);
    border-bottom-color: var(--accent-color);
}

.navbar-dropdown-conta .navbar-dropdown-toggle {
    border-bottom: none;
}

.navbar-dropdown-menu {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    background-color: white;
    min-width: 260px;
    box-shadow: var(--shadow-lg);
    z-index: 101;
    flex-direction: column;
    padding: 0.5rem 0;
    border-radius: 16px;
    overflow: hidden;
}

.navbar-dropdown-conta .navbar-dropdown-menu {
    left: auto;
    right: 0;
}

.navbar-dropdown.is-open .navbar-dropdown-menu {
    display: flex;
}

.navbar-dropdown-saudacao {
    padding: 0.5rem 1.1rem 0.6rem;
    color: var(--text-muted);
    font-size: 0.8rem;
    border-bottom: 1px solid var(--border-color);
    margin-bottom: 0.3rem;
}

.navbar-dropdown-item {
    color: var(--dark-text);
    padding: 0.6rem 1.1rem;
    white-space: nowrap;
}

.navbar-dropdown-item:hover {
    color: var(--primary-color);
    background-color: var(--surface-muted);
    text-decoration: none;
}

/* Seta indicando que o item abre um submenu */
.navbar-dropdown-toggle::after {
    content: '';
    width: 0.4rem;
    height: 0.4rem;
    margin-left: 0.5rem;
    border-right: 2px solid currentColor;
    border-bottom: 2px solid currentColor;
    transform: translateY(-2px) rotate(45deg);
    transition: transform 0.2s ease;
}

.navbar-dropdown.is-open .navbar-dropdown-toggle::after {
    transform: translateY(1px) rotate(-135deg);
}

/* Desktop: abre o submenu ao passar o mouse */
@media (hover: hover) and (min-width: 769px) {
    .navbar-dropdown:hover .navbar-dropdown-menu {
        display: flex;
    }
}

/* Botão de destaque (Inscrições) */
.navbar-cta {
    display: inline-block;
    padding: 0.55rem 1.2rem;
    border-radius: 999px;
    background-color: var(--accent-color);
    color: #fff;
    font-size: 0.9rem;
    font-weight: 700;
    letter-spacing: 0.02em;
    box-shadow: 0 2px 8px rgba(255, 94, 50, 0.35);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.navbar-cta:hover,
.navbar-cta.is-active {
    color: #fff;
    text-decoration: none;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(255, 94, 50, 0.45);
}

/* Atalhos da página inicial */
.atalhos-home {
    margin: 2rem 0;
}

.atalhos-home h2 {
    margin-top: 0;
    text-align: center;
}

.atalhos-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 1rem;
}

.atalho-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 0.75rem;
    padding: 1.5rem 1rem;
    background-color: #fff;
    border: 1px solid var(--border-color);
    border-radius: 16px;
    color: var(--primary-color);
    font-weight: 700;
    text-align: center;
    transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
}

.atalho-card svg {
    width: 2.25rem;
    height: 2.25rem;
    color: var(--accent-color);
}

.atalho-card:hover {
    color: var(--primary-color);
    text-decoration: none;
    border-color: var(--accent-color);
    transform: translateY(-3px);
    box-shadow: var(--shadow-lg);
}

@media (max-width: 768px) {
    .atalhos-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .navbar-cta {
        text-align: center;
    }
}

/* ============================================================
   MASTHEAD (faixa de marca com gradiente, aparece em toda página)
   ============================================================ */

.masthead {
    padding: 2.5rem 0;
}

.masthead-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 2rem;
    flex-wrap: wrap;
}

.masthead-marcas {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    min-width: 0;
    max-width: 720px;
    flex: 1 1 auto;
}

.masthead-marca {
    height: auto;
    width: 100%;
    max-width: 720px;
}

.masthead-datas {
    margin: 0;
    text-align: right;
    font-family: var(--font-heading);
    font-weight: 800;
    font-size: 2.5rem;
    line-height: 1.05;
}

.masthead-datas span {
    display: block;
}

.masthead-datas .cor-laranja {
    color: var(--accent-color);
}

.masthead-datas .cor-marinho {
    color: var(--primary-color);
}

.hero-tagline {
    text-align: center;
    font-family: var(--font-heading);
    font-weight: 800;
    font-size: 1.6rem;
    line-height: 1.25;
    margin: 0 0 2.5rem;
}

.hero-tagline-marinho {
    color: var(--primary-color);
}

.hero-tagline-laranja {
    color: var(--accent-color);
}

.hero-actions {
    display: flex;
    gap: 1rem;
    justify-content: center;
    flex-wrap: wrap;
    margin: 1.5rem 0 2.5rem;
    padding-top: 2rem;
    border-top: 1px solid #ddd;
}

/* ============================================================
   DATAS IMPORTANTES (resumo na home)
   ============================================================ */

.datas-importantes {
    padding: 2rem 0;
    border-top: 1px solid #ddd;
}

.datas-importantes-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 2rem;
    margin-top: 1.5rem;
}

.data-item {
    display: flex;
    align-items: baseline;
    gap: 1rem;
}

.data-numero {
    font-family: var(--font-heading);
    font-size: 3.5rem;
    font-weight: 700;
    color: var(--dark-text);
    line-height: 1;
}

.data-info {
    display: flex;
    flex-direction: column;
}

.data-mes-ano {
    font-size: 0.8rem;
    font-weight: 600;
    letter-spacing: 0.05em;
    color: var(--text-muted);
    text-transform: uppercase;
}

.data-titulo {
    font-weight: 700;
    color: var(--primary-color);
    border-bottom: 3px solid var(--accent-color);
    padding-bottom: 0.4rem;
    margin-top: 0.25rem;
    display: inline-block;
}

/* ============================================================
   VÍDEO INSTITUCIONAL
   ============================================================ */

.video-institucional {
    padding: 2rem 0;
    border-top: 1px solid #ddd;
}

.video-placeholder {
    position: relative;
    aspect-ratio: 16 / 9;
    max-width: 900px;
    margin: 1.5rem auto 0;
    background-color: var(--dark-text);
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
}

.video-placeholder .play-icon {
    width: 4rem;
    height: 4rem;
    border-radius: 50%;
    background-color: rgba(255, 255, 255, 0.15);
    display: flex;
    align-items: center;
    justify-content: center;
}

.video-placeholder .play-icon::before {
    content: '';
    border-style: solid;
    border-width: 0.75rem 0 0.75rem 1.25rem;
    border-color: transparent transparent transparent white;
    margin-left: 0.3rem;
}

.video-placeholder p {
    position: absolute;
    bottom: 1rem;
    font-size: 0.85rem;
    opacity: 0.7;
    margin: 0;
}

.video-placeholder iframe {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    border: 0;
    border-radius: 8px;
}

.video-idioma-switch {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 0.5rem;
    margin-top: 1rem;
}

.video-idioma-switch button {
    padding: 0.4rem 1rem;
    border: 1px solid var(--border-color);
    border-radius: 999px;
    background-color: var(--light-bg);
    color: var(--text-muted);
    font-size: 0.85rem;
    font-weight: 600;
    line-height: 1;
    cursor: pointer;
}

.video-idioma-switch button:hover {
    color: var(--primary-color);
    background-color: var(--surface-muted);
}

.video-idioma-switch button.is-active {
    color: #fff;
    background-color: var(--primary-color);
    border-color: var(--primary-color);
}

/* ============================================================
   SOBRE / APOIO (institucional da home)
   ============================================================ */

.sobre-congresso,
.info-importantes,
.apoio-realizacao {
    padding: 2rem 0;
    border-top: 1px solid #ddd;
}

.apoio-realizacao h3 {
    color: var(--primary-color);
}

.apoio-titulo-separado {
    padding-top: 1.5rem;
    border-top: 1px solid #ddd;
}

.apoio-lista {
    display: grid;
    grid-template-columns: repeat(auto-fit, 140px);
    justify-content: center;
    gap: 1rem;
    margin-bottom: 2rem;
}

.apoio-item {
    width: 140px;
    height: 100px;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0.5rem;
    box-sizing: border-box;
}

.apoio-item img {
    /* largura/altura reais ficam no atributo do <img> (evita layout shift);
       aqui forçamos o encaixe dentro da célula fixa acima */
    width: auto;
    height: auto;
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
}

/* ============================================================
   BOTÕES
   ============================================================ */

.btn {
    display: inline-block;
    padding: 0.75rem 1.5rem;
    border: 2px solid transparent;
    border-radius: 10px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    text-decoration: none;
    text-align: center;
}

.btn:hover {
    text-decoration: none;
}

.btn-primary {
    background-color: var(--primary-color);
    color: white;
    border-color: var(--primary-color);
}

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

.btn-secondary {
    background-color: transparent;
    color: var(--primary-color);
    border-color: var(--primary-color);
}

.btn-secondary:hover {
    background-color: var(--primary-color);
    color: white;
    border-color: var(--primary-color);
}

.btn-danger {
    background-color: var(--danger-color);
    color: white;
    border-color: var(--danger-color);
}

.btn-success {
    background-color: var(--success-color);
    color: white;
}

.trabalho-visualizador {
    display: block;
    width: 100%;
    height: 75vh;
    min-height: 400px;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    margin-bottom: 0.5rem;
}

.btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

/* ============================================================
   FORMULÁRIOS
   ============================================================ */

form {
    max-width: 100%;
}

fieldset {
    border: 1px solid var(--border-color);
    border-radius: 4px;
    padding: 1.5rem;
    margin-bottom: 1.5rem;
}

legend {
    padding: 0 0.5rem;
    font-weight: 600;
    font-size: 1.1rem;
}

.form-group {
    margin-bottom: 1.5rem;
}

label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 600;
}

.required {
    color: var(--danger-color);
}

input[type="text"],
input[type="email"],
input[type="password"],
input[type="tel"],
input[type="date"],
input[type="number"],
select,
textarea {
    width: 100%;
    padding: 0.75rem;
    border: 1px solid var(--border-color);
    border-radius: 4px;
    font-size: 1rem;
    font-family: inherit;
    transition: border-color 0.2s ease;
}

input:focus,
select:focus,
textarea:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(27, 58, 107, 0.1);
}

.form-group.checkbox {
    display: flex;
    align-items: center;
}

.form-group.checkbox input {
    width: auto;
    margin-right: 0.5rem;
}

.form-group.checkbox label {
    margin-bottom: 0;
    font-weight: normal;
}

small {
    display: block;
    color: #666;
    margin-top: 0.25rem;
}

.contador-invalido {
    color: var(--danger-color);
    font-weight: 600;
}

/* ============================================================
   ALERTS
   ============================================================ */

.alert {
    padding: 1rem;
    border-radius: 4px;
    margin-bottom: 1rem;
    border-left: 4px solid;
}

.alert-success {
    background-color: #d4edda;
    color: #155724;
    border-color: #c3e6cb;
}

.alert-danger,
.alert-erro {
    background-color: #f8d7da;
    color: #721c24;
    border-color: #f5c6cb;
}

.alert-warning {
    background-color: #fff3cd;
    color: #856404;
    border-color: #ffeaa7;
}

.alert-info {
    background-color: #d1ecf1;
    color: #0c5460;
    border-color: #bee5eb;
}

.alert-aviso {
    background-color: #fff3cd;
    color: #856404;
    border-color: #ffeaa7;
}

/* ============================================================
   TABELAS
   ============================================================ */

.table {
    width: 100%;
    border-collapse: collapse;
    margin-bottom: 1.5rem;
    box-shadow: var(--shadow);
}

.table thead {
    background-color: var(--surface-muted);
}

.table th {
    padding: 1rem;
    text-align: left;
    font-weight: 600;
    border-bottom: 2px solid var(--border-color);
}

.table td {
    padding: 1rem;
    border-bottom: 1px solid var(--border-color);
}

.table tbody tr:hover {
    background-color: rgba(0, 0, 0, 0.02);
}

/* ============================================================
   BADGES
   ============================================================ */

.badge {
    display: inline-block;
    padding: 0.25rem 0.75rem;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 600;
}

.badge-rascunho {
    background-color: #e0e0e0;
    color: #333;
}

.badge-submetido {
    background-color: #fff3cd;
    color: #856404;
}

.badge-em_avaliacao {
    background-color: #d1ecf1;
    color: #0c5460;
}

.badge-aprovado {
    background-color: #d4edda;
    color: #155724;
}

.badge-rejeitado {
    background-color: #f8d7da;
    color: #721c24;
}

.badge-admin,
.badge-revisor,
.badge-participante {
    background-color: var(--primary-color);
    color: white;
}

.badge-vigente {
    background-color: #d4edda;
    color: #155724;
}

.badge-encerrado {
    background-color: #e0e0e0;
    color: #6c757d;
    text-decoration: line-through;
}

.badge-futuro {
    background-color: #fff3cd;
    color: #856404;
}

/* Botão que se comporta como um link inline (ex.: ações em tabela dentro
   de um <form>, onde não dá pra usar <a href>) */
.btn-link {
    background: none;
    border: none;
    padding: 0;
    font: inherit;
    cursor: pointer;
    color: var(--primary-color);
    text-decoration: none;
}

.btn-link:hover {
    text-decoration: underline;
}

/* ============================================================
   CARD COMPONENTS
   ============================================================ */

.card {
    background-color: white;
    border: 1px solid var(--border-color);
    border-radius: 4px;
    padding: 1.5rem;
    box-shadow: var(--shadow);
    margin-bottom: 1.5rem;
}

/* ============================================================
   STATS E DASHBOARDS
   ============================================================ */

.stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 2rem;
    margin: 2rem 0;
}

.stat-item {
    background: white;
    padding: 2rem;
    border-radius: 8px;
    box-shadow: var(--shadow);
    text-align: center;
}

.stat-number {
    font-size: 2.5rem;
    font-weight: bold;
    color: var(--primary-color);
    margin-bottom: 0.5rem;
}

.stat-label {
    color: #666;
    font-weight: 500;
}

.dashboard-stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1.5rem;
    margin: 2rem 0;
}

.stat-card {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--primary-dark) 100%);
    color: white;
    padding: 2rem;
    border-radius: 8px;
    box-shadow: var(--shadow-lg);
}

.stat-value {
    font-size: 2rem;
    font-weight: bold;
    margin-bottom: 0.5rem;
}

.stat-sub {
    font-size: 0.85rem;
    opacity: 0.9;
}

/* ============================================================
   MENU E NAVEGAÇÃO
   ============================================================ */

.menu-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1.5rem;
    margin: 2rem 0;
}

.menu-item {
    background: white;
    padding: 2rem;
    border-radius: 8px;
    box-shadow: var(--shadow);
    border-top: 4px solid var(--primary-color);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    display: block;
    color: inherit;
}

.menu-item:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-lg);
    text-decoration: none;
}

.menu-item h3 {
    margin-top: 0;
    color: var(--primary-color);
}

.menu-item p {
    color: #666;
    margin-bottom: 0;
}

/* ============================================================
   AUTH PAGES
   ============================================================ */

.auth-container {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 60vh;
    padding: 2rem 0;
}

.auth-box {
    background: white;
    padding: 2rem;
    border-radius: 8px;
    box-shadow: var(--shadow-lg);
    width: 100%;
    max-width: 500px;
    border: 1px solid var(--border-color);
}

.auth-box h1 {
    margin-top: 0;
    color: var(--primary-color);
    text-align: center;
}

.auth-box.cadastro {
    max-width: 700px;
}

.auth-links {
    text-align: center;
    margin-top: 1.5rem;
}

.link-recuperacao {
    background-color: var(--surface-muted);
    border: 1px solid var(--border-color);
    border-radius: 4px;
    padding: 1rem;
    word-break: break-all;
    font-family: 'Monaco', 'Courier New', monospace;
    font-size: 0.9rem;
    margin: 1rem 0;
}

/* ============================================================
   SEÇÕES E CONTEÚDO
   ============================================================ */

section {
    margin: 3rem 0;
}

.section-header {
    border-bottom: 2px solid var(--primary-color);
    padding-bottom: 1rem;
    margin-bottom: 2rem;
}

.empty-state {
    text-align: center;
    padding: 3rem;
    background-color: var(--surface-muted);
    border-radius: 8px;
}

.empty-state p {
    margin-bottom: 1.5rem;
}

/* ============================================================
   FOOTER
   ============================================================ */

.footer {
    background-color: var(--primary-color);
    color: white;
    padding: 2.5rem 0;
    margin-top: auto;
}

.footer .container {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 2rem;
    flex-wrap: wrap;
}

.footer p {
    margin: 0.5rem 0;
}

.footer a {
    color: white;
}

.footer a:hover {
    color: var(--accent-color);
}

.footer-marca {
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
    max-width: 560px;
}

.footer-marca .marca-icone {
    width: 1.75rem;
    height: 1.6rem;
    flex-shrink: 0;
    margin-top: 0.25rem;
}

.footer-marca p {
    margin: 0;
    font-size: 0.9rem;
    opacity: 0.9;
}

.footer-links h4 {
    margin: 0 0 0.75rem;
    font-family: var(--font-heading);
    font-size: 1rem;
    color: white;
}

.footer-links ul {
    list-style: none;
    margin: 0;
    padding: 0;
}

.footer-links li {
    margin-bottom: 0.4rem;
    font-size: 0.9rem;
}

.footer-social {
    display: flex;
    align-items: center;
    gap: 1rem;
    flex-shrink: 0;
}

.footer-social a {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 2.25rem;
    height: 2.25rem;
    border: 1px solid rgba(255, 255, 255, 0.4);
    border-radius: 50%;
    transition: border-color 0.2s, color 0.2s;
}

.footer-social a:hover {
    border-color: var(--accent-color);
}

.footer-social svg {
    width: 1.1rem;
    height: 1.1rem;
}

/* ============================================================
   LOCAL DO EVENTO
   ============================================================ */

.local-subtitulo {
    color: var(--text-muted);
    margin-top: -0.5rem;
}

.local-mapa {
    position: relative;
    width: 100%;
    max-width: 700px;
    aspect-ratio: 1 / 1;
    margin: 1.5rem 0;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: var(--shadow);
}

.local-mapa iframe {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    border: 0;
}

/* ============================================================
   ACORDEÃO (ex.: tabela de preços na página de inscrições)
   ============================================================ */

.accordeon {
    /* Full-bleed: escapa do .container pai pra ocupar a largura toda da viewport. */
    width: 100vw;
    margin-left: calc(50% - 50vw);
    margin-right: calc(50% - 50vw);
    background-color: var(--accent-color);
}

.accordeon-toggle {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
    width: 100%;
    background: none;
    border: none;
    cursor: pointer;
    padding: 2rem 1rem;
    font: inherit;
    font-size: 1.15rem;
    font-weight: 700;
    color: white;
}

.accordeon-icone {
    font-size: 1.5rem;
    line-height: 1;
}

.accordeon-conteudo {
    background-color: var(--light-bg);
    padding: 2rem 0;
}

/* ============================================================
   RESPONSIVE
   ============================================================ */

@media (max-width: 768px) {
    h1 { font-size: 2rem; }
    h2 { font-size: 1.5rem; }
    
    /* Celular: o menu vira "pílulas" sempre visíveis (sem hambúrguer) */
    .site-header-inner {
        position: relative;
        flex-wrap: wrap;
        gap: 0;
        padding-top: 0.5rem;
        padding-bottom: 0.75rem;
    }

    .navbar-toggle {
        display: none;
    }

    .navbar {
        width: 100%;
        flex-basis: 100%;
        flex-direction: column;
        align-items: stretch;
        gap: 0.6rem;
    }

    .navbar-menu,
    .navbar-actions {
        width: 100%;
        flex-direction: row;
        flex-wrap: wrap;
        align-items: center;
        justify-content: center;
        gap: 0.5rem;
    }

    .navbar-link,
    .navbar-dropdown-toggle {
        width: auto;
        padding: 0.4rem 0.95rem;
        font-size: 0.85rem;
        color: var(--primary-color);
        background-color: transparent;
        border: 1.5px solid var(--border-color);
        border-radius: 999px;
    }

    .navbar-link:hover,
    .navbar-dropdown-toggle:hover {
        border-color: var(--primary-color);
    }

    .navbar-link.is-active,
    .navbar-dropdown.is-active .navbar-dropdown-toggle {
        color: #fff;
        background-color: var(--primary-color);
        border-color: var(--primary-color);
    }

    .navbar-dropdown {
        position: static;
        width: auto;
    }

    .navbar-dropdown-conta .navbar-dropdown-toggle {
        border: 1.5px solid var(--border-color);
    }

    .navbar-dropdown-menu,
    .navbar-dropdown-conta .navbar-dropdown-menu {
        top: 100%;
        left: 1rem;
        right: 1rem;
        min-width: 0;
        margin-top: -0.25rem;
    }

    .masthead-inner {
        flex-direction: column;
        text-align: center;
    }

    .masthead-marcas {
        align-items: center;
    }

    .masthead-datas {
        text-align: center;
        font-size: 1.75rem;
    }

    .hero-tagline {
        font-size: 1.2rem;
    }

    .hero-actions {
        gap: 0.5rem;
        flex-wrap: nowrap;
    }

    .hero-actions .btn {
        flex: 1 1 0;
        min-width: 0;
        padding: 0.6rem 0.5rem;
        font-size: 0.85rem;
        white-space: normal;
    }

    .footer .container {
        flex-direction: column;
        text-align: center;
    }

    .footer-marca {
        flex-direction: column;
        align-items: center;
        text-align: center;
    }

    .footer-social {
        justify-content: center;
    }
    
    .btn {
        padding: 0.6rem 1rem;
        font-size: 0.9rem;
    }
    
    fieldset {
        padding: 1rem;
    }
    
    .table {
        font-size: 0.85rem;
    }
    
    .table th,
    .table td {
        padding: 0.75rem 0.5rem;
    }
}

@media (max-width: 480px) {
    body {
        font-size: 14px;
    }
    
    h1 { font-size: 1.5rem; }
    h2 { font-size: 1.25rem; }
    
    .btn {
        padding: 0.5rem 1rem;
        font-size: 0.85rem;
    }

    .hero-actions .btn {
        padding: 0.5rem 0.4rem;
        font-size: 0.75rem;
    }

    .container {
        padding: 0 0.5rem;
    }
    
    fieldset {
        padding: 0.75rem;
    }
    
    legend {
        font-size: 1rem;
    }
}

/* ============================================================
   PALESTRANTES
   ============================================================ */

.palestrantes {
    padding: 2rem 0;
    border-top: 1px solid #ddd;
}

.palestrantes-list {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 1.5rem;
    margin: 2rem 0;
}

.palestrante-card {
    background: white;
    padding: 1.5rem;
    border-radius: 8px;
    box-shadow: var(--shadow);
    border-top: 4px solid var(--primary-color);
}

.tabela-responsiva {
    overflow-x: auto;
}

.palestrante-foto {
    display: block;
    width: 96px;
    height: 96px;
    margin: 0 auto 1rem;
    border-radius: 50%;
    object-fit: cover;
    border: 3px solid var(--primary-color);
}

.palestrante-card h3 {
    margin-top: 0;
    font-family: var(--font-heading);
    color: var(--primary-color);
}

.palestrante-card .instituicao {
    font-weight: 600;
    color: var(--dark-text);
    margin-bottom: 0.25rem;
}

.palestrante-card .tema {
    color: var(--text-muted);
    margin-bottom: 0;
}

.palestrante-card .bio {
    color: var(--text-muted);
    font-size: 0.9rem;
    line-height: 1.5;
    margin-top: 0.75rem;
    margin-bottom: 0;
    display: -webkit-box;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 4;
    overflow: hidden;
}

.palestrante-card .bio.is-expanded {
    display: block;
    -webkit-line-clamp: unset;
    overflow: visible;
}

.bio-toggle {
    display: block;
    margin-top: 0.5rem;
    background: none;
    border: none;
    padding: 0;
    color: var(--primary-color);
    font-weight: 600;
    font-size: 0.85rem;
    cursor: pointer;
    text-decoration: underline;
}

.bio-toggle:hover,
.bio-toggle:focus-visible {
    color: var(--dark-text);
}

.palestrantes .palestrante-foto {
    width: 150px;
    height: 150px;
}

.palestrantes-ver-todos {
    text-align: center;
    margin-top: 1.5rem;
}

/* ============================================================
   PRÓXIMOS EVENTOS
   ============================================================ */

.eventos-list {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 1.5rem;
    margin: 2rem 0;
}

.evento-item {
    background: white;
    padding: 1.5rem;
    border-radius: 8px;
    box-shadow: var(--shadow);
    border-left: 4px solid var(--accent-color);
}

.evento-item strong {
    font-family: var(--font-heading);
    color: var(--dark-text);
    display: block;
    margin-bottom: 0.5rem;
}

.evento-item .local {
    color: var(--text-muted);
    margin-bottom: 0;
}

/* ============================================================
   CTA
   ============================================================ */

.cta {
    text-align: center;
    background-color: var(--surface-muted);
    border-radius: 8px;
    padding: 1.75rem 1.5rem;
}

.cta h2 {
    margin-top: 0;
    font-size: 1.5rem;
}

/* ============================================================
   PROGRAMAÇÃO (PÁGINA PÚBLICA)
   ============================================================ */

.programacao-nav {
    display: flex;
    gap: 0.75rem;
    flex-wrap: wrap;
    margin-bottom: 2rem;
}

.programacao-dia {
    margin: 3rem 0;
}

.eventos-lista {
    display: grid;
    gap: 0.65rem;
    margin-top: 1.5rem;
}

.evento-card {
    display: flex;
    align-items: baseline;
    gap: 1rem;
    background: white;
    padding: 0.75rem 1.1rem;
    border-radius: 8px;
    box-shadow: var(--shadow);
    border-left: 3px solid var(--accent-color);
}

.evento-horario {
    flex: 0 0 auto;
    font-family: var(--font-heading);
    font-weight: 600;
    font-size: 0.9rem;
    color: var(--primary-color);
    min-width: 3.25rem;
}

.evento-conteudo {
    min-width: 0;
}

.evento-conteudo h3 {
    margin-top: 0;
    margin-bottom: 0.2rem;
    font-size: 1rem;
}

.evento-tipo {
    color: var(--accent-color);
    font-weight: 600;
    font-size: 0.75rem;
    text-transform: uppercase;
    margin-bottom: 0.3rem;
}

.evento-local,
.evento-palestrante {
    color: var(--text-muted);
    font-size: 0.9rem;
    margin-bottom: 0.2rem;
}

/* Palestras e painéis: destaque maior, mais respiro */
.evento-tipo-palestra,
.evento-tipo-painel {
    align-items: flex-start;
    padding: 1.5rem 1.75rem;
    border-left-width: 5px;
}

.evento-tipo-palestra .evento-horario,
.evento-tipo-painel .evento-horario {
    font-size: 1.1rem;
    min-width: 4rem;
}

.evento-tipo-palestra .evento-conteudo h3,
.evento-tipo-painel .evento-conteudo h3 {
    font-size: 1.25rem;
    margin-bottom: 0.35rem;
}

.evento-tipo-palestra .evento-tipo,
.evento-tipo-painel .evento-tipo {
    font-size: 0.8rem;
    margin-bottom: 0.5rem;
}

.evento-tipo-palestra .evento-local,
.evento-tipo-palestra .evento-palestrante,
.evento-tipo-painel .evento-local,
.evento-tipo-painel .evento-palestrante {
    font-size: 1rem;
}

/* Intervalo: o menor, sem precisar de destaque */
.evento-tipo-intervalo {
    padding: 0.4rem 1.1rem;
    border-left-style: dashed;
    box-shadow: none;
    background: #f7f7f7;
}

.evento-tipo-intervalo .evento-horario {
    font-size: 0.85rem;
    min-width: 3.25rem;
}

.evento-tipo-intervalo .evento-conteudo h3 {
    font-size: 0.9rem;
    margin-bottom: 0;
}

.evento-tipo-intervalo .evento-tipo {
    font-size: 0.7rem;
    margin-bottom: 0;
}

/* ============================================================
   ACESSIBILIDADE
   ============================================================ */

@media (prefers-reduced-motion: reduce) {
    * {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}

/* Skip to main content link */
.skip-link {
    position: absolute;
    top: -40px;
    left: 0;
    background: var(--primary-color);
    color: white;
    padding: 8px;
    z-index: 100;
}

.skip-link:focus {
    top: 0;
}

/* Focus visible para melhor acessibilidade */
:focus-visible {
    outline: 3px solid var(--primary-color);
    outline-offset: 2px;
}

/* ============================================================
   AÇÕES EM TABELA (ADMIN)
   ============================================================ */

.table-actions {
    display: flex;
    gap: 0.75rem;
    align-items: center;
}

.table-actions form {
    margin: 0;
}

.table-actions .btn {
    padding: 0.35rem 0.75rem;
    font-size: 0.85rem;
}

/* ============================================================
   Instagram feed
   ============================================================ */
.instagram-feed-home {
    margin: 3rem 0;
    text-align: center;
}

.instagram-grid {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 1.5rem;
    margin: 1.5rem 0;
}

.instagram-grid-home .instagram-media {
    max-width: 320px;
}

/* Carrossel manual da home (desktop): scroll-snap + setas */
.instagram-carrossel {
    position: relative;
}

.instagram-carrossel .instagram-grid-home {
    flex-wrap: nowrap;
    justify-content: flex-start;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    scrollbar-width: none;
}

.instagram-carrossel .instagram-grid-home::-webkit-scrollbar {
    display: none;
}

.instagram-carrossel .instagram-grid-home > blockquote {
    flex: 0 0 320px;
    min-width: 320px;
    scroll-snap-align: start;
}

.instagram-carrossel-seta {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    z-index: 2;
    width: 2.5rem;
    height: 2.5rem;
    border: 0;
    border-radius: 50%;
    background: rgba(0, 0, 0, 0.6);
    color: #fff;
    font-size: 1.6rem;
    line-height: 1;
    cursor: pointer;
}

.instagram-carrossel-seta:hover,
.instagram-carrossel-seta:focus-visible {
    background: rgba(0, 0, 0, 0.85);
}

.instagram-carrossel-anterior { left: 0; }
.instagram-carrossel-proximo { right: 0; }

/* Celular: só os 2 últimos posts, sem setas, centralizados */
@media (max-width: 768px) {
    .instagram-carrossel-seta {
        display: none;
    }

    .instagram-carrossel .instagram-grid-home {
        flex-wrap: wrap;
        justify-content: center;
        overflow-x: visible;
    }

    .instagram-carrossel .instagram-grid-home > blockquote {
        flex: 0 1 320px;
        min-width: 0;
        max-width: 100%;
    }

    .instagram-carrossel .instagram-grid-home > blockquote:nth-child(n+3) {
        display: none;
    }
}

/* ============================================================
   WORKSHOPS (página pública)
   ============================================================ */

.workshops-lista {
    display: grid;
    gap: 1.5rem;
    margin: 2rem 0;
}

.workshop-card {
    background: white;
    padding: 1.5rem;
    border-radius: 8px;
    box-shadow: var(--shadow);
    border-top: 4px solid var(--primary-color);
    transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.workshop-card:hover {
    transform: translateY(-4px);
}

.workshop-card h2 {
    margin-top: 0;
    font-size: 1.25rem;
}

.workshop-ministrantes {
    display: flex;
    flex-wrap: wrap;
    gap: 1.5rem;
    list-style: none;
    margin: 1rem 0;
    padding: 0;
}

.workshop-ministrante {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
    max-width: 140px;
    text-align: center;
    font-size: 0.9rem;
}

.workshop-avatar {
    position: relative;
    display: block;
    width: 96px;
    height: 96px;
}

.workshop-avatar-foto,
.workshop-avatar-iniciais {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 96px;
    height: 96px;
    border-radius: 50%;
    object-fit: cover;
    border: 3px solid var(--primary-color);
    background: var(--primary-color);
    color: white;
    font-size: 1.75rem;
    font-weight: 700;
}

.workshop-bandeira {
    position: absolute;
    right: -6px;
    bottom: 0;
    width: 36px;
    height: 24px;
    object-fit: cover;
    border-radius: 3px;
    border: 2px solid white;
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.35);
    transform-origin: left center;
    animation: bandeira-balanco 2.4s ease-in-out infinite;
}

.workshop-descricao {
    line-height: 1.6;
    display: -webkit-box;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 6;
    overflow: hidden;
}

.workshop-descricao.is-expanded {
    display: block;
    -webkit-line-clamp: unset;
    overflow: visible;
}

@keyframes bandeira-balanco {
    0%, 100% { transform: rotate(-4deg) skewY(0deg); }
    50% { transform: rotate(5deg) skewY(3deg); }
}

@keyframes ministrante-pula {
    0% { opacity: 0; transform: translateY(16px) scale(0.6); }
    60% { opacity: 1; transform: translateY(-6px) scale(1.08); }
    100% { opacity: 1; transform: translateY(0) scale(1); }
}

/* O JS marca o <html> com .reveal-ready; sem JS tudo fica visível. */
.reveal-ready .workshop-card {
    opacity: 0;
    transform: translateY(24px);
    transition: opacity 0.6s ease, transform 0.6s ease, box-shadow 0.25s ease;
}

.reveal-ready .workshop-card.is-visible {
    opacity: 1;
    transform: none;
}

.reveal-ready .workshop-card.is-visible:hover {
    transform: translateY(-4px);
}

.reveal-ready .workshop-ministrante {
    opacity: 0;
}

.reveal-ready .workshop-card.is-visible .workshop-ministrante {
    animation: ministrante-pula 0.7s cubic-bezier(0.34, 1.56, 0.64, 1) both;
    animation-delay: calc(0.25s + var(--i, 0) * 0.18s);
}

@media (prefers-reduced-motion: reduce) {
    .workshop-bandeira {
        animation: none;
    }

    .reveal-ready .workshop-card,
    .reveal-ready .workshop-ministrante {
        opacity: 1;
        transform: none;
    }
}
