/* Treatments Directory Page Styles */

body[data-page="treatments"] main,
body[data-page="treatments"] main * {
  min-width: 0;
}

/* ==========================================================================
   Hero Section
   ========================================================================== */
body[data-page="treatments"] .hero-aesthetics {
  position: relative;
  overflow: hidden;
  padding: clamp(2.5rem, 5vw, 4.5rem) 0 clamp(3.5rem, 6vw, 6rem);
  background: linear-gradient(135deg, #fff 0%, #fbfaf7 56%, #f4efe4 100%);
  border-bottom: 1px solid var(--line);
}

body[data-page="treatments"] .hero-aesthetics .hero-copy {
  max-width: 820px;
}

body[data-page="treatments"] .hero-aesthetics h1 {
  font-size: clamp(2.5rem, 6.5vw, 5.2rem);
  line-height: 1.05;
  overflow-wrap: anywhere;
  margin-bottom: 20px;
}

body[data-page="treatments"] .hero-aesthetics .hero-lead {
  font-size: clamp(1rem, 1.8vw, 1.15rem);
  line-height: 1.65;
  max-width: 680px;
  color: var(--muted);
}

body[data-page="treatments"] .hero-aesthetics .hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  margin-top: 32px;
}

/* ==========================================================================
   Search & Controls
   ========================================================================== */
.treatments-directory .directory-controls {
  max-width: 720px;
  margin: 0 auto 40px;
  padding: 24px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 12px;
  box-shadow: 0 4px 18px rgba(24, 33, 43, 0.04);
}

.treatments-directory .directory-controls > label {
  display: block;
  margin-bottom: 10px;
  color: var(--navy);
  font-weight: 800;
  font-size: 0.9rem;
}

.treatments-directory .directory-search {
  display: flex;
  gap: 10px;
}

.treatments-directory .directory-search input {
  min-width: 0;
  flex: 1;
  padding: 13px 18px;
  border: 1px solid var(--line);
  border-radius: 8px;
  font: inherit;
  color: var(--navy);
  background: #fff;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.treatments-directory .directory-search input:focus {
  outline: none;
  border-color: var(--gold);
  box-shadow: 0 0 0 3px rgba(181, 138, 43, 0.18);
}

.treatments-directory .directory-search button {
  padding: 12px 22px;
  border: 1px solid var(--navy);
  border-radius: 8px;
  background: var(--navy);
  color: #fff;
  font: inherit;
  font-size: 0.8rem;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.2s ease;
}

.treatments-directory .directory-search button:hover {
  background: var(--gold);
  border-color: var(--gold);
}

/* ==========================================================================
   Treatment Grid & Cards (Matching Reference Screenshot)
   ========================================================================== */
.treatments-directory .treatment-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 28px;
  align-items: stretch;
}

.treatments-directory .treatment-card {
  display: flex;
  flex-direction: column;
  background: #ffffff;
  border: 1px solid #e5e7eb;
  border-radius: 16px;
  overflow: hidden !important;
  padding: 0 !important; /* Zero padding on the card itself so image touches the edges */
  box-shadow: 0 4px 18px rgba(0, 0, 0, 0.06);
  transition: transform 0.25s ease, box-shadow 0.25s ease, border-color 0.25s ease;
  min-height: 0;
}

.treatments-directory .treatment-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 16px 32px rgba(24, 33, 43, 0.11);
  border-color: rgba(181, 138, 43, 0.35);
}

/* Card Header Media (1:1 Square Image - flush with top, left, right edges) */
.treatments-directory .treatment-card-media {
  position: relative;
  width: 100% !important;
  aspect-ratio: 1 / 1 !important;
  height: auto !important;
  overflow: hidden;
  margin: 0 !important;
  padding: 0 !important;
  background: #f3f4f6;
  border-top-left-radius: 15px;
  border-top-right-radius: 15px;
}

.treatments-directory .treatment-card-media img {
  width: 100% !important;
  height: 100% !important;
  aspect-ratio: 1 / 1 !important;
  object-fit: cover !important;
  object-position: center !important;
  border-top-left-radius: 15px;
  border-top-right-radius: 15px;
  transition: transform 0.4s ease;
  display: block !important;
  margin: 0 !important;
}

.treatments-directory .treatment-card:hover .treatment-card-media img {
  transform: scale(1.04);
}

/* Card Body */
.treatments-directory .treatment-card-body {
  padding: 22px 24px 16px !important;
  display: flex;
  flex-direction: column;
  flex-grow: 1;
}

.treatments-directory .treatment-card-body h3 {
  font-family: var(--sans);
  font-size: 1.25rem;
  font-weight: 700;
  line-height: 1.25;
  color: #111827;
  margin: 0 0 10px;
}

.treatments-directory .treatment-summary {
  font-size: 0.82rem;
  line-height: 1.5;
  color: #6b7280;
  margin: 0 0 16px;
  min-height: 2.8em;
}

/* Bullet list with orange circle & chevron › */
.treatments-directory .treatment-list {
  display: flex;
  flex-direction: column;
  gap: 9px;
  margin: 0 0 14px;
}

.treatments-directory .treatment-list span {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 0.83rem;
  line-height: 1.35;
  color: #1f2937;
  font-weight: 500;
  background: transparent;
  padding: 0;
  border: none;
  border-radius: 0;
}

.treatments-directory .treatment-list span:before {
  content: "›";
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 17px;
  width: 17px;
  height: 17px;
  border-radius: 50%;
  background: #f08b00;
  color: #ffffff;
  font-size: 14px;
  font-weight: 900;
  line-height: 1;
  padding-bottom: 2px;
}

/* Initially hide items after 4th item unless expanded */
.treatments-directory .treatment-card:not(.expanded) .treatment-list span:nth-child(n+5) {
  display: none;
}

/* Expand Button ("View all X treatments") */
.treatments-directory .expand-btn {
  border: 0;
  background: transparent;
  color: #b58a2b;
  font-weight: 700;
  font-size: 0.82rem;
  padding: 4px 0;
  cursor: pointer;
  align-self: flex-start;
  transition: color 0.2s ease;
  margin-top: auto;
}

.treatments-directory .expand-btn:hover {
  color: #8c691b;
  text-decoration: underline;
}

/* Card Footer ("Ask about these treatments →") */
.treatments-directory .treatment-card-footer {
  padding: 15px 24px;
  border-top: 1px solid #f3f4f6;
  background: #ffffff;
  margin-top: auto;
}

.treatments-directory .treatment-card-footer a {
  display: flex;
  justify-content: space-between;
  align-items: center;
  color: #111827;
  font-size: 0.84rem;
  font-weight: 700;
  transition: color 0.2s ease;
  text-decoration: none;
}

.treatments-directory .treatment-card-footer a:hover {
  color: #f08b00;
}

.treatments-directory .treatment-card-footer .footer-arrow {
  color: #f08b00;
  font-size: 1.15rem;
  font-weight: 700;
  transition: transform 0.2s ease;
}

.treatments-directory .treatment-card:hover .footer-arrow {
  transform: translateX(4px);
}

.treatments-directory .treatment-card[hidden],
.treatments-directory .treatment-list span[hidden] {
  display: none !important;
}

/* ==========================================================================
   Responsive Breakpoints
   ========================================================================== */

/* ── 1080px: Tablet Landscape ── */
@media (max-width: 1080px) {
  .treatments-directory .treatment-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 24px;
  }
}

/* ── 680px: Tablet Portrait / Large Phones ── */
@media (max-width: 680px) {
  body[data-page="treatments"] .hero-aesthetics {
    padding: 2rem 0 3.5rem;
  }

  body[data-page="treatments"] .hero-aesthetics h1 {
    font-size: clamp(2.1rem, 9vw, 3.2rem);
  }

  body[data-page="treatments"] .hero-lead {
    font-size: 0.95rem;
  }

  .treatments-directory .treatment-grid {
    grid-template-columns: minmax(0, 1fr);
    max-width: 520px;
    margin-inline: auto;
    gap: 20px;
  }

  .treatments-directory .treatment-card-body {
    padding: 20px 20px 16px;
  }

  .treatments-directory .treatment-card-footer {
    padding: 14px 20px;
  }
}

/* ── 480px: Mobile Phones ── */
@media (max-width: 480px) {
  body[data-page="treatments"] .hero-actions {
    flex-direction: column;
    align-items: stretch;
    gap: 12px;
  }

  body[data-page="treatments"] .hero-actions .btn {
    width: 100%;
    text-align: center;
    justify-content: center;
  }

  body[data-page="treatments"] .hero-aesthetics h1 {
    font-size: clamp(1.95rem, 8.5vw, 2.6rem);
  }

  .treatments-directory .directory-controls {
    padding: 16px;
  }

  .treatments-directory .treatment-card {
    border-radius: 14px;
    padding: 0 !important;
  }

  .treatments-directory .treatment-card-media {
    aspect-ratio: 1 / 1 !important;
    height: auto !important;
    border-top-left-radius: 13px;
    border-top-right-radius: 13px;
  }

  .treatments-directory .treatment-card-body {
    padding: 18px 18px 14px !important;
  }

  .treatments-directory .treatment-card-body h3 {
    font-size: 1.2rem;
  }

  .treatments-directory .treatment-card-footer {
    padding: 13px 18px;
  }
}

/* ── 340px: Mini Mobile (Galaxy Fold etc.) ── */
@media (max-width: 340px) {
  .treatments-directory .directory-search {
    flex-direction: column;
  }

  .treatments-directory .directory-search button {
    width: 100%;
  }

  .treatments-directory .treatment-card-body h3 {
    font-size: 1.1rem;
  }
}
