/*
 Theme Name: RV Verein
 Theme URI:
 Author: Raik Wahl
 Description: Custom Theme für den Regionalverband-Auftritt
 Version: 1.0
*/

/* =================================================
   Root Vars
   ================================================= */
:root{
  --primary:#43B047;
  --primary-hover:#36963A;

  --bg:#ffffff;
  --surface:#f7f9f8;

  --text:#1f2a24;
  --muted:#6b7d73;
  --border:#dde5e0;

  --radius:14px;
  --radius-sm:12px;
  --container:1160px;

  --shadow-soft:0 8px 18px rgba(0,0,0,.05);
}

/* =================================================
   Base
   ================================================= */
*{box-sizing:border-box}
html{scroll-behavior:smooth}

body{
  margin:0;
  font-family:system-ui,-apple-system,BlinkMacSystemFont,"Segoe UI",sans-serif;
  line-height:1.55;
  background:var(--bg);
  color:var(--text);
}

a{color:inherit;text-decoration:none}
a:hover{text-decoration:none}

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

code{
  background:rgba(0,0,0,.04);
  padding:2px 6px;
  border-radius:6px;
}

.content,
.rv-container{
  width:min(var(--container), calc(100% - 32px));
  margin:0 auto;
}

.rv-muted{color:var(--muted)}

main{
  padding:52px 0;
}

/* =================================================
   Header (sticky, schlicht)
   ================================================= */
header.rv-header{
  position:sticky;
  top:0;
  z-index:9999;
  background:rgba(255,255,255,.92);
  backdrop-filter:blur(10px);
  border-bottom:1px solid var(--border);
}

body.admin-bar header.rv-header{ top:32px; }
@media (max-width:782px){
  body.admin-bar header.rv-header{ top:46px; }
}

/* Fallback für andere Header */
header:not(.rv-header){
  background:#fff;
  border-bottom:1px solid var(--border);
  padding:14px 0;
}

/* Anchor-Links nicht unter Header verschwinden */
html{ scroll-padding-top:92px; }
@media (max-width:782px){
  html{ scroll-padding-top:110px; }
}

/* =================================================
   Navigation
   ================================================= */
nav ul{
  list-style:none;
  margin:0;
  padding:0;
  display:flex;
  gap:18px;
  align-items:center;
}

nav li{margin:0}

nav a{
  position:relative;
  padding:10px 8px;
  font-weight:700;
  color:var(--muted);
}

nav a::after{
  content:"";
  position:absolute;
  left:8px;
  right:8px;
  bottom:6px;
  height:2px;
  background:var(--primary);
  transform:scaleX(0);
  transform-origin:left;
  transition:transform .18s ease;
}

nav a:hover{color:var(--text)}
nav a:hover::after{transform:scaleX(1)}

nav a.is-active{
  color:var(--text);
}
nav a.is-active::after{
  transform:scaleX(1);
}

/* =================================================
   Hero
   ================================================= */
.hero{
  background:#fff;
  border:1px solid var(--border);
  border-radius:var(--radius);
  padding:22px;
  margin-bottom:22px;
}

.hero h1{margin:0 0 10px}

/* =================================================
   Buttons
   ================================================= */
.button,
.rv-btn{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  gap:10px;
  padding:11px 14px;
  border-radius:var(--radius-sm);
  font-weight:800;
  border:1px solid transparent;
  transition:.15s ease;
}

.button,
.rv-btn--primary{
  background:var(--primary);
  color:#fff;
}

.button:hover,
.rv-btn--primary:hover{
  background:var(--primary-hover);
  transform:translateY(-1px);
}

.rv-btn--ghost{
  background:#fff;
  border-color:var(--border);
  color:var(--text);
}

.rv-btn--ghost:hover{
  transform:translateY(-1px);
  border-color:rgba(67,176,71,.35);
}

.rv-btn--soft{
  background:rgba(67,176,71,.10);
  color:var(--text);
  border-color:rgba(67,176,71,.18);
}

.rv-btn--soft:hover{
  transform:translateY(-1px);
  border-color:rgba(67,176,71,.28);
}

.rv-btn--block{width:100%}

/* =================================================
   Cards / Panels
   ================================================= */
.rv-card{
  background:#fff;
  border:1px solid var(--border);
  border-radius:var(--radius);
  padding:18px;
}

.rv-tile{
  background:#fff;
  border:1px solid var(--border);
  border-radius:var(--radius);
  padding:18px;
  transition:transform .16s ease, border-color .16s ease, box-shadow .16s ease;
}

.rv-tile:hover{
  transform:translateY(-2px);
  border-color:rgba(67,176,71,.35);
  box-shadow:var(--shadow-soft);
}

/* =================================================
   FIX: Mitgliedsdokumente – Preview-Bilder im Portal sichtbar erzwingen
   (Falls Theme/Plugin/Lazyload CSS Bilder versteckt)
   ================================================= */
.rvmd-card img{
  display:block !important;
  visibility:visible !important;
  opacity:1 !important;
  width:100% !important;
  height:100% !important;
  max-width:100% !important;
  object-fit:cover !important;
}

.rvmd-card a{ overflow:hidden; }

/* Falls der Preview-Container von außen kollabiert */
.rvmd-card [style*="aspect-ratio"]{
  position:relative;
}
.rvmd-card [style*="aspect-ratio"] img{
  position:absolute;
  inset:0;
}

/* =================================================
   Footer
   ================================================= */
footer,
.rv-footer{
  border-top:1px solid var(--border);
  background:#fff;
  padding:22px 0;
}

.rv-footer-inner{
  display:flex;
  gap:14px;
  align-items:center;
  justify-content:space-between;
  flex-wrap:wrap;
}

.rv-footer-menu{
  list-style:none;
  margin:0;
  padding:0;
  display:flex;
  gap:14px;
}

.rv-footer-menu a{
  color:var(--muted);
  font-weight:700;
}

.rv-footer-menu a:hover{
  color:var(--text);
}

/* =================================================
   RV Auth Pages
   ================================================= */
.rv-auth-wrap{
  max-width:980px;
  margin:0 auto;
  padding:28px 16px 64px;
}

.rv-auth-card{
  max-width:520px;
  margin:0 auto;
  background:#fff;
  border:1px solid rgba(0,0,0,.10);
  border-radius:18px;
  box-shadow:0 10px 36px rgba(0,0,0,.06);
  padding:18px;
}

.rv-auth-card.is-wide{max-width:760px}

.rv-auth-head h1{
  margin:0 0 8px;
  font-size:clamp(22px,2.2vw,34px);
}

.rv-auth-head p{
  margin:0;
  opacity:.82;
  max-width:75ch;
}

.rv-auth-form{
  display:grid;
  gap:12px;
  margin-top:14px;
}

.rv-auth-field span{
  display:block;
  font-weight:800;
  margin:0 0 6px;
}

.rv-auth-field input,
.rv-auth-field select{
  width:100%;
  padding:10px 12px;
  border:1px solid rgba(0,0,0,.18);
  border-radius:12px;
  background:#fff;
}

.rv-auth-alert{
  border-radius:12px;
  padding:10px 12px;
  margin-top:12px;
  border:1px solid rgba(0,0,0,.12);
  background:#fafafa;
}

.rv-auth-alert.is-error{
  border-color:rgba(180,0,0,.35);
  background:#fff5f5;
}

.rv-auth-alert.is-ok{
  border-color:rgba(0,150,0,.25);
  background:#f3fff3;
}
