/* Melhorias para dispositivos móveis - TLS em oferta */

/* Estilos gerais para dispositivos móveis */
@media (max-width: 768px) {
    /* Reduzir espaçamento vertical entre elementos */
    .container {
        padding-top: 10px;
        padding-bottom: 10px;
    }
    
    .row {
        margin-bottom: 10px;
    }
    
    /* Melhorias nos cards de anúncios */
    .ad-card {
        margin-bottom: 12px;
    }
    
    /* Tornar o card inteiro clicável */
    .ad-card-link {
        position: relative;
        z-index: 1;
    }
    
    .ad-card-link::after {
        content: "";
        position: absolute;
        top: 0;
        left: 0;
        right: 0;
        bottom: 0;
        z-index: 2;
    }
    
    /* Reduzir altura da imagem e usar object-fit: cover */
    .ad-card-image {
        max-height: 180px;
    }
    
    .ad-card-image img {
        object-fit: cover;
    }
    
    /* Reorganizar informações do anúncio */
    .ad-card-content {
        padding: 10px;
    }
    
    /* Linha 1: Título + Preço */
    .ad-card-header {
        display: flex;
        justify-content: space-between;
        align-items: flex-start;
        margin-bottom: 5px;
    }
    
    .ad-card-title {
        font-size: 14px;
        font-weight: 600;
        margin: 0;
        flex: 1;
        padding-right: 10px;
        height: auto;
        max-height: 2.8em;
    }
    
    .ad-card-price {
        font-size: 16px;
        font-weight: 700;
        margin: 0;
        white-space: nowrap;
    }
    
    /* Linha 2: Bairro + Data */
    .ad-card-info {
        display: flex;
        justify-content: space-between;
        align-items: center;
        margin-bottom: 5px;
        font-size: 12px;
    }
    
    .ad-card-location {
        margin: 0;
    }
    
    .ad-card-date {
        margin: 0;
        text-align: right;
    }
    
    /* Linha 3: Botões de ação */
    .card-footer {
        padding: 5px 10px;
        border-top: 1px solid #eee;
    }
    
    /* Otimizar ícones de compartilhamento */
    .social-icons {
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
        padding-bottom: 5px;
        margin-top: 5px !important;
    }
    
    .social-icons::-webkit-scrollbar {
        display: none;
    }
    
    .social-icons a {
        width: 24px !important;
        height: 24px !important;
        font-size: 12px;
    }
    
    .social-icons a i {
        font-size: 12px;
    }
    
    /* Estilizar melhor a tag "Destaque" */
    .ad-card-highlight {
        padding: 4px 8px;
        font-size: 10px;
        font-weight: 700;
        box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
        border-radius: 4px;
    }
    
    /* Botão flutuante para "Anunciar" */
    .floating-button {
        position: fixed;
        bottom: 16px;
        right: 16px;
        width: 56px;
        height: 56px;
        border-radius: 50%;
        background-color: #FF6600;
        color: white;
        display: flex;
        align-items: center;
        justify-content: center;
        box-shadow: 0 4px 8px rgba(0, 0, 0, 0.3);
        z-index: 1000;
        text-decoration: none;
        transition: all 0.3s ease;
    }
    
    .floating-button:hover, 
    .floating-button:focus {
        background-color: #e55c00;
        color: white;
        transform: scale(1.05);
    }
    
    .floating-button i {
        font-size: 24px;
    }
    
    .floating-button-text {
        position: absolute;
        bottom: -20px;
        font-size: 12px;
        font-weight: 600;
        white-space: nowrap;
        color: #333;
    }
    
    /* Menu hambúrguer para "Outras Categorias" */
    .mobile-categories {
        display: none;
    }
    
    .hamburger-menu {
        display: flex;
        align-items: center;
        background-color: #f8f8f8;
        padding: 10px 15px;
        border-radius: 4px;
        margin-bottom: 15px;
        cursor: pointer;
        font-weight: 600;
    }
    
    .hamburger-menu i {
        margin-right: 10px;
    }
    
    .mobile-categories-content {
        display: none;
        background-color: white;
        border-radius: 4px;
        box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
        margin-bottom: 15px;
        max-height: 300px;
        overflow-y: auto;
    }
    
    .mobile-categories-content.active {
        display: block;
    }
    
    .mobile-category-item {
        display: flex;
        align-items: center;
        padding: 10px 15px;
        border-bottom: 1px solid #eee;
        text-decoration: none;
        color: #333;
    }
    
    .mobile-category-item:last-child {
        border-bottom: none;
    }
    
    .mobile-category-item i {
        margin-right: 10px;
        width: 20px;
        text-align: center;
        color: #6e0ad6;
    }
    
    .mobile-category-item span {
        flex: 1;
    }
    
    .mobile-category-item .badge {
        background-color: #6e0ad6;
        color: white;
        font-size: 10px;
        padding: 3px 6px;
        border-radius: 10px;
    }
    
    /* Ocultar a seção de filtros e categorias em dispositivos móveis */
    @media (max-width: 767px) {
        .col-md-3 .form-container:nth-child(2) {
            display: none;
        }
        
        .mobile-categories {
            display: block;
        }
        
        /* Estilos para login social em dispositivos móveis */
        .social-login {
            margin-top: 20px;
        }
        
        .social-login .divider {
            margin: 15px 0;
            text-align: center;
            position: relative;
        }
        
        .social-login .divider::before,
        .social-login .divider::after {
            content: "";
            position: absolute;
            top: 50%;
            width: 40%;
            height: 1px;
            background-color: #e5e5e5;
        }
        
        .social-login .divider::before {
            left: 0;
        }
        
        .social-login .divider::after {
            right: 0;
        }
        
        .social-login .divider span {
            display: inline-block;
            padding: 0 10px;
            background-color: #fff;
            position: relative;
            z-index: 1;
            font-size: 14px;
            color: #666;
        }
        
        .social-buttons {
            display: flex;
            justify-content: center;
            gap: 15px;
            margin-top: 15px;
        }
        
        .social-button {
            flex: 1;
            display: flex;
            align-items: center;
            justify-content: center;
            padding: 10px 15px;
            border-radius: 4px;
            font-weight: 600;
            font-size: 14px;
            transition: all 0.2s;
            max-width: 150px;
        }
        
        .social-button i {
            margin-right: 8px;
            font-size: 16px;
        }
        
        /* Estilos específicos para a página de cadastro em dispositivos móveis */
        @media (max-width: 576px) {
            .form-container {
                padding: 15px;
            }
            
            .form-container h2 {
                font-size: 20px;
                margin-bottom: 15px;
            }
            
            .form-label {
                font-size: 14px;
            }
            
            .form-control {
                font-size: 14px;
                padding: 8px 12px;
            }
            
            .btn-primary {
                padding: 10px 15px;
            }
            
            .social-button {
                padding: 8px 12px;
                font-size: 13px;
            }
        }
    }
}
