/* ===== Reset box-sizing globally ===== */
*,
*::before,
*::after {
  box-sizing: border-box;
}

/* ===== Body & HTML Base ===== */
html, body {
  margin: 0;
  padding: 0;
  overflow-x: hidden;
  font-family: "Century Gothic", "AppleGothic", sans-serif;
  font-optical-sizing: auto;
  font-weight: 300;
  font-style: normal;
  color: white;
  background: linear-gradient(to bottom, rgba(9, 9, 121, 0.7), rgba(0, 0, 0, 0.7));
  position: relative; /* Needed for ::before */
  width: 100vw;
  min-height: 100vh;
}

/* Prevent horizontal scroll caused by 100vw + padding/margin */
body {
  max-width: 100vw;
  overflow-x: hidden;
}

/* Background overlay */
body::before {
  content: '';
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background: url('../images/history-background.png') repeat;
  background-size: auto;
  opacity: 0.05;
  z-index: -1;
  pointer-events: none;
}

/* Hide default scrollbar */
html {
  scrollbar-width: none; /* Firefox */
}
::-webkit-scrollbar {
  width: 0px; /* Chrome, Edge, Safari */
}

/* Scroll Indicator */
#scroll-indicator {
  position: fixed;
  right: 20px;
  top: 15%;
  width: 10px;
  height: 70%;
  background: rgba(0, 0, 0, 0.1);
  border-radius: 5px;
  z-index: 100;
}

#scroll-indicator .indicator {
  width: 100%;
  background: #00bcd4;
  border-radius: 5px;
  transition: height 0.3s ease;
}

/* Hero Section */
.hero-section {
  position: relative;
  text-align: center;
  color: white;
  height: calc(80vh); /* Good for desktops */
  overflow: hidden;
  width: 100%;
  max-width: 100vw;
}

.hero-video {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  object-fit: cover; /* Ensures the video covers the div without distortion */
  z-index: 0;
}

/* Overlay Text */
.overlay-aim {
  position: absolute;
  top: 50%;
  left: 50%;
  max-width: 90vw; /* Prevent overflow on small screens */
  padding: 0 1rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  transform: translate(-50%, -50%);
  animation: fadeIn 1.5s ease-out forwards;
  text-align: center;
  color: #fff;
  z-index: 112;
}

.aim {
  margin: 0;
  font-size: clamp(2rem, 4vw, 4rem); /* Responsive font size */
  font-weight: bold;
  letter-spacing: 2px;
  line-height: 1.1;
}

.underline {
  width: 50%;
  max-width: 300px;
  height: 4px;
  background: rgb(76, 136, 183);
  margin: 10px auto;
  border-radius: 2px;
}

.tagline {
  font-size: clamp(1rem, 1.2vw, 1.2rem);
  font-weight: 500;
  margin-top: 10px;
  text-transform: uppercase;
  letter-spacing: 1px;
}

/* Background video */
.background-video {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  object-fit: cover;
  object-position: center;
  z-index: -1;
  opacity: 1;
  pointer-events: none;
  background-color: transparent;
}

/* Fade in animation */
@keyframes fadeIn {
  0% { opacity: 0; transform: translate(-50%, -60%); }
  100% { opacity: 1; transform: translate(-50%, -50%); }
}

/* Main Container */
.main-container {
  position: relative;
  display: flex;
  justify-content: center;
  align-items: stretch;
  flex-wrap: wrap;
  gap: 2rem; /* slightly smaller gap */
  padding: 5% 5%; /* reduced horizontal padding for smaller viewports */
  max-width: 800px;
  margin: 0 auto;
  box-sizing: border-box;
}

/* Contact & Social Containers */
.contact-container,
.socials-form {
  background-color: #fff;
  border-radius: 12px;
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.15);
  padding: 30px 40px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  min-height: 600px;
  box-sizing: border-box;
}

/* Width proportions */
.contact-container {
  flex: 2 1 60%; /* grow 2, shrink 1, basis 60% */
}

.socials-form {
  flex: 1 1 35%; /* grow 1, shrink 1, basis 35% */
}

/* Contact Form */
.contact-container h1 {
  font-size: 2rem;
  margin-bottom: 20px;
  text-align: center;
  color: #222;
}

.contact-form {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.form-group {
  display: flex;
  flex-direction: column;
}

.form-group label {
  font-weight: 600;
  margin-bottom: 6px;
  color: #444;
}

.form-group input,
.form-group textarea {
  padding: 12px;
  border: 1px solid #ccc;
  border-radius: 6px;
  font-size: 1rem;
  transition: border-color 0.3s;
}

.form-group input:focus,
.form-group textarea:focus {
  border-color: #666;
  outline: none;
}

.contact-form button.submit-button {
  background-color: #333;
  color: #fff;
  padding: 12px;
  border: none;
  border-radius: 6px;
  font-size: 1rem;
  cursor: pointer;
  transition: background-color 0.3s;
}

.contact-form button.submit-button:hover {
  background-color: #555;
}

/* Socials and Phone */
.socials-form h2 {
  font-size: 2rem;
  margin-bottom: 10px;
  color: #111;
}

.socials-form hr {
  border: none;
  border-top: 2px solid #ddd;
  margin-bottom: 10px;
}

.phone-number h2 {
  font-size: 2em;
  margin: 0 auto;
}

.phone-number a {
  color: #333;
  font-weight: 600;
  text-decoration: none;
  font-size: 1.1rem;
}

.phone-number a:hover {
  text-decoration: underline;
}

.socials-links {
  margin-top: auto;
}

.social-icons {
  display: flex;
  gap: 15px;
  font-size: 1.8rem;
  flex-wrap: wrap;
}

.social-icons a {
  text-decoration: none;
  color: #333;
  transition: transform 0.2s;
}

.social-icons a:hover {
  transform: scale(1.2);
}

/* Spacer */
.socials-spacer {
  flex: 1;
}

/* ===== Responsive ===== */
@media screen and (max-width: 1024px) {
  .main-container {
    padding: 5% 3%;
    gap: 1.5rem;
  }

  .contact-container,
  .socials-form {
    min-height: auto;
  }
}

@media screen and (max-width: 768px) {
  .main-container {
    flex-direction: column;
    align-items: stretch;
    padding: 5% 3%;
    gap: 1.5rem;
  }

  .contact-container,
  .socials-form {
    flex: none;
    width: 100%;
    min-height: auto;
  }

  .overlay-aim {
    padding: 0 10px;
  }

  .aim {
    font-size: 2.5rem;
    letter-spacing: 1px;
  }

  .underline {
    width: 60%;
    height: 3px;
    margin: 8px auto;
  }

  .tagline {
    font-size: 1rem;
    margin-top: 8px;
    letter-spacing: 0.5px;
  }

  .contact-container h1,
  .socials-form h2 {
    font-size: 1.5rem;
  }

  .form-group input,
  .form-group textarea {
    font-size: 0.9rem;
    padding: 10px;
  }

  .contact-form button.submit-button {
    font-size: 0.9rem;
    padding: 10px;
  }

  .social-icons {
    font-size: 1.5rem;
    gap: 12px;
    flex-wrap: wrap;
  }

  .phone-number h2 {
    font-size: 1.4rem;
  }

  .phone-number a {
    font-size: 1rem;
  }

  #scroll-indicator {
    display: none; /* Hide on mobile */
  }
}

@media screen and (max-width: 480px) {
  .hero-section {
    height: calc(25vh + 70px);
  }

  .aim {
    font-size: 2rem;
  }

  .tagline {
    font-size: 0.9rem;
  }

  .underline {
    width: 70%;
  }

  .form-group input,
  .form-group textarea {
    font-size: 0.85rem;
  }

  .contact-container,
  .socials-form {
    padding: 20px;
  }

  .social-icons {
    justify-content: center;
    font-size: 1.4rem;
  }

  .phone-number h2 {
    font-size: 1.2rem;
  }

  .phone-number a {
    font-size: 0.9rem;
  }
}
