/* Curved Tabs Elementor Widget Styles */
.curved-tabs-widget {
    width: 100%;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Arial, sans-serif;
    padding: 20px;
    border-radius: 20px;
}

/* Curved Tabs Override for Existing Elementor Tabs */
.curved-tabs-elementor-override {
    padding: 0px !important;
    border-radius: 20px !important;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Arial, sans-serif !important;
    position: relative !important;
    overflow: visible !important;
}

.curved-tabs-elementor-override .e-n-tabs {
    position: relative;
    display:initial !Important;
    max-width: 1200px;
    margin: 0 auto;
}

.curved-tabs-elementor-override .curved-tabs-container {
    position: absolute;
    height: 95px;
    margin-bottom: -2px;
    z-index: 1;
    width: 100%;
    left: 0;
    top: -95px;
}

.curved-tabs-elementor-override .e-n-tab-title {
    position: absolute !important;
    top: 20px !important;
    left: 0px !important;
    z-index: 10 !important;
    background: none !important;
    border: none !important;
    height: 60px !important;
    width: 90% !important;
    margin: 0 !important;
    display: flex !important;
    align-items: center !important;
    justify-content: var(--n-tabs-title-justify-content, center) !important;
    transition: color 0.3s ease !important;
    visibility: visible !important;
    opacity: 1 !important;
    cursor: pointer !important;
}

/* Stili per il testo del tab - Desktop large (>1200px) */
.curved-tabs-elementor-override .e-n-tab-title-text {
    display: flex !important;
    align-items: center !important;
    justify-content: var(--n-tabs-title-justify-content, center) !important;
    width: 100% !important;
    height: 60px !important;
    min-height: 60px !important;
    text-align: var(--n-tabs-title-text-align, center) !important;
    font-size: var(--n-tabs-title-font-size, 18px) !important;
    font-weight: var(--curved-tabs-title-font-weight, 500) !important;
    cursor: pointer !important;
    padding: 0 10px !important;
    line-height: 60px !important;
    white-space: nowrap !important;
    overflow: hidden !important;
    text-overflow: ellipsis !important;
    box-sizing: border-box !important;
}

.curved-tabs-elementor-override .curved-tab-background {
    position: absolute !important;
    top: 0 !important;
    width: 502px !important;
    height: 95px !important;
    transition: all 0.3s ease !important;
    pointer-events: auto;
}

.curved-tabs-elementor-override .curved-tab-background svg {
    pointer-events: none !important;
}

.curved-tabs-elementor-override .curved-tab-background svg path {
    transition: fill 0.3s ease;
}

.curved-tabs-elementor-override .curved-tab-background[data-index="0"] {
    left: 0;
}

.curved-tabs-elementor-override .curved-tab-background[data-index="1"] {
    left: 380px;
}

.curved-tabs-elementor-override .curved-tab-background[data-index="2"] {
    left: 760px;
}

.curved-tabs-elementor-override .curved-tab-background[data-index="3"] {
    left: 1140px;
}

.curved-tabs-elementor-override .curved-tab-background[data-index="4"] {
    left: 1520px;
}

.curved-tabs-elementor-override .curved-tab-background:not(.inactive) svg path {
    fill: #EAF7F0;
}

.curved-tabs-elementor-override .curved-tab-background.inactive svg path {
    fill: #71CC98;
}

.curved-tabs-elementor-override .curved-tabs-wrapper {
    position: relative;
    z-index: 10;
}

.curved-tabs-elementor-override .e-n-tabs-heading {
    position: relative !important;
    display: flex !important;
    height: 95px !important;
    align-items: flex-end !important;
    margin-bottom: 0 !important;
    border: none !important;
    background: none !important;
    padding: 0 !important;
}

.curved-tabs-elementor-override .curved-tab-background .curved-tab-btn {
    background: none !important;
    border: none !important;
    cursor: pointer;
    font-size: 18px !important;
    font-weight: 500 !important;
    outline: none;
    transition: all 0.3s ease;
    position: absolute !important;
    color: #666 !important;
    padding: 0 !important;
    height: 60px !important;
    margin: 0 !important;
    width: 280px !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    text-align: center !important;
    border-radius: 0 !important;
    box-shadow: none !important;
    top: 20px !important;
    left: 111px !important;
    z-index: 10 !important;
    font-family: inherit !important;
}

.curved-tabs-elementor-override .curved-tab-background .curved-tab-btn[aria-selected="true"] {
    background: none !important;
}

.curved-tabs-elementor-override .curved-tab-background .curved-tab-btn[aria-selected="false"] {
    background: none !important;
}

/* Hide original tabs */
.curved-tabs-elementor-override .e-n-tab-title[style*="display: none"] {
    display: none !important;
}

.curved-tabs-elementor-override .e-n-tabs-content {
    background-color: #EAF7F0 !important;
    border-color: #EAF7F0 !important;
    border-radius: 0 20px 20px 20px !important;
    padding: 50px 60px !important;
    min-height: 500px !important;
    position: relative !important;
    z-index: 5 !important;
    margin-top:-1px !Important;
    border: none !important;
}


.curved-tabs-elementor-override .e-n-tabs-content .e-con {
    display: none;
    animation: fadeIn 0.3s ease;
}

.curved-tabs-elementor-override .e-n-tabs-content .e-con.e-active {
    display: block;
}

.curved-tabs-elementor-override .e-n-tabs-content h2 {
    color: #1a6b5c !important;
    margin-bottom: 20px;
    font-size: 28px;
}

.curved-tabs-elementor-override .e-n-tabs-content p {
    margin-bottom: 15px;
    color: #555 !important;
    line-height: 1.6;
}


/* Responsive Design for Override */

/* Desktop large - 1200px+ usa i valori di default */

/* Desktop medium - 992px to 1200px */
@media (max-width: 1200px) {
    .curved-tabs-elementor-override .curved-tab-background {
        width: 420px !important;
        transform: scale(0.85);
        transform-origin: top left;
    }

    .curved-tabs-elementor-override .curved-tab-background[data-index="0"] {
        left: 0 !important;
    }

    .curved-tabs-elementor-override .curved-tab-background[data-index="1"] {
        left: 320px !important;
    }

    .curved-tabs-elementor-override .curved-tab-background[data-index="2"] {
        left: 640px !important;
    }

    .curved-tabs-elementor-override .curved-tab-background[data-index="3"] {
        left: 960px !important;
    }

    .curved-tabs-elementor-override .curved-tab-background .curved-tab-btn,
    .curved-tabs-elementor-override .e-n-tab-title {
        width: 230px !important;
        left: 95px !important;
        font-size: 16px !important;
    }

    .curved-tabs-elementor-override .e-n-tab-title-text {
        font-size: 16px !important;
        padding: 0 8px !important;
        height: 50px !important;
        min-height: 50px !important;
        line-height: 50px !important;
    }

    .curved-tabs-elementor-override .e-n-tabs-heading {
        height: 80px !important;
    }
}

/* Tablet landscape - 768px to 992px */
@media (max-width: 992px) {
    .curved-tabs-elementor-override .curved-tab-background {
        width: 350px !important;
        transform: scale(0.7);
        transform-origin: top left;
    }

    .curved-tabs-elementor-override .curved-tab-background[data-index="0"] {
        left: 0 !important;
    }

    .curved-tabs-elementor-override .curved-tab-background[data-index="1"] {
        left: 250px !important;
    }

    .curved-tabs-elementor-override .curved-tab-background[data-index="2"] {
        left: 500px !important;
    }

    .curved-tabs-elementor-override .curved-tab-background .curved-tab-btn,
    .curved-tabs-elementor-override .e-n-tab-title {
        width: 200px !important;
        left: 80px !important;
        font-size: 14px !important;
        top: 14px !important;
        height: 45px !important;
    }

    .curved-tabs-elementor-override .e-n-tab-title-text {
        font-size: 14px !important;
        padding: 0 6px !important;
        height: 45px !important;
        min-height: 45px !important;
        line-height: 45px !important;
    }

    .curved-tabs-elementor-override .e-n-tabs-heading {
        height: 66px !important;
    }

    .curved-tabs-elementor-override .e-n-tabs-content {
        padding: 40px !important;
        border-radius: 0 15px 15px 15px !important;
    }
}

/* Tablet portrait e Mobile - sotto 768px - Layout a bottoni 50% */
@media (max-width: 768px) {
    .curved-tabs-elementor-override .e-n-tabs-heading {
        display: flex !important;
        flex-direction: row !important;
        flex-wrap: nowrap !important;
        height: auto !important;
        gap: 0 !important;
        padding: 0 !important;
    }

    .curved-tabs-elementor-override .curved-tab-background,
    .curved-tabs-elementor-override .curved-tab-background[data-index="0"],
    .curved-tabs-elementor-override .curved-tab-background[data-index="1"],
    .curved-tabs-elementor-override .curved-tab-background[data-index="2"],
    .curved-tabs-elementor-override .curved-tab-background.inactive {
        position: relative !important;
        width: 50% !important;
        height: 50px !important;
        left: 0 !important;
        top: 0 !important;
        transform: none !important;
        flex: 1 1 50% !important;
        display: flex !important;
        align-items: center !important;
        justify-content: center !important;
    }

    .curved-tabs-elementor-override .curved-tab-background svg {
        display: none !important;
    }

    .curved-tabs-elementor-override .curved-tab-background:not(.inactive) {
        background-color: #EAF7F0 !important;
    }

    .curved-tabs-elementor-override .curved-tab-background.inactive {
        background-color: #71CC98 !important;
    }

    /* Border radius per i tab mobile */
    .curved-tabs-elementor-override .curved-tab-background[data-index="0"] {
        border-radius: 10px 10px 0px 0px !important;
    }

    .curved-tabs-elementor-override .curved-tab-background[data-index="1"] {
        border-radius: 10px 10px 0px 0px !important;
    }

    .curved-tabs-elementor-override .curved-tab-background .curved-tab-btn,
    .curved-tabs-elementor-override .e-n-tab-title {
        position: relative !important;
        width: 100% !important;
        height: 50px !important;
        left: 0 !important;
        top: 0 !important;
        font-size: 14px !important;
        display: flex !important;
        align-items: center !important;
        justify-content: center !important;
        text-align: center !important;
        margin: 0 !important;
        padding: 0 10px !important;
    }

    .curved-tabs-elementor-override .e-n-tab-title-text {
        font-size: 14px !important;
        padding: 0 !important;
        height: auto !important;
        min-height: auto !important;
        line-height: 1.3 !important;
        display: flex !important;
        align-items: center !important;
        justify-content: center !important;
        text-align: center !important;
        white-space: normal !important;
    }

    .curved-tabs-elementor-override .e-n-tabs-content {
        padding: 25px !important;
        border-radius: 0 0 12px 12px !important;
        min-height: 250px !important;
    }

    .curved-tabs-elementor-override .e-n-tabs-content h2 {
        font-size: 20px !important;
    }
}

/* Mobile large - 480px to 576px */
@media (max-width: 576px) {
    .curved-tabs-elementor-override .curved-tab-background {
        height: 45px !important;
    }

    .curved-tabs-elementor-override .curved-tab-background .curved-tab-btn,
    .curved-tabs-elementor-override .e-n-tab-title {
        height: 45px !important;
        font-size: 13px !important;
    }

    .curved-tabs-elementor-override .e-n-tab-title-text {
        font-size: 13px !important;
    }

    .curved-tabs-elementor-override .e-n-tabs-content {
        padding: 20px !important;
        min-height: 200px !important;
        border-radius: 0 0 10px 10px !important;
    }

    .curved-tabs-elementor-override .e-n-tabs-content h2 {
        font-size: 18px !important;
        margin-bottom: 12px;
    }

    .curved-tabs-elementor-override .e-n-tabs-content p {
        font-size: 14px !important;
        line-height: 1.5 !important;
    }
}

/* Mobile small - 400px to 480px */
@media (max-width: 480px) {
    .curved-tabs-elementor-override .curved-tab-background {
        height: 42px !important;
    }

    .curved-tabs-elementor-override .curved-tab-background .curved-tab-btn,
    .curved-tabs-elementor-override .e-n-tab-title {
        height: 42px !important;
        font-size: 12px !important;
    }

    .curved-tabs-elementor-override .e-n-tab-title-text {
        font-size: 12px !important;
    }

    .curved-tabs-elementor-override .e-n-tabs-content {
        padding: 15px !important;
        border-radius: 0 0 8px 8px !important;
        min-height: 180px !important;
    }

    .curved-tabs-elementor-override .e-n-tabs-content h2 {
        font-size: 16px !important;
        margin-bottom: 10px;
    }

    .curved-tabs-elementor-override .e-n-tabs-content p {
        font-size: 13px !important;
    }
}

/* Mobile extra small - sotto 400px */
@media (max-width: 400px) {
    .curved-tabs-elementor-override .curved-tab-background {
        height: 40px !important;
    }

    .curved-tabs-elementor-override .curved-tab-background .curved-tab-btn,
    .curved-tabs-elementor-override .e-n-tab-title {
        height: 40px !important;
        font-size: 11px !important;
        padding: 0 5px !important;
    }

    .curved-tabs-elementor-override .e-n-tab-title-text {
        font-size: 11px !important;
    }

    .curved-tabs-elementor-override .e-n-tabs-content {
        padding: 12px !important;
        border-radius: 0 0 6px 6px !important;
        min-height: 160px !important;
    }

    .curved-tabs-elementor-override .e-n-tabs-content h2 {
        font-size: 15px !important;
        margin-bottom: 8px;
    }

    .curved-tabs-elementor-override .e-n-tabs-content p {
        font-size: 12px !important;
    }
}

/* === Single-tab override: keep curved tablet-portrait layout under 768px === */
@media (max-width: 768px) {
    .curved-tabs-elementor-override.curved-tabs-single .e-n-tabs-heading {
        display: flex !important;
        flex-direction: row !important;
        flex-wrap: nowrap !important;
        height: 66px !important;
        gap: 0 !important;
        padding: 0 !important;
    }

    .curved-tabs-elementor-override.curved-tabs-single .curved-tab-background,
    .curved-tabs-elementor-override.curved-tabs-single .curved-tab-background[data-index="0"],
    .curved-tabs-elementor-override.curved-tabs-single .curved-tab-background.inactive {
        position: absolute !important;
        width: 350px !important;
        height: 95px !important;
        left: 0 !important;
        top: 0 !important;
        transform: scale(0.7) !important;
        transform-origin: top left !important;
        flex: none !important;
        background-color: transparent !important;
        border-radius: 0 !important;
        display: block !important;
    }

    .curved-tabs-elementor-override.curved-tabs-single .curved-tab-background svg {
        display: block !important;
    }

    .curved-tabs-elementor-override.curved-tabs-single .curved-tab-background .curved-tab-btn,
    .curved-tabs-elementor-override.curved-tabs-single .e-n-tab-title {
        position: absolute !important;
        width: 200px !important;
        height: 45px !important;
        top: 14px !important;
        left: 80px !important;
        margin: 0 !important;
        padding: 0 !important;
        justify-content: var(--n-tabs-title-justify-content, center) !important;
    }

    .curved-tabs-elementor-override.curved-tabs-single .e-n-tab-title-text {
        font-size: var(--n-tabs-title-font-size, 14px) !important;
        font-weight: var(--curved-tabs-title-font-weight, 500) !important;
        text-align: var(--n-tabs-title-text-align, center) !important;
        justify-content: var(--n-tabs-title-justify-content, center) !important;
        height: 45px !important;
        min-height: 45px !important;
        line-height: 45px !important;
        padding: 0 6px !important;
        white-space: nowrap !important;
    }

    .curved-tabs-elementor-override.curved-tabs-single .e-n-tabs-content {
        padding: 40px !important;
        border-radius: 0 15px 15px 15px !important;
        min-height: 300px !important;
    }
}

/* Elementor Form Submit Button - Mobile */
@media (max-width: 768px) {
    .elementor-field-type-submit {
        width: 100% !important;
        justify-content: flex-start !important;
    }

    .elementor-field-type-submit .elementor-button {
        width: 100% !important;
        text-align: left !important;
        justify-content: flex-start !important;
    }
}

.curved-tabs-widget .container {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    position: relative;
}

.curved-tabs-widget .tabs-container {
    position: absolute;
    height: 95px;
    margin-bottom: -2px;
    width: 100%;
    left: 0;
    top: -95px;
}

.curved-tabs-widget .tab-background {
    position: absolute;
    top: 0;
    width: 502px;
    height: 95px;
    transition: all 0.3s ease;
}

.curved-tabs-widget .tab-background svg path {
    transition: fill 0.3s ease;
}

.curved-tabs-widget .tab-background[data-index="0"] {
    left: 0;
}

.curved-tabs-widget .tab-background[data-index="1"] {
    left: 380px;
}

.curved-tabs-widget .tab-background[data-index="2"] {
    left: 760px;
}

.curved-tabs-widget .tab-background[data-index="3"] {
    left: 1140px;
}

.curved-tabs-widget .tab-background[data-index="4"] {
    left: 1520px;
}

/* Default colors - can be overridden by Elementor controls */
.curved-tabs-widget .tab-background:not(.inactive) svg path {
    fill: #7cc5a1;
}

.curved-tabs-widget .tab-background.inactive svg path {
    fill: #e0e0e0;
}

.curved-tabs-widget .tabs-wrapper {
    position: relative;
    display: flex;
    height: 100%;
    z-index: 10;
}

.curved-tabs-widget .tab {
    background: none;
    border: none;
    cursor: pointer;
    font-size: 18px;
    font-weight: 500;
    outline: none;
    transition: all 0.3s ease;
    position: relative;
    color: #333;
    padding: 0 60px;
    height: 60px;
    margin-top: 20px;
    width: 280px;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
}

.curved-tabs-widget .tab:not(:first-child) {
    margin-left: 120px;
}

.curved-tabs-widget .tab.active {
    color: #fff;
}

.curved-tabs-widget .tab:not(.active) {
    color: #666;
}

.curved-tabs-widget .content-wrapper {
    background-color: #f5f5f5;
    border-radius: 0 20px 20px 20px;
    padding: 50px 60px;
    min-height: 500px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
    position: relative;
    z-index: 5;
    margin-top: 95px;
}

.curved-tabs-widget .tab-content {
    display: none;
}

.curved-tabs-widget .tab-content.active {
    display: block;
    animation: fadeIn 0.3s ease;
}

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

.curved-tabs-widget .content-wrapper h2 {
    color: #1a6b5c;
    margin-bottom: 20px;
    font-size: 28px;
}

.curved-tabs-widget .content-wrapper p {
    margin-bottom: 15px;
    color: #555;
    line-height: 1.6;
}

/* Responsive Design for Widget */

/* Desktop medium - 992px to 1200px */
@media (max-width: 1200px) {
    .curved-tabs-widget .tab-background {
        width: 420px;
        transform: scale(0.85);
        transform-origin: top left;
    }

    .curved-tabs-widget .tab-background[data-index="0"] {
        left: 0;
    }

    .curved-tabs-widget .tab-background[data-index="1"] {
        left: 320px;
    }

    .curved-tabs-widget .tab-background[data-index="2"] {
        left: 640px;
    }

    .curved-tabs-widget .tab-background[data-index="3"] {
        left: 960px;
    }

    .curved-tabs-widget .tab {
        width: 230px;
        padding: 0 40px;
        font-size: 16px;
    }

    .curved-tabs-widget .tab:not(:first-child) {
        margin-left: 90px;
    }

    .curved-tabs-widget .content-wrapper {
        margin-top: 80px;
    }
}

/* Tablet landscape - 768px to 992px */
@media (max-width: 992px) {
    .curved-tabs-widget .tab-background {
        width: 350px;
        transform: scale(0.7);
        transform-origin: top left;
    }

    .curved-tabs-widget .tab-background[data-index="0"] {
        left: 0;
    }

    .curved-tabs-widget .tab-background[data-index="1"] {
        left: 250px;
    }

    .curved-tabs-widget .tab-background[data-index="2"] {
        left: 500px;
    }

    .curved-tabs-widget .tab {
        width: 200px;
        padding: 0 30px;
        font-size: 14px;
        height: 45px;
        margin-top: 14px;
    }

    .curved-tabs-widget .tab:not(:first-child) {
        margin-left: 70px;
    }

    .curved-tabs-widget .content-wrapper {
        margin-top: 66px;
        padding: 40px;
        border-radius: 0 15px 15px 15px;
    }
}

/* Tablet portrait - 576px to 768px */
@media (max-width: 768px) {
    .curved-tabs-widget .tabs-container {
        position: relative;
        top: 0;
        height: auto;
        padding: 10px;
    }

    .curved-tabs-widget .tab-background {
        display: none;
    }

    .curved-tabs-widget .tabs-wrapper {
        flex-direction: column;
        gap: 8px;
        margin-bottom: 10px;
    }

    .curved-tabs-widget .tab {
        width: 100% !important;
        margin: 0 !important;
        border-radius: 12px;
        height: 50px;
        font-size: 16px;
        padding: 0 20px;
    }

    .curved-tabs-widget .tab.active {
        background-color: #7cc5a1;
        color: #fff;
    }

    .curved-tabs-widget .tab:not(.active) {
        background-color: #e0e0e0;
        color: #555;
    }

    .curved-tabs-widget .content-wrapper {
        margin-top: 0;
        padding: 25px;
        border-radius: 15px;
        min-height: 250px;
    }

    .curved-tabs-widget .content-wrapper h2 {
        font-size: 22px;
    }
}

/* Mobile large - 480px to 576px */
@media (max-width: 576px) {
    .curved-tabs-widget {
        padding: 5px;
    }

    .curved-tabs-widget .tabs-container {
        padding: 8px;
    }

    .curved-tabs-widget .tab {
        height: 46px;
        font-size: 15px;
        border-radius: 10px;
    }

    .curved-tabs-widget .content-wrapper {
        padding: 20px;
        min-height: 200px;
    }

    .curved-tabs-widget .content-wrapper h2 {
        font-size: 20px;
        margin-bottom: 12px;
    }

    .curved-tabs-widget .content-wrapper p {
        font-size: 14px;
        line-height: 1.5;
    }
}

/* Mobile small - sotto 480px */
@media (max-width: 480px) {
    .curved-tabs-widget {
        padding: 0;
    }

    .curved-tabs-widget .tabs-container {
        padding: 5px;
    }

    .curved-tabs-widget .tab {
        height: 42px;
        font-size: 14px;
        border-radius: 8px;
    }

    .curved-tabs-widget .content-wrapper {
        padding: 15px;
        border-radius: 12px;
        min-height: 180px;
    }

    .curved-tabs-widget .content-wrapper h2 {
        font-size: 18px;
        margin-bottom: 10px;
    }

    .curved-tabs-widget .content-wrapper p {
        font-size: 13px;
    }
}