body, html {
    background-color: rgba(250, 250, 250, 0.877); /* Match navbar background */

    margin: 0;
    padding: 0;
    height: 100%;
    width: 100%;
    font-family: 'Open Sans', sans-serif;
}

.navbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  position: fixed;
  width: 100%;
  padding: 0px;
  background-color: rgba(250, 250, 250, 0.877); /* Semi-transparent background */
  transition: all 0.3s ease;
  z-index: 1000; /* Ensures the navbar is on top */
  overflow: hidden; /* Prevent overflow */
  box-sizing: border-box; /* Ensure padding and border are included in the width */
}

.logo-container {
  padding: 10px;
}

.logo {
  height: 64px;
  border-radius: 15%; /* Rounds the corners to make it circular */
  transition: height 0.3s ease;
}

.nav-links a {
  color: rgb(75, 75, 75);
  text-decoration: none;
  margin: 0 15px;
  font-size: 1.2em; /* Adjusts the font size */
  text-shadow: 0 0 .1em rgba(0, 0, 0, 0.4), 0 0 .2em rgba(0, 0, 0, 0.2); /* Adds a shadow all around */
  transition: opacity 0.3s ease;
}

.title-background-container {
    background-image: url('/wp-content/uploads/background/parete-di-legno.jpg'); /* Replace with your image URL */
    background-size: cover; /* Ensures the image covers the entire background */
    background-position: center; /* Centers the image vertically and offsets it by 10% from the top */
    background-repeat: no-repeat; /* Prevents the image from repeating */
    width: 100%; /* Sets the height to 80% of the viewport height, minus 20% to account for cropping */
    height: calc(80vh - 20%); /* Sets the height to 80% of the viewport height, minus 20% to account for cropping */
    display: flex; /* Uses flexbox for centering */
    flex-direction: column; /* Stacks the title and subtitle vertically */
    justify-content: center; /* Centers vertically */
    align-items: center; /* Centers horizontally */
}

.title-background-container::after {
    content: ''; /* Create a pseudo-element to overlay the gradient */
    position: relative; /* Position it absolutely within the container */
    bottom: 0;
    left: 0;
    width: 100%;
    height: 5%; /* Adjust the height of the gradient overlay */
    background: linear-gradient(to bottom, rgba(255, 255, 255, 0), rgba(255, 255, 255, 1)); /* White gradient */
}

.text-container {
    width: 80%; /* Sets the width to 70% of the viewport width */
    margin: auto; /* Centers the container */
    text-align: center; /* Centers the text */
}

.text-container-opening-times {
    width: 100%; /* Sets the width to 70% of the viewport width */
    margin: auto; /* Centers the container */
    text-align: center; /* Centers the text */
}

.title {
    color: white; /* Sets the font color to white */
    font-size: 5em; /* Adjusts the font size */
    text-shadow: 0 0 .2em rgba(0, 0, 0, 0.95), 0 0 .4em rgba(0, 0, 0, 0.95), 0 0 .8em rgba(0, 0, 0, 0.95); /* Adds a shadow all around */
    margin: 0; /* Removes default margin */
    font-family: 'Lato', sans-serif;
    font-weight: 700; /* Makes the title bold */
}

.subtitle {
    color: white; /* Sets the font color to white */
    font-size: 2em; /* Adjusts the font size */
    text-shadow: 0 0 .2em rgba(0, 0, 0, 0.95), 0 0 .4em rgba(0, 0, 0, 0.95), 0 0 .8em rgba(0, 0, 0, 0.95); /* Adds a shadow all around */
    margin: 0; /* Removes default margin */
    margin-top: 40px; /* Adds some space between the title and subtitle */
    font-family: 'Lato', sans-serif;
    font-weight: 300; /* Sets the subtitle to normal weight */
}

.features-title {
    padding: 1em 0 0;
    color: rgb(60, 72, 88); /* Sets the font color to white */
    font-size: 2em; /* Adjusts the font size */
    text-shadow: 0 0 .05em rgb(60, 72, 88); /* Adds a shadow all around */
    margin: 0; /* Removes default margin */
    font-family: 'Lato', sans-serif;
    font-weight: 500; /* Makes the title bold */
}

.features-title-small {
    padding: 0.5em 0 0;
    color: rgb(60, 72, 88); /* Sets the font color to white */
    font-size: 2em; /* Adjusts the font size */
    text-shadow: 0 0 .05em rgb(60, 72, 88); /* Adds a shadow all around */
    margin: 0; /* Removes default margin */
    font-family: 'Lato', sans-serif;
    font-weight: 500; /* Makes the title bold */
}

.features-text {
    padding: 2em 0 4em;
    color: rgb(60, 72, 88); /* Sets the font color to white */
    font-size: 1em; /* Adjusts the font size */
    text-shadow: 0 0 .05em rgb(60, 72, 88); /* Adds a shadow all around */
    margin: 0; /* Removes default margin */
    font-family: 'Lato', sans-serif;
    font-weight: 300; /* Makes the title bold */
}

.features-text-small {
    padding: 0.8em 0 1em;
    color: rgb(60, 72, 88); /* Sets the font color to white */
    font-size: 1em; /* Adjusts the font size */
    text-shadow: 0 0 .05em rgb(60, 72, 88); /* Adds a shadow all around */
    margin: 0; /* Removes default margin */
    font-family: 'Lato', sans-serif;
    font-weight: 300; /* Makes the title bold */
}

.opening-times-title {
    padding: .3em 0;
    color: rgb(60, 72, 88); /* Sets the font color to white */
    font-size: 2em; /* Adjusts the font size */
    text-shadow: 0 0 .05em rgb(60, 72, 88); /* Adds a shadow all around */
    margin: 0; /* Removes default margin */
    font-family: 'Lato', sans-serif;
    font-weight: 500; /* Makes the title bold */
}

.opening-times {
    padding: .3em 0;
    color: rgb(60, 72, 88); /* Sets the font color to white */
    font-size: 2em; /* Adjusts the font size */
    text-shadow: 0 0 .05em rgb(60, 72, 88); /* Adds a shadow all around */
    margin: 0; /* Removes default margin */
    font-family: 'Lato', sans-serif;
    font-weight: 300; /* Makes the title bold */
}

.tiled-background-container {
  background-image: url('/wp-content/uploads/background/tile-wood.png'); /* Replace with your image URL */
  background-repeat: repeat;
  background-position: center;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  width: 90%; /* Sets the width to 90% of the viewport width */
  margin: 0 auto;
  border-radius: 15px; /* Adds rounded corners */
}

.opening-times-background-container {
    background-image: url('/wp-content/uploads/background/Chaberton.jpg'); /* Replace with your image URL */
    background-size: cover; /* Ensures the image covers the entire background */
    background-position: center calc(50% + 5%); /* Centers the image vertically and offsets it by 10% from the top */
    background-repeat: no-repeat; /* Prevents the image from repeating */
    height: calc(80vh - 20%); /* Sets the height to 80% of the viewport height, minus 20% to account for cropping */
    display: flex; /* Uses flexbox for centering */
    flex-direction: column; /* Stacks the title and subtitle vertically */
    justify-content: center; /* Centers vertically */
    align-items: center; /* Centers horizontally */
}

.row {
    text-align: center;
}

.shrink {
    background-color: transparent; /* Change background color to transparent */
}

.shrink .logo {
    height: 48px;
}

.shrink .nav-links {
    display: none;
}

.footer {
    position: fixed;
    font-size: .8em; /* Adjusts the font size */
    bottom: -50px; /* Initially hide the footer below the screen */
    left: 0;
    width: 100%;
    background-color: #9c9c9c;
    color: #dfdfdf;
    padding: 10px;
    text-align: center;
    transition: bottom 0.5s ease-in-out; /* Add transition for smooth animation */
    z-index: 9999; /* Ensure footer is above other content */
}

.footer.show {
    bottom: 0; /* Move the footer into view */
}

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

.table-container {
  width: 100%; /* or any desired width */
  display: flex;
  justify-content: center;
}

table {
  width: 80%; /* 80% of the containing div */
  border-collapse: collapse;
  margin-top: 1em;
  margin-bottom: 2em;
}

th, td {
  padding: 10px;
  border: 1px solid #000;
  text-align: center;
}

th {
  background-color: #f2f2f2;
}

tbody tr:nth-child(even) {
  background-color: #f9f9f9;
}

.contact-info {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 40px;
  background-color: #fff;
  padding: 20px;
  border-radius: 10px;
}

.contact-item {
  display: flex;
  align-items: center;
}

.contact-icon {
  font-size: 24px;
  margin-right: 10px;
}

.contact-link {
  text-decoration: none;
  color: #024c9b;
  font-size: 18px;
}

.contact-link:hover {
  text-decoration: underline;
}




.gallery {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 10px;
  padding: 20px;
}

.gallery-item {
  overflow: visible; /* allow caption to be visible below image */
  display: flex;
  flex-direction: column;
  border-radius: 10px;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
  background: #fff;
  position: relative; /* Required for absolute positioning of the overlay */
}

.gallery-item img {
  width: 100%;
  height: 300px;         /* fixed height for uniformity */
  object-fit: cover;     /* crop the image nicely */
  display: block;
  cursor: pointer;
  transition: transform 0.3s ease;
  border-top-left-radius: 10px;
  border-top-right-radius: 10px;
}

.gallery-item:hover img {
  transform: scale(1.05);
}

/* style the caption area (targets the immediate caption div used in your HTML) */
.gallery-item > div {
  padding: 12px;
  text-align: left;
  color: rgb(60,72,88);
  font-family: 'Open Sans', sans-serif;
}

.sold-overlay {
    position: absolute;
    top: 40%;
    left: 50%;
    transform: translate(-50%, -50%) rotate(-30deg); /* Center and rotate the text */
    background-color: rgba(255, 0, 0, 0.7); /* Red background with transparency */
    color: white;
    font-weight: bold;
    font-size: 2em;
    padding: 10px 20px;
    border-radius: 8px;
    z-index: 10; /* Ensure it's on top of the image */
}

/* Mobile: smaller image height and single column already handled by media query */
@media only screen and (max-width: 600px) {
    body {
      font-size: 14px;
    }

    .navbar {
      font-size: 1em;
      width: 100vw;
    }
    .logo {
      height: 48px;
    }
    .shrink .logo {
      height: 32px;
    }
    .nav-links {
      font-size: .8em;
    }
    .title-background-container {
      font-size: 1em;
    }
    .text-container {
      font-size: 1em;
    }
    .title {
      font-size: 3em;
    }
    .subtitle {
      font-size: 2em;
    }
    .features-title {
      font-size: 1.8em;
    }
    .features-title-small {
      font-size: 1.8em;
    }
    .features-text {
      font-size: 1em;
    }
    .features-text-small {
      font-size: 1.2em;
    }
    .opening-times-title {
      font-size: 1.5em;
    }
    .opening-times {
      font-size: 1.0em;
    }
    .footer {
      font-size: .7em;
    }
    .contact-info {
      font-size: 1em;
      flex-direction: column
    }
    .th, td {
      font-size: .7em;
    }
    .th {
      font-size: .7em;
    }
    .gallery {
      grid-template-columns: 1fr; /* single column on small screens */
    }
    .gallery-item img {
      height: 225px; /* 50% taller for mobile as well */
    }
  }

  body.mobile .title {
    font-size: 2.3em;
  }
  
  body.mobile .content {
    font-size: 1em;
  }


  /* Lightbox Styles */
  .lightbox {
    display: none;
    position: fixed;
    z-index: 9999;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    overflow: auto;
    background-color: rgba(0, 0, 0, 0.8);
}

.lightbox-content {
    position: relative;
    margin: auto;
    padding: 10px;
    max-width: 80%;
    max-height: 80%;
    box-shadow: 0px 0px 10px rgba(255, 255, 255, 0.5);
    animation: fadeIn 0.5s;
}

.lightbox img {
    width: 100%;
    height: auto;
    border-radius: 4px;
}

.close {
    position: absolute;
    top: 20px;
    right: 35px;
    color: white;
    font-size: 40px;
    font-weight: bold;
    cursor: pointer;
}

.close:hover, .close:focus {
    color: #bbb;
    text-decoration: none;
    cursor: pointer;
}

@keyframes fadeIn {
    from {opacity: 0;} 
    to {opacity: 1;}
}

.highlight-box {
    background: #fff8e1;
    border: 2px solid #ffd54f;
    border-radius: 18px;
    box-shadow: 0 2px 12px rgba(0,0,0,0.07);
    padding: 24px 18px;
    margin: 32px auto;
    max-width: 700px;
}

.highlight-box--grey {
    background: #f0f0f0;
    border-color: #dcdcdc;
}

/* Lightbox show state and back button styling */
.lightbox.show, .lightbox[style*="display: flex"], .lightbox[style*="display:flex"] {
  display: flex;
  align-items: center;
  justify-content: center;
}

.lb-back {
  position: absolute;
  top: 18px;
  left: 28px;
  background: rgba(0,0,0,0.45);
  color: #fff;
  border: none;
  padding: 8px 12px;
  border-radius: 6px;
  font-size: 1rem;
  cursor: pointer;
  z-index: 10001;
}

.lb-back:hover {
  background: rgba(0,0,0,0.6);
}