/* CSS Principal para a Página de Estabelecimento (bisnes.php) */

/* Estilos para tabelas de serviços */
.servicos-table {
    border-collapse: separate;
    border-spacing: 0;
}

.servicos-table th {
    position: sticky;
    top: 0;
    z-index: 10;
}

.servicos-table tbody tr:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.servicos-table .servico-item {
    transition: all 0.2s ease-in-out;
}

/* Animação para botões de ação */
.btn-agendar {
    transition: all 0.2s ease-in-out;
    position: relative;
    overflow: hidden;
}

.btn-agendar:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(59, 130, 246, 0.3);
}

.btn-agendar:active {
    transform: translateY(0);
}

/* Badge de pacote */
.badge-pacote {
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.8; }
}

/* Responsividade melhorada */
@media (max-width: 640px) {
    .servicos-table th,
    .servicos-table td {
        padding: 0.75rem 0.5rem;
    }
    
    .btn-agendar {
        padding: 0.5rem 0.75rem;
        font-size: 0.875rem;
    }
}

/* Efeito de destaque para serviços populares */
.servico-popular {
    position: relative;
}

.servico-popular::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 4px;
    background: linear-gradient(135deg, #f59e0b, #ea580c);
    border-radius: 0 2px 2px 0;
}

/* Indicador de preço em destaque */
.preco-destaque {
    position: relative;
}

.preco-destaque::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    right: 0;
    height: 2px;
    background: linear-gradient(90deg, #3b82f6, #1d4ed8);
    border-radius: 1px;
}

/* Efeito hover para linhas da tabela */
.table-row-hover:hover {
    background: linear-gradient(135deg, #f8fafc 0%, #f1f5f9 100%);
}

/* Estilo para ícones dos cabeçalhos */
.header-icon {
    transition: transform 0.2s ease-in-out;
}

.servicos-table th:hover .header-icon {
    transform: scale(1.1);
}

/* Animações para filtro de serviços */
.servico-item {
    transition: all 0.3s ease;
    transform: translateX(0);
    opacity: 1;
}

.servico-item[style*="none"] {
    transform: translateX(-20px);
    opacity: 0;
}

.membro-selecionado {
    transform: scale(1.05);
    box-shadow: 0 4px 12px rgba(59, 130, 246, 0.3);
}

#nome_membro {
    animation: slideDown 0.3s ease-out;
}

@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.servico-highlight {
    background: linear-gradient(135deg, #f3f4f6 0%, #e5e7eb 100%);
    border-left: 4px solid #3b82f6;
}

/* Estilos para galeria de trabalhos */
.trabalho-item {
    position: relative;
    overflow: hidden;
    border-radius: 0.5rem;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
    aspect-ratio: 1 / 1; /* Força proporção quadrada */
}

.trabalho-item:hover {
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
    transform: translateY(-2px);
}

.trabalho-item .trabalho-imagem {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
    transition: transform 0.5s ease;
}

.trabalho-item:hover .trabalho-imagem {
    transform: scale(1.1);
    filter: brightness(0.9);
}

/* Container da galeria com tamanhos uniformes */
#trabalhos-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1rem;
    align-items: stretch;
}

@media (min-width: 768px) {
    #trabalhos-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

/* Força todas as imagens a terem o mesmo tamanho */
#trabalhos-grid .trabalho-item {
    height: 0;
    padding-bottom: 100%; /* Cria um quadrado perfeito */
    position: relative;
}

#trabalhos-grid .trabalho-item > div:first-child {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
}

/* Garantir que todas as imagens tenham o mesmo tamanho */
.trabalho-item .trabalho-container,
.trabalho-item > div:first-child {
    width: 100%;
    height: 100%;
    aspect-ratio: 1 / 1;
    overflow: hidden;
    background-color: #f3f4f6;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
}

/* Overlay de hover para galeria */
.trabalho-item .trabalho-overlay,
.trabalho-item > div:last-child {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: rgba(0, 0, 0, 0.2);
    opacity: 0;
    transition: opacity 0.3s ease;
    cursor: pointer;
}

.trabalho-item:hover .trabalho-overlay,
.trabalho-item:hover > div:last-child {
    opacity: 1;
}

.trabalho-item .trabalho-icon,
.trabalho-item span {
    padding: 0.75rem;
    background-color: rgba(0, 0, 0, 0.7);
    border-radius: 50%;
    backdrop-filter: blur(4px);
}

/* Estilos para comodidades */
.comodidade-item {
    transition: all 0.2s ease;
}

.comodidade-item:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

/* Estilos para membros da equipe */
.membro-card {
    transition: all 0.3s ease;
    cursor: pointer;
}

.membro-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
}

.membro-card img {
    transition: transform 0.3s ease;
}

.membro-card:hover img {
    transform: scale(1.05);
}

/* Estilos para status online */
.status-online {
    position: relative;
}

/* Estilos para imagem do estabelecimento */
.estabelecimento-imagem {
    transition: transform 0.3s ease;
    min-height: 200px;
    background-color: #f3f4f6;
}

.estabelecimento-imagem:hover {
    transform: scale(1.02);
}

/* Garantir que a imagem sempre preencha o container adequadamente */
.estabelecimento-imagem.object-cover {
    object-position: center;
}

.status-online::after {
    content: '';
    position: absolute;
    top: -2px;
    right: -2px;
    width: 12px;
    height: 12px;
    background: #10b981;
    border: 2px solid white;
    border-radius: 50%;
    animation: pulse-online 2s infinite;
}

@keyframes pulse-online {
    0% {
        box-shadow: 0 0 0 0 rgba(16, 185, 129, 0.7);
    }
    70% {
        box-shadow: 0 0 0 10px rgba(16, 185, 129, 0);
    }
    100% {
        box-shadow: 0 0 0 0 rgba(16, 185, 129, 0);
    }
}

/* Estilos para aviso de status */
.aviso-status {
    border-left: 4px solid #f59e0b;
    background: linear-gradient(135deg, #fef3c7 0%, #fde68a 100%);
}

/* Estilos responsivos específicos */
@media (max-width: 768px) {
    .container-principal {
        padding: 1rem;
    }
    
    .grid-principal {
        grid-template-columns: 1fr;
        gap: 1rem;
    }
    
    .aside-desktop {
        display: none;
    }
    
    .membros-mobile {
        display: block;
    }
}

@media (min-width: 769px) {
    .membros-mobile {
        display: none;
    }
    
    .aside-desktop {
        display: block;
    }
}

/* Estilos para elementos de carregamento */
.skeleton {
    background: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%);
    background-size: 200% 100%;
    animation: loading 1.5s infinite;
}

@keyframes loading {
    0% {
        background-position: 200% 0;
    }
    100% {
        background-position: -200% 0;
    }
}

/* Estilos para toast notifications */
.toast {
    position: fixed;
    top: 1rem;
    right: 1rem;
    z-index: 1000;
    max-width: 24rem;
    padding: 1rem;
    border-radius: 0.5rem;
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
    transform: translateX(100%);
    transition: transform 0.3s ease;
}

.toast.show {
    transform: translateX(0);
}

.toast.success {
    background: #10b981;
    color: white;
}

.toast.error {
    background: #ef4444;
    color: white;
}

.toast.info {
    background: #3b82f6;
    color: white;
}

.toast.warning {
    background: #f59e0b;
    color: white;
}

/* Estilos para modal de imagem */
#modalImagem {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.9);
    z-index: 10000;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 2rem;
}

#modalImagem.hidden {
    display: none !important;
}

#modalImagem img {
    max-width: 90%;
    max-height: 90%;
    object-fit: contain;
    border-radius: 0.5rem;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5);
}

#modalImagem button {
    position: absolute;
    background: rgba(255, 255, 255, 0.9);
    border: none;
    border-radius: 50%;
    width: 3rem;
    height: 3rem;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s ease;
    z-index: 10001;
}

#modalImagem button:hover {
    background: rgba(255, 255, 255, 1);
    transform: scale(1.1);
}
