.content {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    margin: 100px;


}

h1 {
    font-size: 3em;
    font-weight: bold;
    margin-bottom: 10px;
    padding: 0;
}

.content p {
    width: 60%;
}
button {
  font-size: 17px;
  padding: 1em 2.7em;
  font-weight: 500;
  background: #1f2937;
  color: white;
  border: none;
  position: relative;
  overflow: hidden;
  border-radius: 0.6em;
  cursor: pointer;
}

.gradient {
  position: absolute;
  width: 100%;
  height: 100%;
  left: 0;
  top: 0;
  border-radius: 0.6em;
  margin-top: -0.25em;
  background-image: linear-gradient(
    rgba(0, 0, 0, 0),
    rgba(0, 0, 0, 0),
    rgba(0, 0, 0, 0.3)
  );
}

.label {
  position: relative;
  top: -1px;
}

.transition {
  transition-timing-function: cubic-bezier(0, 0, 0.2, 1);
  transition-duration: 500ms;
  background-color: rgba(16, 185, 129, 0.6);
  border-radius: 9999px;
  width: 0;
  height: 0;
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
}

button:hover .transition {
  width: 14em;
  height: 14em;
}

button:active {
  transform: scale(0.97);
}
.btn {
  font-size: 17px;
  padding: 1em 2.7em;
  font-weight: 500;
  background: #1f2937;
  color: white;
  border: none;
  position: relative;
  overflow: hidden;
  border-radius: 0.6em;
  cursor: pointer;
}

.gradient {
  position: absolute;
  width: 100%;
  height: 100%;
  left: 0;
  top: 0;
  border-radius: 0.6em;
  margin-top: -0.25em;
  background-image: linear-gradient(
    rgba(0, 0, 0, 0),
    rgba(0, 0, 0, 0),
    rgba(0, 0, 0, 0.3)
  );
}

.label {
  position: relative;
  top: -1px;
}

.transition {
  transition-timing-function: cubic-bezier(0, 0, 0.2, 1);
  transition-duration: 500ms;
  background-color: rgba(16, 185, 129, 0.6);
  border-radius: 9999px;
  width: 0;
  height: 0;
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
}

.btn:hover .transition {
  width: 14em;
  height: 14em;
}

.btn:active {
  transform: scale(0.97);
}



/* ----------------------------------------------cards------------------------------------- */

.cards-container {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 50px;
    padding: 20px;
    background: rgb(255, 255, 255);

}


.flip-card {
    background-color: transparent;
    width: 100%;
    max-width: 190px;
    height: 254px;
    perspective: 1000px;
    font-family: sans-serif;
    position: relative;
    /* Ensures z-index works */
}

.flip-card-inner {
    position: relative;
    width: 100%;
    height: 100%;
    text-align: center;
    transition: transform 0.8s, z-index 0s 0.4s;
    /* Delay z-index reset */
    transform-style: preserve-3d;
    z-index: 1;
}

.flip-card:hover .flip-card-inner,
.flip-card:focus-within .flip-card-inner {
    /* Ensures it works on mobile */
    transform: rotateY(180deg);
    z-index: 10;
    cursor: pointer;
    /* Brings flipped card to front */
}

.flip-card-front,
.flip-card-back {
    position: absolute;
    width: 100%;
    height: 100%;
    -webkit-backface-visibility: hidden;
    backface-visibility: hidden;
    border-radius: 1rem;
    overflow: hidden;
    border: 2px solid rgb(255, 255, 255);
}

.flip-card-front img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.flip-card-back {
    background: linear-gradient(120deg, #027373 30%, #004f55 88%, bisque 40%, #027373 78%);
    color: white;
    transform: rotateY(180deg);
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    padding: 10px;
    text-align: center;
    z-index: 5;
}

.wrapperg {
    width: 100%;
    height: 100%;
    position: relative;
    text-align: center;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}




.innerg {
    margin-top: 50px;
    --w: 150px;
    --h: 150px;
    --translateZ: calc((var(--w) + var(--h)) + 0px);
    --rotateX: -15deg;
    --perspective: 1000px;
    position: absolute;
    width: var(--w);
    height: var(--h);
    top: 25%;
    left: calc(50% - (var(--w) / 2) - 2.5px);
    z-index: 2;
    transform-style: preserve-3d;
    transform: perspective(var(--perspective));
    animation: rotating 20s linear infinite;
    /* */
    position: relative;
    /* Makes it follow normal document flow */
    width: 150px;
    height: 150px;
    transform-style: preserve-3d;
    transform: perspective(1000px);
    animation: rotating 20s linear infinite;
}

@keyframes rotating {
    from {
        transform: perspective(var(--perspective)) rotateX(var(--rotateX)) rotateY(0);
    }

    to {
        transform: perspective(var(--perspective)) rotateX(var(--rotateX)) rotateY(1turn);
    }
}

.cardg {
    position: absolute;
    border: 2px solid rgba(var(--color-card));
    border-radius: 12px;
    overflow: hidden;
    inset: 0;
    transform: rotateY(calc((360deg / var(--quantity)) * var(--index))) translateZ(var(--translateZ));
}

.imgg {
    width: 100%;
    height: 100%;
    object-fit: cover;
    background: #0000 radial-gradient(circle,
            rgba(var(--color-card), 0.2) 0%,
            rgba(var(--color-card), 0.6) 80%,
            rgba(var(--color-card), 0.9) 100%);
}

.imgg img {

    width: 100%;
    height: 100%;
    object-fit: cover;

}


/* --------------------------------MRI-------------------------------------------- */






.container3 {
    display: flex;
    width: 100%;
    align-items: center;
    gap: 20px;
    padding: 50px;


}

.container3 .image-section {
    flex: 40%;
}

.container3 .image-section img {
    width: 100%;
    height: auto;
    display: block;
    border-radius: 10px;
}

.container3 .text-section {
    flex: 50%;
    /* text-align: left; */
    padding: auto;
    align-items: center;

}

.container3 .text-section h1 {
    font-size: 2em;
    color: #000000;
    margin-bottom: 10px;
    /* border: 2px solid red; */
    text-align: center;
}

.container3 .text-section p {
    font-size: 18px;
    color: #000000;
    text-align: right;
    padding-bottom: 60px;
}



/* ----------------------------------------container ct scan------------------------------------ */

.section-container {
    display: flex;
    align-items: center;
    justify-content: center;
    flex-wrap: wrap;
    gap: 20px;
    padding: 50px 50px;
    max-width: 100%;
    margin: auto;
    height: auto;
}

.text-box {
    flex: 1;
    min-width: 300px;
    text-align: center;

}

.text-box h1 {
    color: #000000;
    margin-bottom: 10px;
    font-size: 2em;
    text-align: center;
}

.text-box p {
    font-size: 18px;
    color: #000000;
    line-height: 1.6;
    overflow: hidden;
    padding-bottom: 20px;
}

.image-box {
    flex: 1;
    min-width: 300px;
    text-align: center;
}

.image-box img {
    width: 100%;
    height: auto;
    border-radius: 10px;
}

/* ----------------------------------ultrasound--------------------------------------- */

.custom-section {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    padding: 100px;
    width: auto;
    margin: auto;
}

.custom-image {
    width: 40%;
}

.custom-image img {
    width: 100%;
    height: auto;
    display: block;
    border-radius: 10px;
}

.custom-text {
    width: 55%;
}

.custom-text h1 {
    font-size: 2rem;
    margin-bottom: 10px;
}

.custom-text p {
    font-size: 18px;
    line-height: 1.5;
    text-align: left;
    padding-bottom: 20px;
}


/* Responsive adjustments */
@media (max-width: 768px) {

    h1 {
        font-size: 25px;
    }

    p {
        font-size: 14px;
    }

    .content {
        margin: 20px;

    }

    .content p {
        width: 100%;
        padding: 10px;
    }



    .container3 {
        flex-direction: column;
        text-align: center;
        padding-bottom: 70px;
    }

    .container3 .image-section,
    .text-section {
        flex: 100%;
    }

    .container3 .text-section h1 {
        font-size: 35px;
    }

    .container3 .text-section p {
        font-size: 14px;
        text-align: center;

        padding-bottom: 20px;

    }


    .flip-card {
        max-width: 130px;
        height: 170px;
    }


    .cards-container {
        display: flex;
        flex-wrap: wrap;
        justify-content: space-around;
        gap: 30px;
        padding: 20px;
    }




    .section-container {
        flex-direction: column;
        text-align: center;
        padding: 50px 20px;
        background-color: white;
        margin-top: 100px;
    }

    .text-box {
        order: 2;
        text-align: center;
    }

    .image-box {
        order: 1;
    }

    .text-box p {
        font-size: 14px;

    }

    .custom-section {
        flex-direction: column;
        text-align: center;
        padding: 40px;
        background-color: white;
    }

    .custom-image,
    .custom-text {
        width: 100%;
    }

    .custom-image,
    .custom-text p {
        font-size: 14px;
        text-align: center;
    }


    .innerg {
        left: 10px;
        --w: 70px;
        --h: 70px;
        --translateZ: calc(var(--w) + var(--h));
        --rotateX: -15deg;
        --perspective: 500px;
        /* Reduced to avoid overflow */

        position: relative;
        width: var(--w);
        height: var(--h);
        margin: 0 auto;
        /* Centers it properly */
        display: flex;
        justify-content: center;
        align-items: center;

        transform-style: preserve-3d;
        transform: perspective(var(--perspective));
        animation: rotating 20s linear infinite;
        width: 70px;
        height: 70px;
    }

    @keyframes rotating {
        from {
            transform: perspective(var(--perspective)) rotateX(var(--rotateX)) rotateY(0);
        }

        to {
            transform: perspective(var(--perspective)) rotateX(var(--rotateX)) rotateY(1turn);
        }
    }

    .cardg {
        position: absolute;
        border: 2px solid rgba(var(--color-card));
        border-radius: 12px;
        overflow: hidden;
        inset: 0;
        transform: rotateY(calc((360deg / var(--quantity)) * var(--index))) translateZ(calc(var(--translateZ) * 0.6));
        /* Adjusted */
    }

    .imgg {
        width: 100%;
        height: 100%;
        background: radial-gradient(circle,
                rgba(var(--color-card), 0.2) 0%,
                rgba(var(--color-card), 0.6) 80%,
                rgba(var(--color-card), 0.9) 100%);
    }

    .imgg img {
        width: 100%;
        height: 100%;
        object-fit: cover;
    }


    .innerg {
        --w: 120px;
        --h: 120px;
        --perspective: 600px;
        /* Reduce depth */
    }

    .cardg {
        transform: rotateY(calc((360deg / var(--quantity)) * var(--index))) translateZ(calc(var(--translateZ) * 0.5));
    }
}