/* ALL */
section {
    justify-content: center;
    display: flex;
    flex-direction: column;
    width: 100%;
    align-items: center;
    position: relative;
}

img {
    border-radius: 10px;
}

/* 
article {
    width: 100%;
    justify-content: center;
    align-items: center;
    display: flex;
} */


/*HOME*/
.jci-article {
    position: relative;
    font-weight: 400;
    padding: 0px 30px !important;

    min-height: 500px;
    background-color: #c6d4d5;

    .flex-adjust {
        z-index: 3;
        align-items: stretch;
        min-height: 536px;
        max-width: none;
        justify-content: center;
        gap: 0;

        .img-container {
            background-image: url(/assets/doctor2.jpeg);
            background-size: cover;
            background-repeat: no-repeat;
            /* width: 60%; */
            flex: 1 0 50%;
        }

        h1 {
            max-width: 300px;
            margin-left: 15px;
            font-size: 26px;

        }

        .text-container {
            font-size: 32px;
            align-items: center;
            display: flex;
            flex-direction: column;
            justify-content: center;
            flex: 1 1 50%;
        }

        p {
            font-size: 20px;
        }
    }
}

/*prueba*/
.jci-article {
    padding-right: 0 !important;
    padding-left: 0 !important;

    .img-container {
        padding-left: 69px;
        background-size: cover;
        background-position: 175px;

        >div {
            padding-left: 106px;
        }
    }

    .text-container {
        background-color: #ebebeb;
        padding: 30px;
        padding-left: 50px;
        padding-right: 80px;
    }
}

@media(max-width:1550px) {
    .jci-article {
        .flex-adjust {
            width: 100%;
            gap: 0;

            .img-container {
                background-position: center;
                background-position: 50px;
                padding-left: 0 !important;
                flex: 1 1 65%;

                h1 {
                    margin-left: -35px;
                }
            }

            .text-container {
                flex: 1 1 35%;

                p {
                    font-size: 18px;
                }
            }
        }
    }
}

@media(max-width: 1200px) {
    .jci-article {
        .flex-adjust {

            .img-container {
                background-position: 24%;
                flex: 1 1 70%;
            }

            .text-container {
                padding: 30px;
                flex: 1 1 30%;
            }
        }
    }

}

@media(max-width:992px) {
    .jci-article {
        .flex-adjust {
            flex-direction: column;

            .img-container {
                min-height: 400px;
                background-position: 0 -40px;

                h1 {
                    max-width: 280px;
                }

                >div {
                    padding-left: 53px;
                }
            }
        }
    }
}

@media(max-width:768px) {
    .jci-article {
        & .flex-adjust {
            .img-container {
                min-height: 400px;
                background-position: 0 16px;
            }
        }
    }
}

@media(max-width:475px) {
    .jci-article {
        & .flex-adjust {
            .img-container {
                min-height: 400px;
                background-position: center 90px;

                >div {
                    padding-left: 0;
                    justify-content: center;
                    display: flex;
                    text-align: center;
                }

                h1 {
                    margin: 20px 10px;
                    max-width: none;
                }
            }
        }
    }
}

.map-article {
    flex-direction: column;

    >* {
        max-width: var(--max-width-main);
    }

    .flex-adjust .counter-div {
        display: flex;
        flex-direction: column;
        justify-content: center;
        align-items: center;
        text-align: center;

        #counter-num {
            font-weight: 700;
            border-radius: 50px;
            display: flex;
            text-align: center;
            color: black;
            font-size: 90px;
            background-color: var(--primary-color);
            width: 163px;
            height: 123px;
            outline: 10px solid var(--color-dark);
            box-shadow: inset 0px 4px 10px rgba(0, 0, 0, 0.3);
            text-align: center;
            align-items: center;
            justify-content: center;
            padding-right: 10px;
        }

        p {
            max-width: 257px;
            margin-top: 30px;
        }
    }

    .toggle-input {
        display: none;
    }

    .country-label {
        display: block;
        cursor: pointer;
        padding: 12px;
        background: var(--primary-color);
        border: 1px solid var(--color-dark);
        font-weight: bold;
        margin-top: 8px;
        transition: background 0.3s;
    }

    .country-label:hover {
        background: var(--secondary-color);
    }

    .center-list {
        max-height: 0;
        overflow: hidden;
        margin-left: 25px;
        padding: 0 15px;
        border-left: 2px solid #dee2e6;
        margin-bottom: 0 !important;
        list-style: none;
        padding-left: 0;
        display: flex;
        flex-wrap: wrap;
        justify-content: center;

        li {
            background-color: var(--primary-color);
            padding: 10px;
            border-radius: 8px;
            font-weight: 500;
            margin: 10px;
            margin-bottom: 8px;
            font-size: 0.95rem;
        }
    }

    .center-list.spain {
        transition: max-height 1.5s ease-out;
    }

    .center-list.peru {
        transition: max-height 0.7s ease-out;
    }

    .center-list.colombia {
        transition: max-height .4s ease-out;
    }

    .center-list.chile {
        transition: max-height .4s ease-out;
    }

    .toggle-input:checked~.center-list.spain {
        max-height: 860px;
        transition: max-height 1.5s ease-out;
    }

    .toggle-input:checked~.center-list.peru {
        max-height: 240px;
        transition: max-height 1.0s ease-out;
    }

    .toggle-input:checked~.center-list.colombia {
        max-height: 200px;
        transition: max-height 0.7s ease-out;
    }

    .toggle-input:checked~.center-list.chile {
        max-height: 50px;
        transition: max-height 0.4s ease-out;
    }

    .map-container {
        width: 100%;
        justify-content: center;
        align-items: center;
        display: flex;
        margin-top: 30px;

        #map {
            height: 500px;
            width: 80%;
        }
    }
}

.currently-section {
    background-color: #3c3c3c;
    color: white;

    >* {
        max-width: 1200px
    }

    >div {
        display: flex;
        flex-wrap: wrap;
        justify-content: center;
        row-gap: 35px;
        column-gap: 20px;

        article {
            border-radius: 10px;
            padding: 20px;
            align-content: center;
            justify-content: center;
            text-align: center;
            position: relative;
            width: 340px;

            >div {
                position: absolute;
                top: 50%;
                left: 50%;
                transform: translate(-50%, -50%);
                width: 120px;
                height: 120px;
                background-color: #2e6569;
                z-index: 1;
                border-radius: 50%;
            }

            p {
                font-size: 20px;
                z-index: 23;
                position: relative;

                strong {
                    color: #1ec3af;
                }
            }
        }
    }
}

.accredit-article {
    background-color: #f4f5f5;

    img {
        width: 100%;
        height: auto;
    }
}

/*SERVICIOS*/
.servOpening-section {
    div {
        position: relative;

        img {
            position: absolute;
            top: 0;
            left: 0;
            width: 100%;
            height: 100%;
            object-fit: cover;
        }
    }

    ul {
        flex-direction: column;
    }
}

.servCons-section {
    background-color: var(--primary-color);
}

.servForm-section {
    padding-bottom: 50px;

    >ul {
        display: flex;
        gap: 30px;
        flex-wrap: wrap;
    }
}

.servCod-section {
    padding-bottom: 50px;
    background-color: #f4f5f5;

    article {
        padding-bottom: 0;
    }
}

.offert-section {
    .top-article>* {
        max-width: 1200px;
    }

    .top-article {
        strong {
            font-size: 20px;
            font-weight: 600;
        }
    }

    .bottom-article {
        width: 100%;
        display: flex;
        gap: 50px;
        padding-bottom: 50px;
        justify-content: center;
        flex-direction: column;
        align-items: center;
        background-color: #ededec;

        >div {
            max-width: 1200px;
            gap: 50px;
            display: flex;

            h2 {
                font-size: 25px;
                font-weight: 600;
                color: var(--color-dark);
                font-family: var(--primary-font);
            }

            img {
                max-width: 100%;
                border-radius: 10px;
                width: 100%;
                max-height: 300px;
                object-fit: cover;
            }

            ul {
                padding-left: 0;

                li {
                    list-style: none;
                    display: flex;
                    align-items: flex-start;
                    margin-bottom: 10px;
                    gap: 5px;

                    img {
                        width: 25px;
                        height: 25px;
                    }
                }
            }
        }
    }
}

.servJCI-section {
    position: relative;
    width: 100%;
    background-image: url(/assets/img5.jpg);
    background-repeat: no-repeat;
    background-position: center;
    background-size: cover;

    header {
        max-width: var(--max-width-main);
        z-index: 3;
        position: relative;
    }

    &:after {
        content: "";
        background-color: #e9e2e2d1;
        z-index: 2;
        width: 100%;
        height: 100%;
        position: absolute;
        top: 0;
    }

    .bg-met-swiper {
        width: 100%;
        justify-content: center;
        display: flex;
        position: relative;
        align-items: center;
        padding: 0;

        >div {
            max-width: 960px;
            width: 80%;

            position: relative;
            width: 100%;
        }

        .swiper {
            max-width: 750px;
            width: 80%;
            z-index: 10;
            min-height: 250px;
        }

        .swiper-button-next,
        .swiper-button-prev {
            width: 40px;
            height: 40px;
        }

        .swiper-button-next svg,
        .swiper-button-prev svg {
            color: black;
            width: 40px;
            height: 40px;
        }

        .swiper-button-prev svg {
            transform: rotate(180deg);

        }

        .swiper-button-next:after,
        .swiper-button-prev:after {
            display: none;
        }

        .swiper-slide {
            width: 850px;
            margin-right: 20px;
            background-color: #5a7388de;
            border-radius: 10px;
            padding: 20px;
            box-sizing: border-box;
            height: 250px;
            display: flex;
            flex-direction: column;
            text-align: center;

            h3 {
                font-size: 22px;
                margin: 15px;
            }

            span {
                color: #ffffffd9;
                font-weight: bold;
                font-size: 35px;
            }
        }

        .extra {
            border-radius: 10px;
            padding: 20px;
            align-items: center;
            justify-content: center;
            text-align: center;
            position: relative;
            z-index: 3;
            flex-direction: column;
            background-color: transparent;

            img {
                z-index: 1;
                position: absolute;
                top: 7px;
                width: 70px;
            }

            >div {
                position: absolute;
                top: 50%;
                left: 50%;
                transform: translate(-50%, -50%);
                width: 250px;
                height: 250px;
                background-color: #2e6569;
                z-index: 1;
                border-radius: 50%;
            }

            h3 {
                z-index: 4;
                margin-bottom: 0;
                color: white;
            }

            p {
                z-index: 23;
                position: relative;
                max-width: 195px;
                color: white;
                font-size: 12px;

            }
        }
    }
}

/* TEAM */
.team-section {
    justify-content: center;
    align-items: center;
    text-align: center;

    &:before {
        content: "";
        background-image: url(/assets/bg-team.svg);
        background-repeat: no-repeat;
        background-size: cover;
        width: 100%;
        height: 100%;
        position: absolute;
        z-index: -1;
    }

    .team-grid {
        display: grid;
        grid-template-columns: repeat(auto-fit, minmax(300px, 420px));
        gap: 20px;
        max-width: 1500px;
        justify-content: center;
        display: flex;
        flex-wrap: wrap;
        margin-bottom: 30px;

        h2 {
            display: flex;
            justify-content: center;
            gap: 5px;
        }

        .flip-card {
            background-color: transparent;
            width: fit-content;
            height: fit-content;
            perspective: 1000px;
            cursor: pointer;

        }

        .flip-card-inner {
            position: relative;
            text-align: center;
            transition: transform 0.8s;
            transform-style: preserve-3d;
            width: var(--flip-card-width);
            height: var(--flip-card-height);
            padding: 60px 30px;
            box-sizing: border-box;

        }

        .flip-card-inner.rotated {
            transform: rotateY(180deg);
        }

        .flip-card-front,
        .flip-card-back {
            position: absolute;
            -webkit-backface-visibility: hidden;
            backface-visibility: hidden;
            border-radius: 15px;
            box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
            width: var(--flip-card-width);
            height: var(--flip-card-height);
            padding: 60px 30px;
            top: 0;
            left: 0;
            box-sizing: border-box;
        }

        .flip-card-front {
            background-color: var(--secondary-color);
            color: black;
            padding: 60px 30px;


            .img-container {
                width: 100%;
                height: 68%;

                >img {
                    width: 90%;
                    height: 100%;
                    max-width: 100%;
                    box-shadow: 0px 0px 11px #989797;
                    object-fit: cover;
                }

                .top {
                    object-position: top;
                }
            }
        }

        .flip-card-back {
            background-color: var(--primary-color);
            transform: rotateY(180deg);
            padding: 15px;
            font-size: 14px;

            ul {
                margin-top: 0;
                text-align: left;

                li:not(.title) {
                    margin-left: 10px;
                    list-style-type: disc;
                }

                li.title:not(:first-of-type) {
                    margin-top: 10px
                }
            }
        }
    }
}

/*QUE ES LA ACREDITACION JCI*/
.ac-jci-section {
    padding-right: 0;
    padding-left: 0;
    padding-top: 0;

    >* {
        max-width: 1200px;
    }

    article:last-of-type {
        background-color: var(--primary-color);
    }

    article {
        max-width: 100%;
        width: 100%;
        padding-top: 50px;
        padding-bottom: 50px;
        padding-right: 30px;
        padding-left: 30px;
        box-sizing: border-box;

        >div {
            max-width: 1200px;
            margin: 0 auto;
            display: flex;
            gap: 50px;

            >div {
                flex: 1
            }
        }

        .flex-adjust {
            p {
                font-size: 18px;
            }
        }
    }
}

/*CONTACT*/
.contact-section {
    background-color: var(--primary-color);

    * {
        max-width: 1200px;
    }

    >div {
        display: flex;
        justify-content: space-around;
        width: 100%;
        flex-direction: column-reverse;
        gap: 20px;

        img {
            max-width: 100%;
        }

        .contact-div {
            >div {
                display: flex;
                gap: 20px;

                a {
                    display: flex;
                    flex: 1 1 0;
                    gap: 10px;
                    align-items: center;
                    flex-direction: column;
                    /* text-align: center; */
                    background-color: #f3f3f3;
                    padding: 30px 10px;
                    border-radius: 10px;
                    font-size: 13px;

                    p {
                        color: black;
                        font-weight: 400;
                    }

                    img {
                        width: 70px;
                        height: 70px;
                    }

                    &:hover {
                        background-color: #eae8e8;
                        box-shadow: 0px 0px 5px #cccccc;
                    }
                }
            }
        }

        p {
            text-align: center;
        }

        h3 {
            font-family: 'Montserrat';
            font-size: 24px;
            color: var(--color-dark);
            text-align: center;
            margin-bottom: 0;
        }

        article {
            display: flex;
            background-color: white;
            border-radius: 5px;
            padding: 30px;
            box-sizing: border-box;

            >* {
                /* flex: 1 1 0; */
                justify-content: space-around;
                display: flex;
                flex-direction: column;
            }
        }
    }
}

/*PRIVACY POLICY*/
.privacy-policy {
    align-items: flex-start;
    max-width: 1000px;
    justify-self: center;
    background-color: var(--primary-color);
    border-radius: 10px;
    margin: 20px;
    width: 90%;

    h1 {
        text-align: center;
        width: 100%;
    }
}


/*MEDIA QUERIES*/
@media(max-width:1200px) {

    /*HOME*/
    .toggle-input:checked~.center-list.spain {
        max-height: 1500px;
    }

    .toggle-input:checked~.center-list.peru {
        max-height: 500px;
    }

    .toggle-input:checked~.center-list.colombia {
        max-height: 260px;
    }

    .toggle-input:checked~.center-list.chile {
        max-height: 90px;
    }

    /*CONTACT*/
    .contact-section {
        .flex-adjust {
            div:first-of-type {
                flex: 0 0 35%;

                >img {
                    height: 100%;
                    object-fit: cover;
                    object-position: -133px 0px;
                }
            }
        }
    }
}

@media (max-width: 992px) {
    .contact-section {
        .flex-adjust {
            flex-direction: column-reverse;

            div:first-of-type {

                >img {
                    object-position: center;
                }
            }
        }
    }

}

@media(max-width: 768px) {
    :root {
        --flip-card-height: 800px;
    }

    /*HOME*/
    .toggle-input:checked~.center-list.spain {
        max-height: 1800px;
    }

    .toggle-input:checked~.center-list.peru {
        max-height: 800px;
    }

    .toggle-input:checked~.center-list.colombia {
        max-height: 350px;
    }

    .accredit-article {

        >div div:last-child {
            display: flex;
            flex-direction: column;

            img {
                order: 4
            }
        }
    }

    /*SERVICES*/
    .servOpening-section article {
        display: flex;
        flex-direction: column;

        div {
            height: 400px;

            img {
                position: relative;
            }
        }
    }

    .servCons-section article {
        flex-direction: column;
    }

    .servForm-section {
        & article {
            flex-direction: column;

            &>ul {
                li {
                    max-width: none;
                }
            }
        }
    }

    /*ACREDITACION JCI*/
    .ac-jci-section {
        & article {
            >div {
                flex-direction: column;
            }
        }
    }

    /*TEAM*/
    .team-grid article {
        width: 95% !important;

        .flip-card-back,
        .flip-card-front,
        .flip-card-inner {
            width: 100% !important;
        }

        .img-container {
            img {
                object-position: top;
            }
        }
    }

    /*CONTACT*/
    .contact-section {
        .flex-adjust {
            div:first-of-type {
                flex-direction: column;
            }
        }
    }
}

@media(max-width:576px) {
    :root {
        --flip-card-height: 980px;
    }

    /*HOME*/
    .map-article {

        #map {
            width: 100%;
        }

        .toggle-input:checked~.center-list.spain {
            max-height: 1800px;
        }

        .toggle-input:checked~.center-list.peru {
            max-height: 800px;
        }

        .toggle-input:checked~.center-list.colombia {
            max-height: 350px;
        }

        & ul {
            li {
                padding: 5px;
                font-size: 14px;
                margin: 5px;
            }
        }
    }

    .jci-article div {
        max-width: 100%;

        .text-container {
            flex-direction: column;

            p {
                min-width: 0;
            }
        }
    }

    .currently-section {
        &>div {
            article {
                width: 270px;
            }
        }
    }

    /*SERVICES*/
    .servJCI-section {
        .swiper-slide {
            height: 270px;

            h3 {
                font-size: 20px;
                margin: 0px;
            }

            p {
                font-size: 15px;
            }
        }
    }

    /*TEAM*/
    .team-section {
        padding: 0;

        h2 img {
            display: none;
        }

        .img-container {
            height: 60% !important;
        }
    }
}