/* ================================================================
   AtendePRO — Dashboard CSS
   HeroSection · ModuleCards · Hierarquia Cognitiva
   Importar APÓS design-system.css + shell.css
   ================================================================ */

/* ================================================================
   HERO SECTION
   ================================================================ */
.hero-section {
  background: var(--s1);
  border: 1px solid var(--border);
  border-radius: var(--r-xl);
  padding: 52px 56px;
  margin-bottom: 32px;
  position: relative;
  overflow: hidden;
}

/* Glow no canto superior esquerdo */
.hero-section::before {
  content: '';
  position: absolute;
  top: -80px; left: -60px;
  width: 400px; height: 400px;
  background: radial-gradient(circle, rgba(255,193,7,0.045) 0%, transparent 65%);
  pointer-events: none;
}

/* Linha inferior sutil dourada */
.hero-section::after {
  content: '';
  position: absolute;
  bottom: 0; left: 0; right: 0;
  height: 1px;
  background: linear-gradient(90deg,
    transparent 0%,
    rgba(255,193,7,0.18) 30%,
    rgba(255,193,7,0.18) 70%,
    transparent 100%
  );
}

/* Grid interno: texto (1fr) + foto (auto) */
.hero-inner {
  display: grid;
  grid-template-columns: 1fr 200px;
  gap: 52px;
  align-items: center;
  position: relative;
  z-index: 1;
}

/* ── Coluna de texto ── */
.hero-content {}

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: var(--gold);
  background: rgba(255,193,7,0.06);
  border: 1px solid rgba(255,193,7,0.14);
  border-radius: var(--r-pill);
  padding: 5px 13px;
  margin-bottom: 22px;
}

.hero-badge-dot {
  width: 5px; height: 5px;
  border-radius: 50%;
  background: var(--gold);
  flex-shrink: 0;
  animation: ap-pulse 2.5s infinite;
}

.hero-headline {
  font-family: var(--font-display);
  font-size: clamp(28px, 3.4vw, 44px);
  line-height: 1;
  color: var(--txt);
  letter-spacing: 0.5px;
  margin-bottom: 16px;
  /* Garante 2 linhas (com o <br>): nao quebra fora dos pontos previstos */
  text-wrap: balance;
}

.hero-headline em {
  background: var(--grad);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  font-style: normal;
}

.hero-sub {
  font-size: 14px;
  color: var(--txt-2);
  line-height: 1.65;
  max-width: 400px;
  margin-bottom: 32px;
}

.hero-author {
  display: flex;
  align-items: center;
  gap: 14px;
}

.hero-author-divider {
  width: 24px;
  height: 1px;
  background: rgba(255,193,7,0.3);
}

.hero-author-info {}

.hero-author-name {
  font-size: 13px;
  font-weight: 600;
  color: var(--txt);
  margin-bottom: 2px;
}

.hero-author-role {
  font-size: 10px;
  color: var(--txt-3);
  letter-spacing: 0.8px;
  text-transform: uppercase;
}

/* ── Foto do fundador ── */
.hero-photo-frame {
  width: 200px;
  height: 268px;
  border-radius: 14px;
  background: linear-gradient(160deg, var(--s2) 0%, var(--s3) 100%);
  border: 1px solid rgba(255,193,7,0.10);
  position: relative;
  overflow: hidden;
  flex-shrink: 0;
}

/* Linha superior ouro */
.hero-photo-frame::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(255,193,7,0.35), transparent);
  z-index: 2;
}

/* Vinheta inferior */
.hero-photo-frame::after {
  content: '';
  position: absolute;
  bottom: 0; left: 0; right: 0;
  height: 48px;
  background: linear-gradient(to top, rgba(15,15,16,0.7), transparent);
  z-index: 2;
}

.hero-photo-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: top center;
  display: block;
}

.hero-photo-fallback {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 8px;
}

.hero-photo-fallback i {
  font-size: 40px;
  color: rgba(255,193,7,0.15);
}

.hero-photo-fallback span {
  font-family: var(--font-display);
  font-size: 11px;
  letter-spacing: 1.5px;
  color: rgba(255,193,7,0.2);
  text-transform: uppercase;
}

/* ================================================================
   SEÇÃO DE MÓDULOS
   ================================================================ */
.modules-section {
  max-width: 1550px;
  margin-left: auto;
  margin-right: auto;
}

.modules-label {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: var(--txt-3);
  margin-bottom: 14px;
}

.modules-label::after {
  content: '';
  flex: 1;
  height: 1px;
  background: var(--border);
}

/* ── Grid de módulos: 2 colunas ── */
.module-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 12px;
}

/* ── Module Card ── */
.module-card {
  background: var(--s1);
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  padding: 28px 26px 22px;
  cursor: pointer;
  position: relative;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  gap: 0;
  transition:
    border-color var(--t),
    box-shadow var(--t),
    transform var(--t-slow);
  user-select: none;
  -webkit-tap-highlight-color: transparent;
}

/* Linha de topo — aparece no hover */
.module-card::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 1px;
  background: var(--grad);
  opacity: 0;
  transition: opacity var(--t);
}

/* Hover state */
.module-card:hover {
  border-color: rgba(255,193,7,0.16);
  box-shadow:
    0 1px 0 rgba(255,193,7,0.06) inset,
    0 8px 32px rgba(0,0,0,0.45),
    0 2px 8px rgba(0,0,0,0.3);
  transform: translateY(-2px);
}

.module-card:hover::before { opacity: 1; }

/* Press */
.module-card:active {
  transform: translateY(0) scale(0.995);
  box-shadow: 0 2px 8px rgba(0,0,0,0.3);
}

/* ── Número editorial (ghost watermark) ── */
.module-card-num {
  font-family: var(--font-display);
  font-size: 56px;
  line-height: 1;
  color: rgba(255,193,7,0.07);
  letter-spacing: 0;
  margin-bottom: 14px;
  transition: color var(--t);
}

.module-card:hover .module-card-num {
  color: rgba(255,193,7,0.13);
}

/* ── Ícone ── */
.module-card-icon {
  width: 44px; height: 44px;
  border-radius: var(--r);
  background: rgba(255,193,7,0.06);
  border: 1px solid rgba(255,193,7,0.12);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 14px;
  transition: background var(--t), border-color var(--t);
}

.module-card-icon i {
  font-size: 20px;
  color: var(--gold);
}

.module-card:hover .module-card-icon {
  background: rgba(255,193,7,0.10);
  border-color: rgba(255,193,7,0.20);
}

/* ── Título ── */
.module-card-title {
  font-family: var(--font-display);
  font-size: 21px;
  color: var(--txt);
  letter-spacing: 0.5px;
  margin-bottom: 6px;
  line-height: 1;
}

/* ── Descrição ── */
.module-card-desc {
  font-size: 12px;
  color: var(--txt-2);
  line-height: 1.6;
  margin-bottom: 20px;

  /* Limitar a 2 linhas */
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* ── CTA ── */
.module-card-cta {
  margin-top: auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: 14px;
  border-top: 1px solid var(--border);
}

.module-card-cta-text {
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 1.2px;
  text-transform: uppercase;
  color: var(--txt-3);
  transition: color var(--t);
}

.module-card-cta-arrow {
  font-size: 17px;
  color: var(--txt-3);
  transition: transform var(--t), color var(--t);
}

.module-card:hover .module-card-cta-text { color: var(--gold); }
.module-card:hover .module-card-cta-arrow {
  transform: translateX(4px);
  color: var(--gold);
}

/* ================================================================
   RESPONSIVE
   ================================================================ */

@media (max-width: 900px) {
  .hero-section { padding: 40px 40px; }
  .hero-inner { gap: 36px; grid-template-columns: 1fr 180px; }
  .hero-photo-frame { width: 180px; height: 240px; }
}

@media (max-width: 768px) {
  .hero-section { padding: 32px 24px 36px; }

  .hero-inner {
    grid-template-columns: 1fr;
    gap: 28px;
  }

  /* Foto menor, posicionada antes do texto em mobile */
  .hero-photo-frame {
    display: none; /* Esconde em mobile — foco no texto */
  }

  .hero-sub { max-width: 100%; }

  .module-grid { gap: 10px; }
}

@media (max-width: 500px) {
  /* Cards em 2 colunas no mobile - tamanho compacto, NAO full-width como o banner */
  .module-grid {
    grid-template-columns: repeat(2, 1fr) !important;
    gap: 10px;
  }

  .hero-section { padding: 24px 18px 28px; }
  .module-card { padding: 16px 14px 14px !important; }
  .module-card-num { font-size: 32px !important; margin-bottom: 8px; }
  .module-card-icon { width: 34px !important; height: 34px !important; margin-bottom: 10px; }
  .module-card-icon i { font-size: 16px !important; }
  .module-card-title { font-size: 15px !important; margin-bottom: 4px; }
  .module-card-desc { font-size: 11.5px !important; line-height: 1.4; margin-bottom: 10px; }
  .module-card-cta { padding-top: 8px; }
  .module-card-cta-text { font-size: 11px !important; letter-spacing: 0.5px; }
}

/* iPhone SE e telas muito pequenas: 2 cols mantidas, padding/fontes menores */
@media (max-width: 360px) {
  .hero-section { padding: 20px 14px 24px; }
  .hero-headline { font-size: clamp(28px, 8vw, 38px); }
  .module-grid { gap: 8px; }
  .module-card { padding: 14px 12px 12px !important; }
  .module-card-num { font-size: 28px !important; }
  .module-card-icon { width: 30px !important; height: 30px !important; }
  .module-card-icon i { font-size: 15px !important; }
  .module-card-title { font-size: 14px !important; }
  .module-card-desc { font-size: 11px !important; }
}

/* ================================================================
   ESCALA WIDE — auto-fit dos cards + tipografia maior em telas largas
   ================================================================ */

/* Auto-fit: em telas estreitas/medias cards reorganizam por largura.
   Min 220px por coluna => 1..5 colunas conforme o viewport disponivel. */
.module-grid {
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
}

/* Layout do grid de 8 cards e' definido em quickconsult.css
   (4 cols em >=1100px, 3 cols em 769-1099px, 2 cols em mobile). */

/* Desktop largo (>=1280px) — escala hero e cards (cards um pouco maiores) */
@media (min-width: 1280px) {
  .hero-section { padding: 64px 72px; margin-bottom: 40px; }
  .hero-inner   { grid-template-columns: 1fr 240px; gap: 64px; }
  .hero-photo-frame { width: 240px; height: 320px; }
  .hero-headline { font-size: clamp(36px, 3.8vw, 56px); }
  .hero-sub      { font-size: 16px; max-width: 560px; }

  .modules-label { font-size: 10px; margin-bottom: 18px; }

  /* Card sizes ajustados pra caber 5 em 1 linha sem esmagar */
  .module-card        { padding: 28px 22px 22px; }
  .module-card-num    { font-size: 56px; margin-bottom: 14px; }
  .module-card-icon   { width: 48px; height: 48px; margin-bottom: 14px; }
  .module-card-icon i { font-size: 22px; }
  .module-card-title  { font-size: 21px; margin-bottom: 6px; }
  .module-card-desc   { font-size: 12.5px; margin-bottom: 20px; }
}

/* Ultra-wide (>=1600px) — escala ainda mais o hero */
@media (min-width: 1600px) {
  .hero-section { padding: 72px 88px; }
  .hero-headline { font-size: clamp(40px, 4vw, 64px); }
  .hero-sub      { font-size: 17px; max-width: 640px; }
}

/* ================================================================
   HERO COM FOTO COMO BANNER
   Abordagem: <picture><img></picture> como elemento real,
   overlay de gradiente sobre a foto, conteudo de texto absoluto.
   Aspecto natural da foto (2:1 desktop, 1:1 mobile) preservado
   integralmente -- ZERO crop, nenhuma cabeca/parte do corpo cortada.
   ================================================================ */
.hero-section.hero-section--photo {
  padding: 0;             /* a foto preenche o banner inteiro */
  background: var(--s1);  /* fallback se a foto nao carregar */
  max-width: 1550px;      /* aspecto proximo a 2:1 da foto -> proporcional */
  margin-left: auto;
  margin-right: auto;
}

/* No modo foto, dispensa o glow dourado e a linha do ::after
   pra deixar a foto e o overlay falarem sozinhos */
.hero-section.hero-section--photo::before,
.hero-section.hero-section--photo::after {
  display: none;
}

/* Foto base do banner. Desktop: altura controlada com crop ancorado
   ao topo (preserva a cabeca, corta o final do desk inferior). */
.hero-photo-bg {
  display: block;
  width: 100%;
  position: relative;
  z-index: 0;
  height: 600px;
  overflow: hidden;
}
.hero-photo-bg img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;             /* full bleed, foto preenche o banner inteiro */
  object-position: 50% 0%;       /* ancorada no topo -> preserva cabeca, mostra ate metade da mesa */
}

/* Overlay escurece o lado esquerdo pra legibilidade do texto sobre a foto */
.hero-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg,
    rgba(10,10,11,0.88) 0%,
    rgba(10,10,11,0.55) 28%,
    rgba(10,10,11,0.12) 48%,
    transparent 60%
  );
  pointer-events: none;
  z-index: 1;
}

/* Conteudo de texto posicionado sobre a foto, lado esquerdo */
.hero-section.hero-section--photo .hero-inner {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  padding: 44px 56px;
  z-index: 2;
}

.hero-section--photo .hero-content {
  max-width: 540px;
}

/* Desktop largo: mais respiro no padding do conteudo */
@media (min-width: 1280px) {
  .hero-section.hero-section--photo .hero-inner { padding: 56px 72px; }
  .hero-section--photo .hero-content { max-width: 620px; }
}

@media (min-width: 1600px) {
  .hero-section.hero-section--photo .hero-inner { padding: 72px 88px; }
  .hero-section--photo .hero-content { max-width: 700px; }
}

/* Mobile/tablet: layout vertical -- foto em cima com aspect 5:6
   (um pouco mais alto que largo => zoom in horizontal sem cortar
   cabeca/ombros), texto abaixo em area dark solida. */
@media (max-width: 768px) {
  .hero-photo-bg {
    height: auto;
    padding-right: 0;       /* reset do padding desktop */
    aspect-ratio: 5 / 6;
    overflow: hidden;
  }
  .hero-photo-bg img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: 50% 12%;  /* center horizontal, ancorado pro topo */
  }
  .hero-overlay { display: none; }
  .hero-section.hero-section--photo .hero-inner {
    position: static;
    inset: auto;
    padding: 24px 22px 28px;
  }
  .hero-section--photo .hero-content { max-width: 100%; }
}



/* ─── Drawer "locked": aberto por um card especifico,
       esconde tabs/chips pra cliente nao se confundir ─── */
.qc-drawer--locked .qc-tabs,
.qc-drawer--locked .qc-chips{display:none !important}


/* ─── DEFESA: clique em qualquer ponto do card SEMPRE abre o modal ─── */
.module-card > *{pointer-events:none}
.module-card{pointer-events:auto}
