@font-face {
    font-family: 'Oswald';
    src: url('../fonts/oswald-v53-latin-regular.woff2') format('woff2');
    font-display: swap; /* Prevents blank text while loading */
}

body {
    text-align: left;
    font-family: Arial, sans-serif;
    margin: 0;
    overflow-x: hidden;
    color:#1f1122;
    opacity: 0;
    visibility: hidden; /* Hide content completely initially */
    transition: opacity 0.5s ease-in-out, visibility 0.5s ease-in-out, background-color 1s ease;
}

h3, h2{
    margin-bottom: 0;
}

.bottle-grid {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100%;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 5vh;
    justify-content: center;
    justify-items: center;
    padding: 5vh 2vw;
    padding-left: 0;
    z-index: -1;
    overflow: hidden;
    opacity: 0.5;
}

.bottle-grid img {
    max-height: 200px;
    pointer-events: none;
}

nav {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    display: flex;
    justify-content: space-between;
    padding: 10px calc(20px + 10px);
    z-index: 1000;
    box-sizing: border-box;
}

nav a {
    flex: none;
    margin: 0 10px;
    text-align: center;
    text-decoration: none;
    font-weight: normal;
    color: #1f1122;
    font-size: 20px;
    position: relative;
    display: inline-block;
    font-family: 'Oswald', 'Arial Narrow', sans-serif;
}

nav a:hover span {
    animation: wave-effect 1s infinite;
    animation-delay: calc(var(--char-index) * 0.1s);
}

nav a span {
    display: inline-block;
}

a:hover{
    color:#1f1122;
}

@keyframes wave-effect {
    0%, 100% {
        transform: translateY(0);
    }
    50% {
        transform: translateY(-10px);
    }
}

@keyframes swirl-text {
    0%, 100% {
        transform: rotate(0deg) translateY(5px);
    }
    50% {
        transform: rotate(6deg) translateY(-15px);
    }
}

@keyframes swirl-text-slow {
    0%, 100% {
        transform: rotate(0deg) translateY(5px);
    }
    50% {
        transform: rotate(6deg) translateY(-15px);
    }
}

.container {
    max-width: 960px;
    width: calc(100% - 40px); /* Account for padding */
    padding-top: 30px;
    padding-bottom: 30px;
    background-color: white;
    border: #1f1122;
    border-style: solid;
    border-width: 5px;
    padding-left: 20px;
    padding-right: 20px;
    margin: 120px auto 60px auto; /* Center the container and maintain vertical margins */
    box-sizing: border-box; /* Include padding in width calculation */
}

.disclaimer{
    text-align: center; 
    font-style: italic; 
    margin-top: 20px;
}

.header {
    text-align: center;
    margin-bottom: 20px;
}

.header h1 {
    font-family: 'Oswald','Arial Narrow', sans-serif;
}

h2 {
    font-family: 'Oswald','Arial Narrow', sans-serif;
    font-size: 2em;
}

h3 {
    font-family: 'Oswald','Arial Narrow', sans-serif;
    font-size: 1.5em;
}

.center {
    text-align: center;
}

.wine-category {
    margin-bottom: 20px;
}

.wine-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-bottom:0px;
    padding-top:0px;
    border-bottom: 1px solid #ddd;
    width: 100%; /* Prevents unnecessary shrinkage */
    box-sizing: border-box; /* Ensures width calculations remain consistent */
}

.wine-item:last-child {
    border-bottom: none;
}

.wine-name {
    flex: 3;
}

.wine-color,
.wine-year {
    flex: 1;
    text-align: center;
}

.wine-price {
    flex: 1;
    text-align: right;
}

.wine-link {
    text-decoration: none;
    color: inherit;
    display: block;
    position: relative;
    padding-left: 0;
    transition: padding-left 0.2s ease;
}

.wine-link:hover {
    padding-left: 25px;
}

.wine-link:hover::before {
    content: "🍷";
    position: absolute;
    left: 0;
    top: 50%;
    transform: translateY(-50%);
    font-size: 1.2em;
}

.wine-link .wine-item {
    transition: transform 0.2s ease;
}

.wine-link:hover .wine-item {
    transform: translateX(5px);
}

.wine-link.hover-sim {
    padding-left: 25px;
}

.wine-link.hover-sim::before {
    content: "🍷";
    position: absolute;
    left: 0;
    top: 50%;
    transform: translateY(-50%);
    font-size: 1.2em;
}

.wine-link.hover-sim .wine-item {
    transform: translateX(5px);
}

footer {
    display: flex;
    justify-content: space-between;
    padding: 10px calc(20px + 10px); /* Adjust padding to prevent shift */
    margin: 0 auto;
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    width:100vw;
    box-sizing: border-box; /* Prevents width issues */
}


footer a {
    flex: none;
    margin: 0 10px;
    text-align: center;
    text-decoration: none;
    font-weight: normal;
    color: black;
    font-size: 20px;
    position: relative;
    display: inline-block;
    font-family: 'Oswald','Arial Narrow', sans-serif;
}

footer a:hover span {
    animation: wave-effect 1s infinite;
    animation-delay: calc(var(--char-index) * 0.1s);
}

#instagram span {
    animation: wave-effect 1s infinite;
    animation-delay: calc(var(--char-index) * 0.1s);
}

footer a span {
    display: inline-block;
}

.logo-top {
    position: fixed;
    top: 10px;
    left: 50vw; /* Use viewport width for accurate centering */
    transform: translateX(-50%);
    z-index: 10000;
    display: flex;
    justify-content: center;
    align-items: center;
    width: auto;
    height: auto;
}

.logo-top a {
    display: inline-flex;  /* Makes the anchor behave like a container */
    justify-content: center;
    align-items: center;
    width: auto; /* Adjust based on the image */
    height: auto; /* Adjust based on the image */
}

.logo-top img {
    display: block;
    height: auto; /* Maintain aspect ratio */
    max-height: 3vh; /* 10% of viewport height */
    max-width: 80vw; /* Prevent it from being too wide on mobile */
}

.language-switcher a {
    font-family: 'Oswald', 'Arial Narrow', sans-serif;
    margin: 0 5px;
    text-decoration: none;
  }
  
  .language-switcher a:hover {
    text-decoration: underline;
  }

  .lang-separator {
    font-weight: 700;
    font-size: 1.5em;
  }

  footer .columns:first-child {
    text-align: left;
  }
  
  footer .columns:last-child {
    text-align: right;
  }
  
  footer .columns:nth-child(2) {
    text-align: center;
  }
  #order-email {
        text-decoration: none;
        color: #1f1122;
        font-family: 'Oswald','Arial Narrow', sans-serif;
  }
  
  #order-email span {
    display: inline-block;
  }
  
  #order-email:hover span {
    animation: wave-effect 1s infinite;
    animation-delay: calc(var(--char-index) * 0.1s);
  }

@media (max-width: 1020px) and (min-width: 600px) {
    nav {
        margin-top: 80px; /* Push nav down so it doesn't overlap the logo */
    }

    .container{
        margin-top:160px;
    }
}


@media screen and (max-width: 600px) {
    nav {
        flex-direction: column;
        padding: 10px;
        position: relative;
    }

    footer {
        flex-direction: column;
        padding: 10px;
        position: relative;
        bottom: 0;
    }

    footer .columns {
        text-align: center!important;
      }

    nav a, footer a {
        margin: 5px 0;
        font-size: 18px;
    }

    .container {
        width: calc(100% - 30px); /* Slightly smaller padding on mobile */
        margin: 10px auto 10px auto;
        padding-left: 15px;
        padding-right: 15px;
    }

    .bottle-grid {
        padding-top: 100px;
        grid-template-columns: repeat(auto-fit, minmax(70px, 1fr));
    }

    .bottle-grid img {
        max-height: 100px;
    }

    .wine-item {
        flex-direction: column;
        align-items: flex-start;
        margin-bottom:10px;
    }

    .wine-name, .wine-color, .wine-year, .wine-price {
        text-align: left;
        width: 100%;
    }

    .logo-top{
        position: relative;
    }

    /* Disable wine-link hover effects on mobile */
    .wine-link:hover {
        padding-left: 0;
    }

    .wine-link:hover::before {
        display: none;
    }

    .wine-link:hover .wine-item {
        transform: none;
    }

    .wine-link.hover-sim {
        padding-left: 0;
    }

    .wine-link.hover-sim::before {
        display: none;
    }

    .wine-link.hover-sim .wine-item {
        transform: none;
    }
}
@media screen and (max-width: 318px) {
    h1{
        font-size: clamp(2.2rem, 4vw, 2rem);
    }
}
@media print {
    *,
    *::before,
    *::after {
      animation: none !important;
      transition: none !important;
    }

    body {
      color: #000;
      background: white;
      opacity: 1 !important;
      overflow: visible;
      font-size: 10pt;
      line-height: 1.3;
      margin: 0;
    }
  
    .bottle-grid,
    nav{
      display: none !important;
    }

    .logo-top{
        margin-top: 0px !important;
    }
  
    .container {
      border: none;
      padding-left: 40px;
      padding-right: 40px;
      margin: 0 auto;
      max-width: 100%;
      margin-top: 0px !important;
    }
  
    .row {
      display: block;
      width: 100%;
      margin: 0;
      padding: 0;
    }
  
    h1 {
      font-size: 20pt;
      margin-bottom: 0.3em;
    }
  
    h2 {
      font-size: 14pt;
      margin-bottom: 0.2em;
    }
  
    h3 {
      font-size: 13pt;
      margin-bottom: 0.2em;
    }
  
    p {
      margin: 0 0 0.5em;
    }
    
    footer{
        padding-left: 70px !important;
        padding-right: 70px !important;
        padding-bottom: 40px !important;
    }
  
    .producer-image {
      max-width: 400px;
      height: auto;
      margin: 0 auto 10px;
      display: block;
    }
  
    .justified-text p {
      text-align: justify;
      font-size: 10pt;
    }
  
    .wine-details {
      margin-top: 1em;
    }
  
    .detail-row {
      font-size: 10pt;
      line-height: 1.3;
      display: flex;
      align-items: flex-start;
      page-break-inside: avoid;
      margin-bottom: 0.2em;
    }
  
    .detail-label {
      width: 95px;
    }
  
    .detail-text {
      flex: 1;
    }
    .language-switcher{
        display: none;
    }
    .logo-top{
        position: unset !important;
        transform: translateX(0px) !important;
    }
    nav{
        position: unset !important;
    }
    footer{
        display: none !important;
    }
    @page {
      size: A4;
      margin: 0.2cm;
    }
  }