/* ============================================================
   50plus ist fabelhaft — main.css
   ============================================================ */

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

:root {
  --cream:            #FAF6F0;
  --warm-white:       #FFFCF7;
  --terracotta:       #C4613A;
  --terra-hover:      #E8845E;
  --terra-pale:       #F5E0D5;
  --amber:            #D4883B;
  --amber-pale:       #FAF0DC;
  --sage:             #6B8A6E;
  --sage-pale:        #E8F0E8;
  --charcoal:         #2C2420;
  --warm-gray:        #7A6F6A;
  --light-gray:       #EDE8E3;
  --border:           #E4DDD6;
  --serif:            'Playfair Display', Georgia, serif;
  --sans:             'DM Sans', system-ui, sans-serif;
  --shadow-sm:        0 2px 8px rgba(44,36,32,0.06);
  --shadow-md:        0 6px 24px rgba(44,36,32,0.09);
  --shadow-lg:        0 12px 40px rgba(44,36,32,0.12);
  --radius-sm:        8px;
  --radius-md:        12px;
  --radius-lg:        18px;
  --radius-pill:      100px;
}

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

body {
  font-family: var(--sans);
  background: var(--cream);
  color: var(--charcoal);
  line-height: 1.65;
  font-weight: 400;
  -webkit-font-smoothing: antialiased;
}

img { max-width: 100%; height: auto; display: block; }
a { color: inherit; text-decoration: none; }

/* --- Typography ------------------------------------------- */
h1, h2, h3, h4 { font-family: var(--serif); font-weight: 500; line-height: 1.2; letter-spacing: -0.02em; }
h1 { font-size: clamp(2rem, 5vw, 3rem); }
h2 { font-size: clamp(1.5rem, 3vw, 2rem); }
h3 { font-size: 1.2rem; }
h4 { font-size: 1rem; font-family: var(--sans); letter-spacing: 0; }
p  { line-height: 1.7; }

/* --- Layout helpers --------------------------------------- */
.container { max-width: 1100px; margin: 0 auto; padding: 0 24px; }
.section    { padding: 64px 0; }
.section--alt { background: var(--warm-white); border-top: 1px solid var(--border); border-bottom: 1px solid var(--border); }

/* --- Flash messages --------------------------------------- */
.flash {
  padding: 12px 24px;
  font-size: 14px;
  font-weight: 500;
  text-align: center;
}
.flash--success { background: #E8F5E8; color: #2E7D32; border-bottom: 1px solid #C8E6C9; }
.flash--error   { background: #FDECEA; color: #C62828; border-bottom: 1px solid #FFCDD2; }
.flash--info    { background: var(--amber-pale); color: #7A5200; border-bottom: 1px solid #FFE082; }

/* --- Buttons ---------------------------------------------- */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 12px 24px;
  border-radius: var(--radius-pill);
  font-family: var(--sans);
  font-size: 14px;
  font-weight: 500;
  border: 1.5px solid transparent;
  cursor: pointer;
  transition: background 0.18s, transform 0.12s, box-shadow 0.18s;
  text-decoration: none;
  white-space: nowrap;
}
.btn:hover { transform: translateY(-1px); }
.btn:active { transform: translateY(0); }

.btn--primary {
  background: var(--terracotta);
  color: white;
  border-color: var(--terracotta);
}
.btn--primary:hover { background: var(--terra-hover); border-color: var(--terra-hover); box-shadow: var(--shadow-sm); }

.btn--ghost {
  background: transparent;
  color: var(--charcoal);
  border-color: var(--border);
}
.btn--ghost:hover { background: var(--warm-white); }

.btn--outline {
  background: transparent;
  color: var(--terracotta);
  border-color: var(--terracotta);
}
.btn--outline:hover { background: var(--terra-pale); }

.btn--sm  { padding: 7px 16px; font-size: 13px; }
.btn--lg  { padding: 15px 32px; font-size: 16px; }
.btn--block { width: 100%; justify-content: center; }

/* --- Nav -------------------------------------------------- */
.nav {
  background: var(--warm-white);
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 0;
  z-index: 200;
}
.nav__inner {
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 24px;
  height: 64px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}
.nav__logo {
  font-family: var(--serif);
  font-size: 20px;
  font-weight: 600;
  color: var(--terracotta);
  letter-spacing: -0.02em;
  white-space: nowrap;
  flex-shrink: 0;
}
.nav__logo span { color: var(--charcoal); }
.nav__links {
  display: flex;
  align-items: center;
  gap: 4px;
  list-style: none;
}
.nav__link {
  padding: 6px 12px;
  font-size: 14px;
  color: var(--warm-gray);
  border-radius: var(--radius-sm);
  transition: color 0.15s, background 0.15s;
}
.nav__link:hover, .nav__link--active { color: var(--terracotta); background: var(--terra-pale); }

.nav__burger {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 6px;
}
.nav__burger span {
  display: block;
  width: 22px;
  height: 2px;
  background: var(--charcoal);
  border-radius: 2px;
  transition: transform 0.2s;
}

@media (max-width: 768px) {
  .nav__burger { display: flex; }
  .nav__links {
    display: none;
    position: absolute;
    top: 64px; left: 0; right: 0;
    background: var(--warm-white);
    border-bottom: 1px solid var(--border);
    flex-direction: column;
    align-items: stretch;
    padding: 12px 24px 20px;
    gap: 4px;
    box-shadow: var(--shadow-md);
  }
  .nav__links--open { display: flex; }
  .nav__link { padding: 10px 12px; font-size: 15px; }
}

/* --- Cards ------------------------------------------------ */
.card {
  background: white;
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  transition: transform 0.2s, box-shadow 0.2s;
}
.card:hover { transform: translateY(-3px); box-shadow: var(--shadow-md); }

.card__thumb {
  width: 100%;
  height: 130px;
  object-fit: cover;
  background: var(--terra-pale);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 40px;
}
.card__thumb--amber { background: var(--amber-pale); }
.card__thumb--sage  { background: var(--sage-pale); }

.card__body { padding: 16px; }
.card__badge {
  display: inline-block;
  font-size: 11px;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  padding: 3px 10px;
  border-radius: var(--radius-pill);
  margin-bottom: 8px;
}
.card__badge--terra  { background: var(--terra-pale);  color: var(--terracotta); }
.card__badge--amber  { background: var(--amber-pale);  color: var(--amber); }
.card__badge--sage   { background: var(--sage-pale);   color: var(--sage); }

.card__location {
  font-size: 12px;
  color: var(--warm-gray);
  margin-bottom: 6px;
  display: flex;
  align-items: center;
  gap: 4px;
}
.card__title { font-family: var(--serif); font-size: 17px; font-weight: 500; margin-bottom: 8px; line-height: 1.3; }
.card__desc  { font-size: 13px; color: var(--warm-gray); line-height: 1.5; margin-bottom: 14px; }

.card__footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-top: 12px;
  border-top: 1px solid var(--light-gray);
}
.card__author {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 12px;
  color: var(--warm-gray);
}
.card__link {
  font-size: 12px;
  font-weight: 500;
  color: var(--terracotta);
  display: flex;
  align-items: center;
  gap: 3px;
  transition: gap 0.15s;
}
.card__link:hover { gap: 6px; }

/* --- Avatar ----------------------------------------------- */
.avatar {
  width: 32px; height: 32px;
  border-radius: 50%;
  background: var(--terra-pale);
  color: var(--terracotta);
  font-size: 12px;
  font-weight: 500;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.avatar--lg { width: 48px; height: 48px; font-size: 16px; }
.avatar--amber { background: var(--amber-pale); color: var(--amber); }
.avatar--sage  { background: var(--sage-pale);  color: var(--sage); }

/* --- Section header --------------------------------------- */
.section__header {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  margin-bottom: 36px;
  gap: 16px;
}
.section__label {
  font-size: 11px;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--terracotta);
  margin-bottom: 8px;
}
.see-all {
  font-size: 13px;
  color: var(--warm-gray);
  display: flex;
  align-items: center;
  gap: 4px;
  padding-bottom: 2px;
  border-bottom: 1px solid var(--border);
  white-space: nowrap;
  transition: color 0.15s, border-color 0.15s;
}
.see-all:hover { color: var(--terracotta); border-color: var(--terracotta); }

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

@media (max-width: 900px) {
  .grid--3 { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 580px) {
  .grid--3, .grid--2 { grid-template-columns: 1fr; }
}

/* --- Forms ------------------------------------------------ */
.form-group { margin-bottom: 20px; }
.form-group label {
  display: block;
  font-size: 13px;
  font-weight: 500;
  margin-bottom: 6px;
  color: var(--charcoal);
}
.form-group input,
.form-group select,
.form-group textarea {
  width: 100%;
  padding: 11px 14px;
  border: 1.5px solid var(--border);
  border-radius: var(--radius-sm);
  font-family: var(--sans);
  font-size: 14px;
  color: var(--charcoal);
  background: white;
  transition: border-color 0.15s, box-shadow 0.15s;
  outline: none;
}
.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
  border-color: var(--terracotta);
  box-shadow: 0 0 0 3px rgba(196, 97, 58, 0.12);
}
.form-group textarea { resize: vertical; min-height: 120px; }
.form-error { font-size: 12px; color: #C62828; margin-top: 4px; }
.form-hint  { font-size: 12px; color: var(--warm-gray); margin-top: 4px; }

.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
@media (max-width: 580px) { .form-row { grid-template-columns: 1fr; } }

/* --- Search bar ------------------------------------------- */
.search-bar {
  display: flex;
  align-items: center;
  gap: 8px;
  background: white;
  border: 1.5px solid var(--border);
  border-radius: var(--radius-md);
  padding: 8px 12px;
  max-width: 560px;
  transition: border-color 0.15s;
}
.search-bar:focus-within { border-color: var(--terracotta); }
.search-bar input {
  border: none !important;
  box-shadow: none !important;
  flex: 1;
  padding: 4px 0;
  font-size: 14px;
  background: transparent;
}
.search-divider { width: 1px; height: 18px; background: var(--border); flex-shrink: 0; }

/* --- Filter chips ----------------------------------------- */
.chips { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 28px; }
.chip {
  background: var(--cream);
  border: 1px solid var(--border);
  border-radius: var(--radius-pill);
  padding: 5px 14px;
  font-size: 13px;
  color: var(--warm-gray);
  cursor: pointer;
  transition: all 0.15s;
  text-decoration: none;
  white-space: nowrap;
}
.chip:hover, .chip--active {
  background: var(--terra-pale);
  border-color: var(--terracotta);
  color: var(--terracotta);
}

/* --- Stats bar -------------------------------------------- */
.stats-bar {
  background: var(--terracotta);
  padding: 28px 24px;
}
.stats-bar__inner {
  max-width: 1100px;
  margin: 0 auto;
  display: flex;
  justify-content: center;
  gap: clamp(32px, 6vw, 80px);
  flex-wrap: wrap;
}
.stat { text-align: center; }
.stat__num {
  font-family: var(--serif);
  font-size: 2rem;
  font-weight: 600;
  color: white;
  line-height: 1;
  margin-bottom: 4px;
}
.stat__label {
  font-size: 12px;
  color: rgba(255,255,255,0.75);
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

/* --- Page hero -------------------------------------------- */
.page-hero {
  background: var(--warm-white);
  border-bottom: 1px solid var(--border);
  padding: 48px 0 40px;
}
.page-hero h1 { margin-bottom: 12px; }
.page-hero p  { font-size: 16px; color: var(--warm-gray); max-width: 540px; }

/* --- Pagination ------------------------------------------- */
.pagination {
  display: flex;
  justify-content: center;
  gap: 6px;
  margin-top: 40px;
}
.pagination a, .pagination span {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px; height: 36px;
  border-radius: var(--radius-sm);
  font-size: 14px;
  border: 1px solid var(--border);
  background: white;
  color: var(--charcoal);
  transition: all 0.15s;
}
.pagination a:hover { border-color: var(--terracotta); color: var(--terracotta); }
.pagination .current { background: var(--terracotta); color: white; border-color: var(--terracotta); }

/* --- Auth pages ------------------------------------------- */
.auth-wrap {
  min-height: calc(100vh - 64px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 40px 24px;
  background: var(--cream);
}
.auth-card {
  background: white;
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 40px;
  width: 100%;
  max-width: 440px;
  box-shadow: var(--shadow-md);
}
.auth-card__header { text-align: center; margin-bottom: 32px; }
.auth-card__logo {
  font-family: var(--serif);
  font-size: 22px;
  font-weight: 600;
  color: var(--terracotta);
  margin-bottom: 8px;
}
.auth-card__logo span { color: var(--charcoal); }
.auth-card__sub { font-size: 14px; color: var(--warm-gray); }
.auth-divider {
  text-align: center;
  font-size: 13px;
  color: var(--warm-gray);
  margin: 20px 0;
  position: relative;
}
.auth-divider::before, .auth-divider::after {
  content: '';
  position: absolute;
  top: 50%;
  width: calc(50% - 24px);
  height: 1px;
  background: var(--border);
}
.auth-divider::before { left: 0; }
.auth-divider::after  { right: 0; }

/* --- Footer ----------------------------------------------- */
.footer {
  background: var(--charcoal);
  color: rgba(255,255,255,0.65);
  padding: 56px 24px 32px;
}
.footer__inner { max-width: 1100px; margin: 0 auto; }
.footer__top {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: 40px;
  margin-bottom: 40px;
}
.footer__brand .nav__logo { font-size: 20px; display: block; margin-bottom: 12px; }
.footer__brand .nav__logo span { color: rgba(255,255,255,0.5); }
.footer__brand p { font-size: 13px; line-height: 1.7; }
.footer__social { display: flex; gap: 12px; margin-top: 16px; }
.footer__social a {
  width: 34px; height: 34px;
  background: rgba(255,255,255,0.08);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: rgba(255,255,255,0.6);
  transition: background 0.15s, color 0.15s;
}
.footer__social a:hover { background: var(--terracotta); color: white; }

.footer__col h4 {
  font-family: var(--sans);
  font-size: 12px;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: white;
  margin-bottom: 14px;
}
.footer__col a {
  display: block;
  font-size: 13px;
  color: rgba(255,255,255,0.5);
  margin-bottom: 9px;
  transition: color 0.15s;
}
.footer__col a:hover { color: var(--terra-hover); }

.footer__bottom {
  padding-top: 24px;
  border-top: 1px solid rgba(255,255,255,0.1);
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 12px;
  color: rgba(255,255,255,0.3);
  flex-wrap: wrap;
  gap: 8px;
}

@media (max-width: 768px) {
  .footer__top { grid-template-columns: 1fr 1fr; }
  .footer__brand { grid-column: 1 / -1; }
}
@media (max-width: 480px) {
  .footer__top { grid-template-columns: 1fr; }
  .auth-card { padding: 28px 20px; }
}

/* --- Utility ---------------------------------------------- */
.text-center { text-align: center; }
.text-muted  { color: var(--warm-gray); }
.mt-1 { margin-top: 8px; }
.mt-2 { margin-top: 16px; }
.mt-3 { margin-top: 24px; }
.mt-4 { margin-top: 40px; }
.mb-1 { margin-bottom: 8px; }
.mb-2 { margin-bottom: 16px; }
.mb-3 { margin-bottom: 24px; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0,0,0,0); }
