/* ============================================================
   Estilos extraídos de src/views/corretores/index.php
   ============================================================ */

/* ========================================
   CORRETORES PAGE - PREMIUM REDESIGN
   ======================================== */

/* Hero Section */
.corretores-hero {
    position: relative;
    background: linear-gradient(135deg, #14483a 0%, #2d3748 50%, #1a202c 100%);
    /* Padding ajustado para compensar header fixo */
    padding: 120px 0 140px;
    padding-top: calc(60px + 60px); /* header height + espaçamento */
    margin-top: -60px; /* Compensar header sticky */
    overflow: hidden;
}

.hero-bg-pattern {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-image: 
        radial-gradient(circle at 20% 80%, rgba(78, 125, 52, 0.15) 0%, transparent 50%),
        radial-gradient(circle at 80% 20%, rgba(78, 125, 52, 0.1) 0%, transparent 50%);
    pointer-events: none;
}

.hero-content {
    position: relative;
    z-index: 2;
    text-align: center;
    max-width: 800px;
    margin: 0 auto;
}

.hero-badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    padding: 8px 20px;
    border-radius: 50px;
    color: #a0e6ba;
    font-size: 0.9rem;
    font-weight: 500;
    margin-bottom: 24px;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.hero-title {
    /* Mesma fonte de display da home e do Sobre — sem ela esta página caía na sans
       pesada e destoava do resto do site. */
    font-family: var(--font-display, 'Playfair Display', Georgia, serif);
    font-size: clamp(2.5rem, 5vw, 4rem);
    font-weight: 800;
    color: white;
    margin-bottom: 20px;
    line-height: 1.1;
}

.text-gradient {
    background: linear-gradient(135deg, #8dbd65 0%, #2d8b6e 50%, #1a5f4a 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.hero-subtitle {
    font-size: 1.15rem;
    color: rgba(255, 255, 255, 0.8);
    line-height: 1.7;
    margin-bottom: 40px;
}

.hero-stats {
    display: flex;
    justify-content: center;
    gap: 24px;
    flex-wrap: wrap;
}

.stat-card {
    display: flex;
    align-items: center;
    gap: 14px;
    background: rgba(255, 255, 255, 0.08);
    backdrop-filter: blur(10px);
    padding: 16px 24px;
    border-radius: 16px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    transition: all 0.3s ease;
}

.stat-card:hover {
    background: rgba(255, 255, 255, 0.12);
    transform: translateY(-4px);
}

.stat-icon {
    width: 48px;
    height: 48px;
    background: linear-gradient(135deg, #2d8b6e 0%, #1a5f4a 100%);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 1.2rem;
}

.stat-info {
    display: flex;
    flex-direction: column;
}

.stat-number {
    font-size: 1.5rem;
    font-weight: 700;
    color: white;
}

.stat-label {
    font-size: 0.85rem;
    color: rgba(255, 255, 255, 0.7);
}

.hero-wave {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    line-height: 0;
}

.hero-wave svg {
    width: 100%;
    height: 80px;
}

/* Search Section */
.search-section {
    margin-top: -60px;
    position: relative;
    z-index: 10;
    padding-bottom: 40px;
}

.search-card {
    background: white;
    border-radius: 20px;
    padding: 32px 40px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.1);
}

.search-header {
    text-align: center;
    margin-bottom: 24px;
}

.search-header h2 {
    font-size: 1.3rem;
    font-weight: 600;
    color: #14483a;
    margin-bottom: 4px;
}

.search-header h2 i {
    color: #2d8b6e;
    margin-right: 8px;
}

.search-header p {
    color: #64748b;
    font-size: 0.95rem;
}

.search-form {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
}

.search-input-group,
.search-select-group {
    position: relative;
}

.search-input-group i,
.search-select-group i {
    position: absolute;
    left: 16px;
    top: 50%;
    transform: translateY(-50%);
    color: #94a3b8;
    font-size: 1rem;
}

.search-input-group input,
.search-select-group select {
    width: 100%;
    padding: 14px 16px 14px 48px;
    border: 2px solid #e2e8f0;
    border-radius: 12px;
    font-size: 1rem;
    transition: all 0.3s ease;
    background: #f8fafc;
}

.search-input-group input:focus,
.search-select-group select:focus {
    outline: none;
    border-color: #2d8b6e;
    background: white;
    box-shadow: 0 0 0 4px rgba(45, 139, 110, 0.1);
}

/* Stats Section */
.stats-section {
    padding: 0 0 40px;
}

.stats-toggle-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    width: 100%;
    padding: 16px 32px;
    background: linear-gradient(135deg, #14483a 0%, #2d3748 100%);
    color: white;
    border: none;
    border-radius: 12px;
    font-size: 1rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
}

.stats-toggle-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(20, 72, 58, 0.3);
}

.stats-toggle-btn .toggle-icon {
    transition: transform 0.3s ease;
}

.stats-toggle-btn.active .toggle-icon {
    transform: rotate(180deg);
}

.stats-content {
    display: none;
    margin-top: 24px;
}

.stats-content.show {
    display: block;
    animation: slideDown 0.4s ease;
}

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

.stats-grid {
    display: grid;
    grid-template-columns: 1.5fr 1fr;
    gap: 24px;
}

.stats-chart-card {
    background: white;
    border-radius: 16px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
    overflow: hidden;
}

.chart-header {
    background: linear-gradient(135deg, #14483a 0%, #2d3748 100%);
    padding: 16px 24px;
}

.chart-header h3 {
    color: white;
    font-size: 1rem;
    font-weight: 600;
    margin: 0;
}

.chart-header h3 i {
    margin-right: 8px;
    color: #8dbd65;
}

.chart-body {
    padding: 24px;
    height: 280px;
}

/* Corretores Section */
.corretores-section {
    padding: 40px 0 80px;
    background: #f8fafc;
}

.section-header {
    text-align: center;
    margin-bottom: 40px;
}

.section-badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: linear-gradient(135deg, #e6fffa 0%, #c6f6d5 100%);
    padding: 8px 20px;
    border-radius: 50px;
    color: #276749;
    font-size: 0.85rem;
    font-weight: 600;
    margin-bottom: 16px;
}

.section-badge.featured {
    background: linear-gradient(135deg, #fef3c7 0%, #fde68a 100%);
    color: #92400e;
}

.section-badge.featured i {
    color: #d97706;
}

.section-header h2 {
    font-size: 2rem;
    font-weight: 700;
    color: #14483a;
    margin-bottom: 8px;
}

.section-header p {
    color: #64748b;
    font-size: 1.05rem;
}

/* Corretores Grid */
.corretores-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 28px;
}

.featured-grid {
    grid-template-columns: repeat(auto-fill, minmax(360px, 1fr));
}

/* Corretor Card */
.corretor-card {
    background: white;
    border-radius: 20px;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.06);
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    animation: fadeInUp 0.6s ease forwards;
    opacity: 0;
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.corretor-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.12);
}

.corretor-card.featured {
    border: 2px solid transparent;
    background: linear-gradient(white, white) padding-box,
                linear-gradient(135deg, #fbbf24 0%, #f59e0b 100%) border-box;
}

.card-featured-badge {
    position: absolute;
    top: 16px;
    right: 16px;
    width: 40px;
    height: 40px;
    background: linear-gradient(135deg, #fbbf24 0%, #f59e0b 100%);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 1rem;
    z-index: 5;
    box-shadow: 0 4px 12px rgba(245, 158, 11, 0.4);
}

.card-image {
    position: relative;
    height: 220px;
    overflow: hidden;
}

.card-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.corretor-card:hover .card-image img {
    transform: scale(1.08);
}

.avatar-placeholder {
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, #e2e8f0 0%, #cbd5e1 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 4rem;
    color: #94a3b8;
}

.card-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(to top, rgba(20, 72, 58, 0.9) 0%, transparent 60%);
    display: flex;
    align-items: flex-end;
    justify-content: center;
    padding: 20px;
    opacity: 0;
    transition: opacity 0.4s ease;
}

.corretor-card:hover .card-overlay {
    opacity: 1;
}

.overlay-btn {
    background: white;
    color: #14483a;
    padding: 10px 24px;
    border-radius: 50px;
    font-weight: 600;
    font-size: 0.9rem;
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: 8px;
    transform: translateY(20px);
    transition: all 0.4s ease;
}

.corretor-card:hover .overlay-btn {
    transform: translateY(0);
}

.overlay-btn:hover {
    background: #2d8b6e;
    color: white;
}

.card-content {
    padding: 24px;
    /* Ancora stats + ações na base do card para alinhar as colunas do grid */
    flex: 1;
    display: flex;
    flex-direction: column;
}

.corretor-name {
    font-size: 1.25rem;
    font-weight: 700;
    color: #14483a;
    margin-bottom: 6px;
}

.corretor-creci {
    display: flex;
    align-items: center;
    gap: 6px;
    color: #64748b;
    font-size: 0.9rem;
    margin-bottom: 14px;
}

.corretor-creci i {
    color: #2d8b6e;
}

.corretor-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-bottom: 16px;
}

.corretor-tags .tag {
    background: linear-gradient(135deg, #e6fffa 0%, #c6f6d5 100%);
    color: #276749;
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 500;
}

/* Indicador de especialidades não exibidas (+N) */
.corretor-tags .tag-more {
    background: #f1f5f9;
    color: #64748b;
    cursor: help;
}

.corretor-stats {
    display: flex;
    gap: 16px;
    padding: 12px 0;
    border-top: 1px solid #f1f5f9;
    border-bottom: 1px solid #f1f5f9;
    margin-bottom: 16px;
    margin-top: auto;
}

.corretor-stats .stat-item {
    display: flex;
    align-items: center;
    gap: 6px;
    color: #64748b;
    font-size: 0.9rem;
}

.corretor-stats .stat-item i {
    color: #2d8b6e;
}

.card-actions {
    display: flex;
    align-items: center;
    gap: 10px;
}

.btn-whatsapp {
    width: 42px;
    height: 42px;
    background: linear-gradient(135deg, #25d366 0%, #128c7e 100%);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 1.2rem;
    text-decoration: none;
    transition: all 0.3s ease;
}

.btn-whatsapp:hover {
    transform: scale(1.1);
    box-shadow: 0 4px 16px rgba(37, 211, 102, 0.4);
}

.btn-profile {
    flex: 1;
    background: linear-gradient(135deg, #14483a 0%, #2d3748 100%);
    color: white;
    padding: 12px 20px;
    border-radius: 10px;
    text-decoration: none;
    font-weight: 600;
    font-size: 0.9rem;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    transition: all 0.3s ease;
}

.btn-profile:hover {
    transform: translateX(4px);
    background: linear-gradient(135deg, #2d3748 0%, #14483a 100%);
    color: white;
}

.btn-imoveis {
    width: 42px;
    height: 42px;
    background: #f1f5f9;
    border: none;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #64748b;
    font-size: 1rem;
    cursor: pointer;
    transition: all 0.3s ease;
}

.btn-imoveis:hover {
    background: #d7f2e6;
    color: #14483a;
    transform: translateY(-2px);
    box-shadow: 0 4px 10px rgba(20, 72, 58, 0.12);
}

/* Empty State */
.empty-state {
    text-align: center;
    padding: 80px 40px;
    background: white;
    border-radius: 20px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.06);
}

.empty-icon {
    width: 100px;
    height: 100px;
    background: linear-gradient(135deg, #fee2e2 0%, #fecaca 100%);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 24px;
    font-size: 2.5rem;
    color: #dc2626;
}

.empty-state h3 {
    font-size: 1.5rem;
    color: #14483a;
    margin-bottom: 8px;
}

.empty-state p {
    color: #64748b;
    margin-bottom: 24px;
}

.btn-reset {
    background: linear-gradient(135deg, #2d8b6e 0%, #1a5f4a 100%);
    color: white;
    border: none;
    padding: 12px 28px;
    border-radius: 10px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
}

.btn-reset:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(45, 139, 110, 0.3);
}

/* CTA Section */
.cta-section {
    padding: 0 0 80px;
    background: #f8fafc;
}

.cta-card {
    background: linear-gradient(135deg, #14483a 0%, #2d3748 100%);
    border-radius: 24px;
    padding: 48px 60px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 40px;
    position: relative;
    overflow: hidden;
}

.cta-card::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -20%;
    width: 400px;
    height: 400px;
    background: radial-gradient(circle, rgba(45, 139, 110, 0.15) 0%, transparent 70%);
    pointer-events: none;
}

.cta-content h2 {
    font-size: 1.8rem;
    color: white;
    margin-bottom: 8px;
}

.cta-content p {
    color: rgba(255, 255, 255, 0.8);
    font-size: 1.05rem;
}

.cta-btn {
    background: linear-gradient(135deg, #2d8b6e 0%, #1a5f4a 100%);
    color: white;
    padding: 16px 36px;
    border-radius: 12px;
    text-decoration: none;
    font-weight: 600;
    font-size: 1rem;
    display: flex;
    align-items: center;
    gap: 10px;
    white-space: nowrap;
    transition: all 0.3s ease;
}

.cta-btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 12px 30px rgba(45, 139, 110, 0.4);
    color: white;
}

/* Modal Styles */
.modal-content {
    border: none;
    border-radius: 20px;
    overflow: hidden;
}

.modal-header {
    background: linear-gradient(135deg, #14483a 0%, #2d3748 100%);
    padding: 20px 28px;
    border: none;
}

.modal-title-wrapper {
    display: flex;
    align-items: center;
    gap: 12px;
    color: white;
}

.modal-title-wrapper i {
    color: #8dbd65;
    font-size: 1.3rem;
}

.modal-title {
    color: white;
    font-weight: 600;
    margin: 0;
}

.modal-close {
    background: rgba(255, 255, 255, 0.1);
    border: none;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    cursor: pointer;
    transition: all 0.3s ease;
}

.modal-close:hover {
    background: rgba(255, 255, 255, 0.2);
}

.modal-body {
    padding: 28px;
    min-height: 300px;
}

.modal-loading {
    display: none;
    text-align: center;
    padding: 60px;
}

.modal-loading.show {
    display: block;
}

.loading-spinner {
    width: 50px;
    height: 50px;
    border: 4px solid #e2e8f0;
    border-top-color: #2d8b6e;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin: 0 auto 16px;
}

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

.modal-empty {
    display: none;
    text-align: center;
    padding: 60px;
}

.modal-empty.show {
    display: block;
}

.modal-empty i {
    font-size: 4rem;
    color: #cbd5e1;
    margin-bottom: 16px;
}

.imoveis-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 20px;
}

.modal-footer {
    padding: 16px 28px;
    border-top: 1px solid #e2e8f0;
    display: flex;
    justify-content: flex-end;
    gap: 12px;
}

.btn-modal-close {
    background: #f1f5f9;
    color: #64748b;
    border: none;
    padding: 10px 24px;
    border-radius: 8px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
}

.btn-modal-close:hover {
    background: #e2e8f0;
}

.btn-modal-action {
    background: linear-gradient(135deg, #2d8b6e 0%, #1a5f4a 100%);
    color: white;
    padding: 10px 24px;
    border-radius: 8px;
    text-decoration: none;
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 8px;
    transition: all 0.3s ease;
}

.btn-modal-action:hover {
    transform: translateY(-2px);
    color: white;
}

/* Responsive */
@media (max-width: 991px) {
    .hero-title {
        font-size: 2.5rem;
    }
    
    .hero-stats {
        gap: 16px;
    }
    
    .stat-card {
        padding: 12px 18px;
    }
    
    .search-form {
        grid-template-columns: 1fr;
    }
    
    .stats-grid {
        grid-template-columns: 1fr;
    }
    
    .cta-card {
        flex-direction: column;
        text-align: center;
        padding: 40px 32px;
    }
}

@media (max-width: 767px) {
    .corretores-hero {
        padding: 100px 0 80px;
        padding-top: calc(56px + 40px); /* header height smaller + espaçamento */
        margin-top: -56px;
    }
    
    .hero-stats {
        flex-direction: column;
        align-items: center;
    }
    
    .stat-card {
        width: 100%;
        max-width: 280px;
    }
    
    .corretores-grid {
        grid-template-columns: 1fr;
    }
    
    .section-header h2 {
        font-size: 1.6rem;
    }
}
