/* Reset minimale */
*,
*::before,
*::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    font-size: 16px;
    scroll-behavior: smooth;
}

body {
    font-family: 'Lato', system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    line-height: 1.6;
    color: #212529;
    background-color: #F8F9FA;
}

img {
    max-width: 100%;
    height: auto;
    display: block;
}

a {
    color: #0891b2;
    text-decoration: none;
}

a:hover,
a:focus {
    text-decoration: underline;
}

.container {
    width: 100%;
    max-width: 1140px;
    margin: 0 auto;
    padding: 0 1rem;
}

/* ========================================
   HEADER
   ======================================== */

.main-header {
    position: sticky;
    top: 0;
    z-index: 1000;
    background: linear-gradient(135deg, #0891b2 0%, #0e7490 100%);
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.header-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.75rem 0;
    position: relative;
}

.logo {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    font-weight: 700;
    color: #ffffff;
    text-decoration: none;
}

.logo-mark {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 3rem;
    height: 3rem;
    border-radius: 999px;
    background: #ffffff;
    color: #0891b2;
    font-size: 0.9rem;
    overflow: hidden;
    flex-shrink: 0;
}

.logo-mark img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.logo-text {
    font-size: 1.1rem;
    font-weight: 600;
    color: #ffffff;
    line-height: 1.2;
}

.main-nav ul {
    list-style: none;
    display: flex;
    gap: 1rem;
}

.main-nav a {
    padding: 0.25rem 0;
    font-weight: 500;
    font-size: 0.95rem;
    color: rgba(255, 255, 255, 0.9);
    transition: color 0.2s ease;
    text-decoration: none;
}

.main-nav a:hover {
    color: #ffffff;
    text-decoration: none;
}

.main-nav a.active {
    color: #ffffff;
    border-bottom: 2px solid #ffffff;
}

.header-cta { flex-shrink: 0; }

.header-cta .btn {
    font-size: 0.9rem;
}

.cta-short { display: inline; }
.cta-long { display: none; }

/* Hamburger */
.nav-toggle {
    display: none;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 5px;
    width: 2.4rem;
    height: 2.4rem;
    background: transparent;
    border: 1px solid rgba(255, 255, 255, 0.4);
    border-radius: 0.4rem;
    cursor: pointer;
    padding: 0;
}

.nav-toggle-bar {
    display: block;
    height: 2px;
    width: 1.4rem;
    background-color: #ffffff;
    border-radius: 2px;
    transition: transform 0.25s, opacity 0.25s;
}

.nav-toggle.is-open .nav-toggle-bar:nth-child(1) {
    transform: translateY(7px) rotate(45deg);
}
.nav-toggle.is-open .nav-toggle-bar:nth-child(2) {
    opacity: 0;
}
.nav-toggle.is-open .nav-toggle-bar:nth-child(3) {
    transform: translateY(-7px) rotate(-45deg);
}

/* ========================================
   BOTTONI
   ======================================== */

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.65rem 1.4rem;
    border-radius: 999px;
    border: 1px solid transparent;
    font-weight: 600;
    font-size: 0.95rem;
    cursor: pointer;
    text-decoration: none;
    transition: background-color 0.15s, color 0.15s, border-color 0.15s, box-shadow 0.15s;
}

.btn-primary {
    background-color: #ffffff;
    color: #0891b2;
    border-color: #ffffff;
}

.btn-primary:hover,
.btn-primary:focus {
    background-color: #f0fbff;
    text-decoration: none;
    box-shadow: 0 0.3rem 0.9rem rgba(255, 255, 255, 0.3);
}



/* ========================================
   SEZIONI GENERICHE
   ======================================== */

.section-padding {
    padding: 3rem 0;
}

.section-light {
    background-color: #ffffff;
}

/* ========================================
   HERO SLIDESHOW
   ======================================== */

.hero {
    position: relative;
    height: 520px;
    overflow: hidden;
}

.slideshow-container {
    position: absolute;
    inset: 0;
    overflow: hidden;
}

.slideshow-track {
    display: flex;
    height: 100%;
    transition: transform 1s ease-in-out;
}

.slide {
    min-width: 100%;
    height: 100%;
}

.slide img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.hero-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, rgba(8, 145, 178, 0.25), rgba(14, 116, 144, 0.2));
    z-index: 1;
}

.hero-content {
    position: relative;
    z-index: 2;
    height: 100%;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: flex-end;
    color: white;
    padding: 0 2rem 0 1rem;
}

.hero-content > div {
    background: rgba(8, 145, 178, 0.92);
    padding: 2rem 2.5rem;
    max-width: 520px;
    clip-path: polygon(0 0, 100% 0, 100% 100%, 8% 100%);
}

.hero-content h1 {
    font-size: 2.2rem;
    font-weight: 900;
    margin-bottom: 0.75rem;
    letter-spacing: -0.01em;
    line-height: 1.15;
}

.hero-subtitle {
    font-size: 1rem;
    font-weight: 400;
    line-height: 1.6;
}

/* ========================================
   PAGE HERO (pagine interne)
   ======================================== */

.page-hero {
    padding: 2.5rem 0 2rem;
}

.page-hero h1 {
    font-size: 1.8rem;
    font-weight: 900;
    margin-bottom: 0.75rem;
    color: #0b1020;
}

.page-hero p {
    max-width: 640px;
    color: #495057;
}

/* ========================================
   TWO COLUMN
   ======================================== */

.two-column {
    display: grid;
    grid-template-columns: 1fr;
    gap: 2rem;
}

.two-column-text p + p {
    margin-top: 0.75rem;
}

.two-column-image img {
    border-radius: 0.75rem;
    box-shadow: 0 0.75rem 2rem rgba(0, 0, 0, 0.08);
    max-width: 350px;
    margin: 0 auto;
    width: 100%;
    height: auto;
    object-fit: contain;
}

/* ========================================
   CARD GENERICA (contatti)
   ======================================== */

.card {
    background-color: #ffffff;
    border-radius: 0.9rem;
    padding: 1.25rem;
    box-shadow: 0 0.5rem 1.25rem rgba(0, 0, 0, 0.06);
}



/* ========================================
   CONTATTI
   ======================================== */

.contact-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 1.25rem;
}

.contact-grid h3 { margin-bottom: 0.3rem; }

.contact-box {
    background-color: #0891b2;
    color: #ffffff;
    padding: 1.25rem 0;
}

.contact-box-inner {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    font-size: 0.95rem;
}

.contact-box a {
    color: #ffc107;
    font-weight: 600;
}

.contact-box-title {
    font-weight: 700;
    font-size: 1.05rem;
}

/* Mappa 100% responsive */
.map-wrapper {
    margin-top: 1rem;
    border-radius: 0.9rem;
    overflow: hidden;
    box-shadow: 0 0.75rem 2rem rgba(0, 0, 0, 0.08);
    position: relative;
    padding-bottom: 56%;
    height: 0;
}

.map-wrapper iframe {
    position: absolute;
    top: 0;
    left: 0;
    width: 100% !important;
    height: 100% !important;
    border: 0;
}



/* ========================================
   SOCIAL LINKS (nella pagina contatti)
   ======================================== */

.social-section {
    margin-top: 2.5rem;
    text-align: center;
    padding: 1.5rem 0;
    border-top: 1px solid #e9ecef;
}

.social-section h3 {
    font-size: 1.3rem;
    margin-bottom: 1rem;
    color: #0b1020;
}

.social-links {
    display: flex;
    justify-content: center;
    gap: 1.8rem;
    flex-wrap: wrap;
}

.social-links a {
    display: inline-flex;
    align-items: center;
    gap: 0.6rem;
    background-color: #f8f9fa;
    padding: 0.6rem 1.2rem;
    border-radius: 2.5rem;
    color: #0891b2;
    font-weight: 600;
    font-size: 1rem;
    transition: all 0.2s ease;
    border: 1px solid #e0e7ef;
}

.social-links a i {
    font-size: 1.2rem;
}

.social-links a:hover {
    background-color: #0891b2;
    color: #ffffff;
    border-color: #0891b2;
    transform: translateY(-2px);
    text-decoration: none;
}

.social-note {
    margin-top: 1.2rem;
    font-size: 0.9rem;
    color: #6c757d;
}



/* ========================================
   NUOVA PAGINA SERVIZI
   ======================================== */

.services-category-header {
    display: flex;
    align-items: center;
    gap: 1.25rem;
    margin-bottom: 2rem;
    padding-bottom: 1.25rem;
    border-bottom: 2px solid #e9ecef;
    flex-wrap: wrap;
    justify-content: center;
    text-align: center;
}

.services-category-header h2 {
    font-size: 1.6rem;
    font-weight: 900;
    color: #0b1020;
    margin: 0;
}

.category-badge {
    display: inline-block;
    font-size: 1.35rem;
    font-weight: 900;
    letter-spacing: 0.03em;
    padding: 0.45rem 1.4rem;
    border-radius: 2rem;
    margin-bottom: 0.5rem;
    white-space: nowrap;
}

.category-badge--blue { background-color: #0891b2; color: #fff; }
.category-badge--green { background-color: #0e7490; color: #fff; }

.services-section { padding: 56px 0; }
.services-section.services-section--alt { background-color: #f0f7ff; }

/* ── Section visibility (filtri) ── */
.services-section.hidden {
    display: none;
}

/* ── Filter buttons ── */
.services-filter {
    background: #f8f9fa;
    border-bottom: 1px solid #e9ecef;
    position: sticky;
    top: 68px; /* altezza approssimativa dell'header */
    z-index: 100;
}

.services-filter__inner {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    padding: 0.85rem 0;
    align-items: center;
    justify-content: center;
}

.filter-btn {
    padding: 0.55rem 1.2rem;
    border: 2px solid #c8d8e8;
    border-radius: 2rem;
    background: #fff;
    color: #2c4a6e;
    font-family: 'Lato', sans-serif;
    font-size: 0.875rem;
    font-weight: 700;
    cursor: pointer;
    transition: background 0.2s, color 0.2s, border-color 0.2s;
    white-space: nowrap;
}

.filter-btn:hover {
    background: #2c4a6e;
    color: #fff;
    border-color: #2c4a6e;
}

.filter-btn.active {
    background: #2c4a6e;
    color: #fff;
    border-color: #2c4a6e;
}

/* ── Griglia servizi ── */
.svc-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1.25rem;
    align-items: stretch;
}

.svc-card--wide {
    grid-column: 1 / -1;
}

.svc-card--wide .svc-card__tags {
    columns: 3;
    column-gap: 2rem;
}

.svc-card--wide .svc-card__doctors {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem 2rem;
}

.svc-card {
    background: #ffffff;
    border: 1px solid #dce6f0;
    border-top: 5px solid #0891b2;
    border-radius: 12px;
    padding: 22px 22px;
    display: flex;
    flex-direction: column;
    gap: 14px;
    transition: box-shadow 0.2s, transform 0.2s;
}

.svc-card:hover {
    box-shadow: 0 12px 32px rgba(8, 145, 178, 0.14);
    transform: translateY(-3px);
}

.services-section--alt .svc-card { border-top-color: #0891b2; }

.svc-card__title {
    font-size: 1.15rem;
    font-weight: 900;
    color: #0b1020;
    margin: 0;
    line-height: 1.3;
}

.svc-card__tags {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    list-style: none;
    padding: 0; margin: 0;
}

.svc-details {
    border: 1px solid #dce6f0;
    border-radius: 12px;
    background: #f7fbff;
    padding: 10px 12px;
}

.svc-details__summary {
    cursor: pointer;
    font-weight: 800;
    color: #0b1020;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    user-select: none;
}

.svc-details__summary::marker { content: ""; }

.svc-details__summary::after {
    content: "▾";
    font-size: 0.95rem;
    color: #0e5f7a;
    transition: transform 0.2s ease;
}

.svc-details[open] .svc-details__summary::after { transform: rotate(180deg); }

.svc-details .svc-card__tags { margin-top: 10px; }

.svc-card__tags li {
    font-size: 0.84rem;
    font-weight: 600;
    color: #0e5f7a;
    background: #e0f2f8;
    padding: 5px 12px;
    border-radius: 30px;
}

.svc-card__sep {
    height: 1px;
    background: #dce6f0;
    margin: 0;
    margin-top: auto;
}

.svc-card__doctors { display: flex; flex-direction: column; gap: 7px; }

.svc-card__doctor {
    font-size: 0.95rem;
    font-weight: 700;
    color: #1a4f6e;
    padding-left: 14px;
    position: relative;
    line-height: 1.4;
}

.svc-card__doctor::before {
    content: '';
    position: absolute;
    left: 0; top: 0.55em;
    width: 6px; height: 6px;
    border-radius: 50%;
    background: #0891b2;
}

/* ========================================
   NEWS PAGE
   ======================================== */

.news-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 2rem;
}

.news-card {
    background: #ffffff;
    border-radius: 0.9rem;
    overflow: hidden;
    box-shadow: 0 0.5rem 1.25rem rgba(0, 0, 0, 0.06);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.news-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 1rem 2rem rgba(8, 145, 178, 0.1);
}

.news-image {
    width: 100%;
    height: 200px;
    object-fit: cover;
    background-color: #e9ecef;
}

.news-content {
    padding: 1.5rem;
}

.news-date {
    font-size: 0.85rem;
    color: #0891b2;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.03em;
    margin-bottom: 0.5rem;
}

.news-title {
    font-size: 1.3rem;
    font-weight: 900;
    margin-bottom: 0.75rem;
    color: #0b1020;
}

.news-excerpt {
    color: #495057;
    margin-bottom: 1rem;
    line-height: 1.5;
}



/* ========================================
   FOOTER
   ======================================== */

.main-footer {
    background-color: #0b1020;
    color: #f8f9fa;
    margin-top: 3rem;
    padding-top: 2.5rem;
}

.footer-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 1.75rem;
    font-size: 0.9rem;
}

.main-footer a { color: #93d5e8; }
.main-footer a:hover { color: #ffffff; }

.main-footer h3 {
    font-size: 1rem;
    font-weight: 700;
    margin-bottom: 0.75rem;
    color: #ffffff;
}

.footer-links { list-style: none; }
.footer-links li + li { margin-top: 0.3rem; }
.footer-links a { color: #adb5bd; }
.footer-links a:hover { color: #ffffff; text-decoration: underline; }

/* Icone social nella colonna contatti del footer */
.footer-social {
    display: flex;
    gap: 0.75rem;
    margin-top: 1rem;
}

.footer-social a {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 2.25rem;
    height: 2.25rem;
    border-radius: 50%;
    background-color: rgba(248, 249, 250, 0.08);
    border: 1px solid rgba(248, 249, 250, 0.18);
    color: #93d5e8;
    font-size: 1.05rem;
    transition: all 0.2s ease;
}

.footer-social a:hover {
    background-color: #0891b2;
    border-color: #0891b2;
    color: #ffffff;
    transform: translateY(-2px);
    text-decoration: none;
}

.footer-bottom {
    border-top: 1px solid rgba(248, 249, 250, 0.08);
    margin-top: 2rem;
    padding: 1rem 0 0.5rem;
    text-align: center;
    font-size: 0.8rem;
    color: #6c757d;
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 1rem;
}

.footer-bottom a { color: #6c757d; }
.footer-bottom a:hover { color: #ffffff; }

/* Blocco di chiusura footer: link alla recensione Google */
.footer-review {
    text-align: center;
    padding: 0.6rem 1rem 1.75rem;
    border-top: 1px solid rgba(248, 249, 250, 0.06);
    margin-top: 0.25rem;
}

.footer-review a {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    color: #93d5e8;
    font-weight: 700;
    font-size: 0.95rem;
}

.footer-review a:hover { color: #ffffff; text-decoration: none; }
.footer-review i { color: #f5b942; }

/* ========================================
   UTILITY
   ======================================== */

.box-desktop { display: none; }

:focus-visible {
    outline: 2px solid #0891b2;
    outline-offset: 2px;
}

/* ========================================
   TABLET (≥ 768px)
   ======================================== */

@media (min-width: 768px) {
    .cta-short { display: none; }
    .cta-long { display: inline; }

    .hero { height: 540px; }
    .hero-content h1 { font-size: 2.4rem; }
    .page-hero { padding: 3.5rem 0 2.5rem; }

    .two-column {
        grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr);
        align-items: center;
    }

    .two-column-image { display: block; }

    .cards-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
    .services-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .contact-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); }
    .doctors-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }

    .doctor-card { flex-direction: row; align-items: flex-start; }
    .doctor-photo { width: 40%; }

    .contact-box-inner {
        flex-direction: row;
        justify-content: space-between;
        align-items: center;
    }

    .footer-grid { grid-template-columns: 1.4fr 1fr 1fr; }

    .box-desktop { display: block; }

    /* Servizi: 2 colonne */
    .svc-grid { grid-template-columns: repeat(2, 1fr); gap: 1.5rem; }
    .svc-card--wide { grid-column: span 2; }
    .svc-card--wide .svc-card__tags { columns: 2; }
    .svc-card { padding: 26px 26px; gap: 16px; }
    .svc-card__title { font-size: 1.2rem; }
    .svc-card__doctor { font-size: 1rem; }

    .services-jump { padding: 26px 0 0; }
    .services-jump__link { font-size: 0.95rem; padding: 10px 16px; }

    .svc-details { border: 0; padding: 0; background: transparent; }
    .svc-details__summary { display: none; }
    .svc-details .svc-card__tags { margin-top: 0; }

    .services-section { padding: 56px 0; }

    /* News grid */
    .news-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

/* ========================================
   DESKTOP (≥ 1024px)
   ======================================== */

@media (min-width: 1024px) {
    .hero { height: 600px; }
    .hero-content h1 { font-size: 2.8rem; }

    /* Servizi: 3 colonne */
    .svc-grid { grid-template-columns: repeat(3, 1fr); gap: 1.75rem; }
    .svc-card--wide { grid-column: 1 / -1; }
    .svc-card--wide .svc-card__tags { columns: 3; }
    .svc-card { padding: 28px 28px; }
    .svc-card__title { font-size: 1.25rem; }

    /* News grid */
    .news-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}



/* ========================================
   MOBILE NAV (≤ 767px)
   ======================================== */

@media (max-width: 767.98px) {
    html { font-size: clamp(16px, 4.6vw, 18px); }

    body { line-height: 1.65; overflow-x: hidden; }

    .header-inner { padding: 0.6rem 0; gap: 0.75rem; }

    .logo {
        flex: 1 1 auto;
        min-width: 0;
    }

    .logo-mark { width: 2.6rem; height: 2.6rem; }

    .logo-text {
        font-size: 1rem;
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
    }

    .main-nav {
        display: block;
        position: absolute;
        top: 100%;
        left: 0; right: 0;
        background: linear-gradient(135deg, #0891b2 0%, #0e7490 100%);
        border-bottom: 3px solid rgba(255, 255, 255, 0.15);
        box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
        z-index: 999;
        border-radius: 0 0 14px 14px;
        max-height: 0;
        overflow: hidden;
        opacity: 0;
        transform: translateY(-8px);
        visibility: hidden;
        pointer-events: none;
        transition: max-height 0.25s ease, opacity 0.2s ease, transform 0.2s ease;
    }

    .main-nav.is-open {
        max-height: 70vh;
        opacity: 1;
        transform: translateY(0);
        visibility: visible;
        pointer-events: auto;
    }

    .main-nav ul {
        flex-direction: column;
        padding: 0.5rem 1rem 1rem;
        gap: 0;
    }

    .main-nav li { border-bottom: 1px solid rgba(255, 255, 255, 0.1); }
    .main-nav li:last-child { border-bottom: none; }

    .main-nav a {
        display: block;
        padding: 0.95rem 0.25rem;
        font-size: 1.05rem;
        border-radius: 0.55rem;
    }

    .main-nav a.active {
        border-bottom: 0;
        color: #ffffff;
        background: rgba(255, 255, 255, 0.14);
        padding-left: 0.85rem;
    }

    .nav-toggle {
        display: inline-flex;
        width: 2.75rem;
        height: 2.75rem;
        touch-action: manipulation;
    }

    .header-cta .btn {
        padding: 0.6rem 0.9rem;
        font-size: 0.92rem;
    }

    /* Hero */
    .hero { height: min(360px, 60vh); }

    .hero-content {
        align-items: center;
        padding: 0 1rem;
    }

    .hero-content > div {
        clip-path: none;
        max-width: 100%;
        padding: 1.25rem 1.5rem;
        border-radius: 8px;
        text-align: center;
        box-shadow: 0 10px 26px rgba(0, 0, 0, 0.18);
    }

    .hero-content h1 { font-size: 1.65rem; margin-bottom: 0.6rem; }
    .hero-subtitle { font-size: 1rem; }

    /* Page hero */
    .page-hero { padding: 1.75rem 0 1.25rem; }
    .page-hero h1 { font-size: 1.55rem; }
    .page-hero p { font-size: 1rem; }

    h2 { font-size: 1.4rem; line-height: 1.25; }
    h3 { font-size: 1.1rem; line-height: 1.3; }
    p { font-size: 1rem; }

    /* Two column: immagine centrata, full-width su mobile */
    .two-column { gap: 1.5rem; }

    .two-column-image {
        display: block;
        width: 100%;
    }

    .two-column-image img {
        width: 100%;
        max-width: 100%;
        max-height: none;
        height: auto;
        object-fit: contain;
        border-radius: 0.75rem;
        box-shadow: 0 0.5rem 1.5rem rgba(0,0,0,0.1);
        margin: 0 auto;
    }

    /* Immagini ritratto (es. interno1.jpeg su servizi): mostra come banner orizzontale
       Si applica solo a immagini con attributo height HTML esplicito (non il logo) */
    .two-column-image img[height] {
        height: 240px;
        max-height: 240px;
        width: 100%;
        object-fit: cover;
        object-position: center 25%;
        border-radius: 0.75rem;
    }

    /* Logo chi-siamo: sovrascrive gli stili generici — nessun clip, nessuna ombra */
    .chi-siamo-logo {
        border-radius: 0 !important;
        box-shadow: none !important;
        max-height: none !important;
        object-fit: contain !important;
        width: min(85vw, 340px);
        padding: 0.5rem 1rem;
    }

    /* Servizi */
    .services-section { padding: 28px 0; }

    .svc-grid { grid-template-columns: 1fr; gap: 1rem; }
    .svc-card--wide { grid-column: span 1; }
    .svc-card--wide .svc-card__tags { columns: 1; }
    .svc-card {
        padding: 18px 16px;
        gap: 12px;
        border-top-width: 4px;
        /* evita che le card siano troppo dense: hover rimosso su touch */
    }
    .svc-card:hover { transform: none; box-shadow: none; }
    .svc-card__title { font-size: 1.05rem; }
    .svc-card__tags li { font-size: 0.85rem; padding: 5px 11px; }
    .svc-card__doctor { font-size: 0.93rem; }

    /* Puntino medico più visibile su touch */
    .svc-card__doctor::before { width: 7px; height: 7px; }

    .services-category-header {
        gap: 0.5rem;
        margin-bottom: 1.25rem;
        padding-bottom: 0.9rem;
    }

    .services-category-header h2 { font-size: 1.35rem; }
    .category-badge { font-size: 1rem; padding: 0.38rem 1rem; white-space: normal; text-align: center; }

    /* Filter buttons: scroll orizzontale su mobile per non andare a capo */
    .services-filter {
        top: 62px; /* altezza header su mobile */
    }
    .services-filter__inner {
        flex-wrap: nowrap;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
        justify-content: flex-start;
        gap: 0.45rem;
        padding: 0.7rem 1rem;
        scrollbar-width: none;
    }
    .services-filter__inner::-webkit-scrollbar { display: none; }
    .filter-btn {
        font-size: 0.82rem;
        padding: 0.48rem 0.95rem;
        flex-shrink: 0;
        min-height: 2.4rem; /* touch target */
    }

    /* Contact */
    .contact-box { padding: 1.1rem 0; }

    .contact-box.box-desktop { display: block; }

    .contact-box-inner {
        text-align: center;
        gap: 0.35rem;
        font-size: 1rem;
    }

    /* Footer */
    .main-footer {
        margin-top: 1.5rem;
        padding-top: 1.25rem;
        /* rimosso max-height e overflow:auto che causavano scroll interno */
    }

    .footer-grid { gap: 0.9rem; font-size: 0.9rem; }

    .footer-grid > div:nth-child(2) { display: none; }

    .main-footer h3 { margin-bottom: 0.4rem; font-size: 0.95rem; }
    .main-footer p { font-size: 0.9rem; }
    .main-footer p + p { margin-top: 0.35rem; }
    .footer-links li + li { margin-top: 0.2rem; }

    .footer-social {
        margin-top: 0.85rem;
    }

    .footer-bottom {
        flex-direction: column;
        gap: 0.3rem;
        margin-top: 0.75rem;
        padding: 0.6rem 0;
        font-size: 0.78rem;
    }

    .footer-bottom p { margin: 0; }

    .footer-review {
        padding: 0.5rem 1rem 1.25rem;
    }
    .footer-review a { font-size: 0.85rem; }

    /* Section padding */
    .section-padding { padding: 2rem 0; }

    .btn { padding: 0.75rem 1.25rem; }

    /* Social links su mobile */
    .social-links {
        gap: 1rem;
    }
    .social-links a {
        padding: 0.5rem 1rem;
        font-size: 0.85rem;
    }
}

/* ========================================
   SMALL MOBILE (≤ 380px)
   ======================================== */

@media (max-width: 380px) {
    .logo-mark { width: 2.35rem; height: 2.35rem; }
    .logo-text { font-size: 0.9rem; }
    .hero { height: 260px; }
    .hero-content h1 { font-size: 1.3rem; }
    .svc-card__title { font-size: 0.98rem; }
    .btn-primary {display: none;}
}
/* ========================================
   TWO-COLUMN CON NEWS PANEL (homepage)
   ======================================== */

.two-column--with-news {
    grid-template-columns: 1fr;
    align-items: start;
    gap: 2rem;
}

@media (min-width: 768px) {
    .two-column--with-news {
        grid-template-columns: 1fr 1fr;
        align-items: center;
        gap: 2rem;
    }
}

@media (min-width: 1024px) {
    .two-column--with-news {
        grid-template-columns: 1.15fr 0.85fr;
        align-items: center;
        gap: 2.5rem;
    }
}

/* ========================================
   NEWS CAROUSEL (nc) — homepage
   ======================================== */

.home-news-panel {
    width: 100%;
    min-width: 0; /* evita overflow in grid */
}



.nc {
    background: #fff;
    border: 1px solid #dce6f0;
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 8px 28px rgba(8, 145, 178, 0.10);
    display: flex;
    flex-direction: column;
}

/* Header */
.nc__header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: linear-gradient(135deg, #0891b2 0%, #0e7490 100%);
    padding: 0.75rem 1.1rem;
}

.nc__label {
    font-size: 0.78rem;
    font-weight: 900;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: #fff;
}

.nc__all-link {
    font-size: 0.78rem;
    font-weight: 700;
    color: rgba(255,255,255,0.85);
    text-decoration: none;
    transition: color 0.2s;
    white-space: nowrap;
}

.nc__all-link:hover { color: #fff; text-decoration: underline; }

/* Viewport + sliding track */
.nc__viewport {
    overflow: hidden;
    position: relative;
}

.nc__track {
    display: flex;
    transition: transform 0.45s cubic-bezier(0.4, 0, 0.2, 1);
    will-change: transform;
}

/* Singola card */
.nc__card {
    min-width: 100%;
    width: 100%;
    flex-shrink: 0;
    display: flex;
    flex-direction: column;
    /* visibilità gestita via JS con aria-hidden */
}

.nc__card[aria-hidden="true"]  { visibility: hidden; pointer-events: none; }
.nc__card[aria-hidden="false"] { visibility: visible; pointer-events: auto; }

.nc__card-img-wrap {
    display: block;
    overflow: hidden;
    aspect-ratio: 16 / 7;
    background: #e0f2f8;
    flex-shrink: 0;
}

.nc__card-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform 0.4s ease;
}

.nc__card-img-wrap:hover .nc__card-img { transform: scale(1.04); }

.nc__card-body {
    padding: 0.9rem 1.1rem 1rem;
    display: flex;
    flex-direction: column;
    gap: 0.3rem;
    flex: 1;
}

.nc__card-date {
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: #0891b2;
}

.nc__card-title {
    font-size: 0.97rem;
    font-weight: 900;
    line-height: 1.3;
    margin: 0;
    color: #0b1020;
}

.nc__card-title a {
    color: inherit;
    text-decoration: none;
    transition: color 0.2s;
}

.nc__card-title a:hover { color: #0891b2; text-decoration: none; }

.nc__card-excerpt {
    font-size: 0.85rem;
    color: #495057;
    line-height: 1.55;
    margin: 0;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.nc__card-link {
    font-size: 0.82rem;
    font-weight: 700;
    color: #0891b2;
    text-decoration: none;
    margin-top: 0.25rem;
    align-self: flex-start;
    transition: color 0.2s;
}

.nc__card-link:hover { color: #0e7490; text-decoration: underline; }

/* Footer: frecce + dots */
.nc__footer {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.55rem;
    padding: 0.6rem 1rem;
    border-top: 1px solid #e9ecef;
    background: #f8fbff;
}

.nc__arrow {
    width: 1.9rem;
    height: 1.9rem;
    border-radius: 50%;
    border: 1.5px solid #c8d8e8;
    background: #fff;
    color: #0891b2;
    font-size: 1.25rem;
    line-height: 1;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    transition: background 0.2s, border-color 0.2s, color 0.2s;
    flex-shrink: 0;
    padding: 0;
    touch-action: manipulation;
}

.nc__arrow:hover { background: #0891b2; border-color: #0891b2; color: #fff; }

.nc__dots {
    display: flex;
    gap: 0.45rem;
    align-items: center;
}

.nc__dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    border: none;
    background: #c8d8e8;
    cursor: pointer;
    padding: 0;
    transition: background 0.2s, transform 0.2s;
    flex-shrink: 0;
    touch-action: manipulation;
}

.nc__dot--active { background: #0891b2; transform: scale(1.35); }

/* ── Mobile ≤ 767px ── */
@media (max-width: 767.98px) {
    .home-news-panel { margin-top: 0.5rem; }

    .nc__card-img-wrap { aspect-ratio: 16 / 6; }

    .nc__card-body {
        padding: 0.75rem 0.9rem 0.8rem;
        gap: 0.25rem;
    }

    .nc__card-title  { font-size: 0.92rem; }
    .nc__card-excerpt { -webkit-line-clamp: 2; line-clamp: 2; font-size: 0.83rem; }

    .nc__arrow { width: 2.2rem; height: 2.2rem; font-size: 1.4rem; } /* target più grande al touch */
}

/* ── Small mobile ≤ 380px ── */
@media (max-width: 380px) {
    .nc__card-img-wrap { aspect-ratio: 16 / 5; }
    .nc__card-body { padding: 0.65rem 0.8rem 0.7rem; }
    .nc__card-title { font-size: 0.88rem; }
    .nc__card-excerpt { display: none; } /* su schermi minuscoli, mostra solo titolo e data */
}

/* ========================================
   PAGINA: IL NOSTRO TEAM
   ======================================== */

.doctors-section {
    padding: 3rem 0 4rem;
}
.doctors-section.hidden {
    display: none;
}

.doctors-category {
    padding: 3rem 0 3.5rem;
}
.doctors-category:first-of-type {
    padding-top: 0;
}

.doctors-category-header {
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    gap: 1rem;
    margin-bottom: 2rem;
    padding-bottom: 1rem;
    border-bottom: 2px solid #e9ecef;
}

.doctors-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1.75rem;
}

.doctor-card {
    background: #ffffff;
    border: 1px solid #dce6f0;
    border-top: 5px solid #0891b2;
    border-radius: 12px;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    transition: box-shadow 0.2s, transform 0.2s;
}
.doctor-card:hover {
    box-shadow: 0 12px 32px rgba(8, 145, 178, 0.14);
    transform: translateY(-4px);
}

.doctor-photo-wrap {
    width: 100%;
    aspect-ratio: 3 / 4;
    overflow: hidden;
    background: #e8f4f8;
    flex-shrink: 0;
}
.doctor-photo-wrap img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center top;
    display: block;
}
.doctor-photo-placeholder {
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #e0f2f8 0%, #cce9f4 100%);
    gap: 0.5rem;
}
.doctor-photo-placeholder svg {
    width: 72px;
    height: 72px;
    color: #0891b2;
    opacity: 0.4;
}
.doctor-photo-placeholder span {
    font-size: 0.73rem;
    font-weight: 700;
    color: #0891b2;
    opacity: 0.55;
    letter-spacing: 0.05em;
    text-transform: uppercase;
}

.doctor-card-body {
    padding: 1.2rem 1.25rem 1.4rem;
    display: flex;
    flex-direction: column;
    gap: 0.55rem;
    flex: 1;
}
.doctor-specialties {
    display: flex;
    flex-wrap: wrap;
    gap: 5px;
}
.doctor-specialty-tag {
    font-size: 0.75rem;
    font-weight: 700;
    color: #0e5f7a;
    background: #e0f2f8;
    padding: 3px 10px;
    border-radius: 30px;
    white-space: nowrap;
}
.doctor-name {
    font-size: 1.05rem;
    font-weight: 900;
    color: #0b1020;
    line-height: 1.25;
    margin: 0;
}
.doctor-bio {
    font-size: 0.87rem;
    color: #495057;
    line-height: 1.6;
    flex: 1;
}
.doctor-role {
    font-size: 0.8rem;
    font-weight: 600;
    color: #0e7490;
    margin: 4px 0 6px;
    font-style: italic;
}

.category-badge--physio { background-color: #0e7490; color: #fff; }
.category-badge--pro    { background-color: #2c4a6e; color: #fff; }

/* ── Tablet 768–1023px ── */
@media (min-width: 768px) and (max-width: 1023px) {
    .doctors-grid { grid-template-columns: repeat(2, 1fr); gap: 1.25rem; }
}

/* ── Mobile ≤ 767px ── */
@media (max-width: 767.98px) {
    .doctors-section { padding: 1.5rem 0 2.5rem; }
    .doctors-category { padding: 1.75rem 0 2rem; }
    .doctors-category-header { margin-bottom: 1.25rem; }
    .doctors-grid { grid-template-columns: repeat(2, 1fr); gap: 0.85rem; }
    .doctor-card { border-top-width: 4px; }
    .doctor-card:hover { transform: none; box-shadow: none; }
    .doctor-card-body { padding: 0.75rem 0.8rem 1rem; gap: 0.4rem; }
    .doctor-name { font-size: 0.85rem; }
    .doctor-specialty-tag { font-size: 0.68rem; padding: 2px 8px; white-space: normal; word-break: break-word; }
    .doctor-bio {
        font-size: 0.8rem;
        line-height: 1.5;
        display: -webkit-box;
        -webkit-line-clamp: 4;
        line-clamp: 4;
        -webkit-box-orient: vertical;
        overflow: hidden;
    }
}

/* ── Small mobile ≤ 380px ── */
@media (max-width: 380px) {
    .doctors-grid { grid-template-columns: 1fr; gap: 1rem; }
}


/* ========================================
   PAGINA: CHI SIAMO — logo
   ======================================== */

.two-column-image--logo {
    display: flex;
    align-items: center;
    justify-content: center;
}
.chi-siamo-logo {
    width: 100%;
    max-width: 420px;
    height: auto;
    border-radius: 0;
    box-shadow: none;
    mix-blend-mode: multiply;
    object-fit: contain;
    display: block;
    margin: 0 auto;
}
@media (min-width: 768px) {
    .chi-siamo-logo {
        max-width: 380px;
        filter: drop-shadow(0 8px 24px rgba(8, 145, 178, 0.12));
    }
}
@media (max-width: 767.98px) {
    .chi-siamo-logo {
        max-width: 85vw;
        margin: 0 auto;
        padding: 0 1rem;
    }
}


/* ========================================
   PAGINA: NEWS — lightbox & immagini
   ======================================== */

.news-image-wrap {
    position: relative;
    overflow: hidden;
    border-radius: 8px 8px 0 0;
}
.news-image--clickable {
    cursor: zoom-in;
    transition: transform 0.3s ease;
    display: block;
    width: 100%;
}
.news-image--clickable:hover { transform: scale(1.04); }
.news-image-hint {
    position: absolute;
    bottom: 8px;
    right: 10px;
    background: rgba(0, 0, 0, 0.6);
    color: #fff;
    font-size: 0.72rem;
    padding: 3px 9px;
    border-radius: 20px;
    pointer-events: none;
    opacity: 0;
    transition: opacity 0.25s;
    backdrop-filter: blur(4px);
}
.news-image-wrap:hover .news-image-hint { opacity: 1; }

.news-lightbox {
    position: fixed;
    inset: 0;
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.3s ease;
    pointer-events: none;
}
.news-lightbox.lb-open {
    opacity: 1;
    pointer-events: all;
}
.news-lightbox__backdrop {
    position: absolute;
    inset: 0;
    backdrop-filter: blur(18px) saturate(0.7);
    -webkit-backdrop-filter: blur(18px) saturate(0.7);
    background: rgba(10, 10, 20, 0.55);
    cursor: pointer;
}
.news-lightbox__backdrop::after {
    content: '';
    position: absolute;
    inset: 0;
    background: radial-gradient(
        ellipse 70% 70% at 50% 50%,
        transparent 40%,
        rgba(0, 0, 0, 0.75) 100%
    );
    pointer-events: none;
}
.news-lightbox__box {
    position: relative;
    z-index: 1;
    max-width: 92vw;
    max-height: 90vh;
    display: flex;
    align-items: center;
    justify-content: center;
    transform: scale(0.92);
    transition: transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}
.news-lightbox.lb-open .news-lightbox__box { transform: scale(1); }
.news-lightbox__img {
    max-width: 88vw;
    max-height: 84vh;
    border-radius: 10px;
    box-shadow: 0 16px 60px rgba(0, 0, 0, 0.7), 0 0 0 1px rgba(255, 255, 255, 0.08);
    object-fit: contain;
    display: block;
}
.news-lightbox__close {
    position: absolute;
    top: -16px;
    right: -16px;
    width: 38px;
    height: 38px;
    border-radius: 50%;
    background: #fff;
    border: none;
    cursor: pointer;
    font-size: 1rem;
    font-weight: bold;
    color: #333;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 3px 12px rgba(0, 0, 0, 0.5);
    transition: background 0.15s, transform 0.15s;
}
.news-lightbox__close:hover { background: #f0f0f0; transform: scale(1.1); }
