/*
 * TrentEstes — Component Styles
 * assets/css/custom.css
 *
 * LEARNING NOTE: We separate component CSS from theme.json intentionally.
 * theme.json handles design tokens (colors, fonts, spacing) and global
 * element styles that the block editor understands.
 * This file handles everything else: specific components, layout patterns,
 * interactive states, and responsive behaviour.
 *
 * Structure:
 *   1. Design tokens (CSS custom properties)
 *   2. Global base
 *   3. Site header & navigation
 *   4. Buttons
 *   5. Hero section
 *   6. Category pills & badges
 *   7. Topic filter bar
 *   8. Section divider labels
 *   9. Post cards grid
 *  10. Newsletter band
 *  11. Businesses section
 *  12. Single post / article
 *  13. Site footer
 *  14. Utility classes
 *  15. Responsive overrides
 *  16. WordPress-specific fixes
 */


/* ================================================================
   1. DESIGN TOKENS
   These CSS variables mirror theme.json. Both systems stay in sync
   because they reference the same hex values.
================================================================ */
:root {
    /* Backgrounds */
    --te-bg:      #080F1E;
    --te-surface: #0D1B33;
    --te-deep:    #152540;

    /* Text */
    --te-text:    #EDF4FF;
    --te-muted:   #6B8FAE;

    /* Borders */
    --te-border:        rgba(237, 244, 255, 0.07);
    --te-border-hover:  rgba(237, 244, 255, 0.15);
    --te-border-accent: rgba(44, 232, 180, 0.15);
    --te-border-nav:    rgba(44, 232, 180, 0.10);

    /* Brand accent colours */
    --te-teal:   #2CE8B4;
    --te-amber:  #F59E0B;
    --te-purple: #A78BFA;
    --te-blue:   #38BDF8;

    /* Category system */
    --cat-psychology:          #2CE8B4;
    --cat-psychology-bg:       rgba(44, 232, 180, 0.10);
    --cat-psychology-border:   rgba(44, 232, 180, 0.22);

    --cat-entrepreneurship:        #F59E0B;
    --cat-entrepreneurship-bg:     rgba(245, 158, 11, 0.10);
    --cat-entrepreneurship-border: rgba(245, 158, 11, 0.22);

    --cat-human-potential:        #A78BFA;
    --cat-human-potential-bg:     rgba(167, 139, 250, 0.10);
    --cat-human-potential-border: rgba(167, 139, 250, 0.22);

    --cat-ai-building:        #38BDF8;
    --cat-ai-building-bg:     rgba(56, 189, 248, 0.10);
    --cat-ai-building-border: rgba(56, 189, 248, 0.22);

    /* Transitions */
    --te-transition: 0.2s ease;
}


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

html {
    scroll-behavior: smooth;
}

body {
    background-color: var(--te-bg);
    color: var(--te-text);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* Accessible focus ring using teal accent */
:focus-visible {
    outline: 2px solid var(--te-teal);
    outline-offset: 3px;
    border-radius: 3px;
}

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

/* ================================================================
   3. SITE HEADER & NAVIGATION
================================================================ */
.wp-block-template-part {
    background-color: var(--te-bg);
}

/* Sticky nav with teal bottom border */
.site-header,
[data-area="header"] {
    position: sticky;
    top: 0;
    z-index: 100;
    background: var(--te-bg);
    border-bottom: 1px solid var(--te-border-nav);
    padding: 16px 48px;
}

/* Site title / wordmark */
.wp-block-site-title a {
    font-family: 'Poppins', 'Helvetica Neue', sans-serif !important;
    font-weight: 600 !important;
    font-size: 20px !important;
    letter-spacing: -0.3px !important;
    color: var(--te-text) !important;
    text-decoration: none !important;
}

.wp-block-site-title a .wordmark-accent {
    color: var(--te-teal);
}

/* Navigation links */
.wp-block-navigation a,
.wp-block-navigation-item a {
    font-family: 'DM Sans', sans-serif !important;
    font-size: 14px !important;
    font-weight: 500 !important;
    color: var(--te-muted) !important;
    text-decoration: none !important;
    transition: color var(--te-transition) !important;
}

.wp-block-navigation a:hover,
.wp-block-navigation-item a:hover {
    color: var(--te-text) !important;
}

/* "Join Newsletter" CTA button in nav
   Add class nav-cta to that navigation item in the Site Editor */
.wp-block-navigation-item.nav-cta > a,
.nav-cta .wp-block-navigation-item__content {
    background-color: var(--te-teal) !important;
    color: var(--te-bg) !important;
    padding: 10px 22px !important;
    border-radius: 6px !important;
    font-weight: 700 !important;
    font-family: 'DM Sans', sans-serif !important;
    transition: background-color var(--te-transition) !important;
}

.wp-block-navigation-item.nav-cta > a:hover {
    background-color: var(--te-text) !important;
}


/* ================================================================
   4. BUTTONS
================================================================ */
.btn-primary {
    display: inline-block;
    background: var(--te-teal);
    color: var(--te-bg);
    border: none;
    padding: 14px 28px;
    border-radius: 8px;
    font-size: 16px;
    font-weight: 700;
    font-family: 'DM Sans', sans-serif;
    text-decoration: none;
    cursor: pointer;
    transition: background var(--te-transition), color var(--te-transition);
    line-height: 1;
}

.btn-primary:hover {
    background: var(--te-text);
    color: var(--te-bg);
}

.btn-secondary {
    display: inline-block;
    background: transparent;
    color: var(--te-text);
    border: 1px solid rgba(237, 244, 255, 0.18);
    padding: 14px 28px;
    border-radius: 8px;
    font-size: 16px;
    font-family: 'DM Sans', sans-serif;
    text-decoration: none;
    cursor: pointer;
    transition: border-color var(--te-transition);
    line-height: 1;
}

.btn-secondary:hover {
    border-color: rgba(237, 244, 255, 0.4);
    color: var(--te-text);
}

/* WordPress native button block */
.wp-block-button .wp-block-button__link {
    font-family: 'DM Sans', sans-serif !important;
    font-weight: 700 !important;
    border-radius: 8px !important;
    transition: background var(--te-transition), color var(--te-transition) !important;
}


/* ================================================================
   5. HERO SECTION
================================================================ */
.hero-section {
    padding: 72px 0 56px;
    position: relative;
    overflow: hidden;
}

.hero-section__inner {
    max-width: 590px;
    position: relative;
    z-index: 1;
}

.hero-section__tag {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: rgba(44, 232, 180, 0.08);
    border: 1px solid rgba(44, 232, 180, 0.20);
    border-radius: 20px;
    padding: 6px 16px;
    font-family: 'DM Sans', sans-serif;
    font-size: 11px;
    font-weight: 600;
    letter-spacing: 0.8px;
    text-transform: uppercase;
    color: var(--te-teal);
    margin-bottom: 28px;
}

.hero-section__heading {
    font-family: 'Playfair Display', Georgia, serif;
    font-size: clamp(40px, 7vw, 56px);
    font-weight: 700;
    line-height: 1.07;
    letter-spacing: -1.5px;
    color: var(--te-text);
    margin: 0 0 22px;
}

.hero-section__sub {
    font-family: 'DM Sans', sans-serif;
    font-size: 17px;
    color: var(--te-muted);
    line-height: 1.7;
    max-width: 490px;
    margin: 0 0 32px;
}

.hero-section__ctas {
    display: flex;
    align-items: center;
    gap: 14px;
    flex-wrap: wrap;
}

.hero-section__proof {
    font-family: 'DM Sans', sans-serif;
    font-size: 13px;
    color: var(--te-muted);
    margin: 14px 0 0;
}

/* Decorative symbols floating in hero */
.hero-symbols {
    position: absolute;
    top: 0;
    right: 0;
    bottom: 0;
    width: 45%;
    pointer-events: none;
    overflow: hidden;
    z-index: 0;
}

.hero-symbol {
    position: absolute;
    font-style: normal;
    line-height: 1;
    user-select: none;
}


/* ================================================================
   6. CATEGORY PILLS & BADGES
================================================================ */
.cat-badge {
    display: inline-block;
    font-family: 'DM Sans', sans-serif;
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 0.8px;
    text-transform: uppercase;
    padding: 4px 10px;
    border-radius: 20px;
    line-height: 1;
}

/* Per-category colours */
.cat-badge--psychology,
.cat-psychology { color: var(--cat-psychology); background: var(--cat-psychology-bg); }

.cat-badge--entrepreneurship,
.cat-entrepreneurship { color: var(--cat-entrepreneurship); background: var(--cat-entrepreneurship-bg); }

.cat-badge--human-potential,
.cat-human-potential { color: var(--cat-human-potential); background: var(--cat-human-potential-bg); }

.cat-badge--ai-building,
.cat-ai-building { color: var(--cat-ai-building); background: var(--cat-ai-building-bg); }


/* ================================================================
   7. TOPIC FILTER BAR
================================================================ */
.topic-filter {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
    padding-bottom: 28px;
}

.topic-filter__label {
    font-family: 'DM Sans', sans-serif;
    font-size: 12px;
    color: var(--te-muted);
    font-weight: 500;
    margin-right: 4px;
    flex-shrink: 0;
}

.topic-filter__pill {
    display: inline-block;
    font-family: 'DM Sans', sans-serif;
    font-size: 12px;
    font-weight: 600;
    padding: 5px 14px;
    border-radius: 20px;
    cursor: pointer;
    text-decoration: none;
    transition: opacity var(--te-transition);
}

.topic-filter__pill:hover { opacity: 0.8; }

.topic-filter__pill--psychology   { color: var(--cat-psychology);   background: var(--cat-psychology-bg);   border: 1px solid var(--cat-psychology-border); }
.topic-filter__pill--entrepreneurship { color: var(--cat-entrepreneurship); background: var(--cat-entrepreneurship-bg); border: 1px solid var(--cat-entrepreneurship-border); }
.topic-filter__pill--human-potential  { color: var(--cat-human-potential);  background: var(--cat-human-potential-bg);  border: 1px solid var(--cat-human-potential-border); }
.topic-filter__pill--ai-building      { color: var(--cat-ai-building);      background: var(--cat-ai-building-bg);      border: 1px solid var(--cat-ai-building-border); }

.topic-filter__pill--add {
    color: var(--te-muted);
    background: transparent;
    border: 1px dashed rgba(237, 244, 255, 0.18);
}


/* ================================================================
   8. SECTION DIVIDER LABELS  — "✦ LATEST WRITING ——— View all →"
================================================================ */
.section-label {
    display: flex;
    align-items: center;
    gap: 12px;
    padding-bottom: 22px;
}

.section-label__symbol {
    color: var(--te-teal);
    font-size: 14px;
    line-height: 1;
    flex-shrink: 0;
}

.section-label__text {
    font-family: 'DM Sans', sans-serif;
    font-size: 11px;
    color: var(--te-muted);
    letter-spacing: 1.5px;
    font-weight: 600;
    text-transform: uppercase;
    white-space: nowrap;
}

.section-label__rule {
    flex: 1;
    height: 1px;
    background: var(--te-border);
}

.section-label__viewall {
    font-family: 'DM Sans', sans-serif;
    font-size: 12px;
    color: var(--te-teal);
    font-weight: 600;
    text-decoration: none;
    white-space: nowrap;
    transition: color var(--te-transition);
}

.section-label__viewall:hover { color: var(--te-text); }


/* ================================================================
   9. POST CARDS
================================================================ */
.posts-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 18px;
    padding-bottom: 60px;
}

.post-card {
    background: var(--te-surface);
    border: 1px solid var(--te-border);
    border-radius: 12px;
    padding: 24px;
    position: relative;
    overflow: hidden;
    transition: border-color var(--te-transition), transform var(--te-transition);
    text-decoration: none;
    display: flex;
    flex-direction: column;
}

.post-card:hover {
    border-color: var(--te-border-hover);
    transform: translateY(-2px);
}

/* Top accent stripe — colour overridden per category */
.post-card::before {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0;
    height: 3px;
    border-radius: 12px 12px 0 0;
}

.post-card--psychology::before   { background: var(--cat-psychology);   }
.post-card--entrepreneurship::before { background: var(--cat-entrepreneurship); }
.post-card--human-potential::before  { background: var(--cat-human-potential);  }
.post-card--ai-building::before      { background: var(--cat-ai-building);      }

.post-card__title {
    font-family: 'Playfair Display', Georgia, serif;
    font-size: 17px;
    font-weight: 700;
    line-height: 1.35;
    color: var(--te-text);
    margin: 14px 0 10px;
    text-decoration: none;
}

.post-card:hover .post-card__title { color: var(--te-text); }

.post-card__excerpt {
    font-family: 'DM Sans', sans-serif;
    font-size: 13px;
    color: var(--te-muted);
    line-height: 1.6;
    margin: 0 0 20px;
    flex: 1;
}

.post-card__footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    font-family: 'DM Sans', sans-serif;
    font-size: 12px;
    margin-top: auto;
}

.post-card__readtime { color: var(--te-muted); }

.post-card__readmore {
    font-weight: 600;
    text-decoration: none;
    transition: opacity var(--te-transition);
}

.post-card__readmore:hover { opacity: 0.75; }

.post-card--psychology   .post-card__readmore { color: var(--cat-psychology);   }
.post-card--entrepreneurship .post-card__readmore { color: var(--cat-entrepreneurship); }
.post-card--human-potential  .post-card__readmore { color: var(--cat-human-potential);  }
.post-card--ai-building      .post-card__readmore { color: var(--cat-ai-building);      }


/* ================================================================
   10. NEWSLETTER BAND
================================================================ */
.newsletter-band {
    background: var(--te-surface);
    border: 1px solid var(--te-border-accent);
    border-radius: 16px;
    padding: 44px 48px;
    text-align: center;
    margin-bottom: 60px;
}

.newsletter-band__symbol {
    font-size: 20px;
    color: var(--te-teal);
    letter-spacing: 4px;
    margin-bottom: 10px;
}

.newsletter-band__eyebrow {
    font-family: 'DM Sans', sans-serif;
    font-size: 11px;
    color: var(--te-teal);
    font-weight: 700;
    letter-spacing: 1.8px;
    text-transform: uppercase;
    margin: 0 0 12px;
}

.newsletter-band__heading {
    font-family: 'Playfair Display', Georgia, serif;
    font-size: 30px;
    font-weight: 700;
    color: var(--te-text);
    letter-spacing: -0.5px;
    margin: 0 0 10px;
    line-height: 1.2;
}

.newsletter-band__subtext {
    font-family: 'DM Sans', sans-serif;
    font-size: 15px;
    color: var(--te-muted);
    max-width: 390px;
    margin: 0 auto 26px;
    line-height: 1.6;
}

.newsletter-band__form {
    display: flex;
    gap: 10px;
    justify-content: center;
    max-width: 400px;
    margin: 0 auto;
}

.newsletter-band__input {
    flex: 1;
    min-width: 0;
    padding: 14px 16px;
    background: var(--te-deep);
    border: 1px solid rgba(237, 244, 255, 0.10);
    border-radius: 8px;
    color: var(--te-text);
    font-size: 15px;
    font-family: 'DM Sans', sans-serif;
    outline: none;
    transition: border-color var(--te-transition);
}

.newsletter-band__input::placeholder { color: var(--te-muted); }
.newsletter-band__input:focus { border-color: var(--te-teal); }

.newsletter-band__btn {
    background: var(--te-teal);
    color: var(--te-bg);
    border: none;
    padding: 14px 20px;
    border-radius: 8px;
    font-size: 15px;
    font-weight: 700;
    font-family: 'DM Sans', sans-serif;
    cursor: pointer;
    white-space: nowrap;
    transition: background var(--te-transition);
}

.newsletter-band__btn:hover { background: var(--te-text); }

.newsletter-band__fine-print {
    font-family: 'DM Sans', sans-serif;
    font-size: 12px;
    color: var(--te-muted);
    margin: 12px 0 0;
}


/* ================================================================
   11. BUSINESSES SECTION
================================================================ */
.businesses-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
    padding-bottom: 60px;
}

.business-card {
    background: var(--te-surface);
    border: 1px solid var(--te-border);
    border-radius: 12px;
    padding: 22px;
    display: flex;
    align-items: flex-start;
    gap: 18px;
    transition: border-color var(--te-transition);
}

.business-card:hover { border-color: var(--te-border-hover); }
.business-card--featured { border-color: rgba(44, 232, 180, 0.12); }

.business-card__icon {
    width: 46px;
    height: 46px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 19px;
    font-weight: 700;
    font-family: 'Playfair Display', serif;
    flex-shrink: 0;
}

.business-card__name {
    font-family: 'DM Sans', sans-serif;
    font-weight: 700;
    font-size: 15px;
    color: var(--te-text);
    margin: 0 0 5px;
}

.business-card__desc {
    font-family: 'DM Sans', sans-serif;
    font-size: 13px;
    color: var(--te-muted);
    line-height: 1.55;
    margin: 0;
}

.business-card__link {
    display: block;
    font-family: 'DM Sans', sans-serif;
    font-size: 12px;
    color: var(--te-teal);
    font-weight: 600;
    margin-top: 10px;
    text-decoration: none;
    transition: color var(--te-transition);
}

.business-card__link:hover { color: var(--te-text); }


/* ================================================================
   12. SINGLE POST / ARTICLE
================================================================ */
.single-post-header {
    padding: 48px 0 36px;
    border-bottom: 1px solid var(--te-border);
    margin-bottom: 48px;
}

.single-post-header__category { margin-bottom: 16px; }

.single-post-header__title {
    font-family: 'Playfair Display', Georgia, serif;
    font-size: clamp(28px, 5vw, 48px);
    font-weight: 700;
    line-height: 1.1;
    letter-spacing: -1px;
    color: var(--te-text);
    margin: 0 0 20px;
}

.single-post-header__meta {
    font-family: 'DM Sans', sans-serif;
    font-size: 14px;
    color: var(--te-muted);
    display: flex;
    align-items: center;
    gap: 16px;
    flex-wrap: wrap;
}

.single-post-header__meta .separator { opacity: 0.4; }

/* Article body copy */
.entry-content p,
.wp-block-post-content p {
    font-size: 18px;
    line-height: 1.8;
    color: var(--te-text);
    margin-bottom: 1.5em;
}

.entry-content a,
.wp-block-post-content a {
    color: var(--te-teal);
    text-decoration: underline;
    text-underline-offset: 3px;
    text-decoration-thickness: 1px;
}

.entry-content a:hover { color: var(--te-text); }

.entry-content h2,
.entry-content h3 {
    margin-top: 2em;
    margin-bottom: 0.75em;
}

.entry-content blockquote {
    border-left: 3px solid var(--te-teal);
    padding-left: 24px;
    margin-left: 0;
    font-style: italic;
    color: var(--te-muted);
}

.entry-content code {
    font-family: 'Courier New', monospace;
    background: var(--te-surface);
    color: var(--te-teal);
    padding: 2px 6px;
    border-radius: 4px;
    font-size: 0.9em;
}

/* In-article newsletter opt-in (appears at the end of each post) */
.post-optin {
    background: var(--te-surface);
    border: 1px solid var(--te-border-accent);
    border-radius: 12px;
    padding: 32px;
    margin: 48px 0;
    text-align: center;
}


/* ================================================================
   13. SITE FOOTER
================================================================ */
.site-footer {
    border-top: 1px solid rgba(237, 244, 255, 0.06);
    padding: 22px 0;
}

.site-footer__inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 16px;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 48px;
}

.site-footer__logo {
    font-family: 'Poppins', sans-serif;
    font-size: 19px;
    font-weight: 600;
    color: var(--te-text);
    text-decoration: none;
    letter-spacing: -0.3px;
}

.site-footer__logo .accent { color: var(--te-teal); }

.site-footer__copy {
    font-family: 'DM Sans', sans-serif;
    font-size: 12px;
    color: var(--te-muted);
}

.site-footer__socials {
    display: flex;
    gap: 18px;
}

.site-footer__socials a {
    font-family: 'DM Sans', sans-serif;
    font-size: 13px;
    color: var(--te-muted);
    text-decoration: none;
    transition: color var(--te-transition);
}

.site-footer__socials a:hover { color: var(--te-text); }


/* ================================================================
   14. UTILITY CLASSES
================================================================ */
.text-teal   { color: var(--te-teal) !important; }
.text-amber  { color: var(--te-amber) !important; }
.text-purple { color: var(--te-purple) !important; }
.text-blue   { color: var(--te-blue) !important; }
.text-muted  { color: var(--te-muted) !important; }

.bg-surface { background-color: var(--te-surface) !important; }
.bg-deep    { background-color: var(--te-deep) !important; }

.font-playfair { font-family: 'Playfair Display', Georgia, serif !important; }
.font-dm-sans  { font-family: 'DM Sans', sans-serif !important; }
.font-poppins  { font-family: 'Poppins', sans-serif !important; }

.sr-only {
    position: absolute;
    width: 1px; height: 1px;
    padding: 0; margin: -1px;
    overflow: hidden;
    clip: rect(0,0,0,0);
    white-space: nowrap;
    border-width: 0;
}


/* ================================================================
   15. RESPONSIVE OVERRIDES
================================================================ */
@media (max-width: 1024px) {
    .posts-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 768px) {
    .site-header,
    [data-area="header"] {
        padding: 16px 24px;
    }

    .hero-section__heading {
        font-size: clamp(32px, 8vw, 48px);
    }

    .newsletter-band {
        padding: 32px 24px;
    }

    .newsletter-band__form {
        flex-direction: column;
    }

    .newsletter-band__btn {
        width: 100%;
        text-align: center;
    }

    .businesses-grid {
        grid-template-columns: 1fr;
    }

    .site-footer__inner {
        flex-direction: column;
        align-items: flex-start;
        padding: 0 24px;
    }
}

@media (max-width: 600px) {
    .posts-grid {
        grid-template-columns: 1fr;
    }

    .hero-section__ctas {
        flex-direction: column;
        align-items: flex-start;
    }

    .btn-primary,
    .btn-secondary {
        width: 100%;
        text-align: center;
    }
}


/* ================================================================
   16. WORDPRESS-SPECIFIC FIXES
================================================================ */

/* Hide page title on static homepage */
body.page-id-14 .wp-block-post-title,
body.home .wp-block-post-title { display: none !important; }

/* Hide page title on all static Pages (not blog posts) */
body.page .wp-block-post-title { display: none !important; }

/* ================================================================
   WRITING PAGE — Blog Index
================================================================ */

/* Writing hero header */
.te-writing-hero {
    padding: 56px 0 48px;
    border-bottom: 1px solid rgba(237,244,255,0.06);
    margin-bottom: 48px;
}

.te-writing-eyebrow {
    font-family: 'DM Sans', sans-serif;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 1.8px;
    text-transform: uppercase;
    color: #2CE8B4;
    margin: 0 0 16px;
}

.te-writing-title {
    font-family: 'Playfair Display', Georgia, serif;
    font-size: clamp(32px, 5vw, 52px);
    font-weight: 700;
    color: #EDF4FF;
    line-height: 1.07;
    letter-spacing: -1.5px;
    margin: 0 0 16px;
}

.te-writing-sub {
    font-family: 'DM Sans', sans-serif;
    font-size: 17px;
    color: #6B8FAE;
    line-height: 1.7;
    max-width: 560px;
    margin: 0 0 28px;
}

/* Writing content area */
.te-writing-content { padding-bottom: 80px; }

/* Post cards in query loop */
.posts-grid {
    display: grid !important;
    grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
    gap: 18px !important;
    list-style: none !important;
    padding: 0 !important;
    margin: 0 0 48px !important;
}

/* Each post in the grid — override li defaults */
.posts-grid > li,
.posts-grid .wp-block-post {
    padding: 0 !important;
    margin: 0 !important;
}

/* Category terms pill in query loop */
.te-post-cat-pill { margin-bottom: 12px; display: block; }
.te-post-cat-pill a {
    font-family: 'DM Sans', sans-serif !important;
    font-size: 10px !important;
    font-weight: 700 !important;
    letter-spacing: 0.8px !important;
    text-transform: uppercase !important;
    padding: 4px 10px !important;
    border-radius: 20px !important;
    text-decoration: none !important;
    display: inline-block !important;
}

/* Post card title in query loop */
.post-card .post-card__title a,
.wp-block-post .post-card__title a {
    font-family: 'Playfair Display', Georgia, serif !important;
    font-size: 17px !important;
    font-weight: 700 !important;
    line-height: 1.35 !important;
    color: #EDF4FF !important;
    text-decoration: none !important;
}

.post-card .post-card__title a:hover { color: #2CE8B4 !important; }

/* Post excerpt in query loop */
.post-card .post-card__excerpt,
.post-card .post-card__excerpt p {
    font-family: 'DM Sans', sans-serif !important;
    font-size: 13px !important;
    color: #6B8FAE !important;
    line-height: 1.6 !important;
    margin: 10px 0 20px !important;
}

/* Post date and read more */
.post-card__readtime { font-size: 12px !important; color: #6B8FAE !important; }
.post-card__readmore a,
.post-card .wp-block-read-more {
    font-family: 'DM Sans', sans-serif !important;
    font-size: 12px !important;
    font-weight: 600 !important;
    color: #2CE8B4 !important;
    text-decoration: none !important;
}

/* Pagination */
.te-pagination {
    display: flex;
    gap: 8px;
    justify-content: center;
    margin-top: 24px;
}

.te-pagination a,
.wp-block-query-pagination a {
    font-family: 'DM Sans', sans-serif !important;
    font-size: 14px !important;
    color: #6B8FAE !important;
    background: #0D1B33 !important;
    border: 1px solid rgba(237,244,255,0.08) !important;
    padding: 8px 16px !important;
    border-radius: 6px !important;
    text-decoration: none !important;
    transition: all 0.2s !important;
}

.te-pagination a:hover,
.wp-block-query-pagination a:hover {
    color: #2CE8B4 !important;
    border-color: rgba(44,232,180,0.2) !important;
}

/* No posts state */
.te-no-posts-yet {
    grid-column: 1 / -1;
    display: flex;
    justify-content: center;
    padding: 80px 0;
}

.te-no-posts-inner {
    text-align: center;
    max-width: 440px;
    background: #0D1B33;
    border: 1px solid rgba(44,232,180,0.12);
    border-radius: 16px;
    padding: 48px;
}

.te-no-posts__symbol {
    font-size: 36px;
    color: #2CE8B4;
    margin-bottom: 16px;
    opacity: 0.7;
}

.te-no-posts__title {
    font-family: 'Playfair Display', Georgia, serif;
    font-size: 24px;
    font-weight: 700;
    color: #EDF4FF;
    margin: 0 0 10px;
}

.te-no-posts__sub {
    font-family: 'DM Sans', sans-serif;
    font-size: 15px;
    color: #6B8FAE;
    line-height: 1.6;
    margin: 0 0 24px;
}

/* Blog index responsive */
@media (max-width: 1024px) {
    .posts-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    }
}

@media (max-width: 640px) {
    .posts-grid {
        grid-template-columns: 1fr !important;
    }
}

/* Compensate for WP admin bar height when logged in */
.admin-bar .site-header,
.admin-bar [data-area="header"] {
    top: 32px;
}

@media screen and (max-width: 782px) {
    .admin-bar .site-header,
    .admin-bar [data-area="header"] {
        top: 46px;
    }
}

/* Override WP default blue on form elements */
input[type="email"]:focus,
input[type="text"]:focus,
textarea:focus {
    border-color: var(--te-teal) !important;
    box-shadow: 0 0 0 1px var(--te-teal) !important;
    outline: none !important;
}

/* Gutenberg block alignment */
.wp-block-group.alignfull,
.wp-block-cover.alignfull {
    padding-left: 48px;
    padding-right: 48px;
}

@media (max-width: 768px) {
    .wp-block-group.alignfull,
    .wp-block-cover.alignfull {
        padding-left: 24px;
        padding-right: 24px;
    }
}

/* Dark background for block editor canvas */
.editor-styles-wrapper {
    background-color: var(--te-bg) !important;
    color: var(--te-text) !important;
}
