img:-webkit-full-screen,
img:-moz-full-screen,
img:-ms-fullscreen,
img:fullscreen {
  width: auto !important;
  height: auto !important;
  max-width: 100% !important;
  max-height: 100% !important;
  object-fit: contain !important;
}

/* === Base Styles === */
html {
  height: 100%;
  width: 100%;
  margin: 0;
  padding: 0;
  overflow-x: hidden;
}

body {
  font-family: "Courier", monospace;
  background-color: #ffffff;
  color: #000000;
  text-align: center;
  margin: 0;
  padding: 0;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

/* === Header === */
#custom-header {
  width: 100%;
  background-color: #fff;
}

.custom-header-container {
  padding: 20px;
}

.custom-web-name {
  margin: 10px 0 0;
  font-family: "Helvetica", sans-serif;
  font-size: 2.5rem;
  font-style: italic;
  font-weight: bold;
  line-height: 1.2;
  letter-spacing: 0.01rem;
}

.custom-web-name a {
  color: #000;
  text-decoration: none;
}

#custom-tagline {
  margin: -8px 0 10px 2px;
  font-family: "Courier", monospace;
  font-size: 1rem;
  font-style: italic;
  font-weight: bold;
  line-height: 1.5;
  letter-spacing: 0.5px;
}

/* === Navigation === */
#custom-navigation {
  width: 100%;
}

#custom-navigation-list {
  display: flex;
  justify-content: center;
  list-style: none;
  margin: 0;
  padding: 0;
  gap: 20px;
}

#custom-navigation-list li a {
  padding: 1vw;
  font-size: 1rem;
  font-family: "Helvetica", sans-serif;
  font-weight: bold;
  text-decoration: none;
  color: #000;
  border-radius: 20px;
  transition: background-color 0.3s ease;
  text-align: center; /* Added to center text in links */
}

#custom-navigation-list li a:hover {
  background-color: #eee;
}

/* === Layout & Flex Container === */
.flex-container {
  display: flex;
  justify-content: center;
  align-items: center;
  margin: 40px auto;
  max-width: 1000px;
  gap: 40px;
  padding: 0 20px;
}

.flex-row-reverse {
  flex-direction: row-reverse;
}

.flex-item1 img {
  width: 100%;
  max-width: 300px;
  height: auto;
}

.flex-item2a {
  width: 100%;
  max-width: 400px;
  display: flex;
  flex-direction: column;
  align-items: center;
  font-family: "Courier", monospace;
  padding: 20px;
  text-align: center;
}

.flex-item2a h2 {
  font-family: "Helvetica", sans-serif;
  font-style: italic;
  font-weight: bold;
  font-size: 2rem;
  margin-bottom: 10px;
  letter-spacing: -0.05rem;
}

.flex-item2a p {
  font-size: 1rem;
  line-height: 1.6;
}

/* === Work Page Grid Styles === */
.work-grid {
  display: grid;
  /* always up to 3 columns of equal width */
  grid-template-columns: repeat(3, minmax(250px, 1fr));
  gap: 20px;
  padding: 40px 20px;
}

/* below ~900px, switch to fluid auto‑fit */
@media (max-width: 900px) {
  .work-grid {
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  }
}

.work-item {
  background-color: #f0f0f0;
  padding: 10px;
  border-radius: 10px;
  box-shadow: 0px 4px 6px rgba(0, 0, 0, 0.1);
  transition: transform 0.3s ease;
}

.work-item:hover {
  transform: scale(1.02);
}

.work-item img {
  max-width: 100%;
  border-radius: 5px;
}

.work-item p {
  font-family: "Helvetica", sans-serif;
  font-size: 1.2rem;
  font-weight: bold;
  margin-top: 10px;
}

.carousel-wrapper {
  position: relative;
  overflow: hidden;
}

.carousel-track-container {
  overflow: hidden;
  width: 100%;
}

.carousel-track {
  display: flex;
  margin: 0;
  padding: 0;
  list-style: none;
  /* no CSS transition here; JS will set it */
}

.carousel-slide {
  flex: 0 0 100%; /* exactly one slide per “page” */
  display: flex;
  align-items: center; /* center img vertically */
  justify-content: center; /* center img horizontally */
  position: relative; /* for fullscreen button */
  height: 500px;
}

.carousel-slide img {
  width: 100%;
  height: auto; /* fill slide width, keep aspect */
  object-fit: contain;
  display: block;
}

/* keep your existing .fullscreen-btn, .carousel-button styling */

.fullscreen-btn {
  position: absolute;
  top: 8px;
  right: 8px;
  background: rgba(0, 0, 0, 0.3);
  color: #fff;
  border: none;
  padding: 4px 6px;
  font-size: 1.2rem;
  border-radius: 4px;
  cursor: pointer;
  z-index: 10;
  line-height: 1;
  transition: all 0.3s ease-in-out;
}
.fullscreen-btn:hover {
  background: rgba(0, 0, 0, 0.7);
}

.carousel-button {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  background: rgba(0, 0, 0, 0.3);
  border: none;
  color: #fff;
  font-size: 2rem;
  padding: 0.2em 0.5em;
  cursor: pointer;
  z-index: 10;
  transition: all ease-in-out 0.3s;
}
.carousel-button:hover {
  background: rgba(0, 0, 0, 0.7);
}

.carousel-button.prev {
  left: 10px;
}
.carousel-button.next {
  right: 10px;
}

/* === Contact Page Form === */
#contact-form {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  padding: 40px 20px;
}

#contact-form input,
#contact-form textarea {
  width: 300px;
  padding: 10px;
  font-size: 1rem;
  font-family: "Courier", monospace;
  border: 1px solid #ccc;
  border-radius: 5px;
}

#contact-form button {
  background-color: #000;
  color: #fff;
  padding: 10px 20px;
  font-size: 1rem;
  font-family: "Helvetica", sans-serif;
  border: none;
  border-radius: 5px;
  cursor: pointer;
}

#contact-form button:hover {
  background-color: #333;
}

/* === Footer === */
footer {
  width: 100%;
  padding: 20px;
  background-color: #fff;
  font-family: "Courier", monospace;
  font-size: 0.9rem;
  margin-top: auto;
}

/* === Responsive === */
@media (max-width: 768px) {
  .flex-container {
    flex-direction: column;
    gap: 20px;
  }

  .flex-row-reverse {
    flex-direction: column !important;
  }

  .flex-item1 img,
  .flex-item2a {
    width: 100%;
    max-width: 100%;
  }

  #custom-navigation-list {
    flex-direction: column;
  }

  #custom-navigation-list li a {
    margin: 10px 0;
  }
}

@media (max-width: 480px) {
  .custom-web-name {
    font-size: 2rem;
  }

  .work-item p {
    font-size: 1rem;
  }
}

/* === Smooth Scroll === */
html {
  scroll-behavior: smooth;
}
