/* ===== PARTNER DETAIL PAGE ===== */

/* Intro header */
.partner-intro {
    background: var(--background-tertiary-color);
    color: var(--background-color);
    padding: 30px 20px 20px;
}
.partner-intro .partner-logo,
.partner-section .partner-logo {
    width: 80px;
    height: 80px;
    object-fit: contain;
    border-radius: 8px;
    background: var(--background-color);
    padding: 6px;
}
.partner-section .partner-logo {
    border: 1px solid var(--primary-color);
}
.partner-intro .partner-logo-placeholder {
    width: 80px;
    height: 80px;
    background: var(--background-color);
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 28px;
    font-weight: 700;
    color: var(--primary-color);
}
.partner-intro h1 { margin: 0 0 4px; font-size: 26px; letter-spacing: normal; line-height: normal;}
.partner-intro h6 { margin: 0 0 8px; font-size: 15px; opacity: .85; }
.partner-intro .badge-servizio {
    display: inline-block;
    background: rgba(255,255,255,.2);
    border: 1px solid rgba(255,255,255,.4);
    border-radius: 20px;
    padding: 3px 12px;
    font-size: 12px;
    margin-right: 6px;
}

/* Sticky navbar */
.partner-navbar {
    background: var(--background-color);
    border-bottom: 2px solid var(--primary-color);
    position: sticky;
    top: 0;
    width: 100%;
    z-index: 100;
    box-shadow: 0 2px 8px rgba(0,0,0,.08);
}
.partner-navbar ul {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    overflow-x: auto;
    gap: 0;
}
.partner-navbar ul li a {
    display: block;
    padding: 14px 18px;
    font-size: 14px;
    font-weight: 600;
    color: var(--primary-color);
    text-decoration: none;
    white-space: nowrap;
    border-bottom: 3px solid transparent;
    transition: border-color .2s;
}
.partner-navbar ul li a:hover,
.partner-navbar ul li a.active {
    border-bottom-color: var(--primary-color);
}
.partner-navbar .btn-prenota-nav {
    margin: 8px 12px;
    padding: 6px 16px;
    font-size: 13px;
    white-space: nowrap;
    max-width: 200px;
    min-width: fit-content;
}

/* Layout principale */
.partner-layout {
    padding: 30px 0 60px;
}
.partner-left { padding-right: 20px; }

/* Sezioni */
.partner-section {
    margin-bottom: 40px;
    scroll-margin-top: 56px;
}
.partner-section h2.section-title {
    font-size: 21px;
    font-weight: 700;
    color: var(--primary-color);
    border-bottom: 2px solid #e8ecf5;
    padding-bottom: 8px;
    margin-bottom: 20px;
}

/* Sedi */
.province-sidebar {
    max-height: 260px;
    overflow-y: auto;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    padding: 10px;
    background: #f8f9fc;
    display: flex;
    flex-wrap: wrap;
}
.province-sidebar .chip-provincia {
    display: inline-block;
    padding: 4px 12px;
    border-radius: 20px;
    border: 1px solid var(--primary-color);
    color: var(--primary-color);
    font-size: 12px;
    cursor: pointer;
    margin: 3px;
    transition: background .2s, color .2s;
}
.province-sidebar .chip-provincia.active,
.province-sidebar .chip-provincia:hover {
    background: var(--primary-color);
    color: var(--background-color);
}
.sede-card {
    border: 1px solid #e0e0e0;
    border-radius: 10px;
    padding: 16px;
    margin-bottom: 16px;
    box-shadow: 0 1px 4px rgba(0,0,0,.06);
}
.sede-card-inner {
    display: flex;
    gap: 20px;
    align-items: flex-start;
}
.sede-col-info {
    flex: 1;
    min-width: 0;
}
.sede-col-img {
    flex: 0 0 220px;
    max-width: 220px;
}
.sede-col-img img {
    width: 100%;
    height: 180px;
    object-fit: cover;
    border-radius: 8px;
}

@media (max-width: 600px) {
    .sede-card-inner { flex-direction: column; }
    .sede-col-img { flex: none; max-width: 100%; }
    .sede-col-img img { height: 160px; }
}
.general-info-description p {
    font-size: 16px;
}
.sede-card h5 { font-size: 17px; font-weight: 700; margin: 0 0 8px; }
.sede-card .sede-info { font-size: 16px; color: #555; margin-bottom: 4px; }
.sede-card .sede-info i { width: 16px; color: var(--primary-color); }
.sede-card .orari-table { font-size: 14px; margin-top: 8px; }
.sede-card .orari-table td { padding: 2px 8px 2px 0; }
.sede-card .btn-sede { min-width: fit-content; background-color: var(--secondary-color); }
.sede-card .btn-sede:hover { background-color: var(--secondary-hover-color); }

/* Prestazioni */
.prestazione-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 16px;
    border: 1px solid #e8ecf5;
    border-radius: 8px;
    margin-bottom: 8px;
    background: var(--background-color);
}
.prestazione-row span { font-size: 16px; }
.prestazione-row .btn { font-size: 12px; }

/* Staff */
.staff-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 16px;
}
@media (max-width: 768px) {
    .staff-grid { grid-template-columns: repeat(2, 1fr); }
}
.staff-card {
    border: 1px solid #e0e0e0;
    border-radius: 10px;
    padding: 16px;
    text-align: center;
    background: var(--background-color);
}
.staff-card img,
.staff-card .staff-avatar {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    object-fit: cover;
    margin: 0 auto 10px;
    display: block;
    background: #e8ecf5;
    line-height: 80px;
    font-size: 28px;
    color: var(--primary-color);
}
.staff-card h6 { font-size: 16px; font-weight: 700; margin: 0 0 4px; }
.staff-card p { font-size: 14px; color: #666; margin: 0; }

/* Certificazioni */
.cert-badges {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 16px;
}
.badge-certificazione {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: #f0f7f4;
    border: 1px solid #b2d8c8;
    color: #2a7a55;
    border-radius: 20px;
    padding: 5px 14px;
    font-size: 14px;
    font-weight: 500;
}
.badge-certificazione .fa {
    color: #2a7a55;
}
.cert-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 16px;
}
@media (max-width: 768px) {
    .cert-grid { grid-template-columns: repeat(2, 1fr); }
}
.cert-card {
    border: 1px solid #e0e0e0;
    border-radius: 10px;
    overflow: hidden;
    background: var(--background-color);
    text-align: center;
    padding-bottom: 12px;
}
.cert-card img { width: 100%; height: 100px; object-fit: cover; }
.cert-card h6 { font-size: 13px; font-weight: 600; margin: 8px 10px 0; }

/* Galleria - scroll orizzontale, max 2 righe */
.gallery-scroll {
    display: grid;
    grid-template-rows: repeat(2, 130px);
    grid-auto-flow: column;
    grid-auto-columns: 200px;
    gap: 10px;
    overflow-x: auto;
    padding-bottom: 10px;
}
.gallery-scroll::-webkit-scrollbar { height: 4px; }
.gallery-scroll::-webkit-scrollbar-thumb { background: #ccc; border-radius: 4px; }
.gallery-scroll img {
    width: 200px;
    height: 130px;
    object-fit: cover;
    border-radius: 8px;
    cursor: pointer;
}

/* Form prenotazione (destra) */
.booking-panel {
    position: sticky;
    top: 0px;
    background: var(--background-color);
    border: 1px solid #e0e0e0;
    border-radius: 12px;
    padding: 20px;
    overflow-y: auto;
    max-height: calc(100vh - 60px);
}
.booking-panel h5 { font-size: 17px; font-weight: 700; color: var(--primary-color); margin: 0 0 16px; }
.booking-type-tabs {
    display: flex;
    gap: 8px;
    margin-bottom: 18px;
}
.booking-type-tabs .tab-btn {
    flex: 1;
    padding: 8px;
    border: 2px solid var(--primary-color);
    border-radius: 8px;
    background: var(--background-color);
    color: var(--primary-color);
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: background .2s, color .2s;
    text-align: center;
}
.booking-type-tabs .tab-btn.active {
    background: var(--primary-color);
    color: var(--background-color);
}
.booking-form { display: none; }
.booking-form.active { display: block; }
.booking-form .form-group { margin-bottom: 12px; }
.booking-form label { font-size: 13px; font-weight: 600; color: #444; margin-bottom: 4px; display: block; }
.booking-form select,
.booking-form input,
.booking-form textarea {
    width: 100%;
    border: 1px solid var(--primary-color);
    border-radius: 6px;
    padding: 8px 10px;
    font-size: 14px;
    color: #333;
    background: #f8f9fc;
    outline: none;
    transition: border-color .2s;
}
.booking-form select:focus,
.booking-form input:focus,
.booking-form textarea:focus {
    border-color: var(--primary-color);
    background: var(--background-color);
}
.booking-form textarea { resize: vertical; min-height: 80px; }

@media (max-width: 991px) {
    .partner-right {
        position: static;
        margin-top: 30px;
    }
    .partner-left { padding-right: 0; }
    .staff-grid { grid-template-columns: repeat(2, 1fr); }
    .cert-grid { grid-template-columns: repeat(2, 1fr); }
}

/* Fix sticky navbar su mobile/tablet:
   .scheletro ha overflow:hidden su <992px che rompe position:sticky.
   Il wrapper .partner-page-body ha overflow:visible e altezza definita
   così sticky funziona correttamente su tutti i breakpoint. */
.partner-page-body {
    overflow: visible;
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
}

/* Works slider: una card alla volta */
.works-slider {
    position: relative;
    overflow: hidden;
}

.work-card {
    display: none;
    background: #eef1f8;
    border-radius: 14px;
    overflow: hidden;
    padding: 20px;
    gap: 20px;
    align-items: flex-start;
}
.work-card.active {
    display: flex;
}

.work-card-img {
    flex-shrink: 0;
    width: 220px;
    height: 220px;
    border-radius: 10px;
    overflow: hidden;
    background: #d0d8ec;
}
.work-card-img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    cursor: zoom-in;
    transition: transform .2s;
}
.work-card-img a {
    display: block;
    width: 100%;
    height: 100%;
}
.work-card-img a:hover img {
    transform: scale(1.03);
}
.work-img-placeholder {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #aaa;
}

.work-body {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 8px;
    min-width: 0;
}
.work-body .work-category {
    font-size: 11px;
    font-weight: 700;
    color: var(--primary-color);
    text-transform: uppercase;
    letter-spacing: .6px;
    opacity: .75;
}
.work-body h5 {
    font-size: 20px;
    font-weight: 700;
    margin: 0;
    color: #1a1a2e;
}
.work-body .work-desc {
    font-size: 14px;
    color: #444;
    line-height: 1.6;
    flex: 1;
}
.work-body .btn {
    align-self: flex-start;
    margin-top: 8px;
    font-weight: 700;
    padding: 10px 24px;
}

/* Dots navigation */
.works-dots {
    display: flex;
    justify-content: center;
    gap: 8px;
    margin-top: 16px;
}
.works-dot {
    width: 32px;
    height: 10px;
    border-radius: 5px;
    border: none;
    background: #c8d0e8;
    cursor: pointer;
    padding: 0;
    min-width: 20px;
    transition: background .2s, width .2s;
}
.works-dot.active {
    background: var(--primary-color);
    width: 40px;
}


@media screen and (max-width: 991px) {
    .scheletro {
        overflow: visible;
    }
}
@media (max-width: 767px) {
    .work-card {
        flex-direction: column;
        padding: 16px;
    }
    .work-card-img {
        width: 100%;
        height: 200px;
    }
    .work-body .btn {
        align-self: stretch;
        text-align: center;
    }
}

/* Sedi tabs */
.sedi-tabs {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 12px;
}
.sede-tab-btn {
    padding: 6px 16px;
    border: 1px solid #d0d0d0;
    width: max-content;
    min-width: fit-content;
    border-radius: 20px;
    background: #fff;
    color: #555;
    font-size: 14px;
    cursor: pointer;
    transition: background .15s, color .15s, border-color .15s;
}
.sede-tab-btn:hover {
    border-color: var(--primary-color);
    color: var(--primary-color);
}
.sede-tab-btn.active {
    background: var(--primary-color);
    border-color: var(--primary-color);
    color: #fff;
    font-weight: 600;
}

/* Tabella disponibilità orari nel form prenotazione */
.orari-disponibilita-table { width: 100%; border-collapse: collapse; font-size: 13px; margin-top: 4px; }
.orari-disponibilita-table thead th { font-weight: 600; color: #555; padding: 6px 8px; border-bottom: 2px solid #e0e0e0; text-align: left; }
.orari-disponibilita-table tbody tr { border-bottom: 1px solid #f0f0f0; }
.orari-disponibilita-table tbody tr:last-child { border-bottom: none; }
.orari-disponibilita-table tbody td { vertical-align: middle; }
.orari-disponibilita-table tbody td:first-child { font-weight: 500; color: #333; white-space: nowrap; }
.orari-disponibilita-table .orario-slot-label { display: flex; align-items: center; gap: 6px; cursor: pointer; margin: 0; font-weight: normal; }
.orari-disponibilita-table .orario-slot-label input[type="checkbox"] { margin: 0; flex-shrink: 0; cursor: pointer; width: 16px;}
.orari-disponibilita-table .orario-slot { color: var(--primary-color, #1a5fa8); font-weight: 500; }
.orari-disponibilita-table .orario-slot-label input[type="checkbox"]:checked + .orario-slot { text-decoration: underline; }
