/* ==========================================================================
   Custom CSS: Fix Form Tilt, Colors, Typography & Grid Centering
   ========================================================================== */

/* Global Overflow Prevention */
body,
html {
    overflow-x: hidden;
    max-width: 100%;
}

/* Fix Form Tilt and Animation Issues */
.static-form-box {
    width: 40%;
    margin-top: 0;
    position: relative;
    background-color: rgba(30, 30, 30, 0.8);
    border-radius: 20px;
    padding: 25px;
    backdrop-filter: blur(10px);
    /* Override any existing transform animations */
    transform: none !important;
    transition: none !important;
    opacity: 1 !important;
    align-self: flex-start;
}

/* Hero section container alignment */
.hero-section .am-container-2 {
    display: flex;
    align-items: flex-start;
    gap: 30px;
    max-width: 1280px;
    padding-left: 20px;
    padding-right: 20px;
}

/* Hero content (left side) */
.hero-section .div-block {
    flex: 1;
    max-width: none;
    padding-right: 10px;
}

/* Hero section overall */
.hero-section {
    min-height: auto;
    padding-top: 120px;
    padding-bottom: 80px;
}

@media screen and (max-width: 991px) {
    .static-form-box {
        width: 100%;
        margin-top: 40px;
        padding: 25px;
    }

    .hero-section .am-container-2 {
        flex-direction: column;
        gap: 20px;
    }

    .hero-section .div-block {
        max-width: 100%;
        padding-right: 0;
    }

    .hero-section {
        padding-top: 80px;
        padding-bottom: 60px;
    }
}

/* TYPOGRAPHY FIX: Reduce Hero Headline Size */
.am-hero-heading.hero-head {
    font-size: 48px !important;
    line-height: 1.15em !important;
    margin-bottom: 20px !important;
}

/* Add spacing between the two lines in hero heading */
.am-hero-heading.hero-head br {
    display: block;
    content: "";
    margin-bottom: 20px;
}

@media screen and (max-width: 767px) {
    .am-hero-heading.hero-head {
        font-size: 36px !important;
    }

    .am-hero-heading.hero-head br {
        margin-bottom: 10px;
    }
}

/* ==========================================================================
   DROPDOWN FIX: Override Webflow CSS restrictions + Smooth Animations
   ========================================================================== */
/* 
   The vaue.webflow.css file has rules that force .accordion-content 
   to max-height: 0 and opacity: 0 with !important.
   This override makes them visible when Webflow adds the w--open class
   and adds smooth transitions.
*/

/* Collapsed state - set initial values and transition */
.accordion-content,
.w-dropdown-list {
    max-height: 0 !important;
    opacity: 0 !important;
    overflow: hidden !important;
    transition: max-height 0.4s cubic-bezier(0.4, 0, 0.2, 1),
        opacity 0.3s ease-in-out,
        padding 0.4s cubic-bezier(0.4, 0, 0.2, 1) !important;
    padding-top: 0 !important;
    padding-bottom: 0 !important;
}

/* Expanded state - smooth reveal */
.accordion-item.w--open .accordion-content,
.accordion-item.w--open .accordion-content.w-dropdown-list,
.w-dropdown-list.w--open {
    max-height: 500px !important;
    opacity: 1 !important;
    display: block !important;
    padding-top: 20px !important;
    padding-bottom: 20px !important;
    visibility: visible !important;
}

/* Ensure heading aligns with list */
.cta-section .am-heading-h2.left {
    padding-left: 0 !important;
    text-align: center !important;
}

/* ==========================================================================
   Metodologia Section - Align Image with Dropdowns
   ========================================================================== */
/* Increase spacing from hero section to prevent overlap */
.about-us-section {
    margin-top: 80px !important;
}

/* Align image and accordion container at the top */
.about-us-section .flex-block {
    align-items: flex-start !important;
}

/* Ensure image container aligns at top */
.about-us-section .div-block-3 {
    align-self: flex-start !important;
}

/* Ensure accordion container aligns at top */
.about-us-section .div-block-4 {
    align-self: flex-start !important;
    padding-top: 0 !important;
    margin-top: 0 !important;
}

/* Adjust image vertical position to align with accordions */
.about-us-section .image-3 {
    margin-top: 80px !important;
    vertical-align: top !important;
}

/* Remove margin from the paragraph before accordions */
.about-us-section .am-hero-paragraph.block-tab {
    margin-top: 0 !important;
    margin-bottom: 20px !important;
}

/* ==========================================================================
   Footer Alignment
   ========================================================================== */
/* Footer logo description alignment - override center alignment only on Desktop */
@media screen and (min-width: 992px) {
    .footer-section .logo-desc {
        text-align: left !important;
    }
}

/* Mobile specific fixes */
@media screen and (max-width: 479px) {
    .am-hero-heading.hero-head {
        font-size: 32px !important;
    }

    .hero-section {
        padding-bottom: 40px;
    }

    /* Enhanced Button Mobile Sizing */
    .am-button-regular.am-button-medium {
        width: 100% !important;
        max-width: 100% !important;
        box-sizing: border-box !important;
        padding: 12px 20px !important;
        font-size: 16px !important;
        text-align: center !important;
        white-space: normal !important;
        min-height: 50px !important;
    }

    /* Navbar Mobile Fix */
    .navbar-wrapper {
        width: 100% !important;
        max-width: 100% !important;
        justify-content: space-between !important;
    }

    .navbar-brand {
        width: auto !important;
        max-width: 50% !important;
    }

    .mobile-menu {
        position: relative !important;
        right: 0 !important;
    }

    /* Container Width Constraints */
    .container,
    .w-container {
        max-width: 100% !important;
        padding-left: 15px !important;
        padding-right: 15px !important;
    }

    .am-container-2 {
        width: 100% !important;
        max-width: 100% !important;
    }

    /* Services Grid Mobile Stacking */
    .div-block-grid-flex {
        display: flex !important;
        flex-direction: column !important;
        gap: 20px !important;
    }

    .am-services-block {
        width: 100% !important;
        max-width: 100% !important;
    }

    /* Contact Form Mobile Layout */
    .contact-grid {
        display: flex !important;
        flex-direction: column !important;
        gap: 30px !important;
    }

    .contact-grid-block {
        width: 100% !important;
        max-width: 100% !important;
    }

    /* Logo Container Mobile Stacking */
    .logo-container {
        flex-wrap: wrap !important;
        justify-content: center !important;
        gap: 10px !important;
    }

    .logo-placeholder {
        flex: 1 1 100% !important;
        max-width: 100% !important;
    }

    /* FAQ Button Width Fix */
    .faq-block .am-button-regular.am-button-medium {
        width: 90% !important;
        max-width: 100% !important;
        margin-left: auto !important;
        margin-right: auto !important;
        display: block !important;
    }

    /* Hero Form Width Constraints */
    .static-form-box {
        width: 100% !important;
        max-width: calc(100vw - 30px) !important;
        margin-left: auto !important;
        margin-right: auto !important;
    }

    .hero-form-container {
        width: 100% !important;
        max-width: 100% !important;
    }

    /* Service Cards Mobile Font Size */
    .am-featured-heading {
        font-size: 20px !important;
        line-height: 1.2em !important;
    }

    .am-featured-heading.white {
        font-size: 20px !important;
    }

    /* Force hero form to use border-box sizing */
    .static-form-box,
    .hero-section .static-form-box,
    div.static-form-box {
        box-sizing: border-box !important;
        padding-left: 15px !important;
        padding-right: 15px !important;
    }

    /* Mobile FAQ Accordion - Fix text alignment */
    .accordion-toggle-heading {
        text-align: left !important;
    }
}

/* Tablet specific fixes */
@media screen and (max-width: 767px) {

    /* Logo Container Responsive Wrapper */
    .logo-container {
        flex-wrap: wrap !important;
        justify-content: center !important;
        gap: 10px !important;
    }

    .logo-placeholder {
        flex: 1 1 calc(50% - 10px) !important;
        max-width: calc(50% - 10px) !important;
    }
}

/* ==========================================================================
   General / Utility / Previous Fixes
   ========================================================================== */
/* Make all label styles consistent (transparent style) */
.am-labeltext {
    /* Using hero-label-text style for consistency */
    color: #fff !important;
    letter-spacing: 1px;
    background-color: transparent !important;
    background-image: none !important;
    border: 1px solid #ffffff38;
    padding: 10px 30px;
    font-family: Urbanist, sans-serif;
    font-size: 16px;
    font-weight: 400;
    box-shadow: inset 3px 4px 20px #fff3;
    margin-left: auto;
    margin-right: auto;
    border-radius: 20px;
}

/* Hero Form Styling */
.hero-form-container {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.hero-form-title {
    font-size: 22px;
    margin-bottom: 8px;
    color: #fff;
    font-weight: bold;
    text-align: center !important;
}

.hero-form-input {
    height: 42px;
    margin-bottom: 8px;
    background-color: #272727;
    border: 1px solid #3d3d3d;
    color: #fff;
    width: 100%;
    padding: 10px;
    border-radius: 5px;
}

.hero-form-select {
    height: 42px;
    margin-bottom: 8px;
    background-color: #272727;
    border: 1px solid #3d3d3d;
    color: #fff;
    width: 100%;
    padding: 10px;
    border-radius: 5px;
}

.hero-form-submit {
    width: 100%;
    margin-top: 5px;
}

/* Standardized Button Styles - High Specificity to Override Webflow */
/* Standardized Button Styles - High Specificity to Override Webflow */
.am-button,
.am-button-medium,
.am-button-regular,
.am-button-regular.am-button-medium,
.contact-button,
input.hero-form-submit,
.am-button.arrow-button,
.am-button-regular.arrow-button {
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    background-image: linear-gradient(225deg, #0066cc, #004c99) !important;
    background-color: transparent !important;
    /* Ensure no conflicting bg color */
    background-size: cover !important;
    /* Reset any multi-bg sizing */
    background-position: center !important;
    /* Reset position */
    background-repeat: no-repeat !important;
    /* Reset repeat */
    color: #fff !important;
    border: 1px solid #005bb5 !important;
    border-radius: 100px !important;
    padding: 12px 32px !important;
    font-family: Urbanist, sans-serif !important;
    font-size: 16px !important;
    font-weight: 700 !important;
    line-height: 1.2 !important;
    min-height: 50px !important;
    text-transform: uppercase !important;
    text-decoration: none !important;
    width: auto !important;
    max-width: 100%;
    min-width: auto !important;
    /* Reset Webflow min-width */
    cursor: pointer;
    transition: background-image 0.2s ease, transform 0.2s ease !important;
    /* Force reset of animations */
    margin-top: 10px;
    /* Consistent spacing */
    outline: none !important;
}

/* FAQ Section Title Alignment */
.faq-block .am-hero-heading.am-heading-h3.left {
    text-align: left !important;
}

.faq-block .am-hero-paragraph {
    text-align: center !important;
}

/* FAQ Desktop Specific - Override right-alignment */
body .faq-block {
    text-align: center !important;
}

body .faq-block .am-hero-heading,
body .faq-block h3 {
    text-align: center !important;
    margin-left: auto !important;
    margin-right: auto !important;
}

body .faq-block .am-button-regular {
    margin-left: auto !important;
    margin-right: auto !important;
}

/* FAQ Accordion Vertical Centering */
.accordion-toggle {
    display: flex !important;
    align-items: center !important;
}

.accordion-toggle-heading {
    flex: 1 !important;
    margin-left: 15px !important;
}

.collapsed-icon {
    flex-shrink: 0 !important;
}

/* Hover State */
.am-button:hover,
.am-button-medium:hover,
.am-button-regular:hover,
.am-button-regular.am-button-medium:hover,
input.hero-form-submit:hover,
.contact-button:hover,
.am-button.arrow-button:hover,
.am-button-regular.arrow-button:hover,
.small-button:hover,
.am-button-regular.am-button-medium.arrow-button.small-button:hover {
    background-image: linear-gradient(225deg, #3399ff, #0066cc) !important;
    background-size: cover !important;
    background-position: center !important;
    background-repeat: no-repeat !important;
    text-decoration: none !important;
    min-width: auto !important;
    /* Override small-button hover expansion */
    padding-right: 32px !important;
    /* Reset padding expansion */
    padding-left: 32px !important;
    /* Reset padding expansion */
    transition: background-image 0.2s ease, transform 0.2s ease !important;
    /* Reset transition */
}

/* Remove arrow image from specific button class if it exists to standardize */
.am-button-regular.am-button-medium.arrow-button {
    background-image: linear-gradient(225deg, #0066cc, #004c99) !important;
    padding-right: 32px !important;
    /* Reset padding override */
}

.am-button-medium:hover,
.am-button:hover {
    background-image: linear-gradient(225deg, #3399ff, #0066cc) !important;
}

/* Nav Link Hover States */
.nav-link.w--current {
    color: #3b99fc !important;
}

.nav-link:hover {
    color: #fff !important;
}

/* ==========================================================================
   Refactored Inline Styles (404 Page & Feature Animation)
   ========================================================================== */

/* 404 Page Styles */
.hero-section.error-page {
    min-height: 70vh;
    display: flex;
    align-items: center;
    justify-content: center;
}

.error-page-container {
    text-align: center;
    z-index: 10;
}

.error-content-wrapper {
    max-width: 800px;
    margin: 0 auto;
}

.error-title-large {
    text-align: center;
    font-size: 120px;
    line-height: 1;
    margin-bottom: 30px;
}

.error-subtitle {
    align-self: center;
    font-size: 42px;
    margin-bottom: 20px;
}

.error-description {
    text-align: center;
    max-width: 600px;
    margin: 0 auto 40px;
}

.error-button-wrapper {
    display: flex;
    gap: 20px;
    justify-content: center;
    flex-wrap: wrap;
}

/* Feature Page Star Animations (Refactored from inline) */
.stars-transform-default {
    transform: translate3d(0px, 0px, 0) scale3d(1, 1, 1) rotateX(0) rotateY(0) rotateZ(0) skew(0, 0);
}

.stars-transform-rotated {
    transform: translate3d(0px, 0px, 0) scale3d(1, 1, 1) rotateX(0deg) rotateY(0deg) rotateZ(-45deg) skew(0, 0);
    transform-style: preserve-3d;
    opacity: 1;
    height: 5px;
}

/* ==========================================================================
   Contact Form Heading Alignment
   ========================================================================== */
/* Align "Como podemos ajudar" heading to the left */
.div-contact-field {
    text-align: center !important;
}

/* Center the submit button in contact form */
.form-2 #w-node-bcb8deec-18dd-6108-3915-92490e8dc824-0e8dc7e5.div-contact {
    grid-column: 1 / -1 !important;
    display: flex !important;
    justify-content: center !important;
    align-items: center !important;
}

/* ==========================================================================
   Cases de Sucesso - List Bullet Spacing Fix
   ========================================================================== */
/* Move bullets inside content flow to be right next to text */
.cta-section .list {
    list-style-position: inside !important;
    padding-left: 0 !important;
    text-align: left !important;
}

.cta-section .list-item-1 {
    padding-left: 0 !important;
    margin-left: 0 !important;
}

.am-paragraph.contact {
    text-align: center !important;
    padding: 12px;
}

/* Left-align footer logo and tagline on mobile */
@media screen and (max-width: 991px) {

    /* Fix Footer Alignment on Mobile */
    .footer-top {
        display: flex !important;
        flex-direction: column !important;
        align-items: flex-start !important;
    }

    .footer-section .footer-div-block {
        text-align: left !important;
        align-items: flex-start !important;
    }

    .footer-section .footer-div-block:first-child .am-main-logo {
        display: block;
        margin: 0 !important;
        /* Reset to left align */
        margin-bottom: 10px !important;
    }

    .footer-section .footer-div-block:first-child .logo-desc,
    .footer-section .footer-div-block:first-child .footer-logo-desc {
        text-align: left !important;
        padding-left: 0 !important;
        width: auto !important;
        display: block !important;
        position: static !important;
        margin-left: 0 !important;
    }
}

/* Force Hero Heading Left Alignment on Desktop */
@media screen and (min-width: 992px) {
    .am-hero-heading.hero-head {
        text-align: left !important;
    }
}

/* Center FAQ Section Content */
.faq-block {
    display: block !important;
    text-align: center !important;
}

.faq-block .am-hero-heading,
.faq-block .am-hero-paragraph {
    text-align: center !important;
}

/* Optimize FAQ styling for mobile and tablet */
@media screen and (max-width: 991px) {
    .faq-block .am-hero-heading.am-heading-h3 {
        font-size: 50px !important;
        line-height: 1.2 !important;
        white-space: normal;
    }
}

/* ==========================================================================
   Featured/Checklist Section - Center on Mobile (All sizes)
   Override base text-align:left at line 1330 of vaue.webflow.css
   ========================================================================== */
@media screen and (max-width: 991px) {

    /* Force center alignment on all featured cards */
    .featured-section .div-block-featured,
    .featured-section .div-block-current-featured,
    div.div-block-featured,
    div.div-block-current-featured {
        text-align: center !important;
        background-image: none !important;
        /* Hide background images on mobile */
        min-height: auto !important;
        height: auto !important;
        padding: 30px 20px !important;
    }

    /* Center headings */
    .featured-section .am-featured-heading,
    .featured-section .am-featured-heading.white,
    .div-block-featured .am-featured-heading,
    .div-block-featured .am-featured-heading.white,
    .div-block-current-featured .am-featured-heading,
    h2.am-featured-heading,
    h2.am-featured-heading.white,
    .am-featured-heading {
        text-align: center !important;
        max-width: 100% !important;
    }

    /* Center paragraphs */
    .featured-section .am-hero-paragraph.paragraph-4,
    .featured-section .am-hero-paragraph.paragraph-4.white,
    .div-block-featured .am-hero-paragraph,
    .div-block-featured p,
    .div-block-current-featured .am-hero-paragraph,
    .div-block-current-featured p,
    p.am-hero-paragraph.paragraph-4,
    p.am-hero-paragraph.paragraph-4.white,
    .paragraph-4,
    .paragraph-4.white {
        text-align: center !important;
        max-width: 100% !important;
        padding-left: 0 !important;
        padding-right: 0 !important;
    }

    /* Hide icons on mobile */
    .featured-section .image-5,
    .div-block-featured .image-5,
    .div-block-current-featured .image-5 {
        display: none !important;
    }

    /* Hide form image on mobile */
    .featured-contact-image,
    .featured-contact-image .image-7 {
        display: none !important;
    }

    /* Fix contact icons - same size for phone and email */
    .icon-image-contact {
        width: 50px !important;
        height: 50px !important;
        flex-shrink: 0 !important;
        object-fit: contain !important;
    }
}

/* ==========================================================================
   Hamburger Menu Fix - Restored & Improved
   ========================================================================== */
@media screen and (max-width: 991px) {

    /* Ensure container allows absolute positioning of dropdown */
    .mobile-menu {
        position: relative !important;
        z-index: 9999 !important;
    }

    .card-bkg {
        display: none !important;
    }

    /* Dropdown Styling - ABSOLUTE positioning to scroll with page */
    .menu-mobile-dropdown.w--open {
        display: block !important;
        position: absolute !important;
        top: 100% !important;
        right: 0 !important;
        left: auto !important;
        min-width: 250px !important;
        background-color: #1a1a1a !important;
        border-radius: 12px !important;
        padding: 10px 0 !important;
        z-index: 99999 !important;
        box-shadow: 0 15px 40px rgba(0, 0, 0, 0.6) !important;
        margin-top: 40px !important;

        /* Disable Webflow JS conflicts */
        transition: none !important;
        height: auto !important;
        min-height: auto !important;

        /* Smooth Scale and Fade Animation */
        transform-origin: top right !important;
        animation: openMenu 0.4s cubic-bezier(0.16, 1, 0.3, 1) forwards !important;
    }

    @keyframes openMenu {
        0% {
            opacity: 0;
            transform: scale(0.9) translateY(-10px);
        }

        100% {
            opacity: 1;
            transform: scale(1) translateY(0);
        }
    }

    /* Menu Links */
    .menu-mobile-dropdown .menu-mobile-list {
        display: block !important;
        padding: 15px 20px !important;
        color: #fff !important;
        font-size: 16px !important;
        text-decoration: none !important;
        border-bottom: 1px solid #333 !important;
        text-align: left !important;
        /* Align text to left */
        background-image: none !important;
        /* Remove unwanted icons */
    }

    .menu-mobile-dropdown .menu-mobile-list:last-child {
        border-bottom: none !important;
    }

    .menu-mobile-dropdown .menu-mobile-list:hover {
        background-color: #333 !important;
    }

    /* BURGER ICON ANIMATION */
    .dropdown-toggle-2 {
        padding: 0 !important;
    }

    .burger-menu {
        width: 30px !important;
        height: 24px !important;
        display: flex !important;
        flex-direction: column !important;
        justify-content: space-between !important;
    }

    .list-block-burger {
        background-color: #fff !important;
        width: 100% !important;
        height: 2px !important;
        margin: 0 !important;
        border-radius: 2px !important;
        transition: all 0.3s ease !important;
        transform-origin: center !important;
    }

    /* Active State Animations */
    .dropdown-toggle-2.w--open .bar-1 {
        transform: translateY(11px) rotate(45deg) !important;
    }

    .dropdown-toggle-2.w--open .bar-2 {
        opacity: 0 !important;
        transform: scale(0) !important;
    }

    .dropdown-toggle-2.w--open .bar-3 {
        transform: translateY(-11px) rotate(-45deg) !important;
    }

    /* FIX MENU CUTOFF ISSUE */
    /* Ensure all parent containers have visible overflow and high z-index */
    .navbar-no-shadow,
    .navbar-no-shadow-container,
    .am-container-navbar,
    .container-regular,
    .navbar-wrapper,
    .w-nav,
    .w-nav-overlay {
        overflow: visible !important;
        z-index: 99999 !important;
        position: relative !important;
    }

    /* FIX ROTATING BORDER ANIMATION (Methodology Section) */
    /* 1. Ensure container clips the larger background */
    .gradient-container,
    .about-us-container.gradient-container {
        position: relative !important;
        overflow: hidden !important;
        z-index: 5 !important;
    }

    /* 2. Resize and Center the Rotating Background */
    /* Making it a large square (150vh) ensures it covers the card at any rotation angle */
    .card-bkg {
        width: 150vh !important;
        height: 150vh !important;
        top: 50% !important;
        left: 50% !important;
        right: auto !important;
        bottom: auto !important;
        margin-top: -75vh !important;
        /* -1/2 height */
        margin-left: -75vh !important;
        /* -1/2 width */
        position: absolute !important;
        z-index: -1 !important;
        /* We do NOT touch transform, as JS handles rotation */
    }

    /* Ensure background blur stays behind */
    .blur-gradient {
        z-index: 0 !important;
    }
}