/* ==========================================================================
   Prämonstratenser-Portal – Modernes Designsystem (Frontend & Admin)
   ========================================================================== */

:root {
  --bg-page: #f8f9fa;
  --bg-surface: #ffffff;
  --bg-subtle: #f1f3f5;
  --primary: #1a365d;        /* Tiefes Klosterblau */
  --primary-light: #2b4c7e;
  --accent: #b78846;         /* Warmes Sakralgold */
  --accent-hover: #9c7135;
  --text-main: #1e293b;
  --text-muted: #64748b;
  --border: #e2e8f0;
  --danger: #dc2626;
  --success: #15803d;
  --radius: 10px;
  --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.06);
  --shadow-md: 0 8px 24px rgba(15, 23, 42, 0.08);
  --container: 1180px;
}

*, *::before, *::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  font-size: 16px;
}

body {
  margin: 0;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
  background-color: var(--bg-page);
  color: var(--text-main);
  line-height: 1.65;
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

main {
  flex: 1;
}

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

a {
  color: var(--primary);
  text-decoration: none;
  transition: color 0.2s ease;
}

a:hover {
  color: var(--accent);
}

.container {
  width: 100%;
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 1.25rem;
}

/* ==========================================================================
   Header & Navigation
   ========================================================================== */
.site-header {
  background: var(--bg-surface);
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 0;
  z-index: 900;
  box-shadow: var(--shadow-sm);
}

.nav-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 72px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  font-weight: 700;
  font-size: 1.2rem;
  color: var(--primary);
  letter-spacing: -0.01em;
}

.brand-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 38px;
  height: 38px;
  border-radius: 50%;
  background: var(--primary);
  color: #fff;
  font-family: Georgia, serif;
  font-size: 1.1rem;
  border: 2px solid var(--accent);
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 1.75rem;
  list-style: none;
  margin: 0;
  padding: 0;
}

.nav-links a {
  font-weight: 500;
  color: var(--text-main);
  font-size: 0.95rem;
}

.nav-links a:hover,
.nav-links a.active {
  color: var(--accent);
}

.lang-switch {
  display: inline-flex;
  border: 1px solid var(--border);
  border-radius: 6px;
  overflow: hidden;
  font-size: 0.85rem;
}

.lang-switch a {
  padding: 0.3rem 0.65rem;
  font-weight: 600;
  color: var(--text-muted);
}

.lang-switch a.active {
  background: var(--primary);
  color: #fff;
}

.nav-toggle {
  display: none;
  background: none;
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 0.45rem 0.75rem;
  font-size: 1.25rem;
  cursor: pointer;
  color: var(--primary);
}

/* ==========================================================================
   Hero & Landing Page One-Pager
   ========================================================================== */
.hero {
  background: linear-gradient(135deg, var(--primary) 0%, #0f2342 100%);
  color: #ffffff;
  padding: 5.5rem 0 4.5rem;
  text-align: center;
  position: relative;
}

.hero::after {
  content: "";
  display: block;
  width: 72px;
  height: 3px;
  background: var(--accent);
  margin: 2rem auto 0;
}

.hero h1 {
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(2.1rem, 4vw, 3.2rem);
  margin: 0 0 1rem;
  font-weight: 700;
  letter-spacing: -0.02em;
}

.hero p {
  max-width: 720px;
  margin: 0 auto 2rem;
  font-size: 1.15rem;
  color: #e2e8f0;
}

.hero-actions {
  display: flex;
  gap: 1rem;
  justify-content: center;
  flex-wrap: wrap;
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.45rem;
  padding: 0.7rem 1.4rem;
  border-radius: 7px;
  font-weight: 600;
  font-size: 0.95rem;
  cursor: pointer;
  border: 1px solid transparent;
  transition: all 0.2s ease;
}

.btn-primary {
  background: var(--accent);
  color: #ffffff;
}

.btn-primary:hover {
  background: var(--accent-hover);
  color: #ffffff;
}

.btn-outline-light {
  border-color: rgba(255, 255, 255, 0.45);
  color: #ffffff;
}

.btn-outline-light:hover {
  background: rgba(255, 255, 255, 0.12);
  color: #ffffff;
}

.btn-secondary {
  background: var(--primary);
  color: #ffffff;
}

.btn-secondary:hover {
  background: var(--primary-light);
  color: #ffffff;
}

.btn-danger {
  background: var(--danger);
  color: #ffffff;
}

.btn-sm {
  padding: 0.4rem 0.85rem;
  font-size: 0.85rem;
}

/* Dynamische One-Pager Kacheln */
.tiles-section {
  padding: 4rem 0;
}

.tiles-grid {
  display: grid;
  grid-template-columns: repeat(12, 1fr);
  gap: 1.75rem;
}

.tile-card {
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  display: flex;
  flex-direction: column;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.tile-card:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-md);
}

.tile-full { grid-column: span 12; }
.tile-half { grid-column: span 6; }
.tile-third { grid-column: span 4; }

.tile-image {
  width: 100%;
  height: 220px;
  object-fit: cover;
}

.tile-body {
  padding: 1.75rem;
  flex: 1;
  display: flex;
  flex-direction: column;
}

.tile-body h2 {
  font-family: Georgia, serif;
  font-size: 1.4rem;
  color: var(--primary);
  margin: 0 0 0.75rem;
}

.tile-content {
  color: var(--text-main);
  margin-bottom: 1.25rem;
  flex: 1;
}

/* ==========================================================================
   Reiseführer, Karte & Bundesländer
   ========================================================================== */
.page-header {
  background: var(--bg-surface);
  border-bottom: 1px solid var(--border);
  padding: 2.75rem 0;
}

.page-header h1 {
  font-family: Georgia, serif;
  color: var(--primary);
  margin: 0 0 0.5rem;
  font-size: 2.1rem;
}

.map-wrapper {
  margin: 2rem 0 3rem;
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1rem;
  box-shadow: var(--shadow-sm);
}

#guide-map {
  width: 100%;
  height: 460px;
  border-radius: 6px;
  z-index: 1;
}

.country-heading {
  font-family: Georgia, serif;
  font-size: 1.65rem;
  color: var(--primary);
  border-bottom: 2px solid var(--accent);
  padding-bottom: 0.4rem;
  margin: 2.5rem 0 1.5rem;
}

.region-group {
  margin-bottom: 2.25rem;
}

.region-title {
  font-size: 1.2rem;
  font-weight: 700;
  color: var(--primary-light);
  margin: 0 0 1rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.houses-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(310px, 1fr));
  gap: 1.5rem;
}

.house-card {
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  display: flex;
  flex-direction: column;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.house-card:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-md);
}

.house-card-img {
  width: 100%;
  height: 190px;
  object-fit: cover;
  background: var(--bg-subtle);
}

.house-card-placeholder {
  width: 100%;
  height: 120px;
  background: linear-gradient(135deg, #e2e8f0, #cbd5e1);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--primary);
  font-family: Georgia, serif;
  font-size: 1.5rem;
  opacity: 0.7;
}

.house-card-body {
  padding: 1.35rem;
  flex: 1;
  display: flex;
  flex-direction: column;
}

.house-card-body h3 {
  margin: 0 0 0.4rem;
  font-size: 1.18rem;
  color: var(--primary);
}

.house-card-sub {
  font-size: 0.9rem;
  color: var(--text-muted);
  margin-bottom: 1rem;
  flex: 1;
}

/* ==========================================================================
   Haus-Detailseite
   ========================================================================== */
.article-hero {
  width: 100%;
  max-height: 440px;
  object-fit: cover;
  border-radius: var(--radius);
  margin: 1.5rem 0 2rem;
  box-shadow: var(--shadow-md);
}

.breadcrumb {
  font-size: 0.9rem;
  color: var(--text-muted);
  margin: 1.5rem 0 0.75rem;
}

.article-layout {
  display: grid;
  grid-template-columns: 1fr 330px;
  gap: 2.5rem;
  padding: 1.5rem 0 4rem;
  align-items: start;
}

.article-layout.no-sidebar {
  grid-template-columns: 1fr;
  max-width: 840px;
}

.article-content {
  background: var(--bg-surface);
  padding: 2.25rem;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  box-shadow: var(--shadow-sm);
}

.article-content h1 {
  font-family: Georgia, serif;
  color: var(--primary);
  font-size: 2.15rem;
  margin: 0 0 0.5rem;
  line-height: 1.25;
}

.article-subtitle {
  font-size: 1.12rem;
  color: var(--text-muted);
  margin: 0 0 1.75rem;
  padding-bottom: 1.25rem;
  border-bottom: 1px solid var(--border);
}

.rich-text img {
  border-radius: 8px;
  margin: 1.25rem 0;
}

.rich-text h2, .rich-text h3 {
  color: var(--primary);
  font-family: Georgia, serif;
  margin-top: 1.75rem;
}

.contact-box {
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-top: 4px solid var(--accent);
  border-radius: var(--radius);
  padding: 1.5rem;
  box-shadow: var(--shadow-sm);
}

.contact-box h3 {
  margin: 0 0 1rem;
  font-family: Georgia, serif;
  color: var(--primary);
  font-size: 1.2rem;
}

.contact-list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
  font-size: 0.94rem;
}

.contact-list li strong {
  display: block;
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--text-muted);
}

#detail-map {
  width: 100%;
  height: 220px;
  border-radius: 6px;
  margin-top: 1.25rem;
  border: 1px solid var(--border);
}

/* ==========================================================================
   Footer & Cookie-Banner
   ========================================================================== */
.site-footer {
  background: var(--primary);
  color: #cbd5e1;
  padding: 2.5rem 0;
  margin-top: auto;
  font-size: 0.92rem;
}

.footer-inner {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 1rem;
}

.footer-links {
  display: flex;
  gap: 1.5rem;
}

.footer-links a {
  color: #ffffff;
}

.footer-links a:hover {
  color: var(--accent);
}

.cookie-banner {
  position: fixed;
  bottom: 1.25rem;
  left: 50%;
  transform: translateX(-50%);
  width: calc(100% - 2rem);
  max-width: 960px;
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-left: 5px solid var(--accent);
  border-radius: var(--radius);
  padding: 1.25rem 1.5rem;
  box-shadow: 0 14px 36px rgba(0, 0, 0, 0.18);
  z-index: 2000;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
}

.cookie-banner[hidden] {
  display: none;
}

.cookie-actions {
  display: flex;
  gap: 0.65rem;
  flex-shrink: 0;
}

/* ==========================================================================
   Admin-Panel Layout & Formulare
   ========================================================================== */
.admin-nav {
  background: var(--primary);
  color: #fff;
  padding: 0.85rem 0;
}

.admin-nav-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 1rem;
}

.admin-menu {
  display: flex;
  gap: 1.25rem;
  flex-wrap: wrap;
  align-items: center;
}

.admin-menu a {
  color: #e2e8f0;
  font-weight: 500;
  font-size: 0.94rem;
}

.admin-menu a:hover,
.admin-menu a.active {
  color: #ffffff;
  text-decoration: underline;
  text-underline-offset: 6px;
}

.card {
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.75rem;
  margin-bottom: 1.75rem;
  box-shadow: var(--shadow-sm);
}

.form-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.25rem;
}

.form-group {
  margin-bottom: 1.15rem;
}

.form-group label {
  display: block;
  font-weight: 600;
  margin-bottom: 0.4rem;
  font-size: 0.92rem;
}

.form-control {
  width: 100%;
  padding: 0.65rem 0.85rem;
  border: 1px solid #cbd5e1;
  border-radius: 6px;
  font-size: 0.96rem;
  font-family: inherit;
  background: #fff;
}

.form-control:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(26, 54, 93, 0.12);
}

.quill-box {
  background: #fff;
  min-height: 220px;
}

.admin-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.94rem;
}

.admin-table th,
.admin-table td {
  padding: 0.85rem 0.75rem;
  border-bottom: 1px solid var(--border);
  text-align: left;
}

.admin-table th {
  background: var(--bg-subtle);
  font-weight: 600;
  color: var(--primary);
}

.badge {
  display: inline-block;
  padding: 0.2rem 0.55rem;
  border-radius: 99px;
  font-size: 0.78rem;
  font-weight: 600;
}

.badge-admin { background: #dbeafe; color: #1e40af; }
.badge-moderator { background: #fef3c7; color: #92400e; }
.badge-editor { background: #e2e8f0; color: #334155; }
.badge-pub { background: #dcfce7; color: #166534; }
.badge-draft { background: #fee2e2; color: #991b1b; }

.alert {
  padding: 0.95rem 1.25rem;
  border-radius: 7px;
  margin-bottom: 1.25rem;
  font-weight: 500;
}

.alert-success { background: #dcfce7; color: #166534; border: 1px solid #86efac; }
.alert-error { background: #fee2e2; color: #991b1b; border: 1px solid #fca5a5; }

#admin-gps-picker {
  width: 100%;
  height: 300px;
  border-radius: 6px;
  border: 1px solid var(--border);
  margin-top: 0.5rem;
}

/* ==========================================================================
   Responsive Breakpoints
   ========================================================================== */
@media (max-width: 900px) {
  .tile-half, .tile-third { grid-column: span 12; }
  .article-layout { grid-template-columns: 1fr; }
  .form-grid { grid-template-columns: 1fr; }
}

@media (max-width: 768px) {
  .nav-toggle { display: block; }
  .nav-links {
    display: none;
    position: absolute;
    top: 72px;
    left: 0;
    right: 0;
    background: var(--bg-surface);
    flex-direction: column;
    padding: 1.25rem;
    border-bottom: 1px solid var(--border);
    box-shadow: var(--shadow-md);
  }
  .nav-links.open { display: flex; }
  .cookie-banner { flex-direction: column; align-items: stretch; }
}