/* Global Reset */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

/* Body Styles */
body {
  font-family: "Segoe UI", Tahoma, Geneva, Verdana, sans-serif;
  background-color: #808080;
  min-height: 100vh;
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 20px;
}

/* Index Page Styles */
.container {
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-100%, -100%);
  text-align: center;
  background: white;
  padding: 60px 80px;
  border-radius: 12px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
}

.image-container-top-left {
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(0%, 0%);
  max-width: 300px;
  padding: 10px;
  background: white;
  border: 1px solid #ccc;
  border-radius: 8px;
}

.image-container-top-left img {
  width: 100%;
  height: auto;
  display: block;
}

h1 {
  color: #2c3e50;
  margin-bottom: 30px;
  font-size: 2.5rem;
}

h2 {
  color: #2c3e50;
  margin-top: 30px;
  margin-bottom: 15px;
  font-size: 1.8rem;
}

.gallery-link {
  display: inline-block;
  background-color: #3498db;
  color: white;
  padding: 15px 40px;
  text-decoration: none;
  border-radius: 8px;
  font-size: 1.2rem;
  transition:
    background-color 0.3s,
    transform 0.2s;
  margin: 10px;
}

.gallery-link:hover {
  background-color: #2980b9;
  transform: translateY(-2px);
}

/* Pilot Info / Text Content Pages */
.content-container {
  position: relative;
  width: 100%;
  max-width: 900px;
}

.text-box {
  background-color: rgba(255, 255, 255, 0.95);
  border-radius: 12px;
  padding: 60px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
  color: #333;
  line-height: 1.8;
}

.text-box h1 {
  color: #2c3e50;
  margin-bottom: 30px;
  font-size: 2.5rem;
  text-align: center;
}

.text-box h2 {
  color: #2c3e50;
  margin-top: 30px;
  margin-bottom: 15px;
  font-size: 1.8rem;
}

.text-box h3 {
  margin-bottom: 10px;
  color: #2c3e50;
}

.text-box p {
  font-size: 1.1rem;
  margin-bottom: 20px;
  text-align: justify;
}

.text-box ul {
  margin-left: 30px;
  margin-bottom: 20px;
}

.text-box li {
  font-size: 1.1rem;
  margin-bottom: 10px;
}

/* Gallery Pages */
.gallery-container {
  position: relative;
  width: 100%;
  max-width: 1200px;
  height: 80vh;
  max-height: 800px;
}

.image-wrapper {
  position: absolute;
  cursor: pointer;
  transition: transform 0.3s ease;
  overflow: hidden;
  border-radius: 8px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
}

.image-wrapper:hover {
  transform: scale(1.05);
  z-index: 10;
}

.image-wrapper img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

/* Text box positions for gallery pages */
.gallery-container .text-box {
  position: absolute;
  background-color: rgba(255, 255, 255, 0.95);
  border-radius: 8px;
  padding: 20px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
  color: #333;
  line-height: 1.6;
  overflow-y: auto;
  overflow-x: hidden;
}

.gallery-container .text-box p {
  font-size: 14px;
  text-align: left;
  margin-bottom: 10px;
}

/* Text box positions - using percentages for better scaling */
.text-box:nth-child(2) {
  top: calc(50% - 340px);
  left: calc(50% + 90px);
  width: min(400px, 25vw);
  height: min(300px, 18.75vw);
}

.text-box:nth-child(4) {
  top: calc(50% + 40px);
  left: calc(50% - 490px);
  width: min(400px, 25vw);
  height: min(300px, 18.75vw);
}

/* Diagonal arrangement - using percentages for better scaling */
.image-wrapper:nth-child(1) {
  top: calc(50% - 400px);
  left: calc(50% - 540px);
  width: min(500px, 33.33vw);
  height: min(375px, 25vw);
}

.image-wrapper:nth-child(3) {
  top: calc(50% + 25px);
  left: calc(50% + 40px);
  width: min(500px, 33.33vw);
  height: min(375px, 25vw);
}

/* Modal/Fullscreen overlay */
.modal {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background-color: rgba(0, 0, 0, 0.95);
  z-index: 1000;
  justify-content: center;
  align-items: center;
  animation: fadeIn 0.3s ease;
}

.modal.active {
  display: flex;
}

@keyframes fadeIn {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

.modal-content {
  max-width: 95vw;
  max-height: 95vh;
  object-fit: contain;
  animation: zoomIn 0.3s ease;
}

@keyframes zoomIn {
  from {
    transform: scale(0.8);
  }
  to {
    transform: scale(1);
  }
}

.close-btn {
  position: absolute;
  top: 30px;
  right: 50px;
  color: white;
  font-size: 40px;
  font-weight: bold;
  cursor: pointer;
  transition: transform 0.2s;
  z-index: 1001;
}

.close-btn:hover {
  transform: scale(1.2);
  color: #ff4444;
}

/* Navigation arrows */
.nav-arrow {
  position: fixed;
  top: 50%;
  transform: translateY(-50%);
  background-color: rgba(255, 255, 255, 0.9);
  color: #2c3e50;
  width: 50px;
  height: 50px;
  border-radius: 50%;
  display: flex;
  justify-content: center;
  align-items: center;
  text-decoration: none;
  font-size: 24px;
  font-weight: bold;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.3);
  transition:
    background-color 0.3s,
    transform 0.2s;
  z-index: 100;
}

.nav-arrow:hover {
  background-color: #3498db;
  color: white;
  transform: translateY(-50%) scale(1.1);
}

.nav-arrow.left {
  left: 20px;
  background-color: rgba(220, 53, 69, 0.9);
  color: white;
}

.nav-arrow.left:hover {
  background-color: #c82333;
}

.nav-arrow.right {
  right: 20px;
  background-color: rgba(40, 167, 69, 0.9);
  color: white;
}

.nav-arrow.right:hover {
  background-color: #218838;
}

/* Responsive design */
@media (max-width: 1200px) {
  /* Gallery pages - scale proportionally */
  .image-wrapper:nth-child(1),
  .image-wrapper:nth-child(3) {
    width: 30vw;
    height: 22.5vw;
  }

  .gallery-container .text-box {
    width: 22.5vw;
    height: 16.875vw;
    padding: 15px;
  }
}

@media (max-width: 768px) {
  /* Index page responsive */
  .container {
    position: relative;
    transform: none;
    padding: 30px 40px;
    margin: 20px auto;
    width: 90%;
    max-width: 500px;
  }

  .image-container-top-left {
    position: relative;
    transform: none;
    margin: 0 auto 20px;
    max-width: 250px;
  }

  h1 {
    font-size: 1.8rem;
    margin-bottom: 20px;
  }

  h2 {
    font-size: 1.3rem;
  }

  .gallery-link {
    padding: 12px 30px;
    font-size: 1rem;
  }

  /* Text content pages */
  .text-box {
    padding: 30px;
  }

  .text-box h1 {
    font-size: 2rem;
  }

  .text-box h2 {
    font-size: 1.5rem;
  }

  .text-box p,
  .text-box li {
    font-size: 1rem;
  }

  /* Gallery pages - stack vertically */
  .gallery-container {
    height: auto;
    padding: 20px;
  }

  .image-wrapper,
  .gallery-container .text-box {
    position: relative !important;
    width: 100% !important;
    height: auto !important;
    top: auto !important;
    left: auto !important;
    right: auto !important;
    bottom: auto !important;
    margin-bottom: 20px;
  }

  .image-wrapper {
    max-width: 400px;
    margin-left: auto;
    margin-right: auto;
  }

  .image-wrapper img {
    width: 100%;
    height: auto;
    object-fit: contain;
  }

  .gallery-container .text-box {
    max-width: 400px;
    margin-left: auto;
    margin-right: auto;
    min-height: auto;
  }

  /* Navigation arrows */
  .nav-arrow {
    width: 40px;
    height: 40px;
    font-size: 20px;
  }
}

@media (max-width: 480px) {
  /* Extra small screens */
  .container {
    padding: 20px;
  }

  .image-container-top-left {
    max-width: 200px;
  }

  h1 {
    font-size: 1.5rem;
  }

  h2 {
    font-size: 1.2rem;
  }

  .gallery-link {
    padding: 10px 20px;
    font-size: 0.9rem;
  }

  .nav-arrow {
    width: 35px;
    height: 35px;
    font-size: 18px;
  }

  .nav-arrow.left {
    left: 10px;
  }

  .nav-arrow.right {
    right: 10px;
  }
}

@media (max-width: 375px) {
  /* iPhone and very small screens */
  .nav-arrow {
    width: 30px;
    height: 30px;
    font-size: 16px;
  }

  .nav-arrow.left {
    left: 5px;
  }

  .nav-arrow.right {
    right: 5px;
  }
}

@media (max-width: 320px) {
  /* Extra narrow screens */
  .nav-arrow {
    width: 28px;
    height: 28px;
    font-size: 14px;
  }

  .nav-arrow.left {
    left: 3px;
  }

  .nav-arrow.right {
    right: 3px;
  }
}
