/* RESET & FONTS */
@import url('https://fonts.googleapis.com/css2?family=Poppins:wght@400;600;700&display=swap');

:root {
    --primary-accent: #E91E63;
    --background-color: #f4f6f8;
    --card-background: #ffffff;
    --text-primary: #2c3e50;
    --text-secondary: #7f8c8d;
    --border-color: #e0e6ed;
    --header-height: 60px;
    --shadow-color: rgba(44, 62, 80, 0.1);
    
    /* Status Colors */
    --status-live: #27ae60;   /* Green */
    --status-soon: #2196F3;   /* Blue */
    --status-ending: #d35400; /* Dark Orange */
    --status-today: #8e44ad;  /* Purple */
    --status-ended: #95a5a6;  /* Gray */
}

body.dark-mode {
    --primary-accent: #ff4081;
    --background-color: #1a202c;
    --card-background: #2d3748;
    --text-primary: #edf2f7;
    --text-secondary: #a0aec0;
    --border-color: #4a5568;
    --shadow-color: rgba(0, 0, 0, 0.3);
}

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

/* MAP DARK MODE INVERSION */
body.dark-mode .map-tiles {
    filter: invert(100%) hue-rotate(180deg) brightness(95%) contrast(90%);
    -webkit-filter: invert(100%) hue-rotate(180deg) brightness(95%) contrast(90%);
    transition: filter 0.3s ease;
}
body.dark-mode .satellite-tiles { filter: none; }

/* LAYOUT */
html { height: 100%; overflow: hidden; }
body {
    height: 100%; height: 100dvh; width: 100%;
    margin: 0; padding: 0; overflow: hidden;
    font-family: 'Poppins', sans-serif;
    background-color: var(--background-color);
    color: var(--text-primary);
    display: flex; flex-direction: column;
}

/* HEADER */
.top-header {
    height: var(--header-height);
    flex: 0 0 auto;
    background: var(--card-background);
    border-bottom: 1px solid var(--border-color);
    display: flex; justify-content: space-between; align-items: center;
    padding: 0 1em;
    z-index: 500;
}

.header-logo {
    display: flex;
    flex-direction: column;
    justify-content: center;
    line-height: 1;
}

/* Remove a cor padrão do pai, pois vamos colorir cada letra */
.header-logo .site-title { 
    margin: 0; 
    font-size: 1rem; 
    font-weight: 700;
    display: flex;
    align-items: center;
    gap: 6px; /* Espaço entre a Máscara e o Texto */
    color: var(--text-primary);
}

/* Garante que o container de texto não quebre linha */
.title-text {
    display: flex; /* Mantém alinhado */
    align-items: baseline; /* Alinha pela base das letras */
}

/* --- CORES EXTRAÍDAS DA LOGO --- */

/* M - Turquesa (da cauda/espiral) */
.c-teal { color: #00acc1; } 

/* A - Amarelo Ouro (dos círculos) */
/* Usei um tom mais escuro que o da imagem para facilitar a leitura no fundo branco */
.c-yellow { color: #fbc02d; } 

/* P - Laranja (dos círculos) */
.c-orange { color: #fb8c00; } 

/* A - Verde Limão (dos círculos) */
.c-green { color: #7cb342; } 

/* Carnaval - Rosa (Sua cor principal) */
.c-pink { 
    color: var(--primary-accent); /* Mantém o rosa padrão do site */
    /* Opcional: Se quiser dar um peso maior para a palavra Carnaval */
    /* font-weight: 800; */ 
}

.title-icon { width: 20px; height: 20px; }

.header-logo .site-subtitle {
    font-size: 0.75em;
    color: var(--text-secondary);
    margin-top: 2px;
    font-weight: 400;
    letter-spacing: 0.5px;
}

.author-link { color: #2196F3; text-decoration: underline; font-weight: 600; }
.author-link:hover { color: #1976D2; }

.header-actions { display: flex; align-items: center; gap: 12px; }

/* HEADER BUTTONS */
.contact-btn, .support-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    transition: transform 0.2s, background-color 0.2s;
    cursor: pointer;
    border: none;
    background: none;
}

.contact-btn { color: #2196F3; }
.contact-btn:hover { transform: scale(1.1); background-color: rgba(33, 150, 243, 0.1); }

.support-btn { color: #E91E63; }
.support-btn:hover { transform: scale(1.1); background-color: rgba(233, 30, 99, 0.1); }

/* THEME SWITCH */
.theme-switch { position: relative; display: flex; align-items: center; justify-content: space-between; width: 50px; height: 26px; background-color: var(--background-color); border: 1px solid var(--border-color); border-radius: 30px; cursor: pointer; padding: 0 4px; overflow: hidden; }
.switch-thumb { position: absolute; top: 2px; left: 2px; width: 20px; height: 20px; background-color: var(--card-background); border-radius: 50%; transition: transform 0.3s ease; box-shadow: 0 1px 3px rgba(0,0,0,0.2); z-index: 2; }
body.dark-mode .switch-thumb { transform: translateX(24px); }
.sun-icon, .moon-icon { width: 14px; height: 14px; position: absolute; top: 50%; transform: translateY(-50%); z-index: 1; }
.sun-icon { left: 6px; color: #f39c12; }
.moon-icon { right: 6px; color: #9b59b6; }

/* MAIN CONTENT */
.main-content-area {
    flex: 1; height: calc(100dvh - var(--header-height));
    position: relative; overflow: hidden; 
    display: flex; flex-direction: column;
}
.container { width: 100%; height: 100%; max-width: 1600px; margin: 0 auto; padding: 1em; display: flex; flex-direction: column; }
main { flex: 1; display: flex; flex-direction: column; height: 100%; min-height: 0; overflow: hidden; }

/* GRID LAYOUT DESKTOP */
.main-content-grid { 
    display: grid; 
    grid-template-columns: 35% 1fr; 
    gap: 1.5em; 
    height: 100%; 
    width: 100%; 
    min-height: 0; 
}

/* LEFT COLUMN (MAPA + ANUNCIO) */
.left-column {
    display: flex;
    flex-direction: column;
    gap: 1em;
    height: 100%;
    min-height: 0;
}

/* MAP */
.map-container {
    flex: 1; /* Ocupa o espaço restante */
    width: 100%;
    border-radius: 12px; 
    overflow: hidden;
    border: 1px solid var(--border-color);
    position: relative; 
    background: #e5e5e5;
    min-height: 0;
}
#map { width: 100%; height: 100%; z-index: 1; }

.map-control-switch { 
    position: absolute; bottom: 10px; left: 10px; 
    z-index: 1000; 
    background-color: white; padding: 3px; border-radius: 8px; box-shadow: 0 2px 6px rgba(0,0,0,0.2); 
    display: flex; align-items: center;
}
body.dark-mode .map-control-switch { background-color: #333; }

/* --- BOTÃO BUSCAR NESTA ÁREA (MODIFICADO PARA SER MAIS ESTREITO) --- */
.map-search-btn { 
    display: flex;
    align-items: center;
    gap: 6px; /* Gap reduzido */
    position: absolute; top: auto; bottom: 10px; left: 50%; transform: translateX(-50%) translateY(100px); 
    z-index: 1001; 
    padding: 6px 14px; /* Padding reduzido para evitar sobreposição */
    background-color: var(--primary-accent); 
    color: white; border: none; border-radius: 20px; 
    box-shadow: 0 4px 12px rgba(0,0,0,0.25); 
    cursor: pointer; 
    font-weight: 600; font-size: 0.8em; /* Fonte reduzida */
    opacity: 0; transition: transform 0.3s, opacity 0.3s; pointer-events: none; 
    white-space: nowrap; /* Evita quebra de linha indesejada */
}
.map-search-btn.visible { transform: translateX(-50%) translateY(0); opacity: 1; pointer-events: auto; }

/* --- NOVO BOTÃO: MINHA LOCALIZAÇÃO (Estilo igual ao de buscar, mas com quebra de linha) --- */
.map-initial-locate-btn {
    position: absolute;
    bottom: 10px; right: 10px;
    z-index: 1002;
    display: flex;
    align-items: center;
    gap: 6px;
    background-color: var(--primary-accent); /* Mesmo fundo rosa */
    color: white; /* Texto branco */
    padding: 6px 12px; /* Padding compacto */
    border: none;
    border-radius: 12px; /* Borda um pouco menos arredondada para acomodar o bloco de texto */
    box-shadow: 0 4px 12px rgba(0,0,0,0.25);
    cursor: pointer;
    font-weight: 600;
    transition: transform 0.2s, box-shadow 0.2s;
    animation: slideUpFade 0.5s ease-out;
}

.map-initial-locate-btn span {
    font-size: 0.7em; /* Fonte pequena */
    line-height: 1.1; /* Linhas próximas */
    text-align: left;
    display: block;
}

.map-initial-locate-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 15px rgba(0,0,0,0.3);
    background-color: #d81b60; /* Tom um pouco mais escuro no hover */
}

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

/* LOCATE ME BUTTON (O botão original pequeno) */
.map-locate-btn {
    position: absolute; 
    bottom: 10px; right: 10px; 
    z-index: 1000;
    width: 40px; height: 40px;
    background-color: white; 
    color: var(--text-primary);
    border: none; border-radius: 8px; 
    box-shadow: 0 2px 6px rgba(0,0,0,0.2);
    cursor: pointer;
    display: flex; align-items: center; justify-content: center;
    transition: background-color 0.2s, color 0.2s;
}
.map-locate-btn:hover { background-color: #f0f0f0; color: var(--primary-accent); }
.map-locate-btn.active { color: var(--primary-accent); background-color: rgba(233, 30, 99, 0.1); }

body.dark-mode .map-locate-btn { background-color: #333; color: var(--text-primary); }
body.dark-mode .map-locate-btn:hover { background-color: #444; color: var(--primary-accent); }
body.dark-mode .map-locate-btn.active { background-color: #1a202c; color: var(--primary-accent); }

/* USER MARKER */
.user-location-marker { background: transparent; border: none; }
.user-dot { width: 14px; height: 14px; background-color: var(--primary-accent); border: 2px solid white; border-radius: 2px; box-shadow: 0 1px 4px rgba(0,0,0,0.4); position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%) rotate(45deg); z-index: 2; }
.user-pulse { width: 40px; height: 40px; background-color: rgba(233, 30, 99, 0.4); border-radius: 4px; position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%) rotate(45deg); z-index: 1; animation: map-pulse 2s infinite; }
@keyframes map-pulse { 0% { transform: translate(-50%, -50%) rotate(45deg) scale(0.5); opacity: 1; } 100% { transform: translate(-50%, -50%) rotate(45deg) scale(1.5); opacity: 0; } }

/* MARKER ANIMATION (ORIGINAL) */
@keyframes double-pulse { 0% { r: 6; stroke-width: 1; stroke-opacity: 1; fill-opacity: 0.6; } 25% { r: 14; stroke-width: 10; stroke-opacity: 0.5; fill-opacity: 0.9; } 50% { r: 6; stroke-width: 1; stroke-opacity: 1; fill-opacity: 0.6; } 75% { r: 14; stroke-width: 10; stroke-opacity: 0.5; fill-opacity: 0.9; } 100% { r: 6; stroke-width: 1; stroke-opacity: 1; fill-opacity: 0.6; } }
.marker-active-pulse { animation: double-pulse 1s ease-out; transform-origin: center; }

/* ANIMAÇÃO DE DESTAQUE DO MARCADOR SELECIONADO (4 SEGUNDOS) */
@keyframes blink-marker {
    0% { stroke-width: 3; stroke-opacity: 1; opacity: 1; }
    50% { stroke-width: 10; stroke-opacity: 0.6; opacity: 0.8; }
    100% { stroke-width: 3; stroke-opacity: 1; opacity: 1; }
}
.marker-selected-anim {
    animation: blink-marker 1s ease-in-out 4; /* Pisca 4 vezes */
    transform-origin: center;
}

/* --- ANIMAÇÃO DE DESTAQUE DO CARD SELECIONADO (4 SEGUNDOS) --- */
@keyframes card-flash {
    0% { box-shadow: 0 0 0 0 rgba(233, 30, 99, 0); }
    50% { box-shadow: 0 0 15px 4px rgba(233, 30, 99, 0.3); } /* Brilho rosa suave no meio */
    100% { box-shadow: 0 0 0 0 rgba(233, 30, 99, 0); }
}

.evento-card.highlighted {
    animation: card-flash 1s ease-in-out 4; /* 4 ciclos de 1s */
    border-color: var(--primary-accent);
    z-index: 5;
}

/* ESTADO EXPANDIDO (FIXO) */
.evento-card.expanded {
    border-color: var(--primary-accent);
    background-color: rgba(233, 30, 99, 0.03); /* Fundo rosa bem suave */
}

body.dark-mode .evento-card.expanded {
    background-color: rgba(233, 30, 99, 0.1);
}

.leaflet-control-reset a { background-image: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="black" stroke-width="2.5" stroke-linecap="round" stroke-linejoin="round"><path d="M8 3H5a2 2 0 0 0-2 2v3m18 0V5a2 2 0 0 0-2-2h-3m0 18h3a2 2 0 0 0 2-2v-3M3 16v3a2 2 0 0 0 2 2h3"></path></svg>'); background-size: 16px 16px; background-position: center; background-repeat: no-repeat; cursor: pointer; background-color: white; }
body.dark-mode .leaflet-control-reset a { background-color: #333; background-image: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="white" stroke-width="2.5" stroke-linecap="round" stroke-linejoin="round"><path d="M8 3H5a2 2 0 0 0-2 2v3m18 0V5a2 2 0 0 0-2-2h-3m0 18h3a2 2 0 0 0 2-2v-3M3 16v3a2 2 0 0 0 2 2h3"></path></svg>'); }

/* SWITCH */
.switch { position: relative; display: inline-block; width: 36px; height: 20px; margin: 0; }
.switch input { opacity: 0; width: 0; height: 0; }
.slider { position: absolute; cursor: pointer; top: 0; left: 0; right: 0; bottom: 0; background-color: #ccc; transition: .4s; border-radius: 24px; }
.slider:before { position: absolute; content: ""; height: 14px; width: 14px; left: 3px; bottom: 3px; background-color: white; transition: .4s; border-radius: 50%; }
input:checked + .slider { background-color: var(--primary-accent); }
input:checked + .slider:before { transform: translateX(16px); }

/* LIST */
.events-list-container {
    height: 100%; overflow-y: auto; padding-right: 8px; padding-bottom: 4em;
    display: flex; flex-direction: column; min-height: 0;
    overflow-x: hidden; position: relative; min-width: 0;
}
.events-list-container::-webkit-scrollbar { width: 8px; }
.events-list-container::-webkit-scrollbar-track { background: transparent; }
.events-list-container::-webkit-scrollbar-thumb { background-color: var(--border-color); border-radius: 4px; }

/* --- INFO BANNER (AVISO PBH) --- */
.info-banner {
    background-color: #fff3cd; /* Amarelo suave */
    border: 1px solid #ffeeba;
    color: #856404;
    padding: 12px;
    border-radius: 8px;
    margin-bottom: 15px;
    display: flex;
    align-items: flex-start;
    gap: 10px;
    font-size: 0.7rem;
    line-height: 1.4;
}

.info-icon {
    font-size: 1.2rem;
    line-height: 1;
}

.info-text strong {
    font-weight: 700;
}

/* Dark Mode para o Banner */
body.dark-mode .info-banner {
    background-color: #2c3e50; /* Azul escuro/Cinza */
    border-color: #4a5568;
    color: #ffeb3b; /* Texto amarelo para destaque */
}

/* --- RESULTS HEADER (RESPONSIVO E COMPACTO) --- */
.results-header { 
    display: flex; 
    justify-content: space-between; 
    align-items: center; 
    margin-bottom: 0.8em; 
    flex-wrap: wrap; 
    gap: 8px;
}

.total-count { 
    margin: 0; 
    font-size: 0.75em; 
    color: var(--text-secondary); 
    white-space: nowrap;
    flex-grow: 1; /* Ocupa o espaço para empurrar o resto para a direita */
}

/* --- CLUSTER: Botão + Toggle Unidos --- */
.fav-cluster {
    display: flex;
    align-items: center;
    gap: 8px;
    background-color: var(--card-background);
    padding: 3px 3px 3px 8px; /* Padding ajustado */
    border-radius: 30px;
    /* border: 1px solid var(--border-color); (Opcional, removido para ficar mais limpo) */
}

/* --- BOTÃO DE COMPARTILHAR (Ícone Circular) --- */
.share-favs-btn {
    display: none; /* JS controla */
    align-items: center;
    justify-content: center;
    background-color: #25D366; /* Verde WhatsApp */
    color: white;
    border: none;
    width: 28px;  /* Tamanho pequeno e fixo */
    height: 28px; 
    border-radius: 50%;
    cursor: pointer;
    box-shadow: 0 2px 4px rgba(0,0,0,0.15);
    transition: transform 0.2s, background-color 0.2s;
    text-decoration: none;
    flex-shrink: 0;
    padding: 0;
}

.share-favs-btn:hover {
    background-color: #128C7E;
    transform: scale(1.1);
}

.share-favs-btn svg {
    width: 14px;
    height: 14px;
    fill: none;
    stroke: currentColor;
    stroke-width: 2;
    stroke-linecap: round;
    stroke-linejoin: round;
    margin-right: 1px; /* Ajuste visual */
}

/* --- TOGGLE DE FAVORITOS (Estilo Botão com SVG) --- */
.fav-toggle-wrapper { 
    display: flex; 
    align-items: center; 
    cursor: pointer;
    user-select: none;
}

.fav-toggle-wrapper input { display: none; }

.fav-toggle-wrapper label { 
    cursor: pointer; 
    display: flex; 
    align-items: center; 
    gap: 6px;
    padding: 5px 10px;
    border-radius: 20px;
    transition: all 0.2s;
    font-size: 0.8em;
    font-weight: 600;
    color: var(--text-secondary);
    background-color: var(--background-color);
    border: 1px solid var(--border-color);
}

.fav-toggle-wrapper label svg {
    width: 16px;
    height: 16px;
    fill: none;
    stroke: #ccc;
    stroke-width: 2;
    transition: all 0.2s;
}

.fav-toggle-wrapper label:hover {
    background-color: #eee;
}

/* Estado Ativo */
.fav-toggle-wrapper input:checked + label {
    color: var(--primary-accent);
    background-color: rgba(233, 30, 99, 0.08);
    border-color: var(--primary-accent);
}

.fav-toggle-wrapper input:checked + label svg {
    fill: var(--primary-accent);
    stroke: var(--primary-accent);
}

/* FILTERS WRAPPER */
.filters-wrapper { background: var(--card-background); padding: 0.8em; border-radius: 12px; margin-bottom: 1em; border: 1px solid var(--border-color); position: sticky; top: 0; z-index: 10; box-shadow: 0 2px 5px rgba(0,0,0,0.05); width: 100%; max-width: 100%; box-sizing: border-box; }
.filtros-container form { display: flex; flex-direction: column; gap: 0.5em; }

.filters-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 0.5em; }
.filtro-item { width: 100%; }
.filtro-item label { display: block; font-size: 0.7em; font-weight: 600; margin-bottom: 2px; }
.filtro-item input, .filtro-item select { width: 100%; padding: 8px; font-size: 0.85rem; border-radius: 6px; border: 1px solid var(--border-color); background: var(--background-color); color: var(--text-primary); }

/* QUICK FILTERS */
.quick-filters { display: flex; flex-wrap: wrap; gap: 8px; padding-bottom: 10px; margin-bottom: 10px; align-items: center; }
.filter-group { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.filter-group:not(:last-child) { padding-right: 0; margin-right: 0; border-right: none; }

/* CHIPS */
.chip-checkbox { display: inline-block; cursor: pointer; }
.chip-checkbox input { display: none; }
.chip-checkbox span { background-color: var(--background-color); border: 1px solid var(--border-color); color: var(--text-primary); padding: 6px 12px; border-radius: 20px; font-size: 0.8em; transition: all 0.2s; font-weight: 500; display: inline-block; }

/* --- AJUSTE DE CORES DOS FILTROS SELECIONADOS --- */
.chip-checkbox input:checked + span { 
    background-color: rgba(233, 30, 99, 0.1); /* Fundo rosa bem clarinho */
    color: var(--primary-accent); /* Texto rosa forte */
    border-color: var(--primary-accent); 
    font-weight: 700;
}

.chip-destaque { font-weight: 700; border-color: var(--primary-accent) !important; color: var(--primary-accent) !important; }
.chip-checkbox input:checked + .chip-destaque { 
    background-color: rgba(233, 30, 99, 0.15) !important; 
    color: var(--primary-accent) !important; 
    border-color: var(--primary-accent) !important; 
}

/* FILTER ACTIONS */
.filter-footer { background-color: var(--background-color); padding: 15px; margin: 10px -0.8em -0.8em -0.8em; border-top: 1px solid var(--border-color); border-radius: 0 0 12px 12px; }
.filter-actions-row { display: flex; gap: 10px; align-items: center; width: auto; }
.btn-filtrar { background: var(--primary-accent); color: white; border: none; padding: 8px 16px; border-radius: 6px; cursor: pointer; font-size: 0.85rem; height: 36px; flex: 1; justify-content: center; }
.btn-limpar { background-color: #7f8c8d; color: white; border: none; padding: 8px 16px; border-radius: 6px; cursor: pointer; font-size: 0.85rem; height: 36px; text-decoration: none; display: flex; align-items: center; justify-content: center; flex: 1; }
.btn-limpar:hover { background-color: #95a5a6; }

/* SHARE & FAV */
.share-btn { width: 44px; background: white; border: 1px solid var(--border-color); border-radius: 8px; display: flex; align-items: center; justify-content: center; cursor: pointer; color: #25D366; box-shadow: 0 2px 5px rgba(0,0,0,0.1); transition: all 0.2s; flex-shrink: 0; }
.share-btn:hover { background-color: #25D366; color: white; border-color: #25D366; }

/* CARDS */
.eventos-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 0.8em; }
.evento-card { background: var(--card-background); border: 1px solid var(--border-color); border-radius: 8px; padding: 0.8em; position: relative; transition: transform 0.2s; box-shadow: 0 2px 4px var(--shadow-color); display: flex; flex-direction: column; cursor: pointer; overflow: hidden; }
.evento-card:hover { transform: translateY(-3px); border-color: var(--primary-accent); }

/* MINI LIKE COUNTER (NOVO) */
.mini-like-counter {
    position: absolute;
    bottom: 8px;
    right: 10px;
    font-size: 0.75em;
    color: var(--text-secondary); 
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 4px;
    background: rgba(255, 255, 255, 0.9); /* Fundo leve para leitura em cards coloridos */
    padding: 2px 6px;
    border-radius: 10px;
    pointer-events: none; /* Deixa o clique passar para o card */
    z-index: 3;
}

body.dark-mode .mini-like-counter {
    background: rgba(45, 55, 72, 0.9);
    color: var(--text-secondary);
}

/* Esconde o mini counter quando expandido */
.evento-card.expanded .mini-like-counter {
    display: none;
}

/* STATUS */
.status-bg-em-andamento { background-color: rgba(39, 174, 96, 0.08); border-color: rgba(39, 174, 96, 0.4); }
.status-bg-em-breve { background-color: rgba(33, 150, 243, 0.08); border-color: rgba(33, 150, 243, 0.4); }
.status-bg-encerrando { background-color: rgba(211, 84, 0, 0.08); border-color: rgba(211, 84, 0, 0.4); }
.status-bg-hoje { background-color: rgba(142, 68, 173, 0.08); border-color: rgba(142, 68, 173, 0.4); }
.status-bg-encerrado { opacity: 0.8; background-color: rgba(149, 165, 166, 0.1); }
.status-tag { position: absolute; top: 0; left: 0; font-size: 0.65em; padding: 3px 10px; border-radius: 0 0 8px 0; font-weight: 700; color: white; z-index: 2; text-transform: uppercase; letter-spacing: 0.5px; }
.status-em-andamento { background-color: var(--status-live); padding-left: 18px; }
.status-em-andamento::before { content: ''; position: absolute; left: 6px; top: 50%; transform: translateY(-50%); width: 6px; height: 6px; background-color: white; border-radius: 50%; animation: pulse 1.5s infinite; }
@keyframes pulse { 0% { box-shadow: 0 0 0 0 rgba(255, 255, 255, 0.7); } 70% { box-shadow: 0 0 0 4px rgba(255, 255, 255, 0); } 100% { box-shadow: 0 0 0 0 rgba(255, 255, 255, 0); } }
.status-em-breve { background-color: var(--status-soon); }
.status-encerrando { background-color: var(--status-ending); }
.status-hoje { background-color: var(--status-today); }
.status-encerrado { background-color: var(--status-ended); font-weight: 500; }
.evento-card.status-bg-em-andamento .card-header, .evento-card.status-bg-em-breve .card-header, .evento-card.status-bg-encerrando .card-header, .evento-card.status-bg-hoje .card-header, .evento-card.status-bg-encerrado .card-header { padding-top: 18px; }

/* INFO */
.card-header { display: flex; justify-content: space-between; align-items: flex-start; margin-bottom: 0.4em; }
.card-header h2 { font-size: 0.9rem; margin: 0; color: var(--primary-accent); line-height: 1.2; padding-right: 10px; flex: 1; }
.header-tags { display: flex; align-items: center; gap: 6px; flex-shrink: 0; }
.icons-row { display: flex; gap: 4px; }
.feature-icon { display: inline-flex; align-items: center; justify-content: center; width: 16px; height: 16px; }
.feature-kids svg { color: #2ecc71; }
.feature-pet svg { color: #e67e22; }

/* --- TAGS DE TAMANHO (PROPORCIONAIS) --- */
.tamanho-tag { 
    font-size: 0.6em; 
    font-weight: 700; 
    background: var(--primary-accent); 
    color: white; 
    padding: 2px 6px; 
    border-radius: 4px; 
    white-space: nowrap; 
    display: inline-flex;
    justify-content: center;
    align-items: center;
    transition: width 0.3s ease;
}
.tamanho-1 { width: 70px;  opacity: 1; }
.tamanho-2 { width: 95px;  opacity: 1; }
.tamanho-3 { width: 120px; opacity: 1; }

.categoria-tag { font-size: 0.6em; background: var(--border-color); padding: 1px 6px; border-radius: 4px; white-space: nowrap; color: var(--text-primary); border: 1px solid transparent; }
.card-meta { font-size: 0.8em; color: var(--text-secondary); }
.meta-row { display: flex; align-items: center; margin-bottom: 2px; }
.meta-row.date-row { justify-content: space-between; gap: 10px; }
.date-wrapper { display: flex; align-items: center; gap: 5px; }

/* AJUSTE PARA NÃO SOBREPOR O ÍCONE DE LIKES (Padding somente quando não expandido) */
.meta-row.address-row { 
    gap: 5px; 
    padding-right: 50px; /* Garante que o texto quebre antes do ícone */
}

/* Quando expandido, remove o padding extra pois o ícone some */
.evento-card.expanded .meta-row.address-row {
    padding-right: 0;
}

.meta-row.address-row span { font-size: 0.75em; line-height: 1.2; }

/* --- REMOVIDA BORDA TRACEJADA DAQUI --- */
.card-desc { margin-top: 6px; padding-top: 6px; border-top: none; font-size: 0.75rem; color: var(--text-primary); line-height: 1.3; }

/* ACTIONS (Atualização) */
.expand-content { display: none; margin-top: 10px; border-top: none; padding-top: 10px; }
.evento-card.expanded .expand-content { display: block; animation: fadeIn 0.3s; }
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }

.card-actions { display: flex; gap: 10px; align-items: stretch; }

.directions-btn { flex: 1; text-align: center; background-color: var(--primary-accent); color: white; padding: 10px; border-radius: 8px; font-size: 0.9em; font-weight: 600; text-decoration: none; transition: background-color 0.2s; box-shadow: 0 2px 5px rgba(0,0,0,0.2); display: flex; align-items: center; justify-content: center; border: none; cursor: pointer; font-family: inherit; }
.directions-btn:hover { background-color: #c2185b; }

.share-btn { width: 44px; background: white; border: 1px solid var(--border-color); border-radius: 8px; display: flex; align-items: center; justify-content: center; cursor: pointer; color: #25D366; box-shadow: 0 2px 5px rgba(0,0,0,0.1); transition: all 0.2s; flex-shrink: 0; }
.share-btn:hover { background-color: #25D366; color: white; border-color: #25D366; }

/* --- BOTÃO DE FAVORITO MODIFICADO --- */
.fav-btn {
    min-width: 44px; /* Garante tamanho mínimo */
    padding: 0 10px; /* Mais espaço interno */
    background: white; 
    border: 1px solid var(--border-color); 
    border-radius: 8px; 
    display: flex; 
    align-items: center; 
    justify-content: center; 
    cursor: pointer; 
    color: #ccc; 
    box-shadow: 0 2px 5px rgba(0,0,0,0.1); 
    transition: all 0.2s; 
    flex-shrink: 0; 
    gap: 4px; /* Espaço entre coração e número */
}

.fav-btn:hover { 
    color: var(--primary-accent); 
    border-color: var(--primary-accent); 
}

/* Quando favoritado */
.evento-card.is-favorite .fav-btn svg { 
    fill: var(--primary-accent); 
    stroke: var(--primary-accent); 
}
.evento-card.is-favorite .fav-btn { 
    border-color: var(--primary-accent); 
    color: var(--primary-accent); 
    background-color: rgba(233, 30, 99, 0.05); /* Fundo rosa bem suave */
}

/* Novo estilo para o contador */
.like-count {
    font-size: 0.8rem;
    font-weight: 700;
    line-height: 1;
    color: inherit; /* Pega a cor do botão */
}

/* MODAL */
.modal { display: none; position: fixed; z-index: 2000; left: 0; top: 0; width: 100%; height: 100%; background-color: rgba(0,0,0,0.5); backdrop-filter: blur(3px); }
.modal.show { display: block; }
.modal-content { background-color: var(--card-background); margin: 15% auto; padding: 20px; width: 90%; max-width: 400px; border-radius: 16px; box-shadow: 0 10px 25px rgba(0,0,0,0.2); position: relative; text-align: center; }
.close-modal { position: absolute; top: 10px; right: 15px; font-size: 28px; font-weight: bold; color: var(--text-secondary); cursor: pointer; }
.close-modal:hover { color: var(--primary-accent); }
.modal-body h3 { margin-top: 0; color: var(--primary-accent); }
.modal-body p { font-size: 0.9em; color: var(--text-primary); }
.qr-container { margin: 20px 0; padding: 10px; border: 1px solid var(--border-color); border-radius: 8px; background: #fff; display: inline-block; }
.pix-img { width: 100%; max-width: 200px; display: block; }
.pix-copy-wrapper { margin-bottom: 20px; text-align: left; }
.pix-label { font-size: 0.75em; color: var(--text-secondary); margin-bottom: 4px; display: block; font-weight: 600; }
.pix-copy-box { display: flex; align-items: center; background-color: var(--background-color); border: 1px solid var(--border-color); border-radius: 8px; overflow: hidden; height: 40px; }
.pix-copy-box input { flex: 1; background: transparent; border: none; padding: 0 10px; font-size: 0.85em; color: var(--text-primary); font-family: 'Poppins', sans-serif; outline: none; width: 100%; }
.copy-btn { background-color: var(--primary-accent); color: white; border: none; height: 100%; width: 44px; display: flex; align-items: center; justify-content: center; cursor: pointer; transition: background-color 0.2s; }
.copy-btn:hover { background-color: #d81b60; }
.copy-btn.copied { background-color: #27ae60; }
.nubank-btn { display: inline-block; background-color: var(--primary-accent); color: white; padding: 10px 20px; border-radius: 25px; text-decoration: none; font-weight: 600; font-size: 0.9em; margin-top: 10px; transition: background-color 0.2s; }
.nubank-btn:hover { background-color: #d81b60; }

.mobile-filter-btn { display: none; }
.mobile-filter-modal { display: none; }

/* --- CARD DE PUBLICIDADE (FEED) --- */
.card-destaque {
    background: linear-gradient(135deg, #fff9c4 0%, #ffffff 100%);
    border: 1px solid #f1c40f;
    text-align: center;
    padding: 10px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 8px;
    cursor: default;
    border-radius: 8px;
}
.card-destaque:hover { transform: none; border-color: #f1c40f; }

.ad-label {
    font-size: 0.6em;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: #999;
    font-weight: 600;
}

.ad-content h3 {
    margin: 0;
    color: #2c3e50;
    font-size: 0.9rem;
}

.ad-content p {
    font-size: 0.75em;
    color: #555;
    margin: 5px 0 10px 0;
}

body.dark-mode .card-destaque {
    background: linear-gradient(135deg, #2c2c2c 0%, #1a1a1a 100%);
    border-color: #f1c40f;
}
body.dark-mode .ad-content h3 { color: #f1c40f; }
body.dark-mode .ad-content p { color: #ccc; }

/* --- ANÚNCIO DO MAPA (FIXO DESKTOP - REDUZIDO) --- */
.desktop-map-ad {
    background: linear-gradient(135deg, #fff9c4 0%, #ffffff 100%);
    border: 1px solid #f1c40f;
    border-radius: 12px;
    padding: 24px;
    margin-top: 20px;
    box-shadow: 0 4px 12px var(--shadow-color);
    text-align: center;
    
    /* Mágica para centralizar e manter tamanho bacana */
    min-height: 250px; 
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 20px;
}

.desktop-map-ad .ad-text {
    text-align: center;
    width: 100%;
}

.desktop-map-ad h3 { 
    margin: 0 0 10px 0; 
    font-size: 1.5rem; 
    color: #2c3e50; 
}

.desktop-map-ad p { 
    margin: 0; 
    font-size: 1rem; 
    color: #555; 
    line-height: 1.5;
}

.desktop-map-ad .directions-btn {
    width: auto;
    min-width: 200px;
    padding: 12px 24px;
    font-size: 1.1rem;
}

body.dark-mode .desktop-map-ad {
    background: linear-gradient(135deg, #2c2c2c 0%, #1a1a1a 100%);
    border-color: #f1c40f;
}
body.dark-mode .desktop-map-ad h3 { color: #f1c40f; }
body.dark-mode .desktop-map-ad p { color: #ccc; }

/* --- WELCOME MODAL ESTILOS --- */
.welcome-content {
    max-width: 380px;
    text-align: center;
    padding: 30px 25px;
    border-radius: 20px;
}

.welcome-icon {
    font-size: 3.5rem;
    margin-bottom: 10px;
    animation: floating 3s ease-in-out infinite;
}

.welcome-content h3 {
    color: var(--primary-accent);
    margin-bottom: 15px;
    font-size: 1rem;
}

.welcome-content p {
    color: var(--text-primary);
    line-height: 1.5;
    font-size: 0.8rem;
}

@keyframes floating {
    0% { transform: translate(0,  0px); }
    50% { transform: translate(0, 10px); }
    100% { transform: translate(0, -0px); }
}

/* --- CONTROLE DE VISIBILIDADE (RESPONSIVO) --- */

.card-destaque.in-feed { display: none; }
.desktop-map-ad { display: flex; }

/* DESKTOP ( > 768px ) */
@media (min-width: 769px) {
    .evento-card.card-destaque.in-feed { display: none !important; }
    .desktop-map-ad { display: flex !important; }
}

/* MOBILE ( <= 768px ) */
@media (max-width: 768px) {
    .desktop-map-ad { display: none !important; }

    .container { padding: 0; }
    .main-content-grid { display: flex; flex-direction: column; gap: 0; }
    .left-column { flex: 0 0 35vh; gap: 0; }
    .map-container { width: 100%; border-radius: 0 0 12px 12px; z-index: 20; height: 100%; }
    
    .events-list-container { flex: 1 1 0; min-height: 0; overflow-y: auto; -webkit-overflow-scrolling: touch; padding: 0.8em; height: auto; padding-bottom: 120px; overflow-x: hidden; }
    .filters-wrapper { display: none; }
    .mobile-filter-btn { display: flex; align-items: center; justify-content: center; gap: 8px; position: fixed; bottom: 30px; left: 50%; transform: translateX(-50%); width: auto; padding: 8px 20px; background-color: var(--primary-accent); color: white; border: none; border-radius: 50px; box-shadow: 0 4px 15px rgba(233, 30, 99, 0.4); font-weight: 600; font-size: 0.75rem; z-index: 1000; transition: transform 0.2s, box-shadow 0.2s; }
    .mobile-filter-btn:active { transform: translateX(-50%) scale(0.95); }
    .mobile-filter-btn svg { width: 15px; height: 15px; }
    .mobile-filter-btn::after { content: "Encontrar Blocos"; display: block; }
    
    .mobile-filter-modal { display: none; position: fixed; z-index: 2000; left: 0; top: 0; width: 100%; height: 100%; background-color: rgba(0,0,0,0.5); backdrop-filter: blur(3px); }
    .mobile-filter-modal.show { display: block; }

    #mobile-filter-modal .modal-content { 
        background-color: var(--card-background); 
        margin: 0; 
        position: absolute; bottom: 0; left: 0; 
        width: 100%; max-width: 100%; 
        border-radius: 20px 20px 0 0; 
        display: flex; flex-direction: column; 
        max-height: 85vh; height: 85vh;
        padding: 0; 
        box-shadow: 0 -5px 25px rgba(0,0,0,0.2); 
    }

    .modal:not(#mobile-filter-modal) .modal-content {
        background-color: var(--card-background);
        width: 90%; 
        max-width: 400px;
        border-radius: 16px;
        padding: 20px;
        position: relative;
        margin: 50% auto;
        top: 50%;
        transform: translateY(-50%);
        margin-top: 0;
        height: auto;
        display: block;
    }

    .modal-header { display: flex; justify-content: space-between; align-items: center; padding: 15px 20px; border-bottom: 1px solid var(--border-color); flex-shrink: 0; }
    .modal-header h2 { font-size: 1.1rem; margin: 0; }
    .close-modal-btn { background: none; border: none; font-size: 1.8rem; color: var(--text-secondary); cursor: pointer; }
    #mobile-filters-container { padding: 20px; overflow-y: auto; flex: 1; -webkit-overflow-scrolling: touch; }
    .filtros-container form { flex-direction: column; gap: 0.5em; }
    .filters-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
    .filtro-busca { grid-column: 1 / -1; }
    .quick-filters { flex-direction: column; align-items: flex-start; gap: 12px; }
    .filter-group:not(:last-child) { border-right: none; padding-right: 0; margin-right: 0; }
    .filter-footer { flex-shrink: 0; padding: 15px 20px; background-color: var(--card-background); border-top: 1px solid var(--border-color); border-radius: 0; margin: 0; position: relative; z-index: 10; box-shadow: 0 -4px 10px rgba(0,0,0,0.05); }
    .filter-actions-row { display: flex; gap: 10px; width: auto; margin: 0; }
    .btn-filtrar, .btn-limpar { flex: 1; justify-content: center; }
}

/* TAG DE ENSAIO (Rosa Claro/Médio) */
.categoria-tag.tag-ensaio {
    background-color: #F8BBD0; /* Rosa bem claro pastel */
    color: #C2185B; /* Vinho/Rosa escuro para contraste */
    font-weight: 700;
    border: 1px solid #F48FB1;
    padding: 2px 5px;
    font-size: 0.5em;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    border-radius: 6px;
    display: inline-block;
}

/* BOTÃO DE INGRESSO (Pequeno) */
.btn-ingresso {
    display: inline-block;
    margin-top: 8px;
    background-color: #2c3e50;
    color: white;
    padding: 6px 12px;
    border-radius: 6px;
    text-decoration: none;
    font-size: 0.8em;
    font-weight: 600;
    transition: background 0.2s;
}
.btn-ingresso:hover {
    background-color: #34495e;
}

/* --- MODAL DE NAVEGAÇÃO (ESTILO APP MODERN + ÍCONES) --- */
.nav-modal-content {
    background: var(--card-background);
    width: 90%;
    max-width: 340px; /* Mais compacto */
    padding: 25px;
    border-radius: 24px; /* Mais arredondado */
    text-align: center;
    box-shadow: 0 10px 40px rgba(0,0,0,0.2);
    border: 1px solid var(--border-color);
    position: relative;
    margin: 15% auto; /* Centraliza verticalmente */
}

/* Título do Modal */
.nav-modal-content h3 {
    margin: 0 0 20px 0;
    font-size: 1.2rem;
    color: var(--text-primary);
    font-weight: 700;
}

/* Grid dos botões */
.nav-options {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

/* Botões de Navegação */
.nav-option-btn {
    display: flex;
    align-items: center;
    justify-content: flex-start; /* Alinha ícone e texto */
    gap: 20px; /* Espaço maior entre ícone e texto */
    width: 100%;
    padding: 16px 20px;
    border: none;
    border-radius: 16px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    text-decoration: none;
    position: relative;
    font-family: 'Poppins', sans-serif;
}

.nav-option-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
}

.nav-option-btn:active {
    transform: scale(0.98);
}

/* Tamanho dos ícones dentro do botão */
.nav-option-btn img {
    width: 32px;
    height: 32px;
    object-fit: contain;
    flex-shrink: 0;
}

/* Botão Google Maps */
.btn-google {
    background-color: #f8f9fa;
    color: #3c4043;
    border: 1px solid #e8eaed;
}

/* Dark Mode para botão Google */
body.dark-mode .btn-google {
    background-color: #303134;
    color: #e8eaed;
    border-color: #5f6368;
}

/* Botão Waze */
.btn-waze {
    background-color: #33ccff; /* Azul Waze */
    color: white;
    box-shadow: 0 4px 12px rgba(51, 204, 255, 0.25);
}
.btn-waze:hover {
    background-color: #00c3ff;
    box-shadow: 0 6px 15px rgba(51, 204, 255, 0.35);
}

/* Botão Fechar (X) mais discreto */
.nav-modal-content .close-modal-btn {
    position: absolute;
    top: 15px;
    right: 15px;
    background: transparent;
    border: none;
    font-size: 24px;
    color: var(--text-secondary);
    cursor: pointer;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
}
.nav-modal-content .close-modal-btn:hover {
    background-color: rgba(0,0,0,0.05);
    color: var(--primary-accent);
}

/* --- AVALIAÇÃO DE BLOCOS --- */
.rating-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    padding: 12px;
    background: rgba(0,0,0,0.03);
    border-radius: 8px;
    margin-top: 10px;
    width: 100%;
}

.rating-label {
    font-size: 0.9rem;
    color: var(--text-secondary);
    font-weight: 600;
}

.stars {
    display: flex;
    gap: 10px;
    cursor: pointer;
}

.star-icon {
    width: 32px;
    height: 32px;
    fill: #ddd; /* Cor vazia */
    transition: transform 0.2s, fill 0.2s;
}

.star-icon:hover {
    transform: scale(1.15);
}

/* Quando a estrela tem a classe 'active', ela fica dourada */
.star-icon.active {
    fill: #f1c40f;
}

/* Efeito de feedback após votar */
.rating-thanks {
    font-size: 1rem;
    color: var(--status-live);
    font-weight: bold;
    animation: fadeIn 0.5s;
    margin-top: 5px;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(5px); }
    to { opacity: 1; transform: translateY(0); }
}

/* --- ESTILO DOS BOTÕES DE TRANSPORTE --- */

/* Botão Uber */
.btn-uber {
    background-color: #000000;
    color: #ffffff;
    border: 1px solid #000000;
}
.btn-uber:hover {
    background-color: #333333;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
}

/* --- VISIBILIDADE (LÓGICA DESKTOP vs MOBILE) --- */

/* Por padrão (Desktop), a classe .mobile-only-opt esconde o elemento */
.mobile-only-opt {
    display: none !important;
}

/* Apenas quando a tela for MENOR que 768px (Celulares), nós mostramos */
@media (max-width: 768px) {
    .mobile-only-opt {
        display: flex !important;
    }
}

/* --- NOVOS BADGES DE DATA E HORA --- */

.date-time-container {
    display: flex;
    gap: 8px; /* Espaço entre os badges */
    align-items: center;
    flex-wrap: wrap; /* Quebra linha em telas muito pequenas */
    margin-bottom: 6px;
}

.badge-info {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 3px 5px; /* Tamanho interno confortável */
    border-radius: 8px; /* Bordas arredondadas */
    font-size: 0.65em;
    font-weight: 600;
    line-height: 1;
    letter-spacing: 0.3px;
}

.badge-info svg {
    width: 12px;
    height: 12px;
    stroke-width: 2.5; /* Ícones mais gordinhos para leitura */
}

/* Estilo Amarelo (Data) - Similar à referência */
.badge-date {
    background-color: #FFF8E1; /* Amarelo bem clarinho */
    color: #F57F17; /* Laranja/Amarelo escuro para texto */
    border: 1px solid #FFE082;
}

/* Estilo Roxo (Horário) - Combina com seu site */
.badge-time {
    background-color: #F3E5F5; /* Lilás clarinho */
    color: #aa2424; /* Roxo forte */
    border: 1px solid #E1BEE7;
}

/* Modo Escuro */
body.dark-mode .badge-date {
    background-color: #3e3215; 
    color: #ffd54f;
    border-color: #584618;
}

body.dark-mode .badge-time {
    background-color: #361e1e;
    color: #e7bebe;
    border-color: #5d2c2c;
}