/* Main container */
.trinchan-horizontal-accordion {
    display: flex;
    width: 100%;
    height: 600px; /* Default height, can be overwritten via Elementor controls later */
    overflow: hidden;
    font-family: 'DM Sans', sans-serif; /* Example font, should inherit */
}

/* Individual Accordion Item */
.trinchan-accordion-item {
    position: relative;
    flex: 1;
    border-right: 1px solid #ddd;
    transition: flex 0.5s ease-in-out;
    background-color: #fff;
    cursor: pointer;
    overflow: hidden;
}

.trinchan-accordion-item:last-child {
    border-right: none;
}

/* Hover State - Expansion */
.trinchan-accordion-item:hover {
    flex: 5; /* Expands to take more space */
}

/* Collapsed Content (Vertical Text) */
.trinchan-item-collapsed {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: space-between;
    padding: 20px 0;
    transition: opacity 0.3s ease;
    opacity: 1;
    z-index: 2;
}

.trinchan-accordion-item:hover .trinchan-item-collapsed {
    opacity: 0;
    pointer-events: none;
    z-index: 1;
}

.trinchan-item-title-vertical {
    writing-mode: vertical-rl;
    transform: rotate(180deg);
    text-transform: uppercase;
    letter-spacing: 1px;
    font-family: "Cormorant Garamond", serif;
    font-size: 25px;
    text-wrap:balance;
    font-weight: 400;
    margin: 0;
    color: #121212;
}

.trinchan-item-icon {
    font-size: 24px;
    color: #666;
    margin-top: 20px; /* Space between title and + */
}

/* Expanded Content */
.trinchan-item-expanded {
    display: flex;
    height: 100%;
    width: 100%;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.5s ease 0.1s; /* Slight delay to smooth appearance */
    position: absolute;
    top: 0;
    left: 0;
    background: #fff;
    z-index: 1;
}

.trinchan-accordion-item:hover .trinchan-item-expanded {
    opacity: 1;
    pointer-events: auto;
    z-index: 3;
}

/* Expanded Content Layout: Image + Text */
.trinchan-item-image {
    flex: 1;
    background-size: cover;
    background-position: center;
    height: 100%;
    min-width: 200px;
}

.trinchan-item-content {
    flex: 1.5;
    padding: 40px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    position: relative;
}

.trinchan-item-title-horizontal {
    text-transform: uppercase;
	 font-family: "Cormorant Garamond", serif;
    font-size: 25px;
    margin-bottom: 20px;
    color: #121212;
    letter-spacing: 1px;
    font-weight: 400;
}

.trinchan-item-desc {
    font-size: 14px;
    line-height: 1.6;
    color: #666;
    margin-bottom: 30px;
}

.trinchan-item-btn {
	 font-family: "Montserrat", serif;
    display: inline-block;
	 font-weight: 300;
    text-decoration: underline !important;
    color: #121212;
    transition: all 0.3s;
    font-size: 14px;

}

.trinchan-item-btn:hover {
    color: #000;
    font-weight: regular;
}

.trinchan-item-expanded-icon {
    position: absolute;
    top: 20px;
    right: 20px;
    font-size: 24px;
    color: #666;
}

/* Mobile Responsive */
@media (max-width: 768px) {
    .trinchan-horizontal-accordion {
        flex-direction: column;
        height: auto;
    }
    
    .trinchan-accordion-item {
        height: 60px; /* Collapsed height */
        border-bottom: 1px solid #ddd;
        border-right: none;
        width: 100%;
        transition: height 0.5s ease;
    }
    
    .trinchan-accordion-item:hover {
        height: 400px; /* Expanded height */
        flex: none; /* Disable flex growth on column */
    }

    .trinchan-item-collapsed {
        flex-direction: row; /* Horizontal text on mobile collapsed */
        padding: 0 20px;
        justify-content: space-between;
    }

    .trinchan-item-title-vertical {
        writing-mode: horizontal-tb;
        transform: none;
    }

    .trinchan-item-expanded {
        flex-direction: column;
    }

    .trinchan-item-image {
        min-height: 150px;
        flex: none;
    }
    
    .trinchan-item-content {
        padding: 20px;
    }
}
