/* ══════════════════════════════════════════════════
   Estructura:
   1. Hero de la página
   2. Filtros
   3. Grilla de proyectos
   4. Cards con efecto hover overlay
   5. Estado vacío
   6. CTA final
   7. Responsive
══════════════════════════════════════════════════ */


/* ──────────────────────────────────────────────────
   1. HERO DE LA PÁGINA
────────────────────────────────────────────────── */

.page-hero {
  padding: 160px 60px 80px;
  position: relative;
  overflow: hidden;
}

.page-hero-bg {
  position: absolute;
  border-radius: 50%;
  filter: blur(120px);
  pointer-events: none;
}

.page-hero-bg.b1 {
  width: 600px; height: 600px;
  background: rgba(139,92,246,0.15);
  top: -200px; right: -100px;
}

.page-hero-bg.b2 {
  width: 400px; height: 400px;
  background: rgba(0,229,255,0.08);
  bottom: -100px; left: 100px;
}

.page-hero-inner {
  position: relative;
  max-width: 700px;
}

.page-title {
  font-family: 'Bebas Neue', sans-serif;
  font-size: clamp(3.5rem, 7vw, 7rem);
  line-height: .92;
  letter-spacing: .01em;
  margin-bottom: 20px;
}

.page-title span {
  background: linear-gradient(90deg, var(--purple), var(--cyan));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.page-subtitle {
  color: rgba(255,255,255,0.45);
  font-size: 1rem;
  line-height: 1.7;
  max-width: 480px;
}

.project-count {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  margin-top: 32px;
  padding: 10px 20px;
  border: 1px solid rgba(255,255,255,0.1);
  border-radius: 100px;
  font-family: 'Syne', sans-serif;
  font-size: .78rem;
  color: rgba(255,255,255,0.5);
  letter-spacing: .08em;
}

.project-count strong {
  color: var(--yellow);
  font-size: 1rem;
}


/* ──────────────────────────────────────────────────
   2. FILTROS
────────────────────────────────────────────────── */

.filtros-wrapper {
  padding: 0 60px 60px;
}

.filtros {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.filtro-btn {
  padding: 10px 22px;
  border-radius: 100px;
  border: 1.5px solid rgba(255,255,255,0.12);
  background: transparent;
  color: rgba(255,255,255,0.5);
  font-family: 'Syne', sans-serif;
  font-size: .75rem;
  letter-spacing: .1em;
  text-transform: uppercase;
  cursor: pointer;
  transition: all .25s ease;
}

.filtro-btn:hover {
  border-color: rgba(255,255,255,0.35);
  color: var(--white);
}

.filtro-btn.active {
  background: var(--white);
  border-color: var(--white);
  color: #000;
}


/* ──────────────────────────────────────────────────
   3. GRILLA DE PROYECTOS
────────────────────────────────────────────────── */

.proyectos-page-grid {
  padding: 0 60px 120px;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 14px;
}


/* ──────────────────────────────────────────────────
   4. CARDS CON EFECTO HOVER OVERLAY
   ─────────────────────────────────────────────────
   Estructura de cada card:
   <div class="pcard">
     <div class="pcard-img">       ← imagen de fondo
     <div class="pcard-overlay">   ← info que aparece al hover
       <div class="pcard-overlay-top">    ← tag + año
       <div class="pcard-overlay-bottom"> ← título + flecha
────────────────────────────────────────────────── */

.pcard {
  border-radius: 20px;
  overflow: hidden;
  position: relative;  /* necesario para que el overlay se posicione encima */
  cursor: pointer;
  background: var(--bg3);
}

/* card oculta al filtrar */
.pcard.hidden {
  display: none;
}

/* animación de entrada al filtrar */
.pcard.fade-in {
  animation: cardIn .4s ease forwards;
}

@keyframes cardIn {
  from { opacity: 0; transform: translateY(20px) scale(.97); }
  to   { opacity: 1; transform: translateY(0) scale(1); }
}

/* card destacada: ocupa 2 columnas */
.pcard.featured {
  grid-column: span 3;
}

/* ── imagen de fondo ── */
.pcard-img {
  width: 100%;
  aspect-ratio: 4/3;
  overflow: hidden;
  display: block;
}

.pcard.featured .pcard-img {
  aspect-ratio: 16/9;
}

.pcard-img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  display: block;
  transition: transform .5s ease;
}

/* zoom de la imagen al hacer hover en la card */
.pcard:hover .pcard-img img {
  transform: scale(1.06);
}

/* placeholder emoji cuando no hay imagen */
.pcard-img .placeholder {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 3.5rem;
  transition: transform .5s ease;
}

.pcard:hover .pcard-img .placeholder {
  transform: scale(1.06);
}

/* ── overlay: empieza invisible, aparece al hover ── */
.pcard-overlay {
  position: absolute;   /* se superpone sobre la imagen */
  inset: 0;             /* ocupa todo el espacio de la card */
  background: linear-gradient(
    to bottom,
    rgba(0,0,0,0.15) 0%,    /* casi transparente arriba */
    rgba(0,0,0,0.85) 100%   /* oscuro abajo */
  );
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: 20px;
  opacity: 0;             /* invisible por defecto */
  transition: opacity .3s ease;
}

/* al hacer hover en la card, el overlay aparece */
.pcard:hover .pcard-overlay {
  opacity: 1;
}

/* parte superior del overlay: tag + año */
.pcard-overlay-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  transform: translateY(-8px);   /* empieza un poco arriba */
  transition: transform .3s ease;
}

.pcard:hover .pcard-overlay-top {
  transform: translateY(0);       /* baja a su posición al hover */
}

/* parte inferior del overlay: título + flecha */
.pcard-overlay-bottom {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  transform: translateY(8px);    /* empieza un poco abajo */
  transition: transform .3s ease;
}

.pcard:hover .pcard-overlay-bottom {
  transform: translateY(0);       /* sube a su posición al hover */
}

/* tag de categoría */
.pcard-tag {
  font-family: 'Syne', sans-serif;
  font-size: .65rem;
  letter-spacing: .18em;
  text-transform: uppercase;
  padding: 4px 12px;
  border-radius: 100px;
  border: 1px solid rgba(255,255,255,0.2);
  color: rgba(255,255,255,0.7);
  backdrop-filter: blur(8px);
  background: rgba(0,0,0,0.3);
}

/* colores por categoría */
.pcard-tag.branding { border-color: rgba(139,92,246,0.6); color: var(--purple); }
.pcard-tag.ux       { border-color: rgba(0,229,255,0.5);  color: var(--cyan); }
.pcard-tag.web      { border-color: rgba(245,197,24,0.5); color: var(--yellow); }
.pcard-tag.redes    { border-color: rgba(224,64,251,0.5); color: var(--magenta); }

.pcard-year {
  font-size: 1.1rem;
  color: rgba(255,255,255,0.4);
  font-family: 'Syne', sans-serif;
}

/* título del proyecto */
.pcard-title {
  font-family: 'Bebas Neue', sans-serif;
  font-size: 1.6rem;
  letter-spacing: .04em;
  line-height: 1;
  color: var(--white);
}

/* flecha */
.pcard-arrow {
  width: 38px; height: 38px;
  border-radius: 50%;
  background: var(--yellow);
  color: #000;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: .9rem;
  flex-shrink: 0;
  transform: rotate(0deg);
  transition: transform .3s ease;
}

.pcard:hover .pcard-arrow {
  transform: rotate(45deg);  /* rota al hacer hover */
}

/* ── SECCIÓN INVITACIONES ── */
.invitaciones-seccion {
  padding: 0 60px 80px;
}

.invitaciones-seccion .section-eyebrow {
  margin-bottom: 24px;
}

.invitaciones-grid {
  display: grid;
  grid-template-columns: repeat(5, 1fr);  /* más columnas porque son angostas */
  gap: 16px;
}

.pcard.vertical .pcard-img {
  aspect-ratio: 9/16;
}

.pcard-tag.invitaciones {
  border-color: rgba(245,197,24,0.5);
  color: var(--yellow);
}

/* responsive */
@media (max-width: 1100px) {
  .invitaciones-grid { grid-template-columns: repeat(3, 1fr); }
  .invitaciones-seccion { padding: 0 30px 60px; }
}

@media (max-width: 768px) {
  .invitaciones-grid { grid-template-columns: repeat(2, 1fr); }
  .invitaciones-seccion { padding: 0 20px 60px; }
}

/* ──────────────────────────────────────────────────
   5. ESTADO VACÍO
────────────────────────────────────────────────── */

.empty-state {
  grid-column: 1 / -1;
  text-align: center;
  padding: 80px 20px;
  display: none;
}

.empty-state.visible {
  display: block;
}

.empty-state p {
  font-family: 'Syne', sans-serif;
  font-size: 1.1rem;
  color: rgba(255,255,255,0.25);
}


/* ──────────────────────────────────────────────────
   6. CTA FINAL
────────────────────────────────────────────────── */

.page-cta {
  margin: 0 24px 80px;
  background: var(--bg2);
  border-radius: 24px;
  padding: 70px 80px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 40px;
  position: relative;
  overflow: hidden;
}

.page-cta::before {
  content: '';
  position: absolute;
  width: 400px; height: 400px;
  background: rgba(139,92,246,0.12);
  border-radius: 50%;
  filter: blur(100px);
  right: -100px; top: -100px;
  pointer-events: none;
}

.page-cta-text { position: relative; }

.page-cta-title {
  font-family: 'Bebas Neue', sans-serif;
  font-size: clamp(2rem, 3vw, 3rem);
  line-height: 1;
  margin-bottom: 10px;
}

.page-cta-title span { color: var(--cyan); }

.page-cta-sub {
  color: rgba(255,255,255,0.4);
  font-size: .9rem;
  max-width: 400px;
  line-height: 1.6;
}

.page-cta-action {
  position: relative;
  flex-shrink: 0;
}

.btn-volver {
  background: var(--yellow);
  color: #000;
  border: none;
  border-radius: 8px;
  padding: 14px 28px;
  font-family: 'Syne', sans-serif;
  font-weight: 700;
  font-size: .85rem;
  letter-spacing: .08em;
  text-transform: uppercase;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 8px;
  transition: transform .2s, opacity .2s;
}

.btn-volver:hover {
  transform: translateY(-2px);
  opacity: .9;
}

.volver-wrapper {
  display: flex;
  justify-content: center;
  padding: 40px 0;
}

.pcard-tools {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
}

.tool-badge {
  font-size: .62rem;
  font-family: 'Syne', sans-serif;
  letter-spacing: .08em;
  padding: 4px 10px;
  border-radius: 100px;
  background: rgba(255,255,255,0.15);
  color: rgba(255,255,255,0.8);
  backdrop-filter: blur(8px);
}

/* ──────────────────────────────────────────────────
   7. RESPONSIVE
────────────────────────────────────────────────── */

@media (max-width: 1100px) {
  .proyectos-page-grid { grid-template-columns: repeat(2, 1fr); padding: 0 30px 80px; }
  .pcard.featured      { grid-column: span 2; }
  .page-hero           { padding: 140px 30px 60px; }
  .filtros-wrapper     { padding: 0 30px 40px; }
  .page-cta            { margin: 0 10px 60px; padding: 50px 40px; flex-direction: column; align-items: flex-start; }
}

@media (max-width: 768px) {
  .proyectos-page-grid       { grid-template-columns: 1fr; padding: 0 20px 60px; }
  .pcard.featured            { grid-column: span 1; }
  .pcard.featured .pcard-img { aspect-ratio: 4/3; }
  .page-hero                 { padding: 110px 20px 40px; }
  .filtros-wrapper           { padding: 0 20px 32px; }
  .page-cta                  { margin: 0; border-radius: 0; padding: 50px 20px; }
  .page-title                { font-size: 3rem; }

 
  /* en mobile el overlay se activa con la clase .active (JS) */
.pcard.card-active .pcard-overlay             { opacity: 1; }
.pcard.card-active .pcard-overlay-top,
.pcard.card-active .pcard-overlay-bottom      { transform: translateY(0); }
}

