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

/* ===== BASE ===== */
body {
  font-family: 'Poppins', sans-serif;
  color: #eaeaea;
  background-color: #10011c;
  overflow-x: hidden;
}

/* ===== HERO SECTION ===== */
.hero {
  height: 30vh;
  background:
    linear-gradient(rgba(20, 0, 50, 0.35), rgba(10, 0, 30, 0.65)),
    url('/img/nebula.png') center center / cover no-repeat;
  image-rendering: auto;        /* ensures smooth scaling */
  background-attachment: fixed; /* adds subtle parallax depth */
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  position: relative;
  overflow: hidden;
  filter: contrast(110%) brightness(105%) saturate(115%);
}

/* Faint animated star shimmer */
.hero::before {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(white, transparent 70%) 0 0 / 3px 3px,
              radial-gradient(white, transparent 70%) 50px 50px / 3px 3px;
  background-repeat: repeat;
  opacity: 0.15;
  animation: shimmer 60s linear infinite;
  z-index: 0;
}

@keyframes shimmer {
  from { background-position: 0 0, 50px 50px; }
  to { background-position: 500px 1000px, 550px 1050px; }
}

.hero-content {
  position: relative;
  z-index: 2;
  max-width: 700px;
  padding: 2rem;
}

/* ===== HERO TEXT ===== */
.hero-content h1 {
  font-family: 'Montserrat', sans-serif;
  font-weight: 700;
  font-size: 2.6rem;
  color: #fefefe;
  margin-bottom: 1rem;
  letter-spacing: 0.5px;
  text-shadow: 0 0 25px rgba(255, 220, 255, 0.7);
  white-space: nowrap;      /* keep all text on one line */
  overflow: visible;        /* no hiding or cutting */
  text-overflow: clip; 
}

.hero-content p {
  font-family: 'Poppins', sans-serif;
  font-size: 1.1rem;
  color: #e3dcff;
  margin-bottom: 2rem;
  letter-spacing: 0.2px;
  text-shadow: 0 0 10px rgba(200, 160, 255, 0.4);
}

/* ===== HERO BUTTON ===== */
.hero-btn {
  background: linear-gradient(90deg, #8e66ff, #b87aff);
  color: #ffffff;
  font-weight: 800;
  border: none;
  border-radius: 8px;
  padding: 1rem 2rem;
  font-size: 1rem;
  cursor: pointer;
  transition: all 0.3s ease;
  box-shadow: 0 0 20px rgba(180, 130, 255, 0.4);
}

.hero-btn:hover {
  background: linear-gradient(90deg, #b87aff, #e4b4ff);
  transform: scale(1.05);
  box-shadow: 0 0 35px rgba(210, 160, 255, 0.7);
}

/* ===== GUIDES SECTION ===== */
.guides {
  padding: 3rem 3rem 5rem;
  background: radial-gradient(circle at top center, #2b1248 0%, #12021f 80%);
  text-align: center;
}

/* Updated with Montserrat */
.guides h2 {
  font-family: 'Montserrat', sans-serif;
  font-weight: 600;
  font-size: 2rem;
  color: #ffffff;
  margin-bottom: 2rem;
  letter-spacing: 0.5px;
}

/* ===== GRID ===== */
.guide-grid {
  display: flex;
  justify-content: center;
  align-items: stretch;
  gap: 2rem;
  flex-wrap: nowrap;
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
}

/* ===== CARD ===== */
.guide-card {
  background: rgba(35, 17, 53, 0.8);
  border-radius: 18px;
  overflow: hidden;
  width: 23%;
  min-width: 250px;
  cursor: pointer;
  transition: transform 0.3s, box-shadow 0.3s;
  text-align: left;
  box-shadow: 0 0 15px rgba(100, 50, 150, 0.2);
}

.guide-card:hover {
  transform: translateY(-6px);
  box-shadow: 0 0 30px rgba(180, 130, 255, 0.5);
}

/* ===== IMAGE BLEND ===== */
.guide-card img {
  width: 100%;
  height: 320px;
  object-fit: contain;
  border-top-left-radius: 18px;
  border-top-right-radius: 18px;
  background: radial-gradient(circle at center, #1b0c2d 0%, #0b0015 100%);
  padding: 0.5rem;
  mix-blend-mode: lighten;  /* blends portrait shadows softly with section background */
  filter: brightness(1.1) contrast(1.05) saturate(1.1);
  display: block;
}

/* ===== CARD TEXT ===== */
.guide-card h3 {
  font-family: 'Montserrat', sans-serif;
  font-size: 1.1rem;
  color: #fff;
  margin: 0.8rem 1rem 0.4rem;
  font-weight: 600;
}

.guide-card p {
  font-family: 'Poppins', sans-serif;
  font-size: 0.9rem;
  color: #c8b8ff;
  margin: 0 1rem 1.2rem;
  line-height: 1.4;
}

/* ===== REMOVE LEARN MORE ===== */
.learn-more {
  display: none;
}

/* ===== FOOTER ===== */
footer {
  background-color: #12021f;
  color: #999;
  text-align: center;
  padding: 1rem;
  font-size: 0.85rem;
}

/* 🌙 Responsive layout for mobile screens */
@media (max-width: 768px) {
  .guide-grid {
    grid-template-columns: 1fr; /* Stack cards vertically */
    gap: 1.5rem;
    justify-items: center;
  }

  .guide-card {
    width: 85%;
    max-width: 340px;
    text-align: center;
  }

  .guide-card img {
    width: 100%;
    height: auto;
    object-fit: cover;
    border-radius: 12px;
  }

  .hero-content h1 {
    font-size: 1.6rem;
    line-height: 1.3;
  }

  .hero-content p {
    font-size: 0.9rem;
  }

  .hero-btn {
    font-size: 0.9rem;
    padding: 10px 16px;
  }
}

/* ====================================================== */
/* MOBILE FIXES FOR HERO + GUIDE GRID LAYOUT (MANDATORY)  */
/* ====================================================== */

@media (max-width: 768px) {

  /* Fix the hero header spacing */
  .hero {
    height: auto;               /* remove fixed height */
    padding: 3rem 1rem;         /* add space */
    background-attachment: scroll; /* mobile-safe */
  }

  .hero-content h1 {
    white-space: normal !important; /* allow wrapping */
    font-size: 1.8rem;
    line-height: 1.2;
  }

  /* Make the guide grid vertical */
  .guide-grid {
    display: flex !important;
    flex-direction: column !important;
    align-items: center !important;
    flex-wrap: nowrap !important;
    gap: 1.5rem !important;
  }

  /* Cards must resize properly */
  .guide-card {
    width: 90% !important;
    max-width: 360px !important;
    min-width: unset !important;
  }

  .guide-card img {
    height: auto !important;
    object-fit: cover !important;
  }
}

/* 📱 Fix for mobile devices in landscape orientation */
@media only screen and (max-height: 500px) and (orientation: landscape) {
  
  .hero {
    height: 40vh;  /* give more room */
    background-attachment: scroll;
  }

  .hero-content h1 {
    font-size: 1.4rem;
    white-space: normal;   /* ALLOW wrapping so text doesn’t disappear */
  }

  .hero-content p {
    font-size: 0.85rem;
  }

  /* Force the guides to stack vertically even in landscape */
  .guide-grid {
    flex-direction: column !important;
    flex-wrap: nowrap !important;
    align-items: center !important;
    gap: 1.5rem !important;
  }

  .guide-card {
    width: 90% !important;
    max-width: 350px !important;
  }

  .guide-card img {
    height: auto !important;
    object-fit: cover !important;
  }
}
