/* RUB-nah, aber ohne Original-Assets (Copyright-safe).
   Farben: RUB-Blau angelehnt, Layout minimalistisch, MVP für Akquise-Demo. */

:root {
  --rub-blue:    #17365d;
  --rub-blue-dk: #0e2444;
  --rub-blue-lt: #2a5090;
  --rub-accent:  #8dae10;
  --rub-gray:    #6c757d;
  --rub-bg:      #f5f6f8;
  --rub-card:    #ffffff;
  --rub-text:    #1c1f24;
  --rub-border:  #d8dbe0;
}

* { box-sizing: border-box; margin: 0; padding: 0; }

html, body {
  height: 100%;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  color: var(--rub-text);
  background: var(--rub-bg);
  line-height: 1.5;
}

/* ---- Header ---- */
.rub-header {
  background: var(--rub-blue);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1rem 2rem;
  box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.rub-brand {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.rub-mark {
  background: var(--rub-accent);
  color: var(--rub-blue-dk);
  font-weight: 800;
  font-size: 1.4rem;
  padding: 0.3rem 0.6rem;
  border-radius: 2px;
  letter-spacing: 0.05em;
}

.rub-name {
  font-size: 1.1rem;
  font-weight: 500;
}

.rub-nav {
  display: flex;
  gap: 1.5rem;
}

.rub-nav a {
  color: #fff;
  text-decoration: none;
  font-size: 0.95rem;
  padding: 0.4rem 0;
  border-bottom: 2px solid transparent;
  transition: border-color 0.15s;
}

.rub-nav a:hover {
  border-bottom-color: var(--rub-accent);
}

/* ---- Hero ---- */
.rub-hero {
  background: linear-gradient(135deg, var(--rub-blue) 0%, var(--rub-blue-lt) 100%);
  color: #fff;
  padding: 4rem 2rem;
}

.rub-hero-inner {
  max-width: 900px;
  margin: 0 auto;
}

.rub-eyebrow {
  text-transform: uppercase;
  letter-spacing: 0.15em;
  font-size: 0.8rem;
  opacity: 0.85;
  margin-bottom: 0.5rem;
}

.rub-hero h1 {
  font-size: 2.6rem;
  font-weight: 700;
  margin-bottom: 1rem;
  line-height: 1.15;
}

.rub-lead {
  font-size: 1.15rem;
  max-width: 640px;
  opacity: 0.95;
  margin-bottom: 2rem;
}

.rub-cta-row {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
}

.rub-btn {
  display: inline-block;
  padding: 0.8rem 1.6rem;
  border-radius: 4px;
  font-weight: 600;
  text-decoration: none;
  transition: transform 0.1s, box-shadow 0.15s;
}

.rub-btn-primary {
  background: var(--rub-accent);
  color: var(--rub-blue-dk);
}

.rub-btn-primary:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(141, 174, 16, 0.4);
}

.rub-btn-ghost {
  background: transparent;
  color: #fff;
  border: 2px solid rgba(255,255,255,0.4);
}

.rub-btn-ghost:hover {
  border-color: #fff;
  background: rgba(255,255,255,0.1);
}

/* ---- Grid ---- */
.rub-grid {
  max-width: 1200px;
  margin: 0 auto;
  padding: 3rem 2rem;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 1.5rem;
}

.rub-card {
  background: var(--rub-card);
  border: 1px solid var(--rub-border);
  border-radius: 6px;
  padding: 1.75rem;
  text-decoration: none;
  color: var(--rub-text);
  transition: transform 0.15s, box-shadow 0.2s, border-color 0.15s;
}

.rub-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 8px 24px rgba(23, 54, 93, 0.12);
  border-color: var(--rub-blue-lt);
}

.rub-card h3 {
  color: var(--rub-blue);
  font-size: 1.25rem;
  margin-bottom: 0.5rem;
}

.rub-card p {
  color: var(--rub-gray);
  font-size: 0.95rem;
}

/* ---- Detail-Pages ---- */
.rub-page {
  max-width: 900px;
  margin: 0 auto;
  padding: 3rem 2rem;
}

.rub-page h1 {
  color: var(--rub-blue);
  font-size: 2.2rem;
  margin-bottom: 1rem;
}

.rub-page .rub-eyebrow {
  color: var(--rub-blue-lt);
  margin-bottom: 0.4rem;
}

.rub-page p {
  font-size: 1.05rem;
  margin-bottom: 1.2rem;
}

.rub-page-img {
  width: 100%;
  height: 260px;
  background: linear-gradient(135deg, var(--rub-blue-lt) 0%, var(--rub-accent) 100%);
  border-radius: 6px;
  margin: 2rem 0;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-size: 1.2rem;
  opacity: 0.9;
}

.rub-page-facts {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 1rem;
  margin: 2rem 0;
}

.rub-fact {
  background: var(--rub-card);
  border: 1px solid var(--rub-border);
  border-radius: 4px;
  padding: 1rem;
}

.rub-fact-label {
  font-size: 0.8rem;
  color: var(--rub-gray);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin-bottom: 0.25rem;
}

.rub-fact-value {
  font-size: 1.15rem;
  font-weight: 600;
  color: var(--rub-blue);
}

/* ---- Footer ---- */
.rub-footer {
  text-align: center;
  padding: 2rem;
  color: var(--rub-gray);
  font-size: 0.9rem;
  border-top: 1px solid var(--rub-border);
  margin-top: 2rem;
}

/* ---- Avatar-Widget (Slide-in-Pattern, Intercom-style) ---- */
#frama-widget {
  position: fixed;
  bottom: 1.5rem;
  right: 1.5rem;
  z-index: 1000;
}

/* Bubble (default state) — nur sichtbar wenn Widget collapsed */
#frama-widget-bubble {
  width: 64px;
  height: 64px;
  border-radius: 50%;
  border: none;
  background: linear-gradient(135deg, var(--rub-blue) 0%, var(--rub-blue-lt) 100%);
  color: #fff;
  cursor: pointer;
  box-shadow: 0 8px 20px rgba(23, 54, 93, 0.35);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.7rem;
  transition: transform 0.15s, box-shadow 0.2s;
  padding: 0;
}

#frama-widget-bubble:hover {
  transform: translateY(-2px) scale(1.05);
  box-shadow: 0 12px 28px rgba(23, 54, 93, 0.45);
}

/* Pulse-Animation um Aufmerksamkeit zu ziehen */
#frama-widget-bubble::before {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: 50%;
  border: 2px solid var(--rub-accent);
  animation: frama-pulse 2.2s ease-out infinite;
  opacity: 0;
}

@keyframes frama-pulse {
  0%   { transform: scale(1);   opacity: 0.7; }
  70%  { transform: scale(1.4); opacity: 0;   }
  100% { transform: scale(1.4); opacity: 0;   }
}

/* Panel (expanded state) — enthaelt iframe + Header */
#frama-widget-panel {
  width: 340px;
  height: 480px;
  background: #fff;
  border-radius: 12px;
  box-shadow: 0 16px 44px rgba(0, 0, 0, 0.28);
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.frama-widget-header {
  background: var(--rub-blue);
  color: #fff;
  padding: 0.6rem 0.9rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 0.9rem;
  font-weight: 500;
}

.frama-widget-header-title {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.frama-widget-header-title::before {
  content: "";
  width: 8px;
  height: 8px;
  background: var(--rub-accent);
  border-radius: 50%;
  box-shadow: 0 0 6px var(--rub-accent);
}

#frama-widget-minimize {
  background: transparent;
  color: #fff;
  border: none;
  cursor: pointer;
  font-size: 1.3rem;
  line-height: 1;
  padding: 0.15rem 0.5rem;
  border-radius: 3px;
  transition: background 0.12s;
}

#frama-widget-minimize:hover {
  background: rgba(255,255,255,0.15);
}

#frama-avatar-widget {
  flex: 1;
  border: none;
  background: var(--rub-blue-dk);
}

/* State-Switch — via body-class oder container-class */
#frama-widget.frama-collapsed #frama-widget-panel { display: none; }
#frama-widget.frama-expanded  #frama-widget-bubble { display: none; }

@media (max-width: 720px) {
  #frama-widget-panel {
    width: calc(100vw - 2rem);
    height: 65vh;
  }
  #frama-widget {
    bottom: 1rem;
    right: 1rem;
  }
  .rub-hero h1 { font-size: 1.9rem; }
  .rub-nav { display: none; }
}
