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

body {
  font-family: 'Poppins', sans-serif;
  background-color: #fefefe;
  color: #333;
  line-height: 1.6;
  overflow-x: hidden;
}

h1, h2, h3, h4, h5 {
  color: #2b4b9b;
}

.container {
  width: 90%;
  max-width: 1200px;
  margin: auto;
}
.hamburger {
  display: none;
  flex-direction: column;
  cursor: pointer;
  gap: 4px;
}

* Navbar fijo */
.navbar {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  background: linear-gradient(90deg, #7e57c2, #42a5f5);
  color: #fff;
  z-index: 1000;
  transition: 0.3s ease;
}

.navbar.scrolled {
  background: #4a148c;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
}

.navbar .container {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 15px 10%;
}

.logo {
  font-weight: 700;
  font-size: 1.5rem;
}

.nav-links {
  list-style: none;
  display: flex;
  gap: 20px;
  position: relative;
}

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

.nav-links a:hover {
  color: #ffe082;
}

/* Estilos del menú hamburguesa */
.hamburger {
  display: none;
  flex-direction: column;
  cursor: pointer;
  gap: 4px;
}

.bar {
  width: 25px;
  height: 3px;
  background-color: white;
  transition: 0.3s;
}

/* Animación del menú hamburguesa */
.hamburger.active .bar:nth-child(1) {
  transform: rotate(-45deg) translate(-5px, 6px);
}

.hamburger.active .bar:nth-child(2) {
  opacity: 0;
}

.hamburger.active .bar:nth-child(3) {
  transform: rotate(45deg) translate(-5px, -6px);
}

/* === HERO === */
.hero {
  height: 90vh;
  background: linear-gradient(135deg, #ffecd2 0%, #fcb69f 100%);
  display: flex;
  justify-content: center;
  align-items: center;
  text-align: center;
  padding: 2rem;
}

.hero-content {
  max-width: 700px;
}

.hero h2 {
  font-size: 2.3rem;
  font-weight: 700;
  color: #2b4b9b;
}

.hero h2 span {
  color: #ff7eb6;
}

.hero p {
  margin: 1rem 0 2rem;
  color: #444;
  font-size: 1.1rem;
}

.btn {
  display: inline-block;
  background: #2b4b9b;
  color: white;
  padding: 0.8rem 1.5rem;
  border-radius: 25px;
  text-decoration: none;
  transition: background 0.3s ease;
}

.btn:hover {
  background: #ff7eb6;
}

/* === SECCIONES GENERALES === */
section {
  padding: 4rem 0;
}

section h1, section h2 {
  text-align: center;
  margin-bottom: 1rem;
}

section p {
  text-align: center;
  margin-bottom: 2rem;
  color: #555;
}

/* === QUIZ === */
.u-section-2 {
  background: #f8f9ff;
}

.u-section-2 h1 {
  color: #2b4b9b;
}

.u-section-2 a {
  background: #ff7eb6;
  padding: 0.7rem 1.3rem;
  border-radius: 30px;
  color: #fff;
  text-decoration: none;
  font-weight: 600;
  transition: background 0.3s;
}

.u-section-2 a:hover {
  background: #2b4b9b;
}

/* === JUEGOS === */
.u-section-games {
  background: #fffdf3;
}

.games-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 2rem;
  margin-top: 2rem;
}

.game-card {
  background: white;
  border-radius: 16px;
  box-shadow: 0 4px 12px rgba(0,0,0,0.1);
  text-align: center;
  padding: 1.5rem;
  transition: transform 0.3s;
}

.game-card:hover {
  transform: translateY(-5px);
}

.game-icon {
  font-size: 4rem;
  margin-bottom: 20px;
  display: block;
  text-align: center;
}

.game-img {
  width: 100%;
  border-radius: 12px;
  margin-bottom: 1rem;
}

.game-card h3 {
  color: #2b4b9b;
}

.u-btn {
  display: inline-block;
  background: #2b4b9b;
  color: white;
  padding: 0.5rem 1rem;
  border-radius: 20px;
  text-decoration: none;
  margin-top: 0.5rem;
  transition: background 0.3s;
}

.u-btn:hover {
  background: #ff7eb6;
}

/* === RETO DEL MES === */
#block-1 {
  background: linear-gradient(135deg, #c3f0ca 0%, #a5d6a7 100%);
}

.challenge-cards {
  display: flex;
  flex-wrap: wrap;
  gap: 1.5rem;
  justify-content: center;
  margin-top: 2rem;
}

.card {
  background: white;
  padding: 1.5rem;
  border-radius: 12px;
  width: 280px;
  box-shadow: 0 4px 10px rgba(0,0,0,0.1);
}

.card h4 {
  color: #2b4b9b;
}

/* === CONSEJOS === */
.tips-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
  gap: 2rem;
  margin-top: 2rem;
}

.tip-card {
  background: #ffffff;
  border-radius: 16px;
  box-shadow: 0 4px 12px rgba(0,0,0,0.1);
  padding: 1.2rem;
  text-align: center;
  transition: transform 0.3s;
}

.tip-card:hover {
  transform: translateY(-5px);
}

.tip-img {
  width: 100%;
  border-radius: 10px;
  margin-bottom: 1rem;
}

/* === RECURSOS === */
.resources-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
  gap: 2rem;
  margin-top: 2rem;
}

.resource-card {
  background: white;
  border-radius: 16px;
  box-shadow: 0 4px 12px rgba(0,0,0,0.1);
  text-align: center;
  padding: 1.5rem;
  transition: transform 0.3s;
}

.resource-card:hover {
  transform: scale(1.03);
}

.resource-img {
  width: 100%;
  border-radius: 12px;
  margin-bottom: 1rem;
}

/* === FOOTER === */
.footer {
  background: #2b4b9b;
  color: #fff;
  text-align: center;
  padding: 2rem 1rem;
}

.footer p {
  margin: 0.5rem 0;
}

.social-links {
  margin-top: 1rem;
}

.social-links a {
  color: #fff;
  text-decoration: none;
  margin: 0 0.7rem;
  font-weight: 500;
  transition: color 0.3s;
}

.social-links a:hover {
  color: #ff7eb6;
}

/* === ESTILOS PARA LOS JUEGOS INTERACTIVOS === */
.game-container {
  margin-top: 20px;
  padding: 20px;
  background: #f8f9fa;
  border-radius: 15px;
  border: 2px solid #e9ecef;
}

.memory-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 10px;
  max-width: 300px;
  margin: 0 auto;
}

.memory-card {
  aspect-ratio: 1;
  background: #fff;
  border: 2px solid #dee2e6;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2rem;
  cursor: pointer;
  transition: all 0.3s ease;
  box-shadow: 0 2px 5px rgba(0,0,0,0.1);
}

.memory-card:hover {
  transform: scale(1.05);
  box-shadow: 0 4px 10px rgba(0,0,0,0.2);
}

.memory-card.flipped {
  background: #e3f2fd;
  border-color: #2196f3;
}

.memory-card.matched {
  background: #e8f5e8;
  border-color: #4caf50;
  cursor: default;
}

.reset-btn {
  display: block;
  margin: 20px auto;
  padding: 10px 20px;
  background: #2196f3;
  color: white;
  border: none;
  border-radius: 25px;
  cursor: pointer;
  font-weight: 600;
  transition: background 0.3s ease;
}

.reset-btn:hover {
  background: #1976d2;
}

.color-question {
  font-size: 1.2rem;
  font-weight: 600;
  margin-bottom: 20px;
  text-align: center;
}

.color-options {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  justify-content: center;
  margin-bottom: 20px;
}

.color-option-btn {
  padding: 10px 15px;
  background: #fff;
  border: 2px solid #dee2e6;
  border-radius: 25px;
  cursor: pointer;
  font-weight: 600;
  transition: all 0.3s ease;
}

.color-option-btn:hover {
  background: #f8f9fa;
  border-color: #adb5bd;
}

.color-result {
  text-align: center;
  font-weight: 600;
  min-height: 40px;
}

.affirmation-builder {
  display: flex;
  flex-direction: column;
  gap: 15px;
  max-width: 300px;
  margin: 0 auto 20px;
}

.affirmation-builder select {
  padding: 10px;
  border: 2px solid #dee2e6;
  border-radius: 10px;
  font-size: 1rem;
}

.generate-btn {
  padding: 10px 20px;
  background: #28a745;
  color: white;
  border: none;
  border-radius: 25px;
  cursor: pointer;
  font-weight: 600;
  transition: background 0.3s ease;
}

.generate-btn:hover {
  background: #218838;
}

.affirmation-display {
  font-size: 1.5rem;
  font-weight: 700;
  color: #2b4b9b;
  text-align: center;
  margin: 20px 0;
  padding: 15px;
  background: #e3f2fd;
  border-radius: 10px;
  border-left: 5px solid #2196f3;
}

.breathing-circle {
  width: 150px;
  height: 150px;
  border-radius: 50%;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 20px;
  transition: transform 4s ease-in-out;
  box-shadow: 0 10px 30px rgba(102, 126, 234, 0.3);
}

.breathing-text {
  color: white;
  font-size: 1.2rem;
  font-weight: 700;
  text-align: center;
}

.breathing-instructions {
  text-align: center;
  font-weight: 600;
  color: #666;
  margin-bottom: 20px;
}

.stop-btn {
  display: block;
  margin: 20px auto;
  padding: 10px 20px;
  background: #dc3545;
  color: white;
  border: none;
  border-radius: 25px;
  cursor: pointer;
  font-weight: 600;
  transition: background 0.3s ease;
}

.stop-btn:hover {
  background: #c82333;
}

.gratitude-inputs {
  display: flex;
  flex-direction: column;
  gap: 10px;
  max-width: 400px;
  margin: 0 auto 20px;
}

.gratitude-input {
  padding: 12px;
  border: 2px solid #dee2e6;
  border-radius: 10px;
  font-size: 1rem;
  transition: border-color 0.3s ease;
}

.gratitude-input:focus {
  outline: none;
  border-color: #667eea;
}

.save-btn {
  display: block;
  margin: 20px auto;
  padding: 10px 20px;
  background: #28a745;
  color: white;
  border: none;
  border-radius: 25px;
  cursor: pointer;
  font-weight: 600;
  transition: background 0.3s ease;
}

.save-btn:hover {
  background: #218838;
}

.gratitude-saved {
  text-align: center;
  margin-top: 20px;
}

.gratitude-saved ul {
  text-align: left;
  display: inline-block;
  margin: 10px 0;
}

.gratitude-saved li {
  margin-bottom: 5px;
  padding-left: 15px;
  position: relative;
}

.gratitude-saved li:before {
  content: "🌟";
  position: absolute;
  left: 0;
}

.reflection-question {
  font-size: 1.2rem;
  font-weight: 600;
  margin-bottom: 20px;
  text-align: center;
  color: #2b4b9b;
}

.reflection-textarea {
  width: 100%;
  max-width: 400px;
  height: 100px;
  padding: 12px;
  border: 2px solid #dee2e6;
  border-radius: 10px;
  font-size: 1rem;
  resize: vertical;
  margin-bottom: 20px;
  transition: border-color 0.3s ease;
}

.reflection-textarea:focus {
  outline: none;
  border-color: #667eea;
}

.next-btn {
  display: block;
  margin: 20px auto;
  padding: 10px 20px;
  background: #667eea;
  color: white;
  border: none;
  border-radius: 25px;
  cursor: pointer;
  font-weight: 600;
  transition: background 0.3s ease;
}

.next-btn:hover {
  background: #5a67d8;
}

.reflection-progress {
  text-align: center;
  font-weight: 600;
  color: #666;
}

/* === RESPONSIVE === */
@media (max-width: 768px) {
  .navbar .container {
    flex-direction: column;
  }

  .nav-links {
    flex-direction: column;
    align-items: center;
  }

  .hero h2 {
    font-size: 1.8rem;
  }

  .challenge-cards, .tips-grid, .resources-grid {
    grid-template-columns: 1fr;
  }

  .memory-grid {
    grid-template-columns: repeat(3, 1fr);
    max-width: 250px;
  }

  .breathing-circle {
    width: 120px;
    height: 120px;
  }

  .color-options {
    flex-direction: column;
    align-items: center;
  }

  .affirmation-builder {
    max-width: 100%;
  }
}
