/* CW Filter - Generisches CSS für alle Filter-Bereiche */
/* Verwendbar für: Gruppenprogramme, Aktivitäten, Auf zwei Rädern, Wandern, Übernachten */

/*
GENERISCHE KLASSEN (für neue Templates):
- .cw-filter-grid        -> Grid-Layout für Karten
- .cw-filter-card        -> Einzelne Karte
- .cw-filter-meta        -> Meta-Informationen in Karte
- .cw-filter-details     -> Details-Sektion in Karte
- .cw-detail             -> Detail-Seite Container

KOMPATIBILITÄTS-KLASSEN (für bestehende Templates):
- .programme-grid        -> Alias für .cw-filter-grid
- .programme-card        -> Alias für .cw-filter-card
- .programme-meta        -> Alias für .cw-filter-meta
- .programme-details     -> Alias für .cw-filter-details
- .gruppenprogramm-detail -> Alias für .cw-detail

VERWENDUNG IN NEUEN TEMPLATES:
1. CSS einbinden: {% do assets.addCss('theme://css/chweb-filter.css') %}
2. Container: <div class="cw-filter-grid">
3. Karten: <div class="cw-filter-card" data-category="kategorie">
4. Meta: <div class="cw-filter-meta">
5. Details: <div class="cw-filter-details">
*/
.page-header-image {
  position: relative;
  width: 100%;
  height: 400px;
  margin-bottom: 40px;
  overflow: hidden;
  border-radius: 12px;
  box-shadow: 0 4px 20px rgba(0,0,0,0.1);
}

.page-header-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
}

.header-overlay {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  background: linear-gradient(transparent, rgba(0,0,0,0.7));
  padding: 60px 40px 40px;
  color: white;
}

.header-title {
  margin: 0;
  font-size: 2.5em;
  font-weight: bold;
  text-shadow: 2px 2px 4px rgba(0,0,0,0.5);
}

@media (max-width: 768px) {
  .page-header-image {
    height: 250px;
    margin-bottom: 30px;
  }

  .header-overlay {
    padding: 40px 20px 20px;
  }

  .header-title {
    font-size: 1.8em;
  }
}

/* Kategoriefilter */
.category-filters {
  display: flex;
  gap: 10px;
  margin: 20px 0 30px 0;
  flex-wrap: wrap;
}

.filter-btn {
  padding: 10px 20px;
  border: 2px solid #434fbf;
  background: white;
  color: #434fbf;
  border-radius: 25px;
  cursor: pointer;
  font-weight: 500;
  transition: all 0.3s ease;
}

.filter-btn:hover {
  background: #5460c7ff;
  color: white;
}

.filter-btn.active {
  background: #434fbf;
  color: white;
}

/* Generisches Grid für alle Filter-Bereiche */
.cw-filter-grid,
.programme-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
  gap: 30px;
  margin-top: 30px;
}

/* Generische Filter-Karten */
.cw-filter-card,
.programme-card {
  border: 1px solid #ddd;
  padding: 0;
  border-radius: 12px;
  background: white;
  box-shadow: 0 2px 8px rgba(0,0,0,0.1);
  transition: all 0.3s ease, transform 0.2s ease, box-shadow 0.2s ease;
  overflow: hidden;
}

.cw-filter-card.hidden,
.programme-card.hidden {
  display: none;
}

.cw-filter-card:hover,
.programme-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 16px rgba(0,0,0,0.15);
}

/* Card Header Image */
.card-header-image {
  width: 100%;
  height: 200px;
  overflow: hidden;
  position: relative;
}

.card-header-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  transition: transform 0.3s ease;
}

.cw-filter-card:hover .card-header-image img,
.programme-card:hover .card-header-image img {
  transform: scale(1.05);
}

/* Card Content */
.card-content {
  padding: 25px;
}

.cw-filter-card h3,
.programme-card h3 {
  margin: 0 0 15px 0;
  color: #333;
  font-size: 1.4em;
}

/* Generische Meta-Informationen */
.cw-filter-meta,
.programme-meta {
  display: flex;
  gap: 15px;
  margin-bottom: 15px;
  flex-wrap: wrap;
}

.category {
  background: #434fbf;
  color: white;
  padding: 4px 12px;
  border-radius: 20px;
  font-size: 0.85em;
  font-weight: 500;
}

.duration {
  background: #28a745;
  color: white;
  padding: 4px 12px;
  border-radius: 20px;
  font-size: 0.85em;
}

.description {
  color: #666;
  line-height: 1.5;
  margin-bottom: 15px;
}

/* Generische Details-Sektion */
.cw-filter-details,
.programme-details {
  margin-bottom: 20px;
}

.price {
  font-weight: bold;
  color: #434fbf;
  margin-bottom: 5px;
}

.participants {
  background: #a5a728;
  color: white;
  padding: 4px 12px;
  border-radius: 20px;
  font-size: 0.85em;
}

.btn-more {
  display: inline-block;
  padding: 10px 20px;
  background: #434fbf;
  color: white;
  text-decoration: none;
  border-radius: 6px;
  font-weight: 500;
  transition: background-color 0.2s ease;
}

.btn-more:hover {
  background: #5460ceff;
  text-decoration: none;
}

/* Generische Detail-Seiten für alle Bereiche */
.cw-detail,
.gruppenprogramm-detail {
  width: 100%;
  margin: 0 auto;
}

.header-image {
  width: 100%;
  margin-bottom: 30px;
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 4px 20px rgba(0,0,0,0.1);
}

.header-image img {
  width: 100%;
  height: 400px;
  object-fit: cover;
  object-position: center;
}

.details-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 20px;
  margin: 30px 0;
}

.detail-item {
  background: #f8f9fa;
  padding: 20px;
  border-radius: 8px;
  border-left: 4px solid #434fbf;
}

.detail-item h4 {
  margin: 0 0 10px 0;
  color: #434fbf;
  font-size: 1.1em;
}

.detail-item p {
  margin: 0;
  color: #666;
}

.beschrieb, .included, .not-included, .variants, .hiking-route, .culinary {
  margin: 25px 0;
  padding: 20px;
  background: white;
  border-radius: 8px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

.beschrieb h3, .included h4, .not-included h4, .variants h4, .hiking-route h4, .culinary h4 {
  margin: 0 0 15px 0;
  color: #434fbf;
}

.image-gallery {
  margin: 30px 0;
}

.image-gallery h4 {
  margin: 0 0 20px 0;
  color: #434fbf;
}

.gallery-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 15px;
}

.gallery-grid img {
  width: 100%;
  height: 200px;
  object-fit: cover;
  border-radius: 8px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.1);
  transition: transform 0.2s ease;
}

.gallery-grid img:hover {
  transform: scale(1.05);
}

.contact-form {
  text-align: center;
  margin: 40px 0;
  display: flex;
  gap: 15px;
  justify-content: center;
  flex-wrap: wrap;
}

.btn {
  display: inline-block;
  padding: 12px 30px;
  background: #434fbf;
  color: white;
  text-decoration: none;
  border-radius: 6px;
  font-weight: 500;
  transition: background-color 0.2s ease;
}

.btn:hover {
  background: #5460c7;
  text-decoration: none;
}

.btn-secondary {
  background: #6c757d;
  border: none;
  cursor: pointer;
}

.btn-secondary:hover {
  background: #5a6268;
}

/* Modal Styles */
.modal {
  display: none;
  position: fixed;
  z-index: 1000;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0,0,0,0.5);
}

.modal-content {
  background-color: white;
  margin: 5% auto;
  padding: 30px;
  border-radius: 12px;
  width: 90%;
  max-width: 500px;
  position: relative;
  box-shadow: 0 10px 30px rgba(0,0,0,0.3);
}

.close {
  position: absolute;
  right: 15px;
  top: 15px;
  color: #aaa;
  font-size: 28px;
  font-weight: bold;
  cursor: pointer;
}

.close:hover {
  color: #000;
}

.modal h3 {
  margin: 0 0 20px 0;
  color: #434fbf;
}

.modal .form-group {
  margin-bottom: 15px;
}

.modal .form-group label {
  display: block;
  margin-bottom: 5px;
  font-weight: 500;
  color: #333;
}

.modal .form-group input,
.modal .form-group textarea {
  width: 100%;
  padding: 10px;
  border: 2px solid #ddd;
  border-radius: 6px;
  font-size: 14px;
  box-sizing: border-box;
}

.modal .form-group input:focus,
.modal .form-group textarea:focus {
  outline: none;
  border-color: #434fbf;
}

.modal .form-group input[readonly] {
  background-color: #f8f9fa;
  border-color: #e9ecef;
  color: #6c757d;
  cursor: not-allowed;
}

.modal .form-group input[readonly]:focus {
  border-color: #e9ecef;
  box-shadow: none;
}

.back-link {
  margin-top: 40px;
  text-align: center;
}

.back-link a {
  color: #434fbf;
  text-decoration: none;
  font-weight: 500;
}

.back-link a:hover {
  text-decoration: underline;
}

@media (max-width: 768px) {
  .cw-detail,
  .gruppenprogramm-detail {
    padding: 15px;
  }

  .header-image img {
    height: 250px;
  }

  .details-grid {
    grid-template-columns: 1fr;
  }

  .gallery-grid {
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  }

  .gallery-grid img {
    height: 150px;
  }

  /* Card Header Image auf mobilen Geräten */
  .card-header-image {
    height: 160px;
  }

  .card-content {
    padding: 20px;
  }

  .cw-filter-grid,
  .programme-grid {
    grid-template-columns: 1fr;
    gap: 20px;
  }
}