/* Studio Medico Olga Schiano — performance + professional UI */

:root {
  --ink: #1a2b2e;
  --ink-soft: #3d5256;
  --muted: #5f7276;
  --line: #d7e2e4;
  --paper: #f5f8f8;
  --white: #ffffff;
  --teal: #1f6f6a;
  --teal-deep: #164f4b;
  --teal-soft: #e6f2f1;
  --accent: #2a8a82;
  --shadow: 0 12px 40px rgba(22, 79, 75, 0.08);
  --radius: 14px;
  --font-display: "Fraunces", Georgia, serif;
  --font-body: "Source Sans 3", "Segoe UI", sans-serif;
  --max: 1120px;
}

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

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  font-family: var(--font-body);
  color: var(--ink);
  background:
    radial-gradient(1200px 500px at 10% -10%, #e8f4f3 0%, transparent 55%),
    radial-gradient(900px 400px at 100% 0%, #edf3f6 0%, transparent 50%),
    var(--paper);
  line-height: 1.65;
  overflow-x: hidden;
  padding-bottom: 76px;
}

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

a { color: var(--teal); text-decoration: none; transition: color .2s ease; }
a:hover { color: var(--teal-deep); }

.container {
  width: min(100% - 2rem, var(--max));
  margin-inline: auto;
}

/* Top bar */
.topbar {
  background: var(--ink);
  color: #c9d5d7;
  font-size: .86rem;
}
.topbar .container {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  align-items: center;
  padding: .55rem 0;
  flex-wrap: wrap;
}
.topbar a { color: #e8f0f1; }
.topbar a:hover { color: #fff; }
.topbar-links { display: flex; gap: 1.1rem; flex-wrap: wrap; align-items: center; }

/* Nav */
.site-nav {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(255,255,255,.92);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
}
.nav-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: .85rem 0;
}
.brand {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: clamp(1rem, 2.2vw, 1.2rem);
  color: var(--ink);
  line-height: 1.25;
  max-width: 22rem;
}
.brand span {
  display: block;
  font-family: var(--font-body);
  font-weight: 500;
  font-size: .78rem;
  color: var(--muted);
  margin-top: .15rem;
}
.nav-toggle {
  display: none;
  border: 1px solid var(--line);
  background: var(--white);
  border-radius: 8px;
  padding: .45rem .65rem;
  cursor: pointer;
}
.nav-toggle span {
  display: block;
  width: 20px;
  height: 2px;
  background: var(--ink);
  margin: 4px 0;
}
.nav-links {
  display: flex;
  align-items: center;
  gap: .15rem 1rem;
  list-style: none;
  margin: 0;
  padding: 0;
}
.nav-links a {
  color: var(--ink-soft);
  font-size: .92rem;
  font-weight: 600;
}
.nav-links a:hover { color: var(--teal); }
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: .4rem;
  background: var(--teal);
  color: #fff !important;
  border: none;
  border-radius: 999px;
  padding: .72rem 1.25rem;
  font-weight: 650;
  font-size: .92rem;
  letter-spacing: .01em;
  transition: transform .15s ease, background .2s ease;
}
.btn:hover { background: var(--teal-deep); transform: translateY(-1px); }
.btn-ghost {
  background: transparent;
  color: var(--teal) !important;
  border: 1.5px solid rgba(31,111,106,.35);
}
.btn-ghost:hover { background: var(--teal-soft); }

.online-banner {
  background: linear-gradient(90deg, var(--teal-soft), #eef6f8);
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  text-align: center;
  padding: .55rem 1rem;
  font-size: .92rem;
  color: var(--ink-soft);
}
.online-banner a { font-weight: 700; }

/* Hero */
.hero {
  position: relative;
  min-height: min(78vh, 640px);
  display: grid;
  align-items: end;
  color: #fff;
  overflow: hidden;
}
.hero-media {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(180deg, rgba(15,40,42,.35) 0%, rgba(15,40,42,.72) 100%),
    url("../images/web/hero.jpg") center/cover no-repeat;
  transform: scale(1.02);
  animation: heroIn 1.2s ease-out both;
}
.hero-content {
  position: relative;
  z-index: 1;
  padding: 4.5rem 0 3.5rem;
  max-width: 40rem;
  animation: rise .8s .15s ease both;
}
.hero-kicker {
  font-size: .8rem;
  letter-spacing: .14em;
  text-transform: uppercase;
  opacity: .9;
  margin: 0 0 .8rem;
  font-weight: 600;
}
.hero h1 {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: clamp(1.85rem, 4.5vw, 3rem);
  line-height: 1.15;
  margin: 0 0 .9rem;
  letter-spacing: -.02em;
}
.hero p {
  margin: 0 0 1.5rem;
  font-size: 1.05rem;
  max-width: 34rem;
  color: rgba(255,255,255,.9);
}
.hero-actions { display: flex; flex-wrap: wrap; gap: .75rem; }

@keyframes heroIn {
  from { transform: scale(1.08); opacity: .6; }
  to { transform: scale(1.02); opacity: 1; }
}
@keyframes rise {
  from { opacity: 0; transform: translateY(18px); }
  to { opacity: 1; transform: translateY(0); }
}

/* Sections */
.section {
  padding: 4.5rem 0;
}
.section-alt { background: var(--white); }
.section-head {
  margin-bottom: 2rem;
  max-width: 46rem;
}
.section-head h2 {
  font-family: var(--font-display);
  font-size: clamp(1.7rem, 3vw, 2.35rem);
  margin: 0 0 .65rem;
  letter-spacing: -.02em;
  color: var(--ink);
  font-weight: 600;
}
.section-head p {
  margin: 0;
  color: var(--muted);
  font-size: 1.05rem;
}

.prose h3 {
  font-family: var(--font-display);
  font-size: 1.35rem;
  margin: 0 0 .6rem;
  font-weight: 600;
}
.prose h4 {
  margin: 1.75rem 0 .55rem;
  font-size: 1.05rem;
  color: var(--teal-deep);
  letter-spacing: .02em;
  text-transform: uppercase;
  font-weight: 700;
}
.prose p {
  margin: 0 0 1rem;
  color: var(--ink-soft);
  font-size: 1.02rem;
}
.contact-note {
  margin-top: 1.5rem;
  padding: 1rem 1.15rem;
  background: var(--teal-soft);
  border-radius: var(--radius);
  border-left: 4px solid var(--teal);
  color: var(--ink-soft);
}

/* Clinical areas */
.areas-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1rem;
}
.area-card {
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 1.25rem 1.3rem 1.35rem;
  box-shadow: var(--shadow);
  transition: transform .2s ease, border-color .2s ease;
}
.area-card:hover {
  transform: translateY(-3px);
  border-color: rgba(31,111,106,.35);
}
.area-card h3 {
  font-family: var(--font-display);
  font-size: 1.15rem;
  margin: 0 0 .55rem;
  color: var(--ink);
  line-height: 1.3;
}
.area-card p {
  margin: 0;
  color: var(--muted);
  font-size: .97rem;
}

/* Gallery */
.gallery-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: .9rem;
}
@media (min-width: 768px) {
  .gallery-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); }
}
.gallery-item {
  margin: 0;
  border-radius: 12px;
  overflow: hidden;
  background: #dfe8e9;
  aspect-ratio: 4 / 3;
  box-shadow: var(--shadow);
}
.gallery-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform .45s ease;
}
.gallery-item:hover img { transform: scale(1.04); }

/* Map */
.map-wrap {
  background: var(--paper);
  min-height: 320px;
}
.map-placeholder {
  min-height: 320px;
  display: grid;
  place-items: center;
  text-align: center;
  padding: 2rem;
  color: var(--muted);
  background:
    linear-gradient(180deg, #eef3f4, #e4ecee);
}
.map-wrap iframe {
  width: 100%;
  height: 360px;
  border: 0;
  display: block;
}

/* Footer */
.site-footer {
  background: var(--ink);
  color: #c5d2d4;
  padding: 3.5rem 0 2rem;
}
.footer-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 2rem;
}
.site-footer h4 {
  color: #fff;
  font-family: var(--font-display);
  font-size: 1.15rem;
  margin: 0 0 1rem;
  font-weight: 600;
}
.site-footer .sede { margin-bottom: 1rem; }
.site-footer .sede strong {
  display: block;
  color: #fff;
  font-weight: 650;
  margin-bottom: .15rem;
}
.site-footer p { margin: 0; font-size: .94rem; }
.site-footer a { color: #dce8ea; }
.site-footer a:hover { color: #fff; }
.footer-links { list-style: none; margin: 0; padding: 0; }
.footer-links li { margin-bottom: .45rem; }
.footer-bottom {
  margin-top: 2.5rem;
  padding-top: 1.25rem;
  border-top: 1px solid rgba(255,255,255,.12);
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
  font-size: .85rem;
}

/* Sticky CTA */
.sticky-cta {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 120;
  background: rgba(255,255,255,.96);
  border-top: 1px solid var(--line);
  backdrop-filter: blur(8px);
  padding: .65rem 1rem;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 1rem;
  box-shadow: 0 -8px 30px rgba(0,0,0,.06);
}
.sticky-cta p {
  margin: 0;
  color: var(--ink-soft);
  font-weight: 600;
  font-size: .95rem;
}

/* Responsive */
@media (max-width: 900px) {
  .areas-grid { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr; gap: 1.75rem; }
  .nav-toggle { display: inline-block; }
  .nav-links {
    display: none;
    position: absolute;
    left: 0;
    right: 0;
    top: 100%;
    background: #fff;
    border-bottom: 1px solid var(--line);
    flex-direction: column;
    align-items: stretch;
    padding: .75rem 1rem 1rem;
    gap: .35rem;
  }
  .nav-links.open { display: flex; }
  .nav-links .btn { width: 100%; margin-top: .35rem; }
  .brand { max-width: 16rem; }
}

@media (max-width: 640px) {
  .topbar-links .hide-sm { display: none; }
  .hero { min-height: 72vh; }
  .hero-content { padding: 3.5rem 0 2.75rem; }
  .section { padding: 3.25rem 0; }
  .sticky-cta { flex-direction: column; gap: .45rem; }
  .sticky-cta .btn { width: 100%; }
  body { padding-bottom: 108px; }
}
