﻿#services-content {
    margin-top: -70px;
    padding: 0;
    border-radius: 20px 0 0 20px;
    border-color: #7cd63c;
    display: flex;
    gap: 0rem;
    z-index: 10;
    container-type: inline-size;
    container-name: service-content;
}
@media (max-width: 849px){
    #services-content {
        border-radius: 0;
    }
}
@media (max-width: 500px) {
    #services-content {
        margin-top: 0px;
    }
}

#services-content :has(.section-title) {
    border-color: #7cd63c;
}

#services-list {
    --tab-count: 7;
    --tab-height: 2.3rem;
    --tab-spacing: calc(100% / var(--tab-count));
    min-height: 315px;
    height: 360px;
    max-height: 430px;
    max-width: 60ch;
    padding: .5rem 1rem .5rem .5rem;
    margin: 0;
    font-size: 1.1rem;
    text-align: center;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    position: relative;
}

@container service-content (max-width: 650px) {
    #services-list {
        display: none;
    }
}

/*is used to change --active variable according to active tab*/
#services-list:has(:nth-child(1).active-tab) {
    --active: 0;
}
#services-list:has(:nth-child(2).active-tab) {
    --active: 1;
}
#services-list:has(:nth-child(3).active-tab) {
    --active: 2;
}
#services-list:has(:nth-child(4).active-tab) {
    --active: 3;
}
#services-list:has(:nth-child(5).active-tab) {
    --active: 4;
}
#services-list:has(:nth-child(6).active-tab) {
    --active: 5;
}
#services-list:has(:nth-child(7).active-tab) {
    --active: 6;
}
/*used to set the --current-hover*/
#services-list:has(:nth-child(1):hover) {
    --current-hover: 0;
}
#services-list:has(:nth-child(2):hover) {
    --current-hover: 1;
}
#services-list:has(:nth-child(3):hover) {
    --current-hover: 2;
}
#services-list:has(:nth-child(4):hover) {
    --current-hover: 3;
}
#services-list:has(:nth-child(5):hover) {
    --current-hover: 4;
}
#services-list:has(:nth-child(6):hover) {
    --current-hover: 5;
}
#services-list:has(:nth-child(7):hover) {
    --current-hover: 6;
}
#services-list > div {
    margin-inline: auto;
    padding: .15rem;
    height: var(--tab-height);
    width: 100%;
    white-space: nowrap;
    font-weight: 600;
    -webkit-transition: 100ms;
    -moz-transition: 100ms;
    -ms-transition: 100ms;
    -o-transition: 100ms;
    transition: 100ms;
}

#services-list .active-tab {
    color: white;
}

#services-list > div:hover {
    cursor: pointer;
    border-radius: 10px;
}

#services-list::after {
    content: "";
    position: absolute;
    inset: .2rem;
    top: calc(var(--active) * var(--tab-spacing) + .25rem);
    right: .5rem;
    height: var(--tab-height);
    /*    height: calc(var(--tab-height) + 10px);*/
    border-radius: 10px;
    /*    background-color: rgb(12, 124, 193);*/
    background-color: #7cd63c;
    -webkit-transition: 100ms;
    -moz-transition: 100ms;
    -ms-transition: 100ms;
    -o-transition: 100ms;
    transition: 100ms;
    z-index: -1;
}

#services-list > div:hover::after {
    content: "";
    position: absolute;
    inset: .2rem;
    top: calc(var(--current-hover) * var(--tab-spacing) + .25rem);
    right: .5rem;
    height: var(--tab-height);
    border-radius: 10px;
    outline: 2px solid grey;
}

#service-displays {
    height: 100%;
    flex: 1 1;
    position: relative;
    /*    padding: 0 1.5rem;*/
    text-indent: 0;
}

:has(> #services-title) {
    background-color: #7cd63c;
    left: unset;
    right: max(calc(50% - 5rem), 3rem);
}

#service-displays .service-display h3 {
    color: rgb(12, 124, 193);
    font-weight: 600;
}

#service-displays .service-display {
    height: 100%;
    min-height: 350px;
    text-align: center;
    position: relative;
    display: flex;
    align-items: center;
}

#services-content:has( #services-list[style*="none"]) {
    border-color: red !important;
    overflow: clip;
}

@container (max-width: 1040px) {
    #services-list {
        display: none;
    }
    .service-display {
        border-radius: 15px 0 0 15px;
        overflow: clip;
    }
}

#service-displays .service-display p {
    margin-inline: auto;
    width: 90%;
    text-align: left;
}

#service-displays .service-display:not(.active-tab) {
    display: none;
}

.word-content {
    padding: 1.5rem;
    padding-bottom: 3rem;
    min-width: 45ch;
    z-index: 1;
}

.service-img {
    flex-basis: 450px;
    flex-shrink: 1;
    flex-grow: 1;
    min-width: 35%;
    height: 100%;
    position: relative;
}
@media (max-width: 630px){
    .word-content {
        min-width: unset;
    }
    .service-img{
         display: none;
    }
}

.service-img > div {
    height: 100%;
    min-width: 450px;
    position: absolute;
    background-position: center;
    background-size: cover;
    background-repeat: no-repeat;
}

#study-design-image {
    right: 0;
    background-image: url(/images/Filler-Images/back_of_computer.jpeg);
    background-image: linear-gradient(90deg,rgba(255, 255, 255, 1) 0%, rgba(255, 255, 255, 1) 10%, rgba(255, 255, 255, 0) 100%), url(/images/Filler-Images/back_of_computer.jpeg);
}

#clicnical-programming-image {
    left: 0;
    background-image: url(/images/Filler-Images/computer_left.jpeg);
    background-image: linear-gradient(270deg,rgba(255, 255, 255, 1) 0%, rgba(255, 255, 255, 1) 10%, rgba(255, 255, 255, 0) 100%), url(/images/Filler-Images/compter_left_2.jpeg);
}

#data-management-image {
    right: 0;
    background-image: url(/images/Filler-Images/desk_side.jpeg);
    background-image: linear-gradient(90deg,rgba(255, 255, 255, 1) 0%, rgba(255, 255, 255, 1) 10%, rgba(255, 255, 255, 0) 100%), url(/images/services/office-workers-using-finance-graphs.jpg);
}

#statistical-consulting-image {
    left: 0;
    background-image: url(/images/services/consulting.jpg);
    background-image: linear-gradient(270deg,rgba(255, 255, 255, 1) 0%, rgba(255, 255, 255, 1) 10%, rgba(255, 255, 255, 0) 100%), url(/images/Filler-Images/desk_side.jpeg);
}

#biostatics-img {
    right: 0;
    background-image: url(/images/Filler-Images/computer_right.jpeg);
    background-image: linear-gradient(90deg,rgba(255, 255, 255, 1) 0%, rgba(255, 255, 255, 1) 10%, rgba(255, 255, 255, 0) 100%), url(/images/Filler-Images/computer_right.jpeg);
}

#Medical-Writing-img {
    left: 0;
    background-image: url(/images/Filler-Images/DeskWork.jpeg);
    background-image: linear-gradient(270deg,rgba(255, 255, 255, 1) 0%, rgba(255, 255, 255, 1) 10%, rgba(255, 255, 255, 0) 100%), url(/images/Filler-Images/DeskWork.jpeg);
}

#regulatory-img {
    right: 0;
    background-image: url(/images/Filler-Images/stats_on_tablet.jpeg);
    background-image: linear-gradient(90deg,rgba(255, 255, 255, 1) 0%, rgba(255, 255, 255, 1) 10%, rgba(255, 255, 255, 0) 100%), url(/images/Filler-Images/stats_on_tablet.jpeg);
}

#service-pagination {
    position: absolute;
    bottom: .25rem;
    left: calc(50% - 150px);
    z-index: 3;
}
