/* ===== ESTILOS BASE - JUNIOR STYLE ===== */
* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: Arial, sans-serif;
  background-color: #ffffff;
  color: #333333;
  line-height: 1.5;
}

/* ===== ACCESIBILIDAD BÁSICA ===== */
.skip-link {
  position: absolute;
  left: -9999px;
  background-color: #007bff;
  color: white;
  padding: 8px 16px;
  text-decoration: none;
  border-radius: 4px;
}

.skip-link:focus {
  left: 16px;
  top: 16px;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 1px, 1px);
  border: 0;
}

/* ===== MAIN CON OVERFLOW (OBLIGATORIO PROYECTO) ===== */
main {
  overflow-x: auto;
}

/* ===== HEADER CON FLEXBOX (OBLIGATORIO PROYECTO) ===== */
.site-header {
  padding: 20px;
  background-color: #f8f9fa;
  border-bottom: 1px solid #dee2e6;
}

.site-header nav {
  display: flex;                    /* OBLIGATORIO */
  justify-content: space-between;   /* OBLIGATORIO */
  align-items: center;             /* OBLIGATORIO */
  max-width: 1200px;
  margin: 0 auto;
}

.logo {
  font-size: 24px;
  font-weight: bold;
  color: #007bff;
}

.nav-links {
  display: flex;        /* OBLIGATORIO */
  gap: 24px;           /* OBLIGATORIO - propiedad gap requerida */
  list-style: none;
  margin: 0;
  padding: 0;
}

.nav-links a {
  text-decoration: none;
  color: #333333;
  padding: 8px 16px;
  border-radius: 4px;
  /* LOGRO 2: Animación simple */
  transition: background-color 0.3s ease;
}

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

.nav-links a[aria-current="page"] {
  color: #007bff;
  font-weight: bold;
}

/* ===== HERO SECTION ===== */
#hero {
  padding: 60px 20px;
  background-color: #f8f9fa;
  border-bottom: 1px solid #dee2e6;
  text-align: center;
}

#hero h1 {
  font-size: 40px;
  margin-bottom: 20px;
  color: #007bff;
}

#hero p {
  font-size: 18px;
  margin-bottom: 30px;
  max-width: 600px;
  margin-left: auto;
  margin-right: auto;
}

#hero img {
  max-width: 100%;
  height: auto;
  border-radius: 8px;
  margin-top: 20px;
  /* LOGRO 2: Animación en imágenes */
  transition: border-color 0.3s ease;
}

#hero img:hover {
  border-color: #007bff;
}

/* ===== RETO AUTÓNOMO: CARACTERÍSTICAS CON FLEXBOX (OBLIGATORIO) ===== */
#caracteristicas {
  padding: 60px 20px;
  background-color: #ffffff;
}

#caracteristicas h2 {
  text-align: center;
  font-size: 32px;
  margin-bottom: 50px;
  color: #333333;
}

.caracteristicas-grid {
  display: flex;           /* OBLIGATORIO */
  flex-wrap: wrap;         /* OBLIGATORIO */
  gap: 24px;              /* OBLIGATORIO - propiedad gap */
  justify-content: center; /* OBLIGATORIO */
  max-width: 1200px;
  margin: 0 auto;
}

.tarjeta {
  background-color: #f8f9fa;
  padding: 30px;
  border-radius: 8px;
  border: 1px solid #dee2e6;
  text-align: center;
  flex: 1;                 /* OBLIGATORIO */
  min-width: 280px;        /* OBLIGATORIO */
  max-width: 350px;        /* OBLIGATORIO */
  /* LOGRO 2: Animación simple */
  transition: background-color 0.3s ease, transform 0.3s ease;
}

.tarjeta:hover {
  background-color: #e9ecef;
  transform: translateY(-2px);  /* LOGRO 2: Transform en hover */
}

.icono {
  font-size: 48px;
  display: block;
  margin-bottom: 20px;
}

.tarjeta h3 {
  margin: 20px 0;
  color: #007bff;
  font-size: 20px;
}

.tarjeta p {
  color: #666666;
  line-height: 1.6;
}

/* ===== RETO AUTÓNOMO: GALERÍA CON FLEXBOX (OBLIGATORIO) ===== */
#galeria {
  padding: 60px 20px;
  background-color: #f8f9fa;
  border-bottom: 1px solid #dee2e6;
}

#galeria h2 {
  text-align: center;
  font-size: 32px;
  margin-bottom: 50px;
  color: #333333;
}

.galeria {
  display: flex;          /* OBLIGATORIO */
  flex-wrap: wrap;        /* OBLIGATORIO */
  gap: 16px;             /* OBLIGATORIO - propiedad gap */
  justify-content: center; /* OBLIGATORIO */
  max-width: 1200px;
  margin: 0 auto;
}

.imagen-item {
  display: flex;           /* OBLIGATORIO PARA RETO AUTÓNOMO */
  flex-direction: column;  /* OBLIGATORIO PARA RETO AUTÓNOMO */
  align-items: center;     /* OBLIGATORIO PARA RETO AUTÓNOMO */
  background-color: #ffffff;
  padding: 16px;
  border-radius: 8px;
  border: 1px solid #dee2e6;
  /* LOGRO 2: Animación simple */
  transition: background-color 0.3s ease, transform 0.3s ease;
}

.imagen-item:hover {
  background-color: #f8f9fa;
  transform: scale(1.02);  /* LOGRO 2: Transform en hover */
}

.galeria img {
  width: 200px;          /* OBLIGATORIO */
  height: auto;          /* OBLIGATORIO */
  border-radius: 4px;
  margin-bottom: 12px;
  border: 1px solid #dee2e6;
  /* LOGRO 2: Animación en imágenes */
  transition: border-color 0.3s ease;
}

.galeria img:hover {
  border-color: #007bff;
}

.imagen-descripcion {
  text-align: center;
  color: #333333;
  font-size: 14px;
  font-weight: bold;
}

/* ===== LOGRO 1: TESTIMONIOS CON FLEXBOX (OBLIGATORIO) ===== */
#testimonios {
  padding: 60px 20px;
  background-color: #ffffff;
}

#testimonios h2 {
  text-align: center;
  font-size: 32px;
  margin-bottom: 50px;
  color: #333333;
}

.testimonios {
  display: flex;          /* OBLIGATORIO LOGRO 1 */
  flex-wrap: wrap;        /* OBLIGATORIO LOGRO 1 */
  gap: 24px;             /* OBLIGATORIO LOGRO 1 - propiedad gap */
  max-width: 1200px;
  margin: 0 auto;
}

.testimonio {
  background-color: #007bff;
  color: white;
  padding: 30px;
  border-radius: 8px;
  flex: 1;               /* OBLIGATORIO LOGRO 1 */
  min-width: 300px;      /* OBLIGATORIO LOGRO 1 */
  /* LOGRO 2: Animación simple */
  transition: background-color 0.3s ease, transform 0.3s ease;
}

.testimonio:hover {
  background-color: #0056b3;
  transform: translateY(-3px);  /* LOGRO 2: Transform en hover */
}

.testimonio p {
  font-size: 16px;
  line-height: 1.7;
  margin-bottom: 20px;
  font-style: italic;
}

.autor {
  font-weight: bold;
  text-align: right;
}

/* ===== FAQ ===== */
#faq {
  padding: 60px 20px;
  background-color: #f8f9fa;
}

#faq h2 {
  text-align: center;
  font-size: 32px;
  margin-bottom: 40px;
  color: #333333;
}

details {
  margin-bottom: 16px;
  border: 1px solid #dee2e6;
  border-radius: 4px;
  padding: 20px;
  background-color: #ffffff;
  max-width: 800px;
  margin-left: auto;
  margin-right: auto;
  margin-bottom: 16px;
}

summary {
  cursor: pointer;
  font-weight: bold;
  color: #007bff;
  /* LOGRO 2: Animación simple */
  transition: color 0.3s ease;
}

summary:hover {
  color: #0056b3;
}

/* ===== PRECIOS CON FLEXBOX ===== */
#precios {
  padding: 60px 20px;
  background-color: #ffffff;
  border-bottom: 1px solid #dee2e6;
}

#precios h2 {
  text-align: center;
  font-size: 32px;
  margin-bottom: 50px;
  color: #333333;
}

.planes-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 24px;
  justify-content: center;
  max-width: 1000px;
  margin: 0 auto;
}

.plan {
  background-color: #f8f9fa;
  padding: 30px;
  border-radius: 8px;
  border: 1px solid #dee2e6;
  text-align: center;
  flex: 1;
  min-width: 280px;
  max-width: 320px;
  /* LOGRO 2: Animación simple */
  transition: border-color 0.3s ease, background-color 0.3s ease, transform 0.3s ease;
}

.plan.destacado {
  border-color: #007bff;
  background-color: #007bff;
  color: white;
}

.plan:hover {
  border-color: #007bff;
  background-color: #e9ecef;
  transform: translateY(-2px);  /* LOGRO 2: Transform en hover */
}

.plan.destacado:hover {
  background-color: #0056b3;
  transform: translateY(-2px);
}

.precio {
  font-size: 32px;
  font-weight: bold;
  color: #007bff;
  margin: 20px 0;
}

.plan.destacado .precio {
  color: white;
}

.plan ul {
  list-style: none;
  padding: 0;
  margin: 20px 0;
}

.plan li {
  padding: 8px 0;
  border-bottom: 1px solid #dee2e6;
}

.plan.destacado li {
  border-bottom-color: rgba(255, 255, 255, 0.3);
}

/* ===== RETO AUTÓNOMO: FOOTER CON TÉRMINOS Y CONDICIONES (OBLIGATORIO) ===== */
footer {
  background-color: #f8f9fa;
  border-top: 1px solid #dee2e6;
  padding: 40px 20px 20px;
}

.footer-content {
  display: flex;                    /* OBLIGATORIO RETO AUTÓNOMO */
  justify-content: space-between;   /* OBLIGATORIO RETO AUTÓNOMO */
  align-items: flex-start;
  flex-wrap: wrap;                  /* OBLIGATORIO RETO AUTÓNOMO */
  gap: 32px;                       /* OBLIGATORIO - propiedad gap */
  max-width: 1200px;
  margin: 0 auto;
}

.footer-info h3 {
  color: #007bff;
  margin-bottom: 15px;
}

.footer-info p {
  margin: 8px 0;
  color: #666666;
}

.footer-info a {
  color: #007bff;
  text-decoration: none;
  /* LOGRO 2: Animación simple */
  transition: color 0.3s ease;
}

.footer-info a:hover {
  text-decoration: underline;
  color: #0056b3;
}

.terminos-legales {
  display: flex;              /* OBLIGATORIO RETO AUTÓNOMO */
  gap: 16px;                 /* OBLIGATORIO RETO AUTÓNOMO - propiedad gap */
  flex-wrap: wrap;
}

.terminos-legales a {
  color: #333333;
  text-decoration: none;
  padding: 8px 15px;
  border-radius: 4px;
  border: 1px solid #dee2e6;
  font-size: 14px;
  /* LOGRO 2: Animación simple */
  transition: background-color 0.3s ease, color 0.3s ease;
}

.terminos-legales a:hover {
  background-color: #e9ecef;
  color: #007bff;
}

.footer-bottom {
  text-align: center;
  margin-top: 40px;
  padding-top: 20px;
  border-top: 1px solid #dee2e6;
  color: #666666;
}

/* ===== BOTÓN DE TEMA ===== */
#theme-toggle {
  position: fixed;
  bottom: 20px;
  right: 20px;
  background-color: #007bff;
  color: white;
  border: none;
  padding: 12px 20px;
  border-radius: 4px;
  cursor: pointer;
  font-size: 14px;
  /* LOGRO 2: Animación simple */
  transition: background-color 0.3s ease, transform 0.3s ease;
}

#theme-toggle:hover {
  background-color: #0056b3;
  transform: translateY(-1px);  /* LOGRO 2: Transform en hover */
}

/* ===== LOGRO 2: ANIMACIONES GENERALES (OBLIGATORIO) ===== */
a, button {
  transition: background-color 0.3s ease, color 0.3s ease;
}

img {
  max-width: 100%;
  height: auto;
  border: 1px solid #dee2e6;
  border-radius: 4px;
  /* LOGRO 2: Animación en imágenes */
  transition: border-color 0.3s ease;
}

/* ===== MEDIA QUERIES RESPONSIVE (OBLIGATORIO) ===== */

/* Tablet - 768px y menos */
@media (max-width: 768px) {
  /* Header responsive */
  .site-header nav {
    flex-direction: column;  /* OBLIGATORIO */
    gap: 16px;
  }
  
  .nav-links {
    flex-direction: column;  /* OBLIGATORIO */
    gap: 8px;
    text-align: center;
    width: 100%;
  }
  
  .nav-links a {
    display: block;
    padding: 12px;
  }
  
  /* Hero responsive */
  #hero h1 {
    font-size: 32px;
  }
  
  #hero p {
    font-size: 16px;
  }
  
  /* Características responsive */
  .caracteristicas-grid {
    flex-direction: column;  /* OBLIGATORIO */
    align-items: center;
  }
  
  .tarjeta {
    max-width: 100%;
    min-width: 280px;
  }
  
  /* Galería responsive */
  .galeria {
    flex-direction: column;
    align-items: center;
  }
  
  /* Testimonios responsive */
  .testimonios {
    flex-direction: column;
  }
  
  /* Precios responsive */
  .planes-grid {
    flex-direction: column;
    align-items: center;
  }
  
  /* Footer responsive */
  .footer-content {
    flex-direction: column;
    text-align: center;
  }
  
  .terminos-legales {
    justify-content: center;
  }
}

/* Móvil - 480px y menos */
@media (max-width: 480px) {
  /* Espaciado general */
  section {
    padding: 40px 16px;
  }
  
  /* Tipografía móvil */
  h1 {
    font-size: 28px;
  }
  
  h2 {
    font-size: 24px;
  }
  
  /* Tarjetas móvil */
  .tarjeta {
    min-width: 260px;
    padding: 20px;
  }
  
  /* Imágenes móvil */
  .galeria img {
    width: 150px;           /* OBLIGATORIO */
  }
  
  .imagen-item {
    min-width: 180px;
  }
  
  /* Testimonios móvil */
  .testimonio {
    min-width: 280px;
    padding: 20px;
  }
  
  /* Footer móvil */
  .terminos-legales {
    flex-direction: column;
    gap: 8px;
  }
  
  .terminos-legales a {
    text-align: center;
  }
  
  /* Botón tema móvil */
  #theme-toggle {
    bottom: 10px;
    right: 10px;
    padding: 8px 12px;
    font-size: 12px;
  }
}

/* ===== TEMA OSCURO (Funcional con JavaScript) ===== */
html[data-theme="dark"] {
  --bg-color: #1a1a1a;
  --text-color: #e5e5e5;
  --surface: #2d2d2d;
  --border: #404040;
  --brand: #4dabf7;
}

html[data-theme="dark"] body {
  background-color: #1a1a1a;
  color: #e5e5e5;
}

html[data-theme="dark"] .site-header {
  background-color: #2d2d2d;
  border-bottom-color: #404040;
}

html[data-theme="dark"] .tarjeta,
html[data-theme="dark"] .imagen-item,
html[data-theme="dark"] details,
html[data-theme="dark"] .plan {
  background-color: #2d2d2d;
  border-color: #404040;
}

html[data-theme="dark"] #hero,
html[data-theme="dark"] #galeria,
html[data-theme="dark"] #faq {
  background-color: #2d2d2d;
}

html[data-theme="dark"] footer {
  background-color: #2d2d2d;
  border-top-color: #404040;
}