/*
 * Global styles and responsive layout for the Amigurumis landing page.
 * The design is inspired by the provided PDF with vibrant colours,
 * playful typography and organic shapes. CSS variables make it easy
 * to tweak the palette or spacing in one place.
 */

:root {
  /* Brand colours extracted from the original design */
  --primary-orange: #F8A235;
  --primary-green: #8ED95A;
  --primary-blue: #5AB2E8;
  --primary-red: #E4403A;
  --bg-light: #F9FBFC;
  --text-dark: #343434;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: 'Poppins', sans-serif;
  color: var(--text-dark);
  background-color: var(--bg-light);
  line-height: 1.6;
}

/* Language toggles
 * Hide English text when page language is Spanish and vice versa.
 * We rely on the lang attribute on the html element to control visibility. */
[lang="es"] .lang-en {
  display: none;
}
[lang="en"] .lang-es {
  display: none;
}

/* Highlight the currently active language button */
.lang-btn.active {
  text-decoration: underline;
}

h1, h2, h3 {
  font-family: 'Fredoka', sans-serif;
  margin: 0;
  line-height: 1.2;
}

a {
  text-decoration: none;
  color: inherit;
}

/* Navigation bar */
.navbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1rem 2rem;
  background-color: var(--primary-orange);
  position: sticky;
  top: 0;
  z-index: 100;
}

.logo-link img {
  height: 60px;
  width: auto;
}

.nav-menu {
  list-style: none;
  display: flex;
  align-items: center;
  gap: 1.5rem;
}

.nav-menu li a {
  font-weight: 600;
  color: #fff;
  transition: opacity 0.2s ease-in-out;
}

.nav-menu li a:hover {
  opacity: 0.8;
}

.nav-menu .lang {
  color: #fff;
}

.nav-toggle {
  display: none;
  flex-direction: column;
  gap: 4px;
  padding: 0;
  background: none;
  border: none;
  cursor: pointer;
}

.nav-toggle span {
  display: block;
  width: 26px;
  height: 3px;
  background-color: #fff;
  border-radius: 2px;
}

/* Hero banner */
.hero {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 4rem 2rem 6rem;
  position: relative;
  overflow: hidden;
}

.hero-text {
  flex: 1;
  z-index: 1;
}

.hero h1 {
  font-size: 4rem;
  color: var(--primary-green);
  text-transform: uppercase;
}

.hero h2 {
  font-size: 2rem;
  color: var(--primary-orange);
  margin-top: 0.5rem;
}

.hero p {
  max-width: 480px;
  margin-top: 1rem;
}

.hero-img {
  flex: 1;
  display: flex;
  justify-content: center;
}

.hero-img img {
  max-width: 100%;
  height: auto;
}

/* Decorative shapes used in hero */
.shape {
  position: absolute;
  z-index: 0;
}

.shape-peach {
  top: -10%;
  left: -15%;
  width: 60%;
  opacity: 0.4;
}

.shape-green {
  bottom: -20%;
  right: -20%;
  width: 50%;
  opacity: 0.4;
}

/* About section */
.about {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 4rem 2rem;
  position: relative;
}

.about-img {
  flex: 1;
  display: flex;
  justify-content: center;
}

.about-img img {
  max-width: 100%;
  height: auto;
}

.about-text {
  flex: 1;
  padding-left: 2rem;
}

.decor-grid {
  position: absolute;
  top: 10%;
  left: -5%;
  width: 50%;
  opacity: 0.15;
  pointer-events: none;
}

/* Media sections (Canciones, Cuentos, Quiz) */
.media-section {
  padding: 4rem 2rem;
  position: relative;
}

.section-header {
  text-align: center;
  margin-bottom: 2rem;
}

.title-wrapper {
  display: inline-block;
  position: relative;
  padding: 0.5rem 1rem;
}

.title-wrapper .highlight {
  position: absolute;
  left: 0;
  top: 50%;
  width: 100%;
  transform: translateY(-50%);
  z-index: -1;
}

.title-wrapper h3 {
  margin: 0;
  font-size: 2.1rem;
  color: #ffffff;
}

/* Generic media frame wrapper */
.media-frame {
  position: relative;
  margin: 0 auto;
  max-width: 900px;
  width: 100%;
  display: flex;
  justify-content: center;
  align-items: center;
}

.media-frame img.media-image {
  width: 100%;
  display: block;
  border-radius: 12px;
  box-shadow: 0 8px 16px rgba(0, 0, 0, 0.05);
}

.media-frame img.frame {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: auto;
  pointer-events: none;
}

/* Play button styling */
.play-btn {
  position: absolute;
  bottom: 12px;
  left: 50%;
  transform: translateX(-50%);
  background: none;
  border: none;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 0;
}

.play-btn img {
  width: 80px;
  height: auto;
}

.play-btn img.pointer {
  width: 20px;
  height: auto;
  margin-top: -8px;
}

/* Overlay for animated content; hidden until triggered */
.media-overlay {
  display: none;
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(255, 255, 255, 0.95);
  border-radius: 12px;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

.media-overlay img {
  max-width: 90%;
  max-height: 90%;
}

/* Variation for sections without decorative frame */
.no-frame .media-image {
  border: 6px solid var(--primary-green);
  border-radius: 12px;
}

/* Quiz specific styles */
.quiz-wrapper {
  max-width: 900px;
  margin: 0 auto;
  position: relative;
}

.video-container {
  position: relative;
}

.video-frame {
  width: 100%;
  display: block;
  border-radius: 16px;
  box-shadow: 0 8px 16px rgba(0, 0, 0, 0.08);
}

.quiz-logo {
  position: absolute;
  top: 15%;
  left: 50%;
  transform: translateX(-50%);
  width: 60%;
}

.quiz-logo img {
  width: 100%;
  height: auto;
}

.subscribe-btn {
  position: absolute;
  top: 12%;
  right: 5%;
  width: 100px;
  height: auto;
}

.quiz .play-btn {
  bottom: -28px;
}

/* Social section */
.social {
  padding: 4rem 2rem;
  text-align: center;
}

.social-header {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 1rem;
  margin-bottom: 1rem;
  position: relative;
}

.social-header .notification {
  width: 60px;
  height: auto;
}

.social-characters {
  max-width: 600px;
  width: 100%;
  margin: 0 auto;
}

.social-links {
  margin-top: 1.5rem;
  display: flex;
  justify-content: center;
  gap: 1.5rem;
}

.social-links img {
  width: 56px;
  height: auto;
  transition: transform 0.2s ease;
}

.social-links img:hover {
  transform: scale(1.1);
}

/* Footer */
.site-footer {
  padding: 2rem;
  text-align: center;
  background-color: #FFE4B0;
  color: var(--text-dark);
  font-size: 0.875rem;
}

/* Responsive adjustments */
@media (max-width: 900px) {
  .hero {
    flex-direction: column;
    text-align: center;
    padding-bottom: 4rem;
  }
  .hero-img {
    margin-top: 2rem;
  }
  .about {
    flex-direction: column;
  }
  .about-text {
    padding-left: 0;
    margin-top: 2rem;
  }
}

@media (max-width: 768px) {
  .nav-menu {
    position: absolute;
    top: 100%;
    right: 0;
    background-color: var(--primary-orange);
    flex-direction: column;
    align-items: flex-start;
    gap: 1rem;
    padding: 1rem 2rem;
    display: none;
  }
  .nav-menu.show {
    display: flex;
  }
  .nav-toggle {
    display: flex;
  }
}