@import url('https://fonts.googleapis.com/css2?family=Montserrat&family=Rubik&display=swap');

:root {
    --primary: #1ca5a7;
    --secondary: #36617e;
    --tertiary: #cdeff0;
    --light: #fafafa;
    --dark: #16161d;
    --bg-body: #f0f4f5;
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
    font-family: 'Montserrat', sans-serif;
}

html {
    scroll-behavior: smooth;
}

a {
    text-decoration: none;
}

ul li {
    list-style: none;
}

button,
input {
    border: none;
    outline: none;
}

label {
    cursor: pointer;
}

input[type=checkbox],
input[type=radio] {
    display: none;
}

body {
    background: var(--bg-body);
    min-height: 100vh;
    display: grid;
    place-content: center;
    color: var(--dark);
}

header {
    width: 100vw;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 20px;
    position: relative;
    min-height: 80px;
    background: var(--light);
    z-index: 3;
}

.logo {
    color: var(--primary);
    font-weight: 700;
    font-size: 1.5rem;
    position: relative;
    z-index: 2;
    font-family: 'Rubik', sans-serif;
}

input[type=checkbox]#chk-menu {
    &~label {
        display: flex;
        justify-content: center;
        align-items: center;
        width: 48px;
        height: 48px;
        overflow: hidden;
        position: relative;
        z-index: 2;

        &::after {
            content: '';
            display: block;
            width: 48px;
            height: 8px;
            background: var(--dark);
            position: absolute;
            bottom: 5px;
            right: 0%;
            transition: .5s;
        }

        &::before {
            content: '';
            display: block;
            width: 48px;
            height: 8px;
            background: var(--dark);
            position: absolute;
            top: 5px;
            left: 0;
            transition: .5s;
        }

        span {
            width: 48px;
            height: 8px;
            background: var(--dark);
            transition: .5s;
        }
    }

    &~nav {
        display: flex;
        overflow: hidden;
        position: absolute;
        top: 0;
        height: 0;
        z-index: 1;
        transition: .5s;
        width: 100%;
        left: 0;
        top: 80px;
        background: var(--secondary);

        ul {
            width: 100%;
            max-width: 500px;
            display: flex;
            margin: 0 auto;
            justify-content: space-around;
            align-items: center;
            padding: 10px;

            li {
                width: 20%;

                a {
                    color: var(--light);
                    display: flex;
                    width: 80px;
                    justify-content: center;
                    align-items: center;
                    text-align: center;
                }
            }
        }
    }
}

input[type=checkbox]#chk-menu:checked {
    &~label {
        background: linear-gradient(0deg, transparent 20px, transparent 20px, transparent 28px, transparent 28px, transparent 48px);

        &::after {
            width: 20px;
            transform: rotate(45deg) translate(25%, 120%);
            position: absolute;
            bottom: 20px;
        }

        &::before {
            width: 20px;
            transform: rotate(45deg) translate(-25%, -120%);
            position: absolute;
            top: 20px;
        }

        span {
            transform: rotate(-45deg);
        }
    }

    &~nav {
        width: 100%;
        height: 100%;
    }
}

h2 {
    font-size: 2rem;
    text-align: center;
    margin: 2rem;
    color: var(--secondary);
    font-weight: 700;
}

section {
    width: calc(100% - 40px);
    max-width: 1440px;
    margin: 0 auto 20px;
}

.title {
    position: relative;
    z-index: 2;
    font-weight: 600;
}

.description {
    position: relative;
    z-index: 2;
    font-weight: 600;
}

#home {
    height: 50vh;
    min-height: 600px;
    position: relative;
    background: url('./images/bg1.webp') 20%;
    background-size: cover;
    display: flex;
    align-items: flex-start;
    flex-direction: column;
    justify-content: flex-end;
    border-radius: 20px;
    overflow: hidden;
    margin-top: 40px;
    width: 90vw;
    max-width: 90vw;

    &::before {
        content: '';
        display: block;
        width: 100%;
        height: 100%;
        position: absolute;
        top: 0;
        background: rgba(0, 0, 0, .7);
    }

    .title {
        font-size: 2.5rem;
        color: var(--tertiary);
        padding: 0 20px;

        strong {
            font-weight: 700;
            color: var(--primary);
        }
    }

    .description {
        font-size: 1.5rem;
        padding: 20px 20px 40px;
        color: var(--light);
    }
}

#specialties {
    .wrapper {
        display: flex;
        align-items: center;
        justify-content: center;
        flex-direction: column;
        width: 100%;
        margin: 0 auto;

        label {
            width: 100%;
            height: 30vh;
            max-height: 350px;
            transition: 1s;
            padding: 20px 35px;
            position: relative;
            display: flex;
            align-items: flex-start;
            flex-direction: column;
            justify-content: flex-start;
            margin: 0 0 2.5rem;
            border-radius: 20px;
            overflow: hidden;
            transition: 1s;

            &:nth-child(1) {
                background: url('./images/bg2.webp') 30%;
                background-size: cover;
            }
            &:nth-child(2) {
                background: url('./images/bg3.webp') 30%;
                background-size: cover;
            }
            &:nth-child(3) {
                background: url('./images/bg4.webp') 30%;
                background-size: cover;
            }
            &:nth-child(4) {
                background: url('./images/bg5.webp') 30%;
                background-size: cover;
            }
            &:nth-child(5) {
                background: url('./images/bg6.webp') 30%;
                background-size: cover;
            }

            &::before {
                content: '';
                display: block;
                width: 100%;
                height: 100%;
                position: absolute;
                transition: 1s;
                top: 0;
                left: 0;
                background: rgba(0, 0, 0, .6);
            }

            span,
            h3,
            button,
            p {
                position: relative;
                z-index: 2;
            }

            span {
                opacity: 0;
                font-size: 1.3rem;
                color: var(--light);
                top: 20px;
                transition: 0.5s;
                position: absolute;

                strong {
                    font-size: 1.5rem;
                }
            }

            h3 {
                color: var(--light);
                margin: 20px 0;
                font-size: 1.5rem;
                color: var(--light);
                width: 100%;
                transition: 1s;
                display: flex;
                justify-content: flex-start;
            }

            .description {
                color: var(--light);
                height: 2px;
                width: 100%;
                background: var(--light);
                overflow: hidden;
                margin: 15px 0;
                font-size: 1.2rem;
                transition: 0s;
                max-width: 700px;
            }

            .help-text {
                transition: .5s;
                font-size: 1.2rem;
                color: var(--light);
            }
        }
    }

    input[type=radio]:checked {
        &:nth-of-type(1)~.wrapper label:nth-child(1) {
            height: 600px;
            max-height: 600px;

            &::before {
                content: '';
                background: rgba(0, 0, 0, .8);
            }

            span {
                opacity: 1;
            }

            h3 {
                margin: 60px 0 10px;
            }

            .description {
                height: auto;
                background: transparent;
            }

            .help-text {
                opacity: 0;
                height: 0;
            }

        }

        &:nth-of-type(2)~.wrapper label:nth-child(2) {
            height: 600px;
            max-height: 600px;

            &::before {
                content: '';
                background: rgba(0, 0, 0, .7);
            }

            span {
                opacity: 1;
            }

            h3 {
                margin: 60px 0 10px;
            }

            .description {
                height: auto;
                background: transparent;
            }

            .help-text {
                opacity: 0;
                height: 0;
            }

        }

        &:nth-of-type(3)~.wrapper label:nth-child(3) {
            height: 600px;
            max-height: 600px;

            &::before {
                content: '';
                background: rgba(0, 0, 0, .7);
            }

            span {
                opacity: 1;
            }

            h3 {
                margin: 60px 0 10px;
            }

            .description {
                height: auto;
                background: transparent;
            }

            .help-text {
                opacity: 0;
                height: 0;
            }

        }

        &:nth-of-type(4)~.wrapper label:nth-child(4) {
            height: 600px;
            max-height: 600px;

            &::before {
                content: '';
                background: rgba(0, 0, 0, .7);
            }

            span {
                opacity: 1;
            }

            h3 {
                margin: 60px 0 10px;
            }

            .description {
                height: auto;
                background: transparent;
            }

            .help-text {
                opacity: 0;
                height: 0;
            }

        }

        &:nth-of-type(5)~.wrapper label:nth-child(5) {
            height: 600px;
            max-height: 600px;

            &::before {
                content: '';
                background: rgba(0, 0, 0, .7);
            }

            span {
                opacity: 1;
            }

            h3 {
                margin: 60px 0 10px;
            }

            .description {
                height: auto;
                background: transparent;
            }

            .help-text {
                opacity: 0;
                height: 0;
            }

        }
    }
}


@keyframes banner {
    0% {
        left: 0;
    }

    10% {
        left: 0%;
    }

    20% {
        left: -20%;
    }

    30% {
        left: -20%;
    }

    40% {
        left: -40%;
    }

    50% {
        left: -40%;
    }

    60% {
        left: -60%;
    }

    70% {
        left: -60%;
    }

    80% {
        left: -80%;
    }

    90% {
        left: -80%;
    }

    95% {
        left: -80%;
        opacity: 1;
    }

    97% {
        left: -80%;
        opacity: 0;
    }

    97.5% {
        left: 0%;
        opacity: 0;
    }

    98% {
        left: 0%;
        opacity: 1;
    }

    100% {
        opacity: 1;
        left: 0%;
    }
}

#health-articles {
    width: 100%;
    overflow: hidden;

    * {
        transition: 0.5s;
    }

    h2 {
        color: var(--primary);
    }

    input[type=radio]:checked {
        &#card1~.wrapper {
            ul {
                left: 300px;

                li:nth-child(1) {
                    transform: scale(1.1, 1.2);
                    z-index: 2;

                    .text {
                        bottom: 0;
                    }
                }
            }
        }

        &#card2~.wrapper {
            ul {
                left: 0%;

                li:nth-child(2) {
                    transform: scale(1.1, 1.2);
                    z-index: 2;

                    .text {
                        bottom: 0;
                    }
                }
            }
        }

        &#card3~.wrapper {
            ul {
                left: -300px;

                li:nth-child(3) {
                    transform: scale(1.1, 1.2);
                    z-index: 2;

                    .text {
                        bottom: 0;
                    }
                }
            }
        }
    }

    .wrapper {
        height: 60vh;
        max-height: 600px;
        margin-bottom: 20px;
        position: relative;
        margin: 80px 20px;

        ul {
            width: 100%;
            max-width: 100%;
            display: flex;
            justify-content: center;
            align-items: center;
            gap: 20px;
            position: absolute;
            top: 0;
	        left: 0;

            li {
                &:nth-child(1) .card{
                    background: url('./images/bg7.webp') 30%;
                    background-size: cover;
                }
                &:nth-child(2) .card{
                    background: url('./images/bg8.webp') 50%;
                    background-size: cover;
                }
                &:nth-child(3) .card{
                    background: url('./images/bg9.webp') 20%;
                    background-size: cover;
                }
            }
        }

        .card {
            width: 75vw;
            max-width: 350px;
            height: 60vh;
            max-height: 600px;
            border-radius: 20px;
            position: relative;
            background: var(--primary);
            display: flex;
            align-items: flex-end;
            box-shadow: 2px 2px 15px rgba(22, 22, 29, 0.4);

            .content {
                display: flex;
                flex-wrap: wrap;
                gap: 15px;
                padding: 40px 20px 20px;
                background: var(--light);
                border-radius: 0 0 15px 15px;

                .title {
                    font-size: 1.2rem;
                    width: 100%;
                    color: var(--secondary);
                }

                .description {
                    font-weight: 400;
                    color: var(--dark);
                }
            }
        }
    }
}

#faq {
    width: 100%;
    background: var(--tertiary);
    overflow: hidden;

    h2 {
        margin-bottom: 0;
    }

    .questions {
        display: flex;
        width: 500%;
        overflow: hidden;
        padding: 10px 0;

        .question {
            width: 100%;
            display: flex;
            align-items: center;
            padding: 0 20px 20px;
            position: relative;
            animation: banner 25s infinite;

            .pipe {
                padding: 1px;
                height: 50%;
                margin: 0 30px 0 10px;
                background: var(--secondary);
            }

            .question-wrapper {
                display: flex;
                flex-wrap: wrap;
                align-items: center;
                gap: 10px;

                .dot {
                    display: block;
                    width: 30px;
                    height: 30px;
                    border-radius: 50%;
                    background: var(--secondary);
                }

                h3 {
                    color: var(--secondary);
                    gap: 15px;
                    font-size: 1.1rem;
                    width: calc(100% - 40px - 15px);
                }

                .answer {
                    width: calc(100% - 42px);
                    color: var(--dark);
                    font-weight: 600;
                }
            }

        }
    }
}

footer {
    width: 100%;
    background: var(--secondary);
    border-radius: 20px 20px 0 0;
    padding: 40px 20px 30px;
    display: flex;
    flex-wrap: wrap;
    justify-content: center;

    h2 {
        color: var(--light);
        width: 100%;
    }

    form {
        display: flex;
        flex-wrap: wrap;
        max-width: 500px;

        label {
            width: 100%;

            &:last-of-type {
                margin-bottom: 30px;
            }

            input {
                min-height: 36px;
                width: 100%;
                background: transparent;
                font-size: 1.2rem;
                color: var(--light);
                border-bottom: 2px solid var(--light);
                margin: 10px 0;

                &::placeholder {
                    font-size: 1.2rem;
                    color: var(--light);
                }
            }
        }

        button {
            width: 100%;
            border-radius: 6px;
            background: var(--light);
            padding: 10px;
            font-size: 1.2rem;
            font-weight: 600;
        }
    }

    .social {
        width: 100%;
        max-width: 400px;
        padding: 40px 0 0;

        h3 {
            width: 100%;
            text-align: center;
            font-size: 1.4rem;
            font-weight: 400;
            margin: 15px;
            color: var(--light);
        }

        .e-number {
            font-size: 2rem;
            width: 100%;
            text-align: center;
            color: var(--light);
            margin-bottom: 40px;
        }

        .links {
            width: 100%;
            display: flex;
            justify-content: center;
            gap: 20px;

            a {
                width: 48px;
                height: 48px;

                svg {
                    width: 100%;
                    fill: var(--light);
                }
            }
        }
    }
}

@media (min-width: 1200px) {

    #specialties {

        input[type=radio]:checked {
            &~.wrapper label {
                min-height: 250px;
            }

            &:nth-of-type(1)~.wrapper {
                grid-template-areas:
                    "main main box1 box2"
                    "main main box3 box4";

                label:nth-child(1) {
                    height: 100%;
                    grid-area: main;
                }
            }

            &:nth-of-type(2)~.wrapper {
                grid-template-areas:
                    "box1 main main box2"
                    "box3 main main box4";

                label:nth-child(2) {
                    height: 100%;
                    grid-area: main;
                }
            }

            &:nth-of-type(3)~.wrapper {
                grid-template-areas:
                    "box1 main main box2"
                    "box3 main main box4";

                label:nth-child(3) {
                    height: 100%;
                    grid-area: main;
                }
            }

            &:nth-of-type(4)~.wrapper {
                grid-template-areas:
                    "box1 main main box2"
                    "box3 main main box4";

                label:nth-child(4) {
                    height: 100%;
                    grid-area: main;
                }
            }

            &:nth-of-type(5)~.wrapper {
                grid-template-areas:
                    "box1 box2 main main"
                    "box3 box4 main main";

                label:nth-child(5) {
                    height: 100%;
                    grid-area: main;
                }
            }
        }

        .wrapper {
            transition: 1s;
            width: 100%;
            display: grid;
            grid-template-columns: 1fr 1fr 1fr 1fr;
            grid-template-rows: auto;
            grid-template-areas:
                "header header box1 box2"
                "header header box3 box4";
            gap: 30px;

            label {
                width: 100%;
                height: 100%;
                margin: 0;
            }
        }
    }

    #health-articles {

        .wrapper {
            margin: 80px 60px;

            ul {
                width: 100%;
                max-width: 100%;
                gap: 30px;

                .card {
                    max-width: 380px;
                }
            }
        }

        input[type=radio]:checked {
                &#card1~.wrapper {
                    ul {
                        left: 20%;
                    }
                }

                &#card2~.wrapper {
                    ul {
                        left: 0;
                    }
                }

                &#card3~.wrapper {
                    ul {
                        left: -20%;
                    }
                }
            }
        }
    }
}