/* Correções simples para vídeos sem sobrecarga de renderização */
.video-thumbnail-container {
    position: relative;
    aspect-ratio: 16/9;
    background-color: #000;
    background-image: linear-gradient(45deg, #444 25%, transparent 25%, transparent 75%, #444 75%, #444),
                    linear-gradient(45deg, #444 25%, transparent 25%, transparent 75%, #444 75%, #444);
    background-size: 20px 20px;
    background-position: 0 0, 10px 10px;
    overflow: hidden;
    cursor: pointer;
    border-radius: 8px 8px 0 0;
}

.video-thumbnail-container img,
.video-thumbnail {
    position: absolute;
    top: 0;
    left: 0;
    width: 100% !important;
    height: 100% !important;
    object-fit: cover;
    transition: all 0.3s ease;
    opacity: 1;
    z-index: 1;
    mix-blend-mode: normal;
}

.video-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.3);
    opacity: 0;
    transition: opacity 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 3;
}

.play-icon {
    color: white;
    opacity: 0.9;
    font-size: 3rem;
    transition: transform 0.3s ease;
}

/* Estilo ao passar o mouse - mantido simples */
.video-card:hover .video-thumbnail {
    opacity: 0.7;
}

.video-card:hover .play-icon {
    transform: scale(1.2);
}

/* Restaurar a cor original do cabeçalho da seção de vídeos */
.profile-videos-section .card-header {
    background-color: var(--primary-color);
    color: white;
}

/* Otimizações para dispositivos móveis */
@media (max-width: 768px) {
    .video-card {
        cursor: pointer;
    }
}

/* Estilos otimizados para vídeos */
.video-card {
    transition: transform 0.2s ease;
    overflow: hidden;
    height: 100%;
}

.video-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.1);
}

.video-play-icon {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    color: white;
    font-size: 3rem;
    opacity: 0.8;
    z-index: 2;
    text-shadow: 0 0 10px rgba(0,0,0,0.5);
}

.video-card:hover .video-play-icon {
    opacity: 0;
}

.video-title {
    font-size: 1rem;
    font-weight: 600;
    margin-top: 0.5rem;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.video-card:hover .video-thumbnail-container img {
    opacity: 0.2;
    transform: scale(1.05);
}

/* Estilos para preview de vídeo */
.video-preview {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    opacity: 0;
    z-index: 2;
    transition: opacity 0.3s ease;
}

/* Ajustes para hover com vídeo */
.video-card:hover .video-preview {
    opacity: 1;
}

/* Estilos simplificados e otimizados para página de vídeos */
.video-block {
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    margin-bottom: 20px;
}

.video-thumbnail-wrapper {
    position: relative;
    overflow: hidden;
    border-radius: 8px;
    transition: all 0.3s ease;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.video-thumbnail {
    width: 100%;
    height: 180px;
    object-fit: cover;
    transition: all 0.3s ease;
    background-color: #f1f1f1;
}

.video-thumbnail-container:hover .video-overlay {
    opacity: 1;
}

.action-buttons {
    position: absolute;
    bottom: 10px;
    right: 10px;
    display: flex;
    gap: 5px;
    z-index: 3;
}

.btn-action {
    width: 36px;
    height: 36px;
    padding: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    font-size: 14px;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2);
    background-color: white;
    color: #333;
}

.btn-action:hover {
    background-color: #f8f9fa;
    transform: scale(1.1);
}

/* Badges para vídeos */
.video-principal-badge {
    position: absolute;
    top: 10px;
    left: 10px;
    background-color: #ffc107;
    color: #000;
    padding: 3px 8px;
    border-radius: 4px;
    font-size: 12px;
    font-weight: bold;
    z-index: 3;
}

.video-error-badge {
    position: absolute;
    top: 10px;
    left: 10px;
    background-color: #dc3545;
    color: white;
    padding: 3px 8px;
    border-radius: 4px;
    font-size: 12px;
    font-weight: bold;
    z-index: 3;
}

/* Botão de regenerar thumbnail */
.regenerate-thumbnail-btn {
    padding: 4px 8px;
    font-size: 0.8rem;
    opacity: 0;
    transition: opacity 0.3s ease;
    z-index: 10;
}

.video-thumbnail-wrapper:hover .regenerate-thumbnail-btn {
    opacity: 1;
}

/* Estilo especial para thumbnails pretas ou com problemas */
img.video-thumbnail[src*="no-thumbnail"], 
.video-thumbnail[src$="?t=<?php echo time(); ?>"] {
    background-color: #222;
    background-image: linear-gradient(45deg, #333 25%, transparent 25%, transparent 75%, #333 75%, #333),
                      linear-gradient(45deg, #333 25%, transparent 25%, transparent 75%, #333 75%, #333);
    background-size: 20px 20px;
    background-position: 0 0, 10px 10px;
}

.video-thumbnail-wrapper:hover .video-thumbnail {
    filter: brightness(0.7);
}

/* Animação para o botão de regenerar todas as thumbnails */
.regenerate-all-btn {
    position: relative;
    overflow: hidden;
    transition: all 0.3s ease;
}

.regenerate-all-btn::after {
    content: "";
    position: absolute;
    width: 100%;
    height: 100%;
    top: 0;
    left: -100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.2), transparent);
    transition: left 0.5s ease;
}

.regenerate-all-btn:hover::after {
    left: 100%;
}

/* Estilo para o botão de regeneração durante o carregamento */
.regenerate-thumbnail-btn.loading,
.regenerate-all-btn.loading {
    pointer-events: none;
    position: relative;
}

.regenerate-thumbnail-btn.loading::before,
.regenerate-all-btn.loading::before {
    content: "";
    position: absolute;
    width: 16px;
    height: 16px;
    border: 2px solid #fff;
    border-top-color: transparent;
    border-radius: 50%;
    margin-right: 5px;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Toast de notificação para feedback */
.toast-container {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 9999;
}

.toast {
    background-color: #fff;
    color: #333;
    padding: 12px 20px;
    border-radius: 4px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
    margin-bottom: 10px;
    opacity: 0;
    transform: translateY(-20px);
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
}

.toast.show {
    opacity: 1;
    transform: translateY(0);
}

.toast.success {
    border-left: 4px solid #28a745;
}

.toast.error {
    border-left: 4px solid #dc3545;
}

.toast .icon {
    margin-right: 10px;
    font-size: 18px;
}

.toast.success .icon {
    color: #28a745;
}

.toast.error .icon {
    color: #dc3545;
}

.toast .message {
    flex-grow: 1;
}

.toast .close-btn {
    background: none;
    border: none;
    color: #aaa;
    cursor: pointer;
    font-size: 16px;
    padding: 0;
    margin-left: 10px;
}

.toast .close-btn:hover {
    color: #333;
}

/* Melhorar a visualização do vídeo no modal */
.video-container video {
    width: 100%;
    height: auto;
    max-height: 70vh;
}

/* Indicador de vídeo principal */
.main-video-badge {
    position: absolute;
    top: 10px;
    left: 10px;
    z-index: 3;
    background-color: rgba(0, 123, 255, 0.9);
    color: white;
    padding: 3px 8px;
    border-radius: 4px;
    font-size: 0.8rem;
    font-weight: bold;
}

.video-thumbnail-container.no-thumbnail {
    background-color: #000;
    background-image: linear-gradient(45deg, #444 25%, transparent 25%, transparent 75%, #444 75%, #444),
                    linear-gradient(45deg, #444 25%, transparent 25%, transparent 75%, #444 75%, #444);
    background-size: 20px 20px;
    background-position: 0 0, 10px 10px;
}

.video-thumbnail-container.no-thumbnail .video-play-icon {
    font-size: 3rem;
    opacity: 0.8;
}

.video-thumbnail-container.no-thumbnail .video-thumbnail {
    opacity: 0.8;
}

/* Estilos para o mapa de raio de atendimento usando Leaflet */
#map-container {
    width: 100%;
    height: 100%;
    border-radius: 0 0 8px 8px;
    overflow: hidden;
    z-index: 1;
}

/* Customizar controles de zoom do Leaflet */
.leaflet-control-zoom {
    border: none !important;
    box-shadow: 0 2px 10px rgba(0,0,0,0.15) !important;
}

.leaflet-control-zoom a {
    background-color: #fff !important;
    color: #333 !important;
    width: 32px !important;
    height: 32px !important;
    line-height: 32px !important;
    border-radius: 4px !important;
    border: none !important;
    font-size: 16px !important;
    font-weight: bold !important;
    transition: all 0.3s ease !important;
}

.leaflet-control-zoom a:hover {
    background-color: #f5f5f5 !important;
    color: #c8375c !important;
}

/* Esconder atribuições do mapa */
.leaflet-control-attribution {
    display: none !important;
}

/* Estilo para o indicador de raio */
.raio-indicator {
    background-color: rgba(255,255,255,0.95);
    padding: 6px 16px;
    border-radius: 30px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.15);
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
}

.raio-indicator:hover {
    transform: translateY(-2px) translateX(-50%);
    box-shadow: 0 4px 15px rgba(0,0,0,0.2);
}

.raio-indicator i {
    color: #c8375c;
    margin-right: 8px;
    font-size: 0.9rem;
}

.raio-indicator span {
    color: #333;
    font-weight: 600;
    font-size: 0.95rem;
}

/* Estilo para a mensagem de localização aproximada */
.localizacao-aproximada {
    position: absolute;
    bottom: 70px;
    left: 10px;
    background-color: rgba(255,255,255,0.95);
    padding: 5px 10px;
    border-radius: 4px;
    z-index: 1000;
    font-size: 12px;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
    transition: all 0.3s ease;
}

.localizacao-aproximada:hover {
    background-color: rgba(255,255,255,1);
    box-shadow: 0 4px 8px rgba(0,0,0,0.15);
}

.localizacao-aproximada i {
    margin-right: 5px;
    color: #17a2b8;
}

.localizacao-aproximada span {
    color: #555;
    font-weight: 500;
}

/* Remover a classe .mapa-overlay que não é mais usada */
.mapa-overlay {
    display: none;
}

/* Estilo para informação de área de atendimento */
.area-atendimento-info {
    position: absolute;
    bottom: 35px;
    left: 10px;
    background-color: rgba(255,255,255,0.95);
    padding: 6px 12px;
    border-radius: 4px;
    z-index: 1000;
    font-size: 13px;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
    transition: all 0.3s ease;
    cursor: help;
}

.area-atendimento-info:hover {
    background-color: rgba(255,255,255,1);
    box-shadow: 0 4px 8px rgba(0,0,0,0.15);
    transform: translateY(-2px);
}

.area-atendimento-info i {
    margin-right: 5px;
    color: #c8375c;
}

.area-atendimento-info span {
    color: #333;
    font-weight: 500;
}

/* Estilos adicionais para raio de atendimento */
#mapa-placeholder {
    transition: all 0.3s ease;
}

#mapa-preview {
    border: 1px solid #dee2e6;
    border-radius: 0.25rem;
    overflow: hidden;
}

#geocode-btn {
    margin-top: 10px;
}

#geocode-status {
    display: inline-block;
    vertical-align: middle;
}

/* Estilos para validação de CEP */
.is-validating {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='24' height='24' viewBox='0 0 24 24'%3E%3Cpath fill='%236c757d' d='M12,4V2A10,10 0 0,0 2,12H4A8,8 0 0,1 12,4Z'%3E%3CanimateTransform attributeName='transform' type='rotate' from='0 12 12' to='360 12 12' dur='1s' repeatCount='indefinite'/%3E%3C/path%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right calc(0.375em + 0.1875rem) center;
    background-size: calc(0.75em + 0.375rem) calc(0.75em + 0.375rem);
    padding-right: calc(1.5em + 0.75rem) !important;
}

.input-group .is-validating {
    z-index: 2;
}

/* Melhorias para feedback de validação */
#cep-feedback {
    display: none;
    width: 100%;
    margin-top: 0.25rem;
    font-size: 80%;
    color: #dc3545;
}

#cep-success {
    display: none;
    width: 100%;
    margin-top: 0.25rem;
    font-size: 80%;
    color: #28a745;
}

/* Correções para o menu móvel - sidebar - SOLUÇÃO SIMPLIFICADA */
@media (max-width: 991.98px) {
    /* Garantir que o menu lateral esteja posicionado corretamente */
    .navbar-collapse {
        position: fixed;
        top: 0;
        right: -280px;
        width: 280px;
        height: 100vh !important;
        background-color: #7a2941;
        transition: right 0.3s ease;
        padding: 1rem;
        z-index: 1050;
        overflow-y: auto;
    }
    
    /* Estado visível do menu */
    .navbar-collapse.show {
        right: 0;
        z-index: 9999 !important; /* Garantir maior z-index possível */
    }
    
    /* Links no menu - estilo básico */
    .navbar-nav .nav-item {
        margin-bottom: 10px;
        position: relative;
        z-index: 9999;
    }
    
    /* Aumentar área clicável dos links */
    .navbar-nav .nav-link {
        display: block;
        width: 100%;
        padding: 15px !important;
        margin: 5px 0;
        font-size: 16px;
        border-radius: 5px;
        background-color: rgba(255, 255, 255, 0.05);
        position: relative;
        z-index: 9999;
    }
    
    /* Estado ativo/hover dos links */
    .navbar-nav .nav-link:active,
    .navbar-nav .nav-link:hover {
        background-color: rgba(255, 255, 255, 0.15);
    }
    
    /* Botões no menu */
    .navbar-collapse .btn {
        display: block;
        width: 100%;
        margin: 10px 0;
        padding: 15px !important;
        position: relative;
        z-index: 9999;
    }
    
    /* Botão de fechar */
    .sidebar-close {
        position: absolute;
        top: 10px;
        left: 10px;
        width: 40px;
        height: 40px;
        background-color: rgba(255, 255, 255, 0.1);
        border: none;
        color: white;
        font-size: 24px;
        display: flex;
        align-items: center;
        justify-content: center;
        border-radius: 50%;
        z-index: 9999 !important;
        cursor: pointer;
    }
    
    /* Overlay para fechar o menu */
    .sidebar-overlay {
        display: none;
        position: fixed;
        top: 0;
        left: 0;
        width: 100%;
        height: 100%;
        background-color: rgba(0, 0, 0, 0.5);
        z-index: 1040;
    }
    
    .sidebar-overlay.show {
        display: block;
    }
    
    /* Remover qualquer elemento que possa estar bloqueando cliques */
    body.modal-open .navbar-collapse {
        z-index: 9999 !important;
    }
    
    /* Garantir que não haja elementos bloqueando o menu */
    .navbar-collapse::before,
    .navbar-collapse::after {
        display: none !important;
    }
    
    /* Ajustes para melhorar cliques em links */
    .navbar-collapse a,
    .navbar-collapse button {
        pointer-events: auto !important;
        position: relative;
        z-index: 9999;
    }
    
    /* Adicionar indicação visual clara para links */
    .navbar-collapse .nav-link {
        border: 1px solid rgba(255, 255, 255, 0.1);
    }
    
    /* Fazer links parecerem mais como botões para melhor usabilidade */
    .navbar-collapse .nav-link {
        text-align: center;
        font-weight: 600;
    }
    
    /* Remover eventos de pointer de possíveis elementos sobrepostos */
    .sidebar-overlay + * {
        pointer-events: none;
    }
    
    /* Garantir que o corpo da página não interfira */
    body.modal-open {
        overflow: hidden !important;
        pointer-events: none;
    }
    
    /* Mas permitir eventos no menu */
    body.modal-open .navbar-collapse,
    body.modal-open .navbar-collapse * {
        pointer-events: auto !important;
    }
    
    /* Garantir que o botão de toggle também fique acima de outros elementos */
    .navbar-toggler {
        z-index: 1060 !important;
        position: relative;
    }
}

/* Estilos específicos para iOS */
.ios-device .navbar-collapse {
    position: absolute !important;
    touch-action: manipulation !important;
    -webkit-overflow-scrolling: touch !important;
}

.ios-device .navbar-collapse.show {
    position: fixed !important;
    top: 0 !important;
    right: 0 !important;
    bottom: 0 !important;
    width: 280px !important;
    height: 100vh !important;
    overflow-y: auto !important;
    z-index: 99999 !important;
}

.ios-menu-button {
    -webkit-tap-highlight-color: rgba(255, 255, 255, 0.25) !important;
    -webkit-touch-callout: none !important;
    -webkit-user-select: none !important;
    user-select: none !important;
    touch-action: manipulation !important;
}

/* Melhorias para visibilidade no iOS */
.ios-menu-button {
    border: 1px solid rgba(255, 255, 255, 0.2) !important;
    text-align: center !important;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.2) !important;
}

.ios-menu-button:active {
    background-color: rgba(255, 255, 255, 0.25) !important;
}

/* Estilos para a classe mobile-nav-link adicionada pelo JS */
.mobile-nav-link {
    position: relative !important;
    z-index: 9999 !important;
    cursor: pointer !important;
    pointer-events: auto !important;
    -webkit-tap-highlight-color: rgba(255, 255, 255, 0.25) !important;
    touch-action: manipulation !important;
    padding: 15px !important;
    text-align: center !important;
    font-weight: 600 !important;
    border: 1px solid rgba(255, 255, 255, 0.2) !important;
    margin: 5px 0 !important;
}

/* Otimização para problemas comuns em navegadores móveis */
@media (max-width: 991.98px) {
    /* Evitar que elementos de fundo sejam clicáveis enquanto o menu está aberto */
    body.modal-open {
        overflow: hidden !important;
        position: fixed !important;
        width: 100% !important;
        height: 100% !important;
    }
    
    /* Forçar eventos de toque no menu */
    .navbar-collapse {
        touch-action: auto !important;
        -webkit-overflow-scrolling: touch !important;
    }
    
    /* Prevenir qualquer elemento de bloquear o menu */
    html, body, .container, main, header, .navbar, .site-header, 
    .sidebar-overlay, .navbar-collapse, .navbar-nav, .navbar-nav .nav-item, 
    .navbar-nav .nav-link, .sidebar-close {
        /* Redefine qualquer propriedade que possa interferir */
        transform: none !important;
        backface-visibility: visible !important;
        -webkit-backface-visibility: visible !important;
    }
    
    /* Manter overlay abaixo do menu, mas acima de tudo o mais */
    .sidebar-overlay.show {
        z-index: 1040 !important;
    }
}

/* Correções para o menu mobile e logo */
.navbar-brand {
    position: relative;
    z-index: 1500 !important;
    cursor: pointer;
    pointer-events: auto;
}

.navbar-toggler {
    position: relative;
    z-index: 1500 !important;
    cursor: pointer;
    pointer-events: auto;
}

/* Melhorias para o menu mobile */
@media (max-width: 991.98px) {
    .navbar-collapse {
        position: fixed;
        top: 0;
        right: -280px;
        width: 280px;
        height: 100vh !important;
        background-color: #7a2941;
        transition: right 0.3s ease;
        box-shadow: -5px 0 15px rgba(0,0,0,0.2);
        padding: 1rem;
        z-index: 1050;
        overflow-y: auto;
        border-left: 1px solid rgba(255, 255, 255, 0.1);
        pointer-events: auto;
    }
    
    .navbar-collapse.show {
        right: 0;
    }
    
    .navbar-nav .nav-item {
        width: 100%;
        height: auto;
        margin-bottom: 10px;
        pointer-events: auto;
    }
    
    .navbar-nav .nav-link {
        padding: 0.75rem 0;
        justify-content: flex-start;
        border-bottom: 1px solid rgba(255, 255, 255, 0.1);
        width: 100%;
        cursor: pointer;
        pointer-events: auto !important;
        z-index: 1060;
        position: relative;
    }
    
    .navbar-nav .nav-link:active,
    .navbar-nav .nav-link:hover {
        background-color: rgba(255, 255, 255, 0.15);
        color: white !important;
    }
    
    .sidebar-close {
        position: absolute;
        top: 10px;
        left: 10px;
        background: none;
        border: none;
        color: white;
        font-size: 1.5rem;
        cursor: pointer;
        outline: none;
        z-index: 1070;
        pointer-events: auto;
    }
    
    .sidebar-overlay {
        display: none;
        position: fixed;
        top: 0;
        left: 0;
        width: 100%;
        height: 100%;
        background-color: rgba(0, 0, 0, 0.5);
        z-index: 1040;
        pointer-events: auto;
    }
    
    .sidebar-overlay.show {
        display: block;
    }
    
    body.modal-open {
        overflow: hidden;
        position: fixed;
        width: 100%;
        height: 100%;
    }
}

/* Correções para iOS */
.ios-device .navbar-brand,
.ios-device .navbar-toggler,
.ios-device .navbar-collapse a,
.ios-device .sidebar-close {
    cursor: pointer;
    pointer-events: auto !important;
}

.ios-device .navbar-collapse {
    z-index: 1500;
}

.ios-device .navbar-collapse.show {
    right: 0;
}

/* Overlay com fundo escuro e blur - SOLUÇÃO SIMPLIFICADA */
.sidebar-overlay {
    position: fixed !important;
    top: 0 !important;
    left: 0 !important;
    width: 100% !important;
    height: 100% !important;
    background-color: rgba(0, 0, 0, 0.7) !important;
    backdrop-filter: blur(5px) !important;
    -webkit-backdrop-filter: blur(5px) !important;
    z-index: 1040 !important;
    display: none !important;
    opacity: 0 !important;
    transition: opacity 0.3s ease !important;
}

.sidebar-overlay.show {
    display: block;
    clip-path: polygon(0% 0%, calc(100% - 280px) 0%, calc(100% - 280px) 100%, 0% 100%);
}

/* Menu lateral mobile com transição suave */
@media (max-width: 991.98px) {
    .navbar-collapse {
        position: fixed !important;
        top: 0 !important;
        right: -280px !important;
        width: 280px !important;
        height: 100vh !important;
        background-color: #7a2941 !important;
        z-index: 1050 !important;
        transition: right 0.3s ease-in-out !important;
        overflow-y: auto !important;
        padding: 1.5rem 1rem !important;
    }
    
    .navbar-collapse.show {
        right: 0 !important;
    }
    
    body.modal-open {
        overflow: hidden !important;
    }
    
    /* Links com melhor estilo e clicáveis */
    .navbar-nav .nav-link {
        padding: 12px 15px !important;
        margin: 8px 0 !important;
        border-radius: 8px !important;
        background-color: rgba(255, 255, 255, 0.1) !important;
        position: relative !important;
        z-index: 1060 !important;
        pointer-events: auto !important;
    }
    
    /* Botão de fechar */
    .sidebar-close {
        position: absolute !important;
        top: 10px !important;
        left: 10px !important;
        background-color: rgba(255, 255, 255, 0.1) !important;
        border: none !important;
        color: white !important;
        font-size: 24px !important;
        width: 36px !important;
        height: 36px !important;
        border-radius: 50% !important;
        display: flex !important;
        align-items: center !important;
        justify-content: center !important;
        cursor: pointer !important;
        z-index: 1070 !important;
    }
    
    /* Logo no topo do sidebar */
    .sidebar-logo {
        text-align: center !important;
        margin-bottom: 20px !important;
        padding-top: 1rem !important;
        border-bottom: 1px solid rgba(255, 255, 255, 0.1) !important;
        padding-bottom: 1rem !important;
    }
    
    .navbar-toggler {
        z-index: 1050 !important;
    }
}

/* Correções para iOS */
.ios-device .navbar-collapse {
    position: fixed !important;
    z-index: 1050 !important;
}

.ios-device .sidebar-overlay {
    position: fixed !important;
    z-index: 1040 !important;
}

/* Melhorias para o sidebar - fundo escuro e borrado */
.sidebar-overlay {
    backdrop-filter: blur(5px);
    -webkit-backdrop-filter: blur(5px);
    background-color: rgba(0, 0, 0, 0.6) !important;
    transition: opacity 0.3s ease;
    opacity: 0;
}

.sidebar-overlay.show {
    display: block;
    clip-path: polygon(0% 0%, calc(100% - 280px) 0%, calc(100% - 280px) 100%, 0% 100%);
}

/* Melhorar aparência do menu lateral */
@media (max-width: 991.98px) {
    body.modal-open {
        overflow: hidden;
        position: fixed;
        width: 100%;
        height: 100%;
    }
    
    .navbar-collapse {
        transition: all 0.3s ease-in-out;
        box-shadow: -5px 0 25px rgba(0,0,0,0.4);
    }
    
    .sidebar-logo {
        margin-bottom: 20px;
    }
    
    /* Efeito de deslizamento mais suave */
    .navbar-collapse {
        transform: translateX(100%);
        right: 0;
    }
    
    .navbar-collapse.show {
        transform: translateX(0);
    }
}

/* Melhorias para os itens do menu */
@media (max-width: 991.98px) {
    /* Links no menu com efeitos de destaque e transição */
    .navbar-nav .nav-link {
        margin: 5px 0;
        padding: 12px 15px !important;
        border-radius: 8px;
        transition: all 0.2s ease;
        background-color: rgba(255, 255, 255, 0.08);
        border: none !important;
    }
    
    .navbar-nav .nav-link:hover,
    .navbar-nav .nav-link:active {
        background-color: rgba(255, 255, 255, 0.15);
        transform: translateX(5px);
    }
    
    /* Melhorar o visual do botão de fechar */
    .sidebar-close {
        opacity: 0.8;
        transition: all 0.2s ease;
        background-color: rgba(255, 255, 255, 0.1);
        width: 36px;
        height: 36px;
        border-radius: 50%;
        display: flex;
        align-items: center;
        justify-content: center;
    }
    
    .sidebar-close:hover {
        opacity: 1;
        background-color: rgba(255, 255, 255, 0.2);
    }
    
    /* Botões no menu */
    .navbar-collapse .btn {
        transition: all 0.2s ease;
        margin: 8px 0;
    }
    
    .navbar-collapse .btn:hover {
        transform: translateY(-2px);
    }
    
    /* Melhoria no logo dentro do sidebar */
    .sidebar-logo {
        position: relative;
        border-bottom: 1px solid rgba(255, 255, 255, 0.15);
        padding-bottom: 15px;
        margin-bottom: 15px;
    }
    
    .sidebar-logo img {
        transition: all 0.2s ease;
    }
    
    .sidebar-logo:hover img {
        transform: scale(1.05);
    }
}

/* Fallback para navegadores que não suportam backdrop-filter */
.sidebar-overlay.no-backdrop-filter {
    background-color: rgba(0, 0, 0, 0.75) !important;
}

/* Ajustes finais para o menu lateral */
@media (max-width: 991.98px) {
    .navbar-collapse {
        right: 0;
        transform: translateX(100%);
        transition: transform 0.3s ease-in-out !important;
    }
    
    .navbar-collapse.show {
        transform: translateX(0);
    }
    
    /* Espaçamento interno do menu */
    .navbar-collapse {
        padding: 1.5rem 1rem;
    }
    
    /* Destacar ícones nos links */
    .navbar-nav .nav-link i {
        display: inline-block;
        width: 24px;
        margin-right: 8px;
        text-align: center;
        color: rgba(255, 255, 255, 0.9);
    }
    
    /* Melhorar visual dos botões */
    .navbar-collapse .btn {
        width: 100%;
        text-align: center;
        margin-top: 10px;
        border-radius: 8px;
        font-weight: 600;
    }
    
    /* Separar botões e links */
    .navbar-nav {
        margin-bottom: 20px;
        border-bottom: 1px solid rgba(255, 255, 255, 0.1);
        padding-bottom: 15px;
    }
}

/* Correção dos cards de perfil para mobile */
@media (max-width: 767px) {
    .profile-card {
        max-height: none !important; /* Remover limite de altura */
        margin-bottom: 20px !important;
    }
    
    .profile-card-content {
        min-height: auto !important; /* Ajustar altura para o conteúdo */
        padding-bottom: 70px !important; /* Espaço para o botão */
        position: relative !important;
    }
    
    .profile-button-wrapper {
        position: absolute !important;
        bottom: 10px !important;
        left: 0 !important;
        right: 0 !important;
        width: 100% !important;
        z-index: 10 !important;
    }
    
    .profile-button-container {
        width: 100% !important;
        padding: 0 15px !important;
    }
    
    .btn-profile, 
    .profile-card .btn-outline-primary {
        width: 100% !important;
        display: block !important;
        margin: 0 auto !important;
        padding: 8px 15px !important;
    }
    
    .profile-card.highlighted, 
    .profile-card.has-video {
        max-height: none !important;
    }
    
    .profile-attributes-row {
        flex-wrap: wrap !important;
        justify-content: center !important;
        margin-bottom: 10px !important;
    }
    
    .attribute-badge {
        margin-bottom: 5px !important;
        font-size: 0.8rem !important;
        padding: 5px 10px !important;
    }
    
    /* Garantir que o botão "Ver Detalhes" seja visível */
    .profile-card .btn-outline-primary {
        position: relative !important;
        visibility: visible !important;
        opacity: 1 !important;
        margin-top: 10px !important;
        width: 100% !important;
    }
    
    /* Ajustar a visualização das informações */
    .profile-details {
        margin-bottom: 10px !important;
    }
    
    /* Manter o botão de visualização visível */
    .profile-quick-info {
        opacity: 1 !important;
        visibility: visible !important;
        transform: none !important;
        bottom: 10px !important;
        display: flex !important;
        justify-content: center !important;
        align-items: center !important;
        z-index: 10 !important;
    }
    
    /* Garantir que o botão dentro do overlay seja visível */
    .profile-card-image .profile-quick-info {
        position: absolute !important;
        bottom: 10px !important;
        left: 0 !important;
        right: 0 !important;
        width: 100% !important;
        padding: 0 10px !important;
        opacity: 1 !important;
        transform: none !important;
        z-index: 20 !important;
        background: rgba(0, 0, 0, 0.5) !important;
        padding: 10px !important;
    }
    
    /* Tornar o botão visível por padrão, sem necessidade de hover */
    .profile-card:hover .profile-quick-info,
    .profile-card .profile-quick-info {
        opacity: 1 !important;
        visibility: visible !important;
    }
    
    /* Garantir que o badge de vídeo não seja sobreposto */
    .video-badge {
        z-index: 15 !important;
    }
    
    /* Ajuste para o badge de destaque */
    .highlight-badge {
        z-index: 15 !important;
    }
} 