html, body {
  margin: 0;
  padding: 0;
  height: 100%;
  font-family: 'Gelasio', serif;
  background: white;
  box-sizing: border-box;
  overflow-x: hidden;
}

*, *::before, *::after {
  box-sizing: inherit;
}

/* Contenedor principal con scroll natural */
.container {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

/* HEADER */
.header {
  margin-top: 80px;
  margin-bottom: 40px; /* separación visual respecto a tarjetas */
  color: black;
  font-family: Helvetica, sans-serif;
  margin-left: 40px;
}

h1 {
  font-size: 16px;
  font-weight: 600;
}

.divider {
  border-top: 2px solid black;
  margin-top: 10px;
  margin-right: 40px;
  max-width: 100%;
}

/* CONTENEDOR DE TARJETAS - ahora con height dinámico */
.proyectos {
  position: relative;
  min-height: 100vh;
  height: auto; /* importantísimo */
  padding-bottom: 200px; /* deja espacio visual para el footer */
}

/* TARJETAS */
.tarjeta {
  position: absolute;
  left: 0;
  width: 100%;
  margin-left: none;
  margin-right: none;
  padding: 2rem 1rem;
  padding-left: 40px;
  padding-right: 40px;
  border-top-left-radius: 40px;
  border-top-right-radius: 40px;
  font-size: 40px;
  line-height: 35px;
  display: flex;
  justify-content: space-between;
  box-shadow: none;
  color: black;
  text-decoration: none;
  transition: transform 0.2s, filter 0.2s;
  cursor: pointer;
  overflow: visible; /* Necesario para que el ::after se vea fuera */
}

.tarjeta::after {
  content: "";
  position: absolute;
  top: 100%;
  left: 0;
  width: 100%;
  height: 60px; /* Ajusta según cuánto quieras extender */
  background: inherit; /* Usa mismo fondo que la tarjeta */
  z-index: -1; /* Colócalo debajo de la tarjeta */
  border-bottom-left-radius: 40px;
  border-bottom-right-radius: 40px;
}

/* HOVER */
.tarjeta:hover {
  color: white;
}

/* ÚLTIMA TARJETA EXPANDIDA */
.tarjeta.expandida {
  height: auto;
  min-height: calc(100vh - 8rem); /* header + footer */
  bottom: 0;
}

/* RESPONSIVE */
@media (max-width: 600px) {
  .tarjeta {
    font-size: 24px;
    line-height: 22px;
    padding: 1.5rem 1rem;
    padding-bottom: 3rem;
    margin-left: none;
    margin-right: none;
    width: 100%;
  }

  .header {
    padding-left: 0;
    margin-bottom: 60px;
  }

  .divider {
    padding-left: 20px;
    padding-right: 20px;
    margin-right: none;
  }
  .año{
    text-align: right;
  }
}
