/**
 * Carrossel Imersivo com Efeito Parallax
 * Móveis Planejados Premium
 */

/* ===== CARROSSEL HERO ===== */
#heroCarousel {
    position: relative;
    height: 100vh;
    min-height: 600px;
    overflow: hidden;
    margin-top: -76px; /* Compensa altura do navbar */
}

#heroCarousel .carousel-inner {
    height: 100%;
}

#heroCarousel .carousel-item {
    height: 100vh;
    min-height: 600px;
    position: relative;
    overflow: hidden;
}

/* ===== IMAGEM COM EFEITO PARALLAX E ZOOM ===== */
.carousel-image-wrapper {
    position: absolute;
    top: -10%;
    left: -10%;
    width: 120%;
    height: 120%;
    overflow: hidden;
}

.carousel-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
    /* escala menor para manter nitidez */
    transform: scale(1.05);
    transition: transform 8s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    will-change: transform;
}

/* Efeito de zoom suave quando o slide está ativo (menos agressivo) */
.carousel-item.active .carousel-image {
    transform: scale(1.12);
}

/* ===== OVERLAY COM GRADIENTE ===== */
.carousel-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(
        135deg,
        rgba(44, 95, 45, 0.7) 0%,
        rgba(45, 45, 45, 0.6) 50%,
        rgba(212, 165, 116, 0.5) 100%
    );
    z-index: 1;
}

/* Overlay adicional para melhor legibilidade */
.carousel-overlay::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: radial-gradient(
        ellipse at center,
        transparent 0%,
        rgba(0, 0, 0, 0.3) 100%
    );
}

/* ===== CONTEÚDO DO CARROSSEL ===== */
.carousel-caption {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    text-align: center;
    z-index: 2;
    width: 90%;
    max-width: 1000px;
    padding: 2rem;
}

.carousel-caption h1 {
    font-family: 'Playfair Display', serif;
    font-size: 4rem;
    font-weight: 700;
    color: #ffffff;
    text-shadow: 2px 2px 10px rgba(0, 0, 0, 0.5);
    margin-bottom: 1.5rem;
    letter-spacing: 2px;
    animation: fadeInUp 1s ease-out 0.3s both;
}

.carousel-caption p {
    font-family: 'Open Sans', sans-serif;
    font-size: 1.4rem;
    color: #f5f5f5;
    text-shadow: 1px 1px 5px rgba(0, 0, 0, 0.5);
    margin-bottom: 2rem;
    line-height: 1.8;
    animation: fadeInUp 1s ease-out 0.6s both;
}

.carousel-caption .btn {
    padding: 1rem 3rem;
    font-size: 1.1rem;
    font-weight: 600;
    border-radius: 50px;
    text-transform: uppercase;
    letter-spacing: 1px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
    animation: fadeInUp 1s ease-out 0.9s both;
    transition: all 0.3s ease;
}

.carousel-caption .btn:hover {
    transform: translateY(-5px) scale(1.05);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.4);
}

.carousel-caption .btn-primary {
    background: linear-gradient(135deg, #2C5F2D 0%, #97BC62 100%);
    border: none;
}

.carousel-caption .btn-outline-light {
    border: 2px solid #ffffff;
    color: #ffffff;
    background: transparent;
    margin-left: 1rem;
}

.carousel-caption .btn-outline-light:hover {
    background: #ffffff;
    color: #2C5F2D;
}

/* ===== CONTROLES DO CARROSSEL ===== */
#heroCarousel .carousel-control-prev,
#heroCarousel .carousel-control-next {
    width: 5%;
    opacity: 0.7;
    transition: all 0.3s ease;
    z-index: 3;
}

#heroCarousel .carousel-control-prev:hover,
#heroCarousel .carousel-control-next:hover {
    opacity: 1;
}

#heroCarousel .carousel-control-prev-icon,
#heroCarousel .carousel-control-next-icon {
    width: 50px;
    height: 50px;
    background-size: 100%;
    border-radius: 50%;
    background-color: rgba(44, 95, 45, 0.8);
    padding: 10px;
    transition: all 0.3s ease;
}

#heroCarousel .carousel-control-prev-icon:hover,
#heroCarousel .carousel-control-next-icon:hover {
    background-color: rgba(44, 95, 45, 1);
    transform: scale(1.1);
}

/* ===== INDICADORES ===== */
#heroCarousel .carousel-indicators {
    bottom: 30px;
    z-index: 3;
}

#heroCarousel .carousel-indicators [data-bs-target] {
    width: 15px;
    height: 15px;
    border-radius: 50%;
    margin: 0 8px;
    background-color: rgba(255, 255, 255, 0.5);
    border: 2px solid #ffffff;
    transition: all 0.3s ease;
}

#heroCarousel .carousel-indicators .active {
    width: 40px;
    border-radius: 10px;
    background-color: #D4A574;
}

/* ===== EFEITO PARALLAX CAMADAS ===== */
.parallax-layer {
    position: absolute;
    width: 100%;
    height: 100%;
    pointer-events: none;
}

.parallax-layer-1 {
    z-index: 0;
    transform: translateZ(0);
    background: radial-gradient(circle at 20% 30%, rgba(255,255,255,0.06), transparent 40%),
                radial-gradient(circle at 80% 70%, rgba(255,255,255,0.04), transparent 45%);
}

.parallax-layer-2 {
    z-index: 1;
    opacity: 0.3;
    background: radial-gradient(circle at 60% 40%, rgba(212,165,116,0.15), transparent 50%),
                radial-gradient(circle at 30% 70%, rgba(44,95,45,0.12), transparent 55%);
}

/* ===== PARTICULAS REMOVIDAS POR SOLICITAÇÃO ===== */
.carousel-particles, .particle { display: none !important; }

/* ===== ANIMAÇÕES ===== */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(50px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes slideInLeft {
    from {
        opacity: 0;
        transform: translateX(-100px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes slideInRight {
    from {
        opacity: 0;
        transform: translateX(100px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

/* ===== SCROLL INDICATOR ===== */
.scroll-indicator {
    position: absolute;
    bottom: 40px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 3;
    animation: bounce 2s infinite;
}

.scroll-indicator i {
    font-size: 2rem;
    color: #ffffff;
    text-shadow: 0 2px 5px rgba(0, 0, 0, 0.5);
}

@keyframes bounce {
    0%, 20%, 50%, 80%, 100% {
        transform: translateX(-50%) translateY(0);
    }
    40% {
        transform: translateX(-50%) translateY(-20px);
    }
    60% {
        transform: translateX(-50%) translateY(-10px);
    }
}

/* ===== RESPONSIVIDADE ===== */
@media (max-width: 991px) {
    #heroCarousel {
        height: 80vh;
        min-height: 500px;
    }
    
    .carousel-item {
        height: 80vh;
        min-height: 500px;
    }
    
    .carousel-caption h1 {
        font-size: 2.5rem;
    }
    
    .carousel-caption p {
        font-size: 1.1rem;
    }
    
    .carousel-caption .btn {
        padding: 0.8rem 2rem;
        font-size: 1rem;
    }
}

@media (max-width: 767px) {
    #heroCarousel {
        height: 70vh;
        min-height: 450px;
    }
    
    .carousel-item {
        height: 70vh;
        min-height: 450px;
    }
    
    .carousel-caption h1 {
        font-size: 2rem;
        letter-spacing: 1px;
    }
    
    .carousel-caption p {
        font-size: 1rem;
        margin-bottom: 1.5rem;
    }
    
    .carousel-caption .btn {
        padding: 0.7rem 1.5rem;
        font-size: 0.9rem;
        display: block;
        margin: 0.5rem auto;
    }
    
    .carousel-caption .btn-outline-light {
        margin-left: 0;
    }
    
    .carousel-control-prev-icon,
    .carousel-control-next-icon {
        width: 35px;
        height: 35px;
    }
    
    .particle {
        display: none; /* Remove partículas em mobile para performance */
    }
}

@media (max-width: 575px) {
    .carousel-caption h1 {
        font-size: 1.5rem;
    }
    
    .carousel-caption p {
        font-size: 0.9rem;
    }
}

/* ===== PERFORMANCE ===== */
#heroCarousel .carousel-item,
#heroCarousel .carousel-image,
#heroCarousel .carousel-overlay {
    backface-visibility: hidden;
    -webkit-backface-visibility: hidden;
    perspective: 1000px;
    -webkit-perspective: 1000px;
}

/* ===== PRELOAD ===== */
#heroCarousel .carousel-item::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: #2C5F2D;
    z-index: 10;
    animation: preloadFade 0.5s ease-out forwards;
}

@keyframes preloadFade {
    to {
        opacity: 0;
        visibility: hidden;
    }
}
