/**
 * UTILSOFT - Estilos Globais
 * ============================
 * Arquivo de estilos centralizado para todas as páginas
 * Contém: animações, componentes customizados, utilitários
 */

/* ================================
   CONFIGURAÇÃO GLOBAL
   ================================ */

:root {
    --primary: #1E3A8A;
    --secondary: #10B981;
    --util-950: #071426;
    --util-900: #0f2a4a;
    --util-700: #1e4b7a;
    --util-500: #2b6cb0;
    --util-300: #5ca8ff;
    --util-100: #dceeff;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

.first-slide-overlay {
    display: flex;
    align-items: center;
    justify-content: center;
}

.first-slide-content {
    display: grid;
    grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.5fr);
    align-items: center;
    gap: clamp(1.5rem, 4vw, 4rem);
    width: min(100% - 4rem, 1280px);
    margin: 0 auto;
}

.first-slide-copy {
    text-align: left;
}

.first-slide-copy :is(h1, h2) {
    font-size: clamp(1.75rem, 3vw, 2.5rem);
    line-height: 1.15;
}

.first-slide-table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0.75rem;
    color: #fff;
    text-align: center;
}

.first-slide-table th,
.first-slide-table td {
    width: 50%;
    height: 4rem;
    padding: 0.75rem 1rem;
    background: rgba(48, 128, 160, 0.68);
    font-weight: 500;
}

.first-slide-table th {
    background: rgba(15, 42, 64, 0.9);
}

/* ================================
   HERO SECTION - GRADIENT
   ================================ */

.hero-glow {
    background-image: 
        radial-gradient(circle at top left, rgba(92,168,255,0.35), transparent 35%),
        radial-gradient(circle at bottom right, rgba(16,185,129,0.22), transparent 30%);
}

/* ================================
   HEADER / NAVEGAÇÃO
   ================================ */

/* Efeito de transição suave do header */
#mainHeader {
    will-change: height;
}

.header-logo, .header-title {
    will-change: width, height, font-size, margin;
}

/* ================================
   MENU MOBILE - HAMBURGER
   ================================ */

/* Menu mobile responsivo com transição */
.mobile-menu {
    transition: all 0.3s ease-in-out;
    max-height: 0;
    overflow: hidden;
}

.mobile-menu.open {
    max-height: min(80vh, 500px);
}

/* Linhas do hamburger menu */
.hamburger span {
    display: block;
    flex: 0 0 auto;
    width: 28px;
    height: 2px;
    background-color: #4F46E5;
    margin: 4px 0;
    transition: all 0.3s ease-in-out;
}

#mobileSoftwareToggle[aria-expanded="true"] svg {
    transform: rotate(180deg);
}

/* Estado ativo do hamburger - transforma em X */
.hamburger.active span:nth-child(1) {
    transform: rotate(45deg) translate(5px, 5px);
}

.hamburger.active span:nth-child(2) {
    opacity: 0;
}

.hamburger.active span:nth-child(3) {
    transform: rotate(-45deg) translate(7px, -6px);
}

/* ================================
   ANIMAÇÕES
   ================================ */

/* Fade in suave */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Slide in from left */
@keyframes slideInLeft {
    from {
        opacity: 0;
        transform: translateX(-30px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

/* Slide in from right */
@keyframes slideInRight {
    from {
        opacity: 0;
        transform: translateX(30px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

/* Scale in (para elementos que crescem) */
@keyframes scaleIn {
    from {
        opacity: 0;
        transform: scale(0.95);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

/* ================================
   UTILITÁRIOS GERAIS
   ================================ */

/* Suavização de transições padrão */
* {
    transition: background-color 0.3s ease, color 0.3s ease, border-color 0.3s ease;
}

/* Remover sombras padrão quando necessário */
.no-shadow {
    box-shadow: none !important;
}

/* ================================
   FORMULÁRIOS
   ================================ */

/* Estilos de input com foco */
input:focus,
textarea:focus,
select:focus {
    outline: 2px solid var(--primary);
    outline-offset: 2px;
    box-shadow: 0 0 0 3px rgba(30, 58, 138, 0.1);
}

/* ================================
   CARDS E CONTAINERS
   ================================ */

/* Card com efeito hover */
.card-hover {
    transition: all 0.3s ease;
}

.card-hover:hover {
    transform: translateY(-4px);
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1);
}

/* ================================
   LINHA DE PRODUTOS
   ================================ */

.product-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 2rem;
}

.product-card {
    display: flex;
    flex-direction: column;
    min-height: 45rem;
    overflow: hidden;
    border-radius: 0.75rem;
    color: #fff;
    text-align: center;
    box-shadow: 0 10px 20px rgba(7, 20, 38, 0.12);
}

.product-card-image {
    height: 19rem;
    flex-shrink: 0;
    overflow: hidden;
}

.product-card-image img {
    width: 100%;
    height: 100%;
    display: block;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.product-card:hover .product-card-image img {
    transform: scale(1.04);
}

.product-card-content {
    display: flex;
    flex: 1;
    flex-direction: column;
    align-items: center;
    padding: 1.45rem 1.4rem 1.2rem;
}

.product-card-sst .product-card-content {
    background: #087eae;
}

.product-card-fac .product-card-content {
    background: #64c719;
}

.product-card-atas .product-card-content {
    background: #e9820c;
}

.product-card h2 {
    margin: 0 0 0.45rem;
    color: #fff;
    font-size: clamp(2rem, 3vw, 2.7rem);
    font-weight: 800;
    line-height: 1;
}

.product-card h3 {
    max-width: 18rem;
    margin: 0 0 1rem;
    color: #fff;
    font-size: 0.9rem;
    font-weight: 700;
    line-height: 1.35;
}

.product-card p {
    max-width: 19rem;
    margin: 0;
    color: #fff;
    font-size: 0.82rem;
    line-height: 1.55;
}

.product-card-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 3.5rem;
    margin-top: auto;
    padding: 0.75rem 1.6rem;
    border-radius: 999px;
    color: #fff;
    font-size: 0.69rem;
    font-weight: 800;
    letter-spacing: 0.08em;
    line-height: 1.35;
    text-transform: uppercase;
    text-decoration: none;
    box-shadow: 0 8px 12px rgba(7, 20, 38, 0.2);
}

.product-card-sst .product-card-button {
    background: #075c87;
}

.product-card-fac .product-card-button {
    background: #398b08;
}

.product-card-atas .product-card-button {
    background: #995105;
}

.product-card-button:hover {
    filter: brightness(1.1);
    transform: translateY(-2px);
}

.product-card-certificate {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    margin-top: 1rem;
    color: #fff;
    font-size: 0.75rem;
    text-decoration: underline;
}

.product-card-certificate svg {
    width: 1.35rem;
    height: 1.35rem;
}

@media (max-width: 900px) {
    .product-card {
        min-height: 43rem;
    }
}

@media (max-width: 700px) {
    #mk_01 {
        height: 680px;
    }

    .first-slide-content {
        grid-template-columns: 1fr;
        gap: 1rem;
        width: calc(100% - 2rem);
        padding: 1.5rem 0;
    }

    .first-slide-copy {
        text-align: center;
    }

    .first-slide-copy :is(h1, h2) {
        margin-bottom: 0.75rem;
        font-size: clamp(1.5rem, 7vw, 2rem);
    }

    .first-slide-table {
        border-spacing: 0.5rem;
        font-size: 0.85rem;
    }

    .first-slide-table th,
    .first-slide-table td {
        height: 3.25rem;
        padding: 0.5rem 0.35rem;
    }

    .product-grid {
        grid-template-columns: 1fr;
    }

    .product-card {
        min-height: 0;
    }

    .product-card-image {
        height: 15rem;
    }

    .product-card-content {
        min-height: 28rem;
    }
}

/* ================================
   ACCESSIBILITY - ACESSIBILIDADE
   ================================ */

/* Remover focus visible padrão (cuidado: manter acessibilidade) */
:focus-visible {
    outline: 2px solid var(--primary);
    outline-offset: 2px;
}

/* Skip to main content link (para acessibilidade) */
.skip-to-main {
    position: absolute;
    top: -40px;
    left: 0;
    background: var(--primary);
}

body.page-utilatas {
    min-height: 100vh;
    background-color: #c46e0d;
}

body.page-utilatas main section:first-of-type {
    background-image: none !important;
    background-color: transparent !important;
    color: white;
}

body.page-utilatas main section:first-of-type h1,
body.page-utilatas main section:first-of-type h2,
body.page-utilatas main section:first-of-type h3,
body.page-utilatas main section:first-of-type p,
body.page-utilatas main section:first-of-type a,
body.page-utilatas main section:first-of-type span {
    color: white !important;
}

body.page-utilfac {
    min-height: 100vh;
    background-color: rgb(97, 191, 26);
}

body.page-utilfac main section:first-of-type {
    background-image: none !important;
    background-color: transparent !important;
    color: #1f2937;
}

body.page-utilfac main section:first-of-type h1,
body.page-utilfac main section:first-of-type h2,
body.page-utilfac main section:first-of-type h3,
body.page-utilfac main section:first-of-type p,
body.page-utilfac main section:first-of-type a,
body.page-utilfac main section:first-of-type span {
    color: #1f2937 !important;
}

body.page-utilsst {
    min-height: 100vh;
    background-color: #2563eb;
}

body.page-utilsst main section:first-of-type {
    background-image: none !important;
    background-color: transparent !important;
    color: white;
}

body.page-utilsst main section:first-of-type h1,
body.page-utilsst main section:first-of-type h2,
body.page-utilsst main section:first-of-type h3,
body.page-utilsst main section:first-of-type p,
body.page-utilsst main section:first-of-type a,
body.page-utilsst main section:first-of-type span {
    color: white !important;
}

.skip-to-main {
    position: absolute;
    top: -40px;
    left: 0;
    background: var(--primary);
    color: white;
    padding: 8px;
    text-decoration: none;
    z-index: 100;
}

.skip-to-main:focus {
    top: 0;
}

/* ================================
   RESPONSIVIDADE - BREAKPOINTS
   ================================ */

/* Extra small: 0px - 640px (mobile) */
@media (max-width: 640px) {
    /* Ajustes para telas muito pequenas */
    html {
        font-size: 14px;
    }
}

/* Small: 640px - 768px (landscape mobile) */
@media (max-width: 768px) {
    /* Ajustes para tablets pequenos */
}

/* Medium: 768px - 1024px (tablets) */
@media (max-width: 1024px) {
    /* Ajustes para tablets normais */
}

/* Large: 1024px - 1280px (laptops pequenos) */
@media (max-width: 1280px) {
    /* Ajustes para telas de laptop menores */
}

/* ================================
   MODO ESCURO (Futuro)
   ================================ */

/* Preparado para modo escuro
@media (prefers-color-scheme: dark) {
    :root {
        --primary: #3B82F6;
        --secondary: #10B981;
    }
}
*/

/* ================================
   PRINT STYLES (Impressão)
   ================================ */

@media print {
    header,
    footer,
    .no-print {
        display: none;
    }
    
    body {
        font-size: 12pt;
        color: #000;
    }
}
