/* Reset y tipografía */
* { box-sizing: border-box; }
body {
  margin: 0;
  font-family: 'Segoe UI', Roboto, sans-serif;
  background: #fff;
  color: #222;
  line-height: 1.5;
  padding-top: 72px; /* compensa el header fijo */
}

/* Título destacado */
.tituloDestacado {
  color: #6c3ddf;
  font-weight: 700;
  margin-bottom: 12px;
}

.caption{
  color: gray;
  font-style: italic;
}

/* Skip link accesible */
.skip-link {
  position: absolute;
  left: -9999px;
  top: 0;
}
.skip-link:focus {
  left: 16px;
  top: 16px;
  background: #000;
  color: #fff;
  padding: 8px 12px;
  border-radius: 6px;
  z-index: 1000;
}

/* Cabecera fija (menú) */
header {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  background: #000;
  padding: 15px 40px;
  display: flex;
  justify-content: space-between; /* logo a izq., menú a der. */
  align-items: center;
  z-index: 10;
}

header .logo {
  font-weight: bold;
  color: #fff;
}

header nav a {
  margin-left: 20px;
  text-decoration: none;
  color: #fff;
  font-weight: 500;
  transition: color .2s ease-in-out;
}
header nav a:hover {
  color: #6c3ddf;
}

/* Hero */
.hero {
  position: relative;
  height: 80vh;
  display: flex;
  justify-content: center;
  align-items: center;
  text-align: center;
  color: #fff;
  overflow: hidden;
}

.hero::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(rgba(0,0,0,.45), rgba(0,0,0,.45)),
              url("images/recursividad.jpg") center/cover no-repeat;
  filter: blur(1px);
  opacity: 0.9;
  z-index: 0;
}

.hero-text {
  position: relative;
  z-index: 1;
}
.hero-text h1 {
  font-size: clamp(28px, 6vw, 42px);
  margin: 0 0 15px;
}
.hero-text p {
  font-size: 20px;
  margin: 0 0 25px;
}
.hero-text .btn {
  background: #6c3ddf;
  padding: 12px 24px;
  border-radius: 6px;
  color: #fff;
  text-decoration: none;
  font-weight: 600;
  display: inline-block;
  transition: transform .15s ease, opacity .15s ease;
}
.hero-text .btn:hover {
  transform: translateY(-1px);
  opacity: .95;
}

/* Secciones */
.section {
  padding: 60px 20px;
  max-width: 1200px;
  margin: auto;
  scroll-margin-top: 90px; /* evita que el header tape el título */
}
.section h2 {
  text-align: center;
  margin-bottom: 40px;
  font-size: 28px;
  color: #333;
}

/* Grid de cards */
.grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 32px;
}


/***********************************************************
 *  TARJETAS
 ***********************************************************/
.card {
  background: #fff;
  border: 1px solid #ddd;
  border-radius: 10px;
  padding: 24px;
  text-align: center;
  min-height: 200px; /* altura mínima coherente */
  box-shadow: 0 4px 10px rgba(0,0,0,.08);
  transition: transform .2s ease, box-shadow .2s ease, border-color .2s ease;
  will-change: transform, box-shadow;
}
.card:hover {
  transform: translateY(-6px);
  box-shadow: 0 10px 24px rgba(108, 61, 223, .35);
  border: 2px solid #6c3ddf;
}
.card:focus-within {
  transform: translateY(-6px);
  box-shadow: 0 10px 24px rgba(108, 61, 223, .35);
  border-color: #6c3ddf;
}
.card h3 {
  margin: 16px 0 12px;
  font-size: 20px;
  color: #333;
}
.card p {
  font-size: 15px;
  color: #555;
  line-height: 1.4;
}

.card .icono {
  width: 64px;
  height: 64px;
  color: gray;
  margin-top: 16px;
  filter: grayscale(100%) brightness(0.4); /* convierte en gris */
  opacity: 0.8;
}


/* Fondo oscuro semitransparente */
.modal {
  display: none; /* oculto por defecto */
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.6);
  z-index: 1000;
  justify-content: center;
  align-items: center;
}

/* Ventana Emergente: Código QR */
.modal-content {
  background: #fff;
  padding: 10px;
  border-radius: 8px;
  position: relative;
  width: 400px;
  height: 400px;
  display: flex;
  justify-content: center;
  align-items: center;
}

.modal-content img {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
  border-radius: 6px;
}

/* Botón de cerrar */
.cerrar {
  position: absolute;
  top: 8px;
  right: 12px;
  font-size: 24px;
  font-weight: bold;
  color: #555;
  cursor: pointer;
}
.cerrar:hover { color: #000; }


a.card {
  text-decoration: none !important;
  color: inherit;
  display: block;       /* mantiene el mismo comportamiento que un div */
}
a.card:hover {
  text-decoration: none;
}


@media (prefers-reduced-motion: reduce) {
  .card {
    transition: none;
  }
  .card:hover,
  .card:focus-within {
    transform: none;
  }
}

.parpadeo {
  background-color: white;
  animation: parpadear 2s infinite;
}

@keyframes parpadear {
  0%   { background-color: white; box-shadow: 0 0 5px lightyellow; }
  50%  { background-color: #ffffcc;  box-shadow: 0 0 20px gold; }
  100% { background-color: white; box-shadow: 0 0 5px lightyellow; }
}


/* Nuestros Recursos - programa Digcomp */
.recurso-doble {
    display: block;
}

.versiones-recurso {
    display: flex;
    gap: 20px;
    justify-content: center;
    margin-top: 25px;
    flex-wrap: wrap;
}

.version-card {
    width: 240px;
    padding: 18px;
    border: 1px solid #736AFF;
    border-radius: 14px;
    text-decoration: none;
    color: #333;
    background: #fff;
    box-shadow: 0 6px 16px rgba(115, 106, 255, 0.12);
    transition: 0.2s ease;
    text-align: center;
}

.version-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 10px 24px rgba(115, 106, 255, 0.22);
}

.version-card span {
    display: block;
    font-weight: 700;
    margin-bottom: 14px;
}

/***********************************************************
 *  PROFESORA
 ***********************************************************/
/* Contenedor centrado */
.profesora-wrapper {
  display: flex;
  align-items: center;       /* alinea verticalmente foto y texto */
  justify-content: center;   /* centra el bloque en la página */
  gap: 24px;                 /* espacio entre foto y texto */
  max-width: 700px;          /* límite de ancho */
  margin: auto;              /* centra el div en el ancho de la página */
}

/* Imagen de la profesora */
.profesora-imagen img {
  width: 140px;
  height: 140px;
  object-fit: cover;
  border-radius: 50%;
  border: 3px solid #6c3ddf;
  display: block;
}

/* Texto */
.profesora-info h3 {
  margin: 0 0 10px;
  text-align: left;
}
.profesora-info p {
  margin: 0;
  text-align: left;
}


/***********************************************************
 *  CENTRO
 ***********************************************************/
.centro-wrapper {
  display: flex;
  align-items: stretch;     /* estira ambos (imagen y texto) a la misma altura */
  justify-content: center;
  gap: 32px;                /* más espacio entre la imagen y el texto */
  max-width: 900px;
  margin: auto;
  flex-wrap: wrap;          /* en móvil se apilan */
}

.centro-imagen img {
  width: 100%;
  max-width: 380px;
  border-radius: 8px;
  display: block;
  height: 100%;             /* hace que la imagen ocupe toda la altura */
  object-fit: cover;        /* recorta bien la foto si sobra */
}

.centro-info {
  flex: 1 1 300px;
  max-width: 500px;
  display: flex;            /* para que el texto se alinee verticalmente */
  flex-direction: column;
  justify-content: center;  /* centra el texto verticalmente */
}


.centro-info h3 {
  margin-top: 0;
}

.subtitulo-centro {
  font-size: 15px;       /* más pequeño que el título */
  color: #555;           /* gris suave */
  margin: 4px 0 16px;    /* separa del título y de la dirección */
  margin-bottom: 40px;
}



/* Footer */
footer {
  text-align: center;
  padding: 20px;
  font-size: 14px;
  color: #777;
  border-top: 1px solid #eee;
  margin-top: 40px;
}
