.container {
    display: flex;
    gap: 15px;
    /*height: 420px;*/
    margin-bottom: 0 !important;
}

.column-small, .column-main {
    border-radius: 20px;
    background-color: #FBFAF9;
    padding: 20px 25px 20px 20px;
    writing-mode: vertical-rl;
    text-orientation: mixed;
    transform: rotate(180deg); /* This rotates the text to read from top to bottom */
    color: var(--Secondary-Rich-Brown-RB-100, #7F6145);
    font-family: Lato;
    font-size: 14px;
    font-style: normal;
    font-weight: 700;
    line-height: 28px; /* 155.556% */
    letter-spacing: 0.54px;
    cursor: pointer; /* Indicate that the element is clickable */
    position: relative;
    width: 85px; /* Set fixed width for inactive state */
    border: 2px solid var(--Secondary-Rich-Brown-RB-100, #7F6145);
    transition: width 0.5s ease-in-out, padding 0.3s ease-in-out; /* Faster and smoother transitions */
}

.column-main.active, .column-main-expand {
    flex: 1 1 1136px;
    width: 100%; /* Expand to full width */
    background-color: #FBFAF9;
    border-radius: 30px;
    padding: 64px;
    writing-mode: horizontal-tb;
    transform: rotate(0deg);
    display: block; /* Restore original layout when active */
    text-align: left; /* Restore original text alignment */
    height: auto;
    box-shadow: 0px 4px 10px 6px rgba(0, 0, 0, 0.07);
    color: var(--Secondary-Rich-Brown-RB-100, #7F6145);
    font-family: Lato;
    font-size: 32px;
    font-style: normal;
    font-weight: 700;
    line-height: 42px; /* 131.25% */
    letter-spacing: 1.6px;
    border: none; /* Remove border when active */
    transition: width 0.5s ease-in-out, padding 0.3s ease-in-out; /* Faster transition */
}

.column-small p, .column-main p {
  margin: 0;
  width: 0px;
  height: 0px;
  overflow:hidden;
}
.column-main.active p:last-child, .column.column-main-expand p:last-child {
  margin-bottom: 0;
}
.column-main.active p, .column.column-main-expand p {
  width: 100%;
  height: fit-content;
}

/* Initially hide the p tag with faster fade-out effect */
.column-main p, .column-small p {
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.35s ease, visibility 0.35s ease, width 0s ease, height 0s ease; /* Faster and smoother text transitions */
}

/* Fade in p tag when column is active */
.column-main.active p, .column-main-expand p {
    opacity: 1;
    visibility: visible;
    color: var(--Accent-Black-BL-100, #000);
    font-family: Lato;
    font-size: 18px;
    font-style: normal;
    font-weight: 400;
    line-height: 28px; /* 155.556% */
    letter-spacing: 0.54px;
    max-width: 610px;
    transition: opacity 1s ease-in-out, visibility 0.35s ease-in-out; /* Smoother fade-in */
}

@media only screen and (max-width: 1000px) {
  /*.column-main.active, .column-main-expand {
   height: fit-content; 
  }*/
    .column-main.active p, .column-main-expand p {
    font-size: 16px !important; 
    line-height: 28px !important; /* 155.556% */
}
}

@media only screen and (max-width: 770px) {
  .column-main-expand, .column-main.active {
   font-size: 28px; 
  }
  .column-main-expand h3, .column-small.active h3 {
   font-size: 26px !important;
   line-height: 1.15 !important;
  }

  .column-main.active, .column-main-expand {
   font-size: 28px !important;
   line-height: 40px !important;
  }
    .container {
        flex-direction: column;
        height: fit-content;
      gap: 48px;
    }

    .column-small, .column-main {
        padding: 4 20px;
        transform: rotate(0deg);
        writing-mode: horizontal-tb;
        height: auto; /* Adjust height for smaller screens */
        /*margin-bottom: 15px; /* Space between cards on smaller screens */
    }

    .column-main.active, .column-main-expand {
        height: auto; /* Allow height to expand when active */
        padding: 32px;
        flex: 1 1;
    }

    .column-main p, .column-small p {
      margin-top: 0px;
    }
    .column-main.active p, .column-small.column-main-expand p {
      margin-top: 15px; /* Add space between title and paragraph on mobile */     
    }
    .column-main h3, .column-small h3 {
      margin-bottom: 0;
    }
    .column-main.active h3, .column-small.column-main-expand h3 {
      margin-bottom: 1.4rem; /* Add space between title and paragraph on mobile */     
    }
    .column-small, .column-main {
        width: auto;
      height: auto;
        text-align: left;
    }
  
  .column-main.active p, .column-main-expand p {
    font-size: 16px !important; 
    line-height: 28px !important; /* 155.556% */
  }
}
.column-main-expand h3 {
  height: fit-content;
}

/* override font style */
.otsdcr-padlr .column:not(.active-newclass):not(.column-main-expand-newclass):not(.active):not(.column-main-expand) .slide-title {
  font-size: 18px !important;
}
