/* ===== CARROSSEL AUTOMÁTICO - SEÇÃO REGIÕES DE CURITIBA ===== */

/* ===== CONTAINER DO CARROSSEL ===== */
.regioes-carousel {
    position: relative;
    overflow: hidden;
    margin: 30px 0;
    padding: 0 15px;
    display: block !important; /* Forçar exibição no mobile */
}

/* ===== GARANTIR QUE MOBILE-ONLY FUNCIONE ===== */
.mobile-only {
    display: block !important;
}

@media (min-width: 769px) {
    .mobile-only {
        display: none !important;
    }
}

@media (max-width: 768px) {
    .desktop-only {
        display: none !important;
    }
}

.carousel-container {
    position: relative;
    max-width: 100%;
    margin: 0 auto;
}

/* ===== TRACK DO CARROSSEL ===== */
.carousel-track {
    display: flex !important;
    transition: transform 0.5s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    will-change: transform;
    width: 400%; /* 4 cards * 100% cada */
    height: auto !important;
    position: relative;
    overflow: visible;
}

.carousel-track .regiao-card {
    flex: 0 0 25% !important; /* 100% / 4 cards = 25% cada */
    min-width: 25% !important;
    max-width: 25% !important;
    margin: 0;
    padding: 0 8px;
    box-sizing: border-box;
    display: block !important;
    opacity: 1 !important;
    visibility: visible !important;
    height: auto !important;
}

/* ===== CARDS DENTRO DO CARROSSEL ===== */
.regioes-carousel .regiao-card {
    background: linear-gradient(135deg, #ffffff 0%, #f8f9fa 100%) !important;
    border: 1px solid #e9ecef !important;
    border-radius: 20px !important;
    padding: 20px 15px !important;
    text-align: center !important;
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.08) !important;
    transition: all 0.3s ease !important;
    position: relative !important;
    overflow: hidden !important;
    display: block !important;
    opacity: 1 !important;
    visibility: visible !important;
    width: 100% !important;
    height: auto !important;
    margin-bottom: 0 !important;
}

.regioes-carousel .regiao-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: #333333;
    transform: scaleX(0);
    transition: transform 0.3s ease;
}

.regioes-carousel .regiao-card:hover::before {
    transform: scaleX(1);
}

.regioes-carousel .regiao-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.12);
}

/* ===== ÍCONES DENTRO DO CARROSSEL ===== */
.regioes-carousel .regiao-icon {
    width: 70px;
    height: 70px;
    margin: 0 auto 15px;
    background: #333333;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    overflow: hidden;
}

.regioes-carousel .regiao-icon::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: linear-gradient(45deg, transparent, rgba(255, 255, 255, 0.1), transparent);
    transform: rotate(45deg);
    transition: all 0.6s ease;
}

.regioes-carousel .regiao-card:hover .regiao-icon::before {
    animation: shimmer 1.5s ease-in-out;
}

@keyframes shimmer {
    0% { transform: translateX(-100%) translateY(-100%) rotate(45deg); }
    100% { transform: translateX(100%) translateY(100%) rotate(45deg); }
}

.regioes-carousel .regiao-icon i {
    font-size: 1.8rem;
    color: white;
    z-index: 2;
    position: relative;
}

/* ===== CONTEÚDO DOS CARDS ===== */
.regioes-carousel .regiao-content h3 {
    font-size: 1.3rem;
    font-weight: 700;
    color: #333333;
    margin-bottom: 10px;
    line-height: 1.3;
}

.regioes-carousel .regiao-content p {
    font-size: 0.9rem;
    color: #666666;
    line-height: 1.4;
    margin-bottom: 15px;
    min-height: 50px;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* ===== LINKS DOS CARDS ===== */
.regioes-carousel .regiao-link {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 10px 20px;
    background: #333333;
    color: white;
    text-decoration: none;
    border-radius: 25px;
    font-weight: 600;
    font-size: 0.85rem;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.regioes-carousel .regiao-link::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
    transition: left 0.5s ease;
}

.regioes-carousel .regiao-link:hover::before {
    left: 100%;
}

.regioes-carousel .regiao-link:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(51, 51, 51, 0.3);
    background: #555555;
}

/* ===== INDICADORES DO CARROSSEL MELHORADOS ===== */
.carousel-indicators {
    display: flex;
    justify-content: center;
    gap: 15px;
    margin-top: 30px;
    padding: 0 20px;
    position: relative;
}

.carousel-indicators .indicator {
    width: 14px;
    height: 14px;
    border-radius: 50%;
    background: #e9ecef;
    cursor: default;
    transition: all 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    position: relative;
    overflow: hidden;
    border: 2px solid transparent;
}

.carousel-indicators .indicator::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    background: linear-gradient(135deg, #333333, #666666);
    border-radius: 50%;
    transform: translate(-50%, -50%);
    transition: all 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

.carousel-indicators .indicator.active::before {
    width: 100%;
    height: 100%;
}

/* Removido hover effect - indicadores apenas visuais */

.carousel-indicators .indicator.active {
    background: linear-gradient(135deg, #333333, #666666);
    box-shadow: 0 0 20px rgba(51, 51, 51, 0.5);
    transform: scale(1.2);
}

/* Animação pulsante para o indicador ativo */
.carousel-indicators .indicator.active::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 20px;
    height: 20px;
    border: 2px solid rgba(51, 51, 51, 0.3);
    border-radius: 50%;
    transform: translate(-50%, -50%);
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0% {
        transform: translate(-50%, -50%) scale(0.8);
        opacity: 1;
    }
    100% {
        transform: translate(-50%, -50%) scale(1.4);
        opacity: 0;
    }
}

/* ===== ANIMAÇÃO AUTOMÁTICA CONTÍNUA ===== */
@keyframes autoSlide {
    0% { transform: translateX(0); }
    20% { transform: translateX(0); }
    25% { transform: translateX(-25%); }
    45% { transform: translateX(-25%); }
    50% { transform: translateX(-50%); }
    70% { transform: translateX(-50%); }
    75% { transform: translateX(-75%); }
    95% { transform: translateX(-75%); }
    100% { transform: translateX(0); }
}

.carousel-track.auto-sliding {
    animation: autoSlide 8s infinite ease-in-out;
}

/* ===== PAUSE ON HOVER ===== */
.regioes-carousel:hover .carousel-track.auto-sliding {
    animation-play-state: paused;
}

/* ===== EFEITOS DE TRANSITION MELHORADOS ===== */
.carousel-track {
    transition: transform 0.5s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

/* Efeito de brilho nos cards durante a transição */
.regioes-carousel .regiao-card {
    position: relative;
    overflow: hidden;
}

.regioes-carousel .regiao-card::after {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.1), transparent);
    transition: left 0.6s ease;
}

.regioes-carousel .regiao-card:hover::after {
    left: 100%;
}

/* ===== RESPONSIVIDADE MELHORADA ===== */
@media (max-width: 480px) {
    /* Melhorar título em telas pequenas */
    .regioes-curitiba .section-header {
        margin-bottom: 35px;
        padding: 0 15px;
    }
    
    .regioes-curitiba .section-header h2 {
        font-size: 1.9rem !important;
        margin-bottom: 14px !important;
    }
    
    .regioes-curitiba .section-header p {
        font-size: 0.95rem !important;
        max-width: 280px;
        margin: 20px auto 0 auto;
    }
    
    .regioes-carousel {
        padding: 0 15px;
        margin: 25px 0;
    }
    
    .regioes-carousel .regiao-card {
        padding: 20px 15px;
        border-radius: 15px;
        margin: 0 5px;
    }
    
    .regioes-carousel .regiao-icon {
        width: 70px;
        height: 70px;
        margin-bottom: 15px;
    }
    
    .regioes-carousel .regiao-icon i {
        font-size: 1.8rem;
    }
    
    .regioes-carousel .regiao-content h3 {
        font-size: 1.3rem;
        margin-bottom: 10px;
    }
    
    .regioes-carousel .regiao-content p {
        font-size: 0.9rem;
        margin-bottom: 18px;
        min-height: 50px;
    }
    
    .regioes-carousel .regiao-link {
        padding: 10px 20px;
        font-size: 0.85rem;
    }
    
    .carousel-indicators {
        margin-top: 20px;
        gap: 12px;
    }
    
    .carousel-indicators .indicator {
        width: 12px;
        height: 12px;
    }
    
    /* Melhorar a animação automática em telas pequenas */
    .carousel-track.auto-sliding {
        animation: autoSlide 18s infinite ease-in-out;
    }
}

@media (max-width: 360px) {
    /* Melhorar título em telas muito pequenas */
    .regioes-curitiba .section-header {
        margin-bottom: 30px;
        padding: 0 10px;
    }
    
    .regioes-curitiba .section-header h2 {
        font-size: 1.7rem !important;
        margin-bottom: 12px !important;
    }
    
    .regioes-curitiba .section-header p {
        font-size: 0.9rem !important;
        max-width: 260px;
        margin: 18px auto 0 auto;
    }
    
    .regioes-carousel {
        padding: 0 10px;
    }
    
    .regioes-carousel .regiao-card {
        padding: 18px 12px;
        margin: 0 3px;
    }
    
    .regioes-carousel .regiao-icon {
        width: 65px;
        height: 65px;
    }
    
    .regioes-carousel .regiao-icon i {
        font-size: 1.6rem;
    }
    
    .regioes-carousel .regiao-content h3 {
        font-size: 1.2rem;
    }
    
    .regioes-carousel .regiao-content p {
        font-size: 0.85rem;
        min-height: 45px;
    }
    
    .regioes-carousel .regiao-link {
        padding: 8px 16px;
        font-size: 0.8rem;
    }
    
    .carousel-indicators {
        gap: 10px;
    }
    
    .carousel-indicators .indicator {
        width: 10px;
        height: 10px;
    }
    
    /* Animação mais rápida para telas muito pequenas */
    .carousel-track.auto-sliding {
        animation: autoSlide 16s infinite ease-in-out;
    }
}

/* ===== EFEITOS DE ENTRADA MELHORADOS ===== */
.regioes-carousel .regiao-card {
    opacity: 0;
    transform: translateY(30px) scale(0.9);
    animation: slideInUp 0.8s cubic-bezier(0.25, 0.46, 0.45, 0.94) forwards;
}

.regioes-carousel .regiao-card:nth-child(1) { animation-delay: 0.1s; }
.regioes-carousel .regiao-card:nth-child(2) { animation-delay: 0.2s; }
.regioes-carousel .regiao-card:nth-child(3) { animation-delay: 0.3s; }
.regioes-carousel .regiao-card:nth-child(4) { animation-delay: 0.4s; }

@keyframes slideInUp {
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

/* Efeito de fade-in-up para cards individuais */
.fade-in-up {
    opacity: 0;
    transform: translateY(30px);
    animation: fadeInUp 0.6s ease forwards;
}

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

/* ===== INDICADORES ANIMADOS ===== */
.carousel-indicators .indicator {
    opacity: 0;
    transform: scale(0);
    animation: indicatorPop 0.4s ease forwards;
}

.carousel-indicators .indicator:nth-child(1) { animation-delay: 0.5s; }
.carousel-indicators .indicator:nth-child(2) { animation-delay: 0.6s; }
.carousel-indicators .indicator:nth-child(3) { animation-delay: 0.7s; }
.carousel-indicators .indicator:nth-child(4) { animation-delay: 0.8s; }

@keyframes indicatorPop {
    to {
        opacity: 1;
        transform: scale(1);
    }
}

/* ===== MELHORIAS DE PERFORMANCE ===== */
.carousel-track {
    backface-visibility: hidden;
    perspective: 1000px;
}

.regioes-carousel .regiao-card {
    backface-visibility: hidden;
    will-change: transform;
}

/* ===== ACESSIBILIDADE ===== */
@media (prefers-reduced-motion: reduce) {
    .carousel-track.auto-sliding {
        animation: none;
    }
    
    .regioes-carousel .regiao-card {
        animation: none;
        opacity: 1;
        transform: none;
    }
    
    .carousel-indicators .indicator {
        animation: none;
        opacity: 1;
        transform: none;
    }
}

/* ===== ESTADOS DE FOCO ===== */
.regioes-carousel .regiao-link:focus {
    outline: 2px solid #667eea;
    outline-offset: 2px;
}

.carousel-indicators .indicator:focus {
    outline: 2px solid #667eea;
    outline-offset: 2px;
}

/* ===== GARANTIR VISIBILIDADE NO MOBILE ===== */
@media (max-width: 768px) {
    /* Melhorar título da seção no mobile */
    .regioes-curitiba .section-header {
        text-align: center;
        margin-bottom: 40px;
        padding: 0 20px;
    }
    
    .regioes-curitiba .section-header h2 {
        font-size: 2.2rem !important;
        line-height: 1.3 !important;
        margin-bottom: 16px !important;
        font-weight: 700;
        color: #333333;
        text-align: center;
        position: relative;
        display: inline-block;
    }
    
    .regioes-curitiba .section-header h2::after {
        content: '';
        position: absolute;
        bottom: -8px;
        left: 50%;
        transform: translateX(-50%);
        width: 60px;
        height: 3px;
        background: linear-gradient(135deg, #333333, #666666);
        border-radius: 2px;
    }
    
    .regioes-curitiba .section-header p {
        font-size: 1rem !important;
        line-height: 1.5 !important;
        margin-bottom: 0 !important;
        color: #666666;
        text-align: center;
        max-width: 300px;
        margin: 24px auto 0 auto;
    }
    
    .regioes-carousel {
        display: block !important;
        visibility: visible !important;
        opacity: 1 !important;
    }
    
    .carousel-container {
        display: block !important;
        visibility: visible !important;
        opacity: 1 !important;
    }
    
    .carousel-track {
        display: flex !important;
        visibility: visible !important;
        opacity: 1 !important;
    }
    
    .carousel-track .regiao-card {
        display: block !important;
        visibility: visible !important;
        opacity: 1 !important;
    }
    
    /* Carrossel totalmente automático - sem controles de toque */
}
