/*
Theme Name:   Telegram Directory Theme
Theme URI:    https://example.com/telegram-directory-theme/
Description:  Hello Elementor Child Theme for a Telegram Groups Directory
Author:       AI Assistant
Author URI:   https://example.com
Template:     hello-elementor
Version:      1.0.0
Text Domain:  telegram-directory-theme
*/

/* Reset and Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Roboto', sans-serif;
    background-color: #e9ecef !important; /* Off-white clarinho para o tema todo */
    color: #333;
    line-height: 1.6;
}

/* Container */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 15px;
}

/* Header */
.header {
    background-color: #007bff;
    /* Bright Blue */
    color: white;
    padding: 10px 0;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
}

.header-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    font-size: 20px;
    font-weight: 700;
    display: flex;
    align-items: center;
    gap: 8px;
    color: white;
    text-decoration: none;
}

.logo i {
    font-size: 24px;
}

.mobile-menu-btn {
    display: none;
}

.mobile-search-btn {
    display: none;
}

/* ===== Search Bar - Correção ===== */
.search-bar {
    flex: 1;
    max-width: 480px;
    margin: 0 20px;
}

.search-form {
    display: flex;
    align-items: center;
    width: 100%;
    position: relative;
    background: #f1f1f1;
    border-radius: 50px;
    overflow: hidden;
    border: 1px solid #ddd;
}

.search-input {
    flex: 1;
    border: none;
    background: transparent;
    padding: 12px 20px;
    font-size: 15px;
    outline: none;
    width: 100%;
    color: #333;
}

.search-input::placeholder {
    color: #888;
}

.search-btn {
    background: #007bff;
    /* cor do Telegram */
    border: none;
    color: white;
    width: 48px;
    height: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: background 0.2s;
    flex-shrink: 0;
}

.search-btn:hover {
    background: #0056b3;
}

/* Mobile */
@media (max-width: 768px) {
    .search-bar {
        order: 3;
        width: 100%;
        max-width: 100%;
        margin: 10px 0 0 0;
        padding: 0 10px;
    }

    .header-content {
        flex-wrap: wrap;
    }
}

.header-actions {
    display: flex;
    gap: 10px;
}

.btn {
    font-family: inherit;
}

.btn-outline {
    background: transparent;
    border: 1px solid rgba(255, 255, 255, 0.4);
    color: white;
    padding: 8px 15px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 13px;
    display: flex;
    align-items: center;
    gap: 6px;
    transition: background 0.2s;
}

.btn-outline:hover {
    background: rgba(255, 255, 255, 0.1);
}

/* Banners */
.top-banner-container {
    text-align: center;
    padding: 20px 0;
}

.banner {
    background-color: #e0e0e0;
    border: 1px dashed #999;
    color: #666;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    font-size: 14px;
    color: #999;
}

.top-banner {
    width: 280px;
    height: auto;
    margin: 0 auto;
    max-width: 100%;
}

@media (max-width: 768px) {
    .top-banner {
        width: 70%;
    }
}

/* Main Layout */
.main-container {
    display: flex;
    gap: 30px;
    padding-bottom: 50px;
}

.content-left {
    flex: 1;
}

.sidebar-right {
    width: 300px;
    flex-shrink: 0;
}

/* Typography & Intro */
.intro-section {
    margin-bottom: 25px;
}

.intro-section h1 {
    font-size: 20px;
    color: #007bff;
    margin-bottom: 5px;
}

.intro-section p {
    font-size: 13px;
    color: #555;
    margin-bottom: 20px;
}

.section-subtitle {
    font-size: 16px;
    color: #007bff;
    font-weight: 700;
    margin-bottom: 15px;
}

/* Groups Grid */
.groups-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 15px;
    margin-bottom: 30px;
}

/* Card */
.card {
    background: white;
    border-radius: 8px;
    padding: 20px 15px;
    text-align: center;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
    display: flex;
    flex-direction: column;
    align-items: center;
    transition: transform 0.2s;
}

.card:hover {
    transform: translateY(-2px);
    box-shadow: 0 3px 8px rgba(0, 0, 0, 0.15);
}

.card-avatar {
    width: 90px;
    height: 90px;
    border-radius: 50%;
    margin-bottom: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 38px;
    color: white;
    font-weight: 500;
    overflow: hidden;
}

.card-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* Color palettes for letter avatars */
.bg-blue {
    background-color: #3f51b5;
}

.bg-orange {
    background-color: #f39c12;
}

.bg-red {
    background-color: #e74c3c;
}

.bg-purple {
    background-color: #9c27b0;
}

.bg-green {
    background-color: #4caf50;
}

.bg-teal {
    background-color: #00bcd4;
}

.card-title {
    font-size: 15px;
    font-weight: 700;
    color: #333;
    margin-bottom: 5px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    width: 100%;
}

.card-category {
    font-size: 13px;
    color: #777;
    margin-bottom: 15px;
    flex-grow: 1;
}

.btn-details {
    background-color: #007bff;
    color: white;
    border: none;
    padding: 10px 15px;
    border-radius: 4px;
    font-size: 13px;
    font-weight: bold;
    cursor: pointer;
    text-transform: uppercase;
    width: 100%;
    transition: background-color 0.2s;
    text-decoration: none;
    display: inline-block;
}

.btn-details:hover {
    background-color: #0056b3;
}

/* Pagination */
.pagination {
    display: flex;
    justify-content: center;
    gap: 10px;
    margin-bottom: 30px;
}

.btn-page {
    padding: 6px 15px;
    border: 1px solid #ddd;
    background: #e9e9e9;
    color: #555;
    border-radius: 4px;
    cursor: pointer;
    font-size: 13px;
    font-weight: 500;
    text-decoration: none;
}

.btn-page.active {
    background-color: #007bff;
    color: white;
    border-color: #007bff;
}

/* Info Block */
.info-block {
    background: white;
    padding: 25px;
    border-radius: 8px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.info-block h2 {
    font-size: 16px;
    color: #007bff;
    margin-bottom: 12px;
}

.info-block h3 {
    font-size: 15px;
    color: #007bff;
    margin-top: 25px;
    margin-bottom: 12px;
}

.info-block p {
    font-size: 13px;
    color: #444;
    margin-bottom: 12px;
}

.tags-container {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-bottom: 20px;
}

.tag {
    background-color: #f0f8ff;
    color: #007bff;
    border: 1px solid #cce5ff;
    padding: 6px 12px;
    border-radius: 20px;
    font-size: 12px;
    text-decoration: none;
    transition: all 0.2s;
}

.tag:hover {
    background-color: #007bff;
    color: white;
}

/* Categorias Grid (SEO Internal Links) */
.categories-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 15px;
    margin-bottom: 30px;
}

.category-card-link {
    background: white;
    border-radius: 6px;
    padding: 15px;
    text-align: center;
    text-decoration: none;
    color: #333;
    font-weight: 600;
    font-size: 14px;
    border: 1px solid #ddd;
    transition: all 0.2s;
    display: block;
    box-shadow: 0 2px 4px rgba(0,0,0,0.05);
}

.category-card-link:hover {
    border-color: #007bff;
    color: #007bff;
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0,0,0,0.1);
}

.faq-item {
    margin-bottom: 15px;
}

.faq-item h4 {
    font-size: 13px;
    color: #333;
    margin-bottom: 4px;
    font-weight: 700;
}

.faq-item p {
    font-size: 12px;
    color: #555;
    margin-bottom: 0;
}

/* Sidebar */
.sidebar-widget {
    background: white;
    border-radius: 8px;
    padding: 20px;
    margin-bottom: 20px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.sidebar-widget.no-padding {
    padding: 0;
    overflow: hidden;
}

.widget-title {
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    color: #333;
    border-bottom: 1px solid #eee;
    padding-bottom: 10px;
    margin-bottom: 15px;
    letter-spacing: 0.5px;
}

.text-center {
    text-align: center;
}

.partner-logo {
    padding: 10px 0;
}

.partner-links {
    list-style: none;
}

.partner-links li {
    margin-bottom: 8px;
}

.partner-links a {
    color: #007bff;
    text-decoration: none;
    font-size: 13px;
}

.partner-links a:hover {
    text-decoration: underline;
}

.sidebar-banner {
    width: 300px;
    height: 250px;
}

/* Footer */
.footer {
    background-color: #243447;
    color: #999;
    text-align: center;
    padding: 40px 20px 20px;
}

.footer a {
    color: #ccc;
    text-decoration: none;
    font-size: 12px;
    transition: color 0.2s;
}

.footer a:hover {
    color: white;
}

.footer-links {
    margin-bottom: 20px;
}

.separator {
    margin: 0 10px;
    color: #f39c12;
}

.footer-subtitle {
    font-size: 13px;
    color: white;
    margin-bottom: 15px;
    font-weight: bold;
}

.footer-bottom-links {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 15px;
    margin-bottom: 25px;
}

.copyright {
    font-size: 11px;
    color: #666;
    border-top: 1px solid #334;
    padding-top: 20px;
}

/* Responsive */
@media (max-width: 992px) {
    .groups-grid {
        grid-template-columns: repeat(3, 1fr);
    }

    .main-container {
        flex-direction: column;
    }

    .sidebar-right {
        width: 100%;
        display: flex;
        flex-wrap: wrap;
        gap: 20px;
    }

    .sidebar-widget {
        flex: 1;
        min-width: 250px;
        margin-bottom: 0;
    }
}

@media (max-width: 768px) {
    .groups-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 12px;
    }

    .header-content {
        display: grid;
        grid-template-columns: auto 1fr auto;
        align-items: center;
        gap: 10px;
        position: relative;
    }

    .mobile-menu-btn, .mobile-search-btn {
        display: block;
        background: white;
        color: #333;
        border: none;
        padding: 8px 12px;
        border-radius: 4px;
        font-size: 16px;
        cursor: pointer;
        display: flex;
        align-items: center;
        justify-content: center;
        width: 36px;
        height: 36px;
    }

    .logo {
        font-size: 18px;
        justify-content: center;
        text-align: center;
    }

    .search-bar {
        position: absolute;
        top: 100%;
        left: 0;
        width: 100%;
        padding: 10px 15px;
        background: #007bff;
        display: none;
        z-index: 100;
        margin: 0;
        border-top: 1px solid rgba(255,255,255,0.2);
    }
    
    .search-bar.active {
        display: block;
    }

    .header-actions {
        display: flex;
        grid-column: 1 / -1;
        justify-content: center;
        margin-top: 10px;
    }

    .header-actions .btn-login {
        display: none;
    }
    
    .header-actions .btn-create {
        padding: 8px 30px;
        font-size: 14px;
        background: #006ce6;
        border: none;
        border-radius: 4px;
    }

    .intro-section {
        text-align: center;
    }

    .card {
        padding: 15px 10px;
    }

    .card-avatar {
        width: 70px;
        height: 70px;
        font-size: 28px;
        margin-bottom: 10px;
    }

    .card-title {
        font-size: 14px;
    }

    .card-category {
        font-size: 12px;
    }

    .btn-details {
        font-size: 12px;
        padding: 8px 10px;
    }
}

@media (max-width: 480px) {
    .groups-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

/* Mobile Sidebar */
.mobile-sidebar-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    z-index: 9998;
    display: none;
    opacity: 0;
    transition: opacity 0.3s;
}

.mobile-sidebar-overlay.active {
    display: block;
    opacity: 1;
}

.mobile-sidebar {
    position: fixed;
    top: 0;
    left: -300px;
    width: 280px;
    height: 100%;
    background: white;
    z-index: 9999;
    transition: left 0.3s;
    box-shadow: 2px 0 5px rgba(0, 0, 0, 0.2);
    display: flex;
    flex-direction: column;
}

.mobile-sidebar.active {
    left: 0;
}

.mobile-sidebar-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px;
    border-bottom: 1px solid #eee;
}

.mobile-sidebar-header .logo {
    font-size: 18px;
    font-weight: bold;
}

.close-sidebar-btn {
    background: none;
    border: none;
    font-size: 24px;
    color: #333;
    cursor: pointer;
}

.mobile-sidebar-content {
    padding: 20px;
    overflow-y: auto;
}

.mobile-sidebar-actions {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-bottom: 25px;
}

.btn-sidebar {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 10px 15px;
    border-radius: 4px;
    font-size: 14px;
    text-decoration: none;
    font-weight: bold;
}

.btn-sidebar.btn-create {
    background-color: #007bff;
    color: white;
    border: 1px solid #007bff;
}

.btn-sidebar.btn-login {
    background-color: white;
    color: #007bff;
    border: 1px solid #007bff;
}

.mobile-sidebar-categories h3 {
    font-size: 16px;
    color: #333;
    margin-bottom: 15px;
    border-bottom: 1px solid #eee;
    padding-bottom: 5px;
}

.mobile-sidebar-categories ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.mobile-sidebar-categories ul li {
    margin-bottom: 10px;
}

.mobile-sidebar-categories ul li a {
    color: #555;
    text-decoration: none;
    font-size: 14px;
    display: block;
    padding: 5px 0;
}

.mobile-sidebar-categories ul li a:hover {
    color: #007bff;
}

/* =====================================================
   AUTH PAGE & SUBMIT GROUP (LOGIN, CADASTRO, ENVIAR)
   ===================================================== */
.auth-page-wrapper {
    background-image: url('data:image/svg+xml;utf8,<svg width="40" height="40" viewBox="0 0 40 40" xmlns="http://www.w3.org/2000/svg"><path d="M20 20.5V18H0v-2h20v-2H0v-2h20v-2H0V8h20V6H0V4h20V2H0V0h22v20h2V0h2v20h2V0h2v20h2V0h2v20h2V0h2v20h2v2H20v-1.5z" fill="%23c2c2c2" fill-opacity="0.1" fill-rule="evenodd"/></svg>');
    background-color: #e9ecef !important;
    padding: 60px 15px;
    min-height: calc(100vh - 200px);
    display: flex;
    justify-content: center;
    align-items: flex-start;
}

.auth-container {
    width: 100%;
    max-width: 450px;
    margin: 0 auto;
}

.auth-form-box {
    background: #ffffff;
    border-radius: 8px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.05);
    padding: 40px;
    width: 100%;
}

.auth-title {
    text-align: center;
    color: #333;
    font-size: 24px;
    margin-bottom: 25px;
    font-weight: 700;
}

.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    color: #333;
    font-weight: 600;
    font-size: 14px;
}

.form-group input,
.form-group select {
    width: 100%;
    padding: 12px 15px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 14px;
    color: #333;
    background-color: #fcfcfc;
    transition: border-color 0.2s;
}

.form-group input:focus,
.form-group select:focus {
    outline: none;
    border-color: #007bff;
    background-color: #fff;
}

.btn-auth {
    width: 100%;
    background-color: #007bff;
    color: white;
    border: none;
    padding: 14px;
    border-radius: 4px;
    font-size: 16px;
    font-weight: 700;
    cursor: pointer;
    transition: background-color 0.2s;
    margin-top: 10px;
}

.btn-auth:hover {
    background-color: #0056b3;
}

.auth-links {
    margin-top: 25px;
    text-align: center;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.auth-links a {
    color: #cc0000;
    text-decoration: none;
    font-size: 14px;
}

.auth-links a:hover {
    text-decoration: underline;
}

.auth-error {
    margin-top: 20px;
    padding: 12px;
    background-color: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
    border-radius: 4px;
    text-align: center;
    font-size: 14px;
}