/* Proxima Nova Webfonts */

/* Thin / Light */
@font-face {
  font-family: 'Proxima Nova';
  src: url('/fonts/ProximaNova-Light.woff2') format('woff2'),
    url('/fonts/ProximaNova-Light.woff') format('woff');
  font-weight: 300;
  font-style: normal;
}

@font-face {
  font-family: 'Proxima Nova';
  src: url('/fonts/ProximaNova-LightItalic.woff2') format('woff2'),
    url('/fonts/ProximaNova-LightItalic.woff') format('woff');
  font-weight: 300;
  font-style: italic;
}

/* Regular */
@font-face {
  font-family: 'Proxima Nova';
  src: url('/fonts/ProximaNova-Regular.woff2') format('woff2'),
    url('/fonts/ProximaNova-Regular.woff') format('woff');
  font-weight: 400;
  font-style: normal;
}

@font-face {
  font-family: 'Proxima Nova';
  src: url('/fonts/ProximaNova-RegularItalic.woff2') format('woff2'),
    url('/fonts/ProximaNova-RegularItalic.woff') format('woff');
  font-weight: 400;
  font-style: italic;
}

/* Semibold */
@font-face {
  font-family: 'Proxima Nova';
  src: url('/fonts/ProximaNova-Semibold.woff2') format('woff2'),
    url('/fonts/ProximaNova-Semibold.woff') format('woff');
  font-weight: 600;
  font-style: normal;
}

@font-face {
  font-family: 'Proxima Nova';
  src: url('/fonts/ProximaNova-SemiboldItalic.woff2') format('woff2'),
    url('/fonts/ProximaNova-SemiboldItalic.woff') format('woff');
  font-weight: 600;
  font-style: italic;
}

/* Bold */
@font-face {
  font-family: 'Proxima Nova';
  src: url('/fonts/ProximaNova-Bold.woff2') format('woff2'),
    url('/fonts/ProximaNova-Bold.woff') format('woff');
  font-weight: 700;
  font-style: normal;
}

@font-face {
  font-family: 'Proxima Nova';
  src: url('/fonts/ProximaNova-BoldIt.woff2') format('woff2'),
    url('/fonts/ProximaNova-BoldIt.woff') format('woff');
  font-weight: 700;
  font-style: italic;
}

/* ExtraBold */
@font-face {
  font-family: 'Proxima Nova';
  src: url('/fonts/ProximaNova-Extrabold.woff2') format('woff2'),
    url('/fonts/ProximaNova-Extrabold.woff') format('woff');
  font-weight: 800;
  font-style: normal;
}

/* Black */
@font-face {
  font-family: 'Proxima Nova';
  src: url('/fonts/ProximaNova-Black.woff2') format('woff2'),
    url('/fonts/ProximaNova-Black.woff') format('woff');
  font-weight: 900;
  font-style: normal;
}

/* ===== SEOUL PROVIDERS PAGE ===== */

:root {
  --brand: #3C1EB7;
  --ink: #1B1F3A;
  --header-offset: 64px;
  transition: --header-offset 0.3s ease;
}

/* Hero intro (keep it subtle and consistent) */
.hero-intro {
  background: #FAF9FC;
  padding: 96px 0 40px;
  text-align: center;
}

.hero-inner h1 {
  font-family: "Montserrat", sans-serif;
  font-weight: 700;
  font-size: clamp(2rem, 4vw, 2.6rem);
  margin-bottom: 0.4rem;
}

.hero-inner p {
  font-family: "Inter", sans-serif;
  font-size: 1.1rem;
  color: #555;
  margin: 0;
}

/* Adjust RC section to have lighter background */
.rc-clinics {
  background: #FAF9FC;
  padding-top: 32px;
  padding-bottom: 80px;
}

/* Override rc-head bottom margin for Seoul page only */
.rc-head {
  margin-bottom: 0;
}

/* Slightly larger heading for directory page */
.rc-head .rc-title {
  font-size: clamp(2.4rem, 3.8vw, 2.8rem);
  margin-bottom: 0 !important; /* about 12px */
}

/* ===== Specialty Filters ===== */

.filters-bar {
  background: none;
  padding: 16px 0 24px;
}

/* Container for filters + toggle */
.filters-layout {
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  max-width: 1200px; /* matches card grid width */
  margin: 0 auto;
  padding: 0 24px; /* consistent with card side padding */
}

/* Centered filters */
.filters-wrap {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 12px;
  text-align: center;
}

.filters-center {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 12px;
}

.filter-pill {
  font-family: "Proxima Nova", sans-serif;
  font-weight: 400;
  font-size: 0.9rem;              /* smaller text like rc-tags */
  line-height: 1;
  color: var(--ink);
  background: #fff;
  border: 1.6px solid rgba(60, 30, 183, 0.2);
  padding: 8px 18px;              /* tighter padding */
  border-radius: 999px;
  cursor: pointer;
  transition: all 0.25s ease;
}

.filter-pill:hover {
  border-color: var(--brand);
  color: var(--brand);

}

.filter-pill.active {
  border: 1.6px solid var(--brand);
  color: var(--brand);
  background: #f8f6ff;
  box-shadow: 0 2px 8px rgba(60, 30, 183, 0.1);
}

/* ===== Map Toggle Layout ===== */
.view-toggle {
  display: flex;
  justify-content: flex-end;
  margin: 12px auto 24px;
  max-width: 1200px;
}

/* Map Toggle aligned right */
.toggle-btn {
  position: absolute;
  right: 24px; /* aligns with .rc-grid edge */
  top: 50%;
  transform: translateY(-50%);
  white-space: nowrap;

  /* Match filter pill visuals */
  font-family: "Proxima Nova", sans-serif;
  font-weight: 700;
  font-size: 0.9rem;
  line-height: 1;
  color: var(--ink);
  background: #fff;
  border: 1.6px solid rgba(60, 30, 183, 0.25);
  padding: 8px 18px;
  border-radius: 999px;
  cursor: pointer;
  transition: all 0.25s ease;
  box-shadow: 0 2px 6px rgba(60, 30, 183, 0.08);

}

.toggle-btn:hover {
  border-color: var(--brand);
  color: var(--brand);
  background: #f8f6ff;
  box-shadow: 0 3px 10px rgba(60, 30, 183, 0.12);
}

/* Default: in main filters bar, toggle is absolutely aligned right */
.filters-layout .toggle-btn {
  position: absolute;
  right: 24px;
  top: 50%;
  transform: translateY(-50%);
}

/* When filters are cloned into the header — reset toggle position */
.header-filters-clone .toggle-btn {
  position: absolute;
  right: 28px; /* aligns exactly with card grid right edge */
  top: 50%;
  transform: translateY(-50%);
  margin: 0;
 
}
/* Filters stay centered in first column */
.header-filters-clone .filters-wrap {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 12px;
  text-align: center;
  width: 100%;
}



.view-wrapper {
  display: block;
  width: 100%;
  max-width: 100vw;
  overflow-x: clip;
  box-sizing: border-box;
  isolation: isolate;
  transition: all 0.4s ease;

}

/* Map view: two-column layout with sticky map */
.map-active.view-wrapper {
  display: grid;
  grid-template-columns: 38% 62%; /* adjust ratio as you prefer */
  align-items: start;
  gap: 0;
}

.view-wrapper:not(.map-active) .rc-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(480px, 1fr)); /* ✅ always keep 2 columns */
  gap: 28px;
  align-items: start;
  justify-items: start;       /* ✅ keeps items aligned left */
  width: 100%;
  max-width: 1320px;
  margin: 28px auto 0;
  padding-inline: 24px;
  height: auto;
  align-self: flex-start;
}


.rc-grid {
  flex: 1 0 100%;
  transition: all 0.4s ease;
  width: 100%;
  max-width: 100%;
  min-width: 0;
  margin: 28px auto 0;
}


/* Directory-specific card tweaks */
.rc-card {
  border-radius: 22px;
  box-shadow: 0 10px 24px rgba(60, 30, 183, .08);
  transition: all .3s ease;
}

.rc-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 18px 36px rgba(60, 30, 183, .16);
}

.rc-card[style*="display: none"] {
  opacity: 0;
  transform: scale(0.96);
}

/* Slightly wider banner aspect ratio */
.rc-media {
  aspect-ratio: 20 / 9;
}

/* Map  section */
.providers-map {
  position: sticky;
  top: calc(var(--header-offset) + 0px);   /* ✅ stay exactly below expanding header */
  height: calc(100vh - var(--header-offset)); /* ✅ adjusts with header height */
  background: #e9e7f8;

  /* visual polish */
  box-shadow: inset 1px 0 0 rgba(60, 30, 183, 0.1);
  overflow: hidden;

  /* transitions */
  transition: top 0.3s ease, height 0.3s ease;

  /* layout safety */
  flex-shrink: 0;
  min-width: 0;
  max-width: 100%;
  box-sizing: border-box;
  z-index: 0; /* stays beneath header but above background */
}

/* Hide map by default in List View */
.view-wrapper:not(.map-active) .providers-map {
  display: none;
}


/* When map mode is active */
.map-active .rc-grid {
  /* layout */
  display: grid;
  grid-template-columns: 1fr;        /* single column for map mode */
  gap: 16px;
  align-self: start;
  align-items: start;

  /* sizing */
  width: 100%;
  max-width: 100%;
  flex: none;                        /* no flex-basis restrictions */
  max-height: none;                  /* allow natural height to define scroll length */

  /* scroll behavior */
  overflow: visible;                 /* use main scrollbar only */

  /* spacing */
  padding: 24px 24px 64px; /* default padding in map mode */

  margin: 0;
  box-sizing: border-box;

  /* layering */
  position: relative;
  z-index: 0;
}

/* Only add top spacing when the header is expanded */
.site-header.expanded + .view-wrapper .map-active .rc-grid {
  padding-top: calc(var(--header-offset) - 40px);
  transition: padding-top 0.3s ease;
}

.map-active .providers-map {
  position: sticky;
  top: var(--header-offset);
  height: calc(100vh - var(--header-offset));
  align-self: start;
  background: #e9e7f8;
  box-shadow: inset 1px 0 0 rgba(60,30,183,0.1);
  overflow: hidden;
}

/* Adjust card size in map mode */
.map-active .rc-card {
  width: 100%;
  margin: 0;
  position: relative;
  overflow: hidden;
  border-radius: 20px;
  background: #f7f5fb;
  color: #fff;
  box-shadow: 0 4px 12px rgba(60, 30, 183, 0.08);
  transition: 
    transform 0.25s ease,
    box-shadow 0.25s ease,
    background 0.3s ease;
  transform-origin: center;
  will-change: transform;

  /* Visual fixes */
  background-clip: padding-box;
  isolation: isolate;
  z-index: 1;

  /* Ensure card spans the grid width cleanly */
  grid-column: 1 / -1;
  contain: paint;                /* new stacking context, keeps radius clipping */
  backface-visibility: hidden;   /* prevents flicker during GPU compositing */
  transform-style: preserve-3d;  /* keeps children in same 3D context */
}

.map-active .rc-card::before,
.map-active .rc-card .rc-media,
.map-active .rc-card .rc-media img {
  border-radius: inherit !important;  /* ensures all layers respect same radius */
  clip-path: inset(0 round 20px);     /* hard-enforce radius clipping */
}

/* === Overlay gradient layer === */
.map-active .rc-card::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(
    to top,
    rgba(27, 31, 58, 0.45) 0%,
    rgba(27, 31, 58, 0.15) 50%,
    rgba(27, 31, 58, 0.05) 100%
  );
  z-index: 1;
  border-radius: inherit;
  transition: background 0.35s ease, opacity 0.35s ease;
}

/* === Hover / Active darker overlay === */
.map-active .rc-card:hover::before,
.map-active .rc-card.active::before {
  background: rgba(27, 31, 58, 0.65); /* deep indigo-black tone */
  backdrop-filter: brightness(0.8) saturate(1.1);
  transition: background 0.3s ease, backdrop-filter 0.3s ease;
}


.map-active .rc-card:hover {
  transform: translateY(-4px) scale(1.015);
  box-shadow: 0 14px 30px rgba(60, 30, 183, 0.22);
  transition: transform 0.25s ease, box-shadow 0.25s ease, filter 0.25s ease;
  filter: brightness(1.05);
}

/* === Description reveal === */
.map-active .rc-card .rc-blurb {
  opacity: 0;
  max-height: 0;
  overflow: hidden;
  transition: all 0.35s ease;
}

.map-active .rc-card:hover .rc-blurb,
.map-active .rc-card.active .rc-blurb {
  opacity: 1;
  max-height: 100px;
  margin-bottom: 16px;
}

/* Thumbnail */
.map-active .rc-card .rc-media {
  position: absolute;
  inset: 0;
  z-index: 0;
}

.map-active .rc-card .rc-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0.9;
  transition: opacity 0.3s ease;

}

.map-active .rc-card:hover .rc-media img {
  opacity: 1;
}

.map-active .rc-card img {
  width: 72px;
  height: 72px;
  object-fit: cover;
  border-radius: 12px;
}

/* gradient overlay for readability */
.map-active .rc-card::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(
    to bottom right,
    rgba(250, 248, 255, 0.0) 20%,
    rgba(60, 30, 183, 0.20) 60%,
    rgba(0, 0, 0, 0.35) 100%
  );
  z-index: 1;
  mix-blend-mode: multiply;
}

.map-active .rc-card .rc-body {
  position: relative;
  z-index: 2;
  padding: 16px;
  text-align: left;
  color: #fff;
  text-shadow: 0 1px 4px rgba(0, 0, 0, 0.3);
}

.map-active .rc-card .rc-name {
  color: #fff;
  font-size: 1.3rem; /* increased from 1.1rem */
  font-weight: 800;  /* stronger weight for luxury tone */
  margin-bottom: 6px;
  letter-spacing: -0.01em;
  line-height: 1.2;
}

.map-active .rc-card .rc-blurb {
  color: rgba(255, 255, 255, 0.95);
  font-size: 0.85rem;
  line-height: 1.45;
  margin-bottom: 10px;
}


/* Left side: pills */
.map-active .rc-card .rc-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
  margin: 0;
}

.map-active .rc-card .rc-tag {
  background: rgba(40, 25, 120, 0.4);
  border: 1px solid rgba(255, 255, 255, 0.3);
  color: rgba(255, 255, 255, 0.95);
  border-radius: 999px;
  font-size: 0.7rem;
  font-weight: 500;
  padding: 3px 10px;
  box-shadow: 0 0 8px rgba(60, 30, 183, 0.15);
  transition: all 0.25s ease;
}


.map-active .rc-card .rc-media,
.map-active .rc-card::before {
  border-radius: inherit; /* ensures corners stay rounded */
}

/* hide only the category pill, not actions */
.map-active .rc-card .rc-pill {
  display: none;
}

/* Right side: Learn more */
.map-active .rc-card .rc-actions {
  display: flex;
  align-items: center;
  padding: 0;
  margin-left: auto; /* pushes Learn more to the far right */
}

/* === Fix alignment for list view buttons under tags === */
.view-wrapper:not(.map-active) .rc-card .rc-bottom-row {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 10px;
  margin-top: 16px;
}

/* Align Learn more + Book now nicely in one row */
.view-wrapper:not(.map-active) .rc-card .rc-actions {
  display: flex;
  gap: 12px;
  align-items: center;
  justify-content: flex-start;
  padding: 0px;
  padding-bottom: 16px;
}

/* Slightly tighten button padding for visual balance */
.view-wrapper:not(.map-active) .rc-card .rc-btn {
  padding: 10px 22px;
  font-size: 0.95rem;
  border-radius: 12px;
}


/* Combine tags + Learn More into one row */
.map-active .rc-card .rc-bottom-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap; /* prevents overlap on small screens */
  margin-top: 10px;
  position: relative;
  z-index: 3;
}

.map-active .rc-card .rc-btn--outline {
  background: none;
  border: none;
  color: #fff;
  font-family: "Proxima Nova", sans-serif;
  font-size: 0.85rem;
  font-weight: 600;
  padding: 0;
  text-decoration: none;
  opacity: 0.9;
  transition: opacity 0.25s ease, transform 0.25s ease;
}


.map-active .rc-card .rc-btn--outline:hover {
  opacity: 1;
  transform: translateX(3px);
}

/* hide Book Now button in map mode */
.map-active .rc-card .rc-btn--solid {
  display: none;
}

#map {
  width: 100%;
  height: 100%;
  border: 0px;
}
.rc-card.active {
  outline: 2px solid var(--brand);
  outline-offset: 2px;
  background: #f3f0ff;
}

/* ✅ Keep single clinic same size and in left column */
.view-wrapper:not(.map-active) .rc-grid .rc-card:only-child {
  grid-column: 1 / 2;   /* stays in left column only */
  width: 100%;
  max-width: none;
  justify-self: stretch;
}


/* ===== 3-COLUMN GRID FOR PROVIDERS PAGE ===== */
/* 
.rc-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 24px;
  max-width: 1200px;
  margin-inline: auto;
  padding-inline: 24px;
}

@media (min-width: 1100px) {
  .rc-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

@media (max-width: 768px) {
  .rc-grid {
    grid-template-columns: 1fr;
  }
} */


/* Mobile fallback: revert to simple toggle */
@media (max-width: 1024px) {
  .view-wrapper {
    flex-direction: column;
  }
  .view-wrapper:not(.map-active) .rc-grid {
    grid-template-columns: 1fr;
  }
  .rc-grid,
  .providers-map {
    flex: 1 0 100%;
  }
  .providers-map {
    height: 500px;
  }
}

/* === Final Fix: Preserve bottom border radius during transform === */
.map-active .rc-card {
  /* force its own compositing layer */
  transform: translateZ(0);
  contain: paint;
  backface-visibility: hidden;
  will-change: transform;
}


.map-active .rc-card::before,
.map-active .rc-card .rc-media img {
  border-radius: inherit;
  overflow: hidden;
  clip-path: inset(0 round 20px);
  transform: translateZ(0);
}

/* ensure card shadow doesn't flatten corners */
.map-active .rc-card:hover {
  z-index: 5;  
  transform: translateY(-3px) scale(1.015) translateZ(0);
  box-shadow: 0 10px 28px rgba(60, 30, 183, 0.18);
}


/* === Chrome/Safari rounding patch === */
.map-active .rc-card {
  overflow: clip;                 /* replaces hidden for hardware clipping */
  clip-path: inset(0 round 20px); /* force permanent corner mask */
  border-radius: 20px;
  isolation: isolate;
  contain: layout paint;
  transform: translateZ(0);
}

.map-active .rc-card::before {
  mix-blend-mode: normal;         /* remove multiply bug during animation */
  opacity: 0.9;
}

.map-active .rc-card:hover {
  transform: scale(1.015) translateY(-3px);
  will-change: transform;
}

/* ensure the image never re-rasterizes outside mask */
.map-active .rc-card .rc-media img {
  clip-path: inset(0 round 20px);
  transform: translateZ(0);
  backface-visibility: hidden;
}


/* Responsive adjustment: toggle drops below filters on mobile */
@media (max-width: 768px) {
  .filters-layout {
    flex-direction: column;
    align-items: center;
  }

  .toggle-btn {
    position: static;
    transform: none;
    margin-top: 12px;
  }
}

/* ===== Sticky Header Expansion ===== */
.site-header {
  transition: height 0.4s ease, box-shadow 0.3s ease;
  height: 64px;
  overflow: visible;
  z-index: 1000; /* ensure it's above map and content */
}

.site-header.expanded {
  height: 132px; /* expands the header slightly */
  box-shadow: 0 4px 12px rgba(16, 12, 64, 0.06);
  background: rgba(255, 255, 255, 0.85);
  backdrop-filter: blur(8px);
}

.site-header.expanded::after {
  content: "";
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 1px;
  background: rgba(60, 30, 183, 0.08);
}


.header-filters-clone {
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.4s ease, transform 0.4s ease;
  transform: translateY(-10px);
  display: block; /* ✅ prevent double centering from flex */
  width: 100%;
  margin-top: 12px;
}

.site-header.expanded .header-filters-clone {
  opacity: 1;
  transform: translateY(0);
  pointer-events: auto;
}

.header-filters-clone .filters-layout {
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  max-width: 1120px;
  margin: 0 auto;
  padding: 0 28px;
}

.header-filters-clone .filter-pill {
  padding: 6px 14px; /* slightly smaller */
  font-size: 0.85rem;
}

.site-header:not(.expanded) .header-filters-clone {
  transition-delay: 0.05s; /* small delay avoids abrupt pop-out */
}

html, body {
  overflow-x: hidden;
}


/* Remove footer top margin for Seoul providers page only */
.rc-footer {
  margin-top: 0 !important;
}

/* === ROAM Map Label Override === */

/* Base bubble */
.roam-map-label {
  font-family: "Proxima Nova", sans-serif;
  font-weight: 600;
  color: #1B1F3A;
  font-size: 0.9rem;
  background: #fff;
  border-radius: 10px;
  padding: 8px 14px;
  box-shadow: 0 4px 10px rgba(60, 30, 183, 0.15);
  text-align: center;
  white-space: nowrap;
}

/* Remove Google’s default speech-bubble frame & arrow */
.gm-style-iw-c {
  background: transparent !important;
  box-shadow: none !important;
  padding: 0 !important;
  overflow: visible !important;
}

.gm-style-iw-t::after {
  display: none !important; /* hide the little pointer arrow */
}

/* Hide the default close button */
.gm-ui-hover-effect {
  display: none !important;
}

/* Re-apply our own soft shadow on container */
.gm-style .gm-style-iw-d {
  overflow: visible !important;
}