/* =========================================
   Mobile Service Selector - Custom Dropdown
   For servizi.html on mobile (≤768px)
   ========================================= */

.mobile-tabs-dropdown {
    display: none;
    /* Hidden by default, shown only on mobile */
    width: 100%;
    margin-bottom: 2rem;
    position: relative;
}

.mobile-service-selector {
    width: 100%;
    max-width: 100%;
    background-color: transparent;
    position: relative;
    box-sizing: border-box;
}

/* Active/Visible Card */
.service-card-active {
    background: linear-gradient(135deg, rgba(0, 180, 216, 0.85) 0%, rgba(0, 78, 146, 0.85) 100%);
    border: 2px solid rgba(0, 180, 216, 0.6);
    border-radius: 12px;
    padding: 1rem 1.25rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 1rem;
    box-shadow: 0 6px 20px rgba(0, 180, 216, 0.25);
    transition: all 0.3s ease;
    position: relative;
    font-family: inherit;
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
    min-width: 0;
}

.service-card-active:hover {
    box-shadow: 0 10px 28px rgba(0, 180, 216, 0.4);
    transform: translateY(-2px);
}

.service-card-active-icon {
    display: none;
}

.service-card-active-title {
    flex: 1;
    font-size: 1.1rem;
    font-weight: 700;
    color: white;
    line-height: 1.3;
    min-width: 0;
    word-wrap: break-word;
    overflow-wrap: break-word;
}

.service-card-arrow {
    font-size: 1.5rem;
    color: white;
    transition: transform 0.3s ease;
    flex-shrink: 0;
}

.mobile-service-selector.open .service-card-arrow {
    transform: rotate(180deg);
}

/* Dropdown Menu */
.service-dropdown-menu {
    position: absolute;
    top: calc(100% + 0.5rem);
    left: 0;
    right: 0;
    background: white;
    border-radius: 12px;
    box-shadow: 0 12px 32px rgba(0, 0, 0, 0.15);
    max-height: 0;
    overflow: hidden;
    opacity: 0;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    z-index: 1000;
    width: 100%;
    box-sizing: border-box;
}

.mobile-service-selector.open .service-dropdown-menu {
    max-height: 60vh;
    opacity: 1;
    overflow-y: auto;
}

.service-dropdown-item {
    padding: 1.25rem 1.5rem;
    display: flex;
    align-items: center;
    gap: 1rem;
    cursor: pointer;
    transition: all 0.2s ease;
    border-bottom: 1px solid var(--gray-100);
    font-family: inherit;
}

.service-dropdown-item:last-child {
    border-bottom: none;
}

.service-dropdown-item:hover {
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
}

.service-dropdown-item:active {
    background: var(--gray-200);
}

.service-dropdown-item-icon {
    display: none;
}

.service-dropdown-item-title {
    flex: 1;
    font-size: 0.95rem;
    font-weight: 600;
    color: var(--secondary);
    line-height: 1.3;
    min-width: 0;
    word-wrap: break-word;
    overflow-wrap: break-word;
}

/* Hide items that are currently active */
.service-dropdown-item.hidden {
    display: none;
}

/* Responsive behavior */
@media (max-width: 768px) {

    /* Show custom dropdown on mobile */
    .mobile-tabs-dropdown {
        display: block;
    }

    /* Hide the horizontal tabs navigation */
    .tabs-container.vertical .tabs-nav.vertical {
        display: none !important;
    }
}

@media (max-width: 480px) {
    .service-card-active {
        padding: 1.25rem;
    }


    .service-card-active-title {
        font-size: 1rem;
    }

    .service-card-arrow {
        font-size: 1.3rem;
    }

    .service-dropdown-item {
        padding: 1rem 1.25rem;
    }


    .service-dropdown-item-title {
        font-size: 0.85rem;
    }
}