/**
 * Theme Name: Alan Freeman Childtheme
 * Template: hello-elementor
 * Description: Child theme for Hello Elementor
 * Version: 1.0.0
 * Text Domain: alan-freeman-childtheme
*/

/* General */

:root {
    --font-size: 16px;
    --font-display: "Instrument Serif", Georgia, serif;
    --font-body: "Work Sans", "Helvetica Neue", Arial, sans-serif;
    --afm-bg: #f5f2ec;
    --afm-surface: #faf8f4;
    --afm-surface-2: #fff;
    --afm-surface-offset: #edeae3;
    --afm-divider: #ddd9d0;
    --afm-text: #1a1a18;
    --afm-text-muted: #6b6860;
    --afm-text-faint: #b0ada6;
    --afm-navy: #1a2d4d;
    --afm-navy-hover: #162540;
    --afm-gold: #b8862a;
    --afm-gold-hover: #9e7020;
    --afm-gold-light: #f0e4c8;
    --afm-shadow-sm: 0 1px 3px #1a2d4d12;
    --afm-shadow-md: 0 10px 30px #1a2d4d1a;
    --afm-shadow-lg: 0 20px 50px #1a2d4d24;
    --background: #f5f2ec;
    --foreground: #1a1a18;
    --card: #faf8f4;
    --card-foreground: #1a1a18;
    --popover: #faf8f4;
    --popover-foreground: #1a1a18;
    --primary: #1a2d4d;
    --primary-foreground: #f5f2ec;
    --secondary: #edeae3;
    --secondary-foreground: #1a1a18;
    --muted: #edeae3;
    --muted-foreground: #6b6860;
    --accent: #f0e4c8;
    --accent-foreground: #1a1a18;
    --destructive: #d4183d;
    --destructive-foreground: #fff;
    --border: #ddd9d0;
    --input: transparent;
    --input-background: #edeae3;
    --switch-background: #cbced4;
    --font-weight-medium: 500;
    --font-weight-normal: 400;
    --ring: #b8862a;
    --chart-1: oklch(64.6% .222 41.116);
    --chart-2: oklch(60% .118 184.704);
    --chart-3: oklch(39.8% .07 227.392);
    --chart-4: oklch(82.8% .189 84.429);
    --chart-5: oklch(76.9% .188 70.08);
    --radius: .75rem;
    --sidebar: #faf8f4;
    --sidebar-foreground: #1a1a18;
    --sidebar-primary: #1a2d4d;
    --sidebar-primary-foreground: #f5f2ec;
    --sidebar-accent: #edeae3;
    --sidebar-accent-foreground: #1a1a18;
    --sidebar-border: #ddd9d0;
    --sidebar-ring: #b8862a;
    --text-sm--line-height: calc(1.25 / .875);
    --background-transition: 0s;
    --border-transition: 0s;
}

html {
    font-size: var(--font-size);
}

.dark {
    --afm-bg: #12110e;
    --afm-surface: #1a1916;
    --afm-surface-2: #201f1b;
    --afm-surface-offset: #181714;
    --afm-divider: #2a2925;
    --afm-text: #e8e4dc;
    --afm-text-muted: #a19c93;
    --afm-text-faint: #6d675e;
    --afm-navy: #8fadd4;
    --afm-navy-hover: #a8c0e0;
    --afm-gold: #d4a050;
    --afm-gold-hover: #e0b060;
    --afm-gold-light: #3a2e18;
    --afm-shadow-sm: 0 1px 3px #0000003d;
    --afm-shadow-md: 0 12px 36px #00000052;
    --afm-shadow-lg: 0 24px 56px #0006;
    --background: #12110e;
    --foreground: #e8e4dc;
    --card: #1a1916;
    --card-foreground: #e8e4dc;
    --popover: #1a1916;
    --popover-foreground: #e8e4dc;
    --primary: #8fadd4;
    --primary-foreground: #12110e;
    --secondary: #2a2925;
    --secondary-foreground: #e8e4dc;
    --muted: #2a2925;
    --muted-foreground: #a19c93;
    --accent: #3a2e18;
    --accent-foreground: #e8e4dc;
    --destructive: oklch(39.6% .141 25.723);
    --destructive-foreground: oklch(63.7% .237 25.331);
    --border: #2a2925;
    --input: #2a2925;
    --ring: #d4a050;
    --font-weight-medium: 500;
    --font-weight-normal: 400;
    --chart-1: oklch(48.8% .243 264.376);
    --chart-2: oklch(69.6% .17 162.48);
    --chart-3: oklch(76.9% .188 70.08);
    --chart-4: oklch(62.7% .265 303.9);
    --chart-5: oklch(64.5% .246 16.439);
    --sidebar: #1a1916;
    --sidebar-foreground: #e8e4dc;
    --sidebar-primary: #8fadd4;
    --sidebar-primary-foreground: #12110e;
    --sidebar-accent: #2a2925;
    --sidebar-accent-foreground: #e8e4dc;
    --sidebar-border: #2a2925;
    --sidebar-ring: #d4a050;
}

body {
    background-color: var(--background) !important;
    color: var(--foreground);
    font-family: var(--font-body);
    font-size: clamp(.95rem, .9rem + .2vw, 1.1rem);
    line-height: 1.85;
}

h1, h2, h3, h4, h5, h6 { margin-block-start: 0; }

h1 {
    font-family: var(--font-display) !important;
    font-size: clamp(2.4rem, 1rem + 4vw, 4.5rem);
    line-height: 1.04;
    margin-bottom: 1.1rem;
    color: var(--afm-text);
    font-weight: var(--font-weight-medium);
}

h1 em{
    font-style: italic;
    color: var(--afm-gold);
}

h2{
    font-family: var(--font-display) !important;
    font-size: clamp(2rem, 1.2rem + 2.5vw, 3.5rem);;
    color: var(--afm-text);
    line-height: 1.08;
    margin-bottom: 1.75rem;
    font-weight: var(--font-weight-medium);
}

h3 {
    font-family: var(--font-display) !important;
    font-size: 1.5rem;
    color: var(--afm-text);
    margin: 0.25rem 0px 0.5rem;
    font-weight: var(--font-weight-medium);
    line-height: 1.5;
}

.elementor-widget-button .elementor-button {
    background-color: var(--afm-navy) !important;
    color: rgb(255, 255, 255) !important;
    padding: 0.78rem 1.4rem;
    min-height: 46px;
}

.elementor-widget-button .elementor-button:hover {
    opacity: 0.8;
}

.elementor-button-text {
    font-size: .875rem;
    font-weight: 600;
    line-height: var(--tw-leading, var(--text-sm--line-height));
}

.elementor-button-info .elementor-button {
    background-color: var(--afm-gold) !important;
    color: rgb(255, 255, 255) !important;
    padding: 0.78rem 1.4rem;
    min-height: 46px;
}

.elementor-button-success .elementor-button {
    border: 1.5px solid var(--afm-divider);
    background-color: transparent !important;
    color: var(--afm-text) !important;
    padding: 0.78rem 1.4rem;
    min-height: 46px;
}

.elementor-button-warning .elementor-button {
    border: 1.5px solid var(--afm-gold) !important;
    background-color: transparent !important;
    color: var(--afm-gold) !important;
    padding: 0.6rem 1.1rem;
    min-height: 42px;
}

.elementor-button-danger .elementor-button {
    background-color: rgba(255, 255, 255, 0.1) !important;
    border: 1.5px solid rgba(255, 255, 255, 0.35) !important;
    color: rgb(255, 255, 255) !important;
    padding: 0.78rem 1.4rem;
    min-height: 46px;
}

.afm-list ul { list-style: none; padding: 0; margin: 0; }
.afm-list ul li { position: relative; padding-left: 20px; margin-bottom: 0.65rem; }
.afm-list ul li::before { content: "✦"; position: absolute; left: 0; top: 0.35rem; font-size: 0.65rem; color: var(--afm-gold); }

/* Footer */
.has-dark-bg h3{
    font-size: 1.2rem;
    color: white
}

.has-dark-bg {
    font-size: 0.875rem;
    color: rgba(255, 255, 255, 0.65)
}


/* Header */
.elementor-button-warning .elementor-button {
    border: 1.5px solid var(--afm-gold);
    color: var(--afm-gold);
    padding: 0.6rem 1.1rem;
    min-height: 42px;
}

header {
    position: sticky;
    top: 0px;
    z-index: 100;
    background: color-mix(in srgb, var(--afm-bg) 88%, transparent);
    backdrop-filter: blur(18px);
    border-bottom: 1px solid var(--afm-divider);
}

/* Theme toggle button */
.theme-toggle {
    width: 42px;
    height: 42px;
    padding: 0;
    border: 0;
    background: transparent;
    color: inherit;
    cursor: pointer;

    display: inline-flex;
    align-items: center;
    justify-content: center;

    position: relative;
}

/* SVG icons */
.theme-toggle .theme-icon {
    width: 22px;
    height: 22px;

    position: absolute;

    transition:
        opacity 0.2s ease,
        transform 0.2s ease;
}

/* Default = light mode
   Show moon */
.theme-icon-moon {
    opacity: 1;
    transform: rotate(0deg) scale(1);
}

.theme-icon-sun {
    opacity: 0;
    transform: rotate(-45deg) scale(0.7);
}

/* Dark mode
   Show sun */
body.dark .theme-icon-moon {
    opacity: 0;
    transform: rotate(45deg) scale(0.7);
}

body.dark .theme-icon-sun {
    opacity: 1;
    transform: rotate(0deg) scale(1);
}

/* Hover */
.theme-toggle:hover .theme-icon {
    transform: scale(1.1);
}

/* Keyboard accessibility */
.theme-toggle:focus-visible {
    outline: 2px solid currentColor;
    outline-offset: 4px;
}



/* home page */

.afm-eyebrow-text {
    color: var(--afm-gold);
}

.afm-hero-top-content {
        border-bottom: 1px solid var(--afm-divider);
}

.afm-hero-top-content {
    border-bottom: 1px solid var(--afm-divider);
}

.afm-hero-bottom-content-box {
    background: var(--afm-surface);
    border: 1px solid var(--afm-divider);
    border-radius: 1rem !important;
    padding: 0.9rem 1rem 1rem;
    box-shadow: var(--afm-shadow-sm);
}

.afm-hero-bottom-content-box .elementor-widget-heading:last-child {
    color: var(--afm-text-muted);
}

.afm-book-card {
    transition: transform 200ms ease;
}

.afm-book-card:hover {
    transform: translateY(-4px);
}




/* About page */

.afm-bg-navy {
    background: var(--afm-navy);
    color: rgba(255, 255, 255, 0.72);
    transition: none !important;
}

.afm-bg-navy h3, .afm-bg-navy h2, .afm-bg-navy h1{
    color: white
}

.afm-navy-img {
    background: linear-gradient(180deg, color-mix(in srgb, var(--afm-navy) 60%, #fff) 0%, color-mix(in srgb, var(--afm-navy) 40%, #fff) 100%);
    box-shadow: var(--afm-shadow-lg);
    border-radius: 2rem;
    border: 1px solid rgba(255, 255, 255, 0.15);
    padding: 18px;
    transition: none !important;
}
.afm-navy-img img { border-radius: 1.4rem; }
.afm-dark-img { 
    background: linear-gradient(180deg, color-mix(in srgb, var(--afm-navy) 14%, var(--afm-surface)) 0%, var(--afm-surface) 60%, var(--afm-surface-2) 100%);
    border: 1px solid var(--afm-divider);
    aspect-ratio: 3 / 4;
}   

.afm-btn-lg.elementor-widget-button .elementor-button { padding: 1.163rem 1.75rem; }
.afm-btn-lg.elementor-widget-button .elementor-button .elementor-button-text { font-size: 1rem; }

.font-display { font-family: var(--font-display); }
.afm-navy { color: var(--afm-navy); }
.afm-text-muted { color: var(--afm-text-muted); }

.afm-bg-light {
    background: var(--afm-surface);
    border-top: 1px solid var(--afm-divider);
    border-bottom: 1px solid var(--afm-divider);
    transition: none !important;
}

/* Articles main page */

.afm-cat-color { color: var(--afm-cat-color); background: color-mix(in srgb, var(--afm-cat-color) 12%, var(--afm-surface)); }
.afm-cat-link-color { color: var(--afm-cat-color); }

/* Article post */

.article-prose p {
    color: var(--afm-text-muted);
    font-size: clamp(.95rem, .9rem + .2vw, 1.1rem);
    line-height: 1.85;
    margin-bottom: 1.5em;
    max-width: none;
}

.article-prose h2 {
    font-family: var(--font-display);
    font-size: clamp(1.35rem, 1rem + 1.5vw, 1.9rem);
    font-weight: 400;
    color: var(--afm-text);
    line-height: 1.2;
    margin-top: calc(2.5em - 24px) !important;
    margin-bottom: .75em !important;
}

.article-prose a:hover {
    color: var(--afm-gold-hover);
}

.article-prose a {
    color: var(--afm-gold);
    text-decoration: underline;
    text-underline-offset: 3px;
}

.afm-post-callout {
    margin-top: calc(2.5em - 24px) !important;
    margin-bottom: 24px !important;
    background: var(--afm-surface);
    border: 1px solid var(--afm-divider);
    border-left: 4px solid var(--afm-gold);
    border-radius: 0 .875rem .875rem 0 !important;
    padding: 1.25rem 1.5rem !important;
    margin: 2.5em 0;
    line-height: 1.6;
    color: var(--afm-text-muted);
    max-width: none;
    font-size: clamp(.9rem, .85rem + .2vw, 1rem);
}

.afm-post-callout-title {
    font-family: var(--font-display);
    font-size: 1.05rem;
    font-weight: 400;
    color: var(--afm-text);
    line-height: 1.3;
    margin-bottom: .6rem !important;
}

.afm-post-callout-button a {
    padding: .5rem 1.1rem !important;
    margin-top: .9rem !important;
    line-height: 1.4 !important;
    min-height: 36px !important;
}
/* ===== Article book callout — "From Alan Freeman's book …" ===== */
.post-callout {
    background: var(--afm-gold-light);
    border-left: 3px solid var(--afm-gold);
    border-radius: 8px;
    padding: 1.5rem 1.75rem;
    margin: 2.5rem 0;
    box-shadow: var(--afm-shadow-sm);
    line-height: 1.65;
}
.post-callout strong {
    font-family: var(--font-display);
    display: block;
    margin-bottom: 0.35rem;
}
.post-callout br {
    display: none; /* strong is already block-level; hides the doubled line break */
}
.post-callout a {
    display: inline-block;
    margin-top: 0.75rem;
    font-weight: 600;
    color: var(--afm-gold-hover);
    text-decoration: none;
}
.post-callout a:hover {
    text-decoration: underline;
}

/* ===== Author note at the end of every article ===== */
.post-author-note {
    margin-top: 3rem;
    padding-top: 1.25rem;
    border-top: 1px solid var(--afm-divider);
    color: var(--afm-text-faint);
    font-size: 0.95rem;
}
.post-author-note a {
    color: var(--afm-gold);
}
/* ===== Category / archive listing pages ===== */
body.archive .site-main {
    max-width: 1160px;
    margin: 0 auto;
    padding: 3rem 1.5rem 4.5rem;
}
/* "Category: Deep Clean" → just "Deep Clean", in the display serif */
body.archive .page-header .entry-title {
    font-size: 0;
    margin: 0 0 2.25rem;
}
body.archive .page-header .entry-title span {
    font-family: var(--font-display);
    font-size: 3rem;
    line-height: 1.1;
    color: var(--afm-text, #1a1a18);
}
/* two-column card grid */
body.archive .page-content {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 2rem;
}
@media (max-width: 800px) {
    body.archive .page-content { grid-template-columns: 1fr; }
}
body.archive article.post {
    display: flex;
    flex-direction: column;
    background: var(--afm-surface);
    border: 1px solid var(--afm-divider);
    border-radius: 16px;
    overflow: hidden;
    box-shadow: var(--afm-shadow-sm);
    transition: box-shadow .2s ease, transform .2s ease;
}
body.archive article.post:hover {
    box-shadow: var(--afm-shadow-md);
    transform: translateY(-2px);
}
/* image moves above the title, fills the card top, never distorts */
body.archive article.post > a {
    order: -1;
    display: block;
    line-height: 0;
}
body.archive article.post img.wp-post-image {
    width: 100%;
    height: auto;
    display: block;
}
/* titles: brand serif in ink, gold on hover — no more pink */
body.archive article.post .entry-title {
    font-family: var(--font-display);
    font-size: 1.45rem;
    line-height: 1.25;
    margin: 1.15rem 1.4rem 0.4rem;
}
body.archive article.post .entry-title a {
    color: var(--afm-text, #1a1a18);
    text-decoration: none;
}
body.archive article.post .entry-title a:hover {
    color: var(--afm-gold);
}
body.archive article.post p {
    color: var(--afm-text-faint);
    font-size: 0.95rem;
    line-height: 1.6;
    margin: 0 1.4rem 1.4rem;
    max-width: none;
}
/* pagination (appears as categories grow) */
body.archive .page-numbers {
    font-family: var(--font-body);
    color: var(--afm-text, #1a1a18);
    padding: .4rem .8rem;
    border-radius: 8px;
    text-decoration: none;
}
body.archive .page-numbers.current,
body.archive .page-numbers:hover {
    background: var(--afm-gold-light);
    color: var(--afm-gold-hover);
}
/* ===== Category / archive listing pages ===== */
body.archive .site-main {
    max-width: 1160px;
    margin: 0 auto;
    padding: 3rem 1.5rem 4.5rem;
}
/* "Category: Deep Clean" → just "Deep Clean", in the display serif */
body.archive .page-header .entry-title {
    font-size: 0;
    margin: 0 0 2.25rem;
}
body.archive .page-header .entry-title span {
    font-family: var(--font-display);
    font-size: 3rem;
    line-height: 1.1;
    color: var(--afm-text, #1a1a18);
}
/* two-column card grid */
body.archive .page-content {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 2rem;
}
@media (max-width: 800px) {
    body.archive .page-content { grid-template-columns: 1fr; }
}
body.archive article.post {
    display: flex;
    flex-direction: column;
    background: var(--afm-surface);
    border: 1px solid var(--afm-divider);
    border-radius: 16px;
    overflow: hidden;
    box-shadow: var(--afm-shadow-sm);
    transition: box-shadow .2s ease, transform .2s ease;
}
body.archive article.post:hover {
    box-shadow: var(--afm-shadow-md);
    transform: translateY(-2px);
}
/* image moves above the title, fills the card top, never distorts */
body.archive article.post > a {
    order: -1;
    display: block;
    line-height: 0;
}
body.archive article.post img.wp-post-image {
    width: 100%;
    height: auto;
    display: block;
}
/* titles: brand serif in ink, gold on hover — no more pink */
body.archive article.post .entry-title {
    font-family: var(--font-display);
    font-size: 1.45rem;
    line-height: 1.25;
    margin: 1.15rem 1.4rem 0.4rem;
}
body.archive article.post .entry-title a {
    color: var(--afm-text, #1a1a18);
    text-decoration: none;
}
body.archive article.post .entry-title a:hover {
    color: var(--afm-gold);
}
body.archive article.post p {
    color: var(--afm-text-faint);
    font-size: 0.95rem;
    line-height: 1.6;
    margin: 0 1.4rem 1.4rem;
    max-width: none;
}
/* pagination (appears as categories grow) */
body.archive .page-numbers {
    font-family: var(--font-body);
    color: var(--afm-text, #1a1a18);
    padding: .4rem .8rem;
    border-radius: 8px;
    text-decoration: none;
}
body.archive .page-numbers.current,
body.archive .page-numbers:hover {
    background: var(--afm-gold-light);
    color: var(--afm-gold-hover);
}
body.archive article.post p { color: var(--afm-text-muted, #55514a); }
/* ===== Article readability ===== */
.single-post .elementor-widget-theme-post-content p:first-of-type::first-letter {
    font-family: var(--font-display);
    font-size: 3.6em;
    line-height: 0.8;
    float: left;
    padding: 0.08em 0.12em 0 0;
    color: var(--afm-gold);
}
.single-post .elementor-widget-theme-post-content h2 {
    font-family: var(--font-display);
    font-size: 1.9rem;
    line-height: 1.2;
    margin: 2.4em 0 0.6em;
}
.single-post .elementor-widget-theme-post-content h2::after {
    content: "";
    display: block;
    width: 44px;
    height: 3px;
    background: var(--afm-gold);
    margin-top: 0.45rem;
    border-radius: 2px;
}
/* ===== Author box ===== */
.author-box {
    display: flex;
    gap: 1.25rem;
    align-items: flex-start;
    background: var(--afm-surface);
    border: 1px solid var(--afm-divider);
    border-radius: 16px;
    padding: 1.5rem 1.6rem;
    margin-top: 3rem;
    box-shadow: var(--afm-shadow-sm);
}
.author-box-photo {
    width: 84px;
    height: 84px;
    border-radius: 50%;
    border: 3px solid var(--afm-gold);
    flex-shrink: 0;
}
.author-box-name {
    font-family: var(--font-display);
    font-size: 1.25rem;
    margin: 0 0 0.15rem;
    color: var(--afm-text, #1a1a18);
}
.author-box-role {
    font-size: 0.85rem;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    color: var(--afm-gold-hover);
    margin: 0 0 0.5rem;
}
.author-box-bio {
    font-size: 0.95rem;
    line-height: 1.6;
    color: var(--afm-text-muted, #55514a);
    margin: 0;
    max-width: none;
}
.author-box-bio a { color: var(--afm-gold); }
.author-box--testimony { border-left: 4px solid #5a4a7a; }
/* fixes: keep drop cap out of the author box; force circular photo */
.single-post .elementor-widget-theme-post-content .author-box p::first-letter {
    font-family: inherit;
    font-size: inherit;
    float: none;
    color: inherit;
    padding: 0;
    line-height: inherit;
}
.single-post .author-box img.author-box-photo {
    border-radius: 50% !important;
    border: 3px solid var(--afm-gold) !important;
    width: 84px !important;
    height: 84px !important;
    object-fit: cover;
}