/*
 * #НОКТИ card geometry and gold accent.
 * Keep this standalone and load it after the base and homepage stylesheets.
 * No change to the black text utilities introduced in PR #24.
 */
:root {
  --htn-card-radius: .75rem;
  --htn-card-accent: #E5D272;
  --htn-card-image-scale: 1.04;
  --htn-card-image-duration: .35s;
}

/* Shared chevron-right for button-like links and CTA labels.
 * ViewBox follows Bootstrap Icons; it inherits the label's currentColor.
 */
.htn-btn-chevron {
  display: inline-block;
  width: 1em;
  height: 1em;
  fill: currentColor;
  flex: 0 0 auto;
  margin-inline-start: .25em;
  vertical-align: -.125em;
  transition: transform .2s ease;
}

:is(a, button):is(:hover, :focus-visible) .htn-btn-chevron,
.htn-home-sections__card-link:is(:hover, :focus-visible) .htn-btn-chevron {
  transform: translateX(.15em);
}

@media (prefers-reduced-motion: reduce) {
  .htn-btn-chevron { transition: none; }
  :is(a, button):is(:hover, :focus-visible) .htn-btn-chevron,
  .htn-home-sections__card-link:is(:hover, :focus-visible) .htn-btn-chevron {
    transform: none;
  }
}

/* Existing Bootstrap and theme-specific card surfaces. */
.card,
.htn-card,
.htn-home-feature-card,
.htn-home-sections__card,
.htn-home-sections__why-item,
.htn-home-sections__price-list,
.htn-home-sections__contact-card,
.htn-home-sections__blog-card,
.htn-home-sections__updates-item,
.htn-home-sections__person,
.htn-home-sections__review,
.htn-news--list__card,
.htn-reviews .htn-reviews__bubble {
  border-radius: var(--htn-card-radius);
  transition: border-color .2s ease;
}

/* The two branded homepage layouts previously forced square card corners. */
.htn-home-sections__cards .htn-home-sections__card,
#home-why .htn-home-sections__why-item {
  border-radius: var(--htn-card-radius);
}

/* Course, service and feature cards clip photos to their corners.
 * Do not hide overflow on every generic .card: dropdowns and overlays may need it.
 */
.htn-home-feature-card,
.htn-home-sections__cards .htn-home-sections__card,
.htn-home-sections__blog-card,
.htn-news--list__card,
.htn-home-sections__person-photo,
.htn-card__media,
#home-gallery .egallery-menu-images figure {
  overflow: hidden;
}

/* Photo wrappers clip zoom without hiding dropdowns on generic .card. */
.htn-card__media {
  display: block;
  border-radius: var(--htn-card-radius) var(--htn-card-radius) 0 0;
}
.htn-card__media > img {
  display: block;
  width: 100%;
  object-fit: cover;
}

/* Students/team cards used a borderless presentation; give them a subtle
 * outline so the gold hover treatment has a visible border to change.
 */
#home-people .htn-home-sections__person {
  border: 1px solid var(--bs-border-color, #dee2e6);
  border-radius: var(--htn-card-radius);
}

.card:hover,
.card:focus-within,
.htn-card:hover,
.htn-card:focus-within,
.htn-home-feature-card:hover,
.htn-home-feature-card:focus-within,
.htn-home-sections__card:hover,
.htn-home-sections__card:focus-within,
.htn-home-sections__price-list:hover,
.htn-home-sections__price-list:focus-within,
.htn-home-sections__contact-card:hover,
.htn-home-sections__contact-card:focus-within,
.htn-home-sections__blog-card:hover,
.htn-home-sections__blog-card:focus-within,
.htn-home-sections__updates-item:hover,
.htn-home-sections__updates-item:focus-within,
.htn-reviews .htn-reviews__bubble:hover,
.htn-reviews .htn-reviews__item:focus-within .htn-reviews__bubble {
  border-color: var(--htn-card-accent);
}

/* Shared card-photo motion: only image media, not text, maps or page heroes.
 * Circular team portraits retain their own circular photo frame.
 */
.htn-home-feature-card__media > img,
.htn-home-sections__card-media img,
.htn-home-sections__person-photo img,
.htn-home-sections__blog-photo img,
.htn-news--list__image img,
.htn-card__media > img,
.htn-reviews .htn-reviews__avatar {
  transition: transform var(--htn-card-image-duration) ease;
  transform: scale(1);
  transform-origin: center;
}

.htn-home-feature-card:hover .htn-home-feature-card__media > img,
.htn-home-feature-card:focus-within .htn-home-feature-card__media > img,
.htn-home-sections__card:hover .htn-home-sections__card-media img,
.htn-home-sections__card:focus-within .htn-home-sections__card-media img,
#home-people .htn-home-sections__person:hover .htn-home-sections__person-photo img,
#home-people .htn-home-sections__person:focus-within .htn-home-sections__person-photo img,
.htn-home-sections__blog-card:hover .htn-home-sections__blog-photo img,
.htn-home-sections__blog-card:focus-within .htn-home-sections__blog-photo img,
.htn-news--list__item:hover .htn-news--list__image img,
.htn-news--list__item:focus-within .htn-news--list__image img,
.card:hover > .htn-card__media img,
.card:focus-within > .htn-card__media img,
.htn-card:hover .htn-card__media img,
.htn-card:focus-within .htn-card__media img,
.htn-reviews .htn-reviews__item:hover .htn-reviews__avatar,
.htn-reviews .htn-reviews__item:focus-within .htn-reviews__avatar {
  transform: scale(var(--htn-card-image-scale));
}

/* Homepage eGallery is a seamless photo mosaic, not rounded cards.
 * A square inner outline preserves the golden hover / focus affordance
 * without introducing a permanent border or any gap between images.
 */
#home-gallery .egallery-menu-images figure,
#home-gallery .egallery-menu-images figure > img {
  border-radius: 0;
}

#home-gallery .egallery-menu-images figure:hover,
#home-gallery .egallery-menu-images figure:focus-within {
  outline: 2px solid var(--htn-card-accent);
  outline-offset: -2px;
}

/* Match the more specific rules in home-sections.css. */
.htn-home-sections__cards .htn-home-sections__card:hover,
.htn-home-sections__cards .htn-home-sections__card:focus-within,
#home-why .htn-home-sections__why-item:hover,
#home-why .htn-home-sections__why-item:focus-within,
#home-people .htn-home-sections__person:hover,
#home-people .htn-home-sections__person:focus-within {
  border-color: var(--htn-card-accent);
}

/* The five localized "Text above the heading" preference fields:
 * hero_salon_eyebrow, hero_academy_eyebrow, why_eyebrow,
 * training_eyebrow and contact_eyebrow.
 * More specific than PR #24's global black .text-golden utility.
 */
.htn-home-hero .htn-home--intro__eyebrow,
.htn-home-sections .htn-home-sections__eyebrow {
  color: var(--htn-card-accent) !important;
}

@media (prefers-reduced-motion: reduce) {
  .card,
  .htn-card,
  .htn-home-feature-card,
  .htn-home-sections__card,
  .htn-home-sections__why-item,
  .htn-home-sections__price-list,
  .htn-home-sections__contact-card,
  .htn-home-sections__blog-card,
  .htn-home-sections__updates-item,
  .htn-home-sections__person,
  .htn-home-sections__review,
  .htn-news--list__card,
  .htn-reviews .htn-reviews__bubble,
  .htn-home-feature-card__media > img,
  .htn-home-sections__card-media img,
  .htn-home-sections__person-photo img,
  .htn-home-sections__blog-photo img,
  .htn-news--list__image img,
  .htn-card__media > img,
  .htn-reviews .htn-reviews__avatar {
    transition: none;
  }
  .htn-home-feature-card:hover .htn-home-feature-card__media > img,
  .htn-home-feature-card:focus-within .htn-home-feature-card__media > img,
  .htn-home-sections__card:hover .htn-home-sections__card-media img,
  .htn-home-sections__card:focus-within .htn-home-sections__card-media img,
  #home-people .htn-home-sections__person:hover .htn-home-sections__person-photo img,
  #home-people .htn-home-sections__person:focus-within .htn-home-sections__person-photo img,
  .htn-home-sections__blog-card:hover .htn-home-sections__blog-photo img,
  .htn-home-sections__blog-card:focus-within .htn-home-sections__blog-photo img,
  .htn-news--list__item:hover .htn-news--list__image img,
  .htn-news--list__item:focus-within .htn-news--list__image img,
  .card:hover > .htn-card__media img,
  .card:focus-within > .htn-card__media img,
  .htn-card:hover .htn-card__media img,
  .htn-card:focus-within .htn-card__media img,
  .htn-reviews .htn-reviews__item:hover .htn-reviews__avatar,
  .htn-reviews .htn-reviews__item:focus-within .htn-reviews__avatar {
    transform: none;
  }
}
