/*
Theme Name: Golf On A Budget
Theme URI: https://nicheengine.com
Description: Custom theme generated by NicheEngine.
Version: 1.0
Author: NicheEngine
Text Domain: ne-golf-on-a-budget
*/

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
:root {
    --primary: #2C5F2D;
    --secondary: #1A3D5C;
    --accent: #D4A354;
    --bg: #F8F9FA;
    --text: #2B2B2B;
    --text-light: #6C757D;
    --font-h: 'Outfit', -apple-system, sans-serif;
    --font-b: 'Inter', -apple-system, sans-serif;
    --hw: 600;
    --bw: 400;
    --max-w: 1200px;
    --content-w: 760px;
}
html { scroll-behavior: smooth; }
body { font-family: var(--font-b); font-weight: var(--bw); color: var(--text); background: var(--bg); line-height: 1.7; font-size: 17px; -webkit-font-smoothing: antialiased; }
a { color: var(--primary); text-decoration: none; transition: color 0.2s; }
a:hover { color: var(--secondary); }
img { max-width: 100%; height: auto; display: block; }
h1,h2,h3,h4,h5,h6 { font-family: var(--font-h); font-weight: var(--hw); line-height: 1.25; color: var(--text); }
h1 { font-size: 2.4rem; margin-bottom: 0.5em; }
h2 { font-size: 1.8rem; margin: 1.8em 0 0.6em; }
h3 { font-size: 1.4rem; margin: 1.5em 0 0.5em; }
p { margin-bottom: 1.2em; }
blockquote { border-left: 4px solid var(--primary); padding: 1em 1.5em; margin: 1.5em 0; background: rgba(0,0,0,0.02); font-style: italic; color: var(--text-light); }
ul, ol { margin: 0 0 1.2em 1.5em; }
li { margin-bottom: 0.4em; }
table { width: 100%; border-collapse: collapse; margin: 1.5em 0; font-size: 0.95em; }
th, td { border: 1px solid #e5e7eb; padding: 10px 14px; text-align: left; }
th { background: var(--primary); color: #fff; font-weight: 600; }
tr:nth-child(even) { background: #f9fafb; }
code { background: #f3f4f6; padding: 2px 6px; border-radius: 4px; font-size: 0.9em; }

/* Header */
.site-header { background: #fff; border-bottom: 1px solid #e5e7eb; position: sticky; top: 0; z-index: 100; box-shadow: 0 1px 3px rgba(0,0,0,0.04); }
.header-inner { max-width: var(--max-w); margin: 0 auto; padding: 0 24px; display: flex; justify-content: space-between; align-items: center; height: 70px; }
.site-logo img { max-height: 44px; width: auto; }
.site-title { font-family: var(--font-h); font-weight: var(--hw); font-size: 1.4rem; }
.site-title a { color: var(--text); }
.site-title a:hover { text-decoration: none; }

/* Nav */
.main-nav ul { list-style: none; display: flex; gap: 28px; margin: 0; padding: 0; }
.main-nav a { color: var(--text); font-size: 0.95rem; font-weight: 500; padding: 4px 0; border-bottom: 2px solid transparent; transition: all 0.2s; }
.main-nav a:hover, .main-nav .current-menu-item a { color: var(--primary); border-bottom-color: var(--primary); }
.menu-toggle { display: none; background: none; border: none; cursor: pointer; padding: 8px; }
.menu-toggle span { display: block; width: 24px; height: 2px; background: var(--text); margin: 5px 0; transition: 0.3s; }

/* Hero */
.hero { position: relative; min-height: 480px; display: flex; align-items: center; justify-content: center; text-align: center; color: #fff; overflow: hidden; }
.hero-bg { position: absolute; inset: 0; background-size: cover; background-position: center; z-index: 0; }
.hero-overlay { position: absolute; inset: 0; background: linear-gradient(135deg, rgba(0,0,0,0.65), rgba(0,0,0,0.35)); z-index: 1; }
.hero-content { position: relative; z-index: 2; max-width: 700px; padding: 40px 24px; }
.hero h1 { font-size: 2.8rem; color: #fff; margin-bottom: 16px; text-shadow: 0 2px 8px rgba(0,0,0,0.3); }
.hero p { font-size: 1.2rem; opacity: 0.92; margin-bottom: 28px; }
.hero-btn { display: inline-block; padding: 14px 32px; background: var(--primary); color: #fff; font-weight: 600; border-radius: 8px; transition: all 0.2s; box-shadow: 0 4px 12px rgba(0,0,0,0.2); }
.hero-btn:hover { background: var(--secondary); color: #fff; transform: translateY(-1px); }

/* Layout */
.site-main { max-width: var(--max-w); margin: 0 auto; padding: 40px 24px; }
.content-area { display: grid; grid-template-columns: 1fr 320px; gap: 48px; align-items: start; }
.content-area > .single-post { max-width: none; width: 100%; margin: 0; }
.content-area.full-width { grid-template-columns: 1fr; }

/* Post Cards */
.posts-grid { display: grid; gap: 32px; }
.post-card { background: #fff; border: 1px solid #e5e7eb; border-radius: 12px; overflow: hidden; transition: box-shadow 0.2s, transform 0.2s; }
.post-card:hover { box-shadow: 0 8px 24px rgba(0,0,0,0.08); transform: translateY(-2px); }
.post-card-image { width: 100%; height: 220px; object-fit: cover; }
.post-card-body { padding: 24px; }
.post-card-category { display: inline-block; font-size: 0.75rem; font-weight: 600; text-transform: uppercase; letter-spacing: 0.05em; color: var(--primary); margin-bottom: 8px; }
.post-card h2 { font-size: 1.3rem; margin: 0 0 10px; line-height: 1.35; }
.post-card h2 a { color: var(--text); }
.post-card h2 a:hover { color: var(--primary); }
.post-card-excerpt { color: var(--text-light); font-size: 0.95rem; line-height: 1.6; margin-bottom: 12px; }
.post-card-meta { font-size: 0.82rem; color: var(--text-light); }

/* Single Post */
.single-post { max-width: var(--content-w); margin: 0 auto; }
.single-post .entry-header { margin-bottom: 32px; }
.single-post .entry-category { display: inline-block; font-size: 0.8rem; font-weight: 600; text-transform: uppercase; letter-spacing: 0.05em; color: var(--primary); margin-bottom: 12px; }
.single-post .entry-title { font-size: 2.4rem; line-height: 1.2; margin-bottom: 16px; }
.single-post .entry-meta { font-size: 0.9rem; color: var(--text-light); }
.single-post .featured-image { width: 100%; border-radius: 12px; margin-bottom: 32px; }
.single-post .entry-content { font-size: 1.15rem; line-height: 1.9; }
.single-post .entry-content p { margin-bottom: 1.5em; }
.single-post .entry-content h2 { padding-top: 20px; margin-top: 2em; border-top: 1px solid #e5e7eb; }
.single-post .entry-content h3 { margin-top: 1.6em; }
.single-post .entry-content ul, .single-post .entry-content ol { margin-bottom: 1.5em; line-height: 2; }
.single-post .entry-content li { margin-bottom: 0.5em; }

/* Tables */
.wp-block-table { margin: 1.5em 0; overflow-x: auto; }
.wp-block-table table { width: 100%; border-collapse: collapse; font-size: 0.95rem; }
.wp-block-table th { background: var(--primary); color: #fff; font-weight: 700; text-align: left; padding: 12px 16px; }
.wp-block-table td { padding: 10px 16px; border-bottom: 1px solid #e5e7eb; }
.wp-block-table tr:hover td { background: #f9fafb; }
.entry-content table { width: 100%; border-collapse: collapse; font-size: 0.95rem; margin: 1.5em 0; }
.entry-content th { background: var(--primary); color: #fff; font-weight: 700; text-align: left; padding: 12px 16px; }
.entry-content td { padding: 10px 16px; border-bottom: 1px solid #e5e7eb; }
.entry-content tr:hover td { background: #f9fafb; }

/* Breadcrumb */
.breadcrumb { font-size: 0.82rem; color: var(--text-light); margin-bottom: 16px; }
.breadcrumb a { color: var(--text-light); }
.breadcrumb a:hover { color: var(--primary); }
.bc-sep { margin: 0 6px; opacity: 0.5; }

/* Pillar Post (full-width, no sidebar) */
.single-post.pillar-post { max-width: 900px; }
.pillar-post .entry-title { font-size: 2.8rem; }
.pillar-badge { display: inline-block; font-size: 0.75rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.08em; color: var(--primary); background: rgba(37,99,235,0.08); padding: 5px 14px; border-radius: 6px; margin-bottom: 16px; }

/* Table of Contents */
.toc { background: #f8f9fa; border: 1px solid #e5e7eb; border-radius: 12px; padding: 24px 28px; margin-bottom: 40px; }
.toc-title { font-family: var(--font-h); font-weight: var(--hw); font-size: 1rem; margin-bottom: 14px; color: var(--text); }
.toc-list { margin: 0; padding: 0 0 0 20px; }
.toc-list li { padding: 5px 0; font-size: 0.93rem; }
.toc-list a { color: var(--text); border-bottom: 1px solid transparent; }
.toc-list a:hover { color: var(--primary); border-bottom-color: var(--primary); }

/* Related Cluster Articles (on pillar posts) */
.related-cluster { margin-top: 60px; padding-top: 40px; border-top: 2px solid #e5e7eb; }
.related-cluster .section-title { text-align: left; font-size: 1.4rem; margin-bottom: 24px; }

/* Pillar Backlink (on cluster posts) */
.pillar-backlink { margin-top: 40px; padding: 20px 24px; background: rgba(37,99,235,0.04); border: 1px solid rgba(37,99,235,0.15); border-radius: 12px; }
.pillar-backlink-label { display: block; font-size: 0.78rem; font-weight: 600; text-transform: uppercase; letter-spacing: 0.05em; color: var(--text-light); margin-bottom: 6px; }
.pillar-backlink-title { font-size: 1.1rem; font-weight: 700; color: var(--primary); }

/* Affiliate Disclosure (auto-appended to posts) */
.affiliate-disclosure { background: #f8f9fa; border-left: 3px solid var(--text-light); padding: 12px 16px; margin-bottom: 28px; border-radius: 0 6px 6px 0; font-size: 0.82rem; color: var(--text-light); line-height: 1.6; }
.affiliate-disclosure p { margin: 0; }
.affiliate-disclosure a { color: var(--text-light); text-decoration: underline; }

/* Sidebar */
.sidebar { font-size: 0.95rem; }
.widget { background: #fff; border: 1px solid #e5e7eb; border-radius: 12px; padding: 24px; margin-bottom: 24px; }
.widget-title { font-size: 1rem; font-weight: 700; margin-bottom: 16px; padding-bottom: 10px; border-bottom: 2px solid var(--primary); }
.widget ul { list-style: none; margin: 0; padding: 0; }
.widget li { padding: 6px 0; border-bottom: 1px solid #f3f4f6; }
.widget li:last-child { border-bottom: none; }

/* Footer */
.site-footer { background: var(--text); color: rgba(255,255,255,0.7); padding: 48px 24px 24px; margin-top: 60px; }
.footer-inner { max-width: var(--max-w); margin: 0 auto; text-align: center; }
.footer-nav ul { list-style: none; display: flex; justify-content: center; gap: 24px; margin: 0 0 20px; padding: 0; }
.footer-nav a { color: rgba(255,255,255,0.7); font-size: 0.9rem; }
.footer-nav a:hover { color: #fff; }
.footer-copy { font-size: 0.82rem; opacity: 0.6; }

/* Front Page Sections */
.section { max-width: var(--max-w); margin: 0 auto; padding: 60px 24px; }
.section-title { font-size: 1.6rem; margin-bottom: 8px; text-align: center; }
.section-subtitle { font-size: 1rem; color: var(--text-light); text-align: center; margin-bottom: 36px; }
.posts-grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; }

/* Pillar Cards */
.pillar-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 24px; }
.pillar-card { background: #fff; border: 1px solid #e5e7eb; border-radius: 12px; padding: 32px 28px; text-align: center; transition: all 0.25s; position: relative; overflow: hidden; }
.pillar-card:hover { box-shadow: 0 8px 24px rgba(0,0,0,0.08); transform: translateY(-3px); border-color: var(--primary); }
.pillar-card::before { content: ''; position: absolute; top: 0; left: 0; right: 0; height: 4px; background: var(--primary); opacity: 0; transition: opacity 0.25s; }
.pillar-card:hover::before { opacity: 1; }
.pillar-icon { font-size: 2.4rem; margin-bottom: 16px; display: block; }
.pillar-card h3 { font-size: 1.2rem; margin-bottom: 10px; }
.pillar-card p { color: var(--text-light); font-size: 0.93rem; line-height: 1.6; margin-bottom: 16px; }
.pillar-card .pillar-count { font-size: 0.8rem; color: var(--primary); font-weight: 600; text-transform: uppercase; letter-spacing: 0.04em; }
.pillar-card .pillar-link { display: inline-block; margin-top: 12px; font-size: 0.9rem; font-weight: 600; color: var(--primary); }
.pillar-card .pillar-link:hover { color: var(--secondary); }

/* Featured Posts */
.featured-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 24px; }
.featured-card { position: relative; border-radius: 12px; overflow: hidden; min-height: 320px; display: flex; align-items: flex-end; }
.featured-card img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.featured-card .featured-overlay { position: absolute; inset: 0; background: linear-gradient(to top, rgba(0,0,0,0.75) 0%, rgba(0,0,0,0.1) 60%); }
.featured-card .featured-body { position: relative; z-index: 2; padding: 28px; color: #fff; }
.featured-card .featured-cat { font-size: 0.72rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.08em; background: var(--primary); padding: 4px 10px; border-radius: 4px; display: inline-block; margin-bottom: 10px; }
.featured-card h3 { font-size: 1.3rem; color: #fff; margin-bottom: 8px; line-height: 1.3; }
.featured-card h3 a { color: #fff; }
.featured-card h3 a:hover { opacity: 0.9; }
.featured-card p { font-size: 0.9rem; opacity: 0.85; margin: 0; }

/* Category Browse */
.section-alt { background: #f8f9fa; margin-left: calc(-50vw + 50%); margin-right: calc(-50vw + 50%); padding-left: calc(50vw - 50%); padding-right: calc(50vw - 50%); }
.category-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 16px; max-width: var(--max-w); margin: 0 auto; }
.category-chip { display: flex; align-items: center; justify-content: space-between; padding: 16px 20px; background: #fff; border: 1px solid #e5e7eb; border-radius: 10px; transition: all 0.2s; }
.category-chip:hover { border-color: var(--primary); box-shadow: 0 2px 8px rgba(0,0,0,0.06); text-decoration: none; }
.category-chip span { font-weight: 600; font-size: 0.95rem; color: var(--text); }
.category-chip .cat-count { font-size: 0.8rem; background: #f3f4f6; padding: 4px 10px; border-radius: 20px; color: var(--text-light); font-weight: 500; }

/* About Block */
.about-block { max-width: 700px; margin: 0 auto; text-align: center; }
.about-block p { font-size: 1.1rem; line-height: 1.8; color: var(--text-light); }
.about-divider { width: 60px; height: 3px; background: var(--primary); margin: 0 auto 24px; border-radius: 2px; }

/* Newsletter CTA */
.newsletter-section { background: var(--primary); color: #fff; margin-left: calc(-50vw + 50%); margin-right: calc(-50vw + 50%); padding: 60px 24px; text-align: center; }
.newsletter-section h2 { color: #fff; font-size: 1.6rem; margin-bottom: 8px; }
.newsletter-section p { opacity: 0.9; margin-bottom: 24px; font-size: 1.05rem; }
.newsletter-form { display: flex; gap: 10px; justify-content: center; max-width: 480px; margin: 0 auto; }
.newsletter-form input { flex: 1; padding: 14px 18px; border: 2px solid rgba(255,255,255,0.3); background: rgba(255,255,255,0.15); color: #fff; border-radius: 8px; font-size: 1rem; font-family: var(--font-b); }
.newsletter-form input::placeholder { color: rgba(255,255,255,0.6); }
.newsletter-form input:focus { outline: none; border-color: #fff; background: rgba(255,255,255,0.2); }
.newsletter-form button { padding: 14px 28px; background: #fff; color: var(--primary); border: none; border-radius: 8px; font-weight: 700; font-size: 1rem; cursor: pointer; white-space: nowrap; transition: background 0.2s; }
.newsletter-form button:hover { background: #f0f0f0; }

/* Pagination */
.pagination { display: flex; justify-content: center; gap: 8px; margin-top: 40px; }
.pagination a, .pagination span { padding: 8px 16px; border: 1px solid #e5e7eb; border-radius: 6px; font-size: 0.9rem; color: var(--text); }
.pagination .current { background: var(--primary); color: #fff; border-color: var(--primary); }
.pagination a:hover { background: #f3f4f6; text-decoration: none; }

/* Search */
.search-form { display: flex; gap: 8px; max-width: 500px; }
.search-form input[type="search"] { flex: 1; padding: 10px 16px; border: 1px solid #e5e7eb; border-radius: 8px; font-size: 1rem; font-family: var(--font-b); }
.search-form button { padding: 10px 20px; background: var(--primary); color: #fff; border: none; border-radius: 8px; font-weight: 600; cursor: pointer; }

/* Responsive */
@media (max-width: 900px) {
    .content-area { grid-template-columns: 1fr; }
    .posts-grid-3 { grid-template-columns: 1fr; }
    .featured-grid { grid-template-columns: 1fr; }
    .pillar-grid { grid-template-columns: 1fr; }
    .hero h1 { font-size: 2rem; }
    .single-post .entry-title { font-size: 1.8rem; }
    .pillar-post .entry-title { font-size: 2rem; }
    .main-nav { display: none; }
    .main-nav.active { display: block; position: absolute; top: 70px; left: 0; right: 0; background: #fff; border-bottom: 1px solid #e5e7eb; padding: 16px 24px; box-shadow: 0 8px 24px rgba(0,0,0,0.08); }
    .main-nav.active ul { flex-direction: column; gap: 0; }
    .main-nav.active li { padding: 12px 0; border-bottom: 1px solid #f3f4f6; }
    .menu-toggle { display: block; }
    .newsletter-form { flex-direction: column; }
}
@media (max-width: 600px) {
    body { font-size: 16px; }
    .hero { min-height: 360px; }
    .hero h1 { font-size: 1.6rem; }
    .pillar-post .entry-title { font-size: 1.6rem; }
    .featured-card { min-height: 240px; }
    .section { padding: 40px 16px; }
    .toc { padding: 16px 20px; }
}
