/* ==========================================================================
   Bikenos Consulting - Services Page Dedicated CSS
   ========================================================================== */

/* Scoped Variables for Services Page */
:root {
    --svc-bg-dark: #0f0f0f;
    --svc-bg-card: #1a1a1a;
    --svc-text-primary: #ffffff;
    --svc-text-secondary: #9ca3af;
    --svc-accent: #6366f1;
    --svc-border: rgba(255, 255, 255, 0.1);
    --svc-border-hover: rgba(255, 255, 255, 0.3);
}

/* Page Layout & Hero */
.services-page-wrapper {
    min-height: 100vh;
    color: var(--svc-text-primary);
    /* Restore Background Image */
    background-color: transparent;
    /* Dark fallback to prevent white flash */
    background-size: cover !important;
    background-position: center center !important;
    background-repeat: no-repeat !important;
    background-attachment: fixed !important;
}

/* Header Fix */
#header-placeholder {
    position: relative;
}

.svc-hero {
    padding: 120px 0 40px;
    /* Reduced bottom padding */
    text-align: center;
    /* Removed radial gradient to let page background show */
    background: transparent;
    max-width: 800px;
    margin: 0 auto;
    line-height: 1.6;
}

.svc-hero h1 {
    font-size: 3.5rem;
    font-weight: 700;
    margin-bottom: 1rem;
    background: #fff;
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

.svc-hero p {
    font-size: 1.1rem;
    color: var(--svc-text-secondary);
    max-width: 600px;
    margin: 0 auto;
    line-height: 1.6;
}

/* Category Tabs Container - Fix per overflow */
.services-page-wrapper section.container {
    overflow: visible !important;
}

/* Category Tabs */
.svc-category-tabs {
    display: flex;
    justify-content: center;
    gap: 0.5rem;
    margin-bottom: 3rem;
    flex-wrap: wrap;
    padding: 15px 1rem 5px;
    /* Padding top aumentato per evitare taglio su hover */
    overflow: visible;
    /* Assicura che il contenuto su hover sia visibile */
}

.svc-tab-btn {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    background: rgba(255, 255, 255, 0.03);
    backdrop-filter: blur(10px);
    border: 1px solid var(--svc-border);
    color: var(--svc-text-secondary);
    padding: 0.75rem 1.25rem;
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.3s ease;
    font-weight: 500;
    font-size: 0.9rem;
    white-space: nowrap;
}

.svc-tab-btn svg {
    opacity: 0.6;
    transition: opacity 0.3s ease;
}

.svc-tab-btn:hover {
    background: rgba(255, 255, 255, 0.06);
    border-color: var(--svc-border-hover);
    color: var(--svc-text-primary);
    transform: translateY(-2px);
}

.svc-tab-btn:hover svg {
    opacity: 1;
}

.svc-tab-btn.active {
    background: linear-gradient(135deg, var(--svc-accent) 0%, #8b5cf6 100%);
    color: #ffffff;
    border-color: transparent;
    box-shadow: 0 4px 15px rgba(99, 102, 241, 0.3);
}

.svc-tab-btn.active svg {
    opacity: 1;
}

/* Filters (Legacy - Kept for compatibility) */
.svc-filters {
    display: flex;
    justify-content: center;
    gap: 0.75rem;
    margin-bottom: 2rem;
    flex-wrap: wrap;
}

.svc-filter-btn {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--svc-border);
    color: var(--svc-text-secondary);
    padding: 0.6rem 1.2rem;
    border-radius: 50px;
    cursor: pointer;
    pointer-events: auto;
    transition: all 0.3s ease;
    font-weight: 500;
    font-size: 0.9rem;
}

.svc-filter-btn:hover,
.svc-filter-btn.active {
    background: var(--svc-text-primary);
    color: var(--svc-bg-dark);
    border-color: var(--svc-text-primary);
}

/* Responsive Tabs - Tablet */
@media (max-width: 1024px) {
    .svc-category-tabs {
        gap: 0.5rem;
    }

    .svc-tab-btn {
        padding: 0.6rem 1rem;
        font-size: 0.85rem;
    }

    .svc-tab-btn svg {
        width: 16px;
        height: 16px;
    }
}

/* Responsive Tabs - Mobile */
@media (max-width: 768px) {
    .svc-category-tabs {
        flex-wrap: nowrap;
        overflow-x: auto;
        justify-content: flex-start;
        gap: 0.5rem;
        padding-bottom: 0.5rem;
        margin: 0 0 1.5rem 0;
        padding-left: 10px;
        padding-right: 10px;
        -webkit-overflow-scrolling: touch;
        scrollbar-width: none;
        max-width: 100vw;
    }

    .svc-category-tabs::-webkit-scrollbar {
        display: none;
    }

    .svc-tab-btn {
        flex-shrink: 0;
        padding: 0.6rem 0.9rem;
        font-size: 0.8rem;
        white-space: nowrap;
    }

    .svc-tab-btn svg {
        width: 14px;
        height: 14px;
    }
}

/* Background Fix - Solo elementi specifici NON la pagina principale */
.services-page-wrapper .solutions-section,
.services-page-wrapper .services-configurator-intro {
    background: transparent !important;
    background-color: transparent !important;
    box-shadow: none !important;
}

/* Services Grid - Max 3 Columns */
.svc-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1.5rem;
    margin: 2rem 0;
    padding: 40px 20px;
    max-width: 1900px;
    margin: 0 auto;
}

/* Service Card - Design migliorato */
.svc-card {
    background: #0000009c;
    backdrop-filter: blur(10px);
    border: 1px solid var(--svc-border);
    border-radius: 12px;
    padding: 1.25rem;
    display: flex;
    flex-direction: column;
    transition: transform 0.3s ease, box-shadow 0.3s ease, border-color 0.3s ease;
    position: relative;
    overflow: hidden;
}

.svc-card:hover {
    transform: translateY(-8px);
    /* Aumentato movimento per effetto più premium */
    box-shadow: 0 20px 40px rgba(99, 102, 241, 0.3);
    /* Shadow più prominente con accent color */
    border-color: var(--svc-accent);
    /* Bordo accent su hover */
}

/* Card Header */
.svc-card-header {
    margin-bottom: 0.4rem;
}

.svc-card-title {
    font-size: 1.4rem;
    font-weight: 700;
    color: var(--svc-text-primary);
    margin-bottom: 0.4rem;
    line-height: 1.25;
}

.svc-card-desc {
    font-size: 0.9rem;
    color: var(--svc-text-secondary);
    line-height: 1.45;
    margin-bottom: 0;
    display: block;
    overflow: visible;
}

.svc-card-icon {
    font-size: 2rem;
    margin-bottom: 0.5rem;
    display: inline-block;
    opacity: 0.9;
}

.svc-card-delivery {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    font-size: 0.75rem;
    color: var(--svc-accent);
    background: rgba(99, 102, 241, 0.1);
    padding: 0.25rem 0.6rem;
    border-radius: 20px;
    margin-top: 0.5rem;
    font-weight: 500;
}

.svc-card-delivery svg {
    opacity: 0.8;
}

/* Pricing Section */
.svc-card-price {
    margin-bottom: 0.4rem;
    padding-bottom: 0.4rem;
    border-bottom: 1px solid var(--svc-border);
}

.svc-price-amount {
    font-size: 1.75rem;
    font-weight: 700;
    color: var(--svc-text-primary);
    display: block;
}

.svc-price-label {
    font-size: 0.65rem;
    color: var(--svc-text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.svc-price-monthly {
    font-size: 0.7rem;
    color: var(--svc-accent);
    margin-top: 0.1rem;
    display: block;
    font-weight: 500;
}

/* Features List */
.svc-card-features {
    list-style: none;
    padding: 0;
    margin: 0 0 0.5rem 0;
    flex-grow: 1;
}

.svc-feature-item {
    display: flex;
    align-items: flex-start;
    gap: 0.5rem;
    margin-bottom: 0.35rem;
    font-size: 0.78rem;
    color: var(--svc-text-secondary);
    line-height: 1.3;
}

.svc-feature-icon {
    color: var(--svc-accent);
    flex-shrink: 0;
    margin-top: 2px;
    font-size: 0.8rem;
}

/* Actions */
.svc-card-actions {
    margin-top: auto;
    display: flex;
    flex-direction: column;
    gap: 0.4rem;
}

/* Primary Button */
.svc-btn-config {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    padding: 0.6rem 1rem;
    background: linear-gradient(135deg, var(--svc-accent), #818cf8);
    border: 1px solid var(--svc-accent);
    color: #ffffff;
    border-radius: 6px;
    font-weight: 600;
    font-size: 0.8rem;
    cursor: pointer;
    pointer-events: auto;
    transition: all 0.3s ease;
    text-decoration: none;
}

.svc-btn-config:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(99, 102, 241, 0.4);
    background: linear-gradient(135deg, #5b21b6, var(--svc-accent));
}

.svc-btn-text {
    display: inline;
}

.svc-btn-arrow {
    flex-shrink: 0;
    margin-left: 8px;
    transition: transform 0.3s ease;
    display: inline-flex;
    align-items: center;
    vertical-align: middle;
}

.svc-btn-config:hover .svc-btn-arrow {
    transform: translateX(5px);
}

/* Secondary Button */
.svc-btn-quote {
    text-align: center;
    font-size: 0.75rem;
    color: var(--svc-text-secondary);
    text-decoration: underline;
    cursor: pointer;
    background: none;
    border: none;
    padding: 0;
}

.svc-btn-quote:hover {
    color: var(--svc-text-primary);
}

/* ==========================================================================
   SVC Dark Theme Override - Fix per container e elementi ereditati da styles.css
   ========================================================================== */

/* FORZA TRASPARENZA TOTALE - SPECIFICITÀ MASSIMA */
body.services-page-wrapper .container:not(.footer-2rows):not([class*="footer"]),
body.services-page-wrapper section:not([class*="footer"]),
body.services-page-wrapper .svc-grid,
body.services-page-wrapper .svc-filters,
body.services-page-wrapper .svc-hero,
.services-page-wrapper .container,
html .services-page-wrapper .container {
    background: none !important;
    background-color: rgba(0, 0, 0, 0) !important;
    background-image: none !important;
    border: none !important;
    box-shadow: none !important;
    -webkit-box-shadow: none !important;
    -moz-box-shadow: none !important;
    outline: none !important;
    /* FORZA RIMOZIONE COMPLETA QUALSIASI BACKGROUND */
}

/* ==========================================================================
   MODAL STYLES - MANAGED BY JAVASCRIPT
   ========================================================================== 
   
   IMPORTANTE: Tutti gli stili per il configuratore (#configurator-modal, 
   .configurator-modal, .modal-header, .modal-footer, etc.) sono gestiti 
   COMPLETAMENTE dal file services-configurator.js tramite stili inline.
   
   NON aggiungere stili CSS qui per il modale per evitare conflitti!
   ========================================================================== */

/* ==========================================================================
   RESPONSIVE DESIGN
   ========================================================================== */

/* Responsive - Tablet */
@media (max-width: 1024px) {
    .svc-hero {
        padding: 100px 30px 30px;
    }

    .svc-hero h1 {
        font-size: 2.5rem;
    }

    .svc-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 1.25rem;
        padding: 30px 15px;
    }

    .svc-card {
        padding: 1.1rem;
    }

    .svc-card-title {
        font-size: 1.25rem;
    }

    .svc-card-desc {
        font-size: 0.85rem;
    }

    .svc-price-amount {
        font-size: 1.5rem;
    }

    /* Mobile dark theme fixes */
    .services-page-wrapper .container,
    .services-page-wrapper section {
        background: transparent !important;
    }

    /* Modal responsive tablet */
    .services-page-wrapper .modal-content,
    .services-page-wrapper .addons-modal {
        width: 100%;
        max-width: 95vw;
        padding: 1.25rem;
    }
}

/* Responsive - Mobile */
@media (max-width: 768px) {
    .svc-hero {
        padding: 90px 15px 25px;
    }

    .svc-hero h1 {
        font-size: 1.8rem;
        line-height: 1.2;
    }

    .svc-hero p {
        font-size: 0.95rem;
        padding: 0 5px;
    }

    .svc-grid {
        grid-template-columns: 1fr;
        gap: 1rem;
        padding: 20px 0;
    }

    .svc-card {
        padding: 1.25rem;
    }

    .svc-card:hover {
        transform: none;
        box-shadow: none;
    }

    .svc-card-title {
        font-size: 1.3rem;
        margin-bottom: 0.4rem;
    }

    .svc-card-desc {
        font-size: 0.9rem;
        line-height: 1.5;
    }

    .svc-price-amount {
        font-size: 1.6rem;
    }

    .svc-feature-item {
        font-size: 0.82rem;
        line-height: 1.4;
        margin-bottom: 0.4rem;
    }

    .svc-btn-config {
        padding: 0.75rem 1rem;
        font-size: 0.9rem;
    }

    .svc-card-delivery {
        font-size: 0.75rem;
        padding: 0.3rem 0.7rem;
    }

    /* Modal responsive mobile */
    .services-page-wrapper .modal-content,
    .services-page-wrapper .addons-modal {
        width: 100%;
        max-width: 100%;
        max-height: 90vh;
        padding: 1rem;
        margin: 0;
        border-radius: 16px 16px 0 0;
    }

    /* Mobile-specific fixes */
    .services-page-wrapper .container,
    .services-page-wrapper .svc-grid {
        background: transparent !important;
    }

    .services-page-wrapper .addon-item {
        padding: 0.9rem;
    }
}

/* Responsive - Small Mobile */
@media (max-width: 480px) {
    .svc-hero h1 {
        font-size: 1.5rem;
    }

    .svc-hero p {
        font-size: 0.9rem;
    }

    .svc-card {
        padding: 1rem;
    }

    .svc-card-title {
        font-size: 1.15rem;
    }

    .svc-card-desc {
        font-size: 0.85rem;
    }

    .svc-price-amount {
        font-size: 1.4rem;
    }

    .svc-feature-item {
        font-size: 0.78rem;
    }
}

/* ============================================================================
   LAYOUT DUE COLONNE - Servizi + FAQ Sidebar
   ============================================================================ */

.svc-layout-wrapper {
    display: flex;
    gap: 40px;
    align-items: flex-start;
}

.svc-main-column {
    flex: 1;
    min-width: 0;
}

.svc-faq-sidebar {
    width: 380px;
    flex-shrink: 0;
    position: sticky;
    top: 100px;
    max-height: calc(100vh - 120px);
    overflow-y: auto;
    scrollbar-width: thin;
    scrollbar-color: rgba(99, 102, 241, 0.3) transparent;
}

.svc-faq-sidebar::-webkit-scrollbar {
    width: 4px;
}

.svc-faq-sidebar::-webkit-scrollbar-track {
    background: transparent;
}

.svc-faq-sidebar::-webkit-scrollbar-thumb {
    background: rgba(99, 102, 241, 0.3);
    border-radius: 4px;
}

/* Mobile: nascondo sidebar, FAQ vanno sotto */
@media (max-width: 1100px) {
    .svc-layout-wrapper {
        flex-direction: column;
    }

    .svc-faq-sidebar {
        display: none;
    }

    .svc-faq-section-mobile {
        display: block;
    }
}

@media (min-width: 1101px) {
    .svc-faq-section-mobile {
        display: none;
    }
}

/* ============================================================================
   FAQ SECTION - Stili per domande frequenti SEO
   ============================================================================ */

.svc-faq-section {
    padding: 0;
    border: none;
}

.svc-faq-header {
    text-align: left;
    margin-bottom: 20px;
    padding-bottom: 16px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.svc-faq-header h2 {
    font-size: 1.1rem;
    font-weight: 600;
    color: #ffffff;
    margin-bottom: 6px;
}

.svc-faq-header p {
    color: var(--svc-text-secondary);
    font-size: 0.8rem;
    max-width: none;
    margin: 0;
    line-height: 1.4;
}

.svc-faq-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.svc-faq-item {
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid rgba(255, 255, 255, 0.06);
    border-radius: 8px;
    overflow: hidden;
    transition: all 0.3s ease;
}

.svc-faq-item:hover {
    border-color: rgba(99, 102, 241, 0.25);
    background: rgba(255, 255, 255, 0.04);
}

.svc-faq-question {
    width: 100%;
    padding: 12px 14px;
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    background: transparent;
    border: none;
    cursor: pointer;
    text-align: left;
    color: #ffffff;
    font-size: 0.85rem;
    font-weight: 500;
    line-height: 1.4;
    transition: all 0.3s ease;
    gap: 10px;
}

.svc-faq-question:hover {
    color: var(--svc-accent);
}

.svc-faq-icon {
    flex-shrink: 0;
    width: 16px;
    height: 16px;
    margin-top: 2px;
    color: var(--svc-accent);
    transition: transform 0.3s ease;
    opacity: 0.7;
}

.svc-faq-item.active .svc-faq-icon {
    transform: rotate(180deg);
    opacity: 1;
}

.svc-faq-answer {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.4s ease;
}

.svc-faq-item.active .svc-faq-answer {
    max-height: 400px;
}

.svc-faq-answer-content {
    padding: 0 14px 14px 14px;
    color: var(--svc-text-secondary);
    font-size: 0.8rem;
    line-height: 1.6;
}

.svc-faq-answer-content strong {
    color: #ffffff;
    font-weight: 500;
}

/* FAQ Mobile - Quando mostrate sotto i servizi */
@media (max-width: 1100px) {
    .svc-faq-section {
        margin-top: 40px;
        padding: 30px 0;
        border-top: 1px solid rgba(255, 255, 255, 0.1);
    }

    .svc-faq-header {
        text-align: center;
        border-bottom: none;
        padding-bottom: 0;
        margin-bottom: 30px;
    }

    .svc-faq-header h2 {
        font-size: 1.4rem;
    }

    .svc-faq-header p {
        font-size: 0.9rem;
        max-width: 500px;
        margin: 0 auto;
    }

    .svc-faq-list {
        max-width: 700px;
        margin: 0 auto;
        gap: 10px;
    }

    .svc-faq-question {
        padding: 16px 18px;
        font-size: 0.95rem;
    }

    .svc-faq-answer-content {
        padding: 0 18px 18px 18px;
        font-size: 0.9rem;
    }

    .svc-faq-icon {
        width: 18px;
        height: 18px;
    }
}

/* FAQ Small Mobile */
@media (max-width: 480px) {
    .svc-faq-header h2 {
        font-size: 1.2rem;
    }

    .svc-faq-header p {
        font-size: 0.8rem;
    }

    .svc-faq-question {
        padding: 12px 14px;
        font-size: 0.85rem;
    }

    .svc-faq-answer-content {
        padding: 0 14px 14px 14px;
        font-size: 0.82rem;
    }
}

/* ==========================================================================
   MOBILE RESPONSIVE FIXES - Services Page
   ========================================================================== */

/* Fix 1: Background fixed su mobile */
@media (max-width: 768px) {
    .services-page-wrapper {
        background-attachment: scroll !important;
        background-image: none !important;
        background-color: transparent;
    }
}

/* Fix 2: Prevenire overflow orizzontale */
@media (max-width: 768px) {
    .services-page-wrapper {
        overflow-x: hidden;
    }

    .container {
        padding-left: 15px !important;
        padding-right: 15px !important;
        max-width: 100%;
    }

    /* Fix tabs overflow */
    .svc-category-tabs {
        margin-left: 0 !important;
        margin-right: 0 !important;
        padding-left: 10px;
        padding-right: 10px;
    }

    /* Fix card padding */
    .svc-card {
        margin-left: 0;
        margin-right: 0;
    }

    /* Fix grid padding */
    .svc-grid {
        padding-left: 15px;
        padding-right: 15px;
    }
}

/* Fix 3: Mobile piccolo - padding ulteriormente ridotto */
@media (max-width: 480px) {
    .container {
        padding-left: 10px !important;
        padding-right: 10px !important;
    }

    .svc-category-tabs {
        padding-left: 5px;
        padding-right: 5px;
        margin-bottom: 1rem;
    }

    .svc-grid {
        padding: 15px 5px;
    }

    .svc-card {
        padding: 0.9rem;
    }

    .svc-card-title {
        font-size: 1.2rem;
        word-wrap: break-word;
        overflow-wrap: break-word;
    }

    .svc-card-desc {
        font-size: 0.85rem;
        word-wrap: break-word;
        overflow-wrap: break-word;
    }

    /* Assicura che prezzi e feature non escano */
    .svc-price-amount,
    .svc-price-label,
    .svc-price-monthly,
    .svc-feature-item {
        word-wrap: break-word;
        overflow-wrap: break-word;
        max-width: 100%;
    }

    /* Fix button width */
    .svc-btn-config {
        width: 100%;
        justify-content: center;
    }
}

/* Fix 4: Assicura che nulla esca a destra */
@media (max-width: 768px) {
    .svc-card-header,
    .svc-card-price,
    .svc-card-features,
    .svc-card-actions {
        max-width: 100%;
        overflow: hidden;
    }

    /* Fix per icone SVG che potrebbero causare overflow */
    .svc-card-icon svg,
    .svc-tab-btn svg {
        flex-shrink: 0;
    }

    /* Word wrap per tutti i testi */
    .svc-card-title,
    .svc-card-desc,
    .svc-feature-item,
    .svc-price-label,
    .svc-price-monthly {
        word-break: break-word;
        hyphens: auto;
    }
}

/* Fix 5: Hero section mobile */
@media (max-width: 480px) {
    .svc-hero {
        padding: 80px 10px 20px;
    }

    .svc-hero h1 {
        font-size: 1.6rem;
        word-wrap: break-word;
        overflow-wrap: break-word;
    }

    .svc-hero p {
        font-size: 0.85rem;
        padding: 0;
        word-wrap: break-word;
    }
}

/* Fix 6: Layout wrapper e main column */
@media (max-width: 768px) {
    .svc-layout-wrapper {
        max-width: 100%;
        overflow: hidden;
    }

    .svc-main-column {
        max-width: 100%;
        min-width: 0;
    }
}