/* ============================================
   Polsterei Reinke — style.css
   Mobile-first responsive stylesheet
   ============================================ */

:root {
  --color-body-bg: #8f492d;
  --color-wrapper-bg: #ffffff;
  --color-content-bg: #F7EFE4;
  --color-text: #303030;
  --color-text-alt: #444444;
  --color-heading: #793a25;
  --color-link: #922c03;
  --color-link-hover: #431F05;
  --color-sidebar-text: #4B1F12;
  --color-sidebar-hover: #E96A1D;
  --color-header-text: #ffffff;
  --color-sidebar-border: #D8C291;
  --color-footer-bg: #3b2316;
  --color-footer-text: #d4c4b0;
}

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

html {
  scroll-behavior: smooth;
}

body {
  font-family: "Century Gothic", Arial, Tahoma, sans-serif;
  font-size: 14px;
  line-height: 1.6;
  color: var(--color-text);
  background: var(--color-body-bg);
}

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

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

a:hover {
  color: var(--color-link-hover);
  text-decoration: underline;
}

a:focus-visible {
  outline: 3px solid var(--color-sidebar-hover);
  outline-offset: 2px;
}

h1, h2, h3 {
  color: var(--color-heading);
  line-height: 1.3;
}

ul {
  list-style: disc;
  padding-left: 1.5em;
}

/* --- Skip Link --- */
.skip-link {
  position: absolute;
  top: -100%;
  left: 1rem;
  background: var(--color-heading);
  color: #fff;
  padding: 0.5rem 1rem;
  z-index: 200;
  text-decoration: none;
  font-weight: 600;
}

.skip-link:focus {
  top: 0;
}

/* --- Wrapper --- */
.wrapper {
  max-width: 1000px;
  margin: 0 auto;
  background: var(--color-wrapper-bg);
}

/* --- Header --- */
.site-header {
  background: url('../images/top.jpg') center center / cover no-repeat;
  height: 180px;
  position: relative;
  display: flex;
  align-items: flex-start;
  padding: 30px 20px;
}

.site-header .header-text {
  color: var(--color-header-text);
}

.site-header h1 {
  color: var(--color-header-text);
  font-size: 28px;
  margin: 0;
  text-shadow: 1px 1px 3px rgba(0,0,0,0.5);
}

.site-header h1 a {
  color: var(--color-header-text);
  text-decoration: none;
}

.site-header h1 a:hover {
  text-decoration: none;
}

.site-header .tagline {
  color: var(--color-header-text);
  font-size: 14px;
  font-style: italic;
  text-shadow: 1px 1px 3px rgba(0,0,0,0.5);
  margin-top: 4px;
}

/* --- Content Area --- */
.content-area {
  display: flex;
  flex-direction: column;
  background: var(--color-content-bg);
}

#content {
  padding: 20px;
  order: 2;
}

/* --- Sidebar --- */
#rightcol {
  padding: 20px;
  order: 1;
}

.sidebar-title {
  background: var(--color-heading);
  color: #fff;
  padding: 8px 12px;
  font-size: 16px;
  font-weight: 700;
  margin-bottom: 0;
}

.sidebar-nav {
  list-style: none;
  padding: 0;
  margin: 0;
}

.sidebar-nav li {
  border-bottom: 1px dotted var(--color-sidebar-border);
}

.sidebar-nav li:last-child {
  border-bottom: none;
}

.sidebar-nav a {
  display: block;
  padding: 8px 12px;
  color: var(--color-sidebar-text);
  text-decoration: none;
  font-size: 13px;
}

.sidebar-nav a:hover {
  color: var(--color-sidebar-hover);
  text-decoration: none;
}

.sidebar-nav .active a {
  font-weight: 700;
  color: var(--color-sidebar-hover);
}

/* --- Post Content --- */
.post-title {
  font-size: 22px;
  color: var(--color-heading);
  margin-bottom: 16px;
  line-height: 1.3;
}

.post-content {
  color: var(--color-text-alt);
  line-height: 1.7;
}

.post-content p {
  margin-bottom: 14px;
}

.post-content ul {
  margin-bottom: 14px;
}

.post-content li {
  margin-bottom: 4px;
}

/* --- Contact Table (Home) --- */
.contact-table {
  width: 100%;
  border-collapse: collapse;
  margin-top: 16px;
}

.contact-table th,
.contact-table td {
  text-align: left;
  padding: 8px 12px;
  border: 1px solid var(--color-sidebar-border);
  vertical-align: top;
  font-size: 13px;
}

.contact-table th {
  background: var(--color-heading);
  color: #fff;
  font-weight: 600;
}

/* --- Gallery --- */
.gallery-group {
  margin-bottom: 24px;
}

.gallery-group h3 {
  font-size: 18px;
  margin-bottom: 10px;
  padding-bottom: 4px;
  border-bottom: 1px solid var(--color-sidebar-border);
}

.gallery-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.gallery-grid a {
  display: block;
  line-height: 0;
}

.gallery-grid img {
  width: 150px;
  height: 100px;
  object-fit: cover;
  border: 2px solid #ccc;
  transition: border-color 0.2s;
}

.gallery-grid a:hover img {
  border-color: var(--color-sidebar-hover);
}

/* --- Kontakt Page --- */
.contact-details strong {
  display: block;
  color: var(--color-heading);
  margin-top: 14px;
  margin-bottom: 2px;
}

.contact-details strong:first-child {
  margin-top: 0;
}

.map-embed {
  margin-top: 20px;
}

.map-embed iframe {
  max-width: 100%;
  border: 0;
}

/* --- Supplier List --- */
.post-content .supplier-list a {
  color: var(--color-link);
}

.post-content .supplier-list a:hover {
  color: var(--color-link-hover);
  text-decoration: underline;
}

/* --- Footer --- */
.site-footer {
  background: var(--color-footer-bg);
  color: var(--color-footer-text);
  text-align: center;
  padding: 12px 20px;
  font-size: 12px;
}

.site-footer a {
  color: var(--color-footer-text);
}

.site-footer a:hover {
  color: #fff;
}

/* --- Legal Content (Impressum) --- */
.legal-content h3 {
  margin-top: 24px;
  margin-bottom: 8px;
  padding-bottom: 4px;
  border-bottom: 1px solid var(--color-sidebar-border);
}

.legal-content address {
  font-style: normal;
  line-height: 1.8;
  margin-bottom: 12px;
}

/* ========== Desktop (>= 768px) ========== */
@media (min-width: 768px) {
  .site-header {
    height: 261px;
    padding: 90px 30px 20px;
  }

  .site-header h1 {
    font-size: 36px;
  }

  .site-header .tagline {
    font-size: 16px;
  }

  .content-area {
    flex-direction: row;
  }

  #content {
    flex: 1 1 65%;
    order: 1;
    padding: 24px 30px;
  }

  #rightcol {
    flex: 0 0 280px;
    order: 2;
    padding: 24px 20px;
  }

  .gallery-grid img {
    width: 180px;
    height: 120px;
  }
}
