/* Variables de color y tipografía */
:root {
  --primary: #4A148C; /* morado profundo */
  --secondary: #F57C00; /* naranja vibrante */
  --bg-light: #F5F5F5; /* fondo claro */
  --text-dark: #333333; /* texto principal */
  --text-muted: #666666; /* texto secundario */
}

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

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

/* Navegación y hero */
.hero {
  background-image: url('assets/img3.jpg');
  background-size: cover;
  background-position: center;
  color: #ffffff;
  position: relative;
}

.hero::after {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(74, 20, 140, 0.5); /* overlay en tono primario */
  z-index: 1;
}

.navbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 15px 20px;
  position: relative;
  z-index: 2;
}

.logo {
  font-family: 'Merriweather', serif;
  font-size: 1.6rem;
  font-weight: 700;
}

.nav-links {
  list-style: none;
  display: flex;
  gap: 1.2rem;
}

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

.nav-links a:hover {
  color: var(--secondary);
}

.hero-content {
  padding: 100px 20px;
  text-align: center;
  position: relative;
  z-index: 2;
}

.hero-content h1 {
  font-family: 'Merriweather', serif;
  font-size: 2.8rem;
  margin-bottom: 15px;
}

.hero-content p {
  font-size: 1.2rem;
  max-width: 800px;
  margin: 0 auto;
}

/* Artículo */
.articulo {
  max-width: 1000px;
  margin: 60px auto;
  padding: 0 20px;
}

.articulo h2 {
  font-family: 'Merriweather', serif;
  font-size: 2.2rem;
  color: var(--primary);
  margin-bottom: 20px;
}

.articulo p {
  margin-bottom: 15px;
  color: var(--text-muted);
  font-size: 1rem;
}

.art-img {
  margin-top: 20px;
  text-align: center;
}

.art-img img {
  max-width: 100%;
  border-radius: 8px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

.art-img figcaption {
  font-size: 0.85rem;
  color: var(--text-muted);
  margin-top: 8px;
}

/* Cursos */
.cursos {
  background-color: #ffffff;
  padding: 60px 20px;
}

.cursos h2 {
  text-align: center;
  font-family: 'Merriweather', serif;
  font-size: 2rem;
  color: var(--secondary);
  margin-bottom: 40px;
}

.curso-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 20px;
  max-width: 1100px;
  margin: 0 auto;
}

.curso {
  background-color: var(--bg-light);
  border: 1px solid #e0e0e0;
  border-radius: 8px;
  padding: 20px;
  box-shadow: 0 1px 4px rgba(0,0,0,0.05);
  transition: transform 0.3s ease;
}

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

.curso h3 {
  color: var(--primary);
  margin-bottom: 10px;
  font-size: 1.2rem;
  font-weight: 600;
}

.curso p {
  color: var(--text-muted);
  margin-bottom: 15px;
  font-size: 0.95rem;
}

.curso .precio {
  background-color: var(--secondary);
  color: #ffffff;
  padding: 5px 10px;
  border-radius: 4px;
  font-size: 0.9rem;
  font-weight: 600;
}

/* Opiniones */
.opiniones {
  padding: 60px 20px;
  background-color: #ffffff;
}

.opiniones h2 {
  text-align: center;
  font-family: 'Merriweather', serif;
  font-size: 2rem;
  color: var(--primary);
  margin-bottom: 40px;
}

.opiniones-lista {
  max-width: 1000px;
  margin: 0 auto 40px;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 20px;
}

.opinion {
  background-color: var(--bg-light);
  border-left: 4px solid var(--secondary);
  padding: 20px;
  box-shadow: 0 1px 4px rgba(0,0,0,0.08);
}

.opinion p {
  font-style: italic;
  margin-bottom: 10px;
}

.opinion span {
  font-size: 0.9rem;
  color: var(--text-muted);
}

.opinion-form-wrapper {
  max-width: 600px;
  margin: 0 auto;
}

.opinion-form-wrapper h3 {
  text-align: center;
  margin-bottom: 20px;
  color: var(--secondary);
  font-family: 'Merriweather', serif;
}

.opinion-form-wrapper label {
  display: block;
  margin-bottom: 5px;
  font-weight: 600;
}

.opinion-form-wrapper input,
.opinion-form-wrapper textarea {
  width: 100%;
  padding: 10px;
  margin-bottom: 15px;
  border: 1px solid #ccc;
  border-radius: 4px;
  font-family: inherit;
}

/* Popup */
.popup {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0,0,0,0.5);
  justify-content: center;
  align-items: center;
  z-index: 200;
}

.popup-content {
  background-color: #ffffff;
  padding: 30px;
  border-radius: 8px;
  text-align: center;
  width: 90%;
  max-width: 400px;
}

/* Contacto */
.contacto {
  background-color: var(--bg-light);
  padding: 60px 20px;
}

.contacto h2 {
  text-align: center;
  font-family: 'Merriweather', serif;
  font-size: 2rem;
  color: var(--secondary);
  margin-bottom: 30px;
}

.contacto p {
  text-align: center;
  margin-bottom: 30px;
  color: var(--text-muted);
}

.contact-form {
  max-width: 600px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: 15px;
}

.contact-form label {
  font-weight: 600;
}

.contact-form input {
  padding: 10px;
  border: 1px solid #ccc;
  border-radius: 4px;
  font-family: inherit;
}

.checkbox-row {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.9rem;
}

.checkbox-row a {
  color: var(--primary);
  text-decoration: underline;
}

/* Botones */
.btn-primario, .btn-secundario {
  display: inline-block;
  padding: 10px 20px;
  border: none;
  border-radius: 4px;
  font-weight: 600;
  cursor: pointer;
  transition: background-color 0.3s ease;
  font-family: inherit;
}

.btn-primario {
  background-color: var(--primary);
  color: #ffffff;
}

.btn-primario:hover {
  background-color: #310a5e;
}

.btn-secundario {
  background-color: var(--secondary);
  color: #ffffff;
}

.btn-secundario:hover {
  background-color: #c06200;
}

/* Footer */
footer {
  background-color: var(--secondary);
  color: #ffffff;
  text-align: center;
  padding: 30px 20px;
  margin-top: 40px;
}

footer p {
  margin-bottom: 8px;
  font-size: 0.95rem;
}

footer a {
  color: #ffffff;
  text-decoration: underline;
}

/* Responsivo */
@media (max-width: 600px) {
  .hero-content h1 {
    font-size: 2rem;
  }
  .curso-grid {
    grid-template-columns: 1fr;
  }
  .opiniones-lista {
    grid-template-columns: 1fr;
  }
}