/*
Theme Name: WellGlowed
Theme URI: https://wellglowed.example.com
Author: WellGlowed
Author URI: https://wellglowed.example.com
Description: WellGlowed is a custom editorial theme for a beauty, wellness, and K-beauty blog. It pairs Byrdie-style magazine layouts with Verywell-style content authority signals such as medical review lines, author bios, and expert callouts.
Version: 1.0.0
Requires at least: 6.0
Tested up to: 6.5
Requires PHP: 7.4
License: GNU General Public License v2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Text Domain: wellglowed
Tags: blog, editorial, beauty, wellness, two-columns, custom-menu, featured-images, threaded-comments
*/

/* =====================================================================
   1. DESIGN TOKENS
   ===================================================================== */
:root {
    --wg-primary: #C41E3A;
    --wg-primary-dark: #a3162e;
    --wg-headline: #1A1A1A;
    --wg-body: #444444;
    --wg-bg-warm: #F7F3EF;
    --wg-border: #E5E5E5;
    --wg-white: #ffffff;
    --wg-grey-muted: #767676;

    --wg-font-display: "Playfair Display", Georgia, "Times New Roman", serif;
    --wg-font-sans: "DM Sans", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;

    --wg-maxw: 1200px;
    --wg-article-maxw: 740px;
    --wg-radius: 8px;
}

/* =====================================================================
   2. RESET & BASE
   ===================================================================== */
*,
*::before,
*::after {
    box-sizing: border-box;
}

html {
    -webkit-text-size-adjust: 100%;
    scroll-behavior: smooth;
}

body {
    margin: 0;
    font-family: var(--wg-font-sans);
    font-weight: 400;
    font-size: 16px;
    line-height: 1.6;
    color: var(--wg-body);
    background: var(--wg-white);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

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

a {
    color: var(--wg-primary);
    text-decoration: none;
    transition: color 0.15s ease;
}

a:hover,
a:focus {
    color: var(--wg-primary-dark);
    text-decoration: underline;
}

h1, h2, h3, h4, h5, h6 {
    color: var(--wg-headline);
    margin: 0 0 0.5em;
    line-height: 1.2;
}

h1, h2 {
    font-family: var(--wg-font-display);
    font-weight: 700;
}

h3, h4, h5, h6 {
    font-family: var(--wg-font-sans);
    font-weight: 700;
}

p {
    margin: 0 0 1.25em;
}

ul, ol {
    margin: 0 0 1.25em;
    padding-left: 1.4em;
}

button {
    font-family: inherit;
    cursor: pointer;
}

/* Accessibility helpers */
.screen-reader-text {
    border: 0;
    clip: rect(1px, 1px, 1px, 1px);
    clip-path: inset(50%);
    height: 1px;
    width: 1px;
    margin: -1px;
    overflow: hidden;
    padding: 0;
    position: absolute !important;
    word-wrap: normal !important;
}

.skip-link {
    position: absolute;
    left: -9999px;
    top: 0;
    background: var(--wg-headline);
    color: #fff;
    padding: 12px 20px;
    z-index: 1000;
}
.skip-link:focus {
    left: 8px;
    top: 8px;
    color: #fff;
}

/* =====================================================================
   3. LAYOUT HELPERS
   ===================================================================== */
.wg-container {
    width: 100%;
    max-width: var(--wg-maxw);
    margin: 0 auto;
    padding: 0 24px;
}

.wg-section {
    padding: 48px 0;
}

.wg-section-label {
    font-family: var(--wg-font-sans);
    font-weight: 700;
    font-size: 13px;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: var(--wg-headline);
    margin: 0 0 24px;
    padding-bottom: 12px;
    border-bottom: 2px solid var(--wg-headline);
    display: inline-block;
}

.wg-category-label {
    display: inline-block;
    font-family: var(--wg-font-sans);
    font-weight: 700;
    font-size: 11px;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--wg-primary);
    margin: 0 0 10px;
}
.wg-category-label:hover {
    color: var(--wg-primary-dark);
    text-decoration: none;
}

/* =====================================================================
   4. HEADER & NAVIGATION
   ===================================================================== */
.wg-site-header {
    position: sticky;
    top: 0;
    z-index: 100;
    background: var(--wg-white);
    border-bottom: 1px solid var(--wg-border);
}

.wg-header-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
    min-height: 72px;
}

.wg-logo {
    font-family: var(--wg-font-display);
    font-weight: 700;
    font-size: 30px;
    line-height: 1;
    letter-spacing: -0.01em;
    color: var(--wg-headline);
    white-space: nowrap;
}
.wg-logo:hover {
    text-decoration: none;
}
.wg-logo .wg-logo-glow {
    color: var(--wg-primary);
}

.wg-primary-nav ul {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    align-items: center;
    gap: 28px;
}

.wg-primary-nav a {
    font-family: var(--wg-font-sans);
    font-weight: 600;
    font-size: 15px;
    color: var(--wg-headline);
    text-transform: none;
}
.wg-primary-nav a:hover {
    color: var(--wg-primary);
    text-decoration: none;
}

.wg-header-actions {
    display: flex;
    align-items: center;
    gap: 18px;
}

.wg-search-toggle {
    background: none;
    border: none;
    padding: 4px;
    color: var(--wg-headline);
    display: inline-flex;
    align-items: center;
}
.wg-search-toggle:hover {
    color: var(--wg-primary);
}
.wg-search-toggle svg {
    width: 20px;
    height: 20px;
}

.wg-search-panel {
    display: none;
    border-top: 1px solid var(--wg-border);
    background: var(--wg-bg-warm);
}
.wg-search-panel.is-open {
    display: block;
}
.wg-search-panel .wg-container {
    padding-top: 16px;
    padding-bottom: 16px;
    padding-left: 40px;
    padding-right: 40px;
    max-width: 1200px;
    margin-left: auto;
    margin-right: auto;
    box-sizing: border-box;
}
.wg-search-panel form {
    display: flex;
    gap: 10px;
}
.wg-search-panel input[type="search"] {
    flex: 1;
    padding: 12px 14px;
    border: 1px solid var(--wg-border);
    border-radius: 4px;
    font-family: var(--wg-font-sans);
    font-size: 15px;
}

/* Mobile nav toggle */
.wg-nav-toggle {
    display: none;
    background: none;
    border: none;
    color: var(--wg-headline);
    padding: 4px;
}
.wg-nav-toggle svg {
    width: 24px;
    height: 24px;
}

/* =====================================================================
   5. SUB NAVIGATION (category pages)
   ===================================================================== */
.wg-subnav {
    background: var(--wg-bg-warm);
    border-bottom: 1px solid var(--wg-border);
}
.wg-subnav ul {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-wrap: wrap;
    gap: 26px;
    min-height: 48px;
    align-items: center;
}
.wg-subnav a {
    font-family: var(--wg-font-sans);
    font-weight: 600;
    font-size: 13px;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    color: var(--wg-headline);
}
.wg-subnav a:hover {
    color: var(--wg-primary);
    text-decoration: none;
}

/* =====================================================================
   6. HERO (front page)
   ===================================================================== */
.wg-hero {
    padding: 48px 0 24px;
}

.wg-hero-card {
    display: block;
}

.wg-hero-image {
    position: relative;
    aspect-ratio: 3 / 2;
    overflow: hidden;
    border-radius: var(--wg-radius);
    background: var(--wg-bg-warm);
    margin-bottom: 24px;
}
.wg-hero-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.wg-hero-body {
    max-width: 820px;
}

.wg-hero-title {
    font-family: var(--wg-font-display);
    font-weight: 700;
    font-size: clamp(34px, 5vw, 56px);
    line-height: 1.08;
    margin: 0 0 16px;
}
.wg-hero-title a {
    color: var(--wg-headline);
}
.wg-hero-title a:hover {
    color: var(--wg-primary);
    text-decoration: none;
}

.wg-hero-excerpt {
    font-size: 18px;
    color: var(--wg-body);
    margin-bottom: 16px;
}

/* =====================================================================
   7. ARTICLE META (byline)
   ===================================================================== */
.wg-byline {
    font-family: var(--wg-font-sans);
    font-size: 14px;
    color: var(--wg-grey-muted);
}
.wg-byline a {
    color: var(--wg-headline);
    font-weight: 600;
}
.wg-byline .wg-sep {
    margin: 0 8px;
    color: var(--wg-border);
}

/* =====================================================================
   8. CARD GRID
   ===================================================================== */
.wg-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 32px;
}

.wg-card {
    display: flex;
    flex-direction: column;
}

.wg-card-thumb {
    aspect-ratio: 3 / 2;
    overflow: hidden;
    border-radius: var(--wg-radius);
    background: var(--wg-bg-warm);
    margin-bottom: 16px;
}
.wg-card-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.4s ease;
}
.wg-card:hover .wg-card-thumb img {
    transform: scale(1.04);
}

.wg-card-title {
    font-family: var(--wg-font-sans);
    font-weight: 700;
    font-size: 19px;
    line-height: 1.3;
    margin: 0 0 10px;
}
.wg-card-title a {
    color: var(--wg-headline);
}
.wg-card-title a:hover {
    color: var(--wg-primary);
    text-decoration: none;
}

.wg-card-excerpt {
    font-size: 15px;
    color: var(--wg-body);
    margin-bottom: 12px;
}

/* =====================================================================
   9. EMAIL SIGNUP STRIP
   ===================================================================== */
.wg-signup {
    background: var(--wg-bg-warm);
}
.wg-signup-inner {
    text-align: center;
    max-width: 620px;
    margin: 0 auto;
    padding: 56px 0;
}
.wg-signup h2 {
    font-family: var(--wg-font-display);
    font-weight: 700;
    font-size: clamp(26px, 4vw, 36px);
    margin: 0 0 12px;
}
.wg-signup p {
    font-size: 16px;
    color: var(--wg-body);
    margin-bottom: 24px;
}
.wg-signup-form {
    display: flex;
    gap: 10px;
    max-width: 480px;
    margin: 0 auto;
}
.wg-signup-form input[type="email"] {
    flex: 1;
    padding: 14px 16px;
    border: 1px solid var(--wg-border);
    border-radius: 4px;
    font-family: var(--wg-font-sans);
    font-size: 15px;
    background: var(--wg-white);
}

/* =====================================================================
   10. BUTTONS
   ===================================================================== */
.wg-btn {
    display: inline-block;
    background: var(--wg-primary);
    color: var(--wg-white);
    font-family: var(--wg-font-sans);
    font-weight: 600;
    font-size: 15px;
    padding: 14px 26px;
    border: none;
    border-radius: 4px;
    text-align: center;
    white-space: nowrap;
}
.wg-btn:hover,
.wg-btn:focus {
    background: var(--wg-primary-dark);
    color: var(--wg-white);
    text-decoration: none;
}

/* =====================================================================
   11. FOOTER
   ===================================================================== */
.wg-site-footer {
    background: var(--wg-headline);
    color: #cfcfcf;
    padding: 56px 0 32px;
    margin-top: 64px;
}
.wg-footer-grid {
    display: grid;
    grid-template-columns: 1.4fr 1fr 1.4fr;
    gap: 48px;
}
.wg-site-footer h3 {
    color: var(--wg-white);
    font-size: 13px;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    margin-bottom: 18px;
}
.wg-footer-logo {
    font-family: var(--wg-font-display);
    font-weight: 700;
    font-size: 28px;
    color: var(--wg-white);
    display: inline-block;
    margin-bottom: 14px;
}
.wg-footer-logo .wg-logo-glow {
    color: var(--wg-primary);
}
.wg-site-footer p {
    font-size: 14px;
    line-height: 1.7;
    color: #b8b8b8;
}
.wg-site-footer ul {
    list-style: none;
    margin: 0;
    padding: 0;
}
.wg-site-footer ul li {
    margin-bottom: 10px;
}
.wg-site-footer ul a {
    color: #cfcfcf;
    font-size: 14px;
}
.wg-site-footer ul a:hover {
    color: var(--wg-white);
}
.wg-footer-signup .wg-signup-form {
    margin: 14px 0 0;
    max-width: none;
}
.wg-footer-signup input[type="email"] {
    background: #2a2a2a;
    border-color: #3a3a3a;
    color: #fff;
}
.wg-footer-bottom {
    border-top: 1px solid #2e2e2e;
    margin-top: 40px;
    padding-top: 24px;
    font-size: 13px;
    color: #8a8a8a;
}

/* =====================================================================
   12. SINGLE ARTICLE
   ===================================================================== */
.wg-breadcrumbs {
    font-family: var(--wg-font-sans);
    font-size: 13px;
    color: var(--wg-grey-muted);
    padding: 20px 0;
}
.wg-breadcrumbs a {
    color: var(--wg-grey-muted);
}
.wg-breadcrumbs a:hover {
    color: var(--wg-primary);
}
.wg-breadcrumbs .wg-sep {
    margin: 0 8px;
}

.wg-article-hero {
    width: 100%;
    aspect-ratio: 16 / 9;
    overflow: hidden;
    background: var(--wg-bg-warm);
    margin-bottom: 32px;
}
.wg-article-hero img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.wg-article-header {
    max-width: var(--wg-article-maxw);
    margin: 0 auto 28px;
}
.wg-article-title {
    font-family: var(--wg-font-display);
    font-weight: 700;
    font-size: clamp(32px, 5vw, 48px);
    line-height: 1.1;
    margin: 8px 0 20px;
}

.wg-article-meta {
    border-top: 1px solid var(--wg-border);
    border-bottom: 1px solid var(--wg-border);
    padding: 16px 0;
}
.wg-article-author {
    font-family: var(--wg-font-sans);
    font-size: 15px;
    color: var(--wg-body);
}
.wg-article-author strong {
    color: var(--wg-headline);
}
.wg-reviewed-by {
    font-family: var(--wg-font-sans);
    font-size: 13px;
    color: var(--wg-grey-muted);
    margin-top: 6px;
}
.wg-reviewed-by .wg-check {
    color: var(--wg-primary);
    font-weight: 700;
}

/* Table of contents */
.wg-toc {
    max-width: var(--wg-article-maxw);
    margin: 0 auto 32px;
    background: var(--wg-bg-warm);
    border: 1px solid var(--wg-border);
    border-radius: var(--wg-radius);
    padding: 22px 26px;
}
.wg-toc h2 {
    font-family: var(--wg-font-sans);
    font-weight: 700;
    font-size: 13px;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    margin: 0 0 12px;
}
.wg-toc ol {
    margin: 0;
    padding-left: 1.2em;
}
.wg-toc li {
    margin-bottom: 8px;
    font-size: 15px;
}
.wg-toc a {
    color: var(--wg-headline);
}
.wg-toc a:hover {
    color: var(--wg-primary);
}

/* Article body */
.wg-article-body {
    max-width: var(--wg-article-maxw);
    margin: 0 auto;
    font-size: 17px;
    line-height: 1.75;
    color: var(--wg-body);
}
.wg-article-body p {
    margin: 0 0 1.5em;
}
.wg-article-body h2 {
    font-family: var(--wg-font-display);
    font-weight: 700;
    font-size: 30px;
    margin: 1.6em 0 0.6em;
}
.wg-article-body h3 {
    font-family: var(--wg-font-sans);
    font-weight: 700;
    font-size: 22px;
    margin: 1.4em 0 0.5em;
}
.wg-article-body a {
    text-decoration: underline;
}
.wg-article-body img {
    border-radius: var(--wg-radius);
    margin: 1.5em 0;
}
.wg-article-body blockquote {
    margin: 1.5em 0;
    padding-left: 20px;
    border-left: 4px solid var(--wg-primary);
    font-style: italic;
    color: var(--wg-headline);
}

/* Expert callout box */
.wg-expert-callout {
    border-left: 4px solid var(--wg-primary);
    background: var(--wg-bg-warm);
    padding: 22px 26px;
    margin: 2em 0;
    font-style: italic;
    font-size: 18px;
    line-height: 1.6;
    color: var(--wg-headline);
    border-radius: 0 var(--wg-radius) var(--wg-radius) 0;
}
.wg-expert-callout cite {
    display: block;
    margin-top: 12px;
    font-style: normal;
    font-size: 14px;
    font-weight: 600;
    color: var(--wg-grey-muted);
}

/* Affiliate product box */
.wg-product-box {
    display: flex;
    gap: 22px;
    align-items: center;
    border: 1px solid var(--wg-border);
    border-radius: var(--wg-radius);
    padding: 22px;
    margin: 2em 0;
    background: var(--wg-white);
}
.wg-product-image {
    flex: 0 0 130px;
    width: 130px;
    aspect-ratio: 1 / 1;
    border-radius: var(--wg-radius);
    overflow: hidden;
    background: var(--wg-bg-warm);
}
.wg-product-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}
.wg-product-info {
    flex: 1;
}
.wg-product-info h4 {
    font-size: 19px;
    margin: 0 0 6px;
}
.wg-product-info p {
    font-size: 15px;
    margin: 0 0 14px;
}

/* Author bio box */
.wg-author-bio {
    display: flex;
    gap: 22px;
    align-items: flex-start;
    background: var(--wg-bg-warm);
    border-radius: var(--wg-radius);
    padding: 28px;
    margin: 3em 0 0;
    max-width: var(--wg-article-maxw);
    margin-left: auto;
    margin-right: auto;
}
.wg-author-photo {
    flex: 0 0 84px;
    width: 84px;
    height: 84px;
    border-radius: 50%;
    overflow: hidden;
    background: var(--wg-border);
}
.wg-author-photo img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}
.wg-author-details h3 {
    font-size: 18px;
    margin: 0 0 2px;
}
.wg-author-credentials {
    font-size: 13px;
    color: var(--wg-primary);
    font-weight: 600;
    margin-bottom: 10px;
}
.wg-author-details p {
    font-size: 15px;
    margin: 0;
    color: var(--wg-body);
}

/* Single page constrained wrappers */
.wg-single-wrap {
    padding-bottom: 48px;
}

/* Related posts */
.wg-related {
    max-width: var(--wg-maxw);
    margin: 56px auto 0;
    padding: 48px 24px 0;
    border-top: 1px solid var(--wg-border);
}

/* =====================================================================
   13. ARCHIVE / CATEGORY
   ===================================================================== */
.wg-archive-header {
    padding: 48px 0 8px;
}
.wg-archive-title {
    font-family: var(--wg-font-display);
    font-weight: 700;
    font-size: clamp(30px, 5vw, 44px);
    margin: 0 0 16px;
}
.wg-archive-description {
    max-width: 740px;
    font-size: 16px;
    line-height: 1.7;
    color: var(--wg-body);
}

/* =====================================================================
   14. PAGINATION
   ===================================================================== */
.wg-pagination {
    margin: 48px 0 0;
    display: flex;
    justify-content: center;
}
.wg-pagination .page-numbers {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 42px;
    height: 42px;
    padding: 0 12px;
    margin: 0 4px;
    border: 1px solid var(--wg-border);
    border-radius: 4px;
    font-family: var(--wg-font-sans);
    font-weight: 600;
    font-size: 14px;
    color: var(--wg-headline);
}
.wg-pagination .page-numbers.current {
    background: var(--wg-primary);
    border-color: var(--wg-primary);
    color: #fff;
}
.wg-pagination a.page-numbers:hover {
    border-color: var(--wg-primary);
    color: var(--wg-primary);
    text-decoration: none;
}

/* =====================================================================
   15. SIDEBAR & WIDGETS
   ===================================================================== */
.wg-content-with-sidebar {
    display: grid;
    grid-template-columns: 1fr 320px;
    gap: 48px;
    align-items: start;
}
.wg-sidebar .widget {
    margin-bottom: 36px;
}
.wg-sidebar .widget-title {
    font-family: var(--wg-font-sans);
    font-weight: 700;
    font-size: 13px;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--wg-headline);
    margin: 0 0 16px;
    padding-bottom: 10px;
    border-bottom: 2px solid var(--wg-headline);
}
.wg-sidebar ul {
    list-style: none;
    margin: 0;
    padding: 0;
}
.wg-sidebar ul li {
    margin-bottom: 10px;
    font-size: 15px;
}
.wg-sidebar ul a {
    color: var(--wg-headline);
}
.wg-sidebar ul a:hover {
    color: var(--wg-primary);
}

/* =====================================================================
   16. COMMENTS
   ===================================================================== */
.wg-comments {
    max-width: var(--wg-article-maxw);
    margin: 48px auto 0;
}
.wg-comments .comment-list {
    list-style: none;
    padding: 0;
}
.wg-comments .comment-body {
    border-bottom: 1px solid var(--wg-border);
    padding: 18px 0;
}

/* =====================================================================
   17. UTILITIES
   ===================================================================== */
.wg-center { text-align: center; }
.wg-mt-0 { margin-top: 0; }
.wg-mb-0 { margin-bottom: 0; }

.wg-placeholder {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #f0e8e0 0%, #f7f3ef 100%);
    color: #c9b9a8;
    font-family: var(--wg-font-display);
    font-size: 20px;
}

/* =====================================================================
   18. RESPONSIVE
   ===================================================================== */
@media (max-width: 980px) {
    .wg-footer-grid {
        grid-template-columns: 1fr 1fr;
        gap: 36px;
    }
    .wg-content-with-sidebar {
        grid-template-columns: 1fr;
    }
    .wg-sidebar {
        margin-top: 24px;
    }
}

@media (max-width: 768px) {
    .wg-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 24px;
    }
    .wg-primary-nav {
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        background: var(--wg-white);
        border-bottom: 1px solid var(--wg-border);
        display: none;
    }
    .wg-primary-nav.is-open {
        display: block;
    }
    .wg-primary-nav ul {
        flex-direction: column;
        align-items: flex-start;
        gap: 0;
        padding: 12px 24px;
    }
    .wg-primary-nav ul li {
        width: 100%;
        padding: 10px 0;
        border-bottom: 1px solid var(--wg-border);
    }
    .wg-nav-toggle {
        display: inline-flex;
    }
    .wg-site-header .wg-header-inner {
        position: relative;
    }
    .wg-product-box {
        flex-direction: column;
        align-items: flex-start;
    }
    .wg-signup-form,
    .wg-search-panel form {
        flex-direction: column;
    }
}

@media (max-width: 560px) {
    .wg-grid {
        grid-template-columns: 1fr;
    }
    .wg-footer-grid {
        grid-template-columns: 1fr;
        gap: 32px;
    }
    .wg-author-bio {
        flex-direction: column;
    }
    .wg-logo {
        font-size: 26px;
    }
}
