/* =========================================
   1. BASE SETUP & TYPOGRAPHY
========================================= */
* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
  scroll-padding-top: 120px; /* Matches desktop header perfectly */
}

body {
  font-family: Arial, sans-serif;
  background-color: #ffffff;
  color: #111111;
  line-height: 1.6;
}

/* =========================================
   2. HEADER & NAVIGATION (DESKTOP)
========================================= */
header {
  background-color: #ffffff;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0 4%;
  height: 120px;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  z-index: 1000;
  border-bottom: 1px solid #dddddd;
  box-sizing: border-box;
}

.logo {
  font-size: 24px;
  font-weight: 600;
  color: #0b1f33;
}

.arlogo {
  height: 85px;
  width: 200px;
  padding-top: 7.5px;
  padding-bottom: 15px;
  padding-right: 15px;
  padding-left: 5px;
  display: flex;
}

nav {
  display: flex;
  gap: 30px;
}

nav a {
  text-decoration: none;
  color: #111111;
  font-size: 20px;
  transition: 0.3s;
}

nav a:hover {
  color: #163a5f;
}

/* =========================================
   3. GLOBAL SECTION STYLES
========================================= */
.section-title {
  margin-bottom: 60px;
}

.section-title h2 {
  font-size: 50px;
  font-weight: 700;
}

/* =========================================
   4. HERO SECTION (SPLIT SCREEN)
========================================= */
.hero-split-container {
  display: flex;
  width: 100%;
  height: 90vh; /* Perfectly sizes screen minus header */
  min-height: 550px;
  margin-top: 120px; /* Perfectly clears the fixed header */
  overflow: hidden;
  position: relative;
  background-color: #0b1c2c;
}

.hero-left {
  width: 50%;
  position: relative;
  background-color: #0d283c;
  transition: width 0.6s ease-in-out;
  z-index: 2;
}

.hero-right {
  width: 50%;
  position: relative;
  overflow: hidden;
  transition: width 0.6s ease-in-out;
}

.hero-logo-wrap {
  position: absolute;
  left: 25vw;
  top: 50%;
  transform: translate(-50%, -50%);
  text-align: center;
}

.hero-logo-wrap img {
  transition: transform 0.3s ease;
}

.hero-logo-wrap img:hover {
  transform: scale(1.04);
  cursor: pointer;
}

.hero-render-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: 0.3s;
}

.hero-render-img:hover {
  transform: scale(1.04);
}

.hero-bottom-links {
  position: absolute;
  left: 0;
  bottom: 30px;
  width: 100%;
  padding: 0 125px;
  box-sizing: border-box;
  display: flex;
  justify-content: space-between;
  color: #ffffff;
  font-size: 16px;
  letter-spacing: 2px;
}

.hero-bottom-links span {
  flex: 1;
}

.hero-bottom-links span:nth-child(1) {
  text-align: left;
}
.hero-bottom-links span:nth-child(2) {
  text-align: center;
}
.hero-bottom-links span:nth-child(3) {
  text-align: right;
}

.expand-arrow {
  position: absolute;
  right: 0;
  top: 50%;
  transform: translateY(-50%);
  background-color: rgba(255, 255, 255, 0.1);
  color: #d6e4f0;
  border: none;
  padding: 15px 12px;
  cursor: pointer;
  font-size: 20px;
  opacity: 0;
  transition:
    opacity 0.3s ease,
    background-color 0.3s ease,
    color 0.3s ease;
  z-index: 99;
  border-radius: 8px 0 0 8px;
}

.hero-split-container.expanded .expand-arrow {
  transform: translateY(-50%) scaleX(-1);
  border-radius: 0 8px 8px 0;
}

.hero-left:hover .expand-arrow {
  opacity: 1;
}

.expand-arrow:hover {
  background-color: #d6e4f0;
  color: #0b1f33;
}

.view-projects-btn {
  position: absolute;
  bottom: 30px;
  right: 30px;
  background-color: #ffffff;
  color: #000000;
  padding: 12px 24px;
  text-decoration: none;
  font-weight: 500;
  font-size: 14px;
  border-radius: 6px;
  opacity: 0;
  transform: translateY(10px);
  transition:
    opacity 0.3s ease,
    transform 0.3s ease;
}

.hero-right:hover .view-projects-btn {
  opacity: 1;
  transform: translateY(0);
}

.hero-split-container.expanded .hero-left {
  width: 100%;
}
.hero-split-container.expanded .hero-right {
  width: 0%;
}
.hero-split-container.expanded .expand-arrow {
  transform: translateY(-50%) rotate(180deg);
}

.hero-quote {
  position: absolute;
  right: 15vw;
  top: 50%;
  transform: translateY(-50%);
  color: #f8f9fa;
  font-size: 45px;
  font-weight: 30;
  text-align: center;
  line-height: 1.25;
  opacity: 0;
  transition: opacity 0.4s ease;
}

.hero-split-container.expanded .hero-quote {
  opacity: 1;
  transition-delay: 0.4s;
}

/* =========================================
   5. ABOUT / PHILOSOPHY
========================================= */
.about {
  position: relative;
  overflow: hidden;
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 40px;
  align-items: center;
  background-color: #d6e4f0;
  padding: 80px 8%;
}

.about::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-image: url("../images/general/new\ Navy\ Quatrefoil\ Lattice\ Pattern.png");
  background-repeat: repeat;
  background-size: 500px;
  opacity: 0.04;
  z-index: 1;
}

.about-left-container,
.about-right-container {
  position: relative;
  z-index: 2;
}

.about-left-container {
  order: 1;
}

.image-zoom-container {
  width: 100%;
  aspect-ratio: 1 / 1;
  overflow: hidden;
  border-radius: 5px;
}

.image-zoom-container img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 0.6s ease;
  border-radius: 5px;
}

.about-left-container:hover .image-zoom-container img {
  transform: scale(1.05);
}

.about-right-container {
  order: 2;
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 0 4%;
}

.about-text {
  max-width: 560px;
  width: 100%;
  text-align: left;
}

.about-text::before {
  content: "OUR PHILOSOPHY";
  display: block;
  font-family: Arial, sans-serif;
  font-size: 22px;
  font-weight: 600;
  letter-spacing: 3px;
  color: #0b1f33;
  opacity: 0.75;
  margin-bottom: 22px;
}

.about-text h3 {
  color: #0b1f33;
  font-size: 34px;
  font-weight: 300;
  line-height: 1.35;
  letter-spacing: 0.5px;
  text-align: left;
  max-width: 100%;
  margin: 0 0 32px 0;
  padding-bottom: 28px;
  border-bottom: 1px solid rgba(168, 132, 76, 0.45);
}

.about-text h3 strong {
  font-weight: 700;
  font-family: Arial, sans-serif;
}

.about-text p {
  font-family: "Hind", Arial, sans-serif;
  color: #1a2530;
  font-size: 22px;
  font-weight: 400;
  line-height: 1.8;
  letter-spacing: 0.4px;
  text-align: justify;
  hyphens: none;
  -webkit-hyphens: none;
  margin-bottom: 24px;
}

.about-text p:last-child {
  margin-bottom: 0;
}

/* =========================================
   6. SERVICES
========================================= */
.services {
  padding: 120px 8%;
  background-color: #163a5f;
  color: #ffffff;
}

.services .section-title h2 {
  color: #ffffff;
}

.services-container {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 25px;
}

.service-box {
  background-color: #ffffff;
  color: #111111;
  padding: 40px;
  min-height: 260px;
  transition: 0.3s;
  border-radius: 5px;
}

.service-box:hover {
  transform: translateY(-5px);
}
.service-box h3 {
  color: #0b1f33;
  font-size: 23px;
  margin-bottom: 20px;
}
.service-box p {
  color: #3f4f5f;
  text-align: justify;
}

/* =========================================
   7. PROJECTS
========================================= */
.projects {
  padding: 120px 8%;
  background-color: #0b1f33;
  color: #ffffff;
}

.projects .section-title h2 {
  color: #ffffff;
}

.project-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 25px;
}

.project-card {
  height: 420px;
  position: relative;
  overflow: hidden;
  display: block;
  text-decoration: none;
  border-radius: 10px;
}

.project-card img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: 0.4s;
}

.project-card:hover img {
  transform: scale(1.04);
}

.project-overlay {
  position: absolute;
  left: 0;
  bottom: 0;
  width: 100%;
  padding: 60px 30px 25px;
  background: linear-gradient(transparent, rgba(0, 0, 0, 0.85));
}

.project-overlay h3 {
  color: #ffffff;
  font-size: 24px;
  font-weight: 400;
}
.project-overlay p {
  color: #ededed;
  font-size: 16px;
  font-weight: 100;
}

/* =========================================
   8. CONTACT
========================================= */
.contact {
  position: relative;
  overflow: hidden;
  padding: 120px 8%;
  background-color: #d6e4f0;
}

.contact::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-image: url("../images/general/new\ Navy\ Quatrefoil\ Lattice\ Pattern.png");
  background-repeat: repeat;
  background-size: 500px;
  opacity: 0.04;
  z-index: 1;
}

.contact-wrapper {
  position: relative;
  z-index: 2;
  max-width: 1200px;
  margin: 0 auto;
}

.contact .section-title h2 {
  font-size: 42px;
  color: #0b1f33;
  margin-bottom: 50px;
  font-weight: 700;
  text-align: left;
}

.contact-container {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 80px;
}
.contact-details-icon {
  /* font-size: 24px; */
  width: 24px;
  height: 24px;
  vertical-align: middle;
}

.contact-form .error-message {
  display: block;
  margin-top: -12px; /* pulls it closer to its field, offsetting the 20px flex gap */
  color: #b3261e;
  font-size: 14px;
  min-height: 0;
}

.contact-form .error-message:empty {
  display: none;
}

.contact-form input.invalid,
.contact-form textarea.invalid {
  border-color: #b3261e;
}

.contact-form .form-status {
  font-size: 15px;
}

.contact-form .form-status.success {
  color: #1b6e3c;
}

.contact-form .form-status.error {
  color: #b3261e;
}

.contact-form button:disabled {
  opacity: 0.6;
  cursor: not-allowed;
  transform: none;
}

.contact-form form {
  display: flex;
  flex-direction: column;
  gap: 20px;
}
.contact-form input,
.contact-form textarea {
  position: relative;
  z-index: 10;
  width: 100%;
  padding: 16px;
  border: 1px solid #c7d1dc;
  border-radius: 5px;
  background-color: #ffffff;
  font-family: "Hind", Arial, sans-serif;
  font-size: 15px;
  color: #111111;
  transition: border-color 0.3s ease;
}
.contact-form input:focus,
.contact-form textarea:focus {
  outline: none;
  border-color: #163a5f;
}
.contact-form textarea {
  resize: vertical;
  min-height: 160px;
}
.contact::before {
  pointer-events: none;
}

.contact > .section-title,
.contact-container {
  position: relative;
  z-index: 2;
}
.contact-form button {
  width: fit-content;
  padding: 15px 40px;
  border: none;
  background-color: #0b1f33;
  color: #ffffff;
  cursor: pointer;
  border-radius: 5px;
  font-size: 16px;
  font-weight: 500;
  transition: 0.3s;
}
.contact-form button:hover {
  background-color: #163a5f;
  transform: translateY(-2px);
}

.contact-details {
  display: flex;
  flex-direction: column;
  padding-top: 10px;
}

.contact-details p {
  margin-bottom: 35px;
  color: #3f4f5f;
  font-size: 16px;
  line-height: 1.4;
}
.contact-details strong {
  color: #0b1f33;
  font-size: 20px;
  display: inline-block;
  margin-bottom: 0px;
}
.contact-details a {
  color: #3f4f5f;
  text-decoration: none;
  transition: color 0.3s ease;
}
.contact-details a:hover {
  color: #163a5f;
}

/* =========================================
   9. TEAM / PEOPLE 
========================================= */
.people-bg-wrapper {
  position: relative;
  width: 100%;
  background-color: #d6e4f0;
  overflow: hidden;
}
.people-bg-wrapper::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-image: url("iamges/general/new\ Navy\ Quatrefoil\ Lattice\ Pattern.png");
  background-repeat: repeat;
  background-size: 500px;
  opacity: 0.05;
  z-index: 1;
}

.team-section h1,
.team-section h2,
.team-category {
  text-align: center !important;
  color: #f4f7f9 !important;
}
.team-section {
  position: relative;
  z-index: 2;
  padding: 150px 5% 100px;
  max-width: 1200px;
  margin: 0 auto;
  background-color: #0b1c2c;
  color: #163a5f;
}
.team-section .section-title {
  margin-bottom: 25px;
}
.team-section .section-title h2 {
  margin-bottom: 0 !important;
}
.team-intro {
  text-align: justify;
  max-width: 700px;
  margin: 0 auto 50px auto;
  font-size: 16px;
  line-height: 1.6;
  color: rgba(255, 255, 255, 0.8);
}
.team-category {
  text-align: center;
  font-size: 24px;
  margin-bottom: 40px;
  font-weight: 500;
  color: #ffffff;
}

.team-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 30px;
}
.team-member {
  text-align: left;
}
.team-member img {
  width: 100%;
  aspect-ratio: 4 / 5;
  object-fit: cover;
  background-color: transparent;
  margin-bottom: 15px;
  transition: 0.3s;
  border-radius: 5px;
}
.team-member img:hover {
  transform: scale(1.04);
}
.team-member .member-name {
  font-size: 18px;
  letter-spacing: 1px;
  margin-bottom: 5px;
  font-weight: 400;
  color: #ffffff;
}
.team-member .member-role {
  font-size: 15px;
  color: rgba(255, 255, 255, 0.6);
  margin: 0;
}
.team-socials {
  display: flex;
  gap: 15px;
  margin-top: 12px;
}
.team-socials a {
  color: #d6e4f0;
  font-size: 18px;
  text-decoration: none;
  transition:
    color 0.3s ease,
    transform 0.3s ease;
}
.team-socials a:hover {
  color: #ffffff;
  transform: translateY(-3px);
}

/* =========================================
   10. FOOTER
========================================= */
footer {
  padding: 30px 15px;
  background-color: #111111;
  color: #ffffff;
  display: flex;
  justify-content: center;
  align-items: center;
  text-align: center;
}

/* =========================================
   11. RESPONSIVE / MOBILE & TABLET STYLES
========================================= */

@media (max-width: 991px) {
  /* --- 1. STOPS SECTIONS FROM HIDING UNDER THE TALLER MOBILE HEADER --- */
  html {
    scroll-padding-top: 155px !important;
  }

  /* Optional Failsafe: If your id="home" is directly on the hero container, add this too */
  .hero-split-container {
    scroll-margin-top: 155px;
  }

  /* --- HEADER FIX --- */
  header {
    height: auto !important;
    flex-direction: column;
    align-items: center;
    gap: 20px;
    position: sticky;
    top: 0;
    z-index: 1000;
    background-color: #ffffff;
    width: 100%;
    padding: 20px 0 25px 0;
  }

  .arlogo {
    height: 60px;
    width: auto;
    padding: 0;
    display: flex;
    justify-content: center;
  }

  nav {
    width: 100%;
    flex-wrap: nowrap;
    justify-content: space-between;
    padding: 0 5%;
  }

  nav a {
    text-decoration: none;
    color: #111111;
    font-size: 20px;
  }

  /* --- HERO SECTION GAP FIX --- */
  .hero-split-container {
    flex-direction: column;
    margin-top: 0 !important;
    height: calc(100vh - 130px);
  }

  .hero-left,
  .hero-right {
    width: 100% !important;
    height: 50%;
  }

  .hero-logo-wrap {
    left: 50%;
    top: 42%;
    width: 80%;
  }

  .hero-logo-wrap img {
    max-width: 380px !important;
    height: auto;
  }

  /* --- HERO BOTTOM LINKS --- */
  .hero-bottom-links {
    width: 100%;
    position: absolute;
    bottom: 55px; /* <-- INCREASED: Pushes the text safely above the arrow */
    left: 0;
    padding: 0 4%;
    display: grid;
    grid-template-columns: 1fr 1fr 1fr;
    align-items: center;
  }

  .hero-bottom-links span {
    font-size: 12px;
  }

  .hero-bottom-links span:nth-child(2) {
    text-align: center;
  }

  /* --- EXPAND ARROW & BUTTONS --- */
  .expand-arrow,
  .view-projects-btn {
    opacity: 1;
    transform: none;
  }

  .expand-arrow {
    position: absolute;
    top: auto;
    bottom: 12px;
    left: 50%;
    transform: translateX(-50%) rotate(90deg);
    width: 32px !important;
    height: 24px !important;
    padding: 0 !important;
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 10px !important;
    background-color: rgba(255, 255, 255, 0.2);
    border-radius: 4px;
  }

  .view-projects-btn {
    position: absolute;
    bottom: 20px;
    right: 15px;
    padding: 10px 18px;
    font-size: 12px;
  }

  .hero-split-container.expanded .hero-left {
    height: 100%;
  }
  .hero-split-container.expanded .hero-right {
    height: 0%;
  }
  .hero-split-container.expanded .expand-arrow {
    transform: translateX(-50%) rotate(-90deg);
  }

  .hero-quote {
    right: 50%;
    top: 75%;
    transform: translate(50%, -50%);
    text-align: center;
    font-size: 23px;
    width: 90%;
  }

  /* --- General Section Spacing --- */
  .about,
  .services,
  .projects,
  .contact,
  .team-section {
    padding: 60px 6%;
  }

  /* --- About / Philosophy (Force Stacking) --- */
  .about {
    display: flex !important;
    flex-direction: column !important;
    gap: 40px;
  }

  .about-left-container,
  .about-right-container {
    width: 100% !important;
    padding: 0;
  }

  .about-text h3 {
    font-size: 26px;
    margin-bottom: 25px;
    padding-bottom: 20px;
    text-align: left !important;
    text-align-last: left !important;
  }

  .about-text p {
    font-size: 16px;
    letter-spacing: 0.5px;
    margin-bottom: 20px;
    text-align: left !important;
    text-align-last: left !important;
  }

  /* --- Services, Projects, Contact, Team (Force 1 Column) --- */
  .services-container,
  .project-grid,
  .contact-container,
  .team-grid {
    display: grid !important;
    grid-template-columns: 1fr !important;
    gap: 40px;
  }

  .project-card {
    height: 350px;
  }

  /* --- Footer --- */
  footer {
    flex-direction: column;
    text-align: center;
    padding: 25px 15px;
  }
} /* <--- THIS IS THE ONLY BRACKET THAT SHOULD CLOSE SECTION 11 */
