/*
Theme Name: Uncoverwp
Theme URI: https://uncoverwp.com/
Author: Uncoverwp Team
Author URI: https://uncoverwp.com/
Description: A clean and fast WordPress blog theme built for SEO, performance, and great reading experience.
Version: 1.0
Text Domain: uncoverwp
Tags: custom-background, custom-logo, custom-menu, featured-images, flexible-header, responsive-layout
*/

@import url('https://fonts.googleapis.com/css2?family=DM+Serif+Display:ital@0;1&family=DM+Sans:wght@300;400;500;600&display=swap');

/* =================================================================
   CSS VARIABLES — single unified root
================================================================= */
:root {
    /* Layout */
    --container:       1160px;
    --hdr-height-top:  36px;
    --hdr-height-main: 68px;
    --hdr-total:       calc(var(--hdr-height-top) + var(--hdr-height-main));

    /* Brand colours */
    --color-accent:    #1a7f5a;
    --color-accent-lt: #e8f5ef;
    --color-accent-dk: #145f44;

    /* Light surface (header / body) */
    --color-bg:        #ffffff;
    --color-surface:   #f7f8fa;
    --color-border:    #e8eaed;
    --color-text:      #1a1d23;
    --color-muted:     #6b7280;

    /* Dark surface (footer) */
    --footer-bg:       #0f1a14;
    --footer-surface:  #162018;
    --footer-border:   rgba(255,255,255,.08);
    --footer-text:     rgba(255,255,255,.55);
    --footer-heading:  #ffffff;
    --footer-link:     rgba(255,255,255,.65);
    --footer-link-hov: #ffffff;

    /* Typography */
    --font-display: 'DM Serif Display', Georgia, serif;
    --font-body:    'DM Sans', system-ui, sans-serif;
}


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

/* ---------- Sticky scaffold ---------- */
.site-header {
    position: sticky;
    top: 0;
    z-index: 1000;
    width: 100%;
    font-family: var(--font-body);
    transition: box-shadow .25s ease;
}
.site-header.is-scrolled .header-main {
    box-shadow: 0 2px 20px rgba(0,0,0,.08);
}

/* ---------- Top bar ---------- */
.header-topbar {
    background: var(--color-accent);
    height: var(--hdr-height-top);
    display: flex;
    align-items: center;
}
.header-topbar__inner {
    max-width: var(--container);
    margin-inline: auto;
    padding-inline: 1.5rem;
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
}
.header-topbar__msg {
    font-size: .78rem;
    color: rgba(255,255,255,.9);
    font-weight: 400;
    letter-spacing: .01em;
}
.header-topbar__msg a {
    color: #fff;
    font-weight: 600;
    text-decoration: underline;
    text-underline-offset: 3px;
}
.header-topbar__msg a:hover { opacity: .85; }
.header-topbar__close {
    position: absolute;
    right: 1.5rem;
    background: none;
    border: none;
    color: rgba(255,255,255,.7);
    font-size: .8rem;
    cursor: pointer;
    line-height: 1;
    padding: .2rem .4rem;
    border-radius: 4px;
    transition: color .15s, background .15s;
}
.header-topbar__close:hover {
    color: #fff;
    background: rgba(255,255,255,.15);
}

/* ---------- Main nav row ---------- */
.header-main {
    background: var(--color-bg);
    border-bottom: 1px solid var(--color-border);
    height: var(--hdr-height-main);
    transition: box-shadow .25s;
}
.header-main__inner {
    max-width: var(--container);
    margin-inline: auto;
    padding-inline: 1.5rem;
    height: 100%;
    display: flex;
    align-items: center;
    gap: 2rem;
}

/* ---------- Logo ---------- */
.site-logo {
    display: flex;
    align-items: center;
    flex-shrink: 0;
    text-decoration: none;
}
.site-logo img { height: 36px; width: auto; }
.site-logo__wordmark {
    font-family: var(--font-display);
    font-size: 1.55rem;
    line-height: 1;
    letter-spacing: -.02em;
    user-select: none;
}
.site-logo__uncover { color: var(--color-text); }
.site-logo__wp {
    color: var(--color-accent);
    font-style: italic;
}

/* ---------- Desktop nav ---------- */
.header-nav {
    flex: 1;
    display: flex;
    justify-content: center;
}
.header-nav .header-nav__list,
.header-nav ul {
    list-style: none;
    display: flex;
    align-items: center;
    gap: .15rem;
    margin: 0;
    padding: 0;
}
.header-nav li { position: relative; }
.header-nav li a {
    display: flex;
    align-items: center;
    gap: .25rem;
    padding: .5rem .85rem;
    font-size: .9rem;
    font-weight: 500;
    color: var(--color-muted);
    border-radius: 8px;
    transition: color .15s, background .15s;
    white-space: nowrap;
    text-decoration: none;
}
.header-nav li a:hover,
.header-nav li.current-menu-item > a,
.header-nav li.current-menu-parent > a {
    color: var(--color-text);
    background: var(--color-surface);
}
.header-nav li.current-menu-item > a { color: var(--color-accent); }

/* Dropdown caret */
.header-nav li.menu-item-has-children > a::after {
    content: '';
    display: inline-block;
    width: 0; height: 0;
    border-left: 4px solid transparent;
    border-right: 4px solid transparent;
    border-top: 5px solid currentColor;
    margin-left: .2rem;
    opacity: .5;
    transition: transform .2s;
}
.header-nav li.menu-item-has-children:hover > a::after {
    transform: rotate(180deg);
    opacity: 1;
}

/* Sub-menu */
.header-nav .sub-menu {
    position: absolute;
    top: calc(100% + .5rem);
    left: 50%;
    transform: translateX(-50%) translateY(6px);
    background: var(--color-bg);
    border: 1px solid var(--color-border);
    border-radius: 12px;
    min-width: 200px;
    padding: .5rem;
    box-shadow: 0 8px 32px rgba(0,0,0,.1);
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transition: opacity .2s ease, transform .2s ease, visibility .2s;
    z-index: 100;
    display: flex;
    flex-direction: column;
    gap: 0;
}
.header-nav li.menu-item-has-children:hover > .sub-menu,
.header-nav li.menu-item-has-children:focus-within > .sub-menu {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
    transform: translateX(-50%) translateY(0);
}
.header-nav .sub-menu li a {
    display: block;
    padding: .6rem 1rem;
    font-size: .875rem;
    border-radius: 8px;
    color: var(--color-text);
    white-space: nowrap;
}
.header-nav .sub-menu li a:hover {
    background: var(--color-accent-lt);
    color: var(--color-accent);
}

/* ---------- Header actions ---------- */
.header-actions {
    display: flex;
    align-items: center;
    gap: .75rem;
    flex-shrink: 0;
}
.header-actions__cta {
    display: inline-flex;
    align-items: center;
    padding: .5rem 1.2rem;
    background: var(--color-accent);
    color: #fff;
    font-size: .85rem;
    font-weight: 600;
    border-radius: 50px;
    transition: background .15s, transform .15s;
    text-decoration: none;
    white-space: nowrap;
}
.header-actions__cta:hover {
    background: var(--color-accent-dk);
    transform: translateY(-1px);
}

/* Hamburger */
.header-actions__burger {
    display: none;
    flex-direction: column;
    justify-content: center;
    gap: 5px;
    background: none;
    border: 1px solid var(--color-border);
    border-radius: 8px;
    padding: .5rem .6rem;
    cursor: pointer;
    width: 40px;
    height: 40px;
}
.header-actions__burger span {
    display: block;
    height: 2px;
    border-radius: 2px;
    background: var(--color-text);
    transition: transform .25s ease, opacity .25s ease, width .25s ease;
    width: 100%;
}
.header-actions__burger.is-open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.header-actions__burger.is-open span:nth-child(2) { opacity: 0; transform: scaleX(0); }
.header-actions__burger.is-open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* ---------- Mobile menu drawer ---------- */
.mobile-menu {
    position: fixed;
    inset: 0;
    z-index: 1100;
    pointer-events: none;
    visibility: hidden;
    transition: visibility .3s;
}
.mobile-menu.is-open {
    pointer-events: auto;
    visibility: visible;
}
.mobile-menu__overlay {
    position: absolute;
    inset: 0;
    background: rgba(15,26,20,.55);
    backdrop-filter: blur(3px);
    opacity: 0;
    transition: opacity .3s ease;
}
.mobile-menu.is-open .mobile-menu__overlay { opacity: 1; }
.mobile-menu__panel {
    position: absolute;
    top: 0; right: 0; bottom: 0;
    width: min(340px, 90vw);
    background: var(--color-bg);
    display: flex;
    flex-direction: column;
    transform: translateX(100%);
    transition: transform .3s cubic-bezier(.22,.68,0,1.2);
    overflow-y: auto;
    box-shadow: -8px 0 48px rgba(0,0,0,.12);
}
.mobile-menu.is-open .mobile-menu__panel { transform: translateX(0); }
.mobile-menu__header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1.2rem 1.5rem;
    border-bottom: 1px solid var(--color-border);
    flex-shrink: 0;
}
.mobile-menu__close {
    background: none;
    border: none;
    cursor: pointer;
    padding: .4rem;
    border-radius: 8px;
    color: var(--color-muted);
    transition: color .15s, background .15s;
}
.mobile-menu__close:hover { color: var(--color-text); background: var(--color-surface); }
.mobile-menu__close svg { width: 22px; height: 22px; display: block; }
.mobile-menu__nav {
    flex: 1;
    padding: 1rem;
    overflow-y: auto;
}
.mobile-menu__nav .mobile-nav__list,
.mobile-menu__nav ul {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: .15rem;
}
.mobile-menu__nav li a {
    display: block;
    padding: .8rem 1rem;
    font-size: 1rem;
    font-weight: 500;
    color: var(--color-text);
    border-radius: 10px;
    text-decoration: none;
    transition: background .15s, color .15s;
}
.mobile-menu__nav li a:hover,
.mobile-menu__nav li.current-menu-item > a {
    background: var(--color-accent-lt);
    color: var(--color-accent);
}
.mobile-menu__nav .sub-menu {
    padding-left: 1rem;
    border-left: 2px solid var(--color-accent-lt);
    margin-left: 1rem;
    margin-top: .15rem;
}
.mobile-menu__nav .sub-menu li a {
    font-size: .9rem;
    color: var(--color-muted);
    padding: .6rem 1rem;
}
.mobile-menu__nav .sub-menu li a:hover { color: var(--color-accent); }
.mobile-menu__footer {
    padding: 1.2rem 1.5rem;
    border-top: 1px solid var(--color-border);
    flex-shrink: 0;
}
.btn--full { width: 100%; justify-content: center; }

/* ---------- Header responsive ---------- */
body { padding-top: 0; }

.site-header:not(:has(.header-topbar)) {
    --hdr-total: var(--hdr-height-main);
}
@media (max-width: 900px) {
    .header-nav          { display: none; }
    .header-actions__cta { display: none; }
    .header-actions__burger { display: flex; }
}
@media (max-width: 480px) {
    .header-topbar__msg  { font-size: .72rem; }
    .site-logo__wordmark { font-size: 1.35rem; }
}


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

/* ---------- Wave edge ---------- */
.footer-edge {
    display: block;
    line-height: 0;
    background: var(--footer-bg);
    margin-bottom: -1px;
}
.footer-edge svg {
    width: 100%;
    height: 48px;
    display: block;
}

/* ---------- Footer body ---------- */
.site-footer {
    background: var(--footer-bg);
    font-family: var(--font-body);
    color: var(--footer-text);
}
.footer-body { padding: 4rem 1.5rem 3rem; }
.footer-container {
    max-width: var(--container);
    margin-inline: auto;
}
.footer-body .footer-container {
    display: grid;
    grid-template-columns: 1.6fr 1fr 1fr 1.2fr;
    gap: 3rem 2.5rem;
    align-items: start;
}

/* ---------- Brand col ---------- */
.footer-logo {
    display: inline-flex;
    align-items: baseline;
    text-decoration: none;
    margin-bottom: 1.1rem;
    font-family: var(--font-display);
    font-size: 1.7rem;
    line-height: 1;
    letter-spacing: -.02em;
}
.footer-logo__uncover { color: #fff; }
.footer-logo__wp {
    color: var(--color-accent);
    font-style: italic;
}
.footer-tagline {
    font-size: .875rem;
    line-height: 1.7;
    color: var(--footer-text);
    margin-bottom: 1.6rem;
    max-width: 300px;
}

/* Social icons */
.footer-social { display: flex; gap: .6rem; }
.footer-social__link {
    width: 36px;
    height: 36px;
    border-radius: 8px;
    background: rgba(255,255,255,.06);
    border: 1px solid var(--footer-border);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--footer-text);
    transition: background .18s, color .18s, border-color .18s, transform .18s;
    text-decoration: none;
}
.footer-social__link svg { width: 16px; height: 16px; display: block; }
.footer-social__link:hover {
    background: var(--color-accent);
    border-color: var(--color-accent);
    color: #fff;
    transform: translateY(-2px);
}

/* ---------- Link columns ---------- */
.footer-col__heading {
    font-family: var(--font-body);
    font-size: .7rem;
    font-weight: 700;
    letter-spacing: .12em;
    text-transform: uppercase;
    color: var(--footer-heading);
    margin-bottom: 1.1rem;
    opacity: .9;
}
.footer-links {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: .1rem;
}
.footer-links li a {
    display: block;
    padding: .38rem 0;
    font-size: .875rem;
    color: var(--footer-link);
    text-decoration: none;
    transition: color .15s, padding-left .15s;
}
.footer-links li a:hover {
    color: var(--footer-link-hov);
    padding-left: .35rem;
}

/* ---------- Mini newsletter ---------- */
.footer-newsletter {
    margin-top: 2rem;
    padding-top: 1.5rem;
    border-top: 1px solid var(--footer-border);
}
.footer-newsletter__label {
    font-size: .78rem;
    color: var(--footer-text);
    margin-bottom: .65rem;
    letter-spacing: .02em;
}
.footer-newsletter__form { display: flex; gap: .4rem; }
.footer-newsletter__form input[type="email"] {
    flex: 1;
    min-width: 0;
    background: rgba(255,255,255,.07);
    border: 1px solid var(--footer-border);
    border-radius: 8px;
    padding: .6rem .9rem;
    font-family: var(--font-body);
    font-size: .82rem;
    color: #fff;
    outline: none;
    transition: border-color .2s, background .2s;
}
.footer-newsletter__form input[type="email"]::placeholder { color: rgba(255,255,255,.3); }
.footer-newsletter__form input[type="email"]:focus {
    border-color: var(--color-accent);
    background: rgba(26,127,90,.1);
}
.footer-newsletter__form button {
    flex-shrink: 0;
    width: 38px;
    height: 38px;
    background: var(--color-accent);
    border: none;
    border-radius: 8px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    transition: background .15s, transform .15s;
}
.footer-newsletter__form button:hover {
    background: #1d9168;
    transform: translateX(2px);
}
.footer-newsletter__form button svg { width: 16px; height: 16px; }

/* ---------- Bottom bar ---------- */
.footer-bottom {
    border-top: 1px solid var(--footer-border);
    padding: 1.2rem 1.5rem;
}
.footer-bottom__inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    flex-wrap: wrap;
}
.footer-bottom__copy {
    font-size: .8rem;
    color: rgba(255,255,255,.35);
}
.footer-bottom__copy a {
    color: rgba(255,255,255,.5);
    text-decoration: none;
    transition: color .15s;
}
.footer-bottom__copy a:hover { color: #fff; }
.footer-bottom__list,
.footer-bottom__nav ul {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    align-items: center;
    gap: .15rem;
    flex-wrap: wrap;
}
.footer-bottom__list li a,
.footer-bottom__nav ul li a {
    font-size: .78rem;
    color: rgba(255,255,255,.35);
    text-decoration: none;
    padding: .25rem .6rem;
    border-radius: 4px;
    transition: color .15s, background .15s;
    white-space: nowrap;
}
.footer-bottom__list li a:hover,
.footer-bottom__nav ul li a:hover {
    color: #fff;
    background: rgba(255,255,255,.07);
}
.footer-bottom__list li + li a::before,
.footer-bottom__nav ul li + li a::before {
    content: '·';
    margin-right: .6rem;
    opacity: .3;
    pointer-events: none;
}

/* ---------- Footer responsive ---------- */
@media (max-width: 1024px) {
    .footer-body .footer-container {
        grid-template-columns: 1fr 1fr;
        gap: 2.5rem 2rem;
    }
    .footer-col--brand { grid-column: 1 / -1; }
    .footer-tagline    { max-width: 100%; }
}
@media (max-width: 600px) {
    .footer-body .footer-container {
        grid-template-columns: 1fr;
        gap: 2rem;
    }
    .footer-col--brand { grid-column: auto; }
    .footer-bottom__inner { flex-direction: column; align-items: flex-start; gap: .75rem; }
    .footer-edge svg   { height: 28px; }
}