/*
Theme Name: NDIS Guide
Description: Magazine-style theme for NDIS guides, reviews and news
Version: 3.27hi
Author: NDIS Guide
*/

/* ── RESET ── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
img { max-width: 100%; height: auto; display: block; }
a { color: #0073aa; }
ul { list-style: none; padding: 0; margin: 0; }

/* Restore list styles inside post/page content */
.page-content ul, .post-content ul { list-style: disc; padding-left: 1.6em; margin: 0.8em 0 1em; }
.page-content ol, .post-content ol { list-style: decimal; padding-left: 1.6em; margin: 0.8em 0 1em; }
.page-content li, .post-content li { margin-bottom: 0.4em; list-style: inherit; }

:root {
    --blue-deep:  #004f8b;
    --blue-mid:   #0073aa;
    --blue-light: #e8f4fc;
    --accent:     #f0a500;
    --text:       #1a1a2e;
    --muted:      #6b7280;
    --white:      #ffffff;
    --bg:         #f5f7fa;
    --shadow:     0 4px 24px rgba(0,79,139,0.10);
}

body {
    font-family: 'Source Sans 3', Arial, sans-serif;
    background: var(--bg);
    color: var(--text);
    font-size: 16px;
    line-height: 1.6;
    width: 100%;
    overflow-x: hidden;
}

/* ── HEADER ── */
.site-header { background: var(--blue-deep); position: sticky; top: 0; z-index: 100; box-shadow: 0 2px 16px rgba(0,0,0,0.2); }
.header-inner { max-width: 1200px; margin: 0 auto; padding: 0 24px; display: flex; align-items: center; justify-content: space-between; height: 68px; position: relative; }
.site-nav { position: absolute; left: 50%; transform: translateX(-50%); }
.site-logo { font-family: 'Playfair Display', Georgia, serif; font-size: 1.7rem; font-weight: 900; color: var(--white); text-decoration: none; letter-spacing: -0.5px; }
.logo-accent { color: var(--accent) !important; }
.site-nav ul.nav-menu { list-style: none; display: flex; gap: 4px; padding: 0; margin: 0; }
.site-nav ul.nav-menu li { list-style: none; }
.site-nav ul.nav-menu li a { color: rgba(255,255,255,0.82); text-decoration: none; font-size: 0.88rem; font-weight: 600; padding: 7px 14px; border-radius: 4px; display: block; text-transform: uppercase; letter-spacing: 0.4px; transition: background 0.2s, color 0.2s; }
.site-nav ul.nav-menu li a:hover, .site-nav ul.nav-menu li.current-menu-item a { background: rgba(255,255,255,0.14); color: var(--white); }

/* ── HERO ── */
.hero { background: linear-gradient(135deg, #004f8b 0%, #005f96 60%, #0088cc 100%); color: var(--white); padding: 70px 24px 80px; text-align: center; }
.hero-inner { max-width: 620px; margin: 0 auto; }
.hero-tag { display: inline-block; background: var(--accent); color: #1a1100; font-size: 0.72rem; font-weight: 700; letter-spacing: 2px; text-transform: uppercase; padding: 4px 14px; border-radius: 20px; margin-bottom: 18px; }
.hero h1 { font-family: 'Playfair Display', Georgia, serif; font-size: clamp(2rem, 5vw, 3.2rem); font-weight: 900; line-height: 1.15; margin-bottom: 14px; }
.hero-sub { font-size: 1.1rem; opacity: 0.88; font-weight: 300; }
.hero-btns { display: flex; gap: 14px; justify-content: center; flex-wrap: wrap; margin-top: 28px; }
.btn-primary { background: var(--accent); color: #1a1100; padding: 13px 30px; border-radius: 6px; font-weight: 700; text-decoration: none; font-size: 1rem; display: inline-block; transition: transform 0.15s, box-shadow 0.15s; }
.btn-primary:hover { transform: translateY(-2px); box-shadow: 0 6px 20px rgba(240,165,0,0.4); color: #1a1100; text-decoration: none; }
.btn-outline { border: 2px solid rgba(255,255,255,0.65); color: var(--white); padding: 11px 30px; border-radius: 6px; font-weight: 600; text-decoration: none; font-size: 1rem; display: inline-block; background: transparent; transition: background 0.15s; }
.btn-outline:hover { background: rgba(255,255,255,0.14); color: var(--white); text-decoration: none; }

/* ── CATEGORY TAB BAR ── */
.category-bar {
    background: var(--white);
    border-bottom: 2px solid var(--blue-light);
    display: flex;
    justify-content: center;
    overflow-x: auto;
    overflow-y: hidden;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    width: 100vw;
    position: relative;
    left: 50%;
    right: 50%;
    margin-left: -50vw;
    margin-right: -50vw;
    padding: 0 24px;
    box-sizing: border-box;
}
.category-bar::-webkit-scrollbar { display: none; }
@media (max-width: 768px) { .category-bar { justify-content: flex-start; } }
.cat-tab { padding: 14px 20px; font-weight: 600; font-size: 0.85rem; color: var(--muted); text-decoration: none; border-bottom: 3px solid transparent; margin-bottom: -2px; white-space: nowrap; display: inline-block; text-transform: uppercase; letter-spacing: 0.5px; transition: all 0.2s; }
.cat-tab:hover { color: var(--blue-mid); }
.cat-tab.active { color: var(--blue-deep); border-bottom-color: var(--blue-deep); }

/* ── LAYOUT ── */
.content-wrapper { max-width: 1200px; margin: 0 auto; padding: 48px 24px; display: grid; grid-template-columns: 1fr 320px; gap: 48px; align-items: start; }
.main-content { min-width: 0; }
.site-content { width: 100%; max-width: 1200px; margin: 0 auto; padding: 48px 24px; display: block; }

/* ── SECTION HEADERS ── */
.cat-section { margin-bottom: 52px; }
.section-header { display: flex; align-items: center; justify-content: space-between; margin-bottom: 22px; padding-bottom: 12px; border-bottom: 2px solid var(--blue-light); }
.section-title { font-family: 'Playfair Display', Georgia, serif; font-size: 1.5rem; font-weight: 700; color: var(--text); display: flex; align-items: center; gap: 10px; }
.section-title::before { content: ''; display: block; width: 4px; height: 22px; background: var(--blue-mid); border-radius: 2px; flex-shrink: 0; }
.see-all { font-size: 0.85rem; color: var(--blue-mid); text-decoration: none; font-weight: 600; }
.see-all:hover { text-decoration: underline; }

/* ── FEATURED CARD ── */
.featured-card { background: var(--white); border-radius: 10px; overflow: hidden; box-shadow: var(--shadow); display: grid; grid-template-columns: 1fr 1fr; min-height: 240px; margin-bottom: 20px; transition: transform 0.2s; }
.featured-card:hover { transform: translateY(-3px); }
.featured-img-link { display: block; height: 100%; overflow: hidden; }
.featured-img { width: 100%; height: 100%; object-fit: cover; object-position: center; display: block; min-height: 240px; }
.featured-img-placeholder { min-height: 240px; height: 100%; background: linear-gradient(135deg, var(--blue-mid), var(--blue-deep)); display: block; }
.featured-body { padding: 28px; display: flex; flex-direction: column; justify-content: center; }
.featured-body h2 { font-family: 'Playfair Display', Georgia, serif; font-size: 1.3rem; font-weight: 700; line-height: 1.3; margin: 10px 0; }
.featured-body h2 a { color: var(--text); text-decoration: none; }
.featured-body h2 a:hover { color: var(--blue-mid); }
.featured-body .excerpt { color: var(--muted); font-size: 0.9rem; margin-bottom: 14px; line-height: 1.6; }
.featured-body .post-meta { font-size: 0.8rem; color: var(--muted); }

/* ── SMALL CARDS ── */
.cards-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 18px; }
.card { background: var(--white); border-radius: 10px; overflow: hidden; box-shadow: var(--shadow); transition: transform 0.2s, box-shadow 0.2s; }
.card:hover { transform: translateY(-4px); box-shadow: 0 10px 36px rgba(0,79,139,0.16); }
.card-img-link { display: block; overflow: hidden; height: 155px; }
.card-img { width: 100%; height: 100%; object-fit: cover; object-position: center; display: block; }
.card-img-placeholder { height: 155px; background: linear-gradient(135deg, var(--blue-mid), var(--blue-deep)); display: block; }
.card-body { padding: 14px 16px 18px; }
.post-cat { display: inline-block; font-size: 0.7rem; font-weight: 700; text-transform: uppercase; letter-spacing: 1px; padding: 3px 10px; border-radius: 3px; margin-bottom: 8px; }
.card-body h3 { font-size: 0.95rem; font-weight: 600; line-height: 1.35; margin-bottom: 8px; }
.card-body h3 a { color: var(--text); text-decoration: none; }
.card-body h3 a:hover { color: var(--blue-mid); }
.post-meta { font-size: 0.78rem; color: var(--muted); }

/* ── SIDEBAR ── */
.sidebar { display: flex; flex-direction: column; gap: 24px; position: sticky; top: 88px; ; }
.widget { background: var(--white); border-radius: 10px; padding: 22px; box-shadow: var(--shadow); }
.widget-title { font-family: 'Playfair Display', Georgia, serif; font-size: 1.1rem; font-weight: 700; margin-bottom: 16px; padding-bottom: 10px; border-bottom: 2px solid var(--blue-light); color: var(--text); }
.newsletter-widget { background: linear-gradient(135deg, var(--blue-deep), #005f96) !important; color: var(--white); text-align: center; padding: 24px !important; }
.newsletter-widget h3 { font-family: 'Playfair Display', Georgia, serif; font-size: 1.15rem; font-weight: 700; margin-bottom: 8px; color: var(--white); }
.newsletter-widget p { font-size: 0.88rem; opacity: 0.88; margin-bottom: 16px; color: rgba(255,255,255,0.88); }
.newsletter-form { display: flex; flex-direction: column; gap: 8px; }
.newsletter-form input { width: 100%; padding: 10px 14px; border: none; border-radius: 5px; font-size: 0.9rem; outline: none; }
.newsletter-form button { width: 100%; padding: 11px; background: var(--accent); color: #1a1100; border: none; border-radius: 5px; font-weight: 700; font-size: 0.92rem; cursor: pointer; }
.newsletter-form button:hover { opacity: 0.9; }
.popular-item { display: flex; gap: 12px; align-items: flex-start; padding: 10px 0; border-bottom: 1px solid #f0f0f0; }
.popular-item:last-child { border-bottom: none; padding-bottom: 0; }
.pop-num { font-family: 'Playfair Display', Georgia, serif; font-size: 1.5rem; font-weight: 900; color: #5a9fd4; min-width: 32px; line-height: 1; flex-shrink: 0; }
.pop-title { font-size: 0.88rem; font-weight: 600; color: var(--text); line-height: 1.35; }
.pop-title a { color: inherit; text-decoration: none; }
.pop-title a:hover { color: var(--blue-mid); }
.cat-list { list-style: none !important; padding: 0 !important; margin: 0 !important; }
.cat-list li { display: flex; justify-content: space-between; align-items: center; padding: 9px 0; border-bottom: 1px solid #f0f0f0; list-style: none !important; }
.cat-list li:last-child { border-bottom: none; }
.cat-list a { color: var(--text); text-decoration: none; font-weight: 500; font-size: 0.9rem; }
.cat-list a:hover { color: var(--blue-mid); }
.cat-count { background: var(--blue-light); color: var(--blue-deep); font-size: 0.72rem; font-weight: 700; padding: 2px 8px; border-radius: 10px; }

/* ── PAGE / SINGLE ── */
.page-article { background: var(--white); border-radius: 10px; padding: 40px 48px; box-shadow: var(--shadow); max-width: 780px; margin: 0 auto; width: 100%; }
.page-title { font-family: 'Playfair Display', Georgia, serif; font-size: clamp(1.6rem, 4vw, 2.4rem); font-weight: 900; line-height: 1.2; margin: 10px 0 14px; }
.single-thumb { margin: 24px 0; border-radius: 8px; overflow: hidden; }
.single-thumb img { width: 100%; height: auto; }
.page-content { font-size: 1.05rem; line-height: 1.8; color: #333; }
.page-content h1, .page-content .wp-block-heading.is-style-default { font-family: 'Playfair Display', Georgia, serif !important; font-size: 2rem !important; font-weight: 700 !important; margin: 0 0 20px !important; color: var(--text) !important; }
.page-content h2 { font-family: 'Playfair Display', Georgia, serif !important; font-size: 1.5rem !important; font-weight: 700 !important; margin: 32px 0 12px !important; color: var(--text) !important; }
.page-content h3 { font-family: 'Playfair Display', Georgia, serif !important; font-size: 1.2rem !important; font-weight: 700 !important; margin: 24px 0 10px !important; color: var(--text) !important; }
.page-content h4 { font-family: 'Playfair Display', Georgia, serif !important; font-size: 1rem !important; font-weight: 700 !important; margin: 20px 0 8px !important; color: var(--text) !important; }
.page-content p { margin-bottom: 18px; }
.page-content ul, .page-content ol { padding-left: 24px; margin-bottom: 18px; }
.page-content li { margin-bottom: 6px; }
.page-content a { color: var(--blue-mid); }

/* WordPress block editor heading overrides */
.wp-block-heading { font-family: 'Playfair Display', Georgia, serif !important; color: var(--text) !important; }
h1.wp-block-heading { font-size: 2rem !important; font-weight: 700 !important; }
h2.wp-block-heading { font-size: 1.5rem !important; font-weight: 700 !important; }
h3.wp-block-heading { font-size: 1.2rem !important; font-weight: 700 !important; }

/* ── FOOTER ── */
.site-footer { background: #0e1a2b; color: rgba(255,255,255,0.7); margin-top: 60px; padding: 0; }
.footer-inner { max-width: 1200px; margin: 0 auto; padding: 48px 40px 0; }
.footer-grid { display: grid; grid-template-columns: 2fr 1fr 1fr; gap: 48px; margin-bottom: 40px; }
.footer-logo { font-family: 'Playfair Display', Georgia, serif; font-size: 1.6rem; font-weight: 900; color: #ffffff; text-decoration: none; display: block; margin-bottom: 14px; }
.footer-brand p { font-size: 0.88rem; line-height: 1.7; color: rgba(255,255,255,0.65); }
.footer-col h4 { color: #ffffff; font-weight: 700; font-size: 0.82rem; text-transform: uppercase; letter-spacing: 1px; margin-bottom: 14px; }
.footer-col ul { list-style: none !important; padding: 0 !important; margin: 0 !important; }
.footer-col li { list-style: none !important; margin-bottom: 9px !important; }
.footer-col li::before { display: none !important; content: none !important; }
.footer-col a { color: rgba(255,255,255,0.65); text-decoration: none; font-size: 0.9rem; transition: color 0.2s; }
.footer-col a:hover { color: #ffffff; }
.footer-bottom { border-top: 1px solid rgba(255,255,255,0.1); padding: 20px 0 24px; display: flex; justify-content: space-between; align-items: center; font-size: 0.82rem; flex-wrap: wrap; gap: 10px; color: rgba(255,255,255,0.6); }
.footer-bottom a { color: rgba(255,255,255,0.5); text-decoration: none; }
.footer-bottom a:hover { color: #ffffff; }

/* ── NO POSTS ── */
.no-posts { background: var(--white); border-radius: 10px; padding: 48px 40px; text-align: center; box-shadow: var(--shadow); }
.no-posts h2 { font-family: 'Playfair Display', Georgia, serif; margin-bottom: 12px; }

/* ── SEARCH RESULTS ── */
.search-title { font-family: 'Playfair Display', Georgia, serif; font-size: 1.6rem; font-weight: 700; margin-bottom: 6px; }
.search-title em { color: var(--blue-mid); font-style: italic; }
.search-count { color: var(--muted); font-size: 0.9rem; margin-bottom: 28px; }
.search-results { display: flex; flex-direction: column; gap: 0; }
.search-result-item { padding: 20px 0; border-bottom: 1px solid #eee; }
.search-result-item:last-child { border-bottom: none; }
.result-title { font-size: 1.1rem; font-weight: 700; margin: 6px 0 8px; }
.result-title a { color: var(--text); text-decoration: none; }
.result-title a:hover { color: var(--blue-mid); }
.result-excerpt { color: var(--muted); font-size: 0.9rem; margin-bottom: 6px; }
.no-results-msg { color: var(--muted); margin-bottom: 8px; }
.search-pagination { margin-top: 28px; }

/* ── HEADER SEARCH ── */
.nav-search { display:flex; align-items:center; background:rgba(255,255,255,0.13); border:1px solid rgba(255,255,255,0.28); border-radius:20px; overflow:hidden; flex-shrink:0; transition:background 0.2s,border-color 0.2s; }
.nav-search:focus-within { background:rgba(255,255,255,0.22); border-color:rgba(255,255,255,0.55); }
.nav-search-input { background:transparent; border:none; outline:none; color:#fff; font-size:0.85rem; padding:7px 12px; width:155px; font-family:inherit; }
.nav-search-input::placeholder { color:rgba(255,255,255,0.5); }
.nav-search-input::-webkit-search-cancel-button { display:none; }
.nav-search-btn { background:transparent; border:none; cursor:pointer; color:rgba(255,255,255,0.7); padding:7px 10px 7px 2px; display:flex; align-items:center; transition:color 0.2s; flex-shrink:0; }
.nav-search-btn:hover { color:#fff; }

@media (max-width: 768px) {
    .nav-search { order:3; width:calc(100% - 40px); margin: 0 20px 12px; border-radius:20px; background:rgba(255,255,255,0.15); }
    .nav-search-input { width:100%; font-size:0.95rem; padding:9px 12px; }
}

/* ── HAMBURGER MENU ── */
.nav-toggle {
    display: none;
    flex-direction: column;
    justify-content: space-between;
    width: 28px;
    height: 20px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 0;
    flex-shrink: 0;
}
.nav-toggle span {
    display: block;
    height: 2px;
    width: 100%;
    background: #ffffff;
    border-radius: 2px;
    transition: all 0.3s;
}
.nav-toggle.active span:nth-child(1) { transform: translateY(9px) rotate(45deg); }
.nav-toggle.active span:nth-child(2) { opacity: 0; }
.nav-toggle.active span:nth-child(3) { transform: translateY(-9px) rotate(-45deg); }

@media (max-width: 768px) {
    .nav-toggle { display: flex; }
    .site-nav { position: static; transform: none; display: none; width: 100%; padding-bottom: 12px; }
    .site-nav.open { display: block; }
    .site-nav ul.nav-menu { flex-direction: column; gap: 0; }
    .site-nav ul.nav-menu li a { padding: 10px 4px; border-radius: 0; border-bottom: 1px solid rgba(255,255,255,0.1); font-size: 0.95rem; }
}

/* ── HAMBURGER MENU ── */
.nav-toggle {
    display: none;
    flex-direction: column;
    justify-content: space-between;
    width: 28px;
    height: 20px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 0;
    flex-shrink: 0;
}
.nav-toggle span { display: block; height: 2px; width: 100%; background: #ffffff; border-radius: 2px; transition: all 0.3s; }
.nav-toggle.active span:nth-child(1) { transform: translateY(9px) rotate(45deg); }
.nav-toggle.active span:nth-child(2) { opacity: 0; }
.nav-toggle.active span:nth-child(3) { transform: translateY(-9px) rotate(-45deg); }

@media (max-width: 768px) {
    .header-inner { flex-direction: row !important; flex-wrap: wrap; height: auto; padding: 0 20px; align-items: center; }
    .site-logo { padding: 14px 0; flex: 1; }
    .nav-toggle { display: flex; align-self: center; }
    .site-nav { display: none; order: 3; width: 100%; padding-bottom: 12px; border-top: 1px solid rgba(255,255,255,0.1); }
    .site-nav.open { display: block; }
    .site-nav ul.nav-menu { flex-direction: column; gap: 0; }
    .site-nav ul.nav-menu li a { padding: 11px 4px; border-radius: 0; border-bottom: 1px solid rgba(255,255,255,0.08); font-size: 0.95rem; }
}

/* ── RESPONSIVE ── */
@media (max-width: 1024px) { .content-wrapper { grid-template-columns: 1fr; } .sidebar { position: static; display: grid; grid-template-columns: 1fr 1fr; gap: 20px; } }
@media (max-width: 768px) { .header-inner { flex-direction: row; flex-wrap: wrap; height: auto; padding: 0 20px; align-items: center; } .site-logo { padding: 14px 0; flex:1; } .nav-toggle { align-self: center; } .nav-search { order:3; width:calc(100% - 0px); margin: 0 0 12px; border-radius:20px; background:rgba(255,255,255,0.15); } .nav-search-input { width:100%; font-size:0.95rem; padding:9px 12px; } .site-nav { display:none; order:4; width:100%; padding-bottom:12px; border-top:1px solid rgba(255,255,255,0.1); } .site-nav.open { display:block; } .site-nav ul.nav-menu { flex-direction:column; gap:0; } .site-nav ul.nav-menu li a { padding:11px 4px; border-radius:0; border-bottom:1px solid rgba(255,255,255,0.08); font-size:0.95rem; } .featured-card { grid-template-columns: 1fr; } .featured-img, .featured-img-placeholder { min-height: 200px; } .footer-grid { grid-template-columns: 1fr 1fr; gap: 28px; } .sidebar { grid-template-columns: 1fr; } .page-article { padding: 24px 20px; } }
@media (max-width: 600px) { .cards-grid { grid-template-columns: 1fr; } .footer-grid { grid-template-columns: 1fr; } .footer-bottom { flex-direction: column; text-align: center; } .hero-btns { flex-direction: column; align-items: center; } .hero { padding: 48px 20px 56px; } }
