/* =========================================================
   Custom Site Footer — Anchor Corps grandchild (Muldoon Dental Arts)
   Two parts: (1) SHARE IN THE SMILES expanding-CTA hero, (2) "How can we
   help you?" light card/tab. Self-contained (footer + the expanding-CTA CSS
   moved out of components.css). Loaded by functions.php (handle 'ac-footer',
   dep 'anchor-child-style', filemtime ver, enqueue priority 21). Background
   image URL is root-relative so it is environment-agnostic.
   ========================================================= */

/* High stacking context so the expanding background can take over the whole
   screen — matches the original Divi footer section (z-index:9999999999). */
.ac-site-footer {
  position: relative;
  z-index: 9999999999;
}

/* ---------- Fixed mountain background (fades in when footer is in view) ---------- */
#expanding-cta-background {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background-image: linear-gradient(rgba(0, 0, 0, 0.4), rgba(0, 0, 0, 0.4)),
    url('/wp-content/uploads/2026/04/Mountain.avif');
  background-size: cover;
  background-position: center center;
  background-repeat: no-repeat;
  opacity: 0;
  pointer-events: none;
  z-index: -1;
  transition: opacity 0.7s cubic-bezier(0.25, 0.8, 0.25, 1);
}

#expanding-cta-background.active {
  opacity: 1;
}

.ac-footer-cta-section,
.ac-cta-wrap {
  position: relative;
}

/* ======================================================
   1. SHARE IN THE SMILES expanding-CTA hero
====================================================== */
#expanding-cta-container {
  position: relative;
  cursor: default;
  border-radius: 20px;
  padding: 80px 40px;
  display: flex;
  justify-content: center;
  align-items: center;
  text-align: center;
  height: 800px;
  width: 95%;
  max-width: 1600px;
  margin: 40px auto;
  background-color: var(--theme-main-light);
  transition: transform 0.7s cubic-bezier(0.25, 0.8, 0.25, 1),
    background-color 0.7s cubic-bezier(0.25, 0.8, 0.25, 1);
  z-index: 1;
}

#expanding-cta-container.active {
  transform: scale(1.05);
  background-color: transparent;
}

.expanding-cta-content {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  color: #ffffff;
}

.expanding-cta-content .logo {
  max-width: 300px;
  margin-bottom: 20px;
}

.expanding-cta-content h2.h2-h1 {
  color: #ffffff;
  font-weight: 600;
  margin-bottom: 1rem;
  line-height: 1.2;
  font-size: clamp(60px, 7vw, 120px) !important;
  letter-spacing: -0.05em !important;
}

.expanding-cta-content p {
  font-size: 1.7rem;
  line-height: 1.7em;
}

.expanding-cta-content .text-image-wrapper {
  display: inline-block;
}

.expanding-cta-content .inline-text-image {
  position: relative;
  left: 0;
}

.expanding-cta-content .btn-row-container {
  margin-top: 2em;
}

/* ======================================================
   2. "How can we help you?" light card / tab
   Flush to the bottom edge; top corners rounded only.
====================================================== */
.ac-footer-card {
  position: relative;
  z-index: 1;
  width: 95%;
  max-width: 1440px;
  margin: 0 auto;
  padding: 60px 70px 0;
  border-radius: 30px 30px 0 0;
  background-color: #f1f0ef;
}

.ac-footer-inner {
  color: var(--theme-dark);
}

/* ---------- Top row: heading (col 1) + button row (col 2, to the RIGHT) ----------
   Two-column grid so the button row is ALWAYS a second column to the right of the
   heading and can never wrap below it on desktop. */
.ac-footer-top {
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: start;
  gap: 24px 40px;
  margin-bottom: 50px;
}

.ac-footer-heading {
  margin: 0;
  min-width: 0;
  font-weight: 600;
  line-height: 1;
  letter-spacing: -0.03em;
  color: #6f6e6e;
  font-size: clamp(48px, 6vw, 100px);
}

.ac-footer-heading .accent-font {
  color: var(--theme-main);
}

/* Button row = second grid column, pinned right, content-width pills (override the
   site-wide `.btn-row .btn { flex:1 }` that otherwise stretches them full width). */
.ac-footer-top .btn-row-container {
  justify-self: end;
  width: auto !important;
  margin-top: 12px;
  justify-content: flex-end !important;
}

.ac-footer-top .btn-row {
  flex-wrap: nowrap;
}

.ac-footer-top .btn-row .btn {
  flex: 0 0 auto !important;
  width: -moz-fit-content !important;
  width: fit-content !important;
  white-space: nowrap !important;
}

/* ---------- Link columns: three equal, distinct columns ---------- */
.ac-footer-cols {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 30px 40px;
  align-items: start;
}

.ac-footer-cols .ac-blurb-container {
  min-width: 0;
}

.ac-footer-cols .blurb-link-header {
  margin: 0 0 1rem;
  color: #6f6e6e;
  font-size: 24px;
  font-weight: 600;
}

.ac-footer-cols .blurb-link {
  display: flex;
  align-items: center;
  font-size: 20px;
  color: var(--theme-main);
  margin-bottom: 0.6em;
  overflow-wrap: anywhere;
  transition: margin 0.3s ease;
}

.ac-footer-cols .blurb-link:hover {
  margin-left: 5px;
}

.ac-footer-cols .blurb-link i {
  width: 1.4em;
  margin-right: 0.5em;
  color: var(--theme-main);
  flex-shrink: 0;
  text-align: center;
}

/* ---------- Divider + copyright (sits flush at the bottom of the tab) ---------- */
.ac-footer-divider {
  border: 0;
  border-top: 1px solid rgba(0, 0, 0, 0.1);
  margin: 50px 0 0;
}

.ac-footer-copyright {
  text-align: center;
  padding: 24px 0;
}

.ac-footer-copyright p {
  margin: 0;
  font-size: 15px;
  color: var(--theme-dark);
}

.ac-footer-copyright a {
  color: var(--theme-dark);
  text-decoration: underline;
}

.ac-footer-copyright a:hover {
  color: var(--theme-main);
}

/* ---------- Responsive ---------- */
@media (max-width: 980px) {
  #expanding-cta-container {
    height: 600px;
  }
  .ac-footer-card {
    padding: 45px 40px 0;
  }
  .ac-footer-top {
    margin-bottom: 40px;
  }
}

@media (max-width: 767px) {
  #expanding-cta-container {
    height: 500px;
    padding: 40px 20px;
  }
  .ac-footer-card {
    padding: 35px 24px 0;
    border-radius: 20px 20px 0 0;
  }
  /* Stack heading then buttons only on small screens */
  .ac-footer-top {
    grid-template-columns: 1fr;
    gap: 24px;
  }
  .ac-footer-top .btn-row-container {
    justify-self: stretch;
    width: 100%;
    margin-top: 0;
  }
  .ac-footer-cols {
    grid-template-columns: 1fr;
    gap: 32px;
  }
}
