/* ============================================================
   Ferienwohnung Hoamatglück — Hauptstylesheet
   Stack: Bootstrap 5.3 + Custom Alpine Design
   ============================================================ */

/* --- Web Fonts -------------------------------------------- */
@font-face {
  font-family: 'Harrington';
  src: url('../fonts/harrington.ttf') format('truetype');
  font-weight: normal;
  font-style: normal;
  font-display: swap;
}

/* --- Variablen -------------------------------------------- */
:root {
  --green-dark:   #2D5016;
  --green-mid:    #4A7C2F;
  --green-light:  #7EB356;
  --cream:        #F5F0E8;
  --cream-dark:   #EAE2D0;
  --brown:        #8B6914;
  --brown-light:  #C4932A;
  --text-dark:    #2C2C2C;
  --text-mid:     #555;
  --shadow-sm:    0 2px 8px rgba(0,0,0,0.10);
  --shadow-md:    0 4px 20px rgba(0,0,0,0.14);
  --radius:       8px;
  --transition:   0.25s ease;
}

/* --- Base ------------------------------------------------- */
*, *::before, *::after { box-sizing: border-box; }

body {
  font-family: 'Lato', sans-serif;
  color: var(--text-dark);
  background: #fff;
  font-size: 1rem;
  line-height: 1.65;
}

h1, h2, h3, h4, h5 {
  font-family: 'Playfair Display', Georgia, serif;
  color: var(--green-dark);
  line-height: 1.25;
}

a { color: var(--green-dark); text-decoration: none; transition: color var(--transition); }
a:hover { color: var(--brown); }

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

/* --- Navigation ------------------------------------------- */
.navbar-hoamat {
  background: var(--green-dark);
  padding: 0.6rem 0;
  box-shadow: var(--shadow-md);
}

.navbar-hoamat .navbar-brand {
  display: flex;
  align-items: center;
  gap: 0.6rem;
}

.navbar-hoamat .navbar-brand img {
  height: 48px;
  filter: brightness(0) invert(1);
}

.navbar-hoamat .navbar-brand .brand-name {
  font-family: 'Harrington', Georgia, serif;
  font-size: 2.6rem;
  color: #fff;
  line-height: 1;
  letter-spacing: 0.5px;
}

.navbar-hoamat .nav-link {
  color: rgba(255,255,255,0.88) !important;
  font-size: 0.95rem;
  font-weight: 600;
  letter-spacing: 0.5px;
  padding: 0.5rem 1rem !important;
  border-radius: 4px;
  transition: background var(--transition), color var(--transition);
}

.navbar-hoamat .nav-link:hover,
.navbar-hoamat .nav-link.active {
  background: rgba(255,255,255,0.15);
  color: #fff !important;
}

.navbar-hoamat .navbar-toggler {
  border-color: rgba(255,255,255,0.4);
}
.navbar-hoamat .navbar-toggler-icon {
  background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 30 30'%3e%3cpath stroke='rgba%28255,255,255,0.85%29' stroke-width='2' d='M4 7h22M4 15h22M4 23h22'/%3e%3c/svg%3e");
}

/* --- Hero ------------------------------------------------- */
.hero {
  position: relative;
  height: 85vh;
  min-height: 500px;
  max-height: 800px;
  overflow: hidden;
  background: var(--green-dark);
}

.hero-slide {
  position: absolute;
  inset: 0;
  background-size: cover;
  background-position: center;
  opacity: 0;
  transition: opacity 1.2s ease;
}
.hero-slide.active { opacity: 1; }

.hero-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(
    to bottom,
    rgba(0,0,0,0.15) 0%,
    rgba(0,0,0,0.45) 60%,
    rgba(0,0,0,0.65) 100%
  );
}

.hero-content {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  padding: 3rem 2rem 3.5rem;
  color: #fff;
  text-align: center;
}

.hero-content h1 {
  color: #fff;
  font-size: clamp(2rem, 5vw, 3.5rem);
  text-shadow: 0 2px 12px rgba(0,0,0,0.5);
  margin-bottom: 0.5rem;
}

.hero-content .tagline {
  font-size: clamp(1rem, 2vw, 1.3rem);
  color: rgba(255,255,255,0.9);
  margin-bottom: 2rem;
  font-style: italic;
}

/* Slide-Dots */
.hero-dots {
  position: absolute;
  bottom: 1.2rem;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  gap: 8px;
  z-index: 10;
}
.hero-dot {
  width: 10px; height: 10px;
  border-radius: 50%;
  background: rgba(255,255,255,0.5);
  cursor: pointer;
  border: none;
  transition: background var(--transition);
}
.hero-dot.active { background: #fff; }

/* --- Buttons --------------------------------------------- */
.btn-hoamat {
  background: var(--green-dark);
  color: #fff;
  border: none;
  padding: 0.7rem 2rem;
  border-radius: 50px;
  font-weight: 700;
  font-size: 1rem;
  letter-spacing: 0.5px;
  transition: background var(--transition), transform 0.15s;
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
}
.btn-hoamat:hover { background: var(--green-mid); color: #fff; transform: translateY(-1px); }

.btn-brown {
  background: var(--brown);
  color: #fff;
  border: none;
  padding: 0.7rem 2rem;
  border-radius: 50px;
  font-weight: 700;
  transition: background var(--transition);
}
.btn-brown:hover { background: var(--brown-light); color: #fff; }

.btn-outline-hoamat {
  border: 2px solid var(--green-dark);
  color: var(--green-dark);
  background: transparent;
  padding: 0.6rem 1.8rem;
  border-radius: 50px;
  font-weight: 700;
  transition: all var(--transition);
}
.btn-outline-hoamat:hover {
  background: var(--green-dark);
  color: #fff;
}

/* --- Section Layout --------------------------------------- */
.section-cream { background: var(--cream); }
.section-white { background: #fff; }

.section-title {
  font-size: clamp(1.6rem, 3vw, 2.4rem);
  margin-bottom: 0.5rem;
}
.section-title::after {
  content: '';
  display: block;
  width: 50px;
  height: 3px;
  background: var(--brown);
  margin: 0.6rem auto 0;
}
.section-title.text-start::after { margin-left: 0; }

.section-subtitle {
  color: var(--text-mid);
  font-size: 1.05rem;
  margin-bottom: 2.5rem;
}

/* --- Highlight Cards (Startseite) ------------------------ */
.highlight-card {
  background: #fff;
  border-radius: var(--radius);
  padding: 2rem 1.5rem;
  text-align: center;
  box-shadow: var(--shadow-sm);
  height: 100%;
  transition: box-shadow var(--transition), transform var(--transition);
}
.highlight-card:hover { box-shadow: var(--shadow-md); transform: translateY(-3px); }

.highlight-icon {
  width: 56px; height: 56px;
  background: var(--cream);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 1rem;
  font-size: 1.6rem;
  color: var(--green-dark);
}

.highlight-card h3 {
  font-size: 1.1rem;
  font-family: 'Lato', sans-serif;
  font-weight: 700;
  margin-bottom: 0.4rem;
}
.highlight-card p { font-size: 0.9rem; color: var(--text-mid); margin: 0; }

/* --- Galerie --------------------------------------------- */
.gallery-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 12px;
}

.gallery-item {
  position: relative;
  overflow: hidden;
  border-radius: var(--radius);
  aspect-ratio: 4/3;
  cursor: pointer;
  background: var(--cream-dark);
}

.gallery-item img {
  width: 100%; height: 100%;
  object-fit: cover;
  transition: transform 0.4s ease;
}
.gallery-item:hover img { transform: scale(1.05); }

.gallery-item .overlay {
  position: absolute;
  inset: 0;
  background: rgba(0,0,0,0);
  transition: background var(--transition);
  display: flex;
  align-items: center;
  justify-content: center;
}
.gallery-item:hover .overlay { background: rgba(0,0,0,0.25); }
.gallery-item .overlay i { color: #fff; font-size: 2rem; opacity: 0; transition: opacity var(--transition); }
.gallery-item:hover .overlay i { opacity: 1; }

/* Lightbox */
.lightbox {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.92);
  z-index: 9999;
  align-items: center;
  justify-content: center;
}
.lightbox.open { display: flex; }
.lightbox img {
  max-width: 90vw;
  max-height: 88vh;
  border-radius: var(--radius);
  object-fit: contain;
}
.lightbox-close {
  position: absolute;
  top: 1.2rem; right: 1.5rem;
  color: #fff; font-size: 2rem; cursor: pointer; background: none; border: none;
}
.lightbox-prev, .lightbox-next {
  position: absolute;
  top: 50%; transform: translateY(-50%);
  color: #fff; font-size: 2.5rem; cursor: pointer; background: none; border: none;
  padding: 1rem;
  opacity: 0.7;
  transition: opacity var(--transition);
}
.lightbox-prev:hover, .lightbox-next:hover { opacity: 1; }
.lightbox-prev { left: 1rem; }
.lightbox-next { right: 1rem; }
.lightbox-caption {
  position: absolute;
  bottom: 1.2rem;
  left: 50%; transform: translateX(-50%);
  color: rgba(255,255,255,0.8);
  font-size: 0.9rem;
  background: rgba(0,0,0,0.4);
  padding: 0.3rem 1rem;
  border-radius: 20px;
}

/* --- Ausstattung ----------------------------------------- */
.feature-list { list-style: none; padding: 0; }
.feature-list li {
  padding: 0.5rem 0;
  border-bottom: 1px solid var(--cream-dark);
  display: flex;
  align-items: flex-start;
  gap: 0.6rem;
}
.feature-list li:last-child { border-bottom: none; }
.feature-list li i { color: var(--green-mid); margin-top: 2px; flex-shrink: 0; }

.feature-category {
  background: #fff;
  border-radius: var(--radius);
  padding: 1.8rem;
  box-shadow: var(--shadow-sm);
  height: 100%;
}
.feature-category h3 {
  font-size: 1.15rem;
  font-family: 'Lato', sans-serif;
  font-weight: 700;
  border-bottom: 2px solid var(--cream-dark);
  padding-bottom: 0.6rem;
  margin-bottom: 1rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

/* --- Preise ---------------------------------------------- */
.price-card {
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow-md);
  height: 100%;
}
.price-card-header {
  padding: 2rem;
  text-align: center;
  color: #fff;
}
.price-card-header.summer { background: linear-gradient(135deg, #4A7C2F, #7EB356); }
.price-card-header.winter { background: linear-gradient(135deg, #1a3d6e, #3a6ea8); }
.price-card-header .price-amount {
  font-family: 'Playfair Display', serif;
  font-size: 3rem;
  font-weight: 700;
  line-height: 1;
}
.price-card-header .price-unit { font-size: 0.9rem; opacity: 0.85; }
.price-card-body { padding: 2rem; background: #fff; }
.price-card-body ul { list-style: none; padding: 0; }
.price-card-body li { padding: 0.4rem 0; display: flex; gap: 0.5rem; align-items: flex-start; }
.price-card-body li i { color: var(--green-mid); flex-shrink: 0; margin-top: 2px; }

/* --- Buchungskalender ------------------------------------ */
.booking-section { background: var(--cream); }

.calendar-wrap {
  background: #fff;
  border-radius: var(--radius);
  box-shadow: var(--shadow-md);
  padding: 1.5rem;
}

.cal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 1rem;
}
.cal-header h4 { margin: 0; font-size: 1.05rem; font-family: 'Lato', sans-serif; font-weight: 700; }
.cal-nav {
  background: none;
  border: 1px solid var(--cream-dark);
  border-radius: 4px;
  width: 32px; height: 32px;
  display: flex; align-items: center; justify-content: center;
  cursor: pointer;
  transition: background var(--transition);
}
.cal-nav:hover { background: var(--cream); }

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

.cal-weekday {
  text-align: center;
  font-size: 0.75rem;
  font-weight: 700;
  color: var(--text-mid);
  padding: 0.4rem 0;
  text-transform: uppercase;
}

.cal-day {
  aspect-ratio: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.85rem;
  border-radius: 4px;
  cursor: pointer;
  transition: background var(--transition);
  position: relative;
  border: none;
  background: none;
}
.cal-day:hover:not(.booked):not(.blocked):not(.past) { background: var(--cream); }
.cal-day.today { font-weight: 700; color: var(--green-dark); }
.cal-day.past  { color: #ccc; cursor: default; }
.cal-day.booked  { background: #fee2e2; color: #999; cursor: not-available; text-decoration: line-through; }
.cal-day.blocked { background: #fef3c7; color: #999; cursor: not-allowed; }
.cal-day.selected-start, .cal-day.selected-end {
  background: var(--green-dark);
  color: #fff;
  font-weight: 700;
}
.cal-day.in-range {
  background: #dcfce7;
  color: var(--green-dark);
}
.cal-day.empty { cursor: default; }

.cal-legend {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
  margin-top: 0.8rem;
  font-size: 0.8rem;
  color: var(--text-mid);
}
.cal-legend-dot {
  width: 12px; height: 12px;
  border-radius: 2px;
  display: inline-block;
  margin-right: 4px;
  vertical-align: middle;
}

.booking-summary {
  background: var(--cream);
  border-radius: var(--radius);
  padding: 1.2rem 1.5rem;
  margin-top: 1rem;
  font-size: 0.95rem;
}
.booking-summary strong { color: var(--green-dark); }

/* Booking Form */
.booking-form-wrap {
  background: #fff;
  border-radius: var(--radius);
  box-shadow: var(--shadow-md);
  padding: 2rem;
}
.form-label { font-weight: 600; font-size: 0.9rem; color: var(--text-dark); }
.form-control:focus, .form-select:focus {
  border-color: var(--green-mid);
  box-shadow: 0 0 0 3px rgba(74,124,47,0.15);
}

/* --- Lage ------------------------------------------------- */
.map-container {
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow-md);
}
.map-container iframe {
  width: 100%;
  height: 400px;
  border: 0;
  display: block;
}

.info-box {
  background: #fff;
  border-radius: var(--radius);
  padding: 1.5rem;
  box-shadow: var(--shadow-sm);
}
.info-box h4 { font-size: 1rem; font-family: 'Lato', sans-serif; font-weight: 700; }

/* --- Kontakt --------------------------------------------- */
.contact-card {
  background: var(--green-dark);
  color: #fff;
  border-radius: var(--radius);
  padding: 2.5rem;
}
.contact-card h2, .contact-card h3 { color: #fff; }
.contact-card a { color: rgba(255,255,255,0.85); }
.contact-card a:hover { color: #fff; }
.contact-item {
  display: flex;
  align-items: flex-start;
  gap: 0.8rem;
  padding: 0.6rem 0;
  border-bottom: 1px solid rgba(255,255,255,0.15);
}
.contact-item:last-child { border-bottom: none; }
.contact-item i { font-size: 1.1rem; margin-top: 2px; opacity: 0.8; }

/* --- Footer ---------------------------------------------- */
.footer-hoamat {
  background: var(--text-dark);
  color: rgba(255,255,255,0.7);
  padding: 3rem 0 1.5rem;
}
.footer-hoamat h5 { color: #fff; font-family: 'Lato', sans-serif; font-weight: 700; font-size: 0.95rem; }
.footer-hoamat a { color: rgba(255,255,255,0.65); font-size: 0.9rem; }
.footer-hoamat a:hover { color: #fff; }
.footer-hoamat .footer-bottom {
  border-top: 1px solid rgba(255,255,255,0.1);
  margin-top: 2rem;
  padding-top: 1.5rem;
  font-size: 0.85rem;
  text-align: center;
}
.footer-logo img { height: 40px; filter: brightness(0) invert(1); opacity: 0.8; }

/* --- Admin ---------------------------------------------- */
.admin-sidebar {
  background: var(--green-dark);
  min-height: 100vh;
  padding: 0;
}
.admin-sidebar .nav-link {
  color: rgba(255,255,255,0.75);
  padding: 0.75rem 1.5rem;
  border-radius: 0;
  font-size: 0.9rem;
  display: flex;
  align-items: center;
  gap: 0.6rem;
  transition: background var(--transition);
}
.admin-sidebar .nav-link:hover,
.admin-sidebar .nav-link.active {
  background: rgba(255,255,255,0.15);
  color: #fff;
}
.admin-sidebar .nav-link i { width: 18px; text-align: center; }
.admin-sidebar .sidebar-brand {
  padding: 1.5rem;
  border-bottom: 1px solid rgba(255,255,255,0.15);
  color: #fff;
  font-weight: 700;
  font-size: 1.05rem;
  font-family: 'Playfair Display', serif;
}

.admin-main { padding: 2rem; }

.stat-card {
  background: #fff;
  border-radius: var(--radius);
  padding: 1.5rem;
  box-shadow: var(--shadow-sm);
  border-left: 4px solid var(--green-mid);
  display: flex;
  align-items: center;
  gap: 1rem;
}
.stat-card.warning { border-left-color: #f59e0b; }
.stat-card.success { border-left-color: #10b981; }
.stat-card.info    { border-left-color: #3b82f6; }
.stat-number { font-size: 2rem; font-weight: 700; color: var(--green-dark); line-height: 1; }
.stat-label  { font-size: 0.85rem; color: var(--text-mid); }
.stat-icon   { font-size: 2rem; color: var(--cream-dark); }

/* --- Utilities ------------------------------------------- */
.text-green  { color: var(--green-dark) !important; }
.text-brown  { color: var(--brown) !important; }
.bg-cream    { background: var(--cream) !important; }
.rounded-hoamat { border-radius: var(--radius) !important; }

/* Alerts */
.alert-hoamat {
  background: #f0fdf4;
  border: 1px solid #bbf7d0;
  color: #166534;
  border-radius: var(--radius);
}

/* --- Responsive ------------------------------------------ */
@media (max-width: 767px) {
  .hero { height: 70vh; }
  .gallery-grid { grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); }
  .admin-sidebar { min-height: auto; }
  .price-card-header .price-amount { font-size: 2.2rem; }
}
