/* ESTILO MODERNO - SISTEMA DE EVENTOS 
   VersÃ£o: 2.3 (Corte de texto inteligente + Fix de Layout)
*/

:root {
  --primary-color: #016c94;
  --secondary-color: #ff8000;
  --primary-gradient: linear-gradient(135deg, #016c94 0%, #028dc2 100%);
  --secondary-gradient: linear-gradient(135deg, #ff8000 0%, #ffa600 100%);
  --bg-system: #f1f5f9;
  --bg-pattern: #cfe3ea6c;
}

body {
  font-family: "Poppins", sans-serif;
  background-color: var(--bg-pattern);
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='180' height='180'%3E%3Cg stroke='%239bbfc9' stroke-width='0.8' opacity='0.3'%3E%3Ccircle cx='40' cy='40' r='2' fill='%239bbfc9'/%3E%3Ccircle cx='140' cy='60' r='2' fill='%239bbfc9'/%3E%3Ccircle cx='90' cy='140' r='2' fill='%239bbfc9'/%3E%3Cline x1='40' y1='40' x2='140' y2='60'/%3E%3Cline x1='140' y1='60' x2='90' y2='140'/%3E%3Cline x1='90' y1='140' x2='40' y2='40'/%3E%3C/g%3E%3C/svg%3E");
  background-size: 180px 180px;
  color: #1e293b;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

/* --- RESET DEFINITIVO DE CORES BOOTSTRAP --- */

/* Links */
a { color: var(--primary-color); text-decoration: none; transition: 0.3s; }
a:hover { color: #004a66; }

/* Textos e Backgrounds */
.text-primary { color: var(--primary-color) !important; }
.bg-primary { background-color: var(--primary-color) !important; }

/* BotÃµes Outline - ForÃ§ando todas as bordas e estados */
.btn-outline-primary {
    color: var(--primary-color) !important;
    border-color: var(--primary-color) !important;
}

.btn-outline-primary:hover, 
.btn-outline-primary:active, 
.btn-outline-primary:focus,
.btn-check:checked + .btn-outline-primary {
    background-color: var(--primary-color) !important;
    border-color: var(--primary-color) !important;
    color: #ffffff !important;
    box-shadow: 0 0 0 0.25rem rgba(1, 108, 148, 0.25) !important;
}

/* Bordas UtilitÃ¡rias (.border-primary) */
.border-primary {
    border-color: var(--primary-color) !important;
}

/* Inputs, Selects e Checkboxes */
.form-control:focus, 
.form-select:focus {
    border-color: var(--primary-color) !important;
    box-shadow: 0 0 0 0.25rem rgba(1, 108, 148, 0.15) !important;
}

.form-check-input:checked {
    background-color: var(--primary-color) !important;
    border-color: var(--primary-color) !important;
}

/* Spinners e Ãcones */
.spinner-border.text-primary {
    color: var(--primary-color) !important;
}

/* --- HEADER --- */
.main-header {
    background: var(--primary-gradient);
    padding: 3rem 0;
    border-bottom: 5px solid var(--secondary-color);
    margin-bottom: 2rem;
}

/* --- CARDS GERAIS --- */
.card {
  border: 1px solid rgba(1, 108, 148, 0.1);
  border-radius: 1.2rem;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  overflow: hidden;
  background: white;
  position: relative;
}

/* --- CONFIGURAÃ‡ÃƒO ESPECÃFICA PARA A INDEX (GRID DE EVENTOS) --- */
/* Assumindo que na sua index vocÃª tenha algo como <div class="row">... */
.row .card .card-text {
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
    text-overflow: ellipsis;
    min-height: 4.5em; 
}

/* --- CONFIGURAÃ‡ÃƒO PARA A PÃGINA DE DETALHES (EVENTO.PHP) --- */
/* Removemos as restriÃ§Ãµes para quando o texto estiver dentro do editor ou pÃ¡ginas de detalhes */
.editor-content, 
.card-body .editor-content {
    display: block !important;
    overflow: visible !important;
    min-height: auto !important;
    -webkit-line-clamp: unset !important;
}

/* Efeito de hover apenas nos cards que sÃ£o links (geralmente na index) */
.card:hover {
  transform: translateY(-8px);
  border-color: var(--primary-color);
  box-shadow: 0 20px 25px -5px rgba(0,0,0,0.1);
}

.card-img-top-cover {
    height: 200px;
    width: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

/* Badge de Data */
.event-date-badge {
    position: absolute;
    bottom: -15px;
    right: 20px;
    background: white;
    padding: 8px 15px;
    border-radius: 12px;
    text-align: center;
    box-shadow: 0 4px 6px -1px rgba(0,0,0,0.1);
    z-index: 10;
    border: 1px solid #f1f5f9;
}
.event-date-badge .day { display: block; font-weight: 700; font-size: 1.2rem; color: var(--primary-color); }

/* --- Estilos da PÃ¡gina de InscriÃ§Ãµes / Consulta --- */

/* Container de busca com sombra suave */
.search-container {
    background: white;
    border-radius: 20px;
    box-shadow: 0 10px 30px -5px rgba(0,0,0,0.05);
    border: 1px solid rgba(1, 108, 148, 0.1);
}

/* BotÃ£o com o gradiente padrÃ£o do sistema */
.btn-gradient {
    background: var(--primary-gradient);
    border: none;
    color: white !important;
    font-weight: 600;
    border-radius: 50px;
    transition: all 0.3s ease;
}

.btn-gradient:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(1, 108, 148, 0.3);
    opacity: 0.9;
}

/* Filtros de Categorias (PadrÃ£o Index) */
.btn-filter {
    padding: 8px 22px;
    border-radius: 50px;
    border: 1px solid #dee2e6;
    background: white;
    color: #64748b;
    font-size: 0.9rem;
    font-weight: 500;
    transition: all 0.3s ease;
    text-decoration: none;
    display: inline-block;
}

.btn-filter:hover {
    border-color: var(--primary-color);
    color: var(--primary-color);
    background: rgba(1, 108, 148, 0.05);
}

.btn-filter.active {
    background: var(--primary-gradient);
    color: white !important;
    border-color: transparent;
    box-shadow: 0 4px 10px rgba(1, 108, 148, 0.2);
}

/* Tabs de NavegaÃ§Ã£o (InscriÃ§Ãµes vs Certificados) */
.nav-pills .nav-link {
    color: #64748b;
    font-weight: 500;
    border-radius: 12px;
    padding: 12px 25px;
    transition: 0.3s;
}

.nav-pills .nav-link.active {
    background-color: var(--primary-color) !important;
    color: white !important;
    box-shadow: 0 4px 12px rgba(1, 108, 148, 0.2);
}

/* Ajuste para o header da consulta */
.mt-n5 {
    margin-top: -3rem !important;
}

/* Ajuste do botÃ£o voltar no mobile */
.btn-back-mobile {
    top: 10px !important;
    left: 15px !important;
    z-index: 10;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 5px 12px;
}

/* No mobile bem pequeno, deixamos apenas o Ã­cone para economizar espaÃ§o */
@media (max-width: 576px) {
    .main-header h1 {
        font-size: 1.5rem; /* Diminui um pouco o tÃ­tulo no mobile para caber o botÃ£o ao lado */
        margin-top: 10px;
    }
    .btn-back-mobile {
        padding: 8px; /* Vira um botÃ£o circular mais fÃ¡cil de tocar */
    }
}

/* Overlay de Loading */
#loadingOverlay {
    position: fixed;
    top: 0; left: 0;
    width: 100%; height: 100%;
    background: rgba(255, 255, 255, 0.95);
    display: none;
    z-index: 9999;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

.website-field { display: none !important; }

.footer-custom { margin-top: auto; padding: 2rem 0; }