/* === Base Reset === */
* {
  margin: 0;
  box-sizing: border-box;
}

html {
  background-color: #0d1b2a;
  scroll-behavior: smooth;
}

body {
  width: 100%;
  font-family: 'Open Sans', sans-serif;
  color: #c0e0f7;
}

h1, h2, h3 {
  font-family: 'Orbitron', sans-serif;
}

h2, h3 {
  margin-bottom: 8px;
}

h3{
  margin-top: 8px;
}

/* === Navigation === */
nav {
  height: 70px;
  width: 100%;
  background-color: darkslategray;
  border-radius: 2px;
  border: double blue;
  display: flex;
  justify-content: space-between;
  align-items: center;
  position: fixed;
  z-index: 100;
  padding: 0 20px;
}

nav div {
  margin-left: 20px;
  margin-right: 20px;
}

.nav-search {
  display: flex;
  align-items: center;
  gap: 10px;
}

.nav-search input {
  border-radius: 6px;
  padding: 6px 10px;
  background-color: #1e2e3e;
  color: white;
  border: 1px solid #406080;
}

.nav-search p,
a {
  color: aliceblue;
}

a {
  color: #ffcc00;
}

p {
  line-height: 1.6;
  margin-bottom: 16px;
}

section {
  padding: 40px 24px;
}

.hero p, .hero-2 p {
  font-size: 1.2rem;
  line-height: 1.6;
}

/* === Hero Sections === */
.hero, .hero-2 {
  width: 100%;
  height: 300px;
  background-image: url('./img/hero.png');
  background-repeat: no-repeat;
  background-size: cover;
  display: flex;
  flex-direction: column;
  justify-content: end;
  padding: 0 20px 20px 20px;
}

.hero{
  background-image: url('./img/saturn-hero-1.jpg');
  height: 720px;
}
.hero-2{
  background-image: url('./img/saturn-hero-2.png');
  height: 512px;
}

.hero p, .hero-2 p {
  color: aliceblue;
  width: 50%;

  padding-left: 40px;
  max-width: 600px;
}

.hero-2 {
  align-items: end;
}

/* === Section === */
main {
  width: 100%;
  background-color: #0d1b2a;
}

section {
  width: 100%;
  min-height: 300px;
  padding: 20px;
  scroll-margin-top: 70px;

  background-color: #102a43;
  border-radius: 12px;
  margin: 16px auto;
  max-width: 1200px;
}

section a {
  color: darkslategray;
}

.back-image {
  background-image: url('./img/hero.png');
  background-repeat: no-repeat;
  background-size: cover;
  background-color: aqua;
  padding: 20px;
}

.planet a {
  display: inline-block;
  margin-top: 12px;
  padding: 6px 12px;
  background-color: #ffcc00;
  color: #000;
  text-decoration: none;
  border-radius: 6px;
  font-weight: bold;
  transition: background 0.3s ease;
}
.planet a:hover {
  background-color: #ffaa00;
  box-shadow: 0 0 8px rgba(255, 255, 255, 0.15);
}

/* === Layout Flex === */
.flex-row {
  display: flex;
  flex-direction: row;
  justify-content: space-evenly;
  flex-wrap: wrap;
  gap: 20px;
}

.flex-column {
  display: flex;
  flex-direction: column;
  justify-content: space-evenly;
  flex-wrap: wrap;
  gap: 20px;
}

/* === Planet Card === */
.planet {
  flex-basis: 22%;
  flex-shrink: 0;
  min-width: 200px;
  margin-top: 10px;
  padding: 10px;
  background-color: #183d5d;
  color: #e0f4ff;
  border-radius: 8px;
  box-shadow: 0 2px 6px rgba(0,0,0,0.1);
  transition: transform 0.3s ease;
}

.planet:hover {
  transform: scale(1.02);
}

.flex-column .planet {
  display: flex;
}

.flex-column .planet .div-img {
  max-width: 300px;
  max-height: 300px;
  margin-right: 20px;
  border-radius: 50%;
  flex-shrink: 0;
}

.div-img {
  width: 100%;
  aspect-ratio: 1 / 1;
  overflow: hidden;
  border-radius: 8px;
}

.div-img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
}

.img-v {
  aspect-ratio: 1 / 2;
}

.img-v img {
  object-position: 50% 0%;
}

#a5 .flex-row .planet:first-of-type {
  flex-basis: 100%;
}

#a5 .flex-row .planet:first-of-type .div-img {
  width: 100%;
  aspect-ratio: 6 / 1;
  overflow: hidden;
}

#a5 .flex-row .planet:first-of-type .div-img img {
  object-position: 50% 65%;
}

/* === Footer === */
footer {
  height: 70px;
  width: 100%;
  background-color: darkslategray;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0 20px;
  color: white;
}

footer div {
  margin-left: 20px;
  margin-right: 20px;
}

footer p{
  margin-bottom: auto;

  padding-top: 16px;
  padding-bottom: 16px;
}

/* === Responsive === */
@media (max-width: 916px) {
    .planet {
        flex-basis: 40%;
    }

    footer{
      height: fit-content;
    }
}

@media (max-width: 800px) {
  nav {
    flex-direction: column;
    justify-content: space-evenly;

    height: 90px;
  }

  section{
    scroll-margin-top: 90px;
  }

  #a4 .flex-column .planet{
    flex-direction: column;
    justify-content: center;
    align-items: center;
  }

  .hero p, .hero-2 p{
    width: 75%;
  }
}

@media (max-width: 500px) {
  .flex-column .planet {
    flex-direction: column;
    justify-content: center;
    align-items: center;
  }

  #a5 .flex-row .planet:first-of-type .div-img {
    aspect-ratio: 3 / 1;
  }

  nav{
    height: 140px;
  }

  section{
    scroll-margin-top: 140px;
  }
}
