/* Estilos para a página de Passeios 4x4 */

/* Estilos para o menu suspenso */
.group {
    position: relative;
    display: inline-block;
    padding-bottom: 10px; /* Espaço extra abaixo do botão para facilitar o acesso ao submenu */
}

/* Adiciona uma área invisível abaixo do botão para facilitar o acesso ao submenu */
.group::after {
    content: '';
    position: absolute;
    bottom: -10px;
    left: 0;
    width: 100%;
    height: 20px;
    background: transparent;
}

/* Garante que o submenu fique por cima de outros elementos */
.z-50 {
    z-index: 50;
}

/* Estilo para o submenu */
.absolute {
    position: absolute;
    display: none; /* Esconde por padrão */
    top: 100%; /* Posiciona o submenu logo abaixo do botão */
    left: 0;
    margin-top: 10px; /* Espaço entre o botão e o submenu */
    z-index: 1000;
    opacity: 0;
    transform: translateY(10px);
    transition: opacity 0.3s ease, transform 0.3s ease, display 0.3s ease;
    min-width: 200px;
    background-color: white;
    border-radius: 0.375rem;
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
}

/* Mostra o submenu ao passar o mouse */
.group:hover .absolute,
.group:focus-within .absolute {
    display: block;
    opacity: 1;
    transform: translateY(0);
}

/* Estilo para os itens do submenu */
.absolute a {
    display: block;
    padding: 0.75rem 1.25rem;
    color: #1f2937; /* text-gray-800 */
    text-decoration: none;
    transition: all 0.2s ease;
    border-bottom: 1px solid #f3f4f6;
}

.absolute a:last-child {
    border-bottom: none;
}

.absolute a:hover {
    background-color: #f9fafb; /* hover:bg-gray-50 */
    color: #166534; /* Cor primária ao passar o mouse */
    padding-left: 1.5rem;
}

/* Estilos para o menu mobile */
#mobile-menu {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease-in-out;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background-color: #1a1a1a;
    z-index: 1000;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
}

#mobile-menu:not(.hidden) {
    max-height: 500px;
}

/* Estilos para o item de menu mobile */
.mobile-menu-item {
    position: relative;
}

.mobile-menu-item > a {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.75rem 1.25rem;
    color: white;
    text-decoration: none;
}

/* Estilos para o submenu no mobile */
#mobile-exp-submenu {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease-in-out;
    background-color: rgba(0, 0, 0, 0.2);
    margin-left: 1rem;
    border-left: 2px solid #4ade80;
    padding-left: 0.5rem;
}

#mobile-exp-submenu.show {
    max-height: 500px; /* Ajuste conforme necessário */
}

/* Estilo para a seta do submenu */
#mobile-exp-arrow {
    transition: transform 0.3s ease;
}

.mobile-menu-item.active #mobile-exp-arrow {
    transform: rotate(180deg);
}

/* Melhorias de acessibilidade */
#mobile-exp-toggle:focus {
    outline: 2px solid #4ade80;
    outline-offset: 2px;
}

/* Garante que os links do submenu tenham contraste suficiente */
#mobile-exp-submenu a {
    color: #e5e7eb;
    transition: all 0.2s ease;
}

#mobile-exp-submenu a:hover {
    color: #4ade80;
    padding-left: 0.5rem;
}

#mobile-menu .mobile-menu-item .transform {
    transition: transform 0.3s ease;
}

#mobile-menu .mobile-menu-item.active .transform {
    transform: rotate(180deg);
}

#mobile-exp-submenu {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease-in-out;
    background-color: rgba(0, 0, 0, 0.1);
    border-radius: 0.375rem;
    margin: 0.25rem 0.5rem 0.5rem 0.5rem;
}

#mobile-exp-submenu.show {
    max-height: 500px; /* Ajuste conforme necessário */
}

#mobile-exp-submenu a {
    display: block;
    padding: 0.5rem 1rem 0.5rem 2rem;
    color: #e5e7eb; /* text-gray-300 */
    text-decoration: none;
    transition: all 0.2s ease;
}

#mobile-exp-submenu a:hover {
    color: #34d399; /* text-green-300 */
    padding-left: 2.25rem;
}

@media (min-width: 768px) {
    #mobile-menu {
        display: none !important;
    }
}

/* Estilos para o carrossel */
.carousel {
    position: relative;
    width: 100%;
    max-width: 800px;
    height: 500px; /* Altura fixa para o carrossel */
    margin: 0 auto 2rem;
    overflow: hidden;
    border-radius: 0.5rem;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

.carousel-inner {
    position: relative;
    width: 100%;
    height: 100%;
    overflow: hidden;
}

.carousel-item {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: none;
    align-items: center;
    justify-content: center;
    background: #f8f8f8;
}

.carousel-item.active {
    display: flex;
}

.carousel-item {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #f8f8f8;
}

.carousel-item img {
    max-width: 100%;
    max-height: 100%;
    width: auto;
    height: auto;
    object-fit: contain;
    object-position: center 55%; /* Mais para baixo globalmente */
    display: block;
    margin-top: -5%; /* Move a imagem um pouco para cima */
}

.carousel-control {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(0, 0, 0, 0.5);
    color: white;
    border: none;
    font-size: 1.5rem;
    cursor: pointer;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10;
}

.carousel-control.prev {
    left: 15px;
}

.carousel-control.next {
    right: 15px;
}

.carousel-indicators {
    position: absolute;
    bottom: 20px;
    left: 0;
    right: 0;
    display: flex;
    justify-content: center;
    gap: 10px;
    z-index: 10;
}

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

.carousel-indicators .indicator.active {
    background: white;
}

/* Estilos para o contêiner da imagem no card */
.bg-white.rounded-xl.shadow-md.overflow-hidden .relative.h-64 {
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    overflow: hidden !important;
    height: 22rem !important;
}

.bg-white.rounded-xl.shadow-md.overflow-hidden .relative.h-64 img {
    width: 100% !important;
    height: 100% !important;
    object-fit: cover !important;
    object-position: center !important;
    position: relative !important;
    top: 0 !important;
    left: 0 !important;
    transform: none !important;
}

/* Ajuste do enquadramento do card: UTV - Classico */
.utv-card-img {
    object-position: center 30% !important; /* foco levemente acima */
}

/* Ajuste do enquadramento do card: Quadriciclo (um pouco mais para baixo) */
.quadriciclo-card-img {
    object-position: center 65% !important;
}

/* Variáveis de Cores */
:root {
    --primary-color: #2C5F2D; /* Verde escuro */
    --secondary-color: #97BC62; /* Verde claro */
    --accent-color: #E6E6E6; /* Cinza claro */
    --dark-color: #1E3F20; /* Verde mais escuro para hover */
    --light-color: #F8F8F8; /* Fundo claro */
}

/* Reset e Estilos Globais */
* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

/* Botão Primário */
.btn-primary {
    background-color: #2C5F2D;
    color: white;
    transition: all 0.3s ease;
    display: inline-block;
    text-align: center;
    text-decoration: none;
    border: none;
    cursor: pointer;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    padding: 0.8rem 2.5rem;
    font-weight: 600;
    font-size: 1.125rem;
    line-height: 1.75rem;
    border-radius: 9999px;
}

.btn-primary:hover {
    background-color: #1E3F20;
    transform: translateY(-2px);
    box-shadow: 0 6px 12px rgba(0, 0, 0, 0.15);
}


/* Cards de Trilhas */
.trilha-card {
    transition: all 0.3s ease;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

.trilha-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.15);
}

.trilha-card img {
    transition: transform 0.5s ease;
    position: relative;
    z-index: 1;
    background: none !important;
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.trilha-card:hover img {
    transform: scale(1.05);
}

/* Modal */
.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.8);
    overflow-y: auto;
    padding: 40px 20px;
}

.modal-content {
    background-color: #fff;
    margin: 0 auto;
    padding: 30px;
    border-radius: 10px;
    max-width: 1000px;
    position: relative;
    animation: modalFadeIn 0.3s;
}

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

.close-modal {
    position: absolute;
    right: 25px;
    top: 15px;
    font-size: 28px;
    font-weight: bold;
    color: #666;
    cursor: pointer;
    transition: color 0.3s;
}

.close-modal:hover {
    color: #333;
}

/* Carousel */
.carousel {
    position: relative;
    width: 100%;
    height: 400px;
    margin-bottom: 30px;
    border-radius: 10px;
    overflow: hidden;
}

.carousel-inner {
    position: relative;
    height: 32rem; /* 512px */
    overflow: hidden;
    background: none !important;
    margin-bottom: 1.5rem;
}

.carousel-item {
    position: absolute;
    width: 100%;
    height: 100%;
    opacity: 0;
    transition: opacity 0.5s ease-in-out;
    display: flex;
    align-items: center;
    justify-content: center;
}

.carousel-item.active {
    opacity: 1;
}

.carousel-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center 55%;
}

/* Ajuste específico: 2ª imagem do carrossel do modal UTV - Classico */
#modal-utv .carousel-inner .carousel-item:nth-child(2) img {
    object-fit: contain;
    object-position: center 55%;
    background-color: #000; /* letterbox discreto para áreas vazias */
}

/* Ajustes adicionais: 3ª, 5ª e 6ª imagens do carrossel do modal UTV - Classico mais para baixo */
#modal-utv .carousel-inner .carousel-item:nth-child(3) img,
#modal-utv .carousel-inner .carousel-item:nth-child(5) img,
#modal-utv .carousel-inner .carousel-item:nth-child(6) img {
    object-position: center 65%;
}

/* Quadriciclo: afastar a 2ª foto do carrossel para dar respiro */
#modal-quadriciclo .carousel-inner .carousel-item:nth-child(2) img {
    object-fit: contain !important;
    background-color: #000;
    /* reduzir levemente o tamanho visual */
    width: auto !important;
    height: auto !important;
    max-width: 100%;
    max-height: 90%;
    display: block;
    margin: 0 auto;
    transform: scale(0.94);
    transition: transform 0.3s ease;
}

/* Ajuste específico para a imagem cavalgada03.jpg */
.carousel-item img[src*="cavalgada03.jpg"] {
    object-position: center 48%;
}

.carousel-control {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background-color: rgba(0, 0, 0, 0.5);
    color: white;
    border: none;
    padding: 15px 10px;
    cursor: pointer;
    font-size: 18px;
    z-index: 10;
    transition: background-color 0.3s;
}

.carousel-control:hover {
    background-color: rgba(0, 0, 0, 0.8);
}

.carousel-control.prev {
    left: 0;
    border-top-right-radius: 5px;
    border-bottom-right-radius: 5px;
}

.carousel-control.next {
    right: 0;
    border-top-left-radius: 5px;
    border-bottom-left-radius: 5px;
}

.carousel-indicators {
    position: absolute;
    bottom: 15px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 8px;
    z-index: 10;
}

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

.indicator.active {
    background-color: #fff;
    transform: scale(1.2);
}

/* Responsividade */
@media (max-width: 768px) {
    .hero-trilhas {
        padding: 150px 0 80px;
    }
    
    .carousel {
        height: 300px;
    }
    
    .modal-content {
        padding: 20px 15px;
    }
}

/* Animações */
@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

.fade-in {
    animation: fadeIn 0.5s ease-in-out;
}

/* Botão de Reserva */
.btn-reserva {
    background: linear-gradient(135deg, #10b981 0%, #059669 100%);
    color: white;
    font-weight: 600;
    padding: 12px 30px;
    border-radius: 50px;
    text-transform: uppercase;
    letter-spacing: 1px;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(16, 185, 129, 0.3);
    border: none;
    cursor: pointer;
    display: inline-block;
    text-align: center;
}

.btn-reserva:hover {
    transform: translateY(-3px);
    box-shadow: 0 6px 20px rgba(16, 185, 129, 0.4);
    background: linear-gradient(135deg, #059669 0%, #047857 100%);
}

/* Destaques */
.destaque-item {
    display: flex;
    align-items: flex-start;
    margin-bottom: 15px;
}

.destaque-item i {
    color: #10b981;
    margin-right: 10px;
    margin-top: 3px;
}

/* Seção de Informações */
.info-box {
    background-color: #f9fafb;
    border-left: 4px solid #10b981;
    padding: 20px;
    border-radius: 0 8px 8px 0;
    margin: 20px 0;
}

/* Lista de Itens Inclusos */
.lista-inclusos {
    list-style: none;
    padding: 0;
}

.lista-inclusos li {
    padding: 8px 0;
    padding-left: 30px;
    position: relative;
    color: #4b5563;
}

.lista-inclusos li:before {
    content: '✓';
    color: #10b981;
    position: absolute;
    left: 0;
    font-weight: bold;
}

/* Galeria de Fotos */
.galeria-trilha {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 15px;
    margin: 30px 0;
}

.galeria-item {
    border-radius: 8px;
    overflow: hidden;
    height: 180px;
    cursor: pointer;
    transition: transform 0.3s ease;
}

.galeria-item:hover {
    transform: scale(1.03);
}

.galeria-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}
