@import url("https://fonts.googleapis.com/css2?family=Playfair+Display:ital,wght@1,500&family=Saira:wght@600&display=swap");

/* ==========================================================
   page-fixes.css  (load AFTER style.css and custom.css)
   1) Header: clinic name bold, clear and larger
   2) Patient results: side-by-side joined image pair
   ========================================================== */

/* ---------- 1. HEADER BRAND TEXT (matches the Cosmo logo) ----------
   COSMO         : logo teal, squared sans (Saira)
   tagline       : logo purple, italic serif script
   INTERNATIONAL : charcoal sans, between two teal lines
   Beats the .lw rules in style.css (1241px+ and 860px- media rules too) */
.header .logo .lw {
  align-items: stretch !important;
  text-align: center;
  line-height: 1 !important;
}

.header .logo .lw b {
  font-family: 'Saira', 'Eurostile', 'Segoe UI', Arial, sans-serif !important;
  font-size: 2.3rem !important;               /* was 2rem */
  font-weight: 600 !important;
  letter-spacing: .14em !important;
  line-height: 1 !important;
  color: #55979d !important;          /* logo teal */
}

/* TM mark after COSMO (absolute, so COSMO stays perfectly centred) */
.header .logo .lw b {
  position: relative;
  align-self: center !important;
}

.header .logo .lw b .tm {
  position: absolute;
  top: .1em;
  left: 100%;
  margin-left: -.05em;
  font-family: Arial, Helvetica, sans-serif;
  font-size: .4em;
  font-weight: 400;
  letter-spacing: 0;
  line-height: 1;
  color: #55979d;                     /* logo teal */
}

.header .logo .lw .tag {
  display: block;
  margin: 2px 0 0;
  font: italic 500 .92rem/1.1 'Playfair Display', Georgia, serif;
  letter-spacing: .01em;
  color: #5b4a8f;                     /* logo purple */
  white-space: nowrap;
}

.header .logo .lw i {
  display: block !important;
  width: 100% !important;
  height: 2px !important;
  margin: 4px 0 !important;
  background: #55979d !important;     /* logo teal line */
}

.header .logo .lw small {
  font-family: Arial, Helvetica, sans-serif !important;
  font-size: .8rem !important;                /* was .7rem */
  font-weight: 700 !important;                /* bold on all screens */
  letter-spacing: .1em !important;
  color: #2f3438 !important;          /* logo charcoal */
  text-transform: uppercase;
}

@media (max-width: 860px) {

  .header .logo .lw b {
    font-size: 1.7rem !important;             /* was 1.5rem */
  }

  .header .logo .lw .tag {
    font-size: .7rem;                         /* was .62rem */
  }

  .header .logo .lw small {
    font-size: .6rem !important;              /* was .52rem */
    font-weight: 700 !important;              /* bold on mobile too */
    letter-spacing: .06em !important;
  }
}

/* ---------- 2. PATIENT RESULTS: UNIFORM IMAGE CARDS ----------
   Every result = same size card (16:10). Photos are never cropped (contain). */
.pr-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 20px;
}

.pr-grid figure {
  margin: 0;
  aspect-ratio: 16 / 10;
  background: #fff;
  border: 1px solid var(--line, #d3e6e4);
  border-radius: 14px;
  padding: 8px;
  overflow: hidden;
  display: flex;
  gap: 6px;
  box-shadow: 0 4px 16px rgba(10, 95, 90, .08);
}

.pr-grid figure button {
  flex: 1 1 0;
  min-width: 0;
  height: 100%;
  padding: 0;
  border: 0;
  background: none;
  cursor: zoom-in;
}

.pr-grid figure img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
  border-radius: 8px;
}

/* odd last card: centre it at normal size */
.pr-grid figure:last-child:nth-child(odd) {
  grid-column: 1 / -1;
  width: calc(50% - 10px);
  margin: 0 auto;
}

@media (max-width: 700px) {
  .pr-grid { grid-template-columns: 1fr; }
  .pr-grid figure:last-child:nth-child(odd) { width: 100%; }
}

/* ---------- 3. HOME PAGE: PATIENT RESULTS (5 uniform cards) ---------- */
.hx-res-grid {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 22px;
}
.hx-res-grid .hx-res { flex: 0 1 calc(33.333% - 15px); min-width: 280px; }
.hx-res .hx-ph.hx-wide { display: flex; gap: 4px; background: #fff; aspect-ratio: 4 / 3; }
.hx-res .hx-ph.hx-wide img { position: static; flex: 1 1 0; min-width: 0; width: 100%; height: 100%; object-fit: contain; }
@media (max-width: 620px) { .hx-res-grid .hx-res { flex-basis: 100%; } }

/* ---------- 4. HOME HERO: BEFORE / AFTER CARD ----------
   Two equal cells, photo fills the cell, tags sit inside the corner.
   (!important needed to beat the #hx-tweaks block inside index.html) */
.hx-ba-pair {
  display: grid !important;
  grid-template-columns: 1fr 1fr !important;
  gap: 10px !important;
}

.hx-ba-pair .hx-ph {
  position: relative !important;
  display: block !important;
  aspect-ratio: 3 / 4 !important;
  height: auto !important;
  min-height: 0 !important;
  overflow: hidden !important;
  border-radius: 12px !important;
  background: #fff !important;
}

.hx-ba-pair .hx-ph img {
  position: absolute !important;
  inset: 0 !important;
  width: 100% !important;
  height: 100% !important;
  max-height: none !important;
  object-fit: cover !important;
  object-position: center top !important;
  display: block !important;
}

/* BEFORE / AFTER tags (home.css span rule had turned them into inline text) */
.hx-ba-pair .hx-ph .hx-tag {
  position: absolute !important;
  top: 10px !important;
  left: 10px !important;
  right: auto !important;
  z-index: 3 !important;
  padding: 4px 10px !important;
  background: #0a5f5a !important;
  color: #fff !important;
  border-radius: 4px !important;
  font: 700 .7rem/1.2 'Figtree', sans-serif !important;
  letter-spacing: .12em !important;
}

.hx-ba-pair .hx-ph:last-child .hx-tag {
  left: auto !important;
  right: 10px !important;
  background: #14998f !important;
}

/* ---------- 5. HOME HERO: SINGLE CENTRED COLUMN (card removed) ---------- */
.hx-hero .hx-hero-grid {
  display: block !important;
  max-width: 820px;
  margin: 0 auto;
  text-align: center;
}

.hx-hero .lead {
  max-width: 680px !important;
  margin-left: auto !important;
  margin-right: auto !important;
}

.hx-hero .btns,
.hx-hero .hx-chips {
  justify-content: center !important;
}