body, html {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  font-family: 'Poppins', sans-serif;
}

/* Main scroll wrapper */
.scroll-container {
  display: flex;
  flex-direction: column;
  align-items: center;
  overflow-x: hidden;
}

/* Dotted background */
.dotted-section {
  width: 100%;
  background-image: url("assets/dot.svg");
  background-repeat: repeat;
  background-position: center top;
  background-size: auto;
  position: relative;
  z-index: 0;
  padding-bottom: 0px; /* dotted bg ends where white card begins */
}

/* White frame container with inner content */
.white-frame-container {
  position: relative;
  width: 100%;
  max-width: 1400px;
  margin: 0 auto;
  padding-top: 40px;
  padding-bottom: 50px;
  padding-inline: clamp(20px, 4vw, 60px);
  z-index: 2;
  box-sizing: border-box;
  font-size: clamp(12px, 1.2vw, 20px);
}

/* White frame SVG */
.white-frame {
  width: 100%;
  height: auto;
  display: block;
  max-width: 100%;
  padding-inline: clamp(12px, 3vw, 32px); /* NEW: simulates "visual breathing room" */
  box-sizing: border-box;
}

@media (max-width: 768px) {
  .white-frame {
    content: url("assets/whiteframe2.png");
    padding-inline: clamp(12px, 4vw, 24px); /* keep breathing room */
  }

  .white-frame-container {
    max-width: 100%;
    padding-inline: clamp(12px, 4vw, 24px);
  }
}


/* Positioned images */
.frame-message {
  position: absolute;
  top: 12em; /* was 35% */
  left: 5.6em;  /* was 7.2% */
  width: 1em;
  height: auto;
}

.pancake-icon {
  position: absolute;
  top: 4em; /* was 11.5% */
  right: 8.5em;  /* was 11.25% */
  width: 2.7em;
  height: auto;
}

.stack-logo {
  position: absolute;
  bottom: 4.75em; /* was 14% */
  left: 8em; /* was 11% */
  width: 22em;
  height: auto;
}

/* Scroll cue icon */
.scroll-cue-wrapper {
  position: relative;
  height: 100px;
  width: 100%;
  margin-top: -40px;
}

.scroll-cue {
  position: absolute;
  top: 55px;
  right: 145px;
  width: 230px;
  height: auto;
  z-index: 10;
}

/* White card that scrolls in */
.white-card-shell {
  width: 100%;
  background: white;
  border-top-left-radius: 100px;
  border-top-right-radius: 100px;
  box-shadow: 0 0 20px rgba(0, 0, 0, 0.05);
  overflow: hidden;
  position: relative;
  margin-top: 20px;
  z-index: 1; /* on top of dotted bg but under white-frame content */
}

/* Cards */
.card-link {
  transition: transform 0.25s ease, filter 0.25s ease;
  display: inline-block;
  position: absolute;
}

.card-link:hover {
  transform: translateY(-8px);
  border-radius: 50px;
}

.card-problem { top: 16%; left: 13%; }
.card-solution { top: 18%; left: 44%; }
.card-research { top: 38%; left: 26%; }
.card-design { top: 40%; left: 58%; }
.card-about { top: 61%; left: 49%; }

/* === Individual colored drop shadows === */
.card-problem:hover {
  filter: drop-shadow(0px 3px 12px rgba(223, 68, 161, 0.15)); /* pink */
}
.card-research:hover {
  filter: drop-shadow(0px 3px 12px rgba(55, 141, 94, 0.15)); /* blue */
}
.card-solution:hover {
  filter: drop-shadow(0px 3px 12px rgba(31, 149, 175, 0.15)); /* teal */
}
.card-design:hover {
  filter: drop-shadow(0px 3px 12px rgba(223, 208, 0, 0.15)); /* purple */
}
.card-about:hover {
  filter: drop-shadow(0px 3px 12px rgba(133, 63, 196, 0.15)); /* orange */
}


.card-svg {
  width: 310px;
  height: auto;
  display: block;
}


/* Cursor */
.cursor-wrapper {
  position: absolute;
  bottom: 20%;
  right: 12%;
  width: 155px;
  animation: cursor-click 1.8s ease-in-out infinite;
  pointer-events: none;
}

.cursor-icon {
  width: 100%;
  height: auto;
  transform-origin: bottom right;
  animation: cursor-rotate 1.8s ease-in-out infinite;
}

@keyframes cursor-rotate {
  0%, 100% { transform: rotate(0deg); }
  20%, 50% { transform: rotate(-10deg); }
  70% { transform: rotate(0deg); }
}

/* Footer is part of the white card */
.page-footer {
  background: #f8f8f8;
  text-align: center;
  padding: 30px 10px;
  font-size: 14px;
  color: #999;
  font-family: 'Poppins', sans-serif;
  margin-top: 45px;
  border-radius: 16px;
}




/* OPTIONAL */

/* PAGE TRANSITION ANIMATION */
body.page-transition {
  animation: slideFadeOut 0.15s ease forwards;
}

@keyframes slideFadeOut {
  from {
    opacity: 1;
    transform: translateY(0);
  }
  to {
    opacity: 0;
    transform: translateY(-10px);
  }
}



.card-svg {
  width: 18em; /* instead of 310px */
  height: auto;
}


.cursor-wrapper {
  width: 7.5em; /* scaled from 155px */
  height: auto;
}

.mobile-frame-message {
  display: none;
}
.mobile-frame-message img {
  display: block;
  width: clamp(14em, 30vw, 22em);
  height: auto;
  margin-left: 1em;
}


/* === Click Message (Desktop Default) === */
.click-message-desktop {
  position: absolute;
  top: 29%; /* Adjust to be near the process card */
  left: 73%;
  width: 6.5em;
  height: auto;
  display: block;
  z-index: 3;
}

.click-message-mobile {
  display: none; /* only shown in media query */
  position: absolute;
  top: 51%;
  left: 24%;
  width: 8em;
  height: auto;
  z-index: 3;
}




@media (max-width: 768px) {
  .mobile-frame-message {
    display: block;
    position: relative;
    top: 4vw;
    left: 5vw;
    height: auto;
    z-index: 3;
  }
  .card-problem { top: 12%; left: 15%; }
  .card-research { top: 34%; left: 20%; }
  .card-solution { top: 22.5%; left: 46%; }
  .card-design { top: 46%; left: 40%; }
  .card-about { top: 59%; left: 30%; }

  .card-svg {
    width: 20em; /* same as desktop for consistent scaling */
  }

  .cursor-wrapper {
    bottom: 16%;
    right: 18%;
    width: 95px;
  }
  .click-message-desktop {
    display: none;
  }

  .click-message-mobile {
    display: block;
    top: 51%;
    left: 25%;
    width: 7.5em;
  }
  .white-frame-container {
    padding-top: 37px;
  }
}

@media (max-width: 585px) {
  .card-svg {
    width: 16em; /* same as desktop for consistent scaling */
  }
  .cursor-wrapper {
    bottom: 16%;
    right: 18%;
    width: 70px;
  }
  .click-message-desktop {
    display: none;
  }

  .click-message-mobile {
    display: block;
  }
  .click-message-mobile {
    top: 51%;
    left: 24%;
    width: 6.2em;
  }
  .white-frame-container {
    padding-top: 35px;
  }
}

@media (max-width: 475px) {
  .card-svg {
    width: 14em; /* same as desktop for consistent scaling */
  }
  .card-problem { top: 12%; left: 15%; }
  .card-research { top: 34%; left: 20%; }
  .card-solution { top: 22.5%; left: 46%; }
  .card-design { top: 46%; left: 40%; }
  .card-about { top: 59%; left: 30%; }
  .cursor-wrapper {
    bottom: 16%;
    right: 18%;
    width: 65px;
  }
  .click-message-desktop {
    display: none;
  }

  .click-message-mobile {
    display: block;
    width: 5em;
    top: 52.5%;
    left: 26%;
  }
  .white-frame-container {
    padding-top: 32px;
  }
}

@media (max-width: 425px) {
  .card-svg {
    width: 12.5em; /* same as desktop for consistent scaling */
  }
  .card-problem { top: 12%; left: 15%; }
  .card-research { top: 34%; left: 20%; }
  .card-solution { top: 22.5%; left: 46%; }
  .card-design { top: 46%; left: 40%; }
  .card-about { top: 59%; left: 30%; }
  .cursor-wrapper {
    bottom: 16%;
    right: 17%;
    width: 58px;
  }

  .mobile-frame-message img {
    display: block;
    width: clamp(10em, 28vw, 14em); /* smaller min and max */
    height: auto;
    margin-top: 10px;
    margin-left: 0.5em; /* optional: reduce side margin too */
  }
  .click-message-desktop {
    display: none;
  }

  .click-message-mobile {
    display: block;
    width: 4em;
    top: 52.5%;
    left: 26%;
  }
  .white-frame-container {
    padding-top: 27px;
  }
}

.card-svg {
  image-rendering: -webkit-optimize-contrast;
  backface-visibility: hidden;
  transform: translateZ(0); /* forces GPU render */
}



.overview-section {
  display: flex;
  flex-direction: column;
  gap: 120px;
  padding: 100px clamp(30px, 6vw, 80px) 50px;
  max-width: 1400px;
  margin: 0 auto;
  box-sizing: border-box;
}

.overview-block {
  display: flex;
  flex-direction: column;
  gap: 45px;
  align-items: flex-start;
  text-align: left;
}

.overview-header img {
  display: block;
  margin-left: 0;
}

.overview-columns {
  display: flex;
  flex-direction: row;
  justify-content: space-between;
  gap: 100px;
  width: 1100px;
  margin: 0 auto; /* This centers it inside the block */
}


.overview-text {
  flex: 0.8;
  min-width: 280px;
  max-width: 400px;
}

.overview-text p {
  font-size: clamp(16px, 1.2vw, 22px);
  line-height: 1.7;
  color: #3B3C44;
  margin-bottom: 50px;
}

.overview-image {
  flex: 1.2;
  min-width: 340px;
  display: flex;
  justify-content: center;
}

.overview-img,
.overview-media iframe {
  width: 100%;
  max-width: 750px;
  border-radius: 18px;
  box-shadow: 0px 6px 24px rgba(0, 0, 0, 0.08);
}

.overview-media iframe.wide-video {
  max-width: 1100px;
  width: 100%;
  aspect-ratio: 16 / 9;
}

.overview-button {
  display: inline-block;
}

.btn-img {
  width: clamp(180px, 20vw, 260px);
  height: auto;
  display: block;
  cursor: pointer;
}

@media (max-width: 900px) {
  .overview-columns {
    flex-direction: column;
    text-align: center;
    align-items: center;
  }

  .overview-text, .overview-image {
    width: 100%;
  }

  .overview-text p {
    text-align: center;
  }

  .overview-block {
    align-items: center;
    text-align: center;
  }

  .overview-header img {
    margin: 0 auto;
  }
}

.overview-header {
  padding-inline: clamp(30px, 4.5vw, 80px); /* match overview-section */
}

.overview-header h2 {
  font-family: 'Poppins', sans-serif;
  font-size: clamp(32px, 2.5vw, 48px);
  font-weight: 600;
  color: #3B3C44;
  margin-bottom: 25px;
  text-align: left;
  line-height: 1.2;
}


.overview-header.full-header h2 {
  text-align: center;
}


/* === Custom fix for first stacked section === */
.full-width-textvideo {
  align-items: flex-start;
  text-align: left;
}

.full-width-textvideo .overview-text {
  max-width: 700px;
  text-align: left;
  flex: 1;
}

.full-width-textvideo .overview-text p {
  margin-left: 0;
}

.full-width-textvideo .overview-media {
  width: 100%;
  display: flex;
  justify-content: center;
}

.full-width-textvideo .overview-media iframe {
  max-width: 1100px;
  width: 100%;
  aspect-ratio: 16 / 9;
}

/* === Stacked layout fix === */
.overview-text-wide {
  max-width: 950px;
  margin: 0 auto 40px;
  text-align: left;
  font-size: 1.1rem;
  line-height: 1.6;
}

.overview-media-centered {
  display: flex;
  justify-content: center;
  margin-top: 60px;
}

.overview-media-centered iframe {
  max-width: 1100px;
  width: 100%;
  aspect-ratio: 16 / 9;
  border-radius: 18px;
  box-shadow: 0 12px 24px rgba(0, 0, 0, 0.1);
}

/* Add these styles to your popular.css file */

/* Full-width block styles for Section 1 */
.full-width-block {
  align-items: flex-start;
  text-align: left;
}

.full-width-block .overview-text-wide {
  max-width: 1100px;
  margin: 0 auto 0; /* Remove bottom margin to prevent double spacing */
  text-align: left;
  font-size: clamp(16px, 1.2vw, 22px);
  line-height: 1.7;
  color: #3B3C44;
}

.full-width-block .overview-text-wide p {
  margin-bottom: 0; /* Remove margin to let gap handle spacing */
  text-align: left;
}

.overview-media-centered {
  display: flex;
  justify-content: center;
  width: 100%;
}

.overview-media-centered iframe {
  max-width: 1100px;
  width: 100%;
  aspect-ratio: 16 / 9;
  border-radius: 18px;
  box-shadow: 0 12px 24px rgba(0, 0, 0, 0.1);
}

/* Ensure other sections maintain their current styling */
.overview-block:not(.full-width-block) {
  align-items: flex-start;
  text-align: left;
}

.overview-block:not(.full-width-block) .overview-text p {
  text-align: left;
}

/* Mobile responsive adjustments */
@media (max-width: 900px) {
  .full-width-block .overview-text-wide {
    text-align: left;
    max-width: 100%;
    padding: 0 20px;
  }
  
  .overview-media-centered iframe {
    max-width: 100%;
    margin: 0 20px;
  }
}

/* Add this to your popular.css file */

/* Reduce gap specifically for the full-width block (Section 1) */
.full-width-block {
  gap: 0px; /* Reduced from 45px */
}

/* Add this to your popular.css file */

/* Reduce gap specifically for the full-width block (Section 1) */
.full-width-block {
  gap: 25px; /* Reduced from 45px */
}

/* Make the overview section fully responsive */
@media (max-width: 1200px) {
  .overview-columns {
    width: 100%;
    max-width: 900px;
    gap: 60px;
  }
  
  .overview-section {
    padding: 80px clamp(20px, 5vw, 60px) 40px;
  }
}

@media (max-width: 950px) {
  .overview-section {
    gap: 80px;
    padding: 60px clamp(20px, 4vw, 40px) 30px;
  }
  
  /* Stack all sections consistently like Section 1 */
  .overview-columns {
    flex-direction: column;
    align-items: center;
    gap: 30px;
    width: 100%;
    max-width: 950px;
    margin: 0 auto;
  }

  /* Reorder elements: Image first, then text */
  .overview-columns .overview-image {
    order: 1;
    width: 100%;
    max-width: 750px;
  }

  .overview-columns .overview-text {
    order: 2;
    width: 100%;
    max-width: 950px;
    min-width: unset;
    text-align: left;
  }

  .overview-text p {
    text-align: left;
    margin-bottom: 40px;
  }

  /* Keep all content left-aligned but centered as a unit */
  .overview-block {
    align-items: center;
    text-align: left;
  }

  .overview-header {
    width: 100%;
    max-width: 950px;
  }

  .overview-header h2 {
    text-align: left;
  }
  
  .full-width-block {
    gap: 25px;
  }
  
  .overview-block:not(.full-width-block) {
    gap: 30px;
  }
}

@media (max-width: 480px) {
  .overview-section {
    gap: 60px;
    padding: 40px clamp(12px, 3vw, 20px) 20px;
  }
  
  .overview-block {
    gap: 25px;
  }
  
  .full-width-block {
    gap: 20px;
  }
  
  .overview-header h2 {
    margin-bottom: 15px;
  }
  
  .overview-text p {
    margin-bottom: 30px;
  }
  
  .btn-img {
    width: clamp(160px, 25vw, 220px);
  }
}

/* ADD THESE STYLES TO YOUR popular.css */

/* Replace button styles with CTA buttons */
.cta-button {
  display: inline-block;
  padding: 15px 30px;
  border-radius: 50px;
  text-decoration: none;
  font-weight: 500;
  font-size: 16px;
  transition: all 0.3s ease;
  border: 2px solid;
  color: white;
  font-family: 'Poppins', sans-serif;
}

.cta-button:hover {
  transform: translateY(-3px);
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.2);
}

/* Individual button colors (lighter versions) */
.cta-problem {
  background: #E85BAD; /* Lighter version of #C92D8B */
  border-color: #E85BAD;
}

.cta-problem:hover {
  background: #EB70B8;
}

.cta-research {
  background: #4A8B66; /* Lighter version of #227246 */
  border-color: #4A8B66;
}

.cta-research:hover {
  background: #5BA077;
}

.cta-solution {
  background: #3A9BB5; /* Lighter version of #107C94 */
  border-color: #3A9BB5;
}

.cta-solution:hover {
  background: #4FAAC4;
}

.cta-process {
  background: #D4713A; /* Lighter version of #BD5906 */
  border-color: #D4713A;
}

.cta-process:hover {
  background: #DE8554;
}

/* Video styling to match problem page but keep full width */
.overview-video {
  width: 100%;
  max-width: 1100px;
  border-radius: 18px;
  box-shadow: 0 12px 24px rgba(0, 0, 0, 0.1);
  aspect-ratio: 16 / 9;
}

.video-text-centered {
  max-width: 1100px;
  margin: 16px auto 0 auto;
  text-align: left;
}

.video-title {
  font-weight: 600;
  font-size: 18px;
  color: #1F1F1F;
  margin-bottom: 4px;
}

.video-description {
  font-size: 15px;
  color: #666;
  font-style: italic;
}

/* Fix alignment issues */
.overview-section {
  display: flex;
  flex-direction: column;
  gap: 120px;
  padding: 100px 0 50px;
  max-width: 1400px;
  margin: 0 auto;
  box-sizing: border-box;
}

.overview-block {
  display: flex;
  flex-direction: column;
  gap: 45px;
  align-items: center; /* Center the block itself */
  text-align: left;
  padding: 0 clamp(30px, 6vw, 80px); /* Add responsive padding */
}

.overview-header {
  width: 100%;
  max-width: 1100px;
  padding: 0; /* Remove extra padding */
}

.overview-header h2 {
  font-family: 'Poppins', sans-serif;
  font-size: clamp(32px, 2.5vw, 48px);
  font-weight: 600;
  color: #3B3C44;
  margin-bottom: 25px;
  text-align: left;
  line-height: 1.2;
}

.overview-columns {
  display: flex;
  flex-direction: row;
  justify-content: space-between;
  gap: 100px;
  width: 100%;
  max-width: 1100px;
}

/* Full-width block adjustments */
.full-width-block {
  gap: 25px;
}

.full-width-block .overview-header.full-header h2 {
  text-align: center;
}

.full-width-block .overview-text-wide {
  max-width: 1100px;
  width: 100%;
  text-align: left;
  font-size: clamp(16px, 1.2vw, 22px);
  line-height: 1.7;
  color: #3B3C44;
}

.overview-media-centered {
  display: flex;
  justify-content: center;
  width: 100%;
  max-width: 1100px;
}

/* Update responsive behavior */
@media (max-width: 1200px) {
  .overview-columns {
    max-width: 900px;
    gap: 60px;
  }
}

@media (max-width: 950px) {
  .overview-section {
    gap: 80px;
    padding: 60px clamp(20px, 4vw, 40px) 30px;
  }
  
  .overview-columns {
    flex-direction: column;
    align-items: center;
    gap: 30px;
    width: 100%;
    max-width: 100%;
  }

  /* Reorder elements: Image first, then text */
  .overview-columns .overview-image {
    order: 1;
    width: 100%;
    max-width: 750px;
  }

  .overview-columns .overview-text {
    order: 2;
    width: 100%;
    max-width: 100%;
    min-width: unset;
    text-align: left;
  }

  .overview-text p {
    text-align: left;
    margin-bottom: 40px;
  }

  .overview-header {
    width: 100%;
    max-width: 100%;
  }

  .overview-header h2 {
    text-align: left;
  }
  
  .full-width-block {
    gap: 25px;
  }
  
  .overview-block:not(.full-width-block) {
    gap: 30px;
  }

  /* Keep video and text aligned */
  .video-text-centered {
    max-width: 100%;
    text-align: left;
  }
  .white-card-shell {
    border-top-left-radius: 60px;
    border-top-right-radius: 60px;
  }
}

@media (max-width: 480px) {
  .overview-section {
    gap: 60px;
    padding: 40px clamp(12px, 3vw, 20px) 20px;
  }
  
  .overview-block {
    gap: 25px;
  }
  
  .full-width-block {
    gap: 20px;
  }
  
  .overview-header h2 {
    margin-bottom: 15px;
  }
  
  .overview-text p {
    margin-bottom: 30px;
  }
  
  .cta-button {
    width: 100%;
    text-align: center;
    padding: 12px 24px;
    font-size: 15px;
  }
}