/* =============================================
   CSS Custom Properties
   ============================================= */

:root {
  --color-primary: #4F65E6;
  --color-primary-light: #CCE0FF;
  --color-primary-hover: #b8d4f9;
  --color-text: #1E1E1E;
  --color-text-muted: #2a2a2a;
  --color-text-light: #3a3a3a;
  --font-display: hubot;
  --font-body: mm;
}

/* =============================================
   Reset & Base
   ============================================= */

html {
  box-sizing: border-box;
}

*,
*::before,
*::after {
  box-sizing: inherit;
}

body {
  margin: 0;
}

a {
  color: inherit;
  background-color: transparent;
}

a:active,
a:hover {
  outline-width: 0;
}

img {
  border-style: none;
  vertical-align: middle;
}

figure,
footer,
header {
  display: block;
}

figure {
  margin: 1em 40px;
}

hr {
  box-sizing: content-box;
  height: 0;
  overflow: visible;
}

button,
input,
select,
textarea,
optgroup {
  font: inherit;
  margin: 0;
}

button,
input {
  overflow: visible;
}

button,
select {
  text-transform: none;
}

/* =============================================
   Typography
   ============================================= */

@font-face {
  font-family: 'hubot';
  src: url('/static/fonts/HubotSans.ttf') format('truetype');
}

@font-face {
  font-family: 'mm';
  src: url('/static/fonts/MartianMono.ttf') format('truetype');
}

html,
body {
  font-family: var(--font-body);
  font-size: 15px;
  line-height: 1.5;
}

h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-display);
  font-weight: 400;
  margin: 10px 0;
}

h1 { font-size: 36px; }
h2 { font-size: 30px; }
h3 { font-size: 24px; }
h4 { font-size: 20px; }
h5 { font-size: 18px; }
h6 { font-size: 16px; }

/* =============================================
   Utility Classes
   ============================================= */

/* -- Clearfix -- */
._container::after,
._container::before,
._row::after,
._row::before,
._row-padding::after,
._row-padding::before,
._bar::before,
._bar::after {
  content: "";
  display: table;
  clear: both;
}

/* -- Grid -- */
._col {
  float: left;
  width: 100%;
}

._row-padding,
._row-padding > ._col {
  padding: 0 8px;
}

/* -- Spacing -- */
._margin-bottom { margin-bottom: 16px !important; }
._padding-small { padding: 4px 8px !important; }
._padding { padding: 8px 16px !important; }
._padding-large { padding: 12px 24px !important; }
._padding-16 { padding-top: 16px !important; padding-bottom: 16px !important; }
._padding-32 { padding-top: 32px !important; padding-bottom: 32px !important; }
._padding-64 { padding-top: 64px !important; padding-bottom: 64px !important; }
._padding-top-64 { padding-top: 64px !important; }
._padding-bottom-32 { padding-bottom: 32px !important; }

/* -- Layout -- */
._wide { letter-spacing: 4px; }
._block { display: block; width: 100%; }
._right { float: right !important; }
._center { text-align: center !important; }
._container { padding: 0.01em 16px; }
._display-container { position: relative; }
._display-topleft { position: absolute; left: 0; top: 0; }

._top {
  position: fixed;
  width: 100%;
  top: 0;
  z-index: 1;
}

/* -- Images -- */
._image {
  max-width: 100%;
  height: auto;
}

/* -- Navbar -- */
._bar {
  width: 100%;
  overflow: hidden;
}

._bar ._bar-item {
  padding: 8px 16px;
  float: left;
  width: auto;
  border: none;
  display: block;
  outline: 0;
}

._center ._bar {
  display: inline-block;
  width: auto;
}

._bar-block ._bar-item {
  width: 100%;
  display: block;
  padding: 8px 16px;
  text-align: left;
  border: none;
  white-space: normal;
  float: none;
  outline: 0;
}

/* -- Borders -- */
._border-bottom { border-bottom: 1px solid #ccc !important; }
._border-dark-grey { border-color: #616161 !important; }

/* -- Hover effects -- */
._hover-opacity:hover { opacity: 0.60; }

/* -- Text -- */
.text-nowrap { white-space: nowrap; }

/* -- Responsive visibility -- */
@media (max-width: 600px) {
  ._hide-small { display: none !important; }
  ._bar-item { text-align: center; }
}

@media (max-width: 992px) and (min-width: 601px) {
  ._hide-medium { display: none !important; }
}

@media (min-width: 993px) {
  ._hide-large { display: none !important; }
}

/* -- Responsive grid -- */
@media (min-width: 601px) {
  ._col.m6,
  ._half { width: 49.99999%; }
}

@media (min-width: 993px) {
  ._col.l3 { width: 24.99999%; }
  ._col.l4 { width: 33.33333%; }
  ._col.l8 { width: 66.66666%; }
  ._col.l9 { width: 74.99999%; }
}

/* =============================================
   Form Elements
   ============================================= */

input[type=text],
select,
textarea {
  width: 100%;
  padding: 12px;
  border: 1px solid #ccc;
  border-radius: 4px;
  resize: vertical;
}

label {
  padding: 12px 12px 12px 0;
  display: inline-block;
}

input[type=submit] {
  color: var(--color-text);
  padding: 12px 20px;
  border: none;
  border-radius: 4px;
  cursor: pointer;
  float: right;
}

.col-25 {
  float: left;
  width: 10em;
}

.col-75 {
  float: none;
  overflow: hidden;
  margin-top: 6px;
}

.row::after {
  content: "";
  display: table;
  clear: both;
}

@media screen and (max-width: 600px) {
  .col-25,
  .col-75,
  input[type=submit] {
    width: 100%;
    margin-top: 0;
  }
}

.contact-container {
  border-radius: 8px;
  background-color: var(--color-primary-light);
  padding: 10px;
}

/* =============================================
   Buttons
   ============================================= */

.btn {
  border: none;
  display: inline-block;
  padding: 8px 16px;
  vertical-align: middle;
  overflow: hidden;
  text-decoration: none;
  color: inherit;
  background-color: inherit;
  text-align: center;
  cursor: pointer;
  white-space: nowrap;
}

.btn-primary {
  background-color: var(--color-primary-light);
  color: var(--color-text);
  transition: all 0.3s ease;
  border-radius: 6px;
}

.btn-primary:hover {
  background-color: var(--color-primary-hover);
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(79, 101, 230, 0.2);
  opacity: 1;
}

.btn-secondary {
  background-color: #A3978A;
}

.btn-secondary:hover {
  opacity: 0.8;
}

/* =============================================
   Layout
   ============================================= */

#body-index {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  min-height: 100vh;
  background-image: linear-gradient(
    130deg,
    rgba(163, 151, 138, 0.7) 0%,
    rgba(233, 219, 214, 0.7) 25%,
    rgba(163, 151, 138, 0.7) 50%,
    rgba(233, 219, 214, 0.7) 75%,
    rgba(163, 151, 138, 0.7) 100%
  );
  background-attachment: scroll;
}

.main-content {
  max-width: 1564px;
  margin: 52px auto 0; /* vertically spaced, horizontally centered */
  width: 100%;
  padding-left: 16px;
  padding-right: 16px;
}

#body-content {
  max-width: 1400px;
  width: 100%;
  margin-left: auto;
  margin-right: auto;
  padding-left: 16px;
  padding-right: 16px;
}

@media screen and (min-width: 600px) {
  #body-content {
    padding-left: 30px;
    padding-right: 30px;
  }

  .flex-container-large { display: flex; }

  .flex-start-large {
    align-self: stretch;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
  }

  .flex-end-large {
    align-self: flex-end;
    width: 100%;
  }
}

/* =============================================
   Navbar & Header
   ============================================= */

.site-header {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  background-image: url('/static/images/webp_images/header.webp');
  background-position: right top;
  background-size: cover;
  z-index: 1000;
}

.navbar-overlay {
  background-color: var(--color-primary);
  opacity: 0.9;
}

.navbar-link {
  text-decoration: none;
  font-size: 1.1em;
  z-index: 100;
}

.nav-link {
  text-decoration: none;
  font-size: 1.1em;
}

.navbar-logo {
  height: 1.5em;
}

/* =============================================
   Hero Section (Index only)
   ============================================= */

.scrolling-bar-wrapper {
  position: static;
  z-index: 100;
}

.scrolling-navbar {
  border-width: 0;
  box-shadow: none;
  z-index: 101;
  color: var(--color-text);
  position: static;
  overflow: clip;
}

.header-bg-image {
  position: absolute;
  z-index: -2;
  top: 0;
  left: 0;
  min-width: 100vw;
  height: 100%;
  object-fit: cover;
  object-position: top;
}

.topline-bg-wrapper {
  position: absolute;
  top: 0;
  left: 0;
  z-index: -2;
  height: 100%;
  overflow: hidden;
  min-width: 100vw;
}

.topline-bg-image {
  min-width: 100vw;
  height: 1000%;
  object-fit: cover;
  object-position: top;
}

.hero-section {
  height: 100vh;
}

.hero-logo-overlay {
  position: absolute;
  width: 100%;
  height: 100%;
  top: 0;
  left: 0;
  display: flex;
  justify-content: center;
  align-items: center;
}

.hero-logo-image {
  width: 50%;
  object-fit: contain;
  overflow: hidden;
  max-height: 90%;
}

/* =============================================
   Section Headings
   ============================================= */

.section-heading {
  font-family: var(--font-display);
  font-size: 1.8em;
  font-weight: 600;
  color: var(--color-text);
  padding-bottom: 12px;
  margin-bottom: 32px;
  border-bottom: 2px solid var(--color-primary);
  display: inline-block;
}

.section-heading--large {
  font-size: 2em;
}

.section-heading--small {
  font-size: 1.3em;
}

/* =============================================
   About Section
   ============================================= */

.about-section {
  padding: 48px 24px;
  max-width: 1400px;
  margin: 0 auto;
}

.about-layout {
  display: flex;
  flex-direction: column;
  gap: 24px;
}

@media (min-width: 993px) {
  .about-layout {
    flex-direction: row;
    align-items: flex-start;
  }

  .about-image-col {
    flex: 0 0 260px;
  }

  .about-text-col {
    flex: 1;
    min-width: 0;
  }
}

.about-image-col {
  max-width: 100%;
}

.about-image-wrapper {
  overflow: hidden;
  border-radius: 12px;
  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.12);
}

.about-image-wrapper img {
  width: 100%;
  display: block;
  transition: transform 0.6s ease;
}

.about-image-wrapper:hover img {
  transform: scale(1.03);
}

.about-text {
  font-size: 1em;
  line-height: 1.8;
  color: var(--color-text-muted);
  margin-top: 0;
  padding: 0;
}

/* =============================================
   Wine Cards
   ============================================= */

.wine-card {
  background: rgba(255, 255, 255, 0.55);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border-radius: 14px;
  overflow: hidden;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
  transition: transform 0.35s ease, box-shadow 0.35s ease;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  height: 100%;
}

.wine-card:hover {
  transform: translateY(-6px);
  box-shadow: 0 12px 36px rgba(79, 101, 230, 0.15);
}

.wine-card-image-wrapper {
  position: relative;
  overflow: hidden;
}

.wine-card-image-wrapper img {
  width: 100%;
  display: block;
  transition: transform 0.5s ease;
}

.wine-card:hover .wine-card-image-wrapper img {
  transform: scale(1.05);
}

 .wine-card-label {
  position: absolute;
  top: 12px;
  left: 12px;
  background: rgba(79, 101, 230, 0.88);
  color: #fff;
  padding: 6px 14px;
  border-radius: 6px;
  font-size: 0.85em;
  font-family: var(--font-display);
  letter-spacing: 0.5px;
  backdrop-filter: blur(6px);
  display: inline-block;
  box-sizing: border-box;
  max-width: calc(100% - 24px);
  white-space: normal;
  overflow-wrap: anywhere;
  word-break: break-word;
}

.wine-card-body {
  padding: 20px;
  flex-grow: 1;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.wine-card-body p {
  font-size: 0.92em;
  line-height: 1.7;
  color: var(--color-text-light);
  margin-bottom: 20px;
}

.wine-card-body .btn-primary {
  padding: 10px 20px;
  font-size: 0.9em;
  text-align: center;
  letter-spacing: 0.3px;
}

/* =============================================
   Wines Section
   ============================================= */

.wines-section {
  padding: 48px 24px;
  max-width: 1400px;
  margin: 0 auto;
}

.coming-soon {
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--color-primary);
  font-size: 3em;
  font-family: var(--font-display);
  opacity: 0.15;
  text-align: center;
  padding: 40px;
}

/* =============================================
   Footer
   ============================================= */

.site-footer {
  position: relative;
  text-align: center;
}

.site-footer a {
  transition: opacity 0.3s ease;
}

.footer-bg-container {
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
  height: 100%;
  overflow: hidden;
}

.footer-bg {
  position: relative;
  bottom: 100%;
  left: 0;
  background-image: url('/static/images/webp_images/header.webp');
  width: 100%;
  height: 200%;
  background-position: 50% 50%;
  background-size: cover;
}

.footer-inner {
  background-color: rgba(79, 101, 230, 0.9);
  padding: 48px 24px;
  backdrop-filter: blur(4px);
}

.footer-inner .impressum-link {
  font-size: 1em;
  opacity: 0.85;
  transition: opacity 0.3s ease;
}

.footer-inner .impressum-link:hover {
  opacity: 1;
}

/* Base template footer */
.base-footer {
  background-image: url('/static/images/webp_images/header.webp');
  background-position: right bottom;
  background-attachment: fixed;
  background-size: cover;
}

.base-footer-inner {
  background-color: var(--color-primary);
  opacity: 0.9;
}

/* =============================================
   Wine Detail Page
   ============================================= */

.detail-section {
  animation: fadeInUp 0.5s ease;
}

.detail-layout {
  display: flex;
  flex-wrap: wrap;
  gap: 32px;
  margin-top: 16px;
}

.detail-image-col {
  flex: 0 0 280px;
  max-width: 100%;
}

.detail-image-wrapper {
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.12);
}

.detail-image-wrapper img {
  width: 100%;
  display: block;
  transition: transform 0.6s ease;
}

.detail-image-wrapper:hover img {
  transform: scale(1.03);
}

.detail-text-col {
  flex: 1;
  min-width: 0;
}

.detail-description {
  line-height: 1.8;
  color: var(--color-text-muted);
  margin-bottom: 24px;
}

.detail-meta-card {
  background: rgba(255, 255, 255, 0.6);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  border-radius: 12px;
  padding: 20px 24px;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.06);
  display: flex;
  flex-wrap: wrap;
  gap: 20px;
}

.detail-meta-item {
  display: flex;
  flex-direction: column;
  gap: 4px;
  min-width: 120px;
}

.detail-meta-label {
  font-size: 0.8em;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: var(--color-primary);
  font-family: var(--font-display);
}

.detail-meta-value {
  font-size: 1.1em;
  font-weight: 600;
  color: var(--color-text);
  font-family: var(--font-display);
}

.detail-ingredients {
  margin-top: 40px;
}

.ingredients-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
}

.ingredient-item {
  background: rgba(255, 255, 255, 0.5);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  border-radius: 10px;
  padding: 16px 20px;
  flex: 1;
  min-width: 180px;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
}

.ingredient-label {
  display: block;
  font-size: 0.78em;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: var(--color-primary);
  margin-bottom: 6px;
  font-family: var(--font-display);
}

.ingredient-value {
  display: block;
  color: var(--color-text-muted);
  font-size: 0.95em;
  line-height: 1.6;
}

/* =============================================
   Legal / Impressum Page
   ============================================= */

.legal-section {
  animation: fadeInUp 0.5s ease;
}

.legal-card {
  background: rgba(255, 255, 255, 0.55);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border-radius: 14px;
  padding: 32px;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
}

.legal-block {
  margin-bottom: 28px;
}

.legal-block:last-of-type {
  margin-bottom: 12px;
}

.legal-heading {
  font-size: 1.2em;
  color: var(--color-text);
  margin-bottom: 8px;
  padding-bottom: 6px;
  border-bottom: 1px solid rgba(79, 101, 230, 0.25);
}

.legal-block p {
  line-height: 1.8;
  color: var(--color-text-muted);
}

.legal-source {
  margin-top: 32px;
  padding-top: 16px;
  border-top: 1px solid rgba(0, 0, 0, 0.08);
  font-size: 0.85em;
  opacity: 0.6;
}

.legal-source a {
  color: var(--color-primary);
  text-decoration: underline;
}

/* =============================================
   Error Page
   ============================================= */

.error-section {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 50vh;
  animation: fadeInUp 0.5s ease;
}

.error-card {
  text-align: center;
  background: rgba(255, 255, 255, 0.55);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border-radius: 14px;
  padding: 48px 40px;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
  max-width: 600px;
}

.error-card .btn-primary {
  display: inline-block;
  margin-top: 24px;
}

.error-icon {
  width: 64px;
  height: 64px;
  border-radius: 50%;
  background: rgba(79, 101, 230, 0.12);
  color: var(--color-primary);
  font-size: 2em;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 20px;
  font-family: var(--font-display);
}

.error-title {
  font-size: 1.5em;
  color: var(--color-text);
  margin-bottom: 16px;
}

.error-message {
  line-height: 1.8;
  color: var(--color-text-light);
  font-size: 0.95em;
}

/* =============================================
   Font Awesome Icons
   ============================================= */

.fa {
  padding: 20px;
  font-size: 30px;
  width: 50px;
  text-align: center;
  text-decoration: none;
}

.fa:hover {
  opacity: 0.7;
}

/* =============================================
   Animations
   ============================================= */

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

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

@media screen and (max-width: 600px) {
  .section-heading {
    font-size: 1.4em;
  }

  .about-section,
  .wines-section {
    padding: 32px 16px;
  }

  .wine-card-body {
    padding: 16px;
  }

  .coming-soon {
    font-size: 2em;
    padding: 24px;
  }

  .detail-image-col {
    flex: 0 0 100%;
  }

  .detail-meta-card {
    flex-direction: column;
    gap: 12px;
  }

  .ingredients-grid {
    flex-direction: column;
  }

  .legal-card {
    padding: 20px;
  }

  .error-card {
    padding: 32px 24px;
  }
}