/* ============================================================
   LOGOPEDISTA CONOSCENTI — Clinical Elegance
   A refined healthcare aesthetic with editorial sensibility
   ============================================================ */

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

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

body {
  min-height: 100vh;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

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

a {
  text-decoration: none;
  color: inherit;
  transition: color 0.3s ease;
}

ul, ol {
  list-style: none;
}

button {
  font: inherit;
  cursor: pointer;
  border: none;
  background: none;
}

/* --- Design Tokens --- */
:root {
  /* Palette */
  --teal:          #2a7d8a;
  --teal-dark:     #1d5a64;
  --teal-deep:     #164248;
  --teal-light:    #e8f4f6;
  --teal-mist:     #f0f8f9;
  --accent:        #c0392b;
  --accent-soft:   #d4564a;
  --warm-cream:    #fdfbf7;
  --text:          #2c2c2c;
  --text-mid:      #555;
  --text-light:    #888;
  --border:        #e4e4e4;
  --border-light:  #f0f0f0;
  --white:         #ffffff;
  --off-white:     #f8f9fa;
  --shadow-sm:     0 1px 3px rgba(0, 0, 0, 0.06), 0 1px 2px rgba(0, 0, 0, 0.04);
  --shadow-md:     0 4px 16px rgba(0, 0, 0, 0.08), 0 2px 4px rgba(0, 0, 0, 0.04);
  --shadow-lg:     0 12px 40px rgba(0, 0, 0, 0.1), 0 4px 12px rgba(0, 0, 0, 0.05);
  --shadow-teal:   0 8px 30px rgba(42, 125, 138, 0.15);

  /* Typography */
  --font-heading: 'Cormorant Garamond', 'Georgia', 'Times New Roman', serif;
  --font-body:    'Open Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;

  /* Fluid type scale (mobile → desktop) */
  --fs-xs:    clamp(0.7rem, 0.65rem + 0.25vw, 0.8rem);
  --fs-sm:    clamp(0.8rem, 0.75rem + 0.25vw, 0.875rem);
  --fs-base:  clamp(0.9rem, 0.85rem + 0.25vw, 1rem);
  --fs-md:    clamp(1rem, 0.9rem + 0.5vw, 1.125rem);
  --fs-lg:    clamp(1.15rem, 1rem + 0.75vw, 1.35rem);
  --fs-xl:    clamp(1.5rem, 1.2rem + 1.5vw, 2rem);
  --fs-2xl:   clamp(1.8rem, 1.4rem + 2vw, 2.75rem);
  --fs-3xl:   clamp(2.2rem, 1.6rem + 3vw, 3.5rem);
  --fs-hero:  clamp(2.5rem, 1.8rem + 3.5vw, 4.2rem);

  /* Spacing */
  --space-xs:  0.5rem;
  --space-sm:  1rem;
  --space-md:  1.5rem;
  --space-lg:  2.5rem;
  --space-xl:  4rem;
  --space-2xl: 6rem;

  /* Layout */
  --container:     960px;
  --container-wide: 1100px;
  --header-h:      72px;
  --radius-sm:     4px;
  --radius-md:     8px;
  --radius-lg:     16px;
  --radius-full:   50%;

  /* Transitions */
  --ease-out:   cubic-bezier(0.25, 0.46, 0.45, 0.94);
  --ease-spring: cubic-bezier(0.34, 1.56, 0.64, 1);
  --duration:    0.35s;
}


/* --- Typography --- */
body {
  font-family: var(--font-body);
  font-size: var(--fs-base);
  line-height: 1.7;
  color: var(--text);
  background-color: var(--white);
}

h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-heading);
  font-weight: 700;
  line-height: 1.2;
  color: var(--text);
  letter-spacing: -0.01em;
}

h1 { font-size: var(--fs-3xl); }
h2 { font-size: var(--fs-2xl); }
h3 { font-size: var(--fs-xl); }
h4 { font-size: var(--fs-lg); }

p {
  margin-bottom: 1em;
  color: var(--text-mid);
}

p:last-child {
  margin-bottom: 0;
}

strong {
  color: var(--text);
  font-weight: 600;
}

/* Decorative line beneath section headings */
.section-title {
  text-align: center;
  margin-bottom: var(--space-xl);
  position: relative;
  padding-bottom: var(--space-md);
}

.section-title::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 60px;
  height: 3px;
  background: linear-gradient(90deg, var(--teal), var(--teal-dark));
  border-radius: 2px;
}

.section-title span {
  display: block;
  font-family: var(--font-body);
  font-size: var(--fs-sm);
  font-weight: 400;
  color: var(--teal);
  text-transform: uppercase;
  letter-spacing: 0.15em;
  margin-bottom: 0.4em;
}


/* --- Container --- */
.container {
  width: 100%;
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 var(--space-md);
}

.container--wide {
  max-width: var(--container-wide);
}


/* ============================================================
   HEADER
   ============================================================ */
.header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  height: var(--header-h);
  background: rgba(255, 255, 255, 0.97);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border-light);
  transition: box-shadow var(--duration) var(--ease-out),
              background var(--duration) var(--ease-out);
}

.header.scrolled {
  box-shadow: var(--shadow-sm);
  background: rgba(255, 255, 255, 0.99);
}

.header__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 100%;
  max-width: var(--container-wide);
  margin: 0 auto;
  padding: 0 var(--space-md);
}

.header__brand {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  flex-shrink: 0;
}

.header__logo {
  width: 42px;
  height: 42px;
  border-radius: var(--radius-full);
  object-fit: cover;
  border: 2px solid var(--teal-light);
  transition: border-color var(--duration) var(--ease-out);
}

.header__brand:hover .header__logo {
  border-color: var(--teal);
}

.header__name {
  font-family: var(--font-heading);
  font-size: var(--fs-md);
  font-weight: 700;
  color: var(--teal-dark);
  line-height: 1.2;
}

.header__name small {
  display: block;
  font-family: var(--font-body);
  font-size: var(--fs-xs);
  font-weight: 400;
  color: var(--text-light);
  letter-spacing: 0.05em;
}

/* Navigation */
.nav {
  display: none;
}

.nav__list {
  display: flex;
  align-items: center;
  gap: 0.25rem;
}

.nav__link {
  display: block;
  padding: 0.5rem 1rem;
  font-size: var(--fs-sm);
  font-weight: 500;
  color: var(--text-mid);
  border-radius: var(--radius-md);
  transition: color var(--duration) var(--ease-out),
              background var(--duration) var(--ease-out);
  position: relative;
}

.nav__link:hover,
.nav__link.active {
  color: var(--teal-dark);
  background: var(--teal-mist);
}

.nav__link--cta {
  background: var(--teal);
  color: var(--white) !important;
  margin-left: 0.5rem;
  font-weight: 600;
}

.nav__link--cta:hover {
  background: var(--teal-dark) !important;
  color: var(--white) !important;
}

/* Hamburger */
.hamburger {
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 28px;
  height: 28px;
  z-index: 1001;
}

.hamburger span {
  display: block;
  width: 100%;
  height: 2px;
  background: var(--teal-dark);
  border-radius: 2px;
  transition: transform var(--duration) var(--ease-out),
              opacity var(--duration) var(--ease-out);
  transform-origin: center;
}

.hamburger.is-active span:nth-child(1) {
  transform: translateY(7px) rotate(45deg);
}

.hamburger.is-active span:nth-child(2) {
  opacity: 0;
}

.hamburger.is-active span:nth-child(3) {
  transform: translateY(-7px) rotate(-45deg);
}

/* Mobile menu overlay */
.mobile-nav {
  position: fixed;
  top: 0;
  right: 0;
  bottom: 0;
  width: min(320px, 85vw);
  background: var(--white);
  z-index: 999;
  padding: calc(var(--header-h) + var(--space-lg)) var(--space-lg) var(--space-lg);
  transform: translateX(100%);
  transition: transform var(--duration) var(--ease-out);
  box-shadow: -8px 0 30px rgba(0, 0, 0, 0.1);
}

.mobile-nav.is-open {
  transform: translateX(0);
}

.mobile-nav__overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.3);
  z-index: 998;
  opacity: 0;
  visibility: hidden;
  transition: opacity var(--duration) var(--ease-out),
              visibility var(--duration) var(--ease-out);
}

.mobile-nav__overlay.is-visible {
  opacity: 1;
  visibility: visible;
}

.mobile-nav__list {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}

.mobile-nav__link {
  display: block;
  padding: 0.85rem 1rem;
  font-size: var(--fs-md);
  font-weight: 500;
  color: var(--text);
  border-radius: var(--radius-md);
  transition: background var(--duration) var(--ease-out),
              color var(--duration) var(--ease-out);
}

.mobile-nav__link:hover,
.mobile-nav__link.active {
  background: var(--teal-mist);
  color: var(--teal-dark);
}

.mobile-nav__link--cta {
  background: var(--teal);
  color: var(--white);
  text-align: center;
  margin-top: var(--space-sm);
  font-weight: 600;
}

.mobile-nav__link--cta:hover {
  background: var(--teal-dark);
  color: var(--white);
}


/* ============================================================
   HERO SECTION
   ============================================================ */
.hero {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 75vh;
  margin-top: var(--header-h);
  overflow: hidden;
  background: var(--teal-deep);
}

.hero--small {
  min-height: 40vh;
}

.hero__bg {
  position: absolute;
  inset: 0;
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  transition: transform 0.8s var(--ease-out);
}

.hero::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(
    180deg,
    rgba(22, 66, 72, 0.55) 0%,
    rgba(22, 66, 72, 0.75) 100%
  );
  z-index: 1;
}

.hero__content {
  position: relative;
  z-index: 2;
  text-align: center;
  padding: var(--space-xl) var(--space-md);
  max-width: 720px;
}

.hero__tagline {
  font-family: var(--font-heading);
  font-size: var(--fs-hero);
  font-weight: 700;
  font-style: italic;
  color: var(--white);
  line-height: 1.15;
  margin-bottom: var(--space-md);
  text-shadow: 0 2px 20px rgba(0, 0, 0, 0.2);
}

.hero__subtitle {
  font-family: var(--font-body);
  font-size: var(--fs-md);
  color: rgba(255, 255, 255, 0.85);
  font-weight: 300;
  line-height: 1.6;
  max-width: 540px;
  margin: 0 auto var(--space-lg);
}

.hero__cta {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.9rem 2rem;
  background: var(--white);
  color: var(--teal-dark);
  font-weight: 600;
  font-size: var(--fs-sm);
  border-radius: var(--radius-md);
  letter-spacing: 0.02em;
  transition: transform var(--duration) var(--ease-spring),
              box-shadow var(--duration) var(--ease-out);
}

.hero__cta:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-lg);
  color: var(--teal-dark);
}

/* Hero title for inner pages */
.hero__title {
  font-family: var(--font-heading);
  font-size: var(--fs-3xl);
  font-weight: 700;
  color: var(--white);
  margin-bottom: 0.5rem;
  text-shadow: 0 2px 20px rgba(0, 0, 0, 0.2);
}


/* ============================================================
   ABOUT / "MI PRESENTO" SECTION
   ============================================================ */
.about {
  padding: var(--space-2xl) 0;
  background: var(--white);
}

.about__grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--space-xl);
  align-items: center;
}

.about__image-wrap {
  display: flex;
  justify-content: center;
}

.about__photo {
  width: 200px;
  height: 200px;
  border-radius: var(--radius-full);
  object-fit: cover;
  border: 4px solid var(--teal-light);
  box-shadow: var(--shadow-md),
              0 0 0 8px rgba(42, 125, 138, 0.06);
  transition: box-shadow var(--duration) var(--ease-out);
}

.about__photo:hover {
  box-shadow: var(--shadow-teal),
              0 0 0 8px rgba(42, 125, 138, 0.1);
}

.about__text h2 {
  margin-bottom: var(--space-sm);
}

.about__text p {
  line-height: 1.8;
}

.about__text a {
  color: var(--teal);
  font-weight: 600;
  border-bottom: 1px solid transparent;
  transition: border-color var(--duration) var(--ease-out),
              color var(--duration) var(--ease-out);
}

.about__text a:hover {
  color: var(--teal-dark);
  border-bottom-color: var(--teal);
}

.about__image-full {
  margin-top: var(--space-lg);
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-md);
}

.about__image-full img {
  width: 100%;
  display: block;
}


/* ============================================================
   SERVICES / CARD GRID
   ============================================================ */
.services {
  padding: var(--space-2xl) 0;
  background: var(--off-white);
}

.services__grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--space-md);
}

.card {
  background: var(--white);
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  transition: transform var(--duration) var(--ease-spring),
              box-shadow var(--duration) var(--ease-out);
  display: flex;
  flex-direction: column;
}

.card:hover {
  transform: translateY(-6px);
  box-shadow: var(--shadow-lg);
}

.card__image {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 10;
  overflow: hidden;
}

.card__image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.5s var(--ease-out);
}

.card:hover .card__image img {
  transform: scale(1.05);
}

.card__image::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 40%;
  background: linear-gradient(to top, rgba(0, 0, 0, 0.12), transparent);
  pointer-events: none;
}

.card__body {
  padding: var(--space-md);
  flex: 1;
  display: flex;
  flex-direction: column;
}

.card__title {
  font-family: var(--font-heading);
  font-size: var(--fs-lg);
  font-weight: 700;
  color: var(--text);
  margin-bottom: 0.5rem;
  transition: color var(--duration) var(--ease-out);
}

.card:hover .card__title {
  color: var(--teal);
}

.card__desc {
  font-size: var(--fs-sm);
  color: var(--text-light);
  line-height: 1.6;
  flex: 1;
}

.card__link {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  margin-top: var(--space-sm);
  font-size: var(--fs-sm);
  font-weight: 600;
  color: var(--teal);
  transition: gap var(--duration) var(--ease-out),
              color var(--duration) var(--ease-out);
}

.card__link::after {
  content: '→';
  transition: transform var(--duration) var(--ease-out);
}

.card:hover .card__link::after {
  transform: translateX(4px);
}

.card:hover .card__link {
  color: var(--teal-dark);
}

/* CTA Card variant */
.card--cta {
  background: linear-gradient(135deg, var(--teal), var(--teal-dark));
  color: var(--white);
  min-height: 280px;
}

.card--cta .card__body {
  padding: var(--space-lg);
}

.card--cta .card__title {
  color: var(--white);
}

.card--cta:hover .card__title {
  color: var(--white);
}

.card--cta .card__desc {
  color: rgba(255, 255, 255, 0.85);
}

.card--cta .btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.75rem 1.75rem;
  background: var(--white);
  color: var(--teal-dark);
  font-weight: 600;
  font-size: var(--fs-sm);
  border-radius: var(--radius-md);
  transition: transform var(--duration) var(--ease-spring),
              box-shadow var(--duration) var(--ease-out);
  margin-top: var(--space-sm);
}

.card--cta .btn:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-lg);
}

.card__cta-icon {
  font-size: 2.5rem;
  margin-bottom: var(--space-sm);
  opacity: 0.9;
}

/* Highlight card variant */
.card--highlight {
  border: 2px solid var(--teal-light);
}

.card--highlight:hover {
  border-color: var(--teal);
}


/* ============================================================
   CONTACT SECTION
   ============================================================ */
.contact {
  padding: var(--space-2xl) 0;
  background: var(--white);
}

.contact__grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--space-xl);
}

.contact__info h3 {
  margin-bottom: var(--space-md);
}

.contact__list {
  display: flex;
  flex-direction: column;
  gap: var(--space-md);
}

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

.contact__icon {
  flex-shrink: 0;
  width: 44px;
  height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--teal-light);
  color: var(--teal);
  border-radius: var(--radius-md);
  font-size: 1.2rem;
  transition: background var(--duration) var(--ease-out),
              color var(--duration) var(--ease-out);
}

.contact__item:hover .contact__icon {
  background: var(--teal);
  color: var(--white);
}

.contact__item-label {
  display: block;
  font-size: var(--fs-xs);
  color: var(--text-light);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin-bottom: 0.15rem;
}

.contact__item-value {
  font-size: var(--fs-md);
  font-weight: 600;
  color: var(--text);
}

.contact__item-value a {
  color: var(--teal-dark);
  transition: color var(--duration) var(--ease-out);
}

.contact__item-value a:hover {
  color: var(--teal);
}

.contact__map {
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-md);
  min-height: 300px;
  background: var(--off-white);
}

.contact__map iframe {
  width: 100%;
  height: 100%;
  min-height: 300px;
  border: none;
  display: block;
}


/* ============================================================
   FOOTER
   ============================================================ */
.footer {
  background: var(--teal-deep);
  color: rgba(255, 255, 255, 0.7);
  padding: var(--space-xl) 0 var(--space-md);
}

.footer__inner {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--space-lg);
  margin-bottom: var(--space-lg);
}

.footer h4 {
  font-size: var(--fs-md);
  color: var(--white);
  margin-bottom: var(--space-sm);
  font-weight: 700;
}

.footer p {
  color: rgba(255, 255, 255, 0.65);
  font-size: var(--fs-sm);
  line-height: 1.7;
}

.footer a {
  color: rgba(255, 255, 255, 0.8);
  transition: color var(--duration) var(--ease-out);
}

.footer a:hover {
  color: var(--white);
}

.footer__contact-list {
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
}

.footer__contact-list li {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  font-size: var(--fs-sm);
}

.footer__contact-list li .icon {
  opacity: 0.5;
}

.footer__nav-list {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
}

.footer__nav-list a {
  display: inline-block;
  font-size: var(--fs-sm);
  padding: 0.2rem 0;
}

.footer__bar {
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  padding-top: var(--space-md);
  text-align: center;
  font-size: var(--fs-xs);
  color: rgba(255, 255, 255, 0.4);
}


/* ============================================================
   ARTICLE / INNER PAGE LAYOUT
   ============================================================ */
.article {
  padding: var(--space-2xl) 0;
}

.article__header-image {
  border-radius: var(--radius-lg);
  overflow: hidden;
  margin-bottom: var(--space-xl);
  box-shadow: var(--shadow-md);
  max-height: 400px;
}

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

.article__content {
  max-width: 720px;
  margin: 0 auto;
}

.article__content h2 {
  margin-top: var(--space-xl);
  margin-bottom: var(--space-sm);
  padding-bottom: 0.5rem;
  border-bottom: 2px solid var(--teal-light);
}

.article__content h3 {
  margin-top: var(--space-lg);
  margin-bottom: var(--space-sm);
  color: var(--teal-dark);
}

.article__content h4 {
  margin-top: var(--space-md);
  margin-bottom: var(--space-xs);
}

.article__content p {
  line-height: 1.85;
  margin-bottom: 1.2em;
}

.article__content ul,
.article__content ol {
  margin-bottom: 1.2em;
  padding-left: 1.5rem;
}

.article__content ul {
  list-style: disc;
}

.article__content ul li,
.article__content ol li {
  margin-bottom: 0.5em;
  line-height: 1.7;
  color: var(--text-mid);
}

.article__content strong {
  color: var(--text);
}

.article__content a {
  color: var(--teal);
  font-weight: 600;
  border-bottom: 1px solid rgba(42, 125, 138, 0.3);
  transition: border-color var(--duration) var(--ease-out);
}

.article__content a:hover {
  border-bottom-color: var(--teal);
}

/* Article CTA block */
.article__cta {
  margin-top: var(--space-xl);
  padding: var(--space-lg);
  background: var(--teal-light);
  border-radius: var(--radius-lg);
  text-align: center;
  border: 1px solid rgba(42, 125, 138, 0.15);
}

.article__cta h3 {
  color: var(--teal-dark);
  margin-bottom: var(--space-xs);
  margin-top: 0;
}

.article__cta p {
  color: var(--text-mid);
  margin-bottom: var(--space-md);
}

.article__cta .btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.75rem 1.75rem;
  background: var(--teal);
  color: var(--white);
  font-weight: 600;
  font-size: var(--fs-sm);
  border-radius: var(--radius-md);
  transition: background var(--duration) var(--ease-out),
              transform var(--duration) var(--ease-spring);
}

.article__cta .btn:hover {
  background: var(--teal-dark);
  transform: translateY(-2px);
  color: var(--white);
}


/* ============================================================
   BREADCRUMB
   ============================================================ */
.breadcrumb {
  padding: var(--space-sm) 0;
  margin-top: var(--header-h);
  background: var(--off-white);
  border-bottom: 1px solid var(--border-light);
}

.breadcrumb__list {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.4rem;
  font-size: var(--fs-sm);
  color: var(--text-light);
}

.breadcrumb__item a {
  color: var(--teal);
  font-weight: 500;
  transition: color var(--duration) var(--ease-out);
}

.breadcrumb__item a:hover {
  color: var(--teal-dark);
}

.breadcrumb__sep {
  color: var(--border);
  font-size: 0.75em;
}

.breadcrumb__item--current {
  color: var(--text-mid);
  font-weight: 500;
}

/* Back link (alternative to breadcrumb) */
.back-link {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  font-size: var(--fs-sm);
  font-weight: 600;
  color: var(--teal);
  margin-bottom: var(--space-lg);
  transition: gap var(--duration) var(--ease-out),
              color var(--duration) var(--ease-out);
}

.back-link::before {
  content: '←';
  transition: transform var(--duration) var(--ease-out);
}

.back-link:hover {
  color: var(--teal-dark);
}

.back-link:hover::before {
  transform: translateX(-4px);
}


/* ============================================================
   NOSOLOGICAL CATALOG (Ordered List)
   ============================================================ */
.catalog {
  padding: var(--space-xl) 0;
}

.catalog__list {
  list-style: none;
  counter-reset: catalog-counter;
  max-width: 720px;
  margin: 0 auto;
}

.catalog__item {
  counter-increment: catalog-counter;
  position: relative;
  padding: var(--space-md) var(--space-md) var(--space-md) 4rem;
  margin-bottom: var(--space-xs);
  background: var(--white);
  border-radius: var(--radius-md);
  border: 1px solid var(--border-light);
  transition: border-color var(--duration) var(--ease-out),
              box-shadow var(--duration) var(--ease-out);
}

.catalog__item:hover {
  border-color: var(--teal-light);
  box-shadow: var(--shadow-sm);
}

.catalog__item::before {
  content: counter(catalog-counter);
  position: absolute;
  left: var(--space-md);
  top: var(--space-md);
  width: 30px;
  height: 30px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--teal-light);
  color: var(--teal-dark);
  font-family: var(--font-heading);
  font-weight: 700;
  font-size: var(--fs-sm);
  border-radius: var(--radius-sm);
}

.catalog__item p {
  font-size: var(--fs-base);
  margin: 0;
  line-height: 1.7;
}


/* ============================================================
   COOKIE CONSENT BANNER
   ============================================================ */
.cookie-banner {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: 9999;
  background: var(--white);
  border-top: 1px solid var(--border);
  box-shadow: 0 -4px 20px rgba(0, 0, 0, 0.08);
  padding: var(--space-md);
  transform: translateY(100%);
  transition: transform 0.5s var(--ease-out);
}

.cookie-banner.is-visible {
  transform: translateY(0);
}

.cookie-banner__inner {
  max-width: var(--container);
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: var(--space-sm);
  align-items: center;
  text-align: center;
}

.cookie-banner__text {
  font-size: var(--fs-sm);
  color: var(--text-mid);
  line-height: 1.6;
  margin: 0;
}

.cookie-banner__btn {
  padding: 0.6rem 1.5rem;
  background: var(--teal);
  color: var(--white);
  font-weight: 600;
  font-size: var(--fs-sm);
  border-radius: var(--radius-md);
  white-space: nowrap;
  transition: background var(--duration) var(--ease-out);
}

.cookie-banner__btn:hover {
  background: var(--teal-dark);
}


/* ============================================================
   BACK TO TOP
   ============================================================ */
.back-to-top {
  position: fixed;
  bottom: 2rem;
  right: 2rem;
  z-index: 900;
  width: 44px;
  height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--teal);
  color: var(--white);
  border-radius: var(--radius-full);
  box-shadow: var(--shadow-md);
  font-size: 1.1rem;
  opacity: 0;
  visibility: hidden;
  transform: translateY(12px);
  transition: opacity var(--duration) var(--ease-out),
              visibility var(--duration) var(--ease-out),
              transform var(--duration) var(--ease-out),
              background var(--duration) var(--ease-out);
}

.back-to-top.is-visible {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.back-to-top:hover {
  background: var(--teal-dark);
  color: var(--white);
}


/* ============================================================
   SCROLL ANIMATIONS
   ============================================================ */
.fade-in {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.7s var(--ease-out),
              transform 0.7s var(--ease-out);
}

.fade-in.is-visible {
  opacity: 1;
  transform: translateY(0);
}

/* Staggered children */
.stagger > .fade-in:nth-child(1) { transition-delay: 0s; }
.stagger > .fade-in:nth-child(2) { transition-delay: 0.08s; }
.stagger > .fade-in:nth-child(3) { transition-delay: 0.16s; }
.stagger > .fade-in:nth-child(4) { transition-delay: 0.24s; }
.stagger > .fade-in:nth-child(5) { transition-delay: 0.32s; }
.stagger > .fade-in:nth-child(6) { transition-delay: 0.4s; }
.stagger > .fade-in:nth-child(7) { transition-delay: 0.48s; }
.stagger > .fade-in:nth-child(8) { transition-delay: 0.56s; }
.stagger > .fade-in:nth-child(9) { transition-delay: 0.64s; }
.stagger > .fade-in:nth-child(10) { transition-delay: 0.72s; }


/* ============================================================
   UTILITY CLASSES
   ============================================================ */
.text-center { text-align: center; }
.text-teal { color: var(--teal); }
.text-accent { color: var(--accent); }
.mt-sm { margin-top: var(--space-sm); }
.mt-md { margin-top: var(--space-md); }
.mt-lg { margin-top: var(--space-lg); }
.mb-sm { margin-bottom: var(--space-sm); }
.mb-md { margin-bottom: var(--space-md); }
.mb-lg { margin-bottom: var(--space-lg); }
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}


/* ============================================================
   SECTION DIVIDER
   ============================================================ */
.section-divider {
  width: 60px;
  height: 3px;
  background: linear-gradient(90deg, var(--teal), var(--teal-dark));
  border-radius: 2px;
  margin: var(--space-lg) auto;
  border: none;
}


/* ============================================================
   "LA LOGOPEDIA" PAGE — Content sections
   ============================================================ */
.logopedia-intro {
  padding: var(--space-2xl) 0;
  background: var(--white);
}

.logopedia-intro__grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--space-xl);
}

.logopedia-intro__block {
  padding: var(--space-lg);
  background: var(--off-white);
  border-radius: var(--radius-lg);
  border-left: 4px solid var(--teal);
}

.logopedia-intro__block h3 {
  color: var(--teal-dark);
  margin-bottom: var(--space-sm);
}

.logopedia-intro__block p {
  line-height: 1.85;
}

.logopedia-intro__image {
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-md);
}

.logopedia-intro__image img {
  width: 100%;
  display: block;
}


/* ============================================================
   RESPONSIVE — Tablet (768px+)
   ============================================================ */
@media (min-width: 768px) {
  .about__grid {
    grid-template-columns: auto 1fr;
    gap: var(--space-xl);
  }

  .about__photo {
    width: 220px;
    height: 220px;
  }

  .services__grid {
    grid-template-columns: repeat(2, 1fr);
    gap: var(--space-lg);
  }

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

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

  .cookie-banner__inner {
    flex-direction: row;
    text-align: left;
  }

  .logopedia-intro__grid {
    grid-template-columns: 1fr 1fr;
    align-items: start;
  }
}


/* ============================================================
   RESPONSIVE — Desktop (1024px+)
   ============================================================ */
@media (min-width: 1024px) {
  .nav {
    display: block;
  }

  .hamburger {
    display: none;
  }

  .mobile-nav,
  .mobile-nav__overlay {
    display: none;
  }

  .services__grid {
    grid-template-columns: repeat(3, 1fr);
  }

  .footer__inner {
    grid-template-columns: 2fr 1fr 1fr;
  }

  .about__photo {
    width: 240px;
    height: 240px;
  }
}


/* ============================================================
   ERROR PAGE (404)
   ============================================================ */
.error-page {
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  min-height: calc(100vh - var(--header-h) - 200px);
  padding: var(--space-2xl) var(--space-md);
  margin-top: var(--header-h);
}

.error-page__code {
  display: block;
  font-family: var(--font-heading);
  font-size: clamp(6rem, 5rem + 8vw, 12rem);
  font-weight: 700;
  line-height: 1;
  color: var(--teal-light);
  letter-spacing: -0.04em;
}

.error-page__title {
  font-size: var(--fs-2xl);
  color: var(--teal-dark);
  margin-top: var(--space-sm);
  margin-bottom: var(--space-sm);
}

.error-page__text {
  font-size: var(--fs-md);
  color: var(--text-mid);
  max-width: 480px;
  margin: 0 auto var(--space-lg);
  line-height: 1.7;
}

.error-page__btn {
  display: inline-block;
  padding: 0.85rem 2.2rem;
  background: var(--teal);
  color: var(--white);
  font-family: var(--font-body);
  font-size: var(--fs-base);
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  border-radius: var(--radius-sm);
  transition: background var(--duration) var(--ease-out), transform var(--duration) var(--ease-out);
}

.error-page__btn:hover {
  background: var(--teal-dark);
  color: var(--white);
  transform: translateY(-2px);
}


/* ============================================================
   PRINT STYLES
   ============================================================ */
@media print {
  .header,
  .cookie-banner,
  .back-to-top,
  .mobile-nav,
  .mobile-nav__overlay {
    display: none !important;
  }

  body {
    font-size: 12pt;
    color: #000;
    background: #fff;
  }

  .hero {
    min-height: auto;
    margin-top: 0;
    padding: 1rem 0;
    background: none;
  }

  .hero::after {
    display: none;
  }

  .hero__tagline,
  .hero__title {
    color: #000;
    text-shadow: none;
    font-size: 24pt;
  }

  .hero__subtitle {
    color: #333;
  }

  .article {
    padding: 1rem 0;
  }
}
