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

body {
  font-family: Georgia, 'Times New Roman', serif;
  background: #f1f5f9;
  color: #1e293b;
  line-height: 1.6;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

/*HEADER */
header {
  background: #132860f3;
  color: #ffffff;
  padding: 20px 40px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 15px;
}

header h1 {
  font-size: 1.6rem;
  letter-spacing: 1px;
  margin: 0;
}

/* NAVEGACIÓ*/
nav ul {
  display: flex;
  justify-content: flex-end;
  flex-wrap: wrap;
  list-style: none;   
  gap: 10px;
  margin: 0;
  padding: 0;
}

nav ul > li {
  position: relative;
  list-style: none;   
}

nav a {
  display: inline-block;
  padding: 9px 18px;
  background: #284a93;
  color: #ffffff;
  text-decoration: none; 
  border-radius: 6px;
  font-family: 'Segoe UI', Tahoma, sans-serif;
  font-size: 0.9rem;
  font-weight: 500;
  transition: background 0.3s ease, transform 0.2s ease;
}

nav a:hover {
  background: #091c52;
  transform: translateY(-2px);
}

nav a.activo {
  background: #ccdef5;
  box-shadow: inset 0 2px 6px rgba(0, 0, 0, 0.3);
}

/*DROPDOWN (Prácticas)  */
.dropdown {
  display: inline-block;
}

.dropdown > a {
  position: relative;    
  cursor: pointer;
}

.dropdown-menu {
  position: absolute;
  top: 100%;
  right: 0;                
  left: auto;
  transform: translateY(-4px);
  width: 140px;
  background: #1e3a8a;
  border-radius: 0 0 6px 6px;
  box-shadow: 0 6px 15px rgba(0, 0, 0, 0.3);
  list-style: none;
  padding: 6px 0;
  margin: 0;
  overflow: hidden;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.2s ease, transform 0.2s ease, visibility 0.2s;
  z-index: 9999;
}

.dropdown:hover .dropdown-menu {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.dropdown-menu li {
  margin: 0;
  padding: 0;
  list-style: none;
}

.dropdown-menu a {
  display: block;
  background: transparent;
  color: #ffffff;
  padding: 10px 16px;
  border-radius: 0;
  font-family: 'Segoe UI', Tahoma, sans-serif;
  font-size: 0.88rem;
  font-weight: 500;
  text-align: center;
  text-decoration: none;
  white-space: nowrap;
  line-height: 1.2;
  width: 100%;
  box-sizing: border-box;
  transition: background 0.2s ease;
}

.dropdown-menu a:hover {
  background: #2563eb;
}

.dropdown-menu a.activo {
  background: #2563eb;
}

/*CONTENIDO PRINCIPAL*/
main {
  flex: 1;
  max-width: 1100px;
  width: 90%;
  margin: 40px auto;
}

.tarjeta {
  background: #ffffff;
  border-radius: 10px;
  padding: 35px 40px;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.08);
  border-left: 6px solid #2563eb;
}

.tarjeta h2 {
  font-size: 1.8rem;
  color: #1e293b;
  margin-bottom: 15px;
}

.tarjeta p {
  font-size: 1.05rem;
  color: #334155;
  margin-bottom: 15px;
}

.tarjeta ul {
  margin-left: 20px;
  color: #334155;
}

.tarjeta ul li {
  margin-bottom: 8px;
}

/* ENLACES Y NEGRITAS DENTRO DEL CONTENIDO*/
.tarjeta a {
  color: #2563eb;
  font-weight: 600;
  text-decoration: underline;
}

.tarjeta a:hover {
  color: #1d4ed8;
}

.tarjeta strong {
  font-weight: bold;
  color: #0f172a;
}

/*HERO  */
.hero-inicio {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 40px;
  flex-wrap: wrap;
}

.hero-texto {
  flex: 1 1 55%;
  min-width: 280px;
  text-align: left;
}

/*FOTO DE PERFIL*/
.foto-perfil {
  flex: 0 0 300px;
  width: 300px;
  height: auto;
  max-height: 380px;
  object-fit: cover;
  border-radius: 10px;
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.15);
  transition: transform 0.3s ease;
}

.foto-perfil:hover {
  transform: scale(1.03);
}

/* LOGO DE PRÁCTICA*/
.logo-practica {
  display: block;
  width: 650px;
  max-width: 100%;
  height: auto;
  margin-top: 20px;
  margin-left: 0;
  background: #ffffff;
}

/* FOOTER */
footer {
  background: #142659;
  color: #ffffff;
  text-align: center;
  padding: 25px 20px;
  font-family: 'Segoe UI', Tahoma, sans-serif;
  font-size: 0.95rem;
  margin-top: auto;
}

/*RESPONSIVE */
@media (max-width: 800px) {
  header {
    flex-direction: column;
    text-align: center;
    padding: 20px;
  }
  header h1 {
    font-size: 1.4rem;
  }
  nav ul {
    justify-content: center;
  }
  .hero-inicio {
    flex-direction: column-reverse;
    text-align: center;
  }
  .hero-texto {
    text-align: center;
  }
  .foto-perfil {
    width: 100%;
    max-width: 320px;
  }
  .tarjeta {
    padding: 25px 20px;
  }
  .tarjeta h2 {
    font-size: 1.4rem;
  }
  .logo-practica {
    width: 100%;
  }
}

/* LISTA DE PRÁCTICA */
.tarjeta hr {
  border: none;
  border-top: 1px solid #d1d5db;
  margin: 15px 0 20px 0;
}

.lista-practica {
  list-style: disc;
  margin-left: 25px;
  color: #334155;
  font-size: 1.05rem;
}

.lista-practica > li {
  margin-bottom: 18px;
  font-weight: bold;
}

.lista-practica ol {
  list-style: decimal;
  margin-left: 35px;
  margin-top: 8px;
  font-weight: normal;
}

.lista-practica ol li {
  margin-bottom: 8px;
  color: #334155;
}

/* TARJETAS SEPARADAS*/
main > .tarjeta {
  margin-bottom: 30px;   
}

main > .tarjeta:last-child {
  margin-bottom: 0;
}

/*SUB-TARJETA (recuadro gris  */
.sub-tarjeta {
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  padding: 25px 30px;
  margin-top: 15px;
}

.sub-tarjeta h3 {
  color: #2563eb;       
  font-size: 1.15rem;
  margin-bottom: 15px;
  font-weight: bold;
}

.sub-tarjeta p {
  margin-bottom: 10px;
  color: #334155;
  font-size: 1rem;
}

.sub-tarjeta p:last-child {
  margin-bottom: 0;
}

.sub-tarjeta ul {
  margin-left: 20px;
  color: #334155;
}

.sub-tarjeta ul li {
  margin-bottom: 8px;
  color: #334155;
}

/* Separación entre sub-tarjetas */
.sub-tarjeta + .sub-tarjeta {
  margin-top: 20px;
}

/* CONTACTO (comunidad)*/
.tarjeta p em {
  font-style: italic;
}

.tarjeta p a {
  color: #2563eb;
  text-decoration: underline;
  font-weight: normal;
  font-style: normal;
}

.tarjeta p a:hover {
  color: #1d4ed8;
}

/* Botón Volver al inicio - EduContr*/
.btn-volver-edu {
  display: inline-block;
  margin-left: 20px;
  padding: 8px 16px;
  background: #2563eb;
  color: #ffffff;
  text-decoration: none;
  border-radius: 6px;
  font-family: 'Segoe UI', Tahoma, sans-serif;
  font-size: 0.85rem;
  font-weight: 500;
  vertical-align: middle;
  transition: background 0.3s ease, transform 0.2s ease;
}

.btn-volver-edu:hover {
  background: #1d4ed8;
  transform: translateY(-2px);
}