/* =============================================================
   FARMACIA SAN MAURO — style.css
   ============================================================= */

/* -------------------------
   Custom Properties
   ------------------------- */
:root {
  --green-900: #14532D;
  --green-800: #166534;
  --green-700: #15803D;
  --green-600: #16A34A;
  --green-500: #22C55E;
  --green-200: #BBF7D0;
  --green-100: #DCFCE7;
  --green-50:  #F0FDF4;

  --gray-900: #111827;
  --gray-800: #1F2937;
  --gray-700: #374151;
  --gray-600: #4B5563;
  --gray-400: #9CA3AF;
  --gray-300: #D1D5DB;
  --gray-200: #E5E7EB;
  --gray-100: #F3F4F6;
  --gray-50:  #F9FAFB;
  --white:    #FFFFFF;

  --font: 'DM Sans', system-ui, -apple-system, sans-serif;

  --radius-sm: 8px;
  --radius:    14px;
  --radius-lg: 20px;

  --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.06);
  --shadow:    0 1px 3px rgba(0, 0, 0, 0.07), 0 6px 20px rgba(0, 0, 0, 0.07);
  --shadow-lg: 0 12px 48px rgba(0, 0, 0, 0.12);

  --max-w: 1100px;
  --px: clamp(1.25rem, 5vw, 4rem);
  --section-py: clamp(4rem, 9vw, 7rem);
}

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

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

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

img, svg, iframe {
  display: block;
}

a {
  color: inherit;
  text-decoration: none;
}

ul, ol {
  list-style: none;
}

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

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

.section__header {
  text-align: center;
  margin-bottom: clamp(2.5rem, 5vw, 4rem);
}

.section__title {
  font-size: clamp(1.75rem, 4vw, 2.75rem);
  font-weight: 700;
  letter-spacing: -0.025em;
  color: var(--gray-900);
  line-height: 1.15;
}

.section__sub {
  font-size: 1.05rem;
  color: var(--gray-500, #6B7280);
  margin-top: 0.6rem;
}

/* -------------------------
   Buttons
   ------------------------- */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.875rem 1.75rem;
  border-radius: var(--radius-sm);
  font-family: var(--font);
  font-size: 1rem;
  font-weight: 500;
  cursor: pointer;
  border: 2px solid transparent;
  transition: background 0.2s, border-color 0.2s, color 0.2s, box-shadow 0.2s;
  white-space: nowrap;
  min-height: 52px;
}

.btn--white {
  background: var(--white);
  color: var(--green-800);
  border-color: var(--white);
}
.btn--white:hover {
  background: var(--green-50);
  border-color: var(--green-50);
}

.btn--ghost {
  background: transparent;
  color: var(--white);
  border-color: rgba(255, 255, 255, 0.45);
}
.btn--ghost:hover {
  background: rgba(255, 255, 255, 0.1);
  border-color: rgba(255, 255, 255, 0.75);
}

.btn--green {
  background: var(--green-700);
  color: var(--white);
  border-color: var(--green-700);
}
.btn--green:hover {
  background: var(--green-800);
  border-color: var(--green-800);
}

.btn--full {
  width: 100%;
  justify-content: center;
}

/* -------------------------
   Navigation
   ------------------------- */
.nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 200;
  transition: background 0.35s ease, box-shadow 0.35s ease;
}

.nav.scrolled {
  background: rgba(255, 255, 255, 0.96);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  box-shadow: 0 1px 0 var(--gray-200);
}

.nav__inner {
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 0 var(--px);
  height: 70px;
  display: flex;
  align-items: center;
  gap: 2rem;
}

.nav__logo {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-weight: 600;
  font-size: 1rem;
  color: var(--white);
  flex-shrink: 0;
  transition: color 0.3s;
}

.nav.scrolled .nav__logo {
  color: var(--green-700);
}

.nav__cross {
  font-size: 1.5rem;
  font-weight: 800;
  line-height: 1;
  color: var(--green-400, #4ADE80);
  transition: color 0.3s;
}

.nav.scrolled .nav__cross {
  color: var(--green-600);
}

.nav__links {
  display: flex;
  align-items: center;
  gap: 0.25rem;
  margin-left: auto;
}

.nav__links a {
  padding: 0.5rem 0.875rem;
  font-size: 0.9rem;
  font-weight: 500;
  color: rgba(255, 255, 255, 0.8);
  border-radius: var(--radius-sm);
  transition: color 0.2s, background 0.2s;
  min-height: 44px;
  display: flex;
  align-items: center;
}

.nav__links a:hover {
  color: var(--white);
  background: rgba(255, 255, 255, 0.1);
}

.nav.scrolled .nav__links a {
  color: var(--gray-600);
}

.nav.scrolled .nav__links a:hover {
  color: var(--green-700);
  background: var(--green-50);
}

.nav__phone-cta {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.5rem 1rem;
  background: var(--green-600);
  color: var(--white);
  border-radius: var(--radius-sm);
  font-size: 0.875rem;
  font-weight: 600;
  transition: background 0.2s;
  flex-shrink: 0;
  min-height: 44px;
}

.nav__phone-cta:hover {
  background: var(--green-700);
}

/* Burger */
.nav__burger {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 8px;
  margin-left: auto;
  min-width: 44px;
  min-height: 44px;
}

.nav__burger span {
  display: block;
  width: 22px;
  height: 2px;
  background: var(--white);
  border-radius: 2px;
  transition: transform 0.3s, opacity 0.3s, background 0.3s;
}

.nav.scrolled .nav__burger span {
  background: var(--gray-800);
}

.nav__burger.open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav__burger.open span:nth-child(2) { opacity: 0; }
.nav__burger.open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* Mobile menu */
.nav__mobile {
  display: none;
  flex-direction: column;
  background: var(--white);
  border-top: 1px solid var(--gray-100);
  padding: 1rem var(--px) 1.5rem;
  gap: 0;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.08);
}

.nav__mobile.open {
  display: flex;
}

.nav__mobile a {
  padding: 0.875rem 0;
  font-size: 1rem;
  font-weight: 500;
  color: var(--gray-800);
  border-bottom: 1px solid var(--gray-100);
  min-height: 44px;
  display: flex;
  align-items: center;
}

.nav__mobile a:last-child {
  border-bottom: none;
}

.nav__mobile-phone {
  display: flex;
  align-items: center;
  gap: 0.625rem;
  color: var(--green-700) !important;
  font-weight: 600 !important;
  padding-top: 1.25rem !important;
  border-bottom: none !important;
}

/* -------------------------
   Hero
   ------------------------- */
.hero {
  position: relative;
  min-height: 100svh;
  min-height: 100vh;
  display: flex;
  align-items: center;
  background: var(--green-800);
  overflow: hidden;
  padding: 7rem var(--px) 5rem;
}

.hero__bg {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse at 65% 40%, rgba(34, 197, 94, 0.1) 0%, transparent 55%),
    radial-gradient(ellipse at 15% 85%, rgba(20, 83, 45, 0.5) 0%, transparent 45%),
    radial-gradient(ellipse at 85% 85%, rgba(22, 101, 52, 0.3) 0%, transparent 40%);
  pointer-events: none;
}

.hero__cross-deco {
  position: absolute;
  right: -4vw;
  top: 50%;
  transform: translateY(-50%);
  font-size: clamp(18rem, 42vw, 60rem);
  font-weight: 800;
  color: rgba(255, 255, 255, 0.025);
  line-height: 1;
  pointer-events: none;
  user-select: none;
  letter-spacing: -0.05em;
}

.hero__container {
  position: relative;
  width: 100%;
}

.hero__content {
  max-width: 680px;
}

/* Status badge */
.hero__badge {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: 100px;
  padding: 0.4rem 1rem;
  font-size: 0.85rem;
  font-weight: 500;
  color: rgba(255, 255, 255, 0.8);
  margin-bottom: 1.75rem;
  backdrop-filter: blur(6px);
}

.status-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--gray-400);
  flex-shrink: 0;
  transition: background 0.3s;
}

.status-dot.open {
  background: var(--green-500);
  box-shadow: 0 0 0 3px rgba(34, 197, 94, 0.25);
}

.status-dot.closed {
  background: #F87171;
}

/* Hero text */
.hero__title {
  font-size: clamp(3.25rem, 9vw, 7.5rem);
  font-weight: 700;
  line-height: 1.0;
  letter-spacing: -0.035em;
  color: var(--white);
  margin-bottom: 1.25rem;
}

.hero__sub {
  font-size: clamp(1rem, 2vw, 1.2rem);
  color: rgba(255, 255, 255, 0.65);
  max-width: 440px;
  margin-bottom: 2.5rem;
  line-height: 1.65;
}

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

/* Hero fade-in animations */
.fade-in {
  opacity: 0;
  transform: translateY(18px);
  animation: fadeUp 0.7s ease-out forwards;
}

.hero__badge.fade-in  { animation-delay: 0.1s; }
.hero__title.fade-in  { animation-delay: 0.25s; }
.hero__sub.fade-in    { animation-delay: 0.4s; }
.hero__actions.fade-in { animation-delay: 0.55s; }

@keyframes fadeUp {
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* -------------------------
   Orari
   ------------------------- */
.orari {
  background: var(--gray-50);
}

.orari__grid {
  display: grid;
  grid-template-columns: 1.6fr 1fr 1fr;
  gap: 1.25rem;
  margin-bottom: 2rem;
}

.orari__card {
  background: var(--white);
  border: 1px solid var(--gray-200);
  border-radius: var(--radius);
  padding: 2rem 1.75rem;
  text-align: center;
  box-shadow: var(--shadow-sm);
  transition: box-shadow 0.25s;
}

.orari__card:hover {
  box-shadow: var(--shadow);
}

.orari__card--main {
  background: var(--green-800);
  border-color: var(--green-800);
  color: var(--white);
}

.orari__card--closed {
  opacity: 0.55;
}

.orari__label {
  font-size: 0.775rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.09em;
  color: var(--gray-400);
  margin-bottom: 0.875rem;
}

.orari__card--main .orari__label {
  color: rgba(187, 247, 208, 0.75);
}

.orari__times {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.75rem;
  flex-wrap: wrap;
}

.orari__time {
  font-size: clamp(1.05rem, 2.5vw, 1.375rem);
  font-weight: 600;
  letter-spacing: -0.01em;
  color: var(--gray-900);
}

.orari__card--main .orari__time {
  color: var(--white);
}

.orari__card--closed .orari__time {
  color: var(--gray-400);
  font-weight: 400;
}

.orari__divider {
  font-size: 1.1rem;
  color: rgba(255, 255, 255, 0.35);
}

.orari__note {
  text-align: center;
  font-size: 0.875rem;
  color: var(--gray-400);
  max-width: 520px;
  margin: 0 auto;
  line-height: 1.6;
}

/* -------------------------
   Servizi
   ------------------------- */
.servizi {
  background: var(--white);
}

.servizi__grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1.25rem;
}

.service-card {
  background: var(--gray-50);
  border: 1px solid transparent;
  border-radius: var(--radius);
  padding: 1.75rem 1.5rem;
  transition: border-color 0.25s, box-shadow 0.25s, background 0.25s;
}

.service-card:hover {
  background: var(--white);
  border-color: var(--green-200);
  box-shadow: var(--shadow);
}

.service-card__icon {
  width: 48px;
  height: 48px;
  background: var(--green-100);
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 1.25rem;
  color: var(--green-700);
  flex-shrink: 0;
  transition: background 0.25s;
}

.service-card:hover .service-card__icon {
  background: var(--green-200);
}

.service-card__icon svg {
  width: 22px;
  height: 22px;
}

.service-card h3 {
  font-size: 0.975rem;
  font-weight: 600;
  color: var(--gray-900);
  margin-bottom: 0.5rem;
  line-height: 1.3;
}

.service-card p {
  font-size: 0.875rem;
  color: var(--gray-600);
  line-height: 1.6;
}

/* -------------------------
   Chi Siamo
   ------------------------- */
.about {
  background: var(--green-50);
}

.about__inner {
  display: grid;
  grid-template-columns: 1fr 360px;
  gap: clamp(2rem, 5vw, 5rem);
  align-items: start;
}

.about__text .section__title {
  margin-bottom: 1.5rem;
  text-align: left;
}

.about__text p {
  color: var(--gray-600);
  margin-bottom: 1rem;
  font-size: 1.025rem;
}

.about__text p strong {
  color: var(--gray-900);
  font-weight: 600;
}

.about__team {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  margin-top: 2.25rem;
  padding-top: 2.25rem;
  border-top: 1px solid var(--green-200);
}

.about__member {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.about__avatar {
  width: 46px;
  height: 46px;
  background: var(--green-700);
  color: var(--white);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.02em;
  flex-shrink: 0;
}

.about__member-info {
  display: flex;
  flex-direction: column;
  gap: 0.1rem;
}

.about__member-info strong {
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--gray-900);
}

.about__member-info span {
  font-size: 0.8rem;
  color: var(--gray-400);
}

/* Aside */
.about__aside {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
  position: sticky;
  top: 100px;
}

.about__rating {
  background: var(--green-800);
  color: var(--white);
  border-radius: var(--radius);
  padding: 2rem;
  text-align: center;
}

.about__rating-num {
  display: block;
  font-size: 4.5rem;
  font-weight: 700;
  letter-spacing: -0.05em;
  line-height: 1;
  margin-bottom: 0.2rem;
}

.about__rating-label {
  display: block;
  font-size: 0.875rem;
  color: rgba(255, 255, 255, 0.6);
  margin-bottom: 0.75rem;
}

.about__stars {
  font-size: 1.35rem;
  color: #FCD34D;
  letter-spacing: 3px;
  margin-bottom: 0.5rem;
}

.about__rating-sub {
  font-size: 0.8rem;
  color: rgba(255, 255, 255, 0.45);
}

.about__values {
  background: var(--white);
  border: 1px solid var(--green-200);
  border-radius: var(--radius);
  padding: 1.5rem 1.25rem;
  display: flex;
  flex-direction: column;
  gap: 0.875rem;
}

.about__value {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--gray-700);
}

.about__value svg {
  width: 18px;
  height: 18px;
  color: var(--green-600);
  flex-shrink: 0;
}

/* -------------------------
   Dove Siamo
   ------------------------- */
.location {
  background: var(--white);
}

.location__inner {
  display: grid;
  grid-template-columns: 320px 1fr;
  gap: clamp(2rem, 4vw, 4rem);
  align-items: stretch;
  min-height: 420px;
}

.location__info {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

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

.contact-item__icon {
  width: 42px;
  height: 42px;
  background: var(--green-100);
  color: var(--green-700);
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.contact-item__icon svg {
  width: 20px;
  height: 20px;
}

.contact-item div {
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
  padding-top: 0.1rem;
}

.contact-item__label {
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--gray-400);
}

.contact-item__value {
  font-size: 1rem;
  color: var(--gray-900);
  line-height: 1.5;
}

.contact-item__link {
  color: var(--green-700);
  font-weight: 500;
  transition: color 0.2s;
}

.contact-item__link:hover {
  color: var(--green-800);
  text-decoration: underline;
}

.location__map {
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow);
  border: 1px solid var(--gray-200);
  min-height: 420px;
}

.location__map iframe {
  width: 100%;
  height: 100%;
  min-height: 420px;
}

/* -------------------------
   Footer
   ------------------------- */
.footer {
  background: var(--gray-900);
  color: rgba(255, 255, 255, 0.55);
  padding: 3rem 0;
}

.footer__inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 0.875rem;
}

.footer__brand {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  color: var(--white);
  font-weight: 600;
  font-size: 1rem;
}

.footer__cross {
  color: var(--green-500);
  font-size: 1.35rem;
  font-weight: 800;
  line-height: 1;
}

.footer__details {
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
  font-size: 0.875rem;
}

.footer__copy {
  font-size: 0.8rem;
  opacity: 0.4;
}

/* -------------------------
   Scroll Reveal
   ------------------------- */
.reveal {
  opacity: 0;
  transform: translateY(28px);
  transition: opacity 0.65s ease-out, transform 0.65s ease-out;
}

.reveal.visible {
  opacity: 1;
  transform: translateY(0);
}

/* Stagger children of a revealed grid */
.servizi__grid .service-card.visible:nth-child(1) { transition-delay: 0.05s; }
.servizi__grid .service-card.visible:nth-child(2) { transition-delay: 0.1s; }
.servizi__grid .service-card.visible:nth-child(3) { transition-delay: 0.15s; }
.servizi__grid .service-card.visible:nth-child(4) { transition-delay: 0.2s; }
.servizi__grid .service-card.visible:nth-child(5) { transition-delay: 0.25s; }
.servizi__grid .service-card.visible:nth-child(6) { transition-delay: 0.3s; }
.servizi__grid .service-card.visible:nth-child(7) { transition-delay: 0.35s; }
.servizi__grid .service-card.visible:nth-child(8) { transition-delay: 0.4s; }

/* -------------------------
   Responsive — 900px
   ------------------------- */
@media (max-width: 900px) {
  .orari__grid {
    grid-template-columns: 1fr 1fr;
  }

  .orari__card--main {
    grid-column: span 2;
  }

  .servizi__grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .about__inner {
    grid-template-columns: 1fr;
  }

  .about__aside {
    position: static;
    flex-direction: row;
    flex-wrap: wrap;
  }

  .about__rating {
    flex: 1;
    min-width: 160px;
  }

  .about__values {
    flex: 1;
    min-width: 220px;
  }

  .location__inner {
    grid-template-columns: 1fr;
  }

  .location__map {
    min-height: 340px;
  }

  .location__map iframe {
    min-height: 340px;
  }
}

/* -------------------------
   Responsive — 768px (nav)
   ------------------------- */
@media (max-width: 768px) {
  .nav__links,
  .nav__phone-cta {
    display: none;
  }

  .nav__burger {
    display: flex;
  }

  .hero {
    padding-top: 6rem;
    padding-bottom: 4rem;
  }
}

/* -------------------------
   Responsive — 600px
   ------------------------- */
@media (max-width: 600px) {
  .orari__grid {
    grid-template-columns: 1fr;
  }

  .orari__card--main {
    grid-column: span 1;
  }

  .orari__times {
    flex-direction: column;
    gap: 0.4rem;
  }

  .orari__divider {
    display: none;
  }

  .hero__actions {
    flex-direction: column;
  }

  .hero__actions .btn {
    width: 100%;
    justify-content: center;
  }
}

/* -------------------------
   Responsive — 480px
   ------------------------- */
@media (max-width: 480px) {
  .servizi__grid {
    grid-template-columns: 1fr;
  }

  .about__aside {
    flex-direction: column;
  }
}

/* -------------------------
   Accessibility
   ------------------------- */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    transition-duration: 0.01ms !important;
  }
  .reveal {
    opacity: 1;
    transform: none;
  }
  .fade-in {
    opacity: 1;
    transform: none;
  }
}

:focus-visible {
  outline: 2px solid var(--green-600);
  outline-offset: 3px;
  border-radius: 4px;
}
