/** 
 * Theme Name: Good Health Sumit
 * Author: dabaman
 * Version: 1.0.0
 */


:root {
    --text-color: #000;

    --primary-1: #F6F82F;
    --primary-2: #75D672;
    --primary-3: #FC6AD5;

    --light-primary-2:#e6f7e3;

    --secondary-1: #12AEF4;
    --secondary-2: #E46712;
    --secondary-3: #BD03FE;

    --border-radius: 8px;
    --grid-gap: clamp(1rem, 0.4681rem + 1.7021vw, 2rem);;

    
    --max-width: 1440px;


    --body-font: "Lato", sans-serif;
    --header-font: "League Spartan", sans-serif;
    --root-padding: 1.5rem;
}


body {
    padding: 0;
    font-optical-sizing: auto;
    font-size: 1rem;
    color: var(--text-color);
    font-family: var(--body-font);
    display: flex;
    flex-direction: column;
}

/* typography */
h1, h2, h3, h4, h5, h6 {
    font-family: var(--header-font);
    line-height: 1.1;
}

h1 {
    font-size: 2rem;
}

h2 {
    font-size: 1.75rem;
}
h3 {
    font-size: 1.5rem;
}
h4 {
    font-size: 1.25rem;
}
h5 {
    font-size: 1.125rem;
}

h6 {    
    font-size: 1rem;
}

a {
    text-underline-offset: 3px;
}

/* utility classes */
.grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(24rem, 1fr));
    gap: 1.5rem;
}

@media (max-width: 480px) {
    .grid {
        grid-template-columns: 1fr;
    }
}

.align-center {
    text-align: center;
}

[x-cloak] {
    display: none !important;
}

/* accessibility */
.skip-to-content {
    position: absolute;
    top: -100px;
    left: 0;
    z-index: 9999;
    padding: 1rem 1.5rem;
    background-color: var(--primary-yellow);
    color: var(--dark-color);
    text-decoration: none;
    font-weight: 700;
    border: 2px solid var(--dark-color);
}

.skip-to-content:focus {
    top: 0;
}

/* layout */

.main {
    margin-bottom: 4rem;
}

.container {
    width: 100%;
    max-width: var(--max-width);
    margin: 0 auto;
    padding: 0 var(--root-padding);
}

.container-fluid {
    padding: 0 var(--root-padding);
}

.narrow-content {
    max-width: calc(700px + var(--root-padding) * 2);
    margin: 0 auto;
}


/* links */
a {
    color: var(--text-color);
}


/* buttons */


.archive-link {
    text-decoration: none;
    font-size: 1rem;
    font-weight: bold;
    margin-top: 2rem;
    padding: .5rem 1rem;
    display: inline-block;
    display: inline-flex;
    align-items: center;
    gap: .5rem;
    border: 1px solid rgb(256 256 256 / 20%);
}

.archive-link:hover {
    background-color: var(--primary-red);
}


/* header */


.header {
    background: var(--light-primary-2);
}

.custom-logo-link {
    display: inline-block;
}

.custom-logo-link img {
    max-width: 90px;
}

.header__nav {
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    align-items: center;
    padding: var(--root-padding) 0;
    background-color: var(--background-color);
    border: 2px solid var(--light-blue);
    border-bottom: 1px solid;
    position: relative;
}



.header__menu {
    align-items: center;
    list-style: none;
    display: flex;
    margin: 0;
    padding: 0;
    gap: 1.5rem;
}

.header__menu a {
    text-decoration: none;
    text-transform: uppercase;
    font-family: var(--header-font);
    font-weight: 500;
    padding: 1rem 0;
    position: relative;
}

.header__menu a:after {
    content: '';
    display: block;
    height: 2px;
    width: 100%;
    background-color: var(--secondary-2);
    position: absolute;
    bottom: 0;
    left: 0;
    transform: scaleX(0);
    transform-origin: right;
    transition: transform 0.15s ease-in-out;
}

.header__menu a:hover:after,
.header__menu a:focus:after,
.header__menu .current-menu-item > a:after {
    transform: scaleX(1);
    transform-origin: left;
}

/* sub-menu */
.sub-menu {
    position: absolute;
    visibility: hidden;
    opacity: 0;
    transition: visibility 0.15s ease-in-out, opacity 0.15s ease-in-out;
}


@media (min-width: 768px) {
    .mobile-only {
        display: none !important;
    }
}
@media (max-width: 767px) {
    .desktop-only {
        display: none !important;
    }
}

/* search */
.header__search {
    display: flex;
    justify-content: right;
}
.header__search-button {
    background-color: black;
    border: none;
    cursor: pointer;
    padding: 0;
    margin: 0;
    outline: none;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 42px;
    height: 42px;
    border-radius: 50%;
    color: white;
}

.header__menu-toggle:focus-visible,
.header__search-button:focus-visible {
    outline: 1px solid;
}

/* search modal */
.search-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.8);
    padding: 3rem var(--root-padding);
}

.search-modal__content {
    width: 100%;
    max-width: 700px;
    margin: 0 auto;
    background-color: white;
    padding: .5rem 1rem;
    border-radius: 1rem;
    border: none;
    outline: none;
    background-color: white;
    color: var(--text-color);
}

.search-modal__form {
    position: relative;
}

.search-modal__icon {
    position: absolute;
    left: 0;
    top: 50%;
    transform: translateY(-50%);
    height: 40px;
    width: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.search-modal__input {
    width: 100%;
    padding: 1.5rem 0 1.5rem 3rem;
    border: none;
    outline: none;
    background-color: white;
    border-bottom: 1px solid #e5e7eb;
    font-weight: 600;
}

.search-modal__results {
    margin: 1rem 0;
    display: flex;
    flex-direction: column;
    gap: .5rem;
}

.search-modal__result-link {
    display: flex;
    flex-direction: column;
    padding: .75rem;
    border-radius: .5rem;
    text-decoration: none;
}

.search-modal__result-link:hover {
    background-color: var(--light-primary-2);
}

.search-modal__result-title {
    font-size: 1rem;
    font-weight: 600;
    margin: 0;
}

.search-modal__result-excerpt {
    color: #6b6f76;
    font-size: .9rem;
}

.search-modal__loading {
    animation: spin 1s linear infinite;
}
@keyframes spin {
    from {
        transform: rotate(0deg);
    }
    to {
        transform: rotate(360deg);
    }
}

.search-modal__no-results {
    color: black;
    padding: 1rem;
}


/* footer */
.footer {
    margin: 4rem 0 0 0;
    padding: 4rem 0;
    margin-top: auto;
    /* background: var(--light-primary-2) url(assets/img/footer-graphic.png) no-repeat top right; */
    background: var(--light-primary-2);
    /* background-size: 400px; */
}


.footer-columns {
    display: flex;
    align-items: center;
    gap: 2em;
    padding-bottom: 2em;
}

.home .footer-columns {
    border-top: 1px solid var(--primary-2);
    padding-top: 2em;
}

.footer-text {
    max-width: 450px;
    /* font-size: 28px; */
}

.footer-text p:last-child {
    margin-bottom: 0;
}

.footer-text p:first-child {
    margin-top: 0;
}

.footer-social {
    margin-left: auto;
    display: flex;
    gap: 1rem;
}

.footer__copyright {
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
}

.footer-logo-column {
    border-right: 1px solid var(--primary-2);
    padding-right: 2em;
}

.footer__logo {
    max-width: 160px;
}

.bottom-footer {
    border-top: 1px solid var(--primary-2);
    padding-top: 2em;
}


/* pages */
.page-header {
    display: flex;
    flex-direction: column;
    text-align: left;
    gap: 1rem;
    margin-bottom: 4rem;
    padding: 4em 0;
    background-color: var(--light-primary-2);
}

.page-header__title {
    font-size: 36px;
    margin: 0;
}


.page-header__description {
    font-size: 1.25rem;
}

.page-header__description p {
    margin: 0;
}

/* home */
body.home {
    background-color: var(--light-primary-2);
}

body.home :is(.header, .footer) {
    background-color: transparent;
}


/* home sections */

.latest-posts__grid {
    display: grid;
    grid-template-areas:
        "area2 area1 area1 area1 area4"
        "area3 area1 area1 area1 area5";
    gap: var(--grid-gap);
    margin-top: 3rem;
}


.latest-posts__grid > :nth-child(1) {
    text-align: center;
    grid-area: area1;
    display: flex;
    flex-direction: column;
    gap: 1rem;
    border-right: 1px solid;
    border-left: 1px solid;
    padding: 0 var(--grid-gap);
}

.latest-posts__grid > :nth-child(2) {
    grid-area: area2;
}

.latest-posts__grid > :nth-child(3) {
    grid-area: area3;
}

.latest-posts__grid > :nth-child(4) {
    grid-area: area4;
}

.latest-posts__grid > :nth-child(5) {
    grid-area: area5;
}

.latest-posts__grid > :nth-child(2) .post__excerpt,
.latest-posts__grid > :nth-child(3) .post__excerpt,
.latest-posts__grid > :nth-child(4) .post__excerpt,
.latest-posts__grid > :nth-child(5) .post__excerpt {
    display: none;
}

.latest-posts__grid > :nth-child(1) .post__title {
    font-size: 42px;
}

.latest-posts__grid > :nth-child(1) .post__meta {
    justify-content: center;
}

.latest-posts__grid > :nth-child(1) .post__image img {
    aspect-ratio: 16 / 10;
}

.latest-posts__grid > :not(:nth-child(1)) .post__image {
    margin-bottom: 1em;
}

.latest-posts__grid > :nth-child(2) .post__title,
.latest-posts__grid > :nth-child(3) .post__title,
.latest-posts__grid > :nth-child(4) .post__title,
.latest-posts__grid > :nth-child(5) .post__title {
    font-size: 24px !important;
}



.post-section__header {
    border-top: 1px solid;
    padding-top: 2rem;
    margin-top: 4rem;
    margin-bottom: 4rem;
}

.post-section__title {
    font-size: 18px;
    display: inline-flex;
    align-items: center;
    gap: .25rem;
    border: 1px solid;
    padding: 1rem 1rem;
    text-decoration: none;
    text-transform: uppercase;
    border-radius: 2em;
    font-weight: 500;
    font-family: var(--header-font);
}

.post-section__title span {
    text-box-trim: trim-both;
    display: block;
    line-height: 1;
    text-box-edge: cap alphabetic;
}


.layout-01  .post-section_grid{
    display: grid;
    grid-template-areas: "large  small-1"
                         "large  small-2"
                         "large  small-3";
    gap: var(--grid-gap);
    align-items: start;
}

.layout-01  .post-section_grid> :nth-child(1) {
    grid-area: large;
    gap: 1rem;
    display: grid;
    border-right: 1px solid;
    padding-right: var(--grid-gap);
}

.layout-01  .post-section_grid> :nth-child(2) {
    grid-area: small-1;
}
.layout-01  .post-section_grid> :nth-child(3) {
    grid-area: small-2;
}
.layout-01  .post-section_grid> :nth-child(4) {
    grid-area: small-3;
    border-bottom: none;
}


.layout-01  .post-section_grid> :nth-child(1) .post__title {
    font-size: 36px;
}

/* .layout-01  .post-section_grid> :not(:first-child) .post__excerpt {
    display: none;
} */

.layout-01  .post-section_grid :is(.post:nth-child(2), .post:nth-child(3), .post:nth-child(4)) {
    display: grid;
    grid-template-columns: 1fr 2fr;
    gap: var(--grid-gap);
    border-bottom: 1px solid;
    padding-bottom: var(--grid-gap);
}

.layout-01  .post-section_grid .post:nth-child(4) {
    border-bottom: none;
}


.layout-02  .post-section_grid, 
.layout-03  .post-section_grid {
    display: grid;
    gap: calc(var(--grid-gap) * 2) var(--grid-gap);
    align-items: start;
}

.layout-02  .post-section_grid {
    grid-template-columns: repeat(3, 1fr);
}

.layout-03  .post-section_grid {
    grid-template-columns: repeat(4, 1fr);
}

.layout-02  .post-section_grid .post,
.layout-03  .post-section_grid .post {
    gap: 1em;
    display: grid;
}

.layout-02  .post-section_grid .post:not(:last-child),
.layout-03  .post-section_grid .post:not(:last-child) {
    padding-right: var(--grid-gap);
    border-right: 1px solid;
}

.layout-02 .post__image img,
.layout-03 .post__image img {
    aspect-ratio: 16 / 10;
    object-fit: cover;
}

.layout-03 .post__excerpt {
    display: none;
}


/* blog */



/* posts grid */
.archive-columns {
    display: grid;
    grid-template-columns: 3fr 1fr;
    gap: var(--grid-gap);
}
.posts-loop {
    gap: 2rem 1.5rem;
    border-right: 1px solid rgba(0,0,0,.2);
    padding-right: var(--grid-gap);
}

.posts-loop .post {
    display: grid;
    grid-template-columns: 1fr 2fr;
    margin-bottom: var(--grid-gap);
    padding-bottom: var(--grid-gap);
    gap: var(--grid-gap);
    border-bottom: 1px solid rgba(0,0,0,.2);
}

.post__image {
    position: relative;
}

.post__image a {
    display: block;
    overflow: hidden;
}

.post__image a img {
    display: block;
}


.post__image img {
    aspect-ratio: 16 / 10;
    object-fit: cover;
    border-radius: var(--border-radius);
}

.post__link {
    text-decoration: none;
    display: block;
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.post__meta {
    display: flex;
    flex-wrap: wrap;
    text-transform: uppercase;
    opacity: .5;
}

.post__meta > span {
    display: inline-flex;
}

.post__meta > span:not(:last-child):after {
    content: "";
    display: block;
    width: 1px;
    height: 16px;
    background-color: var(--primary-2);
    margin-left: 1rem;
    margin-right: 1rem;
}

.time-to-read__icon{
    padding-right: .25rem;
    display: inline-block;
}

.post__content {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.post__excerpt p, 
.post__title {
    margin: 0;
}

.post__title {
    font-size: 1.5rem;
}

.archive .post__title {
    font-size: 24px;
}

.post__title a {
    text-decoration: none;
    display: block;
}

.post__title a:hover {
    text-decoration: underline;
    text-decoration-color: var(--secondary-2);
}

.archieve .post__title {
    font-size: 36px;
}

.post__meta {
    font-size: .8rem;
}

.post__categories {
    display: flex;
    flex-wrap: wrap;
    gap: .5rem;
}

.has-post-thumbnail .post__categories {
    position: absolute;
    left: .5rem;
    top: .5rem;
    pointer-events: none;
}

.post-section .post__categories {
    display: none;
}

.post__category {
    background-color: var(--secondary-2);
    padding: .25rem .75rem;
    border-radius: 4px;
    font-size: .8rem;
    color: white;
}

/* sidebar */
#sidebar ul {
    list-style: none;
    padding: 0;
    margin: 0 0 2em 0;
}

/* pagination */
.pagination {
    display: flex;
    justify-content: center;
    margin-top: 2rem;
}

.pagination .nav-links {
    display: flex;
    justify-content: center;
    gap: .5rem;
}

.pagination .nav-links * {
    padding: .25rem .75rem;
    border: 1px solid transparent;
}

.pagination .nav-links .current {
    background-color: white;
    color: black;
}

.pagination .nav-links a {
    text-decoration: none;
    border-color: black;
    border-radius: 4px;
}


/* single */
.single__header {
    margin-bottom: 4rem;
    padding: 3em 0;
    background-color: var(--light-primary-2);
}

.single-header-columns {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: var(--grid-gap);
    align-items: center;
}


.single__title {
    font-size: clamp(2.25rem, 1.3191rem + 2.9787vw, 4rem);
    margin: 0;
}

.single__excerpt {
    font-size: 1.2rem;
    text-wrap: pretty;
}

.single__meta {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    font-size: .8rem;
    text-transform: uppercase;
    opacity: 1;
}

.single__author {
    display: inline-flex;
    align-items: center;
}

.single__author a {
    display: inline-flex;
    align-items: center;
    gap: 0.75rem;
    color: inherit;
    text-decoration: none;
}

.single__author a:hover {
    text-decoration: underline;
}

.single__author img.avatar {
    border-radius: 50%;
    vertical-align: middle;
}

.single__categories a:not(:hover) {
    text-decoration: none;
}

.single__author a,
.single__categories a {
    font-weight: 500;
}

.single__share-buttons {
    margin-left: auto;
    text-align: right;
}

.single__image {
    margin-bottom: 1.5rem;
}

.single__image img {
    width: auto;
    display: inline-block;
    aspect-ratio: 4 / 3;
    object-fit: cover;
    border-radius: var(--border-radius);
}

.single__image-caption {
    opacity: .5;
}

.single__footer-meta {
    border-top: 1px solid;
    padding-top: 2em;
    margin-top: 5em;
}

.single__footer-columns {
    display: flex;
    justify-content: space-between;
}

.single__tags {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
}

.single__content :is(p, li) {
    font-size: 1.15em;
}

.single__prev-next {
    margin: 6em 0 2em 0;
    align-items: stretch;
}

.single__prev-next  h3 {
    font-size: 24px;
    text-wrap: pretty;
    margin: 1rem 0 0 0;
}

.single__prev-next a {
    text-decoration: none;
    display: block;
}

.single__prev-next a:hover {
    text-decoration: underline;
    text-decoration-color: var(--secondary-2);
}

.single__prev-next span {
    display: inline-flex;
    gap: .5rem;
    align-items: center;
    line-height: 1;
}

.single__prev,
.single__next {
    width: 50%;
    display: flex;
    flex-direction: column;
}

.single__prev {
    border-right: 1px solid;
    padding-right: 2rem;
}

.single__next {
    padding-left: 2rem;
    margin-left: auto;
    align-items: flex-end;
}



/* single related posts */

.single__related {
    margin-top: 4rem;
}

.single__related-title {
    color: white;
}

.single__related-posts {
    margin-top: 1.5rem;
    display: flex;
    flex-direction: column;
    gap: 2rem;
}

.single__related-post-link {
    display: grid;
    grid-template-columns: 1fr 1fr;
    text-decoration: none;
    align-items: center;
    gap: 1.5rem;
}

@media (max-width: 480px) {
    .single__related-post-link {
        grid-template-columns: 1fr;
    }
}

.single__related-text {
    display: flex;
    flex-direction: column;
    gap: .5rem;
}

.single__related-date {
    font-size: .8rem;
}

.single__related-text * {
    margin: 0;
}


/* categories */

.category-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.category-link {
    text-decoration: none;
    border-radius: 8px;
    display: block;
    border: 1px solid var(--primary-yellow);
    padding: 1rem;
    height: 100%;
}

.category-title {
    margin: 0;
    font-size: 1.5rem;
}

.category-description {
    text-wrap: pretty;
}

/* blocks */
.sidebar .widget:first-child h2 {
    margin-top: 0;
}

.wp-block-latest-posts__post-title {
    display: block;
}
.wp-block-latest-posts__post-title:not(:hover) {
    text-decoration: none;
}

.wp-block-latest-posts__list li {
    border-bottom: 1px solid rgba(0,0,0,.2);
    display: block;
    padding-bottom: 1rem;
    margin-bottom: 1rem;
    overflow: hidden;
}

.wp-block-latest-posts__list li:last-child {
    border-bottom: none;
    margin-bottom: 0;
    padding-bottom: 0;
}

.wp-block-latest-posts__featured-image img {
    border-radius: var(--border-radius);
}


/* MEDIA QUERIES */

@media (max-width: 1000px) {

    /* header */
    .custom-logo-link img {
        max-width: 60px;
    }

    /* layout grid */
    .post-section__title {
        font-size: 1rem;
        padding: .5rem .5rem .5rem 1rem;
    }

    .latest-posts__grid {
        grid-template-areas: "area1 area1"
        "area2 area3"
        "area4 area5";
    }

    .latest-posts__grid > :nth-child(1) {
        border-right: none;
        border-left: none;
        border-bottom: 1px solid;
        padding-right: 0;
        padding-left: 0;
        padding-bottom: 2rem;
    }

    .layout-01  .post-section_grid {
        grid-template-areas: "large"
                             "small-1"
                             "small-2"
                             "small-3";
    }

    .layout-01  .post-section_grid> :nth-child(1) {
        border-right: none;
        border-bottom: 1px solid;
        padding-right: 0;
        padding-bottom: var(--grid-gap);
    }

    .layout-02 .post-section_grid,
    .layout-03 .post-section_grid {
        grid-template-columns: 1fr;
    }

    .layout-02 .post-section_grid .post:not(:last-child),
    .layout-03 .post-section_grid .post:not(:last-child) {
        padding-right: 0;
        border-right: none;
    }

    .layout-03 .post {
        width: 100%;
    }

    /* categories */
    .archive-columns {
        grid-template-columns: 1fr;
        gap: 4rem;
    }

    .posts-loop {
        padding-right: 0;
        border-right: none;
    }

    /* single */
    .single-header-columns {
        grid-template-columns: 1fr;
    }

    .single__share-buttons {
        text-align: left;
    }

    .single__author img.avatar {
        max-width: 24px;
    }

    /* footer */
    .footer-columns {
        flex-direction: column;
        align-items: flex-start;
    }

    .footer-logo-column {
        padding-right: 0;
        border-right: none;
    }

    .footer-social {
        margin-left: 0;
    }
}

@media (max-width: 767px) {
    /* header */
    .header__nav {
        grid-template-columns: 1fr auto;
        padding-left: 0;
        padding-right: 0;
    }

    .header__menu-toggle {
        background-color: transparent;
        border: none;
        cursor: pointer;
        padding: 0;
        margin: 0;
        outline: none;
        display: flex;
        align-items: center;
        justify-content: center;
        color: var(--text-color);
    }

    .header__menu-mobile-content {
        position: absolute;
        left: 0;
        top: 100%;
        width: 100%;
        background: var(--light-primary-2);
        padding: 1rem;
        z-index: 1000;
    }

    .header__menu-mobile-list {
        list-style: none;
        padding: 0;
        margin: 0;
        display: flex;
        flex-direction: column;
        gap: .5rem;
    }

    .header__menu-mobile-list a {
        font-size: 1.25rem;
        display: flex;
        align-items: center;
        gap: .75rem;
        padding: .25rem 0;
        text-decoration: none;
    }

    /* archive */
    .posts-loop .post {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 480px) {

    .latest-posts__grid > :nth-child(1) .post__title {
        font-size: 24px;
    }

    .latest-posts__grid > :nth-child(2) .post__title, .latest-posts__grid > :nth-child(3) .post__title, .latest-posts__grid > :nth-child(4) .post__title, .latest-posts__grid > :nth-child(5) .post__title {
        font-size: 18px !important;
    }

    .layout-01 :not(:first-child) .post__excerpt {
        display: none;
    }

    .post-section__header {
        margin-bottom: 2rem;
    }

    .home-section:not(.articles) {
        margin-bottom: 4rem;
    }
    
    .home-section__title {
       font-weight: 200;
       color: white;
       margin: 0 0 1.5rem 0;
    }
    
    .cover-story__image img {
        width: 100%;
        aspect-ratio: 5 / 4 !important;
    }
    }
    