/* tabs.css */

.tab-section-container {
    position: relative;
    margin-bottom: 2rem;
}

.skills-tab-buttons-wrapper,
.exp-tab-buttons-wrapper {
    display: flex;
    overflow-x: auto; /* Enable horizontal scrolling */
    -webkit-overflow-scrolling: touch; /* Smooth scrolling on iOS */
    scrollbar-width: none; /* Hide scrollbar for Firefox */
    -ms-overflow-style: none;  /* Hide scrollbar for IE and Edge */
    margin-bottom: 1.5rem;
    border-bottom: 2px solid #e2e8f0; /* Tailwind gray-200 */
    padding-bottom: 0.5rem;
    white-space: nowrap; /* Prevent buttons from wrapping */
    scroll-snap-type: x mandatory; /* Snap to buttons */
}

/* Hide scrollbar for Chrome, Safari, Opera */
.skills-tab-buttons-wrapper::-webkit-scrollbar,
.exp-tab-buttons-wrapper::-webkit-scrollbar {
    display: none;
}

.skill-tab-button,
.exp-tab-button {
    flex: 0 0 auto; /* Prevent shrinking */
    padding: 0.75rem 1.25rem;
    border-radius: 0.5rem; /* rounded-lg */
    font-weight: 500; /* font-medium */
    color: #4a5568; /* Tailwind gray-700 */
    background-color: #edf2f7; /* Tailwind gray-100 */
    transition: all 0.3s ease;
    margin-right: 0.75rem; /* space-x-3 */
    cursor: pointer;
    border: none;
    scroll-snap-align: start; /* Snap point for scrolling */
}

.skill-tab-button:hover,
.exp-tab-button:hover {
    background-color: #e2e8f0; /* Tailwind gray-200 */
    color: #2d3748; /* Tailwind gray-800 */
}

.skill-tab-button.active,
.exp-tab-button.active {
    background-color: #3b82f6; /* Tailwind blue-500 */
    color: #ffffff;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

#skillsContentDisplay,
#expContentDisplay {
    min-height: 200px; /* Ensure content area has a minimum height */
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: flex-start;
    padding: 2rem;
    border-radius: 0.75rem;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

#skillsContentDisplay h3,
#expContentDisplay h3 {
    margin-bottom: 1rem;
}

#skillsContentDisplay ul,
#expContentDisplay ul {
    margin-left: 1.25rem; /* For list-disc or list-inside */
}

/* Navigation buttons for tabs */
.content-nav-button {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background-color: rgba(255, 255, 255, 0.8);
    border: 1px solid #cbd5e0; /* Tailwind gray-300 */
    border-radius: 50%;
    padding: 0.5rem;
    cursor: pointer;
    z-index: 10;
    box-shadow: 0 2px 5px rgba(0,0,0,0.2);
    transition: all 0.2s ease;
    width: 40px; /* Fixed width for circular button */
    height: 40px; /* Fixed height for circular button */
    display: flex;
    align-items: center;
    justify-content: center;
}

.content-nav-button:hover:not(:disabled) {
    background-color: #e2e8f0;
}

.content-nav-button.left {
    left: -20px; /* Adjust as needed to position outside the tab container */
}

.content-nav-button.right {
    right: -20px; /* Adjust as needed */
}

.content-nav-button svg {
    width: 24px;
    height: 24px;
    color: #4a5568;
}

.content-nav-button:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

/* Accordion styles (for nested content within tabs) */
.accordion-header {
    background-color: #f0f4f8; /* Light blue-gray */
    padding: 1rem 1.5rem;
    border-radius: 0.5rem;
    margin-top: 1rem;
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-weight: 600;
    color: #2d3748;
    transition: background-color 0.3s ease;
}

.accordion-header:hover {
    background-color: #e2e8f0;
}

.accordion-header.active {
    background-color: #3b82f6;
    color: white;
}

.accordion-header svg {
    transition: transform 0.3s ease;
}

.accordion-header.active svg {
    transform: rotate(90deg);
}

.accordion-content {
    background-color: #ffffff;
    border: 1px solid #e2e8f0;
    border-top: none;
    border-radius: 0 0 0.5rem 0.5rem;
    padding: 0 1.5rem;
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease-out, padding 0.3s ease-out;
    display: none; /* Hidden by default */
}

.accordion-content ul {
    padding-left: 1.25rem;
    margin-top: 0.5rem;
    margin-bottom: 0.5rem;
}

/* Image gallery within tab content */
.image-gallery {
    display: flex;
    flex-direction: column;
    align-items: center;
    margin-top: 1rem;
    margin-bottom: 1rem;
    border: 1px solid #e2e8f0;
    border-radius: 0.5rem;
    padding: 1rem;
    background-color: #f9fafb;
}

.image-gallery .main-image-display {
    width: 100%;
    max-width: 400px; /* Limit max width of main image */
    height: 250px; /* Fixed height for consistency */
    display: flex;
    justify-content: center;
    align-items: center;
    overflow: hidden;
    margin-bottom: 1rem;
    background-color: #e0f2fe; /* Light blue placeholder */
    border-radius: 0.5rem;
    position: relative;
}

.image-gallery .main-image {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
    border-radius: 0.5rem;
    cursor: pointer;
    transition: opacity 0.3s ease;
}

.image-gallery .main-image.hidden {
    opacity: 0;
}

.image-gallery .loading-spinner {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    margin: 0; /* Override default margin */
}

.image-gallery .thumbnail-strip {
    display: flex;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    -ms-overflow-style: none;
    padding: 0.5rem 0;
    width: 100%;
    justify-content: center; /* Center thumbnails if they don't fill width */
}

.image-gallery .thumbnail-strip::-webkit-scrollbar {
    display:flex;
}

/* Standard properties (for Firefox, newer Chrome/Edge/Opera) */
@supports (scrollbar-color: auto) {
    .image-gallery .thumbnail-strip {
        scrollbar-width: thin;
        scrollbar-color: #888 #f1f1f1;
    }
}

/* WebKit/Blink specific (for Chrome, Safari, Opera) */
.image-gallery .thumbnail-strip::-webkit-scrollbar {
    width: 10px;
    height: 10px;
}
.image-gallery .thumbnail-strip::-webkit-scrollbar-track {
    background: #f1f1f1;
}
.image-gallery .thumbnail-strip::-webkit-scrollbar-thumb {
    background: #888;
}
.image-gallery .thumbnail-stripr::-webkit-scrollbar-thumb:hover {
    background: #555;
}

.image-gallery .thumbnail {
    width: 80px;
    height: 60px;
    object-fit: cover;
    border-radius: 0.375rem; /* rounded-md */
    cursor: pointer;
    margin: 0 0.5rem;
    border: 2px solid transparent;
    transition: border-color 0.2s ease, transform 0.2s ease;
}

.image-gallery .thumbnail:hover {
    transform: scale(1.05);
}

.image-gallery .thumbnail.active-thumb {
    border-color: #3b82f6; /* Tailwind blue-500 */
    box-shadow: 0 0 0 2px rgba(59, 130, 246, 0.5);
}

/* Certificate image container for single images */
.certificate-image-container {
    width: 100%;
    max-width: 300px; /* Max width for single certificate image */
    height: 200px; /* Fixed height for consistency */
    display: flex;
    justify-content: center;
    align-items: center;
    overflow: hidden;
    position: relative;
    margin-bottom: 1rem;
    background-color: #e0f2fe; /* Light blue placeholder */
    border-radius: 0.5rem;
}

.certificate-image-container .certificate-image {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
    border-radius: 0.5rem;
    cursor: pointer;
    transition: opacity 0.3s ease;
}

.certificate-image-container .certificate-image.hidden {
    opacity: 0;
}

.certificate-image-container .loading-spinner {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    margin: 0;
}
