#c-ph,
#c-ind,
#c-bang,
#c-nepal,
#c-indo {
  opacity: 0;
  visibility: hidden;
  transition: 0.3s;
}

svg:has(#d-ph:hover) #c-ph {
  opacity: 1;
  visibility: visible;
}

svg:has(#d-ind:hover) #c-ind {
  opacity: 1;
  visibility: visible;
}

svg:has(#d-indo:hover) #c-indo {
  opacity: 1;
  visibility: visible;
}

svg:has(#d-bang:hover) #c-bang {
  opacity: 1;
  visibility: visible;
}

svg:has(#d-nepal:hover) #c-nepal {
  opacity: 1;
  visibility: visible;
}

#d-ph,
#d-ind,
#d-indo,
#d-bang,
#d-nepal{
  cursor:pointer;
}

#d-ph,
#d-indo,
#d-bang,
#d-nepal,
#d-ind{
  cursor: pointer;
  animation: dotBeep 1.5s infinite ease-in-out;
}

@keyframes dotBeep {
  0%{
    filter: drop-shadow(0 0 2px #B94422)
            drop-shadow(0 0 4px #B94422);
  }
  50%{
    filter: drop-shadow(0 0 15px #B94422)
            drop-shadow(0 0 30px #B94422)
            drop-shadow(0 0 50px #B94422);
  }
  100%{
    filter: drop-shadow(0 0 2px #B94422)
            drop-shadow(0 0 4px #B94422);
  }
}

/* study box css start */

.study-section {
  background: linear-gradient(to bottom, #eaeaf0 0%, #eaeaf0 35%, #ffffff 35%, #ffffff 100%);
  padding: 80px 20px 40px 20px;
  text-align: center;
}

.study-title {
  font-size: 2.5rem;
  font-weight: 300;
  color: #222;
  margin-bottom: 70px;
}

/* --- Core Structure --- */
.cards-wrapper {
  max-width: 100%;
  margin: 0 auto;
  position: relative; /* Essential to hold the absolute sliding window */
}

.base-layer {
  display: flex;
  width: 100%;
}

.info-box {
    flex: 1 1 33.3333%; 
  padding: 70px 70px 40px; 
  display: flex;
  align-items: center;
  justify-content: center;
  box-sizing: border-box;
}

.box-content {
  font-size: 1.05rem;
  line-height: 1.6;
  font-weight: 400;
}

/* Base text styling */
.base-layer .info-box {
  color: #333333;
  border-bottom: 1px solid #3a3a4a;
}

/* --- THE SLIDING MASK LOGIC --- */
.slider-window {
  position: absolute;
  bottom: 0; 
  left: 0;
  width: 33.3333%;
  height: calc(100% + 15px); /* Makes it pop up higher than base layer */
  overflow: hidden; /* THIS hides the white text until the tab slides over it */
  z-index: 10;
  animation: slideWindowDesktop 18s infinite cubic-bezier(0.4, 0, 0.2, 1);
}

.slider-bg {
  position: absolute;
  bottom: 0; left: 0; right: 0; top:0;
  background-color: #1b193f;
  border: 25px solid #ffffff;
  border-bottom: none;
  border-radius: 45px 45px 0 0;
  z-index: -1; /* Puts background behind the white text */
}

.slider-text-track {
  display: flex;
  width: 300%; 
  position: absolute;
  bottom: 0; left: 0;
  height: calc(100% - 15px); /* Adjust for the pop-up height */
  animation: slideTrackDesktop 18s infinite cubic-bezier(0.4, 0, 0.2, 1);
}

.slider-text-track .info-box {
  color: #ffffff; /* White text */
  border-bottom: transparent;
}

/* --- Flawlessly Synced Animations --- */

@keyframes slideWindowDesktop {
  0%, 28% { transform: translateX(0%); }          /* Tab on Box 1 */
  33.33%, 61.33% { transform: translateX(100%); } /* Tab on Box 2 */
  66.66%, 94.66% { transform: translateX(200%); } /* Tab on Box 3 */
  100% { transform: translateX(0%); }
}

@keyframes slideTrackDesktop {
  0%, 28% { transform: translateX(0%); }
  33.33%, 61.33% { transform: translateX(-33.3333%); } /* Text moves left to stay still */
  66.66%, 94.66% { transform: translateX(-66.6666%); } 
  100% { transform: translateX(0%); }
}

/* --- Mobile Responsiveness --- */
@media (max-width: 768px) {
  .study-section { 
    background: #eaedf4; 
    padding: 50px 15px;
  }
  /* CRITICAL FIX: Lock the height so percentages match perfectly */
  .cards-wrapper {
    height: 750px; 
  }
  
  .base-layer { 
    flex-direction: column; 
    height: 100%;
  }
  
  /* Force exact equal vertical heights */
  .info-box { 
    flex: 1 1 33.3333%; 
    height: 33.3333%;
    padding: 20px;
  }
  
  .base-layer .info-box { 
    border-bottom: none; 
  }

  
  .slider-window {
    width: 100%;
    height: 33.3333%; 
    top: 0; bottom: auto;
    animation: slideWindowMobile 18s infinite cubic-bezier(0.4, 0, 0.2, 1);
  }
  
  .slider-bg {
    border-bottom: 25px solid #ffffff; 
    border-radius: 30px; 
  }
  
  .slider-text-track {
    flex-direction: column;
    width: 100%;
    height: 300%;    
    top: 0; bottom: auto;
    animation: slideTrackMobile 18s infinite cubic-bezier(0.4, 0, 0.2, 1);
  }

  /* Moves vertically on mobile instead of horizontally */
  @keyframes slideWindowMobile {
    0%, 28% { transform: translateY(0%); }
    33.33%, 61.33% { transform: translateY(100%); }
    66.66%, 94.66% { transform: translateY(200%); }
    100% { transform: translateY(0%); }
  }
  
  @keyframes slideTrackMobile {
    0%, 28% { transform: translateY(0%); }
    33.33%, 61.33% { transform: translateY(-33.3333%); }
    66.66%, 94.66% { transform: translateY(-66.6666%); }
    100% { transform: translateY(0%); }
  }
}

@media (max-width: 1024px) and (min-width: 768px){
.info-box{
  padding: 40px;
}
.slider-bg{
  border-radius: 30px;
  border-bottom: 25px solid #fff;
}
}

@media (max-width: 767px){
.info-box{
  padding: 40px;
}
.slider-bg{
  border-radius: 30px;
  border-bottom: 25px solid #fff;
}
}
/* study box css end */