/* Compensar a navbar fixa */
body {
    padding-top: 100px;
}

/* Remover espaço adicional para páginas com navbar fixa incluída */
.container.my-4:first-of-type {
    margin-top: 0 !important;
}

/* Tema claro / escuro usando variáveis CSS */
:root {
    --site-bg: #ffffff;
    --text-color: #222222;
    --primary: #0074F1;
    /* tema claro padrão */
    --navbar-bg: var(--primary);
}

.theme-dark {
    --site-bg: #464849;
    --text-color: #e6e6e6;
    --primary: #28292A;
    /* tema escuro */
    --navbar-bg: var(--primary);
}

body {
    background-color: var(--site-bg);
    color: var(--text-color);
}

.navbar {
    background-color: var(--navbar-bg) !important;
}

/* Ajustes para botões que usam cor primária */
.btn-primary {
    background-color: #0074F1;
    border-color: #0074F1;
}

.btn-outline-primary {
    border-color: var(--primary);
    color: var(--primary);
}

.btn-outline-primary:hover {
    background-color: var(--primary);
    color: #fff;
}

.facebook-button {
    color:#0074F1;
}
.facebook-button:hover {
    color:#fff;
}

/* Ícone funnel mais visível em tema escuro */
.btn-outline-primary .bi-funnel,
.btn-outline-primary .bi-funnel-fill {
    color: inherit;
}

.theme-dark .btn-outline-primary .bi-funnel,
.theme-dark .btn-outline-primary .bi-funnel-fill {
    color: white;
    filter: brightness(1.2);
}

/* Modal header dinâmico conforme tema */
.modal-header-dynamic {
    background-color: var(--primary);
    color: white;
}

.theme-dark .modal-header-dynamic {
    color: white;
}

/* Theme toggle (track + thumb) */
.theme-toggle {
    --w: 64px;
    --h: 34px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: var(--w);
    height: var(--h);
    padding: 4px;
    border-radius: calc(var(--h) / 2);
    background: rgba(255, 255, 255, 0.15);
    border: none !important;
    outline: none !important;
    cursor: pointer;
    transition: background 0.25s ease;
}

.theme-toggle .toggle-track {
    display: inline-block;
    width: 100%;
}

.theme-toggle .toggle-thumb {
    margin-left: -30px;
    margin-bottom: -5px;
    --size: 26px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: var(--size);
    height: var(--size);
    background: #fff;
    border-radius: 50%;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.15);
    transform: translateX(0);
    transition: transform 0.32s cubic-bezier(.2, .9, .3, 1), background 0.25s ease, box-shadow 0.25s ease;
    position: relative;
    overflow: hidden;
}

.theme-toggle .toggle-thumb .icon-sun,
.theme-toggle .toggle-thumb .icon-moon {
    position: absolute;
    font-size: 14px;
    color: #ffb703;
    opacity: 1;
    transition: opacity 0.2s ease, transform 0.25s ease;
}

.theme-toggle .toggle-thumb .icon-moon {
    color: #ffffff;
    opacity: 0;
    transform: scale(0.8);
}

/* estado ativo (dark) - thumb deslocada para direita e ícone troca */
.theme-toggle.active {
    background: rgba(0, 0, 0, 0.35);
}

.theme-toggle.active .toggle-thumb {
    transform: translateX(calc(var(--w) - var(--size) - 8px));
    background: #48494b;
    box-shadow: 0 6px 18px rgba(0, 0, 0, 0.45);
}

.theme-toggle.active .toggle-thumb .icon-sun {
    opacity: 0;
    transform: scale(0.8);
}

.theme-toggle.active .toggle-thumb .icon-moon {
    opacity: 1;
    transform: scale(1);
}

/* Ajustes para tema claro: deixar thumb icone sol visível */
.theme-toggle:not(.active) .toggle-thumb .icon-sun {
    opacity: 1;
    transform: scale(1);
}

.theme-toggle:not(.active) .toggle-thumb .icon-moon {
    opacity: 0;
    transform: scale(0.8);
}

/* Navbar fixa */
.navbar.fixed-top {
    z-index: 1030;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

/* Ajuste para o carrossel */
.carousel {
    margin-top: 0;
}

.carousel-inner {
    padding-top: 0;
}

/* Animações para a navbar */
.navbar-brand,
.nav-link .bi {
    transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.navbar-brand:hover img {
    transform: scale(1.05);
    filter: brightness(1.2) drop-shadow(0 0 6px rgba(255, 255, 255, 0.4));
}

/* Efeito nos ícones de login e perfil */
.nav-link.icon-link {
    transition: all 0.3s ease;
    display: inline-block;
}

.nav-link.icon-link:hover {
    transform: scale(1.1);
    color: rgba(255, 255, 255, 0.8) !important;
}

.evento-card {
    position: relative;
    transition: transform 0.3s;
}

.evento-card:hover {
    transform: translateY(-5px);
}

/* .favorito-btn {
            position: absolute;
            top: 10px;
            right: 10px;
            background: rgba(255, 255, 255, 0.8);
            border: none;
            border-radius: 50%;
            width: 40px;
            height: 40px;
            display: flex;
            align-items: center;
            justify-content: center;
        } */

.carrossel-empresas {
    overflow: hidden;
    white-space: nowrap;
}

.carrossel-empresas .logos {
    display: inline-block;
    animation: scroll-left 30s linear infinite;
}

@keyframes scroll-left {
    0% {
        transform: translateX(100%);
    }

    100% {
        transform: translateX(-100%);
    }
}

.navbar-brand {
    font-weight: bold;
    font-size: 1.5rem;
}

/* Animações para os filtros */
.dropdown-menu {
    transition: all 0.3s ease-in-out;
    box-shadow: 0 0.5rem 1rem rgba(0, 0, 0, 0.15);
    border: none;
    border-radius: 0.75rem;
}

.btn-outline-primary {
    transition: all 0.3s ease;
    border: 2px solid #0074F1;
    background-color: #0074F1;
    color: white;
    font-weight: 500;
}

.btn-outline-primary:hover {
    background-color: #1c84f3;
    transform: translateY(-1px);
    box-shadow: 0 4px 8px rgba(0, 116, 241, 0.3);
}

.btn-outline-primary:active {
    transform: translateY(0);
}

/* Efeito de pulso suave no ícone de filtro */
@keyframes pulse {
    0% {
        transform: scale(1);
    }

    50% {
        transform: scale(1.05);
    }

    100% {
        transform: scale(1);
    }
}

.btn-outline-primary:hover .bi-funnel {
    animation: pulse 1s ease-in-out;
}

/* Melhorias nos cards de evento */
.evento-card {
    transition: all 0.3s ease;
    border: none;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.evento-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
}

.favorito-btn {
    position: absolute;
    top: 10px;
    right: 10px;
    background: rgba(255, 255, 255, 0.9);
    border: none;
    border-radius: 50%;
    width: 35px;
    height: 35px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    z-index: 3;
}

.favorito-btn:hover {
    background: white;
    transform: scale(1.1);
}

/* Carrossel de empresas */
.carrossel-empresas {
    overflow: hidden;
    position: relative;
}

.carrossel-empresas .logos {
    display: flex;
    animation: scroll 30s linear infinite;
}

.carrossel-empresas:hover .logos {
    animation-play-state: paused;
}

@keyframes scroll {
    0% {
        transform: translateX(0);
    }

    100% {
        transform: translateX(-50%);
    }
}

/* Responsividade */
@media (max-width: 768px) {
    body {
        padding-top: 70px;
    }

    .carousel {
        margin-top: -49px;
    }

    .carousel-inner {
        padding-top: 70px;
    }

    .dropdown-menu {
        min-width: 300px !important;
        margin-right: 1rem;
    }

    .d-flex.align-items-center.gap-3 {
        flex-direction: column;
        gap: 1rem !important;
    }

    .flex-grow-1 {
        width: 100%;
    }

    .login-text {
        font-size: 0.9rem;
    }
}

/* Ajustes específicos para mobile */
@media (max-width: 767.98px) {
    .navbar .container {
        padding-left: 15px;
        padding-right: 15px;
    }

    .navbar-brand-logo img {
        max-width: 100px !important;
    }

    .login-text {
        font-size: 0.9rem;
    }

    /* Garantir que o dropdown não quebre o layout */
    .navbar-nav .dropdown-menu {
        position: absolute !important;
        right: 0;
        left: auto;
    }
}

/* Ajustes para tablets */
@media (min-width: 768px) and (max-width: 991.98px) {
    .navbar-brand-logo img {
        max-width: 110px !important;
    }
}

/* Modal Login Moderna */
#loginModal .modal-dialog {
    transition: all 0.5s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    transform: translate(100px, -100px) scale(0.8);
    opacity: 0;
}

#loginModal.show .modal-dialog {
    transform: translate(0, 0) scale(1);
    opacity: 1;
}

.login-etapa {
    transition: all 0.3s ease-in-out;
}

.modal-backdrop {
    background-color: rgba(0, 0, 0, 0.6);
}

/* Texto moderno para login */
.login-text {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    font-weight: 700;
    letter-spacing: -0.5px;
}

/* Animações suaves */
.fade-in {
    animation: fadeIn 0.3s ease-in-out;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.shake {
    animation: shake 0.5s ease-in-out;
}

@keyframes shake {

    0%,
    100% {
        transform: translateX(0);
    }

    25% {
        transform: translateX(-5px);
    }

    75% {
        transform: translateX(5px);
    }
}

/* Alertas temporários */
.alert-temporary {
    animation: fadeOut 3s ease-in-out forwards;
}

@keyframes fadeOut {
    0% {
        opacity: 1;
    }

    70% {
        opacity: 1;
    }

    100% {
        opacity: 0;
        display: none;
    }
}

/* Botões modernos */
.btn-modern {
    border: none;
    background: linear-gradient(135deg, #0074F1, #0056b3);
    transition: all 0.3s ease;
}

.btn-modern:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(0, 116, 241, 0.4);
}

/* Garantir que o modal fique acima da navbar */
.modal {
    z-index: 1060;
}

/* -------------------------------------------------------- EVENTO ------------------------------------------------------ */
.hover-bg:hover {
    background-color: #f8f9fa;
    border-radius: 5px;
    padding: 8px;
    margin: -8px;
    transition: all 0.2s ease;
}

/* Fix para dropdown-toggle na navbar - alinhamento do ícone */
.navbar .dropdown-toggle::after {
    display: inline-block;
    margin: auto;
    vertical-align: 0.255em;
    content: "";
    border-top: 0.3em solid;
    border-right: 0.3em solid transparent;
    border-bottom: 0;
    border-left: 0.3em solid transparent;
}

/* Estilos do Footer responsivo ao tema */
footer {
    background-color: var(--navbar-bg) !important;
    color: rgba(255, 255, 255, 0.9);
}

footer .text-light,
footer a.text-light {
    color: rgba(255, 255, 255, 0.9) !important;
}

footer a.text-light:hover {
    color: rgba(255, 255, 255, 1) !important;
}

footer .text-light-50 {
    color: rgba(255, 255, 255, 0.7) !important;
}

footer .text-muted {
    color: rgba(255, 255, 255, 0.6) !important;
}

footer hr {
    border-color: rgba(255, 255, 255, 0.2) !important;
}

/* Ajustar visibilidade de texto muted em tema escuro */
.theme-dark .text-muted,
.theme-dark small.text-muted,
.theme-dark .card .text-muted {
    color: rgba(255, 255, 255, 0.8) !important;
}

/* Ajustar visibilidade de texto muted em tema claro */
.theme-light .text-muted,
.theme-light small.text-muted,
.theme-light .card .text-muted {
    color: rgba(0, 0, 0, 0.7) !important;
}

/* Espaçamento após Google Maps */
.ratio.ratio-16x9 {
    margin-bottom: 0 !important;
}

/* SVG Icons - tema claro e escuro */
.svg-icon-btn svg {
    color: currentColor;
}

.theme-light .svg-icon-btn svg {
    color: rgba(0, 0, 0, 0.6);
    opacity: 0.8;
}

.theme-dark .svg-icon-btn svg {
    color: rgba(255, 255, 255, 0.8);
    opacity: 0.8;
}

.theme-light .svg-icon-btn:hover svg {
    color: rgba(0, 0, 0, 1);
    opacity: 1;
}

/* Garantir visibilidade de cidade/data nos cards de evento em ambos os temas */
.evento-card .card-text small.text-muted,
.evento-card .card-text small.text-muted i {
    color: #6c757d !important; /* mesma cor "muted" do tema claro */
}

/* Se preferir um tom um pouco mais claro no modo escuro, descomente abaixo
.theme-dark .evento-card .card-text small.text-muted,
.theme-dark .evento-card .card-text small.text-muted i {
    color: rgba(255,255,255,0.85) !important;
}
*/

/* Forçar cor legível na pré-visualização de e-mail (evita texto branco em tema escuro) */
#preview_email {
    background: #ffffff !important;
    color: #212529 !important; /* tom escuro usado no tema claro */
}

#preview_email img {
    max-width: 100%;
    height: auto;
}

.theme-dark .svg-icon-btn:hover svg {
    color: rgba(255, 255, 255, 1);
    opacity: 1;
}

/* Estilos para o banner de cookies */
#cookie-banner {
    background-color: #ffffff !important;
    color: #000000 !important;
}

#cookie-banner .text-muted {
    color: #6c757d !important;
}

#cookie-banner .text-primary {
    color: #0074F1 !important;
}

#cookie-banner a.text-primary {
    color: #0074F1 !important;
}

#cookie-banner .btn-outline-primary {
    color: white !important;
}

/* Tema escuro para o banner de cookies */
.theme-dark #cookie-banner {
    background-color: #464849 !important;
    color: white !important;
    border-color: #464849 !important;
}

.theme-dark #cookie-banner .text-muted {
    color: white !important;
}

.theme-dark #cookie-banner .text-primary {
    color: #0074F1 !important;
}

.theme-dark #cookie-banner a.text-primary {
    color: #0074F1 !important;
}

.theme-dark #cookie-banner .btn-outline-secondary {
    border-color: #6c757d;
    color: #6c757d;
}

.theme-dark #cookie-banner .btn-outline-secondary:hover {
    background-color: #6c757d;
    color: white;
}

.theme-dark #cookie-banner .btn-outline-primary {
    color: #4dabf7;
}

.theme-dark #cookie-banner .btn-outline-primary:hover {
    background-color: #4dabf7;
    color: white;
}

.theme-dark #cookie-banner .btn-primary {
    background-color: #0074F1;
}

.theme-dark #cookie-banner .btn-primary:hover {
    border-color: #3d9bf0;
}

/* Tema escuro para a modal de cookies */
.theme-dark #cookie-settings-modal .modal-content {
    color: white;
    background-color: #464849;
}

.theme-dark #cookie-settings-modal .modal-header {
    border-bottom-color: #6c757d;
}

.theme-dark #cookie-settings-modal .modal-footer {
    border-top-color: #6c757d;
}

.theme-dark #cookie-settings-modal .form-check-label {
    color: #e0e0e0;
}

.theme-dark #cookie-settings-modal .text-muted {
    color: #b0b0b0 !important;
}

.theme-dark #cookie-settings-modal .btn-outline-secondary {
    color: white !important;
}
