/* S615 Theme v3.1 */

/* ── Variables ──────────────────────────────────── */
:root {
    --bg: #0d1117; --surface: #161b22; --surface2: #1c2128;
    --border: #30363d; --text: #e6edf3; --muted: #8b949e; --subtle: #6e7681;
    --gold: #c8a97e; --gold-hover: #a8894e; --gold-light: rgba(200,169,126,.15);
    --green: #3fb950; --yellow: #d29922; --red: #f85149; --blue: #58a6ff;
    --radius: 12px; --radius-sm: 8px;
    --font: 'Inter', system-ui, -apple-system, sans-serif;
    --mono: 'JetBrains Mono', 'Fira Code', monospace;
    --max-w: 1400px; --content-w: 1200px;
    --transition: .2s ease;
}

/* ── Reset ──────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; font-family: var(--font); font-size: 16px; line-height: 1.6; color: var(--text); background: var(--bg); -webkit-font-smoothing: antialiased; }
img { max-width: 100%; height: auto; display: block; }
a { color: var(--gold); text-decoration: none; transition: color var(--transition); }
a:hover { color: var(--gold-hover); }
h1,h2,h3,h4,h5,h6 { font-family: var(--font); color: var(--text); line-height: 1.3; margin: 0 0 16px; }
h1 { font-size: 36px; font-weight: 700; }
h2 { font-size: 28px; font-weight: 700; }
h3 { font-size: 22px; font-weight: 600; }
h4 { font-size: 18px; font-weight: 600; }
p { margin: 0 0 16px; color: var(--muted); }

/* ── Layout ─────────────────────────────────────── */
.wrap { max-width: var(--max-w); margin: 0 auto; padding: 0 24px; }
.main { min-height: 60vh; padding: 40px 0; }
.main--front { padding: 0; }
.skip-link { position: absolute; top: -100px; left: 0; background: var(--gold); color: var(--bg); padding: 8px 16px; font-weight: 600; z-index: 100000; }
.skip-link:focus { top: 0; }

/* ── Entry Content — centered with full-width breakout ── */
.entry-content { color: var(--text); }
.entry-content > * {
    max-width: var(--content-w); margin-left: auto; margin-right: auto;
    padding-left: 24px; padding-right: 24px;
}
.entry-content > .alignfull {
    max-width: none; padding-left: 0; padding-right: 0;
}
.entry-content > .alignwide {
    max-width: var(--max-w);
}
/* Front page: full-width hero groups need no inner padding */
.entry-content--front > .wp-block-group.alignfull { padding-left: 0; padding-right: 0; }
.entry-content--front > .wp-block-group.alignfull > .wp-block-group__inner-container {
    max-width: var(--content-w); margin: 0 auto; padding: 0 24px;
}
/* Spacing between blocks */
.entry-content > * + * { margin-top: 24px; }
.entry-content > .wp-block-spacer + * { margin-top: 0; }
.entry-content > .wp-block-separator { margin-top: 32px; margin-bottom: 32px; }

/* ── Top Bar ────────────────────────────────────── */
.top-bar { background: var(--surface2); border-bottom: 1px solid var(--border); font-size: 13px; }
.top-bar:empty { display: none; }
.top-bar-inner { display: flex; align-items: center; justify-content: space-between; height: 36px; gap: 16px; }
.top-bar-left { display: flex; align-items: center; gap: 12px; }
.top-bar-link { color: var(--muted); font-size: 13px; display: inline-flex; align-items: center; gap: 4px; }
.top-bar-link:hover { color: var(--gold); }
.top-bar-sep { color: var(--subtle); font-size: 10px; }
.top-bar-right { display: flex; align-items: center; gap: 12px; }
.mode-toggle {
    background: none; border: 1px solid var(--border); border-radius: var(--radius-sm);
    color: var(--muted); cursor: pointer; padding: 4px 10px; font-size: 16px;
    transition: all var(--transition); display: flex; align-items: center; line-height: 1;
}
.mode-toggle:hover { color: var(--gold); border-color: var(--gold); }

/* ── Header ─────────────────────────────────────── */
.site-header {
    position: sticky; top: 0; z-index: 1000;
    background: rgba(22,27,34,.95); border-bottom: 1px solid var(--border);
    backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px);
}
.site-header .wrap { display: flex; align-items: center; justify-content: space-between; height: 64px; }
.site-brand a { display: flex; align-items: center; text-decoration: none; }
.site-brand img { max-height: 36px; width: auto; }
.site-name { font-size: 20px; font-weight: 700; color: var(--text); letter-spacing: .5px; }
.site-name:hover { color: var(--gold); }
.nav-list { display: flex; gap: 4px; list-style: none; margin: 0; padding: 0; }
.nav-list a { display: block; padding: 8px 16px; font-size: 14px; font-weight: 500; color: var(--muted); border-radius: var(--radius-sm); transition: all var(--transition); }
.nav-list a:hover, .nav-list .current-menu-item > a { color: var(--text); background: var(--surface2); }

/* Hamburger */
.menu-toggle { display: none; background: none; border: none; cursor: pointer; padding: 8px; width: 40px; height: 40px; position: relative; }
.hamburger, .hamburger::before, .hamburger::after { display: block; width: 22px; height: 2px; background: var(--text); border-radius: 2px; transition: all .3s; }
.hamburger { position: relative; }
.hamburger::before, .hamburger::after { content: ''; position: absolute; left: 0; }
.hamburger::before { top: -7px; }
.hamburger::after { top: 7px; }
.menu-toggle[aria-expanded="true"] .hamburger { background: transparent; }
.menu-toggle[aria-expanded="true"] .hamburger::before { top: 0; transform: rotate(45deg); }
.menu-toggle[aria-expanded="true"] .hamburger::after { top: 0; transform: rotate(-45deg); }

/* Mobile menu */
.mobile-menu { display: none; position: fixed; top: 64px; left: 0; right: 0; bottom: 0; background: var(--surface); z-index: 999; overflow-y: auto; padding: 24px; }
.mobile-menu.is-open { display: block; }
.mobile-nav { list-style: none; margin: 0; padding: 0; }
.mobile-nav a { display: block; padding: 14px 0; font-size: 18px; font-weight: 500; color: var(--text); border-bottom: 1px solid var(--border); }
.mobile-nav a:hover { color: var(--gold); }

/* ── Footer ─────────────────────────────────────── */
.site-footer { background: var(--surface); border-top: 1px solid var(--border); }
.footer-main { padding: 48px 0 32px; }
.footer-grid { display: grid; grid-template-columns: 2fr 1fr 1fr 1fr; gap: 32px; }
.footer-brand a { font-size: 20px; font-weight: 700; color: var(--text); }
.footer-tagline { font-size: 14px; color: var(--muted); margin: 4px 0 16px; }
.footer-heading { font-size: 12px; font-weight: 700; text-transform: uppercase; letter-spacing: 1px; color: var(--text); margin: 0 0 16px; }
.footer-links { list-style: none; margin: 0; padding: 0; }
.footer-links a { font-size: 14px; color: var(--muted); display: block; padding: 4px 0; }
.footer-links a:hover { color: var(--gold); }
.footer-bottom { padding: 16px 0; border-top: 1px solid var(--border); }
.footer-bottom .wrap { display: flex; justify-content: space-between; flex-wrap: wrap; gap: 8px; }
.footer-copy { font-size: 13px; color: var(--subtle); }
.footer-copy a { color: var(--muted); }

/* ── Gutenberg Blocks ───────────────────────────── */
.entry-content h1, .entry-content h2, .entry-content h3,
.entry-content h4, .entry-content h5, .entry-content h6 { color: var(--text); }
.entry-content p, .entry-content li { color: var(--muted); }
.entry-content ul, .entry-content ol { color: var(--muted); padding-left: 20px; }
.entry-content li { margin-bottom: 6px; }
.entry-content li::marker { color: var(--gold); }
.entry-content a { color: var(--gold); }
.entry-content a:hover { color: var(--gold-hover); }
.entry-content strong { color: var(--text); }
.entry-content code { background: var(--surface2); color: var(--gold); padding: 2px 6px; border-radius: 4px; font-size: 14px; }
.entry-content pre { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 16px; overflow-x: auto; }
.entry-content pre code { background: none; padding: 0; }
.entry-content figure { margin: 0 0 24px; }
.entry-content figcaption { color: var(--subtle); font-size: 13px; text-align: center; margin-top: 8px; }

/* Buttons */
.wp-block-button__link {
    background: var(--gold) !important; color: var(--bg) !important;
    border-radius: var(--radius-sm); font-weight: 600; font-family: var(--font);
    padding: 12px 28px; font-size: 14px; transition: all var(--transition); border: none; cursor: pointer;
}
.wp-block-button__link:hover { background: var(--gold-hover) !important; transform: translateY(-1px); box-shadow: 0 4px 12px rgba(200,169,126,.3); }
.is-style-outline .wp-block-button__link { background: transparent !important; color: var(--gold) !important; border: 2px solid var(--gold) !important; }
.is-style-outline .wp-block-button__link:hover { background: var(--gold-light) !important; transform: translateY(-1px); }

/* Columns — cards */
.wp-block-columns { gap: 24px; padding: 0 !important; }
.wp-block-column {
    background: var(--surface); border: 1px solid var(--border);
    border-radius: var(--radius); padding: 28px; transition: all .3s ease;
}
.wp-block-column:hover { transform: translateY(-3px); box-shadow: 0 8px 24px rgba(0,0,0,.3); border-color: rgba(200,169,126,.3); }

/* Group */
.wp-block-group { color: var(--text); }
.wp-block-group.has-background { border-radius: var(--radius); }
.wp-block-group p { color: var(--muted); }
.wp-block-group h1, .wp-block-group h2, .wp-block-group h3, .wp-block-group h4 { color: var(--text); }

/* Cover */
.wp-block-cover { border-radius: var(--radius); overflow: hidden; }
.wp-block-cover__inner-container { color: var(--text); }
.wp-block-cover__inner-container p { color: inherit; }

/* Separator */
.wp-block-separator { border-color: var(--border) !important; opacity: 1; }
.wp-block-separator.is-style-dots { color: var(--gold); }

/* Table */
.wp-block-table { overflow-x: auto; }
.wp-block-table table { border-collapse: collapse; width: 100%; }
.wp-block-table td, .wp-block-table th { padding: 12px 16px; border: 1px solid var(--border); color: var(--text); }
.wp-block-table th { background: var(--surface2); font-weight: 600; text-align: left; }
.wp-block-table.is-style-stripes tbody tr:nth-child(odd) { background: var(--surface); }
.wp-block-table.is-style-stripes tbody tr:nth-child(even) { background: var(--surface2); }
.wp-block-table.is-style-stripes td, .wp-block-table.is-style-stripes th { border-color: var(--border); }

/* Quote */
.wp-block-quote { border-left: 4px solid var(--gold); padding: 16px 20px; margin: 0 0 24px; background: var(--surface); border-radius: 0 var(--radius-sm) var(--radius-sm) 0; }
.wp-block-quote p { color: var(--text); font-size: 18px; }
.wp-block-quote cite { color: var(--muted); font-size: 14px; }

/* Image */
.wp-block-image img { border-radius: var(--radius); }
.wp-block-gallery { gap: 16px !important; }
.wp-block-gallery .wp-block-image img { border-radius: var(--radius-sm); }

/* List */
.wp-block-list { padding-left: 20px; }
.wp-block-list li { color: var(--muted); margin-bottom: 6px; line-height: 1.6; }
.wp-block-list li::marker { color: var(--gold); }
.wp-block-list li strong { color: var(--text); }

/* Details */
.wp-block-details { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-sm); margin-bottom: 12px; }
.wp-block-details summary { padding: 14px 18px; color: var(--text); font-weight: 600; cursor: pointer; }
.wp-block-details summary:hover { color: var(--gold); }

/* Pullquote */
.wp-block-pullquote { border-top: 4px solid var(--gold); border-bottom: 4px solid var(--gold); padding: 24px 0; }
.wp-block-pullquote blockquote p { color: var(--text); font-size: 24px; }

/* Media & Text */
.wp-block-media-text { background: var(--surface); border-radius: var(--radius); overflow: hidden; }
.wp-block-media-text .wp-block-media-text__content { padding: 24px; }

/* Search */
.wp-block-search__input { background: var(--surface); border: 1px solid var(--border); color: var(--text); border-radius: var(--radius-sm); padding: 10px 14px; }
.wp-block-search__input:focus { border-color: var(--gold); outline: none; box-shadow: 0 0 0 2px var(--gold-light); }
.wp-block-search__button { background: var(--gold); color: var(--bg); border: none; border-radius: var(--radius-sm); padding: 10px 20px; font-weight: 600; cursor: pointer; }

/* Color palette */
.has-theme-dark-background-color { background-color: var(--bg) !important; }
.has-theme-dark-color { color: var(--bg) !important; }
.has-theme-surface-background-color { background-color: var(--surface) !important; }
.has-theme-surface-color { color: var(--surface) !important; }
.has-theme-gold-background-color { background-color: var(--gold) !important; }
.has-theme-gold-color { color: var(--gold) !important; }
.has-theme-light-color { color: var(--text) !important; }
.has-theme-light-background-color { background-color: var(--text) !important; }
.has-theme-muted-color { color: var(--muted) !important; }
.has-theme-white-color { color: #fff !important; }
.has-theme-white-background-color { background-color: #fff !important; }
.has-theme-green-color { color: var(--green) !important; }
.has-theme-green-background-color { background-color: var(--green) !important; }

/* Pagination */
.nav-links { display: flex; justify-content: center; gap: 8px; margin-top: 40px; }
.nav-links a, .nav-links span { display: inline-flex; align-items: center; justify-content: center; min-width: 40px; height: 40px; padding: 0 12px; font-size: 14px; color: var(--muted); background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-sm); transition: all var(--transition); }
.nav-links a:hover { background: var(--gold-light); border-color: var(--gold); color: var(--gold); }
.nav-links .current { background: var(--gold); border-color: var(--gold); color: var(--bg); font-weight: 600; }

/* ── Greenshift Blocks ──────────────────────────── */
.gspb_container { font-family: var(--font); color: var(--text); }
.gspb_container h1,.gspb_container h2,.gspb_container h3,.gspb_container h4 { color: var(--text); }
.gspb_container p,.gspb_container li { color: var(--muted); }
.gspb_container a { color: var(--gold); }
.gspb_button_wrapper .gspb_button { font-family: var(--font); font-weight: 600; border-radius: var(--radius-sm); transition: all var(--transition); }
.gspb_tabs_wrapper .gspb_tab_button { color: var(--muted); background: var(--surface); border-color: var(--border); font-family: var(--font); transition: all var(--transition); }
.gspb_tabs_wrapper .gspb_tab_button.active,.gspb_tabs_wrapper .gspb_tab_button:hover { color: var(--gold); border-color: var(--gold); background: var(--surface2); }
.gspb_accordion_wrapper .gspb_accordion_head { color: var(--text); background: var(--surface); border-color: var(--border); font-family: var(--font); }
.gspb_accordion_wrapper .gspb_accordion_head:hover { background: var(--surface2); color: var(--gold); }
.gspb_accordion_wrapper .gspb_accordion_body { color: var(--muted); border-color: var(--border); }
.gspb_progress_wrapper .gspb_progress_bar { background: var(--surface2); border-radius: var(--radius-sm); }
.gspb_progress_wrapper .gspb_progress_fill { background: var(--gold); border-radius: var(--radius-sm); }
.gspb_counter_wrapper { color: var(--gold); font-family: var(--font); }
.gspb_counter_wrapper .gspb_counter_label { color: var(--muted); }
.gspb_iconbox_wrapper { color: var(--text); }
.gspb_iconbox_wrapper svg { fill: var(--gold); }
.gspb_iconbox_wrapper .gspb_iconbox_title { color: var(--text); }
.gspb_iconbox_wrapper .gspb_iconbox_text { color: var(--muted); }
.gspb_slider_wrapper .swiper-pagination-bullet { background: var(--muted); }
.gspb_slider_wrapper .swiper-pagination-bullet-active { background: var(--gold); }
.gspb_slider_wrapper .swiper-button-next,.gspb_slider_wrapper .swiper-button-prev { color: var(--gold); }
.gspb_infobox_wrapper { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); transition: all .3s ease; }
.gspb_infobox_wrapper:hover { transform: translateY(-4px); box-shadow: 0 12px 32px rgba(0,0,0,.4); border-color: rgba(200,169,126,.3); }
.gspb_heading { color: var(--text); font-family: var(--font); }
.gspb_row { font-family: var(--font); }

/* ── Responsive ─────────────────────────────────── */
@media (max-width: 768px) {
    h1 { font-size: 28px; } h2 { font-size: 22px; } h3 { font-size: 18px; }
    .main { padding: 24px 0; }
    .wrap { padding: 0 16px; }
    .entry-content > * { padding-left: 16px; padding-right: 16px; }
    .top-bar-left { display: none; }
    .top-bar-inner { justify-content: flex-end; }
    .site-nav { display: none; }
    .menu-toggle { display: flex; align-items: center; justify-content: center; }
    .wp-block-columns { flex-direction: column !important; }
    .wp-block-column { flex-basis: 100% !important; }
    .footer-grid { grid-template-columns: 1fr 1fr; }
    .footer-grid > :first-child { grid-column: 1 / -1; }
    .footer-bottom .wrap { flex-direction: column; text-align: center; }
    .wp-block-table { font-size: 14px; }
    .wp-block-table td,.wp-block-table th { padding: 8px 10px; }
    .wp-block-media-text { grid-template-columns: 1fr !important; }
    .wp-block-buttons { flex-wrap: wrap; }
    .wp-block-button__link { padding: 10px 20px; font-size: 13px; }
}
@media (max-width: 480px) {
    .footer-grid { grid-template-columns: 1fr; }
    h1 { font-size: 24px; }
}

/* ── Light Mode ─────────────────────────────────── */
body.light {
    --bg: #f5f6f8; --surface: #fff; --surface2: #f0f1f3;
    --border: #d0d7de; --text: #1f2328; --muted: #656d76; --subtle: #8b949e;
    --gold-light: rgba(200,169,126,.1);
}
body.light .site-header { background: rgba(255,255,255,.95); }
body.light .wp-block-column:hover { box-shadow: 0 8px 24px rgba(0,0,0,.08); }
body.light .gspb_infobox_wrapper:hover { box-shadow: 0 12px 32px rgba(0,0,0,.1); }
.mode-icon-light { display: none; }
body.light .mode-icon-light { display: inline; }
body.light .mode-icon-dark { display: none; }
