/* 
 * Carousel Layout and Styling
 * This stylesheet handles both layout and aesthetics for the carousel system.
*/

/* --- Carousel System Layout --- */
.carousel-system {
    display: grid;
    grid-template-columns: auto 1fr auto;
    align-items: center;
    gap: 1.5rem; /* Increased gap for better spacing */
    position: relative;
    margin: 2rem 0; /* Add vertical margin for top/bottom spacing */
    padding: 0 1rem; /* Add horizontal padding */
}

.account-carousel {
    overflow: hidden;
    padding: 1rem 0;
    width: 100%; /* Ensure full width */
}

.carousel-track {
    display: flex;
    flex-wrap: nowrap;
    align-items: stretch;
    gap: 2rem;
    transition: transform 0.4s ease-in-out;
    cursor: grab;
    user-select: none;
    -webkit-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
    -webkit-touch-callout: none;
    -webkit-tap-highlight-color: transparent;
    padding: 0.5rem 0;
    width: 100%; /* Ensure full width */
}

.carousel-track:active {
    cursor: grabbing;
}

.carousel-slide {
    flex-shrink: 0; /* Prevent slides from shrinking */
    width: 300px;   /* Set a consistent base width */
    max-width: 300px;
}


/* --- Modern Navigation Buttons --- */
.carousel-system .carousel-nav-btn {
    width: 50px;
    align-self: center; /* Explicitly align self to center */
    border-radius: 10px;
    background: linear-gradient(145deg, rgba(45, 50, 60, 0.7), rgba(30, 34, 42, 0.8));
    backdrop-filter: blur(8px);
    color: white;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10;
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.25);
}
.carousel-system .carousel-nav-btn i {
    font-size: 3rem;
}
.carousel-system .carousel-nav-btn:hover {
    background: linear-gradient(145deg, #bbb8b89a, #3a8de8);
    transform: scale(1.05); /* Slightly less aggressive hover scale */
    border-color: #002249;
}
.carousel-system .carousel-nav-btn:disabled {
    opacity: 0.3;
    cursor: not-allowed;
    transform: scale(1); /* Reset transform */
    background: rgba(30, 34, 42, 0.7);
}

/* --- Animated Dots Navigation --- */
.carousel-dots {
    display: flex;
    justify-content: center;
    align-items: center; /* Align items for smooth animation */
    gap: 10px;
    margin-top: 25px;
    padding: 10px;
    background: rgba(0, 0, 0, 0.2); /* Container background */
    border-radius: 20px;
    width: fit-content;
    margin-left: auto;
    margin-right: auto;
}
.carousel-dots .carousel-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.4);
    border: none;
    cursor: pointer;
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275); /* Bouncy transition */
}
.carousel-dots .carousel-dot:hover {
    background: rgba(255, 255, 255, 0.8);
    transform: scale(1.2);
}
.carousel-dots .carousel-dot.active {
    background: #4a9eff;
    width: 30px; /* Animate to a pill shape */
    border-radius: 10px; /* Match the height for a perfect pill */
}

/* --- Mobile Overrides --- */
@media (max-width: 767px) {
    /* On mobile, the grid layout is less ideal. Buttons are positioned absolutely. */
    .carousel-system {
        display: block; /* Override grid layout */
        margin: 1rem 0; /* Reduce margin on mobile */
        padding: 0 0.5rem; /* Reduce padding on mobile */
    }
    .carousel-system .carousel-nav-btn {
        position: absolute;
        top: 50%;
        transform: translateY(-50%);
        width: 44px;  /* Keep a fixed size on mobile */
        height: 44px;
        border-radius: 50%; /* Revert to circle for mobile */
    }
    .carousel-system .prev { 
        left: 5px; /* Closer to the edge */
    }
    .carousel-system .next { 
        right: 5px; /* Closer to the edge */
    }

    .account-carousel {
        /* Add some padding so the absolute buttons don't overlap the cards too much */
        padding: 0 8px; 
    }
    
    .carousel-slide {
        flex: 0 0 280px; /* Smaller slides on mobile */
        max-width: 280px;
    }
    
    .carousel-track {
        gap: 1rem; /* Smaller gap on mobile */
    }
}

/* --- Tablet and Medium Screen Optimizations --- */
@media (min-width: 768px) and (max-width: 1200px) {
    .carousel-system {
        gap: 1rem; /* Slightly smaller gap on tablets */
        padding: 0 0.75rem;
    }
    
    .carousel-track {
        gap: 1.5rem; /* Medium gap on tablets */
    }
    
    .carousel-slide {
        flex: 0 0 290px; /* Slightly smaller on tablets */
        max-width: 290px;
    }
}

/* --- Large Screen Optimizations --- */
@media (min-width: 1201px) {
    .carousel-system {
        gap: 2rem; /* Larger gap on big screens */
        padding: 0 1.5rem;
    }
    
    .carousel-track {
        gap: 2.5rem; /* Larger gap on big screens */
    }
} 