/* ===================================
   STORIES CAROUSEL COMPONENT STYLES
   =================================== */

/* Carousel Section */
.stories-carousel-section {
    padding: 60px 0;
    position: relative;
    overflow: hidden; /* IMPORTANT: Prevents background from extending beyond container */
}


/* Carousel Heading */
.carousel-heading {
    font-size: 1.4rem;
    font-weight: 700;
    color: #1e3a5f;
    text-align: center;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 50px;
    line-height: 1.3;
}

/* Carousel Wrapper */
.carousel-wrapper {
    position: relative;
    display: flex;
    align-items: center;
    gap: 30px;
    margin-bottom: 50px;
    overflow: hidden; /* FIXED: Contains background within wrapper */
}

/* Carousel Arrows */
.carousel-arrow {
    flex-shrink: 0;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10;
}

.carousel-arrow:hover {
    transform: scale(1.1);
}

.carousel-arrow:disabled {
    opacity: 0.3;
    cursor: not-allowed;
}

/* Carousel Track Container */
.carousel-track-container {
    overflow: hidden;
    flex: 1;
}

/* Carousel Track */
.carousel-track {
    display: flex;
    gap: 30px;
   transition: transform 0.45s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Carousel Card */
.carousel-card {
    flex: 0 0 calc(33.333% - 20px);
   
    
    /* MOBILE TEXT FIX: Prevent blurry text rendering */
    -webkit-transform: translateZ(0);
    transform: translateZ(0);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    -webkit-backface-visibility: hidden;
    backface-visibility: hidden;
}

/* Flip Card Container */
.flip-card {
    perspective: 1000px;
  height: 330px;
    max-width: 290px;
}

.flip-card-inner {
    position: relative;
    width: 100%;
    height: 100%;
    transition: transform 0.6s;
    transform-style: preserve-3d;
}


/* Flip on hover (desktop) */
@media (hover: hover) {
    .flip-card:hover .flip-card-inner {
        transform: rotateY(180deg);
    }
}

/* Flip on click (mobile) - handled by JavaScript */
.flip-card.flipped .flip-card-inner {
    transform: rotateY(180deg);
}

/* Front and Back Faces */
.flip-card-front,
.flip-card-back {
    position: absolute;
    width: 100%;
    height: 100%;
    backface-visibility: hidden;
    border-radius: 20px;
    background: rgba(17, 161, 203, 1);
    box-shadow: 0 8px 25px rgba(23, 162, 184, 0.3);
       display: flex;
    flex-direction: column;
    align-items: center;
     justify-content: center;
    color: white;
    
    /* MOBILE TEXT FIX: Improve text rendering */
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    -webkit-backface-visibility: hidden;
    -webkit-transform: translateZ(0);
    transform: translateZ(0);
}


.carousel-card.is-middle .flip-card-front,
.carousel-card.is-middle .flip-card-back,
.carousel-card.is-bottom .flip-card-front,
.carousel-card.is-bottom  .flip-card-back {
    background: rgba(16, 166, 163, 1);
}

.flip-card-back {
    transform: rotateY(180deg);
    justify-content: flex-start;
    padding-top: 60px; /* clears the icon */
}

/* Card Icon */
.card-icon {
    position: absolute;
    top: 20px;
    left: -5px;
    z-index: 5;
}

/* Card Image */
.card-image {
    width: 55%;
    aspect-ratio: 1 / 1;
    border-radius: 50%;
    overflow: hidden;
    margin-top: 30px;
    margin-bottom: 20px;
    flex-shrink: 0;
}


.card-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}


/* Card Name */
.card-name {
    font-size: 1.2rem;
    font-weight: 700;
    color: white;
    margin-bottom: 20px;
    text-align: center;
    margin-top: 0 !important;
    
    /* MOBILE TEXT FIX: Crisp text rendering */
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    text-rendering: optimizeLegibility;
    -webkit-backface-visibility: hidden;
    backface-visibility: hidden;
}

/* Card Quote (Back) */
.card-quote {
    font-size: 0.95rem;
    line-height: 1.4;
    color: white;
    text-align: center;
    margin-bottom: 25px;
    flex: 1;
    display: block;
    text-align: center;
    padding: 0px 20px;
}

/* Card Button */
.card-btn {
    background: linear-gradient(135deg, #e75480 0%, #d4426f 100%);
    color: white;
    text-decoration: none;
    border: none;
    padding: 10px 15px;
    font-size: 0.8rem;
    font-weight: 700;
    letter-spacing: 1px;
    border-radius: 50px;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(231, 84, 128, 0.3);
    display: inline-block;
    margin-bottom: 25px;
    
    /* MOBILE TEXT FIX: Crisp text rendering */
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    text-rendering: optimizeLegibility;
    -webkit-transform: translateZ(0);
    transform: translateZ(0);
}

.card-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(231, 84, 128, 0.4);
}

/* Carousel Quotes */
.carousel-quotes {
    display: flex;
    justify-content: space-between;
    gap: 40px;
    margin-top: 40px;
}

.quote-left,
.quote-right {
    flex: 1;
    font-size: 1rem;
    font-style: italic;
    color: #17a2b8;
    line-height: 1.6;
    text-align: center;
}


/* Video Container */
.video-container {
    position: relative;
    padding-bottom: 56.25%; /* 16:9 aspect ratio */
    height: 0;
    overflow: hidden;
}

.video-container iframe {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
}
/* Video Section Wrapper - Teal Background */
.video-section-wrapper {
   margin-bottom: 10px;
    padding: 0 0;
    width: 100%;


}
/* Video Section */
.video-section {
    background: white;
    border-radius: 20px;
    padding: 50px;

     background: linear-gradient(52.71deg, #10A6A3 0%, #11A1CB 100%);
    border-radius: 25px;
        padding-top:15px;
}

/* Section Title */
.video-section-title {
    font-size: 1.4rem;
    font-weight: 700;
    color: #ffffff;
    text-align: center;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 40px;
    line-height: 1.3;
}

/* Video and Chapters Container */
.video-chapters-container {
    display: flex;
    gap: 30px;
    margin-bottom: 0px;
    background-color:#E7F5F3;
    padding:7px;
    margin-top:35px;
}

/* Video Player Wrapper */
.video-player-wrapper {
    flex: 0 0 65%;
        background-color:#E7F5F3;
}

.video-player {
    position: relative;
    padding-bottom: 56.25%; /* 16:9 aspect ratio */
    height: 0;
    overflow: hidden;

}

.video-player iframe {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
}

/* Chapters Sidebar */
.chapters-sidebar {
    flex: 0 0 32%;
    border-radius: 10px;
    max-height: 600px;
    overflow-y: auto;
}

/* Custom Scrollbar */
.chapters-sidebar::-webkit-scrollbar {
    width: 8px;
}

.chapters-sidebar::-webkit-scrollbar-track {
    background: #e9ecef;
    border-radius: 4px;
}

.chapters-sidebar::-webkit-scrollbar-thumb {
    background: #17a2b8;
    border-radius: 4px;
}

.chapters-sidebar::-webkit-scrollbar-thumb:hover {
    background: #138496;
}

/* Chapters Section */
.chapters-section {
    margin-bottom: 0px;
    margin-top: 15px;
}

.chapters-section:last-child {
    margin-bottom: 0;
}

/* Chapters Heading */
.chapters-heading {
  font-size: .75rem;
    font-weight: 700;
    color: #1e3a5f;
        margin-bottom: 0 !important;
        margin-top:-3px !important

}

/* Chapters List */
.chapters-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

/* Chapter Item */
.chapter-item {
    display: flex;
    align-items: anchor-center;
    padding: 3px 0px;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
    margin-top:2px;
	border-top-left-radius: 0px;
    border-bottom-left-radius: 0px;

}

.chapter-item li::before {
background: #11A1CB;
border-radius: 0px 50px 50px 0px;
}

.chapter-item:hover {
    background: #e3f2fd;
    border-color: #17a2b8;
}

.chapter-item.active {
  background: #b9e3f2;
;

   
}

.chapter-item.active .chapter-text {
    color: #0C2C55;
    font-weight: 600;
}

.chapter-item.active .chapter-bullet {
    background: none;
}

/* Chapter Bullet */
.chapter-bullet {
    flex-shrink: 0;
       width: 25px;
    height: 15px;
    background: #11A1CB;
    border-radius: 0px 50px 50px 0px;
    margin-right: 5px;
    transition: all 0.3s ease;
    opacity: 0.2;
}


/* Chapter Text */
.chapter-text {
    font-size: 0.6rem;
    color: #0C2C55;
    line-height: 1.5;
    transition: all 0.3s ease;
}

/* Video Description */
.video-description {
    margin-bottom: 30px;
     font-size: 1rem;
    color: #ffffff;

}

.video-description p {
    margin-bottom: 20px;
        font-size: 1rem;
    color: #ffffff;
}

.video-description em {
    font-style: italic;
}

.video-intro {
    font-weight: 400;
    margin-bottom: 15px !important;
}

/* Speakers List */
.speakers-list {
    list-style: none;
    padding-left: 0;
    margin-bottom: 25px;
}

.speakers-list li {
    padding-left: 30px;
    margin-bottom: 15px;
    position: relative;
    line-height: 1.7;
}

.speakers-list li::before {
    content: "•";
    color: #ffffff;
    font-size: 1rem;
    position: absolute;
    left: 10px;
  
}

.speakers-list strong {
    font-weight: 700;
}

/* Sponsor Text */
.sponsor-text {
    
    color: #6c757d;
    margin-bottom: 0 !important;
}

/* Behind the Mystery Logo */
.btm-logo {
    text-align: center;
    margin-top: 30px;
}

.btm-logo img {
    max-width: 300px;
    height: auto;
}
.btm-container {
  display: flex;
  align-items: center;      /* vertical alignment */
}

.btm-text,
.btm-logo {
  flex: 0 0 50%;            /* hard 50/50 split */
}
.btm-text {
  text-align: left;
}

.btm-logo {
  display: flex;
  justify-content: flex-end; /* push image to the right */
}

.btm-logo img {
  max-width: 100%;
  height: auto;
}
.care-title{
text-align: center;
    font-size: 1.35rem;
    font-weight: 700;
    color: #0C2C55;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 50px;
    line-height: 1.3;
}
.carousel-arrow svg {
  
    height: 155px;


}
@media (max-width: 768px) {
  .btm-container {
    flex-direction: column-reverse;
    text-align: center;
  }

  .btm-text,
  .btm-logo {
    flex: 0 0 100%;
  }

  .btm-logo {
    justify-content: center;
      margin-top:20px;
    margin-bottom: 20px;
  }
  .btm-logo img {
    max-width:320px !important;
     height: auto;
  
  }
  /* Section Title */
.video-section-title {
    font-size: 1.4rem;
letter-spacing: normal;
}
}

/* Responsive Design */
@media (max-width: 1024px) {
    .video-section {
        padding: 40px 10px;
        background: linear-gradient(52.71deg, #11A1CB 0%, #10A6A3 100%);
    }
    
    .video-section-title {
        font-size: 1.4rem;
            padding-left: 10px;
    padding-right: 10px;
    }
    
    .video-chapters-container {
        flex-direction: column;
    }
    
    .video-player-wrapper,
    .chapters-sidebar {
        flex: 1 1 100%;
    }
    
 
    .chapter-text {
    font-size: 0.7rem;
    line-height: 1.8;

}
.chapters-heading {
    font-size: .9rem;

}
.video-description p,.speakers-list li{
    font-weight: 300;
}
}


/* Responsive Design */
@media (max-width: 1024px) {
    .carousel-card {
        flex: 0 0 calc(50% - 15px);
    }
    
    .carousel-heading {
        font-size: 1.5rem;
    }
    
    /* FIXED: Ensure background stays contained on tablet/mobile */
    .carousel-wrapper {
        overflow: hidden;
    }
    
    .carousel-background-slide {
        background-position-x: -197px;
        background-position-y: -1px;
    }
}

@media (max-width: 1024px) {
    .carousel-card {
        
        
        /* MOBILE TEXT FIX: Remove transforms that cause blur */
        -webkit-transform: translateZ(0) !important;
        transform: translateZ(0) !important;
    }
    
    /* Remove stagger transforms on mobile to prevent blur */
    .carousel-card.is-top,
    .carousel-card.is-middle,
    .carousel-card.is-bottom {
        transform: translateY(0) translateZ(0) !important;
    }
    
    /* Optimize flip card rendering on mobile */
    .flip-card-inner {
        -webkit-backface-visibility: hidden;
        backface-visibility: hidden;
        -webkit-perspective: 1000px;
        perspective: 1000px;
    }
    
    /* Force crisp text on mobile */
    .card-name,
    .card-btn {
        -webkit-transform: translateZ(0);
        transform: translateZ(0);
        will-change: auto;
    }
    
    .carousel-heading {
        font-size: 1.3rem;
        margin-bottom: 30px;
    }
    
    .carousel-arrow {
        width: 40px;
        height: 40px;
    }
    
    .carousel-arrow svg {
        height: 75px;
    }
    
   
    
    .carousel-quotes {
        flex-direction: column;
        gap: 20px;
    }
    
    .quote-left,
    .quote-right {
        font-size: 0.9rem;
    }
    .carousel-dynamic-quotes {
        display: none;
    }
}


@media (min-width: 1025px) {

  .stories-carousel-section {
    padding-top: 60px;
    padding-bottom: 60px; 
    /* FIXED: Changed from 'visible' to 'hidden' to contain background */
    overflow: hidden;
  }

  .carousel-heading {
    margin-bottom: 160px !important;;
  }

  .carousel-wrapper {
    /* FIXED: Keep overflow hidden to contain background */
    overflow: hidden;
  }

  .carousel-track-container {
    overflow-x: hidden;
    overflow-y: visible;
}


 .carousel-track {
    align-items: flex-start;
    padding-bottom: 320px; /* equals your max downward translate */
}



  .carousel-dynamic-quotes {
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: 1;
}

.carousel-dynamic-quotes p {
  max-width: 235px;
  font-size: 0.95rem;
  font-style: italic;
  font-weight: 800;
  line-height: 1.6;
  color: #11A1CB;
  transition: opacity 0.3s ease;
}

.quote-top-left {
  position: absolute;
  top: -40px;
  left: 105px;
  text-align: left;
}

.quote-bottom-right {
  position: absolute;
  bottom: 77px;
  right: 118px;
  text-align: left;
   max-width: 338px !important;
}
.carousel-card {
    transition: transform 0.5s ease;
  }



  /* optional micro-polish */
  .carousel-card.is-left { transition-delay: 0s; }
  .carousel-card.is-center { transition-delay: 0.05s; }
  .carousel-card.is-right { transition-delay: 0.1s; }

  /* =========================
   SLIDE 2 QUOTE OVERRIDES
   ========================= */

.carousel-dynamic-quotes.slide-1 .quote-bottom-right {
  max-width: 216px !important;
  left: 118px;
  right: auto;
}

.carousel-dynamic-quotes.slide-1 .quote-top-left {
  top: -27px;
  max-width: 289px;
  right: 380px;
  left: auto;
}

}
.carousel-card {
  transition: transform 0.5s ease;
}

.carousel-card.is-top {
  transform: translateY(0);
  z-index: 3;
}

.carousel-card.is-middle {
  transform: translateY(120px);
  z-index: 2;
}

.carousel-card.is-bottom {
  transform: translateY(260px);
  z-index: 1;
}

/* CTA Section - Teal Background */
.cta-section .container {
    padding: 0;
}

/* CTA Content */
.cta-content {
    background: linear-gradient(293.4deg, #11A1CB 0%, #10A6A3 100%);
    border-radius: 20px;
    padding: 40px 0 50px;
    text-align: center;
    margin: 60px auto;
}

/* CTA Icon */
.cta-icon {
    margin-bottom: 25px;
}

.cta-icon img {
    width: 110px;
    height: auto;
    display: inline-block;
}

/* CTA Title */
.cta-title {
    font-size: 1.2rem;
    font-weight: 700;
    color: white;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 20px;
    line-height: 1.3;
}

/* CTA Text */
.cta-text {
    font-size: .85rem;
    color: white;
    margin-bottom: 30px;
    line-height: 1.6;
}
@media (max-width: 700px) {
.carousel-card {
        flex: 0 0 100%;
        min-width: 100%;
}


    .carousel-card {
        flex: 0 0 100%;
        display: flex;
        justify-content: center;
    }

    .flip-card {
        width: 100%;
        max-width: 350px; /* optional constraint */
    }
}
@media (max-width: 767px) {

    .carousel-dynamic-quotes {
        position: static !important;
        transform: none !important;
        margin-top: 30px;
    }

    .quote-top-left,
    .quote-bottom-right {
        position: static !important;
        top: auto !important;
        left: auto !important;
        right: auto !important;
        bottom: auto !important;
        transform: none !important;
        text-align: center;
        margin-bottom: 20px;
    }

}
/* Responsive */
@media (max-width: 768px) {
    .cta-section {

        margin: 40px 0;
    }
    
    .cta-icon img {
        width: 60px;
    }
    
    .cta-title {
        font-size: 1.4rem;
    }
    
    .cta-text {
        font-size: 1rem;
    }
}

@media (max-width: 1024px) {

    .carousel-card {
        display: flex;
        flex-direction: column;
        
    }

}

/* Share Content */
.share-content {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 110px;
    max-width:900px;
    margin: 0 auto;
}

/* Share Title */
.share-title {
    font-size: 1.2rem;
    font-weight: 700;
    color: #0C2C55;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin: 0;
    flex: 1;
    line-height: 1.2;
}

/* Share Icons */
.share-icons {
    display: flex;
    gap: 20px;
    flex-shrink: 0;
}

/* Share Icon */
.share-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 50px;
    height: 50px;
    transition: transform 0.3s ease, opacity 0.3s ease;
}

.share-icon:hover {
    transform: translateY(-3px);
    opacity: 0.8;
}

.share-icon img {
    width: 35px;
    height: auto;
    display: block;
}

/* Responsive */
@media (max-width: 768px) {
    .share-content {
        flex-direction: column;
        text-align: center;
    }
    
    .share-title {
        font-size: 1.3rem;
    }
    
    .share-icons {
        justify-content: center;
    }
    
    .share-icon {
        width: 45px;
        height: 45px;
    }
}

.card-mobile-quote {
    display: none;
}

.card-mobile-quote {
    display: none;
}

@media (max-width: 1024px) {

    .card-mobile-quote {
        display: block;
        margin-top: auto; /* THIS pushes it to bottom */
        width: 100%;
        text-align: center;
        padding: 20px 15px;
    }

    .card-mobile-quote p {
        font-size: 1rem;
        font-style: italic;
        font-weight: 600;
        line-height: 1.6;
        color: #11A1CB;
        margin: 0;
    }

}
 /* Ensure content appears above background */
.container {
    position: relative;
    z-index: 1;
}
.carousel-wrapper {
    position: relative;
    overflow: hidden;
}

.carousel-background-track {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: flex;
    z-index: 0;
    transition: transform 0.45s cubic-bezier(0.4,0,0.2,1);
}

.carousel-background-slide {
    min-width: 100%;
    height: 100%;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
}

/* Ensure carousel content is above backgrounds */
.carousel-track-container,
.carousel-arrow {
    position: relative;
    z-index: 1;
}
    @media (max-width: 1024px) {
.cta-section .container {
    padding-left: 20px !important;
    padding-right: 20px !important;
}
.quote-box{
            padding: 0px 0px !important;
}
.quote-author {

    padding-right: 0;
}
.quote-text {

    padding-left: 0px;
    padding-right: 0px;
}
   .care-title{
margin-bottom:0 !important;
    }
.voicecta.cta-content{
padding-left:20px;
padding-right:20px;
}
.share-content{
    gap:20px !important;
}
.stories-carousel-section{
    padding-top:0 !important;
    padding-bottom:0 !important;
}

.carousel-background-slide {
background-position-x: -197px;
    background-position-y: -1px;
}
.carousel-background-slide{
background-position-x: 1px !important;
        background-position-y: -25px !important;
    }
}




    .stories-carousel-section {
    position: relative;
    overflow: hidden;
}


@media (min-width: 768px) {
    .quote-section {
        padding-left: 35px;
        padding-right: 35px;
    }
}
/* When showing 1 or 2 cards */
@media (max-width: 1199px) {

    .carousel-track {
        justify-content: flex-start; /* KEEP THIS */
    }

  
}
@media (max-width: 435px) {
.flip-card {
 
    max-width: 290px;
}
}