/* ==========================================
   Restaurantindernaehe.de - Modern Design
   ========================================== */

@import url('https://fonts.googleapis.com/css2?family=Open+Sans:wght@400;500;600;700;800&display=swap');

:root {
  --color-primary: #E63946;
  --color-primary-dark: #C1121F;
  --color-primary-light: #FFF0F0;
  --color-secondary: #2B2D42;
  --color-accent: #2A9D8F;
  --color-gold: #F4A261;
  --color-bg: #FFFFFF;
  --color-bg-warm: #F8F9FA;
  --color-bg-card: #FFFFFF;
  --color-text: #1D1D1D;
  --color-text-light: #6C757D;
  --color-text-muted: #ADB5BD;
  --color-border: #E9ECEF;
  --color-border-light: #F0F0F0;
  --color-success: #2A9D8F;
  --color-warning: #F4A261;
  --color-error: #E63946;
  --radius: 10px;
  --radius-sm: 6px;
  --radius-lg: 14px;
  --radius-xl: 20px;
  --shadow: 0 1px 3px rgba(0,0,0,0.06);
  --shadow-md: 0 4px 16px rgba(0,0,0,0.07);
  --shadow-lg: 0 8px 30px rgba(0,0,0,0.1);
  --shadow-hover: 0 12px 40px rgba(0,0,0,0.12);
  --max-width: 1200px;
  --font: 'Open Sans', system-ui, -apple-system, sans-serif;
}

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

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

body {
  font-family: var(--font);
  color: var(--color-text);
  background: var(--color-bg);
  line-height: 1.6;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

a { color: var(--color-primary); text-decoration: none; transition: color 0.2s; }
a:hover { color: var(--color-primary-dark); }
img { max-width: 100%; height: auto; }

/* ==========================================
   HEADER
   ========================================== */
.header {
  background: rgba(255,255,255,0.95);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--color-border);
  position: sticky;
  top: 0;
  z-index: 1000;
}
.header__inner {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0.7rem 1rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.header__logo { display: flex; align-items: center; gap: 0.4rem; font-size: 1.25rem; font-weight: 800; }
.header__logo:hover { text-decoration: none; }
.header__logo-icon { font-size: 1.35rem; }
.header__logo-text { color: var(--color-secondary); }
.header__logo-highlight { color: var(--color-primary); }
.header__logo-domain { color: var(--color-text-muted); font-weight: 400; font-size: 0.8rem; }
.header__nav { display: flex; gap: 2rem; align-items: center; }
.header__nav-link { color: var(--color-text-light); font-size: 0.88rem; font-weight: 600; padding: 0.3rem 0; position: relative; }
.header__nav-link::after {
  content: ''; position: absolute; bottom: -2px; left: 0; width: 0; height: 2px;
  background: var(--color-primary); transition: width 0.25s; border-radius: 2px;
}
.header__nav-link:hover { color: var(--color-primary); text-decoration: none; }
.header__nav-link:hover::after { width: 100%; }
.header__menu-toggle { display: none; background: none; border: none; cursor: pointer; padding: 0.5rem; }

/* ==========================================
   MAIN
   ========================================== */
.main {
  flex: 1;
  max-width: var(--max-width);
  width: 100%;
  margin: 0 auto;
  padding: 0 1rem;
}

/* ==========================================
   HERO
   ========================================== */
.hero {
  text-align: center;
  min-height: 100vh;
  display: flex;
  align-items: center;
  padding: 5rem 0 3rem;
  position: relative;
  overflow: hidden;
  background-image: url('/assets/img/restaurant-in-der-naehe.webp');
  background-size: cover;
  background-position: center;
  background-attachment: fixed;
  width: 100vw;
  margin-left: calc(-50vw + 50%);
}
.hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, rgba(0,0,0,0.75) 0%, rgba(0,0,0,0.45) 50%, rgba(0,0,0,0.7) 100%);
  pointer-events: none;
}
.hero__inner { max-width: 680px; margin: 0 auto; position: relative; }
.hero__emoji { font-size: 2.5rem; display: block; margin-bottom: 0.75rem; }
.hero__title {
  font-size: 2.5rem;
  font-weight: 800;
  line-height: 1.2;
  margin-bottom: 0.75rem;
  color: #fff;
}
.hero__title span { color: var(--color-primary); }
.hero__subtitle { font-size: 1.05rem; color: rgba(255,255,255,0.85); margin-bottom: 2.25rem; line-height: 1.7; }

/* ==========================================
   SEARCH FORM
   ========================================== */
.search-form { margin-bottom: 2.5rem; }
.search-form__input-group {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
  justify-content: center;
}
.search-form__input {
  flex: 1 1 300px;
  padding: 0.95rem 1.25rem;
  border: 2px solid var(--color-border);
  border-radius: var(--radius-xl);
  font-size: 0.95rem;
  transition: all 0.25s;
  background: var(--color-bg);
}
.search-form__input:focus { outline: none; border-color: var(--color-primary); box-shadow: 0 0 0 4px rgba(230,57,70,0.08); }
.search-form__input::placeholder { color: var(--color-text-muted); }
.search-form__radius {
  display: flex; align-items: center; gap: 0.5rem;
  margin-top: 0.75rem; justify-content: center;
  font-size: 0.85rem; color: rgba(255,255,255,0.7);
}
.search-form__radius select {
  padding: 0.35rem 0.65rem; border: 1.5px solid var(--color-border);
  border-radius: 50px; font-size: 0.85rem;
  background: var(--color-bg); cursor: pointer;
}

/* ==========================================
   BUTTONS
   ========================================== */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 0.4rem;
  padding: 0.8rem 1.75rem;
  border-radius: 50px;
  font-size: 0.9rem;
  font-weight: 700;
  cursor: pointer;
  border: 2px solid transparent;
  transition: all 0.25s;
  text-align: center;
}
.btn:hover { text-decoration: none; transform: translateY(-1px); }
.btn:active { transform: translateY(0); }
.btn--primary {
  background: var(--color-primary);
  color: #fff;
  border-color: var(--color-primary);
}
.btn--primary:hover { background: var(--color-primary-dark); border-color: var(--color-primary-dark); color: #fff; }
.btn--secondary {
  background: var(--color-bg);
  color: var(--color-primary);
  border-color: var(--color-border);
}
.btn--secondary:hover { background: var(--color-primary-light); border-color: var(--color-primary); }

/* ==========================================
   CATEGORIES
   ========================================== */
.hero__categories { margin-top: 2.5rem; }
.hero__categories-title { font-size: 0.9rem; color: rgba(255,255,255,0.7); margin-bottom: 1rem; font-weight: 600; text-transform: uppercase; letter-spacing: 0.05em; }
.hero .category-tag { background: rgba(255,255,255,0.12); border-color: rgba(255,255,255,0.2); color: rgba(255,255,255,0.9); backdrop-filter: blur(4px); }
.hero .category-tag:hover { background: rgba(255,255,255,0.2); border-color: var(--color-primary); color: #fff; }
.category-grid { display: flex; flex-wrap: wrap; gap: 0.5rem; justify-content: center; }
.category-tag {
  display: inline-flex; align-items: center; gap: 0.3rem;
  padding: 0.45rem 1.1rem;
  background: var(--color-bg-warm);
  border: 1.5px solid var(--color-border);
  border-radius: 50px;
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--color-text-light);
  transition: all 0.25s;
}
.category-tag:hover {
  background: var(--color-primary);
  color: #fff;
  border-color: var(--color-primary);
  transform: translateY(-2px);
  text-decoration: none;
}

/* ==========================================
   FEATURES
   ========================================== */
.features { padding: 2rem 0 5rem; }
.features__inner { display: grid; grid-template-columns: repeat(auto-fit, minmax(270px, 1fr)); gap: 1.25rem; }
.feature-card {
  padding: 2rem 1.5rem;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  text-align: center;
  background: var(--color-bg-card);
  transition: all 0.3s;
}
.feature-card:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-md);
  border-color: var(--color-primary);
}
.feature-card__icon { font-size: 2rem; margin-bottom: 0.75rem; display: block; }
.feature-card h3 { font-size: 1.05rem; margin-bottom: 0.4rem; color: var(--color-secondary); }
.feature-card p { color: var(--color-text-light); font-size: 0.88rem; line-height: 1.6; }

/* ==========================================
   RESULTS
   ========================================== */
.results { padding: 2rem 0; }
.results__header { margin-bottom: 1.5rem; }
.results__header h1 { font-size: 1.5rem; font-weight: 800; color: var(--color-secondary); }
.results__count { color: var(--color-text-light); font-size: 0.88rem; }
.results__layout { display: grid; grid-template-columns: 260px 1fr; gap: 2rem; }
.location-prompt {
  text-align: center; padding: 2.5rem;
  background: var(--color-bg-warm);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  margin-bottom: 2rem;
}
.location-prompt p { margin-bottom: 0.75rem; font-size: 1rem; }

/* ==========================================
   FILTERS
   ========================================== */
.results__filters {
  position: sticky; top: 5rem;
  max-height: calc(100vh - 8rem); overflow-y: auto;
  background: var(--color-bg-card);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  padding: 1.25rem;
}
.results__filters h3 { font-size: 0.95rem; font-weight: 700; color: var(--color-secondary); margin-bottom: 1rem; }
.filter-group { margin-bottom: 1.25rem; }
.filter-group label { display: flex; align-items: center; gap: 0.4rem; margin-bottom: 0.3rem; font-size: 0.85rem; color: var(--color-text-light); cursor: pointer; }
.filter-group input[type="checkbox"] { accent-color: var(--color-primary); width: 1rem; height: 1rem; }
.filter-group select { width: 100%; padding: 0.5rem 0.7rem; border: 1.5px solid var(--color-border); border-radius: var(--radius-sm); font-size: 0.85rem; background: var(--color-bg); }
.filter-group fieldset { border: none; padding: 0; }
.filter-group legend { font-weight: 700; margin-bottom: 0.4rem; font-size: 0.85rem; color: var(--color-secondary); padding: 0; }
.filter-apply { width: 100%; margin-top: 0.25rem; padding: 0.65rem; font-size: 0.85rem; }

/* ==========================================
   MAP
   ========================================== */
.results__map { height: 350px; border-radius: var(--radius-lg); border: 1px solid var(--color-border); margin-bottom: 1.5rem; overflow: hidden; }
.detail__map { height: 280px; border-radius: var(--radius-lg); border: 1px solid var(--color-border); margin-bottom: 1.5rem; overflow: hidden; }

/* ==========================================
   RESTAURANT CARD
   ========================================== */
.results__list { display: flex; flex-direction: column; gap: 0.85rem; }
.restaurant-card {
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  transition: all 0.3s;
  background: var(--color-bg-card);
}
.restaurant-card:hover {
  box-shadow: var(--shadow-md);
  transform: translateY(-2px);
  border-color: var(--color-border);
}
.restaurant-card__link { display: flex; gap: 1.25rem; padding: 1.15rem; }
.restaurant-card__link:hover { text-decoration: none; }
.restaurant-card__image {
  flex: 0 0 120px; height: 120px;
  border-radius: var(--radius-sm);
  overflow: hidden;
}
.restaurant-card__image img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.4s; }
.restaurant-card:hover .restaurant-card__image img { transform: scale(1.08); }
.restaurant-card__placeholder {
  width: 100%; height: 100%;
  display: flex; align-items: center; justify-content: center;
  font-size: 2.2rem;
  background: var(--color-bg-warm);
}
.restaurant-card__info { flex: 1; min-width: 0; }
.restaurant-card__name { font-size: 1.05rem; font-weight: 700; margin-bottom: 0.2rem; color: var(--color-secondary); }
.restaurant-card__cuisine { font-size: 0.8rem; color: var(--color-primary); font-weight: 600; margin-bottom: 0.25rem; }
.restaurant-card__address { font-size: 0.8rem; color: var(--color-text-light); margin-bottom: 0.4rem; }
.restaurant-card__meta { display: flex; gap: 0.75rem; align-items: center; margin-bottom: 0.4rem; font-size: 0.82rem; flex-wrap: wrap; }
.restaurant-card__distance { color: var(--color-text-light); font-size: 0.8rem; }
.restaurant-card__rating { color: var(--color-gold); font-weight: 700; }
.restaurant-card__price { color: var(--color-accent); font-weight: 600; }
.restaurant-card__status { font-size: 0.78rem; }

/* ==========================================
   STATUS BADGES
   ========================================== */
.status-badge {
  display: inline-block; padding: 0.15rem 0.6rem;
  border-radius: 50px; font-size: 0.72rem; font-weight: 700;
}
.status-badge--open { background: #E8F5E9; color: #2E7D32; }
.status-badge--closed { background: #FFEBEE; color: #C62828; }
.status-badge--unknown { background: var(--color-bg-warm); color: var(--color-text-muted); }

/* ==========================================
   PAGINATION
   ========================================== */
.pagination { display: flex; gap: 0.35rem; justify-content: center; margin-top: 2rem; flex-wrap: wrap; }
.pagination a, .pagination span {
  padding: 0.45rem 0.85rem;
  border: 1.5px solid var(--color-border);
  border-radius: var(--radius-sm);
  color: var(--color-text-light);
  font-size: 0.85rem; font-weight: 600;
  transition: all 0.2s;
}
.pagination a:hover { text-decoration: none; background: var(--color-primary-light); border-color: var(--color-primary); color: var(--color-primary); }
.pagination__item--active { background: var(--color-primary); color: #fff !important; border-color: var(--color-primary); }
.results__empty { text-align: center; padding: 4rem 2rem; color: var(--color-text-light); }

/* ==========================================
   DETAIL PAGE
   ========================================== */
.detail { padding: 2rem 0; }
.detail__header { margin-bottom: 1.5rem; }
.detail__header h1 { font-size: 1.7rem; font-weight: 800; color: var(--color-secondary); }
.detail__cuisines { display: flex; gap: 0.4rem; margin-top: 0.5rem; flex-wrap: wrap; }
.detail__layout { display: grid; grid-template-columns: 1fr 340px; gap: 2rem; }
.detail__info-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 0.85rem; margin-bottom: 1.5rem; }
.detail__info-card {
  padding: 1.15rem 1.35rem;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  background: var(--color-bg-card);
}
.detail__info-card h3 { font-size: 0.78rem; color: var(--color-text-muted); text-transform: uppercase; letter-spacing: 0.05em; font-weight: 700; margin-bottom: 0.4rem; }
.detail__info-card p { font-size: 0.92rem; }
.hours-table { width: 100%; font-size: 0.85rem; border-collapse: collapse; }
.hours-table td { padding: 0.25rem 0.4rem; }
.hours-table td:first-child { padding-left: 0; }
.hours-table__today { font-weight: 700; color: var(--color-primary); }
.hours-table__closed { color: var(--color-error); font-weight: 600; }
.detail__description { margin-bottom: 1.5rem; padding: 1.5rem; background: var(--color-bg-card); border: 1px solid var(--color-border); border-radius: var(--radius-lg); }
.detail__description h2 { font-size: 1.1rem; font-weight: 700; color: var(--color-secondary); margin-bottom: 0.5rem; }
.detail__features { margin-bottom: 1.5rem; }
.detail__features h2 { font-size: 1.1rem; font-weight: 700; color: var(--color-secondary); margin-bottom: 0.75rem; }
.feature-list { display: flex; flex-wrap: wrap; gap: 0.4rem; }
.feature-tag {
  padding: 0.3rem 0.8rem;
  background: var(--color-bg-warm);
  border: 1px solid var(--color-border);
  border-radius: 50px;
  font-size: 0.8rem;
  color: var(--color-text-light);
}
.detail__actions { margin-bottom: 1.5rem; }
.detail__actions h2 { font-size: 1.1rem; font-weight: 700; color: var(--color-secondary); margin-bottom: 0.75rem; }
.action-buttons { display: flex; flex-wrap: wrap; gap: 0.6rem; }
.detail__sidebar { position: sticky; top: 5rem; align-self: start; }
.detail__meta { padding: 1rem 1.15rem; border: 1px solid var(--color-border); border-radius: var(--radius-lg); font-size: 0.8rem; color: var(--color-text-light); background: var(--color-bg-card); }
.detail__similar { margin-top: 3rem; }
.detail__similar h2 { font-size: 1.1rem; font-weight: 700; color: var(--color-secondary); margin-bottom: 1rem; }
.detail__section { margin-bottom: 1.75rem; }
.detail__section h2 { font-size: 1.1rem; font-weight: 700; color: var(--color-secondary); margin-bottom: 0.75rem; }
.detail__hero { display: flex; gap: 1.5rem; align-items: flex-start; margin-bottom: 1rem; }
.detail__hero-image { flex: 0 0 280px; border-radius: var(--radius-lg); overflow: hidden; }
.detail__hero-image img { width: 100%; height: 180px; object-fit: cover; display: block; }
.detail__hero-content { flex: 1; }
.detail__hero-content h1 { font-size: 1.8rem; margin-bottom: 0.3rem; }
.detail__hero-content .status-badge { margin-top: 0.5rem; }
.detail__phone { font-size: 1.15rem; font-weight: 700; color: var(--color-primary); }
.detail__website { font-size: 0.9rem; font-weight: 600; }
.detail__rating { display: flex; align-items: center; gap: 0.5rem; }
.detail__rating-stars { color: var(--color-gold); font-size: 1.3rem; letter-spacing: 0.1em; }
.detail__rating-value { font-size: 1.05rem; font-weight: 700; color: var(--color-secondary); }
.detail__rating-count { font-size: 0.8rem; color: var(--color-text-light); }
.detail__logo { margin-bottom: 1rem; padding: 0.75rem; border: 1px solid var(--color-border); border-radius: var(--radius-lg); text-align: center; background: var(--color-bg-warm); }
.detail__logo img { max-height: 80px; object-fit: contain; }
.social-links { display: flex; flex-wrap: wrap; gap: 0.5rem; }
.social-link { display: flex; align-items: center; gap: 0.4rem; padding: 0.45rem 1rem; border: 1px solid var(--color-border); border-radius: 50px; font-size: 0.85rem; font-weight: 600; transition: all 0.2s; }
.social-link:hover { border-color: var(--color-primary); background: var(--color-primary-light); text-decoration: none; }
.social-link__icon { font-size: 1.1rem; }
.menu-items { display: flex; flex-direction: column; gap: 0.6rem; }
.menu-item { padding: 0.8rem 1.15rem; border: 1px solid var(--color-border); border-radius: var(--radius); background: var(--color-bg-card); display: flex; flex-wrap: wrap; align-items: baseline; gap: 0.25rem 0.75rem; }
.menu-item__name { font-weight: 700; color: var(--color-secondary); flex: 1; }
.menu-item__price { font-weight: 700; color: var(--color-accent); }
.menu-item__desc { width: 100%; font-size: 0.82rem; color: var(--color-text-light); }
.filter-group--city { margin-bottom: 1rem; }
.filter-city-row { display: flex; gap: 0.4rem; }
.filter-city-row .search-form__input { flex: 1; min-width: 0; padding: 0.5rem 0.7rem; font-size: 0.85rem; border: 1.5px solid var(--color-border); border-radius: var(--radius-sm); }
.filter-city-row .btn { padding: 0.5rem 0.7rem; font-size: 1rem; }

/* ==========================================
   FOOTER
   ========================================== */
.footer {
  background: var(--color-secondary);
  color: rgba(255,255,255,0.6);
  padding: 2.5rem 1rem;
  margin-top: 4rem;
}
.footer__inner { max-width: var(--max-width); margin: 0 auto; text-align: center; }
.footer__links { display: flex; gap: 1.5rem; justify-content: center; margin-bottom: 1rem; }
.footer__links a { color: rgba(255,255,255,0.6); font-size: 0.85rem; }
.footer__links a:hover { color: #fff; }
.footer__info p { font-size: 0.75rem; opacity: 0.6; }

/* ==========================================
   COOKIE CONSENT
   ========================================== */
.cookie-consent {
  position: fixed; bottom: 0; left: 0; right: 0;
  background: var(--color-secondary);
  color: #fff;
  padding: 1rem 1.5rem;
  z-index: 9999;
  display: none;
  align-items: center;
  justify-content: center;
  gap: 1rem;
  flex-wrap: wrap;
}
.cookie-consent p { font-size: 0.82rem; color: rgba(255,255,255,0.7); }
.cookie-consent .btn--secondary { color: #fff; border-color: rgba(255,255,255,0.3); background: transparent; }
.cookie-consent .btn--secondary:hover { background: rgba(255,255,255,0.1); }

/* ==========================================
   LEAFLET
   ========================================== */
.leaflet-popup-content-wrapper { border-radius: var(--radius-lg) !important; box-shadow: var(--shadow-md) !important; }
.leaflet-popup-content { margin: 0.75rem 1rem !important; }
.popup-content { font-size: 0.82rem; min-width: 180px; }
.popup-content h4 { margin-bottom: 0.2rem; font-size: 0.92rem; }

/* ==========================================
   RESPONSIVE
   ========================================== */
@media (max-width: 768px) {
  .hero__title { font-size: 1.6rem; }
  .hero__subtitle { font-size: 0.92rem; }
  .hero { padding: 5rem 1rem 3rem; }
  .search-form__input { flex: 1 1 100%; }
  .search-form__submit, .search-form__location { flex: 1; }
  .results__layout { grid-template-columns: 1fr; }
  .results__filters { position: static; max-height: none; }
  .detail__layout { grid-template-columns: 1fr; }
  .detail__sidebar { position: static; }
  .header__nav { display: none; }
  .header__nav--open { display: flex; flex-direction: column; position: absolute; top: 100%; left: 0; right: 0; background: var(--color-bg); padding: 1rem; border-bottom: 1px solid var(--color-border); gap: 0.75rem; }
  .header__menu-toggle { display: block; }
  .restaurant-card__link { flex-direction: column; }
  .restaurant-card__image { flex: 0 0 160px; height: 160px; }
  .features__inner { grid-template-columns: 1fr; }
}
