body {
  margin: 0;
  font-family: "Oswald", sans-serif;
}

.container {
  display: flex;
  /* quito flex-wrap para que no baje el panel */
  /* flex-wrap: wrap; */
  min-height: 100vh;
  overflow-x: hidden;
}

/* Estado inicial: left-panel ocupa 100%, right-panel oculto */
.left-panel {
  background-color: #111;
  color: white;
  width: 100%;
  padding: 60px 30px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  transition: width 0.5s ease;
}

.right-panel {
  background-color: #e2c74f;
  width: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 20px;
  justify-content: center;
  overflow-y: hidden;
  transition: width 0.5s ease, padding 0.5s ease;
}

.container.expanded .left-panel {
  width: 30%;
}

.container.expanded .right-panel {
  width: 70%;
  padding: 60px 30px;
  overflow-y: auto;
}

.left-panel h1 {
  margin: 10px 0;
  font-size: 26px;
}

.left-panel p {
  color: #ccc;
  line-height: 1.5;
}

.card {
  background: #fff;
  border-radius: 10px;
  padding: 20px;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  cursor: pointer;
  position: relative;
  overflow: hidden;
}

.card:hover {
  transform: translateY(-5px);
  box-shadow: 0 10px 20px rgba(0, 0, 0, 0.1);
}

.card .content {
  max-height: 0;
  opacity: 0;
  margin-top: 0;
  overflow: hidden;
  transition: max-height 0.6s ease, opacity 0.6s ease, margin-top 0.6s ease;
}

.card:hover .content,
.card.active .content {
  max-height: 300px;
  opacity: 1;
  margin-top: 10px;
}

.card h2 {
  margin: 0;
  font-size: 20px;
  color: #111;
}

/* Botón "Volver" con la misma estética de las tarjetas */
.back-btn {
  background: #fff;
  border-radius: 10px;
  padding: 15px;
  cursor: pointer;
  text-align: center;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  margin-top: 20px;
}

.back-btn:hover {
  transform: translateY(-5px);
  box-shadow: 0 10px 20px rgba(0, 0, 0, 0.1);
}

/* Que no muestre contenido desplegable */
.back-btn .content {
  display: none;
}
@media (max-width: 768px) {
  /* Layout: apilado y panel derecho expandible */
  .container {
    flex-direction: row;
    flex-wrap: nowrap;
  }

  /* Estados inicial y expandido */
  .container:not(.expanded) .left-panel {
    width: 100%;
    display: flex;
  }

  .container:not(.expanded) .right-panel {
    width: 0;
    padding: 0;
    overflow: hidden;
  }

  .container.expanded .left-panel {
    display: none;
  }

  .container.expanded .right-panel {
    width: 100%;
    padding: 30px 20px;
    overflow-y: auto;
  }

  /* Avatar y tooltip (igual que escritorio) */
  .avatar {
    width: 200px;
    height: 200px;
    border-radius: 100%;
    object-fit: cover;
    margin-bottom: 20px;
    border: 3px solid #e2c74f;
  }

  .avatar-wrapper {
    position: relative;
    display: inline-block;
    cursor: pointer;
  }

  .tooltip {
    visibility: hidden;
    background-color: #e2c74f;
    color: #111;
    text-align: center;
    border-radius: 6px;
    padding: 6px 10px;
    position: absolute;
    bottom: 105%;
    left: 50%;
    transform: translateX(-50%);
    opacity: 0;
    transition: opacity 0.3s;
    font-size: 14px;
    white-space: nowrap;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
    z-index: 1;
  }

  .avatar-wrapper:hover .tooltip {
    visibility: visible;
    opacity: 1;
  }

  /* Textos */
  .left-panel h1 {
    font-size: 20px;
  }

  .card h2 {
    font-size: 18px;
    display: flex;
    align-items: center;
    gap: 8px;
  }

  .card h2 .icon {
    flex-shrink: 0;
    font-size: 1.2em;
    line-height: 1;
  }

  .social-buttons {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    justify-content: center;
  }

  .card {
    padding: 15px;
  }

  /* Tarjetas colapsadas con animación */
  .card .content {
    max-height: 0;
    opacity: 0;
    margin-top: 0;
    overflow: hidden;
    transition: max-height 0.6s ease,
                opacity 0.6s ease,
                margin-top 0.6s ease;
  }

  .card.active .content {
    max-height: 2000px; /* ya no se corta */
    opacity: 1;
    margin-top: 10px;
  }
}
