/* *TAG */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  background: #0a1a2f;
  color: white;
  overflow-x: hidden; /* Prevents horizontal scroll on small devices */
}

#work,
#about,
#what-we-offer,
#footer,
#our-work {
  scroll-margin-top: 80px;
}

/* ROOT TAG COLOUR DECLARATION */
:root {
  --primary: #105cf0;
  --dark-bg: #0a1a2f;
  --nav-bg: #081427;
  --text-light: #ffffff;
  --text-gray: #a0aec0;
  --accent-gradient: linear-gradient(135deg, #105cf0, #00d4ff);
}

html {
  scroll-behavior: smooth;
}

/* === CODE FOR HEADER SECTION=== */
#header {
  display: flex;
  height: 60px;
  width: 100%;
  justify-content: space-between;
  padding: 8px 20px; /* Increased side padding */
  gap: 1rem;
  position: sticky;
  top: 0;
  right: 0;
  z-index: 999; /* Increased Z-index to stay on top */
  align-items: center;
  background: linear-gradient(135deg, #081427, #0a2d5f);
}

#hea-logo {
  display: flex;
  align-items: center;
  justify-content: center;
  width: fit-content;
  max-width: 150px;
}

#hea-logo h1 {
  display: inline-block;
  font-size: clamp(1.5rem, 0.5rem + 2vw, 2rem);
  background: var(--accent-gradient);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}

.hea-nav-list {
  display: flex;
  flex: 1;
  list-style: none;
  gap: 2rem;
  justify-content: center;
  align-items: center;
  position: relative;
}

.hea-nav-list a {
  text-decoration: none;
  color: white;
  font-size: 1.1rem;
  transition: all 0.3s cubic-bezier(0.6, 1, 0.2, 1);
  display: inline-block;
}

.hea-nav-list a:hover {
  transform: scale(1.1);
  color: var(--primary);
}

.hea-nav-list .selectednavitem {
  color: var(--primary);
  font-size: 1.2rem;
}

#hea-btn {
  padding: 10px;
  font-weight: 500;
  background-color: var(--foraccent);
  /* Added fallback color if var is missing */
  background-color: var(--primary);
  color: white;
  border-radius: 6px;
  border: none;
  width: fit-content;
  transition: all 0.3s ease;
  box-shadow: 0 2px 1rem 0px #105bf0d7;
  white-space: nowrap; /* Prevents text breaking */
}

#hea-btn:hover {
  transform: scale(1.05) translateY(-5px);
  box-shadow: 0 2px 1.1rem 5px #105bf0d7;
}

#header .material-symbols-outlined {
  display: none;
  cursor: pointer;
  font-size: 2rem;
}

/* ====CODE FOR HERO SECTION==== */
#hero {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, #081427, #0a2d5f);
  width: 100%;
  position: relative;
  padding: 1rem;
  opacity: 0;
  transform: translateY(40px);
  transition: all 1s ease;
}
#hero.show {
  opacity: 1;
  transform: translateY(0);
}

#he-container1 {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  width: 90%; /* Increased width for responsiveness */
  text-align: center;
}

.he-heading {
  font-size: clamp(2.5rem, 1rem + 5vw, 4rem);
  text-align: center;
  line-height: 1.2;
}

#he-heading2 {
  margin-bottom: 2rem;
}

#he-heading2 span {
  font-size: clamp(2.5rem, 1rem + 5vw, 4rem);
  background: var(--accent-gradient);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

#he-paragraph {
  font-size: clamp(1rem, 0.5rem + 1.5vw, 1.2rem);
  text-align: center;
  max-width: 550px;
  margin-bottom: 2.5rem;
  line-height: 1.6;
}

#he-btn-container {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
  justify-content: center;
}

#he-btn1,
#he-btn2 {
  padding: 15px 30px;
  font-weight: 500;
  border-radius: 6px;
  border: none;
  transition: all 0.3s ease;
  cursor: pointer;
  font-size: 1rem;
}

#he-btn1 {
  background-color: var(--primary);
  color: white;
  box-shadow: 0 2px 1rem 0px #105bf0d7;
}

#he-btn2 {
  background: black;
  color: white;
  box-shadow: 0 2px 1rem 0px #105bf0d7;
}

#he-btn1:hover,
#he-btn2:hover {
  transform: scale(1.05) translateY(-5px);
}

/* ==== CODE FOR WHAT WE OFFER ==== */
#what-we-offer {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 3rem;
  padding: 4rem 1.5rem;
  min-height: 100vh;
  opacity: 0;
  transform: translateY(40px);
  transition: all 1s ease;
}

#what-we-offer.show {
  opacity: 1;
  transform: translateY(0);
}

#what-we-offer-div1 {
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1rem;
}

#what-we-offer-div1 h2 {
  font-size: clamp(2rem, 1rem + 3vw, 2.5rem);
  color: var(--primary);
}

#what-we-offer-div1 h6 {
  font-size: clamp(0.9rem, 0.5rem + 1vw, 1.1rem);
  max-width: 600px;
  font-weight: 400;
  color: var(--text-gray);
  line-height: 1.5;
}

#what-we-offer-div2 {
  display: flex;
  justify-content: center;
  align-items: center;
  width: 100%;
  gap: 2rem;
  flex-wrap: wrap; /* Crucial: Allows boxes to wrap on tablets */
}

.what-we-offer-box {
  background-color: rgba(255, 255, 255, 0.05);
  backdrop-filter: blur(10px);
  color: white;
  border-radius: 15px;
  display: flex;
  justify-content: center;
  flex-direction: column;
  padding: 30px;
  gap: 1rem;
  /* RESPONSIVE WIDTHS */
  width: 100%;
  max-width: 350px;
  min-height: 250px;
  transition: all 0.3s ease-in-out;
  border: 1px solid rgba(255, 255, 255, 0.1);
}

.what-we-offer-box:hover {
  background-color: rgba(255, 255, 255, 0.15);
  transform: translateY(-10px);
  border: 1px solid var(--primary);
}

.what-we-offer-box h3 {
  font-size: 1.4rem;
}

#what-we-offer-btn-container {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
  justify-content: center;
}

#what-we-offer-btn1,
#what-we-offer-btn2 {
  padding: 15px 30px;
  font-weight: 500;
  border-radius: 6px;
  border: none;
  cursor: pointer;
  transition: all 0.3s ease;
}

#what-we-offer-btn1 {
  background-color: var(--primary);
  color: white;
  box-shadow: 0 2px 1rem 0px #105bf0d7;
}

#what-we-offer-btn2 {
  background-color: black;
  color: white;
  box-shadow: 0 2px 1rem 0px #105bf0d7;
}

#what-we-offer-btn1:hover,
#what-we-offer-btn2:hover {
  transform: scale(1.05) translateY(-5px);
}

/* === CODE FOR ABOUT SECTION==== */
#about {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 80vh;
  padding: 4rem 2rem;
  gap: 4rem;
  opacity: 0;
  transform: translateY(40px);
  transition: all 1s ease;
  flex-wrap: wrap; /* Wraps image and text on smaller screens */
}
#about.show {
  opacity: 1;
  transform: translateY(0);
}

#ab-div1 {
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 1.5rem;
  flex: 1;
  min-width: 300px;
  max-width: 550px;
}

#ab-div1 h6 {
  width: fit-content;
  background-color: var(--primary);
  color: white;
  padding: 6px 12px;
  border-radius: 25px;
  font-size: 0.9rem;
}

#ab-div1 h2 {
  font-size: clamp(2rem, 1rem + 3vw, 2.5rem);
  line-height: 1.2;
}

#ab-div1 p {
  font-size: 1.05rem;
  line-height: 1.6;
  color: #e0e0e0;
}

#ab-btn-container {
  display: flex;
  gap: 1rem;
  margin-top: 1rem;
}

#ab-btn1,
#ab-btn2 {
  padding: 15px 30px;
  border-radius: 6px;
  border: none;
  cursor: pointer;
  color: white;
  transition: all 0.3s ease;
}
#ab-btn1 {
  background: var(--primary);
  box-shadow: 0 2px 1rem 0 #105bf0d7;
}
#ab-btn2 {
  background: black;
  box-shadow: 0 2px 1rem 0 #105bf0d7;
}

#ab-btn1:hover,
#ab-btn2:hover {
  transform: scale(1.05) translateY(-5px);
}

#ab-div2 {
  display: flex;
  align-items: center;
  justify-content: center;
  flex: 1;
  min-width: 300px;
  max-width: 500px;
}

#ab-div2 img {
  width: 100%;
  max-width: 400px; /* Limit size but allow shrinking */
  height: auto;
  border-radius: 25px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
}

/* ====CODE FOR WORK SECTION (Shared Styles) */
#work,
#our-work {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 3rem;
  padding: 4rem 1.5rem;
  opacity: 0;
  transform: translateY(40px);
  transition: all 1s ease;
  min-height: 100vh;
}

#work.show,
#our-work.show {
  opacity: 1;
  transform: translateY(0);
}

#work h2,
#our-work h2 {
  font-size: clamp(2rem, 1rem + 3vw, 2.5rem);
  color: var(--primary);
}

#wo-samples,
#ou-wo-samples {
  display: flex;
  align-items: flex-start;
  justify-content: center;
  gap: 2rem;
  width: 100%;
  flex-wrap: wrap; /* Allows cards to wrap */
}

/* Style for individual Project Cards */
#wo-samples div,
#ou-wo-samples div {
  width: 100%;
  max-width: 350px; /* Responsive limit */
  border-radius: 12px;
  padding: 1.5rem 0 0 0;
  gap: 1rem;
  transition: all 0.3s ease-in-out;
  background-color: rgba(255, 255, 255, 0.08);
  backdrop-filter: blur(10px);
  color: white;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.05);
}

#wo-samples div:hover,
#ou-wo-samples div:hover {
  transform: translateY(-10px);
  background-color: rgba(255, 255, 255, 0.12);
}

#wo-samples div h4,
#ou-wo-samples div h4 {
  font-size: 1.5rem;
  font-weight: 550;
  text-align: center;
  padding: 0 1rem;
}

#wo-samples div img,
#ou-wo-samples div img {
  width: 100%;
  height: 220px; /* Fixed height for consistency */
  object-fit: cover;
  border-bottom-left-radius: 12px;
  border-bottom-right-radius: 12px;
  display: block;
  transition: all 0.3s ease;
  opacity: 0.9;
}

#wo-samples div img:hover,
#ou-wo-samples div img:hover {
  transform: scale(1.05);
  opacity: 1;
}

#wo-btn {
  background-color: var(--primary);
  border: none;
  padding: 15px 40px;
  transition: all 0.3s ease;
  border-radius: 6px;
  box-shadow: 0 2px 1rem 0px #105bf0d7;
  cursor: pointer;
  margin-top: 1rem;
}
#wo-btn:hover {
  transform: translateY(-5px);
  box-shadow: 0 4px 1.5rem 5px #105bf0d7;
}

#wo-btn a {
  text-decoration: none;
  color: white;
  font-size: 1.1rem;
  font-weight: 500;
}

/*====CODE FOR FOOTER SECTION==== */
#footer {
  display: flex;
  flex-direction: column;
  background: #081427;
  color: white;
  padding: 3rem 1.5rem 1rem 1.5rem;
  border-top-left-radius: 20px;
  border-top-right-radius: 20px;
  align-items: center;
  justify-content: center;
  gap: 3rem;
  margin-top: 2rem;
}

#fo-div1 {
  display: flex;
  justify-content: space-between;
  width: 100%;
  max-width: 1200px;
  background-color: white;
  color: black;
  border-radius: 15px;
  padding: 3rem;
  align-items: center;
  gap: 2rem;
  flex-wrap: wrap; /* Responsive wrapping */
}

#fo-div1 div:nth-child(1) {
  flex: 1;
  min-width: 300px;
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

#fo-div1 div:nth-child(1) h2 {
  font-size: clamp(2rem, 1rem + 3vw, 3rem);
  line-height: 1.1;
}

#fo-div1 div:nth-child(1) p {
  font-size: 1rem;
  line-height: 1.6;
  color: #4a5568;
}

#fo-div1 div:nth-child(2) {
  flex: 1;
  min-width: 300px;
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
  background-color: rgba(16, 92, 240, 0.1); /* Light primary */
  padding: 2rem;
  border-radius: 15px;
}

#fo-div1 div:nth-child(2) h4 {
  font-size: 1.5rem;
  color: var(--primary);
}

#fo-div1 div:nth-child(2) p {
  line-height: 1.5;
}

.contact-details {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  margin-top: 0.5rem;
}

.contact-details p {
  display: flex;
  gap: 1rem;
  align-items: center;
  font-weight: 500;
  /* justify-content: center; */
}

#fo-div2 {
  display: flex;
  justify-content: space-between;
  width: 100%;
  max-width: 1200px;
  border-top: 1px solid rgba(255, 255, 255, 0.2);
  padding-top: 2rem;
  font-size: 0.9rem;
  color: #a0aec0;
  flex-wrap: wrap;
  gap: 1rem;
}

/* ===== MEDIA QUERIES FOR RESPONSIVENESS ===== */

@media (max-width: 900px) {
  /* Tablet Adjustments */
  #fo-div1 {
    flex-direction: column;
    padding: 2rem;
  }
  #fo-div1 > div:nth-child(1),
  #fo-div1 > div:nth-child(2) {
    width: 100%;
  }
}

@media (max-width: 768px) {
  /* Header Logic */
  .hea-nav-list {
    flex-direction: column;
    position: fixed; /* Fixed to cover screen */
    top: 60px;
    right: 0;
    height: calc(100vh - 60px);
    width: 100%;
    max-width: 300px; /* Drawer style */
    background-color: rgba(8, 20, 39, 0.95);
    backdrop-filter: blur(15px);
    z-index: 1000;
    padding: 2rem;
    gap: 2rem;
    transform: translateX(100%);
    transition: transform 0.3s ease-in-out;
    border-left: 1px solid rgba(255, 255, 255, 0.1);
    justify-content: flex-start;
  }

  .hea-nav-list.active {
    transform: translateX(0);
  }

  .hea-nav-list a {
    color: white;
    font-size: 1.5rem;
  }

  #hea-btn {
    display: none;
  }

  #header .material-symbols-outlined {
    display: block;
    color: white;
  }

  /* General Section Stacking */
  #about {
    flex-direction: column-reverse;
    text-align: center;
    gap: 3rem;
  }

  #ab-div1,
  #ab-div2 {
    max-width: 100%;
    min-width: unset;
  }

  #ab-div1 {
    align-items: center; /* Center text on mobile */
  }

  #fo-div2 {
    flex-direction: column;
    text-align: center;
  }
}

@media (max-width: 480px) {
  /* Mobile Phone Adjustments */
  #header {
    padding: 8px 15px;
  }

  #hero {
    min-height: auto;
    padding-top: 6rem;
    padding-bottom: 4rem;
  }

  .he-heading {
    font-size: 2.5rem;
  }

  #he-btn-container,
  #what-we-offer-btn-container,
  #ab-btn-container {
    flex-direction: column;
    width: 100%;
  }

  button {
    width: 100%;
  }

  .what-we-offer-box,
  #wo-samples div,
  #ou-wo-samples div {
    max-width: 100%; /* Full width cards */
  }

  #fo-div1 {
    padding: 1.5rem;
  }

  #fo-div1 div:nth-child(1) {
    min-width: 100px;
  }
  #fo-div1 div:nth-child(2) {
    min-width: 100px;
  }
}
