/* =============================================
   aMUSEinPHONICS — Custom Styles
   Bootstrap 5 build
   ============================================= */

:root {
  --brand-green: #009900;
  --brand-orange: #ff8c00;
  --brand-red: #cc2f2f;
  --brand-gold: #fcc80f;
  --hiw-bg: rgba(16, 16, 16, 0.06);
  --testimonials-bg: #eef4f7;
  --testimonials-text: #313437;
  --testimonials-muted: #7d8285;

  /* Override Reflow's primary colour to match the site's teal */
  --ref-primary: #1d809f;
}

/* --- Base --- */
body {
  font-family: 'Source Sans 3', 'Source Sans Pro', sans-serif;
  color: #333;
}

/* --- Hero --- */
.hero {
  background: #fff;
  padding: 0.5rem;
  display: flex;
  justify-content: center;
  align-items: center;
}

.hero img {
  max-width: 100%;
  max-height: 80vh;
  width: auto;
  object-fit: contain;
  display: block;
  margin: 0 auto;
}

/* Home page — circular brand logo, constrained so it reads as identity not full-bleed */
.home-hero {
  padding: 2rem 1rem;
}

.home-hero img {
  max-height: 260px;
}

/* Home page product cards */
.product-cards {
  max-width: 860px;
  margin: 0 auto;
}

.product-card-img {
  width: 100%;
  object-fit: contain;
}

/* --- CTA Buttons Row --- */
.cta-section {
  padding: 1.5rem 1rem;
}

.btn-styled {
  color: var(--brand-orange);
  background-color: #f8f9fa;
  border: 1px solid #dee2e6;
  font-weight: 600;
  transition: background-color 0.2s, color 0.2s;
}

.btn-styled:hover,
.btn-styled:focus {
  color: #fff;
  background-color: var(--brand-orange);
  border-color: var(--brand-orange);
}

.btn-styled.btn-lg {
  font-size: 1.1rem;
}

.btn-orange {
  background-color: var(--brand-orange);
  color: #fff;
  border: none;
  font-weight: 600;
}

.btn-orange:hover,
.btn-orange:focus {
  background-color: #d97800;
  color: #fff;
}

/* --- Brand Colours --- */
.brand-colour {
  color: var(--brand-green);
}

.masterpiece-colour {
  color: var(--brand-gold);
}

/* --- Section Headings --- */
.section-heading {
  font-weight: 600;
  font-size: clamp(1.4rem, 3vw, 2rem);
  color: #000;
  text-align: center;
  margin-bottom: 1.25rem;
  padding: 0 1rem;
}

/* --- Constrained body text --- */
.text-body-constrained {
  width: min(70%, 680px);
  margin-left: auto;
  margin-right: auto;
}

@media (max-width: 767px) {
  .text-body-constrained {
    width: 92%;
  }
}

/* --- Acrostic big-letter --- */
.big-letter {
  margin-bottom: 0.25rem;
}

.big-letter::first-letter {
  font-size: 2em;
  color: var(--brand-green);
  font-weight: 700;
  line-height: 1;
}

/* --- PHONICS display text --- */
.phonics-large {
  font-size: 2em;
  font-weight: 700;
  color: var(--brand-green);
}

/* --- Override Bootstrap primary with site teal (#1d809f) --- */
.btn.btn-primary,
a.btn-primary {
  background-color: #1d809f;
  border-color: #1d809f;
  color: #fff;
}

.btn.btn-primary:hover,
.btn.btn-primary:focus,
.btn.btn-primary:active,
a.btn-primary:hover,
a.btn-primary:focus,
a.btn-primary:active {
  background-color: #176a84;
  border-color: #146077;
  color: #fff;
}

.btn.btn-primary:focus-visible,
a.btn-primary:focus-visible {
  box-shadow: 0 0 0 0.25rem rgba(29, 128, 159, 0.4);
}

/* --- Tools list --- */
.tools-list {
  list-style: none;
  padding: 0;
  margin: 0;
}

.tools-list li {
  padding: 0.15rem 0 0.15rem 1.6rem;
  position: relative;
}

.tools-list li::before {
  content: '';
  position: absolute;
  left: 0;
  top: 0.75em;
  width: 0.275rem;
  height: 0.275rem;
  background-color: var(--brand-orange);
  border-radius: 50%;
}

.tools-list-gold li::before {
  background-color: var(--brand-gold);
}

/* --- Feature Cards --- */
.feature-card-link {
  text-decoration: none;
  color: inherit;
}

/* --- HIW / "How it Works" sections --- */
.hiw-section {
  background-color: var(--hiw-bg);
}

/* --- Carousel --- */

/* Cap image height so caption stays visible */
#carousel-hiw .carousel-item img {
  max-height: 70vh;
  width: 100%;
  object-fit: contain;
  object-position: top;
}

/* Wrapper adds side padding so arrow buttons sit outside the image */
.carousel-outer {
  position: relative;
  padding: 0 2.75rem;
  max-width: 760px;
  margin: 0 auto;
}

@media (max-width: 575px) {
  .carousel-outer {
    padding: 0 2.25rem;
  }
}

/* Orange dot indicators — overlaid on image, a few px above bottom edge */
.carousel-indicators {
  position: absolute;
  bottom: 10px;
  left: 0;
  right: 0;
  margin: 0;
  justify-content: center;
  gap: 6px;
  z-index: 2;
}

.carousel-indicators [data-bs-target] {
  background-color: var(--brand-orange);
  width: 10px;
  height: 10px;
  border-radius: 50%;
  border: none;
  opacity: 0.45;
  flex-shrink: 0;
}

.carousel-indicators .active {
  opacity: 1;
}

/* Black arrow icons */
.carousel-control-prev-icon {
  background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' fill='%23333'%3e%3cpath d='M11.354 1.646a.5.5 0 0 1 0 .708L5.707 8l5.647 5.646a.5.5 0 0 1-.708.708l-6-6a.5.5 0 0 1 0-.708l6-6a.5.5 0 0 1 .708 0z'/%3e%3c/svg%3e");
  width: 1.5rem;
  height: 1.5rem;
}

.carousel-control-next-icon {
  background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' fill='%23333'%3e%3cpath d='M4.646 1.646a.5.5 0 0 1 .708 0l6 6a.5.5 0 0 1 0 .708l-6 6a.5.5 0 0 1-.708-.708L10.293 8 4.646 2.354a.5.5 0 0 1 0-.708z'/%3e%3c/svg%3e");
  width: 1.5rem;
  height: 1.5rem;
}

/* Position arrows in the side padding, aligned to the image vertically */
.carousel-control-prev,
.carousel-control-next {
  position: absolute;
  top: 0;
  bottom: 0;
  width: 2.75rem;
  opacity: 0.75;
  background: none;
  border: none;
  display: flex;
  align-items: center;
  justify-content: center;
}

.carousel-control-prev { left: 0; }
.carousel-control-next { right: 0; }

.carousel-control-prev:hover,
.carousel-control-next:hover {
  opacity: 1;
}

/* Caption area below the image — fixed height so indicators never jump */
.carousel-caption-area {
  padding: 0.75rem 0.5rem 0.25rem;
  text-align: center;
  height: 10rem;
  overflow-y: auto;
}

.carousel-caption-area p {
  margin-bottom: 0;
  font-size: 0.95rem;
  line-height: 1.55;
  color: #444;
}

/* --- Press / Testimonials --- */
.press-section {
  background-color: var(--testimonials-bg);
  color: var(--testimonials-text);
  padding: 2.5rem 0;
}

.press-quote {
  background-color: #fff;
  border: 1px solid #d0dce4;
  border-radius: 0.375rem;
  padding: 1.25rem;
  margin-bottom: 1rem;
  color: var(--testimonials-text);
}

.press-quote a {
  color: var(--testimonials-text);
  font-weight: 500;
  text-decoration: underline;
  text-decoration-color: var(--brand-orange);
}

.press-quote a:hover {
  color: var(--brand-orange);
}

.press-author-name {
  font-weight: 700;
  color: #0d6efd;
  margin-bottom: 0;
  font-size: 0.95rem;
}

.press-author-source {
  color: var(--testimonials-muted);
  margin-bottom: 0;
  font-size: 0.875rem;
}

.avatar {
  width: 50px;
  height: 50px;
  object-fit: cover;
  border-radius: 50%;
  flex-shrink: 0;
}

/* --- Order Section --- */
.order-section {
  background-color: var(--testimonials-bg);
  padding: 2rem 0;
}

/* Ensure Reflow checkout summary shows */
.ref-checkout-summary {
  display: initial !important;
}

/* --- Video Carousel --- */
.video-embed-wrapper {
  position: relative;
  padding-bottom: 56.25%;
  height: 0;
  overflow: hidden;
  width: 80%;
  margin: 0 auto;
}

.video-embed-wrapper iframe {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  border: 0;
}

@media (max-width: 575px) {
  .video-embed-wrapper {
    width: 100%;
  }
}

.video-title {
  text-align: center;
  font-size: 1.15rem;
  margin-bottom: 0.75rem;
}

/* Phonics-pattern bold in video titles — specific letters bold */
.video-title .target {
  font-weight: 700;
}

/* --- Contact Section --- */
.contact-section {
  padding: 3rem 0;
}

.contact-section .card {
  border: 1px solid #e0e0e0;
  box-shadow: 0 2px 12px rgba(0,0,0,0.07);
}

/* Form success/error state */
#contact-success {
  display: none;
}

/* --- Sub-page nav --- */
.subpage-nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.6rem 1.25rem;
  border-bottom: 1px solid #e0e0e0;
  background: #fff;
}

.back-link {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  color: var(--brand-green);
  font-weight: 600;
  text-decoration: none;
  font-size: 0.95rem;
}

.back-link:hover {
  color: var(--brand-orange);
}

.subpage-logo {
  height: 56px;
  width: auto;
  display: block;
}

/* --- Sub-page ordered list --- */
.subpage-list {
  padding-left: 1.5rem;
  margin-bottom: 1rem;
}

.subpage-list li {
  margin-bottom: 0.4rem;
  padding-left: 0.25rem;
}

.subpage-list li::marker {
  color: var(--brand-orange);
  font-weight: 700;
}

/* --- Scroll-to-top FAB --- */
.scroll-top-fab {
  position: fixed;
  bottom: calc(1.75rem + 3.5rem + 0.6rem); /* sits above the cart FAB */
  right: 1.75rem;
  z-index: 1060;
  width: 2.5rem;
  height: 2.5rem;
  border-radius: 50%;
  background-color: #fff;
  color: var(--brand-green);
  border: 2px solid var(--brand-green);
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.18);
  cursor: pointer;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s ease, transform 0.18s ease, background-color 0.18s ease, color 0.18s ease;
}

.scroll-top-fab.visible {
  opacity: 1;
  pointer-events: auto;
}

.scroll-top-fab:hover,
.scroll-top-fab:focus {
  background-color: var(--brand-green);
  color: #fff;
  transform: scale(1.1);
  outline: none;
}

.scroll-top-fab svg {
  width: 1.1rem;
  height: 1.1rem;
  flex-shrink: 0;
}

/* --- Cart FAB --- */
.cart-fab {
  position: fixed;
  bottom: 1.75rem;
  right: 1.75rem;
  z-index: 1060;
  width: 3.5rem;
  height: 3.5rem;
  border-radius: 50%;
  background-color: var(--brand-orange);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.3);
  text-decoration: none;
  transition: transform 0.18s ease, box-shadow 0.18s ease, opacity 0.22s ease;
}

.cart-fab:hover,
.cart-fab:focus {
  color: #fff;
  transform: scale(1.1);
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.35);
}

.cart-fab svg {
  width: 1.5rem;
  height: 1.5rem;
  flex-shrink: 0;
}


/* --- Footer --- */
.site-footer {
  background: #f8f9fa;
  border-top: 1px solid #e0e0e0;
  padding: 1.5rem 1rem;
  text-align: center;
  font-size: 0.875rem;
  color: #666;
}

/* --- Stub pages --- */
.stub-hero {
  min-height: 40vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 3rem 1rem;
}
