/*
Theme Name: Interactive Automação
Theme URI:
Author: Pedro Dias
Description: Tema WordPress para Interactive Automação — Engenharia Industrial.
Version: 1.0.0
License: GNU General Public License v2 or later
Text Domain: ai-master-theme-wp
*/

/* Reset mínimo — Tailwind CDN Preflight cuida do resto */
*, *::before, *::after { box-sizing: border-box; }

/* Reset de lista no menu */
.menu-item, #main-nav ul, #main-nav li {
    list-style: none;
    margin: 0;
    padding: 0;
}

/* Menu mobile */
@media (max-width: 1023px) {
    #main-nav {
        display: none;
        position: absolute;
        top: 100%;
        left: 0;
        width: 100%;
        background: rgba(0, 0, 0, 0.97);
        padding: 24px 0;
        z-index: 49;
    }
    #main-nav.open { display: block; }
    #main-nav ul {
        flex-direction: column;
        align-items: center;
        gap: 16px;
        display: flex;
    }
    #main-nav li a {
        color: #eaeaea;
        font-size: 15px;
        text-decoration: none;
        letter-spacing: 0.375px;
    }
}

/* CTA Fale Conosco — oculto por padrão, visível apenas no menu mobile aberto */
#main-nav .mobile-cta {
    display: none;
}
@media (max-width: 1023px) {
    #main-nav.open .mobile-cta {
        display: flex;
        justify-content: center;
        padding-top: 8px;
        padding-bottom: 4px;
    }
}

/* Header scroll effect */
#site-header {
    transition: background-color 0.3s ease;
}
#site-header.scrolled {
    background: rgba(0, 0, 0, 0.97);
    backdrop-filter: blur(8px);
}

/* ================================================================
   Botões — efeito hover moderno (lift + sombra + spring)
   ================================================================ */

/* Base: transition unificado para todos os botões com .ia-btn */
.ia-btn {
    transition:
        background-color  0.22s ease,
        color             0.22s ease,
        border-color      0.22s ease,
        box-shadow        0.22s ease,
        transform         0.22s cubic-bezier(0.34, 1.56, 0.64, 1) !important;
    will-change: transform;
}
.ia-btn:hover  { transform: translateY(-3px); }
.ia-btn:active { transform: translateY(-1px) scale(0.98); transition-duration: 0.1s !important; }

/* Sólido escuro (fundo preto/dark, texto branco) */
.ia-btn-solid:hover        { box-shadow: 0 10px 28px rgba(0, 0, 0, 0.30); }

/* Sólido claro (fundo branco/claro, texto escuro) */
.ia-btn-solid-light:hover  { box-shadow: 0 10px 28px rgba(0, 0, 0, 0.18); }

/* Outline em contexto escuro (borda branca, bg transparente) */
.ia-btn-outline-light:hover { box-shadow: 0 10px 28px rgba(255, 255, 255, 0.18); }

/* Outline em contexto claro (borda escura, bg transparente) */
.ia-btn-outline-dark:hover  { box-shadow: 0 10px 28px rgba(0, 0, 0, 0.18); }

/* ================================================================
   Contact Form 7 — estilo para .ia-cf7-wrapper
   ================================================================ */
.ia-cf7-wrapper .wpcf7 { width: 100%; }

/* Reset de margens nos parágrafos do CF7 */
.ia-cf7-wrapper .wpcf7-form p {
    margin: 0 !important;
    display: flex;
    flex-direction: column;
    gap: 6px;
}

/* Grid geral do formulário */
.ia-cf7-wrapper .wpcf7-form {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
    align-items: start;
}
/* Todos os elementos ocupam a largura total por padrão */
.ia-cf7-wrapper .wpcf7-form > * {
    grid-column: 1 / -1;
}
/* 1º e 2º <p> (nome e e-mail) ficam lado a lado — usa nth-of-type para ignorar divs ocultos */
.ia-cf7-wrapper .wpcf7-form > p:nth-of-type(1),
.ia-cf7-wrapper .wpcf7-form > p:nth-of-type(2) {
    grid-column: auto;
}

/* Labels */
.ia-cf7-wrapper label {
    display: block;
    font-family: 'Titillium Web', sans-serif;
    font-size: 11px;
    font-weight: 600;
    letter-spacing: 2px;
    text-transform: uppercase;
    color: #6a7282;
    margin-bottom: 6px;
}

/* Inputs e textarea */
.ia-cf7-wrapper input[type="text"],
.ia-cf7-wrapper input[type="email"],
.ia-cf7-wrapper input[type="tel"],
.ia-cf7-wrapper textarea {
    width: 100%;
    border: 1px solid rgba(0, 0, 0, 0.15);
    background: #fafafa;
    padding: 14px 16px;
    font-family: 'Titillium Web', sans-serif;
    font-size: 15px;
    color: #333333;
    border-radius: 0;
    outline: none;
    transition: border-color 0.2s ease, background 0.2s ease, box-shadow 0.2s ease;
    appearance: none;
    -webkit-appearance: none;
}
.ia-cf7-wrapper input[type="text"]:focus,
.ia-cf7-wrapper input[type="email"]:focus,
.ia-cf7-wrapper input[type="tel"]:focus,
.ia-cf7-wrapper textarea:focus {
    border-color: #000000;
    background: #ffffff;
    box-shadow: 0 0 0 3px rgba(0, 0, 0, 0.06);
}

.ia-cf7-wrapper textarea {
    min-height: 72px;
    resize: vertical;
}

/* Span wrapper dos campos CF7 */
.ia-cf7-wrapper .wpcf7-form-control-wrap {
    display: block;
    width: 100%;
}

/* Botão de envio */
.ia-cf7-wrapper input[type="submit"] {
    width: 100%;
    background: #000000;
    color: #ffffff;
    border: none;
    padding: 16px 32px;
    font-family: 'Titillium Web', sans-serif;
    font-size: 15px;
    font-weight: 600;
    letter-spacing: 0.3px;
    cursor: pointer;
    border-radius: 9999px;
    transition:
        background   0.22s ease,
        transform    0.22s cubic-bezier(0.34, 1.56, 0.64, 1),
        box-shadow   0.22s ease;
    will-change: transform;
}
.ia-cf7-wrapper input[type="submit"]:hover {
    background: #111111;
    transform: translateY(-3px);
    box-shadow: 0 10px 28px rgba(0, 0, 0, 0.28);
}
.ia-cf7-wrapper input[type="submit"]:active {
    transform: translateY(-1px) scale(0.98);
    transition-duration: 0.1s;
}

/* Campo de aceite (acceptance) */
.ia-cf7-wrapper .ia-acceptance-field {
    margin-bottom: 0;
}
.ia-cf7-wrapper .wpcf7-acceptance {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    cursor: pointer;
}
.ia-cf7-wrapper .wpcf7-acceptance input[type="checkbox"] {
    width: 16px;
    height: 16px;
    min-width: 16px;
    margin-top: 3px;
    accent-color: #000000;
    cursor: pointer;
    border: 1px solid rgba(0,0,0,0.3);
    padding: 0;
    background: #fafafa;
    flex-shrink: 0;
}
.ia-cf7-wrapper .wpcf7-list-item-label {
    font-family: 'Titillium Web', sans-serif;
    font-size: 13px;
    line-height: 22px;
    color: #6a7282;
    cursor: pointer;
    text-transform: none;
    white-space: normal;
    overflow-wrap: break-word;
}
.ia-cf7-wrapper .wpcf7-list-item-label a {
    color: #000000;
    font-weight: 600;
    text-decoration: underline;
    text-underline-offset: 2px;
}
.ia-cf7-wrapper .wpcf7-list-item-label a:hover {
    color: #4a5565;
}
.ia-cf7-wrapper p:has(.wpcf7-acceptance) {
    display: flex;
    flex-direction: row;
    align-items: flex-start;
    gap: 0;
}

/* Mensagens de validação */
.ia-cf7-wrapper .wpcf7-not-valid-tip {
    font-family: 'Titillium Web', sans-serif;
    font-size: 12px;
    color: #dc2626;
    margin-top: 4px;
}

/* ================================================================
   Últimos logos de clientes — flex centralizado no desktop,
   grid 2 colunas no mobile
   ================================================================ */
.ia-clients-last {
    display: flex;
    justify-content: center;
    gap: 1rem;
    flex-wrap: wrap;
    list-style: none;
    padding: 0;
    margin: 0;
}
/* Cancela o mx-auto dos <li> que funciona bem no grid mas espalha no flex */
.ia-clients-last > li {
    margin-left: 0;
    margin-right: 0;
}
@media (max-width: 639px) {
    .ia-clients-last {
        display: grid;
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 1rem;
    }
    .ia-clients-last > li {
        width: 100%;
        max-width: 100%;
        margin-left: 0;
        margin-right: 0;
    }
    .ia-clients-last > li:last-child {
        grid-column: 1 / -1;
        width: 192px;
        max-width: 100%;
        margin-left: auto;
        margin-right: auto;
    }
}

/* Resposta do formulário (sucesso/erro) */
.ia-cf7-wrapper .wpcf7-response-output {
    border: 1px solid rgba(0, 0, 0, 0.15) !important;
    padding: 14px 18px !important;
    font-family: 'Titillium Web', sans-serif;
    font-size: 14px;
    margin: 0 !important;
    border-radius: 0;
}
.ia-cf7-wrapper .wpcf7-mail-sent-ok {
    border-color: #16a34a !important;
    background: #f0fdf4;
    color: #15803d;
}
.ia-cf7-wrapper .wpcf7-mail-sent-ng,
.ia-cf7-wrapper .wpcf7-aborted {
    border-color: #dc2626 !important;
    background: #fef2f2;
    color: #b91c1c;
}
