body {
    box-sizing: border-box;
}

.gradient-bg {
    background: linear-gradient(135deg, #0c27a3 0%, #1e40af 100%);
}

.floating-animation {
    animation: float 3s ease-in-out infinite;
}

@keyframes float {
    0%, 100% { transform: translateY(0px); }
    50% { transform: translateY(-10px); }
}

.slide-in {
    animation: slideIn 0.8s ease-out;
}

@keyframes slideIn {
    from { opacity: 0; transform: translateY(30px); }
    to { opacity: 1; transform: translateY(0); }
}

.pulse-button {
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.05); }
}

.whatsapp-float {
    position: fixed;
    width: 60px;
    height: 60px;
    bottom: 20px;
    right: 20px;
    background-color: #25d366;
    color: white;
    border-radius: 50px;
    text-align: center;
    font-size: 30px;
    box-shadow: 2px 2px 3px #999;
    z-index: 100;
    animation: bounce 2s infinite;
}

@keyframes bounce {
    0%, 20%, 50%, 80%, 100% { transform: translateY(0); }
    40% { transform: translateY(-10px); }
    60% { transform: translateY(-5px); }
}

.block-3d {
    transform: perspective(1000px) rotateX(15deg) rotateY(-15deg);
    transition: transform 0.3s ease;
}

.block-3d:hover {
    transform: perspective(1000px) rotateX(10deg) rotateY(-10deg) scale(1.05);
}

/* Menu Fixo */
header {
    transition: all 0.3s ease;
}

/* Smooth scroll */
html {
    scroll-behavior: smooth;
}

/* Ajuste para seções com menu fixo */
section {
    scroll-margin-top: 80px;
}

/* Menu Mobile Animação */
#mobile-menu {
    animation: slideDown 0.3s ease-out;
}

@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Galeria de Obras - Carrossel Infinito */
.gallery-slider {
    width: 100%;
    overflow: hidden;
    position: relative;
}

.gallery-track {
    display: flex;
    gap: 20px;
    animation: scroll 60s linear infinite;
    width: fit-content;
    will-change: transform;
}

.gallery-track:hover {
    animation-play-state: paused;
}

.gallery-slide {
    flex-shrink: 0;
    width: 350px;
    height: 280px;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.gallery-slide:hover {
    transform: scale(1.05);
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.2);
}

.gallery-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    image-rendering: -webkit-optimize-contrast;
    image-rendering: crisp-edges;
}

/* Otimização de hardware */
.gallery-slide {
    transform: translateZ(0);
    backface-visibility: hidden;
    -webkit-backface-visibility: hidden;
}

@keyframes scroll {
    0% {
        transform: translateX(0);
    }
    100% {
        transform: translateX(-50%);
    }
}

/* Gradientes laterais */
.gallery-gradient-left {
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 100px;
    background: linear-gradient(to right, rgba(255, 255, 255, 1) 0%, rgba(255, 255, 255, 0) 100%);
    z-index: 10;
    pointer-events: none;
}

.gallery-gradient-right {
    position: absolute;
    right: 0;
    top: 0;
    bottom: 0;
    width: 100px;
    background: linear-gradient(to left, rgba(255, 255, 255, 1) 0%, rgba(255, 255, 255, 0) 100%);
    z-index: 10;
    pointer-events: none;
}

/* Cursor pointer nas imagens */
.gallery-slide {
    cursor: pointer;
}

/* Lightbox */
.lightbox {
    display: none;
    position: fixed;
    z-index: 9999;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.95);
    animation: fadeIn 0.3s ease;
    overflow: hidden;
}

.lightbox-container {
    position: relative;
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.lightbox-content {
    max-width: 90%;
    max-height: 90vh;
    object-fit: contain;
    animation: zoomIn 0.3s ease;
    transition: none;
    user-select: none;
    cursor: default;
    touch-action: none;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes zoomIn {
    from { transform: scale(0.8); opacity: 0; }
    to { transform: scale(1); opacity: 1; }
}

.lightbox-close {
    position: absolute;
    top: 20px;
    right: 20px;
    width: 50px;
    height: 50px;
    background: rgba(255, 255, 255, 0.1);
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    color: #fff;
    font-size: 30px;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.3s;
    z-index: 10001;
    display: flex;
    align-items: center;
    justify-content: center;
    backdrop-filter: blur(10px);
}

.lightbox-close:hover {
    background: rgba(255, 255, 255, 0.2);
    transform: rotate(90deg);
}

/* Navegação do Lightbox */
.lightbox-nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 60px;
    height: 60px;
    background: rgba(255, 255, 255, 0.1);
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    color: #fff;
    font-size: 30px;
    cursor: pointer;
    transition: all 0.3s;
    z-index: 10001;
    display: flex;
    align-items: center;
    justify-content: center;
    backdrop-filter: blur(10px);
    user-select: none;
}

.lightbox-nav:hover {
    background: rgba(255, 255, 255, 0.25);
    transform: translateY(-50%) scale(1.1);
}

.lightbox-nav:active {
    transform: translateY(-50%) scale(0.95);
}

.lightbox-prev {
    left: 20px;
}

.lightbox-next {
    right: 20px;
}

/* Controles de Zoom */
.lightbox-zoom-controls {
    position: absolute;
    bottom: 30px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 15px;
    z-index: 10001;
}

.lightbox-zoom-btn {
    width: 50px;
    height: 50px;
    background: rgba(255, 255, 255, 0.1);
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    color: #fff;
    font-size: 24px;
    cursor: pointer;
    transition: all 0.3s;
    display: flex;
    align-items: center;
    justify-content: center;
    backdrop-filter: blur(10px);
    user-select: none;
}

.lightbox-zoom-btn:hover {
    background: rgba(255, 255, 255, 0.25);
    transform: scale(1.1);
}

.lightbox-zoom-btn:active {
    transform: scale(0.95);
}

/* Contador de fotos */
.lightbox-counter {
    position: absolute;
    top: 30px;
    left: 50%;
    transform: translateX(-50%);
    color: #fff;
    font-size: 16px;
    font-weight: 600;
    background: rgba(0, 0, 0, 0.5);
    padding: 8px 20px;
    border-radius: 20px;
    backdrop-filter: blur(10px);
    z-index: 10001;
}

/* Animação de Comparação 1 Bloco = 22 Tijolos */
.comparison-container {
    display: flex;
    align-items: center;
    justify-content: space-around;
    gap: 20px;
    margin-bottom: 15px;
}

.comparison-side {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
}

.tetriz-block {
    width: 80px;
    height: 80px;
    background: linear-gradient(135deg, #1e40af 0%, #3b82f6 100%);
    border-radius: 12px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 15px rgba(30, 64, 175, 0.4);
    animation: blockPulse 2s ease-in-out infinite;
    position: relative;
    overflow: hidden;
}

.tetriz-block::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: linear-gradient(45deg, transparent, rgba(255,255,255,0.3), transparent);
    animation: shine 3s infinite;
}

@keyframes shine {
    0% { transform: translateX(-100%) translateY(-100%) rotate(45deg); }
    100% { transform: translateX(100%) translateY(100%) rotate(45deg); }
}

@keyframes blockPulse {
    0%, 100% { transform: scale(1); box-shadow: 0 4px 15px rgba(30, 64, 175, 0.4); }
    50% { transform: scale(1.1); box-shadow: 0 8px 25px rgba(30, 64, 175, 0.6); }
}

.block-number {
    font-size: 32px;
    font-weight: 900;
    color: white;
    z-index: 1;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.3);
}

.block-label {
    font-size: 11px;
    font-weight: 700;
    color: #1e40af;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.equals-sign {
    color: #f59e0b;
    animation: pulse 1.5s ease-in-out infinite;
}

.pulse-icon {
    filter: drop-shadow(0 2px 4px rgba(245, 158, 11, 0.3));
}

.bricks-container {
    display: grid;
    grid-template-columns: repeat(13, 1fr);
    gap: 2px;
    width: 100px;
    margin-bottom: 5px;
}

.mini-brick {
    width: 100%;
    aspect-ratio: 1;
    background: linear-gradient(135deg, #dc2626 0%, #ef4444 100%);
    border-radius: 2px;
    animation: brickAppear 0.5s ease-out backwards;
    box-shadow: 0 1px 3px rgba(220, 38, 38, 0.3);
}

@keyframes brickAppear {
    0% {
        opacity: 0;
        transform: scale(0) rotate(180deg);
    }
    60% {
        transform: scale(1.2) rotate(-10deg);
    }
    100% {
        opacity: 1;
        transform: scale(1) rotate(0deg);
    }
}

.brick-number {
    font-size: 28px;
    font-weight: 900;
    color: #dc2626;
    animation: numberCount 2s ease-out;
}

@keyframes numberCount {
    0% { opacity: 0; transform: translateY(20px); }
    100% { opacity: 1; transform: translateY(0); }
}

.brick-label {
    font-size: 11px;
    font-weight: 700;
    color: #dc2626;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.savings-badge {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    background: linear-gradient(135deg, #10b981 0%, #059669 100%);
    color: white;
    padding: 8px 16px;
    border-radius: 20px;
    font-size: 13px;
    font-weight: 700;
    box-shadow: 0 4px 12px rgba(16, 185, 129, 0.3);
    animation: badgeBounce 2s ease-in-out infinite;
}

@keyframes badgeBounce {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-5px); }
}

.savings-icon {
    font-size: 18px;
    animation: coinFlip 2s ease-in-out infinite;
}

@keyframes coinFlip {
    0%, 100% { transform: rotateY(0deg); }
    50% { transform: rotateY(180deg); }
}

.savings-text {
    letter-spacing: 0.3px;
}

/* Animação de Comparação na Seção Sobre (Layout Vertical) */
.comparison-container-sobre {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 15px;
    padding: 10px;
}

.comparison-side-sobre {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
}

.tetriz-block-sobre {
    width: 100px;
    height: 100px;
    background: linear-gradient(135deg, #1e40af 0%, #3b82f6 100%);
    border-radius: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 6px 20px rgba(30, 64, 175, 0.5);
    animation: blockPulseSobre 2s ease-in-out infinite;
    position: relative;
    overflow: hidden;
}

.tetriz-block-sobre::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: linear-gradient(45deg, transparent, rgba(255,255,255,0.4), transparent);
    animation: shineSobre 3s infinite;
}

@keyframes shineSobre {
    0% { transform: translateX(-100%) translateY(-100%) rotate(45deg); }
    100% { transform: translateX(100%) translateY(100%) rotate(45deg); }
}

@keyframes blockPulseSobre {
    0%, 100% { 
        transform: scale(1); 
        box-shadow: 0 6px 20px rgba(30, 64, 175, 0.5); 
    }
    50% { 
        transform: scale(1.08); 
        box-shadow: 0 10px 30px rgba(30, 64, 175, 0.7); 
    }
}

.block-number-sobre {
    font-size: 48px;
    font-weight: 900;
    color: white;
    z-index: 1;
    text-shadow: 3px 3px 6px rgba(0,0,0,0.3);
}

.block-label-sobre {
    font-size: 14px;
    font-weight: 700;
    color: #1e40af;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.equals-sign-sobre {
    color: #f59e0b;
    animation: pulseSobre 1.5s ease-in-out infinite;
}

@keyframes pulseSobre {
    0%, 100% { transform: scale(1); opacity: 1; }
    50% { transform: scale(1.15); opacity: 0.8; }
}

.pulse-icon-sobre {
    filter: drop-shadow(0 3px 6px rgba(245, 158, 11, 0.4));
}

.bricks-container-sobre {
    display: grid;
    grid-template-columns: repeat(13, 1fr);
    gap: 3px;
    width: 130px;
    margin-bottom: 8px;
}

.mini-brick-sobre {
    width: 100%;
    aspect-ratio: 1;
    background: linear-gradient(135deg, #dc2626 0%, #ef4444 100%);
    border-radius: 2px;
    animation: brickAppearSobre 0.5s ease-out backwards;
    box-shadow: 0 2px 4px rgba(220, 38, 38, 0.4);
}

@keyframes brickAppearSobre {
    0% {
        opacity: 0;
        transform: scale(0) rotate(180deg);
    }
    60% {
        transform: scale(1.2) rotate(-10deg);
    }
    100% {
        opacity: 1;
        transform: scale(1) rotate(0deg);
    }
}

.brick-number-sobre {
    font-size: 36px;
    font-weight: 900;
    color: #dc2626;
    animation: numberCountSobre 2s ease-out;
    text-shadow: 2px 2px 4px rgba(220, 38, 38, 0.2);
}

@keyframes numberCountSobre {
    0% { opacity: 0; transform: translateY(20px); }
    100% { opacity: 1; transform: translateY(0); }
}

.brick-label-sobre {
    font-size: 14px;
    font-weight: 700;
    color: #dc2626;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* Responsivo para mobile */
@media (max-width: 768px) {
    .gallery-slide {
        width: 280px;
        height: 220px;
    }
    
    .gallery-track {
        animation: scroll 50s linear infinite;
    }
    
    .gallery-gradient-left,
    .gallery-gradient-right {
        width: 50px;
    }
    
    .lightbox-content {
        max-width: 95%;
        max-height: 80vh;
    }
    
    .lightbox-close {
        top: 15px;
        right: 15px;
        width: 45px;
        height: 45px;
        font-size: 24px;
    }
    
    .lightbox-nav {
        width: 50px;
        height: 50px;
        font-size: 24px;
    }
    
    .lightbox-prev {
        left: 10px;
    }
    
    .lightbox-next {
        right: 10px;
    }
    
    .lightbox-zoom-controls {
        bottom: 20px;
        gap: 10px;
    }
    
    .lightbox-zoom-btn {
        width: 45px;
        height: 45px;
        font-size: 20px;
    }
    
    .lightbox-counter {
        top: 20px;
        font-size: 14px;
        padding: 6px 16px;
    }
    
    /* Ajustes da comparação no mobile */
    .comparison-container {
        gap: 12px;
    }
    
    .tetriz-block {
        width: 70px;
        height: 70px;
    }
    
    .block-number {
        font-size: 28px;
    }
    
    .bricks-container {
        width: 85px;
    }
    
    .brick-number {
        font-size: 24px;
    }
    
    .savings-badge {
        font-size: 11px;
        padding: 6px 12px;
    }
}
