/**
 * Component: Vertical Tabs
 * Architecture: BEM & Flexbox (Matched perfectly to PHP classes & Figma)
 */

/* 1. Main Section Background (Kills the brown background) */
.tama-vtabs-section {
    padding: 64px 0;
    width: 100%;
    background-color: #ffffff; 
    overflow: hidden;
}

/* 2. Container */
.tama-vtabs-container {
    width: 100%;
    max-width:1520px;
    margin: 0 auto;
    padding: 0 15px;
    display: flex;
    flex-direction: column;
    align-items: center;
    /* gap: 64px; */
}
.tama-vtabs-container .tama-vtabs-title{
	font-family: "Helvetica", sans-serif !important;
    font-weight: 400 !important;
    line-height: 1.1;
	color: #1C2D00;
	font-size: calc(52px - 20%);
}
.tama-vtabs-container .tama-vtabs-desc{
	font-size: calc(24px - 20%);
	margin-top: 1rem !important;
	margin-bottom: 2rem !important;
	text-align: center !important;
	color: #1C2D00;
}
/* 3. Flex Wrapper - THIS FIXES THE STACKING ISSUE */
.tama-vtabs-wrapper {
    display: flex;
    flex-direction: row;
    justify-content: center;
    align-items: center;
    gap: 24px; 
    width: 85%;
    min-height: 570px;
}

/* 4. CLOSED TAB CARD - Base State */
.vtab-card {
    flex: 0 0 90px; 
    height: 460px !important; 
    max-width: 90px !important;
    position: relative;
    border-radius: 24px;
    overflow: hidden;
    cursor: pointer;
    background-size: cover;
    background-position: center;
    transform: skew(-3deg); 
    transition: all 0.5s cubic-bezier(0.25, 1, 0.5, 1);
}

.vtab-backdrop {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(0deg, rgba(0,0,0,0.3), rgba(0,0,0,0.3));
    z-index: 1;
    transition: background 0.5s ease;
}

/* Un-skew Content */
.vtab-closed-cont, 
.vtab-open-cont {
    transform: skew(3deg);
    position: relative;
    z-index: 2;
}

.vtab-closed-cont {
    height: 100%;
    width: 100%;
    display: flex;
    justify-content: center;
    align-items: flex-start;
    padding-top: 40px;
}

/* Arrow is pinned to the top (same height on every tab); the title runs vertically below it
   and is cut with "..." only when it reaches the end of the tab. */
.vtab-closed-cont > div {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 24px;
    height: 100%;
    width: 100%;
    min-height: 0;
    padding-top: 34px;
    padding-bottom: 40px;
    padding-left: 13px;
    box-sizing: border-box;
}

.vtab-closed-cont h4,
.vtab-closed-title {
    font-family: 'Helvetica Neue', 'Helvetica', sans-serif;
    font-size: 22px;
    font-weight: 700;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    color: #ffffff;
    margin: 0;
}

.vtab-closed-cont h4 {
    flex: 1 1 0;
    min-height: 0;
    max-width: 100%;
    line-height: 1.2;
    writing-mode: vertical-rl;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    transition: color 0.2s ease;
}
.vtab-closed-cont h4,
.vtab-closed-cont .vtab-icon svg path{
    transition: color 0.2s ease;
}
.vtab-closed-cont:hover h4{
    color: var(--dots-color) !important;
}
.vtab-closed-cont:hover .vtab-icon svg path{
    fill: var(--dots-color);
}
.vtab-icon {
    width: 48px;
    height: 48px;
    /* background-color: #ffffff; */
    border-radius: 5px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.vtab-icon svg,
.vtab-icon img {
    width: 48px;
    height: 48px;
}

.vtab-open-cont {
    display: none;
    opacity: 0;
}

/* 5. OPEN TAB CARD STATE (.open) */
.vtab-card.open {
    flex: 3.5;
    max-width: 70% !important;
    height: 540px !important; 
    border-radius: 24px;
    overflow: hidden; 
	justify-content: flex-start !important;
}

.vtab-card.open .vtab-backdrop {
    background: linear-gradient(90.83deg, rgba(0,0,0,0.8) 0.73%, rgba(0,0,0,0) 70.12%);
}

.vtab-card.open .vtab-closed-cont {
    display: none;
}

.vtab-card.open .vtab-open-cont {
    display: block;
    opacity: 1;
    margin: 110px 0 0 110px;
    max-width: 37%;
}


.vtab-open-cont h4 {
    margin-bottom: 16px;
}

/* 6. Responsive / Mobile Fallback (1024px and below) */
@media (max-width: 1024px) {
    .tama-vtabs-wrapper {
        flex-direction: column;
        height: auto;
        min-height: auto;
        gap: 16px;
    }
    
    /* Closed Card State on Mobile */
    .vtab-card {
        width: 100% !important;
        max-width: 90% !important;
        height: 80px !important; /* Fixed height for neat horizontal bars */
        flex: none;
        transform: none; /* Kill the skew */
        border-radius: 16px;
    }

    /* Open Card State on Mobile */
    .vtab-card.open {
        height: auto !important; /* Let the content decide the height */
        min-height: 435px !important; 
		max-width: 100% !important;
    }

    /* Kill the un-skew on content */
    .vtab-closed-cont, 
    .vtab-open-cont {
        transform: none;
    }

    /* Align Closed Content Horizontally */
    .vtab-closed-cont {
        padding: 0 24px; /* Side padding instead of top padding */
        align-items: center; /* Center everything vertically */
        justify-content: flex-start; /* Align text to the left */
    }

    /* Fix the rotated title */
    .vtab-closed-cont > div {
        flex-direction: row; /* Icon on the side, title flat next to it */
        align-items: center;
        gap: 16px;
        height: auto;
        padding-top: 0;
        padding-bottom: 0;
        min-width: 0;
    }

    /* Title lies flat and is cut with "..." when the screen is too narrow */
    .vtab-closed-cont h4 {
        flex: 1 1 0;
        min-width: 0;
        writing-mode: horizontal-tb;
    }

    /* Adjust Open Content Padding for Mobile */
    .vtab-card.open .vtab-open-cont {
        padding: 40px 24px; /* Reasonable breathing room for mobile */
        max-width: 100%;
    }

    /* Scale down giant titles slightly for mobile */
    .vtab-open-cont h4.fs60 {
        font-size: 42px;
    }
}
@media (max-width: 769px) {
    .vtab-closed-cont{
        padding-left: 1.5rem !important;
    }
	.vtab-card.open .vtab-open-cont{
		padding: 40px 0px;
        margin: 90px 8% 0;
        max-width: 84%;
	}
	.tama-vtabs-container .tama-vtabs-title{
		font-size: calc(42px - 20%);
	}
	.tama-vtabs-container .tama-vtabs-desc{
		font-size: calc(20px - 20%);
	}
	.vtab-open-text .tama_button{margin: 0 auto;}
}
@media (max-width:500px) {
	.tama-vtabs-wrapper{
		width: 100%;
	}
	.vtab-closed-cont > div{
		margin: 0;
	}
	.vtab-icon {
		width: 30px;
		height: 30px;
	}
	.tama-vtabs-container .tama-vtabs-title {
        font-size: calc(34px - 20%);
    }
}