:root {
    --color-primary: #0A1931;
    --color-secondary: #C1C7D0;
    --color-accent: #F8C300;
    --color-text-dark: #1E2749;
    --color-text-light: #FFFFFF;
    --font-family-sans: 'Roboto', 'Arial', sans-serif;
    --shadow-sm: 0 4px 12px rgba(10, 25, 49, 0.08);
    --shadow-md: 0 12px 32px rgba(10, 25, 49, 0.12);
    --shadow-lg: 0 20px 48px rgba(10, 25, 49, 0.16);
    --header-height: 96px; /* used to preserve layout when header becomes fixed */
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    scroll-behavior: smooth;
    font-size: 16px;
    /* Prevent any horizontal overflow across the entire document */
    overflow-x: hidden;
}

body {
    font-family: var(--font-family-sans);
    line-height: 1.7;
    color: var(--color-text-dark);
    background-color: #f9fafb;
    overflow-x: hidden;
    /* reserve space at top equal to header height so fixed header won't overlap content */
    padding-top: var(--header-height);
}

a {
    color: var(--color-primary);
    text-decoration: none;
    transition: color 0.3s ease;
}

a:hover {
    color: var(--color-accent);
}

h1, h2, h3, h4 {
    font-weight: 700;
    line-height: 1.1;
    margin-bottom: 0.8em;
    color: var(--color-primary);
    letter-spacing: -0.5px;
}

h1 { font-size: 2.5rem; }
h2 { font-size: 2rem; font-weight: 700; }
h3 { font-size: 1.4rem; }
h4 { font-size: 1.1rem; }

@media (min-width: 768px) {
    h1 { font-size: 3.5rem; }
    h2 { font-size: 2.5rem; }
}

p {
    font-weight: 300;
    line-height: 1.8;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 1.5rem;
}

/* Button Styles - Refined */
.btn-primary {
    display: inline-block;
    padding: 0.9rem 2rem;
    background-color: var(--color-accent);
    color: var(--color-primary);
    font-weight: 600;
    border-radius: 50px;
    transition: all 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    text-transform: uppercase;
    letter-spacing: 1px;
    border: none;
    cursor: pointer;
    font-size: 0.85rem;
    box-shadow: 0 8px 20px rgba(248, 195, 0, 0.25);
    position: relative;
    overflow: hidden;
}

.btn-primary::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.3), transparent);
    transition: left 0.6s ease;
    z-index: 0;
}

.btn-primary:hover::before {
    left: 100%;
}

.btn-primary:hover {
    background-color: #e6b200;
    transform: translateY(-3px);
    box-shadow: 0 12px 30px rgba(248, 195, 0, 0.35);
}

.btn-primary:active {
    transform: translateY(-1px);
}

.section-padding {
    padding: 5rem 0;
}

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

/* Header & Navigation - Enhanced Visuals */
header {
    background: linear-gradient(180deg, rgba(10,25,49,0.96), rgba(10,25,49,0.92));
    /* keep the header always visible while scrolling */
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1200;
    box-shadow: 0 6px 28px rgba(2,6,23,0.28);
    backdrop-filter: blur(8px);
    border-bottom: 1px solid rgba(255,255,255,0.03);
    transition: height 260ms ease, background 260ms ease, box-shadow 260ms ease;
    will-change: transform;
}

/* When user scrolls down, hide the header (translate out of view) */
header.hidden {
    transform: translateY(-110%);
    transition: transform 300ms cubic-bezier(0.2, 0.9, 0.2, 1);
}

/* ensure header reappears smoothly when revealed */
header.scrolled {
    /* existing styles remain */
    /* height changes handled in .navbar */
}

/* navbar layout split into three areas for richer composition */
.navbar {
    display: grid;
    grid-template-columns: auto 1fr auto;
    align-items: center;
    gap: 1rem;
    height: var(--header-height);
    padding: 0.6rem 0;
    transition: height 260ms ease, padding 260ms ease;
}

/* compact header variant when page is scrolled to maximize viewport for content */
header.scrolled .navbar {
    height: 72px;
    padding: 0.35rem 0;
}

/* ensure logo and nav scale slightly when header is scrolled */
header.scrolled .navbar .logo .nav-logo {
    height: 68px;
}

header.scrolled .logo-text {
    transform: translateY(1px) scale(0.98);
    font-size: 28px;
}

/* logo block with stacked wordmark */
.navbar .logo {
    display: flex;
    align-items: center;
    gap: 0.9rem;
}

/* compact wordmark group */
.logo-wordmark {
    display: flex;
    flex-direction: column;
    line-height: 1;
}

/* main gold-styled logotype */
.logo-text {
    background-image: linear-gradient(180deg,
        #fffaf0 0%,
        #f9db8c 12%,
        #f2c058 34%,
        #d9a323 62%,
        #b78508 88%,
        #fff7e6 100%);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    font-family: var(--font-family-sans);
    font-size: 30px;
    font-weight: 700;
    letter-spacing: -0.6px;
    text-shadow: 0 6px 20px rgba(6,10,20,0.28);
    -webkit-font-smoothing: antialiased;
}

/* small descriptive subtitle to balance composition */
.logo-sub {
    color: rgba(255,255,255,0.75);
    font-size: 0.72rem;
    font-weight: 500;
    margin-top: 2px;
    transform: translateY(2px);
}

/* center area holds nav links in a subtle frosted container */
.nav-center {
    display: flex;
    justify-content: center;
}

.nav-links {
    list-style: none;
    display: flex;
    gap: 2rem;
    align-items: center;
    background: linear-gradient(180deg, rgba(255,255,255,0.02), rgba(255,255,255,0.01));
    padding: 0.6rem 1rem;
    border-radius: 12px;
    box-shadow: 0 8px 24px rgba(2,6,23,0.18);
    backdrop-filter: blur(6px);
    border: 1px solid rgba(255,255,255,0.03);
    z-index: 1200; /* ensure main nav sits above decorative accents when needed */
    position: relative; /* create stacking context so child dropdowns stack predictably */
}

/* refined link visuals with subtle gold underline and smoother hover */
.nav-links a {
    color: rgba(255,255,255,0.92);
    font-weight: 600;
    position: relative;
    padding: 10px 4px;
    font-size: 0.98rem;
    transition: color 180ms ease, transform 160ms ease;
}

/* refined link visuals with subtle gold underline and smoother hover */
.nav-links a::after {
    content: '';
    position: absolute;
    bottom: -8px;
    left: 25%;
    width: 50%;
    height: 3px;
    background: linear-gradient(90deg, rgba(248,195,0,0.96), rgba(255,255,255,0.06));
    opacity: 0;
    transform: translateY(6px) scaleX(0.85);
    transition: opacity 220ms ease, transform 220ms ease;
    border-radius: 6px;
    filter: drop-shadow(0 4px 10px rgba(217,160,20,0.18));
}

/* golden highlight + soft hover animation */
.nav-links a:hover {
    color: var(--color-accent); /* golden yellow */
    transform: translateY(-4px) scale(1.01);
    text-shadow: 0 6px 18px rgba(248,195,0,0.08);
    transition: color 220ms cubic-bezier(0.2,0.9,0.2,1), transform 240ms cubic-bezier(0.2,0.9,0.2,1), text-shadow 240ms ease;
}

.nav-links a:hover::after {
    opacity: 1;
    transform: translateY(0) scaleX(1);
    background: linear-gradient(90deg, var(--color-accent), rgba(255,255,255,0.12));
}

.nav-links a[aria-current="page"] {
    color: var(--color-accent);
}

/* action area with CTA and hamburger */
.nav-actions {
    display: flex;
    align-items: center;
    gap: 0.9rem;
}

/* prominent but elegant contact CTA */
.contact-cta {
    display: inline-block;
    padding: 0.6rem 1rem;
    background: linear-gradient(180deg, rgba(248,195,0,1), rgba(230,170,0,1));
    color: var(--color-primary);
    font-weight: 700;
    border-radius: 999px;
    box-shadow: 0 10px 30px rgba(217,160,20,0.14);
    transition: transform 180ms ease, box-shadow 180ms ease;
    font-size: 0.82rem;
    text-transform: none;
    border: none;
}

.contact-cta:hover {
    transform: translateY(-3px);
    box-shadow: 0 16px 40px rgba(217,160,20,0.22);
}

/* Hamburger styling stays compact for mobile */
.hamburger {
    display: none;
    cursor: pointer;
    padding: 8px;
    /* Ensure the hamburger (toggle) stays above overlays, accents and the mobile nav when open */
    z-index: 1120;
}

.bar {
    display: block;
    width: 22px;
    height: 3px;
    margin: 4px auto;
    background-color: rgba(255,255,255,0.95);
    transition: all 0.28s cubic-bezier(0.22,0.9,0.28,1);
    border-radius: 2px;
}

/* decorative accent element under header */
.header-accent {
    display: flex;
    justify-content: center;
    gap: 1rem;
    margin-top: 8px;
    pointer-events: none;
    /* ensure the accent visually sits behind the navigation; keep it low in the stacking order */
    position: relative;
    z-index: 700; /* lowered so expanded menus render above the accent bars */
}

.header-accent .accent-left,
.header-accent .accent-right {
    height: 6px;
    width: 140px;
    border-radius: 8px;
    background: linear-gradient(90deg, rgba(248,195,0,0.9), rgba(217,160,20,0.6));
    box-shadow: 0 8px 24px rgba(217,160,20,0.12);
    opacity: 0.75;
}

@media (max-width: 992px) {
    .nav-links {
        position: fixed;
        right: 0;
        top: 0;
        height: 100vh;
        width: 70%;
        max-width: 300px;
        background: linear-gradient(135deg, var(--color-primary) 0%, #0d2438 100%);
        flex-direction: column;
        justify-content: flex-start;
        align-items: flex-start;
        padding: 5rem 2rem 0;
        /* start fully off-canvas to the right */
        transform: translateX(100%);
        transition: transform 0.4s ease-in-out, opacity 0.28s ease, visibility 0.28s ease;
        box-shadow: -10px 0 30px rgba(0, 0, 0, 0.3);
        max-height: 100vh;
        overflow-y: auto;
        -webkit-overflow-scrolling: touch;
        padding-bottom: 3.5rem;

        /* ensure the mobile nav stacks above decorative accents */
        z-index: 1060;

        /* Ensure collapsed menu is not visible or interactive */
        opacity: 0;
        visibility: hidden;
        pointer-events: none;
    }

    /* Custom scrollbar styling that matches brand aesthetic */
    .nav-links::-webkit-scrollbar {
        width: 10px;
    }
    .nav-links::-webkit-scrollbar-track {
        background: linear-gradient(180deg, rgba(10,25,49,0.08), rgba(10,25,49,0.02));
        border-radius: 8px;
    }
    .nav-links::-webkit-scrollbar-thumb {
        background: linear-gradient(180deg, var(--color-accent), rgba(200,160,0,0.8));
        border-radius: 8px;
        border: 2px solid rgba(13,36,56,0.25);
    }
    /* Firefox scrollbar */
    .nav-links {
        scrollbar-width: thin;
        scrollbar-color: rgba(248,195,0,0.95) rgba(10,25,49,0.06);
    }

    .nav-links.active {
        /* slide into view and enable interactions only when active */
        transform: translateX(0);
        opacity: 1;
        visibility: visible;
        pointer-events: auto;
        /* ensure the open menu overlays header accents and other low z elements */
        z-index: 1110;
    }
    
    .nav-links li {
        margin-bottom: 25px;
        width: 100%;
    }
    
    .nav-links a {
        font-size: 1.2rem;
    }

    .hamburger {
        display: block;
    }

    .hamburger.active .bar:nth-child(2) {
        opacity: 0;
    }

    .hamburger.active .bar:nth-child(1) {
        transform: translateY(8px) rotate(45deg);
    }

    .hamburger.active .bar:nth-child(3) {
        transform: translateY(-8px) rotate(-45deg);
    }
    
    /* Overlay effect when menu is open */
    body.menu-open::after {
        content: '';
        position: fixed;
        top: 0;
        left: 0;
        width: 100%;
        height: 100%;
        background: rgba(0, 0, 0, 0.5);
        z-index: 990;
        backdrop-filter: blur(4px);
    }
}

/* Hero Section */
#hero {
    position: relative;
    height: clamp(60vh, 75vh, 800px);
    min-height: 380px;
    display: flex;
    align-items: center;
    color: var(--color-text-light);
    overflow: hidden;
}

.hero-background {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    z-index: 1;
}

.hero-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, var(--color-primary) 0%, rgba(10, 25, 49, 0.7) 50%, rgba(10, 25, 49, 0.4) 100%);
    z-index: 2;
}

.hero-content {
    position: relative;
    z-index: 3;
    padding: 2rem 0;
    max-width: 700px;
    animation: fadeInUp 1s ease-out;
}

.hero-content h1 {
    color: var(--color-text-light);
    margin-bottom: 0.8rem;
    font-size: 3.2rem;
    line-height: 1.15;
}

.hero-content p {
    font-size: 1.15rem;
    margin-bottom: 2.5rem;
    font-weight: 300;
    line-height: 1.8;
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Specific Mobile Optimizations for Hero (<= 767px) */
@media (max-width: 767px) {
    #hero {
        height: clamp(400px, 70vh, 600px);
        min-height: 400px;
    }
    /* Center and constrain hero content on small screens, reduce sizes and add horizontal padding */
    .hero-content {
        padding: 1.2rem 1rem;
        max-width: 92%;
        margin: 0 auto;
        text-align: center;
    }
    .hero-content h1 {
        font-size: 1.9rem;
        line-height: 1.12;
        margin-left: 0;
        margin-right: 0;
    }
    .hero-content p {
        font-size: 0.95rem;
        margin-bottom: 1.4rem;
    }
    /* Make primary button slightly smaller and centered */
    .hero-content .btn-primary {
        padding: 0.7rem 1.2rem;
        font-size: 0.82rem;
    }
}

/* Company/Grupo FF Section - Asymmetrical Layout */
#grupo-ff {
    background: linear-gradient(135deg, #ffffff 0%, #f0f4f8 100%);
    position: relative;
    overflow: hidden;
}

#grupo-ff::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -10%;
    width: 400px;
    height: 400px;
    background: radial-gradient(circle, rgba(248, 195, 0, 0.08) 0%, transparent 70%);
    border-radius: 50%;
    z-index: 0;
}

.company-content {
    display: flex;
    flex-direction: column;
    gap: 3rem;
    position: relative;
    z-index: 1;
}

.company-text h2 {
    color: var(--color-accent);
    font-size: 2.3rem;
    margin-bottom: 1.5rem;
}

.company-text p {
    margin-bottom: 1.2rem;
    font-size: 1.05rem;
}

.company-visual {
    position: relative;
}

.company-visual img {
    width: 100%;
    height: 320px;
    object-fit: cover;
    border-radius: 16px;
    box-shadow: var(--shadow-lg);
    transition: transform 0.5s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

.company-visual img:hover {
    transform: scale(1.02);
}

@media (min-width: 900px) {
    .company-content {
        grid-template-columns: 1.2fr 1fr;
        display: grid;
        align-items: center;
        gap: 4rem;
    }
}

/* Historia Section - Split Layout with Text Overlay */
#historia {
    background: linear-gradient(135deg, var(--color-primary) 0%, #0d2438 100%);
    color: var(--color-text-light);
    position: relative;
    overflow: hidden;
}

#historia::after {
    content: '';
    position: absolute;
    top: 0;
    right: 0;
    width: 40%;
    height: 100%;
    background: radial-gradient(circle at top right, rgba(248, 195, 0, 0.1) 0%, transparent 70%);
    z-index: 1;
    pointer-events: none;
}

#historia .section-visual {
    position: relative;
    z-index: 2;
}

#historia .section-visual img {
    width: 100%;
    height: 300px;
    object-fit: cover;
    border-radius: 16px;
    box-shadow: var(--shadow-lg);
}

#historia .section-text {
    position: relative;
    z-index: 2;
}

#historia h2 {
    color: var(--color-accent);
    font-size: 2.3rem;
    margin-bottom: 1.5rem;
}

#historia p {
    font-size: 1.05rem;
    margin-bottom: 1.2rem;
    line-height: 1.8;
}

@media (min-width: 900px) {
    #historia {
        display: flex;
        align-items: center;
        gap: 5%;
    }

    #historia .section-visual {
        flex: 0 0 45%;
        order: 2;
    }

    #historia .section-text {
        flex: 0 0 55%;
        order: 1;
    }

    #historia .section-visual img {
        height: 380px;
    }
}

/* Metodologia Section - Multi-column with Cards */
#metodologia {
    background: linear-gradient(135deg, #ffffff 0%, #f5f8fc 100%);
    position: relative;
}

#metodologia::before {
    content: '';
    position: absolute;
    bottom: 0;
    left: -5%;
    width: 350px;
    height: 350px;
    background: radial-gradient(circle, rgba(248, 195, 0, 0.08) 0%, transparent 70%);
    border-radius: 50%;
    z-index: 0;
}

#metodologia .container {
    position: relative;
    z-index: 1;
    display: grid;
    gap: 3rem;
}

#metodologia h2 {
    color: var(--color-accent);
    font-size: 2.3rem;
}

#metodologia .section-text {
    grid-column: 1 / -1;
}

#metodologia .section-visual {
    grid-column: 1 / -1;
}

#metodologia .section-visual img {
    width: 100%;
    height: 300px;
    object-fit: cover;
    border-radius: 16px;
    box-shadow: var(--shadow-lg);
}

@media (min-width: 900px) {
    #metodologia .container {
        grid-template-columns: 1fr 1.1fr;
        align-items: center;
    }

    #metodologia .section-text {
        grid-column: 1;
        grid-row: 1;
    }

    #metodologia .section-visual {
        grid-column: 2;
        grid-row: 1;
    }

    #metodologia .section-visual img {
        height: 380px;
    }
}

/* Valores Section - Featured with Text Overlay */
#valores {
    background: linear-gradient(135deg, var(--color-primary) 0%, #0d2438 100%);
    color: var(--color-text-light);
    position: relative;
    overflow: hidden;
}

#valores::before {
    content: '';
    position: absolute;
    top: -10%;
    left: -5%;
    width: 450px;
    height: 450px;
    background: radial-gradient(circle, rgba(248, 195, 0, 0.1) 0%, transparent 70%);
    border-radius: 50%;
    z-index: 1;
}

#valores .section-visual {
    position: relative;
    z-index: 2;
}

#valores .section-visual img {
    width: 100%;
    height: 300px;
    object-fit: cover;
    border-radius: 16px;
    box-shadow: var(--shadow-lg);
}

#valores .section-text {
    position: relative;
    z-index: 2;
}

#valores h2 {
    color: var(--color-accent);
    font-size: 2.3rem;
}

#valores p {
    font-size: 1.05rem;
    margin-bottom: 1.2rem;
    line-height: 1.8;
}

@media (min-width: 900px) {
    #valores {
        display: flex;
        align-items: center;
        gap: 5%;
    }

    #valores .section-visual {
        flex: 0 0 45%;
    }

    #valores .section-text {
        flex: 0 0 55%;
    }

    #valores .section-visual img {
        height: 380px;
    }
}

/* Equipe Section - Clean Layout */
#equipe {
    background: linear-gradient(135deg, #ffffff 0%, #f8fbfd 100%);
    position: relative;
}

#equipe .container {
    display: grid;
    gap: 3rem;
    align-items: center;
}

#equipe h2 {
    color: var(--color-accent);
    font-size: 2.3rem;
}

#equipe .section-visual img {
    width: 100%;
    height: 300px;
    object-fit: cover;
    border-radius: 16px;
    box-shadow: var(--shadow-lg);
    transition: transform 0.5s ease;
}

#equipe .section-visual img:hover {
    transform: scale(1.02);
}

@media (min-width: 900px) {
    #equipe .container {
        grid-template-columns: 1fr 1.1fr;
    }

    #equipe .section-text {
        grid-column: 1;
    }

    #equipe .section-visual {
        grid-column: 2;
    }

    #equipe .section-visual img {
        height: 380px;
    }
}

/* Services Section */
#servicos {
    background: linear-gradient(135deg, var(--color-primary) 0%, #0d2438 100%);
    color: var(--color-text-light);
    position: relative;
    overflow: hidden;
}

#servicos::before {
    content: '';
    position: absolute;
    bottom: -20%;
    right: -10%;
    width: 500px;
    height: 500px;
    background: radial-gradient(circle, rgba(248, 195, 0, 0.08) 0%, transparent 70%);
    border-radius: 50%;
    z-index: 0;
}

#servicos h2 {
    color: var(--color-accent);
    font-size: 2.3rem;
    margin-bottom: 0.5rem;
    position: relative;
    z-index: 1;
}

#servicos > .container > p {
    position: relative;
    z-index: 1;
    font-size: 1.1rem;
    color: var(--color-secondary);
}

.service-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 2rem;
    margin-top: 3.5rem;
    position: relative;
    z-index: 1;
}

.service-card {
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.95) 0%, rgba(240, 244, 248, 0.95) 100%);
    border-radius: 16px;
    padding: 2.5rem 1.8rem;
    text-align: center;
    box-shadow: var(--shadow-md);
    transition: all 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    border: 1px solid rgba(255, 255, 255, 0.5);
    height: 100%;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.service-card:hover {
    transform: translateY(-12px);
    box-shadow: var(--shadow-lg);
    background: linear-gradient(135deg, #ffffff 0%, #f8fbfd 100%);
}

.service-card img {
    width: 80px;
    height: 80px;
    margin: 0 auto 1.5rem;
    transition: transform 0.4s ease;
}

.service-card:hover img {
    transform: scale(1.1) rotate(5deg);
}

.service-card h3 {
    color: var(--color-primary);
    margin-bottom: 0.8rem;
    flex-grow: 1;
    font-size: 1.2rem;
}

.service-card p {
    color: #555;
    font-size: 0.95rem;
    margin-bottom: 1.5rem;
}

.service-card .btn-primary {
    align-self: center;
}

/* Segments Section */
#segmentos {
    background: linear-gradient(135deg, #ffffff 0%, #f5f9fc 100%);
    position: relative;
}

#segmentos h2 {
    color: var(--color-accent);
    font-size: 2.3rem;
    margin-bottom: 0.5rem;
}

#segmentos > .container > p {
    color: var(--color-text-dark);
    font-size: 1.1rem;
}

.segment-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
    gap: 1.5rem;
    margin-top: 3rem;
}

.segment-item {
    background: #fff;
    border-radius: 12px;
    overflow: hidden;
    position: relative;
    text-align: center;
    transition: all 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    box-shadow: var(--shadow-sm);
    border: 1px solid rgba(248, 195, 0, 0.1);
    height: 150px;
}

.segment-item:hover {
    transform: translateY(-8px);
    box-shadow: var(--shadow-md);
}

.segment-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    filter: brightness(0.65);
    transition: all 0.4s ease;
}

.segment-item:hover img {
    filter: brightness(0.85);
    transform: scale(1.05);
}

.segment-overlay {
    position: absolute;
    top: 0;
    width: 100%;
    padding: 1.2rem 0.8rem 0.8rem 0.8rem;
    background: linear-gradient(180deg, rgba(0, 0, 0, 0.8) 0%, transparent 100%);
    transform: translateY(-20px);
    transition: transform 0.4s ease;
}

.segment-item:hover .segment-overlay {
    transform: translateY(0);
}

.segment-overlay p {
    font-weight: 600;
    margin: 0;
    font-size: 0.85rem;
    color: var(--color-text-light);
}

/* Contact Section */
#contato {
    background: linear-gradient(135deg, var(--color-primary) 0%, #0d2438 100%);
    color: var(--color-text-light);
    position: relative;
    overflow: hidden;
}

#contato h2 {
    color: var(--color-accent);
    font-size: 2.3rem;
    margin-bottom: 0.8rem;
}

#contato > .container > p {
    color: var(--color-secondary);
    font-size: 1.05rem;
    margin-bottom: 3rem;
}

.contact-layout {
    display: grid;
    grid-template-columns: 1fr;
    gap: 3rem;
}

@media (min-width: 768px) {
    .contact-layout {
        grid-template-columns: 1fr 1fr;
    }
}

.contact-info h3 {
    border-bottom: 3px solid var(--color-accent);
    display: inline-block;
    padding-bottom: 0.5rem;
    margin-bottom: 2rem;
    color: var(--color-accent);
    font-size: 1.3rem;
}

.contact-detail {
    display: flex;
    align-items: center;
    margin-bottom: 1.8rem;
    font-size: 1rem;
    transition: transform 0.3s ease;
}

.contact-detail:hover {
    transform: translateX(5px);
}

.contact-detail img {
    width: 24px;
    height: 24px;
    margin-right: 15px;
    filter: invert(85%) sepia(30%) saturate(300%) hue-rotate(40deg);
    flex-shrink: 0;
}

.contact-detail span {
    line-height: 1.5;
}

.contact-form {
    background: linear-gradient(135deg, rgba(255,255,255,0.95) 0%, rgba(240,244,248,0.95) 100%);
    padding: 3rem;
    border-radius: 16px;
    box-shadow: var(--shadow-lg);
    border: 1px solid rgba(255,255,255,0.3);
}

.contact-form h3 {
    color: var(--color-primary);
    margin-bottom: 2rem;
    font-size: 1.3rem;
}

.form-group {
    margin-bottom: 1.5rem;
}

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 600;
    color: var(--color-primary);
    font-size: 0.95rem;
}

.form-group input, .form-group textarea {
    width: 100%;
    padding: 12px 15px;
    border: 1.5px solid rgba(248, 195, 0, 0.3);
    border-radius: 8px;
    font-size: 1rem;
    font-family: inherit;
    transition: all 0.3s ease;
    background: rgba(255, 255, 255, 0.7);
}

.form-group input:focus, .form-group textarea:focus {
    border-color: var(--color-accent);
    background: #fff;
    box-shadow: 0 0 0 3px rgba(248, 195, 0, 0.1);
    outline: none;
}

.form-group textarea {
    resize: vertical;
    min-height: 130px;
}

/* Footer */
footer {
    background: linear-gradient(135deg, var(--color-primary) 0%, #0d2438 100%);
    color: var(--color-secondary);
    padding: 3rem 0;
    text-align: center;
    border-top: 3px solid var(--color-accent);
}

footer p {
    margin-bottom: 0.5rem;
}

footer a {
    color: var(--color-accent);
    font-weight: 500;
    transition: all 0.3s ease;
}

footer a:hover {
    text-decoration: underline;
}

/* Service Pages */
.service-page-hero {
    height: 50vh;
    min-height: 320px;
    display: flex;
    align-items: center;
    position: relative;
    overflow: hidden;
    background-size: cover;
    background-position: center;
}

.service-page-hero h1 {
    z-index: 3;
    color: var(--color-text-light);
    position: relative;
    font-size: 2.5rem;
    text-shadow: 0 3px 10px rgba(0, 0, 0, 0.5);
    max-width: 90%;
    font-weight: 700;
}

@media (min-width: 768px) {
    .service-page-hero h1 {
        font-size: 3.2rem;
    }
}

.service-content-main {
    padding: 5rem 0;
    background: linear-gradient(135deg, #ffffff 0%, #f8fbfd 100%);
}

.service-details {
    display: flex;
    flex-direction: column;
    gap: 3rem;
}

.service-text-block h3 {
    color: var(--color-accent);
    margin-top: 2rem;
    margin-bottom: 0.8rem;
    font-size: 1.3rem;
}

.service-text-block p {
    margin-bottom: 1.2rem;
    font-size: 1.05rem;
    line-height: 1.8;
}

.environments-list {
    margin-top: 2.5rem;
    padding: 2rem;
    background: linear-gradient(135deg, rgba(248, 195, 0, 0.08) 0%, rgba(248, 195, 0, 0.04) 100%);
    border-radius: 12px;
    border-left: 4px solid var(--color-accent);
}

.environments-list h4 {
    color: var(--color-primary);
    margin-bottom: 1.5rem;
    font-size: 1.2rem;
}

.environments-list ul {
    list-style: none;
    padding-left: 0;
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.environments-list li {
    background: linear-gradient(135deg, var(--color-primary) 0%, #0d2438 100%);
    color: var(--color-text-light);
    padding: 8px 16px;
    border-radius: 50px;
    font-size: 0.9rem;
    font-weight: 500;
    transition: all 0.3s ease;
}

.environments-list li:hover {
    background: var(--color-accent);
    color: var(--color-primary);
    transform: translateY(-2px);
}

.cta-banner {
    background: linear-gradient(135deg, var(--color-primary) 0%, #0d2438 100%);
    color: var(--color-text-light);
    padding: 4rem 0;
    text-align: center;
    margin-top: 3rem;
    position: relative;
    overflow: hidden;
}

.cta-banner::before {
    content: '';
    position: absolute;
    top: 0;
    right: -10%;
    width: 400px;
    height: 400px;
    background: radial-gradient(circle, rgba(248, 195, 0, 0.1) 0%, transparent 70%);
    border-radius: 50%;
    z-index: 0;
}

.cta-banner h2 {
    color: var(--color-accent);
    margin-bottom: 0.8rem;
    font-size: 2.2rem;
    position: relative;
    z-index: 1;
}

.cta-banner p {
    color: var(--color-secondary);
    font-size: 1.05rem;
    margin-bottom: 1.5rem;
    position: relative;
    z-index: 1;
}

.cta-banner .btn-primary {
    position: relative;
    z-index: 1;
}

/* Dropdown styles for header "Empresa" submenu */
.nav-item.dropdown {
    position: relative;
}

.dropdown-toggle {
    background: transparent;
    border: none;
    color: var(--color-text-light);
    font-weight: 500;
    cursor: pointer;
    padding: 8px 0;
    font-size: 0.95rem;
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
}

.dropdown-menu {
    position: absolute;
    top: calc(100% + 8px);
    left: 0;
    min-width: 200px;
    background: #fff;
    color: var(--color-text-dark);
    border-radius: 8px;
    box-shadow: 0 10px 30px rgba(2,6,23,0.18);
    padding: 0.5rem 0;
    transform-origin: top center;
    opacity: 0;
    visibility: hidden;
    transition: all 0.18s ease;
    z-index: 1300; /* ensure dropdowns always render above decorative accents */
    border: 1px solid rgba(10,25,49,0.06);
}

.nav-item.dropdown.open .dropdown-menu {
    opacity: 1;
    visibility: visible;
    transform: translateY(4px);
}

.dropdown-menu li {
    list-style: none;
}

.dropdown-menu a {
    display: block;
    padding: 0.6rem 1rem;
    color: var(--color-text-dark);
    font-weight: 500;
    text-decoration: none;
}

.dropdown-menu a:hover {
    background: linear-gradient(90deg, rgba(10,25,49,0.03), rgba(10,25,49,0.02));
}

/* Responsive: make dropdown behave inside mobile slide-out menu */
@media (max-width: 992px) {
    .dropdown-menu {
        position: static;
        background: transparent;
        box-shadow: none;
        padding-left: 0.5rem;
        opacity: 1;
        visibility: visible;
        transform: none;
        display: none;
    }
    .nav-item.dropdown.open .dropdown-menu {
        display: block;
        padding-left: 0;
    }
    .dropdown-toggle {
        color: var(--color-text-light);
    }
    .dropdown-menu a {
        color: var(--color-text-light);
        padding: 0.8rem 0;
    }
}

.navbar .logo {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

/* Logo image */
.navbar .nav-logo {
    height: 88px;
    width: auto;
    display: block;
    filter: none;
    image-rendering: -webkit-optimize-contrast;
}

/* Stylized text next to the logo to act as a decorative wordmark */
.logo-text {
    /* lighter metallic gold gradient via background-clip to simulate polished gold */
    background-image: linear-gradient(180deg,
        #fffaf0 0%,
        #f7d97f 18%,
        #e9be44 40%,
        #d8a82a 65%,
        #b78508 88%,
        #fff7e6 100%);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    /* use the site's sans-serif stack for a non-serif, modern wordmark */
    font-family: var(--font-family-sans);
    font-size: 32px; /* roughly half of previous size */
    line-height: 0.95;
    letter-spacing: -0.3px;
    font-weight: 600;
    /* lighter, subtler shadows to preserve depth at smaller size */
    text-shadow:
      0 1px 0 rgba(255,255,255,0.06),
      0 6px 12px rgba(4,10,20,0.22),
      0 1px 0 rgba(0,0,0,0.12) inset;
    transform: translateY(3px);
    white-space: nowrap;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* Ensure the logo block remains compact on smaller screens */
@media (max-width: 992px) {
    .logo-text {
        font-size: 28px;
        transform: translateY(2px);
    }
}

/* Very small screens: reduce further so header remains usable */
@media (max-width: 420px) {
    .navbar .nav-logo {
        height: 64px;
    }
    .logo-text {
        font-size: 20px;
    }
}

/* Ensure responsive images don't create horizontal overflow */
img {
    max-width: 100%;
    height: auto;
    display: block;
    backface-visibility: hidden;
    -webkit-backface-visibility: hidden;
}

