/**
 * TreeDeck - Swiper Custom Styles
 * Contains all custom styling for the Swiper carousel implementation
 */

/* Z-index hierarchy for Swiper elements */
.tree-card-swiper {
    z-index: 10 !important; /* Swiper container */
}

.tree-card-swiper .swiper-button-prev,
.tree-card-swiper .swiper-button-next,
#prevButton, #nextButton {
    z-index: 20 !important; /* Navigation buttons */
}

/* Card deck effect to make it feel like a stack of cards */
.swiper-slide:nth-child(2n) .tree-card {
    transform: rotate(1deg);
}

.swiper-slide:nth-child(3n) .tree-card {
    transform: rotate(-1deg) translateY(2px);
}

.swiper-slide:nth-child(4n) .tree-card {
    transform: translateY(-2px);
}

.swiper-slide:nth-child(2n) .tree-card:hover,
.swiper-slide:nth-child(3n) .tree-card:hover,
.swiper-slide:nth-child(4n) .tree-card:hover {
    transform: rotate(0) translateY(-5px);
}

/* Swiper Navigation Arrows - Make them more visible and kid-friendly */
.swiper-button-next,
.swiper-button-prev,
#nextButton,
#prevButton {
    background-color: rgba(62, 153, 71, 0.9);
    color: white !important;
    width: 50px !important;
    height: 50px !important;
    border-radius: 50%;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    top: 20% !important;
    z-index: 20 !important;
    cursor: pointer;
}

.swiper-button-next, #nextButton {
    right: 1px !important;
}

.swiper-button-prev, #prevButton {
    left: 1px !important;
}

/* Responsive positioning for navigation buttons */
@media (min-width: 640px) {
    .swiper-button-next, #nextButton {
        right: 4px !important;
    }
    
    .swiper-button-prev, #prevButton {
        left: 4px !important;
    }
}

@media (min-width: 768px) {
    .swiper-button-next, #nextButton {
        right: 10px !important;
    }
    
    .swiper-button-prev, #prevButton {
        left: 10px !important;
    }
}

/* Swiper button icon styling */
.swiper-button-next:after,
.swiper-button-prev:after {
    font-size: 20px !important;
    font-weight: bold;
}

/* Swiper pagination styling */
.swiper-pagination {
    position: absolute;
    bottom: 10px;
}

.swiper-pagination-bullet {
    width: 10px;
    height: 10px;
    background-color: rgba(62, 153, 71, 0.5);
    opacity: 0.7;
    margin: 0 4px;
}

.swiper-pagination-bullet-active {
    background-color: rgba(62, 153, 71, 1);
    opacity: 1;
    width: 12px;
    height: 12px;
}

/* Mobile specific styling for pagination */
@media (max-width: 640px) {
    .swiper-pagination {
        position: relative;
        bottom: 0;
        margin-top: 15px;
    }
    
    .swiper-pagination-bullet {
        width: 12px;
        height: 12px;
        margin: 0 6px;
    }
    
    .swiper-pagination-bullet-active {
        width: 14px;
        height: 14px;
    }
}

/* Specific styles for map page pagination */
.map-page .swiper-pagination {
    margin-bottom: 15px;
}

/* Enhanced mobile pagination bullets for better visibility */
.map-page .swiper-pagination-bullet {
    width: 12px;
    height: 12px;
    background-color: rgba(62, 153, 71, 0.7);
}

.map-page .swiper-pagination-bullet-active {
    width: 14px;
    height: 14px;
    background-color: #3e9947;
    border: 1px solid white;
}

/* Mobile pagination button styling */
.mobile-pagination-link {
    transition: all 0.3s ease;
}

.mobile-pagination-link:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.2);
}

.mobile-pagination-link:active {
    transform: translateY(0);
}

/* Fade-out animation for pagination transitions */
@keyframes swiper-fade-out {
    from { opacity: 1; transform: translateY(0); }
    to { opacity: 0; transform: translateY(-10px); }
}

.swiper-fade-out {
    animation: swiper-fade-out 0.3s ease-out forwards;
}