/* ============================================================
   SPEC.CSS — Páginas internas de formato (versão enxuta, dark)
   Importado APÓS o style.css principal — herda toda a base.
   Filosofia: o cliente já está no site, já conhece a empresa.
   Aqui ele só precisa entender o formato e ir pro WhatsApp.
   ============================================================ */

/* ---------- VOLTAR ---------- */
.spec-back {
    padding: 100px 0 0;
    background: var(--black);
}
.spec-back a {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: var(--gray-300);
    font-size: 0.85rem;
    font-weight: 600;
    letter-spacing: 0.5px;
    transition: color 0.2s;
}
.spec-back a:hover { color: var(--red); gap: 12px; }
.spec-back a svg { width: 16px; height: 16px; }

/* ---------- HERO ---------- */
#spec-hero {
    position: relative;
    padding: 18px 0 24px;
    background: var(--black);
    overflow: hidden;
}
/* Família: páginas externas (Busdoor, Backbus) — preto puro */
body[data-familia="externo"] #spec-hero {
    background: var(--black);
}
body[data-familia="externo"] .spec-back,
body[data-familia="externo"] #spec-features {
    background: var(--black);
}

/* Família: páginas internas (Seatbus, Inbus, Sanca) — cinza escuro */
body[data-familia="interno"] #spec-hero {
    background: var(--gray-900);
}
body[data-familia="interno"] .spec-back,
body[data-familia="interno"] #spec-features {
    background: var(--gray-900);
}
/* Features cards num cinza ligeiramente diferente do fundo, pra manter contraste */
body[data-familia="interno"] .spec-feature {
    background: var(--black-2);
    border-color: rgba(255,255,255,0.08);
}
body[data-familia="interno"] .spec-feature:hover {
    border-color: rgba(255,255,255,0.18);
}
/* Glow mais discreto nas internas — ambiente recolhido */
body[data-familia="interno"] #spec-hero::before {
    background: radial-gradient(ellipse at center, rgba(255,255,255,0.04) 0%, transparent 65%);
}
#spec-hero::before {
    content: '';
    position: absolute;
    top: 0;
    right: -10%;
    width: 60%;
    height: 70%;
    background: radial-gradient(ellipse at center, rgba(229,2,2,0.08) 0%, transparent 65%);
    pointer-events: none;
    z-index: 0;
}
.spec-hero-grid {
    display: grid;
    grid-template-columns: 1.1fr 0.9fr;
    gap: 50px;
    align-items: center;
    position: relative;
    z-index: 1;
}
.spec-hero-tag {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 8px 16px;
    border-radius: 100px;
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 1.5px;
    text-transform: uppercase;
    margin-bottom: 22px;
}
.spec-hero-tag::before {
    content: '';
    width: 6px; height: 6px;
    border-radius: 50%;
    animation: pulse 1.6s infinite;
}
.spec-hero-tag.externo {
    background: rgba(229,2,2,0.12);
    border: 1px solid rgba(229,2,2,0.4);
    color: var(--red);
}
.spec-hero-tag.externo::before { background: var(--red); }
.spec-hero-tag.interno {
    background: rgba(255,255,255,0.06);
    border: 1px solid rgba(255,255,255,0.18);
    color: var(--gray-200);
}
.spec-hero-tag.interno::before { background: var(--gray-200); }

#spec-hero h1 {
    font-family: var(--font-display);
    font-weight: 800;
    font-size: clamp(2.4rem, 5.5vw, 4.4rem);
    line-height: 0.95;
    text-transform: uppercase;
    color: var(--white);
    letter-spacing: -1px;
    margin-bottom: 14px;
}
.spec-hero-subtitle {
    font-family: var(--font-display);
    font-weight: 800;
    font-size: clamp(1.3rem, 2.4vw, 1.9rem);
    line-height: 1.05;
    text-transform: uppercase;
    color: var(--gray-300);
    letter-spacing: -0.3px;
    margin-bottom: 22px;
}

/* ---------- IMPACT CARD (destaque vermelho lateral) ---------- */
.spec-impact-card {
    background: var(--gray-900);
    border-left: 4px solid var(--red);
    border-radius: 6px;
    padding: 18px 22px;
    margin-bottom: 22px;
    max-width: 460px;
}
.spec-impact-number {
    display: block;
    font-family: var(--font-display);
    font-weight: 800;
    font-size: clamp(2rem, 3.4vw, 2.6rem);
    color: var(--red);
    line-height: 1;
    margin-bottom: 6px;
    letter-spacing: -0.5px;
}
.spec-impact-text {
    display: block;
    font-size: 0.82rem;
    color: var(--gray-300);
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
}
/* Linha secundária opcional do impact-card (ex: "2x Fator de Impacto vs. Busdoor") */
.spec-impact-sub {
    display: block;
    margin-top: 6px;
    font-size: 0.78rem;
    color: var(--gray-500);
    font-weight: 500;
    letter-spacing: 0.3px;
    text-transform: none;
}

.spec-hero-description {
    color: var(--gray-300);
    font-size: 1.02rem;
    line-height: 1.65;
    max-width: 540px;
}

/* ---------- IMAGEM ---------- */
.spec-hero-image {
    position: relative;
    max-width: 580px;
    max-height: 640px;
    margin-left: auto;
    /* sem border-radius/overflow: as fotos já têm cantos arredondados via alpha */
}
.spec-hero-image picture {
    display: block;
    width: 100%;
    height: 100%;
    max-height: 640px;
}
.spec-hero-image img {
    display: block;
    width: 100%;
    height: 100%;
    max-height: 640px;
    object-fit: contain;
    object-position: center center;
}

/* ----- Layout invertido: foto à esquerda, texto à direita -----
   Usado para evitar que as 3 páginas internas (Seatbus, Inbus, Sanca) fiquem visualmente idênticas.
   Aplica-se SEM mexer no HTML — só inverte a ordem visual via grid + ajusta margens. */
.spec-hero-grid.layout-reversed {
    grid-template-columns: 0.9fr 1.1fr;
}
.spec-hero-grid.layout-reversed > .spec-hero-text {
    order: 2;
}
.spec-hero-grid.layout-reversed > .spec-hero-image {
    order: 1;
    margin-left: 0;
    margin-right: auto;
}

/* ============================================================
   LAYOUT ALTERNATIVO: foto à esquerda alta + texto + features inline
   Usado em: Backbus (e futuros formatos com 2 features)
   ============================================================ */
.spec-hero-grid.layout-features-inline {
    grid-template-columns: 0.85fr 1fr;
    align-items: stretch;
    gap: 50px;
}
.spec-hero-grid.layout-features-inline .spec-hero-image {
    max-width: none;
    max-height: none;
    margin-left: 0;
    height: 100%;
    min-height: 540px;
}
.spec-hero-grid.layout-features-inline .spec-hero-image picture,
.spec-hero-grid.layout-features-inline .spec-hero-image img {
    max-height: none;
    height: 100%;
    object-fit: cover;
    object-position: center center;
}
.spec-hero-grid.layout-features-inline .spec-hero-text {
    display: flex;
    flex-direction: column;
    justify-content: center;
}
/* Features dentro da coluna direita (2 colunas inline) */
.spec-features-inline {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 30px;
    margin-top: 32px;
    padding-top: 28px;
    border-top: 1px solid rgba(255,255,255,0.08);
}
.spec-feature-inline h3 {
    font-family: var(--font-display);
    font-weight: 700;
    font-size: 1.05rem;
    color: var(--white);
    letter-spacing: -0.2px;
    margin-bottom: 10px;
    line-height: 1.25;
    display: flex;
    align-items: center;
    gap: 10px;
}
.spec-feature-icon-sm {
    display: inline-grid;
    place-items: center;
    width: 28px;
    height: 28px;
    color: var(--red);
    flex-shrink: 0;
}
.spec-feature-icon-sm svg {
    width: 22px;
    height: 22px;
}
.spec-feature-inline p {
    font-size: 0.88rem;
    color: var(--gray-300);
    line-height: 1.55;
    margin: 0;
}

/* ---------- FEATURES (3 cards no estilo V1) ---------- */
#spec-features {
    padding: 14px 0 32px;
    background: var(--black);
}
.spec-features-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
}
/* Variação para formatos com apenas 2 features (ex: Backbus) */
.spec-features-grid.grid-2 {
    grid-template-columns: repeat(2, 1fr);
    max-width: 880px;
    margin: 0 auto;
}
/* Variação para formatos com 5 features (ex: Inbus) — cards mais compactos */
.spec-features-grid.grid-5 {
    grid-template-columns: repeat(5, 1fr);
    gap: 14px;
}
.spec-features-grid.grid-5 .spec-feature {
    padding: 18px 16px;
}
.spec-features-grid.grid-5 .spec-feature-icon {
    width: 34px;
    height: 34px;
    margin-bottom: 12px;
}
.spec-features-grid.grid-5 .spec-feature-icon svg {
    width: 18px;
    height: 18px;
}
.spec-features-grid.grid-5 .spec-feature h3 {
    font-size: 0.98rem;
    margin-bottom: 8px;
}
.spec-features-grid.grid-5 .spec-feature p {
    font-size: 0.85rem;
    line-height: 1.5;
}
.spec-feature {
    background: var(--gray-900);
    border: 1px solid rgba(255,255,255,0.06);
    border-radius: var(--radius-lg);
    padding: 22px 22px;
    transition: var(--transition);
}
.spec-feature:hover {
    border-color: rgba(229,2,2,0.4);
    transform: translateY(-4px);
    box-shadow: 0 14px 32px rgba(0,0,0,0.35);
}
.spec-feature-icon {
    width: 38px;
    height: 38px;
    display: grid;
    place-items: center;
    background: rgba(229,2,2,0.12);
    color: var(--red);
    border-radius: 10px;
    margin-bottom: 14px;
}
.spec-feature-icon svg {
    width: 20px;
    height: 20px;
}
.spec-feature h3 {
    font-family: var(--font-display);
    font-weight: 700;
    font-size: 1.1rem;
    color: var(--white);
    letter-spacing: -0.2px;
    margin-bottom: 10px;
    line-height: 1.25;
    text-transform: none;
}
.spec-feature p {
    font-size: 0.92rem;
    color: var(--gray-300);
    line-height: 1.6;
    margin: 0;
}

/* ---------- FOOTER MÍNIMO ---------- */
.spec-footer-mini {
    padding: 16px 0;
    background: var(--black-2);
    border-top: 1px solid rgba(255,255,255,0.06);
    text-align: center;
}
.spec-footer-mini .container {
    color: var(--gray-500);
    font-size: 0.78rem;
}
/* Footer mini muda fundo para criar contraste suave com o resto da página */
body[data-familia="externo"] .spec-footer-mini {
    background: var(--black-2);
}
body[data-familia="interno"] .spec-footer-mini {
    background: var(--black);
}

/* ============================================================
   RESPONSIVO
   ============================================================ */
@media (max-width: 1024px) {
    .spec-features-grid { grid-template-columns: 1fr; gap: 18px; }
    .spec-features-grid.grid-2 { grid-template-columns: 1fr; max-width: 600px; }
    /* Grid-5 vira 2 colunas em tablet (5º card fica em linha sozinho centralizado) */
    .spec-features-grid.grid-5 { grid-template-columns: repeat(2, 1fr); gap: 16px; }
    .spec-features-grid.grid-5 .spec-feature { padding: 22px 22px; }
    .spec-features-grid.grid-5 .spec-feature-icon { width: 38px; height: 38px; margin-bottom: 14px; }
    .spec-features-grid.grid-5 .spec-feature-icon svg { width: 20px; height: 20px; }
    .spec-features-grid.grid-5 .spec-feature h3 { font-size: 1.1rem; margin-bottom: 10px; }
    .spec-features-grid.grid-5 .spec-feature p { font-size: 0.92rem; line-height: 1.6; }
    /* Layout inline: features lado a lado mesmo em tablet (até virar mobile) */
    .spec-hero-grid.layout-features-inline { grid-template-columns: 1fr; gap: 28px; }
    .spec-hero-grid.layout-features-inline .spec-hero-image { min-height: 360px; max-height: 480px; }
}

@media (max-width: 860px) {
    .spec-hero-grid {
        grid-template-columns: 1fr;
        gap: 28px;
    }
    /* No mobile, foto antes do texto */
    .spec-hero-grid > .spec-hero-text { order: 2; }
    .spec-hero-grid > .spec-hero-image { order: 1; }
    .spec-hero-image { max-width: 100%; margin-left: 0; }
    /* Layout inline também empilha foto-texto no mobile */
    .spec-hero-grid.layout-features-inline .spec-hero-image { max-height: 420px; }
    /* Layout reversed também empilha no mobile (sobrescreve regras desktop) */
    .spec-hero-grid.layout-reversed { grid-template-columns: 1fr; }
    .spec-hero-grid.layout-reversed > .spec-hero-image { margin-right: 0; }
    .spec-features-inline { grid-template-columns: 1fr; gap: 22px; }
}

@media (max-width: 768px) {
    .spec-back { padding-top: 100px; }
    #spec-hero { padding: 20px 0 24px; }
    #spec-features { padding: 12px 0 30px; }
    .spec-footer-mini { padding: 14px 0; }
    /* No mobile real, grid-5 vira 1 coluna */
    .spec-features-grid.grid-5 { grid-template-columns: 1fr; gap: 14px; }
}
