/* Tab Content Styling */
.tab-content {
    position: relative;
    z-index: 10;
}

.tab-pane {
    display: none;
    animation: fadeIn 0.3s ease-in-out;
}

.tab-pane.active {
    display: block;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Tab Navigation Styling */
.itinerary-gallery-nav {
    background: var(--white);
    border-bottom: 1px solid var(--gray-200);
    position: sticky;
    top: 72px; /* Account for main navbar height (56px) + some spacing */
    z-index: 100;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    transition: top 0.3s ease;
    /* Ensure sticky behavior works correctly */
    transform: translateZ(0);
    will-change: top;
}

/* Adjust position when main navbar is scrolled (smaller height) */
body.scrolled .itinerary-gallery-nav {
    top: 80px; /* Account for scrolled navbar height (48px) + some spacing */
}

/* Ensure the navigation appears above other content */
.itinerary-gallery-nav {
    /* This ensures it stays above gallery and other sections */
    z-index: 100;
}

.nav-tabs {
    border-bottom: none;
    justify-content: center;
    padding: 0;
    gap: 0;
}

.nav-tabs .nav-link {
    border: none;
    border-radius: 0;
    color: var(--gray-600);
    font-weight: 600;
    font-size: 1rem;
    padding: 15px 30px;
    transition: all 0.3s ease;
    position: relative;
    background: transparent;
    margin: 0;
}

.nav-tabs .nav-link:hover {
    color: var(--primary-color);
    background: var(--rgba-primary-01);
    border: none;
}

.nav-tabs .nav-link.active {
    color: var(--primary-color);
    background: var(--white);
    border-bottom: 3px solid var(--primary-color);
}

.nav-tabs .nav-link.active::after {
    content: '';
    position: absolute;
    bottom: -1px;
    left: 0;
    right: 0;
    height: 3px;
    background: var(--primary-color);
}

/* Bootstrap 5 specific overrides */
.nav-tabs .nav-link:focus {
    border: none;
    box-shadow: none;
}

.nav-tabs .nav-link:focus-visible {
    outline: 2px solid var(--primary-color);
    outline-offset: 2px;
}

/* Ensure tab content sections are properly styled */
.itinerary-section,
.gallery-section,
.inclusions-section {
    padding: 40px 0;
}

/* Responsive design for tabs */
@media (max-width: 768px) {
    .nav-tabs {
        flex-direction: column;
        gap: 0;
    }

    .nav-tabs .nav-link {
        padding: 12px 20px;
        text-align: center;
        border-bottom: 1px solid var(--gray-200);
    }

    .nav-tabs .nav-link.active {
        border-bottom: 2px solid var(--primary-color);
        border-left: 4px solid var(--primary-color);
    }
}
