/* ============================================
   RESET E BASE
   ============================================ */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background-color: var(--bg-card);
    color: var(--text-primary);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

/* ============================================
   TOP BAR (navegação institucional)
   ============================================ */
.top-bar {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    background: var(--bg-card);
    padding: 12px 24px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    z-index: 100;
    border-bottom: 1px solid var(--border-light);
}

.top-bar-logo {
    display: flex;
    align-items: center;
    gap: 8px;
    text-decoration: none;
}

.top-bar-logo i {
    font-size: 1.3rem;
    color: var(--primary);
}

.top-bar-logo span {
    font-size: 1.2rem;
    font-weight: 700;
    color: var(--primary);
}

.top-bar-links {
    display: flex;
    align-items: center;
    gap: 24px;
}

.top-bar-links a {
    color: var(--text-secondary);
    text-decoration: none;
    font-size: 0.9rem;
    transition: color 0.2s;
}

.top-bar-links a:hover {
    color: var(--primary);
}

.top-bar-links .btn-login {
    background: var(--primary);
    color: var(--text-on-primary);
    padding: 8px 20px;
    border-radius: 6px;
    font-weight: 500;
}

.top-bar-links .btn-login:hover {
    background: var(--primary-hover);
    color: var(--text-on-primary);
}

/* ============================================
   CONTAINER PRINCIPAL
   ============================================ */
.container {
    width: 100%;
    max-width: 720px;
    margin: 0 auto;
    padding: 0 20px;
}

/* ============================================
   HEADER (após pesquisa)
   ============================================ */
.header {
    padding: 20px 0;
    border-bottom: 1px solid var(--divider);
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    background: var(--bg-card);
    z-index: 99;
}

.header.visible {
    display: block;
}

.header-content {
    display: flex;
    align-items: center;
    gap: 30px;
    max-width: 900px;
    margin: 0 auto;
    padding: 0 20px;
}

.header .logo {
    display: flex;
    align-items: center;
    gap: 10px;
    text-decoration: none;
    flex-shrink: 0;
}

.header .logo-icon {
    font-size: 1.8rem;
    color: var(--primary);
}

.header .logo-text {
    font-size: 1.4rem;
    font-weight: 700;
    color: var(--primary);
}

.header .search-box {
    flex: 1;
    max-width: 560px;
}

.header .search-input-wrapper {
    display: flex;
    align-items: center;
    border: 1px solid var(--border-color);
    border-radius: 24px;
    padding: 8px 16px;
    background: var(--bg-input);
    transition: box-shadow 0.2s, border-color 0.2s;
}

.header .search-input-wrapper:focus-within {
    border-color: var(--primary);
    box-shadow: 0 2px 8px var(--primary-light);
}

.header .search-input {
    flex: 1;
    border: none;
    outline: none;
    font-size: 0.95rem;
    padding: 4px 8px;
    background: transparent;
    color: var(--text-primary);
}

.header .search-btn {
    background: none;
    border: none;
    color: var(--primary);
    cursor: pointer;
    padding: 4px 8px;
    font-size: 1rem;
}

/* ============================================
   ÁREA DE PESQUISA INICIAL (estilo Google)
   ============================================ */
.search-home {
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    padding: 40px 20px;
    padding-top: 80px;
    min-height: 100vh;
    transition: all 0.3s ease;
    position: relative;
}

.search-home.hidden {
    display: none;
}

.logo-main {
    display: flex;
    flex-direction: column;
    align-items: center;
    margin-bottom: 40px;
}

.logo-main .logo-icon {
    font-size: 4rem;
    color: var(--primary);
    margin-bottom: 12px;
}

.logo-main .logo-text {
    font-size: 2.8rem;
    font-weight: 700;
    color: var(--primary);
    letter-spacing: -1px;
}

.logo-main .logo-tagline {
    font-size: 1rem;
    color: var(--text-muted);
    margin-top: 8px;
}

.search-box-main {
    width: 100%;
    max-width: 580px;
}

.search-input-wrapper-main {
    display: flex;
    align-items: center;
    border: 1px solid var(--border-color);
    border-radius: 28px;
    padding: 12px 20px;
    background: var(--bg-input);
    box-shadow: var(--shadow-sm);
    transition: box-shadow 0.3s, border-color 0.2s;
}

.search-input-wrapper-main:hover {
    box-shadow: var(--shadow-md);
}

.search-input-wrapper-main:focus-within {
    border-color: var(--primary);
    box-shadow: 0 4px 16px var(--primary-light);
}

.search-input-main {
    flex: 1;
    border: none;
    outline: none;
    font-size: 1.1rem;
    padding: 6px 12px;
    background: transparent;
    color: var(--text-primary);
}

.search-input-main::placeholder {
    color: var(--text-muted);
}

.search-icon {
    color: var(--text-muted);
    font-size: 1.2rem;
}

.search-btn-main {
    background: var(--primary);
    border: none;
    color: var(--text-on-primary);
    padding: 10px 24px;
    border-radius: 20px;
    font-size: 0.95rem;
    font-weight: 500;
    cursor: pointer;
    margin-left: 8px;
    transition: background 0.2s;
}

.search-btn-main:hover {
    background: var(--primary-hover);
}

.search-hint {
    margin-top: 16px;
    color: var(--text-muted);
    font-size: 0.9rem;
    text-align: center;
}

.search-subtitle {
    margin-top: 24px;
    text-align: center;
}

.search-subtitle p {
    color: var(--text-muted);
    font-size: 0.95rem;
    margin-bottom: 16px;
}

.search-subtitle .btn-cadastro {
    display: inline-block;
    background: transparent;
    color: var(--primary);
    border: 2px solid var(--primary);
    padding: 10px 24px;
    border-radius: 6px;
    font-weight: 500;
    text-decoration: none;
    font-size: 0.95rem;
    transition: all 0.2s;
}

.search-subtitle .btn-cadastro:hover {
    background: var(--primary);
    color: var(--text-on-primary);
}

.stats-bar {
    display: flex;
    justify-content: center;
    gap: 40px;
    margin-top: 40px;
    padding-top: 30px;
    border-top: 1px solid var(--border-light);
}

.stat-item {
    text-align: center;
}

.stat-value {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--primary);
}

.stat-label {
    font-size: 0.8rem;
    color: var(--text-muted);
    margin-top: 4px;
}

/* ============================================
   ÁREA DE RESULTADOS
   ============================================ */
.results-area {
    display: none;
    padding: 100px 20px 60px;
    max-width: 900px;
    margin: 0 auto;
}

.results-area.visible {
    display: block;
}

.results-info {
    color: var(--text-muted);
    font-size: 0.9rem;
    margin-bottom: 20px;
    padding-bottom: 15px;
    border-bottom: 1px solid var(--border-light);
}

.results-info strong {
    color: var(--text-primary);
}

/* ============================================
   CARD DE RESULTADO
   ============================================ */
.result-card {
    padding: 20px 0;
    border-bottom: 1px solid var(--border-light);
    transition: background 0.2s;
}

.result-card:hover {
    background: var(--bg-hover);
    margin: 0 -20px;
    padding: 20px;
}

.result-objeto {
    font-size: 1.1rem;
    color: var(--text-link);
    font-weight: 500;
    margin-bottom: 8px;
    line-height: 1.4;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.result-objeto:hover {
    text-decoration: underline;
}

.result-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 16px;
    font-size: 0.9rem;
    color: var(--text-secondary);
}

.result-meta-item {
    display: flex;
    align-items: center;
    gap: 6px;
}

.result-meta-item i {
    color: var(--text-muted);
    font-size: 0.85rem;
}

.result-valor {
    color: var(--success);
    font-weight: 600;
}

.result-modalidade {
    background: var(--primary-light);
    color: var(--primary);
    padding: 2px 10px;
    border-radius: 12px;
    font-size: 0.8rem;
    font-weight: 500;
}

/* Links e Botoes de Acao nos Resultados */
.result-objeto-link {
    text-decoration: none;
    display: block;
}

.result-actions {
    display: flex;
    gap: 10px;
    margin-top: 12px;
}

.btn-ver-rapido,
.btn-ver-pagina {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 8px 14px;
    border-radius: 6px;
    font-size: 0.85rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s;
    text-decoration: none;
}

.btn-ver-rapido {
    background: var(--bg-hover);
    color: var(--text-secondary);
    border: 1px solid var(--border-color);
}

.btn-ver-rapido:hover {
    background: var(--bg-elevated);
    color: var(--text-primary);
}

.btn-ver-pagina {
    background: var(--primary);
    color: var(--text-on-primary);
    border: 1px solid var(--primary);
}

.btn-ver-pagina:hover {
    background: var(--primary-hover);
    border-color: var(--primary-hover);
}

/* ============================================
   CTA BANNER
   ============================================ */
.cta-banner {
    background: var(--primary-gradient);
    color: var(--text-on-primary);
    padding: 24px 28px;
    border-radius: 12px;
    margin: 30px 0;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    flex-wrap: wrap;
}

.cta-content h3 {
    font-size: 1.15rem;
    font-weight: 600;
    margin-bottom: 6px;
}

.cta-content p {
    font-size: 0.9rem;
    opacity: 0.9;
}

.cta-btn {
    background: var(--bg-card);
    color: var(--primary);
    padding: 12px 28px;
    border-radius: 6px;
    text-decoration: none;
    font-weight: 600;
    font-size: 0.95rem;
    transition: transform 0.2s, box-shadow 0.2s;
    white-space: nowrap;
}

.cta-btn:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
}

/* ============================================
   MENSAGEM SEM RESULTADOS
   ============================================ */
.no-results {
    text-align: center;
    padding: 60px 20px;
    color: var(--text-muted);
}

.no-results i {
    font-size: 3rem;
    color: var(--border-color);
    margin-bottom: 20px;
}

.no-results h3 {
    font-size: 1.2rem;
    color: var(--text-primary);
    margin-bottom: 10px;
}

.no-results p {
    font-size: 0.95rem;
}

/* ============================================
   LOADING
   ============================================ */
.loading {
    display: none;
    text-align: center;
    padding: 40px;
}

.loading.visible {
    display: block;
}

.spinner {
    width: 40px;
    height: 40px;
    border: 3px solid var(--border-color);
    border-top-color: var(--primary);
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
    margin: 0 auto 15px;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* ============================================
   FOOTER
   ============================================ */
.footer {
    padding: 20px;
    text-align: center;
    color: var(--text-muted);
    font-size: 0.85rem;
    border-top: 1px solid var(--border-light);
    margin-top: auto;
}

.footer a {
    color: var(--text-link);
    text-decoration: none;
}

.footer a:hover {
    text-decoration: underline;
}

.footer-links {
    display: flex;
    justify-content: center;
    gap: 20px;
    margin-bottom: 10px;
}

/* ============================================
   MODAL DE DETALHES
   ============================================ */
.modal-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: var(--bg-overlay);
    z-index: 1000;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.modal-overlay.visible {
    display: flex;
}

.modal {
    background: var(--bg-card);
    border-radius: 12px;
    max-width: 600px;
    width: 100%;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: var(--shadow-lg);
}

.modal-header {
    padding: 20px 24px;
    border-bottom: 1px solid var(--border-light);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.modal-header h2 {
    font-size: 1.1rem;
    color: var(--text-primary);
}

.modal-close {
    background: none;
    border: none;
    font-size: 1.5rem;
    color: var(--text-muted);
    cursor: pointer;
    padding: 4px;
}

.modal-close:hover {
    color: var(--text-primary);
}

.modal-body {
    padding: 24px;
}

.detail-item {
    margin-bottom: 20px;
}

.detail-label {
    font-size: 0.8rem;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 4px;
}

.detail-value {
    font-size: 1rem;
    color: var(--text-primary);
    line-height: 1.5;
}

.detail-value.destaque {
    font-size: 1.3rem;
    color: var(--success);
    font-weight: 600;
}

.modal-cta {
    background: var(--bg-elevated);
    padding: 20px 24px;
    text-align: center;
    border-top: 1px solid var(--border-light);
}

.modal-cta p {
    color: var(--text-muted);
    margin-bottom: 12px;
    font-size: 0.95rem;
}

.modal-cta .cta-btn {
    display: inline-block;
    background: var(--primary);
    color: var(--text-on-primary);
}

.modal-cta .cta-btn:hover {
    background: var(--primary-hover);
}

/* ============================================
   SCROLL INDICATOR
   ============================================ */
.scroll-indicator {
    position: absolute;
    bottom: 30px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    color: var(--text-muted);
    font-size: 0.85rem;
    animation: bounce 2s infinite;
    cursor: pointer;
}

.scroll-indicator i {
    font-size: 1.2rem;
}

@keyframes bounce {
    0%, 20%, 50%, 80%, 100% {
        transform: translateX(-50%) translateY(0);
    }
    40% {
        transform: translateX(-50%) translateY(-10px);
    }
    60% {
        transform: translateX(-50%) translateY(-5px);
    }
}

/* ============================================
   LANDING PAGE SECTIONS
   ============================================ */
.landing-section {
    padding: 80px 20px;
    background: var(--bg-card);
}

.landing-section.section-alt {
    background: var(--bg-page);
}

.section-container {
    max-width: 1100px;
    margin: 0 auto;
}

.section-title {
    text-align: center;
    font-size: 2rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 12px;
}

.section-subtitle {
    text-align: center;
    font-size: 1.1rem;
    color: var(--text-muted);
    margin-bottom: 50px;
}

/* Steps Grid (Como Funciona) */
.steps-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 40px;
}

.step-card {
    text-align: center;
    padding: 30px 20px;
    position: relative;
}

.step-number {
    position: absolute;
    top: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 32px;
    height: 32px;
    background: var(--primary);
    color: var(--text-on-primary);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 0.9rem;
}

.step-icon {
    width: 80px;
    height: 80px;
    margin: 30px auto 20px;
    background: var(--primary-light);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.step-icon i {
    font-size: 2rem;
    color: var(--primary);
}

.step-card h3 {
    font-size: 1.25rem;
    color: var(--text-primary);
    margin-bottom: 12px;
}

.step-card p {
    font-size: 0.95rem;
    color: var(--text-muted);
    line-height: 1.6;
}

/* Features Grid (Benefícios) */
.features-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 30px;
}

.feature-card {
    background: var(--bg-card);
    padding: 30px;
    border-radius: 12px;
    box-shadow: var(--shadow-sm);
    transition: transform 0.2s, box-shadow 0.2s;
}

.feature-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-md);
}

.feature-icon {
    width: 56px;
    height: 56px;
    background: var(--primary-gradient);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 20px;
}

.feature-icon i {
    font-size: 1.5rem;
    color: var(--text-on-primary);
}

.feature-card h3 {
    font-size: 1.1rem;
    color: var(--text-primary);
    margin-bottom: 10px;
}

.feature-card p {
    font-size: 0.9rem;
    color: var(--text-muted);
    line-height: 1.6;
}

/* Pricing Grid (Planos) */
.pricing-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 30px;
    align-items: start;
}

.pricing-card {
    background: var(--bg-card);
    border-radius: 16px;
    padding: 32px 28px;
    box-shadow: var(--shadow-sm);
    position: relative;
    transition: transform 0.2s, box-shadow 0.2s;
}

.pricing-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-md);
}

.pricing-card.pricing-featured {
    border: 2px solid var(--primary);
    transform: scale(1.05);
    z-index: 1;
}

.pricing-card.pricing-featured:hover {
    transform: scale(1.05) translateY(-4px);
}

.pricing-badge {
    position: absolute;
    top: -12px;
    left: 50%;
    transform: translateX(-50%);
    background: var(--primary);
    color: var(--text-on-primary);
    padding: 6px 16px;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 600;
    white-space: nowrap;
}

.pricing-header {
    text-align: center;
    padding-bottom: 24px;
    border-bottom: 1px solid var(--border-light);
    margin-bottom: 24px;
}

.pricing-header h3 {
    font-size: 1.25rem;
    color: var(--text-primary);
    margin-bottom: 16px;
}

.pricing-value {
    display: flex;
    align-items: baseline;
    justify-content: center;
    gap: 4px;
}

.pricing-value .price {
    font-size: 2.5rem;
    font-weight: 700;
    color: var(--primary);
}

.pricing-value .period {
    font-size: 1rem;
    color: var(--text-muted);
}

.pricing-features {
    list-style: none;
    padding: 0;
    margin: 0 0 28px 0;
}

.pricing-features li {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 0;
    font-size: 0.95rem;
    color: var(--text-secondary);
}

.pricing-features li i.fa-check {
    color: var(--success);
}

.pricing-features li i.fa-times {
    color: var(--border-color);
}

.pricing-btn {
    display: block;
    width: 100%;
    text-align: center;
    padding: 14px 24px;
    border-radius: 8px;
    font-size: 1rem;
    font-weight: 600;
    text-decoration: none;
    transition: all 0.2s;
    background: var(--bg-hover);
    color: var(--text-primary);
}

.pricing-btn:hover {
    background: var(--bg-elevated);
}

.pricing-btn.btn-featured {
    background: var(--primary);
    color: var(--text-on-primary);
}

.pricing-btn.btn-featured:hover {
    background: var(--primary-hover);
}

/* CTA Final Section */
.section-cta {
    background: var(--primary-gradient);
    color: var(--text-on-primary);
}

.cta-content-final {
    text-align: center;
    max-width: 700px;
    margin: 0 auto;
}

.cta-content-final h2 {
    font-size: 2rem;
    font-weight: 700;
    margin-bottom: 16px;
}

.cta-content-final > p {
    font-size: 1.1rem;
    opacity: 0.9;
    margin-bottom: 32px;
}

.cta-buttons {
    display: flex;
    justify-content: center;
    gap: 16px;
    flex-wrap: wrap;
}

.cta-btn-primary,
.cta-btn-secondary {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 14px 32px;
    border-radius: 8px;
    font-size: 1rem;
    font-weight: 600;
    text-decoration: none;
    transition: all 0.2s;
}

.cta-btn-primary {
    background: white;
    color: var(--primary);
}

.cta-btn-primary:hover {
    background: #f0f0f0;
    transform: translateY(-2px);
}

.cta-btn-secondary {
    background: transparent;
    color: white;
    border: 2px solid rgba(255, 255, 255, 0.5);
}

.cta-btn-secondary:hover {
    background: rgba(255, 255, 255, 0.1);
    border-color: white;
}

.cta-note {
    margin-top: 20px;
    font-size: 0.9rem;
    opacity: 0.8;
}

/* ============================================
   RESPONSIVO
   ============================================ */
@media (max-width: 992px) {
    .steps-grid {
        grid-template-columns: repeat(3, 1fr);
        gap: 30px;
    }

    .features-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .pricing-grid {
        grid-template-columns: repeat(3, 1fr);
        gap: 20px;
    }

    .pricing-card.pricing-featured {
        transform: scale(1.02);
    }

    .pricing-card.pricing-featured:hover {
        transform: scale(1.02) translateY(-4px);
    }
}

@media (max-width: 768px) {
    .top-bar {
        padding: 10px 16px;
    }

    .top-bar-links {
        gap: 12px;
    }

    .top-bar-links a:not(.btn-login) {
        display: none;
    }

    .logo-main .logo-icon {
        font-size: 3rem;
    }

    .logo-main .logo-text {
        font-size: 2.2rem;
    }

    .search-input-wrapper-main {
        flex-wrap: wrap;
        padding: 10px 16px;
    }

    .search-btn-main {
        width: 100%;
        margin: 10px 0 0 0;
    }

    .stats-bar {
        gap: 20px;
    }

    .stat-value {
        font-size: 1.2rem;
    }

    .header-content {
        flex-direction: column;
        gap: 15px;
    }

    .header .search-box {
        width: 100%;
        max-width: none;
    }

    .cta-banner {
        flex-direction: column;
        text-align: center;
    }

    .result-meta {
        flex-direction: column;
        gap: 8px;
    }

    .result-actions {
        flex-direction: column;
    }

    .btn-ver-rapido,
    .btn-ver-pagina {
        justify-content: center;
        width: 100%;
    }

    .landing-section {
        padding: 60px 20px;
    }

    .section-title {
        font-size: 1.6rem;
    }

    .section-subtitle {
        font-size: 1rem;
        margin-bottom: 40px;
    }

    .steps-grid {
        grid-template-columns: 1fr;
        gap: 40px;
    }

    .step-card {
        max-width: 360px;
        margin: 0 auto;
    }

    .features-grid {
        grid-template-columns: 1fr;
        gap: 20px;
    }

    .feature-card {
        padding: 24px;
    }

    .pricing-grid {
        grid-template-columns: 1fr;
        gap: 24px;
        max-width: 400px;
        margin: 0 auto;
    }

    .pricing-card.pricing-featured {
        transform: none;
        order: -1;
    }

    .pricing-card.pricing-featured:hover {
        transform: translateY(-4px);
    }

    .cta-content-final h2 {
        font-size: 1.6rem;
    }

    .cta-buttons {
        flex-direction: column;
        align-items: center;
    }

    .cta-btn-primary,
    .cta-btn-secondary {
        width: 100%;
        max-width: 280px;
        justify-content: center;
    }

    .scroll-indicator {
        display: none;
    }
}
