/* RESET E VARIABILI */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --primary: #1A365D;
    --primary-soft: #EDF2F7;
    --accent: #800020;
    --accent-hover: #600018;
    --text-dark: #2D3748;
    --text-light: #4A5568;
    --bg-light: #F7FAFC;
    --white: #FFFFFF;
    --line: #E2E8F0;
    --shadow: rgba(0, 0, 0, 0.08);
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Open Sans', sans-serif;
    color: var(--text-dark);
    line-height: 1.6;
    background: linear-gradient(180deg, #f9f7f4 0%, #f3f5f2 100%);
    overflow-x: hidden;
}

h1, h2, h3, h4 {
    font-family: 'Montserrat', sans-serif;
    color: var(--primary);
    overflow-wrap: break-word;
}

p, a, li, span, button {
    overflow-wrap: break-word;
}

img, iframe {
    display: block;
    max-width: 100%;
    height: auto;
}

.container {
    max-width: 1100px;
    margin: 0 auto;
    padding: 0 20px;
    width: min(100%, 1100px);
}

/* NAVBAR */
.navbar {
    background: rgba(255, 255, 255, 0.92);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    box-shadow: 0 10px 30px rgba(26, 54, 93, 0.06);
    border-bottom: 1px solid rgba(26, 54, 93, 0.08);
    position: sticky;
    top: 0;
    z-index: 1000;
}

.nav-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    min-height: 82px;
    gap: 16px;
}

.logo {
    font-size: 1.28rem;
    font-weight: 800;
    color: var(--primary);
    display: flex;
    align-items: center;
    gap: 10px;
    letter-spacing: 0.02em;
    flex-shrink: 1;
    line-height: 1.15;
    min-width: 0;
}

.logo span {
    white-space: normal;
    line-height: 1.15;
    display: inline-block;
    max-width: 100%;
}

.logo-icon {
    color: var(--accent);
    font-size: 1.1rem;
    flex-shrink: 0;
}

.nav-menu {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    flex-wrap: wrap;
    gap: 8px 12px;
    flex: 1;
}

.nav-menu a {
    text-decoration: none;
    color: var(--text-dark);
    font-weight: 700;
    font-size: 0.85rem;
    transition: color 0.25s ease, transform 0.25s ease;
    position: relative;
    white-space: nowrap;
}

.nav-menu a:hover {
    color: var(--accent);
}

.nav-menu a::after {
    content: "";
    position: absolute;
    left: 0;
    bottom: -8px;
    width: 100%;
    height: 2px;
    background-color: var(--accent);
    transform: scaleX(0);
    transform-origin: left;
    transition: transform 0.25s ease;
}

.nav-menu a:hover::after {
    transform: scaleX(1);
}

.nav-cta {
    background: var(--accent);
    color: var(--white) !important;
    padding: 9px 14px;
    border-radius: 999px;
    box-shadow: 0 10px 20px rgba(128, 0, 32, 0.18);
    transition: transform 0.25s ease, box-shadow 0.25s ease, background-color 0.25s ease;
    min-height: 44px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.nav-cta:hover {
    background: var(--accent-hover);
    box-shadow: 0 14px 24px rgba(128, 0, 32, 0.24);
    transform: translateY(-1px);
}

.nav-cta::after {
    display: none;
}

.nav-toggle {
    display: none;
    flex-direction: column;
    justify-content: center;
    gap: 5px;
    width: 46px;
    height: 46px;
    border: 1px solid rgba(26, 54, 93, 0.15);
    border-radius: 10px;
    background: rgba(255, 255, 255, 0.8);
    cursor: pointer;
    padding: 10px 8px;
    transition: all 0.25s ease;
    flex-shrink: 0;
}

.nav-toggle span {
    display: block;
    width: 100%;
    height: 2px;
    border-radius: 999px;
    background: var(--primary);
    transition: all 0.25s ease;
}

.nav-toggle.is-open span:nth-child(1) {
    transform: translateY(7px) rotate(45deg);
}

.nav-toggle.is-open span:nth-child(2) {
    opacity: 0;
}

.nav-toggle.is-open span:nth-child(3) {
    transform: translateY(-7px) rotate(-45deg);
}

@media (max-width: 1100px) {
    .nav-container {
        flex-wrap: wrap;
        justify-content: center;
        padding-top: 14px;
        padding-bottom: 14px;
        gap: 12px;
    }

    .nav-menu {
        justify-content: center;
        gap: 10px 14px;
    }

    .nav-menu a {
        font-size: 0.87rem;
    }
}

@media (max-width: 768px) {
    .nav-container {
        position: relative;
        justify-content: space-between;
        flex-wrap: nowrap;
        min-height: 72px;
    }

    .logo {
        font-size: 0.95rem;
        text-align: left;
        line-height: 1.2;
        max-width: calc(100% - 60px);
    }

    .nav-toggle {
        display: flex;
    }

    .nav-menu {
        position: absolute;
        top: calc(100% + 8px);
        left: 0;
        right: 0;
        display: none;
        flex-direction: column;
        align-items: stretch;
        gap: 8px;
        background: rgba(255, 255, 255, 0.98);
        border: 1px solid rgba(26, 54, 93, 0.08);
        border-radius: 16px;
        box-shadow: 0 15px 35px rgba(15, 23, 42, 0.12);
        padding: 12px;
        z-index: 1001;
    }

    .nav-menu.is-open {
        display: flex;
    }

    .nav-menu a {
        font-size: 0.92rem;
        padding: 12px 14px;
        border-radius: 10px;
        text-align: left;
        min-height: 46px;
        display: flex;
        align-items: center;
    }

    .nav-menu a::after {
        display: none;
    }

    .nav-cta {
        width: 100%;
        justify-content: center;
        text-align: center;
        padding: 12px 14px;
    }
}

.avviso-banner {
    max-width: 1100px;
    margin: 20px auto 0;
    padding: 16px 20px;
    background: #ffebe9;
    border: 1px solid #ffc1c0;
    border-radius: 12px;
    color: #7a2d2d;
    text-align: center;
    box-shadow: 0 8px 20px rgba(122, 45, 45, 0.08);
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.avviso-item {
    background: rgba(255, 255, 255, 0.6);
    border: 1px solid #f7c3be;
    border-radius: 14px;
    box-shadow: 0 6px 16px rgba(122, 45, 45, 0.08);
    padding: 14px 18px;
    text-align: center;
}

.avviso-item h4 {
    margin: 0 0 6px;
    font-size: 1.15rem;
    color: #7a2d2d;
}

.avviso-item p {
    margin: 0;
    font-size: 0.98rem;
    color: #7a2d2d;
    line-height: 1.5;
}

/* HERO */
.hero {
    padding: 80px 0;
    background: linear-gradient(135deg, #FFFFFF 0%, #EDF2F7 100%);
}

.hero-container {
    display: flex;
    align-items: center;
    gap: 40px;
}

.hero-text {
    flex: 1;
}

.badge {
    display: inline-block;
    background-color: var(--primary-soft);
    color: var(--primary);
    padding: 6px 12px;
    border-radius: 999px;
    font-size: 0.8rem;
    font-weight: 700;
    text-transform: uppercase;
}

.hero-text h1 {
    font-size: clamp(2.2rem, 5vw, 3.5rem);
    margin: 18px 0 15px;
    line-height: 1.2;
}

.highlight {
    color: var(--accent);
}

.hero-text p {
    font-size: 1.08rem;
    color: var(--text-light);
}

.hero-motto {
    font-size: clamp(1.35rem, 2vw, 2rem);
    font-weight: 700;
    color: var(--primary);
    margin: 12px 0 18px;
    line-height: 1.3;
    letter-spacing: 0.02em;
    position: relative;
    display: inline-block;
}

.hero-motto::after {
    content: "";
    display: block;
    width: 70%;
    height: 3px;
    background: linear-gradient(90deg, var(--accent), rgba(128, 0, 32, 0.2));
    border-radius: 999px;
    margin-top: 10px;
}

.hero-support {
    margin-bottom: 26px;
    max-width: 540px;
}

.hero-buttons {
    display: flex;
    flex-wrap: wrap;
    gap: 15px;
}

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding: 12px 24px;
    border-radius: 8px;
    text-decoration: none;
    font-weight: 700;
    transition: all 0.3s ease;
}

.btn-primary {
    background-color: var(--accent);
    color: var(--white);
}

.btn-primary:hover {
    background-color: var(--accent-hover);
}

.btn-secondary {
    background-color: var(--primary);
    color: var(--white);
}

.hero-image {
    flex: 1;
    text-align: center;
}

.hero-image img {
    width: 100%;
    max-width: 420px;
    border-radius: 16px;
    box-shadow: 0 18px 35px rgba(0, 0, 0, 0.12);
}

/* SEZIONI */
.services,
.about,
.promozione-section,
.team,
.hours,
.contact {
    padding: 80px 0;
}

.promozione-container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 20px;
    margin-top: 30px;
}

.promozione-card {
    background: linear-gradient(180deg, rgba(218, 244, 228, 0.78) 0%, rgba(245, 255, 248, 0.92) 55%, rgba(255, 255, 255, 1) 100%);
    border: 1px solid #bfe6cd;
    border-radius: 18px;
    box-shadow: 0 12px 28px rgba(19, 117, 82, 0.10);
    padding: 26px 22px;
    position: relative;
    overflow: hidden;
}

.promozione-card::before {
    content: "";
    position: absolute;
    inset: 0 auto auto 0;
    width: 100%;
    height: 5px;
    background: #0d7a4c;
}

.promozione-badge {
    display: inline-block;
    background: linear-gradient(135deg, #0d7a4c, #1f9d67);
    color: #ffffff;
    font-size: 0.8rem;
    font-weight: 700;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    padding: 7px 12px;
    border-radius: 999px;
    margin-bottom: 14px;
    box-shadow: 0 6px 14px rgba(13, 122, 76, 0.20);
}

.promozione-card h3 {
    color: #0f5132;
    font-size: 1.5rem;
    margin-bottom: 10px;
}

.promozione-card p {
    color: #234b39;
    font-size: 1rem;
    margin: 0;
    line-height: 1.6;
}

.promozione-section {
    background: #f3f7fb;
}

.promozione-empty {
    background: #f8f9fb;
    border: 1px dashed #dfe6ee;
    border-radius: 12px;
    padding: 25px 20px;
    text-align: center;
    color: var(--text-light);
    font-weight: 600;
    margin: 0;
}

.story {
    padding: 80px 0;
    background: #f8fafc;
}

.story-grid {
    display: grid;
    grid-template-columns: 0.9fr 1.5fr;
    gap: 36px;
    align-items: center;
}

.story-portrait {
    display: flex;
    justify-content: center;
    align-items: center;
}

.story-portrait-inner {
    width: min(100%, 360px);
    aspect-ratio: 4 / 5;
    border-radius: 20px;
    background: linear-gradient(135deg, #fce5e5 0%, #f2a6a6 100%);
    border: 1px solid #f3c0c0;
    box-shadow: 0 18px 35px rgba(128, 0, 32, 0.12);
    display: flex;
    align-items: end;
    justify-content: center;
    padding: 20px;
    position: relative;
    overflow: hidden;
}

.story-portrait-inner::before {
    content: "";
    position: absolute;
    inset: 0;
    background: radial-gradient(circle at 50% 25%, rgba(255,255,255,0.9), rgba(255,255,255,0) 40%);
}

.story-portrait-inner span {
    position: relative;
    z-index: 1;
    background: rgba(128, 0, 32, 0.82);
    color: #fff;
    padding: 10px 18px;
    border-radius: 999px;
    font-weight: 700;
    font-size: 0.9rem;
    letter-spacing: 0.03em;
}

.story-content {
    display: flex;
    flex-direction: column;
    gap: 18px;
}

.story-content p {
    color: var(--text-light);
    font-size: 1.03rem;
    line-height: 1.8;
}

.services {
    background-color: var(--white);
}

.section-title {
    text-align: center;
    font-size: clamp(1.9rem, 3vw, 2.5rem);
    margin-bottom: 8px;
}

.section-subtitle {
    text-align: center;
    color: #718096;
    margin-bottom: 45px;
}

.services-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 28px;
}

.service-card {
    display: flex;
    flex-direction: column;
    background-color: var(--accent);
    color: var(--white);
    padding: 28px 22px;
    border-radius: 12px;
    transition: transform 0.25s ease, box-shadow 0.25s ease;
    box-shadow: 0 8px 18px rgba(128, 0, 32, 0.18);
    min-height: 100%;
}

.service-card:hover {
    transform: translateY(-6px);
    box-shadow: 0 14px 28px rgba(128, 0, 32, 0.24);
}

.service-icon {
    font-size: 2rem;
    color: var(--white);
    margin-bottom: 14px;
}

.service-card h3 {
    margin-bottom: 10px;
    font-size: 1.2rem;
    color: var(--white);
}

.service-card p {
    color: rgba(255, 255, 255, 0.85);
    flex: 1;
}

.about {
    background: linear-gradient(180deg, #F8FAFC 0%, #FFFFFF 100%);
}

.about-text h2 {
    font-size: 2rem;
    margin-bottom: 18px;
}

.lead {
    font-size: 1.15rem;
    font-weight: 700;
    margin-bottom: 15px;
}

.about-list {
    list-style: none;
    margin-top: 24px;
}

.about-list li {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 12px;
}

.about-list i {
    color: var(--accent);
}

/* TEAM */
.team {
    background-color: var(--white);
}

.team-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 30px;
}

.doctor-card {
    background: linear-gradient(180deg, #ffffff 0%, #f8fafc 100%);
    border-radius: 18px;
    padding: 22px 20px;
    text-align: center;
    box-shadow: 0 10px 25px var(--shadow);
    border: 1px solid rgba(26, 54, 93, 0.06);
    transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.doctor-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 18px 35px rgba(0, 0, 0, 0.08);
}

.doctor-photo {
    width: 120px;
    height: 120px;
    border-radius: 50%;
    margin: 0 auto 20px;
    background-size: cover;
    background-position: center;
    border: 4px solid rgba(128, 0, 32, 0.12);
}

.doctor-one {
    background-image: url('https://images.unsplash.com/photo-1535713875002-d1d0cf377fde?auto=format&fit=crop&w=500&q=80');
}

.doctor-two {
    background-image: url('https://images.unsplash.com/photo-1544005313-94ddf0286df2?auto=format&fit=crop&w=500&q=80');
}

.doctor-three {
    background-image: url('https://images.unsplash.com/photo-1500648767791-00dcc994a43e?auto=format&fit=crop&w=500&q=80');
}

.doctor-card h3 {
    margin-bottom: 6px;
    font-size: 1.35rem;
}

.doctor-role {
    color: var(--accent);
    font-weight: 700;
    margin: 6px 0 10px;
    letter-spacing: 0.03em;
    text-transform: uppercase;
    font-size: 0.76rem;
}

.doctor-card p:last-child {
    color: var(--text-light);
}

/* ORARI */
.hours {
    background: linear-gradient(180deg, #F7FAFC 0%, #FFFFFF 100%);
}

.hours-card {
    max-width: 760px;
    margin: 0 auto;
    background: var(--white);
    border: 1px solid var(--line);
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 12px 30px rgba(0, 0, 0, 0.04);
}

.hours-row {
    display: grid;
    grid-template-columns: 1.2fr 1fr 1fr;
    gap: 12px;
    align-items: center;
    padding: 18px 22px;
    border-bottom: 1px solid var(--line);
}

.hours-row:last-child {
    border-bottom: none;
}

.hours-row.closed {
    background-color: #F8FAFC;
}

.day {
    font-weight: 700;
    color: var(--primary);
}

.time {
    color: var(--text-light);
}

.time-label {
    display: block;
    font-size: 0.72rem;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: #718096;
    margin-bottom: 4px;
}

.time-value {
    display: block;
    font-weight: 700;
    color: var(--primary);
}

/* CONTATTI */
.contact {
    background-color: var(--white);
}

.contact-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 40px;
    margin-top: 40px;
}

.info-item {
    display: flex;
    gap: 15px;
    margin-bottom: 28px;
}

.info-item i {
    font-size: 1.5rem;
    color: var(--accent);
    margin-top: 6px;
}

.info-item a {
    color: var(--primary);
    text-decoration: none;
    font-weight: 600;
}

.info-item a:hover {
    color: var(--accent);
}

.maps-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    color: var(--white) !important;
    background-color: #1a73e8;
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 999px;
    padding: 12px 20px;
    font-weight: 700;
    text-decoration: none;
    line-height: 1;
    min-height: 46px;
    box-shadow: 0 10px 20px rgba(26, 115, 232, 0.18);
    transition: background-color 0.3s ease, transform 0.2s ease;
}

.maps-link:hover {
    color: var(--white) !important;
    background-color: #1557c0;
    transform: translateY(-1px);
}

.maps-link i {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 1.25rem;
    color: var(--white);
    line-height: 1;
    margin-top: -1px;
}

.business-embed-box {
    width: 100%;
    height: 400px;
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 12px 28px rgba(0, 0, 0, 0.08);
    border: 1px solid rgba(26, 54, 93, 0.08);
    background: #f3f4f6;
}

.business-embed-box iframe {
    width: 100%;
    height: 400px;
    border: 0;
    display: block;
}

.google-profile-link-wrap {
    margin-top: 20px;
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
}

.google-profile-link,
.maps-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    background-color: #1a73e8;
    color: var(--white);
    padding: 12px 20px;
    border-radius: 999px;
    text-decoration: none;
    font-weight: 700;
    min-height: 46px;
    line-height: 1;
    transition: background-color 0.3s ease, transform 0.2s ease;
    white-space: nowrap;
}

.google-profile-link:hover,
.maps-link:hover {
    background-color: #1557c0;
    transform: translateY(-1px);
}

.google-profile-link i,
.maps-link i {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    line-height: 1;
    margin-top: -1px;
}

/* FOOTER */
footer {
    background-color: var(--primary);
    color: var(--white);
    padding: 30px 0;
    text-align: center;
    font-size: 0.92rem;
}

footer a {
    color: #CBD5E0;
}

.copyright {
    margin-top: 12px;
    color: #A0AEC0;
}

/* RESPONSIVE */
@media (max-width: 768px) {
    .business-embed-box,
    .business-embed-box iframe {
        height: 320px;
    }

    .hero-container,
    .contact-grid {
        display: grid;
        grid-template-columns: 1fr;
    }

    .hours-row {
        grid-template-columns: 1fr;
    }

    .hero {
        padding-top: 60px;
    }
}
/* ==========================================
   STILI POP-UP MODALE AVVISI (Sanity)
   ========================================== */

/* Sfondo scuro trasparente su tutta la pagina */
.popup-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100vh;
  background-color: rgba(0, 0, 0, 0.6);
  backdrop-filter: blur(3px); /* Effetto sfocatura sullo sfondo */
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 99999; /* Assicura che sia sopra ogni altro elemento */
  opacity: 1;
  transition: opacity 0.3s ease;
}

/* Finestra modale centrale */
.popup-content {
  background-color: #ffffff;
  padding: 32px 28px 28px;
  border-radius: 12px;
  max-width: 480px;
  width: 90%;
  position: relative;
  box-shadow: 0 15px 35px rgba(0, 0, 0, 0.25);
  text-align: center;
  border-top: 5px solid #8b1e2e; /* Bordo superiore del colore del brand */
  animation: popupAnimation 0.3s ease-out;
}

/* Bottone della X di chiusura */
.popup-close {
  position: absolute;
  top: 12px;
  right: 16px;
  background: transparent;
  border: none;
  font-size: 28px;
  font-weight: bold;
  color: #777;
  cursor: pointer;
  line-height: 1;
  padding: 4px 8px;
  transition: color 0.2s ease, transform 0.2s ease;
}

.popup-close:hover {
  color: #8b1e2e;
  transform: scale(1.1);
}

/* Stili per Titolo e Testo dentro il Pop-up */
.popup-body h3 {
  color: #8b1e2e;
  font-size: 1.35rem;
  margin-top: 0;
  margin-bottom: 12px;
  font-weight: 600;
}

.popup-body p {
  color: #333333;
  font-size: 1rem;
  line-height: 1.5;
  margin: 0;
}

/* Regola fondamentale per nascondere il pop-up */
.popup-hidden {
  display: none !important;
}

/* Animazione di comparsa del pop-up */
@keyframes popupAnimation {
  from {
    opacity: 0;
    transform: translateY(-20px) scale(0.95);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}
/* Contenitore fiducioso e posizionato in basso a destra */
.toast-container {
  position: fixed;
  bottom: 24px;
  right: 24px;
  z-index: 99999;
  display: flex;
  flex-direction: column;
  gap: 16px;
  max-width: 440px; /* Più largo su desktop */
  width: calc(100% - 32px);
}

/* Singolo Toast: Stile ad alto impatto visivo */
.toast-item {
  background: #ffffff;
  border-left: 8px solid #b30000; /* Bordo rosso/bordò ben marcato */
  border-radius: 12px;
  padding: 18px 22px;
  /* Ombra profonda + leggero glow per farlo "staccare" dalla pagina */
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.22), 0 0 15px rgba(179, 0, 0, 0.15);
  animation: slideUpBounce 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275) forwards;
}

.toast-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 8px;
}

.toast-title-wrapper {
  display: flex;
  align-items: center;
  gap: 10px;
}

.toast-icon {
  font-size: 1.3rem;
  line-height: 1;
}

.toast-header h4 {
  margin: 0;
  font-size: 1.15rem; /* Titolo bello grande */
  color: #111111;
  font-weight: 700;
}

/* Pulsante di chiusura facile da premere al tatto */
.toast-close {
  background: rgba(0, 0, 0, 0.06);
  border: none;
  border-radius: 50%;
  width: 32px;
  height: 32px;
  font-size: 1.3rem;
  color: #555;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s ease;
  margin-left: 12px;
  flex-shrink: 0;
}

.toast-close:hover {
  background: #b30000;
  color: #ffffff;
}

.toast-body p {
  margin: 0;
  font-size: 1rem; /* Testo del messaggio molto leggibile */
  color: #333333;
  line-height: 1.5;
}

/* Animazione di entrata dal basso verso l'alto */
@keyframes slideUpBounce {
  from {
    transform: translateY(50px) scale(0.95);
    opacity: 0;
  }
  to {
    transform: translateY(0) scale(1);
    opacity: 1;
  }
}

/* 📱 OTTIMIZZAZIONE PER SMARTPHONE */
@media (max-width: 600px) {
  .toast-container {
    bottom: 16px;
    right: 16px;
    left: 16px;
    width: auto;
    max-width: none;
  }

  .toast-item {
    padding: 16px 18px;
  }

  .toast-header h4 {
    font-size: 1.1rem;
  }

  .toast-body p {
    font-size: 0.95rem;
  }
}
/* CTA Sotto la griglia Prestazioni */
.services-cta {
  text-align: center;
  margin-top: 40px;
}

.btn-more-services {
  display: inline-block;
  background-color: transparent;
  color: #800020; /* Colore bordò principale del sito */
  border: 2px solid #800020;
  padding: 14px 28px;
  font-size: 1.05rem;
  font-weight: 700;
  border-radius: 30px;
  text-decoration: none;
  transition: all 0.3s ease;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
}

/* Effetto Hover al passaggio del mouse */
.btn-more-services:hover {
  background-color: #800020;
  color: #ffffff;
  transform: translateY(-2px);
  box-shadow: 0 6px 18px rgba(128, 0, 32, 0.25);
}

/* Uniforma tutti i titoli delle sezioni a una dimensione identica */
.section-title,
.services h2,
#prestazioni h2 {
  font-size: 2rem !important; /* Dimensione unica per tutti i titoli */
  font-weight: 700 !important;
  color: #1a2b4c !important; /* Stesso colore scuro */
  margin-bottom: 12px !important;
  text-align: center;
}

/* Ripristino gerarchia visiva corretta per la sezione Prestazioni */
.services-section h2.section-title,
#prestazioni h2.section-title {
  font-size: 2.2rem !important;
  font-weight: 700 !important;
  color: #1a2b4c !important;
  margin-bottom: 8px !important;
  text-align: center !important;
}

.services-section p.section-subtitle,
#prestazioni p.section-subtitle {
  font-size: 1rem !important;
  font-weight: 400 !important;
  color: #6b7280 !important;
  margin-top: 0 !important;
  margin-bottom: 35px !important;
  text-align: center !important;
}

/* --- GESTIONE MENU: Link normali --- */
nav a.active:not(.nav-cta) {
  color: #800020 !important;
  font-weight: 700 !important;
  border-bottom: none !important;
}

/* --- GESTIONE PULSANTE CONTATTACI (nav-cta) --- */

/* 1. Stato normale (Sfondo bordò, testo bianco, nessun alone luminoso) */
nav a.nav-cta {
  background-color: #800020 !important;
  color: #ffffff !important;
  border-radius: 50px !important;
  box-shadow: none !important;
  border-bottom: none !important;
  transition: all 0.3s ease-in-out !important;
}

/* 2. Quando passi col mouse (Hover) */
nav a.nav-cta:hover {
  background-color: #800020 !important;
  color: #ffffff !important;
  box-shadow: 0 0 12px rgba(128, 0, 32, 0.6) !important;
  transform: translateY(-1px);
}

/* 3. SOLO QUANDO ATTIVO NELLO SCROLL SULLA SEZIONE CONTATTI */
nav a.nav-cta.active {
  background-color: #800020 !important;
  color: #ffffff !important;
  box-shadow: 0 0 16px rgba(128, 0, 32, 0.8) !important;
  transform: translateY(-1px);
}

/* 1. Regola base (per tutti i dispositivi, specialmente Mobile) */
.hero-image img {
  width: 100%;
  height: auto;
  max-width: 100%; /* Impedisce all'immagine di sbordare su schermi piccoli */
  border-radius: 16px; /* Mantiene gli angoli arrotondati e puliti */
  display: block;
}

/* 2. Ingrandimento SOLO per schermi Desktop (da 992px in su) */
@media (min-width: 992px) {
  .hero-image {
    flex: 1.2;          /* Dà più spazio visivo all'immagine rispetto al testo */
    max-width: 580px;   /* Regola questa misura per deciderne la grandezza su PC */
    width: 100%;
  }
}

/* ==========================================
   FIX DEFINITIVO SCHEDA DOTTORE & LAYOUT
   ========================================== */

/* 1. Rimuove lo sfondo e le forme rosa del vecchio template */
.story-portrait::before,
.story-portrait::after,
.story-portrait-inner::before,
.story-portrait-inner::after {
  display: none !important;
  content: none !important;
  background: none !important;
}

/* 2. Ridimensiona il contenitore della foto */
.story-portrait-inner {
  position: relative !important;
  width: 100% !important;
  max-width: 320px !important;
  height: 420px !important;
  border-radius: 20px !important;
  overflow: hidden !important; /* Taglia l'immagine sugli angoli */
  background: #f0f0f0 !important;
  padding: 0 !important;
  margin: 0 auto !important;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.15) !important;
}

/* 3. La foto del Dottore riempie al 100% la scheda */
.story-portrait-inner img {
  width: 100% !important;
  height: 100% !important;
  object-fit: cover !important;
  object-position: center top !important;
  display: block !important;
  margin: 0 !important;
  border-radius: 0 !important;
}

/* 4. Targhetta bordeaux centrata in basso sopra la foto */
.story-portrait-inner span {
  position: absolute !important;
  bottom: 15px !important;
  left: 50% !important;
  transform: translateX(-50%) !important;
  background-color: #7b1e2b !important;
  color: #ffffff !important;
  padding: 8px 18px !important;
  border-radius: 30px !important;
  font-weight: 600 !important;
  font-size: 0.9rem !important;
  white-space: nowrap !important;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.3) !important;
  z-index: 10 !important;
  margin: 0 !important;
}

/* 5. Aggiunge spazio sotto la sezione per riempire la fascia bianca */
.story {
  padding-bottom: 80px !important;
}

/* --- FOOTER INCOLLATO SUL FONDO DELLO SCHERMO --- */
html {
  height: 100%;
}

body {
  min-height: 100vh !important;
  display: flex !important;
  flex-direction: column !important;
  margin: 0 !important;
}

footer {
  margin-top: auto !important;
}

/* --- UNIFICAZIONE SFONDO E CENTRAGGIO VERTICALE --- */

/* 1. Forza lo sfondo del sito a essere uniforme (bianco pulito) */
body {
  background-color: #ffffff !important;
}

/* 2. Fa espandere la sezione "La nostra storia" per riempire tutto lo spazio verticale */
section#storia, 
.story {
  flex: 1 0 auto !important;
  display: flex !important;
  align-items: center !important;     /* Centra verticalmente la scheda e il testo */
  justify-content: center !important;
  background: transparent !important; /* Rimuove fasce di colore diverse */
  padding: 60px 0 !important;
}

/* 3. Assicura che la griglia interna mantenga la larghezza corretta */
.story .container,
.story-grid {
  width: 100%;
}

/* ==========================================
   FIX RESPONSIVE MOBILI (Smartphone)
   ========================================== */

/* Previene lo scorrimento orizzontale della pagina */
html, body {
  overflow-x: hidden;
}

@media (max-width: 768px) {
  /* 1. Mette prima la foto sopra e poi il testo sotto */
  .story-grid {
    display: flex !important;
    flex-direction: column !important;
    align-items: center !important;
    gap: 30px !important;
    padding: 0 20px !important;
    box-sizing: border-box !important;
  }

  /* 2. Rende la scheda del Dottore proporzionata allo schermo del telefono */
  .story-portrait {
    width: 100% !important;
  }

  .story-portrait-inner {
    width: 100% !important;
    max-width: 260px !important; /* Dimensione perfetta per schermi stretti */
    height: 340px !important;
    margin: 0 auto !important;
  }

  /* 3. Centra e sistema i testi */
  .story-content {
    width: 100% !important;
    text-align: center !important;
  }

  .story-content h2 {
    font-size: 1.6rem !important;
    margin-bottom: 15px !important;
  }

  section#storia, .story {
    padding: 30px 0 !important;
  }
}

/* ==========================================
   FIX HEADBAR FISSA IN ALTO (STICKY HEADER)
   ========================================== */

/* 1. Evita che overflow-x disattivi lo sticky su alcuni browser mobile */
html, body {
  overflow-x: clip !important;
}

/* 2. Incolla l'header in cima allo schermo durante lo scorrimento */
header, .header, .navbar, .site-header {
  position: sticky !important;
  top: 0 !important;
  z-index: 9999 !important;               /* Sta sempre sopra a qualsiasi altro elemento */
  background-color: #ffffff !important;   /* Evita che i contenuti sotto si vedano in trasparenza */
  box-shadow: 0 2px 12px rgba(0, 0, 0, 0.08) !important; /* Ombra discreta sotto lo scorrimento */
}