/* 
=================================================================
HUGOCIB - HERO SECTION COMPONENT
=================================================================
Two-column hero layout with title, steps, navigation and map overlay
*/

/* =================================================================
   HERO CONTAINER & LAYOUT
   ================================================================= */

.hero {
  height: 100vh;
  min-height: 600px;
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  position: relative;
  display: grid;
  grid-template-columns: 1fr 1fr;
  width: 100%;
}

/* Remove main-content padding when hero is present */
.hero ~ .main-content,
.main-content:has(.hero) {
  padding-top: 0;
}

/* =================================================================
   LEFT CONTENT AREA
   ================================================================= */

.hero-content-left {
  grid-column: 1;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  align-items: flex-start;
  padding: 3rem;
  padding-top: 10rem;
  z-index: 3;
}

/* Hero country subtitle */
.hero-country-subtitle {
  color: white;
  font-size: 1.5rem;
  font-family: var(--font-headings);
  text-transform: uppercase;
  margin-bottom: 0.5rem;
  font-weight: bold;
  margin: 0;
  padding-left: 3px;
  text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.8);
  line-height: 1.1;
  display: block;
}

/* Hero title styling */
.hero-title {
  color: white;
  font-size: 5.5rem;
  font-family: var(--font-headings);
  font-weight: bold;
  margin: 0;
  line-height: 1.1;
  text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.8);
  display: inline-block; /* shrink to text width so pseudo-element percentages match text length */
  position: relative;    /* establish containing block for ::after */
  overflow-wrap: break-word; /* Break long words if needed */
}

/* Decorative line: implemented as a pseudo-element so its width is relative to the title's text width */
.hero-title::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: -0.8rem; /* place under the title (tweak as needed) */
  height: 4px;
  width: 110%;               /* proportion of the title's width */
  max-width: 110%;          /* cap if you'd like the line to exceed slightly */
  background: white;
  border-radius: 0;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
  transform-origin: left center;
}

/* Hide the existing standalone element if present so there is no visual duplication */
.hero-title-line {
  display: none;
}

/* Hero when subtitle */
.hero-when-subtitle {
  color: white;
  font-size: 2rem;
  font-family: var(--font-headings);
  margin-bottom: 0.5rem;
  font-weight: bold;
  padding-left: 3px;
  padding-top: 1rem;
  line-height: 1.1;
  text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.8);
}

/* =================================================================
   HERO NAVIGATION LINKS
   ================================================================= */

.hero-nav-links {
  margin-top: auto;
  margin-bottom: 0;
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
}

.hero-nav-link {
  color: white;
  text-decoration: none;
  font-size: 1rem;
  font-weight: 500;
  padding: 0.8rem 1.5rem;
  background: rgba(255, 255, 255, 0.2);
  border-radius: 25px;
  backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 255, 255, 0.3);
  transition: all 0.3s ease;
}

.hero-nav-link:hover {
  background: rgba(255, 255, 255, 0.3);
  border-color: rgba(255, 255, 255, 0.5);
  transform: translateY(-2px);
}

/* =================================================================
   RESPONSIVE HERO LAYOUT
   ================================================================= */

/* Mobile only (under 768px) */
@media (max-width: 767px) {
  .hero {
    height: calc(100vh - 60px);
    min-height: 500px;
    grid-template-columns: 1fr;
    grid-template-rows: 1fr;
  }
  
  .hero-content-left {
    grid-column: 1;
    grid-row: 1;
    padding: 2rem;
    padding-top: 5rem;
    justify-content: space-between;
  }
  
  .hero-country-subtitle {
    font-size: 1.3rem;
    margin: 0;
    margin-bottom: 0.4rem;
    text-transform: uppercase;
  }
  
  .hero-title {
     /* Use fluid typography: clamp(MIN, PREFERRED, MAX) where preferred scales with viewport width */
    font-size: clamp(2.5rem, 8vw, 3.5rem);
    margin-bottom: 0;
  }

  /* Mobile: make the decorative bar proportionally wider relative to smaller titles */
  .hero-title::after {
    height: 3px;
    bottom: -0.6rem;
    width: 80%;
  }

  .hero-when-subtitle {
    font-size: 1.2rem;
    margin-bottom: 0.4rem;
    padding-top: 1rem;
  }

  .hero-nav-links {
    margin-top: auto;
    margin-bottom: 0;
    gap: 0.8rem;
    flex-direction: column;
    align-items: flex-start;
  }
  
  .hero-nav-link {
    font-size: 0.9rem;
    padding: 0.8rem 1.5rem;
    width: auto;
    min-width: 140px;
    text-align: center;
  }
  
  /* Hide map completely on mobile */
  .hero-map-overlay {
    display: none;
  }
}