/* Evento Public - Estilos principais */

/* Variáveis CSS */
:root {
    --primary: #1e88e5; /* azul */
    --primary-dark: #1565c0;
    --accent: #ff9800; /* laranja */
    --bg: #ffffff;
    --muted: #f5f7fa;
    --text: #333333;
    --text-muted: #6b7280;
    --border: #e5e7eb;
}

/* Reset e estilos base */
* { 
    box-sizing: border-box; 
}

body { 
    font-family: 'Open Sans', Arial, sans-serif; 
    margin: 0; 
    color: var(--text); 
    background: var(--bg); 
}

a { 
    color: inherit; 
    text-decoration: none; 
}

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

/* Estilos removidos - usando header padrão do evento-header.ejs */

/* Hero */
.hero {
    position: relative;
    min-height: 340px;
    max-height: 480px;
    display: grid;
    place-items: center;
    color: #fff;
    text-align: center;
    overflow: hidden;
}

.hero::before { 
    content: ""; 
    position: absolute; 
    inset: 0; 
    /* Comentário (PT-BR): Usa variável CSS --hero-bg se definida; caso contrário, aplica banner padrão */
    background: var(--hero-bg, url('https://images.unsplash.com/photo-1551836022-d5d88e9218df?q=80&w=1600&auto=format&fit=crop')) center/cover no-repeat; 
    filter: brightness(0.55); 
}

.hero-content { 
    position: relative; 
    z-index: 1; 
    padding: 30px 20px; 
}

.hero h1 { 
    font-size: 2.4rem; 
    margin: 0 0 12px; 
}

.hero p { 
    margin: 6px 0; 
    font-size: 1.05rem; 
    color: #e5e7eb; 
}

.hero .cta { 
    display: inline-block; 
    margin-top: 16px; 
}

.countdown { 
    margin-top: 14px; 
    font-weight: 700; 
    letter-spacing: 0.3px; 
}

/* Navegação interna — glassmorphism */
.evento-nav-internal {
    position: sticky;
    top: 56px;
    z-index: 1020;
    background: rgba(255, 255, 255, 0.85);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-bottom: 1px solid rgba(0, 0, 0, 0.08);
    padding: 0;
    transition: box-shadow 0.3s ease;
}

.evento-nav-internal.scrolled {
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.08);
}

.evento-nav-links {
    list-style: none;
    display: flex;
    gap: 4px;
    margin: 0;
    padding: 0;
    justify-content: center;
}

.evento-nav-links a {
    display: block;
    color: var(--text-muted);
    text-decoration: none;
    font-weight: 600;
    font-size: 0.9rem;
    padding: 12px 20px;
    border-radius: 6px 6px 0 0;
    position: relative;
    transition: color 0.3s ease, background 0.3s ease;
}

.evento-nav-links a::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    width: 0;
    height: 3px;
    background: var(--primary);
    border-radius: 3px 3px 0 0;
    transition: width 0.3s ease, left 0.3s ease;
}

.evento-nav-links a:hover {
    color: var(--primary);
    background: rgba(30, 136, 229, 0.06);
}

.evento-nav-links a.active {
    color: var(--primary);
}

.evento-nav-links a.active::after {
    width: 100%;
    left: 0;
}

/* Sections */
section {
    padding: 30px 0;
    scroll-margin-top: 130px;
}

/* Animações de entrada */
.animate-on-scroll {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.6s ease-out, transform 0.6s ease-out;
}

.animate-on-scroll.visible {
    opacity: 1;
    transform: translateY(0);
}

.animate-on-scroll .card {
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.5s ease-out, transform 0.5s ease-out;
}

.animate-on-scroll.visible .card {
    opacity: 1;
    transform: translateY(0);
}

.animate-on-scroll.visible .card:nth-child(1) { transition-delay: 0.05s; }
.animate-on-scroll.visible .card:nth-child(2) { transition-delay: 0.1s; }
.animate-on-scroll.visible .card:nth-child(3) { transition-delay: 0.15s; }
.animate-on-scroll.visible .card:nth-child(4) { transition-delay: 0.2s; }
.animate-on-scroll.visible .card:nth-child(5) { transition-delay: 0.25s; }
.animate-on-scroll.visible .card:nth-child(6) { transition-delay: 0.3s; }

/* section:nth-child(even) { 
    background: var(--muted); 
} */

h2 { 
    margin: 0 0 18px; 
    font-size: 1.6rem; 
}

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

.card {
    border: 1px solid var(--border);
    background: #fff;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0,0,0,0.06);
    transition: box-shadow 0.35s cubic-bezier(0.25, 0.46, 0.45, 0.94),
                transform 0.35s cubic-bezier(0.25, 0.46, 0.45, 0.94),
                border-color 0.35s ease;
}

.card:hover {
    box-shadow: 0 12px 32px rgba(0,0,0,0.14);
    transform: translateY(-6px);
    border-color: rgba(30, 136, 229, 0.2);
}

.card > img {
    width: 100%;
    height: 160px;
    object-fit: cover;
}

img.responsavel-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    object-fit: cover;
    flex-shrink: 0;
}

.card .body {
    padding: 18px;
}

.badge {
    display: inline-block;
    padding: 4px 10px;
    border-radius: 999px;
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.3px;
    background: var(--primary);
    color: #fff;
}

/* ===== Card Atividade — Layout moderno ===== */

.card-atividade-titulo {
    margin: 10px 0 14px;
    font-size: 1.1rem;
    font-weight: 700;
    line-height: 1.35;
    color: var(--text);
}

.card-meta-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px 16px;
    margin-bottom: 14px;
    padding-bottom: 14px;
    border-bottom: 1px solid var(--border);
}

.card-meta-item {
    display: flex;
    align-items: flex-start;
    gap: 8px;
    font-size: 0.85rem;
    color: var(--text-muted);
    line-height: 1.4;
}

.card-meta-item i {
    color: var(--primary);
    font-size: 0.8rem;
    margin-top: 2px;
    flex-shrink: 0;
    width: 14px;
    text-align: center;
}

.card-meta-item strong {
    color: var(--text);
    font-weight: 600;
}

.card-meta-item.vagas-destaque strong {
    color: var(--primary);
}

.card-meta-item.vagas-esgotadas strong {
    color: #dc3545;
}

/* ===== Responsáveis — Speaker cards ===== */

.card-responsaveis-titulo {
    font-size: 0.7rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.8px;
    color: var(--text-muted);
    margin-bottom: 10px;
}

.responsavel-card {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    padding: 10px 12px;
    background: var(--muted);
    border-radius: 8px;
    margin-bottom: 8px;
    border-left: 3px solid var(--primary);
}

.responsavel-card:last-child {
    margin-bottom: 0;
}

.responsavel-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: var(--primary);
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 0.85rem;
    flex-shrink: 0;
    object-fit: cover;
    text-transform: uppercase;
}

.responsavel-info {
    flex: 1;
    min-width: 0;
}

.responsavel-nome {
    font-weight: 700;
    font-size: 0.9rem;
    color: var(--text);
    line-height: 1.3;
}

.responsavel-papel {
    font-size: 0.78rem;
    color: var(--text-muted);
    line-height: 1.3;
    margin-top: 1px;
}

.responsavel-texto {
    font-size: 0.82rem;
    line-height: 1.45;
    color: #4a5568;
    margin-top: 6px;
    font-style: italic;
    border-top: 1px dashed var(--border);
    padding-top: 6px;
}

.btn { 
    display: inline-block; 
    padding: 8px 12px; 
    border-radius: 6px; 
    background: var(--primary); 
    color: #fff; 
    font-weight: 700; 
}

.btn.secondary { 
    background: var(--primary-dark); 
}

.btn.neutral { 
    background: #374151; 
}

/* Atividades Opcionais */
.atividade-opcional {
    display: flex;
    align-items: center;
    padding: 12px;
    border: 1px solid var(--border);
    border-radius: 6px;
    margin-bottom: 10px;
    background: var(--bg);
    transition: all 0.3s;
}

.atividade-opcional:hover {
    background: var(--muted);
    border-color: var(--primary);
}

.atividade-opcional input[type="checkbox"] {
    margin-right: 12px;
    transform: scale(1.2);
}

.atividade-opcional-info {
    flex: 1;
}

.atividade-opcional-titulo {
    font-weight: 600;
    color: var(--text);
    margin-bottom: 4px;
}

.atividade-opcional-detalhes {
    font-size: 0.9rem;
    color: var(--text-muted);
}

.atividade-opcional-vagas {
    font-size: 0.8rem;
    color: var(--primary);
    font-weight: 600;
    margin-left: 10px;
}

/* Estilos para atividades desabilitadas por conflito de horário */
.activity-disabled {
    opacity: 0.5 !important;
    pointer-events: none !important;
    background-color: #f8f9fa !important;
    border-color: #dee2e6 !important;
    cursor: not-allowed !important;
}

.activity-disabled input[type="checkbox"] {
    cursor: not-allowed !important;
}

.activity-disabled .activity-content {
    color: #6c757d !important;
}

/* Mensagens de status */
.mensagem-sucesso {
    background: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}

.mensagem-erro {
    background: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}

.mensagem-info {
    background: #d1ecf1;
    color: #0c5460;
    border: 1px solid #bee5eb;
}

/* Loading */
.loading {
    opacity: 0.6;
    pointer-events: none;
}

.loading::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 20px;
    height: 20px;
    margin: -10px 0 0 -10px;
    border: 2px solid var(--primary);
    border-radius: 50%;
    border-top-color: transparent;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* Programação */
.filters { 
    display: flex; 
    gap: 10px; 
    flex-wrap: wrap; 
    margin-bottom: 14px; 
}

.filters .chip {
    padding: 6px 14px;
    border: 1px solid var(--border);
    border-radius: 999px;
    cursor: pointer;
    font-weight: 500;
    font-size: 0.9rem;
    transition: all 0.3s ease;
    user-select: none;
}

.filters .chip:hover {
    border-color: var(--primary);
    color: var(--primary);
    background: rgba(30, 136, 229, 0.06);
}

.filters .chip.active {
    background: var(--primary);
    color: #fff;
    border-color: var(--primary);
    box-shadow: 0 2px 8px rgba(30, 136, 229, 0.3);
    transform: scale(1.05);
}

table { 
    width: 100%; 
    border-collapse: collapse; 
}

th, td { 
    border: 1px solid var(--border); 
    padding: 10px; 
    text-align: left; 
}

th { 
    background: #f0f4f8; 
}

/* Contato */
form .row { 
    display: grid; 
    grid-template-columns: 1fr 1fr; 
    gap: 12px; 
}

form input, form textarea { 
    width: 100%; 
    padding: 10px; 
    border: 1px solid var(--border); 
    border-radius: 6px; 
}

form textarea { 
    min-height: 120px; 
}

/* Footer */
footer { 
    background: #0f172a; 
    color: #cbd5e1; 
}

footer a { 
    color: #cbd5e1; 
}

.footer-inner { 
    display: grid; 
    grid-template-columns: 2fr 1fr 1fr; 
    gap: 18px; 
    padding: 26px 0; 
}

.social { 
    display: flex; 
    gap: 10px; 
}

/* Menu de Login/Perfil */
.login-btn {
    padding: 8px 16px;
    background: var(--primary);
    color: #fff !important;
    border-radius: 6px;
    font-weight: 600;
    transition: all 0.3s ease;
}

.login-btn:hover {
    background: var(--primary-dark);
    transform: translateY(-1px);
}

.user-menu {
    position: relative;
}

.user-menu-toggle {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 16px;
    background: var(--accent);
    color: #fff !important;
    border-radius: 6px;
    font-weight: 600;
    transition: all 0.3s ease;
}

.user-menu-toggle:hover {
    background: #fb8c00;
}

.user-dropdown {
    position: absolute;
    top: 100%;
    right: 0;
    background: #fff;
    border: 1px solid var(--border);
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
    min-width: 200px;
    z-index: 1000;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    transition: all 0.3s ease;
}

.user-dropdown.show {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.user-dropdown a {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px 16px;
    color: var(--text) !important;
    text-decoration: none;
    transition: background 0.2s ease;
}

.user-dropdown a:hover {
    background: var(--muted);
}

.user-dropdown hr {
    margin: 8px 0;
    border: none;
    border-top: 1px solid var(--border);
}

/* Modal de Login */
/* Definições de modal removidas para evitar conflito com user-menu.css */
/* As definições de .modal-overlay e .modal estão em user-menu.css */

.modal-header {
    text-align: center;
    margin-bottom: 24px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    position: relative;
}

.modal-header h3 {
    margin: 0 0 8px;
    color: var(--text);
    font-size: 1.5rem;
    flex: 1;
    text-align: left;
}

.modal-header p {
    margin: 0;
    color: var(--text-muted);
}

.close-btn {
    background: none;
    border: none;
    font-size: 1.5rem;
    color: var(--text-muted);
    cursor: pointer;
    padding: 8px;
    border-radius: 4px;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
}

.close-btn:hover {
    background: rgba(0, 0, 0, 0.1);
    color: var(--text);
}

/* Estilos para botões do modal */
.btn-secondary:hover {
    background: #6c757d !important;
    color: white !important;
    border-color: #6c757d !important;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(108, 117, 125, 0.3);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(0, 123, 255, 0.4) !important;
}

.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    margin-bottom: 6px;
    font-weight: 600;
    color: var(--text);
}

.form-group input {
    width: 100%;
    padding: 12px;
    border: 2px solid var(--border);
    border-radius: 8px;
    font-size: 16px;
    transition: border-color 0.3s ease;
}

.form-group input:focus {
    outline: none;
    border-color: var(--primary);
}

.btn-primary {
    width: 100%;
    padding: 12px;
    background: var(--primary);
    color: #fff;
    border: none;
    border-radius: 8px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.3s ease;
}

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

.btn-primary:disabled {
    background: #ccc;
    cursor: not-allowed;
}

.modal-footer {
    text-align: center;
    margin-top: 20px;
    padding-top: 20px;
    border-top: 1px solid var(--border);
}

.modal-close {
    position: absolute;
    top: 16px;
    right: 16px;
    background: none;
    border: none;
    font-size: 24px;
    color: var(--text-muted);
    cursor: pointer;
    transition: color 0.3s ease;
}

.modal-close:hover {
    color: var(--text);
}

.alert {
    padding: 12px;
    border-radius: 6px;
    margin-bottom: 16px;
    font-size: 14px;
}

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

.alert-error {
    background: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}

/* Botão de inscrição — pulse glow */
@keyframes pulse-glow {
    0%, 100% { box-shadow: 0 6px 20px rgba(0,0,0,0.15); }
    50% { box-shadow: 0 6px 30px rgba(40, 167, 69, 0.4); }
}

.btn-inscricao-evento {
    cursor: pointer;
    background: #fff;
    color: #1f2937;
    font-weight: 600;
    border-radius: 999px;
    padding: 14px 22px;
    font-size: 1rem;
    border: none;
    box-shadow: 0 6px 20px rgba(0,0,0,0.15);
    animation: pulse-glow 3s ease-in-out infinite;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.btn-inscricao-evento:hover {
    transform: scale(1.05);
    box-shadow: 0 8px 28px rgba(40, 167, 69, 0.35);
    animation: none;
}

.btn-inscricao-evento:disabled {
    animation: none;
    opacity: 0.6;
    cursor: not-allowed;
}

/* Footer links */
footer a {
    transition: color 0.3s ease;
}

footer a:hover {
    color: #fff;
}

/* Responsivo */
@media (max-width: 900px) {
    .grid { 
        grid-template-columns: 1fr 1fr; 
    }
    
    .footer-inner { 
        grid-template-columns: 1fr; 
    }
}

@media (max-width: 600px) {
    nav ul {
        display: none;
    }

    .grid {
        grid-template-columns: 1fr;
    }

    .hero {
        min-height: 280px;
        max-height: 360px;
    }

    .hero h1 {
        font-size: 1.8rem;
    }

    .hero-content {
        padding: 20px 16px;
    }

    .evento-nav-links {
        gap: 0;
    }

    .evento-nav-links a {
        padding: 10px 14px;
        font-size: 0.85rem;
    }

    section {
        scroll-margin-top: 110px;
    }

    .card-meta-grid {
        grid-template-columns: 1fr;
        gap: 6px;
    }

    .responsavel-card {
        padding: 8px 10px;
        gap: 10px;
    }

    .responsavel-avatar {
        width: 34px;
        height: 34px;
        font-size: 0.75rem;
    }

    form .row {
        grid-template-columns: 1fr;
    }

    .modal {
        padding: 24px;
        margin: 20px;
    }

    .user-dropdown {
        right: -20px;
    }

    .btn-inscricao-evento {
        padding: 12px 18px;
        font-size: 0.9rem;
    }
}