/* Import Google Fonts */
@import url('https://fonts.googleapis.com/css2?family=Poppins:wght@300;400;500;600;700;800;900&display=swap');

/* Reset and Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    color: #fff;
    overflow-x: hidden;
}

.portfolio-container {
    min-height: 100vh;
    color: #fff;
    overflow: hidden;
}

/* Header Section */
.header-section {
    position: relative;
    height: 100vh;
    margin-top: -30px;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 50;
}

.grid-background {
    position: absolute;
    inset: 0;
    opacity: 0.05;
    background-image: 
        linear-gradient(rgba(255,255,255,0.1) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255,255,255,0.1) 1px, transparent 1px);
    background-size: 60px 60px;
}

.geometric-elements {
    position: absolute;
    inset: 0;
    overflow: hidden;
}

.line-top-left-v {
    position: absolute;
    top: 200px;
    left: 300px;
    width: 1px;
    height: 80px;
    background: rgba(255, 255, 255, 0.4);
    z-index: 9999;
    box-shadow: 0 0 4px rgba(255, 255, 255, 0.3);
}

.line-top-left-h {
    position: absolute;
    top: 200px;
    left: 300px;
    width: 80px;
    height: 1px;
    background: rgba(255, 255, 255, 0.4);
    z-index: 9999;
    box-shadow: 0 0 4px rgba(255, 255, 255, 0.3);
}

.line-bottom-right-v {
    position: absolute;
    bottom: 200px;
    right: 300px;
    width: 1px;
    height: 80px;
    background: rgba(255, 255, 255, 0.4);
    z-index: 9999;
    box-shadow: 0 0 4px rgba(255, 255, 255, 0.3);
}

.line-bottom-right-h {
    position: absolute;
    bottom: 200px;
    right: 300px;
    width: 80px;
    height: 1px;
    background: rgba(255, 255, 255, 0.4);
    z-index: 9999;
    box-shadow: 0 0 4px rgba(255, 255, 255, 0.3);
}

.square-left {
    position: absolute;
    top: 50%;
    left: 40px;
    width: 8px;
    height: 8px;
    border: 1px solid rgba(255, 255, 255, 0.3);
    transform: rotate(45deg);
}

.square-right {
    position: absolute;
    top: 33%;
    right: 40px;
    width: 8px;
    height: 8px;
    border: 1px solid rgba(255, 255, 255, 0.3);
    transform: rotate(45deg);
}

.header-content {
    position: relative;
    z-index: 10;
    text-align: center;
    padding: 0 16px;
    max-width: 1024px;
    transition: all 0.5s ease;
    opacity: 1;
    transform: translateY(0);
}

.header-badge {
    display: inline-block;
    padding: 16px;
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 8px;
    margin-bottom: 32px;
    opacity: 0;
    transform: translateY(20px);
    animation: fadeInUp 0.8s ease forwards;
    animation-delay: 0s;
}

.badge-text {
    font-size: 14px;
    font-family: 'Courier New', monospace;
    color: rgba(156, 163, 175, 1);
    margin-bottom: 8px;
}

@media (max-width: 768px) {
    .badge-text {
        font-size: 10px !important;
    }
}

.badge-line {
    width: 48px;
    height: 1px;
    background: rgba(255, 255, 255, 0.4);
    margin: 0 auto;
}

.main-title {
    font-family: 'Orbitron', monospace;
    font-size: clamp(3.5rem, 7vw, 7rem);
    font-weight: 900;
    margin-bottom: 32px;
    letter-spacing: 0.15em;
    text-shadow: 0 0 20px rgba(255, 255, 255, 0.1);
    background: linear-gradient(135deg, #ffffff, #cccccc, #ffffff);
    background-size: 200% 200%;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    animation: title-glow 3s ease-in-out infinite;
    padding: 0 16px;
    overflow: visible;
    line-height: 1.1;
}

@keyframes title-glow {
    0%, 100% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
}

.header-description {
    margin-bottom: 48px;
}

.description-text {
    font-size: clamp(1.25rem, 3vw, 2rem);
    color: rgba(209, 213, 219, 1);
    font-weight: 300;
    margin-bottom: 24px;
    line-height: 1.5;
}

.year-section {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 32px;
    opacity: 0;
    transform: translateY(20px);
    animation: fadeInUp 0.6s ease forwards;
    animation-delay: 3.5s;
}

.year-line {
    width: 48px;
    height: 1px;
    background: rgba(255, 255, 255, 0.4);
}

.year-text {
    font-size: 14px;
    font-family: 'Courier New', monospace;
    color: rgba(107, 114, 128, 1);
}

.tech-stack {
    display: inline-flex;
    align-items: center;
    gap: 16px;
    font-size: 14px;
    font-family: 'Courier New', monospace;
    color: rgba(156, 163, 175, 1);
    opacity: 0;
    transform: translateY(20px);
    animation: fadeInUp 0.8s ease forwards;
    animation-delay: 4s;
}

.tech-dot {
    width: 4px;
    height: 4px;
    background: rgba(255, 255, 255, 0.4);
    border-radius: 50%;
}

.scroll-indicator {
    position: absolute;
    bottom: 40px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    flex-direction: column;
    align-items: center;
    z-index: 100;
    opacity: 0;
    animation: fadeInUp 0.6s ease forwards;
    animation-delay: 5s;
}

.scroll-text {
    font-size: 12px;
    font-family: 'Courier New', monospace;
    color: rgba(107, 114, 128, 1);
}

.scroll-line {
    width: 1px;
    height: 32px;
    background: rgba(255, 255, 255, 0.2);
}

/* Animated Line */
.animated-line {
    position: relative;
    width: 100%;
    height: 1px;
    background: rgba(255, 255, 255, 0.2);
    overflow: hidden;
}

.line-pulse {
    position: absolute;
    inset: 0;
    background: linear-gradient(to right, transparent, white, transparent);
    animation: pulse 2s ease-in-out infinite;
}

.line-slide {
    position: absolute;
    inset: 0;
    height: 100%;
    width: 80px;
    background: linear-gradient(to right, transparent, rgba(255, 255, 255, 0.6), transparent);
    animation: slide 3s linear infinite;
}

@keyframes slide {
    0% { transform: translateX(-100%); }
    100% { transform: translateX(400%); }
}

@keyframes pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.5; }
}

/* Projects */
.projects-container {
    position: relative;
    margin-top: -100px !important;
    background: transparent !important;
    z-index: 10 !important;
}

.project-section {
    position: relative;
    padding: 80px 16px;
    background: transparent !important;
    z-index: 5 !important;
}

.project-background {
    position: absolute;
    inset: 0;
    opacity: 0.05;
}

.project-content {
    max-width: 1700px;
    margin: 0 auto;
}

.project-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 48px;
    align-items: center;
    transition: all 1s ease-out;
    opacity: 1;
    transform: translateY(0);
    margin-top: 50px;
}

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

.project-info {
    display: flex;
    flex-direction: column;
    gap: 32px;
    margin-bottom: 0px;
}

.project-header {
    display: flex;
    align-items: flex-start;
    gap: 16px;
    margin-bottom: 16px;
}

.project-title-section {
    flex: 1;
    min-width: 0;
    width: 100%;
}

/* Os estilos da moldura das logos agora estão no portfolio.html */

.project-title {
    font-size: clamp(2rem, 4vw, 2.5rem);
    font-weight: bold;
    margin-bottom: 8px;
    line-height: 1.2;
    word-wrap: break-word;
    overflow-wrap: break-word;
    white-space: normal;
    overflow: visible;
    text-overflow: unset;
    width: 100%;
    max-width: 100%;
}

.project-description {
    color: rgba(209, 213, 219, 1);
    font-size: 1.125rem;
}

/* Cards */
.feature-card, .pages-card {
    background: rgba(0, 0, 0, 0.151);
    border: 1px solid rgba(255, 255, 255, 0.2);
    padding: 24px;
    border-radius: 16px;
    margin-top: -20px;
    backdrop-filter: blur(40px);
    transition: all 0.3s ease;
}

.feature-card:hover, .pages-card:hover {
    background: rgba(0, 0, 0, 0.8);
}

.card-title {
    font-size: 1.375rem;
    font-weight: 700;
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    gap: 10px;
    color: white;
    letter-spacing: 0.025em;
}

.card-icon {
    width: 20px;
    height: 20px;
}

.features-list {
    display: grid;
    gap: 16px;
}

.feature-item {
    display: flex;
    align-items: flex-start;
    gap: 12px;
}

.feature-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    flex-shrink: 0;
    margin-top: 4px;
}

.feature-item span {
    color: rgba(229, 231, 235, 1);
    font-size: 1rem;
    font-weight: 500;
    line-height: 1.4;
}

.pages-list {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 16px;
}

.page-tag {
    padding: 6px 14px;
    border-radius: 9999px;
    font-size: 0.9rem;
    font-weight: 500;
    border: 1px solid;
    transition: all 0.3s ease;
    cursor: pointer;
    letter-spacing: 0.025em;
    margin-top: 10px;
    margin-bottom: 0px;
}

.page-tag:hover {
    transform: scale(1.05);
}

/* CTA Button */
.cta-button {
    position: relative;
    color: #ffffff;
    font-weight: 700;
    padding: 0;
    font-size: 1rem;
    border-radius: 20px;
    border: none;
    cursor: pointer;
    overflow: hidden;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 20px 40px -12px rgba(0, 0, 0, 0.3);
    backdrop-filter: blur(20px);
    width: fit-content;
    min-width: 320px;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Button Inner Structure */
.button-inner {
    position: relative;
    padding: 24px 56px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: 20px;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    z-index: 2;
    backdrop-filter: blur(20px);
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.button-content {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    font-size: 16px;
    font-weight: 700;
    color: #000000;
    text-shadow: none;
    transition: all 0.3s ease;
    position: relative;
    z-index: 3;
    width: 100%;
}

.button-icon {
    color: #000000;
    transition: all 0.3s ease;
    width: 20px;
    height: 20px;
}

.external-icon {
    color: #000000;
    transition: all 0.3s ease;
    width: 18px;
    height: 18px;
}

/* Button Background Effects */
.button-bg-primary,
.button-bg-secondary {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border-radius: 20px;
    transition: all 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}

.button-bg-primary {
    z-index: 0;
    opacity: 1;
}

.button-bg-secondary {
    z-index: 1;
    opacity: 0;
    transform: scale(0.9);
}

/* Animated Border */
.button-border {
    position: absolute;
    top: -2px;
    left: -2px;
    width: calc(100% + 4px);
    height: calc(100% + 4px);
    border-radius: 22px;
    background: conic-gradient(from 0deg, transparent, var(--button-color-1), var(--button-color-2), transparent);
    animation: borderRotate 4s linear infinite;
    z-index: -1;
    opacity: 0.7;
}

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

/* Floating Particles */
.button-particle {
    position: absolute;
    width: 3px;
    height: 3px;
    background: rgba(255, 255, 255, 0.8);
    border-radius: 50%;
    pointer-events: none;
    z-index: 1;
}

.button-particle:nth-child(1) {
    top: 25%;
    left: 20%;
    animation: float1 3s ease-in-out infinite;
}

.button-particle:nth-child(2) {
    top: 70%;
    right: 25%;
    animation: float2 2.5s ease-in-out infinite;
}

.button-particle:nth-child(3) {
    bottom: 30%;
    left: 75%;
    animation: float3 4s ease-in-out infinite;
}

@keyframes float1 {
    0%, 100% { transform: translateY(0px) scale(1); opacity: 0.4; }
    50% { transform: translateY(-10px) scale(1.2); opacity: 1; }
}

@keyframes float2 {
    0%, 100% { transform: translateX(0px) scale(1); opacity: 0.4; }
    50% { transform: translateX(10px) scale(1.2); opacity: 1; }
}

@keyframes float3 {
    0%, 100% { transform: translate(0px, 0px) scale(1); opacity: 0.4; }
    50% { transform: translate(-8px, -8px) scale(1.2); opacity: 1; }
}

/* Ripple Effect */
.button-ripple {
    position: absolute;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.3);
    transform: scale(0);
    pointer-events: none;
    z-index: 1;
}

.button-ripple-animate {
    animation: ripple 0.6s ease-out;
}

@keyframes ripple {
    to {
        transform: scale(4);
        opacity: 0;
    }
}

/* Glow Effect */
.button-glow {
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, var(--button-color-1) 0%, transparent 70%);
    opacity: 0;
    transition: opacity 0.5s ease;
    z-index: -2;
    animation: glowPulse 3s ease-in-out infinite;
}

@keyframes glowPulse {
    0%, 100% { opacity: 0; transform: scale(0.8); }
    50% { opacity: 0.1; transform: scale(1.1); }
}

/* Hover Effects */
.cta-button:hover {
    transform: translateY(-5px) scale(1.03);
    box-shadow: 0 35px 70px -15px rgba(0, 0, 0, 0.4);
}

.cta-button:hover .button-inner {
    background: rgba(255, 255, 255, 0.1);
    border-color: rgba(255, 255, 255, 0.3);
    transform: scale(1.02);
}

.cta-button:hover .button-bg-secondary {
    opacity: 1;
    transform: scale(1.1);
}

.cta-button:hover .button-content {
    transform: translateX(2px);
}

.cta-button:hover .external-icon {
    transform: translateX(6px) rotate(45deg);
}

.cta-button:hover .button-icon {
    transform: scale(1.2);
}

.cta-button:hover .button-glow {
    opacity: 0.15;
}

.cta-button:hover .button-border {
    opacity: 1;
    animation: borderRotate 2s linear infinite;
}

/* Active State */
.cta-button:active {
    transform: translateY(-2px) scale(1.01);
    transition: all 0.1s ease;
}

.cta-button:active .button-inner {
    transform: scale(0.98);
}

/* Carousel */
.project-carousel {
    position: relative;
    margin-bottom: -50px !important;
    box-shadow: none !important;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-start;
    min-height: 600px;
    padding-bottom: 200px;
}

.project-carousel * {
    box-shadow: none !important;
}

.carousel-container {
    position: relative;
    width: 100%;
    max-width: 800px;
    margin-bottom: 0;
    z-index: 2 !important;
}

.carousel-glow {
    position: absolute;
    top: -20px;
    bottom: -200px;
    left: -50px;
    right: -50px;
    border-radius: 24px;
    filter: blur(40px);
    opacity: 0.3;
    transition: opacity 0.5s ease;
    z-index: 1 !important;
    pointer-events: none;
}

/* Glow específico para cada projeto - mais forte e espalhado */
.dra-prosperidade-glow {
    background: rgba(229, 215, 188, 0.8);
    filter: blur(60px);
    opacity: 0.5;
    left: -20px;
    right: -20px;
    transition: all 0.5s ease;
}

.hermetic-contents-glow {
    background: rgba(194, 170, 121, 0.8);
    filter: blur(60px);
    opacity: 0.5;
    left: -20px;
    right: -20px;
    transition: all 0.5s ease;
}

.carousel-container:hover .carousel-glow {
    opacity: 0.8;
    filter: blur(80px);
    transform: scale(1.0);
}

/* Hover específico para cada projeto */
.carousel-container:hover .dra-prosperidade-glow {
    background: rgba(229, 215, 188, 1.0);
}

.carousel-container:hover .hermetic-contents-glow {
    background: rgba(194, 170, 121, 1.0);
}

.carousel-frame {
    position: relative;
    backdrop-filter: blur(40px);
    border-radius: 24px;
    padding: 32px;
    border: 1px solid;
    transition: all 0.5s ease;
    box-shadow: none !important;
    z-index: 3 !important;
}

.image-container {
    position: relative;
    box-shadow: none !important;
}

.image-container * {
    box-shadow: none !important;
}

.carousel-image {
    width: 100%;
    height: 360px;
    object-fit: cover;
    border-radius: 16px;
    box-shadow: none !important;
    opacity: 0;
    transition: opacity 0.5s ease;
    position: absolute;
    top: 0;
    left: 0;
    z-index: 1;
}

.carousel-image.active {
    opacity: 1 !important;
    position: relative;
    z-index: 2;
}

/* Debug: Força visibilidade de todas as imagens para teste */
.debug-show-all .carousel-image {
    opacity: 0.3 !important;
    position: relative !important;
    margin-bottom: 10px;
}

.debug-show-all .carousel-image.active {
    opacity: 1 !important;
    border: 3px solid red;
}

.image-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(to top, rgba(0, 0, 0, 0.2), transparent);
    border-radius: 16px;
}

/* Navigation Controls */
.carousel-controls {
    position: absolute !important;
    bottom: 60px !important;
    left: 50% !important;
    transform: translateX(-50%) !important;
    margin-top: 0 !important;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 16px;
    z-index: 4 !important;
    width: 100%;
}

.nav-button {
    width: 40px;
    height: 40px;
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 50%;
    color: white;
    cursor: pointer;
    backdrop-filter: blur(8px);
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.nav-button:hover {
    background: rgba(255, 255, 255, 0.2);
    transform: scale(1.1);
}

.indicators {
    display: flex;
    gap: 8px;
    padding: 0 16px;
}

.indicator {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.4);
    border: none;
    cursor: pointer;
    transition: all 0.3s ease;
}

.indicator.active {
    background: white;
    transform: scale(1.25);
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
}

.indicator:hover {
    background: rgba(255, 255, 255, 0.6);
}

.main-title {
    font-size: 8rem;
    line-height: 1.1;
    margin-bottom: 20px;
    letter-spacing: 0.05em;
    align-items: center;
    justify-content: center;
    display: flex;
    flex-direction: column;
    text-align: center;
}

/* Responsive Design */
@media (max-width: 768px) {
    .project-grid {
        gap: 32px;
    }
    
    .project-header {
        flex-direction: column;
        align-items: center;
        text-align: center;
        gap: 20px;
    }
    
    .project-logo {
        order: 1;
        margin-bottom: -10px;
        display: flex;
        justify-content: center;
        align-items: center;
    }
    
    .project-title-section {
        order: 2;
        text-align: center;
        width: 100%;
    }
    
    .project-title {
        text-align: center;
        margin-bottom: 8px;
    }
    
    .project-description {
        text-align: center;
    }
    
    .carousel-frame {
        padding: 16px;
    }
    
    .carousel-image {
        height: 200px;
        box-shadow: none !important;
    }
    
    .carousel-controls {
        position: absolute !important;
        bottom: -60px !important;
        left: 50% !important;
        transform: translateX(-50%) !important;
        margin-top: 0 !important;
        gap: 12px;
        width: 100%;
    }
    
    .nav-button {
        width: 36px;
        height: 36px;
    }
    
    .indicators {
        padding: 0 12px;
        gap: 6px;
    }
    
    .indicator {
        width: 10px;
        height: 10px;
    }

    .main-title {
        font-size: 3rem !important;
        line-height: 1.1;
        margin-bottom: 20px;
        letter-spacing: 0.05em;
    }
    
    .project-carousel {
        margin-top: -480px !important;
    }
    
    .project-cta-container {
        position: absolute !important;
        bottom: -100px !important;
        left: 50% !important;
        transform: translateX(-50%) !important;
        margin-top: 0 !important;
        width: 100%;
    }
}

/* Intersection Observer Animation */
.project-section {
    opacity: 0;
    transform: translateY(80px) scale(0.95);
    transition: all 1.2s cubic-bezier(0.16, 1, 0.3, 1);
    filter: blur(2px);
}

.project-section.visible {
    opacity: 1;
    transform: translateY(0) scale(1);
    filter: blur(0px);
}

.project-section.visible .carousel-glow {
    animation: none;
}

.project-cta-container {
    position: absolute !important;
    bottom: -310px !important;
    left: 50% !important;
    transform: translateX(-50%) !important;
    margin-top: 0 !important;
    margin-bottom: 0 !important;
    display: flex !important;
    justify-content: center !important;
    align-items: center !important;
    z-index: 100 !important;
    width: 100%;
}

/* Header title simple and elegant animation */
.title-animated {
    opacity: 0;
    position: relative;
    display: inline-block;
    background: linear-gradient(90deg, 
        #808080 0%, 
        #494949 25%, 
        #808080 50%, 
        #494949 75%, 
        #808080 100%
    );
    background-size: 200% 100%;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    animation: 
        titleFadeInScale 1.8s ease-out forwards, 
        titleGradientMove 4s linear infinite;
    animation-delay: 0.3s, 1s;
    transform: scale(0.95) translateY(30px);
}

@keyframes titleFadeInScale {
    0% {
        opacity: 0;
        transform: scale(0.95) translateY(30px);
        filter: blur(3px);
    }
    100% {
        opacity: 1;
        transform: scale(1) translateY(0px);
        filter: blur(0px);
    }
}

@keyframes titleGlowPulse {
    0%, 100% {
        text-shadow: 
            0 0 20px rgba(255, 255, 255, 0.4),
            0 0 40px rgba(255, 255, 255, 0.2);
    }
    50% {
        text-shadow: 
            0 0 25px rgba(255, 255, 255, 0.6),
            0 0 50px rgba(255, 255, 255, 0.3);
    }
}

@keyframes titleGradientMove {
    0% {
        background-position: 0% 50%;
    }
    100% {
        background-position: 100% 50%;
    }
}

/* Description typewriter with fade out cursor */
.typewriter-description {
    overflow: hidden;
    border-right: 2px solid rgba(255, 255, 255, 0.6);
    white-space: nowrap;
    animation: typing-description 2.5s steps(65, end), blink-caret-description 0.6s step-end infinite, cursorFadeOut 0.8s ease-out forwards;
    animation-delay: 2s, 2s, 4.3s;
    animation-fill-mode: both;
    opacity: 0;
    padding-right: 3px;
    width: fit-content;
    display: inline-block;
}

@keyframes cursorFadeOut {
    0% {
        border-right-color: rgba(255, 255, 255, 0.6);
    }
    100% {
        border-right-color: transparent;
    }
}

/* Tech stack items sequential animation - timings mais cedo */
.tech-stack span,
.tech-stack .tech-dot {
    opacity: 0;
    animation: fadeInUp 0.4s ease forwards;
}

.tech-stack span:nth-child(1) { animation-delay: 4.2s; }
.tech-stack .tech-dot:nth-child(2) { animation-delay: 4.3s; }
.tech-stack span:nth-child(3) { animation-delay: 4.4s; }
.tech-stack .tech-dot:nth-child(4) { animation-delay: 4.5s; }
.tech-stack span:nth-child(5) { animation-delay: 4.6s; }
.tech-stack .tech-dot:nth-child(6) { animation-delay: 4.7s; }
.tech-stack span:nth-child(7) { animation-delay: 4.8s; }
.tech-stack .tech-dot:nth-child(8) { animation-delay: 4.9s; }
.tech-stack span:nth-child(9) { animation-delay: 5.0s; }
.tech-stack .tech-dot:nth-child(10) { animation-delay: 5.1s; }
.tech-stack span:nth-child(11) { animation-delay: 5.2s; }
.tech-stack .tech-dot:nth-child(12) { animation-delay: 5.3s; }
.tech-stack span:nth-child(13) { animation-delay: 5.4s; }

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

@media (max-width: 1700px) {
    .main-title {
        font-size: 5rem;
        line-height: 1.1;
        margin-bottom: 20px;
        letter-spacing: 0.05em;
        align-items: center;
        justify-content: center;
        display: flex;
        flex-direction: column;
        text-align: center;
    }
}

/* Mobile header fixes */
@media (max-width: 768px) {
    .header-section {
        min-height: 100vh;
        padding: 20px;
        position: relative;
        overflow: hidden;
    }
    
    .header-content {
        padding: 60px 20px 40px;
        max-width: 100%;
        text-align: center;
        position: relative;
        z-index: 10;
    }
    
    .main-title {
        font-size: 5rem;
        line-height: 1.1;
        margin-bottom: 20px;
        letter-spacing: 0.05em;
        align-items: center;
        justify-content: center;
        display: flex;
        flex-direction: column;
        text-align: center;
    }
    
    .header-description {
        font-size: 0.5rem !important;
        line-height: 1.6;
        margin: 20px 0 30px;
        max-width: 90%;
        margin-left: auto;
        margin-right: auto;
        align-items: center;
        justify-content: center;
        display: flex;
        flex-direction: column;
        text-align: center;
    }
    
    .year-section {
        margin: 25px 0;
        font-size: 0.9rem;
    }
    
    .tech-stack {
        gap: 8px;
        margin: 20px 0;
        flex-wrap: wrap;
        justify-content: center;
    }
    
    .tech-stack span {
        font-size: 0.8rem;
    }
    
    .scroll-indicator {
        bottom: 30px;
        scale: 0.9;
    }
    
    /* Mobile project sections fixes */
    .project-section {
        padding: 40px 15px;
        margin-bottom: 30px;
    }
    
    .project-grid {
        grid-template-columns: 1fr;
        gap: 30px;
        max-width: 100%;
    }
    
    .project-info {
        order: 2;
        text-align: center;
        padding: 0 10px;
    }
    
    .project-carousel {
        order: 1;
        margin-top: -100px !important;
        position: relative;
        min-height: 400px;
        padding-bottom: 120px;
    }
    
    /* Mobile carousel glow - less height */
    .carousel-glow {
        height: 300px !important;
        top: 50px !important;
        opacity: 0.2 !important;
    }
    
    /* Mobile carousel logo centered */
    .carousel-frame {
        display: flex;
        align-items: center;
        justify-content: center;
        margin: 0 auto;
        max-width: 90%;
    }
    
    /* Mobile controls higher */
    .carousel-controls {
        position: absolute !important;
        bottom: -60px !important;
        left: 50% !important;
        transform: translateX(-50%) !important;
        margin-top: 0 !important;
        gap: 12px;
        width: 100%;
    }
    
    /* Mobile CTA button higher */
    .project-cta-container {
        position: absolute !important;
        bottom: -120px !important;
        left: 50% !important;
        transform: translateX(-50%) !important;
        margin-top: 0 !important;
        width: 100%;
    }
    
    .nav-button {
        width: 36px;
        height: 36px;
    }
    
    .indicators {
        padding: 0 12px;
        gap: 6px;
    }
    
    .indicator {
        width: 10px;
        height: 10px;
    }
}

@keyframes typing-description {
    0% {
        width: 0;
        opacity: 0;
    }
    5% {
        opacity: 1;
    }
    100% {
        width: 100%;
        opacity: 1;
    }
}

@keyframes blink-caret-description {
    0%, 50% {
        border-color: rgba(255, 255, 255, 0.6);
    }
    51%, 100% {
        border-color: transparent;
    }
}

/* Remove caret after animation completes - mantém descrição fixa */
.typewriter-description.animation-complete {
    border-right: none;
    animation: none;
    width: fit-content;
    overflow: visible;
    opacity: 1;
    padding-right: 0;
    display: inline-block;
    white-space: nowrap;
}

/* Projects Header Section - Maximum z-index to prevent any overlapping */
.projects-header-section {
    padding: 140px 20px 120px;
    margin-top: -50px;
    margin-bottom: -200px;
    text-align: center;
    position: relative;
    overflow: hidden;
    z-index: 9999 !important;
    isolation: isolate;
}

@media (max-width: 1700px) {
    .projects-header-section {
        border-top: none;
        border-bottom: none;
    }
    
    .geometric-elements {
        display: none !important;
    }
    
    .line-top-left-v,
    .line-top-left-h,
    .line-bottom-right-v,
    .line-bottom-right-h,
    .square-left,
    .square-right {
        display: none !important;
    }
}

.projects-header-content {
    max-width: 950px;
    margin: 0 auto;
    position: relative;
    z-index: 10000 !important;
    isolation: isolate;
}

/* Fix overlapping issues - ensure lower z-index for all other sections */
.projects-container {
    position: relative;
    z-index: 10;
}

.header-section {
    position: relative;
    z-index: 1;
}

.project-section {
    position: relative;
    z-index: 5;
}

/* Ensure carousel elements don't overlap header */
.carousel-glow {
    z-index: 1 !important;
}

.carousel-container {
    z-index: 2 !important;
}

.carousel-frame {
    z-index: 3 !important;
}

.carousel-controls {
    z-index: 4 !important;
}

.project-cta-container {
    z-index: 4 !important;
}

/* Mobile adjustments - maintain high z-index */
@media (max-width: 768px) {
    .projects-header-section {
        padding: 100px 20px 80px;
        z-index: 9999 !important;
        border-top: none;
        border-bottom: none;
        isolation: isolate;
    }
    
    .projects-header-content {
        z-index: 10000 !important;
        isolation: isolate;
    }
    
    .projects-main-title {
        font-size: clamp(2.8rem, 12vw, 4.5rem);
        margin-bottom: 30px;
        letter-spacing: -0.03em;
        line-height: 0.95;
    }
    
    .projects-description {
        font-size: 1.15rem;
        line-height: 1.8;
        max-width: 100%;
        padding: 0 15px;
    }
    
    .projects-badge {
        margin-bottom: 40px;
        padding: 12px 24px;
        gap: 14px;
    }
    
    .projects-badge .badge-text {
        font-size: 0.8rem;
        letter-spacing: 0.15em;
    }
    
    .projects-badge .badge-line {
        width: 24px;
    }

    /* Project sections mobile layout */
    .project-grid {
        grid-template-columns: 1fr;
        gap: 30px;
        max-width: 100%;
        display: flex;
        flex-direction: column;
    }
    
    .project-info {
        order: 1;
        text-align: left;
        padding: 0 15px;
        margin-bottom: 30px;
    }
    
    .project-carousel {
        order: 2;
        margin-bottom: 40px !important;
        margin-top: -70px !important;
        position: relative;
        min-height: 400px;
        padding-bottom: 140px;
    }
    
    /* Project header mobile - logo ao lado esquerdo do nome e descrição */
    .project-header {
        flex-direction: row;
        align-items: center;
        text-align: left;
        gap: 20px;
        margin-bottom: 10px;
        order: 1;
    }
    
    /* Logo no lado esquerdo em mobile */
    .project-logo {
        order: 1;
        margin-bottom: -15px;
        display: flex;
        justify-content: flex-start;
        align-items: center;
        transform: translateY(0px);
        width: 80px !important;
        height: 80px !important;
        flex-shrink: 0;
    }
    
    .project-logo-image {
        width: 100% !important;
        height: 100% !important;
        object-fit: contain !important;
    }
    
    .project-title-section {
        order: 2;
        text-align: left;
        width: 100%;
        transform: translateY(0px);
        flex: 1;
    }
    
    .project-title {
        text-align: left;
        margin-bottom: 8px;
        font-size: clamp(1.8rem, 5vw, 2.2rem) !important;
    }
    
    .project-description {
        text-align: left;
        margin-bottom: -5px;
        font-size: 0.9rem;
        line-height: 1.4;
    }
    
    /* Feature cards - after header */
    .feature-card {
        order: 2;
        margin-bottom: 20px;
    }
    
    /* Pages card - after features */
    .pages-card {
        order: 3;
        margin-bottom: 30px;
    }
    
    /* Carousel - after pages */
    .project-carousel {
        order: 4;
    }


    
    .project-section[data-project="1"] .project-carousel {
        margin-top: -80px !important;
        padding-bottom: 350px !important;
    }
    
    .project-section[data-project="1"] .carousel-controls {
        bottom: 280px !important;
    }
    
    .project-section[data-project="1"] .project-cta-container {
        bottom: -100px !important;
    }
    
    .project-section[data-project="1"] .carousel-glow {
        height: 200px !important;
        top: 80px !important;
    }

    /* Mobile carousel positioning - general */
    .carousel-controls {
        position: absolute !important;
        bottom: 140px !important;
        left: 50% !important;
        transform: translateX(-50%) !important;
        margin-top: 0 !important;
        gap: 12px;
        width: 100%;
        z-index: 15;
    }
    
    /* Mobile CTA button positioning - general */
    .project-cta-container {
        position: absolute !important;
        bottom: -100px !important;
        left: 50% !important;
        transform: translateX(-50%) !important;
        margin-top: 0 !important;
        width: 100%;
        z-index: 15;
    }

    /* Mobile carousel glow - general */
    .carousel-glow {
        height: 150px !important;
        top: 100px !important;
        bottom: 100px !important;
        opacity: 0.2 !important;
    }
    
    /* Mobile carousel logo centered */
    .carousel-frame {
        display: flex;
        align-items: center;
        justify-content: center;
        margin: 0 auto;
        max-width: 90%;
    }
    
    .nav-button {
        width: 36px;
        height: 36px;
    }
    
    .indicators {
        padding: 0 12px;
        gap: 6px;
    }
    
    .indicator {
        width: 10px;
        height: 10px;
    }
}

/* Initial hidden state */
.projects-badge,
.projects-main-title,
.projects-description {
    opacity: 0;
    transform: translateY(20px);
    transition: none;
}

/* Visible state with new animations */
.projects-header-section.visible .projects-badge {
    animation: elegantSlideUp 1.2s ease-out forwards;
    animation-delay: 0.1s;
}

.projects-header-section.visible .projects-main-title {
    animation: elegantSlideUp 1.4s ease-out forwards;
    animation-delay: 0.3s;
}

.projects-header-section.visible .projects-description {
    animation: elegantSlideUp 1.1s ease-out forwards;
    animation-delay: 0.5s;
}

@keyframes elegantSlideUp {
    0% {
        opacity: 0;
        transform: translateY(20px);
    }
    60% {
        opacity: 0.8;
        transform: translateY(-2px);
    }
    100% {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Remove border from first project carousel frame */
.project-section[data-project="0"] .carousel-frame {
    border: none !important;
    background: transparent !important;
}

.projects-badge {
    display: inline-flex;
    align-items: center;
    gap: 18px;
    padding: 14px 28px;
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 35px;
    background: 
        linear-gradient(135deg, rgba(255, 255, 255, 0.1) 0%, rgba(255, 255, 255, 0.03) 100%);
    backdrop-filter: blur(25px);
    margin-bottom: 50px;
    box-shadow: 
        0 12px 40px rgba(0, 0, 0, 0.08),
        inset 0 1px 0 rgba(255, 255, 255, 0.15),
        inset 0 -1px 0 rgba(255, 255, 255, 0.05);
    position: relative;
}

.projects-badge .badge-text {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    font-size: 0.85rem;
    font-weight: 700;
    letter-spacing: 0.18em;
    color: rgba(255, 255, 255, 0.95);
    text-transform: uppercase;
    text-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
}

.projects-badge .badge-line {
    width: 28px;
    height: 1.5px;
    background: linear-gradient(90deg, rgba(255, 255, 255, 0.8), rgba(255, 255, 255, 0.3));
    border-radius: 2px;
    box-shadow: 0 0 8px rgba(255, 255, 255, 0.3);
}

.projects-main-title {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    font-size: clamp(3.5rem, 7vw, 6rem);
    font-weight: 100;
    letter-spacing: -0.05em;
    line-height: 0.9;
    margin: 0 0 40px;
    background: linear-gradient(135deg, #ffffff 0%, rgba(255, 255, 255, 0.8) 30%, rgba(255, 255, 255, 0.9) 70%, rgba(255, 255, 255, 0.7) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    text-shadow: 0 0 60px rgba(255, 255, 255, 0.15);
    position: relative;
}

.projects-main-title::after {
    content: '';
    position: absolute;
    bottom: -10px;
    left: 50%;
    width: 60px;
    height: 2px;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.4), transparent);
    transform: translateX(-50%);
    border-radius: 2px;
}

.projects-description {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    font-size: 1.25rem;
    font-weight: 300;
    line-height: 1.9;
    color: rgba(255, 255, 255, 0.75);
    max-width: 700px;
    margin: 0 auto;
    text-shadow: 0 2px 12px rgba(0, 0, 0, 0.1);
}

/* Ensure header elements don't overlap projects-header */
.header-content,
.header-badge,
.main-title,
.header-description,
.year-section,
.tech-stack,
.scroll-indicator {
    z-index: 1 !important;
}

.grid-background,
.line-top-left-v,
.line-top-left-h,
.line-bottom-right-v,
.line-bottom-right-h,
.square-left,
.square-right {
    z-index: -1 !important;
}

/* Animated line section should not overlap */
.animated-line-section,
.animated-line,
.carousel-line {
    z-index: 1 !important;
}

/* Portfolio Summary Section */
.portfolio-summary-section {
    padding: 120px 16px 80px;
    margin-top: -50px !important;
    margin-bottom: -120px !important;
    max-width: 1400px;
    margin: 0 auto;
    text-align: center;
    position: relative;
    z-index: 9998;
    isolation: isolate;
    background: transparent !important;
    background: 
        radial-gradient(circle at 30% 20%, rgba(99, 102, 241, 0.1) 0%, transparent 50%),
        radial-gradient(circle at 70% 80%, rgba(139, 92, 246, 0.1) 0%, transparent 50%),
        radial-gradient(circle at 10% 60%, rgba(236, 72, 153, 0.05) 0%, transparent 50%);
}

.portfolio-summary-content {
    position: relative;
    z-index: 9999;
    max-width: 950px;
    margin: 0 auto;
}

.summary-badge {
    display: inline-flex;
    align-items: center;
    gap: 18px;
    padding: 14px 28px;
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 35px;
    background: 
        linear-gradient(135deg, rgba(255, 255, 255, 0.1) 0%, rgba(255, 255, 255, 0.03) 100%);
    backdrop-filter: blur(25px);
    margin-bottom: 50px;
    box-shadow: 
        0 12px 40px rgba(0, 0, 0, 0.08),
        inset 0 1px 0 rgba(255, 255, 255, 0.15),
        inset 0 -1px 0 rgba(255, 255, 255, 0.05);
    position: relative;
}

.summary-badge .badge-text {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    font-size: 0.85rem;
    font-weight: 700;
    letter-spacing: 0.18em;
    color: rgba(255, 255, 255, 0.95);
    text-transform: uppercase;
    text-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
}

.summary-badge .badge-line {
    width: 28px;
    height: 1.5px;
    background: linear-gradient(90deg, rgba(255, 255, 255, 0.8), rgba(255, 255, 255, 0.3));
    border-radius: 2px;
    box-shadow: 0 0 8px rgba(255, 255, 255, 0.3);
}

.summary-main-title {
    font-family: 'Poppins', -apple-system, BlinkMacSystemFont, sans-serif;
    font-size: 4rem;
    font-weight: 700;
    letter-spacing: -0.03em;
    line-height: 1.2;
    margin: 0 0 40px;
    background: linear-gradient(135deg, #ffffff 0%, rgba(255, 255, 255, 0.95) 30%, rgba(206, 206, 206, 0.9) 70%, rgba(182, 182, 182, 0.8) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    text-shadow: 0 0 60px rgba(255, 255, 255, 0.15);
    position: relative;
}

.summary-main-title::after {
    content: '';
    position: absolute;
    bottom: -10px;
    left: 50%;
    width: 200px;
    height: 2px;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.4), transparent);
    transform: translateX(-50%);
    border-radius: 2px;
}

.summary-description {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    font-size: 1.25rem;
    margin-top: -10px !important;
    font-weight: 300;
    line-height: 1.9;
    color: rgba(255, 255, 255, 0.75);
    max-width: 800px;
    margin: 0 auto;
    text-shadow: 0 2px 12px rgba(0, 0, 0, 0.1);
}

/* Portfolio Summary Section Animations */
.summary-badge,
.summary-main-title,
.summary-description {
    opacity: 0;
    transform: translateY(20px);
    transition: none;
}

.portfolio-summary-section.visible .summary-badge {
    animation: elegantSlideUp 1.2s ease-out forwards;
    animation-delay: 0.1s;
}

.portfolio-summary-section.visible .summary-main-title {
    animation: elegantSlideUp 1.4s ease-out forwards;
    animation-delay: 0.3s;
}

.portfolio-summary-section.visible .summary-description {
    animation: elegantSlideUp 1.1s ease-out forwards;
    animation-delay: 0.5s;
}

/* Mobile responsive for portfolio summary */
@media (max-width: 768px) {
    .portfolio-summary-section {
        padding: 100px 20px 80px;
        margin-bottom: 0;
    }
    
    .summary-main-title {
        font-size: clamp(2.8rem, 12vw, 4.5rem);
        margin-bottom: 30px;
        letter-spacing: -0.03em;
        line-height: 1.1;
        font-weight: 800;
        text-transform: uppercase;
    }
    
    .summary-description {
        font-size: 1rem;
        line-height: 1.8;
        max-width: 100%;
        padding: 0 15px;
        margin-bottom: 3rem;
    }
    
    .summary-badge {
        margin-bottom: 40px;
        padding: 12px 24px;
        gap: 14px;
    }
    
    .summary-badge .badge-text {
        font-size: 0.8rem;
        letter-spacing: 0.15em;
    }
    
    .summary-badge .badge-line {
        width: 24px;
    }
}

/* Companies Section */
.companies-section {
    position: relative;
    padding: 5rem 0;
    overflow: hidden;
    margin-top: -50px;
    margin-bottom: -120px;
}

.companies-section .container {
    max-width: 900px !important;
    margin: 0 auto;
    padding: 0 2rem;
}

.companies-background {
    position: absolute;
    inset: 0;
    pointer-events: none;
}

.bg-gradient-1 {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 50%;
}

.bg-gradient-2 {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 50%;
}

.bg-blur-circle {
    position: absolute;
    border-radius: 50%;
    filter: blur(100px);
}

.bg-blur-1 {
    top: 20%;
    left: 10%;
    width: 200px;
    height: 200px;
    background: radial-gradient(circle, rgba(255, 255, 255, 0.03) 0%, transparent 70%);
    animation: float 12s ease-in-out infinite;
}

.bg-blur-2 {
    bottom: 20%;
    right: 10%;
    width: 250px;
    height: 250px;
    background: radial-gradient(circle, rgba(255, 255, 255, 0.03) 0%, transparent 70%);
    animation: float 15s ease-in-out infinite reverse;
}

/* Companies Header */
.companies-header {
    text-align: center;
    margin-bottom: 5rem;
}

.badge-premium {
    position: relative;
    display: inline-block;
    margin-bottom: 0.8rem;
}

.badge-glow {
    position: absolute;
    inset: -2px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 50px;
    filter: blur(4px);
    opacity: 0.5;
    animation: pulse 3s ease-in-out infinite;
}

.badge-content {
    position: relative;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 1.25rem;
    background: rgba(255, 255, 255, 0.05);
    backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 50px;
    font-size: 0.75rem;
    font-weight: 500;
    color: rgba(255, 255, 255, 0.8);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.sparkle-star {
    color: #fff;
    animation: rotate 4s linear infinite;
    opacity: 0.7;
}

.section-title {
    font-size: 4rem;
    font-weight: 300;
    line-height: 1.2;
    margin-bottom: 1.5rem;
    letter-spacing: -0.02em;
}

.title-main {
    display: block;
    color: #fff;
    font-weight: 300;
}

.title-accent {
    display: block;
    color: #fff;
    font-weight: 700;
}

.section-description {
    font-size: 1.5rem;
    color: rgba(255, 255, 255, 0.6);
    max-width: 900px;
    margin: 0 auto;
    line-height: 1.7;
    font-weight: 300;
    margin-bottom: -40px;
}

.highlight-number {
    color: #fff;
    font-weight: 600;
}

.highlight-text {
    color: #fff;
    font-weight: 500;
}

/* Companies Stats */
.companies-stats {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 4rem;
    flex-wrap: wrap;
    max-width: 700px;
    margin: 0 auto;
    margin-top: -100px;
}

.stat-card-animated {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    padding: 2rem 1.5rem;
    border-radius: 0;
    background: transparent;
    border: none;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    transition: all 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    min-width: 160px;
    position: relative;
}

.stat-card-animated::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 1px;
    background: #fff;
    transform: scaleX(0);
    transition: transform 0.4s ease;
}

.stat-card-animated:hover::after {
    transform: scaleX(1);
}

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

.stat-content {
    display: flex;
    flex-direction: column;
    align-items: center;
}

.stat-number-container {
    display: flex;
    align-items: baseline;
    gap: 0.1rem;
    margin-bottom: 0.5rem;
}

.stat-number-animated {
    font-size: 3rem;
    font-weight: 100;
    color: #fff;
    line-height: 1;
    letter-spacing: -0.03em;
    margin-bottom: 0;
}

.stat-suffix {
    display: inline-block;
    font-size: 3rem;
    font-weight: 100;
    color: rgba(255, 255, 255, 0.8);
    line-height: 1;
}

.stat-label {
    font-size: 0.75rem;
    color: rgba(255, 255, 255, 0.6);
    font-weight: 300;
    margin-top: 0.75rem;
    letter-spacing: 1px;
    text-transform: uppercase;
}

/* Animations para companies */
@keyframes scroll-infinite {
    0% {
        transform: translateX(0);
    }
    100% {
        transform: translateX(-50%);
    }
}

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

@keyframes countUp {
    0% {
        opacity: 0;
        transform: translateY(20px);
    }
    100% {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Responsive para companies */
@media (max-width: 768px) {
    .companies-section {
        padding: 4rem 0;
    }

    .companies-header {
        margin-bottom: 5rem;
    }

    .section-title {
        font-size: clamp(1.75rem, 8vw, 2.5rem);
    }

    .section-description {
        font-size: 1rem;
        max-width: 90%;
    }

    .companies-slider {
        margin-bottom: 6rem;
        padding: 1rem 0;
    }

    .companies-track {
        gap: 4rem;
        animation-duration: 45s;
    }

    .company-logo {
        height: 40px;
    }

    .company-logo img {
        max-width: 100px;
    }

    .companies-stats {
        flex-direction: column;
        gap: 2rem;
    }

    .stat-card-animated {
        min-width: 280px;
        padding: 1.25rem 1.5rem;
    }

    .stat-number-animated,
    .stat-suffix {
        font-size: 1.875rem;
    }
}

/* CSS para o título "Quem Somos" que sumiu */
.title-gradient-quem-somos {
    font-size: clamp(2.5rem, 6vw, 4rem);
    font-weight: 700;
    background: linear-gradient(45deg, #ffffff, #f0f0f0, #ffffff);
    background-size: 200% 200%;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    animation: gradientPulse 3s ease-in-out infinite;
    display: inline-block;
    letter-spacing: -0.02em;
}

@keyframes gradientPulse {
    0%, 100% {
        background-position: 0% 50%;
    }
    50% {
        background-position: 100% 50%;
    }
}

/* Brilho atrás da hero-image melhorado */
.hero-image::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 140%;
    height: 140%;
    background: radial-gradient(
        circle, 
        rgba(255, 255, 255, 0.25) 0%, 
        rgba(255, 255, 255, 0.15) 20%,
        rgba(255, 255, 255, 0.08) 40%, 
        transparent 70%
    );
    border-radius: 50%;
    z-index: -1;
    animation: heroGlow 4s ease-in-out infinite;
    filter: blur(10px);
}

@keyframes heroGlow {
    0%, 100% {
        opacity: 0.6;
        transform: translate(-50%, -50%) scale(1);
    }
    50% {
        opacity: 0.9;
        transform: translate(-50%, -50%) scale(1.1);
    }
}

@media screen and (max-width: 800px) {
    .header-badge {
        display: none;
    }
}