/*
Theme Name: Telegrupos
Theme URI: https://telegramgp.com.br
Author: Telegrupos
Description: Tema profissional para listagem de grupos - Estilo moderno com cards
Version: 2.0
*/

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --primary: #2b7a62;
    --primary-dark: #1e5a48;
    --primary-light: #4a9b82;
    --secondary: #ff6b35;
    --secondary-dark: #e55a2b;
    --dark: #1a1a2e;
    --gray: #6c757d;
    --gray-light: #e9ecef;
    --gray-bg: #f8f9fa;
    --white: #ffffff;
    --shadow: 0 2px 8px rgba(0,0,0,0.06);
    --shadow-hover: 0 8px 24px rgba(0,0,0,0.12);
    --radius: 16px;
    --radius-sm: 12px;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    background: #f5f7fb;
    color: var(--dark);
    line-height: 1.5;
}

.container {
    max-width: 1280px;
    margin: 0 auto;
    padding: 0 24px;
}

/* HEADER */
.header {
    background: var(--white);
    box-shadow: var(--shadow);
    position: sticky;
    top: 0;
    z-index: 1000;
}

.header-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px 0;
    gap: 24px;
    flex-wrap: wrap;
}

.logo h1 {
    font-size: 28px;
    margin: 0;
}

.logo a {
    text-decoration: none;
    color: var(--primary);
    font-weight: 800;
}

.logo span {
    color: var(--secondary);
}

/* MENU */
.nav-menu ul {
    display: flex;
    list-style: none;
    gap: 28px;
}

.nav-menu a {
    text-decoration: none;
    color: var(--dark);
    font-weight: 500;
    transition: color 0.3s;
}

.nav-menu a:hover {
    color: var(--primary);
}

/* BOTÕES HEADER */
.header-buttons {
    display: flex;
    gap: 12px;
}

.btn-outline {
    border: 2px solid var(--primary);
    background: transparent;
    color: var(--primary);
    padding: 8px 20px;
    border-radius: 30px;
    font-weight: 600;
    text-decoration: none;
    transition: all 0.3s;
}

.btn-outline:hover {
    background: var(--primary);
    color: var(--white);
}

.btn-primary {
    background: var(--primary);
    color: var(--white);
    padding: 8px 20px;
    border-radius: 30px;
    font-weight: 600;
    text-decoration: none;
    transition: background 0.3s;
}

.btn-primary:hover {
    background: var(--primary-dark);
}

/* HERO SECTION - IGUAL AO GRUPOSBRASIL */
.hero {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    padding: 60px 0;
    text-align: center;
    color: white;
    margin-bottom: 40px;
}

.hero h1 {
    font-size: 48px;
    margin-bottom: 16px;
}

.hero p {
    font-size: 18px;
    opacity: 0.9;
    max-width: 600px;
    margin: 0 auto;
}

/* LAYOUT PRINCIPAL */
.main-wrapper {
    display: flex;
    gap: 40px;
    margin: 40px 0;
}

.content-area {
    flex: 3;
}

.sidebar {
    flex: 1;
}

/* CARDS - ESTILO IGUAL AO DA IMAGEM */
.grupos-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(340px, 1fr));
    gap: 30px;
    margin-bottom: 50px;
}

.grupo-card {
    background: var(--white);
    border-radius: var(--radius);
    overflow: hidden;
    box-shadow: var(--shadow);
    transition: all 0.3s ease;
    border: 1px solid rgba(0,0,0,0.05);
}

.grupo-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-hover);
}

/* Área de imagem/cor do card */
.card-header {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    padding: 30px 20px;
    text-align: center;
    position: relative;
    min-height: 120px;
}

.card-header h3 {
    color: white;
    font-size: 22px;
    margin: 0;
    font-weight: 700;
    text-shadow: 0 1px 2px rgba(0,0,0,0.1);
}

.card-badge {
    position: absolute;
    top: 12px;
    right: 12px;
    background: rgba(255,255,255,0.2);
    backdrop-filter: blur(4px);
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 11px;
    font-weight: 600;
    color: white;
}

/* Conteúdo do card */
.card-content {
    padding: 20px;
}

.card-description {
    color: var(--gray);
    font-size: 14px;
    line-height: 1.6;
    margin-bottom: 16px;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.card-description i {
    font-style: normal;
    display: inline-block;
}

.card-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 16px;
    padding-top: 16px;
    border-top: 1px solid var(--gray-light);
}

.card-stats {
    display: flex;
    gap: 16px;
    font-size: 13px;
    color: var(--gray);
}

.card-stats span {
    display: flex;
    align-items: center;
    gap: 4px;
}

.btn-ver-grupo {
    background: transparent;
    color: var(--primary);
    padding: 8px 16px;
    border-radius: 30px;
    font-weight: 700;
    font-size: 14px;
    text-decoration: none;
    transition: all 0.3s;
    border: 1px solid var(--primary);
}

.btn-ver-grupo:hover {
    background: var(--primary);
    color: var(--white);
}

/* CATEGORIAS NA SIDEBAR - IGUAL AO GRUPOSBRASIL */
.sidebar-widget {
    background: var(--white);
    border-radius: var(--radius-sm);
    padding: 24px;
    margin-bottom: 30px;
    box-shadow: var(--shadow);
}

.widget-title {
    font-size: 18px;
    font-weight: 700;
    margin-bottom: 20px;
    padding-bottom: 12px;
    border-bottom: 2px solid var(--primary);
    display: inline-block;
}

.categorias-lista {
    list-style: none;
}

.categorias-lista li {
    margin-bottom: 12px;
}

.categorias-lista a {
    display: flex;
    justify-content: space-between;
    align-items: center;
    text-decoration: none;
    color: var(--dark);
    padding: 8px 12px;
    border-radius: 8px;
    transition: background 0.3s;
    font-weight: 500;
}

.categorias-lista a:hover {
    background: var(--gray-bg);
    color: var(--primary);
}

.categorias-lista .count {
    background: var(--gray-light);
    padding: 2px 10px;
    border-radius: 20px;
    font-size: 12px;
    color: var(--gray);
}

/* GRUPOS POPULARES */
.popular-item {
    display: flex;
    gap: 12px;
    padding: 12px 0;
    border-bottom: 1px solid var(--gray-light);
}

.popular-item:last-child {
    border-bottom: none;
}

.popular-icon {
    width: 48px;
    height: 48px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
}

.popular-info h4 {
    font-size: 15px;
    margin-bottom: 4px;
}

.popular-info h4 a {
    text-decoration: none;
    color: var(--dark);
}

.popular-info h4 a:hover {
    color: var(--primary);
}

.popular-info span {
    font-size: 12px;
    color: var(--gray);
}

/* PAGINAÇÃO */
.pagination {
    text-align: center;
    margin: 40px 0;
}

.pagination a, .pagination span {
    display: inline-block;
    padding: 10px 16px;
    margin: 0 4px;
    background: var(--white);
    border-radius: 8px;
    text-decoration: none;
    color: var(--dark);
    font-weight: 500;
    transition: all 0.3s;
}

.pagination a:hover {
    background: var(--primary);
    color: var(--white);
}

.pagination .current {
    background: var(--primary);
    color: var(--white);
}

/* SINGLE GRUPO */
.grupo-single {
    background: var(--white);
    border-radius: var(--radius);
    padding: 32px;
}

.single-header {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    padding: 40px;
    border-radius: var(--radius);
    text-align: center;
    margin-bottom: 24px;
}

.single-header h1 {
    color: white;
    font-size: 32px;
    margin-bottom: 16px;
}

.single-meta {
    display: flex;
    justify-content: center;
    gap: 24px;
    color: rgba(255,255,255,0.9);
    font-size: 14px;
}

.single-content {
    padding: 0 20px;
}

.single-content p {
    margin-bottom: 16px;
    line-height: 1.7;
}

.btn-entrar-grande {
    display: inline-block;
    background: linear-gradient(135deg, var(--secondary), var(--secondary-dark));
    color: var(--white);
    padding: 16px 48px;
    border-radius: 50px;
    font-weight: 700;
    font-size: 18px;
    text-decoration: none;
    margin-top: 24px;
    transition: transform 0.3s;
}

.btn-entrar-grande:hover {
    transform: scale(1.02);
}

/* FORMULÁRIO ENVIAR GRUPO */
.form-enviar {
    background: var(--white);
    border-radius: var(--radius);
    padding: 40px;
    max-width: 700px;
    margin: 40px auto;
}

.form-enviar h2 {
    margin-bottom: 8px;
}

.form-enviar > p {
    color: var(--gray);
    margin-bottom: 24px;
}

.form-group {
    margin-bottom: 24px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
}

.form-group input,
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 14px 16px;
    border: 2px solid var(--gray-light);
    border-radius: 12px;
    font-size: 16px;
    transition: border 0.3s;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--primary);
}

.btn-submit {
    background: var(--primary);
    color: var(--white);
    padding: 14px 32px;
    border: none;
    border-radius: 40px;
    font-size: 16px;
    font-weight: 700;
    cursor: pointer;
    transition: background 0.3s;
}

.btn-submit:hover {
    background: var(--primary-dark);
}

/* FOOTER */
.footer {
    background: var(--dark);
    color: var(--white);
    padding: 48px 0 24px;
    margin-top: 60px;
}

.footer-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 40px;
    margin-bottom: 40px;
}

.footer-col h4 {
    margin-bottom: 20px;
    font-size: 18px;
}

.footer-col ul {
    list-style: none;
}

.footer-col li {
    margin-bottom: 12px;
}

.footer-col a {
    color: #ccc;
    text-decoration: none;
    transition: color 0.3s;
}

.footer-col a:hover {
    color: var(--secondary);
}

.letters-cloud {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.letters-cloud a {
    display: inline-block;
    width: 38px;
    height: 38px;
    line-height: 38px;
    text-align: center;
    background: rgba(255,255,255,0.1);
    border-radius: 10px;
    font-weight: 700;
    transition: all 0.3s;
}

.letters-cloud a:hover {
    background: var(--primary);
}

.footer-bottom {
    text-align: center;
    padding-top: 24px;
    border-top: 1px solid rgba(255,255,255,0.1);
    font-size: 14px;
    color: #888;
}

/* ALERTAS */
.alert-success {
    background: #d4edda;
    color: #155724;
    padding: 15px 20px;
    border-radius: 12px;
    margin-bottom: 24px;
}

.alert-error {
    background: #f8d7da;
    color: #721c24;
    padding: 15px 20px;
    border-radius: 12px;
    margin-bottom: 24px;
}

/* RESPONSIVO */
@media (max-width: 768px) {
    .container {
        padding: 0 16px;
    }
    
    .header-content {
        flex-direction: column;
        text-align: center;
    }
    
    .nav-menu ul {
        flex-direction: column;
        gap: 12px;
        align-items: center;
    }
    
    .main-wrapper {
        flex-direction: column;
    }
    
    .grupos-grid {
        grid-template-columns: 1fr;
    }
    
    .hero h1 {
        font-size: 32px;
    }
    
    .single-header {
        padding: 24px;
    }
    
    .single-header h1 {
        font-size: 24px;
    }
    
    .single-meta {
        flex-direction: column;
        gap: 8px;
    }
    
    .form-enviar {
        padding: 24px;
    }
}

/* ANIMAÇÕES */
@keyframes fadeIn {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

.grupo-card {
    animation: fadeIn 0.5s ease forwards;
}