/* Basic reset */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html, body {
  background-color: #3e3e3e;
  overflow-x: hidden;
}

body {
  font-family: 'Avenir-Next', sans-serif;
  color: #fff;
}

/* Hero section styling */
#hero {
  height: 100vh;
  background-image: url('/media/background.jpg');
  background-size: cover;
  background-position: center;
  display: flex;
  justify-content: center;
  align-items: center;
  text-align: center;
  position: relative;
}

.hero-title {
  max-width: 85%;
  height: auto;
  margin-bottom: 20px;
}

#hero .content {
  max-width: 700px;
}

#hero p {
  font-size: 1.2em;
  margin: 20px 0;
}

/* Download button in hero section */
.download-button {
  display: inline-block;
  background-color: rgba(43, 43, 43, 0.4);
  color: #fff;
  padding: 15px 30px;
  border-radius: 2em;
  font-size: 1.2em;
  text-decoration: none;
  transition: background-color 0.3s ease;
  backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 255, 255, 0.2);
}

.download-button:hover {
  background-color: rgba(112, 112, 112, 0.8);
}

/* Downloads section */
#downloads {
  padding: 70px;
  background-color: #3e3e3e;
  text-align: center;
}

#downloads h2 {
  font-size: 2.5em;
  margin-bottom: 20px;
}

.download-card {
  background-color: #494949;
  padding: 20px;
  border-radius: 20px;
  display: inline-block;
  margin: 20px auto;
}

.download-card h3 {
  color: white;
  margin-bottom: 10px;
}

/* Button group styling for downloads */
.button-group {
  display: flex;
  justify-content: space-between;
  margin-top: 15px;
}

.button-group .download-button {
  flex: 1;
  margin: 0 10px;
  padding: 10px 20px;
  font-size: 1.1em;
  text-align: center;
  white-space: nowrap;
  min-width: 150px;
}

.button-group .download-button:nth-child(1) {
  margin-left: 0;
}

.button-group .download-button:nth-child(2) {
  margin-right: 0;
}

/* Mobile view adjustments */
@media (max-width: 600px) {
  .button-group {
    flex-direction: column;
    align-items: center;
  }

  .button-group .download-button {
    margin: 10px 0;
    max-width: 250px;
  }
}

/* Previous Releases button styling */
.previous-releases-button {
  display: inline-block;
  background-color: rgba(43, 43, 43, 0.8);
  color: #fff;
  padding: 10px 25px;
  border-radius: 2em;
  font-size: 1em;
  text-decoration: none;
  margin-top: 15px;
  transition: background-color 0.3s ease;
  border: 1px solid rgba(255, 255, 255, 0.2);
}

.previous-releases-button:hover {
  background-color: rgba(255, 255, 255, 0.3);
}

/* Footer */
footer {
  text-align: center;
  padding: 10px 0 30px;
  background-color: #3e3e3e;
  color: #bbb;
}

/* Webkit browsers (Chrome, Safari, Edge) */
::-webkit-scrollbar {
  width: 12px;
}

::-webkit-scrollbar-track {
  background: #3e3e3e;
}

::-webkit-scrollbar-thumb {
  background: #6e6e6e;
  border-radius: 6px;
}

::-webkit-scrollbar-thumb:hover {
  background: #5a5a5a;
}

/* For Firefox */
html {
  scrollbar-width: thin;
  scrollbar-color: #707070 #6e6e6e;
}

/* Choose Your Style Section */
#choose-style {
  padding: 25px;
  background-color: #3e3e3e;
  text-align: center;
}

#choose-style h2 {
  font-size: 2.5em;
  margin-bottom: 20px;
}

.style-comparison {
  position: relative;
  max-width: 1200px;
  margin: 70px auto 30px; /* This moves the comparison image higher */
}

.comparison-image {
  width: 100%;
  height: auto;
  display: block;
  border-radius: 20px;
  margin-top: 20px;
}

.download-icon {
  margin-right: 0.65em;
  display: inline-block;
}

/* Button styling for Unbound and Revitalized */
.style-button {
  display: flex; /* Use flexbox */
  justify-content: center; /* Center text horizontally */
  align-items: center; /* Center text vertically */
  background-color: rgba(43, 43, 43, 0.4); /* More transparency for the background */
  color: #fff;
  padding: 15px 20px;
  border-radius: 2em;
  font-size: 1.5em; /* Use vw for responsive font size */
  text-decoration: none;
  transition: background-color 0.3s ease;
  border: 1px solid rgba(255, 255, 255, 0.2);
  text-align: center;
  min-width: 37%; /* Adjust width as needed */
  margin: 0 auto; /* Center the buttons */
  
  backdrop-filter: blur(8px); /* Apply the blur effect */
  -webkit-backdrop-filter: blur(8px); /* For Safari support */
}

/* Hover state */
.style-button:hover {
  background-color: rgba(255, 255, 255, 0.3);
}

/* Positioning the buttons */
.half {
  position: absolute;
  top: 50%;
  width: 50%;
  transform: translateY(-50%);
  display: flex;
  justify-content: center;
  align-items: center;
}

.half.left {
  left: 0;
}

.half.right {
  right: 0;
}

/* Mobile adjustments */
@media (max-width: 800px) {
  #downloads {
    padding: 50px 30px;
  }
  .half {
    width: 50%;
    display: inline-block;
    text-align: center;
    vertical-align: middle;
    /* Add margin to ensure spacing on mobile */
    /*margin: 0 -15px; /* This adds space between the two buttons on mobile */
  }

  .half .style-button {
    font-size: 3.5vw; /* Adjust font size slightly to balance */
    padding: 0.4em 0; /* Further reduce padding */
    width: 72%; /* Ensure buttons stay proportional
    /*max-width: 160px; /* Keep a tighter control over max width */
    margin: 0 auto;
  }

  /* Adjusting the Previous Releases button for mobile */
  .previous-releases-button {
    font-size: 0.8em; /* Adjust font size */
    padding: 8px 16px; /* Reduce padding */
    margin-top: 10px; /* Optional: Adjust margin if needed */
  }

  /* Adjusting the comparison image size for mobile */
  .comparison-image {
    height: auto; /* Maintain aspect ratio */
    display: block; /* Ensure it's treated as a block element for centering */
  }
}

/* Screenshots Section */
#screenshots {
  padding: 0px 60px 60px 60px;
  background-color: #3e3e3e;
  text-align: center; /* Ensure the entire section content is centered */
}

#screenshots h2 {
  font-size: 2.5em;
  margin-top: 20px;
  margin-bottom: 10px;
  color: white;
  text-align: center; /* Center heading text */
}

#screenshots p {
  font-size: 1.2em;
  margin-bottom: 75px;
  color: #bbb;
  text-align: center; /* Center paragraph text */
}

/* Mobile adjustments */
@media (max-width: 800px) {
  #screenshots h2, #screenshots p {
    text-align: center;
    margin: 10px -15px;
  }
}
/* Gallery styling */
.gallery {
  display: grid;
  grid-template-columns: repeat(3, 1fr); /* Set to 3 columns */
  cursor: pointer;
  gap: 20px; /* Gap between items in the grid */
  justify-items: center;
  align-items: center;
}

.second-row {
  margin-top: 0px; /* Adjust the value as needed for spacing */
}

.gallery-item {
  border-radius: 20px;
  overflow: hidden;
  position: relative;
}

.gallery-item img {
  width: 100%;
  height: auto;
  display: block;
  border-radius: 20px;
  transition: transform 0.3s ease, opacity 0.3s ease;
}

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

/* Mobile adjustments */
@media (max-width: 800px) {
  .gallery {
    grid-template-columns: 1fr; /* Single column for mobile */
    gap: 20px;
    margin: 70px -40px 0px -40px;
    justify-items: center;
  }
  .second-row {
    margin-top: 0px; /* Adjust the value as needed for spacing */
  }
}

/* The Modal */
.modal {
  display: none; /* Hide by default */
  position: fixed; 
  z-index: 1000;  
  left: 0;
  top: 0;
  width: 100%; 
  height: 100%; 
  overflow: auto; 
  backdrop-filter: blur(10px);
  background-color: rgba(0, 0, 0, 0.5);
  opacity: 0; /* Start as invisible */
  transition: opacity 0.3s ease; /* Transition for fading */
}

/* Show the modal background with a fade-in effect */
.modal.show {
  display: flex; /* Change to flex when shown */
  opacity: 1; /* Fully visible */
}

/* Hide the modal background with a fade-out effect */
.modal.hide {
  opacity: 0; /* Fade out */
  transition: opacity 0.3s ease; /* Fade the background */
}

/* Modal content (screenshot) */
.modal-content {
  margin: auto;
  display: block;
  max-width: 80%;
  max-height: 80%;
  border-radius: 20px; /* Keep the rounded corners */
  padding: 0px; /* Padding around the image */
  opacity: 0;  /* Initially invisible */
  transform: scale(0.8); /* Shrink to 80% of its size */
  transition: transform 0.3s ease, opacity 0.3s ease; /* Animate transform and opacity */
  overflow: hidden; /* Ensure content respects border-radius */
}

/* Image inside modal content */
.modal-content img {
  width: 100%;
  height: 100%;
  object-fit: cover; /* Ensure the image fits within the modal content */
  display: block;
  border-radius: inherit; /* Inherit the same border-radius from parent */
}

/* Show the modal content with a scaling and fade-in effect */
.modal.show .modal-content {
  opacity: 1;  /* Fade in the content */
  transform: scale(1); /* Scale to full size */
}

/* Hide the modal content with a scaling and fade-out effect */
.modal.hide .modal-content {
  opacity: 0;  /* Fade out the content */
  transform: scale(0.8); /* Shrink the content */
  transition: transform 0.3s ease, opacity 0.3s ease; /* Same transition for hiding */
}

/* Mobile adjustments */
@media (max-width: 800px) {
  .modal-content {
    padding: 0px; /* Adjust padding as needed */
    max-width: 95%; /* Let the content take more space on small screens */
  }
}