/* Estilo base para acordeones */
body {
  font-family: "Nunito Sans", sans-serif;
}

details summary {
  cursor: pointer;
  position: relative;
  padding: 0.6em 0.8em;
  background-color: #f8f9fa;
  border: 1px solid #ccc;
  border-radius: 6px;
  margin-top: 10px;
  font-weight: bold;
  transition: background-color 0.3s ease;
  list-style: none;
}

details summary:hover {
  background-color: #e9f5ff;
}

/* Símbolo "+" por defecto (cerrado) */
details summary::after {
  content: "+";
  position: absolute;
  right: 15px;
  font-size: 1.2em;
  color: #0077b6;
}

/* Símbolo "−" cuando está abierto */
details[open] summary::after {
  content: "−";
}

/* Estilo para acordeones internos */
details details summary {
  margin-left: 15px;
  background-color: #ffffff;
  border-left: 3px solid #0077b6;
  border-radius: 0;
  border-right: none;
  border-top: none;
  border-bottom: none;
  padding-left: 10px;
  font-size: 0.95em;
}

details details summary::after {
  content: "+";
  right: 10px;
  font-size: 1em;
}

details details[open] summary::after {
  content: "−";
}

/* Skills and Traits */
.pyramid-container {
  max-width: 1100px;
  margin: 2rem auto;
  padding: 0 1rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2rem;
}

.base-cards {
  display: flex;
  gap: 2rem;
  flex-wrap: wrap;
  justify-content: center;
}

.card-skill {
  background: #f7f7f7;
  padding: 1.5rem;
  border-radius: 1rem;
  width: 280px;
  box-shadow: 0 0 10px rgba(0, 0, 0, 0.1);
}

.card-title {
  color: #3f3fc3;
  margin-bottom: 1rem;
  text-align: center;
}

@media screen and (max-width: 640px) {
  .base-cards {
    flex-direction: column;
    align-items: center;
  }
}

.project-grid {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-start;
  align-items: stretch;
  gap: 2rem;
  margin: 2rem auto;
  max-width: 1400px;
  padding: 0 1rem;
}

/* Project cards */
.project-section {
  width: 100vw;
  margin-left: calc(-50vw + 50%);
  max-width: 100vw;
}

.project-grid {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-start;
  gap: 2rem;
  padding: 2rem;
}

.project-card {
  background: #f7f7f7;
  border-radius: 1rem;
  padding: 1.5rem;
  flex: 1 1 calc(33.333% - 2rem); /* tres columnas */
  min-width: 280px;
  max-width: 420px;
  box-shadow: 0 0 10px rgba(0, 0, 0, 0.1);
  box-sizing: border-box;

  display: flex;
  flex-direction: column;
  height: 100%;
}

@media screen and (max-width: 1000px) {
  .project-card {
    flex: 1 1 calc(50% - 2rem); /* dos columnas */
  }
}

@media screen and (max-width: 640px) {
  .project-card {
    flex: 1 1 100%; /* una columna */
  }
}

.project-card h3 {
  color: #3f3fc3;
  margin-bottom: 0.5rem;
}

.project-card .tags {
  margin-top: 1rem;
}

.project-card .tags span {
  background-color: #e0e0e0;
  color: #333;
  padding: 0.2rem 0.6rem;
  border-radius: 0.5rem;
  font-size: 0.8rem;
  margin-right: 0.3rem;
  display: inline-block;
  margin-bottom: 0.3rem;
}

.project-card .btn {
  display: inline-block;
  margin-top: 1rem;
  padding: 0.5rem 1.5rem;
  background-color: #3f3fc3;
  color: white;
  border-radius: 0.5rem;
  text-decoration: none;
  text-align: center;

  /* 🔥 centrado horizontal */
  align-self: flex-start;
}

.project-card .btn:hover {
  background-color: #2f2fa2;
}

@media screen and (max-width: 900px) {
  .project-card {
    width: 100%;
  }
}



/* Gallery modal */
.gallery-modal {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background: rgba(0,0,0,0.9);
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  align-items: center;
  overflow-y: auto; /* permite scroll vertical */
  gap: 1rem;
  padding: 4rem 2rem 2rem; /* deja espacio para el botón de cierre */
  z-index: 9999;
}

.gallery-modal img {
  max-width: 90%;
  margin-bottom: 1rem;
  border-radius: 10px;
  box-shadow: 0 0 10px #000;
}

.close-gallery {
  position: fixed; /* para que siempre sea visible */
  top: 1rem;
  right: 1.5rem;
  font-size: 2.5rem;
  color: white;
  cursor: pointer;
  z-index: 10000;
}


/* Video modal */
.video-modal {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0,0,0,0.85);
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 999;
}

.video-content {
  position: relative;
  width: 90%;
  max-width: 720px;
  background: #000;
  padding: 1rem;
  border-radius: 1rem;
}

.video-content iframe {
  width: 100%;
  height: 400px;
  border: none;
  border-radius: 0.5rem;
}

.close-video {
  position: absolute;
  top: -0.5rem;
  right: -0.5rem;
  font-size: 2rem;
  color: white;
  cursor: pointer;
}

/* Hide class */
.hidden {
  display: none;
}

