/* Stili specifici per Centro Servizi */


/* Grid delegata a .grid-feature (global) per coerenza cross-pagina */

.service-card {
    background: var(--bg-card);
    border-radius: 16px;
    padding: 2rem;
    box-shadow: var(--box-shadow);
    border: 1px solid var(--border-color);
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    min-height: 350px;
}

.service-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, #6c5ce7 0%, #a29bfe 50%, #fd79a8 100%);
    transform: scaleX(0);
    transition: transform 0.3s ease;
}

.service-card:hover {
    transform: translateY(-8px);
    box-shadow: var(--box-shadow-lg);
}

.service-card:hover::before {
    transform: scaleX(1);
}

.service-icon {
    width: 80px;
    height: 80px;
    background: transparent;
    border-radius: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2.5rem;
    margin-bottom: 1.5rem;
    color: var(--text-primary);
    position: relative;
}

.service-icon img {
    width: 60px;
    height: 60px;
    object-fit: contain;
    border-radius: 8px;
}

.service-title {
    font-size: 1.3rem;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 0.5rem;
}

.service-description {
    color: var(--text-secondary);
    font-size: 0.95rem;
    line-height: 1.6;
    margin-bottom: 1.5rem;
    flex-grow: 1;
}

.service-actions {
    display: flex;
    gap: 0.75rem;
    margin-top: auto;
}

.btn-service {
    flex: 1;
    padding: 1rem;
    border-radius: 12px;
    text-decoration: none;
    text-align: center;
    font-weight: 600;
    transition: all 0.3s ease;
    border: none;
    cursor: pointer;
    font-size: 0.95rem;
}

.btn-primary-service {
    background: linear-gradient(135deg, #6c5ce7 0%, #a29bfe 100%);
    color: white;
}

.btn-primary-service:hover {
    background: linear-gradient(135deg, #5a4fcf 0%, #8b7ed8 100%);
    color: white;
    transform: translateY(-2px);
    text-decoration: none;
    box-shadow: 0 8px 25px rgba(108, 92, 231, 0.3);
}

/* Ensure primary service buttons match layout of other services (full width) */
.btn-primary-service.btn-service {
    display: inline-flex;
    justify-content: center;
    align-items: center;
    width: 100%;
    padding: 1rem;
}

.btn-secondary-service {
    background: var(--bg-body);
    color: var(--text-primary);
    border: 2px solid var(--border-color);
}

.btn-secondary-service:hover {
    background: var(--bg-card);
    color: var(--text-primary);
    border-color: var(--primary);
    transform: translateY(-2px);
    text-decoration: none;
}


.no-results {
    text-align: center;
    padding: 3rem;
    color: var(--text-muted);
    display: none;
}

.no-results i {
    font-size: 3rem;
    margin-bottom: 1rem;
    opacity: 0.5;
}

/* Badge personalizzati per Servizi */
.service-badge {
    display: inline-block;
    background: var(--primary-light);
    color: var(--primary);
    padding: 0.25rem 0.75rem;
    border-radius: 15px;
    font-size: 0.8rem;
    font-weight: 500;
    margin-bottom: 1rem;
    border: 1px solid rgba(108, 92, 231, 0.2);
    width: auto;
    max-width: none;
}

.service-badges {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-bottom: 1rem;
}

.service-badges .service-badge {
    margin-bottom: 0;
}

.service-badge-min-edition {
    background: rgba(68, 114, 246, 0.14);
    color: #3754cc;
    border: 1px solid rgba(68, 114, 246, 0.28);
    font-weight: 700;
}

.service-badge-custom {
    background: rgba(18, 145, 109, 0.16);
    color: #0f795c;
    border: 1px solid rgba(18, 145, 109, 0.36);
    font-weight: 700;
}

.service-subtitle-dynamic {
    margin: -0.2rem 0 0.45rem;
    color: var(--text-secondary);
    font-size: 0.82rem;
    font-weight: 600;
    line-height: 1.35;
}

.service-card--edition-locked {
    position: relative;
    box-shadow: 0 0 0 1px rgba(214, 158, 46, 0.22) inset;
}

.service-card--plan-hidden {
    display: none !important;
}

.service-card--edition-locked::after {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: 16px;
    background: rgba(240, 242, 247, 0.16);
    -webkit-backdrop-filter: blur(1px);
    backdrop-filter: blur(1px);
    pointer-events: none;
}

.service-card--edition-locked .service-actions {
    position: relative;
    z-index: 2;
}

.service-action-disabled {
    pointer-events: none;
    opacity: 0.2;
    filter: grayscale(0.2);
}

.service-activation-btn {
    width: auto;
    flex: 1;
}

.service-activation-btn--purchase {
    background: var(--success, #178f52) !important;
    border-color: var(--success, #178f52) !important;
    color: #fff !important;
}

.service-offline-alert {
    width: auto;
    flex: 1;
    pointer-events: none;
    cursor: default;
    background: var(--danger, #bf2d2d) !important;
    border-color: var(--danger, #bf2d2d) !important;
    color: #fff !important;
}

/* Responsive Design */
@media (max-width: 768px) {
    .service-card {
        padding: 1.5rem;
        min-height: unset;
    }

    .service-icon {
        width: 60px;
        height: 60px;
        font-size: 2rem;
    }

    .service-status {
        top: 0.75rem;
        right: 0.75rem;
        font-size: 0.7rem;
        padding: 0.2rem 0.6rem;
    }
}

@media (max-width: 480px) {
    .service-card {
        padding: 1rem;
    }

    .service-icon {
        width: 50px;
        height: 50px;
        font-size: 1.6rem;
    }

    .service-card h3 {
        font-size: 1.1rem;
    }

    .service-card p {
        font-size: 0.85rem;
    }
}

/* Animazioni */
.service-card {
    opacity: 0;
    transform: translateY(20px);
    animation: fadeInUp 0.6s ease forwards;
}

.service-card:nth-child(2) {
    animation-delay: 0.2s;
}

.service-card:nth-child(3) {
    animation-delay: 0.4s;
}

@keyframes fadeInUp {
    to {
        opacity: 1;
        transform: translateY(0);
    }
}


/* Indicatori di stato servizio */
.service-status {
    position: absolute;
    top: 1rem;
    right: 1rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    background: rgba(255, 255, 255, 0.9);
    padding: 0.25rem 0.75rem;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 600;
}

.status-online {
    color: #28a745;
}

.status-offline {
    color: #dc3545;
}

.status-maintenance {
    color: #ffc107;
}

.status-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: currentColor;
    animation: pulse 2s infinite;
}

/* Tag per servizi esterni */
.service-external-tag {
    position: absolute;
    top: 1rem;
    right: 1rem;
    background: #06b6d4;
    color: white;
    padding: 0.25rem 0.75rem;
    border-radius: 20px;
    font-size: 0.6rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* Contatori servizi nella navigazione - ora gestiti da navigation.css */
.service-count {
    background: var(--primary);
    color: white;
    padding: 0.1rem 0.3rem;
    border-radius: 8px;
    font-size: 0.65rem;
    font-weight: 600;
    margin-left: 0.3rem;
    min-width: 1.2rem;
    text-align: center;
    display: inline-block;
    line-height: 1.2;
}

.quick-nav-item.active .service-count {
    background: var(--primary-light);
}

html[data-theme='dark'] .service-badge-min-edition,
[data-theme='dark'] .service-badge-min-edition {
    background: rgba(129, 160, 255, 0.2);
    color: rgba(221, 231, 255, 0.96);
    border-color: rgba(129, 160, 255, 0.38);
}

html[data-theme='dark'] .service-badge-custom,
[data-theme='dark'] .service-badge-custom {
    background: rgba(66, 207, 164, 0.2);
    color: rgba(204, 255, 236, 0.96);
    border-color: rgba(66, 207, 164, 0.35);
}

html[data-theme='dark'] .service-subtitle-dynamic,
[data-theme='dark'] .service-subtitle-dynamic {
    color: var(--text-secondary, #c2cada);
}

html[data-theme='dark'] .service-card--edition-locked::after,
[data-theme='dark'] .service-card--edition-locked::after {
    background: rgba(30, 33, 45, 0.2);
}



/* Quick Navigation for AI Providers */
.quick-navb-section {
    margin-bottom: 0rem;
}

.quick-navb-container {
    background: var(--bg-body);
    border: 2px solid var(--chat-border);
    border-radius: var(--chat-border-radius);
    padding: 0.5rem;
    box-shadow: var(--chat-shadow);
    position: relative;
    overflow: hidden;
}

.quick-navb-container::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 2px;
    background: var(--chat-gradient);
}

.quick-navb {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.quick-nav-itemb {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem 1rem;
    text-decoration: none;
    color: var(--chat-text-muted);
    border-radius: 8px;
    font-weight: 500;
    font-size: 0.875rem;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
    min-width: 100px;
    justify-content: center;
}

.quick-nav-itemb::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: var(--chat-gradient);
    opacity: 0;
    transition: opacity 0.3s ease;
    z-index: -1;
}

.quick-nav-itemb:hover {
    color: white;
    transform: translateY(-2px);
    box-shadow: var(--chat-shadow);
    text-decoration: none;
}

.quick-nav-itemb:hover::before {
    opacity: 1;
}

.quick-nav-itemb i {
    font-size: 1rem;
    transition: transform 0.3s ease;
}

.quick-nav-itemb:hover i {
    transform: scale(1.1);
}

.quick-nav-itemb span {
    font-weight: 600;
    letter-spacing: 0.5px;
}

.quick-nav-itemb img {
    width: 18px;
    height: 18px;
    border-radius: 4px;
    transition: transform 0.3s ease;
}






@keyframes pulse {
    0% {
        opacity: 1;
    }

    50% {
        opacity: 0.5;
    }

    100% {
        opacity: 1;
    }
}

/* NoteBuddy highlight, status pill and badge (local copy to Services page) */
.notebuddy-highlight {
    outline: 3px solid rgba(168, 85, 247, 0.12);
    box-shadow: 0 14px 40px rgba(168, 85, 247, 0.06);
    transition: transform 0.18s ease, box-shadow 0.2s ease;
}

.notebuddy-highlight:hover {
    transform: translateY(-6px);
    box-shadow: 0 26px 60px rgba(168, 85, 247, 0.08);
}

.status-pill {
    display: inline-block;
    padding: 6px 10px;
    border-radius: 999px;
    font-size: 0.78rem;
    font-weight: 700;
    letter-spacing: 0.4px;
}

.status-online {
    background-color: #dcfce7;
    color: #166534;
}

.status-offline {
    background-color: #fef2f2;
    color: #dc2626;
}

.status-checking {
    background-color: #fef3c7;
    color: #d97706;
}

/* Ensure service-status inner elements display correctly */
.service-status .status-text {
    margin-left: 8px;
    color: inherit;
    font-weight: 700;
}

.service-status .status-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: currentColor;
    display: inline-block;
}

.new-badge {
    display: inline-block;
    background: linear-gradient(135deg, #8b5cf6, #a855f7);
    color: white;
    padding: 4px 8px;
    border-radius: 999px;
    font-size: 0.75rem;
    font-weight: 700;
    margin-left: 8px;
    box-shadow: 0 6px 18px rgba(139, 92, 246, 0.12);
}