/* ============================================
   Dott.ssa Sabrina Ruggiero - Physiocare
   Design System: Blu Celeste Medical
   ============================================ */

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

:root {
  /* Primary Palette */
  --blue-900: #0C2D5A;
  --blue-800: #0F3A73;
  --blue-700: #14478A;
  --blue-600: #1A5BA8;
  --blue-500: #2170C8;
  --celeste-400: #4EADEA;
  --celeste-300: #7CC5F0;
  --celeste-200: #A8D8F5;
  --celeste-100: #D4ECFA;
  --celeste-50: #EDF6FD;

  /* Neutrals */
  --white: #FFFFFF;
  --gray-50: #F8FAFC;
  --gray-100: #F1F5F9;
  --gray-200: #E2E8F0;
  --gray-300: #CBD5E1;
  --gray-400: #94A3B8;
  --gray-500: #64748B;
  --gray-600: #475569;
  --gray-700: #334155;
  --gray-800: #1E293B;
  --gray-900: #0F172A;

  /* Accents */
  --accent-teal: #0D9488;
  --accent-teal-light: #14B8A6;
  --accent-gold: #D97706;

  /* Semantic */
  --text-primary: var(--gray-900);
  --text-secondary: var(--gray-600);
  --text-muted: var(--gray-400);
  --bg-primary: var(--white);
  --bg-secondary: var(--gray-50);
  --bg-blue: var(--blue-900);

  /* Typography */
  --font-heading: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --font-body: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;

  /* Spacing */
  --section-py: clamp(4rem, 8vw, 7rem);
  --container-px: clamp(1.25rem, 4vw, 2rem);
  --container-max: 1200px;

  /* Shadows */
  --shadow-sm: 0 1px 2px rgba(15,23,42,.06);
  --shadow-md: 0 4px 12px rgba(15,23,42,.08);
  --shadow-lg: 0 8px 30px rgba(15,23,42,.12);
  --shadow-blue: 0 4px 20px rgba(33,112,200,.15);

  /* Radius */
  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 16px;
  --radius-xl: 24px;

  /* Transitions */
  --ease: cubic-bezier(.4, 0, .2, 1);
}

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

body {
  font-family: var(--font-body);
  font-size: 1rem;
  line-height: 1.7;
  color: var(--text-primary);
  background: var(--bg-primary);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

img { max-width: 100%; height: auto; display: block; }
a { color: var(--blue-600); text-decoration: none; transition: color .2s var(--ease); }
a:hover { color: var(--blue-800); }

.container {
  max-width: var(--container-max);
  margin: 0 auto;
  padding: 0 var(--container-px);
}

/* --- Typography --- */
h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-heading);
  font-weight: 700;
  line-height: 1.25;
  color: var(--text-primary);
}

h1 { font-size: clamp(2rem, 5vw, 3.25rem); letter-spacing: -.02em; }
h2 { font-size: clamp(1.75rem, 4vw, 2.5rem); letter-spacing: -.015em; }
h3 { font-size: clamp(1.25rem, 3vw, 1.5rem); }
h4 { font-size: 1.125rem; }

p { color: var(--text-secondary); }

.section-label {
  display: inline-flex;
  align-items: center;
  gap: .5rem;
  font-size: .8125rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: .1em;
  color: var(--blue-600);
  margin-bottom: .75rem;
}

.section-label::before {
  content: '';
  width: 2rem;
  height: 2px;
  background: var(--celeste-400);
  border-radius: 1px;
}

.section-title { margin-bottom: 1rem; }
.section-desc { font-size: 1.0625rem; max-width: 640px; margin-bottom: 3rem; }

/* --- Buttons --- */
.btn {
  display: inline-flex;
  align-items: center;
  gap: .5rem;
  font-family: var(--font-body);
  font-size: .9375rem;
  font-weight: 600;
  padding: .75rem 1.75rem;
  border-radius: var(--radius-sm);
  border: none;
  cursor: pointer;
  transition: all .25s var(--ease);
  text-decoration: none;
  line-height: 1.4;
}

.btn-primary {
  background: linear-gradient(135deg, var(--blue-600), var(--blue-700));
  color: var(--white);
  box-shadow: var(--shadow-blue);
}
.btn-primary:hover {
  background: linear-gradient(135deg, var(--blue-700), var(--blue-800));
  color: var(--white);
  transform: translateY(-1px);
  box-shadow: 0 6px 24px rgba(33,112,200,.25);
}

.btn-secondary {
  background: var(--white);
  color: var(--blue-700);
  border: 1.5px solid var(--blue-600);
}
.btn-secondary:hover {
  background: var(--celeste-50);
  color: var(--blue-800);
}

.btn-whatsapp {
  background: #25D366;
  color: var(--white);
}
.btn-whatsapp:hover {
  background: #1EBE59;
  color: var(--white);
  transform: translateY(-1px);
}

.btn-sm { font-size: .8125rem; padding: .5rem 1.25rem; }

/* --- Header --- */
.site-header {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 1000;
  background: rgba(255,255,255,.92);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--gray-200);
  transition: box-shadow .3s var(--ease);
}

.site-header.scrolled { box-shadow: var(--shadow-md); }

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 72px;
}

.logo {
  display: flex;
  align-items: center;
  gap: .75rem;
  text-decoration: none;
  color: var(--text-primary);
}

.logo-icon {
  width: 40px;
  height: 40px;
  background: linear-gradient(135deg, var(--blue-600), var(--celeste-400));
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--white);
  font-size: 1.125rem;
  flex-shrink: 0;
}

.logo-text { display: flex; flex-direction: column; line-height: 1.2; }
.logo-name { font-weight: 700; font-size: .9375rem; color: var(--blue-900); }
.logo-subtitle { font-size: .6875rem; color: var(--gray-500); font-weight: 500; text-transform: uppercase; letter-spacing: .05em; }

.nav-desktop { display: flex; align-items: center; gap: .25rem; }
.nav-desktop a {
  font-size: .875rem;
  font-weight: 500;
  color: var(--gray-600);
  padding: .5rem .875rem;
  border-radius: var(--radius-sm);
  transition: all .2s var(--ease);
}
.nav-desktop a:hover,
.nav-desktop a.active { color: var(--blue-700); background: var(--celeste-50); }

.nav-cta {
  font-size: .8125rem !important;
  font-weight: 600 !important;
  background: var(--blue-600) !important;
  color: var(--white) !important;
  padding: .5rem 1.25rem !important;
}
.nav-cta:hover { background: var(--blue-700) !important; }

/* Mobile menu */
.nav-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 8px;
}
.nav-toggle span {
  width: 24px;
  height: 2px;
  background: var(--gray-700);
  border-radius: 1px;
  transition: all .3s var(--ease);
}
.nav-toggle.active span:nth-child(1) { transform: rotate(45deg) translate(5px, 5px); }
.nav-toggle.active span:nth-child(2) { opacity: 0; }
.nav-toggle.active span:nth-child(3) { transform: rotate(-45deg) translate(5px, -5px); }

.nav-mobile {
  display: none;
  position: fixed;
  top: 72px; left: 0; right: 0;
  background: var(--white);
  border-bottom: 1px solid var(--gray-200);
  padding: 1rem;
  box-shadow: var(--shadow-lg);
}
.nav-mobile.open { display: block; }
.nav-mobile a {
  display: block;
  font-size: .9375rem;
  font-weight: 500;
  color: var(--gray-700);
  padding: .75rem 1rem;
  border-radius: var(--radius-sm);
}
.nav-mobile a:hover { background: var(--celeste-50); color: var(--blue-700); }

/* --- Hero --- */
.hero {
  padding-top: calc(72px + var(--section-py));
  padding-bottom: var(--section-py);
  background: linear-gradient(160deg, var(--blue-900) 0%, var(--blue-700) 40%, var(--celeste-400) 100%);
  position: relative;
  overflow: hidden;
  color: var(--white);
}

.hero::before {
  content: '';
  position: absolute;
  top: -50%; right: -20%;
  width: 80%;
  height: 200%;
  background: radial-gradient(ellipse, rgba(78,173,234,.2) 0%, transparent 70%);
  pointer-events: none;
}

.hero-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4rem;
  align-items: center;
  position: relative;
  z-index: 1;
}

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: .5rem;
  font-size: .75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: .08em;
  color: var(--celeste-200);
  margin-bottom: 1.5rem;
  padding: .375rem 1rem;
  border: 1px solid rgba(168,216,245,.25);
  border-radius: 100px;
  background: rgba(168,216,245,.08);
}

.hero h1 { color: var(--white); margin-bottom: 1.5rem; }
.hero h1 span { color: var(--celeste-300); }

.hero-desc {
  font-size: 1.125rem;
  line-height: 1.7;
  color: var(--celeste-100);
  margin-bottom: 2rem;
  max-width: 520px;
}

.hero-buttons { display: flex; gap: 1rem; flex-wrap: wrap; }

.hero-photo {
  position: relative;
  display: flex;
  justify-content: center;
}

.hero-photo-frame {
  width: 380px;
  height: 380px;
  border-radius: 50%;
  background: linear-gradient(135deg, rgba(78,173,234,.3), rgba(255,255,255,.1));
  padding: 6px;
  position: relative;
}

.hero-photo-inner {
  width: 100%;
  height: 100%;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--celeste-200), var(--celeste-400));
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

.hero-photo-inner img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.hero-photo-inner .placeholder-icon {
  font-size: 6rem;
  opacity: .6;
}

.hero-stats {
  display: flex;
  gap: 2rem;
  margin-top: 2.5rem;
  padding-top: 2rem;
  border-top: 1px solid rgba(168,216,245,.2);
}

.hero-stat { text-align: center; }
.hero-stat-value { font-size: 1.75rem; font-weight: 800; color: var(--white); }
.hero-stat-label { font-size: .75rem; color: var(--celeste-200); text-transform: uppercase; letter-spacing: .05em; }

/* --- Services Section --- */
.services { padding: var(--section-py) 0; background: var(--bg-secondary); }

.services-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 1.5rem;
}

.service-card {
  background: var(--white);
  border-radius: var(--radius-md);
  padding: 2rem;
  border: 1px solid var(--gray-200);
  transition: all .3s var(--ease);
  text-decoration: none;
  display: flex;
  flex-direction: column;
}
.service-card:hover {
  border-color: var(--celeste-300);
  box-shadow: var(--shadow-blue);
  transform: translateY(-4px);
}

.service-icon {
  width: 52px;
  height: 52px;
  border-radius: var(--radius-sm);
  background: var(--celeste-50);
  color: var(--blue-600);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
  margin-bottom: 1.25rem;
  flex-shrink: 0;
}

.service-card h3 { margin-bottom: .75rem; color: var(--text-primary); font-size: 1.125rem; }
.service-card p { font-size: .9375rem; color: var(--text-secondary); margin-bottom: 1.25rem; flex-grow: 1; }

.service-link {
  font-size: .875rem;
  font-weight: 600;
  color: var(--blue-600);
  display: inline-flex;
  align-items: center;
  gap: .375rem;
}
.service-link::after { content: '→'; transition: transform .2s var(--ease); }
.service-card:hover .service-link::after { transform: translateX(4px); }

/* --- About Section --- */
.about { padding: var(--section-py) 0; }

.about-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4rem;
  align-items: center;
}

.about-image {
  border-radius: var(--radius-lg);
  overflow: hidden;
  background: linear-gradient(135deg, var(--celeste-50), var(--celeste-100));
  aspect-ratio: 4/5;
  display: flex;
  align-items: center;
  justify-content: center;
}

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

.about-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 1rem;
  margin-top: 1.5rem;
}

.about-list li {
  display: flex;
  align-items: flex-start;
  gap: .75rem;
  font-size: .9375rem;
  color: var(--text-secondary);
}

.about-list li::before {
  content: '✓';
  color: var(--accent-teal);
  font-weight: 700;
  flex-shrink: 0;
  margin-top: 2px;
}

/* --- CTA Banner --- */
.cta-banner {
  padding: 4rem 0;
  background: linear-gradient(135deg, var(--blue-800), var(--blue-600));
  color: var(--white);
  text-align: center;
}

.cta-banner h2 { color: var(--white); margin-bottom: 1rem; }
.cta-banner p { color: var(--celeste-200); font-size: 1.0625rem; max-width: 560px; margin: 0 auto 2rem; }
.cta-buttons { display: flex; gap: 1rem; justify-content: center; flex-wrap: wrap; }

/* --- Contact Section --- */
.contact { padding: var(--section-py) 0; }

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

.contact-info { display: flex; flex-direction: column; gap: 2rem; }

.contact-item {
  display: flex;
  gap: 1rem;
  align-items: flex-start;
}

.contact-item-icon {
  width: 44px;
  height: 44px;
  border-radius: var(--radius-sm);
  background: var(--celeste-50);
  color: var(--blue-600);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.125rem;
  flex-shrink: 0;
}

.contact-item h4 { margin-bottom: .25rem; color: var(--text-primary); }
.contact-item p { font-size: .9375rem; color: var(--text-secondary); }
.contact-item a { color: var(--blue-600); font-weight: 500; }

.contact-map {
  border-radius: var(--radius-md);
  overflow: hidden;
  border: 1px solid var(--gray-200);
  min-height: 400px;
}
.contact-map iframe { width: 100%; height: 100%; min-height: 400px; border: none; }

.contact-socials {
  display: flex;
  gap: .75rem;
  margin-top: 1rem;
}
.contact-social-link {
  width: 40px; height: 40px;
  border-radius: var(--radius-sm);
  background: var(--celeste-50);
  color: var(--blue-600);
  display: flex; align-items: center; justify-content: center;
  font-size: 1.125rem;
  transition: all .2s var(--ease);
}
.contact-social-link:hover {
  background: var(--blue-600);
  color: var(--white);
}

/* --- Footer --- */
.site-footer {
  background: var(--blue-900);
  color: var(--celeste-200);
  padding: 3rem 0 1.5rem;
}

.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr;
  gap: 3rem;
  padding-bottom: 2rem;
  border-bottom: 1px solid rgba(168,216,245,.15);
  margin-bottom: 1.5rem;
}

.footer-brand p { font-size: .875rem; line-height: 1.7; margin-top: .75rem; max-width: 340px; }

.footer-links h4 { color: var(--white); font-size: .875rem; margin-bottom: 1rem; text-transform: uppercase; letter-spacing: .05em; }
.footer-links a { display: block; font-size: .875rem; color: var(--celeste-200); padding: .25rem 0; }
.footer-links a:hover { color: var(--white); }

.footer-bottom {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: .8125rem;
  color: var(--gray-400);
}

/* --- Service Page --- */
.service-hero {
  padding-top: calc(72px + 4rem);
  padding-bottom: 3rem;
  background: linear-gradient(160deg, var(--blue-900) 0%, var(--blue-700) 100%);
  color: var(--white);
}

.service-hero .section-label { color: var(--celeste-300); }
.service-hero .section-label::before { background: var(--celeste-400); }
.service-hero h1 { color: var(--white); margin-bottom: 1rem; }
.service-hero p { color: var(--celeste-100); font-size: 1.125rem; max-width: 700px; }

.breadcrumb {
  font-size: .8125rem;
  color: var(--celeste-200);
  margin-bottom: 1.5rem;
}
.breadcrumb a { color: var(--celeste-300); }
.breadcrumb a:hover { color: var(--white); }
.breadcrumb span { margin: 0 .5rem; opacity: .5; }

.service-content {
  padding: var(--section-py) 0;
}

.service-body {
  max-width: 780px;
  margin: 0 auto;
}

.service-body h2 {
  font-size: 1.5rem;
  margin-top: 2.5rem;
  margin-bottom: 1rem;
  color: var(--blue-800);
}

.service-body p {
  margin-bottom: 1.25rem;
  font-size: 1rem;
  line-height: 1.8;
}

.service-body ul {
  margin: 1rem 0 1.5rem 1.5rem;
  color: var(--text-secondary);
}
.service-body ul li {
  margin-bottom: .5rem;
  line-height: 1.7;
}

.service-cta-box {
  background: var(--celeste-50);
  border: 1px solid var(--celeste-200);
  border-radius: var(--radius-md);
  padding: 2rem;
  margin-top: 3rem;
  text-align: center;
}
.service-cta-box h3 { margin-bottom: .75rem; }
.service-cta-box p { margin-bottom: 1.5rem; }

/* Other services sidebar */
.service-sidebar-title {
  font-size: 1rem;
  font-weight: 600;
  margin-bottom: 1rem;
  color: var(--text-primary);
}

.service-sidebar-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: .5rem;
}

.service-sidebar-list a {
  display: flex;
  align-items: center;
  gap: .5rem;
  padding: .625rem 1rem;
  background: var(--gray-50);
  border-radius: var(--radius-sm);
  font-size: .875rem;
  color: var(--gray-700);
  transition: all .2s var(--ease);
}
.service-sidebar-list a:hover,
.service-sidebar-list a.active {
  background: var(--celeste-50);
  color: var(--blue-700);
}

/* --- Responsive --- */
@media (max-width: 1024px) {
  .hero-grid { grid-template-columns: 1fr; text-align: center; }
  .hero-desc { margin-left: auto; margin-right: auto; }
  .hero-buttons { justify-content: center; }
  .hero-photo { display: none; }
  .hero-stats { justify-content: center; }
  .about-grid { grid-template-columns: 1fr; }
  .about-image { max-width: 480px; margin: 0 auto; }
  .contact-grid { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 768px) {
  .nav-desktop { display: none; }
  .nav-toggle { display: flex; }
  .services-grid { grid-template-columns: 1fr; }
  .hero-stats { gap: 1.5rem; }
  .footer-grid { grid-template-columns: 1fr; gap: 2rem; }
  .footer-bottom { flex-direction: column; gap: .5rem; text-align: center; }
  .contact-map { min-height: 300px; }
  .contact-map iframe { min-height: 300px; }
}

@media (max-width: 480px) {
  .hero-buttons { flex-direction: column; align-items: center; }
  .btn { width: 100%; justify-content: center; }
  .cta-buttons { flex-direction: column; align-items: center; }
}

/* --- Animations --- */
.fade-in {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity .6s var(--ease), transform .6s var(--ease);
}
.fade-in.visible { opacity: 1; transform: translateY(0); }

/* Stagger children */
.stagger > * { transition-delay: calc(var(--i, 0) * .1s); }

/* --- Cookie Table --- */
.cookie-table-wrap {
  overflow-x: auto;
  margin: 1.25rem 0 1.5rem;
  border-radius: var(--radius-sm);
  border: 1px solid var(--gray-200);
}

.cookie-table {
  width: 100%;
  border-collapse: collapse;
  font-size: .875rem;
}

.cookie-table th {
  background: var(--celeste-50);
  color: var(--blue-800);
  font-weight: 600;
  text-align: left;
  padding: .75rem 1rem;
  border-bottom: 2px solid var(--celeste-200);
  white-space: nowrap;
}

.cookie-table td {
  padding: .75rem 1rem;
  border-bottom: 1px solid var(--gray-100);
  color: var(--text-secondary);
  vertical-align: top;
}

.cookie-table tr:last-child td { border-bottom: none; }

.cookie-table code {
  font-family: 'SF Mono', 'Consolas', 'Monaco', monospace;
  font-size: .8125rem;
  background: var(--celeste-50);
  color: var(--blue-700);
  padding: .125rem .375rem;
  border-radius: 4px;
}

/* --- GDPR Cookie Banner --- */
.cookie-banner {
  position: fixed;
  bottom: 0; left: 0; right: 0;
  z-index: 9999;
  background: var(--blue-900);
  border-top: 1px solid rgba(78,173,234,.2);
  box-shadow: 0 -4px 24px rgba(12,45,90,.3);
  padding: 1.25rem 0;
  animation: slideUp .4s var(--ease);
}

@keyframes slideUp {
  from { transform: translateY(100%); opacity: 0; }
  to { transform: translateY(0); opacity: 1; }
}

.cookie-inner {
  max-width: var(--container-max);
  margin: 0 auto;
  padding: 0 var(--container-px);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
}

.cookie-text {
  display: flex;
  align-items: flex-start;
  gap: .75rem;
  flex: 1;
}

.cookie-text p {
  font-size: .875rem;
  line-height: 1.6;
  color: var(--celeste-100);
  margin: 0;
}

.cookie-text a {
  color: var(--celeste-300);
  text-decoration: underline;
  text-underline-offset: 2px;
}
.cookie-text a:hover { color: var(--white); }

.cookie-actions {
  display: flex;
  gap: .625rem;
  flex-shrink: 0;
}

.cookie-details {
  max-width: var(--container-max);
  margin: 1rem auto 0;
  padding: 1.25rem var(--container-px) 0;
  border-top: 1px solid rgba(78,173,234,.15);
}

.cookie-detail-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 1rem;
}

.cookie-category {
  background: rgba(255,255,255,.05);
  border: 1px solid rgba(78,173,234,.12);
  border-radius: var(--radius-sm);
  padding: 1rem;
}

.cookie-cat-header {
  margin-bottom: .5rem;
}

.cookie-cat-header label {
  display: flex;
  align-items: center;
  gap: .5rem;
  font-size: .875rem;
  color: var(--celeste-100);
  cursor: pointer;
}

.cookie-cat-header input[type="checkbox"] {
  accent-color: var(--celeste-400);
  width: 16px;
  height: 16px;
}

.cookie-cat-header input[disabled] { opacity: .6; }

.cookie-category p {
  font-size: .8125rem;
  line-height: 1.5;
  color: var(--gray-400);
  margin: 0;
}

@media (max-width: 768px) {
  .cookie-inner { flex-direction: column; align-items: stretch; text-align: center; }
  .cookie-text { justify-content: center; }
  .cookie-actions { justify-content: center; }
  .cookie-detail-grid { grid-template-columns: 1fr; }
}

/* --- Utilities --- */
.text-center { text-align: center; }
.mx-auto { margin-left: auto; margin-right: auto; }
