/* ============================================================
   Aleviten Kulturzentrum Heidenheim — Haupt-CSS
   ============================================================ */
:root {
  --crimson:    #8B0000;
  --crimson-dk: #5C0000;
  --crimson-lt: #a00000;
  --gold:       #C9A84C;
  --gold-lt:    #E8C87A;
  --cream:      #F8F5F0;
  --gray-text:  #555;
  --dark:       #1a0000;
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body { font-family: 'Segoe UI', Arial, sans-serif; color: #222; background: white; }
section { transition: background 0.3s; }
a { color: var(--crimson); text-decoration: none; }
a:hover { opacity: 0.8; }
img { max-width: 100%; }

/* ── Top bar ─────────────────────────────────────────────── */
.top-bar { background: var(--crimson-dk); color: rgba(255,255,255,0.75); font-size: 12px; padding: 6px 0; }
.top-bar-inner { max-width: 1200px; margin: 0 auto; padding: 0 24px; display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap; }
.top-bar-right { display: flex; gap: 14px; align-items: center; }
.top-bar-right a { color: rgba(255,255,255,0.75); font-size: 12px; }
.top-bar-right a:hover { color: var(--gold-lt); }

/* ── Header ──────────────────────────────────────────────── */
header { background: linear-gradient(135deg, var(--dark) 0%, var(--crimson-dk) 50%, var(--crimson) 100%); padding: 0; box-shadow: 0 4px 20px rgba(0,0,0,0.3); position: sticky; top: 0; z-index: 200; }
.header-inner { max-width: 1200px; margin: 0 auto; padding: 0 24px; display: flex; align-items: center; justify-content: space-between; height: 76px; gap: 12px; }
.logo-wrap { display: flex; align-items: center; gap: 14px; text-decoration: none; }
.logo-emblem { width: 52px; height: 68px; display: flex; align-items: center; }
.logo-emblem img { width: 100%; height: 100%; object-fit: contain; filter: drop-shadow(0 2px 8px rgba(0,0,0,0.4)); }
.logo-name { display: block; color: white; font-size: 17px; font-weight: 700; line-height: 1.2; }
.logo-name span[data-lang].active { display: inline !important; color: white; font-size: 17px; font-weight: 700; }
.logo-sub  { display: block; color: var(--gold-lt); font-size: 11px; }
.logo-sub span[data-lang].active  { display: inline !important; color: var(--gold-lt); font-size: 11px; }
.main-nav { display: flex; gap: 6px; align-items: center; }
.main-nav a { color: rgba(255,255,255,0.85); padding: 7px 10px; border-radius: 6px; font-size: 13px; font-weight: 500; transition: all 0.2s; white-space: nowrap; }
.main-nav a:hover, .main-nav a.active { background: rgba(201,168,76,0.2); color: var(--gold-lt); }

/* ── Page hero (sub-pages) ───────────────────────────────── */
.page-hero { background: linear-gradient(150deg, var(--dark), var(--crimson)); color: white; padding: 60px 24px; text-align: center; }
.page-hero h1 { font-size: 36px; font-weight: 800; margin-bottom: 10px; }
.page-hero p  { font-size: 17px; opacity: 0.8; }

/* ── Container ───────────────────────────────────────────── */
.container { max-width: 1200px; margin: 0 auto; padding: 0 24px; }
section { padding: 60px 0; }
.section-title { font-size: 32px; font-weight: 800; color: var(--crimson); text-align: center; margin-bottom: 10px; }
.section-lead  { font-size: 16px; color: var(--gray-text); text-align: center; max-width: 600px; margin: 0 auto 40px; line-height: 1.7; }

/* ── News cards ──────────────────────────────────────────── */
.news-grid { display: grid; grid-template-columns: repeat(3,1fr); gap: 24px; }
.news-card { background: white; border-radius: 10px; overflow: hidden; box-shadow: 0 4px 20px rgba(0,0,0,0.08); transition: transform 0.2s; }
.news-card:hover { transform: translateY(-3px); }
.news-card-img { height: 180px; background: var(--crimson); overflow: hidden; }
.news-card-img img { width: 100%; height: 100%; object-fit: cover; }
.news-card-body { padding: 18px; }
.news-card-kat  { font-size: 11px; text-transform: uppercase; font-weight: 700; color: var(--gold); letter-spacing: 1px; }
.news-card-body h3 { font-size: 17px; color: #222; margin: 8px 0 10px; line-height: 1.4; }
.news-card-body p  { font-size: 14px; color: var(--gray-text); line-height: 1.6; }
.news-card-footer  { display: flex; justify-content: space-between; align-items: center; margin-top: 14px; }
.news-card-footer small { color: #aaa; font-size: 12px; }
.btn-mehr { color: var(--crimson); font-size: 13px; font-weight: 600; }

/* ── Events ──────────────────────────────────────────────── */
.events-grid { display: grid; grid-template-columns: repeat(2,1fr); gap: 20px; }
.event-card { background: white; border-radius: 10px; overflow: hidden; box-shadow: 0 4px 20px rgba(0,0,0,0.08); display: flex; gap: 0; transition: transform 0.2s; }
.event-card:hover { transform: translateY(-2px); }
.event-date-box { background: var(--crimson); color: white; min-width: 80px; display: flex; flex-direction: column; align-items: center; justify-content: center; padding: 16px 12px; text-align: center; }
.event-date-box .day   { font-size: 28px; font-weight: 800; line-height: 1; }
.event-date-box .month { font-size: 12px; text-transform: uppercase; letter-spacing: 1px; opacity: 0.85; }
.event-info { padding: 16px 18px; flex: 1; }
.event-info h3 { font-size: 16px; color: #222; margin-bottom: 8px; }
.event-info p  { font-size: 13px; color: var(--gray-text); }
.event-info .event-ort { font-size: 12px; color: #aaa; margin-top: 8px; }
.event-kat { display: inline-block; padding: 2px 8px; border-radius: 12px; font-size: 11px; font-weight: 600; background: #f0e8d4; color: #8B6000; margin-bottom: 6px; }

/* ── Galerie ─────────────────────────────────────────────── */
.galerie-grid { display: grid; grid-template-columns: repeat(4,1fr); gap: 12px; }
.galerie-item { aspect-ratio: 1; overflow: hidden; border-radius: 8px; cursor: pointer; background: var(--crimson); }
.galerie-item img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.3s; }
.galerie-item:hover img { transform: scale(1.05); }
.alben-grid { display: grid; grid-template-columns: repeat(3,1fr); gap: 24px; }
.album-card { background: white; border-radius: 10px; overflow: hidden; box-shadow: 0 4px 16px rgba(0,0,0,0.08); cursor: pointer; transition: transform 0.2s; }
.album-card:hover { transform: translateY(-3px); }
.album-cover { height: 180px; background: var(--crimson); overflow: hidden; }
.album-cover img { width: 100%; height: 100%; object-fit: cover; }
.album-info { padding: 14px 16px; }
.album-info h3 { font-size: 15px; color: #222; margin-bottom: 4px; }
.album-info small { font-size: 12px; color: #aaa; }

/* ── Lightbox ────────────────────────────────────────────── */
.lightbox { display: none; position: fixed; inset: 0; background: rgba(0,0,0,0.9); z-index: 9999; align-items: center; justify-content: center; }
.lightbox.open { display: flex; }
.lightbox img { max-width: 90vw; max-height: 90vh; object-fit: contain; border-radius: 4px; }
.lightbox-close { position: fixed; top: 20px; right: 28px; color: white; font-size: 32px; cursor: pointer; }
.lightbox-prev, .lightbox-next { position: fixed; top: 50%; transform: translateY(-50%); color: white; font-size: 40px; cursor: pointer; background: rgba(0,0,0,0.4); padding: 12px 18px; border-radius: 6px; }
.lightbox-prev { left: 12px; }
.lightbox-next { right: 12px; }

/* ── Contact ─────────────────────────────────────────────── */
.contact-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 40px; }
.contact-form { display: flex; flex-direction: column; gap: 16px; }
.contact-form input, .contact-form textarea, .contact-form select {
  padding: 12px 16px; border: 2px solid #e0e0e0; border-radius: 8px; font-size: 15px; font-family: inherit;
}
.contact-form input:focus, .contact-form textarea:focus { outline: none; border-color: var(--crimson); }
.btn-send { background: linear-gradient(135deg,var(--crimson),var(--crimson-dk)); color: white; padding: 14px; border: none; border-radius: 8px; font-size: 16px; font-weight: 700; cursor: pointer; }
.btn-send:hover { opacity: 0.9; }
.contact-info h3 { font-size: 20px; color: var(--crimson); margin-bottom: 20px; }
.contact-info p  { font-size: 15px; line-height: 2; color: var(--gray-text); }
.map-wrap { border-radius: 10px; overflow: hidden; margin-top: 20px; }
.map-wrap iframe { width: 100%; height: 280px; border: 0; }

/* ── Footer ──────────────────────────────────────────────── */
footer { background: linear-gradient(180deg, #1a0000, #0d0000); color: rgba(255,255,255,0.7); }
.footer-inner { max-width: 1200px; margin: 0 auto; padding: 50px 24px 20px; }
.footer-grid { display: grid; grid-template-columns: 2fr 1fr 1fr 1fr; gap: 40px; margin-bottom: 36px; }
.footer-logo { display: flex; align-items: center; gap: 12px; margin-bottom: 14px; }
.footer-logo img { width: 44px; height: 56px; object-fit: contain; }
.footer-logo span { color: white; font-size: 14px; font-weight: 600; line-height: 1.4; }
.footer-col p { font-size: 13px; line-height: 1.8; }
.footer-col h4 { color: white; font-size: 13px; font-weight: 700; letter-spacing: 2px; text-transform: uppercase; margin-bottom: 16px; padding-bottom: 8px; border-bottom: 2px solid var(--crimson); }
.footer-col ul { list-style: none; }
.footer-col ul li { margin-bottom: 8px; }
.footer-col ul li a { color: rgba(255,255,255,0.6); font-size: 13px; transition: color 0.2s; }
.footer-col ul li a:hover { color: var(--gold-lt); }
.footer-bottom { border-top: 1px solid rgba(255,255,255,0.1); padding-top: 20px; display: flex; justify-content: space-between; font-size: 13px; }
.footer-bottom a { color: rgba(255,255,255,0.5); margin-left: 16px; }
.footer-bottom a:hover { color: var(--gold-lt); }

/* ── Buttons ─────────────────────────────────────────────── */
.btn { display: inline-block; padding: 10px 22px; border-radius: 8px; font-size: 14px; font-weight: 600; cursor: pointer; border: none; }
.btn-primary { background: var(--crimson); color: white; }
.btn-secondary { background: transparent; border: 2px solid var(--crimson); color: var(--crimson); }

/* ── Pagination ──────────────────────────────────────────── */
.pagination { display: flex; gap: 8px; justify-content: center; margin-top: 36px; }
.pagination a { padding: 8px 14px; border: 1px solid #ddd; border-radius: 6px; font-size: 14px; color: #333; }
.pagination a.active, .pagination a:hover { background: var(--crimson); color: white; border-color: var(--crimson); }

/* ── Alerts ──────────────────────────────────────────────── */
.alert-box { padding: 14px 18px; border-radius: 8px; margin-bottom: 24px; }
.alert-box.ok  { background: #d4f5d4; color: #1a6b1a; }
.alert-box.err { background: #ffe0e0; color: #8B0000; }


/* ── Social Media ────────────────────────────────────────── */
.social-header { display:flex; gap:8px; align-items:center; margin-left:8px; }
.social-icon-header {
  display:flex; align-items:center; justify-content:center;
  width:32px; height:32px; border-radius:6px;
  background:rgba(255,255,255,0.12); color:rgba(255,255,255,0.8);
  transition:all 0.2s;
}
.social-icon-header:hover { background:var(--gold); color:#1a0000; opacity:1; }
.social-icon-header svg { width:16px; height:16px; }

.social-footer { display:flex; gap:10px; margin-top:16px; flex-wrap:wrap; }
.social-icon-footer {
  display:flex; align-items:center; justify-content:center;
  width:38px; height:38px; border-radius:8px;
  background:rgba(255,255,255,0.1); color:rgba(255,255,255,0.7);
  transition:all 0.2s;
}
.social-icon-footer:hover { background:var(--sc,#C9A84C); color:white; opacity:1; }
.social-icon-footer svg { width:18px; height:18px; }
.social-icon-disabled { opacity:0.3; cursor:not-allowed; }
.social-icon-disabled:hover { background:rgba(255,255,255,0.1) !important; color:rgba(255,255,255,0.7) !important; }

.social-contact { display:flex; gap:12px; flex-wrap:wrap; margin-top:8px; }
.social-contact-btn {
  display:flex; align-items:center; gap:8px;
  padding:10px 16px; border-radius:8px;
  background:white; color:#333;
  font-size:14px; font-weight:600;
  box-shadow:0 2px 8px rgba(0,0,0,0.08);
  transition:all 0.2s; text-decoration:none;
  border:2px solid #f0f0f0;
}
.social-contact-btn:hover {
  background:var(--sc,#C9A84C); color:white;
  border-color:var(--sc,#C9A84C); opacity:1;
}
.social-contact-btn svg { width:20px; height:20px; }

/* ── Language switcher ───────────────────────────────────── */
.lang-switch { display: flex; gap: 4px; margin-left: 12px; }
.lang-switch button {
  background: transparent;
  border: 1px solid rgba(255,255,255,0.3);
  color: rgba(255,255,255,0.7);
  padding: 5px 10px;
  border-radius: 6px;
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
  letter-spacing: 1px;
  transition: all 0.2s;
}
.lang-switch button:hover,
.lang-switch button.active {
  background: var(--gold);
  color: #1a0000;
  border-color: var(--gold);
}
.btn-login-header {
  margin-left: 14px;
  background: white;
  color: var(--crimson);
  padding: 8px 18px;
  border-radius: 8px;
  font-size: 13px;
  font-weight: 700;
  white-space: nowrap;
  text-decoration: none;
  position: relative;
}
.btn-login-header:hover { background: var(--gold-lt); color: var(--crimson-dk); opacity: 1; }
.btn-login-header .badge { background: var(--crimson); color: white; border-radius: 10px; padding: 1px 6px; font-size: 11px; margin-left: 4px; }


/* ── Smooth dark-to-light section transition ─────────────── */
.section-fade-top {
  background: linear-gradient(180deg, #1a0000 0%, #f5f0ec 100%);
  height: 40px;
  margin: 0;
  padding: 0;
}

/* ── Responsive ──────────────────────────────────────────── */
@media (max-width: 900px) {
  .news-grid { grid-template-columns: 1fr 1fr; }
  .events-grid { grid-template-columns: 1fr; }
  .galerie-grid { grid-template-columns: repeat(3,1fr); }
  .alben-grid { grid-template-columns: repeat(2,1fr); }
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .contact-grid { grid-template-columns: 1fr; }
}
@media (max-width: 600px) {
  .news-grid, .alben-grid { grid-template-columns: 1fr; }
  .galerie-grid { grid-template-columns: repeat(2,1fr); }
  .footer-grid { grid-template-columns: 1fr; }
  .header-inner { flex-wrap: wrap; height: auto; padding: 12px 16px; }
  .main-nav { flex-wrap: wrap; gap: 4px; }
}
