/* Congruent Optică Medicală — site unificat, mobile-first */
:root {
  --bg: #f7f6f3;
  --surface: #ffffff;
  --ink: #1a1c1b;
  --muted: #5c635f;
  --line: #e2e0da;
  --accent: #0f766e;
  --accent-dark: #0b5a54;
  --accent-soft: #d9f2ef;
  --whatsapp: #25d366;
  --whatsapp-dark: #1ebe57;
  --draft: #b45309;
  --draft-bg: #fff7ed;
  --radius: 14px;
  --radius-lg: 20px;
  --shadow: 0 1px 2px rgba(26, 28, 27, 0.04), 0 8px 24px rgba(26, 28, 27, 0.06);
  --font: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --max: 640px;
  --header-h: 3.5rem;
  --safe-b: env(safe-area-inset-bottom, 0px);
  --safe-t: env(safe-area-inset-top, 0px);
}

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

html { scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: var(--font);
  color: var(--ink);
  background: var(--bg);
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  padding-bottom: calc(5rem + var(--safe-b));
}

img, svg { display: block; max-width: 100%; }
a { color: var(--accent); }
button, input, select, textarea { font: inherit; color: inherit; }

/* —— Header —— */
.site-header {
  position: sticky;
  top: 0;
  z-index: 40;
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
  padding-top: var(--safe-t);
}

.header-inner {
  max-width: var(--max);
  margin: 0 auto;
  padding: 0.75rem 1rem;
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.logo {
  width: 2.25rem;
  height: 2.25rem;
  border-radius: 10px;
  background: linear-gradient(145deg, var(--accent), var(--accent-dark));
  color: #fff;
  display: grid;
  place-items: center;
  font-weight: 800;
  font-size: 1rem;
  flex-shrink: 0;
  text-decoration: none;
}

.brand-block { min-width: 0; flex: 1; }
.brand-block a { text-decoration: none; color: inherit; }
.brand-name {
  margin: 0;
  font-size: 0.95rem;
  font-weight: 700;
  letter-spacing: -0.01em;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.brand-tag {
  margin: 0;
  font-size: 0.72rem;
  color: var(--muted);
}

.nav-toggle {
  display: none; /* used only if needed */
}

/* —— Layout —— */
.wrap {
  max-width: var(--max);
  margin: 0 auto;
  padding: 1.25rem 1rem 2rem;
}

.page-title {
  margin: 0 0 0.35rem;
  font-size: 1.55rem;
  letter-spacing: -0.02em;
  line-height: 1.2;
}

.lead {
  margin: 0 0 1.5rem;
  color: var(--muted);
  font-size: 0.98rem;
}

.section {
  margin-bottom: 2rem;
}

.section-title {
  margin: 0 0 0.75rem;
  font-size: 1.15rem;
  letter-spacing: -0.01em;
}

/* —— Home / link-in-bio —— */
.home-hero {
  text-align: center;
  padding: 1.25rem 0 0.5rem;
}

.avatar {
  width: 5.5rem;
  height: 5.5rem;
  margin: 0 auto 0.85rem;
  border-radius: 50%;
  background: linear-gradient(145deg, var(--accent), var(--accent-dark));
  color: #fff;
  display: grid;
  place-items: center;
  font-weight: 800;
  font-size: 2rem;
  box-shadow: 0 8px 24px rgba(15, 118, 110, 0.28);
}

.home-hero h1 {
  margin: 0 0 0.35rem;
  font-size: 1.35rem;
  letter-spacing: -0.02em;
}

.home-hero .tagline {
  margin: 0 0 1.5rem;
  color: var(--muted);
  font-size: 0.95rem;
}

.hero-photo {
  margin: 0 0 1.25rem;
  border-radius: var(--radius-lg);
  overflow: hidden;
  background: var(--line);
  box-shadow: 0 8px 24px rgba(15, 23, 42, 0.08);
}
.hero-photo img {
  width: 100%;
  height: auto;
  display: block;
  aspect-ratio: 1200 / 675;
  object-fit: cover;
  border-radius: var(--radius-lg);
}



/* —— Buttons —— */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  text-decoration: none;
  text-align: center;
  font-weight: 700;
  font-size: 1rem;
  padding: 0.95rem 1.1rem;
  min-height: 3.1rem;
  border-radius: var(--radius);
  border: 1.5px solid var(--line);
  background: var(--surface);
  color: var(--ink);
  cursor: pointer;
  transition: transform 0.12s ease, box-shadow 0.12s ease, background 0.12s ease;
  -webkit-tap-highlight-color: transparent;
}

.btn:hover, .btn:focus-visible {
  transform: translateY(-1px);
  box-shadow: var(--shadow);
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

.btn:active { transform: translateY(0); }

.btn-block { width: 100%; }

.btn-primary {
  background: linear-gradient(135deg, var(--accent), var(--accent-dark));
  color: #fff;
  border-color: transparent;
}

.btn-primary:hover, .btn-primary:focus-visible {
  box-shadow: 0 10px 28px rgba(15, 118, 110, 0.3);
}

.btn-wa {
  background: var(--whatsapp);
  color: #053b1a;
  border-color: transparent;
}

.btn-wa:hover, .btn-wa:focus-visible {
  background: var(--whatsapp-dark);
  box-shadow: 0 10px 28px rgba(37, 211, 102, 0.35);
}

.btn-ghost {
  background: var(--accent-soft);
  border-color: transparent;
  color: var(--accent-dark);
}

.btn-outline {
  background: transparent;
}

.btn small {
  display: block;
  font-weight: 500;
  font-size: 0.78rem;
  opacity: 0.85;
  margin-top: 0.15rem;
}

.btn-stack {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  line-height: 1.25;
}

/* —— Cards —— */
.card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  padding: 1.15rem 1.1rem;
  box-shadow: var(--shadow);
}

.card + .card { margin-top: 0.85rem; }

.card h3 {
  margin: 0 0 0.35rem;
  font-size: 1.05rem;
}

.card p { margin: 0.35rem 0; color: var(--muted); font-size: 0.92rem; }
.card .addr { color: var(--ink); font-weight: 500; }

.card-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.5rem;
  margin-top: 0.9rem;
}

.card-actions .btn { min-height: 2.75rem; font-size: 0.9rem; padding: 0.65rem 0.5rem; }
.card-actions .btn-wa { grid-column: 1 / -1; }

.offer-price {
  display: inline-block;
  margin-top: 0.4rem;
  font-weight: 800;
  color: var(--accent-dark);
  font-size: 1.15rem;
}

.badge {
  display: inline-block;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.02em;
  text-transform: uppercase;
  padding: 0.25rem 0.55rem;
  border-radius: 999px;
  background: var(--accent-soft);
  color: var(--accent-dark);
}

.badge-draft {
  background: var(--draft-bg);
  color: var(--draft);
  border: 1px solid #fdba74;
}

/* —— Forms —— */
.form-group { margin-bottom: 1.1rem; }

.form-group label {
  display: block;
  font-weight: 650;
  font-size: 0.92rem;
  margin-bottom: 0.4rem;
}

.form-group .hint {
  display: block;
  font-weight: 400;
  font-size: 0.8rem;
  color: var(--muted);
  margin-top: 0.25rem;
}

.form-control,
select.form-control,
textarea.form-control {
  width: 100%;
  padding: 0.8rem 0.9rem;
  border: 1.5px solid var(--line);
  border-radius: 12px;
  background: var(--surface);
  min-height: 3rem;
  appearance: none;
}

select.form-control {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8'%3E%3Cpath fill='%235c635f' d='M0 0l6 8 6-8z'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 0.9rem center;
  padding-right: 2.2rem;
}

.form-control:focus {
  outline: 2px solid var(--accent);
  outline-offset: 1px;
  border-color: var(--accent);
}

.radio-grid {
  display: grid;
  gap: 0.5rem;
}

.radio-card {
  display: flex;
  align-items: flex-start;
  gap: 0.65rem;
  padding: 0.85rem 0.95rem;
  border: 1.5px solid var(--line);
  border-radius: 12px;
  background: var(--surface);
  cursor: pointer;
  min-height: 3rem;
}

.radio-card:has(input:checked),
.radio-card.is-selected {
  border-color: var(--accent);
  background: var(--accent-soft);
}

.radio-card input {
  margin-top: 0.2rem;
  accent-color: var(--accent);
  width: 1.1rem;
  height: 1.1rem;
  flex-shrink: 0;
}

.confirm-note {
  margin: 1rem 0 0;
  padding: 0.85rem 1rem;
  background: var(--accent-soft);
  border-radius: 12px;
  font-size: 0.9rem;
  color: var(--accent-dark);
}

/* —— Blog —— */
.article-list { display: grid; gap: 0.85rem; }

.article-card {
  display: block;
  text-decoration: none;
  color: inherit;
  padding: 1.1rem;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow);
}

.article-card:hover, .article-card:focus-visible {
  border-color: var(--accent);
  outline: none;
}

.article-card h2 {
  margin: 0.4rem 0 0.35rem;
  font-size: 1.1rem;
  letter-spacing: -0.01em;
}

.article-card .excerpt {
  margin: 0;
  color: var(--muted);
  font-size: 0.9rem;
}

.article-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  align-items: center;
  margin-bottom: 1rem;
}

.prose {
  font-size: 1.02rem;
  line-height: 1.65;
}

.prose h2 {
  margin: 1.6rem 0 0.6rem;
  font-size: 1.2rem;
}

.prose p { margin: 0 0 1rem; }
.prose ul { margin: 0 0 1rem; padding-left: 1.2rem; }
.prose li { margin-bottom: 0.4rem; }

.cta-box {
  margin-top: 2rem;
  padding: 1.25rem;
  background: var(--accent-soft);
  border-radius: var(--radius-lg);
  text-align: center;
}

.cta-box p { margin: 0 0 0.85rem; color: var(--accent-dark); font-weight: 600; }

/* —— TikTok —— */
.tiktok-grid { display: grid; gap: 1rem; }

.tiktok-slot {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
  min-height: 200px;
}

.tiktok-placeholder {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.75rem;
  padding: 2rem 1rem;
  text-align: center;
  color: var(--muted);
  min-height: 220px;
}

.tiktok-placeholder .views {
  font-size: 0.85rem;
}

.tiktok-slot blockquote.tiktok-embed {
  margin: 0 !important;
  max-width: 100% !important;
}

/* —— Footer —— */
.site-footer {
  max-width: var(--max);
  margin: 0 auto;
  padding: 1.5rem 1rem 1rem;
  text-align: center;
  color: var(--muted);
  font-size: 0.82rem;
  border-top: 1px solid var(--line);
}

.site-footer nav {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.65rem 1rem;
  margin-bottom: 0.75rem;
}

.site-footer a {
  color: var(--muted);
  text-decoration: none;
  font-weight: 600;
  font-size: 0.85rem;
}

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

/* —— Sticky WhatsApp float —— */
.wa-float {
  position: fixed;
  right: 1rem;
  bottom: calc(1rem + var(--safe-b));
  z-index: 50;
  width: 3.5rem;
  height: 3.5rem;
  border-radius: 50%;
  background: var(--whatsapp);
  color: #053b1a;
  display: grid;
  place-items: center;
  box-shadow: 0 8px 24px rgba(37, 211, 102, 0.45);
  text-decoration: none;
  transition: transform 0.15s ease;
}

.wa-float:hover, .wa-float:focus-visible {
  transform: scale(1.06);
  outline: 2px solid var(--accent);
  outline-offset: 3px;
}

.wa-float svg { width: 1.65rem; height: 1.65rem; fill: currentColor; }

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  border: 0;
}

/* —— Desktop —— */
@media (min-width: 768px) {
  :root { --max: 720px; }
  .home-hero h1 { font-size: 1.6rem; }
  .tiktok-grid {
    grid-template-columns: 1fr;
  }
  .card-actions {
    grid-template-columns: repeat(3, 1fr);
  }
  .card-actions .btn-wa { grid-column: auto; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .btn, .wa-float { transition: none; }
}

/* —— Logo wordmark —— */
.logo-img {
  display: block;
  height: 2rem;
  width: auto;
  max-width: 11rem;
}
.brand-with-logo {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  min-width: 0;
}
.brand-with-logo .brand-sub {
  margin: 0;
  font-size: 0.72rem;
  font-weight: 650;
  color: var(--muted);
  line-height: 1.2;
}
.home-hero .logo-hero {
  height: 3.25rem;
  max-width: min(90vw, 20rem);
  margin: 0 auto 0.75rem;
  width: auto;
}
@media (min-width: 768px) {
  .logo-img { height: 2.25rem; max-width: 13rem; }
  .home-hero .logo-hero { height: 3.75rem; }
}

/* —— Social row —— */
.social-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.65rem;
  justify-content: center;
  margin: 1rem 0;
}
.social-link {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  font-weight: 700;
  font-size: 0.9rem;
  text-decoration: none;
  color: var(--ink);
  background: var(--surface);
  border: 1.5px solid var(--line);
  border-radius: 999px;
  padding: 0.45rem 0.85rem;
  min-height: 2.5rem;
}
.social-link:hover { border-color: var(--accent); color: var(--accent-dark); }
.social-link svg { width: 1.15rem; height: 1.15rem; fill: currentColor; }

/* —— YouTube facade —— */
.yt-facade {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 9;
  border-radius: var(--radius);
  overflow: hidden;
  background: #111;
  border: 1px solid var(--line);
  cursor: pointer;
  padding: 0;
  display: block;
}
.yt-facade img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.yt-facade .yt-play {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  background: rgba(0,0,0,0.25);
}
.yt-facade .yt-play-btn {
  width: 4rem;
  height: 4rem;
  border-radius: 50%;
  background: #ff0000;
  display: grid;
  place-items: center;
  box-shadow: 0 8px 24px rgba(0,0,0,0.35);
}
.yt-facade .yt-play-btn svg { width: 1.6rem; height: 1.6rem; fill: #fff; margin-left: 0.15rem; }
.yt-facade:focus-visible { outline: 3px solid var(--accent); outline-offset: 3px; }
.yt-embed-wrap {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 9;
  border-radius: var(--radius);
  overflow: hidden;
  background: #111;
}
.yt-embed-wrap iframe {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: 0;
}

/* —— ANPC SAL badge —— */
.anpc-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  justify-content: center;
  align-items: center;
  margin: 1rem 0 0.5rem;
}
.anpc-row--sal-only {
  justify-content: center;
}
.anpc-row a {
  display: inline-block;
  line-height: 0;
}
.anpc-row img {
  width: 250px;
  max-width: 100%;
  height: auto;
  display: block;
}


/* —— Blog covers —— */
.cover-img {
  width: 100%;
  height: auto;
  border-radius: var(--radius);
  margin: 0 0 1rem;
  aspect-ratio: 16 / 9;
  object-fit: cover;
  background: var(--line);
}
.article-card .cover-thumb {
  width: 100%;
  height: auto;
  border-radius: 12px;
  margin: 0 0 0.65rem;
  aspect-ratio: 16 / 10;
  object-fit: cover;
  display: block;
}
.photo-credit {
  margin: -0.5rem 0 1rem;
  font-size: 0.78rem;
  color: var(--muted);
}


/* —— Home image link cards —— */
.bio-links {
  display: grid;
  gap: 0.85rem;
}

.link-cards-primary {
  display: grid;
  gap: 0.75rem;
}

.link-cards-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.7rem;
}

.link-card {
  position: relative;
  display: block;
  overflow: hidden;
  border-radius: var(--radius-lg);
  text-decoration: none;
  color: #fff;
  isolation: isolate;
  background: #0f172a;
  box-shadow: 0 8px 22px rgba(15, 23, 42, 0.12);
  -webkit-tap-highlight-color: transparent;
  transition: transform 0.14s ease, box-shadow 0.14s ease;
  min-height: 6.75rem;
}

.link-card--lg {
  min-height: 9.5rem;
}

.link-card:hover,
.link-card:focus-visible {
  transform: translateY(-2px);
  box-shadow: 0 12px 28px rgba(15, 23, 42, 0.18);
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

.link-card:active { transform: translateY(0); }

.link-card picture {
  display: block;
  width: 100%;
  height: auto;
  line-height: 0;
}

.link-card img {
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: 8 / 5;
  object-fit: cover;
  object-position: center;
  background: #1e293b;
}

.link-card--lg img {
  aspect-ratio: 16 / 9;
}

.link-card__shade {
  position: absolute;
  inset: 0;
  background: linear-gradient(
    to top,
    rgba(2, 12, 20, 0.88) 0%,
    rgba(2, 12, 20, 0.42) 42%,
    rgba(2, 12, 20, 0.18) 100%
  );
  z-index: 1;
  pointer-events: none;
}

.link-card__label {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 2;
  padding: 0.85rem 0.9rem 0.95rem;
  font-weight: 800;
  font-size: 0.98rem;
  line-height: 1.25;
  letter-spacing: -0.01em;
  color: #fff;
  text-shadow: 0 1px 3px rgba(0, 0, 0, 0.55);
  text-align: left;
}

.link-card--lg .link-card__label {
  font-size: 1.12rem;
  padding: 1rem 1.05rem 1.1rem;
}

.link-cards-grid .link-card__label {
  font-size: 0.86rem;
  padding: 0.65rem 0.7rem 0.75rem;
}

@media (min-width: 480px) {
  .link-cards-grid .link-card__label {
    font-size: 0.95rem;
  }
}
