/* Tabs V2 Widget Styles */

.ercw-tabs-v2 {
    width: 100%;
}

/* Center the navigation */
.ercw-tabs-v2-nav-wrapper {
    display: flex;
    justify-content: center;
    margin-bottom: 30px;
}

/* Tab Navigation */
.ercw-tabs-v2-nav {
    display: inline-flex;
    flex-wrap: nowrap;
    align-items: stretch;
    gap: 0;
    padding: 0!important;
    background-color: #f5f1e8;
    border-radius: 50px;
    border: none;
    overflow: hidden;
}

/* Tab Buttons */
.ercw-tabs-v2-tab {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 20px 30px!important;
    border: none;
    border-radius: 0;
    background-color: transparent;
    color: #1a3a4a;
    font-size: 15px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    white-space: nowrap;
    border: 0!important;
    border-radius: 0!important;
}

/* Single tab - fully rounded */
.ercw-tabs-v2-tab:only-child {
    border-radius: 50px;
}

.ercw-tabs-v2-tab:hover:not(.active) {
    background-color: #f0e6d3;
}

.ercw-tabs-v2-tab.active {
    background-color: #050A28;
    color: #ffffff;
}

.ercw-tabs-v2-tab:focus {
    outline: 2px solid #050A28;
    outline-offset: 2px;
}

.ercw-tabs-v2-tab:focus:not(:focus-visible) {
    outline: none;
}

/* Tab Content */
.ercw-tabs-v2-content {
    padding: 40px 0;
}

/* Tab Panels */
.ercw-tabs-v2-panel {
    display: none;
    animation: ercwFadeIn 0.3s ease;
}

.ercw-tabs-v2-panel.active {
    display: block;
}

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

/* Panel Inner Layout */
.ercw-tabs-v2-panel-inner {
    display: flex;
    align-items: center;
    gap: 40px;
}

.ercw-tabs-v2-panel-inner.image-right {
    flex-direction: row-reverse;
}

/* Image Container */
.ercw-tabs-v2-image {
    flex: 0 0 55%;
    max-width: 55%;
}

.ercw-tabs-v2-image img {
    width: 100%;
    height: auto;
    display: block;
    border-radius: 8px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.1);
}

/* Text Container */
.ercw-tabs-v2-text {
    flex: 1;
    min-width: 0;
}

.ercw-tabs-v2-title {
    font-size: 32px;
    font-weight: 600;
    color: #1a3a4a;
    margin: 0 0 20px 0;
    line-height: 1.3;
}

.ercw-tabs-v2-description {
    font-size: 16px;
    line-height: 1.7;
    color: #5a6a7a;
}

.ercw-tabs-v2-description p {
    margin: 0 0 15px 0;
}

.ercw-tabs-v2-description p:last-child {
    margin-bottom: 0;
}

/* List with Icons */
.ercw-tabs-v2-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.ercw-tabs-v2-list-item {
    display: flex;
    align-items: flex-start;
    gap: 15px;
    margin-bottom: 10px!important;
    font-size: 16px;
    line-height: 1.6;
    color: #5a6a7a;
}

.ercw-tabs-v2-list-item:last-child {
    margin-bottom: 0;
}

.ercw-tabs-v2-list-icon {
    flex-shrink: 0;
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-top: 2px;
}

.ercw-tabs-v2-list-icon svg {
    width: 100%;
    height: 100%;
}

.ercw-tabs-v2-list-text {
    flex: 1;
}

/* Image Only (Centered) */
.ercw-tabs-v2-panel-inner.image-only {
    justify-content: center;
}

.ercw-tabs-v2-panel-inner.image-only .ercw-tabs-v2-image {
    flex: 0 1 auto;
    max-width: 100%;
    margin: 0 auto;
}

/* Responsive Styles */
@media (max-width: 1024px) {
    .ercw-tabs-v2-tab {
        padding: 10px 18px;
        font-size: 14px;
    }

    .ercw-tabs-v2-panel-inner {
        gap: 30px;
    }

    .ercw-tabs-v2-title {
        font-size: 26px;
    }
}

@media (max-width: 768px) {
    .ercw-tabs-v2-nav-wrapper {
        margin-bottom: 20px;
    }

    .ercw-tabs-v2-nav {
        flex-wrap: wrap;
        border-radius: 30px;
    }

    .ercw-tabs-v2-tab {
        padding: 10px 16px;
        font-size: 13px;
    }

    .ercw-tabs-v2-tab:first-child {
        border-radius: 30px 0 0 30px;
    }

    .ercw-tabs-v2-tab:last-child {
        border-radius: 0 30px 30px 0;
    }

    .ercw-tabs-v2-panel-inner {
        flex-direction: column !important;
        gap: 25px;
    }

    .ercw-tabs-v2-image {
        flex: 0 0 100%;
        max-width: 100%;
    }

    .ercw-tabs-v2-title {
        font-size: 24px;
    }

    .ercw-tabs-v2-description {
        font-size: 15px;
    }
}

@media (max-width: 480px) {
    .ercw-tabs-v2-nav {
        flex-direction: column;
        border-radius: 16px;
        width: 100%;
    }

    .ercw-tabs-v2-tab {
        width: 100%;
        justify-content: center;
        border-radius: 0 !important;
    }

    .ercw-tabs-v2-tab:first-child {
        border-radius: 16px 16px 0 0 !important;
    }

    .ercw-tabs-v2-tab:last-child {
        border-radius: 0 0 16px 16px !important;
    }

    .ercw-tabs-v2-tab:only-child {
        border-radius: 16px !important;
    }

    .ercw-tabs-v2-title {
        font-size: 22px;
    }

    .ercw-tabs-v2-content {
        padding: 25px 0;
    }
}

.ercw-tabs-v2-panel-inner.image-only {
	justify-content: center;
}