:root {
  --bg-color: #0f0f0f;
  --text-color: #fff;
  --accent-color: #2a2a2a;
  --hover-color: #363636;
  --highlight-color: #525252;
  --transition-time: 0.5s;
}

/* Contenedor base (opcional si lo usas) */
.portfolio-container {
  width: 100%;
  height: 660px;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  position: relative;
}

/* Header (si lo necesitas en algún layout) */
.accordion .header {
  padding: 1.5rem 0;
  text-align: center;
  position: relative;
  z-index: 10;
}
.accordion .header h1 {
  font-size: 1.8rem;
  font-weight: 700;
  letter-spacing: -0.03em;
  margin-bottom: 0.5rem;
  position: relative;
  display: inline-block;
}
.accordion .header h1::after {
  content: '';
  position: absolute;
  width: 40px;
  height: 3px;
  background-color: var(--highlight-color);
  bottom: -8px;
  left: 50%;
  transform: translateX(-50%);
  transition: width 0.5s ease;
}
.accordion .header:hover h1::after { width: 100%; }
.accordion .header p {
  font-size: 0.85rem;
  opacity: 0.7;
  max-width: 80%;
  margin: 1rem auto 0;
  line-height: 1.5;
}

/* Acordeón base (4 elementos) */
.accordion {
  display: flex;
  width: 100%;
  height: 460px;
  margin-top: 1rem;
}

.accordion-section {
  position: relative;
  flex: 1;
  overflow: hidden;
  transition: flex var(--transition-time) cubic-bezier(0.25, 1, 0.5, 1);
  background-color: var(--accent-color);
  border-radius: 8px;
  margin: 0 4px;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
  display: flex;
  align-items: center;
}

.accordion-section:first-child { margin-left: 0; }
.accordion-section:last-child  { margin-right: 0; }

.accordion-section:hover {
  flex: 6;
  background-color: var(--hover-color);
}

.accordion-section:hover .section-content {
  opacity: 1;
  transform: translateY(0);
}

.accordion-section:hover .title-vertical {
  opacity: 0;
}

.accordion-section:hover .project-img {
  opacity: 1;
  transform: scale(1.05);
}

.accordion-section:hover .project-tags span {
  opacity: 1;
  transform: translateY(0);
}

.project-img {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100% !important;
  object-fit: cover;
  opacity: 1;
  transition: all var(--transition-time) ease;
  transform: scale(1.2);
}

.title-vertical {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  white-space: nowrap;
  font-size: 1.2rem;
  font-weight: 600;
  letter-spacing: 1px;
  opacity: 1;
  transition: opacity var(--transition-time) ease;
  text-transform: uppercase;
  width: 80px;
}

.accordion .section-content {
  padding: 1.5rem;
  width: 100%;
  z-index: 2;
  opacity: 0;
  transform: translateY(20px);
  transition: all var(--transition-time) ease;
  transition-delay: 0.1s;
  background: linear-gradient(180deg, rgba(0,0,0,0) 0%, rgba(0,0,0,0.30) 30%, rgba(0,0,0,0.30) 70%, rgba(0,0,0,0) 100%);
  height: 100%;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: start;
}

.icon-content{
  width: 40px;
  height: auto;
}

.accordion .section-title {
  font-size: 1.6rem;
  font-weight: 700;
  margin-bottom: 0.5rem;
  position: relative;
  display: inline-block;
  color: #fff;
}

.accordion .section-description {
  font-size: 1.1rem !important;
  line-height: 1.5;
  margin-bottom: 1rem;
  opacity: 0.9;
  color: #fff !important;
}

.project-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 1rem;
  color: #fff;
}

.project-tags span {
  font-size: 0.7rem;
  padding: 4px 10px;
  background-color: rgba(255, 255, 255, 0.1);
  border-radius: 20px;
  opacity: 0;
  transform: translateY(10px);
  transition: all 0.3s ease;
}

.project-tags span:nth-child(1) { transition-delay: 0.1s; }
.project-tags span:nth-child(2) { transition-delay: 0.15s; }
.project-tags span:nth-child(3) { transition-delay: 0.2s; }
.project-tags span:nth-child(4) { transition-delay: 0.25s; }

.accordion .view-button {
  display: inline-block;
  font-size: 0.95rem;
  text-transform: uppercase;
  letter-spacing: 1px;
  padding: 8px 16px;
  background-color: transparent;
  border: 1px solid var(--text-color);
  color: var(--text-color);
  cursor: pointer;
  transition: all 0.3s ease;
  text-decoration: none;
  position: relative;
  overflow: hidden;
}
.accordion .view-button::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background-color: var(--text-color);
  transition: all 0.3s ease;
  z-index: -1;
}
.accordion .view-button:hover { color: var(--bg-color); }
.accordion .view-button:hover::before { left: 0; }

/* Cursor flotante (opcional; solo estilos) */
.floating-cursor {
  width: 30px;
  height: 30px;
  border-radius: 50%;
  border: 1px solid var(--highlight-color);
  position: fixed;
  pointer-events: none;
  transform: translate(-50%, -50%);
  z-index: 999;
  transition: transform 0.1s ease, width 0.3s ease, height 0.3s ease, border-color 0.3s ease;
  mix-blend-mode: difference;
}
.floating-cursor.active {
  width: 60px;
  height: 60px;
  border-color: var(--text-color);
}

/* Variante 2 elementos */
.accordion-2 {
  height: 280px;
  margin-top: 0;
}
.accordion-2 .portfolio-container {
  height: 300px;
}

/* Responsive */
@media (max-width: 700px) {
  .portfolio-container { width: 100%; height: auto; }
  .accordion { flex-direction: column; height: auto; }
  .accordion-section {
    height: 250px;
    margin: 4px 0;
    align-items: center;
    justify-content: center;
    flex: unset !important;
  }
  .accordion-section:hover { height: 240px; }
  .title-vertical {
    transform: translate(-50%, -50%) rotate(0);
    opacity: 0;
  }
  .header h1 { font-size: 1.5rem; }
  .section-content {
    padding: 1rem !important;
    opacity: 1 !important;
    transform: unset !important;
    background: rgba(0,0,0,0.40) !important;
  }
  .section-title { font-size: 1.5rem; }
  .section-description {
    font-size: 1rem;
    max-height: 100px;
    overflow-y: auto;
  }
}
