/* ===== CSS Variables ===== */
:root {
    /* Colors */
    --primary-color: #e67e22;
    --primary-color-dark: #d35400;
    --primary-color-light: #f39c12;
    --secondary-color: #2d3748;
    --accent-color: #e67e22;
    --text-color: #2d3748;
    --text-color-light: #718096;
    --white-color: #ffffff;
    --body-color: #f7fafc;
    --container-color: #ffffff;
    --border-color: #e2e8f0;
    --bg-light: #f7fafc;
    
    /* Typography */
    --body-font: 'Inter', sans-serif;
    --heading-font: 'Playfair Display', serif;
    --biggest-font-size: 3.5rem;
    --h1-font-size: 2.5rem;
    --h2-font-size: 2rem;
    --h3-font-size: 1.5rem;
    --normal-font-size: 1rem;
    --small-font-size: 0.875rem;
    --smaller-font-size: 0.75rem;
    
    /* Font Weight */
    --font-light: 300;
    --font-regular: 400;
    --font-medium: 500;
    --font-semi-bold: 600;
    --font-bold: 700;
    --font-extra-bold: 800;
    
    /* Spacing */
    --mb-0-5: 0.5rem;
    --mb-0-75: 0.75rem;
    --mb-1: 1rem;
    --mb-1-5: 1.5rem;
    --mb-2: 2rem;
    --mb-2-5: 2.5rem;
    --mb-3: 3rem;
    
    /* Z-index */
    --z-tooltip: 10;
    --z-fixed: 100;
    --z-modal: 1000;
    
    /* Shadows */
    --shadow-sm: 0 2px 4px rgba(0, 0, 0, 0.1);
    --shadow-md: 0 4px 6px rgba(0, 0, 0, 0.1);
    --shadow-lg: 0 10px 15px rgba(0, 0, 0, 0.1);
    --shadow-xl: 0 20px 25px rgba(0, 0, 0, 0.15);
    
    /* Transitions */
    --transition: all 0.3s ease;
    --transition-fast: all 0.2s ease;
    --transition-slow: all 0.5s ease;
    
    /* Performance */
    --gpu-accelerated: translateZ(0);
}

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

html {
    scroll-behavior: smooth;
    /* Performance: Enable hardware acceleration for smooth scrolling */
    -webkit-overflow-scrolling: touch;
    /* Performance: Optimize font rendering */
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    text-rendering: optimizeLegibility;
}

/* Performance: Optimize font loading */
@font-face {
    font-family: 'Inter';
    font-display: swap; /* Show fallback font immediately, swap when loaded */
}

@font-face {
    font-family: 'Playfair Display';
    font-display: swap;
}

body {
    font-family: var(--body-font);
    font-size: var(--normal-font-size);
    background-color: var(--body-color);
    color: var(--text-color);
    line-height: 1.6;
    /* Performance: Optimize rendering */
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    text-rendering: optimizeLegibility;
    /* Performance: Reduce layout shifts */
    overflow-x: hidden;
}

h1, h2, h3, h4 {
    font-family: var(--heading-font);
    font-weight: var(--font-bold);
    color: var(--text-color);
    line-height: 1.2;
}

ul {
    list-style: none;
}

a {
    text-decoration: none;
    color: inherit;
}

img {
    max-width: 100%;
    height: auto;
    display: block;
    /* Performance: Optimize image rendering */
    image-rendering: -webkit-optimize-contrast;
    image-rendering: crisp-edges;
    /* Performance: Enable GPU acceleration for images */
    transform: translateZ(0);
    will-change: transform;
    /* Performance: Lazy loading by default (override with loading="eager" for critical images) */
    loading: lazy;
    decoding: async;
}

button {
    cursor: pointer;
    border: none;
    outline: none;
}

/* ===== Reusable Classes ===== */
.container {
    max-width: 1200px;
    margin-left: auto;
    margin-right: auto;
    padding-left: 1.5rem;
    padding-right: 1.5rem;
}

.section {
    padding: 5rem 0;
}

/* Hero section should have no top padding/margin to sit directly under header */
.hero.section,
section.hero {
    padding-top: 0 !important;
    margin-top: 0 !important;
}

.section__header {
    text-align: center;
    margin-bottom: 3rem;
    /* Animation will be handled by scroll-fade class */
}

.section__subtitle {
    display: inline-block;
    font-size: var(--small-font-size);
    font-weight: var(--font-semi-bold);
    color: var(--primary-color);
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: var(--mb-0-75);
    /* Animation will be handled by scroll-fade class */
}

.section__title {
    font-size: var(--h1-font-size);
    margin-bottom: var(--mb-1);
    color: var(--text-color);
    /* Animation will be handled by scroll-fade class */
}

.section__description {
    font-size: var(--normal-font-size);
    color: var(--text-color-light);
    max-width: 600px;
    margin: 0 auto;
    /* Animation will be handled by scroll-fade class */
}

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

/* ===== Buttons ===== */
.btn {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.875rem 2rem;
    font-size: var(--normal-font-size);
    font-weight: var(--font-semi-bold);
    border-radius: 0.5rem;
    transition: var(--transition);
    cursor: pointer;
    /* Performance: GPU acceleration for buttons */
    transform: translateZ(0);
    will-change: transform;
    backface-visibility: hidden;
    -webkit-backface-visibility: hidden;
}

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

.btn--primary:hover {
    background-color: var(--primary-color-dark);
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
}

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

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

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

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

.btn--large {
    padding: 1rem 2.5rem;
    font-size: 1.125rem;
}

/* ===== Header ===== */
.header {
    width: 100%;
    position: fixed;
    top: 0;
    left: 0;
    z-index: var(--z-fixed);
    background-color: var(--container-color);
    box-shadow: var(--shadow-sm);
    transition: var(--transition);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    /* Performance: GPU acceleration for header */
    transform: translateZ(0);
    will-change: transform, box-shadow;
    backface-visibility: hidden;
    -webkit-backface-visibility: hidden;
}

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

.nav {
    height: 4.5rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    position: relative;
}

.nav__logo {
    display: flex;
    align-items: center;
    text-decoration: none;
}

.logo-img {
    height: 35px;
    width: auto;
    object-fit: contain;
    max-width: 200px;
}

.logo-text {
    font-size: 1.5rem;
    font-weight: var(--font-bold);
    color: var(--text-color);
}

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

.nav__list {
    display: flex;
    column-gap: 2.5rem;
}

.nav__link {
    font-weight: var(--font-medium);
    color: var(--text-color);
    transition: var(--transition);
    position: relative;
}

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

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

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

.nav__toggle {
    display: none;
    flex-direction: column;
    justify-content: space-around;
    width: 28px;
    height: 28px;
    background: transparent;
    border: none;
    cursor: pointer;
    padding: 0;
    z-index: calc(var(--z-fixed) + 1);
}

.nav__toggle-line {
    width: 100%;
    height: 3px;
    background-color: var(--text-color);
    border-radius: 3px;
    transition: all 0.3s cubic-bezier(0.68, -0.55, 0.265, 1.55);
    transform-origin: center;
}

.nav__toggle.active .nav__toggle-line:nth-child(1) {
    transform: rotate(45deg) translate(8px, 8px);
    background-color: var(--primary-color);
}

.nav__toggle.active .nav__toggle-line:nth-child(2) {
    opacity: 0;
    transform: translateX(-10px);
}

.nav__toggle.active .nav__toggle-line:nth-child(3) {
    transform: rotate(-45deg) translate(8px, -8px);
    background-color: var(--primary-color);
}

/* Close button removed - using hamburger toggle instead */

/* Mobile Menu Overlay */
.nav__overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100vh;
    background-color: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(4px);
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
    z-index: calc(var(--z-fixed) - 1);
    pointer-events: none;
}

.nav__overlay.active {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
}

.nav__btns {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.nav__cta {
    padding: 0.625rem 1.5rem;
    font-size: 0.9375rem;
    white-space: nowrap;
    transition: var(--transition);
}

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

@media screen and (max-width: 967px) {
    .nav__cta {
        display: none;
    }
    
    .nav__btns {
        gap: 0.5rem;
    }
}

/* Language Selector - Floating Version */
.language-selector--float {
    position: relative;
}

.language-btn--float {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    width: 60px;
    height: 60px;
    padding: 0;
    background-color: var(--primary-color);
    border: none;
    border-radius: 50%;
    color: var(--white-color);
    font-size: 0.9rem;
    font-weight: var(--font-semi-bold);
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: var(--shadow-xl);
}

.language-btn--float:hover {
    background-color: var(--primary-color-dark);
    transform: scale(1.1);
    box-shadow: 0 0 20px rgba(230, 126, 34, 0.5);
}

.language-btn--float i {
    font-size: 1.2rem;
}

.language-dropdown--float {
    position: absolute;
    bottom: calc(100% + 0.5rem);
    right: 0;
    background: white;
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius);
    box-shadow: var(--shadow-lg);
    min-width: 200px;
    max-width: 250px;
    opacity: 0;
    visibility: hidden;
    transform: translateY(10px);
    transition: all 0.3s ease;
    z-index: 1001;
    overflow: hidden;
    max-height: 0;
}

.language-dropdown--float.active {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
    max-height: 500px;
}

.language-option {
    display: flex;
    align-items: center;
    width: 100%;
    padding: 0.875rem 1.25rem;
    background: transparent;
    border: none;
    text-align: left;
    color: var(--text-color);
    font-size: 0.95rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    position: relative;
    z-index: 1;
}

.language-option:hover {
    background: var(--bg-light);
    color: var(--primary-color);
    transform: translateX(3px);
}

.language-option:active {
    background: var(--primary-color);
    color: white;
}

.language-option:first-child {
    border-radius: var(--border-radius) var(--border-radius) 0 0;
}

.language-option:last-child {
    border-radius: 0 0 var(--border-radius) var(--border-radius);
}

/* Melhorar visibilidade do texto em espanhol e italiano */
.language-option {
    line-height: 1.5;
    letter-spacing: 0.01em;
}

/* Garantir que o dropdown não fica cortado */
@media screen and (max-width: 768px) {
    .language-dropdown--float {
        min-width: 180px;
        max-width: 200px;
    }
    
    .language-option {
        padding: 0.75rem 1rem;
        font-size: 0.9rem;
    }
}

/* ===== Hero Section ===== */
.hero {
    padding: 0 !important;
    margin: 0 !important;
    position: relative;
    min-height: 90vh;
    display: flex;
    align-items: center;
    overflow: hidden;
    margin-top: 0 !important;
    padding-top: 0 !important;
}

/* Ensure hero and all its children are always visible */
.hero,
.hero .scroll-fade {
    opacity: 1 !important;
    transform: none !important;
    transition: none !important;
}

/* Allow carousel slides to have transitions */
.hero__carousel-slide {
    transition: opacity 1.2s ease-in-out !important;
    /* Performance: GPU acceleration for carousel */
    transform: translateZ(0);
    will-change: opacity;
    backface-visibility: hidden;
    -webkit-backface-visibility: hidden;
}

.hero__banner {
    position: relative;
    width: 100%;
    min-height: 90vh;
    display: flex;
    align-items: center;
    margin-top: 0 !important;
    padding-top: 0 !important;
    top: 0;
}

.hero__carousel-wrapper {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1;
}

.hero__overlay-gradient {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(180deg, rgba(0, 0, 0, 0.4) 0%, rgba(0, 0, 0, 0.6) 100%);
    z-index: 2;
    pointer-events: none;
}

.hero__content-wrapper {
    position: relative;
    z-index: 3;
    width: 100%;
    padding: 6rem 0;
    display: flex;
    align-items: center;
    justify-content: center;
}

.hero__content {
    max-width: 800px;
    color: var(--white-color);
    text-align: center;
    margin: 0 auto;
}

.hero__title {
    font-size: clamp(2.5rem, 6vw, 4.5rem);
    font-weight: var(--font-bold);
    margin-bottom: 1.5rem;
    line-height: 1.2;
    color: var(--white-color);
    letter-spacing: -0.02em;
}

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

.hero__description {
    font-size: clamp(1.125rem, 2vw, 1.375rem);
    color: rgba(255, 255, 255, 0.9);
    margin-bottom: 2.5rem;
    line-height: 1.6;
    font-weight: var(--font-regular);
}

.hero__buttons {
    display: flex;
    gap: 1rem;
    justify-content: center;
    align-items: center;
    flex-wrap: wrap;
}

.hero__carousel {
    position: relative;
    width: 100%;
    height: 90vh;
    overflow: hidden;
}

.hero__carousel-track {
    position: relative;
    width: 100%;
    height: 100%;
}

.hero__carousel-slide {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
    transition: opacity 1.2s ease-in-out;
    pointer-events: none;
    z-index: 0;
}

.hero__carousel-slide.active {
    opacity: 1 !important;
    pointer-events: auto;
    z-index: 1;
}

.hero__image-wrapper {
    position: relative;
    width: 100%;
    height: 100%;
    overflow: hidden;
    display: block;
}

.hero__img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
}

@media screen and (max-width: 768px) {
    .hero__img {
        object-fit: cover;
        object-position: center;
    }
}

.hero__overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, rgba(230, 126, 34, 0.3) 0%, rgba(243, 156, 18, 0.2) 100%);
    pointer-events: none;
}

/* Carousel Indicators */
.hero__carousel-indicators {
    position: absolute;
    bottom: 1.5rem;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 0.5rem;
    align-items: center;
    justify-content: center;
    z-index: 10;
}

.hero__carousel-indicator {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.3);
    border: none;
    cursor: pointer;
    transition: background 0.3s ease;
    padding: 0;
    margin: 0;
}

.hero__carousel-indicator.active {
    background: rgba(255, 255, 255, 0.6);
}

.hero__carousel-indicator:hover {
    background: rgba(255, 255, 255, 0.5);
}

/* ===== Services Section ===== */
.services {
    background-color: var(--white-color);
}

.services__grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
    /* Performance: CSS containment for better rendering */
    contain: layout style;
}

.service-card {
    background-color: var(--container-color);
    padding: 2.5rem;
    border-radius: 1rem;
    box-shadow: var(--shadow-md);
    transition: var(--transition);
    border: 1px solid #e2e8f0;
    /* Animation will be handled by scroll-fade class */
}

.service-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-xl);
    border-color: var(--primary-color);
}

.service-card__icon {
    width: 60px;
    height: 60px;
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--primary-color-light) 100%);
    border-radius: 0.75rem;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: var(--mb-1-5);
    font-size: 1.5rem;
    color: var(--white-color);
}

.service-card__title {
    font-size: var(--h3-font-size);
    margin-bottom: var(--mb-1);
    color: var(--text-color);
}

.service-card__description {
    color: var(--text-color-light);
    margin-bottom: var(--mb-1-5);
    line-height: 1.7;
}

.service-card__link {
    color: var(--primary-color);
    font-weight: var(--font-semi-bold);
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    transition: var(--transition);
}

.service-card__link:hover {
    gap: 1rem;
    color: var(--primary-color-dark);
}

/* ===== Portfolio Section ===== */
.portfolio {
    background-color: var(--body-color);
    /* Performance: Content visibility for sections below fold */
    content-visibility: auto;
    contain-intrinsic-size: 800px;
}

.portfolio__filters {
    display: flex;
    justify-content: center;
    gap: 1rem;
    margin-bottom: var(--mb-3);
    flex-wrap: wrap;
    /* Animation will be handled by scroll-fade class */
}

.portfolio__filter {
    padding: 0.75rem 1.5rem;
    background-color: var(--white-color);
    color: var(--text-color);
    border: 2px solid #e2e8f0;
    border-radius: 2rem;
    font-weight: var(--font-medium);
    transition: all 0.3s ease;
    cursor: pointer;
    position: relative;
    z-index: 1;
    pointer-events: auto;
    user-select: none;
    -webkit-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
    min-width: 120px;
    text-align: center;
    white-space: nowrap;
}

.portfolio__filter:hover {
    background-color: var(--primary-color);
    color: var(--white-color);
    border-color: var(--primary-color);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(230, 126, 34, 0.3);
}

.portfolio__filter.active {
    background-color: var(--primary-color);
    color: var(--white-color);
    border-color: var(--primary-color);
    box-shadow: 0 4px 12px rgba(230, 126, 34, 0.3);
}

.portfolio__filter:active {
    transform: translateY(0);
    box-shadow: 0 2px 6px rgba(230, 126, 34, 0.2);
}

/* Ensure filters are always clickable, even during translation */
.portfolio__filters {
    position: relative;
    z-index: 10;
    pointer-events: auto;
}

.portfolio__grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
    gap: 2rem;
    /* Performance: CSS containment for better rendering */
    contain: layout style;
}

.portfolio-item {
    border-radius: 1rem;
    overflow: hidden;
    box-shadow: var(--shadow-md);
    transition: var(--transition);
    cursor: pointer;
    /* Animation will be handled by scroll-fade class */
}

.portfolio-item:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-xl);
}

.portfolio-item__image {
    position: relative;
    overflow: hidden;
    height: 300px;
}

.portfolio-item__image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: var(--transition);
}

.portfolio-item:hover .portfolio-item__image img {
    transform: scale(1.1);
}

.portfolio-item__overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, rgba(230, 126, 34, 0.9) 0%, rgba(243, 156, 18, 0.8) 100%);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: var(--transition);
    padding: 2rem;
    text-align: center;
}

.portfolio-item:hover .portfolio-item__overlay {
    opacity: 1;
}

.portfolio-item__title {
    color: var(--white-color);
    font-size: var(--h3-font-size);
    margin-bottom: var(--mb-0-5);
}

.portfolio-item__category {
    color: rgba(255, 255, 255, 0.9);
    font-size: var(--small-font-size);
    margin-bottom: var(--mb-1);
    text-transform: uppercase;
    letter-spacing: 1px;
}

.portfolio-item__link {
    color: var(--white-color);
    font-weight: var(--font-semi-bold);
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem 1.5rem;
    background-color: rgba(255, 255, 255, 0.2);
    border-radius: 0.5rem;
    transition: var(--transition);
}

.portfolio-item__link:hover {
    background-color: var(--white-color);
    color: var(--primary-color);
}

/* ===== About Section ===== */
.about {
    background-color: var(--white-color);
    /* Performance: Content visibility for sections below fold */
    content-visibility: auto;
    contain-intrinsic-size: 600px;
}

.about__container {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
    align-items: center;
}

.about__description {
    color: var(--text-color-light);
    margin-bottom: var(--mb-1-5);
    line-height: 1.8;
}

.about__actions {
    margin-top: var(--mb-2);
    margin-bottom: var(--mb-2);
}

.about__btn {
    display: inline-flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.875rem 2rem;
    font-size: var(--normal-font-size);
    font-weight: var(--font-semi-bold);
    border-radius: 0.5rem;
    transition: var(--transition);
    text-decoration: none;
    /* Performance: GPU acceleration */
    transform: translateZ(0);
    will-change: transform;
}

.about__btn i {
    transition: transform 0.3s ease;
}

.about__btn:hover i {
    transform: translateX(5px);
}

.about__values {
    margin-top: var(--mb-3);
    /* Animation will be handled by scroll-fade class */
}

.value-item {
    display: flex;
    align-items: flex-start;
    gap: 1rem;
    margin-bottom: var(--mb-1-5);
    /* Animation will be handled by scroll-fade class */
}

.value-item i {
    font-size: 1.5rem;
    color: var(--primary-color);
    margin-top: 0.25rem;
}

.value-item h4 {
    font-size: var(--h3-font-size);
    margin-bottom: var(--mb-0-5);
}

.value-item p {
    color: var(--text-color-light);
}

.about__image {
    border-radius: 1rem;
    overflow: hidden;
    box-shadow: var(--shadow-xl);
}

.about__image img {
    width: 100%;
    height: 500px;
    object-fit: cover;
}

/* ===== Team Section ===== */
.team {
    background-color: var(--body-color);
    /* Performance: Content visibility for sections below fold */
    content-visibility: auto;
    contain-intrinsic-size: 500px;
}

.team__grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 2rem;
    align-items: stretch; /* Garante que todos os cards têm a mesma altura */
    /* Performance: CSS containment for better rendering */
    contain: layout style;
}

.team-card {
    background-color: var(--white-color);
    border-radius: 1rem;
    overflow: hidden;
    box-shadow: var(--shadow-md);
    transition: var(--transition);
    text-align: center;
    display: flex;
    flex-direction: column;
    height: 100%;
    /* Animation will be handled by scroll-fade class */
}

.team-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-xl);
}

.team-card__image {
    width: 100%;
    height: 360px;
    overflow: hidden;
}

.team-card__image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: var(--transition);
}

.team-card:hover .team-card__image img {
    transform: scale(1.1);
}

.team-card__content {
    padding: 1rem 1.5rem;
    display: flex;
    flex-direction: column;
    flex-grow: 1;
    justify-content: center;
}

.team-card__name {
    font-size: var(--h3-font-size);
    margin-bottom: 0.15rem;
    color: var(--text-color);
}

.team-card__role {
    color: var(--text-color-light);
    font-size: var(--small-font-size);
}

/* ===== Contact Section ===== */
.contact {
    background-color: var(--white-color);
}

.contact__container {
    display: grid;
    grid-template-columns: 1fr 2fr;
    gap: 4rem;
}

.contact__info {
    display: flex;
    flex-direction: column;
    gap: 2rem;
}

.contact__card {
    background-color: var(--body-color);
    padding: 2rem;
    border-radius: 1rem;
    text-align: center;
    box-shadow: var(--shadow-md);
    transition: var(--transition);
}

.contact__card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-lg);
}

.contact__icon {
    font-size: 2.5rem;
    color: var(--primary-color);
    margin-bottom: var(--mb-1);
}

.contact__card-title {
    font-size: var(--h3-font-size);
    margin-bottom: var(--mb-0-5);
}

.contact__card-data {
    color: var(--text-color-light);
}

.contact__social {
    display: flex;
    justify-content: center;
    gap: 1rem;
    margin-top: 1rem;
}

.contact__social-link {
    width: 40px;
    height: 40px;
    background-color: var(--primary-color);
    color: var(--white-color);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: var(--transition);
}

.contact__social-link:hover {
    background-color: var(--primary-color-dark);
    transform: translateY(-3px);
}

.contact__form {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
    /* Animation will be handled by scroll-fade class */
}

.contact__form-group {
    width: 100%;
}

.contact__form-input {
    width: 100%;
    padding: 1rem;
    border: 2px solid #e2e8f0;
    border-radius: 0.5rem;
    font-family: var(--body-font);
    font-size: var(--normal-font-size);
    transition: var(--transition);
    background-color: var(--body-color);
}

.contact__form-input:focus {
    outline: none;
    border-color: var(--primary-color);
    background-color: var(--white-color);
}

.contact__form-input::placeholder {
    color: var(--text-color-light);
}

/* ===== Footer ===== */
.footer {
    background-color: var(--text-color);
    color: var(--white-color);
    padding: 3rem 0 1.5rem;
}

.footer__container {
    display: flex;
    flex-direction: column;
    gap: 2rem;
}

.footer__content {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
}

.footer__title {
    font-size: var(--h3-font-size);
    margin-bottom: var(--mb-1);
    color: var(--white-color);
}

.footer__description {
    color: rgba(255, 255, 255, 0.7);
    margin-bottom: var(--mb-1);
    line-height: 1.7;
}

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

.footer__social-link {
    width: 40px;
    height: 40px;
    background-color: rgba(255, 255, 255, 0.1);
    color: var(--white-color);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: var(--transition);
}

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

.footer__links {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.footer__link {
    color: rgba(255, 255, 255, 0.7);
    transition: var(--transition);
}

.footer__link:hover {
    color: var(--white-color);
    padding-left: 0.5rem;
}

.footer__contact {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.footer__contact li {
    display: flex;
    align-items: center;
    gap: 1rem;
    color: rgba(255, 255, 255, 0.7);
}

.footer__contact i {
    color: var(--primary-color);
}

.footer__copy {
    text-align: center;
    padding-top: 2rem;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    color: rgba(255, 255, 255, 0.7);
}

/* ===== Scroll Top ===== */
.scrolltop {
    position: fixed;
    right: 2rem;
    bottom: 6rem;
    width: 45px;
    height: 45px;
    background-color: var(--primary-color);
    color: var(--white-color);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.25rem;
    box-shadow: var(--shadow-lg);
    opacity: 0;
    visibility: hidden;
    transition: var(--transition);
    z-index: var(--z-tooltip);
}

.scrolltop.show-scroll {
    opacity: 1;
    visibility: visible;
}

.scrolltop:hover {
    background-color: var(--primary-color-dark);
    transform: translateY(-5px);
}

/* ===== Floating Actions Container ===== */
.floating-actions {
    position: fixed;
    right: 2rem;
    bottom: 2rem;
    display: flex;
    flex-direction: row;
    gap: 1rem;
    z-index: var(--z-tooltip);
    align-items: center;
}

/* ===== WhatsApp Float ===== */
.whatsapp-float {
    width: 60px;
    height: 60px;
    background-color: #25d366;
    color: var(--white-color);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.75rem;
    box-shadow: var(--shadow-xl);
    transition: var(--transition);
    animation: pulse 2s infinite;
}

.whatsapp-float:hover {
    transform: scale(1.1);
    box-shadow: 0 0 20px rgba(37, 211, 102, 0.5);
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

@keyframes pulse {
    0% {
        box-shadow: 0 0 0 0 rgba(37, 211, 102, 0.7);
    }
    70% {
        box-shadow: 0 0 0 10px rgba(37, 211, 102, 0);
    }
    100% {
        box-shadow: 0 0 0 0 rgba(37, 211, 102, 0);
    }
}

/* ===== Portfolio Modal ===== */
.portfolio-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: var(--z-modal);
    opacity: 0;
    visibility: hidden;
    transition: var(--transition);
    overflow-y: auto;
}

.portfolio-modal.active {
    opacity: 1;
    visibility: visible;
}

.portfolio-modal__overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.9);
    backdrop-filter: blur(5px);
}

.portfolio-modal__container {
    position: relative;
    max-width: 1400px;
    width: 95%;
    margin: 2rem auto;
    background-color: var(--white-color);
    border-radius: 1rem;
    box-shadow: var(--shadow-xl);
    transform: scale(0.9);
    transition: transform 0.3s ease;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    max-height: 95vh;
}

.portfolio-modal.active .portfolio-modal__container {
    transform: scale(1);
}

.portfolio-modal__close {
    position: absolute;
    top: 1.5rem;
    right: 1.5rem;
    width: 45px;
    height: 45px;
    background-color: var(--white-color);
    color: var(--text-color);
    border: none;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.25rem;
    cursor: pointer;
    z-index: 10;
    box-shadow: var(--shadow-md);
    transition: var(--transition);
}

.portfolio-modal__close:hover {
    background-color: var(--primary-color);
    color: var(--white-color);
    transform: rotate(90deg);
}

.portfolio-modal__content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0;
    min-width: 0;
    overflow: hidden;
}

.portfolio-modal__gallery {
    background-color: var(--body-color);
    padding: 2rem;
    display: flex;
    flex-direction: column;
    min-width: 0;
    overflow: hidden;
}

.portfolio-modal__main-image {
    position: relative;
    width: 100%;
    height: 500px;
    border-radius: 0.75rem;
    overflow: hidden;
    margin-bottom: 1rem;
    background-color: #e2e8f0;
    /* Performance: GPU acceleration */
    transform: translateZ(0);
    will-change: contents;
}

.portfolio-modal__main-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    /* Performance: Fast fade transition */
    transition: opacity 0.25s ease-in-out;
    opacity: 1;
    /* Performance: GPU acceleration */
    transform: translateZ(0);
    will-change: opacity;
    backface-visibility: hidden;
    -webkit-backface-visibility: hidden;
}

/* Performance: Fade transitions for image changes */
.portfolio-modal__main-image img.fade-out {
    opacity: 0 !important;
    transition: opacity 0.2s ease-out !important;
}

.portfolio-modal__main-image img.fade-in {
    opacity: 1 !important;
    transition: opacity 0.25s ease-in !important;
}

.portfolio-modal__prev,
.portfolio-modal__next {
    position: absolute;
    top: 50%;
    transform: translateY(-50%) translateZ(0);
    width: 45px;
    height: 45px;
    background-color: rgba(255, 255, 255, 0.9);
    color: var(--text-color);
    border: none;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.125rem;
    cursor: pointer;
    transition: all 0.2s ease;
    z-index: 5;
    box-shadow: var(--shadow-md);
    /* Performance: GPU acceleration */
    will-change: transform, background-color;
    backface-visibility: hidden;
    -webkit-backface-visibility: hidden;
}

.portfolio-modal__prev:hover,
.portfolio-modal__next:hover {
    background-color: var(--primary-color);
    color: var(--white-color);
    transform: translateY(-50%) scale(1.1) translateZ(0);
}

.portfolio-modal__prev {
    left: 1rem;
}

.portfolio-modal__next {
    right: 1rem;
}

.portfolio-modal__thumbnails {
    display: flex;
    gap: 0.75rem;
    overflow-x: auto;
    overflow-y: hidden;
    padding: 0.5rem 0.5rem 0.75rem 0.5rem;
    max-width: 100%;
    flex-wrap: nowrap;
    scroll-behavior: smooth;
    /* Estilizar scrollbar para WebKit browsers */
    scrollbar-width: thin;
    scrollbar-color: var(--primary-color) var(--body-color);
}

.portfolio-modal__thumbnails::-webkit-scrollbar {
    height: 8px;
}

.portfolio-modal__thumbnails::-webkit-scrollbar-track {
    background: var(--body-color);
    border-radius: 4px;
}

.portfolio-modal__thumbnails::-webkit-scrollbar-thumb {
    background-color: var(--primary-color);
    border-radius: 4px;
}

.portfolio-modal__thumbnails::-webkit-scrollbar-thumb:hover {
    background-color: var(--primary-color-dark);
}

.portfolio-modal__thumbnail {
    min-width: 100px;
    width: 100px;
    height: 80px;
    flex-shrink: 0;
    flex-grow: 0;
    border-radius: 0.5rem;
    overflow: hidden;
    cursor: pointer;
    opacity: 0.6;
    transition: opacity 0.2s ease, transform 0.2s ease, border-color 0.2s ease;
    border: 2px solid transparent;
    /* Performance: GPU acceleration */
    transform: translateZ(0);
    will-change: opacity, transform;
    backface-visibility: hidden;
    -webkit-backface-visibility: hidden;
    /* Ensure thumbnails are clickable */
    pointer-events: auto;
    user-select: none;
    -webkit-user-select: none;
}

.portfolio-modal__thumbnail:hover,
.portfolio-modal__thumbnail.active {
    opacity: 1;
    border-color: var(--primary-color);
    transform: scale(1.05) translateZ(0);
}

.portfolio-modal__thumbnail img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    /* Ensure images don't block clicks */
    pointer-events: none;
    /* Smooth image loading */
    transition: opacity 0.2s ease;
}

.portfolio-modal__info {
    padding: 3rem;
    overflow-y: auto;
    max-height: calc(100vh - 4rem);
}

.portfolio-modal__header {
    margin-bottom: 2rem;
    padding-bottom: 1.5rem;
    border-bottom: 2px solid #e2e8f0;
}

.portfolio-modal__category {
    display: inline-block;
    font-size: var(--small-font-size);
    font-weight: var(--font-semi-bold);
    color: var(--primary-color);
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: var(--mb-0-75);
}

.portfolio-modal__title {
    font-size: var(--h1-font-size);
    color: var(--text-color);
    margin-bottom: 0;
}

.portfolio-modal__stats {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1.5rem;
    margin-bottom: 2rem;
    padding: 1.5rem;
    background-color: var(--body-color);
    border-radius: 0.75rem;
}

.portfolio-modal__stat {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.portfolio-modal__stat i {
    font-size: 1.5rem;
    color: var(--primary-color);
    width: 40px;
    text-align: center;
}

.portfolio-modal__stat div {
    display: flex;
    flex-direction: column;
}

.portfolio-modal__stat-label {
    font-size: var(--small-font-size);
    color: var(--text-color-light);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.portfolio-modal__stat-value {
    font-size: var(--h3-font-size);
    font-weight: var(--font-bold);
    color: var(--text-color);
    margin-top: 0.25rem;
}

.portfolio-modal__description {
    margin-bottom: 2rem;
}

.portfolio-modal__description h3,
.portfolio-modal__challenges h3,
.portfolio-modal__features h3 {
    font-size: var(--h3-font-size);
    margin-bottom: var(--mb-1);
    color: var(--text-color);
}

.portfolio-modal__description p {
    color: var(--text-color-light);
    line-height: 1.8;
    font-size: 1.0625rem;
}

.portfolio-modal__challenges {
    margin-bottom: 2rem;
}

.portfolio-modal__challenge-item {
    background-color: var(--body-color);
    padding: 1.25rem;
    border-radius: 0.5rem;
    margin-bottom: 1rem;
    border-left: 4px solid var(--primary-color);
}

.portfolio-modal__challenge-item h4 {
    font-size: 1.125rem;
    color: var(--text-color);
    margin-bottom: 0.5rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.portfolio-modal__challenge-item h4 i {
    color: var(--primary-color);
}

.portfolio-modal__challenge-item p {
    color: var(--text-color-light);
    line-height: 1.7;
    margin: 0;
}

.portfolio-modal__features {
    margin-bottom: 2rem;
}

.portfolio-modal__features ul {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 0.75rem;
    list-style: none;
    padding: 0;
}

.portfolio-modal__features li {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    color: var(--text-color-light);
    padding: 0.5rem 0;
}

.portfolio-modal__features li i {
    color: var(--primary-color);
    font-size: 0.875rem;
}

.portfolio-modal__testimonial {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--primary-color-light) 100%);
    padding: 2rem;
    border-radius: 0.75rem;
    margin-bottom: 2rem;
    color: var(--white-color);
}

.portfolio-modal__testimonial-content {
    position: relative;
}

.portfolio-modal__testimonial-content i {
    font-size: 3rem;
    opacity: 0.3;
    position: absolute;
    top: -1rem;
    left: -0.5rem;
}

.portfolio-modal__testimonial-content p {
    font-size: 1.125rem;
    line-height: 1.8;
    margin-bottom: 1.5rem;
    font-style: italic;
    position: relative;
    z-index: 1;
}

.portfolio-modal__testimonial-author {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.portfolio-modal__testimonial-author strong {
    font-size: 1.125rem;
}

.portfolio-modal__testimonial-author span {
    opacity: 0.9;
    font-size: var(--small-font-size);
}

.portfolio-modal__cta {
    text-align: center;
    padding-top: 2rem;
    border-top: 2px solid #e2e8f0;
}

/* ===== Responsive Design ===== */
@media screen and (max-width: 968px) {
    :root {
        --biggest-font-size: 2.5rem;
        --h1-font-size: 2rem;
        --h2-font-size: 1.75rem;
        --h3-font-size: 1.25rem;
    }
    
    .about__container,
    .contact__container {
        grid-template-columns: 1fr;
    }
    
    .hero__content-wrapper {
        padding: 6rem 0 4rem;
    }
    
    .hero__carousel {
        height: 90vh;
    }
    
    .nav__menu {
        position: fixed;
        top: 0;
        right: -100%;
        width: 70%;
        height: 100%;
        background-color: var(--container-color);
        padding: 3rem;
        transition: var(--transition);
        box-shadow: var(--shadow-lg);
    }
    
    .nav__menu.show-menu {
        right: 0;
    }
    
    .nav__list {
        flex-direction: column;
        row-gap: 2rem;
    }
    
    .nav__toggle {
        display: flex;
    }
    
    /* Close button only visible when menu is open */
    .floating-actions {
        right: 1rem;
        bottom: 1rem;
        gap: 0.75rem;
    }
    
    .language-btn--float,
    .whatsapp-float {
        width: 55px;
        height: 55px;
        font-size: 1.5rem;
    }
    
    .language-btn--float i {
        font-size: 1rem;
    }
    
    .language-dropdown--float {
        min-width: 160px;
    }
    
    .portfolio__grid {
        grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    }
    
    .services__grid {
        grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    }
    
    .portfolio-modal__content {
        grid-template-columns: 1fr;
    }
    
    .portfolio-modal__container {
        margin: 0;
        border-radius: 0;
        max-height: 100vh;
    }
    
    .portfolio-modal__info {
        max-height: none;
        padding: 2rem 1.5rem;
    }
    
    .portfolio-modal__stats {
        grid-template-columns: 1fr;
    }
    
    .portfolio-modal__features ul {
        grid-template-columns: 1fr;
    }
    
    .portfolio-modal__main-image {
        height: 300px;
    }
}

/* This section has been moved and enhanced in the comprehensive responsive design section below */

/* ===== Utility Classes ===== */
.hidden {
    display: none;
}

/* ===== Scroll Animations ===== */
/* Elements start invisible and fade in smoothly */
.scroll-fade:not(.visible) {
    opacity: 0 !important;
    transform: translateY(30px) scale(0.98) !important;
    transition: opacity 0.6s cubic-bezier(0.4, 0, 0.2, 1), 
                transform 0.6s cubic-bezier(0.4, 0, 0.2, 1) !important;
    will-change: opacity, transform;
    /* Prevent flicker by ensuring smooth transition */
    backface-visibility: hidden;
    -webkit-backface-visibility: hidden;
    /* Force hardware acceleration */
    transform-style: preserve-3d;
    /* Prevent content shift */
    contain: layout style paint;
}

.scroll-fade.visible {
    opacity: 1 !important;
    transform: translateY(0) scale(1) !important;
    will-change: auto; /* Remove will-change after animation */
    transition: opacity 0.6s cubic-bezier(0.4, 0, 0.2, 1), 
                transform 0.6s cubic-bezier(0.4, 0, 0.2, 1) !important;
}

/* Elements that are immediately visible (above fold) - show instantly */
.scroll-fade.visible:not(.scroll-fade-delay-1):not(.scroll-fade-delay-2):not(.scroll-fade-delay-3):not(.scroll-fade-delay-4):not(.scroll-fade-delay-5):not(.scroll-fade-delay-6) {
    transition: none !important; /* No transition for immediately visible elements */
    opacity: 1 !important;
    transform: translateY(0) scale(1) !important;
}

/* Respect user's motion preferences */
@media (prefers-reduced-motion: reduce) {
    .scroll-fade {
        opacity: 1 !important;
        transform: none !important;
        transition: none !important;
    }
}

/* Prevent flickering during scroll - ensure smooth rendering */
html {
    scroll-behavior: smooth;
}

/* Optimize rendering performance */
.scroll-fade {
    /* Force GPU acceleration */
    transform: translateZ(0);
    -webkit-transform: translateZ(0);
    /* Prevent layout shifts */
    contain: layout style paint;
    /* Smooth font rendering */
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* Stagger animation for cards */
.scroll-fade-delay-1 {
    transition-delay: 0.1s;
}

.scroll-fade-delay-2 {
    transition-delay: 0.2s;
}

.scroll-fade-delay-3 {
    transition-delay: 0.3s;
}

.scroll-fade-delay-4 {
    transition-delay: 0.4s;
}

.scroll-fade-delay-5 {
    transition-delay: 0.5s;
}

.scroll-fade-delay-6 {
    transition-delay: 0.6s;
}

/* Legacy fade-in for compatibility */
.fade-in {
    opacity: 1 !important;
    transform: translateY(0) !important;
}

/* ===== Enhanced Responsive Design ===== */

/* Large Desktop (above 1400px) */
@media screen and (min-width: 1400px) {
    .container {
        max-width: 1320px;
    }
}

/* Desktop (1200px - 1399px) */
@media screen and (max-width: 1399px) {
    .container {
        max-width: 1140px;
    }
}

/* Tablet Landscape / Small Desktop (968px - 1199px) */
@media screen and (max-width: 1199px) {
    .container {
        max-width: 960px;
        padding-left: 2rem;
        padding-right: 2rem;
    }
    
    .section {
        padding: 4rem 0;
    }
    
    .services__grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 2rem;
    }
    
    .portfolio__grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .team__grid {
        grid-template-columns: repeat(3, 1fr);
    }
    
    .hero__content-wrapper {
        padding: 5rem 0 3rem;
    }
    
    .hero__title {
        font-size: clamp(2.25rem, 5vw, 3rem);
    }
}

/* Tablet Portrait (768px - 967px) */
@media screen and (max-width: 967px) {
    :root {
        --biggest-font-size: 2.5rem;
        --h1-font-size: 2rem;
        --h2-font-size: 1.75rem;
        --h3-font-size: 1.25rem;
    }
    
    .container {
        padding-left: 1.5rem;
        padding-right: 1.5rem;
    }
    
    .section {
        padding: 4rem 0;
    }
    
    .section__header {
        margin-bottom: 2.5rem;
    }
    
    .about__container,
    .contact__container {
        grid-template-columns: 1fr;
        gap: 2rem;
    }
    
    .hero__content-wrapper {
        padding: 6rem 0 4rem;
    }
    
    .hero__carousel {
        height: 85vh;
        min-height: 600px;
    }
    
    .hero__title {
        font-size: clamp(2rem, 6vw, 2.5rem);
        line-height: 1.2;
    }
    
    .hero__description {
        font-size: 1.05rem;
        margin-bottom: 2rem;
    }
    
    .nav__menu {
        position: fixed;
        top: 0;
        right: -100%;
        width: 75%;
        max-width: 380px;
        height: 100vh;
        background-color: var(--container-color);
        padding: 5rem 2rem 2rem;
        transition: right 0.4s cubic-bezier(0.68, -0.55, 0.265, 1.55);
        box-shadow: -5px 0 25px rgba(0, 0, 0, 0.15);
        overflow-y: auto;
        overflow-x: hidden;
        z-index: calc(var(--z-fixed) + 1);
        -webkit-overflow-scrolling: touch;
    }
    
    .nav__menu.show-menu {
        right: 0;
    }
    
    
    .nav__list {
        flex-direction: column;
        row-gap: 0.5rem;
        align-items: stretch;
        margin-top: 1rem;
    }
    
    .nav__item {
        width: 100%;
        opacity: 0;
        transform: translateX(20px);
        animation: slideInFromRight 0.4s ease forwards;
    }
    
    .nav__menu.show-menu .nav__item:nth-child(1) { animation-delay: 0.1s; }
    .nav__menu.show-menu .nav__item:nth-child(2) { animation-delay: 0.15s; }
    .nav__menu.show-menu .nav__item:nth-child(3) { animation-delay: 0.2s; }
    .nav__menu.show-menu .nav__item:nth-child(4) { animation-delay: 0.25s; }
    .nav__menu.show-menu .nav__item:nth-child(5) { animation-delay: 0.3s; }
    
    @keyframes slideInFromRight {
        to {
            opacity: 1;
            transform: translateX(0);
        }
    }
    
    .nav__link {
        font-size: 1.125rem;
        font-weight: var(--font-medium);
        padding: 1rem 1.25rem;
        display: block;
        border-radius: 0.5rem;
        transition: all 0.3s ease;
        position: relative;
        color: var(--text-color);
    }
    
    .nav__link::before {
        content: '';
        position: absolute;
        left: 0;
        top: 50%;
        transform: translateY(-50%);
        width: 4px;
        height: 0;
        background-color: var(--primary-color);
        border-radius: 0 2px 2px 0;
        transition: height 0.3s ease;
    }
    
    .nav__link:hover,
    .nav__link.active {
        background-color: var(--bg-light);
        color: var(--primary-color);
        padding-left: 1.75rem;
    }
    
    .nav__link:hover::before,
    .nav__link.active::before {
        height: 60%;
    }
    
    .nav__link::after {
        display: none;
    }
    
    .nav__toggle {
        display: flex;
    }
    
    /* Close button only visible when menu is open */
    .nav__menu.show-menu .nav__close {
        display: flex !important;
        opacity: 1 !important;
        visibility: visible !important;
        pointer-events: auto !important;
    }
    
    .nav__menu:not(.show-menu) .nav__close {
        display: none !important;
        opacity: 0 !important;
        visibility: hidden !important;
        pointer-events: none !important;
    }
    
    .nav__cta {
        display: none;
    }
    
    .header {
        box-shadow: var(--shadow-md);
    }
    
    .nav {
        height: 4rem;
    }
    
    .logo-img {
        height: 32px;
    }
    
    .portfolio__grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 1.5rem;
    }
    
    .services__grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 1.5rem;
    }
    
    .team__grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 1.5rem;
    }
    
    .portfolio-modal__content {
        grid-template-columns: 1fr;
        max-height: 90vh;
        overflow-y: auto;
    }
    
    .portfolio-modal__container {
        margin: 1rem;
        border-radius: 0.5rem;
        max-height: 95vh;
    }
    
    .portfolio-modal__info {
        max-height: none;
        padding: 2rem 1.5rem;
        overflow-y: visible;
    }
    
    .portfolio-modal__stats {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .portfolio-modal__features ul {
        grid-template-columns: 1fr;
    }
    
    .portfolio-modal__main-image {
        height: 350px;
    }
    
    .portfolio-modal__gallery {
        padding: 1.5rem;
        min-width: 0;
    }
    
    .portfolio-modal__thumbnails {
        padding: 0.5rem 0.25rem 0.75rem 0.25rem;
        gap: 0.5rem;
    }
    
    .portfolio-modal__thumbnail {
        min-width: 80px;
        width: 80px;
        height: 64px;
        aspect-ratio: 1.25;
    }
    
    .floating-actions {
        right: 1rem;
        bottom: 1rem;
        gap: 0.75rem;
        flex-direction: column;
    }
    
    .language-btn--float,
    .whatsapp-float {
        width: 55px;
        height: 55px;
        font-size: 1.5rem;
    }
    
    .language-btn--float i {
        font-size: 1rem;
    }
    
    .language-dropdown--float {
        min-width: 160px;
        bottom: 65px;
        right: 0;
        left: auto;
    }
    
    .scrolltop {
        right: 1rem;
        bottom: 9rem;
        width: 45px;
        height: 45px;
    }
    
    .contact__form {
        padding: 2rem;
    }
    
    .contact__form-group {
        grid-template-columns: 1fr;
    }
    
    .footer__container {
        grid-template-columns: repeat(2, 1fr);
        gap: 2rem;
    }
}

/* Mobile Large (481px - 767px) */
@media screen and (max-width: 767px) {
    :root {
        --biggest-font-size: 2rem;
        --h1-font-size: 1.75rem;
        --h2-font-size: 1.5rem;
        --h3-font-size: 1.125rem;
    }
    
    .container {
        padding-left: 1rem;
        padding-right: 1rem;
    }
    
    .section {
        padding: 3.5rem 0;
    }
    
    .section__header {
        margin-bottom: 2rem;
    }
    
    .section__title {
        font-size: clamp(1.75rem, 8vw, 2rem);
    }
    
    .section__description {
        font-size: 0.95rem;
    }
    
    .nav {
        height: 4rem;
    }
    
    .logo-img {
        height: 30px;
    }
    
    .nav__menu {
        width: 85%;
        max-width: 320px;
        padding: 2.5rem 1.5rem;
    }
    
    .hero {
        padding-top: 5.5rem;
    }
    
    .hero__banner {
        min-height: 75vh;
    }
    
    .hero__carousel {
        height: 75vh;
        min-height: 500px;
    }
    
    .hero__content-wrapper {
        padding: 4rem 1rem 2rem;
    }
    
    .hero__title {
        font-size: clamp(1.75rem, 8vw, 2.25rem);
        margin-bottom: 1rem;
        line-height: 1.2;
    }
    
    .hero__description {
        font-size: 1rem;
        margin-bottom: 1.5rem;
        padding: 0 0.5rem;
    }
    
    .hero__buttons {
        flex-direction: column;
        width: 100%;
        gap: 0.75rem;
        padding: 0 1rem;
    }
    
    .hero__buttons .btn {
        width: 100%;
        max-width: 100%;
        justify-content: center;
        padding: 1rem 1.5rem;
        font-size: 1rem;
    }
    
    .hero__carousel-indicators {
        bottom: 1rem;
        gap: 0.4rem;
    }
    
    .hero__carousel-indicator {
        width: 5px;
        height: 5px;
    }
    
    .services__grid {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }
    
    .service-card {
        padding: 1.5rem;
    }
    
    .service-card__icon {
        width: 60px;
        height: 60px;
        font-size: 1.75rem;
        margin-bottom: 1rem;
    }
    
    .service-card__title {
        font-size: 1.25rem;
        margin-bottom: 0.75rem;
    }
    
    .service-card__description {
        font-size: 0.95rem;
        margin-bottom: 1rem;
    }
    
    .portfolio__filters {
        flex-wrap: wrap;
        justify-content: center;
        gap: 0.75rem;
    }
    
    .portfolio__filter {
        padding: 0.6rem 1.25rem;
        font-size: 0.9rem;
    }
    
    .portfolio__grid {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }
    
    .portfolio-item__image {
        height: 250px;
    }
    
    .team__grid {
        grid-template-columns: 1fr;
        gap: 1.5rem;
        align-items: stretch; /* Garante que todos os cards têm a mesma altura */
    }
    
    .team-card {
        width: 100%;
        max-width: 350px;
        margin: 0 auto;
        min-height: 450px;
        height: 100%;
        display: flex;
        flex-direction: column;
    }
    
    .team-card__image {
        height: 360px;
        flex-shrink: 0;
        width: 100%;
    }
    
    .team-card__content {
        flex-grow: 1;
        display: flex;
        flex-direction: column;
        justify-content: center;
        padding: 0.875rem 1.25rem;
        min-height: 90px;
    }
    
    .team-card__name {
        font-size: 1.125rem;
        margin-bottom: 0.15rem;
    }
    
    .team-card__role {
        font-size: 0.875rem;
    }
    
    .about__content {
        padding: 1.5rem;
    }
    
    .about__image {
        height: 300px;
        border-radius: 1rem;
    }
    
    .about__values {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }
    
    .value-item {
        padding: 1.5rem;
    }
    
    .contact__container {
        gap: 2rem;
    }
    
    .contact__form {
        padding: 1.5rem;
    }
    
    .contact__form-group {
        grid-template-columns: 1fr;
        gap: 1rem;
    }
    
    .contact__input,
    .contact__textarea,
    .contact__select {
        padding: 0.875rem 1rem;
        font-size: 1rem;
    }
    
    .contact__button {
        width: 100%;
        padding: 1rem;
        font-size: 1rem;
    }
    
    .footer__container {
        grid-template-columns: 1fr;
        gap: 2rem;
        text-align: center;
    }
    
    .footer__links {
        justify-content: center;
    }
    
    .portfolio-modal__container {
        margin: 0;
        border-radius: 0;
        max-height: 100vh;
        max-width: 100vw;
    }
    
    .portfolio-modal__content {
        max-height: 100vh;
        overflow-y: auto;
    }
    
    .portfolio-modal__close {
        top: 1rem;
        right: 1rem;
        width: 40px;
        height: 40px;
        font-size: 1.5rem;
    }
    
    .portfolio-modal__main-image {
        height: 250px;
    }
    
    .portfolio-modal__gallery {
        padding: 1rem;
        min-width: 0;
    }
    
    .portfolio-modal__thumbnails {
        padding: 0.5rem 0.25rem 0.75rem 0.25rem;
        gap: 0.5rem;
    }
    
    .portfolio-modal__thumbnail {
        min-width: 70px;
        width: 70px;
        height: 56px;
    }
    
    .portfolio-modal__stats {
        grid-template-columns: 1fr;
        gap: 1rem;
    }
    
    .portfolio-modal__stat-item {
        text-align: center;
    }
    
    .portfolio-modal__features ul {
        grid-template-columns: 1fr;
    }
    
    .portfolio-modal__challenges,
    .portfolio-modal__features,
    .portfolio-modal__testimonial {
        padding: 1.5rem;
    }
    
    .floating-actions {
        right: 0.75rem;
        bottom: 0.75rem;
        gap: 0.5rem;
    }
    
    .language-btn--float,
    .whatsapp-float {
        width: 50px;
        height: 50px;
        font-size: 1.25rem;
    }
    
    .language-btn--float i {
        font-size: 0.9rem;
    }
    
    .scrolltop {
        right: 0.75rem;
        bottom: 8rem;
        width: 40px;
        height: 40px;
        font-size: 1.25rem;
    }
}

/* Mobile Small (320px - 480px) */
@media screen and (max-width: 480px) {
    :root {
        --biggest-font-size: 1.75rem;
        --h1-font-size: 1.5rem;
        --h2-font-size: 1.25rem;
        --h3-font-size: 1rem;
        --normal-font-size: 0.9375rem;
    }
    
    .container {
        padding-left: 0.75rem;
        padding-right: 0.75rem;
    }
    
    .section {
        padding: 3rem 0;
    }
    
    .section__header {
        margin-bottom: 1.5rem;
    }
    
    .section__subtitle {
        font-size: 0.75rem;
    }
    
    .section__title {
        font-size: clamp(1.5rem, 8vw, 1.75rem);
    }
    
    .section__description {
        font-size: 0.875rem;
    }
    
    .nav {
        height: 3.75rem;
        padding: 0 0.75rem;
    }
    
    .logo-img {
        height: 28px;
    }
    
    .nav__menu {
        width: 90%;
        padding: 2rem 1.25rem;
    }
    
    .nav__list {
        row-gap: 1.25rem;
    }
    
    .nav__link {
        font-size: 1rem;
    }
    
    .hero {
        padding-top: 5rem;
    }
    
    .hero__banner {
        min-height: 70vh;
    }
    
    .hero__carousel {
        height: 70vh;
        min-height: 450px;
    }
    
    .hero__content-wrapper {
        padding: 3rem 0.75rem 1.5rem;
    }
    
    .hero__title {
        font-size: clamp(1.5rem, 7vw, 2rem);
        margin-bottom: 0.75rem;
    }
    
    .hero__description {
        font-size: 0.9375rem;
        margin-bottom: 1.25rem;
        padding: 0;
    }
    
    .hero__buttons {
        gap: 0.625rem;
        padding: 0;
    }
    
    .hero__buttons .btn {
        padding: 0.875rem 1.25rem;
        font-size: 0.9375rem;
    }
    
    .btn--large {
        padding: 0.9375rem 1.5rem;
        font-size: 1rem;
    }
    
    .service-card {
        padding: 1.25rem;
    }
    
    .service-card__icon {
        width: 55px;
        height: 55px;
        font-size: 1.5rem;
    }
    
    .service-card__title {
        font-size: 1.125rem;
    }
    
    .service-card__description {
        font-size: 0.875rem;
    }
    
    .portfolio__filter {
        padding: 0.5rem 1rem;
        font-size: 0.875rem;
    }
    
    .portfolio-item__image {
        height: 220px;
    }
    
    .team-card__image {
        height: 280px;
    }
    
    .about__content {
        padding: 1.25rem;
    }
    
    .about__image {
        height: 250px;
    }
    
    .value-item {
        padding: 1.25rem;
    }
    
    .contact__form {
        padding: 1.25rem;
    }
    
    .contact__input,
    .contact__textarea,
    .contact__select {
        padding: 0.75rem 0.875rem;
        font-size: 0.9375rem;
    }
    
    .contact__button {
        padding: 0.9375rem;
        font-size: 0.9375rem;
    }
    
    .portfolio-modal__main-image {
        height: 220px;
    }
    
    .portfolio-modal__gallery {
        grid-template-columns: 1fr;
    }
    
    .portfolio-modal__info {
        padding: 1.5rem 1rem;
    }
    
    .portfolio-modal__title {
        font-size: 1.25rem;
    }
    
    .portfolio-modal__challenges,
    .portfolio-modal__features,
    .portfolio-modal__testimonial {
        padding: 1.25rem;
    }
    
    .floating-actions {
        right: 0.5rem;
        bottom: 0.5rem;
        gap: 0.5rem;
    }
    
    .language-btn--float,
    .whatsapp-float {
        width: 48px;
        height: 48px;
        font-size: 1.125rem;
    }
    
    .language-dropdown--float {
        min-width: 140px;
        bottom: 58px;
        font-size: 0.875rem;
    }
    
    .scrolltop {
        right: 0.5rem;
        bottom: 7.5rem;
        width: 38px;
        height: 38px;
        font-size: 1.125rem;
    }
    
    .footer {
        padding: 2rem 0 1rem;
    }
    
    .footer__container {
        gap: 1.5rem;
    }
    
    .footer__title {
        font-size: 1.125rem;
        margin-bottom: 1rem;
    }
    
    .footer__link {
        font-size: 0.875rem;
    }
    
    .footer__copy {
        font-size: 0.8125rem;
        padding-top: 1rem;
    }
}

/* Touch Device Optimizations */
@media (hover: none) and (pointer: coarse) {
    .btn:hover {
        transform: none;
    }
    
    .portfolio-item:hover .portfolio-item__image img {
        transform: none;
    }
    
    .team-card:hover {
        transform: none;
    }
    
    /* Increase touch targets */
    .nav__link {
        padding: 0.75rem 1rem;
    }
    
    .portfolio__filter {
        padding: 0.75rem 1.5rem;
        min-height: 44px;
    }
    
    .btn {
        min-height: 44px;
        padding: 0.875rem 2rem;
    }
    
    .contact__input,
    .contact__textarea,
    .contact__select,
    .contact__button {
        min-height: 44px;
    }
}

/* Landscape Mobile */
@media screen and (max-height: 500px) and (orientation: landscape) {
    .hero__banner {
        min-height: 100vh;
    }
    
    .hero__carousel {
        height: 100vh;
        min-height: auto;
    }
    
    .hero__content-wrapper {
        padding: 2rem 0;
    }
    
    .hero__title {
        font-size: 1.75rem;
        margin-bottom: 0.5rem;
    }
    
    .hero__description {
        font-size: 0.875rem;
        margin-bottom: 1rem;
    }
    
    .hero__buttons {
        flex-direction: row;
        gap: 0.75rem;
    }
    
    .hero__buttons .btn {
        padding: 0.75rem 1.5rem;
        font-size: 0.9375rem;
    }
    
    .section {
        padding: 2.5rem 0;
    }
    
    .nav__menu {
        height: 100vh;
        overflow-y: auto;
    }
}

/* High DPI Displays */
@media (-webkit-min-device-pixel-ratio: 2), (min-resolution: 192dpi) {
    .hero__img,
    .portfolio-item__image img,
    .team-card__image img,
    .about__image img {
        image-rendering: -webkit-optimize-contrast;
        image-rendering: crisp-edges;
    }
}

/* ===== Cookie Consent Banner ===== */
.cookie-banner {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: var(--white-color);
    box-shadow: 0 -4px 20px rgba(0, 0, 0, 0.15);
    z-index: 9999;
    padding: 1.5rem 1rem;
    transform: translateY(100%);
    transition: transform 0.3s ease-in-out;
}

.cookie-banner.show {
    transform: translateY(0);
}

.cookie-banner__content {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 2rem;
    flex-wrap: wrap;
}

.cookie-banner__text {
    display: flex;
    align-items: flex-start;
    gap: 1rem;
    flex: 1;
    min-width: 250px;
}

.cookie-banner__text i {
    font-size: 1.5rem;
    color: var(--primary-color);
    margin-top: 0.25rem;
}

.cookie-banner__text p {
    margin: 0;
    font-size: var(--normal-font-size);
    line-height: 1.6;
    color: var(--text-color);
}

.cookie-banner__text strong {
    color: var(--text-color);
    font-weight: var(--font-semi-bold);
}

.cookie-banner__link {
    color: var(--primary-color);
    text-decoration: underline;
    transition: color 0.3s ease;
}

.cookie-banner__link:hover {
    color: var(--primary-color-dark);
}

.cookie-banner__actions {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
    align-items: center;
}

.btn-sm {
    padding: 0.625rem 1.25rem;
    font-size: var(--small-font-size);
}

.btn-link {
    background: transparent;
    border: none;
    color: var(--text-color);
    text-decoration: underline;
    padding: 0.625rem 0;
    cursor: pointer;
    transition: color 0.3s ease;
}

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

/* Cookie Settings Modal */
.cookie-modal {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 10000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1rem;
    animation: fadeIn 0.3s ease;
}

.cookie-modal__overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(4px);
}

.cookie-modal__content {
    position: relative;
    background: var(--white-color);
    border-radius: 12px;
    max-width: 600px;
    width: 100%;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.2);
    animation: slideUp 0.3s ease;
}

.cookie-modal__header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1.5rem;
    border-bottom: 1px solid var(--border-color);
}

.cookie-modal__header h2 {
    margin: 0;
    font-size: var(--h2-font-size);
    color: var(--text-color);
}

.cookie-modal__close {
    background: transparent;
    border: none;
    font-size: 1.5rem;
    color: var(--text-color-light);
    cursor: pointer;
    padding: 0.5rem;
    line-height: 1;
    transition: color 0.3s ease;
    border-radius: 4px;
}

.cookie-modal__close:hover {
    color: var(--text-color);
    background: var(--bg-light);
}

.cookie-modal__body {
    padding: 1.5rem;
}

.cookie-modal__description {
    margin-bottom: 2rem;
    color: var(--text-color-light);
    line-height: 1.6;
}

.cookie-settings__item {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 1rem;
    padding: 1.5rem 0;
    border-bottom: 1px solid var(--border-color);
}

.cookie-settings__item:last-child {
    border-bottom: none;
}

.cookie-settings__info {
    flex: 1;
}

.cookie-settings__info h3 {
    margin: 0 0 0.5rem 0;
    font-size: var(--h3-font-size);
    color: var(--text-color);
}

.cookie-settings__info p {
    margin: 0;
    font-size: var(--small-font-size);
    color: var(--text-color-light);
    line-height: 1.6;
}

/* Cookie Switch Toggle */
.cookie-switch {
    position: relative;
    display: inline-block;
    width: 50px;
    height: 28px;
    flex-shrink: 0;
}

.cookie-switch input {
    opacity: 0;
    width: 0;
    height: 0;
}

.cookie-switch__slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: #ccc;
    transition: 0.3s;
    border-radius: 28px;
}

.cookie-switch__slider:before {
    position: absolute;
    content: "";
    height: 20px;
    width: 20px;
    left: 4px;
    bottom: 4px;
    background-color: white;
    transition: 0.3s;
    border-radius: 50%;
}

.cookie-switch input:checked + .cookie-switch__slider {
    background-color: var(--primary-color);
}

.cookie-switch input:focus + .cookie-switch__slider {
    box-shadow: 0 0 1px var(--primary-color);
}

.cookie-switch input:checked + .cookie-switch__slider:before {
    transform: translateX(22px);
}

.cookie-switch input:disabled + .cookie-switch__slider {
    opacity: 0.6;
    cursor: not-allowed;
}

.cookie-modal__footer {
    display: flex;
    gap: 1rem;
    padding: 1.5rem;
    border-top: 1px solid var(--border-color);
    justify-content: flex-end;
    flex-wrap: wrap;
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

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

@media (max-width: 768px) {
    .cookie-banner__content {
        flex-direction: column;
        align-items: stretch;
    }

    .cookie-banner__actions {
        width: 100%;
        justify-content: stretch;
    }

    .cookie-banner__actions .btn {
        flex: 1;
    }

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

/* Print Styles */
@media print {
    .cookie-banner,
    .cookie-modal {
        display: none !important;
    }

    .header,
    .floating-actions,
    .scrolltop,
    .hero__carousel-indicators {
        display: none;
    }
    
    .hero__banner {
        min-height: auto;
        height: auto;
    }
    
    .section {
        page-break-inside: avoid;
    }
}


