/* ==========================================================================
   Studio Fisioterapico Morgagni S.R.L. - Foglio di Stile Ufficiale
   Palette Ufficiale FisioM: Pantone 288 Navy (#1b3765) & Pantone 3265 Teal (#00aca6)
   ========================================================================== */
:root {
  --primary: #1b3765;
  --primary-dark: #112445;
  --primary-light: #284c87;
  --accent: #00aca6;
  --accent-dark: #008a85;
  --accent-soft: #e6f7f6;
  --bg-light: #f4f8fb;
  --bg-white: #ffffff;
  --text-main: #1e293b;
  --text-muted: #52637a;
  --border-color: #dce6f0;
  --shadow-sm: 0 4px 14px rgba(27, 55, 101, 0.06);
  --shadow-md: 0 12px 30px rgba(27, 55, 101, 0.10);
  --radius-md: 14px;
  --radius-lg: 22px;
  --transition: all 0.25s ease;
}

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

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

body {
  font-family: 'Segoe UI', system-ui, -apple-system, Roboto, Helvetica, Arial, sans-serif;
  color: var(--text-main);
  background-color: var(--bg-white);
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}

a {
  color: var(--accent-dark);
  text-decoration: none;
  transition: var(--transition);
}

a:hover {
  color: var(--primary);
}

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

.container {
  width: 100%;
  max-width: 1180px;
  margin: 0 auto;
  padding: 0 22px;
}

/* --- Dynamic Site Notice Banner (Avvisi ad Hoc) --- */
.site-notice {
  display: none;
  padding: 12px 0;
  font-size: 0.94rem;
  border-bottom: 1px solid rgba(0, 0, 0, 0.08);
}

.site-notice.active {
  display: block;
}

.site-notice.notice-info {
  background: linear-gradient(90deg, #008a85, #00aca6);
  color: #ffffff;
}

.site-notice.notice-warning {
  background: #fef3c7;
  color: #92400e;
  border-bottom-color: #fde68a;
}

.site-notice.notice-urgent {
  background: #fee2e2;
  color: #991b1b;
  border-bottom-color: #fecaca;
}

.site-notice-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
}

.site-notice-badge {
  display: inline-block;
  padding: 3px 10px;
  border-radius: 99px;
  font-weight: 700;
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  margin-right: 8px;
  background: rgba(255, 255, 255, 0.22);
}

.notice-warning .site-notice-badge {
  background: #f59e0b;
  color: #ffffff;
}

.notice-urgent .site-notice-badge {
  background: #dc2626;
  color: #ffffff;
}

.site-notice-cta {
  font-weight: 700;
  padding: 5px 14px;
  border-radius: 99px;
  background: rgba(255, 255, 255, 0.92);
  color: var(--primary) !important;
  font-size: 0.86rem;
  white-space: nowrap;
}

/* --- Topbar --- */
.topbar {
  background-color: var(--primary);
  color: rgba(255, 255, 255, 0.92);
  font-size: 0.86rem;
  padding: 9px 0;
}

.topbar-inner {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
}

.topbar a {
  color: #ffffff;
  font-weight: 600;
}

.topbar a:hover {
  color: #7ef0ec;
}

.topbar-phones {
  display: inline-flex;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
}

/* --- Header & Navigation --- */
header {
  background: rgba(255, 255, 255, 0.98);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--border-color);
  position: sticky;
  top: 0;
  z-index: 990;
  box-shadow: 0 2px 12px rgba(27, 55, 101, 0.04);
}

.navbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  min-height: 84px;
  gap: 20px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
}

.brand-logo-img {
  height: 60px;
  width: auto;
}

.nav-links {
  display: flex;
  align-items: center;
  list-style: none;
  gap: 24px;
}

.nav-links a {
  color: var(--primary);
  font-weight: 600;
  font-size: 0.96rem;
  padding: 6px 2px;
  position: relative;
}

.nav-links a::after {
  content: '';
  position: absolute;
  left: 0;
  bottom: 0;
  width: 0;
  height: 2.5px;
  background: var(--accent);
  transition: var(--transition);
}

.nav-links a:hover::after,
.nav-links a.active::after {
  width: 100%;
}

.nav-links a.active {
  color: var(--accent-dark);
}

.nav-cta {
  background: var(--accent);
  color: #ffffff !important;
  padding: 10px 20px !important;
  border-radius: 99px;
  box-shadow: 0 4px 12px rgba(0, 172, 166, 0.25);
}

.nav-cta::after {
  display: none !important;
}

.nav-cta:hover {
  background: var(--primary);
  transform: translateY(-1px);
}

.nav-toggle {
  display: none;
  background: none;
  border: 2px solid var(--border-color);
  border-radius: 8px;
  padding: 7px 11px;
  color: var(--primary);
  font-size: 1.25rem;
  cursor: pointer;
}

/* --- Buttons --- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 13px 26px;
  border-radius: 99px;
  font-weight: 700;
  font-size: 0.96rem;
  cursor: pointer;
  border: 2px solid transparent;
  transition: var(--transition);
  text-align: center;
}

.btn-primary {
  background: var(--accent);
  color: #ffffff !important;
  box-shadow: 0 6px 18px rgba(0, 172, 166, 0.26);
}

.btn-primary:hover {
  background: var(--accent-dark);
  transform: translateY(-2px);
}

.btn-navy {
  background: var(--primary);
  color: #ffffff !important;
  box-shadow: 0 6px 18px rgba(27, 55, 101, 0.22);
}

.btn-navy:hover {
  background: var(--primary-dark);
  transform: translateY(-2px);
}

.btn-outline {
  background: transparent;
  border-color: var(--primary);
  color: var(--primary) !important;
}

.btn-outline:hover {
  background: var(--primary);
  color: #ffffff !important;
}

/* --- Hero Section --- */
.hero {
  background: radial-gradient(circle at 85% 25%, rgba(0, 172, 166, 0.12), transparent 48%),
              linear-gradient(135deg, #f2f8fb 0%, #ffffff 65%, #eaf6f6 100%);
  padding: 68px 0 74px;
  border-bottom: 1px solid var(--border-color);
  overflow: hidden;
}

.hero-grid {
  display: grid;
  grid-template-columns: 1.18fr 0.82fr;
  gap: 46px;
  align-items: center;
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: var(--accent-soft);
  color: var(--accent-dark);
  font-weight: 700;
  font-size: 0.83rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  padding: 6px 14px;
  border-radius: 99px;
  margin-bottom: 18px;
}

.hero h1 {
  color: var(--primary);
  font-size: clamp(2rem, 3.6vw, 2.85rem);
  line-height: 1.18;
  margin-bottom: 18px;
  font-weight: 800;
}

.hero h1 span {
  color: var(--accent-dark);
}

.hero-lead {
  color: var(--text-muted);
  font-size: 1.08rem;
  margin-bottom: 26px;
  max-width: 620px;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  margin-bottom: 30px;
}

.governance-strip {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 14px;
  background: #ffffff;
  border: 1px solid var(--border-color);
  border-left: 4px solid var(--accent);
  padding: 16px 20px;
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-sm);
}

.governance-item small {
  display: block;
  font-size: 0.76rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--text-muted);
  font-weight: 700;
}

.governance-item strong {
  color: var(--primary);
  font-size: 0.98rem;
}

/* --- Round Blurred Clinical Medallions --- */
.hero-medallion-box {
  position: relative;
  display: flex;
  justify-content: center;
  align-items: center;
}

.hero-medallion-box::before {
  content: '';
  position: absolute;
  width: 94%;
  height: 94%;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(0, 172, 166, 0.20) 0%, rgba(27, 55, 101, 0.06) 65%, transparent 75%);
  z-index: 0;
}

.medallion-hero-img {
  position: relative;
  z-index: 1;
  width: 100%;
  max-width: 430px;
  aspect-ratio: 1 / 1;
  border-radius: 50%;
  object-fit: cover;
  filter: drop-shadow(0 18px 34px rgba(27, 55, 101, 0.16));
}

.medallion-card-wrap {
  display: flex;
  justify-content: center;
  margin-bottom: 18px;
}

.medallion-card-img {
  width: 190px;
  height: 190px;
  border-radius: 50%;
  object-fit: cover;
  filter: drop-shadow(0 10px 20px rgba(27, 55, 101, 0.13));
  transition: var(--transition);
}

.card:hover .medallion-card-img {
  transform: scale(1.04);
}

/* --- Page Header (Internal Pages) --- */
.page-header {
  background: linear-gradient(125deg, var(--primary) 0%, var(--primary-light) 65%, #0d6e78 100%);
  color: #ffffff;
  padding: 54px 0;
}

.page-header .eyebrow {
  background: rgba(255, 255, 255, 0.16);
  color: #9bf6f2;
}

.page-header h1 {
  font-size: clamp(1.85rem, 3.2vw, 2.5rem);
  margin-bottom: 10px;
}

.page-header p {
  color: rgba(255, 255, 255, 0.88);
  max-width: 720px;
  font-size: 1.05rem;
}

/* --- Sections, Grids & Cards --- */
section {
  padding: 72px 0;
}

.bg-soft {
  background-color: var(--bg-light);
}

.section-header {
  text-align: center;
  max-width: 740px;
  margin: 0 auto 46px;
}

.section-header h2, .section-header h3 {
  color: var(--primary);
  font-size: clamp(1.65rem, 2.6vw, 2.15rem);
  margin-bottom: 12px;
  font-weight: 800;
}

.section-header p {
  color: var(--text-muted);
  font-size: 1.02rem;
}

.grid-2 {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 28px;
}

.grid-3 {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 26px;
}

.grid-4 {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 24px;
}

.card {
  background: var(--bg-white);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 28px;
  box-shadow: var(--shadow-sm);
  transition: var(--transition);
}

.card:hover {
  box-shadow: var(--shadow-md);
  border-color: rgba(0, 172, 166, 0.4);
}

.card h3 {
  color: var(--primary);
  font-size: 1.22rem;
  margin-bottom: 10px;
}

.card p {
  color: var(--text-muted);
  font-size: 0.95rem;
}

.badge-pill {
  display: inline-block;
  background: var(--accent-soft);
  color: var(--accent-dark);
  font-size: 0.78rem;
  font-weight: 700;
  padding: 4px 11px;
  border-radius: 99px;
  margin-bottom: 10px;
}

.check-list {
  list-style: none;
  margin-top: 14px;
}

.check-list li {
  position: relative;
  padding-left: 24px;
  margin-bottom: 9px;
  font-size: 0.94rem;
  color: var(--text-main);
}

.check-list li::before {
  content: '✓';
  position: absolute;
  left: 0;
  top: 0;
  color: var(--accent);
  font-weight: 800;
}

/* --- Dynamic Real Venue Photo Gallery --- */
.real-gallery-section {
  display: none;
  background: var(--bg-light);
  border-top: 1px solid var(--border-color);
  border-bottom: 1px solid var(--border-color);
}

.real-gallery-section.has-photos {
  display: block;
}

.real-gallery-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 22px;
}

.real-photo-item {
  background: #ffffff;
  border-radius: var(--radius-md);
  overflow: hidden;
  border: 1px solid var(--border-color);
  box-shadow: var(--shadow-sm);
  transition: var(--transition);
}

.real-photo-item:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-md);
}

.real-photo-item img {
  width: 100%;
  height: 215px;
  object-fit: cover;
  cursor: pointer;
}

.real-photo-caption {
  padding: 12px 16px;
  font-size: 0.9rem;
  color: var(--primary);
  font-weight: 600;
}

/* --- Tables (Opening Hours & Corporate Transparency) --- */
.table-wrap {
  overflow-x: auto;
}

.hours-table,
.legal-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.95rem;
}

.hours-table th,
.hours-table td,
.legal-table th,
.legal-table td {
  padding: 13px 16px;
  text-align: left;
  border-bottom: 1px solid var(--border-color);
}

.hours-table th,
.legal-table th {
  background: var(--bg-light);
  color: var(--primary);
  font-weight: 700;
}

.legal-table th {
  width: 36%;
}

.hours-closed {
  color: #b91c1c;
  font-weight: 600;
}

.hours-note-box {
  margin-top: 14px;
  padding: 12px 16px;
  background: var(--accent-soft);
  border-left: 4px solid var(--accent);
  border-radius: 8px;
  color: var(--primary);
  font-size: 0.9rem;
  font-weight: 600;
}

/* --- Forms & Alerts --- */
.form-group {
  margin-bottom: 16px;
}

.form-group label {
  display: block;
  font-weight: 600;
  color: var(--primary);
  margin-bottom: 6px;
  font-size: 0.9rem;
}

.form-control {
  width: 100%;
  padding: 11px 14px;
  border: 1.5px solid var(--border-color);
  border-radius: 10px;
  font-family: inherit;
  font-size: 0.95rem;
  color: var(--text-main);
  background: #ffffff;
  transition: var(--transition);
}

.form-control:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(0, 172, 166, 0.15);
}

.checkbox-group {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  font-size: 0.88rem;
  color: var(--text-muted);
}

.alert-success {
  display: none;
  padding: 14px 18px;
  border-radius: 10px;
  background: #ecfdf5;
  border: 1px solid #6ee7b7;
  color: #065f46;
  font-weight: 600;
  font-size: 0.94rem;
}

.sanitary-compliance-box {
  background: #f8fafc;
  border: 1px solid var(--border-color);
  border-left: 4px solid var(--primary);
  border-radius: var(--radius-md);
  padding: 20px 24px;
  font-size: 0.89rem;
  color: var(--text-muted);
  margin-top: 36px;
}

/* --- Footer --- */
footer {
  background: var(--primary-dark);
  color: rgba(255, 255, 255, 0.84);
  padding: 60px 0 28px;
  font-size: 0.92rem;
}

.footer-grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr 1.2fr;
  gap: 34px;
  margin-bottom: 42px;
}

.footer-logo {
  height: 58px;
  width: auto;
  margin-bottom: 14px;
}

footer h4 {
  color: #ffffff;
  font-size: 1.04rem;
  margin-bottom: 16px;
  position: relative;
  padding-bottom: 8px;
}

footer h4::after {
  content: '';
  position: absolute;
  left: 0;
  bottom: 0;
  width: 34px;
  height: 2.5px;
  background: var(--accent);
}

.footer-links {
  list-style: none;
}

.footer-links li {
  margin-bottom: 9px;
}

.footer-links a {
  color: rgba(255, 255, 255, 0.82);
}

.footer-links a:hover {
  color: #7ef0ec;
}

.footer-bottom {
  border-top: 1px solid rgba(255, 255, 255, 0.12);
  padding-top: 22px;
  font-size: 0.82rem;
  color: rgba(255, 255, 255, 0.68);
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
}

/* --- Cookie Banner & Lightbox --- */
.cookie-banner {
  position: fixed;
  bottom: 20px;
  left: 20px;
  right: 20px;
  max-width: 680px;
  margin: 0 auto;
  background: var(--primary);
  color: #ffffff;
  padding: 18px 24px;
  border-radius: var(--radius-md);
  box-shadow: 0 16px 38px rgba(0, 0, 0, 0.28);
  z-index: 1200;
  display: none;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
}

.cookie-banner.show {
  display: flex;
}

.cookie-banner p {
  font-size: 0.86rem;
  color: rgba(255, 255, 255, 0.92);
}

.cookie-banner a {
  color: #7ef0ec;
  text-decoration: underline;
}

.lightbox-overlay {
  position: fixed;
  inset: 0;
  background: rgba(11, 23, 44, 0.88);
  z-index: 2000;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 24px;
}

.lightbox-overlay.open {
  display: flex;
}

.lightbox-overlay img {
  max-width: 92vw;
  max-height: 84vh;
  border-radius: 12px;
  box-shadow: 0 20px 50px rgba(0,0,0,0.5);
}

/* --- Responsive --- */
@media (max-width: 980px) {
  .hero-grid,
  .grid-4,
  .footer-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  .hero-grid {
    grid-template-columns: 1fr;
    text-align: center;
  }
  .hero-lead {
    margin-left: auto;
    margin-right: auto;
  }
  .hero-actions {
    justify-content: center;
  }
  .governance-strip {
    text-align: left;
  }
  .medallion-hero-img {
    max-width: 340px;
  }
}

@media (max-width: 768px) {
  .nav-toggle {
    display: block;
  }
  .nav-links {
    display: none;
    position: absolute;
    top: 84px;
    left: 0;
    right: 0;
    background: #ffffff;
    flex-direction: column;
    padding: 20px;
    gap: 14px;
    border-bottom: 2px solid var(--border-color);
    box-shadow: var(--shadow-md);
  }
  .nav-links.open {
    display: flex;
  }
  .grid-2,
  .grid-3,
  .grid-4,
  .footer-grid,
  .governance-strip {
    grid-template-columns: 1fr;
  }
  .topbar-inner {
    justify-content: center;
    text-align: center;
  }
  .cookie-banner {
    flex-direction: column;
    text-align: center;
  }
}
