p, h1, h2, h3 {
    margin: 0;
}
* {
    box-sizing: border-box;
}
.tabs-container {
    max-width: 1200px;
    margin: 20px auto;
    padding: 20px;
    background: radial-gradient(circle, rgba(245, 251, 255, 1), rgba(195, 220, 241, 1));
}

.tabs-header h2{
    display: flex;
    justify-content: center;
    margin-bottom: 90px;
    flex-wrap: wrap;
    color: rgb(54, 133, 198)!important;
    font-size: 30px;
    line-height: normal;
}

.tabs-nav {
    width: 100%;
    max-width: 1200px;
    display: flex;
    gap: 10px;
    margin-bottom: 30px;
    flex-wrap: wrap;
    align-items: stretch;
    align-content: center;
    justify-content: space-between;
}

.expert-info {
    flex: 1 1 calc(25% - 15px);
    width: 100%;
    max-width: 200px;
    box-sizing: border-box;
    text-align: center;
    display: flex;
    flex-direction: column;
    height: 100%;
}

.text-container {
    width: 100%;
    max-width: 220px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-start;
    text-align: center;
    margin: 20px auto 0;
    gap: 10px;
    height: 100%;
}

.image-container {
    background-color: rgb(237, 247, 255);
    border-style: solid;
    border-color: rgb(228, 228, 228);
    border-width: 1px;
    border-radius: 10px 10px 0px 0px;
    width: 100%;
    max-width: 220px;
    height: 120px;
    display: flex;
    justify-content: center;
    align-items: flex-start;
    margin: 0 auto;
    position: relative;
    z-index: 0;
}

.image-container.active {
    background-color: rgb(255, 255, 255);
    border-style: solid;
    border-color: rgb(228, 228, 228);
    border-width: 1px;
    border-radius: 10px 10px 0px 0px;
    transform: scale(1.05);
    -webkit-transform: scale(1.05);
    border-bottom: 8px solid rgb(106, 180, 38);
}


@media (max-width: 768px) {
    .expert-info {
        flex: 1 1 calc(50% - 10px);
    }
}

@media (max-width: 480px) {
    .expert-info {
        flex: 1 1 100%;
    }
}

.expert-info img {
    position: relative;
    width: 100%;
    max-width: 130px;
    height: auto;
    object-fit: cover;
    margin-top: -60px;
    z-index: 0;
}

.expert-info:nth-child(1) img {
    max-width: 160px;
}

.expert-info:nth-child(2) img {
    max-width: 150px;
}

.expert-info:nth-child(4) img {
    max-width: 150px;
}

.expert-info:nth-child(1) img {
    top: 17px;
}

.expert-info:nth-child(1).active img {
    top: 9px;
}

.expert-info:nth-child(2) img {
    top: 28px;
}

.expert-info:nth-child(2).active img {
    top: 20px;
}

.expert-info:nth-child(3) img {
    top: 17px;
}

.expert-info:nth-child(3).active img {
    top: 9px;
}

.expert-info:nth-child(4) img {
    top: 15px;
}

.expert-info:nth-child(4).active img {
    top: 8px;
}

.tab-panel {
    display: none;
}

.tab-panel.active {
    width: 100%;
    max-width: 900px;
    display: block;
    margin: 0 auto;
    text-align: center;
}

.expert-text {
    animation-name: fadeInDown; 
    -webkit-animation-name: fadeInDown; 
    animation-delay: 0s; 
    -webkit-animation-delay: 0s; 
    animation-duration: 1s; 
    -webkit-animation-duration: 1s; 
    animation-iteration-count: 1; 
    -webkit-animation-iteration-count: 1;
}

@keyframes fadeInDown { 
    0% {  
        opacity: 0; 
        -webkit-transform: translateY(-20px); 
        -ms-transform: translateY(-20px); 
        transform: translateY(-20px); 
        opacity: 0; 
        transform: translateY(-20px); 
    }  
    100% {  
        opacity: 1; 
        -webkit-transform: translateY(0); 
        -ms-transform: translateY(0); 
        transform: translateY(0); 
        opacity: 1; 
        transform: translateY(0px); 
    }  
  } 


  .nav-arrow {
    display: none;
}

  /* mob */
  @media (max-width: 768px) {
    .tabs-header h2 {
        margin-bottom: 30px;
        text-align: center;
    }

    .tabs-nav {
        display: block;
        width: 100%;
        overflow: hidden;
        padding-top: 50px;
    }

    .tabs-content {
        display: block;
    }

    .expert-info {
        display: flex;
        flex-direction: column;
        max-width: 100%;
        margin-bottom: 20px;
    }

    .tab-panel {
        display: block !important;
        position: relative;
        margin-top: 20px;
    }

    .tab-panel .expert-text {
        padding: 15px 25px;
        background: #f8f8f8;
        border-radius: 10px;
        margin-top: 0;
    }

    .tabs-container {
        overflow-x: auto;
        scroll-snap-type: x mandatory;
        -webkit-overflow-scrolling: touch;
        scroll-behavior: smooth;
    }

    .text-container {
        margin-bottom: 10px;
    }

    .text-container p {
        text-align: center;
    }

    .tabs-nav {
        display: flex;
        flex-wrap: nowrap;
        gap: 20px;
    }

    .expert-info {
        flex: 0 0 100%;
        scroll-snap-align: start;
    }

    .nav-arrow {
        display: block;
        position: absolute;
        top: 50%;
        transform: translateY(-50%);
        background: rgba(54, 133, 198, 0.8);
        color: white;
        border: none;
        padding: 11px;
        cursor: pointer;
        border-radius: 50%;
        z-index: 10;
        -webkit-appearance: none;
        -webkit-tap-highlight-color: transparent;
        touch-action: manipulation;
        user-select: none;
        -webkit-user-select: none;
    }

    .nav-arrow-left {
        left: 3px;
    }

    .nav-arrow-right {
        right: 3px;
    }

    .tabs-container {
        position: relative;
    }

    .expert-info[data-tab="1"] {
        order: 1;
    }
    .tab-panel[data-content="1"] {
        order: 1;
    }
    .expert-info[data-tab="2"] {
        order: 2;
    }
    .tab-panel[data-content="2"] {
        order: 2;
    }
    .expert-info[data-tab="3"] {
        order: 3;
    }
    .tab-panel[data-content="3"] {
        order: 3;
    }
    .expert-info[data-tab="4"] {
        order: 4;
    }
    .tab-panel[data-content="4"] {
        order: 4;
    }
}
