/* Estilos para el componente Work (sección de trabajos) */

/* Variables para categorías - Las definimos aquí para asegurar disponibilidad */
/* Estas variables son utilizadas para los colores de las etiquetas de categorías */
:root {
  /* Variables para categoría juego */
  --juego-fondo: var(--accent-color);
  --juego-texto: var(--text-light);
  --juego-borde: var(--primary-dark);
  
  /* Variables para categoría tienda */
  --tienda-fondo: var(--accent-secondary);
  --tienda-texto: var(--text-dark);
  --tienda-borde: var(--primary-dark);
  
  /* Variables para categoría web */
  --web-fondo: var(--primary-color);
  --web-texto: var(--text-light);
  --web-borde: var(--primary-dark);
  
  /* Variables para categoría design */
  --design-fondo: var(--accent-tertiary);
  --design-texto: var(--text-dark);
  --design-borde: var(--primary-dark);
}

/* Estructura principal */
.work-section {
  padding: 80px 0;
  background-color: var(--background-main);
  position: relative;
}

.work-section::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-image: url('../../img/pattern-bg.png');
  background-size: cover;
  opacity: 0.1;
  z-index: 0;
}

.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px;
  position: relative;
  z-index: 1;
}

/* Encabezado de sección */
.section-header {
  text-align: center;
  margin-bottom: 40px;
}

.section-header h2.titulo-pixel {
  font-family: 'Press Start 2P', cursive;
  font-size: 28px;
  display: inline-block;
  padding-bottom: 10px;
  margin-bottom: 0;
  position: relative;
  letter-spacing: 1px;
  color: var(--primary-color);
  text-shadow: 3px 3px 0 rgba(0,0,0,0.2);
}

.subheader-line {
  height: 4px;
  width: 80px;
  background-color: var(--accent-color);
  margin: 15px auto 0;
}

/* Texto introductorio */
.work-intro {
  max-width: 800px;
  margin: 0 auto 60px;
  text-align: center;
  color: var(--text-dark);
}

.work-intro p {
  font-size: 1.1rem;
  line-height: 1.8;
  margin-bottom: 1.5rem;
}

/* Grid de proyectos */
.work-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 30px;
  margin-bottom: 50px;
}

/* Tarjetas de trabajo */
.work-card {
  background-color: var(--background-light);
  border: 3px solid var(--primary-dark);
  overflow: hidden;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  box-shadow: 5px 5px 0 rgba(0, 0, 0, 0.2);
  height: 100%;
  display: flex;
  flex-direction: column;
}

.work-card:hover {
  transform: translateY(-8px);
  box-shadow: 8px 8px 0 rgba(0, 0, 0, 0.2);
}

.work-card-image {
  position: relative;
  overflow: hidden;
  padding-top: 56.25%; /* 16:9 aspect ratio */
  border-bottom: 3px solid var(--primary-dark);
}

.work-card-image img {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.5s ease;
}

.work-card:hover .work-card-image img {
  transform: scale(1.1);
}

.work-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.5);
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transition: opacity 0.3s ease;
}

.work-card:hover .work-overlay {
  opacity: 1;
}

.view-project-btn {
  padding: 10px 20px;
  background-color: var(--accent-color);
  color: var(--text-light);
  border: 2px solid var(--primary-dark);
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
  font-family: 'Press Start 2P', cursive;
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 1px;
  box-shadow: 3px 3px 0 rgba(0, 0, 0, 0.2);
}

.view-project-btn:hover {
  background-color: var(--primary-color);
  transform: scale(1.05) translateY(-3px);
  box-shadow: 3px 6px 0 rgba(0, 0, 0, 0.2);
}

/* Contenido de tarjeta */
.work-card-content {
  padding: 25px;
  flex-grow: 1;
  display: flex;
  flex-direction: column;
}

.work-card-content h3 {
  margin: 0 0 5px;
  color: var(--primary-color);
  font-size: 1.4rem;
  font-weight: 700;
  font-family: 'Press Start 2P', cursive;
}

.work-card-content h4 {
  margin: 0 0 15px;
  color: var(--text-dark);
  font-size: 1.1rem;
  font-weight: 600;
}

.work-card-content p {
  margin: 0 0 20px;
  color: var(--text-muted);
  line-height: 1.6;
  flex-grow: 1;
}

/* Etiquetas */
.work-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: auto;
}

.w3-tag {
  padding: 4px 10px;
  font-size: 10px;
  font-weight: bold;
  transition: transform 0.2s ease;
  font-family: 'Press Start 2P', cursive;
  box-shadow: 2px 2px 0 rgba(0, 0, 0, 0.2);
}

.tag-juego {
  background-color: var(--juego-fondo);
  color: var(--juego-texto);
  border: 2px solid var(--juego-borde);
}

.tag-tienda {
  background-color: var(--tienda-fondo);
  color: var(--tienda-texto);
  border: 2px solid var(--tienda-borde);
}

.tag-web {
  background-color: var(--web-fondo);
  color: var(--web-texto);
  border: 2px solid var(--web-borde);
}

.tag-design {
  background-color: var(--design-fondo);
  color: var(--design-texto);
  border: 2px solid var(--design-borde);
}

.w3-tag:hover {
  transform: translateY(-3px) rotate(-3deg);
  box-shadow: 2px 4px 0 rgba(0, 0, 0, 0.2);
}

/* Filtros de categoría */
.work-filters {
  display: flex;
  justify-content: center;
  margin-bottom: 40px;
  flex-wrap: wrap;
  gap: 15px;
}

.filter-btn {
  padding: 8px 16px;
  background-color: transparent;
  border: 2px solid var(--primary-color);
  color: var(--primary-color);
  cursor: pointer;
  transition: all 0.3s ease;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  font-size: 0.9rem;
  font-family: 'Press Start 2P', cursive;
  box-shadow: 3px 3px 0 rgba(0, 0, 0, 0.1);
}

.filter-btn:hover, .filter-btn.active {
  background-color: var(--primary-color);
  color: var(--text-light);
  transform: translateY(-3px);
  box-shadow: 3px 6px 0 rgba(0, 0, 0, 0.1);
}

/* Modal de proyecto */
.project-modal {
  display: none;
  position: fixed;
  z-index: 1000;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  overflow: auto;
  background-color: rgba(0, 0, 0, 0.8);
  backdrop-filter: blur(5px);
}

.modal-content {
  background-color: var(--background-main);
  margin: 5% auto;
  width: 90%;
  max-width: 1000px;
  animation: modalFadeIn 0.3s ease-out;
  max-height: 90vh;
  overflow-y: auto;
  border: 4px solid var(--primary-dark);
  box-shadow: 8px 8px 0 rgba(0, 0, 0, 0.2);
}

.close-modal {
  color: var(--text-dark);
  float: right;
  font-size: 28px;
  font-weight: bold;
  padding: 15px;
  cursor: pointer;
  transition: all 0.3s ease;
}

.close-modal:hover {
  color: var(--accent-color);
  transform: rotate(90deg);
}

.modal-body {
  padding: 30px;
}

.modal-body img {
  width: 100%;
  height: auto;
  margin-bottom: 20px;
  border: 3px solid var(--primary-dark);
  box-shadow: 5px 5px 0 rgba(0, 0, 0, 0.2);
}

.modal-body h2 {
  color: var(--primary-color);
  margin-bottom: 15px;
  font-size: 2rem;
  font-family: 'Press Start 2P', cursive;
  text-shadow: 3px 3px 0 rgba(0, 0, 0, 0.1);
}

.modal-body p {
  line-height: 1.8;
  margin-bottom: 15px;
  color: var(--text-dark);
}

/* Animaciones */
@keyframes modalFadeIn {
  from {
    opacity: 0;
    transform: translateY(-50px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Estilos para el botón de "Ver todos los proyectos" */
.view-all-btn-container {
  text-align: center;
  margin-top: 40px;
}

.view-all-btn {
  padding: 12px 30px;
  background-color: var(--accent-color);
  color: var(--text-light);
  border: 3px solid var(--primary-dark);
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
  font-size: 1rem;
  letter-spacing: 1px;
  box-shadow: 5px 5px 0 rgba(0, 0, 0, 0.2);
  font-family: 'Press Start 2P', cursive;
}

.view-all-btn:hover {
  background-color: var(--primary-color);
  transform: translateY(-3px);
  box-shadow: 5px 8px 0 rgba(0, 0, 0, 0.2);
}

/* Responsividad */
@media (max-width: 768px) {
  .work-grid {
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 20px;
  }
  
  .work-card-content {
    padding: 20px;
  }
  
  .work-card-content h3 {
    font-size: 1.2rem;
  }
  
  .work-card-content h4 {
    font-size: 1rem;
  }
  
  .modal-content {
    width: 95%;
    margin: 10% auto;
  }
  
  .filter-btn {
    font-size: 0.7rem;
    padding: 6px 12px;
  }
}

@media (max-width: 480px) {
  .work-grid {
    grid-template-columns: 1fr;
  }
  
  .filter-btn {
    font-size: 0.6rem;
    padding: 5px 10px;
  }
} 