/*
Theme Name: The Keto Lady
Description: Astra child theme for The Keto Lady website.
Author: Michael
Template: astra
Version: 1.0.0
*/
/* The menu layout remains managed by the bilingual Elementor header templates. */

/* Keep the floating navigation readable over every section after scrolling. */
body .custom-pill-header.tkl-header-scrolled {
    background: #faf7f2 !important;
    box-shadow: 0 1px 0 rgba( 71, 107, 80, 0.16 );
}

@media ( max-width: 360px ) {
    body .custom-pill-header {
        padding-right: 12px;
        padding-left: 12px;
    }

    body .custom-pill-header .header-logo-stack {
        width: 112px;
        min-width: 112px;
        flex: 0 0 112px;
    }

    body .custom-pill-header .header-logo img {
        width: 112px;
    }

    body .custom-pill-header .header-actions {
        gap: 8px;
    }

    body .custom-pill-header .menu-toggle .elementor-button {
        padding: 10px 12px;
        font-size: 10px;
    }

    body .custom-pill-header .slick-lang-switcher .lang-item {
        min-width: 30px;
        padding: 5px 8px;
    }
}

@media ( prefers-reduced-motion: reduce ) {
    html {
        scroll-behavior: auto !important;
    }

    .custom-pill-header,
    .custom-pill-header *,
    .menu-overlay,
    .menu-overlay *,
    .menu-overlay *::before,
    .menu-overlay *::after,
    .tkl-blog-topics a,
    .elementor-posts * {
        transition-duration: 0.01ms !important;
    }
}

html {
    scroll-padding-top: 104px;
}

/* Shared Elementor archive/search cards; no per-post layout overrides. */
body .elementor .elementor-widget-posts .elementor-posts .elementor-post__card {
    display: flex;
    flex-direction: column;
    border: 1px solid rgba( 71, 107, 80, 0.16 );
    border-radius: 16px;
    box-shadow: 0 4px 16px rgba( 44, 43, 40, 0.05 );
    overflow: hidden;
}

body .elementor .elementor-widget-posts .elementor-posts .elementor-post__card:has( a:focus-visible ) {
    border-color: #476b50;
    box-shadow: 0 0 0 2px #476b50;
}

body .elementor .elementor-widget-posts .elementor-posts .elementor-post__card .elementor-post__text {
    display: flex;
    flex: 1;
    flex-direction: column;
    padding: 24px;
    margin: 0;
}

body .elementor .elementor-widget-posts .elementor-posts .elementor-post__card .elementor-post__title {
    margin: 0 0 14px;
    font-size: 1.5rem;
    line-height: 1.25;
}

body .elementor .elementor-widget-posts .elementor-posts .elementor-post__card .elementor-post__excerpt p {
    margin: 0 0 18px;
    color: #4f4c47;
    font-size: 1rem;
    line-height: 1.65;
}

body .elementor .elementor-widget-posts .elementor-posts .elementor-post__card .elementor-post__read-more {
    align-self: flex-start;
    margin-top: auto;
    padding: 8px 0;
    color: #294b34;
    font-size: 0.9375rem;
    text-decoration: underline;
    text-underline-offset: 4px;
}

.tkl-blog-topics {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 10px;
    margin: 0 0 28px;
}

.tkl-blog-topics > span {
    margin-right: 6px;
    color: #4f4c47;
    font-weight: 700;
}

.tkl-blog-topics a {
    display: inline-flex;
    align-items: center;
    min-height: 44px;
    padding: 8px 16px;
    border: 1px solid rgba( 71, 107, 80, 0.25 );
    border-radius: 999px;
    color: #294b34;
    background: #eef3ee;
    font-size: 1rem;
}

.tkl-blog-topics a:hover {
    border-color: #476b50;
    text-decoration: underline;
}

.tkl-blog-topics a:focus-visible,
.tkl-blog-archive .elementor-widget-posts .elementor-button:focus-visible,
.elementor-posts a:focus-visible,
.tkl-article-toc summary:focus-visible {
    outline: 3px solid #476b50;
    outline-offset: 4px;
}

@media ( max-width: 544px ) {
    body.tkl-blog-archive .elementor .elementor-section:has( h1 ) {
        padding: 96px 20px 36px;
    }

    body.tkl-blog-archive .elementor .elementor-section:has( h1 ) .elementor-widget-wrap {
        padding: 0;
    }

    body.tkl-blog-archive .elementor .elementor-section:has( h1 ) .elementor-widget {
        padding-left: 0;
        padding-right: 0;
    }

    body .elementor .elementor-widget-search .e-search-form {
        flex-direction: column;
        align-items: stretch;
        gap: 10px;
        max-width: 100%;
    }

    body .elementor .elementor-widget-search .e-search-input-wrapper,
    body .elementor .elementor-widget-search .e-search-input,
    body .elementor .elementor-widget-search .e-search-submit {
        min-width: 0;
        width: 100%;
        max-width: 100%;
    }

    body .elementor .elementor-widget-search .e-search-submit {
        min-height: 48px;
    }
}

:where( main, .entry-content, #content ) :where( h1, h2, h3, [id] ) {
    scroll-margin-top: 16px;
}

.menu-overlay.active {
    background-color: rgba( 31, 34, 29, 0.34 ) !important;
}

.menu-overlay.active .menu-panel {
    background-color: rgba( 250, 247, 242, 0.97 ) !important;
    opacity: 1 !important;
}

.menu-toggle .elementor-button:focus-visible,
.menu-overlay a:focus-visible,
.menu-overlay button:focus-visible,
.menu-overlay input:focus-visible {
    outline: 3px solid #2f6244 !important;
    outline-offset: 3px;
}

@media ( max-width: 921.98px ) {
    .menu-overlay.active .menu-panel {
        max-height: calc( 100dvh - 96px );
        overflow-y: auto;
        overscroll-behavior: contain;
    }
}

/* Native Astra category archives use a separate layout from the Elementor blog. */
body.category #content > .ast-container {
    max-width: 1200px;
    padding: 0 24px;
    margin: 0 auto;
}

body.category .site .site-content #primary {
    width: 100%;
    margin: 0;
    padding: 112px 0 56px;
}

body.category #main > .ast-row {
    display: grid;
    grid-template-columns: repeat( 3, minmax( 0, 1fr ) );
    gap: 28px;
    margin: 0;
}

body.category .tkl-archive-header {
    grid-column: 1 / -1;
    width: 100%;
    margin: 0 0 8px;
    padding: 0;
}

body.category .ast-row > .ast-article-post {
    width: 100%;
    min-width: 0;
    margin: 0;
    padding: 0;
    border: 0;
    background: transparent;
}

body.category .ast-article-post .ast-article-inner {
    height: 100%;
    padding: 0;
    border: 1px solid rgba( 71, 107, 80, 0.2 );
    border-radius: 16px;
    overflow: hidden;
    background: #fff;
    box-shadow: 0 4px 16px rgba( 44, 43, 40, 0.05 );
}

body.category .ast-article-post .post-content {
    display: flex;
    flex-direction: column;
    height: 100%;
    width: 100%;
    padding: 24px;
}

body.category .ast-article-post .ast-blog-featured-section {
    margin: -24px -24px 24px;
    width: calc( 100% + 48px );
    max-width: none;
}

body.category .ast-article-post .post-thumb img {
    display: block;
    width: 100%;
    aspect-ratio: 3 / 2;
    object-fit: cover;
    border-radius: 0;
}

body.category .ast-article-post .entry-title {
    margin: 0 0 16px;
    font-size: 24px;
    line-height: 1.25;
}

body.category .ast-article-post .entry-title a {
    color: #2c2b28;
}

body.category .ast-article-post .entry-header {
    margin: 0 0 16px;
    padding: 0;
}

body.category .ast-article-post .entry-meta {
    font-size: 13px;
    line-height: 1.6;
}

body.category .ast-article-post .ast-excerpt-container p {
    margin: 0 0 20px;
    color: #4f4c47;
    font-size: 16px;
    line-height: 1.65;
}

body.category .ast-article-post .read-more {
    margin: auto 0 0;
    padding-top: 8px;
}

body.category .ast-article-post .read-more a {
    display: inline-flex;
    align-items: center;
    min-height: 44px;
    color: #294b34;
    text-decoration: underline;
    text-underline-offset: 4px;
}

body.category #primary a:focus-visible {
    outline: 3px solid #476b50;
    outline-offset: 3px;
}

body.category .ast-pagination {
    padding: 32px 0 0;
}

@media ( max-width: 921px ) {
    body.category #main > .ast-row {
        grid-template-columns: repeat( 2, minmax( 0, 1fr ) );
    }
}

@media ( max-width: 544px ) {
    body.category #content > .ast-container { padding: 0 20px; }
    body.category .site .site-content #primary { padding-top: 100px; }
    body.category #main > .ast-row { grid-template-columns: minmax( 0, 1fr ); }
}

.tkl-archive-header {
    width: min( 1200px, calc( 100% - 40px ) );
    margin: 0 auto;
    padding: 48px 0 16px;
}

.tkl-archive-title {
    margin: 0;
    color: #2c2b28;
    font-family: "DM Serif Display", Georgia, serif;
    font-size: clamp( 2rem, 5vw, 3.5rem );
    line-height: 1.08;
}

@media ( max-width: 544px ) {
    .tkl-archive-header {
        width: min( 100% - 32px, 1200px );
        padding-top: 32px;
    }
}

.search-results .elementor-element-e83755f .elementor-heading-title {
    color: #2c2b28;
    font-family: "DM Serif Display", Georgia, serif;
    font-size: clamp( 2rem, 5vw, 3.25rem );
    line-height: 1.1;
}

.tkl-search-empty {
    margin: 32px 0 0;
    padding: 24px;
    border: 1px solid rgba( 92, 122, 92, 0.2 );
    border-radius: 14px;
    background: #faf7f2;
    color: #2c2b28;
    font-size: 1rem;
}

.elementor-widget-wrap:has( .elementor-element-f8cd018 ) .tkl-search-empty {
    display: none;
}

/*
 * Resource breadcrumbs
 *
 * The Elementor header is an overlay with a zero-height wrapper. Keep these
 * breadcrumbs below its interactive area so the header cannot intercept taps.
 */
.rp-page .rp-breadcrumb,
.bk-page .bk-breadcrumb,
.fc-page .fc-breadcrumb {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.4rem;
    margin-top: clamp( 72px, 8vw, 88px );
    padding: 14px 0 12px;
    color: #6f6b64;
    font-size: 0.8125rem;
    font-weight: 500;
    line-height: 1.4;
}

.fc-page .fc-breadcrumb {
    margin-top: 0;
}

.rp-page .rp-breadcrumb a,
.bk-page .bk-breadcrumb a,
.fc-page .fc-breadcrumb a {
    display: inline-flex;
    align-items: center;
    min-height: 32px;
    margin: -2px -4px;
    padding: 2px 4px;
    border-radius: 6px;
    color: #476b50;
    font-weight: 650;
    text-decoration: underline;
    text-decoration-thickness: 1px;
    text-underline-offset: 3px;
    transition: color 160ms ease, background-color 160ms ease;
}

.rp-page .rp-breadcrumb a:hover,
.bk-page .bk-breadcrumb a:hover,
.fc-page .fc-breadcrumb a:hover {
    background: #eef3ee;
    color: #294b34;
}

.rp-page .rp-breadcrumb a:focus-visible,
.bk-page .bk-breadcrumb a:focus-visible,
.fc-page .fc-breadcrumb a:focus-visible {
    outline: 3px solid #5c7a5c;
    outline-offset: 2px;
}

.rp-page .rp-breadcrumb > span:not([aria-current]),
.bk-page .bk-breadcrumb > span:not([aria-current]),
.fc-page .fc-breadcrumb__separator {
    margin: 0 2px;
    color: #9b978f;
    opacity: 1;
}

.rp-page .rp-breadcrumb [aria-current="page"],
.bk-page .bk-breadcrumb [aria-current="page"],
.fc-page .fc-breadcrumb [aria-current="page"] {
    color: #2c2b28;
    font-weight: 600;
}

.fc-page > .tkl-breadcrumb-wrap {
    width: 100%;
    max-width: 640px;
    margin: 0 auto;
    padding: 0 20px;
}

@media print {
    .fc-page > .tkl-breadcrumb-wrap {
        display: none !important;
    }
}
