/* TwentyOne Apartments - Shared Apartment Detail Page Styles (apartment2-6) */

.apartment-header-content {
      max-width: 1200px;
      width: 100%;
      margin: 0 auto;
      animation: fadeInUp 1s ease-out;
      padding: 0 20px;
    }

.apartment-header h1 {
      font-size: 3.5rem;
      margin-bottom: 1rem;
      font-weight: 700;
      letter-spacing: -1px;
      text-shadow: 0 2px 10px rgba(0,0,0,0.3);
      line-height: 1.2;
    }

.apartment-location {
      font-size: 1.5rem;
      margin-bottom: 2rem;
      display: flex;
      align-items: center;
      text-shadow: 0 2px 10px rgba(0,0,0,0.3);
      opacity: 0.9;
    }

.apartment-location i {
      margin-right: 10px;
    }

.apartment-quick-info {
      display: flex;
      gap: 20px;
      flex-wrap: wrap;
    }

.quick-info-item {
      display: flex;
      align-items: center;
      background: rgba(255, 255, 255, 0.2);
      backdrop-filter: blur(10px);
      padding: 8px 15px;
      border-radius: 50px;
      font-weight: 500;
    }

.quick-info-item i {
      margin-right: 8px;
    }

.main-content {
      max-width: 1200px;
      margin: 0 auto;
      padding: 50px 5%;
      display: grid;
      grid-template-columns: 2fr 1fr;
      gap: 50px;
    }

.apartment-details h2 {
      font-size: 2rem;
      margin-bottom: 1.5rem;
      font-weight: 700;
      position: relative;
      color: var(--text);
    }

.apartment-details h2:after {
      content: '';
      position: absolute;
      width: 50px;
      height: 3px;
      background: var(--primary);
      bottom: -10px;
      left: 0;
    }

.apartment-description {
      margin-bottom: 40px;
      color: var(--text);
      font-size: 1.1rem;
      line-height: 1.8;
    }

.highlights {
      display: flex;
      flex-wrap: wrap;
      gap: 15px;
      margin-bottom: 40px;
    }

.highlight-item {
      flex: 1 0 240px;
      display: flex;
      align-items: center;
      padding: 15px;
      background: var(--card-bg);
      border-radius: 10px;
      box-shadow: var(--card-shadow);
    }

.highlight-icon {
      width: 40px;
      height: 40px;
      margin-right: 15px;
      display: flex;
      align-items: center;
      justify-content: center;
      color: var(--primary-dark);
      font-size: 1.2rem;
    }

.highlight-text {
      font-weight: 500;
    }

.feature-categories-buttons {
      margin: 40px 0;
    }

.feature-categories-buttons h3 {
      font-size: 1.3rem;
      margin-bottom: 20px;
      text-align: center;
    }

.category-buttons {
      display: flex;
      flex-wrap: wrap;
      gap: 15px;
      justify-content: center;
    }

.category-button {
      background: var(--card-bg);
      border: 1px solid rgba(176,196,222,0.3);
      border-radius: 10px;
      padding: 15px 25px;
      display: flex;
      align-items: center;
      gap: 10px;
      font-size: 1.1rem;
      cursor: pointer;
      transition: var(--transition);
      color: var(--text);
      font-weight: 500;
      box-shadow: var(--card-shadow);
    }

.category-button:focus-visible {
      outline: 3px solid var(--primary, #B0C4DE);
      outline-offset: 2px;
    }

.category-button:hover {
      transform: translateY(-3px);
      box-shadow: 0 10px 25px rgba(0,0,0,0.1);
      border-color: var(--primary);
    }

.category-button i {
      color: var(--primary);
      font-size: 1.2rem;
    }

.modal-overlay {
      position: fixed;
      top: 0;
      left: 0;
      right: 0;
      bottom: 0;
      background-color: rgba(0, 0, 0, 0.7);
      display: none;
      z-index: 2000;
      justify-content: center;
      align-items: center;
      padding: 20px;
    }

.modal-overlay.active {
      display: flex;
    }

.modal-container {
      background-color: var(--card-bg);
      padding: 0;
      border-radius: 20px;
      max-width: 900px;
      width: 90%;
      max-height: 85vh;
      overflow-y: auto;
      box-shadow: 0 10px 30px rgba(0,0,0,0.3);
      animation: modalFadeIn 0.3s ease-out;
    }

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

.modal-header {
      display: flex;
      justify-content: space-between;
      align-items: center;
      padding: 20px 30px;
      border-bottom: 1px solid rgba(176,196,222,0.2);
      position: sticky;
      top: 0;
      background: var(--card-bg);
      z-index: 10;
    }

.modal-title {
      font-size: 1.5rem;
      margin: 0;
      display: flex;
      align-items: center;
      gap: 15px;
    }

.modal-title i {
      color: var(--primary);
    }

.modal-close {
      font-size: 2rem;
      cursor: pointer;
      transition: var(--transition);
      width: 40px;
      height: 40px;
      display: flex;
      align-items: center;
      justify-content: center;
      border-radius: 50%;
    }

.modal-close:hover {
      background: rgba(176,196,222,0.1);
      color: var(--primary);
    }

.modal-close:focus-visible {
      outline: 3px solid var(--primary, #B0C4DE);
      outline-offset: 2px;
      background: rgba(176,196,222,0.15);
    }

.modal-body {
      padding: 20px 30px 30px;
    }

.modal-features-grid {
      display: grid;
      grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
      gap: 20px;
    }

body.modal-open {
      overflow: hidden;
    }

.feature-item {
      display: flex;
      align-items: center;
      padding: 15px;
      background: var(--card-bg);
      border-radius: 10px;
      box-shadow: var(--card-shadow);
      transition: var(--transition);
    }

.feature-item:hover {
      transform: translateY(-5px);
      box-shadow: 0 10px 25px rgba(0,0,0,0.15);
    }

.feature-icon {
      width: 50px;
      height: 50px;
      background: rgba(176,196,222,0.1);
      border-radius: 50%;
      display: flex;
      align-items: center;
      justify-content: center;
      margin-right: 15px;
      color: var(--primary);
      font-size: 1.5rem;
      flex-shrink: 0;
    }

.feature-text {
      font-weight: 500;
    }

.gallery {
      margin-bottom: 40px;
      position: relative;
    }

.gallery-grid {
      display: grid;
      grid-template-columns: repeat(4, 1fr);
      grid-auto-rows: 130px;
      gap: 10px;
      margin-bottom: 40px;
    }

/* Mosaik: erstes Bild groß (2x2), Bilder 2-5 füllen die restlichen Zellen automatisch.
   Alle weiteren Bilder bleiben im DOM (für die Lightbox-Navigation), sind aber im
   Grid selbst nicht sichtbar - so wirkt die Übersicht aufgeräumt, ohne Bilder zu verlieren. */
.gallery-item:first-child {
      grid-column: span 2;
      grid-row: span 2;
    }

.gallery-item:nth-child(n+6) {
      display: none;
    }

.gallery-item {
      position: relative;
      overflow: hidden;
      border-radius: 10px;
      cursor: pointer;
      transition: all 0.3s ease;
      background-color: #f0f0f0;
    }

.gallery-item:hover {
      transform: scale(1.03);
      box-shadow: 0 5px 15px rgba(0,0,0,0.2);
    }

.gallery-thumbnail {
      width: 100%;
      height: 100%;
      object-fit: cover;
      transition: all 0.3s ease;
    }

/* "Alle Fotos ansehen"-Overlay, wird per JS auf das 5. Bild gelegt, wenn mehr als
   5 Fotos vorhanden sind - Klick öffnet die Lightbox, von dort aus normal weiterblättern. */
.gallery-show-all {
      position: absolute;
      inset: 0;
      background: rgba(0,0,0,0.55);
      color: white;
      display: flex;
      align-items: center;
      justify-content: center;
      text-align: center;
      font-weight: 600;
      font-size: 0.95rem;
      line-height: 1.4;
      pointer-events: none;
    }

@media (max-width: 600px) {
  .gallery-grid {
          grid-template-columns: repeat(2, 1fr);
          grid-auto-rows: 140px;
        }
}

.lightbox {
      position: fixed;
      top: 0;
      left: 0;
      width: 100%;
      height: 100%;
      background: rgba(10,10,16,0.55);
      backdrop-filter: blur(16px);
      -webkit-backdrop-filter: blur(16px);
      display: none;
      z-index: 2000;
      justify-content: center;
      align-items: center;
      overflow: hidden;
    }

.lightbox.active {
      display: flex;
    }

.lightbox-content {
      position: relative;
      max-width: 55%;
      max-height: 70vh;
      margin: auto;
      z-index: 2;
    }

.lightbox-image {
      max-width: 100%;
      max-height: 55vh;
      display: block;
      border-radius: 5px;
      box-shadow: 0 5px 25px rgba(0,0,0,0.5);
      transition: opacity 0.18s ease;
      position: relative;
      z-index: 2;
    }

/* Peek-Bilder: Vorgänger/Nachfolger, angedeutet links und rechts vom aktuellen
   Bild - werden per JS erzeugt und aktualisiert (kein Eingriff in die einzelnen
   Apartment-HTML-Dateien nötig). */
.lightbox-peek {
      position: absolute;
      top: 50%;
      transform: translateY(-50%);
      max-height: 38vh;
      max-width: 18vw;
      border-radius: 6px;
      opacity: 0.28;
      filter: blur(0.5px) brightness(0.55);
      box-shadow: 0 10px 30px rgba(0,0,0,0.4);
      transition: opacity 0.2s ease;
      cursor: pointer;
      z-index: 1;
    }

.lightbox-peek-prev {
      right: calc(100% + 20px);
    }

.lightbox-peek-next {
      left: calc(100% + 20px);
    }

@media (max-width: 900px) {
  .lightbox-peek {
          display: none;
        }

  .lightbox-content {
          max-width: 90%;
        }
}

.lightbox-close {
      position: absolute;
      top: 20px;
      right: 20px;
      width: 40px;
      height: 40px;
      display: flex;
      align-items: center;
      justify-content: center;
      font-size: 26px;
      line-height: 1;
      color: white;
      background: rgba(20, 20, 24, 0.65);
      border: 2px solid rgba(255,255,255,0.85);
      border-radius: 50%;
      cursor: pointer;
      z-index: 2010;
      box-shadow: 0 2px 10px rgba(0,0,0,0.3);
    }

.lightbox-close:hover {
      background: rgba(0, 0, 0, 0.85);
    }

.lightbox-nav {
      position: absolute;
      width: 100%;
      top: 50%;
      transform: translateY(-50%);
      display: flex;
      justify-content: space-between;
      padding: 0 20px;
      box-sizing: border-box;
      z-index: 6;
    }

.lightbox-nav button {
      background: rgba(20, 20, 24, 0.65);
      border: 2px solid rgba(255,255,255,0.85);
      color: white;
      width: 46px;
      height: 46px;
      border-radius: 50%;
      font-size: 20px;
      cursor: pointer;
      transition: var(--transition);
      display: flex;
      align-items: center;
      justify-content: center;
      z-index: 5;
      box-shadow: 0 2px 10px rgba(0,0,0,0.3);
    }

.lightbox-nav button:hover {
      background: rgba(0, 0, 0, 0.85);
    }

.lightbox-counter {
      position: absolute;
      bottom: -36px;
      left: 50%;
      transform: translateX(-50%);
      color: white;
      background: rgba(20, 20, 24, 0.65);
      padding: 5px 14px;
      border-radius: 999px;
      font-size: 14px;
      white-space: nowrap;
    }

.map-container {
      height: 300px;
      border-radius: 20px;
      overflow: hidden;
      margin-bottom: 40px;
      box-shadow: var(--card-shadow);
    }

.reviews {
      margin-bottom: 40px;
    }

.review-summary {
      display: flex;
      gap: 30px;
      flex-wrap: wrap;
      margin-bottom: 20px;
    }

.booking-rating, .airbnb-rating {
      background: var(--card-bg);
      padding: 20px;
      border-radius: 10px;
      box-shadow: var(--card-shadow);
      flex: 1;
      min-width: 200px;
      display: flex;
      flex-direction: column;
      align-items: center;
    }

.rating-platform {
      display: flex;
      align-items: center;
      margin-bottom: 15px;
    }

.rating-platform img {
      height: 30px;
      margin-right: 10px;
    }

.rating-score {
      font-size: 2.5rem;
      font-weight: 700;
      color: var(--primary-dark);
      margin-bottom: 5px;
    }

.rating-stars {
      font-size: 1.5rem;
      color: gold;
      margin-bottom: 5px;
    }

.rating-label {
      font-weight: 600;
      margin-bottom: 5px;
    }

.award-badge {
      display: flex;
      align-items: center;
      margin-top: 10px;
      padding: 8px 12px;
      background-color: #FFD700;
      border-radius: 5px;
      font-weight: 600;
      font-size: 0.85rem;
      color: #333;
    }

.award-badge i {
      margin-right: 7px;
      font-size: 1rem;
    }

.reviews-cta {
      display: flex;
      gap: 15px;
      flex-wrap: wrap;
    }

.reviews-cta a {
      flex: 1;
      min-width: 200px;
    }

.sidebar {
      position: sticky;
      top: 120px;
      height: fit-content;
      display: flex;
      flex-direction: column;
    }

.booking-card {
      background: var(--card-bg);
      padding: 30px;
      border-radius: 20px;
      box-shadow: var(--card-shadow);
      border: var(--card-border);
      margin-bottom: 30px;
    }

.booking-card h3 {
      font-size: 1.5rem;
      margin-top: 0;
      margin-bottom: 20px;
      color: var(--text);
    }

.price-container {
      display: flex;
      align-items: baseline;
      margin-bottom: 20px;
    }

.price {
      font-size: 2rem;
      font-weight: 700;
      color: var(--primary-dark);
    }

.price-period {
      margin-left: 5px;
      color: var(--subtle);
    }

.booking-form label {
      display: block;
      margin-bottom: 10px;
      font-weight: 500;
      color: var(--text);
    }

.booking-form input {
      width: 100%;
      padding: 12px 15px;
      border-radius: 10px;
      border: 1px solid #ddd;
      margin-bottom: 15px;
      font-size: 1rem;
      background: var(--bg);
      color: var(--text);
    }

.btn {
      background: var(--primary);
      border: none;
      padding: 15px 0;
      border-radius: 10px;
      color: white;
      cursor: pointer;
      font-size: 1rem;
      font-weight: 600;
      transition: var(--transition);
      box-shadow: 0 2px 10px rgba(176,196,222,0.3);
      text-decoration: none;
      display: block;
      text-align: center;
      width: 100%;
    }

.btn:hover {
      background: var(--primary-dark);
      transform: translateY(-3px);
      box-shadow: 0 5px 20px rgba(176,196,222,0.5);
    }

.btn-outline {
      background: transparent;
      border: 2px solid var(--primary);
      color: var(--primary);
      margin-top: 10px;
    }

.btn-outline:hover {
      background: var(--primary);
      color: white;
    }

.host-card-container {
      margin-top: 1cm;
    }

.host-card {
      background: var(--card-bg);
      padding: 30px;
      padding-bottom: 100px;
      margin-bottom: 1cm;
      border-radius: 20px;
      box-shadow: var(--card-shadow);
      border: var(--card-border);
      display: flex;
      flex-direction: column;
      align-items: center;
      text-align: center;
      color: var(--text);
      position: relative;
      padding-top: calc(100px - 0.4cm);
      margin-top: 0.4cm;
      border-top: none;
    }

.host-thumbnail {
      position: relative;
      margin: 0 auto;
      top: -50px;
      left: 0;
      transform: none;
      width: 110px;
      height: 110px;
      border-radius: 12px;
      overflow: hidden;
      box-shadow: var(--card-shadow);
      margin-bottom: 20px;
    }

.host-thumbnail img {
      width: 100%;
      height: 100%;
      object-fit: cover;
    }

.host-name {
      font-size: 1.3rem;
      font-weight: 600;
      margin-bottom: 5px;
      margin-top: -10px;
      color: var(--text);
    }

.host-title {
      color: var(--subtle);
      margin-bottom: 10px;
      position: relative;
      display: inline-block;
    }

.host-contact {
      display: flex;
      gap: 20px;
      margin-top: 20px;
      justify-content: center;
      position: absolute;
      bottom: 25px;
      left: 0;
      right: 0;
    }

.host-contact a {
      width: 50px;
      height: 50px;
      border-radius: 50%;
      background: rgba(176,196,222,0.1);
      display: flex;
      align-items: center;
      justify-content: center;
      color: var(--primary);
      transition: var(--transition);
      font-size: 1.2rem;
    }

.host-contact a:hover {
      background: var(--primary);
      color: white;
      transform: translateY(-3px);
    }

.similar-apartments {
      max-width: 1200px;
      margin: 0 auto;
      padding: 30px 5% 60px;
    }

.similar-apartments h2 {
      font-size: 2rem;
      margin-bottom: 30px;
      font-weight: 700;
      position: relative;
      color: var(--text);
    }

.similar-apartments h2:after {
      content: '';
      position: absolute;
      width: 50px;
      height: 3px;
      background: var(--primary);
      bottom: -10px;
      left: 0;
    }

.similar-grid {
      display: grid;
      grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
      gap: 30px;
    }

.similar-apartment {
      background: var(--card-bg);
      border-radius: 20px;
      overflow: hidden;
      box-shadow: var(--card-shadow);
      transition: var(--transition);
      text-decoration: none;
      color: var(--text);
      display: block;
    }

.similar-apartment:hover {
      transform: translateY(-5px);
      box-shadow: 0 10px 25px rgba(0,0,0,0.15);
    }

.similar-img {
      height: 200px;
      background-size: cover;
      background-position: center;
    }

.similar-content {
      padding: 20px;
    }

.similar-title {
      font-size: 1.2rem;
      font-weight: 600;
      margin-bottom: 5px;
    }

.similar-location {
      font-size: 0.9rem;
      color: var(--subtle);
      margin-bottom: 10px;
      display: flex;
      align-items: center;
    }

.similar-location i {
      margin-right: 5px;
    }

.similar-features {
      display: flex;
      gap: 15px;
      font-size: 0.9rem;
      color: var(--subtle);
    }

.similar-feature {
      display: flex;
      align-items: center;
    }

.similar-feature i {
      margin-right: 5px;
    }

@media (max-width: 768px) {
  .apartment-header {
          height: auto;
          min-height: 50vh;
          padding: 40px 5% 25px;
          overflow: visible;
        }

  .apartment-header h1 {
          font-size: 2rem;
        }

  .apartment-location {
          font-size: 1.1rem;
          margin-bottom: 1.2rem;
        }

  .apartment-quick-info {
          gap: 8px;
        }

  .quick-info-item {
          padding: 6px 12px;
          font-size: 0.8rem;
        }

  .quick-info-item i {
          margin-right: 6px;
          font-size: 0.85rem;
        }

  .review-summary {
          flex-direction: column;
          gap: 15px;
        }

  .gallery-grid {
          grid-template-columns: repeat(3, 1fr);
        }

  .category-button {
          padding: 12px 20px;
          font-size: 1rem;
        }

  .modal-features-grid {
          grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
        }

}

@media (max-width: 480px) {
  .gallery-grid {
          grid-template-columns: repeat(2, 1fr);
          gap: 5px;
        }

}

@media (max-width: 992px) {
  .main-content {
          grid-template-columns: 1fr;
        }

  .sidebar {
          position: static;
        }

  .gallery-grid {
          grid-template-columns: repeat(4, 1fr);
        }

}

