/*
Theme Name: RAWGRAVEL Hub
Theme URI: https://rawgravel.cc/
Author: RAWGRAVEL
Description: Schlankes Community-Theme für Events, Ausfahrten, GPX- und Dokumentdownloads sowie die RAWGRAVEL-Submarken.
Version: 1.1.4
Requires at least: 6.5
Requires PHP: 8.1
Text Domain: rawgravel
*/

:root {
  --rg-paper: #f4f4f0;
  --rg-soft: #ebebe6;
  --rg-white: #fff;
  --rg-ink: #111;
  --rg-muted: #59616a;
  --rg-blue: #586b7d;
  --rg-orange: #d36a35;
  --rg-petrol: #2e6668;
  --rg-dark: #162326;
  --rg-radius: 20px;
  --rg-shadow: 0 18px 50px rgba(17, 17, 17, .08);
  --rg-shell: 1200px;
  --rg-sans: -apple-system, BlinkMacSystemFont, "SF Pro Display", "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  --rg-serif: Georgia, "Times New Roman", serif;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; background: var(--rg-paper); color: var(--rg-ink); font-family: var(--rg-sans); line-height: 1.6; -webkit-font-smoothing: antialiased; }
body.admin-bar .site-header { top: 32px; }
img { max-width: 100%; height: auto; }
a { color: inherit; text-decoration: none; }
p { margin: 0 0 1.15rem; }
h1, h2, h3 { margin: 0 0 1rem; line-height: 1.07; letter-spacing: -.035em; }
h1 { font-size: clamp(2.65rem, 7vw, 5.5rem); font-weight: 450; }
h2 { font-size: clamp(2rem, 4.5vw, 4rem); font-weight: 450; }
h3 { font-size: 1.35rem; }
.rg-shell { width: min(var(--rg-shell), calc(100% - 48px)); margin-inline: auto; }
.rg-section { padding: clamp(4.5rem, 10vw, 8rem) 0; }
.rg-section--white { background: var(--rg-white); }
.rg-section--soft { background: var(--rg-soft); }
.rg-eyebrow { color: var(--rg-orange); font-size: .72rem; font-weight: 800; letter-spacing: .14em; text-transform: uppercase; }
.rg-lead { max-width: 740px; color: var(--rg-muted); font-size: clamp(1.1rem, 2vw, 1.35rem); }
.rg-accent { color: var(--rg-blue); font-family: var(--rg-serif); font-style: italic; font-weight: 400; }
.rg-button, .wp-element-button, button[type="submit"] { display: inline-flex; min-height: 48px; align-items: center; justify-content: center; gap: .6rem; padding: .8rem 1.25rem; border: 1px solid var(--rg-blue); border-radius: 999px; background: var(--rg-blue); color: #fff; font: inherit; font-weight: 720; cursor: pointer; transition: transform .2s ease, box-shadow .2s ease, background .2s ease; }
.rg-button:hover, .wp-element-button:hover, button[type="submit"]:hover { transform: translateY(-2px); background: #435261; box-shadow: 0 10px 24px rgba(88, 107, 125, .26); }
.rg-button--orange { border-color: var(--rg-orange); background: var(--rg-orange); }
.rg-button--outline { background: transparent; color: var(--rg-blue); }
.rg-button--small { min-height: 38px; padding: .55rem .9rem; font-size: .86rem; }
.rg-actions { display: flex; flex-wrap: wrap; gap: .8rem; margin-top: 1.8rem; }
.screen-reader-text, .skip-link:not(:focus) { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0; }
.skip-link:focus { position: fixed; z-index: 9999; top: 1rem; left: 1rem; padding: .75rem 1rem; background: #fff; }

.site-header { position: sticky; z-index: 100; top: 0; border-bottom: 1px solid rgba(17, 17, 17, .07); background: rgba(244, 244, 240, .93); backdrop-filter: blur(16px); }
.site-header__inner { display: flex; min-height: 76px; align-items: center; justify-content: space-between; gap: 2rem; }
.rg-wordmark { display: inline-flex; align-items: baseline; gap: .22rem; font-size: 1.1rem; letter-spacing: -.04em; line-height: 1; white-space: nowrap; }
.rg-wordmark strong { font-weight: 800; }
.rg-wordmark b { color: var(--rg-orange); font-size: .82em; letter-spacing: .08em; }
.rg-wordmark em { color: var(--rg-blue); font-family: var(--rg-serif); font-weight: 400; }
.site-nav ul { display: flex; align-items: center; gap: 1.35rem; margin: 0; padding: 0; list-style: none; }
.site-nav a { font-size: .9rem; font-weight: 650; }
.site-nav a:hover, .site-nav .current-menu-item > a { color: var(--rg-orange); }
.menu-toggle { display: none; width: 44px; height: 44px; border: 0; background: transparent; cursor: pointer; }
.menu-toggle span { display: block; width: 24px; height: 2px; margin: 5px auto; background: var(--rg-ink); transition: .2s; }

.rg-hero { padding: clamp(5rem, 12vw, 10rem) 0; }
.rg-hero__grid { display: grid; grid-template-columns: minmax(0, 1.2fr) minmax(280px, .8fr); align-items: center; gap: clamp(3rem, 8vw, 8rem); }
.rg-hero__copy { max-width: 780px; }
.rg-hero__content > :last-child { margin-bottom: 0; }
.rg-hero__content > p:not(.rg-eyebrow), .rg-hero__content > .wp-block-paragraph:not(.rg-eyebrow) { max-width: 740px; color: var(--rg-muted); font-size: clamp(1.1rem, 2vw, 1.35rem); }
.rg-hero__panel { min-height: 440px; padding: clamp(2rem, 5vw, 4rem); border-left: 4px solid var(--rg-orange); background: var(--rg-blue); color: #fff; display: flex; flex-direction: column; justify-content: flex-end; box-shadow: var(--rg-shadow); }
.rg-hero__panel p { color: rgba(255, 255, 255, .78); }
.rg-hero__panel .rg-kicker { color: #e4aa68; }
.rg-kicker { font-size: .72rem; font-weight: 800; letter-spacing: .13em; text-transform: uppercase; }
.rg-brand-list { display: flex; flex-wrap: wrap; gap: .5rem; margin-top: 1.7rem; }
.rg-brand-chip, .rg-badge { display: inline-flex; align-items: center; min-height: 30px; padding: .35rem .7rem; border-radius: 999px; background: var(--rg-soft); color: var(--rg-blue); font-size: .68rem; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; }
.rg-brand-chip.is-active { background: var(--rg-orange); color: #fff; }

.rg-section-head { max-width: 780px; margin-bottom: 2.8rem; }
.page .rg-section-head h1, .blog .rg-section-head h1, .archive .rg-section-head h1, .woocommerce-page .rg-section-head h1 { font-size: clamp(2.2rem, 5vw, 4.1rem); }
.page .rg-content h2, .woocommerce-page .rg-content h2 { font-size: clamp(1.55rem, 3vw, 2.35rem); }
.page .rg-content h3, .woocommerce-page .rg-content h3 { font-size: clamp(1.2rem, 2vw, 1.55rem); }
.rg-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1rem; }
.rg-card { display: flex; min-height: 290px; flex-direction: column; align-items: flex-start; padding: 1.8rem; border: 1px solid rgba(88, 107, 125, .16); background: #fff; box-shadow: 0 10px 28px rgba(17, 17, 17, .035); transition: transform .2s ease, box-shadow .2s ease; }
.rg-card:hover { transform: translateY(-4px); box-shadow: var(--rg-shadow); }
.rg-card__meta { margin-bottom: 1.2rem; color: var(--rg-orange); font-size: .72rem; font-weight: 800; letter-spacing: .1em; text-transform: uppercase; }
.rg-card p { color: var(--rg-muted); }
.rg-card .rg-actions { margin-top: auto; }
.rg-empty { padding: 2rem; border-left: 3px solid var(--rg-orange); background: #fff; }
.rg-detail-grid { display: grid; grid-template-columns: minmax(0, 1fr) 340px; gap: clamp(2rem, 7vw, 6rem); align-items: start; }
.rg-content { font-size: 1.06rem; }
.rg-content > * { max-width: 780px; }
.rg-content h2, .rg-content h3 { margin-top: 2.4rem; }
.rg-sidebar { position: sticky; top: 110px; padding: 1.6rem; border-top: 3px solid var(--rg-orange); background: #fff; box-shadow: var(--rg-shadow); }
.rg-facts { margin: 0; }
.rg-facts div { padding: .8rem 0; border-bottom: 1px solid var(--rg-soft); }
.rg-facts dt { color: var(--rg-muted); font-size: .72rem; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; }
.rg-facts dd { margin: .2rem 0 0; font-weight: 650; }

.rg-form { display: grid; gap: 1rem; }
.rg-form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; }
.rg-field label { display: block; margin-bottom: .35rem; color: var(--rg-blue); font-size: .78rem; font-weight: 800; letter-spacing: .05em; text-transform: uppercase; }
.rg-field input, .rg-field textarea, .rg-field select { width: 100%; padding: .85rem 1rem; border: 1px solid #aeb7bd; border-radius: 10px; background: #fff; color: var(--rg-ink); font: inherit; box-shadow: inset 0 1px 2px rgba(17, 17, 17, .04); }
.rg-field input:hover, .rg-field textarea:hover, .rg-field select:hover { border-color: var(--rg-blue); }
.rg-field input:focus, .rg-field textarea:focus, .rg-field select:focus { outline: 2px solid var(--rg-blue); outline-offset: 1px; background: #fff; }
.rg-check { display: flex; gap: .7rem; align-items: flex-start; font-size: .88rem; }
.rg-check input { margin-top: .35rem; }
.rg-message { padding: 1rem; border-left: 3px solid var(--rg-petrol); background: #dfe7e4; }
.rg-message--error { border-color: #9a3f32; background: #f0ded8; }
.rg-hp { position: absolute !important; left: -9999px !important; }

.rg-calendar { display: grid; gap: .75rem; }
.rg-calendar-row { display: grid; grid-template-columns: 105px 1fr auto; align-items: center; gap: 1.2rem; padding: 1.1rem 1.25rem; background: #fff; border-left: 3px solid var(--rg-blue); }
.rg-calendar-date { font-weight: 800; color: var(--rg-orange); }
.rg-calendar-row h3 { margin: 0; font-size: 1.08rem; }
.rg-download-list { display: grid; gap: .75rem; }
.rg-download { display: grid; grid-template-columns: 1fr auto; gap: 1rem; align-items: center; padding: 1.15rem 1.3rem; background: #fff; border: 1px solid rgba(88, 107, 125, .16); }
.rg-download p { margin: .25rem 0 0; color: var(--rg-muted); font-size: .9rem; }

.site-footer { padding: 4rem 0 2rem; background: var(--rg-dark); color: #fff; }
.site-footer__grid { display: grid; grid-template-columns: 2fr 1fr 1fr; gap: 2rem; }
.site-footer h2 { color: #e4aa68; font-size: .72rem; letter-spacing: .12em; text-transform: uppercase; }
.site-footer a { display: block; margin: .35rem 0; color: rgba(255, 255, 255, .75); }
.site-footer a:hover { color: var(--rg-orange); }
.site-footer .rg-wordmark { margin-bottom: 1rem; }
.site-footer .rg-wordmark strong { color: #fff; }
.site-footer__bottom { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 1rem 2rem; margin-top: 3rem; padding-top: 1rem; border-top: 1px solid rgba(255, 255, 255, .15); color: rgba(255, 255, 255, .55); font-size: .78rem; }
.site-footer__legal { display: flex; flex-wrap: wrap; gap: .35rem 1rem; }
.site-footer__legal a { margin: 0; }

/* WooCommerce follows the RAWGRAVEL card and button system. */
.woocommerce .products ul, .woocommerce ul.products { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1rem; margin: 0; }
.woocommerce ul.products::before, .woocommerce ul.products::after { display: none; }
.woocommerce ul.products li.product { width: auto; margin: 0; padding: 1.25rem; border: 1px solid rgba(88, 107, 125, .16); background: #fff; box-shadow: 0 10px 28px rgba(17, 17, 17, .035); }
.woocommerce ul.products li.product .price, .woocommerce div.product p.price, .woocommerce div.product span.price { color: var(--rg-orange); font-weight: 800; }
.woocommerce a.button, .woocommerce button.button, .woocommerce input.button, .woocommerce #respond input#submit { border-radius: 999px; background: var(--rg-blue); color: #fff; font-weight: 750; }
.woocommerce a.button:hover, .woocommerce button.button:hover, .woocommerce input.button:hover, .woocommerce #respond input#submit:hover { background: #435261; color: #fff; }
.woocommerce div.product { padding: 1.5rem; background: #fff; }
.woocommerce-message, .woocommerce-info { border-top-color: var(--rg-petrol); background: #fff; }
.woocommerce-error { border-top-color: #9a3f32; background: #fff; }

@media (max-width: 900px) {
  body.admin-bar .site-header { top: 46px; }
  .menu-toggle { display: block; }
  .site-nav { position: absolute; inset: 76px 0 auto; display: none; padding: 1rem 24px 1.5rem; background: var(--rg-paper); border-bottom: 1px solid rgba(17, 17, 17, .08); }
  .site-nav.is-open { display: block; }
  .site-nav ul { flex-direction: column; align-items: stretch; }
  .rg-hero__grid, .rg-detail-grid { grid-template-columns: 1fr; }
  .rg-hero__panel { min-height: 330px; }
  .rg-sidebar { position: static; }
  .rg-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .woocommerce .products ul, .woocommerce ul.products { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 620px) {
  .rg-shell { width: min(var(--rg-shell), calc(100% - 32px)); }
  .rg-grid, .rg-form-row, .site-footer__grid { grid-template-columns: 1fr; }
  .rg-calendar-row { grid-template-columns: 80px 1fr; }
  .rg-calendar-row .rg-button { grid-column: 1 / -1; }
  .rg-download { grid-template-columns: 1fr; }
  .woocommerce .products ul, .woocommerce ul.products { grid-template-columns: 1fr; }
}
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { scroll-behavior: auto !important; transition: none !important; } }
