/* ==========================================================================
   Ferienhaus Monschau – Stylesheet
   ========================================================================== */

/* --- Custom Properties --- */
:root {
  --color-bg: #fafaf8;
  --color-white: #ffffff;
  --color-text: #2c2c2c;
  --color-text-light: #5a5a5a;
  --color-text-muted: #888888;
  --color-accent: #8b6f4e;
  --color-accent-hover: #705a3e;
  --color-accent-light: #f5f0ea;
  --color-border: #e8e4de;
  --color-border-light: #f0ece6;
  --color-hero-overlay: rgba(30, 25, 20, 0.45);

  --font-sans: "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --font-serif: Georgia, "Times New Roman", serif;

  --space-xs: 0.5rem;
  --space-sm: 1rem;
  --space-md: 1.5rem;
  --space-lg: 2.5rem;
  --space-xl: 4rem;
  --space-2xl: 6rem;

  --max-width: 1140px;
  --max-width-narrow: 800px;
  --radius: 6px;
  --shadow-card: 0 2px 12px rgba(0, 0, 0, 0.06);
  --shadow-card-hover: 0 4px 20px rgba(0, 0, 0, 0.1);
  --transition: 0.2s ease;
}

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

html {
  font-size: 100%;
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

body {
  font-family: var(--font-sans);
  color: var(--color-text);
  background-color: var(--color-bg);
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
}

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

a {
  color: var(--color-accent);
  text-decoration: none;
  transition: color var(--transition);
}

a:hover {
  color: var(--color-accent-hover);
}

a:focus-visible {
  outline: 2px solid var(--color-accent);
  outline-offset: 2px;
  border-radius: 2px;
}

ul, ol {
  list-style: none;
}

/* --- Utilities --- */
.container {
  width: 100%;
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 var(--space-md);
}

.container--narrow {
  max-width: var(--max-width-narrow);
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.text-center {
  text-align: center;
}

/* --- Typography --- */
h1, h2, h3, h4 {
  font-family: var(--font-serif);
  font-weight: 400;
  line-height: 1.3;
  color: var(--color-text);
}

h1 {
  font-size: clamp(1.8rem, 4vw, 2.8rem);
  margin-bottom: var(--space-md);
}

h2 {
  font-size: clamp(1.4rem, 3vw, 2rem);
  margin-bottom: var(--space-sm);
}

h3 {
  font-size: clamp(1.1rem, 2vw, 1.35rem);
  margin-bottom: var(--space-xs);
}

p {
  margin-bottom: var(--space-sm);
}

.lead {
  font-size: 1.15rem;
  color: var(--color-text-light);
  line-height: 1.8;
}

.section-subtitle {
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--color-accent);
  margin-bottom: var(--space-xs);
  font-family: var(--font-sans);
  font-weight: 600;
}

/* --- Buttons --- */
.btn {
  display: inline-block;
  padding: 0.75rem 1.75rem;
  font-size: 0.95rem;
  font-weight: 500;
  border-radius: var(--radius);
  text-decoration: none;
  cursor: pointer;
  transition: all var(--transition);
  border: none;
  font-family: var(--font-sans);
  line-height: 1.4;
}

.btn:focus-visible {
  outline: 2px solid var(--color-accent);
  outline-offset: 2px;
}

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

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

.btn--outline {
  background-color: transparent;
  color: var(--color-accent);
  border: 1.5px solid var(--color-accent);
}

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

.btn--small {
  padding: 0.5rem 1.25rem;
  font-size: 0.875rem;
}

/* --- Header / Navigation --- */
.site-header {
  background: var(--color-white);
  border-bottom: 1px solid var(--color-border);
  position: sticky;
  top: 0;
  z-index: 100;
}

.site-header__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: var(--space-sm) var(--space-md);
  max-width: var(--max-width);
  margin: 0 auto;
}

.site-logo {
  font-family: var(--font-serif);
  font-size: 1.2rem;
  color: var(--color-text);
  text-decoration: none;
  white-space: nowrap;
}

.site-logo:hover {
  color: var(--color-accent);
}

.nav-toggle {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  padding: var(--space-xs);
  color: var(--color-text);
}

.nav-toggle svg {
  width: 24px;
  height: 24px;
  display: block;
}

.nav-toggle:focus-visible {
  outline: 2px solid var(--color-accent);
  outline-offset: 2px;
}

.main-nav__list {
  display: flex;
  gap: var(--space-md);
  align-items: center;
}

.main-nav__link {
  font-size: 0.9rem;
  color: var(--color-text-light);
  padding: var(--space-xs) 0;
  position: relative;
}

.main-nav__link:hover,
.main-nav__link--active {
  color: var(--color-accent);
}

.main-nav__link::after {
  content: "";
  position: absolute;
  bottom: 0;
  left: 0;
  width: 0;
  height: 1.5px;
  background: var(--color-accent);
  transition: width var(--transition);
}

.main-nav__link:hover::after,
.main-nav__link--active::after {
  width: 100%;
}

/* Dropdown */
.nav-dropdown {
  position: relative;
}

.nav-dropdown__toggle {
  display: flex;
  align-items: center;
  gap: 0.25rem;
}

.nav-dropdown__toggle svg {
  width: 12px;
  height: 12px;
  transition: transform var(--transition);
}

.nav-dropdown__menu {
  position: absolute;
  top: 100%;
  left: 0;
  background: var(--color-white);
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  padding: var(--space-xs) 0;
  min-width: 200px;
  box-shadow: var(--shadow-card);
  opacity: 0;
  visibility: hidden;
  transform: translateY(4px);
  transition: all var(--transition);
  z-index: 10;
}

.nav-dropdown:hover .nav-dropdown__menu,
.nav-dropdown:focus-within .nav-dropdown__menu {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.nav-dropdown:hover .nav-dropdown__toggle svg {
  transform: rotate(180deg);
}

.nav-dropdown__menu a {
  display: block;
  padding: 0.4rem var(--space-sm);
  font-size: 0.875rem;
  color: var(--color-text-light);
}

.nav-dropdown__menu a:hover {
  background: var(--color-accent-light);
  color: var(--color-accent);
}

/* --- Hero --- */
.hero {
  position: relative;
  min-height: 520px;
  display: flex;
  align-items: center;
  background-color: #d5cec4;
  overflow: hidden;
}

.hero__img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  z-index: 0;
}

.hero__actions {
  display: flex;
  gap: var(--space-sm);
  flex-wrap: wrap;
}

.btn--outline-light {
  border: 1.5px solid rgba(255,255,255,0.6);
  color: var(--color-white);
  background: transparent;
  padding: 0.65em 1.4em;
  border-radius: var(--radius);
  font-size: 0.95rem;
  cursor: pointer;
  transition: background 0.2s, border-color 0.2s;
}
.btn--outline-light:hover {
  background: rgba(255,255,255,0.12);
  border-color: rgba(255,255,255,0.9);
}

.sr-only--focusable:focus {
  position: fixed;
  top: 0; left: 0;
  width: auto; height: auto;
  clip: auto;
  padding: 0.75em 1.5em;
  background: var(--color-primary);
  color: var(--color-white);
  z-index: 10000;
  font-size: 1rem;
}

.hero::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(
    to top,
    rgba(15, 12, 8, 0.75) 0%,
    rgba(20, 16, 12, 0.55) 40%,
    rgba(25, 20, 15, 0.40) 100%
  );
  z-index: 1;
}

.hero__content {
  position: relative;
  z-index: 2;
  max-width: 680px;
  color: var(--color-white);
  padding: var(--space-xl) var(--space-md);
}

.hero__content h1 {
  color: var(--color-white);
  font-size: clamp(2rem, 5vw, 3.2rem);
  margin-bottom: var(--space-sm);
  text-shadow: 0 2px 12px rgba(0, 0, 0, 0.4);
}

.hero__content p {
  font-size: 1.1rem;
  line-height: 1.8;
  opacity: 0.95;
  margin-bottom: var(--space-md);
  text-shadow: 0 1px 8px rgba(0, 0, 0, 0.3);
}

.hero--small {
  min-height: 320px;
}

.hero--small .hero__content h1 {
  font-size: clamp(1.6rem, 4vw, 2.4rem);
}

/* --- Sections --- */
.section {
  padding: var(--space-xl) 0;
}

.section--alt {
  background-color: var(--color-white);
}

.section--accent {
  background-color: var(--color-accent-light);
}

.section__header {
  text-align: center;
  max-width: 680px;
  margin: 0 auto var(--space-lg);
}

/* --- Property Cards --- */
.property-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: var(--space-md);
}

.property-card {
  background: var(--color-white);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow-card);
  transition: box-shadow var(--transition), transform var(--transition);
}

.property-card:hover {
  box-shadow: var(--shadow-card-hover);
  transform: translateY(-2px);
}

.property-card__image {
  aspect-ratio: 4 / 3;
  background-color: #e0d8ce;
  overflow: hidden;
}

.property-card__image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.property-card__body {
  padding: var(--space-md);
}

.property-card__tag {
  display: inline-block;
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--color-accent);
  margin-bottom: var(--space-xs);
  font-weight: 600;
}

.property-card__title {
  font-size: 1.2rem;
  margin-bottom: var(--space-xs);
}

.property-card__meta {
  font-size: 0.875rem;
  color: var(--color-text-muted);
  margin-bottom: var(--space-sm);
}

.property-card__text {
  font-size: 0.925rem;
  color: var(--color-text-light);
  margin-bottom: var(--space-sm);
}

/* --- Comparison Table --- */
.comparison-table-wrapper {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}

.comparison-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.9rem;
}

.comparison-table th,
.comparison-table td {
  text-align: left;
  padding: 0.85rem var(--space-sm);
  border-bottom: 1px solid var(--color-border);
}

.comparison-table th {
  font-weight: 600;
  color: var(--color-text);
  background: var(--color-accent-light);
  font-family: var(--font-sans);
  white-space: nowrap;
}

.comparison-table td {
  color: var(--color-text-light);
}

.comparison-table tbody tr:hover {
  background-color: var(--color-accent-light);
}

/* Mobile comparison cards (shown instead of table on small screens) */
.comparison-cards {
  display: none;
}

.comparison-card {
  background: var(--color-white);
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  padding: var(--space-md);
  margin-bottom: var(--space-sm);
}

.comparison-card__title {
  font-size: 1.1rem;
  margin-bottom: var(--space-sm);
}

.comparison-card dl {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 0.4rem var(--space-sm);
  font-size: 0.875rem;
  margin-bottom: var(--space-sm);
}

.comparison-card dt {
  font-weight: 600;
  color: var(--color-text);
}

.comparison-card dd {
  color: var(--color-text-light);
}

/* --- Teaser Grid --- */
.teaser-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: var(--space-md);
}

.teaser-card {
  background: var(--color-white);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow-card);
  transition: box-shadow var(--transition);
}

.teaser-card:hover {
  box-shadow: var(--shadow-card-hover);
}

.teaser-card__image {
  aspect-ratio: 16 / 9;
  background-color: #e0d8ce;
  overflow: hidden;
}

.teaser-card__image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.teaser-card__body {
  padding: var(--space-md);
}

.teaser-card__title {
  font-size: 1.15rem;
  margin-bottom: var(--space-xs);
}

.teaser-card__text {
  font-size: 0.9rem;
  color: var(--color-text-light);
  margin-bottom: var(--space-sm);
}

/* --- Trust Section --- */
.trust-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: var(--space-md);
}

.trust-item {
  text-align: center;
  padding: var(--space-md);
}

.trust-item__icon {
  width: 48px;
  height: 48px;
  margin: 0 auto var(--space-sm);
  color: var(--color-accent);
}

.trust-item h3 {
  margin-bottom: var(--space-xs);
}

.trust-item p {
  font-size: 0.9rem;
  color: var(--color-text-light);
}

/* --- Content Page Styles --- */
.content-page {
  padding: var(--space-xl) 0;
}

.content-page h2 {
  margin-top: var(--space-lg);
}

.content-page h3 {
  margin-top: var(--space-md);
}

.content-page p {
  max-width: 72ch;
}

.content-page ul,
.content-page ol {
  max-width: 72ch;
  margin-bottom: var(--space-sm);
  padding-left: var(--space-md);
}

.content-page ul {
  list-style: disc;
}

.content-page ol {
  list-style: decimal;
}

.content-page li {
  margin-bottom: 0.3rem;
  color: var(--color-text-light);
  font-size: 0.95rem;
}

/* Fact Box */
.fact-box {
  background: var(--color-accent-light);
  border-left: 3px solid var(--color-accent);
  padding: var(--space-md);
  border-radius: 0 var(--radius) var(--radius) 0;
  margin: var(--space-md) 0;
}

.fact-box h3 {
  margin-top: 0;
}

.fact-box dl {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 0.4rem var(--space-sm);
  font-size: 0.925rem;
}

.fact-box dt {
  font-weight: 600;
}

.fact-box dd {
  color: var(--color-text-light);
}

/* CTA Box */
.cta-box {
  background: var(--color-white);
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  padding: var(--space-lg);
  text-align: center;
  margin: var(--space-lg) 0;
}

.cta-box h2,
.cta-box h3 {
  margin-bottom: var(--space-xs);
}

.cta-box p {
  max-width: 50ch;
  margin: 0 auto var(--space-md);
  color: var(--color-text-light);
}

/* Related Links */
.related-links {
  background: var(--color-accent-light);
  border-radius: var(--radius);
  padding: var(--space-md);
  margin: var(--space-lg) 0;
}

.related-links h3 {
  margin-top: 0;
  margin-bottom: var(--space-sm);
}

.related-links ul {
  list-style: none;
  padding: 0;
}

.related-links li {
  margin-bottom: 0.4rem;
}

.related-links a {
  font-size: 0.925rem;
}

/* --- Footer --- */
.site-footer {
  background: var(--color-text);
  color: #c8c8c8;
  padding: var(--space-xl) 0 var(--space-md);
}

.footer-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: var(--space-lg);
  margin-bottom: var(--space-lg);
}

.footer-col h4 {
  color: var(--color-white);
  font-family: var(--font-sans);
  font-size: 0.9rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin-bottom: var(--space-sm);
}

.footer-col ul {
  list-style: none;
}

.footer-col li {
  margin-bottom: 0.35rem;
}

.footer-col a {
  color: #c8c8c8;
  font-size: 0.875rem;
}

.footer-col a:hover {
  color: var(--color-white);
}

.footer-bottom {
  border-top: 1px solid #444;
  padding-top: var(--space-md);
  font-size: 0.8rem;
  color: #999;
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-sm);
  justify-content: space-between;
}

.footer-bottom a {
  color: #999;
}

.footer-bottom a:hover {
  color: var(--color-white);
}

/* --- Breadcrumb --- */
.breadcrumb {
  padding: var(--space-sm) 0;
  font-size: 0.8rem;
  color: var(--color-text-muted);
}

.breadcrumb a {
  color: var(--color-text-muted);
}

.breadcrumb a:hover {
  color: var(--color-accent);
}

.breadcrumb span {
  margin: 0 0.4rem;
}

/* --- Image Placeholder --- */
.img-placeholder {
  background: linear-gradient(135deg, #e0d8ce 0%, #d0c8be 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--color-text-muted);
  font-size: 0.8rem;
  min-height: 200px;
}

/* --- Image Gallery --- */
.gallery {
  margin: var(--space-lg) 0;
}

.gallery__grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--space-xs);
  border-radius: var(--radius);
  overflow: hidden;
}

.gallery__item {
  aspect-ratio: 4 / 3;
  overflow: hidden;
  background-color: #e0d8ce;
}

.gallery__item--wide {
  grid-column: span 2;
}

.gallery__item--tall {
  grid-row: span 2;
}

.gallery__item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.3s ease;
}

.gallery__item img:hover {
  transform: scale(1.03);
}

/* Inline image in content */
.content-image {
  margin: var(--space-md) 0;
  border-radius: var(--radius);
  overflow: hidden;
}

.content-image img {
  width: 100%;
  height: auto;
  display: block;
}

.content-image--float-right {
  float: right;
  max-width: 45%;
  margin: 0 0 var(--space-md) var(--space-md);
}

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

  .gallery__item--wide {
    grid-column: span 1;
  }

  .content-image--float-right {
    float: none;
    max-width: 100%;
    margin: var(--space-md) 0;
  }
}

/* ==========================================================================
   Responsive
   ========================================================================== */

@media (max-width: 768px) {
  .nav-toggle {
    display: block;
  }

  .main-nav {
    position: fixed;
    top: 0;
    right: -100%;
    width: 280px;
    height: 100vh;
    background: var(--color-white);
    padding: var(--space-xl) var(--space-md);
    box-shadow: -4px 0 20px rgba(0, 0, 0, 0.1);
    transition: right 0.3s ease;
    z-index: 200;
    overflow-y: auto;
  }

  .main-nav--open {
    right: 0;
  }

  .main-nav__list {
    flex-direction: column;
    gap: 0;
    align-items: flex-start;
  }

  .main-nav__link {
    padding: 0.75rem 0;
    font-size: 1rem;
    display: block;
    width: 100%;
  }

  .nav-dropdown__menu {
    position: static;
    opacity: 1;
    visibility: visible;
    transform: none;
    box-shadow: none;
    border: none;
    padding-left: var(--space-sm);
  }

  .nav-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.4);
    z-index: 150;
  }

  .nav-overlay--visible {
    display: block;
  }

  .hero {
    min-height: 400px;
  }

  .hero--small {
    min-height: 260px;
  }

  /* Switch table to cards on mobile */
  .comparison-table-wrapper {
    display: none;
  }

  .comparison-cards {
    display: block;
  }

  .property-grid {
    grid-template-columns: 1fr;
  }

  .teaser-grid {
    grid-template-columns: 1fr;
  }

  .trust-grid {
    grid-template-columns: 1fr;
  }

  .footer-grid {
    grid-template-columns: 1fr 1fr;
  }

  .footer-bottom {
    flex-direction: column;
    gap: var(--space-xs);
  }
}

@media (max-width: 480px) {
  .footer-grid {
    grid-template-columns: 1fr;
  }

  .fact-box dl {
    grid-template-columns: 1fr;
  }
}
