/* ============================================================
   STILE SEZIONE MEDICA
   ============================================================ */

/* --- PROFILO MEDICO --- */
.profilo-medico {
    display: flex;
    gap: 48px;
    align-items: flex-start;
}
.profilo-foto {
    width: 220px;
    flex-shrink: 0;
    text-align: center;
}
.profilo-foto img {
    width: 180px;
    height: 180px;
    border-radius: 50%;
    object-fit: cover;
    border: 4px solid var(--blue-100);
    margin-bottom: 12px;
}
.profilo-foto .foto-placeholder {
    width: 180px;
    height: 180px;
    border-radius: 50%;
    background: var(--blue-100);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 4rem;
    margin: 0 auto 12px;
}
.profilo-info { flex: 1; }
.profilo-titolo { color: var(--primary); font-size: 1rem; margin-bottom: 8px; }
.profilo-ordine { color: var(--text-light); font-size: 0.85rem; margin-bottom: 20px; }
.profilo-tags { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 24px; }
.tag {
    background: var(--blue-50);
    color: var(--blue-700);
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 0.82rem;
    font-weight: 500;
}

/* --- SEDI --- */
.sedi-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 24px; }
.sede-card {
    background: var(--white);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    overflow: hidden;
    box-shadow: var(--shadow);
    transition: box-shadow var(--transition), transform var(--transition);
}
.sede-card:hover { box-shadow: var(--shadow-lg); transform: translateY(-2px); }
.sede-card-header {
    background: linear-gradient(135deg, var(--blue-700), var(--blue-600));
    color: var(--white);
    padding: 20px 24px;
}
.sede-card-header h3 { color: var(--white); font-size: 1.1rem; margin-bottom: 4px; }
.sede-card-header p { color: var(--blue-100); font-size: 0.85rem; margin: 0; }
.sede-card-body { padding: 20px 24px; }
.sede-info-row {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    margin-bottom: 12px;
    font-size: 0.9rem;
}
.sede-info-row .icon { width: 18px; flex-shrink: 0; color: var(--primary); margin-top: 2px; }
.sede-prezzo {
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: var(--blue-50);
    border-radius: var(--radius);
    padding: 12px 16px;
    margin-top: 16px;
}
.sede-prezzo-amount { font-size: 1.5rem; font-weight: 700; color: var(--primary); }
.sede-pagamento { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 12px; }
.pagamento-tag {
    background: var(--gray-100);
    color: var(--gray-600);
    padding: 3px 10px;
    border-radius: 20px;
    font-size: 0.78rem;
}

/* --- BOOKING CALENDAR --- */
.booking-wizard {
    display: grid;
    grid-template-columns: 1fr 360px;
    gap: 32px;
    align-items: start;
}
.booking-steps {
    display: flex;
    align-items: center;
    margin-bottom: 32px;
    gap: 0;
}
.step-item {
    display: flex;
    align-items: center;
    flex: 1;
}
.step-circle {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: var(--gray-200);
    color: var(--gray-500);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 0.9rem;
    flex-shrink: 0;
    transition: all var(--transition);
}
.step-item.active .step-circle { background: var(--primary); color: var(--white); }
.step-item.done .step-circle { background: var(--green-500); color: var(--white); }
.step-label { font-size: 0.78rem; font-weight: 500; color: var(--gray-500); margin-left: 8px; white-space: nowrap; }
.step-item.active .step-label { color: var(--primary); }
.step-connector { flex: 1; height: 2px; background: var(--gray-200); margin: 0 8px; }
.step-connector.done { background: var(--green-500); }

/* --- CALENDAR WIDGET --- */
.cal-container {
    background: var(--white);
    border: 1px solid rgba(226, 232, 240, 0.8);
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 10px 30px rgba(0,0,0,0.03);
    transition: all 0.3s ease;
}
.cal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 20px 24px;
    background: linear-gradient(135deg, var(--blue-600) 0%, var(--blue-700) 100%);
    color: var(--white);
}
.cal-header h3 { color: var(--white); font-size: 1.05rem; margin: 0; font-weight: 700; letter-spacing: -0.01em; }
.cal-nav-btn {
    background: rgba(255,255,255,.15);
    border: none;
    color: var(--white);
    width: 36px;
    height: 36px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all var(--transition);
    font-size: 1.2rem;
    line-height: 1;
}
.cal-nav-btn:hover { background: rgba(255,255,255,.3); transform: scale(1.05); }
.cal-nav-btn:disabled { opacity: .35; cursor: not-allowed; transform: none; }
.cal-grid { padding: 20px; background: #fff; }
.cal-days-header {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    margin-bottom: 12px;
}
.cal-day-name {
    text-align: center;
    font-size: 0.78rem;
    font-weight: 700;
    color: var(--gray-400);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    padding: 4px;
}
.cal-days {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 6px;
}
.cal-day {
    aspect-ratio: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    font-size: 0.9rem;
    cursor: default;
    transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
    font-weight: 600;
    color: var(--gray-400);
    border: 2px solid transparent;
}
.cal-day.empty { background: transparent; }
.cal-day.past { color: var(--gray-300); text-decoration: line-through; opacity: 0.65; }
.cal-day.available {
    color: var(--blue-600);
    cursor: pointer;
    background: var(--blue-50);
}
.cal-day.available:hover { 
    background: var(--blue-600); 
    color: var(--white); 
    transform: scale(1.1);
    box-shadow: 0 4px 12px rgba(37,99,235,0.25);
}
.cal-day.selected { 
    background: var(--blue-600); 
    color: var(--white); 
    font-weight: 700;
    box-shadow: 0 4px 12px rgba(37,99,235,0.3);
    border-color: var(--blue-100);
}
.cal-day.today { 
    border-color: var(--blue-300);
    color: var(--blue-700);
}
.cal-day.today.available {
    color: var(--blue-600);
}
.cal-day.today.selected {
    color: var(--white);
    border-color: var(--blue-100);
}
.cal-day.today:not(.available):not(.selected) { color: var(--gray-400); border-color: var(--gray-200); }
.cal-loading { display: flex; align-items: center; justify-content: center; padding: 40px; color: var(--text-light); gap: 10px; font-weight: 500; }

/* --- SLOT ORARI --- */
.slots-container { margin-top: 24px; }
.slots-container h4 { font-size: 1.05rem; margin-bottom: 16px; font-weight: 700; color: var(--gray-800); }
.slots-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; }
.slot-btn {
    padding: 12px 8px;
    border: 1.5px solid var(--gray-200);
    border-radius: 12px;
    background: var(--white);
    font-size: 0.88rem;
    font-weight: 600;
    color: var(--gray-700);
    cursor: pointer;
    transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
    text-align: center;
}
.slot-btn:hover { 
    border-color: var(--blue-500); 
    color: var(--blue-600); 
    background: var(--blue-50);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(37,99,235,0.08);
}
.slot-btn.selected { 
    background: var(--blue-600); 
    color: var(--white); 
    border-color: var(--blue-600);
    box-shadow: 0 4px 12px rgba(37,99,235,0.2);
    transform: translateY(-2px);
}

/* --- RIEPILOGO PRENOTAZIONE --- */
.booking-summary {
    background: var(--white);
    border: 1px solid rgba(226, 232, 240, 0.8);
    border-radius: 16px;
    padding: 28px;
    position: sticky;
    top: 90px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.03);
}
.booking-summary h3 { font-size: 1.1rem; margin-bottom: 20px; padding-bottom: 12px; border-bottom: 1px solid var(--border); font-weight: 700; color: var(--gray-800); letter-spacing: -0.01em; }
.summary-row { display: flex; justify-content: space-between; align-items: flex-start; margin-bottom: 14px; font-size: 0.9rem; gap: 12px; }
.summary-label { color: var(--text-light); flex-shrink: 0; font-weight: 500; }
.summary-value { font-weight: 600; text-align: right; color: var(--gray-800); }
.summary-price { font-size: 1.5rem; font-weight: 800; color: var(--blue-600); }
.summary-divider { border: none; border-top: 1px solid var(--border); margin: 20px 0; }

/* --- PROFILO UTENTE --- */
.user-sidebar {
    width: 240px;
    flex-shrink: 0;
}
.user-sidebar-card {
    background: var(--white);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    overflow: hidden;
    box-shadow: var(--shadow);
}
.user-avatar {
    background: var(--primary);
    padding: 24px;
    text-align: center;
    color: var(--white);
}
.user-avatar-circle {
    width: 72px;
    height: 72px;
    border-radius: 50%;
    background: rgba(255,255,255,.2);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.8rem;
    font-weight: 700;
    margin: 0 auto 10px;
    color: var(--white);
}
.user-avatar h3 { color: var(--white); font-size: 0.95rem; }
.user-nav { padding: 8px; }
.user-nav a {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 12px;
    border-radius: var(--radius);
    color: var(--gray-600);
    font-size: 0.88rem;
    transition: all var(--transition);
}
.user-nav a:hover, .user-nav a.active { background: var(--blue-50); color: var(--primary); }

/* --- PRENOTAZIONE CARD --- */
.prenotazione-card {
    background: var(--white);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 20px;
    display: flex;
    align-items: flex-start;
    gap: 20px;
    box-shadow: var(--shadow);
    transition: box-shadow var(--transition);
}
.prenotazione-card:hover { box-shadow: var(--shadow-md); }
.prenotazione-date {
    background: var(--blue-50);
    border-radius: var(--radius);
    padding: 12px 16px;
    text-align: center;
    flex-shrink: 0;
    min-width: 72px;
}
.prenotazione-date .month { font-size: 0.72rem; text-transform: uppercase; font-weight: 600; color: var(--primary); }
.prenotazione-date .day { font-size: 2rem; font-weight: 700; color: var(--gray-800); line-height: 1; }
.prenotazione-date .year { font-size: 0.72rem; color: var(--text-light); }
.prenotazione-info { flex: 1; }
.prenotazione-info h4 { font-size: 1rem; margin-bottom: 6px; }
.prenotazione-meta { display: flex; flex-wrap: wrap; gap: 16px; color: var(--text-light); font-size: 0.85rem; margin-top: 8px; }

/* --- ADMIN --- */
.admin-layout { display: flex; min-height: calc(100vh - 60px); }
.admin-sidebar {
    width: 240px;
    background: var(--gray-900);
    flex-shrink: 0;
    padding: 20px 0;
}
.admin-sidebar-brand {
    padding: 0 20px 20px;
    border-bottom: 1px solid var(--gray-700);
    margin-bottom: 12px;
}
.admin-sidebar-brand h2 { color: var(--white); font-size: 1rem; }
.admin-sidebar-brand p { color: var(--gray-400); font-size: 0.78rem; }
.admin-nav a {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 20px;
    color: var(--gray-400);
    font-size: 0.88rem;
    transition: all var(--transition);
    border-left: 3px solid transparent;
}
.admin-nav a:hover, .admin-nav a.active {
    background: rgba(255,255,255,.07);
    color: var(--white);
    border-left-color: var(--primary);
}
.admin-nav .nav-section {
    padding: 16px 20px 6px;
    font-size: 0.7rem;
    text-transform: uppercase;
    letter-spacing: .08em;
    color: var(--gray-600);
    font-weight: 600;
}
.admin-content { flex: 1; padding: 32px; overflow-x: auto; }
.admin-topbar {
    background: var(--white);
    border-bottom: 1px solid var(--border);
    height: 60px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 32px;
    box-shadow: var(--shadow);
}
.admin-stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px; margin-bottom: 32px; }
.stat-card {
    background: var(--white);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 20px;
    display: flex;
    align-items: flex-start;
    gap: 16px;
    box-shadow: var(--shadow);
}
.stat-icon {
    width: 48px;
    height: 48px;
    border-radius: var(--radius);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.3rem;
    flex-shrink: 0;
}
.stat-icon.blue { background: var(--blue-50); }
.stat-icon.green { background: #f0fdf4; }
.stat-icon.yellow { background: #fffbeb; }
.stat-icon.red { background: #fef2f2; }
.stat-value { font-size: 1.8rem; font-weight: 700; line-height: 1; }
.stat-label { font-size: 0.82rem; color: var(--text-light); margin-top: 4px; }

/* --- TOGGLE --- */
.toggle { position: relative; display: inline-block; width: 44px; height: 24px; }
.toggle input { opacity: 0; width: 0; height: 0; }
.toggle-slider {
    position: absolute;
    cursor: pointer;
    top: 0; left: 0; right: 0; bottom: 0;
    background: var(--gray-300);
    border-radius: 24px;
    transition: var(--transition);
}
.toggle-slider::before {
    content: '';
    position: absolute;
    width: 18px; height: 18px;
    left: 3px; bottom: 3px;
    background: var(--white);
    border-radius: 50%;
    transition: var(--transition);
}
.toggle input:checked + .toggle-slider { background: var(--primary); }
.toggle input:checked + .toggle-slider::before { transform: translateX(20px); }

/* --- MOBILE MEDICO --- */
@media (max-width: 1024px) {
    .booking-wizard { grid-template-columns: 1fr; }
    .booking-summary { position: static; }
    .admin-stats { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 768px) {
    .profilo-medico { flex-direction: column; gap: 24px; }
    .profilo-foto { width: 100%; }
    .slots-grid { grid-template-columns: repeat(3, 1fr); }
    .prenotazione-card { flex-direction: column; }
    .admin-layout { flex-direction: column; }
    .admin-sidebar { width: 100%; }
    .admin-stats { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 480px) {
    .slots-grid { grid-template-columns: repeat(2, 1fr); }
    .admin-stats { grid-template-columns: 1fr; }
}

/* ============================================================
   NUOVA UI MEDICA - Stile moderno con animazioni
   ============================================================ */

/* --- ANIMAZIONI SCROLL --- */
.anim-fade-up,
.anim-fade-right,
.anim-fade-left {
    opacity: 0;
    transition: opacity .65s cubic-bezier(.22,1,.36,1), transform .65s cubic-bezier(.22,1,.36,1);
}
.anim-fade-up    { transform: translateY(36px); }
.anim-fade-right { transform: translateX(-40px); }
.anim-fade-left  { transform: translateX(40px); }

.anim-fade-up.anim-in,
.anim-fade-right.anim-in,
.anim-fade-left.anim-in {
    opacity: 1;
    transform: none;
}

[data-delay="0"].anim-in { transition-delay: 0s; }
[data-delay="1"].anim-in { transition-delay: .1s; }
[data-delay="2"].anim-in { transition-delay: .2s; }
[data-delay="3"].anim-in { transition-delay: .3s; }
[data-delay="4"].anim-in { transition-delay: .4s; }
[data-delay="5"].anim-in { transition-delay: .5s; }

@media (prefers-reduced-motion: reduce) {
    .anim-fade-up, .anim-fade-right, .anim-fade-left {
        opacity: 1 !important;
        transform: none !important;
        transition: none !important;
    }
}

/* --- HERO MEDICO --- */
.med-hero {
    position: relative;
    background: linear-gradient(135deg, #f8fafc 0%, #eff6ff 50%, #e2e8f0 100%);
    color: var(--text);
    padding: 110px 0 130px;
    overflow: hidden;
}
.med-hero::before {
    content: '';
    position: absolute;
    top: -15%;
    right: -10%;
    width: 500px;
    height: 500px;
    background: radial-gradient(circle, rgba(37, 99, 235, 0.12) 0%, rgba(255, 255, 255, 0) 70%);
    filter: blur(60px);
    pointer-events: none;
}
.med-hero-bg {
    position: absolute;
    inset: 0;
    background:
        radial-gradient(ellipse 60% 60% at 70% 40%, rgba(37,99,235,.06) 0%, transparent 70%),
        radial-gradient(ellipse 40% 50% at 10% 80%, rgba(99,102,241,.05) 0%, transparent 60%);
    pointer-events: none;
}
.med-hero-inner {
    display: grid;
    grid-template-columns: 1fr 350px;
    gap: 64px;
    align-items: center;
    position: relative;
    z-index: 1;
}
.med-hero-badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: rgba(37, 99, 235, 0.06);
    border: 1px solid rgba(37, 99, 235, 0.15);
    padding: 8px 18px;
    border-radius: 100px;
    font-size: .84rem;
    font-weight: 700;
    letter-spacing: .02em;
    margin-bottom: 24px;
    color: var(--blue-700);
    box-shadow: 0 2px 10px rgba(37,99,235,0.04);
}
.med-hero-title {
    font-size: clamp(2.2rem, 4.5vw, 3.4rem);
    font-weight: 800;
    color: #0f172a;
    line-height: 1.15;
    margin-bottom: 16px;
    letter-spacing: -0.02em;
}
.med-hero-sub {
    font-size: 1.2rem;
    color: var(--blue-600);
    margin-bottom: 8px;
    font-weight: 600;
}
.med-hero-ordine {
    font-size: .88rem;
    color: var(--gray-500);
    margin-bottom: 36px;
}
.med-hero-actions {
    display: flex;
    gap: 16px;
    flex-wrap: wrap;
}
.med-btn-ghost {
    background: #fff;
    border: 1.5px solid var(--blue-200);
    color: var(--blue-600);
    font-weight: 600;
    transition: all var(--transition);
}
.med-btn-ghost:hover {
    background: var(--blue-50);
    border-color: var(--blue-600);
    color: var(--blue-700);
    transform: translateY(-1px);
}

.med-hero-card {
    background: #fff;
    border-radius: 24px;
    padding: 32px 28px;
    border: 1px solid rgba(226, 232, 240, 0.8);
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.06), 0 4px 12px rgba(0, 0, 0, 0.02);
    transition: transform 0.3s ease;
}
.med-hero-card:hover {
    transform: translateY(-4px);
}
.med-doctor-avatar {
    display: flex;
    justify-content: center;
    margin-bottom: 24px;
}
.med-doctor-icon {
    width: 104px;
    height: 104px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--blue-50), var(--blue-100));
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 3.2rem;
    border: 4px solid var(--blue-200);
    box-shadow: inset 0 2px 4px rgba(0,0,0,0.05);
}
.med-trust-items {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-bottom: 24px;
}
.med-trust-item {
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: .9rem;
    color: var(--gray-700);
    font-weight: 500;
}
.med-trust-icon {
    width: 28px;
    height: 28px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: .85rem;
    font-weight: 700;
    flex-shrink: 0;
}
.med-trust-icon.green  { background: #dcfce7; color: #166534; }
.med-trust-icon.blue   { background: #dbeafe; color: #1e40af; }
.med-trust-icon.yellow { background: #fffbeb; color: #92400e; }

.med-hero-wave {
    position: absolute;
    bottom: -1px;
    left: 0;
    right: 0;
    height: 60px;
    line-height: 0;
}
.med-hero-wave svg {
    width: 100%;
    height: 100%;
    display: block;
}

/* --- STATISTICHE --- */
.med-stats-section {
    position: relative;
    padding: 80px 0;
    background: linear-gradient(135deg, rgba(15, 23, 42, 0.88) 0%, rgba(30, 41, 59, 0.88) 100%), 
                url('https://images.unsplash.com/photo-1530026405186-ed1ea0ac7a63?auto=format&fit=crop&w=1400&q=80') no-repeat center center;
    background-size: cover;
    background-attachment: fixed;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}
.med-stats-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 24px;
}
.med-stat {
    text-align: center;
    padding: 32px 24px;
    background: rgba(255, 255, 255, 0.04);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-radius: 20px;
    border: 1px solid rgba(255, 255, 255, 0.08);
    display: flex;
    flex-direction: column;
    align-items: center;
    transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}
.med-stat:hover {
    background: rgba(255, 255, 255, 0.1);
    border-color: rgba(255, 255, 255, 0.2);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.25);
    transform: translateY(-4px);
}
.med-stat-num {
    font-size: 3rem;
    font-weight: 800;
    color: #ffffff;
    line-height: 1;
    letter-spacing: -0.02em;
    text-shadow: 0 2px 10px rgba(0,0,0,0.15);
}
.med-stat-plus {
    font-size: 1.6rem;
    font-weight: 700;
    color: #60a5fa;
    line-height: 1;
    min-height: 1.6rem;
}
.med-stat-label {
    font-size: .88rem;
    color: #cbd5e1;
    margin-top: 8px;
    font-weight: 600;
    letter-spacing: .02em;
}

/* --- CHI SONO (about) --- */
.med-about {
    display: grid;
    grid-template-columns: 380px 1fr;
    gap: 64px;
    align-items: start;
}
.med-about-visual { }
.med-about-photo {
    position: relative;
    margin-bottom: 24px;
}
.med-about-avatar {
    width: 100%;
    aspect-ratio: 1;
    max-width: 320px;
    background: linear-gradient(135deg, #dbeafe 0%, #eff6ff 100%);
    border-radius: 28px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 6.5rem;
    border: 4px solid var(--blue-100);
    margin: 0 auto;
    box-shadow: 0 10px 30px rgba(37, 99, 235, 0.04);
}
.med-about-badge-card {
    position: absolute;
    bottom: -12px;
    right: -12px;
    background: #fff;
    border: 1px solid rgba(226, 232, 240, 0.8);
    border-radius: 16px;
    padding: 12px 18px;
    display: flex;
    align-items: center;
    gap: 12px;
    box-shadow: 0 10px 30px rgba(0,0,0,.08);
}
.med-about-badge-icon {
    width: 40px;
    height: 40px;
    background: #fee2e2;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.3rem;
    color: #dc2626;
}
.med-about-badge-title { font-size: .92rem; font-weight: 700; color: var(--gray-800); }
.med-about-badge-sub   { font-size: .78rem; color: var(--text-light); }
.med-about-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 28px;
}
.med-tag {
    background: var(--blue-50);
    color: var(--blue-700);
    border: 1px solid rgba(37, 99, 235, 0.12);
    padding: 6px 16px;
    border-radius: 100px;
    font-size: .82rem;
    font-weight: 600;
    transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}
.med-tag:hover {
    background: var(--blue-600);
    color: #fff;
    border-color: var(--blue-600);
    transform: translateY(-1px);
    box-shadow: 0 4px 10px rgba(37,99,235,0.15);
}

.med-about-content { padding-top: 8px; }
.med-section-label {
    display: inline-block;
    font-size: .8rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .12em;
    color: var(--blue-600);
    margin-bottom: 12px;
}
.med-label-white { color: rgba(255,255,255,0.75); }
.med-accent { color: var(--blue-600); }

.med-credenziali { margin: 24px 0 32px; }
.med-credenziale {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 14px 18px;
    background: var(--gray-50);
    border: 1px solid rgba(226, 232, 240, 0.8);
    border-radius: var(--radius);
    font-size: .9rem;
    color: var(--gray-700);
    font-weight: 500;
}
.med-credenziale-icon {
    font-size: 1.3rem;
    flex-shrink: 0;
}

/* --- SECTION HEADER --- */
.med-section-header {
    text-align: center;
    max-width: 600px;
    margin: 0 auto 52px;
}
.med-section-desc {
    color: var(--text-light);
    margin-top: 12px;
    font-size: 1.05rem;
    line-height: 1.6;
}

/* --- SERVIZI GRID --- */
.med-servizi-section { background: #f8fafc; border-top: 1px solid rgba(226, 232, 240, 0.8); }
.med-servizi-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 24px;
}
.med-servizio-card {
    background: #fff;
    border-radius: 20px;
    border: 1px solid rgba(226, 232, 240, 0.8);
    padding: 36px 28px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.01);
    transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
    display: flex;
    flex-direction: column;
    gap: 12px;
}
.med-servizio-card:hover {
    transform: translateY(-6px);
    box-shadow: 0 20px 40px rgba(0,0,0,0.05);
    border-color: rgba(37,99,235,0.15);
}
.med-servizio-icon {
    width: 56px;
    height: 56px;
    border-radius: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.8rem;
    margin-bottom: 8px;
}
.med-icon-blue   { background: #eff6ff; }
.med-icon-indigo { background: #e0e7ff; }
.med-icon-teal   { background: #f0fdfa; }
.med-icon-violet { background: #f5f3ff; }
.med-icon-orange { background: #fff7ed; }
.med-icon-green  { background: #f0fdf4; }

.med-servizio-card h3 { font-size: 1.15rem; margin: 0; font-weight: 700; color: var(--gray-800); }
.med-servizio-card p  { font-size: .88rem; color: var(--text-light); flex: 1; margin: 0; line-height: 1.6; }
.med-card-cta {
    font-size: .88rem;
    font-weight: 700;
    color: var(--blue-600);
    text-decoration: none;
    margin-top: 8px;
    display: inline-flex;
    align-items: center;
    gap: 4px;
    transition: all .2s;
}
.med-card-cta:hover { color: var(--blue-800); transform: translateX(3px); }

/* --- COSA DICONO I PAZIENTI (testimonials) --- */
.med-testimonials-section {
    background: #fff;
    padding: 80px 0;
    border-top: 1px solid rgba(226, 232, 240, 0.8);
    border-bottom: 1px solid rgba(226, 232, 240, 0.8);
}
.med-testimonials-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 24px;
}
.med-testimonial-card {
    background: var(--blue-50);
    border-radius: 20px;
    padding: 32px;
    border: 1px solid rgba(37, 99, 235, 0.04);
    transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}
.med-testimonial-card:hover {
    transform: translateY(-4px);
    background: #fff;
    border-color: rgba(37, 99, 235, 0.15);
    box-shadow: 0 20px 40px rgba(37, 99, 235, 0.04);
}
.med-testimonial-quote {
    font-size: .92rem;
    line-height: 1.6;
    color: var(--gray-700);
    font-style: italic;
    margin-bottom: 24px;
    position: relative;
}
.med-testimonial-quote::before {
    content: '“';
    font-size: 3rem;
    color: rgba(37, 99, 235, 0.1);
    position: absolute;
    top: -24px;
    left: -12px;
    font-family: Georgia, serif;
}
.med-testimonial-author {
    display: flex;
    align-items: center;
    gap: 12px;
}
.med-testimonial-author-avatar {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--blue-500) 0%, var(--blue-700) 100%);
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 1rem;
    box-shadow: 0 4px 10px rgba(37,99,235,0.15);
}
.med-testimonial-author-info {
    display: flex;
    flex-direction: column;
}
.med-testimonial-author-name {
    font-weight: 700;
    font-size: .9rem;
    color: var(--gray-800);
}
.med-testimonial-author-desc {
    font-size: .78rem;
    color: var(--text-light);
}

/* --- PERCHÉ SCEGLIERMI --- */
.med-perche-section {
    position: relative;
    background: linear-gradient(135deg, rgba(15, 23, 42, 0.94) 0%, rgba(30, 58, 138, 0.94) 50%, rgba(30, 64, 175, 0.94) 100%),
                url('https://images.unsplash.com/photo-1504813184591-0155561a4ad2?auto=format&fit=crop&w=1200&q=80') no-repeat center center;
    background-size: cover;
    background-attachment: fixed;
    padding: 90px 0;
    color: #fff;
}
.med-perche-grid {
    display: grid;
    grid-template-columns: 1fr 340px;
    gap: 64px;
    align-items: center;
}
.med-perche-title {
    color: #fff;
    font-size: clamp(1.6rem, 3vw, 2.2rem);
    margin-bottom: 36px;
    letter-spacing: -0.01em;
    line-height: 1.3;
}
.med-perche-items {
    display: flex;
    flex-direction: column;
    gap: 24px;
}
.med-perche-item {
    display: flex;
    align-items: flex-start;
    gap: 18px;
}
.med-perche-icon {
    width: 48px;
    height: 48px;
    background: rgba(255,255,255,.12);
    border-radius: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.4rem;
    flex-shrink: 0;
    box-shadow: 0 4px 10px rgba(0,0,0,0.1);
}
.med-perche-item-title { font-size: 1rem; font-weight: 700; color: #fff; margin-bottom: 4px; }
.med-perche-item-desc  { font-size: .86rem; color: rgba(191,219,254,.75); line-height: 1.6; }

.med-cta-card {
    background: #fff;
    border-radius: 24px;
    padding: 36px 32px;
    box-shadow: 0 30px 60px rgba(0,0,0,.35), 0 10px 20px rgba(0,0,0,.15);
    text-align: center;
}
.med-cta-icon {
    font-size: 2.8rem;
    margin-bottom: 16px;
}
.med-cta-card h3 { color: var(--gray-800); font-size: 1.3rem; margin-bottom: 10px; font-weight: 700; }
.med-cta-card p  { color: var(--text-light); font-size: .9rem; margin-bottom: 24px; line-height: 1.5; }
.med-cta-nota {
    font-size: .8rem;
    color: var(--green-600);
    margin-top: 14px;
    font-weight: 600;
}

/* --- RESPONSIVE NUOVA UI --- */
@media (max-width: 1024px) {
    .med-about { grid-template-columns: 1fr; gap: 40px; }
    .med-about-visual { max-width: 380px; }
    .med-perche-grid { grid-template-columns: 1fr; gap: 40px; }
    .med-cta-card { max-width: 440px; margin: 0 auto; }
    .med-testimonials-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 900px) {
    .med-hero-inner { grid-template-columns: 1fr; gap: 48px; }
    .med-hero-card { max-width: 400px; margin: 0 auto; }
    .med-stats-grid { grid-template-columns: repeat(2, 1fr); }
    .med-stat:nth-child(2) { border-right: none; }
    .med-stat:nth-child(3) { border-top: 1px solid var(--border); border-right: 1px solid var(--border); }
    .med-stat:nth-child(4) { border-top: 1px solid var(--border); border-right: none; }
    .med-servizi-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 768px) {
    .med-testimonials-grid { grid-template-columns: 1fr; }
}
@media (max-width: 600px) {
    .med-hero { padding: 80px 0 100px; }
    .med-stats-grid { grid-template-columns: repeat(2, 1fr); gap: 16px; }
    .med-servizi-grid { grid-template-columns: 1fr; }
    .med-hero-title { font-size: 2.1rem; }
}

/* --- CLINICAL NAV BAR GLASSMORPHISM --- */
.navbar {
    background: rgba(255, 255, 255, 0.85) !important;
    backdrop-filter: blur(20px) saturate(190%);
    -webkit-backdrop-filter: blur(20px) saturate(190%);
    border-bottom: 1px solid rgba(226, 232, 240, 0.7) !important;
    position: sticky;
    top: 0;
    z-index: 1000;
    transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}
.navbar-brand {
    font-weight: 800 !important;
}
.navbar-brand .brand-icon {
    background: linear-gradient(135deg, #eff6ff 0%, #dbeafe 100%) !important;
    color: var(--blue-600) !important;
    border: 1.5px solid rgba(37, 99, 235, 0.1) !important;
    border-radius: 10px !important;
    display: flex !important;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 10px rgba(37, 99, 235, 0.05);
}
.navbar-nav a {
    font-weight: 600 !important;
    font-size: 0.88rem !important;
    color: var(--gray-600) !important;
    padding: 8px 16px !important;
    border-radius: 100px !important;
    transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1) !important;
}
.navbar-nav a:hover {
    color: var(--blue-700) !important;
    background: rgba(37, 99, 235, 0.04) !important;
}
.navbar-nav a.active {
    color: var(--blue-700) !important;
    background: rgba(37, 99, 235, 0.08) !important;
}

/* --- DETTAGLI IMMAGINI CLINICHE --- */
.med-doctor-photo-img {
    width: 104px;
    height: 104px;
    border-radius: 50%;
    object-fit: cover;
    border: 4px solid var(--blue-200);
    box-shadow: 0 8px 24px rgba(37, 99, 235, 0.12);
    transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}
.med-doctor-photo-img:hover {
    transform: scale(1.06);
}
.med-about-img {
    width: 100%;
    aspect-ratio: 1;
    max-width: 320px;
    border-radius: 28px;
    object-fit: cover;
    border: 4px solid var(--blue-100);
    margin: 0 auto;
    box-shadow: 0 20px 45px rgba(37, 99, 235, 0.1);
    transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}
.med-about-img:hover {
    transform: translateY(-4px) scale(1.02);
}

/* ============================================================
   HOMEPAGE REDESIGN – STILE EDITORIALE NUMERATO
   ============================================================ */

/* --- HERO CINEMATOGRAFICO --- */
.hp-hero {
    position: relative;
    min-height: 92vh;
    display: flex;
    align-items: center;
    overflow: hidden;
    background: #0f172a;
}
.hp-hero-bg {
    position: absolute;
    inset: 0;
    background-size: cover;
    background-position: center 30%;
    background-repeat: no-repeat;
    transform: scale(1.04);
    transition: transform 8s ease;
}
.hp-hero:hover .hp-hero-bg {
    transform: scale(1.0);
}
.hp-hero-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(
        105deg,
        rgba(10, 18, 40, 0.85) 0%,
        rgba(15, 23, 60, 0.7) 55%,
        rgba(10, 18, 40, 0.55) 100%
    );
}
.hp-hero-content {
    position: relative;
    z-index: 2;
    max-width: 780px;
    padding-top: 60px;
    padding-bottom: 60px;
}
.hp-hero-label {
    display: inline-block;
    font-size: .8rem;
    font-weight: 700;
    letter-spacing: .14em;
    text-transform: uppercase;
    color: rgba(147, 197, 253, 0.9);
    border: 1px solid rgba(147, 197, 253, 0.25);
    padding: 7px 18px;
    border-radius: 100px;
    margin-bottom: 28px;
    backdrop-filter: blur(4px);
}
.hp-hero-title {
    font-size: clamp(2.6rem, 5.5vw, 4rem);
    font-weight: 800;
    color: #ffffff;
    line-height: 1.12;
    letter-spacing: -0.03em;
    margin-bottom: 20px;
    text-shadow: 0 2px 20px rgba(0,0,0,0.3);
}
.hp-hero-sub {
    font-size: 1.1rem;
    color: rgba(203, 213, 225, 0.9);
    margin-bottom: 40px;
    font-weight: 400;
    line-height: 1.5;
}
.hp-hero-actions {
    display: flex;
    gap: 20px;
    flex-wrap: wrap;
    align-items: center;
}
.hp-hero-scroll-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    color: rgba(203, 213, 225, 0.85);
    font-size: .92rem;
    font-weight: 600;
    text-decoration: none;
    letter-spacing: .01em;
    transition: color .25s, gap .25s;
    border-bottom: 1px solid rgba(203,213,225,.3);
    padding-bottom: 2px;
}
.hp-hero-scroll-btn:hover {
    color: #fff;
    gap: 10px;
    border-bottom-color: rgba(255,255,255,.5);
}
.hp-hero-wave {
    position: absolute;
    bottom: -1px;
    left: 0;
    right: 0;
    height: 60px;
    line-height: 0;
    z-index: 3;
}
.hp-hero-wave svg {
    width: 100%;
    height: 100%;
    display: block;
}

/* --- SECTION HEADER NUMERATO --- */
.hp-section-header {
    display: flex;
    align-items: flex-start;
    gap: 28px;
    margin-bottom: 16px;
}
.hp-section-header--white { color: #fff; }
.hp-section-num {
    font-size: 4.5rem;
    font-weight: 900;
    color: rgba(37, 99, 235, 0.1);
    letter-spacing: -0.04em;
    line-height: 1;
    margin-top: 4px;
    flex-shrink: 0;
    font-variant-numeric: tabular-nums;
    user-select: none;
}
.hp-section-num--white {
    color: rgba(255, 255, 255, 0.12);
}
.hp-section-intro {
    padding-bottom: 0;
    border-bottom: none;
}
.hp-section-intro .med-section-label { margin-bottom: 8px; }
.hp-section-intro h2 { margin-bottom: 0; }

/* --- PANNELLI ALTERNATI (ECG / ECO / CICLO) --- */
.hp-panel {
    display: grid;
    grid-template-columns: 1fr 1fr;
    min-height: 500px;
    align-items: stretch;
}
.hp-panel--img-left {
    direction: rtl;
}
.hp-panel--img-left > * {
    direction: ltr;
}
.hp-panel-img {
    position: relative;
    overflow: hidden;
    background: #0f172a;
}
.hp-panel-img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform 0.6s cubic-bezier(0.16, 1, 0.3, 1);
}
.hp-panel:hover .hp-panel-img img {
    transform: scale(1.04);
}
.hp-panel-body {
    background: #fff;
    padding: 64px 60px;
    display: flex;
    flex-direction: column;
    justify-content: center;
}
.hp-panel--img-left .hp-panel-body {
    background: #f8fafc;
}
.hp-panel-num {
    display: inline-block;
    font-size: .72rem;
    font-weight: 800;
    letter-spacing: .18em;
    text-transform: uppercase;
    color: var(--blue-600);
    border: 1.5px solid rgba(37, 99, 235, 0.2);
    padding: 5px 14px;
    border-radius: 100px;
    margin-bottom: 20px;
    background: rgba(37, 99, 235, 0.04);
}
.hp-panel-title {
    font-size: clamp(1.6rem, 2.5vw, 2.2rem);
    font-weight: 800;
    color: #0f172a;
    letter-spacing: -0.02em;
    margin-bottom: 20px;
    line-height: 1.2;
}
.hp-panel-body > p {
    color: var(--gray-600);
    font-size: 1rem;
    line-height: 1.7;
    margin-bottom: 24px;
}
.hp-panel-list {
    list-style: none;
    padding: 0;
    margin: 0 0 32px;
    display: flex;
    flex-direction: column;
    gap: 10px;
}
.hp-panel-list li {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: .9rem;
    color: var(--gray-700);
    font-weight: 500;
}
.hp-panel-list li::before {
    content: '';
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: var(--blue-500);
    flex-shrink: 0;
}

/* --- RESPONSIVE HOMEPAGE --- */
@media (max-width: 900px) {
    .hp-hero { min-height: 80vh; }
    .hp-hero-title { font-size: clamp(2rem, 6vw, 2.8rem); }
    .hp-panel { grid-template-columns: 1fr; min-height: auto; }
    .hp-panel--img-left { direction: ltr; }
    .hp-panel-img { min-height: 280px; }
    .hp-panel-body { padding: 44px 28px; }
    .hp-section-num { font-size: 3rem; }
    .hp-section-header { gap: 16px; }
}
@media (max-width: 600px) {
    .hp-hero { min-height: 70vh; }
    .hp-hero-actions { flex-direction: column; align-items: flex-start; }
    .hp-panel-img { min-height: 220px; }
    .hp-panel-body { padding: 36px 20px; }
}
