/* 
    ==========================================================================
    Conecta Ponto e Acesso - CSS Principal
    ==========================================================================
    Estrutura:
    1. Variáveis e Reset
    2. Componentes Globais (Botões, Container)
    3. Cabeçalho e Navegação
    4. Mega Menu
    5. Seções (Hero, Bento, Soluções)
    6. Rodapé
    7. Responsividade
    ==========================================================================
*/

:root {
    /* Cores Principais */
    --primary: #00C878;
    --primary-dark: #00A663;
    --dark: #07141F;
    --bg: #F7FAF8;
    --text: #10201A;
    --muted: #66736D;
    --card: #FFFFFF;
    --glass: rgba(255, 255, 255, 0.8);
    
    /* Bordas e Sombras */
    --radius-lg: 40px;
    --radius-md: 24px;
    --radius-sm: 16px;
    --transition: all 0.4s cubic-bezier(0.23, 1, 0.32, 1);
}

/* Reset Base */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    -webkit-font-smoothing: antialiased;
}

body {
    font-family: 'Inter', sans-serif;
    background-color: var(--bg);
    color: var(--text);
    overflow-x: hidden;
    line-height: 1.6;
}

h1,
h2,
h3,
h4 {
    font-family: 'Sora', sans-serif;
    font-weight: 700;
    line-height: 1.2;
}

a {
    text-decoration: none;
    color: inherit;
    transition: var(--transition);
}

ul {
    list-style: none;
}

img {
    max-width: 100%;
    height: auto;
    display: block;
}

.container {
    max-width: 1440px;
    margin: 0 auto;
    padding: 0 40px;
}

@media (max-width: 768px) {
    .container {
        padding: 0 24px;
    }
}

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 18px 32px;
    border-radius: 100px;
    font-weight: 600;
    font-size: 16px;
    cursor: pointer;
    border: none;
    gap: 12px;
    transition: var(--transition);
}

.btn-primary {
    background-color: var(--primary);
    color: white;
}

.btn-primary:hover {
    background-color: var(--primary-dark);
    transform: translateY(-4px);
    box-shadow: 0 10px 20px rgba(0, 200, 120, 0.2);
}

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

.btn-dark:hover {
    background-color: #0c1f2e;
    transform: translateY(-4px);
    box-shadow: 0 10px 20px rgba(7, 20, 31, 0.2);
}

.btn-outline {
    background-color: transparent;
    border: 2px solid #E2E8F0;
    color: var(--text);
}

.btn-outline:hover {
    border-color: var(--primary);
    color: var(--primary);
    transform: translateY(-4px);
}

/* Header */
header {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 2000; /* High z-index to stay above hero */
    padding: 24px 0;
    transition: all 0.3s ease;
    background-color: transparent;
}

header.scrolled {
    background-color: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    padding: 12px 0;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
}

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

.logo img {
    height: 40px;
    width: auto;
    transition: var(--transition);
}

header.scrolled .logo img {
    filter: none !important;
}

header.on-banner:not(.scrolled) .logo img {
    filter: brightness(0) invert(1);
}

.logo span {
    color: var(--primary);
}

nav ul {
    display: flex;
    gap: 32px;
}

nav ul li a {
    font-weight: 500;
    font-size: 15px;
    color: var(--muted); /* Default dark for white backgrounds */
    transition: var(--transition);
}

header.on-banner:not(.scrolled) nav ul li a {
    color: white; /* White only when on a dark banner */
}

header.scrolled nav ul li a {
    color: var(--muted) !important;
}

nav ul li a:hover {
    color: var(--primary);
}

.header-cta .btn {
    padding: 12px 24px;
    font-size: 14px;
}

/* Mega Menu */
.has-mega {
    position: static;
}

.mega-menu {
    position: absolute;
    top: 100%;
    left: 0;
    width: 100%;
    background: white;
    padding: 0;
    opacity: 0;
    visibility: hidden;
    transform: translateY(20px);
    transition: var(--transition);
    box-shadow: 0 30px 60px rgba(0, 0, 0, 0.1);
    border-top: 1px solid rgba(0, 0, 0, 0.05);
    z-index: -1;
    display: flex;
    min-height: 400px;
}

header.scrolled .mega-menu {
    background: rgba(255, 255, 255, 0.98);
    backdrop-filter: blur(20px);
}

.has-mega:hover .mega-menu {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.mega-sidebar {
    width: 300px;
    background: #F8FAFC;
    padding: 40px 0;
    border-right: 1px solid rgba(0, 0, 0, 0.05);
}

.mega-nav-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px 40px;
    font-weight: 600;
    color: var(--muted);
    cursor: pointer;
    transition: var(--transition);
}

.mega-nav-item:hover,
.mega-nav-item.active {
    background: white;
    color: var(--primary);
}

.mega-nav-item i {
    font-size: 12px;
    opacity: 0;
    transform: translateX(-10px);
    transition: var(--transition);
}

.mega-nav-item:hover i,
.mega-nav-item.active i {
    opacity: 1;
    transform: translateX(0);
}

.mega-panels {
    flex: 1;
    padding: 40px;
    position: relative;
}

.mega-panel {
    display: none;
    grid-template-columns: repeat(4, 1fr);
    gap: 20px;
    animation: fadeIn 0.4s ease-out;
}

.mega-panel.active {
    display: grid;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.mega-item {
    display: flex;
    flex-direction: column;
    gap: 12px;
    padding: 12px;
    border-radius: var(--radius-sm);
    transition: var(--transition);
}

.mega-item:hover {
    background: #F1F5F9;
    transform: translateY(-5px);
}

.mega-item img {
    width: 100%;
    height: 140px;
    object-fit: cover;
    border-radius: 12px;
}

.mega-item h4 {
    font-size: 15px;
    color: var(--text);
    margin-top: 8px;
}

.mega-item p {
    font-size: 13px;
    color: var(--muted);
    line-height: 1.4;
}

.nav-link {
    position: relative;
    padding-bottom: 8px;
}

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

.nav-link:hover::after {
    width: 100%;
}

@media (max-width: 1024px) {
    .menu-toggle {
        display: flex !important;
    }

    nav {
        position: fixed;
        top: 0;
        right: -100%;
        width: 100%;
        max-width: 400px;
        height: 100vh;
        background: white;
        z-index: 2000;
        padding: 80px 30px;
        transition: var(--transition);
        box-shadow: -20px 0 60px rgba(0, 0, 0, 0.1);
        display: flex !important;
        flex-direction: column;
        overflow-y: auto;
        -webkit-overflow-scrolling: touch;
        overscroll-behavior: contain;
    }

    nav.active {
        right: 0;
    }

    nav ul {
        flex-direction: column;
        gap: 24px;
    }

    nav ul li a {
        font-size: 20px;
        color: var(--text);
        display: block;
        width: 100%;
    }

    .mega-menu {
        position: static;
        opacity: 1;
        visibility: visible;
        transform: none;
        padding: 0;
        box-shadow: none;
        border: none;
        max-height: 0;
        overflow: hidden;
        transition: max-height 0.5s ease-in-out;
        display: block !important;
        min-height: 0;
        background: transparent !important;
    }

    .has-mega.active .mega-menu {
        max-height: 2000px;
        margin-top: 20px;
    }

    .mega-sidebar {
        display: none;
    }

    .mega-panels {
        padding: 0;
    }

    .mega-panel {
        display: block !important;
        opacity: 1 !important;
        transform: none !important;
        animation: none !important;
        margin-bottom: 30px !important;
        visibility: visible !important;
    }

    .mega-panel::before {
        content: attr(id);
        display: block !important;
        font-weight: 700 !important;
        text-transform: capitalize !important;
        margin-bottom: 15px !important;
        margin-top: 10px !important;
        color: var(--primary) !important;
        font-size: 13px !important;
        letter-spacing: 1.5px !important;
        opacity: 0.8 !important;
    }

    #ponto::before {
        content: "Sistema de Ponto";
    }

    #acesso::before {
        content: "Controle de Acesso";
    }

    #seguranca::before {
        content: "Alta Segurança";
    }

    #crachas::before {
        content: "Crachás e Cordões";
    }

    .mega-item {
        display: flex !important;
        flex-direction: row !important;
        align-items: center !important;
        padding: 12px !important;
        background: #F8FAFC !important;
        margin-bottom: 10px !important;
        gap: 15px !important;
        width: 100% !important;
    }

    .mega-item img {
        width: 50px;
        height: 50px;
        border-radius: 8px;
    }

    .mega-item h4 {
        font-size: 14px;
        margin: 0;
    }

    .mega-item p {
        display: none;
    }

    .header-cta {
        display: none;
    }
}

.menu-toggle {
    display: none;
    flex-direction: column;
    gap: 6px;
    cursor: pointer;
    z-index: 2001;
}

.menu-toggle span {
    width: 30px;
    height: 2px;
    background: var(--dark); /* Default dark */
    transition: var(--transition);
}

header.on-banner:not(.scrolled) .menu-toggle span {
    background: white; /* White only on banner */
}

header.scrolled .menu-toggle span {
    background: var(--dark) !important;
}

.menu-toggle.active span:nth-child(1) {
    transform: translateY(8px) rotate(45deg);
}

.menu-toggle.active span:nth-child(2) {
    opacity: 0;
}

.menu-toggle.active span:nth-child(3) {
    transform: translateY(-8px) rotate(-45deg);
}

/* Hero */
.hero {
    padding-top: 180px;
    padding-bottom: 120px;
    overflow: hidden;
    position: relative;
}

.hero-grid {
    display: grid;
    grid-template-columns: 1fr 1.2fr 1fr;
    gap: 40px;
    align-items: center;
}

.hero-text {
    text-align: center;
    grid-column: 1 / span 3;
    max-width: 900px;
    margin: 0 auto 80px auto;
}

.hero-text h1 {
    font-size: 72px;
    margin-bottom: 24px;
    letter-spacing: -2px;
    opacity: 1; /* Visible by default */
}

.hero-text p {
    font-size: 20px;
    color: var(--muted);
    margin-bottom: 40px;
    max-width: 700px;
    margin-left: auto;
    margin-right: auto;
    opacity: 1; /* Visible by default */
}

.hero-btns {
    display: flex;
    gap: 16px;
    justify-content: center;
    opacity: 1; /* Visible by default */
}

/* Mosaic Cards */
.mosaic-container {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 24px;
    margin-top: 40px;
}

.mosaic-card {
    background: var(--card);
    border-radius: var(--radius-md);
    padding: 24px;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.03);
    border: 1px solid rgba(0, 0, 0, 0.05);
    transition: var(--transition);
    position: relative;
    overflow: hidden;
    opacity: 1; /* Visible by default */
}

.mosaic-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 30px 60px rgba(0, 0, 0, 0.08);
}

.mosaic-card img {
    border-radius: var(--radius-sm);
    width: 100%;
    aspect-ratio: 1;
    object-fit: cover;
    margin-bottom: 16px;
}

.mosaic-card h4 {
    font-size: 18px;
    margin-bottom: 8px;
}

.mosaic-card p {
    font-size: 14px;
    color: var(--muted);
}

@media (max-width: 1024px) {
    .hero-text h1 {
        font-size: 56px;
    }

    .mosaic-container {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 768px) {
    .hero-text h1 {
        font-size: 40px;
    }

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

    .hero {
        padding-top: 140px;
    }
}

/* Trusted By */
.trusted {
    padding: 80px 0;
    background-color: var(--card);
}

.trusted-title {
    text-align: center;
    font-size: 14px;
    text-transform: uppercase;
    letter-spacing: 2px;
    color: var(--muted);
    margin-bottom: 40px;
}

.trusted-scroll {
    display: flex;
    overflow: hidden;
    mask-image: linear-gradient(to right, transparent, black 15%, black 85%, transparent);
}

.trusted-flex {
    display: flex;
    gap: 60px;
    animation: scroll 40s linear infinite;
}

.trusted-item {
    font-size: 24px;
    font-weight: 700;
    color: #CBD5E0;
    white-space: nowrap;
    display: flex;
    align-items: center;
    gap: 12px;
}

.trusted-item i {
    font-size: 32px;
}

@keyframes scroll {
    0% {
        transform: translateX(0);
    }

    100% {
        transform: translateX(-50%);
    }
}

/* Main Value - Bento Grid */
.bento-section {
    padding: 120px 0;
}

.section-header {
    text-align: center;
    max-width: 700px;
    margin: 0 auto 80px auto;
}

.section-header h2 {
    font-size: 48px;
    margin-bottom: 24px;
}

.bento-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    grid-template-rows: repeat(2, 300px);
    gap: 24px;
}

.bento-item {
    background: var(--card);
    border-radius: var(--radius-md);
    padding: 40px;
    border: 1px solid rgba(0, 0, 0, 0.05);
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    transition: var(--transition);
}

.bento-item:hover {
    border-color: var(--primary);
}

.bento-item i {
    font-size: 32px;
    color: var(--primary);
    margin-bottom: 24px;
}

.bento-item h3 {
    font-size: 22px;
    margin-bottom: 12px;
}

.bento-item p {
    color: var(--muted);
    font-size: 16px;
}

.bento-item.large {
    grid-column: span 2;
    background: var(--dark);
    color: white;
}

.bento-item.large i {
    color: var(--primary);
}

.bento-item.large p {
    color: #94A3B8;
}

@media (max-width: 1024px) {
    .bento-grid {
        grid-template-columns: repeat(2, 1fr);
        grid-template-rows: auto;
    }

    .bento-item.large {
        grid-column: span 2;
    }
}

@media (max-width: 768px) {
    .bento-grid {
        grid-template-columns: 1fr;
    }

    .bento-item.large {
        grid-column: span 1;
    }

    .section-header h2 {
        font-size: 32px;
    }
}

/* Solutions */
.solutions {
    padding: 120px 0;
    background-color: var(--dark);
    color: white;
    border-radius: var(--radius-lg);
    margin: 0 20px;
}

.solutions-header {
    margin-bottom: 80px;
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
}

.solutions-header h2 {
    font-size: 48px;
    max-width: 600px;
}

.solutions-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 32px;
}

.solution-card {
    background: rgba(255, 255, 255, 0.05);
    border-radius: var(--radius-md);
    padding: 40px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    transition: var(--transition);
    display: flex;
    flex-direction: column;
    gap: 24px;
}

.solution-card:hover {
    background: rgba(255, 255, 255, 0.1);
    transform: translateY(-12px);
}

.solution-card img {
    border-radius: var(--radius-sm);
    height: 240px;
    object-fit: cover;
}

.solution-card h3 {
    font-size: 24px;
}

.solution-card p {
    color: #94A3B8;
}

.solution-tag {
    display: inline-block;
    padding: 6px 12px;
    background: rgba(0, 200, 120, 0.2);
    color: var(--primary);
    border-radius: 100px;
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
    width: fit-content;
}

@media (max-width: 1024px) {
    .solutions-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 768px) {
    .solutions-grid {
        grid-template-columns: 1fr;
    }

    .solutions-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 24px;
    }

    .solutions-header h2 {
        font-size: 32px;
    }
}

/* Legal Security */
.legal {
    padding: 140px 0;
    background: linear-gradient(to bottom, #F7FAF8, #FFFFFF);
}

.legal-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 80px;
    align-items: center;
}

.legal-badge {
    background: white;
    padding: 40px;
    border-radius: var(--radius-md);
    box-shadow: 0 40px 80px rgba(0, 200, 120, 0.1);
    position: relative;
}

.legal-badge::after {
    content: '';
    position: absolute;
    inset: 0;
    border: 2px solid var(--primary);
    border-radius: var(--radius-md);
    opacity: 0.2;
    transform: scale(1.05);
}

.legal-item {
    display: flex;
    gap: 20px;
    margin-bottom: 32px;
}

.legal-item i {
    width: 48px;
    height: 48px;
    background: rgba(0, 200, 120, 0.1);
    color: var(--primary);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    font-size: 20px;
}

@media (max-width: 768px) {
    .legal-content {
        grid-template-columns: 1fr;
        gap: 40px;
    }
}

/* How it Works */
.how {
    padding: 120px 0;
}

.steps {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 24px;
    position: relative;
}

.step {
    text-align: center;
    position: relative;
}

.step-num {
    width: 64px;
    height: 64px;
    background: var(--card);
    border: 2px solid #E2E8F0;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 24px auto;
    font-family: 'Sora', sans-serif;
    font-weight: 700;
    font-size: 20px;
    transition: var(--transition);
}

.step:hover .step-num {
    border-color: var(--primary);
    color: var(--primary);
    transform: scale(1.1);
}

.step p {
    font-weight: 600;
    font-size: 16px;
}

@media (max-width: 1024px) {
    .steps {
        grid-template-columns: repeat(3, 1fr);
    }
}

@media (max-width: 768px) {
    .steps {
        grid-template-columns: 1fr;
    }
}

/* Footer / Final CTA */
.cta-final {
    padding: 120px 0;
    background: var(--primary);
    color: white;
    text-align: center;
    border-radius: var(--radius-lg) var(--radius-lg) 0 0;
}

.cta-final h2 {
    font-size: 56px;
    margin-bottom: 40px;
    max-width: 800px;
    margin-left: auto;
    margin-right: auto;
}

@media (max-width: 768px) {
    .cta-final h2 {
        font-size: 32px;
    }
}

footer {
    background: var(--dark);
    color: white;
    padding: 80px 0 40px 0;
}

.footer-grid {
    display: grid;
    grid-template-columns: 1.5fr 1fr 1fr 1fr;
    gap: 60px;
    margin-bottom: 80px;
}

.footer-logo img {
    height: 40px;
    width: auto;
    margin-bottom: 24px;
}

.footer-logo span {
    color: var(--primary);
}

.footer-col h4 {
    margin-bottom: 24px;
    font-size: 18px;
}

.footer-col ul li {
    margin-bottom: 12px;
}

.footer-col ul li a {
    color: #94A3B8;
    font-size: 15px;
}

.footer-col ul li a:hover {
    color: var(--primary);
}

.footer-bottom {
    padding-top: 40px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    display: flex;
    justify-content: space-between;
    color: #64748B;
    font-size: 14px;
}

@media (max-width: 1024px) {
    .footer-grid {
        grid-template-columns: 1fr 1fr;
    }
}

@media (max-width: 768px) {
    .footer-grid {
        grid-template-columns: 1fr;
        gap: 40px;
    }

    .footer-bottom {
        flex-direction: column;
        gap: 20px;
        text-align: center;
    }
}

/* Product Pages Hero */
.product-hero {
    padding: 180px 0 100px;
    background: var(--bg);
    position: relative;
}

.product-hero.full-hero {
    min-height: 80vh;
    display: flex;
    align-items: center;
    background-size: cover;
    background-position: center;
    padding: 0;
}

.product-hero.full-hero::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(90deg, rgba(7, 20, 31, 0.8) 0%, rgba(7, 20, 31, 0.4) 50%, transparent 100%);
    z-index: 1;
}

.product-hero.full-hero .container {
    position: relative;
    z-index: 2;
    display: flex;
    justify-content: flex-start;
    width: 100%;
}

.product-hero.full-hero .product-info {
    max-width: 600px;
    color: white;
    text-align: left;
}

.product-hero.full-hero .product-info h1 {
    color: white;
}

.product-hero.full-hero .product-info p {
    color: rgba(255, 255, 255, 0.8);
}

.product-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 80px;
    align-items: center;
}

.product-image img {
    width: 100%;
    border-radius: var(--radius-md);
    box-shadow: 0 40px 80px rgba(0, 0, 0, 0.1);
}

.product-info h1 {
    font-size: 56px;
    margin-bottom: 24px;
}

.product-info p {
    font-size: 20px;
    color: var(--muted);
    margin-bottom: 40px;
}

@media (max-width: 768px) {
    .product-grid {
        grid-template-columns: 1fr;
        gap: 40px;
    }
    .product-info h1 {
        font-size: 40px;
    }
}

/* Full Width Banner */
.full-banner {
    width: 100%;
    margin-top: 80px;
    overflow: hidden;
}

.full-banner img {
    width: 100%;
    height: auto;
    display: block;
}
