/*
FONT SIZE SYSTEM (px)
10 / 12 / 14 / 16 / 18 / 20 / 24 / 30 / 36 / 44 / 52 / 62 / 74 / 86 / 98
*/

html {
  font-size: 62.5%;
  color: #fff;
  --main-color: #0582ca;
  --secondary-color: #003554;
  --background-color: #fff0dc;
  --pink-color: #e7a6d2;
}

body {
  width: 100%;
  min-height: 100vh;
  background-color: var(--main-color);
  overflow-x: hidden; /* Prevent horizontal scroll */
}

* {
  padding: 0;
  margin: 0;
  box-sizing: border-box;
}

.header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  height: 15rem;
  padding: 4.8rem 8rem 0 8rem;
  position: relative;
}

.logo {
  height: 8rem;
  z-index: 1001;
}

.nav {
  z-index: 1000;
}

.main-nav {
  border-radius: 6px;
}

.main-nav ul {
  display: flex;
  gap: 1.5rem;
  align-items: center;
}

.main-nav ul li {
  list-style: none;
  padding: 4px;
  position: relative;
  transition: 0.5s;
  display: block;
}

.main-nav ul li a {
  color: #ffff;
  text-decoration: none;
  padding: 5px 10px;
  font-weight: 500;
  font-size: 1.8rem;
  font-family: poppins, Arial, Helvetica, sans-serif;
}

.main-nav ul li a:hover {
  color: var(--pink-color);
  border-radius: 6px;
}

.main-nav ul li ul {
  display: none;
}

/* Hamburger Menu Styles */
.hamburger {
  display: none;
  flex-direction: column;
  cursor: pointer;
  z-index: 1001;
}

.hamburger span {
  width: 25px;
  height: 3px;
  background-color: #fff;
  margin: 3px 0;
  transition: 0.3s;
  border-radius: 2px;
}

/* Hamburger Animation */
.hamburger.active span:nth-child(1) {
  transform: rotate(-45deg) translate(-5px, 6px);
}

.hamburger.active span:nth-child(2) {
  opacity: 0;
}

.hamburger.active span:nth-child(3) {
  transform: rotate(45deg) translate(-5px, -6px);
}

/* Overlay for mobile menu */
.overlay {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.5);
  z-index: 999;
}

.overlay.active {
  display: block;
}

.hero-section {
  margin-top: 10rem;
  padding-left: 20rem;
  padding-right: 20rem;
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 2rem;
}

.hero-text {
  flex: 1;
}

.paragraph-title {
  font-family: Urbanist, Arial, Helvetica, sans-serif;
  font-weight: 700;
  font-size: 3.6rem;
}

.under-title {
  font-family: poppins, Arial, Helvetica, sans-serif;
  font-size: 1.4rem;
}

.hero-paragraph {
  font-family: poppins, Arial, Helvetica, sans-serif;
  font-size: 1.8rem;
  width: 65%;
}

header h1 {
  font-family: Urbanist, Arial, Helvetica, sans-serif;
  font-size: 3.6rem;
  margin-top: 10rem;
  padding-left: 20rem;
  padding-right: 20rem;
  text-align: center;
}

.projects-container img {
  width: 30rem;
}

.projects-container {
  width: 100%;
  padding: 5rem 20rem;
}

.button-group {
  text-align: center;
  margin-bottom: 4rem;
}

.button-group .button {
  display: inline-block;
  padding: 1rem 2rem;
  margin: 1rem;
  background-color: var(--secondary-color);
  font-family: poppins, Arial, Helvetica, sans-serif;
  font-weight: 500;
  color: #fff;
  border: none;
  border-radius: 1rem;
  transition: all 0.4s;
  outline: none;
  cursor: pointer;
}

.button-group .button.active {
  background-color: #e9ebf8;
  color: var(--secondary-color);
}

.button-group .button:hover {
  background-color: var(--pink-color);
  color: var(--secondary-color);
}

div.gallery {
  width: 100%;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
}

div.gallery .item {
  position: relative;
  margin: 1rem;
  width: calc(30% - 8px);
  overflow: hidden;
  cursor: pointer;
}

.item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: 0.3s;
}

div.gallery .item:hover img {
  transform: scale(1.15);
}

.item .overlay {
  position: absolute;
  width: 100%;
  height: 100%;
  top: 0;
  left: 0;
  display: flex;
  justify-content: center;
  align-items: center;
  background-color: rgba(0, 53, 84, 0.7);
  color: #fff;
  padding: 1.5rem;
  overflow: hidden;
  opacity: 0;
  transition: opacity 0.2s ease-in-out;
}

.item:hover .overlay {
  opacity: 1;
}

.item .overlay a {
  display: inline-block;
  padding: 0.8rem 1.6rem;
  color: var(--background-color);
  border: 0.2rem solid var(--background-color);
  border-radius: 0.8rem;
  text-decoration: none;
  font-family: poppins, Arial, Helvetica, sans-serif;
  font-size: 1.4rem;
  font-weight: 800;
  transform: 0.3s;
}

.item .overlay a:hover {
  background-color: var(--background-color);
  color: var(--main-color);
}

.footer-container {
  display: flex;
  align-items: center;
  justify-content: space-around;
  margin-top: 10rem;
  background-color: var(--secondary-color);
  height: 25rem;
  gap: 10rem;
}

.logo-footer img {
  height: 6rem;
  color: #fff;
}

.links-footer ul a {
  text-decoration: none;
  color: #fff;
  font-family: "poppins";
  font-size: 1.6rem;
}

.links-footer li {
  margin-top: 0.6rem;
  text-decoration: none;
  list-style-type: none;
}

.text-footer p {
  color: #fff;
  font-family: "poppins";
  font-size: 1.4rem;
  line-height: 1.5;
  text-align: center;
}

/* --------------------------------- PROJECTS -------------------------------------- */

.project-title {
  font-family: Urbanist, Arial, Helvetica, sans-serif;
  font-size: 2.8rem;
  text-align: center;
  margin-top: 15rem;
}

.project-paragraph {
  font-family: poppins, Arial, Helvetica, sans-serif;
  font-size: 1.4rem;
  width: 35%;
  text-align: center;
  margin: auto;
  margin-top: 1.5rem;
  margin-bottom: 5rem;
}

.project-container img {
  width: 45%;
  display: block;
  margin: auto;
  margin-bottom: 1.5rem;
}

.button-pages {
  display: block;
  margin: auto;
  margin-top: 10rem;
  padding: 1rem 2rem;
  background-color: var(--secondary-color);
  font-family: poppins, Arial, Helvetica, sans-serif;
  font-weight: 500;
  color: #fff;
  border: none;
  border-radius: 1rem;
  transition: all 0.4s;
  outline: none;
  cursor: pointer;
}

.button-pages.active {
  background-color: #e9ebf8;
  color: var(--secondary-color);
}

.button-pages:hover {
  background-color: var(--pink-color);
  color: var(--secondary-color);
}

/*------------------------------------------------- CONTACT---------------------------------------------------------*/

.contact-title {
  margin-top: 8rem;
  position: relative;
  font-size: 3rem;
  z-index: 1;
  overflow: hidden;
  text-align: center;
  color: #fff;
  font-family: Urbanist, Arial, Helvetica, sans-serif;
  font-size: 3.6rem;
}

.contact-box {
  width: 60%;
  margin: 5rem auto 20rem;
  display: flex;
  background-color: var(--secondary-color);
  font-size: 1.4rem;
  font-family: "poppins", Arial, Helvetica, sans-serif;
}

.box-left {
  flex-basis: 60%;
  padding: 4rem 6rem;
  color: #ffff;
}

.box-right {
  flex-basis: 40%;
  padding: 4rem;
  background-color: var(--pink-color);
  color: #003554;
}

.input-row {
  display: flex;
  justify-content: space-between;
  margin-bottom: 2rem;
}

.input-row .input-group {
  flex-basis: 45%;
}

input {
  width: 100%;
  border: none;
  outline: none;
  border-bottom: #ffff 1px solid;
  background-color: var(--secondary-color);
  color: #fff;
  font-family: "poppins", Arial, Helvetica, sans-serif;
}

input::placeholder {
  color: #fff;
  opacity: 0.5;
  font-family: "poppins", Arial, Helvetica, sans-serif;
}

textarea {
  width: 100%;
  border: 1px solid #ffff;
  outline: none;
  padding: 8px;
  box-sizing: border-box;
}

textarea::placeholder {
  font-family: "poppins", Arial, Helvetica, sans-serif;
  opacity: 0.5;
}

label {
  margin-bottom: 6px;
  display: block;
}

.button-send {
  position: relative;
  overflow: hidden;
  height: 3rem;
  padding: 0 2rem;
  border-radius: 1.5rem;
  background: var(--main-color);
  background-size: 400%;
  color: #fff;
  border: none;
  cursor: pointer;
  font-family: "poppins";
  font-weight: 500;
  margin-top: 1rem;
}

.button-send:hover {
  background-color: var(--pink-color);
  color: var(--secondary-color);
  font-weight: 600;
}

.box-right h3 {
  font-size: 1.8rem;
  margin-bottom: 4rem;
}

.box-left h3 {
  font-size: 1.8rem;
  margin-bottom: 4rem;
}

tr td:first-child {
  padding-right: 2rem;
}

tr td {
  padding-top: 2rem;
  line-height: 1.5;
  font-size: 1.4rem;
}

tr td i {
  font-size: 2rem;
}

/* ----------------------------------------------------------------------------------------*/

/* --------------------------------- MEDIA QUERY -----------------------------------------*/

@media (max-width: 1024px) {
  .header {
    padding: 4.8rem 4rem 0 4rem;
  }

  .hamburger {
    display: flex;
  }

  .main-nav {
    position: fixed;
    top: 0;
    right: -100%;
    width: 300px;
    height: 100vh;
    background-color: var(--secondary-color);
    transition: right 0.3s ease;
    padding-top: 8rem;
    box-shadow: -2px 0 10px rgba(0, 0, 0, 0.1);
  }

  .main-nav.active {
    right: 0;
  }

  .main-nav ul {
    flex-direction: column;
    gap: 0;
    align-items: flex-start;
    padding: 2rem;
  }

  .main-nav ul li {
    width: 100%;
    padding: 1rem 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  }

  .main-nav ul li:last-child {
    border-bottom: none;
  }

  .main-nav ul li a {
    display: block;
    padding: 1rem 0;
    font-size: 2rem;
    width: 100%;
  }

  .main-nav ul li a:hover {
    color: var(--pink-color);
    padding-left: 1rem;
    border-radius: 0;
  }

  div.gallery .item {
    width: calc(46% - 8px);
  }

  .hero-section {
    display: flex;
    flex-direction: column-reverse;
    padding-left: 10rem;
    padding-right: 10rem;
    font-size: 50%;
  }

  .hero-img {
    width: 50rem;
    height: auto;
  }

  .hero-text {
    flex: 1 1 60%;
  }

  .hero-paragraph {
    width: 90%;
    font-size: 1.5rem;
  }

  h1 {
    font-size: 3.6rem;
  }

  .under-title h1 {
    font-size: 2.4rem;
  }

  .project-container img {
    width: 70%;
  }

  .footer-container {
    flex-direction: column;
    height: auto;
    gap: 4rem;
    padding: 4rem 2rem;
    text-align: center;
  }

  .links-footer ul {
    display: flex;
    justify-content: center;
    gap: 3rem;
    flex-wrap: wrap;
  }

  .links-footer ul a {
    font-size: 1.8rem;
  }

  .text-footer p {
    font-size: 1.6rem;
  }

  .logo-footer img {
    height: 5rem;
  }
}

/* Media Query for 600px - MAIN MOBILE FIXES */
@media (max-width: 600px) {
  /* Header fixes */
  .header {
    height: 12rem;
    padding: 3rem 2rem 0 2rem;
    width: 100%;
  }

  .logo {
    height: 6rem;
  }

  .main-nav {
    width: 100%;
    right: -100%;
  }

  .main-nav ul li a {
    font-size: 1.8rem;
  }

  .hamburger span {
    width: 22px;
    height: 2px;
  }

  /* Hero section fixes - CRITICAL */
  .hero-section {
    margin-top: 5rem;
    padding: 0 2rem;
    display: flex;
    flex-direction: column-reverse;
    align-items: center;
    text-align: center;
    width: 100%;
    box-sizing: border-box;
  }

  .hero-text {
    width: 100%;
    max-width: 100%;
  }

  .paragraph-title {
    font-size: 3rem;
    margin-bottom: 1rem;
  }

  .under-title {
    font-size: 1.6rem;
    margin-bottom: 2rem;
  }

  .hero-paragraph {
    width: 100%;
    font-size: 1.4rem;
    line-height: 1.6;
    text-align: left;
  }

  .hero-img {
    display: none;
  }

  /* Projects section header fix */
  header h1 {
    font-size: 3rem;
    margin-top: 8rem;
    padding: 0 2rem;
    text-align: center;
  }

  /* Projects container fixes - CRITICAL */
  .projects-container {
    width: 100%;
    padding: 3rem 2rem;
    box-sizing: border-box;
  }

  /* Button group fixes */
  .button-group {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 1rem;
    margin-bottom: 3rem;
  }

  .button-group .button {
    padding: 0.8rem 1.6rem;
    margin: 0;
    font-size: 1.3rem;
  }

  /* Gallery fixes - CRITICAL */
  div.gallery {
    width: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 2rem;
  }

  div.gallery .item {
    width: 100%;
    max-width: 35rem;
    margin: 0;
  }

  .item img {
    width: 100%;
    height: auto;
    border-radius: 0.8rem;
  }

  /* Project container images */
  .project-container img {
    width: 90%;
    max-width: 40rem;
  }

  /* Footer fixes */
  .footer-container {
    flex-direction: column;
    height: auto;
    gap: 3rem;
    padding: 3rem 1rem;
    text-align: center;
    width: 100%;
  }

  .links-footer ul {
    display: flex;
    justify-content: center;
    gap: 2rem;
    flex-wrap: wrap;
  }

  .links-footer ul a {
    font-size: 1.6rem;
  }

  .text-footer p {
    font-size: 1.4rem;
    line-height: 1.4;
  }

  .logo-footer img {
    height: 4.5rem;
  }

  /* Contact page mobile fixes */
  .contact-box {
    width: 95%;
    margin: 3rem auto 10rem;
    flex-direction: column;
  }

  .box-left,
  .box-right {
    flex-basis: 100%;
    padding: 3rem 2rem;
  }

  .input-row {
    flex-direction: column;
  }

  .input-row .input-group {
    flex-basis: 100%;
    margin-bottom: 2rem;
  }
}

/* Extra small screens */
@media (max-width: 480px) {
  .hero-section {
    padding: 0 1.5rem;
  }

  .paragraph-title {
    font-size: 2.5rem;
  }

  .under-title {
    font-size: 1.4rem;
  }

  .hero-paragraph {
    font-size: 1.3rem;
  }

  header h1 {
    font-size: 2.5rem;
    padding: 0 1.5rem;
  }

  .projects-container {
    padding: 2rem 1.5rem;
  }

  .button-group .button {
    padding: 0.7rem 1.4rem;
    font-size: 1.2rem;
  }
}

/* ---------------------------------------------------------------------------------------*/
