/* Variáveis de Cores e Estilo Moderno */
:root {
    --bg-color: #f4f7f6;
    --text-color: #333;
    --primary-color: #0a2342;
    --accent-color: #3a6ea5;
    --media-bg: #e9ecef;
    --font-main: 'Roboto', sans-serif;
    --font-title: 'Dancing Script', cursive;
}

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

body {
    font-family: var(--font-main);
    background-color: var(--bg-color);
    color: var(--text-color);
    line-height: 1.7;
    overflow-x: hidden; /* Evita rolagem horizontal quando o menu abre */
}

/* Controle de Idiomas */
body.lang-en .pt { display: none !important; }
body.lang-pt .en { display: none !important; }

/* Barra de Navegação */
nav {
    background-color: var(--primary-color);
    color: #fff;
    padding: 1rem 5%;
    display: flex;
    justify-content: space-between;
    align-items: center;
    position: sticky;
    top: 0;
    z-index: 1000;
    box-shadow: 0 2px 5px rgba(0,0,0,0.2);
}

.nav-left {
    display: flex;
    align-items: center;
}

/* Botão Hambúrguer */
.menu-btn {
    background: transparent;
    border: none;
    color: #fff;
    font-size: 1.8rem;
    cursor: pointer;
    margin-right: 15px;
    transition: color 0.3s ease;
}

.menu-btn:hover { color: var(--accent-color); }

.logo { font-weight: bold; font-size: 1.2rem; letter-spacing: 1px; font-family: var(--font-main); }

.lang-toggle button {
    background: transparent; color: #fff; border: 1px solid #fff;
    padding: 6px 16px; cursor: pointer; border-radius: 20px;
    margin-left: 8px; transition: all 0.3s ease;
    font-family: var(--font-main); font-weight: 500;
}

.lang-toggle button.active, .lang-toggle button:hover {
    background: #fff; color: var(--primary-color);
}

/* =========================================
   MENU LATERAL (SIDEBAR)
   ========================================= */
.sidebar {
    position: fixed !important; 
    top: 0;
    height: 100vh; 
    z-index: 9999 !important; /* CAMADA DA FRENTE! Vence o overlay */
    width: 280px; 
    left: -300px; /* Escondido fora da tela por padrão */
    transition: left 0.3s ease !important; /* Deslize suave */
    background-color: var(--primary-color, #ffffff); 
    overflow-y: auto; 
}

.sidebar.active {
    left: 0 !important; /* Puxa o menu para dentro da tela quando clica */
}

.menu-links { 
    list-style: none; 
    margin-top: 5rem; /* Empurra os links para baixo do botão! */
}
.menu-links li { margin-bottom: 0.5rem; }
.menu-links a {
    color: #eee; text-decoration: none; font-size: 1.1rem;
    display: block; padding: 12px 15px; border-radius: 6px;
    transition: background 0.2s; border-bottom: 1px solid rgba(255,255,255,0.05);
}
.menu-links a:hover { background-color: var(--accent-color); color: #fff; }

/* Ajuste do botão fechar (X) da sidebar */
.sidebar .close-btn {
    position: absolute !important;
    top: 15px !important; 
    right: 20px !important; 
    font-size: 2.5rem !important; 
    background: transparent !important;
    border: none !important;
    color: rgba(255, 255, 255, 0.7) !important; 
    cursor: pointer !important;
    z-index: 10001 !important; 
    line-height: 1 !important;
    transition: color 0.3s ease;
}

.sidebar .close-btn:hover {
    color: #ffffff !important; 
}

/* =========================================
   OVERLAY (FUNDO ESCURO DO MENU)
   ========================================= */
.overlay {
    position: fixed !important; 
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background-color: rgba(0, 0, 0, 0.6) !important; 
    z-index: 9998 !important; 
    display: none; 
    opacity: 0;
    transition: opacity 0.3s ease; 
}

.overlay.active {
    display: block !important;
    opacity: 1;
}

/* =========================================
   CABEÇALHO E BANNER
   ========================================= */
header { background-color: var(--primary-color); text-align: center; }
.banner-img {
    width: 100%; max-width: 1200px; height: auto; display: block; margin: 0 auto;
}
.header-info {
    background-color: var(--accent-color); color: #fff; padding: 15px 5%;
    font-size: 1.1rem; font-weight: 500; box-shadow: 0 4px 6px rgba(0,0,0,0.1);
}
.header-info p { margin-bottom: 0; text-align: center; }

/* =========================================
   CONTAINER PRINCIPAL E TEXTOS
   ========================================= */
.container { max-width: 1000px; margin: 3rem auto; padding: 0 5%; min-height: 50vh; }
.content-block {
    background: #fff; padding: 2.5rem; border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.08); margin-bottom: 2.5rem;
}
h2 { color: var(--primary-color); margin-bottom: 1.5rem; }
h3 { 
    color: var(--primary-color); border-bottom: 3px solid var(--accent-color); 
    display: inline-block; padding-bottom: 5px; margin: 2rem 0 1rem 0; font-weight: 500;
}
p { margin-bottom: 1.2rem; text-align: justify; }
em { color: var(--accent-color); font-style: italic; }

/* =========================================
   ELEMENTOS DE INTERMIDIALIDADE
   ========================================= */
.media-grid {
    display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 1.5rem; margin: 2rem 0;
}
.media-item {
    background: var(--media-bg); border-radius: 8px; overflow: hidden;
    display: flex; flex-direction: column; align-items: center;
    padding-bottom: 1.5rem; box-shadow: 0 2px 8px rgba(0,0,0,0.05); transition: transform 0.3s ease;
}
.media-item:hover { transform: translateY(-5px); }
.media-item img, .media-item video { width: 100%; height: 200px; object-fit: cover; display: block; margin-bottom: 1rem; }
.media-item div { color: var(--primary-color); font-weight: 500; }

/* =========================================
   LISTA DE TÓPICOS
   ========================================= */
.topics-list {
    list-style: none; display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 15px; margin-top: 1rem;
}
.topics-list li {
    background: var(--bg-color); padding: 15px 20px; border-left: 4px solid var(--accent-color);
    border-radius: 4px; font-weight: 500; color: var(--primary-color);
}
.highlight-box {
    margin-top: 2rem; padding: 2rem; background: var(--primary-color);
    color: #fff; border-radius: 8px; text-align: center; font-size: 1.1rem;
}

/* =========================================
   RODAPÉ
   ========================================= */
footer {
    text-align: center; padding: 3rem 5%; background: var(--primary-color);
    color: #ccc; font-size: 0.95rem;
}
footer p { text-align: center; margin-bottom: 0.5rem; }

/* =========================================
   CARROSSEL / GALERIA DE FOTOS
   ========================================= */
.slideshow-container {
    width: 100%;
    height: 250px; 
    position: relative;
    overflow: hidden;
    border-radius: 8px 8px 0 0; 
}

.slide {
    width: 100%;
    height: 100%;
    display: none; 
}

.slide img {
    width: 100%;
    height: 100%;
    object-fit: cover; 
    border-radius: 8px 8px 0 0;
}

.prev, .next {
    cursor: pointer;
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 36px;
    height: 36px;
    background-color: rgba(0, 0, 0, 0.5); 
    color: white;
    font-weight: bold;
    font-size: 16px;
    border-radius: 50%; 
    display: flex;
    align-items: center;
    justify-content: center;
    user-select: none;
    transition: background-color 0.3s ease;
    text-decoration: none;
}

.prev { left: 10px; }
.next { right: 10px; }

.prev:hover, .next:hover {
    background-color: rgba(0, 0, 0, 0.8);
}

.fade {
    animation-name: fadeAnim;
    animation-duration: 1.5s;
}

@keyframes fadeAnim {
    from {opacity: 0.4} 
    to {opacity: 1}
}

/* =========================================
   ESTILOS DA PÁGINA DE PROGRAMAÇÃO (ABAS E GRADE)
   ========================================= */
.tabs-container {
    display: flex;
    justify-content: center;
    gap: 10px;
    margin-bottom: 2rem;
    border-bottom: 2px solid #ddd;
    flex-wrap: wrap;
}

.tab-btn {
    background: none;
    border: none;
    padding: 12px 15px;
    font-size: 1rem;
    font-family: 'Roboto', sans-serif;
    font-weight: 500;
    color: #666;
    cursor: pointer;
    border-bottom: 3px solid transparent;
    transition: all 0.3s ease;
}

.tab-btn:hover {
    color: var(--primary-color);
}

.tab-btn.active {
    color: var(--accent-color);
    border-bottom: 3px solid var(--accent-color);
    font-weight: bold;
}

.tab-content {
    display: none;
    animation: slideIn 0.4s ease-out forwards;
}

.tab-content.active {
    display: block;
}

@keyframes slideIn {
    from { opacity: 0; transform: translateX(20px); }
    to { opacity: 1; transform: translateX(0); }
}

/* Estilos da Grade Horária */
.prog-item { 
    margin-bottom: 2rem; 
    padding-bottom: 1.5rem; 
    border-bottom: 1px dashed #ccc; 
}

.prog-item:last-child { 
    border-bottom: none; 
}

.time { 
    font-weight: bold; 
    color: var(--accent-color); 
    min-width: 100px; 
    display: inline-block; 
}

.prog-item .activity-title { 
    display: block; 
    font-size: 1.15rem; 
    font-weight: 700; 
    color: var(--primary-color); 
    margin-top: 5px; 
    margin-bottom: 0.4rem; 
}

.prog-item p {
    font-size: 0.95rem; 
    line-height: 1.5;
    margin-top: 0.2rem;
    margin-bottom: 0.5rem;
    color: #444444; 
}

.prog-item p strong {
    font-weight: 600; 
    color: #222222;
}

.location { 
    font-style: italic; 
    font-size: 0.9rem; 
    color: #555; 
}

/* =========================================
   LIGHTBOX DA GALERIA (TELA CHEIA)
   ========================================= */

.lightbox-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background-color: rgba(0, 0, 0, 0.9); /* Fundo bem escuro para destacar a foto */
    z-index: 10000; /* Fica acima até mesmo do menu lateral */
    display: none; /* Escondido por padrão */
    justify-content: center;
    align-items: center;
    flex-direction: column;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.lightbox-overlay.active {
    display: flex;
    opacity: 1;
}

.lightbox-img {
    max-width: 90%;
    max-height: 80vh;
    border-radius: 8px;
    box-shadow: 0 4px 25px rgba(0,0,0,0.8); /* Sombra elegante ao redor da foto */
}

.lightbox-caption {
    color: #fff;
    margin-top: 15px;
    font-size: 1rem;
    font-weight: 300;
}

.lightbox-close {
    position: absolute;
    top: 20px;
    right: 30px;
    font-size: 3rem;
    color: rgba(255, 255, 255, 0.7);
    cursor: pointer;
    line-height: 1;
    transition: color 0.3s ease;
}

.lightbox-close:hover {
    color: #ffffff;
}

/* =========================================
   COMPORTAMENTO DE COLAPSO (RESUMOS)
   ========================================= */

.prog-item.collapsible {
    cursor: pointer;
    position: relative;
    transition: background-color 0.3s ease;
}

.prog-item.collapsible:hover {
    background-color: rgba(0, 0, 0, 0.02); /* Leve destaque ao passar o mouse */
}

.toggle-icon {
    position: absolute;
    top: 15px;
    right: 15px;
    font-size: 1.2rem;
    color: var(--accent-color);
    transition: transform 0.3s ease;
}

.prog-item.active .toggle-icon {
    transform: rotate(180deg); /* Vira a setinha para cima quando aberto */
}

.abstract-content {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.6s ease, padding 0.5s ease, margin 0.5s ease;
    background-color: #f8f9fa; /* Fundo sutil para destacar o resumo */
    border-left: 4px solid var(--accent-color);
    border-radius: 4px;
    padding: 0 20px;
    margin-top: 0;
}

.prog-item.active .abstract-content {
    max-height: 4000px; /* Grande o suficiente para comportar várias mesas */
    padding: 20px;
    margin-top: 15px;
    margin-bottom: 10px;
}

.abstract-content h4 {
    color: var(--primary-color);
    margin-top: 10px;
    margin-bottom: 8px;
    font-size: 1.05rem;
}

.abstract-content p {
    font-size: 0.9rem;
    margin-bottom: 15px;
    text-align: justify;
    line-height: 1.6;
}

.abstract-content p:last-child {
    margin-bottom: 0;
}
