.tc-container {
    position: relative;
    width: 100%;
    overflow: hidden;
    --tc-columns: 4; /* Default desktop columns */
    --tc-gap: 20px;
}

.tc-wrapper {
    display: flex;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    scroll-behavior: smooth;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none; /* Firefox */
    gap: var(--tc-gap, 20px);
    padding-bottom: 20px;
    padding-top: 10px; /* Space for box shadow */
    padding-left: 10px; /* Space for box shadow */
    padding-right: 10px; /* Space for box shadow */
    cursor: grab; /* Indicate draggable */
}

/* Equal Height Styles */
.tc-equal-height-yes .tc-wrapper {
    align-items: stretch;
}
.tc-equal-height-no .tc-wrapper {
    align-items: flex-start;
}

.tc-wrapper:active {
    cursor: grabbing;
}

.tc-wrapper.is-dragging {
    scroll-snap-type: none; /* Disable snapping while dragging */
    scroll-behavior: auto; /* Disable smooth scroll while dragging */
}

.tc-wrapper::-webkit-scrollbar {
    display: none; /* Chrome, Safari */
}

.tc-item {
    scroll-snap-align: start;
    flex-shrink: 0;
    pointer-events: none; /* Let drag events pass to wrapper */
    
    /* Calculate precise widths based on CSS variables controlled by Elementor */
    width: calc((100% - (var(--tc-gap, 20px) * (var(--tc-columns) - 1))) / var(--tc-columns));
    flex: 0 0 calc((100% - (var(--tc-gap, 20px) * (var(--tc-columns) - 1))) / var(--tc-columns));
}

/* Re-enable pointer events for interactive elements inside the item */
.tc-content > * {
    pointer-events: auto; 
}

.tc-content {
    display: flex;
    flex-direction: column;
    transition: box-shadow 0.3s ease, transform 0.3s ease;
}

/* Equal height toggles */
.tc-equal-height-yes .tc-content {
    height: 100%;
}
.tc-equal-height-no .tc-content {
    height: auto;
}

/* Inner Images Carousel */
.tc-images-carousel {
    position: relative;
    margin-bottom: 15px;
    overflow: hidden;
    pointer-events: auto; /* Ensure inner carousel remains interactive */
}

.tc-images-wrapper {
    display: flex;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    scroll-behavior: smooth;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
}

.tc-images-wrapper::-webkit-scrollbar {
    display: none;
}

.tc-image-slide {
    flex: 0 0 100%;
    scroll-snap-align: start;
}

.tc-image img {
    width: 100%;
    display: block;
    object-fit: cover;
}

.tc-caption {
    font-size: 0.9em;
    color: #555;
    margin-top: 8px;
    font-style: italic;
    min-height: 1.2em; /* Ensure space even when empty */
}

.tc-inner-arrow {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(255, 255, 255, 0.8);
    border: none;
    border-radius: 50%;
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    z-index: 5;
    box-shadow: 0 1px 3px rgba(0,0,0,0.2);
    padding: 0;
}

.tc-inner-arrow svg {
    fill: #333;
}

.tc-inner-arrow:hover {
    background: #fff;
}

.tc-inner-prev {
    left: 5px;
}

.tc-inner-next {
    right: 5px;
}

/* Content Elements */
.tc-year-label {
    font-size: 1em;
    color: #666;
    margin-bottom: 5px;
}

.tc-year {
    font-size: 2em;
    font-weight: bold;
    margin-top: 5px;
    margin-bottom: 5px;
    min-height: 1.2em; /* Ensure space even when empty */
}

.tc-title {
    font-size: 1.2em;
    font-weight: 600;
    margin-bottom: 10px;
}

.tc-description {
    font-size: 1em;
    line-height: 1.6;
    color: #666;
}

/* Main Navigation Arrows */
.tc-arrow {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(255, 255, 255, 0.8);
    border: 1px solid #ddd;
    border-radius: 50%;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    z-index: 10;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
    color: #333;
    padding: 0;
}

.tc-arrow svg {
    fill: currentColor;
}

.tc-arrow:hover {
    background: #fff;
    box-shadow: 0 4px 8px rgba(0,0,0,0.15);
}

.tc-prev {
    left: 10px;
}

.tc-next {
    right: 10px;
}

/* Pagination Dots */
.tc-pagination {
    display: flex;
    justify-content: center;
    gap: 8px;
    margin-top: 15px;
}

.tc-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background-color: #ddd;
    border: none;
    cursor: pointer;
    padding: 0;
    transition: background-color 0.3s ease;
}

.tc-dot.active {
    background-color: #333;
}
