/* =========================================================
   FRONT PAGE BASE
========================================================= */
.front-page {
    background: var(--bg-page);
    color: var(--text-on-dark);
}

/* =========================================================
   SECOES
========================================================= */
.front-section {
    position: relative;
    padding: var(--space-3xl) 0;
}

.front-section-alt {
    background: linear-gradient(
        180deg,
        rgba(255,255,255,0.02),
        rgba(255,255,255,0.04)
    );
}

/* =========================================================
   CONTAINER
========================================================= */
.front-container {
    width: min(92%, var(--container));
    margin: 0 auto;
}

/* =========================================================
   HEADERS
========================================================= */
.front-section-header {
    max-width: 760px;
    margin: 0 auto var(--space-2xl);
    text-align: center;
}

.front-section-header h2 {
    font-size: var(--font-size-2xl);
    color: var(--text-on-dark);
}

.front-section-header p {
    color: var(--text-on-dark-soft);
}

/* =========================================================
   GRID
========================================================= */
.front-grid {
    display: grid;
    gap: var(--space-xl);
}

.front-grid-2 {
    grid-template-columns: repeat(2, 1fr);
    align-items: center;
}

.front-grid-3 {
    grid-template-columns: repeat(3, 1fr);
}

.front-grid-4 {
    grid-template-columns: repeat(4, 1fr);
}

/* =========================================================
   LINKS (CTA)
========================================================= */
.front-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 12px 26px;
    border-radius: var(--radius-xs);
    background: var(--btn-primary-bg);
    color: var(--btn-primary-text);
    border: 1px solid var(--border-dark);
    font-weight: 600;
    transition: var(--transition);
}

.front-link:hover {
    transform: var(--hover-lift);
    box-shadow: var(--shadow-cyan);
}

/* =========================================================
   HERO
========================================================= */
.front-hero {
    overflow: hidden;
}

.front-hero h1 {
    font-size: clamp(2.6rem, 4vw, 4rem);
    margin-bottom: var(--space-lg);

    background: linear-gradient(
        to right,
        var(--neutral-0),
        var(--secondary-400)
    );

    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.front-hero-content p {
    color: var(--text-on-dark-soft);
}

.front-hero-typing {
    color: var(--secondary-500);
    border-right: 2px solid var(--secondary-500);
}

/* =========================================================
   PANELS (GLASS)
========================================================= */
.front-panel {
    background: var(--surface-glass);
    padding: var(--space-md);
    border-radius: var(--radius-lg);
    border: 1px solid var(--border-dark-strong);
    box-shadow: var(--shadow-mid);
    backdrop-filter: blur(12px);
}

.front-panel-soft {
    background: linear-gradient(
        180deg,
        rgba(255,255,255,0.06),
        rgba(255,255,255,0.02)
    );
}

/* =========================================================
   SISTEMAS
========================================================= */
.front-sistemas-content p {
    color: var(--text-on-dark-soft);
}

.front-sistemas-list li {
    color: var(--text-on-dark-soft);
}

.front-sistemas-list li::marker {
    color: var(--secondary-500);
}

/* =========================================================
   SERVICOS
========================================================= */
.front-servico-card {
    background: var(--surface-strong);
    padding: var(--space-xl);
    border-radius: var(--radius-md);
    border: 1px solid var(--border-dark);
    transition: var(--transition);
}

.front-servico-card:hover {
    background: var(--surface-mid);
    border-color: var(--secondary-400);
    transform: translateY(-4px);
}

.front-servico-card.is-destaque {
    border-color: var(--secondary-500);
    box-shadow: var(--shadow-cyan);
}

.front-servico-card p {
    color: var(--text-on-dark-soft);
}

.front-servico-card a {
    color: var(--secondary-400);
}

/* =========================================================
   SEGMENTOS
========================================================= */
.front-segmento-item {
    text-align: center;
    padding: var(--space-lg);
    background: var(--surface-glass);
    border-radius: var(--radius-md);
    border: 1px solid var(--border-dark);
    transition: var(--transition);
}

.front-segmento-item:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-soft);
}

.front-segmento-icon {
    font-size: 2.5rem;
    margin-bottom: var(--space-sm);
    color: var(--secondary-500);
}

.front-segmento-item h3 {
    color: var(--text-on-dark);
}

/* =========================================================
   AUTORIDADE
========================================================= */
.front-autoridade-content p {
    color: var(--text-on-dark-soft);
}

.front-autoridade-assinatura {
    color: var(--neutral-0);
}

/* =========================================================
   FAQ
========================================================= */
.front-faq-col {
    background: var(--surface-strong);
    border: 1px solid var(--border-dark);
    border-radius: var(--radius-lg);
    padding: var(--space-lg);
}

.front-faq-list li {
    color: var(--text-on-dark-soft);
}

.front-faq-list li:hover {
    color: var(--secondary-400);
}

/* =========================================================
   CTA FINAL
========================================================= */
.front-cta-final {
    background: linear-gradient(
        180deg,
        var(--primary-900),
        var(--primary-950)
    );
}

.front-cta-final h2 {
    color: var(--neutral-0);
}

.front-cta-final p {
    color: var(--text-on-dark-soft);
}

/* =========================================================
   RESPONSIVO
========================================================= */
@media (max-width: 992px) {
    .front-grid-4 {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 768px) {
    .front-grid-2,
    .front-grid-3,
    .front-grid-4 {
        grid-template-columns: 1fr;
    }

    .front-section {
        padding: var(--space-2xl) 0;
    }

    .front-link {
        width: 100%;
    }
}

/* =========================================================
   AJUSTE FOTO AUTORIDADE
========================================================= */
.front-autoridade .front-panel img {
    max-width: 200px;
    width: 100%;
    height: auto;
    margin: 0 auto;
}

/* garante alinhamento correto no grid */
.front-autoridade .front-panel {
    display: flex;
    justify-content: center;
    align-items: center;
}

/* =========================================================
   MODAL - DIAGNOSTICO HOME
========================================================= */
body.modal-open {
    overflow: hidden;
}

.front-modal {
    position: fixed;
    inset: 0;
    z-index: 9999;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 24px;
    background: rgba(6, 21, 34, 0.72);
    backdrop-filter: blur(6px);
}

.front-modal.is-active {
    display: flex;
}

.front-modal-overlay {
    position: absolute;
    inset: 0;
}

.front-modal-dialog {
    position: relative;
    z-index: 1;
    width: 100%;
    max-width: 760px;
    max-height: 90vh;
    overflow-y: auto;
    padding: var(--space-xl);
    border-radius: var(--radius-lg);
    background: linear-gradient(
        180deg,
        rgba(238, 244, 248, 0.98) 0%,
        rgba(221, 232, 239, 0.98) 100%
    );
    border: 1px solid var(--border-light);
    box-shadow: var(--shadow-strong);
    color: var(--text-on-light);
}

.front-modal-dialog h2 {
    color: var(--primary-800);
    margin-bottom: var(--space-sm);
}

.front-modal-dialog > p {
    color: var(--text-on-light-soft);
    margin-bottom: var(--space-lg);
}

.front-modal-close {
    position: absolute;
    top: 14px;
    right: 14px;
    width: 42px;
    height: 42px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 999px;
    background: rgba(0, 49, 83, 0.06);
    color: var(--primary-800);
    border: 1px solid var(--border-light);
    font-size: 28px;
    line-height: 1;
    transition: var(--transition);
}

.front-modal-close:hover {
    transform: var(--hover-lift);
    box-shadow: var(--shadow-soft);
}

.front-diagnostico-form .form-group {
    margin-bottom: var(--space-md);
}

.front-diagnostico-form textarea {
    min-height: 140px;
}

.front-diagnostico-form .btn,
.front-diagnostico-form button[type="submit"] {
    width: 100%;
    margin-top: var(--space-sm);
}

@media (max-width: 768px) {
    .front-modal {
        padding: 16px;
    }

    .front-modal-dialog {
        padding: var(--space-lg);
        max-height: 92vh;
    }

    .front-modal-close {
        top: 10px;
        right: 10px;
    }
}