/* ==========================================================================
   1. GLOBAL STYLES & RESET
   ========================================================================== */
body {
  font-family: "Helvetica Neue", Helvetica, Arial, sans-serif;
  margin: 0;
  color: #333;
  background-color: #fff;
  line-height: 1.6;
  scroll-behavior: smooth;
}

* {
  box-sizing: border-box;
}

/* ==========================================================================
   2. FIXED HEADER (TOPBAR)
   ========================================================================== */
.topbar {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  background-color: #040053;
  color: white;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.2rem 1rem;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.25);
  z-index: 1000;
}

.logo img {
  height: 80px;
  width: auto;
}

.nav-links {
  display: flex;
  gap: 1rem;
  margin-right: 1.5rem;
}

.nav-links a {
  color: white;
  text-decoration: none;
  font-weight: 600;
  transition: opacity 0.3s ease;
}

.nav-links a:hover {
  opacity: 0.75;
}

.menu-toggle {
  display: none;
  cursor: pointer;
  flex-direction: column;
  justify-content: space-around;
  width: 30px;
  height: 25px;
  background: transparent;
  border: none;
  padding: 0;
}

.menu-toggle .bar {
  width: 100%;
  height: 3px;
  background-color: white;
  border-radius: 5px;
  transition: all 0.3s linear;
}

/* ==========================================================================
   3. HERO SECTION & LISTEN BUTTON (FIXED)
   ========================================================================== */
header {
  background: #040053; 
  color: white;
  text-align: center;
  padding: 8rem 1rem 5rem;
  margin-top: 0;
}

header h1 {
  font-size: 2.75rem;
  margin-bottom: 0.75rem;
}

header p {
  font-size: 1.25rem;
  margin-bottom: 2rem;
}

/* Restored the white button styling for the Hero Section */
.cta-buttons a {
  background-color: white;
  color: #040053;
  padding: 0.75rem 2rem;
  border-radius: 30px;
  text-decoration: none;
  font-weight: 600;
  transition: 0.3s ease;
  display: inline-block;
}

.cta-buttons a:hover {
  background-color: #eee;
  transform: translateY(-2px);
}

/* ==========================================================================
   4. CONTENT CONTAINERS & LOCALIZATION BUTTON
   ========================================================================== */
section {
  padding: 5rem 1rem;
  max-width: 1100px; /* Slightly wider to help features fit in one row */
  margin: auto;
  scroll-margin-top: 70px;
}

section h2 {
  text-align: center;
  color: #040053;
  margin-bottom: 2rem;
  font-size: 2rem;
}

.content-container {
  display: flex;
  flex-direction: column;
  align-items: center;
  max-width: 800px;
  margin: 0 auto;
  padding: 20px;
  text-align: center;
}

.content-container h2 {
  word-wrap: break-word;
  overflow-wrap: break-word;
  word-break: break-all;
  font-size: clamp(1.2rem, 5vw, 2rem); 
  line-height: 1.2;
}

.content-container p {
  font-size: clamp(1rem, 4vw, 1.25rem);
}

.centered-logo {
  width: 50%;
  display: block;
  margin: 20px auto;
  max-width: 100%;
  height: auto;
}

.localization-link {
  display: inline-block;
  color: #040053;
  text-decoration: none;
  font-weight: 700;
  font-size: 1.4rem;
  border: 3px solid #040053;
  padding: 1.2rem 3.5rem;
  border-radius: 50px;
  margin-top: 2rem;
  transition: all 0.3s ease;
}

.localization-link:hover {
  background-color: #040053;
  color: white;
  transform: translateY(-3px);
  box-shadow: 0 4px 12px rgba(4, 0, 83, 0.2);
}

/* ==========================================================================
   5. FEATURES GRID (FIXED FOR DESKTOP ROW)
   ========================================================================== */
.features {
  display: grid;
  /* Lowered min-width to 200px to ensure 4 fit on a standard PC screen */
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 1.5rem;
  text-align: center;
}

.feature {
  background-color: #f8f8ff;
  border-radius: 12px;
  padding: 1.5rem;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.05);
  position: relative;
  transition: all 0.3s ease;
}

.feature:hover {
  transform: translateY(-5px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
  background-color: #f0f0ff;
  cursor: pointer;
}

.feature span {
  font-size: 2rem;
  display: block;
  margin-bottom: 0.5rem;
  color: #040053;
}

.stretched-link {
  color: inherit;
  text-decoration: none;
}
.stretched-link::after {
  content: "";
  position: absolute;
  top: 0; right: 0; bottom: 0; left: 0;
  z-index: 1;
}

/* ==========================================================================
   6. VIDEO & AUDIO PLAYERS
   ========================================================================== */
.video-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 2rem;
  justify-content: center;
  margin-top: 2rem;
}

.video-item {
  flex: 1;
  min-width: 300px;
  max-width: 320px;
  text-align: center;
  transition: transform 0.3s ease;
}

.video-item:hover {
  transform: translateY(-8px);
}

video {
  width: 100%;
  border-radius: 8px;
  box-shadow: 0 4px 10px rgba(0,0,0,0.1);
  background-color: #000;
  transition: all 0.3s ease;
}

video:hover {
  box-shadow: 0 8px 20px rgba(138, 127, 229, 0.6);
}

.video-item audio {
  width: 100%;
  border-radius: 30px;
  border: none;
  outline: none;
  background-color: transparent;
  box-shadow: 0 4px 10px rgba(0,0,0,0.1);
  transition: all 0.3s ease;
}

.video-item audio:hover {
  box-shadow: 0 8px 20px rgba(138, 127, 229, 0.6);
  border-radius: 30px;
  border: none !important;
  outline: none !important;
}

/* ==========================================================================
   7. CLIENT LOGO ANIMATION
   ========================================================================== */
.logo-section {
  padding: 3rem 0;
  max-width: none;
  overflow: hidden;
  background-color: #fcfcfc;
  border-top: 1px solid #eee;
  border-bottom: 1px solid #eee;
}

.logo-track {
  display: flex;
  width: max-content;
  animation: scroll-left-to-right 85s linear infinite;
}

.logo-item {
  padding: 0 2rem;
}

.logo-item img {
  height: 60px;
  max-width: 150px;
  object-fit: contain;
}

@keyframes scroll-left-to-right {
  0% { transform: translateX(0%); }
  100% { transform: translateX(-50%); }
}

/* ==========================================================================
   8. FOOTER
   ========================================================================== */
footer {
  text-align: center;
  background-color: #040053;
  color: white;
  padding: 4rem 1rem;
}

footer a {
  color: white;
  background: rgba(255, 255, 255, 0.15);
  padding: 0.75rem 1.5rem;
  border-radius: 25px;
  text-decoration: none;
  font-weight: 600;
  transition: 0.3s;
}

/* ==========================================================================
   9. MOBILE STYLES (KEEP AT THE BOTTOM)
   ========================================================================== */
@media (max-width: 768px) {
  .topbar {
    justify-content: space-between;
    padding: 0.2rem 1.5rem 0.2rem 1rem;
  }

  .logo img {
    height: 35px;
  }

  .menu-toggle {
    display: flex;
    margin-right: 20px;
  }

  .nav-links {
    display: none;
    flex-direction: column;
    position: absolute;
    top: 100%;
    left: 0;
    width: 100%;
    background-color: #040053;
    padding: 1rem 0;
  }

  .nav-links.active {
    display: flex;
  }

  .nav-links a {
    text-align: right;
    padding: 0.75rem 2.5rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  }

  header h1 {
    font-size: 1.8rem;
  }

  .content-container {
    width: 95%;
    padding: 10px;
  }

  .centered-logo {
    width: 80%;
  }

  #why {
    padding-top: 120px;
  }

  /* Stack features vertically on mobile */
  .features {
    grid-template-columns: 1fr;
  }
}

/* ==========================================================================
   10. ANIMATIONS
   ========================================================================== */
.fade-in {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.8s ease, transform 0.8s ease;
}

.fade-in.visible {
  opacity: 1;
  transform: translateY(0);
}