/**
 * Hero Section - Exact match to ccolor.com
 */

/* Top Text Banner - Separate from header */
.banner-top-text {
  background-color: #000000;
  color: #ffffff;
  text-align: center;
  padding: 20px 15px;
  font-size: 30px;
  font-weight: 400;
  line-height: 1.4;
  width: 100%;
  position: relative;
  z-index: 1;
}

@media (min-width: 768px) {
  .banner-top-text {
    font-size: 30px;
    padding: 25px 20px;
  }
}

@media (min-width: 1920px) {
  .banner-top-text {
    font-size: 30px;
    padding: 30px 20px;
  }
}

/* Main Hero Section */
.ccolor-banner-section {
  position: relative;
  width: 100%;
  background: url('../images/home-banner-bg.jpg');
  background-size: auto 100%;
  background-repeat: repeat-x;
  background-color: #000000;
  overflow: hidden;
}

/* Aspect Ratio Box */
.aspect-ratio-box {
  width: 100%;
  position: relative;
  aspect-ratio: 1.17 / 1;
  overflow: hidden;
}

@media (min-width: 1056px) {
  .aspect-ratio-box {
    height: 735px;
    aspect-ratio: auto;
  }
}

/* Slideshow Container */
.slideshow {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  list-style: none;
  margin: 0;
  padding: 0;
  overflow: hidden;
  z-index: 0;
}

.slideshow li {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  opacity: 0;
  z-index: 0;
  background-size: cover;
  background-position: 50% 50%;
  background-repeat: no-repeat;
  animation: imageAnimation 30s linear infinite;
}

@media (min-width: 992px) {
  .slideshow li {
    background-size: auto;
  }
}

.slideshow li:nth-child(1) {
  animation-delay: 0s;
}

.slideshow li:nth-child(2) {
  animation-delay: 6s;
}

.slideshow li:nth-child(3) {
  animation-delay: 12s;
}

.slideshow li:nth-child(4) {
  animation-delay: 18s;
}

.slideshow li:nth-child(5) {
  animation-delay: 24s;
}

@keyframes imageAnimation {
  0% {
    opacity: 0;
  }
  /* Fade in */
  8% {
    opacity: 1;
  }
  /* Hold visible */
  17% {
    opacity: 1;
  }
  /* Fade out */
  25% {
    opacity: 0;
  }
  /* Stay hidden until next cycle */
  100% {
    opacity: 0;
  }
}

/* Bottom Section with Text and Phone */
.banner-bottom-section {
  position: absolute;
  bottom: 0;
  display: flex;
  width: 100%;
  font-size: 17px;
  line-height: 27px;
  text-align: center;
  z-index: 1;
}

@media (max-width: 575px) { /* mobile-sm breakpoint; ADO 6954: the band grows to fit its words, the photo keeps its size */
  .home-hero .aspect-ratio-box {
    aspect-ratio: auto;
    padding-top: calc(100% / 1.17 - 150px); /* the photo strip above the band: today's box height less today's band */
  }
  .home-hero .slideshow {
    height: auto;
    aspect-ratio: 1.17 / 1; /* the photo keeps today's size and crop */
  }
  .home-hero .banner-bottom-section {
    position: relative; /* in the page flow: the band's words push the page down instead of being clipped */
    bottom: auto;
    height: auto; /* no min-height: the centre column's 150px below holds the floor (a one-line flex row is as tall as its tallest item) */
    background: linear-gradient(to bottom, transparent 150px, #000 150px); /* photo shows behind the phone as today; black below it */
  }
  .home-hero .banner-bottom-section__center {
    align-self: flex-start;
    height: 150px; /* the phone picture stays exactly where it is today */
    clip-path: inset(-100vh -100vw 0 -100vw); /* and its bottom 5 px stay hidden, as the box edge hides them today */
  }
  .home-hero.ccolor-banner-section {
    background-size: auto calc(100vw / 1.17); /* the fallback picture behind the slideshow keeps today's size */
  }
}

/* Text Block Styling */
.banner-bottom-section__text {
  width: 500px;
  max-width: 100%;
  padding: 25px 30px;
}

@media (max-width: 1199px) { /* desktop breakpoint */
  .banner-bottom-section__text {
    width: 415px;
  }
}

@media (max-width: 991px) { /* tablet breakpoint */
  .banner-bottom-section__text {
    width: 95%;
  }
}

.banner-bottom-section__text p {
  margin: 0;
  padding: 0;
}

/* Left Text Section */
.banner-bottom-section__left {
  flex: 1;
  background-color: #000;
  color: #fff;
  padding-bottom: 0;
  display: flex;
  justify-content: flex-end;
}

.banner-bottom-section__left .banner-bottom-section__text {
  padding-left: 15px;
}

.banner-bottom-section__left .banner-bottom-section__text span.titleDesktop {
  display: block;
}

.banner-bottom-section__left .banner-bottom-section__text span.titleMobile {
  display: none;
}

@media (max-width: 991px) { /* tablet breakpoint */
  .banner-bottom-section__left .banner-bottom-section__text span.titleDesktop {
    display: none;
  }

  .banner-bottom-section__left .banner-bottom-section__text span.titleMobile {
    font-size: 14px;
    display: block;
  }
}

@media (max-width: 575px) { /* mobile-sm breakpoint */
  .banner-bottom-section__left .banner-bottom-section__text span.titleMobile {
    font-size: 12px;
  }
}

/* Center Phone Image */
.banner-bottom-section__center {
  display: flex;
  width: 200px;
  position: relative;
  background-color: transparent;
}

@media (max-width: 991px) { /* tablet breakpoint */
  .banner-bottom-section__center {
    width: 180px;
  }
}

@media (max-width: 575px) { /* mobile-sm breakpoint */
  .banner-bottom-section__center {
    width: 130px;
  }
}

.banner-bottom-section__center img {
  width: 250px;
  position: absolute;
  bottom: -6px;
  left: -10px;
}

@media (max-width: 991px) { /* tablet breakpoint */
  .banner-bottom-section__center img {
    width: 190px;
    left: -5px;
    bottom: -8px;
  }
}

@media (max-width: 575px) { /* mobile-sm breakpoint */
  .banner-bottom-section__center img {
    width: 150px;
    bottom: -5px;
  }
}

/* Right Text Section */
.banner-bottom-section__right {
  flex: 1;
  background-color: #000;
  color: #fff;
  padding-bottom: 0;
  display: flex;
  justify-content: flex-start;
}

.banner-bottom-section__right .banner-bottom-section__text {
  padding-right: 15px;
}

.banner-bottom-section__right .banner-bottom-section__text span.titleDesktop {
  display: block;
}

.banner-bottom-section__right .banner-bottom-section__text span.titleMobile {
  display: none;
}

@media (max-width: 991px) { /* tablet breakpoint */
  .banner-bottom-section__right .banner-bottom-section__text span.titleDesktop {
    display: none;
  }

  .banner-bottom-section__right .banner-bottom-section__text span.titleMobile {
    font-size: 14px;
    display: block;
  }
}

@media (max-width: 575px) { /* mobile-sm breakpoint */
  .banner-bottom-section__right .banner-bottom-section__text span.titleMobile {
    font-size: 12px;
  }
}

/* Banner CTA Section */
.banner-cta {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 35px;
  background: #000;
  color: #fff;
  text-align: center;
  padding: 50px 20px 60px;
}

@media only screen and (max-width: 767px) { /* mobile breakpoint */
  .banner-cta {
    padding-top: 70px;
  }
}

.banner-cta h1 {
  text-transform: uppercase;
  border-top: 2px solid #fff;
  padding-top: 20px;
  color: #fff;
  font-weight: 400;
  margin: 0;
  font-size: 2em;
}

/* CTA Button Variants - DEPRECATED - Use .cta-btn from components.css */

/* DNA Title */
.dna-title {
  font-size: 2em;
  font-weight: 600;
  margin: 0;
}

/* Reduce spacing between CTA text lines in helix section */
.helix-wrapper .cta-block p.mt-xs {
  margin-top: 2.5px;
}

/* Universal hero background positioning */
/* Height (min-height) remains customizable in page-specific CSS files */
.ccolor-banner-section.hero-spectrum-synopsis,
.ccolor-banner-section.hero-founder,
.spectrum-hero,
.spectrum-1-hero,
.spectrum-2-hero,
.spectrum-3-hero,
.spectrum-4-hero,
.faq-hero,
.using-ccolor-hero,
.who-uses-hero,
.blog-hero,
.download-app-hero,
.contact-hero,
.ebooks-hero-section {
  background-position: center center !important;
  background-size: cover;
  background-repeat: no-repeat;
}

/* ADO 8243 (Ken's look item 27, RULING-co-1112-R18): the title in every dark title-box banner (FAQ, Methodology, Using C Color,
   Who Uses, C Color Story, Spectrum Synopsis, Contact) keeps the old pages' own 15px over its words at every width, so its capitals
   sit centred top to bottom in the box (old h1 padding-top 15 at 1440, 1100 and 390). sections.css's reset would zero base.css's 15px. */
.hero-title-box h1,
.semitransparent-overlay h1 {
  padding-top: 15px;
}

/* ADO 8257 (RULING-co-1113-S2, S2a and S2b, Ken's choice): on phones held upright (575px and below) each dark title box (FAQ,
   Methodology, Using C Color, Who Uses, C Color Story, Spectrum Synopsis) spans the screen less 16px a side, centred out of its
   .container, with 25px sides (top and bottom kept), and its title takes the shared phone size over each page's own; a title that
   would take 3 lines steps down below. 576px and wider are unchanged: the five boxes keep TEST's 25px 50px from here, C Color Story
   its own 25px all round, each page its own title sizes. Contact's box is not inside a .container, so nothing here reaches it. */
.container > .hero-title-box,
.container > .semitransparent-overlay {
  padding: 25px 50px;
}

@media (max-width: 575px) { /* mobile-sm breakpoint */
  .container:has(> .hero-title-box),
  .container:has(> .semitransparent-overlay) {
    overflow-x: visible;
  }

  .container > .hero-title-box,
  .container > .semitransparent-overlay {
    box-sizing: border-box;
    width: calc(100vw - 32px);
    margin-left: calc(50% - 50vw + 16px);
    margin-right: calc(50% - 50vw + 16px);
    padding-left: 25px;
    padding-right: 25px;
  }

  section > .container > .hero-title-box h1,
  section > .container > .semitransparent-overlay h1 {
    font-size: 32px;
  }
}

/* Title step-downs (RULING-co-1113-S2a, S2b): each size is 1px under the Chief Officer's largest two-line size on TEST at the width
   that opens its step (Using C Color 28px to 374, 29px at 375-389; Spectrum Synopsis 24px to 374, 25px at 375-389, 27px at 390-429;
   both fit the shared size at 430), so a wider screen in the same step only gains room. Not layout breakpoints: they follow the measured widths. */
@media (max-width: 429px) { /* title step-down (ADO 8257) */
  .hero-spectrum-synopsis .container > .semitransparent-overlay h1 {
    font-size: 27px;
  }
}

@media (max-width: 389px) { /* title step-down (ADO 8257) */
  .using-ccolor-hero .container > .hero-title-box h1 {
    font-size: 29px;
  }

  .hero-spectrum-synopsis .container > .semitransparent-overlay h1 {
    font-size: 25px;
  }
}

@media (max-width: 374px) { /* title step-down (ADO 8257) */
  .using-ccolor-hero .container > .hero-title-box h1 {
    font-size: 28px;
  }

  .hero-spectrum-synopsis .container > .semitransparent-overlay h1 {
    font-size: 24px;
  }
}
