/*
Theme Name:  HelloSites Neighborhood
Theme URI:   https://hellosites.org
Description: Community neighborhood site theme for HelloSites platform.
Version:     1.0.0
Author:      HelloNation
Text Domain: hellosites-neighborhood
*/

/* ============================================================
   CSS VARIABLES
   ============================================================ */
:root {
    --nb-primary:        #2C4A1E;
    --nb-primary-light:  #3D6B2A;
    --nb-accent:         #B8860B;
    --nb-accent-light:   #D4A017;
    --nb-bg:             #FAFAF7;
    --nb-bg-card:        #FFFFFF;
    --nb-bg-dark:        #1C2B14;
    --nb-text:           #1A1A1A;
    --nb-text-muted:     #666666;
    --nb-border:         #E0DDD5;
    --nb-header-height:  72px;
    --nb-radius:         6px;
    --nb-shadow:         0 2px 12px rgba(0,0,0,0.08);
    --nb-shadow-hover:   0 6px 24px rgba(0,0,0,0.14);
    --nb-max-width:      1200px;
    --nb-font-heading:   Georgia, 'Times New Roman', serif;
    --nb-font-body:      -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

/* ============================================================
   RESET & BASE
   ============================================================ */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html { font-size: 16px; scroll-behavior: smooth; }

body {
    background: var(--nb-bg);
    color: var(--nb-text);
    font-family: var(--nb-font-body);
    font-size: 1rem;
    line-height: 1.65;
    -webkit-font-smoothing: antialiased;
}

a { color: var(--nb-primary); text-decoration: none; transition: color 0.2s; }
a:hover { color: var(--nb-accent); }

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

h1, h2, h3, h4, h5, h6 {
    font-family: var(--nb-font-heading);
    font-weight: normal;
    line-height: 1.25;
    color: var(--nb-text);
}

/* ============================================================
   LAYOUT HELPERS
   ============================================================ */
.nb-container {
    max-width: var(--nb-max-width);
    margin: 0 auto;
    padding: 0 24px;
}

.nb-section {
    padding: 60px 0;
}

.nb-section-title {
    font-family: var(--nb-font-heading);
    font-size: 1.75rem;
    color: var(--nb-primary);
    margin-bottom: 8px;
    position: relative;
    padding-bottom: 14px;
}

.nb-section-title::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 48px;
    height: 3px;
    background: var(--nb-accent);
    border-radius: 2px;
}

.nb-section-subtitle {
    color: var(--nb-text-muted);
    font-size: 0.95rem;
    margin-bottom: 36px;
    margin-top: 8px;
}

/* ============================================================
   HEADER
   ============================================================ */
.site-header {
    position: sticky;
    top: 0;
    z-index: 100;
    background: var(--nb-bg-dark);
    box-shadow: 0 2px 8px rgba(0,0,0,0.2);
}

.header-inner {
    max-width: var(--nb-max-width);
    margin: 0 auto;
    padding: 0 24px;
    height: var(--nb-header-height);
    display: flex;
    align-items: center;
    gap: 24px;
}

/* Site identity / neighborhood name */
.header-identity {
    display: flex;
    flex-direction: column;
    line-height: 1.1;
    text-decoration: none;
}

.header-site-name {
    font-family: var(--nb-font-heading);
    font-size: 1.25rem;
    color: #FFFFFF;
    white-space: nowrap;
    letter-spacing: 0.01em;
}

.header-site-tagline {
    font-size: 0.7rem;
    color: var(--nb-accent-light);
    text-transform: uppercase;
    letter-spacing: 0.12em;
    font-weight: 600;
}

.header-spacer { flex: 1; }

/* Nav */
.header-nav ul {
    display: flex;
    align-items: center;
    gap: 6px;
    list-style: none;
}

.header-nav a {
    color: rgba(255,255,255,0.82);
    font-size: 0.875rem;
    font-weight: 500;
    padding: 7px 14px;
    border-radius: var(--nb-radius);
    transition: background 0.2s, color 0.2s;
    letter-spacing: 0.02em;
    white-space: nowrap;
}

.header-nav a:hover,
.header-nav .current-menu-item > a {
    background: rgba(255,255,255,0.1);
    color: #FFFFFF;
}

/* Mobile menu toggle */
.mobile-menu-toggle {
    display: none;
    background: none;
    border: none;
    color: #FFF;
    font-size: 1.5rem;
    cursor: pointer;
    padding: 8px;
    line-height: 1;
}

/* ============================================================
   HERO
   ============================================================ */
.hero-section {
    position: relative;
    min-height: 520px;
    display: flex;
    align-items: flex-end;
    overflow: hidden;
    background: var(--nb-bg-dark);
}

.hero-bg {
    position: absolute;
    inset: 0;
    background-size: cover;
    background-position: center;
}

.hero-bg::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(
        to top,
        rgba(10, 20, 6, 0.88) 0%,
        rgba(10, 20, 6, 0.45) 50%,
        rgba(10, 20, 6, 0.15) 100%
    );
}

.hero-content {
    position: relative;
    z-index: 2;
    padding: 60px 40px;
    max-width: var(--nb-max-width);
    margin: 0 auto;
    width: 100%;
}

.hero-eyebrow {
    display: inline-block;
    background: var(--nb-accent);
    color: #FFF;
    font-size: 0.7rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.14em;
    padding: 4px 12px;
    border-radius: 3px;
    margin-bottom: 16px;
}

.hero-title {
    font-family: var(--nb-font-heading);
    font-size: clamp(2rem, 5vw, 3.5rem);
    color: #FFFFFF;
    line-height: 1.15;
    margin-bottom: 18px;
    text-shadow: 0 2px 12px rgba(0,0,0,0.3);
    max-width: 720px;
}

.hero-description {
    font-size: 1.1rem;
    color: rgba(255,255,255,0.85);
    max-width: 600px;
    line-height: 1.6;
    margin-bottom: 28px;
}

.hero-scroll-hint {
    display: flex;
    align-items: center;
    gap: 8px;
    color: rgba(255,255,255,0.55);
    font-size: 0.8rem;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.hero-scroll-hint::before {
    content: '';
    display: block;
    width: 40px;
    height: 1px;
    background: rgba(255,255,255,0.3);
}

/* ============================================================
   TRENDING BAR
   ============================================================ */
.trending-bar {
    background: var(--nb-primary);
    border-bottom: 2px solid var(--nb-accent);
    overflow: hidden;
}

.trending-bar-inner {
    max-width: var(--nb-max-width);
    margin: 0 auto;
    padding: 0 24px;
    display: flex;
    align-items: center;
    height: 44px;
    gap: 16px;
}

.trending-label {
    font-size: 0.7rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.14em;
    color: var(--nb-accent-light);
    white-space: nowrap;
    flex-shrink: 0;
}

.trending-ticker {
    flex: 1;
    overflow: hidden;
    position: relative;
}

.trending-ticker-track {
    display: flex;
    gap: 0;
    white-space: nowrap;
    animation: ticker-scroll 35s linear infinite;
}

.trending-ticker-track a {
    color: rgba(255,255,255,0.85);
    font-size: 0.8rem;
    padding: 0 28px 0 0;
    transition: color 0.2s;
    white-space: nowrap;
}

.trending-ticker-track a::before {
    content: '◆';
    color: var(--nb-accent);
    margin-right: 10px;
    font-size: 0.55rem;
    vertical-align: middle;
}

.trending-ticker-track a:hover { color: #FFF; }

@keyframes ticker-scroll {
    0%   { transform: translateX(0); }
    100% { transform: translateX(-50%); }
}

/* ============================================================
   ARTICLES SECTION
   ============================================================ */
.articles-section {
    padding: 56px 0;
}

/* Featured / Monthly Events article */
.posts-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 28px;
}

.post-card {
    background: var(--nb-bg-card);
    border-radius: var(--nb-radius);
    overflow: hidden;
    box-shadow: var(--nb-shadow);
    transition: box-shadow 0.25s, transform 0.25s;
    display: flex;
    flex-direction: column;
    border: 1px solid var(--nb-border);
}

.post-card:hover {
    box-shadow: var(--nb-shadow-hover);
    transform: translateY(-3px);
}

/* Monthly events card — featured style */
.post-card.is-monthly-events {
    grid-column: 1 / -1;
    flex-direction: row;
    background: linear-gradient(135deg, var(--nb-primary) 0%, var(--nb-primary-light) 100%);
    border: none;
    color: #FFF;
}

.post-card.is-monthly-events .post-card-image {
    width: 420px;
    flex-shrink: 0;
    height: auto;
    min-height: 280px;
}

.post-card.is-monthly-events .post-card-content {
    padding: 36px 40px;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.post-card.is-monthly-events .post-card-badge {
    display: inline-block;
    background: var(--nb-accent);
    color: #FFF;
    font-size: 0.65rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.12em;
    padding: 3px 10px;
    border-radius: 3px;
    margin-bottom: 14px;
}

.post-card.is-monthly-events .post-card-date { color: rgba(255,255,255,0.65); }

.post-card.is-monthly-events .post-card-title a {
    color: #FFF;
    font-size: 1.6rem;
}

.post-card.is-monthly-events .post-card-excerpt {
    color: rgba(255,255,255,0.8);
    font-size: 0.95rem;
    margin-top: 12px;
    line-height: 1.55;
}

.post-card.is-monthly-events .read-more {
    margin-top: 20px;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: var(--nb-accent-light);
    font-weight: 600;
    font-size: 0.875rem;
}

.post-card-image {
    height: 200px;
    overflow: hidden;
    background: var(--nb-border);
}

.post-card-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.4s ease;
}

.post-card:hover .post-card-image img { transform: scale(1.04); }

.post-card-image-placeholder {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #E8E5DC;
    color: #AAA;
    font-size: 0.8rem;
}

.post-card-content {
    padding: 20px 22px 24px;
    flex: 1;
    display: flex;
    flex-direction: column;
}

.post-card-badge {
    display: none; /* shown only on featured card */
}

.post-card-date {
    font-size: 0.75rem;
    color: var(--nb-text-muted);
    margin-bottom: 8px;
    text-transform: uppercase;
    letter-spacing: 0.06em;
}

.post-card-title {
    font-family: var(--nb-font-heading);
    font-size: 1.1rem;
    line-height: 1.35;
    flex: 1;
}

.post-card-title a {
    color: var(--nb-text);
    transition: color 0.2s;
}

.post-card-title a:hover { color: var(--nb-primary); }

/* ============================================================
   LOCALLOGIC PREVIEW (homepage strip)
   ============================================================ */
.ll-preview-section {
    background: var(--nb-primary);
    padding: 56px 0;
    color: #FFF;
}

.ll-preview-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 40px;
    margin-top: 36px;
}

.ll-preview-card {
    background: rgba(255,255,255,0.07);
    border: 1px solid rgba(255,255,255,0.12);
    border-radius: var(--nb-radius);
    overflow: hidden;
}

.ll-preview-card-header {
    padding: 18px 22px;
    border-bottom: 1px solid rgba(255,255,255,0.1);
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.ll-preview-card-header h3 {
    color: #FFF;
    font-size: 1rem;
    font-family: var(--nb-font-heading);
}

.ll-preview-card-header a {
    color: var(--nb-accent-light);
    font-size: 0.8rem;
    font-weight: 600;
}

.ll-preview-card-header a:hover { color: #FFF; }

.ll-widget-container {
    height: 460px;
    width: 100%;
}

.ll-section {
    padding: 60px 0;
}

.ll-widget-full {
    height: 620px;
    width: 100%;
    border-radius: var(--nb-radius);
    overflow: hidden;
    box-shadow: var(--nb-shadow);
}

/* ============================================================
   PAGINATION
   ============================================================ */
.pagination {
    margin-top: 48px;
    display: flex;
    justify-content: center;
}

.pagination .nav-links {
    display: flex;
    gap: 6px;
    align-items: center;
}

.pagination a,
.pagination span {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 38px;
    height: 38px;
    border-radius: var(--nb-radius);
    font-size: 0.875rem;
    font-weight: 500;
    border: 1px solid var(--nb-border);
    transition: background 0.2s, color 0.2s, border-color 0.2s;
}

.pagination a {
    color: var(--nb-text);
    background: var(--nb-bg-card);
}

.pagination a:hover {
    background: var(--nb-primary);
    color: #FFF;
    border-color: var(--nb-primary);
}

.pagination .current {
    background: var(--nb-primary);
    color: #FFF;
    border-color: var(--nb-primary);
}

/* ============================================================
   SINGLE POST
   ============================================================ */
.single-layout {
    max-width: 780px;
    margin: 0 auto;
    padding: 56px 24px 80px;
}

.single-meta {
    display: flex;
    align-items: center;
    gap: 14px;
    margin-bottom: 20px;
    flex-wrap: wrap;
}

.single-category {
    background: var(--nb-primary);
    color: #FFF;
    font-size: 0.7rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    padding: 4px 10px;
    border-radius: 3px;
}

.single-category.is-events {
    background: var(--nb-accent);
}

.single-date {
    font-size: 0.8rem;
    color: var(--nb-text-muted);
    text-transform: uppercase;
    letter-spacing: 0.06em;
}

.single-title {
    font-family: var(--nb-font-heading);
    font-size: clamp(1.75rem, 4vw, 2.75rem);
    line-height: 1.2;
    margin-bottom: 32px;
    color: var(--nb-text);
}

.single-featured-image {
    width: 100%;
    max-height: 480px;
    object-fit: cover;
    border-radius: var(--nb-radius);
    margin-bottom: 36px;
    box-shadow: var(--nb-shadow);
}

.single-content {
    font-size: 1.05rem;
    line-height: 1.75;
    color: #2A2A2A;
}

.single-content h2 {
    font-family: var(--nb-font-heading);
    font-size: 1.5rem;
    color: var(--nb-primary);
    margin: 36px 0 14px;
}

.single-content h3 {
    font-size: 1.2rem;
    margin: 28px 0 10px;
    color: var(--nb-text);
}

.single-content p { margin-bottom: 1.4em; }

.single-content ul, .single-content ol {
    margin: 0 0 1.4em 24px;
}

.single-content li { margin-bottom: 0.4em; }

.single-content blockquote {
    border-left: 4px solid var(--nb-accent);
    padding: 16px 24px;
    margin: 28px 0;
    background: #F5F0E8;
    border-radius: 0 var(--nb-radius) var(--nb-radius) 0;
    font-style: italic;
    color: #444;
}

.single-nav {
    margin-top: 56px;
    padding-top: 32px;
    border-top: 1px solid var(--nb-border);
    display: flex;
    gap: 20px;
    justify-content: space-between;
}

.single-nav a {
    color: var(--nb-primary);
    font-size: 0.875rem;
    font-weight: 600;
}

.single-nav a:hover { color: var(--nb-accent); }

/* ============================================================
   STATIC PAGES
   ============================================================ */
.page-layout {
    max-width: 900px;
    margin: 0 auto;
    padding: 56px 24px 80px;
}

.page-title {
    font-family: var(--nb-font-heading);
    font-size: 2.25rem;
    color: var(--nb-primary);
    margin-bottom: 8px;
    padding-bottom: 16px;
    border-bottom: 2px solid var(--nb-accent);
}

.page-content {
    margin-top: 32px;
    font-size: 1.05rem;
    line-height: 1.75;
    color: #2A2A2A;
}

.page-content p { margin-bottom: 1.4em; }

/* ============================================================
   NEIGHBORHOOD GUIDE PAGE
   ============================================================ */
.neighborhood-guide-header {
    background: var(--nb-primary);
    color: #FFF;
    padding: 48px 0 40px;
}

.neighborhood-guide-header h1 {
    font-family: var(--nb-font-heading);
    font-size: 2.25rem;
    color: #FFF;
    margin-bottom: 10px;
}

.neighborhood-guide-header p {
    color: rgba(255,255,255,0.75);
    max-width: 560px;
    font-size: 1rem;
}

/* ============================================================
   FOOTER
   ============================================================ */
.site-footer {
    background: var(--nb-bg-dark);
    color: rgba(255,255,255,0.7);
    padding: 48px 0 28px;
}

.footer-inner {
    max-width: var(--nb-max-width);
    margin: 0 auto;
    padding: 0 24px;
}

.footer-top {
    display: grid;
    grid-template-columns: 1fr auto;
    gap: 40px;
    padding-bottom: 32px;
    border-bottom: 1px solid rgba(255,255,255,0.1);
    margin-bottom: 24px;
    align-items: start;
}

.footer-brand-name {
    font-family: var(--nb-font-heading);
    font-size: 1.35rem;
    color: #FFF;
    margin-bottom: 8px;
}

.footer-brand-tagline {
    font-size: 0.8rem;
    color: rgba(255,255,255,0.45);
    max-width: 360px;
    line-height: 1.55;
}

.footer-nav ul {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 10px;
    text-align: right;
}

.footer-nav a {
    color: rgba(255,255,255,0.65);
    font-size: 0.875rem;
    transition: color 0.2s;
}

.footer-nav a:hover { color: var(--nb-accent-light); }

.footer-bottom {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 12px;
}

.footer-copyright {
    font-size: 0.78rem;
    color: rgba(255,255,255,0.35);
}

.footer-hn-link {
    font-size: 0.78rem;
    color: rgba(255,255,255,0.35);
    display: flex;
    align-items: center;
    gap: 6px;
}

.footer-hn-link:hover { color: rgba(255,255,255,0.6); }

.footer-hn-link img {
    display: inline-block;
    vertical-align: middle;
    opacity: 0.5;
    transition: opacity 0.2s;
}

.footer-hn-link:hover img { opacity: 0.8; }

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

    .post-card.is-monthly-events {
        flex-direction: column;
    }

    .post-card.is-monthly-events .post-card-image {
        width: 100%;
        min-height: 240px;
    }

    .ll-preview-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 640px) {
    :root { --nb-header-height: 60px; }

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

    .mobile-menu-toggle { display: block; }

    .header-nav {
        display: none;
        position: absolute;
        top: var(--nb-header-height);
        left: 0; right: 0;
        background: var(--nb-bg-dark);
        padding: 16px 24px;
        border-top: 1px solid rgba(255,255,255,0.1);
    }

    .header-nav.is-open { display: block; }

    .header-nav ul {
        flex-direction: column;
        align-items: flex-start;
        gap: 4px;
    }

    .footer-top {
        grid-template-columns: 1fr;
    }

    .footer-nav ul {
        text-align: left;
        flex-direction: row;
        flex-wrap: wrap;
    }

    .single-layout, .page-layout {
        padding: 36px 20px 60px;
    }
}

/* ============================================================
   WP CLASSES
   ============================================================ */
.wp-caption { max-width: 100%; }
.aligncenter { display: block; margin: 0 auto; }
.alignleft  { float: left; margin: 0 16px 16px 0; }
.alignright { float: right; margin: 0 0 16px 16px; }
.wp-block-image figure { margin: 0; }
