/* General styles */
html {
  scroll-behavior: smooth;
}

body {
  font-family: 'Poppins', sans-serif;
  margin: 0;
  padding: 0;
  background-color: black;
}

/* Navbar styles */
.navbar {
  position: fixed;
  top: 0;
  width: 100%;
  background-color: rgba(0, 0, 0, 0.4); /* Black with transparency */
  color: white;
  display: flex;
  justify-content: center;
  align-items: center;
  backdrop-filter: blur(10px); /* Blur effect */
  z-index: 1000; /* Ensure it's above other content */
  transition: background-color 0.3s, backdrop-filter 0.3s; /* Smooth transition for scrolling effect */
}

.navbar.scrolled {
  background-color: rgba(0, 0, 0, 0.9); /* Darker background when scrolled */
  backdrop-filter: blur(15px); /* Stronger blur when scrolled */
}

.navbar-content {
  width: 100%;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1rem 8rem;
}

.navbar-left {
  display: flex;
  align-items: center;
}

#navbar-logo {
  cursor: pointer;
  transition: .35s all ease-in-out;
}

#navbar-logo:hover {
  opacity: .35;
  transition: .35s all ease-in-out;
}

.logo {
  width: 50px;
  margin-right: 10px;
}

.navbar-title {
  font-size: 1.5rem;
  font-weight: bold;
}

.navbar-right {
  display: flex;
  align-items: center;
  margin-left: auto;
}

.navbar-menu {
  list-style: none;
  display: flex;
  margin: 0;
  padding: 0;
}

.navbar-menu li {
  margin-right: 20px;
}

.navbar-menu li a {
  color: white;
  transition: .35s all ease-in-out;
  text-decoration: none;
}

.navbar-menu li a:hover {
  opacity: .35;
  transition: .35s all ease-in-out;
}

.navbar-toggle {
  display: none;
  cursor: pointer;
}

.navbar-toggle img{
  width: 30px;
}

/* Responsive navbar */
@media (max-width: 768px) {
  .navbar-menu {
    display: none;
    flex-direction: column;
    width: 100%;
    position: fixed;
    top: 90px;
    left: 0;
    background-color: rgba(0, 0, 0, 0.9);
    padding: 10px 0;
    align-items: center;
    justify-content: center;
  }

  .navbar-menu :hover {
    color: #d8ff00;
  }

  .navbar-menu li {
    margin: 20px 0;
  }


  .navbar-toggle {
    display: flex;
    margin-right: 10px;
  }

  .navbar-right.active .navbar-menu {
    display: flex;
  }
}

/* Hero section styles */
.hero {
  position: relative;
  display: flex;
  justify-content: center;
  align-items: center;
  width: 100%;
  height: 100vh;
  overflow: hidden;
  background-color: black;
  padding-top: 5.5rem;
}

.hero img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.small-image {
  display: none;
}

.portada-portafolio {
  position: relative;
  width: 100%;
  height: 100%;
  margin-top: 2rem;
}

.portada-portafolio img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.img-person-astronaut {
  filter: drop-shadow(0 0 50px);
  position: absolute;
}

.text-overlay {
  top: 1rem;
  left: 8.5rem;
  color: white;
  z-index: 10;
  position: absolute;
}

.text-overlay h1 {
  margin: 0;
  font-size: 5.5rem;
  text-align: left;
}

.text-overlay p {
  margin: 0;
  font-size: 1.35rem;
  margin-top: .35rem;
  text-align: left;
  margin-left: .25rem;
}

.text-overlay span {
  color: #d8ff00;
}

/* Page section styles */
#aboutus {
  background-color: white;
}

.page {
  padding: 3rem 8rem;
}

.herotitle {
  font-size: 2.5rem;
  line-height: 1.35;
  margin-bottom: 20px;
}

.hero__content {
  font-size: 1.2rem;
  margin-bottom: 30px;
}

.behance-grid {
  gap: 2rem 1rem;
  display: grid;
  margin-top: 2rem;
  grid-template-columns: repeat(3,1fr);
}

.behance-grid iframe {
  border: none;
}

/* Cards section styles */
.cards {
  gap: 2rem;
  display: grid;
  margin-top: 2rem;
  grid-template-columns: repeat(4,1fr);
}

.card {
  background-color: #1e1e1e;
  border-radius: 10px;
  width: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  transition: transform 0.2s;
}

.card:hover {
  transform: scale(1.05);
}

.card img {
  width: 100%;
  border-radius: 10px 10px 0 0;
}

.text-card {
  width: 80%;
  color: white;
  height: 100%;
  text-align: left;
  padding-bottom: 1rem;
}

.text-card h2 {
  margin-bottom: 10px;
}

/* Footer styles */
footer {
  color: white;
  margin: 0 8rem;
  padding: 20px 0;
  text-align: center;
  border-top: 1px solid #d8ff00;
  padding-top: .5rem;
  background-color: black;
}

/* Media queries for responsive design */
@media (max-width: 768px) {

  .navbar-content {
    height: 3.65rem;
    padding: 1rem 2rem;
  }

  .page {
    padding: 1rem 2rem;
  }

  .text-overlay {
    top: 35%;
    left: 50%;
    transform: translate(-50%, -40%);
    text-align: center;
    padding: 10px;
    box-sizing: border-box;
  }

  .hero h1 {
    margin: 0;
    font-size: 4rem;
    text-align: left;
    line-height: 1.1em;
    word-spacing: normal;
  }

  .hero h1 span {
    display: inline-block;
    margin-left: 0.2rem;
  }

  .hero p {
    margin: 10px 0 0 0;
    font-size: 1.5rem;
    word-wrap: break-word;
    text-align: left;
  }

  .img-person-astronaut {
    display: none;
  }

  .main-image {
    display: none;
  }

  .small-image {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
  }

  .behance-grid {
    display: flex;
    flex-wrap: wrap;
  }
  
  .cards {
    display: flex;
    flex-wrap: wrap;
  }

  footer {
    margin: 0 2rem;
    margin-top: 2rem;
  }
}