.second-section{
    background: linear-gradient(to bottom, #999999, #FFFFFF);
    display: flex;
    align-items: center;
    justify-content: center;
}

.second-section .container {
    position: relative;
    margin: 20px;
    border-radius: 30px;
    background-color: white; 
    width: calc(100vw - 64px); 
    height: calc(100vh - 109px);
    display: flex;
    padding: 50px 0;
    box-shadow: 0px 20px 76px 0px rgba(0, 0, 0, 0.2);
}

.second-section .container::after {
    content: '';
    position: absolute;
    width: 20px;
    height: 20px;
    border-bottom: 3px solid black;
    border-right: 3px solid black;
    border-radius: 0 0 40px 0;
    bottom: 5px;   
    right: 5px;    
    box-sizing: border-box;
    pointer-events: none; 
}


.second-section .details-container {
    width: 35%;
    height: 100%;
    border-top-left-radius: 20px;
    border-bottom-left-radius: 20px;
    padding: 0 0 0 100px;
}

.second-section .gallery-container {
    position: relative; /* Needed for pseudo-element */
    width: 60%;
    height: 100%;
    border-top-right-radius: 20px;
    border-bottom-right-radius: 20px;
    overflow: hidden;
}

.second-section .gallery-container::before {
    content: "";
    position: absolute;
    top: 0;
    right: 0;
    bottom: 0;
    width: 5%; /* covers about 5-7% of the container */
    /* Rounded only on the left side */
    border-top-left-radius: 200%;
    border-bottom-left-radius: 200%;
    border-top-right-radius: 0;
    border-bottom-right-radius: 0;

    /* Fade from right to left */
    background: linear-gradient(
        to left,
        rgba(255, 255, 255, 0.3) 0%,   /* visible on the far right */
        rgba(255, 255, 255, 0.15) 5%, /* softer fade */
        rgba(255, 255, 255, 0) 100%    /* fully clear to the left */
    );

    /* Glassy blur effect */
    backdrop-filter: blur(50px) saturate(150%) brightness(1.1);
    -webkit-backdrop-filter: blur(50px) saturate(150%) brightness(1.1);

    pointer-events: none;
    z-index: 1000;
    -webkit-mask-image: linear-gradient(to left, rgba(0,0,0,1), rgba(0, 0, 0, 0.073));
    -webkit-mask-repeat: no-repeat;
    -webkit-mask-size: 100% 100%;
    mask-image: linear-gradient(to left, rgba(0,0,0,1), rgba(0, 0, 0, 0.238));
    mask-repeat: no-repeat;
    mask-size: 100% 100%;
}



.second-section .details-btn {
    width: 370px;
    background-color: rgba(118, 118, 128, 0.12);
    height: 30px;
    border-radius: 20px;
    display: flex;
    padding: 4px; 
    box-sizing: border-box;
}

.second-section .details-btn button {
    flex: 1;
    border: none;
    background: transparent;
    border-radius: 20px;
    cursor: pointer;
    transition: background-color 0.3s;

    font-size: 14px;
    font-weight: 590;
    font-style: semi-bold;
    line-height: 18px;
    letter-spacing: -0.08px;
}

.second-section .details-btn button.active {
    background-color: #fff;
}

.second-section .details-btn button:hover {
    background-color: rgba(255, 255, 255, 0.7);
}

.second-section .description{
    margin: 40px 10px 0 10px;
    gap: 100px;
    max-height: 530px; 
    overflow-x: hidden;
    overflow-y: auto;
    max-width: 370px;
    
}
.second-section .description h1{
    color: rgba(60, 60, 67, 0.6);
    font-weight: 590;
    font-style: semi-bold;
    font-size: 40px;
    line-height: 47px;
    letter-spacing: 0px;
}

.second-section .description p{
    color: rgba(60, 60, 67, 0.6);
    font-weight: 400;
    font-style: regular;
    font-size: 13px;
    line-height: 18px;
    letter-spacing: 0px;
}

.second-section .description{
    margin: 40px 10px 0 10px;
    gap: 100px;
    max-height: 530px; 
    overflow-x: hidden;
    overflow-y: auto;
}

.second-section .carousel {
    position: relative;
    width: 100%;
    height: 100%;
    display: flex;
}

.second-section .second-section-gallery {
    position: relative;
    width: 100%;
    height: 100%;
}

.second-section .card {
  position: absolute;
  top: 15%;
  left: 10%;
  transform-origin: top left;
  transition: transform 0.5s cubic-bezier(.2,.8,.2,1), opacity 0.5s ease;
  border-radius: 20px;
  overflow: visible;
  border: 10px solid rgba(255, 255, 255, 0.4);
  background: rgba(255, 255, 255, 0.12);
  box-shadow: 0 0 20px rgba(0,0,0,0.4), 
              0 0 15px rgba(255,255,255,0.3) inset;
}


.second-section .card-name {
    position: absolute;
    top: 0;
    left: 0;
    font-size: 15px;
    font-weight: bold;
    color: white;
    text-shadow: 1px 1px 4px rgba(0,0,0,0.8);
    padding: 10px 8px;
    border-radius: 10px;
    z-index: 2;
    display: flex;
    gap: 5px;
    flex-direction: column;
}
.second-section .card-topic-container {
    display: flex;
    
}

.second-section .dashed-box {
  width: 13px;
  height: 13px;
  border-radius: 4px;
  border: 2px dashed #FFFFFF;
  box-sizing: border-box;
  font-weight: 590;
  line-height: 13px;
  letter-spacing: 0px;
}

.second-section .vertical-divider {
  width: 1px;
  height: 13px;
  background-color: white;
  opacity: 1;
  margin: 0 5px;
  align-self: center;
}

.second-section .card-name-title {
    font-weight: 880;
    font-size: 13px;
    line-height: 13px;
    letter-spacing: 0px;
    text-transform: uppercase;
}

.second-section .card-description-container p {
    font-weight: 510;
    font-size: 12px;
    line-height: 16px;
    letter-spacing: 0px;
}

.second-section .card img {
    display: block;
    width: 300px;   
    height: 400px;  
    object-fit: cover;
    border-radius: 10px;
}
 
.second-section .gallery-header a {
  text-decoration: none;
  z-index: 99999;
}
.second-section .gallery-header {
  position: absolute;
  top: 5%;     
  left: 0;     
  transform: translateX(0); 
  user-select: none;
  pointer-events: none;
  white-space: nowrap;
  transition: left 0.3s ease, transform 0.3s ease;
  z-index: 1000;
  color: rgba(60, 60, 67, 0.6);
  font-weight: 400;
  font-style: regular;
  font-size: 15px;
  line-height: 22px;
  letter-spacing: -0.43px;
}

.second-section .gallery-header i {
  display: inline-block; 
}

.second-section .controls {
  position: absolute;
  top: 85%; 
  display: flex;
  gap: 5px;
  left: 10%;
  transition: left 0.3s ease;
  background-color: rgba(60, 60, 67, 0.08);
  border-radius: 100px;
  padding: 3px 10px;
  display: flex;
  align-items: center;
}
.second-section .controls-btn {
    color: #fff;
    cursor: pointer;
    background: none;
    border: none;
}
.second-section .controls-btn i {
    color: #000000;
    font-size: 25px;
    font-weight: 590;
    font-style: semi-bold;
    line-height: 22px;
    letter-spacing: -0.43px;
    vertical-align: middle;
}

.controls-divider {
  width: 1px;
  height: 20px;
  background-color: rgba(60, 60, 67, 0.3);
  margin: 0 6px;
}

.second-section .highlight {
    background-color: rgba(204, 204, 204, 0.67); 
    box-shadow: 
        0 0 30px rgba(0, 0, 0, 0.33),  
        inset 0 0 20px rgba(255, 255, 255, 0.03);  
    border-color: rgba(255, 255, 255, 0.3);
    z-index: 999;
    opacity: 1;
}
.second-section .card.highlight::after {
    content: '';
    position: absolute;
    top: -50px;
    right: -40px;
    width: 20%;
    height: calc(100% + 80px);
    background: rgba(60,60,67,0.22);
    filter: blur(24px);
    pointer-events: none;
    z-index: 1;
    border-radius: 40px;
    opacity: 1;
    transition: opacity 0.3s;
}

.second-section .card.fourth-blur::after {
    content: '';
    position: absolute;
    top: -50px;
    right: -40px;
    width: 80%;
    height: calc(100% + 80px);
    background: radial-gradient(
        circle at center,
        rgba(30, 30, 35, 0.3) 0%,
        rgba(20, 20, 30, 0.4) 100%
    );
    filter: blur(64px);
    pointer-events: none;
    z-index: 1;
    border-radius: 100% / 60%;
    opacity: 1;
    transition: opacity 0.3s;
}




@media (max-width: 900px) {
  .second-section .container {
    flex-direction: column;
    height: auto; 
    padding: 20px 0;
  }

  .second-section .details-container,
  .second-section .gallery-container {
    width: 100%;
    height: auto;
    padding: 20px;
    border-radius: 20px; 
  }

  .second-section .details-container {
    order: 2; 
    padding-left: 20px !important;
  }

  .second-section .gallery-container {
    order: 1; 
    padding-bottom: 30px;
  }

  .second-section .details-btn {
    width: 100%;
    max-width: 400px;
    margin: 0 auto 20px auto;
  }

  .second-section .description {
    margin: 0 10px;
    font-size: 0.9rem;
    max-width: 100%;  
    width: 100%;      
  }

  .second-section .carousel {
    height: 350px; 
  }

  .second-section .card img {
    width: 200px;
    height: 270px;
  }

  .second-section .card-name {
    font-size: 13px;
    padding: 2px 6px;
  }

  .second-section .controls {
    left: 50% !important;
    top: 100% !important;
    transform: translateX(-50%);
    
  }

  .second-section .gallery-header {
    font-size: 11px;
    top: 2%;
  }

  .second-section .card {
    left: 35%;
}
}
@media (min-width: 481px) and (max-width: 721px){
    .second-section .card {
        left: 30%;
    }
}


@media (max-width: 480px) {
  .second-section .card img {
    width: 150px;
    height: 200px;
  }

  .second-section .description {
    font-size: 0.85rem;
    margin: 0 5px;
  }

  .second-section .details-btn button {
    font-size: 0.85rem;
  }
  .second-section .card {
        left: 20%;
    }
}


@media (min-width: 280px) and (max-width: 400px){
    .second-section .card {
        left: 5%;
    }

    .second-section .controls {
        left: 50% !important;
        top: 100% !important;
        transform: translateX(-50%);
    
    }
    .second-section .carousel {
        height: 250px;
    }
}
