/*
    Hero Section
*/

#hero>div {
    justify-content: space-between;
    align-items: center;
    display: flex;
    background-color: rgb(var(--c-cream-light));
    overflow: hidden;
    border-radius: 0 0 40px 40px;
    padding: 40px 40px 80px 60px;
}

#hero .left {
    width: 50%;
    max-width: 590px;
    flex-shrink: 0;
}

#hero h1 {
    margin-bottom: 20px;
}

#hero__p {
    font-size: 22px;
    margin-bottom: 80px;
}

#hero__buttons {
    display: flex;
    gap: 16px;
}

#hero .right {
    width: 50%;
    border-radius: 6px;
    overflow: hidden;
}

#hero .right img {
    width: 100%;
    height: auto;
    object-position: center;
}

#hero-ellipse-large,
#hero-ellipse-small {
    animation: hero-ellipse-large 4s ease infinite;
}

@keyframes hero-ellipse-large {
    0% {
        transform: scale(1);
    }

    50% {
        transform: scale(1.1);
    }

    100% {
        transform: scale(1);
    }
}

h2 {
    margin-bottom: 24px;
}

/*
    Our Services Section
*/

#our-services {
    margin-top: 100px;
}

#our-services h2 {
    margin-bottom: 12px;
}

#our-services .underline {
    height: 4px;
    width: 60%;
    max-width: 180px;
    background-color: rgb(var(--blue-color-second));
    border-radius: 4px;
    margin: 0 auto;
    margin-bottom: 16px;
}

#services {
    width: 100%;
    display: flex;
    justify-content: space-between;
    margin-top: 60px;
}

#services .service {
    width: 15%;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
}

#services .icon {
    width: 160px;
    height: 160px;
    object-fit: cover;
    object-position: center;
    background-color: rgb(var(--blue-color-second));
    border-radius: 160px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: transform 0.23s ease, background-color 0.3s ease;
}

#services .service:hover .icon {
    background-color: rgb(var(--blue-color-hover));
    transform: scale(1.04);
}

#services .icon img {
    width: 50%;
    height: 50%;
}

#services h3 {
    font-size: 18px;
    line-height: 1.5em;
    font-weight: 600;
    color: rgb(var(--blue-color-main));
    text-align: center;
}

/* New Services Section */

:root {
    --container: min(1100px, 92vw);
    --top: 10vh;
    /* sticky offset */
    --cardH: 311px;
    /* card height */
    --cardGap: 16px;
    /* spacing */
    --stackStep: 14px;
    /* how much each next card is lower while stacked */
    --radius: 18px;
}

body {
    margin: 0;
    font-family: system-ui, Arial;
    background: #f4f1eb;
    color: #2a2320;
}

.services {
    padding: 12vh 0 20vh;
}

#our-services .section-inner {
    display: flex;
    justify-content: space-between;
    gap: clamp(40px, 6vw, 80px);
}

.services__grid {
    width: var(--container);
    margin: 0 auto;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: clamp(24px, 4vw, 60px);
    align-items: start;
}

/* Right side sticky text */
.services__sticky-text {
    position: sticky;
    top: 40%;
    padding: 12px 0;
    display: flex;
    flex-direction: column;
    align-items: flex-end;
}

.services__sticky-text h2 {
    font-size: 64px;
    line-height: 1.1em;
    text-align: right;
}

.services__sticky-text h2 span {
    color: rgb(var(--c-brown));
}

.services__sticky-text p {
    font-size: 28px;
    line-height: 1.5em;
    text-align: right;
    max-width: 500px;
}

/* Left side cards stack */
.services__left {
    width: 60%;
    /* creates enough scroll room for stickies to feel good */
}

.svc-card {
    height: var(--cardH);
    width: 95%;
    border-radius: var(--radius);
    background: #d9d4cc;
    border: 1px solid rgba(0, 0, 0, .08);
    padding: 60px 72px;

    /* position: sticky;
  top: var(--top); */

    display: flex;
    align-items: center;
    gap: 32px;
    font-weight: 650;
    letter-spacing: .2px;
}

/* Make them overlap + sit above each other */
.svc-card:nth-child(1) {
    top: calc(var(--top) + 0 * var(--stackStep));
    z-index: 1;
    margin-left: 0;
}

.svc-card:nth-child(2) {
    top: calc(var(--top) + 1 * var(--stackStep));
    z-index: 2;
    margin-left: 1%;
}

.svc-card:nth-child(3) {
    top: calc(var(--top) + 2 * var(--stackStep));
    z-index: 3;
    margin-left: 2%;
}

.svc-card:nth-child(4) {
    top: calc(var(--top) + 3 * var(--stackStep));
    z-index: 4;
    margin-left: 3%;
}

.svc-card:nth-child(5) {
    top: calc(var(--top) + 4 * var(--stackStep));
    z-index: 5;
    margin-left: 4%;
}

.svc-card:nth-child(6) {
    top: calc(var(--top) + 5 * var(--stackStep));
    z-index: 6;
    margin-left: 5%;
}

/* spacing between cards in normal flow */
.svc-card:not(:last-child) {
    margin-bottom: var(--cardGap);
}

.svc-card-text {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.svc-card-text h3 {
    font-size: 36px;
    line-height: 1.25em;
    color: rgb(var(--c-brown));
}

.svc-card-text p {
    font-size: 20px;
    line-height: 1.35em;
    font-weight: 500;
}

.svc-card-text a {
    font-size: 20px;
    font-weight: 600;
    color: rgb(var(--c-brown));
    text-decoration: none;
}


/* Mobile: make it 1 column, sticky text above */
@media (max-width: 860px) {
    .services__grid {
        grid-template-columns: 1fr;
    }

    .services__right .sticky-copy {
        position: relative;
        top: auto;
    }

    .svc-card {
        position: relative;
        top: auto;
        margin-left: 0 !important;
        width: 100%
    }
}

/* 
    About Us Section
*/

#about-us,
#giving-smile {
    margin-top: 100px;
    padding: 0 120px;
}

#about-us>div,
#giving-smile>div {
    display: flex;
    justify-content: space-between;
    align-items: center;
    max-width: 1680px;
    height: 100%;
    min-height: 500px;
    margin: 0 auto;
    border-radius: 24px;
    padding: 10px 20px 10px 40px;
    background-color: rgb(var(--gray-color));
}

#giving-smile>div {
    padding: 10px 40px 10px 20px;
}

#about-us p,
#giving-smile p {
    font-size: 18px;
}

#about-us .left,
#giving-smile .right {
    width: 35%;
    flex-shrink: 0;
}

#about-us h2,
#giving-smile h2 {
    text-align: left;
}

#about-us .right,
#giving-smile .left {
    width: 50%;
    border-radius: 24px;
    overflow: hidden;
}

#about-us .right img,
#giving-smile .left img {
    width: 100%;
    height: auto;
    aspect-ratio: 873 / 541;
    object-fit: cover;
    object-position: center;
}

#about-us button {
    margin-top: 24px;
}

#why-choose-us {
    border-radius: 0 0 24px 24px;
    z-index: 2;
    position: relative;
    background-color: #f4f1eb;
}

#book-a-visit {
    margin-top: -20px;
}

footer {
    margin-top: -20px;
    z-index: 2;
    position: relative;
}

/* 
    Responsive
*/

@media screen and (max-width: 1400px) {
    #hero {
        padding: 0;
    }
}

@media screen and (max-width: 1200px) {
    #our-services .section-inner {
        display: flex;
        flex-direction: column-reverse;
        align-items: center;
    }
    
    .services__sticky-text {
        position: relative;
        align-items: center;
    }

    .services__sticky-text h2 {
        text-align: center;
    }

    .services__sticky-text p {
        max-width: 800px;
        text-align: center;
        font-size: 20px;
    }

    .services__left {
        width: 100%;
        display: grid;
        grid-template-columns: 1fr 1fr;
        gap: 16px;
    }

    .svc-card {
        width: 100% !important;
        position: relative !important;
        top: 0 !important;
        z-index: 1 !important;
        margin-left: 0 !important;
        margin-bottom: 0 !important;
        width: 100% !important;
        height: auto !important;
        padding: 40px 24px !important;
    }

    .svc-img-container {
        width: 100px;
        height: 100px;
        flex-shrink: 0;
    }

    .svc-img-container img {
        width: 100%;
        height: 100%;
        object-fit: contain;
    }

    .svc-card-text h3 {
        font-size: 24px;
    }

    .svc-card-text p {
        font-size: 16px;
    }

    .svc-card-text a {
        font-size: 16px;
    }
}

@media screen and (max-width: 1024px) {

    h1 {
        font-size: 40px;
        line-height: 1.2em;
    }

    .subp {
        font-size: 20px;
    }

    #hero__p {
        margin-bottom: 40px;
    }


    #hero .section-inner {
        display: flex;
        flex-direction: column-reverse;
        row-gap: 24px;
        padding: 24px 40px 60px;
    }

    #our-services {
        margin-top: 60px;
    }

    #hero .left {
        width: 100%;
        max-width: 900px;
    }

    #hero .right {
        width: 100%;
        max-height: 500px;
    }

    #services {
        flex-wrap: wrap;
        justify-content: center;
    }

    #services .service {
        width: 30%;
        margin-bottom: 40px;
    }

    #our-services h2 {
        font-size: 36px;
        line-height: 1.5em;
        text-align: center;
    }

    #our-services h2 span {
        padding-right: 8px;
    }

    #our-services h2 br {
        display: none;
    }

    #our-services h2 br::after {
        content: " ";
        margin-right: 8px;
        display: inline-block;
    }
}

@media screen and (max-width: 850px) {
    .services__left {
        display: flex;
        flex-direction: column;
        width: 100%;
    }

    .svc-card {
        flex-direction: column;
    }

    .svc-card-text {
        width: 100%;
    }

    .services__sticky-text h2 {
        font-size: 48px;
    }
}

@media screen and (max-width: 768px) {

    #hero .section-inner {
        flex-direction: column-reverse;
        align-items: center;
        padding-bottom: 60px;
    }

    #hero .left {
        width: 100%;
        margin-bottom: 0px;
        padding: 0 12px;
    }

    #hero h1 {
        font-size: 30px;
        line-height: 1.5em;
        margin-bottom: 24px;
    }

    #hero h1 br {
        display: none;
    }

    #hero__p {
        font-size: 18px;
        line-height: 1.5em;
        margin-bottom: 24px;
    }

    #hero .sa__button {
        font-size: 14px;
        padding: 12px 20px;
    }

    #hero__buttons {
        gap: 12px;
    } 

    .subp {
        font-size: 14px;
        text-align: center;
    }

    #hero .subp {
        margin: 0 40px;
    }

    #hero .right {
        width: 100%;
        padding-top: 0;
    }

    #hero #images {
        overflow: hidden;
    }

    #hero #images * {
        position: absolute;
        width: 110%;
        height: 107%;
        object-position: right bottom;
        right: 0;
        top: 0;
        transform-origin: top center;
    }

    #hero #hero-ellipse-illustration {
        width: 80%;
        height: 80%;
        right: 12%;
        top: 10%;
    }

    h2 {
        font-size: 24px;
        line-height: 1.5em;
        text-align: center;
        margin-bottom: 12px;
    }

    #about-us>div {
        flex-direction: column-reverse;
        padding: 18px 14px;
        min-height: 0;
    }

    #about-us .left {
        width: 100%;
        margin-bottom: 0;
        text-align: center;
    }

    #about-us .left p {
        font-size: 14px;
        line-height: 1.5em;
    }

    #about-us button {
        width: 100%;
    }

    #about-us h2 {
        text-align: center;
    }

    #about-us .right {
        width: 100%;
        border-radius: 0;
        margin-bottom: 24px;
    }

    #about-us .right img {
        max-width: 500px;
        height: auto;
        border-radius: 12px;
        margin: 0 auto;
        display: block;
    }

    #giving-smile>div {
        flex-direction: column;
        padding: 18px 14px;
        min-height: 0;
    }

    #giving-smile .right {
        width: 100%;
        margin-bottom: 0;
        text-align: center;
    }

    #giving-smile .right p {
        font-size: 14px;
        line-height: 1.5em;
    }

    #giving-smile button {
        width: 100%;
    }

    #giving-smile h2 {
        text-align: center;
    }

    #giving-smile .left {
        width: 100%;
        border-radius: 0;
        margin-bottom: 24px;
    }

    #giving-smile .left img {
        max-width: 500px;
        height: auto;
        border-radius: 12px;
        margin: 0 auto;
        display: block;
    }

    #services {
        justify-content: space-between;
        margin-top: 40px;
    }

    #services .service {
        width: 48%;
    }

    #services .icon {
        width: 120px;
        height: 120px;
    }

    #services h3 {
        font-size: 16px;
    }

    #our-services,
    #about-us,
    #giving-smile {
        margin-top: 40px;
    }

    #our-services .underline {
        height: 3px;
        margin-bottom: 8px;
        width: 40%;
    }

    
}

@media screen and (max-width: 500px) {

    #hero .section-inner {
        padding: 16px 16px 40px;
        border-radius: 0 0 24px 24px;
    }

    #services .icon {
        width: 100px;
        height: 100px;
    }

    #services h3 {
        font-size: 16px;
    }

    #hero__buttons > * {
        width: 50%;
    }

    .why-choose-us-card img {
        width: 100px;
        height: 100px;
        margin: 24px 0;
    }
}

@media screen and (max-width: 400px) {
   #hero__buttons {
        flex-direction: column;
        width: 100%;
   }

   #hero__buttons > * {
        width: 100%;
    }
}