/* =========================================================
   Ayers Institute Canvas Catalog Storefront
   Lipscomb University / Ayers Institute for Learning & Innovation
   Updated for Canvas Catalog Modern Storefront data-customizationid selectors
   ========================================================= */

:root {
  --ayers-purple: #2d075f;
  --ayers-purple-dark: #25004f;
  --ayers-gold: #b59a42;
  --ayers-gold-bright: #f6a400;
  --ayers-cream: #fbf6e8;
  --ayers-soft: #f4f0e6;
  --ayers-text: #252525;
  --ayers-muted: #5a5362;
  --ayers-white: #ffffff;
  --ayers-border: rgba(45, 7, 95, 0.16);
  --ayers-max: 1240px;
}

/* =========================================================
   Page Wrappers
   ========================================================= */

#ayers-storefront-top,
#ayers-storefront-bottom {
  width: 100%;
  margin: 0;
  padding: 0;
  color: var(--ayers-text);
  background: var(--ayers-white);
  font-family: inherit;
  line-height: 1.4;
  box-sizing: border-box;
}

#ayers-storefront-top *,
#ayers-storefront-top *::before,
#ayers-storefront-top *::after,
#ayers-storefront-bottom *,
#ayers-storefront-bottom *::before,
#ayers-storefront-bottom *::after {
  box-sizing: border-box;
}

#ayers-storefront-top a,
#ayers-storefront-bottom a {
  color: inherit;
  text-decoration: none;
}

#ayers-storefront-top img,
#ayers-storefront-bottom img {
  display: block;
  max-width: 100%;
}

.ayers-container {
  width: min(var(--ayers-max), calc(100% - 60px));
  margin: 0 auto;
}

/* =========================================================
   Hero
   ========================================================= */

.ayers-hero {
  width: 100%;
  min-height: 430px;
  display: flex;
  align-items: center;
  justify-content: center;
  background-image:
    linear-gradient(
      90deg,
      rgba(15, 8, 28, 0.78) 0%,
      rgba(15, 8, 28, 0.48) 48%,
      rgba(15, 8, 28, 0.78) 100%
    ),
    url("https://images.unsplash.com/photo-1509062522246-3755977927d7?auto=format&fit=crop&w=1800&q=80");
  background-position: center center;
  background-size: cover;
  background-repeat: no-repeat;
  background-color: #21172f;
  border-top: 4px solid var(--ayers-gold);
  border-bottom: 4px solid var(--ayers-gold);
}

.ayers-hero-inner {
  width: min(1050px, calc(100% - 48px));
  margin: 0 auto;
  text-align: center;
  padding: 82px 0;
}

.ayers-hero h1 {
  margin: 0;
  color: #fff;
  font-size: clamp(2.35rem, 5vw, 4.8rem);
  line-height: 1.08;
  letter-spacing: -0.045em;
  font-weight: 900;
  text-wrap: balance;
  text-shadow: 0 3px 18px rgba(0, 0, 0, 0.42);
}

.ayers-hero p {
  max-width: 820px;
  margin: 24px auto 0;
  color: #fff;
  font-size: clamp(1.15rem, 1.8vw, 1.55rem);
  line-height: 1.35;
  font-family: Georgia, "Times New Roman", serif;
  text-shadow: 0 2px 12px rgba(0, 0, 0, 0.42);
}

/* =========================================================
   Intro
   ========================================================= */

.ayers-intro {
  text-align: center;
  padding: 90px 0 42px;
  background: #fff;
}

.ayers-intro-inner {
  width: min(1120px, calc(100% - 60px));
  margin: 0 auto;
}

.ayers-intro h2,
.ayers-section-title {
  color: var(--ayers-purple-dark);
  font-size: clamp(2.2rem, 4vw, 3.25rem);
  line-height: 1.1;
  margin: 0 0 24px;
  font-weight: 900;
  letter-spacing: -0.035em;
}

.ayers-intro p {
  max-width: 1080px;
  margin: 0 auto 20px;
  color: var(--ayers-text);
  font-size: clamp(1.12rem, 1.75vw, 1.45rem);
  line-height: 1.28;
  font-family: Georgia, "Times New Roman", serif;
}

/* =========================================================
   Native Canvas Catalog Course Listing Integration
   Uses Modern Storefront data-customizationid selectors when available
   ========================================================= */

body.ayers-storefront-active main,
body.ayers-storefront-active [role="main"],
body.ayers-storefront-active .main-content,
body.ayers-storefront-active #main,
body.ayers-storefront-active .content {
  display: block !important;
}

/* Preserve and style native Catalog area */
body.ayers-storefront-active main,
body.ayers-storefront-active [role="main"],
body.ayers-storefront-active .ayers-live-courses {
  width: min(var(--ayers-max), calc(100% - 60px));
  margin-left: auto;
  margin-right: auto;
}

/* Stable Modern Storefront selectors from 2026 release notes */
body.ayers-storefront-active [data-customizationid="search-form"] {
  margin-bottom: 28px;
}

body.ayers-storefront-active [data-customizationid="filter-button"] {
  border-color: var(--ayers-gold);
}

body.ayers-storefront-active [data-customizationid="product-card"] {
  margin-bottom: 24px;
}

body.ayers-storefront-active [data-customizationid="product-card-title"] {
  color: var(--ayers-purple-dark);
}

body.ayers-storefront-active [data-customizationid="product-card-image"] {
  overflow: hidden;
}

body.ayers-storefront-active [data-customizationid="product-card-catalog-logo"] {
  max-width: 120px;
}

/* Optional: uncomment if Catalog logo on cards feels redundant */
/*
body.ayers-storefront-active [data-customizationid="product-card-catalog-logo"] {
  display: none !important;
}
*/

/* Fallback support for older/legacy listing structures */
body.ayers-storefront-active main .course,
body.ayers-storefront-active main .catalog-listing,
body.ayers-storefront-active main .listing,
body.ayers-storefront-active [role="main"] .course,
body.ayers-storefront-active [role="main"] .catalog-listing,
body.ayers-storefront-active [role="main"] .listing {
  margin-bottom: 24px;
}

/* Heading inserted by JS before native listings */
.ayers-live-course-heading {
  width: min(var(--ayers-max), calc(100% - 60px));
  margin: 0 auto;
  padding: 18px 0 32px;
  text-align: center;
  border-top: 3px solid var(--ayers-gold);
}

.ayers-live-course-heading h2 {
  color: var(--ayers-purple-dark);
  font-size: clamp(2.2rem, 4vw, 3.25rem);
  line-height: 1.1;
  margin: 0 0 14px;
  font-weight: 900;
  letter-spacing: -0.035em;
}

.ayers-live-course-heading p {
  max-width: 780px;
  margin: 0 auto;
  color: var(--ayers-text);
  font-size: clamp(1.05rem, 1.4vw, 1.3rem);
  line-height: 1.35;
  font-family: Georgia, "Times New Roman", serif;
}

/* =========================================================
   Professional Learning / Feature Cards
   ========================================================= */

.ayers-feature-section {
  padding: 88px 0 106px;
  background: #fff;
}

.ayers-section-intro {
  text-align: center;
  max-width: 900px;
  margin: 0 auto 52px;
}

.ayers-section-intro h2 {
  color: var(--ayers-purple-dark);
  font-size: clamp(2.2rem, 4vw, 3.25rem);
  line-height: 1.1;
  margin: 0 0 16px;
  font-weight: 900;
  letter-spacing: -0.035em;
}

.ayers-section-intro p {
  margin: 0;
  color: var(--ayers-text);
  font-size: clamp(1.08rem, 1.5vw, 1.35rem);
  line-height: 1.35;
  font-family: Georgia, "Times New Roman", serif;
}

.ayers-feature-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: clamp(28px, 3.5vw, 52px);
}

.ayers-feature-card {
  background: #fff;
  border-top: 4px solid var(--ayers-gold);
}

.ayers-feature-card img {
  width: 100%;
  aspect-ratio: 1.45 / 1;
  object-fit: cover;
  margin-bottom: 24px;
}

.ayers-feature-card h3 {
  color: var(--ayers-purple-dark);
  margin: 0 0 14px;
  font-size: clamp(1.55rem, 2.2vw, 2.1rem);
  line-height: 1.08;
  letter-spacing: -0.035em;
  font-weight: 900;
}

.ayers-feature-card p {
  margin: 0;
  color: var(--ayers-text);
  font-size: clamp(1.02rem, 1.25vw, 1.18rem);
  line-height: 1.35;
  font-family: Georgia, "Times New Roman", serif;
}

/* =========================================================
   Bottom Ayers Website CTA
   ========================================================= */

.ayers-connect {
  background: var(--ayers-cream);
  padding: 92px 0;
}

.ayers-connect-card {
  width: min(1040px, calc(100% - 60px));
  margin: 0 auto;
  background:
    linear-gradient(
      90deg,
      rgba(37, 0, 79, 0.94) 0%,
      rgba(37, 0, 79, 0.84) 55%,
      rgba(37, 0, 79, 0.72) 100%
    ),
    url("https://images.unsplash.com/photo-1577896851231-70ef18881754?auto=format&fit=crop&w=1600&q=80");
  background-position: center center;
  background-size: cover;
  color: #fff;
  border-top: 5px solid var(--ayers-gold);
  padding: clamp(42px, 6vw, 72px);
  text-align: center;
}

.ayers-connect-card h2 {
  color: #fff;
  font-size: clamp(2rem, 4vw, 3rem);
  line-height: 1.12;
  margin: 0 0 20px;
  font-weight: 900;
  letter-spacing: -0.035em;
}

.ayers-connect-card p {
  max-width: 820px;
  margin: 0 auto 34px;
  color: #fff;
  font-size: clamp(1.15rem, 1.7vw, 1.5rem);
  line-height: 1.35;
  font-family: Georgia, "Times New Roman", serif;
}

.ayers-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 54px;
  padding: 0 30px;
  background: var(--ayers-gold);
  color: var(--ayers-purple-dark) !important;
  font-weight: 900;
  border: 2px solid var(--ayers-gold);
  transition:
    transform 160ms ease,
    background 160ms ease,
    color 160ms ease;
}

.ayers-button:hover,
.ayers-button:focus {
  transform: translateY(-2px);
  background: #fff;
  color: var(--ayers-purple-dark) !important;
}

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

@media screen and (max-width: 1000px) {
  .ayers-feature-grid {
    grid-template-columns: 1fr;
    gap: 54px;
  }

  .ayers-feature-card {
    max-width: 760px;
    margin: 0 auto;
  }
}

@media screen and (max-width: 760px) {
  .ayers-container,
  .ayers-intro-inner,
  .ayers-live-course-heading,
  body.ayers-storefront-active main,
  body.ayers-storefront-active [role="main"],
  body.ayers-storefront-active .ayers-live-courses {
    width: min(100% - 36px, var(--ayers-max));
  }

  .ayers-hero {
    min-height: 350px;
  }

  .ayers-hero-inner {
    padding: 64px 0;
  }

  .ayers-hero h1 {
    font-size: clamp(2rem, 10vw, 3.2rem);
  }

  .ayers-intro {
    padding: 64px 0 32px;
  }

  .ayers-live-course-heading {
    padding: 18px 0 28px;
  }

  .ayers-feature-section {
    padding: 68px 0 82px;
  }

  .ayers-connect {
    padding: 64px 0;
  }

  .ayers-connect-card {
    width: calc(100% - 36px);
    padding: 38px 26px;
  }

  .ayers-button {
    width: 100%;
  }
}