/* Global Styles */
* {
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    line-height: 1.6;
    color: #333;
}

/* Navbar Styles - Dark Blue Theme */
.navbar-dark {
    background: linear-gradient(135deg, #1e3a8a 0%, #1e40af 100%) !important;
    box-shadow: 0 2px 10px rgba(30, 58, 138, 0.3);
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.navbar-dark .navbar-brand {
    color: #ffffff !important;
    font-weight: 700;
    font-size: 1.3rem;
}

.navbar-dark .navbar-brand:hover {
    color: #e0e7ff !important;
}

.navbar-dark .navbar-nav .nav-link {
    color: #ffffff !important;
    font-weight: 500;
    padding: 0.5rem 1rem;
    transition: all 0.3s ease;
    border-radius: 6px;
    margin: 0 2px;
}

.navbar-dark .navbar-nav .nav-link:hover {
    color: #1e3a8a !important;
    background-color: rgba(255, 255, 255, 0.9);
    transform: translateY(-1px);
}

.navbar-dark .navbar-nav .nav-link:focus {
    color: #ffffff !important;
}

.navbar-dark .navbar-toggler {
    border-color: rgba(255, 255, 255, 0.3);
}

.navbar-dark .navbar-toggler-icon {
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 30 30'%3e%3cpath stroke='rgba%28255, 255, 255, 0.85%29' stroke-linecap='round' stroke-miterlimit='10' stroke-width='2' d='M4 7h22M4 15h22M4 23h22'/%3e%3c/svg%3e");
}

@media (max-width: 768px) {
    .navbar-dark .navbar-nav {
        background: rgba(30, 58, 138, 0.95);
        border-radius: 8px;
        padding: 10px;
        margin-top: 10px;
    }
    
    .navbar-dark .navbar-nav .nav-link {
        padding: 8px 12px;
        margin: 2px 0;
    }
    
    /* Mobile Enviar Grupo Button Styling */
     .mobile-enviar-grupo {
         background: linear-gradient(135deg, #10b981 0%, #059669 100%) !important;
         border: none !important;
         color: #ffffff !important;
         font-size: 0.8rem !important;
         font-weight: 600 !important;
         padding: 6px 12px !important;
         border-radius: 15px !important;
         box-shadow: 0 2px 6px rgba(16, 185, 129, 0.3) !important;
         transition: all 0.3s ease !important;
         text-decoration: none !important;
         white-space: nowrap !important;
         margin: 0 8px !important;
     }
     
     .mobile-enviar-grupo:hover {
         background: linear-gradient(135deg, #059669 0%, #047857 100%) !important;
         transform: translateY(-1px) !important;
         box-shadow: 0 3px 10px rgba(16, 185, 129, 0.4) !important;
         color: #ffffff !important;
     }
     
     .mobile-enviar-grupo:focus {
         box-shadow: 0 0 0 0.2rem rgba(16, 185, 129, 0.25) !important;
         color: #ffffff !important;
     }
     
     .mobile-enviar-grupo i {
         font-size: 0.6rem !important;
     }
}

@media (max-width: 576px) {
     .mobile-enviar-grupo {
         font-size: 0.75rem !important;
         padding: 5px 10px !important;
         margin: 0 6px !important;
     }
     
     .mobile-enviar-grupo i {
         font-size: 0.65rem !important;
     }
     
     .navbar-brand {
         font-size: 1.1rem !important;
     }
     
     .navbar-toggler {
         padding: 4px 6px !important;
         font-size: 0.9rem !important;
     }
 }

/* Responsive Images */
img {
    max-width: 100%;
    height: auto;
}

/* Custom Scrollbar */
::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 10px;
}

::-webkit-scrollbar-thumb {
    background: linear-gradient(135deg, #667eea, #764ba2);
    border-radius: 10px;
}

::-webkit-scrollbar-thumb:hover {
    background: linear-gradient(135deg, #5a6fd8, #6a4190);
}

/* Gradient Backgrounds */
.bg-gradient-primary {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
}

.bg-gradient-success {
    background: linear-gradient(135deg, #28a745 0%, #20c997 100%);
}

.bg-gradient-warning {
    background: linear-gradient(135deg, #ffc107 0%, #fd7e14 100%);
}

.bg-gradient-info {
    background: linear-gradient(135deg, #17a2b8 0%, #6f42c1 100%);
}

/* Card Animations */
.card-hover {
    transition: all 0.3s ease;
}

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

/* Button Styles */
.btn-gradient {
    background: linear-gradient(135deg, #667eea, #764ba2);
    border: none;
    color: white;
    transition: all 0.3s ease;
}

.btn-gradient:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(102, 126, 234, 0.3);
    color: white;
}

.btn-outline-gradient {
    border: 2px solid #667eea;
    color: #667eea;
    background: transparent;
    transition: all 0.3s ease;
}

.btn-outline-gradient:hover {
    background: linear-gradient(135deg, #667eea, #764ba2);
    color: white;
    border-color: transparent;
}

/* Form Styles */
.form-control-modern {
    border-radius: 12px;
    border: 2px solid #e9ecef;
    padding: 12px 15px;
    transition: all 0.3s ease;
}

.form-control-modern:focus {
    border-color: #667eea;
    box-shadow: 0 0 0 0.2rem rgba(102, 126, 234, 0.25);
}

/* Loading Animation */
.loading {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 3px solid rgba(255,255,255,.3);
    border-radius: 50%;
    border-top-color: #fff;
    animation: spin 1s ease-in-out infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* Responsive Utilities */
@media (max-width: 768px) {
    .container {
        padding-left: 15px;
        padding-right: 15px;
    }
    
    .btn {
        width: 100%;
        margin-bottom: 10px;
    }
    
    .card {
        margin-bottom: 20px;
    }
    
    .table-responsive {
        font-size: 0.9rem;
    }
    
    .sidebar {
        position: fixed;
        top: 0;
        left: -100%;
        width: 80%;
        height: 100vh;
        z-index: 1050;
        transition: left 0.3s ease;
    }
    
    .sidebar.show {
        left: 0;
    }
    
    .sidebar-overlay {
        position: fixed;
        top: 0;
        left: 0;
        width: 100%;
        height: 100%;
        background: rgba(0,0,0,0.5);
        z-index: 1040;
        display: none;
    }
    
    .sidebar-overlay.show {
        display: block;
    }
}

@media (max-width: 576px) {
    .page-header h1 {
        font-size: 2rem !important;
    }
    
    .page-header p {
        font-size: 1rem !important;
    }
    
    .plan-card {
        margin-bottom: 20px;
    }
    
    .stat-card h3 {
        font-size: 1.5rem;
    }
    
    .form-container {
        padding: 20px;
    }
}

/* Dark Mode Support */
@media (prefers-color-scheme: dark) {
    .form-container,
    .plan-card,
    .group-selector {
        background: rgba(33, 37, 41, 0.95);
        color: #fff;
    }
    
    .form-control,
    .form-select {
        background: rgba(255, 255, 255, 0.1);
        border-color: rgba(255, 255, 255, 0.2);
        color: #fff;
    }
    
    .form-control:focus,
    .form-select:focus {
        background: rgba(255, 255, 255, 0.15);
        border-color: #667eea;
        color: #fff;
    }
}

/* Print Styles */
@media print {
    .sidebar,
    .btn,
    .alert {
        display: none !important;
    }
    
    .main-content {
        margin: 0 !important;
        box-shadow: none !important;
        background: white !important;
    }
}

/* Accessibility */
.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

/* Focus Styles */
.btn:focus,
.form-control:focus,
.form-select:focus {
    outline: 2px solid #667eea;
    outline-offset: 2px;
}

/* High Contrast Mode */
@media (prefers-contrast: high) {
    .btn-gradient {
        background: #000;
        border: 2px solid #fff;
    }
    
    .btn-outline-gradient {
        border-color: #000;
        color: #000;
    }
}

/* Group Card Styles */
.group-card {
    background: white;
    border-radius: 15px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
    transition: all 0.3s ease;
    overflow: hidden;
    border: none;
    height: 100%;
}

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

.group-image {
    width: 40px;
    height: 40px;
    object-fit: cover;
    border: 3px solid #fff;
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
    border-radius: 8px;
}

.default-group-image {
    width: 40px;
    height: 40px;
    border: 3px solid #fff;
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
    background: linear-gradient(135deg, #667eea, #764ba2);
    border-radius: 8px;
}

.group-image-round {
    width: 180px !important;
    height: 180px !important;
    margin: 0 auto;
    border-radius: 20px !important;
}

.group-image-round img {
    width: 180px !important;
    height: 180px !important;
    object-fit: cover;
    border-radius: 20px !important;
}

.group-image-round .default-image {
    width: 180px !important;
    height: 180px !important;
    background: linear-gradient(135deg, #667eea, #764ba2);
    border-radius: 20px !important;
    display: flex;
    align-items: center;
    justify-content: center;
}

.group-image-round .default-image i {
    font-size: 4.5rem !important;
    color: white !important;
}

.group-name {
    font-size: 1.1rem;
    font-weight: 600;
    color: #2c3e50;
    margin-bottom: 8px;
    line-height: 1.3;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.group-type-badge {
    font-size: 0.85rem;
    padding: 6px 12px;
    border-radius: 20px;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.telegram-badge {
    background: linear-gradient(135deg, #0088cc, #229ED9);
    color: white;
}

.whatsapp-badge {
    background: linear-gradient(135deg, #25D366, #128C7E);
    color: white;
}

.btn-enter-group {
    background: linear-gradient(135deg, #667eea, #764ba2);
    border: none;
    color: white;
    padding: 10px 20px;
    border-radius: 25px;
    font-weight: 600;
    font-size: 0.9rem;
    transition: all 0.3s ease;
    text-decoration: none;
    display: inline-block;
    width: 100%;
    text-align: center;
}

.btn-enter-group:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(102, 126, 234, 0.4);
    color: white;
    text-decoration: none;
}

.group-badges {
    position: absolute;
    top: 15px;
    right: 15px;
    z-index: 2;
}

.vip-badge {
    background: linear-gradient(135deg, #ffd700, #ffb347);
    color: #333;
    font-size: 0.7rem;
    padding: 4px 8px;
    border-radius: 12px;
    font-weight: bold;
    margin-bottom: 5px;
    display: block;
}

/* Badge Em Destaque */
.featured-badge {
    position: absolute;
    top: 5px;
    left: 5px;
    background: none;
    border: none;
    padding: 0;
    border-radius: 0;
    font-size: 24px;
    font-weight: normal;
    z-index: 2;
    width: auto;
    height: auto;
    box-shadow: none;
    color: #ffd700;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.7);
    display: flex;
    align-items: center;
    justify-content: center;
    pointer-events: none;
    /* Efeito de brilho */
    filter: drop-shadow(0 0 8px #ffd700) drop-shadow(0 0 12px #ffd700) drop-shadow(0 0 16px #ffd700);
    animation: glow-pulse 2s ease-in-out infinite alternate;
}

.featured-badge i {
    font-size: 18px;
    color: #ffd700;
    filter: drop-shadow(1px 1px 2px rgba(0,0,0,0.5));
}

.group-image {
    position: relative;
}

/* Grid Layout Optimization */
.groups-grid {
    display: grid;
    grid-template-columns: repeat(6, 1fr);
    gap: 20px;
    margin-top: 30px;
}

/* Desktop - 6 cards per row */
@media (min-width: 1200px) {
    .groups-grid {
        grid-template-columns: repeat(6, 1fr);
        gap: 20px;
    }
}

/* Large tablets - 4 cards per row */
@media (max-width: 1199px) and (min-width: 992px) {
    .groups-grid {
        grid-template-columns: repeat(4, 1fr);
        gap: 18px;
    }
}

/* Tablets - 3 cards per row */
@media (max-width: 991px) and (min-width: 769px) {
    .groups-grid {
        grid-template-columns: repeat(3, 1fr);
        gap: 15px;
    }
}

/* Mobile - 2 cards per row */
@media (max-width: 768px) {
    .groups-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 12px;
        margin-top: 20px;
    }
    
    /* Aumentar tamanho das imagens dos cards e torná-las quadradas com bordas redondas */
    .group-image,
    .default-group-image {
        width: 100px;
        height: 100px;
        border-radius: 15px;
        object-fit: cover;
    }
    
    .group-image-round {
        width: 100px;
        height: 100px;
        border-radius: 15px;
    }
    
    .group-image-round img {
        width: 100px;
        height: 100px;
        border-radius: 15px;
        object-fit: cover;
    }
    
    .group-image-round .default-image {
        width: 100px;
        height: 100px;
        border-radius: 15px;
    }
    
    .group-image-round .default-image i {
        font-size: 2.5rem !important;
    }
    
    /* Ajustar badge de destaque para mobile */
    .featured-badge {
        top: 3px !important;
        left: 3px !important;
        font-size: 16px;
    }
    
    .featured-badge i {
        font-size: 16px;
    }
    
    .group-name {
        font-size: 0.9rem;
        margin-bottom: 8px;
    }
    
    .group-card {
        margin-bottom: 20px;
        padding: 12px;
    }
    
    .btn-enter-group {
        padding: 6px 10px;
        font-size: 0.7rem;
        border-radius: 12px;
    }
    
    .group-type-badge {
        font-size: 0.7rem;
        padding: 4px 8px;
    }
    
    /* Diminuir botão Ver Grupo */
    .btn-primary {
        padding: 4px 8px;
        font-size: 0.65rem;
        border-radius: 6px;
    }
    
    .btn-primary i {
        font-size: 0.6rem;
    }
    
    /* Estilo personalizado para o botão Ver Grupo */
.btn-ver-grupo {
    background: linear-gradient(135deg, #065f46 0%, #047857 100%) !important;
    border: none !important;
    color: #ffffff !important;
    font-weight: 700 !important;
    padding: 12px 24px !important;
    border-radius: 12px !important;
    font-size: 1.1rem !important;
    text-transform: uppercase !important;
    letter-spacing: 0.5px !important;
    box-shadow: 0 4px 15px rgba(6, 95, 70, 0.4) !important;
    transition: all 0.3s ease !important;
    position: relative !important;
    overflow: hidden !important;
    width: 100% !important;
}
    
    .btn-ver-grupo:hover {
        background: linear-gradient(135deg, #047857 0%, #065f46 100%) !important;
        transform: translateY(-2px) !important;
        box-shadow: 0 6px 20px rgba(6, 95, 70, 0.6) !important;
        color: #ffffff !important;
    }
    
    .btn-ver-grupo:focus {
        box-shadow: 0 0 0 0.2rem rgba(6, 95, 70, 0.25) !important;
        color: #ffffff !important;
    }
    
    .btn-ver-grupo:active {
        transform: translateY(0) !important;
        box-shadow: 0 2px 10px rgba(6, 95, 70, 0.4) !important;
    }
    
    /* Efeito de brilho no botão */
    .btn-ver-grupo::before {
        content: '';
        position: absolute;
        top: 0;
        left: -100%;
        width: 100%;
        height: 100%;
        background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.3), transparent);
        transition: left 0.5s;
    }
    
    .btn-ver-grupo:hover::before {
        left: 100%;
    }
    
    /* Animação pulsante para chamar atenção */
    @keyframes btn-pulse {
        0% {
            box-shadow: 0 4px 15px rgba(6, 95, 70, 0.4);
        }
        50% {
            box-shadow: 0 4px 20px rgba(6, 95, 70, 0.6), 0 0 0 8px rgba(6, 95, 70, 0.1);
        }
        100% {
            box-shadow: 0 4px 15px rgba(6, 95, 70, 0.4);
        }
    }
    
    .btn-ver-grupo {
        animation: btn-pulse 2s infinite;
    }
    
    /* Responsivo para tablets */
@media (max-width: 768px) {
    .btn-ver-grupo {
        padding: 10px 20px !important;
        font-size: 1rem !important;
    }
}
    
    /* Responsivo para mobile */
@media (max-width: 576px) {
    .btn-ver-grupo {
        padding: 8px 18px !important;
        font-size: 0.95rem !important;
    }
}
    
    /* Animação de brilho para a estrela featured */
    @keyframes glow-pulse {
        0% {
            filter: drop-shadow(0 0 8px #ffd700) drop-shadow(0 0 12px #ffd700) drop-shadow(0 0 16px #ffd700);
        }
        100% {
            filter: drop-shadow(0 0 12px #ffd700) drop-shadow(0 0 20px #ffd700) drop-shadow(0 0 28px #ffd700) drop-shadow(0 0 35px #ffd700);
        }
    }
}

@media (max-width: 576px) {
    .search-box {
        border-radius: 20px;
        padding: 3px;
        margin: 0 20px;
        max-width: 90%;
        margin-left: auto;
        margin-right: auto;
        background: rgba(255, 255, 255, 0.98);
    }
    
    .search-box .form-control {
        padding: 10px 15px;
        font-size: 0.85rem;
        border-radius: 17px;
    }
    
    .search-box .btn {
        padding: 10px 14px;
        border-radius: 17px;
        font-size: 0.8rem;
    }
    
    .search-box .btn i {
        font-size: 0.8rem;
    }
    
    .hero-section {
        padding: 1.5rem 0;
    }
    
    .hero-section h1 {
        font-size: 1.6rem;
        margin-bottom: 0.8rem;
    }
    
    .hero-section .lead {
        font-size: 0.9rem;
        margin-bottom: 1.2rem;
    }
    
    /* Aumentar tamanho das imagens dos cards em mobile */
    .group-image,
    .default-group-image {
        width: 65px;
        height: 65px;
    }
    
    .group-name {
        font-size: 0.9rem;
        margin-bottom: 8px;
    }
    
    .group-card {
        border-radius: 12px;
        padding: 12px;
    }
    
    .btn-primary {
        padding: 4px 8px;
        font-size: 0.65rem;
        border-radius: 8px;
    }
    
    .btn-primary i {
        font-size: 0.6rem;
    }
    
    .badge.fs-6 {
        font-size: 0.65rem !important;
        padding: 3px 6px;
        border-radius: 6px;
    }
    
    .group-type-badge {
        font-size: 0.7rem;
        padding: 4px 8px;
    }
    
    /* Diminuir botão Ver Grupo */
    .btn-primary {
        padding: 4px 8px;
        font-size: 0.65rem;
        border-radius: 6px;
    }
    
    .btn-primary i {
        font-size: 0.6rem;
    }
    
    /* Ajustar badge do tipo para ficar proporcional */
    .badge.fs-6 {
        font-size: 0.7rem !important;
        padding: 4px 8px !important;
    }
    
    .badge.fs-6 i {
        font-size: 0.65rem !important;
    }
}

/* Small mobile - maintain 2 cards per row but smaller */
@media (max-width: 576px) {
    .groups-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 10px;
    }
    
    .group-card {
        margin-bottom: 10px;
        padding: 10px;
    }
    
    /* Manter imagens grandes em telas pequenas mas ajustar ligeiramente */
    .group-image,
    .default-group-image {
        width: 90px;
        height: 90px;
        border-radius: 12px;
    }
    
    .group-image-round {
        width: 90px;
        height: 90px;
        border-radius: 12px;
    }
    
    .group-image-round img {
        width: 90px;
        height: 90px;
        border-radius: 12px;
        object-fit: cover;
    }
    
    .group-image-round .default-image {
        width: 90px;
        height: 90px;
        border-radius: 12px;
    }
    
    .group-image-round .default-image i {
        font-size: 2.2rem !important;
    }
    
    /* Ajustar badge de destaque para telas pequenas */
    .featured-badge {
        top: 4px;
        right: 4px;
        font-size: 14px;
    }
    
    .featured-badge i {
        font-size: 14px;
    }
    
    .group-name {
        font-size: 0.85rem;
    }
    
    .btn-enter-group {
        padding: 5px 8px;
        font-size: 0.65rem;
        border-radius: 10px;
    }
    
    /* Diminuir ainda mais o botão Ver Grupo */
    .btn-primary {
        padding: 3px 6px;
        font-size: 0.6rem;
        border-radius: 5px;
    }
    
    .btn-primary i {
        font-size: 0.55rem;
    }
    
    /* Ajustar badge do tipo */
    .badge.fs-6 {
        font-size: 0.65rem !important;
        padding: 3px 6px !important;
    }
    
    .badge.fs-6 i {
        font-size: 0.6rem !important;
    }
}

/* Search Box Improvements */
.search-box {
    background: rgba(255, 255, 255, 0.95);
    border-radius: 25px;
    padding: 5px;
    box-shadow: 0 3px 15px rgba(0,0,0,0.1);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.search-box .form-control {
    border: none;
    padding: 12px 20px;
    font-size: 0.95rem;
    background: transparent;
    border-radius: 20px;
}

.search-box .form-control:focus {
    box-shadow: none;
    background: transparent;
}

.search-box .btn {
    border-radius: 20px;
    padding: 12px 18px;
    border: none;
    background: linear-gradient(135deg, #007bff 0%, #0056b3 100%);
    transition: all 0.3s ease;
}

.search-box .btn:hover {
    transform: scale(1.05);
    box-shadow: 0 2px 8px rgba(0, 123, 255, 0.3);
}

.search-box .btn i {
    font-size: 0.9rem;
}

/* Mobile Search Box Improvements */
@media (max-width: 768px) {
    .search-box {
        border-radius: 20px;
        padding: 3px;
        margin: 0 20px;
        max-width: 90%;
        margin-left: auto;
        margin-right: auto;
        background: rgba(255, 255, 255, 0.98);
    }
    
    .search-box .form-control {
        padding: 10px 15px;
        font-size: 0.85rem;
        border-radius: 17px;
    }
    
    .search-box .btn {
        padding: 10px 14px;
        border-radius: 17px;
        font-size: 0.8rem;
    }
    
    .search-box .btn i {
        font-size: 0.8rem;
    }
    
    .hero-section {
        padding: 1.5rem 0;
    }
    
    .hero-section h1 {
        font-size: 1.6rem;
        margin-bottom: 0.8rem;
    }
    
    .hero-section .lead {
        font-size: 0.9rem;
        margin-bottom: 1.2rem;
    }
    
    /* Aumentar tamanho das imagens dos cards em mobile */
    .group-image,
    .default-group-image {
        width: 65px;
        height: 65px;
    }
    
    .group-name {
        font-size: 0.9rem;
        margin-bottom: 8px;
    }
    
    .group-card {
        border-radius: 12px;
        padding: 12px;
    }
    
    .btn-primary {
        padding: 4px 8px;
        font-size: 0.65rem;
        border-radius: 8px;
    }
    
    .btn-primary i {
        font-size: 0.6rem;
    }
    
    .badge.fs-6 {
        font-size: 0.65rem !important;
        padding: 3px 6px;
        border-radius: 6px;
    }
    
    .group-type-badge {
        font-size: 0.7rem;
        padding: 4px 8px;
    }
    
    .group-image-round {
        width: 65px;
        height: 65px;
    }
    
    .group-image-round .default-image i {
        font-size: 1.5rem !important;
    }
    
    .featured-badge {
        bottom: 10px;
        right: 10px;
        font-size: 20px;
    }
}

@media (max-width: 576px) {
    .search-box {
        border-radius: 18px;
        padding: 2px;
        margin: 0 15px;
        max-width: 85%;
        margin-left: auto;
        margin-right: auto;
        background: rgba(255, 255, 255, 0.98);
    }
    
    .search-box .form-control {
        padding: 8px 12px;
        font-size: 0.8rem;
        border-radius: 16px;
    }
    
    .search-box .btn {
        padding: 8px 12px;
        border-radius: 16px;
        font-size: 0.75rem;
    }
    
    .search-box .btn i {
        font-size: 0.75rem;
    }
    
    .hero-section {
        padding: 1.2rem 0;
    }
    
    .hero-section h1 {
        font-size: 1.4rem;
        margin-bottom: 0.6rem;
    }
    
    .hero-section .lead {
        font-size: 0.85rem;
        margin-bottom: 1rem;
    }
    
    .groups-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 10px;
    }
    
    .group-card {
        margin-bottom: 10px;
        padding: 10px;
    }
    
    /* Aumentar ainda mais as imagens em telas muito pequenas */
    .group-image,
    .default-group-image {
        width: 70px;
        height: 70px;
    }
    
    .group-name {
        font-size: 0.85rem;
    }
    
    .btn-primary {
        padding: 3px 6px;
        font-size: 0.6rem;
        border-radius: 6px;
    }
    
    .btn-primary i {
        font-size: 0.55rem;
    }
    
    .badge.fs-6 {
        font-size: 0.6rem !important;
        padding: 2px 5px;
        border-radius: 5px;
    }
    
    .group-image-round {
        width: 70px;
        height: 70px;
    }
    
    .group-image-round .default-image i {
        font-size: 1.3rem !important;
    }
    
    .featured-badge {
        bottom: 8px;
        right: 8px;
        font-size: 18px;
    }
}

/* Mobile adjustments for group-image-round */
@media (max-width: 768px) {
    .group-image-round {
        width: 170px !important;
        height: 170px !important;
        border-radius: 20px !important;
    }
    
    .group-image-round img {
        width: 170px !important;
        height: 170px !important;
        border-radius: 20px !important;
    }
    
    .group-image-round .default-image {
        width: 170px !important;
        height: 170px !important;
        border-radius: 20px !important;
    }
    
    .group-image-round .default-image i {
        font-size: 4.2rem !important;
        color: white !important;
    }
    
    .featured-badge {
        top: 4px !important;
        left: 4px !important;
        font-size: 24px !important;
    }
}

@media (max-width: 576px) {
    .group-image-round {
        width: 160px !important;
        height: 160px !important;
        border-radius: 18px !important;
    }
    
    .group-image-round img {
        width: 160px !important;
        height: 160px !important;
        border-radius: 18px !important;
    }
    
    .group-image-round .default-image {
        width: 160px !important;
        height: 160px !important;
        border-radius: 18px !important;
    }
    
    .group-image-round .default-image i {
        font-size: 4rem !important;
        color: white !important;
    }
    
    .featured-badge {
        top: 3px !important;
        left: 3px !important;
        font-size: 22px !important;
    }
}

/* Search Box Improvements */
.search-box {
    background: rgba(255, 255, 255, 0.95);
    border-radius: 25px;
    padding: 5px;
    box-shadow: 0 3px 15px rgba(0,0,0,0.1);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.search-box .form-control {
    border: none;
    padding: 12px 20px;
    font-size: 0.95rem;
    background: transparent;
    border-radius: 20px;
}

.search-box .form-control:focus {
    box-shadow: none;
    background: transparent;
}

.search-box .btn {
    border-radius: 20px;
    padding: 12px 18px;
    border: none;
    background: linear-gradient(135deg, #007bff 0%, #0056b3 100%);
    transition: all 0.3s ease;
}

.search-box .btn:hover {
    transform: scale(1.05);
    box-shadow: 0 2px 8px rgba(0, 123, 255, 0.3);
}

.search-box .btn i {
    font-size: 0.9rem;
}

/* Mobile Search Box Improvements */
@media (max-width: 768px) {
    .search-box {
        border-radius: 20px;
        padding: 3px;
        margin: 0 20px;
        max-width: 90%;
        margin-left: auto;
        margin-right: auto;
        background: rgba(255, 255, 255, 0.98);
    }
    
    .search-box .form-control {
        padding: 10px 15px;
        font-size: 0.85rem;
        border-radius: 17px;
    }
    
    .search-box .btn {
        padding: 10px 14px;
        border-radius: 17px;
        font-size: 0.8rem;
    }
    
    .search-box .btn i {
        font-size: 0.8rem;
    }
    
    .hero-section {
        padding: 1.5rem 0;
    }
    
    .hero-section h1 {
        font-size: 1.6rem;
        margin-bottom: 0.8rem;
    }
    
    .hero-section .lead {
        font-size: 0.9rem;
        margin-bottom: 1.2rem;
    }
    
    /* Aumentar tamanho das imagens dos cards em mobile */
    .group-image,
    .default-group-image {
        width: 65px;
        height: 65px;
    }
    
    .group-name {
        font-size: 0.9rem;
        margin-bottom: 8px;
    }
    
    .group-card {
        border-radius: 12px;
        padding: 12px;
    }
    
    .btn-primary {
        padding: 4px 8px;
        font-size: 0.65rem;
        border-radius: 8px;
    }
    
    .btn-primary i {
        font-size: 0.6rem;
    }
    
    .badge.fs-6 {
        font-size: 0.65rem !important;
        padding: 3px 6px;
        border-radius: 6px;
    }
    
    .group-type-badge {
        font-size: 0.7rem;
        padding: 4px 8px;
    }
    
    .group-image-round {
        width: 65px;
        height: 65px;
    }
    
    .group-image-round .default-image i {
        font-size: 1.5rem !important;
    }
}

@media (max-width: 576px) {
    .search-box {
        border-radius: 18px;
        padding: 2px;
        margin: 0 15px;
        max-width: 85%;
        margin-left: auto;
        margin-right: auto;
        background: rgba(255, 255, 255, 0.98);
    }
    
    .search-box .form-control {
        padding: 8px 12px;
        font-size: 0.8rem;
        border-radius: 16px;
    }
    
    .search-box .btn {
        padding: 8px 12px;
        border-radius: 16px;
        font-size: 0.75rem;
    }
    
    .search-box .btn i {
        font-size: 0.75rem;
    }
    
    .hero-section {
        padding: 1.2rem 0;
    }
    
    .hero-section h1 {
        font-size: 1.4rem;
        margin-bottom: 0.6rem;
    }
    
    .hero-section .lead {
        font-size: 0.85rem;
        margin-bottom: 1rem;
    }
    
    .groups-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 10px;
    }
    
    .group-card {
        margin-bottom: 10px;
        padding: 10px;
    }
    
    /* Aumentar ainda mais as imagens em telas muito pequenas */
    .group-image,
    .default-group-image {
        width: 70px;
        height: 70px;
    }
    
    .group-name {
        font-size: 0.85rem;
    }
    
    .btn-primary {
        padding: 3px 6px;
        font-size: 0.6rem;
        border-radius: 6px;
    }
    
    .btn-primary i {
        font-size: 0.55rem;
    }
    
    .badge.fs-6 {
        font-size: 0.6rem !important;
        padding: 2px 5px;
        border-radius: 5px;
    }
    
    .group-image-round {
        width: 70px;
        height: 70px;
    }
    
    .group-image-round .default-image i {
        font-size: 1.3rem !important;
    }
}

/* Mobile adjustments for group-image-round */
@media (max-width: 768px) {
    .group-image-round {
        width: 50px;
        height: 50px;
    }
    
    .group-image-round img {
        width: 50px;
        height: 50px;
    }
    
    .group-image-round .default-image {
        width: 50px;
        height: 50px;
    }
    
    .group-image-round .default-image i {
        font-size: 1.4rem !important;
    }
}

@media (max-width: 576px) {
    .group-image-round {
        width: 45px;
        height: 45px;
    }
    
    .group-image-round img {
        width: 45px;
        height: 45px;
    }
    
    .group-image-round .default-image {
        width: 45px;
        height: 45px;
    }
    
    .group-image-round .default-image i {
        font-size: 1.2rem !important;
    }
}

/* Category Filter Mobile Improvements - Ultra Compact with Hamburger Menu */
.category-filter {
    background: #fff;
    border: 1px solid #e0e0e0;
    border-radius: 12px;
    padding: 20px;
    margin-bottom: 25px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.05);
}

/* Mobile Filter Toggle Button */
.mobile-filter-toggle {
    position: relative;
}

.mobile-filter-toggle .btn {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 16px;
    border-radius: 8px;
    font-weight: 500;
    transition: all 0.3s ease;
}

.mobile-filter-toggle .toggle-icon {
    transition: transform 0.3s ease;
    font-size: 0.9rem;
}

.mobile-filter-toggle .toggle-icon.rotated {
    transform: rotate(180deg);
}

@media (max-width: 768px) {
    /* Hide filter card by default on mobile */
    .category-filter {
        display: none !important;
        padding: 12px !important;
        margin-bottom: 15px !important;
        border-radius: 8px !important;
        box-shadow: 0 1px 6px rgba(0,0,0,0.08) !important;
        animation: slideDown 0.3s ease-out;
    }
    
    /* Show filter card when active */
    .category-filter.show {
        display: block !important;
    }
    
    .category-filter h5 {
        font-size: 0.85rem !important;
        margin-bottom: 8px !important;
        font-weight: 600 !important;
        color: #495057 !important;
    }
    
    .category-filter .form-label {
        font-size: 0.75rem !important;
        margin-bottom: 4px !important;
        font-weight: 500 !important;
        color: #6c757d !important;
    }
    
    .category-filter .form-select {
        font-size: 0.8rem !important;
        padding: 6px 8px !important;
        border-radius: 6px !important;
        border: 1px solid #dee2e6 !important;
        height: 32px !important;
        margin-bottom: 8px !important;
        background-color: #ffffff !important;
        color: #495057 !important;
    }
    
    .category-filter .form-select option {
        background-color: #ffffff !important;
        color: #495057 !important;
        padding: 8px !important;
    }
    
    .category-filter .form-select option:checked,
    .category-filter .form-select option:selected {
        background-color: #007bff !important;
        color: #ffffff !important;
    }
    
    .category-filter .form-select:focus {
        border-color: #007bff !important;
        box-shadow: 0 0 0 0.2rem rgba(0, 123, 255, 0.25) !important;
        background-color: #ffffff !important;
    }
    
    .category-filter .btn {
        font-size: 0.8rem !important;
        padding: 8px 12px !important;
        border-radius: 6px !important;
        height: 36px !important;
        margin-top: 4px !important;
    }
    
    .category-filter .row.g-3 {
        --bs-gutter-x: 0.5rem !important;
        --bs-gutter-y: 0.5rem !important;
    }
    
    /* Mobile filter toggle button styling */
    .mobile-filter-toggle .btn {
        background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
        border: 1px solid #dee2e6;
        color: #495057;
        box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    }
    
    .mobile-filter-toggle .btn:hover {
        background: linear-gradient(135deg, #e9ecef 0%, #dee2e6 100%);
        border-color: #adb5bd;
        transform: translateY(-1px);
        box-shadow: 0 4px 8px rgba(0,0,0,0.15);
    }
    
    .mobile-filter-toggle .btn:focus {
        box-shadow: 0 0 0 0.2rem rgba(13, 110, 253, 0.25);
    }
}

@media (max-width: 576px) {
    .category-filter {
        padding: 10px !important;
        margin-bottom: 12px !important;
        border-radius: 6px !important;
    }
    
    .category-filter h5 {
        font-size: 0.8rem !important;
        margin-bottom: 6px !important;
    }
    
    .category-filter .form-label {
        font-size: 0.7rem !important;
        margin-bottom: 3px !important;
    }
    
    .category-filter .form-select {
        font-size: 0.75rem !important;
        padding: 5px 6px !important;
        height: 30px !important;
        margin-bottom: 6px !important;
        background-color: #ffffff !important;
        color: #495057 !important;
    }
    
    .category-filter .form-select option {
        background-color: #ffffff !important;
        color: #495057 !important;
        padding: 6px !important;
    }
    
    .category-filter .form-select option:checked,
    .category-filter .form-select option:selected {
        background-color: #007bff !important;
        color: #ffffff !important;
    }
    
    .category-filter .form-select:focus {
        border-color: #007bff !important;
        box-shadow: 0 0 0 0.2rem rgba(0, 123, 255, 0.25) !important;
        background-color: #ffffff !important;
    }
    
    .category-filter .btn {
        font-size: 0.75rem !important;
        padding: 6px 10px !important;
        height: 32px !important;
        margin-top: 2px !important;
    }
    
    .mobile-filter-toggle .btn {
        padding: 10px 14px;
        font-size: 0.85rem;
    }
}

/* Slide down animation */
@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Reduce spacing between search and banner on mobile */
@media (max-width: 768px) {
    .search-section {
        padding: 1.5rem 0 !important;
    }
    
    .container.mt-5 {
        margin-top: 1.5rem !important;
    }
}

@media (max-width: 576px) {
    .search-section {
        padding: 1rem 0 !important;
    }
    
    .container.mt-5 {
        margin-top: 1rem !important;
    }
}

/* Banner Styles - Ultra Robust for Mobile Devices */
.banner-container,
.banner-ad,
.banner-top,
.banner-bottom,
.banner-middle {
    display: block !important;
    visibility: visible !important;
    opacity: 1 !important;
    width: 100% !important;
    height: auto !important;
    position: relative !important;
    margin: 20px auto !important;
    padding: 10px !important;
    background: #ffffff !important;
    overflow: visible !important;
    border: 1px solid #e0e0e0 !important;
    border-radius: 8px !important;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1) !important;
    max-width: 100% !important;
    min-height: 80px !important;
    z-index: 1 !important;
}

.banner-container img,
.banner-ad img,
.banner-top img,
.banner-bottom img,
.banner-middle img {
    display: block !important;
    visibility: visible !important;
    opacity: 1 !important;
    width: 100% !important;
    height: auto !important;
    max-width: 100% !important;
    min-height: 60px !important;
    object-fit: contain !important;
    border: none !important;
    outline: none !important;
    background: #f8f9fa !important;
    border-radius: 6px !important;
    margin: 0 auto !important;
    padding: 0 !important;
    image-rendering: auto !important;
    -webkit-image-smoothing: true !important;
    image-rendering: -webkit-optimize-contrast !important;
}

.banner-container a,
.banner-ad a,
.banner-top a,
.banner-bottom a,
.banner-middle a {
    display: block !important;
    width: 100% !important;
    height: 100% !important;
    text-decoration: none !important;
    border: none !important;
    outline: none !important;
}

/* Ultra Specific Mobile Banner Styles */
@media screen and (max-width: 768px) {
    .banner-container,
    .banner-ad,
    .banner-top,
    .banner-bottom,
    .banner-middle {
        display: block !important;
        visibility: visible !important;
        opacity: 1 !important;
        width: calc(100% - 20px) !important;
        margin: 15px 10px !important;
        padding: 8px !important;
        position: relative !important;
        background: #ffffff !important;
        border: 1px solid #ddd !important;
        border-radius: 6px !important;
        box-shadow: 0 2px 6px rgba(0,0,0,0.15) !important;
        min-height: 70px !important;
        max-height: none !important;
        overflow: visible !important;
        z-index: 10 !important;
    }
    
    .banner-container img,
    .banner-ad img,
    .banner-top img,
    .banner-bottom img,
    .banner-middle img {
        display: block !important;
        visibility: visible !important;
        opacity: 1 !important;
        width: 100% !important;
        height: auto !important;
        min-height: 60px !important;
        max-height: 250px !important;
        object-fit: contain !important;
        border-radius: 4px !important;
        margin: 0 !important;
        padding: 0 !important;
        background: #f5f5f5 !important;
        border: 1px solid #eee !important;
    }
}

@media screen and (max-width: 576px) {
    .banner-container,
    .banner-ad,
    .banner-top,
    .banner-bottom,
    .banner-middle {
        width: calc(100% - 16px) !important;
        margin: 12px 8px !important;
        padding: 6px !important;
        min-height: 60px !important;
        border-radius: 4px !important;
    }
    
    .banner-container img,
    .banner-ad img,
    .banner-top img,
    .banner-bottom img,
    .banner-middle img {
        min-height: 50px !important;
        max-height: 200px !important;
        border-radius: 3px !important;
    }
}

/* Force visibility for ALL banner-related elements */
[class*="banner"],
div[class*="banner"],
section[class*="banner"],
article[class*="banner"] {
    display: block !important;
    visibility: visible !important;
    opacity: 1 !important;
    position: relative !important;
    overflow: visible !important;
}

[class*="banner"] img,
div[class*="banner"] img,
section[class*="banner"] img,
article[class*="banner"] img {
    display: block !important;
    visibility: visible !important;
    opacity: 1 !important;
    width: 100% !important;
    height: auto !important;
    min-height: 40px !important;
}

/* Reduced Motion */
@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}

/* Nova Barra de Pesquisa Moderna */
.search-section {
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    border-bottom: 1px solid rgba(0,0,0,0.05);
}

.modern-search-container {
    max-width: 600px;
    margin: 0 auto;
}

.modern-search-form {
    position: relative;
}

.search-input-wrapper {
    position: relative;
    display: flex;
    align-items: center;
    background: white;
    border-radius: 50px;
    box-shadow: 0 8px 25px rgba(0,0,0,0.1);
    border: 2px solid transparent;
    transition: all 0.3s ease;
    overflow: hidden;
}

.search-input-wrapper:hover {
    box-shadow: 0 12px 35px rgba(0,0,0,0.15);
    border-color: rgba(13, 110, 253, 0.2);
}

.search-input-wrapper:focus-within {
    box-shadow: 0 12px 35px rgba(13, 110, 253, 0.2);
    border-color: #0d6efd;
    transform: translateY(-2px);
}

.search-icon {
    position: absolute;
    left: 20px;
    color: #6c757d;
    font-size: 18px;
    z-index: 2;
    transition: color 0.3s ease;
}

.search-input-wrapper:focus-within .search-icon {
    color: #0d6efd;
}

.modern-search-input {
    flex: 1;
    border: none;
    outline: none;
    padding: 18px 20px 18px 55px;
    font-size: 16px;
    background: transparent;
    color: #333;
    font-weight: 400;
}

.modern-search-input::placeholder {
    color: #adb5bd;
    font-weight: 300;
}

.modern-search-btn {
    background: linear-gradient(135deg, #0d6efd 0%, #0056b3 100%);
    border: none;
    color: white;
    padding: 18px 25px;
    border-radius: 50px;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    min-width: 60px;
    margin-right: 3px;
}

.modern-search-btn:hover {
    background: linear-gradient(135deg, #0056b3 0%, #004085 100%);
    transform: scale(1.05);
}

.modern-search-btn:active {
    transform: scale(0.98);
}

.modern-search-btn i {
    font-size: 16px;
}

/* Responsividade para a nova barra de pesquisa */
@media (max-width: 768px) {
    .search-section {
        padding: 20px 0 !important;
    }
    
    .modern-search-input {
        padding: 15px 18px 15px 50px;
        font-size: 15px;
    }
    
    .search-icon {
        left: 18px;
        font-size: 16px;
    }
    
    .modern-search-btn {
        padding: 15px 20px;
        min-width: 55px;
    }
    
    .modern-search-btn i {
        font-size: 14px;
    }
}

@media (max-width: 576px) {
    .search-section {
        padding: 15px 0 !important;
    }
    
    .modern-search-input {
        padding: 12px 15px 12px 45px;
        font-size: 14px;
    }
    
    .search-icon {
        left: 15px;
        font-size: 14px;
    }
    
    .modern-search-btn {
        padding: 12px 18px;
        min-width: 50px;
    }
    
    .modern-search-btn i {
        font-size: 13px;
    }
    
    .modern-search-input::placeholder {
        font-size: 14px;
    }
}

/* Animação de brilho para a estrela featured */
@keyframes glow-pulse {
    0% {
        filter: drop-shadow(0 0 8px #ffd700) drop-shadow(0 0 12px #ffd700) drop-shadow(0 0 16px #ffd700);
    }
    100% {
        filter: drop-shadow(0 0 12px #ffd700) drop-shadow(0 0 20px #ffd700) drop-shadow(0 0 28px #ffd700) drop-shadow(0 0 35px #ffd700);
    }
}

/* Card verde de fundo para o botão Entrar - APENAS DESKTOP - COMPACTO */
@media (min-width: 769px) {
    .card-entrar {
        background: linear-gradient(135deg, #065f46 0%, #047857 100%);
        border-radius: 8px;
        padding: 8px;
        margin: 8px 0;
        box-shadow: 0 4px 12px rgba(6, 95, 70, 0.3);
        border: 1px solid rgba(255, 255, 255, 0.1);
        position: relative;
        overflow: hidden;
        transition: all 0.3s ease;
        z-index: 5;
    }
    
    .card-entrar::before {
        content: '';
        position: absolute;
        top: 0;
        left: -100%;
        width: 100%;
        height: 100%;
        background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
        transition: left 0.5s;
    }
    
    .card-entrar:hover::before {
        left: 100%;
    }
    
    .card-entrar:hover {
        transform: translateY(-2px);
        box-shadow: 0 6px 18px rgba(6, 95, 70, 0.4);
        border-color: rgba(255, 255, 255, 0.2);
    }
    
    .card-entrar .btn-ver-grupo {
        background: transparent !important;
        border: 1px solid #ffffff !important;
        color: #ffffff !important;
        font-weight: 700 !important;
        font-size: 0.85rem !important;
        padding: 6px 12px !important;
        text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.3) !important;
        box-shadow: 0 2px 8px rgba(255, 255, 255, 0.1) !important;
        border-radius: 6px !important;
        z-index: 10 !important;
    }
    
    .card-entrar .btn-ver-grupo:hover {
        background: rgba(255, 255, 255, 0.1) !important;
        border-color: #ffffff !important;
        color: #ffffff !important;
        transform: translateY(-1px) !important;
        box-shadow: 0 3px 12px rgba(255, 255, 255, 0.2) !important;
    }
    
    .card-entrar .btn-ver-grupo i {
        color: #ffffff !important;
        text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.3) !important;
        font-size: 0.8rem !important;
    }
}

/* Para mobile e tablet - manter estilo original sem card */
@media (max-width: 768px) {
    .card-entrar {
        background: none;
        border-radius: 0;
        padding: 0;
        margin: 0;
        box-shadow: none;
        border: none;
        position: relative;
        z-index: 1;
        pointer-events: auto;
    }
    
    .card-entrar .btn-ver-grupo {
        position: relative;
        z-index: 2;
        pointer-events: auto;
        touch-action: manipulation;
    }
}