/* ============================================
   RECURSOS — recursos.css
   ============================================ */
@keyframes bgAnimation {
  0%    {background-position: 10px;}
  100%  {background-position: 100px;}
}

/* ── VARIABLES GLOBALES ── */
:root {
  --link-color: #ff8000;
  --bg-color: #fbf4db;
  --text-color: rgb(255, 0, 0);
  --norm-text-color: rgba(30, 26, 46, 0.821);
  --border-radius: 0px;
}


/* ── BODY ── */
body {
  background-image: url("images/res-bg.png");
  background-position: 10px;
  background-size: auto;
  background-repeat: repeat;
  animation-name: bgAnimation;
  animation-duration: 4s;
  animation-iteration-count: infinite;
  animation-timing-function: ease-in-out;
  animation-direction: alternate-reverse;
}


/* ── ENLACES ── */
a {
  color: rgb(25, 0, 255);
}

a:hover {
  color: var(--link-color);
}

::selection {
  color: var(--text-color);
  background-color: rgb(255, 232, 151);
}


/* ── HEADER / TÍTULO ── */
.header {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 80px;
}

.recursos-link {
  position: relative;
  display: inline-block;
}

.recursos-title {
  font-family: "Jersey 10", sans-serif;
  font-weight: 400;
  font-style: normal;
  font-size: 50px;
  color: var(--text-color);
  margin-top: 10px;
  padding: 10px;
  background-color: var(--bg-color);
  backdrop-filter: blur(12px) saturate(1.4);
  -webkit-backdrop-filter: blur(12px) saturate(1.4);
  filter: drop-shadow(5px 5px 5px #22222282);
}


/* ── GIF AL HACER HOVER ── */
.title-gif {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  display: none;
  width: 20em;
  filter: drop-shadow(5px 5px 5px #222);
}

.recursos-link:hover .recursos-title {
  opacity: 0;
}

.recursos-link:hover .title-gif {
  display: block;
  z-index: 1;
}


/* ── DESCRIPCIÓN LATERAL (post-it) ── */
.res-desc {
  position: absolute;
  max-width: 165px;
  min-width: 165px;
  padding: 15px;
  right: 20%;
  top: 151px;
  rotate: 10deg;
  background-color: var(--text-color);
  color: var(--bg-color);
  border: var(--bg-color) 1px dashed;
  filter: drop-shadow(5px 5px 5px #222);
  z-index: 1;
  overflow: hidden;
}

.res-desc:hover {
  filter: invert();
}


/* ── GRID DE RECURSOS ── */
.resources-grid {
  position: relative;
  display: grid;
  grid-template-columns: 1fr 1fr;
  grid-template-rows: auto auto;
  gap: 20px;
  padding: 10px 100px;
  max-width: 900px;
  margin: 0 auto;
  background-color: var(--bg-color);
  border-radius: var(--border-radius);
  filter: drop-shadow(5px 5px 5px #22222264);
  color: var(--norm-text-color);
}

/* Posición explícita de los títulos */
.res-title:nth-of-type(1) { grid-column: 1; grid-row: 1; }
.res-title:nth-of-type(2) { grid-column: 2; grid-row: 1; }


/* ── TÍTULOS DE CADA SECCIÓN ── */
.res-title {
  font-family: "Jersey 10", sans-serif;
  font-weight: 400;
  font-style: normal;
  font-size: 40px;
  color: var(--text-color);
}

.touhou3 {
  color: #ccf;
  background: #00d;
  padding: 12px;
  border-image-slice: 12;
  border-image-width: 12px;
  border-image-repeat: round;
  border-style: solid;
  border-color: transparent;
  image-rendering: pixelated;
  border-image-source: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACAAAAAgAQMAAABJtOi3AAAABlBMVEUAAACZmf/aJORuAAAAAXRSTlMAQObYZgAAAFRJREFUeNpjQAD7////QAgDBgYeBsOZM3sYjKKifBhMly5dw2A6c+YaBiMGBh8GQwaGHgazBsYcMAHmQiRMGxjXgAgC6sBGgQ0FGw+2CGIlwgVwAACQHyhXCFDEKwAAAABJRU5ErkJggg==");
}


/* ── LISTAS DE RECURSOS ── */
ul {
  list-style-type: none;
  padding-bottom: 10px;
  font-size: 18px;
  justify-self: stretch;
}


/* ── RESPONSIVE ── */

@media (max-width: 1130px) {
  .res-desc {
    right: 10%;
  }

  .resources-grid {
    max-width: 95%;
  }
}

@media (max-width: 850px) {
  .res-desc {
    zoom: 80%;
    top: 250px;
  }

  .resources-grid {
    display: flex;
    flex-direction: column;
    padding: 20px;
    font-size: 3vw;
    overflow: hidden;
  }
}