:root {
    --primary: #1C3F92;
    --secondary: #B5136D;
    --bg-light: #EEE5F3;
    --text-dark: #333333;
    --accent: #63C3D7;
    --font-main: 'Sora', sans-serif;
}

html,
body {
    overflow-x: hidden;
    width: 100%;
}

footer a {
    text-decoration: none;
    color: white;
}

body {
    font-family: var(--font-main);
    color: var(--text-dark);
    margin: 0;
}

#solucoes a {
    text-decoration: none;
}

/* Sections */
section {
    display: flex;
    flex-direction: column;
    justify-content: center;
    position: relative;
    min-height: 100vh;
    will-change: filter;
    /* Optimize paint for blur */
    scroll-margin-top: 68px;
    /* Offset for fixed navbar */
}

/* Footer */
footer {
    position: sticky;
    top: 0;
    z-index: 100;
    background-color: #212529;
    /* Ensure background is opaque (bg-dark hex) */
}

/* Utilities */
.text-primary-custom {
    color: var(--primary) !important;
}

.text-secondary-custom {
    color: var(--secondary) !important;
}

.text-dark-custom {
    color: var(--text-dark) !important;
}

.text-accent {
    color: var(--accent) !important;
}

.bg-primary-custom {
    background-color: var(--primary) !important;
}

.bg-secondary-custom {
    background-color: var(--secondary) !important;
}

.bg-light-custom {
    background-color: var(--bg-light) !important;
}

.btn-primary {
    background-color: var(--secondary);
    /* Using secondary color for CTA buttons as per logic (Destaques e CTAs) or Primary? Prompt said Primary is authority, Secondary is Highlights/CTAs. */
    border-color: var(--secondary);
    transition: all 0.3s ease;
}

.btn-primary:hover {
    background-color: #920f58;
    border-color: #920f58;
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(181, 19, 109, 0.4);
}

.btn-secondary {
    background-color: transparent;
    border: 2px solid var(--secondary);
    color: var(--secondary);
    transition: all 0.3s ease;
}

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

.separator {
    width: 60px;
    height: 4px;
    background-color: var(--secondary);
    border-radius: 2px;
}

/* Navbar */
.navbar {
    transition: all 0.4s ease;
}

header.fixed-top {
    z-index: 1100;
    /* Ensure header is above menu backdrop (1040) */
}

.navbar.scrolled {
    background-color: rgba(28, 63, 146, 0.95) !important;
    backdrop-filter: blur(10px);
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    padding-top: 0.5rem !important;
    padding-bottom: 0.5rem !important;
}

.nav-link {
    font-weight: 400;
    position: relative;
    transition: color 0.3s ease;
}

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

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

/* --- Mobile Menu Styles --- */

/* Animated Hamburger */
.hamburger-icon {
    width: 32px;
    height: 24px;
    position: relative;
    cursor: pointer;
    z-index: 1051;
}

.hamburger-icon span {
    display: block;
    position: absolute;
    height: 3px;
    width: 100%;
    background: #fff;
    border-radius: 9px;
    opacity: 1;
    left: 0;
    transition: .3s ease-in-out;
    transform-origin: center;
}

.hamburger-icon span:nth-child(1) {
    top: 0px;
}

.hamburger-icon span:nth-child(2) {
    top: 10px;
}

.hamburger-icon span:nth-child(3) {
    top: 20px;
}

/* Toggler Open State */
.navbar-toggler[aria-expanded="true"] .hamburger-icon span:nth-child(1) {
    top: 10px;
    transform: rotate(45deg);
}

.navbar-toggler[aria-expanded="true"] .hamburger-icon span:nth-child(2) {
    opacity: 0;
    transform: translateX(-20px);
}

.navbar-toggler[aria-expanded="true"] .hamburger-icon span:nth-child(3) {
    top: 10px;
    transform: rotate(-45deg);
}

/* Mobile Drawer */
@media (max-width: 991.98px) {

    /* Backdrop for when menu is open */
    .menu-backdrop {
        position: fixed;
        top: 0;
        left: 0;
        width: 100vw;
        height: 100vh;
        background: rgba(0, 0, 0, 0.6);
        z-index: 1040;
        opacity: 0;
        visibility: hidden;
        transition: all 0.3s ease;
        backdrop-filter: blur(3px);
    }



    /* The collapse/menu container */
    .navbar-collapse {
        position: fixed;
        top: 0;
        left: 0;
        width: 100%;
        height: 100dvh;
        background: rgba(28, 63, 146, 0.98);
        /* Deep blue with slight transparency */
        backdrop-filter: blur(15px);
        display: flex !important;
        flex-direction: column;
        justify-content: center !important;
        align-items: center !important;
        padding: 2rem;
        opacity: 0;
        visibility: hidden;
        transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
        z-index: 1050;
        /* Remove sidebar specific properties */
        border-left: none;
        max-width: none;
        transform: none;
        right: auto;
    }

    .navbar-collapse.mobile-visible {
        opacity: 1;
        visibility: visible;
        /* No transform needed for fade-in */
    }

    .navbar-nav {
        text-align: center;
        width: 100%;
        gap: 1.5rem;
    }

    .navbar-nav .nav-item {
        transform: translateY(20px);
        opacity: 0;
        transition: all 0.4s ease;
    }

    .navbar-collapse.mobile-visible .navbar-nav .nav-item {
        transform: translateY(0);
        opacity: 1;
    }

    /* Stagger delays */
    .navbar-collapse.mobile-visible .nav-item:nth-child(1) {
        transition-delay: 0.1s;
    }

    .navbar-collapse.mobile-visible .nav-item:nth-child(2) {
        transition-delay: 0.2s;
    }

    .navbar-collapse.mobile-visible .nav-item:nth-child(3) {
        transition-delay: 0.3s;
    }

    .navbar-collapse.mobile-visible .nav-item:nth-child(4) {
        transition-delay: 0.4s;
    }

    .navbar-collapse.mobile-visible .nav-item:nth-child(5) {
        transition-delay: 0.5s;
    }

    /* Make links bigger on mobile */
    .nav-link {
        font-size: 2rem;
        font-weight: 700;
        color: #fff !important;
        position: relative;
        display: inline-block;
        padding: 0.5rem 0;
    }

    .nav-link::after {
        content: '';
        position: absolute;
        width: 0;
        height: 2px;
        bottom: 0;
        left: 50%;
        background-color: var(--accent);
        transition: all 0.3s ease;
        transform: translateX(-50%);
    }

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

    .btn-secondary {
        /* Adjust CTA button on mobile menu */
        width: 100%;
        max-width: 200px;
        margin-top: 1rem;
        font-size: 1.2rem;
    }
}

/* Hero Section */
.hero {
    min-height: 100vh;
    background: url('../assets/images/hero-bg.png') no-repeat center center/cover;
    position: relative;
    padding-top: 80px;
    /* Offset for fixed navbar */
}

.hero .overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, rgba(28, 63, 146, 0.85) 0%, rgba(0, 0, 0, 0.7) 100%);
}

.hero h1 {
    letter-spacing: -1px;
    line-height: 1.2;
}

/* Cards / Solutions */
.solution-card {
    transition: all 0.3s ease;
    background: white;
    border-radius: 12px;
    overflow: hidden;
}

.solution-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 15px 30px rgba(0, 0, 0, 0.1) !important;
}

.solution-card .icon-box {
    width: 80px;
    height: 80px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    background-color: rgba(28, 63, 146, 0.05);
    transition: all 0.3s ease;
    color: var(--primary) !important;
}

.solution-card:hover .icon-box {
    background-color: var(--primary);
    color: white !important;
}

/* Why Us */
.text-accent i {
    color: var(--secondary);
}

/* Manifesto */
.fa-quote-left {
    color: var(--primary);
}

/* Footer */
.btn-icon {
    width: 40px;
    height: 40px;
    padding: 0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-color: rgba(255, 255, 255, 0.2);
    transition: all 0.3s ease;
}

.btn-icon:hover {
    background-color: var(--secondary);
    border-color: var(--secondary);
    color: white;
}

.hover-accent:hover {
    color: var(--accent) !important;
}

/* Animations */
[data-aos] {
    pointer-events: none;
}

[data-aos].aos-animate {
    pointer-events: auto;
}

/* --- Visual Enhancements --- */

/* Gradient Text */
.text-gradient {
    background: linear-gradient(135deg, var(--primary) 0%, var(--secondary) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    color: transparent;
}

.text-gradient-accent {
    background: linear-gradient(135deg, var(--secondary) 0%, var(--accent) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    color: transparent;
}

/* Enhanced Buttons */
.btn-primary {
    background: linear-gradient(45deg, var(--primary), var(--secondary));
    border: none;
    position: relative;
    z-index: 1;
    overflow: hidden;
}

.btn-primary::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(45deg, var(--secondary), var(--primary));
    z-index: -1;
    transition: opacity 0.3s ease;
    opacity: 0;
}

.btn-primary:hover::before {
    opacity: 1;
}

.btn-primary:hover {
    transform: translateY(-3px);
    box-shadow: 0 10px 20px rgba(181, 19, 109, 0.4);
}

.btn-outline-light:hover {
    background-color: rgba(255, 255, 255, 0.1);
    border-color: #fff;
    box-shadow: 0 0 15px rgba(255, 255, 255, 0.3);
}

/* Enhanced Cards - Modernized */
.solution-card {
    position: relative;
    z-index: 1;
    border: 1px solid rgba(28, 63, 146, 0.05);
    /* Subtle border */
    background: #fff;
    transition: all 0.4s cubic-bezier(0.165, 0.84, 0.44, 1);
    border-radius: 16px;
    overflow: hidden;
}

/* Dark Mode on Hover Background */
.solution-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, var(--primary) 0%, rgb(18, 41, 98) 100%);
    z-index: -1;
    opacity: 0;
    transition: opacity 0.4s ease;
}

/* Hover State */
.solution-card:hover {
    transform: translateY(-8px) scale(1.02);
    box-shadow: 0 20px 40px rgba(28, 63, 146, 0.3) !important;
    border-color: transparent;
}

.solution-card:hover::before {
    opacity: 1;
}

/* Interior Elements Transition */
.solution-card .card-body {
    position: relative;
    z-index: 2;
}

.solution-card h3,
.solution-card p,
.solution-card .icon-box i {
    transition: color 0.3s ease;
}

/* Text Colors on Hover */
.solution-card:hover h3 {
    color: #fff !important;
}

.solution-card:hover p.text-muted {
    color: rgba(255, 255, 255, 0.8) !important;
}

/* Icon Box Modernization */
.solution-card .icon-box {
    width: 90px;
    height: 90px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 20px;
    /* Softer square */
    background-color: rgba(28, 63, 146, 0.04);
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    /* Bouncy transition */
    color: var(--primary) !important;
    margin-bottom: 1.5rem !important;
    position: relative;
}

.solution-card:hover .icon-box {
    background-color: rgba(255, 255, 255, 0.0);
    /* Glass effect on dark bg */
    color: var(--accent) !important;
    transform: scale(1.1) rotate(5deg);
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.2);
}

/* Tech Background Particles */
.tech-bg {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    overflow: hidden;
    z-index: 0;
    pointer-events: none;
}

.tech-particle {
    position: absolute;
    border-radius: 50%;
    background: var(--accent);
    opacity: 0.1;
    filter: blur(40px);
    animation: float 20s infinite ease-in-out;
}

.tech-particle:nth-child(1) {
    width: 300px;
    height: 300px;
    top: -50px;
    left: -100px;
    background: var(--primary);
    animation-delay: 0s;
}

.tech-particle:nth-child(2) {
    width: 200px;
    height: 200px;
    bottom: 10%;
    right: -50px;
    background: var(--secondary);
    animation-delay: -5s;
}

.tech-particle:nth-child(3) {
    width: 150px;
    height: 150px;
    top: 40%;
    left: 20%;
    animation-delay: -10s;
}

@keyframes float {

    0%,
    100% {
        transform: translate(0, 0);
    }

    50% {
        transform: translate(30px, -50px);
    }
}

/* Grid Overlay */
.grid-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image:
        linear-gradient(rgba(28, 63, 146, 0.03) 1px, transparent 1px),
        linear-gradient(90deg, rgba(28, 63, 146, 0.03) 1px, transparent 1px);
    background-size: 50px 50px;
    z-index: 0;
    pointer-events: none;
}

/* Add positioning context to sections with backgrounds */
/* Add positioning context to sections with backgrounds */


/* Trust Marquee */
.marquee-container {
    overflow: hidden;
    position: relative;
    padding: 3rem 0;
    margin-top: 2rem;
    mask-image: linear-gradient(to right, transparent, black 10%, black 90%, transparent);
    -webkit-mask-image: linear-gradient(to right, transparent, black 10%, black 90%, transparent);
}

.marquee-track {
    display: flex;
    gap: 4rem;
    width: max-content;
    animation: scroll 30s linear infinite;
}

.marquee-item {
    display: flex;
    align-items: center;
    justify-content: center;
    /* gap: 0.5rem; Removed */
    /* color: var(--text-dark); Removed */
    opacity: 0.6;
    transition: all 0.3s ease;
    filter: grayscale(100%);
    /* font-weight: 600; Removed */
    /* font-size: 1.2rem; Removed */
}

.marquee-item img {
    height: 45px;
    width: auto;
    max-width: 140px;
    /* Prevent wide logos from dominating */
    object-fit: contain;
    transition: all 0.3s ease;
    margin: 0 1rem;
    /* Add spacing between logos */
}

.marquee-item:hover {
    opacity: 1;
    filter: grayscale(0%);
    /* color: var(--primary); Removed */
}

/* .marquee-item i { ... } Removed */

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

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

    /* Move by half the total width (since items are duplicated) */
}

/* Mobile responsive speed */
@media (max-width: 768px) {
    .marquee-track {
        animation-duration: 20s;
        gap: 2rem;
    }
}

/* Modern Manifesto */
.manifesto-section {
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    /* position: relative; Removed to allow sticky inheritance from section */
    overflow: hidden;
}

.manifesto-kicker {
    font-size: 0.9rem;
    letter-spacing: 2px;
    font-weight: 700;
    color: var(--secondary);
    text-transform: uppercase;
    margin-bottom: 1rem;
    display: block;
}

.values-list {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
    margin-top: 2rem;
}

.value-item {
    display: flex;
    align-items: flex-start;
    gap: 1rem;
}

.value-icon {
    width: 24px;
    height: 24px;
    background: rgba(28, 63, 146, 0.1);
    color: var(--primary);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.8rem;
    flex-shrink: 0;
    margin-top: 2px;
}

.value-text strong {
    display: block;
    color: var(--text-dark);
    font-weight: 700;
    margin-bottom: 0.2rem;
}

/* Code Card Decoration */
.code-card {
    background: #1e1e1e;
    border-radius: 12px;
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.2);
    overflow: hidden;
    font-family: 'Courier New', Courier, monospace;
    position: relative;
    transform: perspective(1000px) rotateY(-5deg) rotateX(2deg);
    transition: transform 0.5s ease;
}

.code-card:hover {
    transform: perspective(1000px) rotateY(0) rotateX(0);
}

.code-header {
    background: #2d2d2d;
    padding: 12px 20px;
    display: flex;
    gap: 8px;
    align-items: center;
}

.dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
}

.dot.red {
    background: #ff5f56;
}

.dot.yellow {
    background: #ffbd2e;
}

.dot.green {
    background: #27c93f;
}

.code-content {
    padding: 25px;
    color: #d4d4d4;
    font-size: 0.9rem;
    line-height: 1.6;
}

.code-line {
    display: block;
    margin-bottom: 5px;
}

.c-blue {
    color: #569cd6;
}

/* keyword */
.c-green {
    color: #6a9955;
}

/* comment */
.c-orange {
    color: #ce9178;
}

/* string */
.c-yellow {
    color: #dcdcaa;
}

/* function */
.c-purple {
    color: #c586c0;
}

/* control */

.cursor {
    display: inline-block;
    width: 8px;
    height: 15px;
    background: var(--accent);
    animation: blink 1s infinite;
    vertical-align: middle;
}

@keyframes blink {

    0%,
    100% {
        opacity: 1;
    }

    50% {
        opacity: 0;
    }
}

/* Contact Section Styles */
.contact-section {
    position: sticky;
    top: 0;
    min-height: 100vh;
    background: linear-gradient(135deg, #0f1c3f 0%, #150a2b 100%);
    box-shadow: 0 -5px 10px rgba(0, 0, 0, 0.2);
    overflow: hidden;
}

.contact-bg-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: radial-gradient(circle at 70% 20%, rgba(99, 195, 215, 0.1) 0%, transparent 60%);
    z-index: 0;
}

.bg-white-10 {
    background-color: rgba(255, 255, 255, 0.1);
}

.bg-white-05 {
    background-color: rgba(255, 255, 255, 0.05);
}

.border-white-10 {
    border-color: rgba(255, 255, 255, 0.1) !important;
}

.backdrop-blur {
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
}

.ls-2 {
    letter-spacing: 2px;
}

.icon-circle {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
}

.contact-info .d-flex:hover .icon-circle {
    background-color: var(--accent);
    color: #fff !important;
    transform: scale(1.1);
}

/* Contact Card Form */
.contact-card {
    box-shadow: 0 25px 50px rgba(0, 0, 0, 0.3);
    transition: transform 0.3s ease;
}

.contact-card:hover {
    transform: translateY(-5px);
}

.glow-spot {
    position: absolute;
    top: -50px;
    right: -50px;
    width: 150px;
    height: 150px;
    background: var(--secondary);
    filter: blur(60px);
    opacity: 0.4;
    border-radius: 50%;
    pointer-events: none;
}

/* Form Inputs */
.custom-floating input,
.custom-floating textarea {
    color: #fff !important;
}

.custom-floating input:focus,
.custom-floating textarea:focus {
    box-shadow: none;
    border-color: var(--accent) !important;
    background-color: rgba(255, 255, 255, 0.05) !important;
}

.custom-floating label {
    transition: all 0.3s ease;
}

.custom-floating input:focus~label,
.custom-floating input:not(:placeholder-shown)~label,
.custom-floating textarea:focus~label,
.custom-floating textarea:not(:placeholder-shown)~label {
    color: var(--accent) !important;
    transform: scale(0.85) translateY(-0.5rem) translateX(0.15rem);
}

.form-control::placeholder {
    color: transparent;
}

/* Button Group Hover Effect */
.group-hover-move {
    transition: transform 0.3s ease;
    display: inline-block;
}

.group:hover .group-hover-move {
    transform: translateX(5px);
}

/* Contact Section - Scroll Naturally */
section#contato {
    position: relative;
    /* Override sticky to allow footer to follow naturally */
    z-index: 100;
    /* Ensure it still covers previous sections */
    box-shadow: 0 -10px 30px rgba(0, 0, 0, 0.5);
    /* Add shadow to emphasize it covering the previous section */
}

/* Ensure Footer behaves with sticky stack */
footer.js-footer-reveal {
    position: relative;
    /* Changed from sticky to avoid overlap issues */
    z-index: 200;
    background-color: #212529;
    /* Ensure solid background to cover sticky sections */
}

/* --- Scroll Snap & Desktop Fits --- */
@media (min-width: 992px) {
    html {
        scroll-snap-type: y mandatory;
    }

    section {
        scroll-snap-align: start;
        scroll-margin-top: 68px;
        /* Match navbar height */
        /* Force fitting if possible, but allow grow */
        min-height: 100vh;
        /* Reduce padding to fit content */
        padding-top: 80px !important;
        padding-bottom: 2rem !important;
    }

    /* Adjust specific heavy sections */
    section#solucoes,
    section#diferenciais {
        justify-content: flex-start;
        /* Align top so we don't center if overflowing */
        padding-top: 100px !important;
        /* Visual breathing room below nav */
    }

    /* Compact Cards for Laptop Screens */
    .solution-card {
        margin-bottom: 0.5rem;
    }

    .solution-card .card-body {
        padding: 1.25rem !important;
    }

    .solution-card .icon-box {
        width: 60px;
        height: 60px;
        margin-bottom: 1rem !important;
    }

    .solution-card h3 {
        font-size: 1.25rem;
        margin-bottom: 0.5rem;
    }

    .solution-card p {
        font-size: 0.9rem;
        margin-bottom: 0;
    }

    /* Compact Headings */
    h2.display-4 {
        font-size: 2.5rem;
        /* Smaller than default Bootstrap display-4 */
        margin-bottom: 1.5rem !important;
    }

    .lead {
        font-size: 1.1rem;
        margin-bottom: 2rem !important;
    }

    /* Ensure rows are tight */
    .row.g-4 {
        --bs-gutter-y: 1rem;
    }
}

/* --- Ultra Compact for Laptops (Short Screens) --- */
@media (min-width: 992px) and (max-height: 860px) {
    section {
        padding-top: 60px !important;
        padding-bottom: 0 !important;
    }

    section#solucoes,
    section#diferenciais {
        padding-top: 65px !important;
    }

    h2.display-4 {
        font-size: 1.8rem;
        margin-bottom: 0.25rem !important;
    }

    .lead {
        margin-bottom: 0.5rem !important;
        font-size: 0.95rem;
    }

    /* Shrink Cards */
    .solution-card {
        margin-bottom: 0.25rem;
    }

    .solution-card .card-body {
        padding: 0.6rem !important;
    }

    .solution-card .icon-box {
        width: 32px;
        height: 32px;
        font-size: 1rem;
    }

    .solution-card h3 {
        font-size: 1rem;
        margin-bottom: 0.25rem;
    }

    .solution-card p {
        font-size: 0.8rem;
        line-height: 1.2;
    }



    /* Manifesto Adjustment */
    .values-list {
        gap: 0.25rem;
        margin-top: 0.5rem;
    }

    .value-item {
        gap: 0.5rem;
    }
}

.form-floating>.form-control-plaintext~label::after,
.form-floating>.form-control:focus~label::after,
.form-floating>.form-control:not(:placeholder-shown)~label::after,
.form-floating>.form-select~label::after {
    background-color: transparent !important;
}