/* ==========================================================================
   Empresas Credenciadas — ATEC Brasil
   Página nova seguindo exclusivamente a identidade do site atual
   (tokens de global.css: teal #008f8c, Inter + Merriweather, cantos e
   sombras já usados na Home/patrocinadores).
   ========================================================================== */

.page-hero {
    background: linear-gradient(110deg, rgba(15, 35, 40, 0.96), rgba(0, 90, 90, 0.88)), url('../assets/img/banners/handshake-businessmen-scaled.jpg');
    background-size: cover;
    background-position: center center;
    color: var(--text-on-dark);
    padding: 64px 0 68px;
    position: relative;
    text-align: center;
    overflow: hidden;
}

.page-hero h1 { font-size: clamp(2.2rem, 3.6vw, 3.3rem); margin-bottom: 1.25rem; }
.page-hero .hero-badge { text-transform: uppercase; letter-spacing: .12em; font-size: .8rem; padding: .45rem 1rem; border-width: 1px; }
.page-hero .subtitle { font-size: 1.15rem; color: #ffffff; max-width: 820px; margin: 0 auto; font-weight: 400; }

/* Padronização de largura útil e ritmo vertical (idêntica às páginas aprovadas) */
.container.content-wrapper,
.page-hero .container {
    width: calc(100% - 48px);
    max-width: 1160px;
    margin-left: auto;
    margin-right: auto;
    padding-left: 0;
    padding-right: 0;
}

.section { padding: clamp(3.5rem, 5.5vw, 6rem) 0; }
.ec-directory { padding: 3rem 0 3.5rem; }
.ec-directory h2 { font-size: clamp(1.8rem, 2.8vw, 2.5rem); }
.ec-benefits { padding: 2.75rem 0; }
.ec-benefits-intro { text-align: center; max-width: 850px; margin: 0 auto 2rem; }
.ec-benefits-intro h2 { font-size: clamp(1.6rem, 2.3vw, 2rem); margin-bottom: 1rem; }
.ec-benefits-intro p { margin: 0 auto; font-size: .98rem; }
.ec-benefits-intro .ec-context-title { color: var(--primary-color); font-weight: 600; margin-bottom: .5rem; }
.ec-invitation { padding: 2.75rem 0; }

/* ── Introdução + faixa de diferenciais (4 colunas no desktop) ─────────────── */
.ec-info-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 1.5rem;
    margin-top: 0;
}

.ec-info-grid .info-card { display: flex; flex-direction: column; padding: 1.25rem; border-top: 2px solid var(--border-color); }
.ec-info-grid .info-icon { color: var(--primary-color); margin-bottom: .75rem; }
.ec-info-grid h4 { font-size: 1rem; line-height: 1.5; }

.ec-info-grid .info-card p { flex: 1; font-size: .92rem; margin-bottom: 0; }

/* ── Busca + filtros (protagonismo do diretório) ───────────────────────────── */
.ec-toolbar {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 1rem;
    align-items: center;
    margin-top: 2rem;
    padding: 1.25rem;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    background: var(--bg-off-white);
}

.ec-search-box {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    background: #ffffff;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: 0.85rem 1.4rem;
    min-width: 0;
    height: 56px;
    box-shadow: var(--shadow-sm);
    color: var(--text-muted);
    transition: border-color 0.3s var(--ease-sq), box-shadow 0.3s var(--ease-sq);
}

.ec-search-box:focus-within {
    border-color: var(--secondary-color);
    box-shadow: 0 0 0 3px rgba(0, 183, 179, 0.15);
}

.ec-search-box svg { flex: 0 0 auto; color: var(--primary-color); }

.ec-search {
    flex: 1;
    border: none;
    outline: none;
    background: transparent;
    font-family: 'Inter', sans-serif;
    font-size: 1rem;
    color: var(--text-on-light);
    min-width: 0;
}

.ec-search::placeholder { color: var(--text-muted); }

.ec-filters { display: flex; gap: 0.75rem; min-width: 0; }

.ec-select {
    appearance: none;
    -webkit-appearance: none;
    font-family: 'Inter', sans-serif;
    font-size: 0.95rem;
    font-weight: 500;
    color: var(--text-on-light);
    background-color: #ffffff;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    height: 56px;
    min-width: 0;
    max-width: 100%;
    padding: 0.85rem 2.6rem 0.85rem 1.3rem;
    cursor: pointer;
    box-shadow: var(--shadow-sm);
    background-image: url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%23008f8c' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 1rem center;
    transition: border-color 0.3s var(--ease-sq), box-shadow 0.3s var(--ease-sq);
}

.ec-select:hover { border-color: var(--secondary-color); }
.ec-select:focus { border-color: var(--secondary-color); box-shadow: 0 0 0 3px rgba(0, 183, 179, 0.15); outline: none; }

.ec-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;
}

/* ── Grade das empresas (3 desktop / 2 tablet / 1 mobile) ──────────────────── */
.ec-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 1.75rem;
    margin-top: 1.5rem;
}

.ec-card {
    display: flex;
    flex-direction: column;
    background: #ffffff;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-sm);
    overflow: hidden;
    transition: transform 0.3s var(--ease-sq), box-shadow 0.3s var(--ease-sq), border-color 0.3s var(--ease-sq);
}

.ec-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-lg); border-color: var(--secondary-color); }

.ec-card-head {
    padding: 1.75rem 1.75rem 1.25rem;
    border-bottom: 1px solid var(--bg-off-white);
    text-align: center;
}

.ec-logo {
    width: 104px;
    height: 104px;
    margin: 0 auto 1.1rem;
    background: var(--bg-off-white);
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

.ec-logo img { width: 100%; height: 100%; object-fit: contain; }

.ec-name { font-family: 'Merriweather', serif; font-size: 1.2rem; color: var(--text-on-light); margin-bottom: 0.35rem; }

.ec-meta { font-size: 0.9rem; color: var(--primary-color); font-weight: 600; margin-bottom: 0; }

.ec-desc { padding: 1.1rem 1.75rem 0.5rem; font-size: 0.98rem; margin-bottom: 0; }

.ec-card-foot { margin-top: auto; padding: 1rem 1.75rem 1.4rem; text-align: center; }

.ec-btn { padding: 0.7rem 1.8rem; font-size: 0.95rem; border: 1px solid var(--primary-color); border-radius: var(--radius-md); color: var(--primary-color); }
.ec-btn:hover { background: var(--primary-color); color: white; }

/* ── Estado inicial sem empresas (área proporcional ao futuro diretório) ───── */
.ec-empty {
    grid-column: 1 / -1;
    background: var(--bg-off-white);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-sm);
    text-align: center;
    padding: 2.5rem 2rem;
    min-height: 260px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

.ec-empty-icon {
    width: 56px;
    height: 56px;
    margin: 0 auto 1rem;
    background: #ffffff;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--primary-color);
}

.ec-empty h3 { font-family: 'Merriweather', serif; font-size: 1.45rem; color: var(--text-on-light); margin-bottom: 0.6rem; }

.ec-empty p { max-width: 560px; margin: 0 auto; font-size: 1.05rem; }

.ec-no-results {
    grid-column: 1 / -1;
    background: var(--bg-off-white);
    border-radius: var(--radius-md);
    text-align: center;
    padding: 3rem 1.5rem;
}

.ec-no-results p { margin-bottom: 0; font-size: 1rem; }

[hidden] { display: none !important; }

/* ── CTA final (texto à esquerda, botão à direita no desktop) ──────────────── */
.ec-cta {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 2.5rem;
    background: #112d32;
    border: 1px solid rgba(0, 183, 179, .3);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-md);
    padding: 2.25rem 2.5rem;
    text-align: left;
}

.ec-cta-text { flex: 1 1 auto; min-width: 0; }

.ec-cta-text h2 {
    color: #ffffff;
    font-size: clamp(1.6rem, 2.4vw, 2rem);
    text-align: left;
    padding-bottom: 0.75rem;
    margin-bottom: 1.1rem;
}

/* mantém o sublinhado teal do padrão do site à esquerda no CTA */
.ec-cta-text h2::after { left: 0; transform: none; }

.ec-cta-text p { color: #d5e2e3; margin-bottom: 0; max-width: 62ch; }
.ec-cta-action .btn { font-family: inherit; white-space: nowrap; cursor: pointer; }

.ec-cta-action { flex: 0 0 auto; }

/* ── Responsividade própria (base: responsive.css do site) ─────────────────── */
@media (max-width: 1024px) {
    .ec-info-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }

    .ec-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 768px) {
    .page-hero { padding: 48px 0; }

    .ec-toolbar { grid-template-columns: minmax(0, 1fr); }
    .ec-filters { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); }

    .ec-select { width: 100%; }
}

@media (max-width: 640px) {
    .page-hero { padding: 40px 0; }

    .container.content-wrapper,
    .page-hero .container { width: calc(100% - 32px); }

    .section { padding: clamp(2.75rem, 8vw, 4rem) 0; }
    .ec-directory, .ec-benefits, .ec-invitation { padding: 2.25rem 0; }
    .ec-toolbar { padding: 1rem; }
    .ec-filters { grid-template-columns: minmax(0, 1fr); }
    .ec-search-box { padding-left: .85rem; padding-right: .85rem; }
    .ec-search { font-size: .95rem; }

    .ec-info-grid { grid-template-columns: 1fr; }

    .ec-grid { grid-template-columns: 1fr; }

    .ec-cta { flex-direction: column; text-align: center; padding: 2rem 1.5rem; gap: 1.5rem; }

    .ec-cta-text h2 { text-align: center; }

    .ec-cta-text h2::after { left: 50%; transform: translateX(-50%); }

    .ec-empty { padding: 2rem 1.25rem; min-height: 240px; }
}

@media (prefers-reduced-motion: reduce) {
    .ec-card, .ec-search-box, .ec-select, .page-hero { transition: none; }
}
