/* PhD Homepage Condense v1.3.2 — front page only (enqueued conditionally).
   Presentation overrides + a location tile grid placed immediately after
   the hero (see condense.js); the services carousel and the old stacked
   locations section are removed. Everything reverts on deactivation. */

/* ---------- 1. Text is visible immediately (no scroll-reveal hiding) ---------- */
.benefits-section__header,
.benefits-section__left,
.benefits-section__accordions .accordion__item,
.why-us-section__list .accordion__item,
.info-accordion__right .info-accordion__content-blocks p,
.tiles-section__tile {
  opacity: 1 !important;
  transform: none !important;
}
.tiles-section__header .divider,
.homepage-hero .divider {
  transform: scaleX(1) !important;
}
.homepage-hero .hero-title { visibility: visible !important; }
.homepage-hero .hero-title .hero-char {
  opacity: 1 !important;
  transform: none !important;
}

/* ---------- 2. Hero on phones: shorter, still image instead of the 12 MB video ---------- */
@media (max-width: 768px) {
  .homepage-hero {
    height: clamp(440px, 64vh, 580px) !important;
    padding-bottom: 54px !important;
  }
  .homepage-hero__bg video { display: none !important; }
  .homepage-hero__bg {
    background-image: url('https://phddental.com/wp-content/themes/boilerplate-update/assets/media/images/hero-desktop.jpg');
    background-size: cover;
    background-position: 55% top;
    background-repeat: no-repeat;
  }
  /* Ard (2026-10-18): keep the hero photo FAINTLY visible — soften the white wash (theme: 0.8). */
  .homepage-hero .homepage-hero__bg::before {
    background: rgba(255, 255, 255, 0.64);
  }
}

/* ---------- 3. Tiles on tablets & phones: description lives on the photo ---------- */
@media (max-width: 1024px) {
  .tiles-section__grid { min-height: 0; }
  .tiles-section__tile { min-height: 0 !important; height: auto !important; cursor: default; }
  .tiles-section__tile .tile-content { padding: 28px 22px !important; height: auto !important; }
  .tiles-section__tile .tile-hover-content {
    opacity: 1 !important;
    transform: none !important;
    max-height: none !important;
    overflow: visible !important;
    padding-right: 0;
  }
  /* Ard (2026-10-18): smaller paragraph text so the full description fits the tile. */
  .tiles-section__tile .tile-description {
    font-size: 14px !important;
    line-height: 1.55 !important;
  }
  .tiles-section__tile .tile-overlay {
    background: linear-gradient(to bottom, rgba(87, 128, 58, 0.84) 0%, rgba(114, 162, 80, 0.78) 100%) !important;
  }
  .tiles-section__tile:hover .tile-bg,
  .tiles-section__tile:focus .tile-bg {
    opacity: 1;
    transform: none;
  }
  .tiles-section__tile:hover .tile-overlay,
  .tiles-section__tile:focus .tile-overlay {
    background: linear-gradient(to bottom, rgba(87, 128, 58, 0.84) 0%, rgba(114, 162, 80, 0.78) 100%);
  }
}

/* ---------- 4. Location tiles (built by condense.js, inserted right after the hero) ----------
   The block now sits between the video hero and the theme's tiles section,
   on the page's plain white background; the vertical rhythm matches the
   theme's other top-level sections. */
.phd-loc-tiles {
  max-width: 1200px;
  margin: 0 auto;
  padding: 64px 20px;
  background: #fff;
}
.phd-loc-eyebrow {
  font-size: 14px;
  font-weight: 800;
  letter-spacing: 0.14em;
  color: #555;
  margin: 0 0 10px;
}
.phd-loc-title {
  font-size: 30px;
  line-height: 1.25;
  font-weight: 600;
  color: #333;
  margin: 0 0 26px;
}
.phd-loc-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
}
.phd-loc-tile {
  position: relative;
  display: block;
  border-radius: 16px;
  overflow: hidden;
  aspect-ratio: 0.88;
  box-shadow: 0 3px 10px rgba(0, 0, 0, 0.18);
  text-decoration: none;
}
.phd-loc-tile img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.phd-loc-tile::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(15, 25, 10, 0.72) 0%, rgba(15, 25, 10, 0.18) 48%, rgba(15, 25, 10, 0) 72%);
}
.phd-loc-name {
  position: absolute;
  left: 12px;
  right: 12px;
  bottom: 11px;
  z-index: 1;
  color: #fff;
  font-weight: 800;
  font-size: 15px;
  line-height: 1.25;
  text-shadow: 0 1px 4px rgba(0, 0, 0, 0.55);
}
.phd-loc-credits {
  margin: 14px 2px 0;
  font-size: 11px;
  line-height: 1.4;
  color: #999;
}
.phd-loc-credits a {
  color: #999;
  text-decoration: underline;
}
@media (min-width: 1024px) {
  .phd-loc-grid {
    grid-template-columns: repeat(4, 1fr);
    gap: 12px;
  }
  .phd-loc-name { font-size: 17px; }
}
