/* ==========================================================
   BEAUTY GUIDE
   COMPLETE HOMEPAGE / EDITORIAL DESIGN
========================================================== */


/* ==========================================================
   RESET
========================================================== */

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    padding: 0;

    background: #faf9f7;
    color: #222;

    font-family:
        Arial,
        Helvetica,
        sans-serif;

    line-height: 1.6;
}

img {
    display: block;
    max-width: 100%;
}

a {
    color: inherit;
}

button,
input,
textarea,
select {
    font: inherit;
}


/* ==========================================================
   CONTAINER
========================================================== */

.container {
    width: min(
        calc(100% - 40px),
        1200px
    );

    margin-left: auto;
    margin-right: auto;
}


/* ==========================================================
   HEADER
========================================================== */

.site-header {
    position: relative;
    z-index: 100;

    background: #ffffff;

    border-bottom: 1px solid #eeeae6;
}

.main-header {
    background: #ffffff;
}

.main-header .container {
    min-height: 82px;

    display: flex;
    align-items: center;

    gap: 30px;
}


/* ==========================================================
   LOGO
========================================================== */

.main-header .logo,
.site-header .logo {
    display: flex;
    align-items: center;

    flex: 0 0 auto;

    width: auto;

    text-decoration: none;
}

.main-header .logo img,
.site-header .logo img {
    display: block;

    width: auto;
    height: auto;

    max-width: 220px;
    max-height: 65px;

    object-fit: contain;
}


/* ==========================================================
   DESKTOP NAVIGATION
========================================================== */

.main-navigation {
    flex: 1 1 auto;

    min-width: 0;
}

.main-navigation ul {
    display: flex;
    align-items: center;

    flex-wrap: nowrap;

    gap: 3px;

    margin: 0;
    padding: 0;

    list-style: none;
}

.main-navigation li {
    margin: 0;
    padding: 0;
}

.main-navigation a {
    display: block;

    padding: 9px 10px;

    color: #333;

    text-decoration: none;

    font-size: 12px;
    font-weight: 700;

    letter-spacing: .04em;

    text-transform: uppercase;

    border-radius: 4px;

    white-space: nowrap;

    transition:
        color .2s ease,
        background .2s ease;
}

.main-navigation a:hover {
    background: #faf3f3;

    color: #c57b84;
}


/* ==========================================================
   HEADER SEARCH
========================================================== */

.header-actions {
    flex: 0 0 auto;

    margin-left: auto;
}

.header-actions a {
    display: inline-flex;

    align-items: center;
    justify-content: center;

    padding: 9px 16px;

    background: #ffffff;

    border: 1px solid #ded8d4;

    border-radius: 30px;

    color: #333;

    text-decoration: none;

    font-size: 11px;
    font-weight: 700;

    letter-spacing: .05em;

    text-transform: uppercase;

    white-space: nowrap;

    transition:
        background .2s ease,
        color .2s ease,
        border-color .2s ease;
}

.header-actions a:hover {
    background: #222;

    border-color: #222;

    color: #fff;
}


/* ==========================================================
   MOBILE MENU BUTTON
========================================================== */

.mobile-menu-button {
    display: none;

    align-items: center;
    justify-content: center;

    width: 44px;
    height: 40px;

    padding: 0;

    background: #222;

    border: 0;

    border-radius: 4px;

    color: #fff;

    font-size: 10px;
    font-weight: 800;

    letter-spacing: .04em;

    cursor: pointer;

    transition:
        background .2s ease;
}

.mobile-menu-button:hover {
    background: #b76f79;
}


/* ==========================================================
   MOBILE NAVIGATION
========================================================== */

.mobile-navigation {
    display: none;

    width: 100%;

    background: #ffffff;

    border-top: 1px solid #eeeae7;

    border-bottom: 1px solid #eeeae7;

    box-shadow:
        0 12px 30px rgba(
            0,
            0,
            0,
            .06
        );
}

.mobile-navigation.open {
    display: block;
}

.mobile-navigation ul {
    margin: 0;
    padding: 0;

    list-style: none;
}

.mobile-navigation li {
    margin: 0;

    border-bottom: 1px solid #eeeae7;
}

.mobile-navigation li:last-child {
    border-bottom: 0;
}

.mobile-navigation a {
    display: block;

    padding: 15px 20px;

    color: #222;

    text-decoration: none;

    font-size: 12px;
    font-weight: 700;

    letter-spacing: .04em;

    text-transform: uppercase;

    transition:
        background .2s ease,
        color .2s ease;
}

.mobile-navigation a:hover {
    background: #faf3f3;

    color: #b76f79;
}


/* ==========================================================
   FEATURED / HERO SECTION
========================================================== */

.hero-section {
    padding: 42px 0 65px;

    background: #faf9f7;

    overflow: hidden;
}

.featured-slider {
    position: relative;

    width: 100%;
}


/* ==========================================================
   LATEST SECTION
========================================================== */

.latest-section {
    padding: 75px 0;

    background: #faf9f7;
}


/* ==========================================================
   SECTION HEADING
========================================================== */

.section-heading {
    display: flex;

    align-items: flex-end;
    justify-content: space-between;

    gap: 20px;

    margin-bottom: 35px;

    padding-bottom: 15px;

    border-bottom: 1px solid #e5dfdb;
}

.section-heading h2 {
    margin: 0;

    color: #222;

    font-family:
        Georgia,
        "Times New Roman",
        serif;

    font-size: clamp(
        30px,
        4vw,
        42px
    );

    font-weight: 400;

    line-height: 1.15;

    letter-spacing: -.025em;
}

.section-heading > a {
    flex: 0 0 auto;

    color: #b76f79;

    text-decoration: none;

    font-size: 11px;
    font-weight: 800;

    letter-spacing: .1em;

    text-transform: uppercase;

    transition: color .2s ease;
}

.section-heading > a:hover {
    color: #222;
}


/* ==========================================================
   LATEST POST GRID
========================================================== */

.post-grid {
    display: grid;

    grid-template-columns:
        repeat(3, minmax(0, 1fr));

    gap: 42px 28px;
}


/* ==========================================================
   POST CARD
========================================================== */

.post-card {
    min-width: 0;
}


/* ==========================================================
   POST CARD IMAGE
========================================================== */

.post-card > a:first-child {
    display: block;

    overflow: hidden;

    width: 100%;

    aspect-ratio: 1.35 / 1;

    margin-bottom: 18px;

    background: #eee;

    border-radius: 12px;
}

.post-card > a:first-child img {
    display: block;

    width: 100%;
    height: 100%;

    object-fit: cover;

    transition:
        transform .45s ease;
}

.post-card > a:first-child:hover img {
    transform: scale(1.045);
}


/* ==========================================================
   POST CARD CONTENT
========================================================== */

.post-card .post-content {
    min-width: 0;
}


/* ==========================================================
   POST CATEGORY
========================================================== */

.post-category {
    display: inline-block;

    margin-bottom: 9px;

    color: #b76f79;

    text-decoration: none;

    font-size: 10px;
    font-weight: 800;

    letter-spacing: .12em;

    text-transform: uppercase;

    transition: color .2s ease;
}

.post-category:hover {
    color: #222;
}


/* ==========================================================
   POST TITLE
========================================================== */

.post-card h3 {
    margin: 0 0 10px;

    color: #222;

    font-family:
        Georgia,
        "Times New Roman",
        serif;

    font-size: 23px;

    font-weight: 400;

    line-height: 1.25;

    letter-spacing: -.02em;
}

.post-card h3 a {
    color: #222;

    text-decoration: none;

    transition: color .2s ease;
}

.post-card h3 a:hover {
    color: #b76f79;
}


/* ==========================================================
   POST EXCERPT
========================================================== */

.post-card p {
    margin: 0 0 15px;

    color: #777;

    font-size: 13px;

    line-height: 1.7;
}


/* ==========================================================
   POST META
========================================================== */

.post-meta {
    display: flex;

    flex-wrap: wrap;

    gap: 8px 16px;

    color: #999;

    font-size: 10px;
    font-weight: 600;

    letter-spacing: .02em;
}

.post-meta span {
    position: relative;
}

.post-meta span + span::before {
    content: "•";

    margin-right: 16px;

    color: #d1cbc7;
}


/* ==========================================================
   CATEGORY SECTION
========================================================== */

.category-section {
    padding: 75px 0;

    background: #ffffff;

    border-top: 1px solid #eee8e4;

    border-bottom: 1px solid #eee8e4;
}


/* ==========================================================
   CATEGORY GRID
========================================================== */

.category-grid {
    display: grid;

    grid-template-columns:
        repeat(3, minmax(0, 1fr));

    gap: 16px;
}


/* ==========================================================
   CATEGORY BOX
========================================================== */

.category-box {
    display: flex;

    align-items: center;
    justify-content: space-between;

    gap: 20px;

    min-height: 105px;

    padding: 22px 25px;

    background:
        linear-gradient(
            135deg,
            #faf5f3 0%,
            #f6efed 100%
        );

    border: 1px solid #eee4df;

    border-radius: 12px;

    color: #222;

    text-decoration: none;

    transition:
        transform .25s ease,
        background .25s ease,
        border-color .25s ease,
        box-shadow .25s ease;
}

.category-box:hover {
    transform: translateY(-3px);

    background: #ffffff;

    border-color: #dfd3ce;

    box-shadow:
        0 12px 35px rgba(
            50,
            40,
            35,
            .07
        );
}

.category-box span {
    color: #333;

    font-family:
        Georgia,
        "Times New Roman",
        serif;

    font-size: 20px;

    line-height: 1.2;
}

.category-box strong {
    display: flex;

    align-items: center;
    justify-content: center;

    flex: 0 0 auto;

    min-width: 34px;
    height: 34px;

    padding: 0 8px;

    background: #ffffff;

    border-radius: 50%;

    color: #b76f79;

    font-size: 11px;
    font-weight: 800;
}


/* ==========================================================
   POPULAR SECTION
========================================================== */

.popular-section {
    padding: 75px 0;

    background: #faf9f7;
}


/* ==========================================================
   POPULAR GRID
========================================================== */

.popular-grid {
    display: grid;

    grid-template-columns:
        repeat(3, minmax(0, 1fr));

    gap: 28px;
}

.popular-grid .post-card > a:first-child {
    margin-bottom: 16px;
}

.popular-grid .post-card h3 {
    font-size: 22px;
}


/* ==========================================================
   EMPTY STATES
========================================================== */

.latest-section > .container > p,
.popular-section > .container > p {
    margin: 0;

    padding: 35px;

    background: #ffffff;

    border: 1px solid #ebe5e1;

    border-radius: 10px;

    color: #777;

    text-align: center;
}


/* ==========================================================
   NEWSLETTER
========================================================== */

.newsletter-section {
    padding: 80px 0;

    background:
        linear-gradient(
            135deg,
            #f4ebe9,
            #faf5f2
        );

    border-top: 1px solid #eee4df;

    border-bottom: 1px solid #eee4df;

    text-align: center;
}

.newsletter-section .container {
    max-width: 800px;
}

.newsletter-content {
    width: 100%;
}

.newsletter-section h2 {
    margin: 0 0 10px;

    color: #222;

    font-family:
        Georgia,
        "Times New Roman",
        serif;

    font-size: clamp(
        28px,
        4vw,
        42px
    );

    font-weight: 400;

    line-height: 1.2;
}

.newsletter-section p {
    margin: 0 auto 25px;

    color: #777;

    font-size: 14px;
}

.newsletter-section form {
    position: relative;

    display: flex;

    max-width: 560px;

    margin: 0 auto;

    gap: 8px;
}

.newsletter-section form label {
    position: absolute;

    width: 1px;
    height: 1px;

    padding: 0;
    margin: -1px;

    overflow: hidden;

    clip: rect(
        0,
        0,
        0,
        0
    );

    white-space: nowrap;

    border: 0;
}

.newsletter-section input {
    flex: 1;

    min-width: 0;

    padding: 15px 18px;

    background: #ffffff;

    border: 1px solid #ddd4d0;

    border-radius: 5px;

    outline: none;

    color: #222;

    font-size: 14px;
}

.newsletter-section input::placeholder {
    color: #aaa;
}

.newsletter-section input:focus {
    border-color: #b76f79;
}

.newsletter-section button {
    flex: 0 0 auto;

    padding: 15px 25px;

    background: #222;

    border: 0;

    border-radius: 5px;

    color: #ffffff;

    font-size: 12px;
    font-weight: 800;

    letter-spacing: .04em;

    text-transform: uppercase;

    cursor: pointer;

    transition:
        background .2s ease,
        transform .2s ease;
}

.newsletter-section button:hover {
    background: #b76f79;

    transform: translateY(-1px);
}


/* ==========================================================
   FOOTER
========================================================== */

.site-footer {
    padding: 60px 0 25px;

    background: #202020;

    color: #ffffff;
}

.footer-grid {
    display: grid;

    grid-template-columns:
        repeat(2, minmax(0, 1fr));

    gap: 60px;

    padding-bottom: 45px;
}

.footer-column {
    min-width: 0;
}

.footer-column h3 {
    margin: 0 0 18px;

    color: #ffffff;

    font-family:
        Georgia,
        "Times New Roman",
        serif;

    font-size: 21px;

    font-weight: 400;
}

.footer-column a {
    display: block;

    width: fit-content;

    margin-bottom: 9px;

    color: #bdbdbd;

    text-decoration: none;

    font-size: 13px;

    transition:
        color .2s ease;
}

.footer-column a:hover {
    color: #ffffff;
}

.footer-bottom {
    padding-top: 22px;

    border-top: 1px solid rgba(
        255,
        255,
        255,
        .1
    );
}

.footer-bottom p {
    margin: 0;

    color: #888;

    font-size: 11px;
}


/* ==========================================================
   CKEDITOR
   FULL WIDTH / SAME WIDTH AS EXCERPT
========================================================== */

/*
   CKEditor is normally inserted inside the same
   form-group as the #content textarea.

   These rules force every CKEditor layer to use
   exactly the available parent width.
*/

.form-group {
    min-width: 0;
}

#content {
    width: 100%;
    max-width: 100%;
}


/* Main CKEditor wrapper */

.ck.ck-editor {
    display: block;

    width: 100% !important;
    max-width: 100% !important;

    margin: 0;

    box-sizing: border-box;
}


/* Toolbar */

.ck.ck-editor .ck-editor__top {
    width: 100% !important;
    max-width: 100% !important;

    box-sizing: border-box;
}

.ck.ck-toolbar {
    width: 100% !important;
    max-width: 100% !important;

    box-sizing: border-box;

    border-radius: 0;
}


/* Editor main area */

.ck.ck-editor .ck-editor__main {
    display: block;

    width: 100% !important;
    max-width: 100% !important;

    box-sizing: border-box;
}


/* Actual editable area */

.ck.ck-editor .ck-editor__editable,
.ck.ck-editor .ck-editor__editable_inline {
    display: block;

    width: 100% !important;
    max-width: 100% !important;

    min-width: 0 !important;

    min-height: 500px;

    margin: 0;

    padding: 12px;

    box-sizing: border-box;

    overflow-x: hidden;
}


/*
   Make CKEditor content use the same
   available width as the editable area.
*/

.ck-editor__editable .ck-content,
.ck.ck-editor .ck-content {
    width: 100%;
    max-width: 100%;

    box-sizing: border-box;

    line-height: 1.7;
}


/*
   Paragraphs should not create an artificial
   narrow content column.
*/

.ck-editor__editable p,
.ck-content p {
    max-width: none;

    width: 100%;
}


/*
   Headings should also use the full editor width.
*/

.ck-content h1,
.ck-content h2,
.ck-content h3,
.ck-content h4,
.ck-content h5,
.ck-content h6 {
    max-width: none;
}


/*
   Images inside the article must never exceed
   the editor width.
*/

.ck-content img,
.ck-editor__editable img {
    display: block;

    max-width: 100% !important;

    width: auto;

    height: auto;

    box-sizing: border-box;
}


/*
   CKEditor image figure.

   This is important because CKEditor wraps
   uploaded images inside <figure>.
*/

.ck-content figure.image,
.ck-editor__editable figure.image {
    max-width: 100% !important;

    margin-left: 0;
    margin-right: 0;

    box-sizing: border-box;
}

.ck-content figure.image img,
.ck-editor__editable figure.image img {
    max-width: 100% !important;

    height: auto;
}


/*
   Prevent side image style from making
   the content area look unexpectedly narrow.
*/

.ck-content .image-style-side {
    max-width: 50%;
}


/*
   Tables should also respect editor width.
*/

.ck-content table {
    max-width: 100%;

    width: 100%;

    box-sizing: border-box;
}


/*
   Links and long strings should not force
   the editor wider than the form.
*/

.ck-content a,
.ck-content p,
.ck-content li,
.ck-content blockquote {
    overflow-wrap: break-word;
    word-wrap: break-word;
}


/*
   Make the editor visually match the normal
   textarea fields used for Excerpt.
*/

.ck.ck-editor .ck-editor__editable_inline {
    background: #ffffff;

    border-color: #ddd;

    color: #222;

    font-family:
        Arial,
        Helvetica,
        sans-serif;

    font-size: 14px;
}

.ck.ck-editor .ck-editor__editable_inline.ck-focused {
    border-color: #111;

    box-shadow: none;
}


/*
   Make toolbar and editable area connect
   cleanly like one normal form control.
*/

.ck.ck-editor .ck-toolbar {
    border-color: #ddd;

    border-bottom-left-radius: 0;
    border-bottom-right-radius: 0;
}

.ck.ck-editor .ck-editor__editable_inline {
    border-top-left-radius: 0;
    border-top-right-radius: 0;
}


/* ==========================================================
   DESKTOP / TABLET
========================================================== */

@media (max-width: 1050px) {

    .main-header .container {
        gap: 20px;
    }

    .main-navigation a {
        padding-left: 7px;
        padding-right: 7px;

        font-size: 11px;
    }

    .post-grid {
        gap: 32px 22px;
    }

    .category-grid {
        gap: 14px;
    }

}


/* ==========================================================
   TABLET
========================================================== */

@media (max-width: 900px) {

    .main-navigation {
        display: none !important;
    }

    .header-actions {
        margin-left: auto;
    }

    .header-actions a {
        display: none;
    }

    .mobile-menu-button {
        display: flex;
    }

    .main-header .container {
        min-height: 70px;

        gap: 15px;

        justify-content: space-between;
    }

    .site-header .logo img,
    .main-header .logo img {
        max-width: 190px;
        max-height: 55px;
    }

    .post-grid {
        grid-template-columns:
            repeat(2, minmax(0, 1fr));
    }

    .category-grid {
        grid-template-columns:
            repeat(2, minmax(0, 1fr));
    }

    .popular-grid {
        grid-template-columns:
            repeat(2, minmax(0, 1fr));
    }

}


/* ==========================================================
   MOBILE
========================================================== */

@media (max-width: 700px) {

    .container {
        width: min(
            calc(100% - 28px),
            1200px
        );
    }


    /* HEADER */

    .main-header .container {
        min-height: 68px;

        gap: 12px;
    }

    .site-header .logo img,
    .main-header .logo img {
        max-width: 175px;
        max-height: 52px;
    }

    .mobile-menu-button {
        width: 44px;
        height: 40px;
    }


    /* SECTIONS */

    .latest-section,
    .category-section,
    .popular-section {
        padding: 55px 0;
    }


    /* HEADINGS */

    .section-heading {
        align-items: center;

        margin-bottom: 28px;
    }

    .section-heading h2 {
        font-size: 30px;
    }


    /* POST GRID */

    .post-grid {
        grid-template-columns: 1fr;

        gap: 38px;
    }

    .post-card h3 {
        font-size: 26px;
    }


    /* CATEGORY GRID */

    .category-grid {
        grid-template-columns: 1fr;

        gap: 12px;
    }


    /* POPULAR */

    .popular-grid {
        grid-template-columns: 1fr;

        gap: 38px;
    }


    /* NEWSLETTER */

    .newsletter-section {
        padding: 60px 0;
    }

    .newsletter-section form {
        display: block;

        max-width: 100%;
    }

    .newsletter-section input {
        display: block;

        width: 100%;

        margin-bottom: 9px;
    }

    .newsletter-section button {
        display: block;

        width: 100%;
    }


    /* FOOTER */

    .footer-grid {
        grid-template-columns: 1fr;

        gap: 35px;

        padding-bottom: 35px;
    }


    /* CKEDITOR */

    .ck.ck-editor {
        width: 100% !important;
        max-width: 100% !important;
    }

    .ck.ck-editor .ck-editor__editable_inline {
        width: 100% !important;
        max-width: 100% !important;

        min-height: 400px;

        padding: 12px;
    }

    .ck.ck-toolbar {
        max-width: 100% !important;

        overflow-x: auto;
    }

}


/* ==========================================================
   SMALL MOBILE
========================================================== */

@media (max-width: 500px) {

    .container {
        width: calc(100% - 24px);
    }

    .site-header .logo img,
    .main-header .logo img {
        max-width: 155px;
        max-height: 48px;
    }

    .mobile-menu-button {
        width: 42px;
        height: 39px;
    }


    /* SECTIONS */

    .latest-section,
    .category-section,
    .popular-section {
        padding: 45px 0;
    }


    /* HEADING */

    .section-heading {
        display: block;

        margin-bottom: 25px;
    }

    .section-heading h2 {
        margin-bottom: 9px;

        font-size: 28px;
    }

    .section-heading > a {
        font-size: 10px;
    }


    /* POST CARD */

    .post-card > a:first-child {
        border-radius: 10px;
    }

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

    .post-card p {
        font-size: 13px;
    }


    /* CATEGORY BOX */

    .category-box {
        min-height: 85px;

        padding: 18px 20px;
    }

    .category-box span {
        font-size: 18px;
    }

    .category-box strong {
        min-width: 32px;
        height: 32px;
    }


    /* NEWSLETTER */

    .newsletter-section h2 {
        font-size: 30px;
    }


    /* CKEDITOR */

    .ck.ck-editor .ck-editor__editable_inline {
        min-height: 350px;

        padding: 10px;
    }

}


/* ==========================================================
   VERY SMALL MOBILE
========================================================== */

@media (max-width: 380px) {

    .site-header .logo img,
    .main-header .logo img {
        max-width: 140px;
        max-height: 44px;
    }

    .mobile-menu-button {
        width: 40px;
        height: 38px;
    }

    .section-heading h2 {
        font-size: 26px;
    }

    .post-card h3 {
        font-size: 22px;
    }

    .category-box span {
        font-size: 17px;
    }


    /* CKEDITOR */

    .ck.ck-editor .ck-editor__editable_inline {
        min-height: 320px;

        padding: 10px;
    }

}