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

/* ==========================================================
   page-fixes.css  (load AFTER style.css and custom.css)
   1) Header: Cosmo International logo text
   2) Patient results: side-by-side joined image pair
   ========================================================== */

/* ---------- 1. HEADER BRAND TEXT ----------
   Line 1 : COSMO INTERNATIONAL (Cormorant SC, true small caps) + TM
   Line 2 : ...for the cosmopolitan (tagline, unchanged)
   Line 3 : divider line
   Line 4 : HAIR TRANSPLANT / & SKIN AESTHETICS (Figtree)
   Beats the .lw rules in style.css (1241px+ and 860px- media rules too) */

/* Shift whole logo slightly left (desktop only) */
@media (min-width: 901px) {

  .header .logo {
    margin-left: -24px;
  }
}

/* Text block wrapper */
.header .logo .lw {
  align-items: stretch !important;
  width: max-content;
  text-align: center;
  line-height: 1 !important;
}

/* Line 1 - title */
.header .logo .lw b {
  position: relative;
  align-self: center !important;
  font-family: 'Cormorant SC', 'Cormorant Garamond', Georgia, serif !important;
  font-size: 1.5rem !important;
  font-weight: 700 !important;
  letter-spacing: .02em !important;
  line-height: 1 !important;
  text-transform: none !important;
  white-space: nowrap;
  color: #16938d !important;          /* brand teal */
}

/* TM mark (absolute, so the title stays perfectly centred) */
.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: #16938d;                     /* brand teal */
}

/* Line 2 - tagline */
.header .logo .lw .tag {
  display: block;
  margin: 2px 0 0;
  font: italic 500 .92rem/1.1 'Playfair Display', Georgia, serif;
  letter-spacing: .01em;
  text-align: center;
  white-space: nowrap;
  color: #16938d;                     /* brand teal */
}

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

/* Lines 4-5 - HAIR TRANSPLANT / & SKIN AESTHETICS */
.header .logo .lw small {
  display: block;
  font-family: 'Figtree', Arial, sans-serif !important;
  font-size: 1rem !important;
  font-weight: 600 !important;
  letter-spacing: .05em !important;
  line-height: 1.25;
  text-align: center;
  text-transform: uppercase;
  white-space: nowrap;
  color: #16938d !important;          /* brand teal */
}

@media (max-width: 860px) {

  .header .logo .lw b {
    font-size: 1.15rem !important;
  }

  .header .logo .lw .tag {
    font-size: .62rem;
  }

  .header .logo .lw small {
    font-size: .68rem !important;
    letter-spacing: .04em !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;
}

/* ---------- 6. FOOTER THEME (brand teal #16938d) ---------- */

/* Footer background and text */
.footer {
  background: #16938d !important;
  color: #fff;
}

/* Footer headings */
.footer h3,
.footer h4 {
  color: #fff;
}

/* Footer links */
.footer a {
  color: #fff;
}

.footer a:hover {
  color: #f1d58a;
}

/* Map button (darker teal so it stands out) */
.footer a.mapbtn {
  background: #0a5f5a;
  color: #fff;
}

/* Social icons */
.footer .social a {
  border-color: rgba(255, 255, 255, .6);
}

/* Bottom legal strip */
.legal {
  border-color: rgba(255, 255, 255, .35) !important;
}

/* ---------- 7. MOBILE HEADER FIT (keeps logo + burger on one line) ---------- */
@media (max-width: 860px) {

  .header .wrap.row {
    flex-wrap: nowrap;
    gap: .5rem;
  }

  .header .logo {
    min-width: 0;
  }
}

/* Small phones (320px - 400px) */
@media (max-width: 400px) {

  .header .logo {
    gap: 8px;
  }

  .header .logo .logoring {
    width: 46px;
    height: 46px;
  }

  .header .logo .lw b {
    font-size: 1rem !important;
  }

  .header .logo .lw .tag {
    font-size: .54rem;
  }

  .header .logo .lw small {
    font-size: .58rem !important;
    letter-spacing: .03em !important;
  }
}
