/* ========================================
   NETALIGN 360° - MAIN STYLESHEET
   Baseado no Brand Book oficial
   ======================================== */

/* ========================================
   CSS CUSTOM PROPERTIES (VARIÁVEIS)
   ======================================== */
:root {
    /* Cores Primárias - Brand Book */
    --color-primary: #0078AA;          /* Azul-Turquesa */
    --color-accent: #FF6F3C;           /* Laranja Vibrante */
    --color-premium: #FFD700;          /* Dourado */
    --color-premium-light: #FFE55C;    /* Dourado Claro */
    --color-blue: #0078AA;             /* Azul (substitui verde) */
    
    /* Cores Secundárias - Brand Book */
    --color-neutral-light: #E9EBEB;    /* Cinza Prateado */
    --color-neutral-dark: #2A2A2A;     /* Cinza Escuro (mais suave) */
    --color-background: #F8F9FA;       /* Fundo Claro */
    --color-background-alt: #FFFFFF;   /* Fundo Alternativo */
    --color-surface: #FFFFFF;          /* Superfície de Cards */
    
    /* Cores de Status - Derivadas da Identidade */
    --color-success: #00A550;          /* Verde derivado do azul */
    --color-warning: #FFA500;          /* Laranja suavizado */
    --color-danger: #D63638;           /* Vermelho suavizado */
    --color-info: #0078AA;             /* Mesmo do primary */
    
    /* Tons de Cinza Atualizados */
    --color-text-primary: #1A1A1A;     /* Texto Principal */
    --color-text-secondary: #4A4A4A;   /* Texto Secundário */
    --color-text-muted: #6B7280;       /* Texto Suave */
    --color-border: #E5E7EB;           /* Bordas */
    --color-border-hover: #D1D5DB;     /* Bordas Hover */
    
    /* Tipografia - Brand Book */
    --font-primary: 'Montserrat', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    --font-body: 'Open Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    
    /* Hierarquia Tipográfica - Brand Book */
    --font-size-h1: clamp(2rem, 5vw, 2.5rem);    /* 32px/40px */
    --font-size-h2: clamp(1.5rem, 4vw, 1.875rem); /* 24px/30px */
    --font-size-h3: 1.125rem;                     /* 18px/24px */
    --font-size-body: 1rem;                       /* 16px/20px */
    --font-size-small: 0.875rem;                  /* 14px/18px */
    
    /* Espaçamentos */
    --container-width: min(90%, 1200px);
    --container-padding: 1rem;
    --section-padding: 4rem 0;
    --card-padding: 2rem;
    
    /* Sombras e Efeitos */
    --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
    --shadow-primary: 0 4px 20px rgba(0, 120, 170, 0.15);
    --shadow-accent: 0 4px 20px rgba(255, 111, 60, 0.15);
    
    /* Border Radius */
    --radius-sm: 4px;
    --radius-md: 8px;
    --radius-lg: 12px;
    --radius-xl: 16px;
    --radius-full: 9999px;
    
    /* Transições */
    --transition-fast: 0.15s ease-out;
    --transition-base: 0.3s ease-out;
    --transition-slow: 0.5s ease-out;
}

/* ========================================
   RESET E BASE STYLES
   ======================================== */
*,
*::before,
*::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
    font-size: 16px;
}

body {
    font-family: var(--font-body);
    background: var(--color-background);
    color: var(--color-text-primary);
    line-height: 1.6;
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* ========================================
   UTILITY CLASSES
   ======================================== */
.container {
    width: var(--container-width);
    margin: 0 auto;
    padding: 0 var(--container-padding);
}

.visually-hidden {
    position: absolute !important;
    width: 1px !important;
    height: 1px !important;
    padding: 0 !important;
    margin: -1px !important;
    overflow: hidden !important;
    clip: rect(0, 0, 0, 0) !important;
    white-space: nowrap !important;
    border: 0 !important;
}

.text-center { text-align: center; }
.text-left { text-align: left; }
.text-right { text-align: right; }

.highlight {
    color: var(--color-accent);
    font-weight: 700;
}

.loss-counter {
    color: var(--color-accent);
    font-weight: 700;
    animation: pulse 2s infinite;
}

.social-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: var(--radius-full);
    text-decoration: none;
    font-size: 1.2rem;
    transition: all var(--transition-base);
}

.social-link:hover {
    background: var(--color-primary);
    transform: translateY(-2px);
}

/* ========================================
   HEADER E NAVEGAÇÃO
   ======================================== */
.header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    z-index: 1000;
    border-bottom: 1px solid var(--color-border);
    box-shadow: var(--shadow-sm);
    transition: all var(--transition-base);
}

.header.scrolled {
    background: rgba(255, 255, 255, 0.98);
    box-shadow: var(--shadow-md);
}

.header__content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 0;
    min-height: 70px;
}

.logo {
    font-family: var(--font-primary);
    font-weight: 700;
    font-size: 1.5rem;
    color: var(--color-primary);
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: 0.75rem;
    transition: color var(--transition-base);
}

.logo:hover {
    color: #005f8a;
}

.logo::before {
    content: '';
    width: 40px;
    height: 40px;
    background: url('https://netalign.com.br/marca/icone.png') no-repeat center;
    background-size: contain;
    display: block;
}

.nav {
    display: flex;
    gap: 2rem;
    align-items: center;
}

.nav__link {
    color: var(--color-text-secondary);
    text-decoration: none;
    font-weight: 600;
    font-size: 0.9rem;
    transition: all var(--transition-base);
    position: relative;
    padding: 0.5rem 0;
}

.nav__link:hover {
    color: var(--color-primary);
}

.nav__link::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--color-primary);
    transition: width var(--transition-base);
}

.nav__link:hover::after,
.nav__link--active::after {
    width: 100%;
}

.nav__link--active {
    color: var(--color-primary);
}

.nav__link--login {
    color: var(--color-premium);
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 0.3rem;
}

.nav__link--login:hover {
    color: #E6C200;
}

.menu-toggle {
    display: none;
    background: none;
    border: none;
    color: var(--color-text-primary);
    font-size: 1.5rem;
    cursor: pointer;
    padding: 0.5rem;
    border-radius: var(--radius-md);
    transition: background-color var(--transition-base);
}

.menu-toggle:hover {
    background-color: var(--color-background);
}

/* ========================================
   BUTTONS
   ======================================== */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.75rem 1.5rem;
    border-radius: var(--radius-md);
    text-decoration: none;
    font-weight: 600;
    font-family: var(--font-primary);
    font-size: 0.9rem;
    cursor: pointer;
    border: none;
    transition: all var(--transition-base);
    white-space: nowrap;
    min-width: max-content;
}

.btn--primary {
    background: linear-gradient(135deg, var(--color-primary) 0%, #005f8a 100%);
    color: white;
    box-shadow: var(--shadow-primary);
}

.btn--primary:hover {
    background: linear-gradient(135deg, #005f8a 0%, var(--color-primary) 100%);
    transform: translateY(-1px);
    box-shadow: 0 8px 25px rgba(0, 120, 170, 0.25);
}

.btn--secondary {
    background: transparent;
    color: var(--color-primary);
    border: 2px solid var(--color-primary);
}

.btn--secondary:hover {
    background: var(--color-primary);
    color: white;
    transform: translateY(-1px);
}

.btn--accent {
    background: linear-gradient(135deg, var(--color-accent) 0%, #E55A2B 100%);
    color: white;
    box-shadow: var(--shadow-accent);
}

.btn--accent:hover {
    background: linear-gradient(135deg, #E55A2B 0%, var(--color-accent) 100%);
    transform: translateY(-1px);
}

.btn--large {
    padding: 1rem 2rem;
    font-size: 1rem;
    min-width: 200px;
}

.btn--small {
    padding: 0.5rem 1rem;
    font-size: 0.8rem;
}

.btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    transform: none !important;
}

/* ========================================
   MAIN CONTENT AREAS
   ======================================== */
.main {
    padding-top: 70px; /* Header height */
    min-height: 100vh;
}

.section {
    padding: var(--section-padding);
}

.section--alt {
    background: var(--color-background-alt);
}

.section--dark {
    background: var(--color-neutral-dark);
    color: white;
}

.section--primary {
    background: linear-gradient(135deg, var(--color-primary) 0%, #005f8a 100%);
    color: white;
}

.section__header {
    text-align: center;
    margin-bottom: 3rem;
}

.section__title {
    font-family: var(--font-primary);
    font-size: var(--font-size-h1);
    font-weight: 700;
    color: var(--color-text-primary);
    margin-bottom: 1rem;
    line-height: 1.2;
}

.section--dark .section__title,
.section--primary .section__title {
    color: white;
}

.section__subtitle {
    font-size: var(--font-size-h3);
    color: var(--color-text-secondary);
    margin-bottom: 0.5rem;
}

.section--dark .section__subtitle,
.section--primary .section__subtitle {
    color: rgba(255, 255, 255, 0.9);
}

.section__description {
    font-size: 1.1rem;
    color: var(--color-text-muted);
    max-width: 600px;
    margin: 0 auto;
}

.section--dark .section__description,
.section--primary .section__description {
    color: rgba(255, 255, 255, 0.8);
}

/* ========================================
   HERO SECTION
   ======================================== */
.hero {
    background: linear-gradient(135deg, var(--color-background) 0%, var(--color-background-alt) 100%);
    padding: 6rem 0 4rem;
    position: relative;
    overflow: hidden;
}

.hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cg fill='%230078AA' fill-opacity='0.03'%3E%3Cpath d='M36 34v-4h-2v4h-4v2h4v4h2v-4h4v-2h-4zm0-30V0h-2v4h-4v2h4v4h2V6h4V4h-4zM6 34v-4H4v4H0v2h4v4h2v-4h4v-2H6zM6 4V0H4v4H0v2h4v4h2V6h4V4H6z'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E") repeat;
    opacity: 0.4;
    animation: float 60s infinite linear;
}

@keyframes float {
    0% { transform: translate3d(0, 0, 0); }
    100% { transform: translate3d(-60px, -60px, 0); }
}

.hero__content {
    position: relative;
    z-index: 1;
    text-align: center;
}

.hero__title {
    font-family: var(--font-primary);
    font-size: var(--font-size-h1);
    font-weight: 700;
    line-height: 1.2;
    margin-bottom: 1.5rem;
    color: var(--color-text-primary);
}

.hero__subtitle {
    font-size: 1.25rem;
    color: var(--color-primary);
    margin-bottom: 1rem;
    font-weight: 600;
}

.hero__description {
    font-size: 1.1rem;
    color: var(--color-text-secondary);
    margin-bottom: 2rem;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
}

.hero__cta {
    display: flex;
    gap: 1rem;
    justify-content: center;
    flex-wrap: wrap;
}

/* ========================================
   CARDS E COMPONENTES
   ======================================== */
.card {
    background: var(--color-surface);
    border-radius: var(--radius-lg);
    padding: var(--card-padding);
    box-shadow: var(--shadow-md);
    border: 1px solid var(--color-border);
    transition: all var(--transition-base);
}

.card:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
    border-color: var(--color-border-hover);
}

.card--primary {
    border-color: var(--color-primary);
    background: linear-gradient(135deg, rgba(0, 120, 170, 0.02) 0%, rgba(0, 120, 170, 0.05) 100%);
}

.card--accent {
    border-color: var(--color-accent);
    background: linear-gradient(135deg, rgba(255, 111, 60, 0.02) 0%, rgba(255, 111, 60, 0.05) 100%);
}

.card__header {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.card__icon {
    width: 60px;
    height: 60px;
    background: linear-gradient(135deg, var(--color-primary), var(--color-accent));
    border-radius: var(--radius-full);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    color: white;
    flex-shrink: 0;
}

.card__title {
    font-family: var(--font-primary);
    font-size: var(--font-size-h3);
    color: var(--color-text-primary);
    margin: 0;
    font-weight: 600;
}

.card__description {
    color: var(--color-text-secondary);
    line-height: 1.6;
}

/* ========================================
   GRIDS E LAYOUTS
   ======================================== */
.grid {
    display: grid;
    gap: 2rem;
}

.grid--2 {
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
}

.grid--3 {
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
}

.grid--4 {
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
}

.flex {
    display: flex;
    gap: 1rem;
}

.flex--center {
    justify-content: center;
    align-items: center;
}

.flex--between {
    justify-content: space-between;
    align-items: center;
}

.flex--column {
    flex-direction: column;
}

.flex--wrap {
    flex-wrap: wrap;
}

/* ========================================
   FORMS
   ======================================== */
.form {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.form-label {
    font-weight: 600;
    color: var(--color-text-primary);
    font-size: 0.9rem;
}

.form-input {
    padding: 0.875rem 1rem;
    border: 2px solid var(--color-border);
    border-radius: var(--radius-md);
    background: var(--color-surface);
    color: var(--color-text-primary);
    font-size: 1rem;
    font-family: var(--font-body);
    transition: all var(--transition-base);
    outline: none;
}

.form-input:focus {
    border-color: var(--color-primary);
    box-shadow: 0 0 0 3px rgba(0, 120, 170, 0.1);
}

.form-input::placeholder {
    color: var(--color-text-muted);
}

.form-input.error {
    border-color: #EF4444;
    background: #FEF2F2;
}

.error-message {
    color: #EF4444;
    font-size: 0.8rem;
    display: none;
}

.error-message.show {
    display: block;
}

/* ========================================
   METRICS E ESTATÍSTICAS
   ======================================== */
.metric {
    text-align: center;
    padding: 1.5rem;
    background: var(--color-surface);
    border-radius: var(--radius-lg);
    border: 1px solid var(--color-border);
    transition: all var(--transition-base);
}

.metric:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

.metric__value {
    font-size: 2.5rem;
    font-weight: 700;
    font-family: var(--font-primary);
    margin-bottom: 0.5rem;
    color: var(--color-primary);
}

.metric__value--accent {
    color: var(--color-accent);
}

.metric__value--premium {
    color: var(--color-premium);
}

.metric__value--blue {
    color: var(--color-blue);
}

.metric__label {
    color: var(--color-text-secondary);
    font-size: 0.9rem;
}

.metric__change {
    font-size: 0.8rem;
    margin-top: 0.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.3rem;
}

.metric__change--positive {
    color: var(--color-blue);
}

.metric__change--negative {
    color: #EF4444;
}

/* ========================================
   TESTIMONIALS
   ======================================== */
.testimonial {
    background: var(--color-surface);
    border-radius: var(--radius-lg);
    padding: 2rem;
    border: 1px solid var(--color-border);
    box-shadow: var(--shadow-sm);
}

.testimonial__quote {
    color: var(--color-text-primary);
    font-size: 1.1rem;
    line-height: 1.6;
    margin-bottom: 1.5rem;
    font-style: italic;
}

.testimonial__author {
    color: var(--color-primary);
    font-weight: 600;
    text-align: right;
    font-size: 0.9rem;
}

/* ========================================
   ANIMATIONS
   ======================================== */
@keyframes fadeInUp {
    0% {
        opacity: 0;
        transform: translateY(30px);
    }
    100% {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes pulse {
    0%, 100% {
        transform: scale(1);
        opacity: 1;
    }
    50% {
        transform: scale(1.05);
        opacity: 0.9;
    }
}

@keyframes countUp {
    0% {
        opacity: 0;
        transform: scale(0.8);
    }
    100% {
        opacity: 1;
        transform: scale(1);
    }
}

.animate {
    animation: fadeInUp 0.8s ease-out;
}

.animate-pulse {
    animation: pulse 2s infinite;
}

.animate-count {
    animation: countUp 1s ease-out;
}

/* ========================================
   RESPONSIVE DESIGN
   ======================================== */
@media (max-width: 1024px) {
    :root {
        --container-padding: 1rem;
        --section-padding: 3rem 0;
    }
}

@media (max-width: 768px) {
    :root {
        --container-padding: 1rem;
        --section-padding: 2rem 0;
        --card-padding: 1.5rem;
    }

    .nav {
        display: none;
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        background: white;
        flex-direction: column;
        padding: 2rem;
        border-top: 1px solid var(--color-border);
        box-shadow: var(--shadow-md);
    }

    .nav.active {
        display: flex;
    }

    .menu-toggle {
        display: block;
    }

    .hero {
        padding: 4rem 0 2rem;
    }

    .hero__title {
        font-size: 2rem;
        line-height: 1.3;
    }

    .hero__cta {
        flex-direction: column;
        align-items: center;
    }

    .btn {
        width: 100%;
        max-width: 300px;
        justify-content: center;
    }

    .grid {
        gap: 1.5rem;
    }

    .grid--2,
    .grid--3,
    .grid--4 {
        grid-template-columns: 1fr;
    }

    .card__header {
        flex-direction: column;
        text-align: center;
    }

    .flex--wrap {
        flex-direction: column;
    }

    .metric__value {
        font-size: 2rem;
    }
}

@media (max-width: 480px) {
    :root {
        --container-padding: 0.75rem;
    }

    .hero__title {
        font-size: 1.75rem;
    }

    .section__title {
        font-size: 1.5rem;
    }

    .card {
        padding: 1.5rem;
    }

    .btn {
        padding: 0.75rem 1rem;
        font-size: 0.9rem;
    }

    .btn--large {
        padding: 1rem 1.5rem;
    }

    .metric__value {
        font-size: 1.75rem;
    }
}

/* ========================================
   PRINT STYLES
   ======================================== */
@media print {
    * {
        background: transparent !important;
        color: black !important;
        box-shadow: none !important;
    }

    .header {
        position: static;
        box-shadow: none;
        border-bottom: 1px solid #ccc;
    }

    .btn {
        border: 1px solid #ccc;
        background: transparent !important;
        color: black !important;
    }

    .main {
        padding-top: 0;
    }
}

/* ========================================
   ACCESSIBILITY IMPROVEMENTS
   ======================================== */
@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}

/* Focus styles for better accessibility */
:focus-visible {
    outline: 2px solid var(--color-primary);
    outline-offset: 2px;
}

/* High contrast mode support */
@media (prefers-contrast: high) {
    :root {
        --color-border: #000000;
        --color-text-secondary: #000000;
        --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.3);
    }
}