/* ═══════════════════════════════════════════════
   SeiMensch.at — Shared Styles
   eBay-style marketplace for Austrian Vereine
   ═══════════════════════════════════════════════ */

/* ─── Reset & Base ─── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

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

body {
  font-family: 'Public Sans', system-ui, -apple-system, sans-serif;
  background-color: #F5F0ED;
  color: #2C2522;
  line-height: 1.4;
  font-weight: 400;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

a { color: #E85D2C; text-decoration: none; }
a:hover { color: #d04d1e; }

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

/* ─── Top Bar (eBay-style) ─── */
.top-bar {
  background: #2C2522;
  color: #fff;
  position: sticky;
  top: 0;
  z-index: 100;
  box-shadow: 0 2px 8px rgba(0,0,0,0.15);
}

.top-bar-inner {
  max-width: 1280px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 8px 16px;
  height: 56px;
}

.logo {
  font-family: 'Fraunces', Georgia, serif;
  font-size: 1.35rem;
  font-weight: 700;
  color: #fff;
  white-space: nowrap;
  letter-spacing: -0.02em;
  flex-shrink: 0;
}
.logo:hover { color: #E85D2C; }
.logo span { color: #E85D2C; }

.search-area {
  flex: 1;
  display: flex;
  max-width: 560px;
  margin: 0 auto;
}

.cat-dropdown {
  border: none;
  background: #fff;
  color: #2C2522;
  padding: 8px 12px;
  font-size: 0.85rem;
  border-radius: 6px 0 0 6px;
  cursor: pointer;
  font-family: inherit;
  min-width: 130px;
  border-right: 1px solid #D4C4BC;
}

.search-input {
  flex: 1;
  border: none;
  padding: 8px 12px;
  font-size: 0.85rem;
  font-family: inherit;
  background: #fff;
  color: #2C2522;
  min-width: 0;
}
.search-input::placeholder { color: #999; }

.search-btn {
  background: #E85D2C;
  color: #fff;
  border: none;
  padding: 8px 18px;
  font-size: 0.85rem;
  font-weight: 600;
  border-radius: 0 6px 6px 0;
  cursor: pointer;
  transition: background 0.15s;
  font-family: inherit;
}
.search-btn:hover { background: #d04d1e; }

.top-nav {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-shrink: 0;
}

.top-nav a {
  color: #ccc;
  font-size: 0.8rem;
  padding: 6px 10px;
  border-radius: 4px;
  transition: color 0.15s, background 0.15s;
  white-space: nowrap;
}
.top-nav a:hover {
  color: #fff;
  background: rgba(255,255,255,0.1);
}

.btn-inserieren {
  background: #E85D2C !important;
  color: #fff !important;
  font-weight: 700 !important;
  padding: 6px 16px !important;
  border-radius: 6px !important;
  font-size: 0.85rem !important;
}
.btn-inserieren:hover {
  background: #d04d1e !important;
  transform: translateY(-1px);
}

/* ─── Page Header ─── */
.page-header {
  background: #2C2522;
  color: #fff;
  padding: 40px 16px;
  text-align: center;
}
.page-header h1 {
  font-family: 'Fraunces', Georgia, serif;
  font-size: 2rem;
  font-weight: 700;
  margin-bottom: 8px;
}
.page-header p {
  color: #ccc;
  font-size: 1rem;
  max-width: 600px;
  margin: 0 auto;
}

/* ─── Container ─── */
.container {
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 16px;
}

/* ─── Section spacing ─── */
.section {
  padding: 40px 0;
}
.section-alt {
  background: #F2E3DB;
}

/* ─── Grid ─── */
.grid-4 {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
}

.grid-3 {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
}

.grid-2 {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 20px;
}

/* ─── Listing Cards ─── */
.listing-card {
  background: #fff;
  border: 1px solid #D4C4BC;
  border-radius: 8px;
  overflow: hidden;
  transition: transform 0.15s, box-shadow 0.15s;
  display: block;
  color: inherit;
}
.listing-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 6px 20px rgba(0,0,0,0.1);
  color: inherit;
}

.card-img {
  position: relative;
  aspect-ratio: 4/3;
  overflow: hidden;
  background: #F2E3DB;
}
.card-img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.badge {
  position: absolute;
  top: 8px;
  left: 8px;
  padding: 3px 8px;
  border-radius: 4px;
  font-size: 0.7rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.03em;
}
.badge-new { background: #E85D2C; color: #fff; }
.badge-urgent { background: #1E3A3F; color: #fff; }
.badge-free { background: #3D6B4F; color: #fff; }

.card-body {
  padding: 12px;
}
.card-title {
  font-size: 0.9rem;
  font-weight: 600;
  margin-bottom: 4px;
  color: #2C2522;
  line-height: 1.3;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.card-org {
  font-size: 0.78rem;
  color: #1E3A3F;
  margin-bottom: 6px;
}
.card-meta {
  display: flex;
  justify-content: space-between;
  font-size: 0.72rem;
  color: #888;
}

/* ─── Filter Chips ─── */
.filter-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  padding: 12px 0;
  align-items: center;
}
.filter-chip {
  background: #fff;
  border: 1px solid #D4C4BC;
  border-radius: 20px;
  padding: 5px 14px;
  font-size: 0.78rem;
  cursor: pointer;
  transition: all 0.15s;
  color: #2C2522;
  font-family: inherit;
}
.filter-chip:hover, .filter-chip.active {
  background: #E85D2C;
  color: #fff;
  border-color: #E85D2C;
}

/* ─── Buttons ─── */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 10px 24px;
  border-radius: 6px;
  font-size: 0.9rem;
  font-weight: 600;
  font-family: inherit;
  border: none;
  cursor: pointer;
  transition: all 0.15s;
  text-decoration: none;
}
.btn-primary {
  background: #E85D2C;
  color: #fff;
}
.btn-primary:hover {
  background: #d04d1e;
  transform: translateY(-2px);
  color: #fff;
}
.btn-secondary {
  background: #2C2522;
  color: #fff;
}
.btn-secondary:hover {
  background: #1a1513;
  transform: translateY(-2px);
  color: #fff;
}
.btn-outline {
  background: transparent;
  color: #2C2522;
  border: 2px solid #2C2522;
}
.btn-outline:hover {
  background: #2C2522;
  color: #fff;
  transform: translateY(-2px);
}
.btn-lg {
  padding: 14px 36px;
  font-size: 1.05rem;
}

/* ─── Form Elements ─── */
.form-group {
  margin-bottom: 20px;
}
.form-group label {
  display: block;
  font-weight: 600;
  font-size: 0.85rem;
  margin-bottom: 6px;
  color: #2C2522;
}
.form-control {
  width: 100%;
  padding: 10px 14px;
  border: 1px solid #D4C4BC;
  border-radius: 6px;
  font-size: 0.9rem;
  font-family: inherit;
  background: #fff;
  color: #2C2522;
  transition: border-color 0.15s;
}
.form-control:focus {
  outline: none;
  border-color: #E85D2C;
  box-shadow: 0 0 0 3px rgba(232,93,44,0.15);
}
textarea.form-control {
  min-height: 120px;
  resize: vertical;
}
select.form-control {
  cursor: pointer;
}

/* ─── Cards (content) ─── */
.content-card {
  background: #fff;
  border: 1px solid #D4C4BC;
  border-radius: 8px;
  padding: 24px;
}
.content-card h2 {
  font-family: 'Fraunces', Georgia, serif;
  font-size: 1.3rem;
  margin-bottom: 12px;
  color: #2C2522;
}
.content-card h3 {
  font-size: 1rem;
  font-weight: 600;
  margin-bottom: 8px;
  color: #2C2522;
}
.content-card p {
  font-size: 0.9rem;
  color: #555;
  line-height: 1.6;
  margin-bottom: 12px;
}

/* ─── Category Grid ─── */
.cat-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
}
.cat-card {
  background: #fff;
  border: 1px solid #D4C4BC;
  border-radius: 8px;
  padding: 24px 16px;
  text-align: center;
  transition: transform 0.15s, box-shadow 0.15s;
  cursor: pointer;
  display: block;
  color: inherit;
}
.cat-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 6px 20px rgba(0,0,0,0.1);
  color: inherit;
}
.cat-icon {
  font-size: 2.2rem;
  margin-bottom: 8px;
  display: block;
}
.cat-name {
  font-weight: 600;
  font-size: 0.9rem;
  color: #2C2522;
}
.cat-count {
  font-size: 0.75rem;
  color: #888;
  margin-top: 4px;
}

/* ─── Footer ─── */
.site-footer {
  background: #2C2522;
  color: #ccc;
  padding: 40px 16px 24px;
  margin-top: auto;
}
.footer-inner {
  max-width: 1280px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: 32px;
}
.footer-col h4 {
  color: #fff;
  font-size: 0.9rem;
  font-weight: 600;
  margin-bottom: 12px;
}
.footer-col p, .footer-col a {
  font-size: 0.82rem;
  color: #aaa;
  line-height: 1.8;
}
.footer-col a:hover { color: #E85D2C; }
.footer-bottom {
  max-width: 1280px;
  margin: 24px auto 0;
  padding-top: 16px;
  border-top: 1px solid rgba(255,255,255,0.1);
  font-size: 0.75rem;
  color: #888;
  text-align: center;
}

/* ─── Detail Page ─── */
.detail-grid {
  display: grid;
  grid-template-columns: 1fr 380px;
  gap: 32px;
}
.detail-gallery {
  background: #fff;
  border: 1px solid #D4C4BC;
  border-radius: 8px;
  overflow: hidden;
}
.detail-gallery img {
  width: 100%;
  aspect-ratio: 16/9;
  object-fit: cover;
}
.detail-info {
  background: #fff;
  border: 1px solid #D4C4BC;
  border-radius: 8px;
  padding: 24px;
  position: sticky;
  top: 72px;
}
.detail-info h1 {
  font-family: 'Fraunces', Georgia, serif;
  font-size: 1.5rem;
  margin-bottom: 8px;
}
.detail-price {
  font-size: 1.5rem;
  font-weight: 700;
  color: #E85D2C;
  margin-bottom: 16px;
}
.detail-meta {
  font-size: 0.85rem;
  color: #888;
  margin-bottom: 8px;
}
.detail-desc {
  font-size: 0.9rem;
  line-height: 1.7;
  color: #555;
  margin-bottom: 20px;
}

/* ─── Auth Pages ─── */
.auth-card {
  max-width: 420px;
  margin: 40px auto;
  background: #fff;
  border: 1px solid #D4C4BC;
  border-radius: 8px;
  padding: 32px;
}
.auth-card h1 {
  font-family: 'Fraunces', Georgia, serif;
  font-size: 1.5rem;
  text-align: center;
  margin-bottom: 24px;
}
.auth-footer {
  text-align: center;
  font-size: 0.85rem;
  color: #888;
  margin-top: 16px;
}

/* ─── Contact Page ─── */
.contact-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 32px;
}

/* ─── Responsive ─── */
@media (max-width: 1024px) {
  .grid-4 { grid-template-columns: repeat(3, 1fr); }
  .cat-grid { grid-template-columns: repeat(3, 1fr); }
  .footer-inner { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 768px) {
  .grid-4 { grid-template-columns: repeat(2, 1fr); }
  .grid-3 { grid-template-columns: repeat(2, 1fr); }
  .cat-grid { grid-template-columns: repeat(2, 1fr); }
  .detail-grid { grid-template-columns: 1fr; }
  .contact-grid { grid-template-columns: 1fr; }
  .footer-inner { grid-template-columns: 1fr; }
  .top-bar-inner { gap: 8px; }
  .cat-dropdown { display: none; }
  .top-nav a { font-size: 0.72rem; padding: 4px 6px; }
  .search-area { max-width: 100%; }
}

@media (max-width: 480px) {
  .grid-4 { grid-template-columns: 1fr; }
  .grid-3 { grid-template-columns: 1fr; }
  .cat-grid { grid-template-columns: 1fr 1fr; }
  .top-nav .nav-text { display: none; }
}

/* ═══════════════════════════════════════════════
   Missing Classes (Phase 5 fix)
   ═══════════════════════════════════════════════ */

/* ─── Page Header ─── */
.page-header {
  background: #2C2522;
  color: #fff;
  padding: 32px 16px;
  text-align: center;
}
.page-header-inner {
  max-width: 1280px;
  margin: 0 auto;
}
.page-title {
  font-family: 'Fraunces', Georgia, serif;
  font-size: 1.8rem;
  font-weight: 700;
  margin-bottom: 8px;
  color: #fff;
}
.page-subtitle {
  font-size: 1rem;
  color: #ccc;
  max-width: 600px;
  margin: 0 auto;
}

/* ─── Category Card ─── */
.category-card {
  display: block;
  background: #fff;
  border: 1px solid #D4C4BC;
  border-radius: 8px;
  padding: 20px 16px;
  text-align: center;
  transition: transform 0.15s, box-shadow 0.15s;
  color: #2C2522;
}
.category-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 6px 20px rgba(0,0,0,0.1);
  color: #2C2522;
}
.category-card .cat-icon {
  font-size: 2rem;
  margin-bottom: 8px;
  display: block;
}
.category-card .cat-name {
  font-weight: 600;
  font-size: 0.9rem;
}
.category-card .cat-count {
  font-size: 0.75rem;
  color: #888;
  margin-top: 4px;
}

/* ─── Form Container ─── */
.form-container {
  max-width: 720px;
  margin: 0 auto;
  padding: 32px 16px;
}
.form-container-sm {
  max-width: 480px;
  margin: 0 auto;
  padding: 32px 16px;
}
.inserat-form {
  background: #fff;
  border: 1px solid #D4C4BC;
  border-radius: 8px;
  padding: 32px;
}
.inserat-form .form-group {
  margin-bottom: 20px;
}
.inserat-form label {
  display: block;
  font-weight: 600;
  font-size: 0.85rem;
  margin-bottom: 6px;
  color: #2C2522;
}
.inserat-form input,
.inserat-form select,
.inserat-form textarea {
  width: 100%;
  padding: 10px 12px;
  border: 1px solid #D4C4BC;
  border-radius: 6px;
  font-family: 'Public Sans', sans-serif;
  font-size: 0.9rem;
  background: #F5F0ED;
  color: #2C2522;
  transition: border-color 0.15s;
}
.inserat-form input:focus,
.inserat-form select:focus,
.inserat-form textarea:focus {
  outline: none;
  border-color: #E85D2C;
  box-shadow: 0 0 0 3px rgba(232,93,44,0.15);
}
.inserat-form textarea {
  min-height: 120px;
  resize: vertical;
}
.inserat-form .btn {
  width: 100%;
  padding: 12px;
  font-size: 1rem;
}

/* ─── Footer Grid ─── */
.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr;
  gap: 32px;
  max-width: 1280px;
  margin: 0 auto;
  padding: 40px 16px 24px;
}
.footer-grid .footer-col h4 {
  color: #fff;
  font-size: 0.9rem;
  font-weight: 600;
  margin-bottom: 12px;
}
.footer-grid .footer-col p,
.footer-grid .footer-col a {
  font-size: 0.82rem;
  color: #aaa;
  line-height: 1.8;
}
.footer-grid .footer-col a:hover { color: #E85D2C; }

/* ─── Form utilities (missing classes) ─── */
.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}
.form-footnote {
  font-size: 0.8rem;
  color: #666;
  margin-top: 4px;
}

/* ─── Category grid ─── */
.category-grid-section {
  padding: 40px 16px;
  max-width: 1280px;
  margin: 0 auto;
}
.category-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
  gap: 16px;
}

/* ─── Contact page ─── */
.contact-section {
  max-width: 800px;
  margin: 0 auto;
  padding: 40px 16px;
}
.contact-form {
  display: flex;
  flex-direction: column;
  gap: 16px;
}
.contact-form input,
.contact-form textarea {
  width: 100%;
  padding: 10px 12px;
  border: 1px solid #D4C4BC;
  border-radius: 6px;
  font-family: 'Public Sans', sans-serif;
  font-size: 0.9rem;
  background: #F5F0ED;
  color: #2C2522;
}
.contact-form input:focus,
.contact-form textarea:focus {
  outline: none;
  border-color: #E85D2C;
  box-shadow: 0 0 0 3px rgba(232,93,44,0.15);
}

/* ═══════════════════════════════════════════════
   ANIMATIONS
   ═══════════════════════════════════════════════ */

@keyframes fadeUp {
  from { opacity: 0; transform: translateY(20px); }
  to   { opacity: 1; transform: translateY(0); }
}

@keyframes float {
  0%, 100% { transform: translateY(0); }
  50%      { transform: translateY(-8px); }
}

@keyframes pulse {
  0%, 100% { opacity: 1; }
  50%      { opacity: 0.6; }
}

@keyframes shimmer {
  0%   { background-position: -200% 0; }
  100% { background-position: 200% 0; }
}

/* ─── Animate cards on load ─── */
.listing-card:nth-child(1)  { animation: fadeUp 0.4s ease-out both; }
.listing-card:nth-child(2)  { animation: fadeUp 0.4s ease-out 0.05s both; }
.listing-card:nth-child(3)  { animation: fadeUp 0.4s ease-out 0.1s both; }
.listing-card:nth-child(4)  { animation: fadeUp 0.4s ease-out 0.15s both; }
.listing-card:nth-child(5)  { animation: fadeUp 0.4s ease-out 0.2s both; }
.listing-card:nth-child(6)  { animation: fadeUp 0.4s ease-out 0.25s both; }
.listing-card:nth-child(7)  { animation: fadeUp 0.4s ease-out 0.3s both; }
.listing-card:nth-child(8)  { animation: fadeUp 0.4s ease-out 0.35s both; }
.listing-card:nth-child(9)  { animation: fadeUp 0.4s ease-out 0.4s both; }
.listing-card:nth-child(10) { animation: fadeUp 0.4s ease-out 0.45s both; }
.listing-card:nth-child(11) { animation: fadeUp 0.4s ease-out 0.5s both; }
.listing-card:nth-child(12) { animation: fadeUp 0.4s ease-out 0.55s both; }

/* ═══════════════════════════════════════════════
   MISSING LAYOUT CLASSES
   ═══════════════════════════════════════════════ */

.main-layout {
  display: flex;
  gap: 24px;
  max-width: 1280px;
  margin: 0 auto;
  padding: 20px 16px;
  flex: 1;
  width: 100%;
}

.listing-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
  flex: 1;
}

@media (max-width: 1024px) {
  .listing-grid { grid-template-columns: repeat(3, 1fr); }
}
@media (max-width: 768px) {
  .listing-grid { grid-template-columns: repeat(2, 1fr); }
  .main-layout { flex-direction: column; }
}
@media (max-width: 480px) {
  .listing-grid { grid-template-columns: 1fr; }
}

/* ═══════════════════════════════════════════════
   SVG ICON STYLES
   ═══════════════════════════════════════════════ */

.icon-svg {
  width: 20px;
  height: 20px;
  vertical-align: middle;
  display: inline-block;
  stroke: currentColor;
  stroke-width: 1.5;
  fill: none;
  flex-shrink: 0;
}

.icon-svg-sm {
  width: 16px;
  height: 16px;
  vertical-align: middle;
  display: inline-block;
  stroke: currentColor;
  stroke-width: 1.5;
  fill: none;
  flex-shrink: 0;
}

.sidebar .icon-svg {
  margin-right: 8px;
}

.card-meta .icon-svg-sm {
  margin-right: 4px;
}

.meta-location .icon-svg-sm,
.meta-date .icon-svg-sm {
  margin-right: 3px;
}

/* ─── Hover animations for interactive elements ─── */
.top-link:hover {
  transform: translateY(-1px);
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(232,93,44,0.3);
}

.cat-link:hover {
  transform: translateX(4px);
}

.search-btn:hover {
  transform: scale(1.05);
}

.sidebar-title {
  font-size: 0.85rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: #8A7A72;
  margin-bottom: 12px;
  padding-bottom: 8px;
  border-bottom: 2px solid #E85D2C;
}

/* ─── Photo display modes ─── */

/* Mode 1: Hero full-bleed background-image with overlay */
.hero-bg {
  position: relative;
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  min-height: 300px;
  display: flex;
  align-items: center;
  justify-content: center;
}
.hero-bg::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, rgba(44,37,34,0.7), rgba(44,37,34,0.3));
}
.hero-bg > * { position: relative; z-index: 1; }

/* Mode 2: Side-image with clip-path */
.side-image {
  clip-path: polygon(0 0, 85% 0, 100% 100%, 0 100%);
  border-radius: 0;
}

/* Mode 3: Banner-strip between sections */
.banner-strip {
  width: 100%;
  height: 120px;
  object-fit: cover;
  display: block;
}

/* Mode 4: Photo-Cards (each card gets its own image) — already done via .card-img */

/* Mode 5: Decorative accent (absolute positioned, rotated) */
.deco-accent {
  position: absolute;
  z-index: 0;
  opacity: 0.15;
  pointer-events: none;
}
.deco-accent-rotate {
  transform: rotate(-12deg);
}
