/*  Built by Dante Porzia Capella | Webdeveloper - danteporziacapella@outllook.com.br

    The code in this file was initially built as an experiment and evolved into a bigger project afterwards. It does have it's flaws.

    It lacks versioning and it's structure could be better as it wasn't born as Mobile First.

    Thus, lots of adjustments were made through media queries in order to fit the webpage inside different screen sizes.
        For lack of awareness and for it's initial experimental nature, it is what it is. There are plans for optimization updates.
   
    The following segment aims to summarize the code's block order. Note that there will be some exceptions.
        E.g.: service cards are buttons, but aren't placed within the appropriate Block (3). All can be found together with the services layout
            segments inside Block 2 for better visualisation and easier management.
*/

/* =============================================================================================================================================

    Block order (changes might have been made, so line number may vary)

    -> BLOCK 1: GLOBAL STYLES & MACRO STRUCTURE (line 31+)

    -> BLOCK 2: PAGE SECTIONS & COMPONENT LAYOUT (line 161+)

    -> BLOCK 3: BUTTON COMPONENTS & ELEMENTS (line 710+)

    -> BLOCK 4: MOBILE RESPONSIVE CONFIGURATIONS (line 785+)

   =============================================================================================================================================*/


/* =============================================================================================================================================
   BLOCK 1: GLOBAL STYLES & MACRO STRUCTURE
    Configurations for the macro structure and base defaults of the page.
   ============================================================================================================================================= */

/* ================
    Root Variables
   ================*/
:root {
    --primary-color: #3d3226;           /* Marrom Café */
    --secondary-color: #d8d2c4;         /* Bege Acinzentado */
    --primary-overlay: #faf8f5;         /* Creme Suave */
    --hero-overlay: #f8f0e3;
    --background-standard: #efe4d7;     /* Soft Cream */
    --secondary-background: #f7f0e2;    /* Linho */
    --accent-color: #a6533c;            /* Terracota */
    --link--accent-color: #0b23db;
    --text-color: #f8f7f2;              
    --light-bg: #f8fbff;                /* Very faint blue */
    --white: #ffffff;
    --shadow-standard: #28282B;
    
    --primary-font: "Spectral", serif;
    --secondary-font: "Poppins", sans-serif;

    --font-size-h123: clamp(0.8rem, calc(0.8rem + (3 - 0.8) * ((100vw - 20rem) / 140)), 3rem);
    --font-size-h456: clamp(0.8rem, calc(0.8rem + (2.5 - 0.8) * ((100vw - 20rem) / 140)), 2.5rem);
    --font-size-p: clamp(1rem, calc(1rem + (1.5 - 1) * ((100vw - 20rem) / 140)), 1.5rem);
}

/* ===============
    Global Resets
   ===============*/

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

/* =============================
    Base Document Configuration
   =============================*/

html {
    scroll-behavior: smooth;
    scroll-padding-top: 100px; /* Adjust this value based on your header height */
}

body {
    font-family: var(--secondary-font);
    color: var(--text-color);
    background: var(--hero-overlay);
    font-size: var(--font-size-p);
}

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


/* ====================
    Layout Containers
   ====================*/

.container {
    max-width: 1560px;
    margin: 0 auto;
    padding: 0 20px;
}

/* =============================
    Section & Container Spacing
   =============================*/

section {
    padding: 60px 0;
}

.section-spacer {
    padding-bottom: 50px;
}

.container-spacer {
    margin-top: 10px;
    margin-bottom: 10px;
}

.container-services {
    padding-inline: 15%;
    padding-top: 20px;
    padding-bottom: 50px;
    max-width: 100%;
    background-color: var(--background-standard);
}

/* ================================================
    Typography Alignment & Sizing for Header Texts
   ================================================*/

h1, h2, h3, h4, h5, h6 {
    color: var(--primary-color);
    text-align: center;
    font-size: var(--font-size-h123);
}

h2 {
    margin-bottom: 40px;
}

h3 {
    margin-bottom: 15px;
}

h4 {
    font-size: var(--font-size-h456);
    margin-bottom: 15px;
}

h5 {
    font-size: var(--font-size-h456);
    margin-bottom: 10px;
}

h6 {
    font-size: var(--font-size-h456);
    margin-bottom: 10px;
}

/* =============================================================================================================================================
   BLOCK 2: PAGE SECTIONS & COMPONENT LAYOUT
    Organization of specific page sections and their inner structural elements.
   ============================================================================================================================================= */

/* ============================
    Header & Navigation Layout
   ============================*/

header {
    background-color: var(--background-standard);
    box-shadow: 0px 3px 10px var(--shadow-standard);
    width: 100%;
    position: fixed;
    top: 0;
    z-index: 1000;
}

.nav-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.5rem 6rem;
    width: 100%;
}

.logo {
    display: flex;
    align-items: center;

    & h1 {
        font-weight: bold;
    }
}

.nav-list {
    display: flex;
    align-items: center;

    & ul {
        display: flex;
        justify-content: center;
        list-style: none;
    }
}

.nav-item {
    margin: 0 15px;
}

.nav-link {
    font-weight: 400;
    display: block;
    border-radius: 20px;
    padding: 0.5rem 1rem;
    color: var(--accent-color);
    font-family: var(--secondary-font);
    text-decoration: none;
    text-align: center;
    transition: color 0.3s;
    
    &:hover {
        background: var(--accent-color);
        color: var(--text-color);
        text-decoration: underline;
        text-underline-offset: 5px;
    }
}

.mobile-menu-icon {
    display: none;
    padding: 7px;
    scale: 2;

    & button {
        color: var(--accent-color); 
    }
}

.mobile-menu {
    display: none;
}

nav {
    display: flex;
    flex-shrink: 1;
}

.nav {
    display: flex;
    list-style: none;
    flex-flow: row nowrap;
    justify-content: center;
    margin: 0;

    & a {
    display: block;
    border-radius: 20px;
    padding: 0.5rem 1rem;
    color: var(--accent-color);
    font-family: var(--secondary-font);
    text-decoration: none;
    text-align: center;
    transition: color 0.3s;
    
        &:hover {
            background: var(--accent-color);
            color: var(--text-color);
            text-decoration: underline;
            text-underline-offset: 5px;
        }
    }
}

/* ============================
    Hero Section Layout
   ============================*/

#hero {
    background-size: cover;
    background-position: center;
    align-items: center;
    height: 80%;
    display: flex;
    flex-flow: row wrap;
    justify-content: center;
    text-align: center;
    color: var(--text-color);
    padding-top: 110px;
}

.hero-content {
    display: flex;
    flex-flow: column nowrap;
    justify-content: center;
    align-items: center;
    position: relative;
    overflow: hidden;
    height: auto;
    max-width: 50%;
    line-height: 30px;
    gap: 20px;
    padding: 2rem 1rem;
    margin: 0;

    & h1 {
        font-family: var(--primary-font);
        color: var(--primary-color);
        line-height: 60px;
        text-align: left;
        font-weight: 200;    
    }

    & p {
        color: var(--primary-color);
        text-align: left;
    }
}

.hero-image {
    display: flex;
    overflow: hidden;
    max-width: 75%;
    border-radius: 50px;
}

.hero-trunk {
    display: flex;
    flex-flow: row nowrap;
    align-items: stretch;
    justify-content: center;
    width: 100%;
    height: auto;
    gap: 10px;
}

.hero-box {
    display: block;
    align-content: center;
    background-color: var(--accent-color);
    border: 1px solid var(--primary-color);
    border-radius: 5px;
    margin: 0;
    width: 100%;

    & h6 {
        font-family: var(--secondary-font);
        color: var(--text-color);
        margin: 0;
        font-size: clamp(1rem, calc(0.8rem + (2 - 0.8) * ((100vw - 20rem) / 140)), 2rem);;
    }
}


/* =========================
    Meet Us Section Layouts
   =========================*/

#meet-us {
    padding-inline: 20px;
    padding-top: 30px;

    & h2 {
    font-weight: bold;
    }
}

.meet-us-grid {
    display: flex;
    flex-flow: column nowrap;
    justify-content: center;
    align-items: center;
}

.meet-us-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    background-color: var(--accent-color);
    border-radius: 10px;
    box-shadow: 5px 5px 6px var(--shadow-standard);
    max-width: 100%;
}

.meet-us-image {
    display: flex;
    height: auto;
    max-width: 840px;
    border-radius: 8px;
    overflow: hidden;      
    box-shadow: 1px 1px 6px var(--shadow-standard);
    position: relative;
    z-index: 2;

    & img {
        object-fit: cover;
    }
}

.meet-us-text {
    padding: 20px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    position: relative;
    max-width: 100%;
    color: var(--text-color);
    font: var(--secondary-font);

    & h3 {
        color: var(--text-color);
        font-size: clamp(0.8rem, calc(0.8rem + (2.4 - 0.8) * ((100vw - 20rem) / 140)), 2.4rem);
    }

    & h5 {
        color: var(--text-color);
        font-size: clamp(0.8rem, calc(0.8rem + (2 - 0.8) * ((100vw - 20rem) / 140)), 2rem);
    }

    & p {
        margin-bottom: 10px;
    }
}

/* =========================
    Services Section Layout
   =========================*/

.services-grid{
    display: grid;
    position: relative;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
    margin-top: 20px;
    background-color: var(--background-standard);
    place-items: center;
}

.container-services h2 {
    font-weight: bold;
}

.service-icon {
    display: block;
    height: auto;
    width: auto;
    margin-bottom: 20px;
}

.service-description {
    position: absolute;
    top: 0;
    left: 0;
    height: 100%;
    display: flex;
    flex-flow: column nowrap;
    align-items: center;
    justify-content: space-between;
    padding: 10px;
    color: var(--accent-color);
    font-family: var(--secondary-font);
    opacity: 0;
    transition: opacity 0.3s ease;
    z-index: 11;
    pointer-events: none;

    & h4 {
        opacity: 0;
    }

    & .header-contact-btn {
        background-color: var(--accent-color);
        color: var(--text-color);

        &:hover {
            background-color: var(--background-standard);
            color: var(--accent-color);
        }
    }

    & p {
        font-size: var(--font-size-p);
    }
}
.service-card.active {
    position: absolute;
    top: 0;
    left: 0;
    overflow: hidden;
    z-index: 10;
    padding: 10px;
    box-shadow: 0px 3px 10px var(--shadow-standard);
    min-height: calc(50% - 10px);
    min-width: 0;

    & h4 {
        display: none;
    }
}

.periodontics {
    grid-column: 1;
    grid-row: 1;

    .service-card.active& {
        width: calc(33.33% - 10px);
    }
}


.endodontics {
    grid-column: 2;
    grid-row: 1;

    .service-card.active& {
        width: calc(50% - 10px);
    }
}

.botox {
    grid-column: 3;
    grid-row: 1;

    .service-card.active& {
        width: 100%;
        min-height: inherit;
    }
}

.veneers {
    grid-column: 1;
    grid-row: 2;

    .service-card.active& {
        width: calc(33.33% - 10px);
        min-height: calc(100% - 10px);
    }
}

.whitening {
    grid-column: 2;
    grid-row: 2;

    .service-card.active& {
        width: calc(50% - 10px);
        min-height: calc(100% - 10px);
    }
}

.restoration {
    grid-column: 3;
    grid-row: 2;

    .service-card.active& {
        width: 100%;
        min-height: calc(100% - 10px);
    }
}

/* ====================================
    Services Section Button Components
   ====================================*/

.service-card {
    display: flex;
    position: relative;
    flex-flow: column nowrap;
    background: var(--secondary-background);
    color: var(--white);
    padding: 40px 20px;
    align-content: center;
    border-radius: 8px;
    border: 2px solid var(--accent-color);
    transition: transform 0.3s ease, background 0.3s ease;
    justify-content: space-between;
    min-height: 100%;
    min-width: 100%;
    overflow: hidden;
    z-index: 1;
    cursor: pointer;
    outline: none;

    &:hover {
        transform: scale(1.05);
    }

    & h4 {
        margin-bottom: 0;
        transition: opacity 0.3s ease;
        z-index: 1;
        color: var(--text-color);
    }

    &::before {
        content: '';
        position: absolute;
        top: 0;
        left: 0;
        width: 100%;
        height: 100%;
        background-color: var(--accent-color);
        transform: scale(1);
        transition: transform 0.5s ease;
        z-index: -1;
    }

    &::after {
        content: ''; 
        position: absolute;
        top: 0;
        left: 0;
        width: 100%;
        height: 100%;
        background-color: var(--secondary-background);
        opacity: 0;
        transition: opacity 0.3s ease;
        z-index: 2;
    }
}

.service-card.active::after {
    opacity: 1;
}

.service-card.active .service-description {
    position: relative;
    height: auto;
    opacity: 1;
    pointer-events: auto;

    & h4 {
        display: block;
        color: var(--accent-color);
        text-decoration: none;
        opacity: 1;
        margin-bottom: 20px;
    }

    & p {
        margin-bottom: 10px;
    }

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

.service-card.active .service-icon {
    display: none;
}

/* ==============================
    Footer Layout & Social links
   ==============================*/

footer {
    background: var(--accent-color);
    color: var(--text-color);
    padding: 30px 0 10px;
    margin-top: 40px;
    max-width: 100%;
}

.footer-content {
    display: flex;
    flex-flow: row nowrap;
    justify-content: space-between;
    align-items: center;
    padding-inline: 7%;
    margin: 0;
    max-width: 100%;
}

.footer-logo h1 {
    color: var(--text-color);
    font-size: var(--font-size-h123);
}

.footer-right h3 {
    text-align: left;
    color: var(--text-color);
    margin-bottom: 20px;
}

.social-links {
    display: flex;
    flex-flow: column nowrap;
    gap: 15px;
    text-align: left;
}

.social-icon {
    color: var(--text-color);
    text-decoration: none;
    transition: color 0.3s;

    &:hover {
        color: var(--link--accent-color);
    }
}

.footer-bottom {
    text-align: center;
    margin-top: 20px;
    padding-top: 10px;
    border-top: 1px solid #ffffff1a;
    font-size: 0.6rem;
}

/* =============================================================================================================================================
   BLOCK 3: BUTTON COMPONENTS & INTERACTIVE ELEMENTS
    Button styling and interactive element states.
   ============================================================================================================================================= */

/* =============================
    Header whatsapp link button 
   =============================*/
.header-contact-btn {
    display: block;
    cursor: pointer;
    align-content: center;
    height:fit-content;
    padding: 10px;
    border-top: 1px solid rgba(255, 255, 255, 0.3);
    border-bottom: 1px solid rgba(0, 0, 0, 0.1);
    background: transparent;
    color: var(--accent-color);
    border-radius: 50px;
    font-weight: bold;
    transition: 0.3s;
    font-size: 1.1rem;
    text-decoration: none;
    text-align: center;

    & h6 {
        margin: 0;
    }

    &:hover {
        background: var(--accent-color);
        color: var(--text-color);
    }
}

/* ===================================
    Hero Section whatsapp link button
   ===================================*/
.box-contato {
    cursor: pointer;
    font-weight: bold;
    width: 100%;

    &:hover {
        background: #25D366;
        border-color: var(--text-color);
        color: var(--text-color);
    }
}

/* ==============================================
    Whatsapp button for down-right screen corner
   ==============================================*/
.btn-whatsapp {
    position: fixed;
    width: 60px;
    height: 60px;
    bottom: 40px;
    right: 40px;
    background-color: #25D366;
    color: #ffffff;
    border-radius: 50px;
    text-align: center;
    align-content: center;
    justify-content: center;
    font-size: 30px;
    box-shadow: 1px 1px 2px #888;
    z-index: 1000;
    transition: transform 0.3s ease;

    &:hover {
        transform: scale(1.1);
    }
}

/* =============================================================================================================================================
   BLOCK 4: MOBILE RESPONSIVE CONFIGURATIONS
    Adjustments for different screen sizes and portable devices.
   ============================================================================================================================================= */

/* Screen adjustments */
   
@media (max-width: 1728px) {
    :root {
        --font-size-h123: clamp(1rem, calc(1rem + (2.2 - 1) * ((100vw - 20rem) / 140)), 2.2rem);
    }
}

@media (max-width: 1596px) {
    :root {
        --font-size-h123: clamp(1rem, calc(1rem + (2.1 - 1) * ((100vw - 20rem) / 140)), 2.1rem);
        --font-size-p: clamp(0.8rem, calc(0.8rem + (1.1 - 0.8) * ((100vw - 20rem) / 140)), 1.1rem);
    }
    .header-contact-btn {
        font-size: 0.9rem;
    }
    .hero-box{

        & h6{
            font-size: 1rem;
        }
    }
    .meet-us-grid {
        padding-inline: 5%;
    }
    .meet-us-image {
        max-width: 40%;
    }
}

@media (max-width: 1577px) {
    :root {
        --font-size-h123: clamp(0.9rem, calc(0.9rem + (1.8 - 0.9) * ((100vw - 20rem) / 140)), 1.8rem);
    }
}

@media (max-width: 1485px) {
    :root {
        --font-size-h123: clamp(1rem, calc(1rem + (2.5 - 1) * ((100vw - 20rem) / 140)), 2.5rem);
        --font-size-p: clamp(1rem, calc(1rem + (1.2 - 1) * ((100vw - 20rem) / 140)), 1.2rem);
    }
    header {
        flex-flow: column wrap;
        padding: 1rem;
    }
    .nav-bar {
        padding: 0.5rem 1rem;
    }
    .nav-item {
        display: none;
    }
    .nav-link {
        font-size: 1.3rem;
    }
    .header-contact-btn {
        display: none;
    }
    .mobile-menu-icon {
        display: block;

        & button {
            background-color: transparent;
            border: none;
            cursor: pointer;
        }
    }
    .mobile-menu {

        &.header-contact-btn {
            display: block;
            padding: 1rem 2rem;
        }

        & ul {
        display: flex;
        flex-flow: column nowrap;
        text-align: center;
        padding-bottom: 1rem;
        }
    }
    .mobile-menu .nav-item {
        display: block;
    }
    .nav-link {
        width: 100%;
        margin: 0;
        border-radius: 0;
        border-top: 1px solid rgba(255, 255, 255, 0.3);
        border-bottom: 1px solid rgba(0, 0, 0, 0.1);
    }
    .open {
        display: block;
    }
    #hero {
        height: auto;
    }
    .hero-image{
        max-width: 80%;
    }
    .hero-box {

        & h6 {
            font-size: clamp(0.8rem, calc(0.8rem + (1.2 - 0.8) * ((100vw - 20rem) / 140)), 1.2rem);
        }
    }
    #meet-us {
        padding-top: 20px;
    }
    .meet-us-grid {
        padding-inline: 10%;
    }
    .meet-us-item {
        flex-direction: row wrap;
        height: auto;
    }
    .meet-us-image {
        max-width: 50%;
    }
    .meet-us-text {
        padding: 20px;
    }
    .services-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    .service-description {
        position: absolute;
        justify-content: space-between;
        align-items: center;
        top: 0;
        left: 0;
        width: 100%;
        height: 100%;
        z-index: 3;
    }
    .service-card.active {
        position: absolute;
        top: 0;
        left: 0;
        min-height: calc(33.33% - 10px);
        overflow: hidden;
        z-index: 10;
        padding: 10px;
        box-shadow: 0px 3px 10px var(--shadow-standard);

        & h4 {
            display: none;
        }

        & p {
            font-size: var(--font-size-p);
        }

        & .header-contact-btn {
            display: block;
        }
    }
    .service-card.active .service-icon {
        display: none;
    }
    .periodontics {
        grid-column: 1;
        grid-row: 1;

        .service-card.active& {
            width: calc(50% - 10px);
        }
    }
    .endodontics {
        grid-column: 2;
        grid-row: 1;

        .service-card.active& {
            width: calc(100% - 10px);
        }
    }
    .botox {
        grid-column: 1;
        grid-row: 2;

        .service-card.active& {
            width: calc(50% - 10px);
            min-height: calc(50% - 10px);
        }
    }
    .veneers {
        grid-column: 2;
        grid-row: 2;

        .service-card.active& {
            width: calc(100% - 10px);
            min-height: calc(50% - 10px);
        }
    }
    .whitening {
        grid-column: 1;
        grid-row: 3;

        .service-card.active& {
            width: calc(50% - 10px);
            min-height: calc(100% - 10px);
        }
    }
    .restoration {
        grid-column: 2;
        grid-row: 3;

        .service-card.active& {
            width: calc(100% - 10px);
            min-height: calc(100% - 10px);
        }
    }
    footer {
        padding: 1rem;
        margin: 0;
    }
    .footer-content {
        padding: 0 1rem;
        flex-flow: row nowrap;
        align-items: center;
        gap: 30px;
        text-align: center;
    }
    .footer-right {
        margin: auto;
        
        & h3 {
        text-align: left;
        }
    }
}


@media screen and (max-width: 1414px) {
    :root {
        --font-size-h123: clamp(0.9rem, calc(0.9rem + (2.2 - 0.9) * ((100vw - 20rem) / 140)), 2.2rem);
        --font-size-p: clamp(0.8rem, calc(0.8rem + (1 - 0.8) * ((100vw - 20rem) / 140)), 1rem);
    }
    .meet-us-grid {
        padding-inline: 5%;
    }
    .meet-us-text {
        padding: 20px;
    }
    .meet-us-image {
        max-width: 50%;
    }
}

@media screen and (max-width: 1081px) {
    .hero-box {

        & h6 {
            font-size: clamp(0.8rem, calc(0.8rem + (1.1 - 0.8) * ((100vw - 20rem) / 140)), 1.1rem);;
        }
    }
}

/* Tablets */

@media screen and (max-width: 820px) {
    header {
        flex-flow: column wrap;
        padding: 1rem;
    }
    .nav-bar {
        padding: 1rem 1rem;
    }
    .nav-item {
        display: none;
    }
    .header-contact-btn {
        display: none;
        font-size: 0.9rem;
    }
    .mobile-menu-icon {
        display: block;

        & button {
            background-color: transparent;
            border: none;
            cursor: pointer;
        }
    }
    .mobile-menu {

        &.header-contact-btn {
            display: block;
            padding: 1rem 2rem;
        }

        & ul {
        display: flex;
        flex-flow: column nowrap;
        text-align: center;
        padding-bottom: 1rem;
        }
    }
    .mobile-menu .nav-item {
        display: block;
    }
    .nav-link {
        width: 100%;
        margin: 0;
        border-radius: 0;
        border-top: 1px solid rgba(255, 255, 255, 0.3);
        border-bottom: 1px solid rgba(0, 0, 0, 0.1);
    }
    .open {
        display: block;
    }
    #hero {
        height: auto;
    }
    .hero-box {

        & h6 {
            font-size: clamp(0.7rem, calc(0.7rem + (1 - 0.7) * ((100vw - 20rem) / 140)), 1rem);;
        }
    }
    #meet-us {
        padding-block: 20px;
    }
    .meet-us-item {
        flex-direction: column;
        max-width: 80%;
    }
    .meet-us-image {
        max-width: 100%;
    }
    .service-card {
        min-height: 100%;
    }
    .footer-content {
        flex-direction: column;
        align-items: center;
        text-align: center;
        gap: 30px;
    }
    .footer-right {
        text-align: left;
    }
    .footer-logo-image {
        display: none;
    }
    .btn-whatsapp {
        bottom: 25px;
        right: 25px;
    }
}

/* Mobile L */

@media (max-width: 600px) {
    :root {
        --font-size-h123: clamp(1.2rem, calc(1.2rem + (2 - 1.2) * ((100vw - 20rem) / 140)), 2rem);
        --font-size-p: clamp(0.8rem, calc(0.8rem + (1 - 0.8) * ((100vw - 20rem) / 140)), 1rem);        
    }
    #hero {
        flex-flow: column nowrap;
    }
    .hero-content {
        max-width: 80%;
    }
    .header-contact-btn {
        font-size: 0.8rem;
        padding: 5px;
    }
    .nav-link {
        font-size: 1rem;
    }
    #services {
        padding-inline: 2rem;
    }

}

@media (max-width: 480px) {
    h2 {
        margin: 10px;
    }
    header {
        flex-flow: column wrap;
        padding: 1rem;
    }
    #hero {
        padding-top: 90px;
    }
    .hero-box {

        & h6 {
            font-size:clamp(0.8rem, calc(0.8rem + (1 - 0.8) * ((100vw - 20rem) / 140)), 1rem);
        }
    }
    .container-services {
        padding-inline: 1rem;
    }
    .nav-bar {
        padding: 1rem 1rem;
    }
    .nav-item {
        display: none;
    }
    .header-contact-btn {
        display: none;
    }
    .mobile-menu-icon {
        display: block;

        & button {
            background-color: transparent;
            border: none;
            cursor: pointer;
        }
    }
    .mobile-menu {

        &.header-contact-btn {
            display: block;
            padding: 1rem 2rem;
        }

        & ul {
        display: flex;
        flex-flow: column nowrap;
        text-align: center;
        padding-bottom: 1rem;
        }
    }
    .mobile-menu .nav-item {
        display: block;
    }
    .nav-link {
        width: 100%;
        margin: 0;
        border-radius: 0;
        border-top: 1px solid rgba(255, 255, 255, 0.3);
        border-bottom: 1px solid rgba(0, 0, 0, 0.1);
    }
    .open {
        display: block;
    }
    #hero {
        display: flex;
        flex-flow: column nowrap;
        justify-content: center;
        height: auto;
        padding-top: 100px;
    }
    .hero-content {
        display: flex;
        height: auto;
        max-width: 90%;
        align-items: flex-start;
        justify-content: center;
        padding-inline: 0;
        padding-bottom: 1rem;

        & p {
            text-align: center;
        }
    }
    .hero-trunk {
        padding: 0;
        max-width: 100%;
    }
    .hero-box {
        padding: 0.5rem;
        align-items: center;
    }
    .hero-image {
        max-width: 100%;
    }
    .services-grid{
        display: grid;
        grid-template-columns: 1fr;
        grid-template-rows: repeat(6, 1fr);
        row-gap: 20px;
        margin-top: 20px;
        background-color: var(--background-standard);
        margin-inline: 1rem;
    }
    .service-description {
        position: absolute;
        justify-content: space-between;
        align-items: center;
        top: 0;
        left: 0;
        width: 100%;
        height: 100%;
        z-index: 3;
    }
    .service-card.active {
        position: absolute;
        top: 0;
        left: 0;
        overflow: hidden;
        z-index: 10;
        padding: 10px;
        box-shadow: 0px 3px 10px var(--shadow-standard);

        & h4 {
            display: none;
        }

        & .header-contact-btn {
            display: block;
        }
    }
    .service-card.active .service-icon {
        display: none;
    }
    .service-icon {
        scale: 0.8;
    }
    .periodontics {
        grid-column: 1;
        grid-row: 1;

        .service-card.active& {
            width: 100%;
            min-height: calc(16.67% - 10px);
        }
    }
    .endodontics {
        grid-column: 1;
        grid-row: 2;

        .service-card.active& {
            width: 100%;
            min-height: calc(20% - 10px);
        }
    }
    .botox {
        grid-column: 1;
        grid-row: 3;

        .service-card.active& {
            width: 100%;
            min-height: calc(25% - 10px);
        }
    }
    .veneers {
        grid-column: 1;
        grid-row: 4;

        .service-card.active& {
            width: 100%;
            min-height: calc(33.33% - 10px);
        }
    }
    .whitening {
        grid-column: 1;
        grid-row: 5;

        .service-card.active& {
            width: 100%;
            min-height: calc(50% - 10px);
        }
    }
    .restoration {
        grid-column: 1;
        grid-row: 6;

        .service-card.active& {
            width: 100%;
            min-height: calc(100% - 10px);
        }
    }
    .meet-us-grid {
        padding: 0;
    }
    .meet-us-item {
        max-width: 90%;
    }
    .meet-us-text {

        & h3 {
            font-size: 1rem;
        }
    }
    .btn-whatsapp {
        bottom: 20px;
        right: 15px;
        scale: 0.8;
    }
}

/* Mobile M & S */

@media (max-width: 400px) {
    :root {
        --font-size-h123: clamp(0.9rem, calc(0.9rem + (2 - 0.9) * ((100vw - 20rem) / 140)), 2rem);
        --font-size-h456: clamp(1rem, calc(1rem + (2 - 1) * ((100vw - 20rem) / 140)), 2rem);
        --font-size-p: clamp(0.8rem, calc(0.8rem + (1.1 - 0.8) * ((100vw - 20rem) / 140)), 1.1rem);
    }
    .section-spacer {
        padding-bottom: 10px;
    }
    .nav-bar {
        padding-inline: 0.5rem;
    }
    .nav-link {
        font-size: 1rem;
    }
    .mobile-menu-icon {
        display: block;

        & button {
            background-color: transparent;
            border: none;
            cursor: pointer;
        }
    }
    .hero-content {
        display: flex;
        flex-flow: column nowrap;
        height: auto;
        padding-inline: 2rem;
        align-items: flex-start;
        justify-content: center;
        padding-inline: 0;
        row-gap: 10px;

        & h1 {
            font-size: 1.3rem;
        }

        & p {
            text-align: center;
        }
    }
    .hero-trunk {
        max-width: 100%;
        margin: 0;
    }
    .hero-box {
        max-width: 50%;
    }
    .box-contato {
        max-width: 50%;
        padding: 0.7rem;
    }
    .container-services {
        padding-inline: 1rem;
    }
    .meet-us-text {
        padding: 1rem;
    }
    .btn-whatsapp {
        bottom: 15px;
        right: 15px;
        scale: 0.7;
    }
    #services {

        & h2 {
            font-size: 1.3rem;
        }
    }
    #meet-us {

        & h2 {
        font-size: 1.3rem;
        }
    }
    #footer {
        padding-inline: 0;
    }
    .footer-right {
        margin: 0;
        min-width: 276px;
    }
}
@media (max-width: 320px) {
    #header {
        padding: 0;
    }
    .hero-content h1 {
        line-height: 2;
    }
    .hero-box {
        line-height: normal;
    }
    .btn-whatsapp {
        bottom: 18px;
        right: 15px;
        scale: 0.7;
    }
    .meet-us-grid {
        padding: 0;
    }
}