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

body {
  font-family: 'Roboto', sans-serif;
  background: #191919;
  color: #eee;
  line-height: 1.5;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

p {
  font-size: 1.2rem;
  font-family: 'Roboto', sans-serif;
}

.content-wrapper {
  max-width: 1100px;
  margin: 0 auto; /* Centers the container horizontally */
  padding: 0;
}

.content-header {
  width: 100%;
  margin: 0 auto;
  padding: 0;
}

#home,
#about,
#services,
#gallery,
#contact {
  margin-top: -106px;
  padding-top: 106px;
  max-width: 1100px;
  margin-left: auto;
  margin-right: auto;
  padding-left: 1rem;
  padding-right: 1rem;
  text-align: left;
  box-sizing: border-box;
}

.container {
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 1rem;
}

a {
  color: red;
  text-decoration: none;
}

a:hover,
a:focus {
  text-decoration: underline;
}

header#header {
  background: #000;
  position: sticky;
  top: 0;
  z-index: 9999;
  /* border-bottom: 2px solid red; */
}

header#header .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

nav#nav ul {
  display: flex;
  list-style: none;
}

nav#nav li {
  margin-left: 1.5rem;
}

nav#nav a.nav-link {
  font-weight: 600;
  font-size: 1.25rem;
  padding: 0.3rem 0.5rem;
  transition: background-color 0.5s ease;
  border-radius: 4px;
  text-decoration: none;
}

nav#nav a.nav-link:hover,
nav#nav a.nav-link:focus {
  background-color: #ffb3b3;
  outline: none;
}

#navToggle {
  display: none;
  font-size: 2rem;
  background: none;
  border: none;
  color: red;
  cursor: pointer;
}

.hero {
  padding: 2rem 1rem 4rem;
  text-align: center;
}

.hero h1 {
  font-size: 3rem;
  margin-bottom: 1rem;
  text-shadow: 1px 1px 5px #000;
  font-family: 'Roboto', sans-serif;
}

.hero p {
  font-size: 1.5rem;
  margin-bottom: 2rem;
  text-shadow: 1px 1px 5px #000;
  font-family: 'Roboto', sans-serif;
}

.hero .btn-primary {
  background-color: #b30000;
  color: #fff;
  padding: 1rem 2rem;
  font-size: 1.2rem;
  border: none;
  border-radius: 4px;
  cursor: pointer;
  text-transform: uppercase;
  font-weight: 700;
  transition: background-color 0.3s ease;
}

.hero .btn-primary:hover,
.hero .btn-primary:focus {
  background-color: #b30000;
  outline: none;
}

.section {
  padding: 3rem 0;
  text-align: left; /* Ensures text is left-aligned */
  margin-bottom: 40px; /* Adds space between sections */
}

h2 {
  font-size: 2rem;
  margin-bottom: 1.5rem;
  font-weight: 800;
  border-bottom: 1px solid red;
  /* display: inline-block; */
  padding-bottom: 0.25rem;
  font-family: 'Roboto', sans-serif;
}

.services-list {
  list-style: disc inside;
  font-size: 1.1rem;
  color: white;
  margin-left: 1rem;
}

.gallery-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 1rem;
}

.gallery-item {
  width: 100%;
  border-radius: 8px;
  cursor: pointer;
  transition: transform 0.3s ease;
  outline-offset: 4px;
}

.gallery-item:hover,
.gallery-item:focus {
  transform: scale(1.05);
  outline: 2px solid #ffb3b3;
}

form {
  max-width: 500px;
  margin: 0 auto;
}

label {
  display: block;
  margin-bottom: 0.5rem;
  font-weight: 700;
  color: #ccc;
}

input,
textarea {
  width: 100%;
  padding: 0.5rem 0.75rem;
  border-radius: 4px;
  border: 1px solid #555;
  background-color: #222;
  color: #eee;
  font-size: 1rem;
  margin-bottom: 1rem;
  font-family: inherit;
}

textarea {
  min-height:200px;
}

input:focus,
textarea:focus {
  border-color: #ffb3b3;
  outline: none;
  background-color: #1b1b1b;
}

button.btn {
  background-color: #b30000;
  border: none;
  color: #fff;
  padding: 0.8rem 1.6rem;
  font-weight: 700;
  font-size: 1.1rem;
  border-radius: 4px;
  cursor: pointer;
  text-transform: uppercase;
  transition: background-color 0.3s ease;
}

button.btn:hover,
button.btn:focus {
  background-color: #b30000;
  outline: none;
}

.form-message {
  color: #f44336;
  font-weight: 600;
  min-height: 1.5rem;
  margin-top: -0.5rem;
  margin-bottom: 1rem;
  text-align: center;
}

address {
  font-style: normal;
  color: #bbb;
  text-align: center;
  margin-bottom: 2rem;
}

.site-footer {
  background-color: #000;
  color: #bbb;
  text-align: center;
  padding: 1rem 0;
  margin-top: auto;
  border-top: 1px solid #222;
  font-size: 0.9rem;
}

/* Lightbox */
.lightbox {
  position: fixed;
  top: 10vh;          /* small top offset */
  left: 5vw;          /* small side offset */
  width: 90vw;        /* less than full width */
  max-height: 80vh;   /* limit max height */
  background: rgba(12, 12, 12, 0.95);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 10000;
  border-radius: 8px; /* round corners for better look */
  box-sizing: border-box;
  padding: 1rem;
  overflow: auto;     /* allow scrolling if needed */
}

/* When shown */
.lightbox[aria-hidden="false"] {
  display: flex;
}

/* Lightbox image container */
#lbContent img {
  max-width: 100%;
  max-height: 70vh;
  border-radius: 8px;
  box-shadow: 0 0 30px #ffb3b3;
}

/* Lightbox buttons */
.lb-close,
.lb-prev,
.lb-next {
  width: 50px;
  height: 50px;
  background-color: black;
  color: red;
  font-size: 2.5rem;
  font-weight: bold;
  border: none;
  cursor: pointer;
  user-select: none;
  display: flex;
  align-items: center;
  justify-content: center;
  position: absolute;
  border-radius: 8px;
  box-sizing: border-box;
  z-index: 10001;
  text-shadow: none;
  transition: background-color 0.3s ease;
}

/* Close button top right */
.lb-close {
  top: 0.5rem;
  right: 0.5rem;
  font-size: 3.5rem;
  line-height: 1;
  content: "X";
}

/* Left arrow button */
.lb-prev {
  top: 50%;
  left: 0.5rem;
  transform: translateY(-50%);
}

.lb-prev::before {
  content: "<";
}

/* Right arrow button */
.lb-next {
  top: 50%;
  right: 0.5rem;
  transform: translateY(-50%);
}

.lb-next::before {
  content: ">";
}

/* Hover and focus states */
.lb-close:hover,
.lb-prev:hover,
.lb-next:hover,
.lb-close:focus,
.lb-prev:focus,
.lb-next:focus {
  background-color: #330000;
  outline: none;
}

/* Responsive */
@media (max-width: 768px) {
  #h-cont {
      display: block !important;
    }
    #h-cont > div {
      flex: 1 1 100%;
      max-width: 100%;
      margin-bottom: 10px;
    }
  /* Hamburger toggle button */
  #navToggle.hamburger {
    display: flex;
    flex-direction: column;
    justify-content: space-around;
    width: 30px;
    height: 24px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 0;
    box-sizing: border-box;
    z-index: 10000;
    position: fixed;
    right: 15px;
  }

  /* Hamburger bars */
  #navToggle.hamburger .bar {
    width: 100%;
    height: 3px;
    background-color: red;
    border-radius: 2px;
    transition: all 0.3s ease;
    transform-origin: center;
  }

  /* Hamburger active state - animate to X */
  #navToggle.hamburger.active .bar:nth-child(1) {
    transform: translateY(8px) rotate(45deg);
  }

  #navToggle.hamburger.active .bar:nth-child(2) {
    opacity: 0;
  }

  #navToggle.hamburger.active .bar:nth-child(3) {
    transform: translateY(-8px) rotate(-45deg);
  }

  /* Mobile nav menu container */
  nav#nav {
    position: fixed;
    top: 106px;
    right: 0;
    width: 200px;
    height: calc(100vh - 64px);
    background: #111;
    transform: translateX(100%);
    transition: transform 0.3s ease;
    border-left: 2px solid #000000;
    display: flex;
    flex-direction: column;
    padding-top: 1rem;
    z-index: 9999;
    box-sizing: border-box;
    box-shadow: -5px 0 15px rgba(0, 0, 0, 0.7);
  }

  nav#nav.open {
    transform: translateX(0);
  }

  /* Nav list vertical layout */
  nav#nav ul {
    display: flex;
    flex-direction: column;
    padding: 0;
    margin: 0;
    list-style: none;
  }

  /* Nav list items styling */
  nav#nav li {
    margin: 0.75rem 0;
    text-align: center;
  }

  /* Nav links */
  nav#nav a.nav-link {
    display: block;
    padding: 0.5rem 0;
    font-weight: 600;
    font-size: 1.25rem;
    color: #eee;
    text-decoration: none;
    transition: background-color 0.5s ease;
  }

  nav#nav a.nav-link:hover,
  nav#nav a.nav-link:focus {
    background-color: #ffb3b3;
    outline: none;
  }

  /* Adjust any other header or main content padding/margins if needed */
  main,
  header,
  footer {
    padding-left: 0;
    padding-right: 0;
  }
}

/* On larger screens, keep full-screen lightbox */
@media (min-width: 769px) {
  #h-cont {
     display: flex !important;
     justify-content: space-between;
     align-items: top;
   }
   #h-cont > div {
     flex: 0 0 auto;
     max-width: auto;
   }
  .lightbox {
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    max-height: 100vh;
    border-radius: 0;
    padding: 0;
  }

  #lbContent img {
    max-height: 80vh;
  }

  .lb-close {
    top: 1rem;
    right: 1rem;
  }

  .lb-prev {
    left: 1rem;
  }

  .lb-next {
    right: 1rem;
  }
}

/* Image fade */
/* Initial hidden state */
img.fade-up {
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 1.2s ease-out, transform 1.2s ease-out;
}

/* Visible state */
img.fade-up.show {
    opacity: 1;
    transform: translateY(0);
}
