/* ================================
   PROJECT-DETAIL.CSS
   Project Hero, Content, Sidebar, Visual Resources
   ================================ */

/* ================================
   PROJECT HERO CON BANNER
   ================================ */
.project-hero {
  position: relative;
  min-height: 40vh;
  display: flex;
  align-items: center;
  padding: 4rem 0 3rem;
  overflow: hidden;
}

.project-hero__banner {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  z-index: 0;
  transform: scale(1.1);
  transition: transform 0.1s linear;
  animation: bannerZoomIn 1.2s ease-out forwards;
}

@keyframes bannerZoomIn {
  from {
    transform: scale(1.2);
    opacity: 0;
  }
  to {
    transform: scale(1.1);
    opacity: 1;
  }
}

.project-hero.scrolled .project-hero__banner {
  transform: scale(1) translateY(20px);
}

/* Overlays por categoría */
.project-hero::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 1;
  pointer-events: none;
}

body[data-category="frontend"] .project-hero::before {
  background: linear-gradient(
    135deg,
    rgba(91, 44, 111, 0.92) 0%,
    rgba(20, 184, 166, 0.85) 100%
  );
}

body[data-category="lumi"] .project-hero::before {
  background: linear-gradient(
    135deg,
    rgba(38, 198, 218, 0.92) 0%,
    rgba(236, 64, 122, 0.88) 100%
  );
}

body[data-category="ux-ui"] .project-hero::before {
  background: linear-gradient(
    135deg,
    rgba(59, 130, 246, 0.92) 0%,
    rgba(6, 182, 212, 0.85) 100%
  );
}

body[data-category="service-design"] .project-hero::before {
  background: linear-gradient(
    135deg,
    rgba(99, 102, 241, 0.92) 0%,
    rgba(71, 85, 105, 0.88) 100%
  );
}

.project-hero .container {
  position: relative;
  z-index: 2;
}

.project-hero__content-wrapper {
  max-width: 900px;
  margin-top: 2rem;
  position: relative;
  z-index: 2;
}

.project-hero__title {
  color: white;
  text-shadow: 0 2px 4px rgba(0, 0, 0, 0.5), 0 4px 8px rgba(0, 0, 0, 0.4),
    0 8px 16px rgba(0, 0, 0, 0.3), 0 16px 32px rgba(0, 0, 0, 0.2);
  margin-bottom: 1.5rem;
  font-weight: 900;
}

.project-hero__description {
  color: white;
  font-size: 1.25rem;
  line-height: 1.7;
  text-shadow: 0 2px 4px rgba(0, 0, 0, 0.6), 0 4px 8px rgba(0, 0, 0, 0.4),
    0 8px 16px rgba(0, 0, 0, 0.3);
  margin-bottom: 2rem;
  font-weight: 500;
}

.project-hero__badges {
  display: flex;
  gap: 0.75rem;
  flex-wrap: wrap;
  margin-bottom: 2rem;
}

.project-hero__badges .badge {
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(10px);
  border: 2px solid white;
  color: var(--slate-900);
  font-weight: 600;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.3);
}

.project-hero__badges .badge i {
  color: var(--primary);
}

.project-hero__badges .badge--success {
  background: var(--success);
  color: white;
  border-color: var(--success);
}

.project-hero__badges .badge--success i {
  color: white;
}

.project-hero__badges .badge--warning {
  background: var(--warning);
  color: var(--slate-900);
  border-color: var(--warning);
}

.project-hero__badges .badge--info {
  background: var(--info);
  color: white;
  border-color: var(--info);
}

/* Back Link */
.back-link {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  color: white;
  font-weight: 700;
  font-size: 0.9375rem;
  padding: 0.75rem 1.5rem;
  margin-bottom: 2rem;
  background: rgba(0, 0, 0, 0.3);
  backdrop-filter: blur(10px);
  border-radius: var(--radius-full);
  border: 2px solid rgba(255, 255, 255, 0.3);
  transition: all var(--transition-fast);
  text-shadow: 0 2px 4px rgba(0, 0, 0, 0.5);
}

.back-link:hover {
  transform: translateX(-4px);
  background: rgba(255, 255, 255, 0.95);
  color: var(--primary);
  border-color: white;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.3);
  text-shadow: none;
}

.back-link i {
  font-size: 1rem;
  transition: transform var(--transition-fast);
}

.back-link:hover i {
  transform: translateX(-4px);
}

/* ================================
   HERO SIMPLE (sin banner)
   ================================ */
.project-hero--simple {
  background: transparent;
  position: relative;
  overflow: visible;
  min-height: 40vh;
  display: flex;
  align-items: center;
  padding: 2rem 0 3rem;
}

.project-hero--simple::before,
.project-hero--simple::after {
  display: none;
}

.project-hero--simple .container {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
}

.project-hero--simple .section-header {
  max-width: 900px;
  margin: 0 auto;
  text-align: center;
  width: 100%;
}

.project-hero--simple .section-description {
  color: var(--slate-600) !important;
  font-size: 1.25rem;
  line-height: 1.6;
  margin-bottom: 0;
}

.project-hero--simple .back-link {
  color: var(--slate-700) !important;
  text-shadow: none;
  margin-bottom: 1.5rem;
  font-size: 0.875rem;
  padding: 0.5rem 1rem;
  align-self: flex-start;
  background: rgba(0, 0, 0, 0.05);
}

.project-hero--simple .back-link:hover {
  color: var(--primary) !important;
  background: rgba(91, 44, 111, 0.1);
}

/* ================================
   QUICK INFO BAR
   ================================ */
.project-quick-info {
  background: white;
  border-bottom: 1px solid var(--border);
  padding: 2rem 0;
}

.quick-info__grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 2rem;
}

.info-item {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.info-item i {
  font-size: 1.5rem;
  color: var(--primary);
}

.info-item__label {
  display: block;
  font-size: 0.75rem;
  color: var(--slate-400);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.03em;
}

.info-item__value {
  display: block;
  font-size: 1rem;
  color: var(--slate-900);
  font-weight: 700;
}

/* ================================
   CONTENT LAYOUT
   ================================ */
.project-content {
  padding: 5rem 0;
}

.content-layout {
  display: grid;
  grid-template-columns: 1fr 380px;
  gap: 3.75rem;
  align-items: start;
}

.main-content {
  max-width: 50rem;
}

/* ================================
   CONTENT BLOCKS
   ================================ */
.content-block {
  margin-bottom: 5rem;
}

.content-block:last-child {
  margin-bottom: 0;
}

.block-header {
  display: flex;
  align-items: center;
  gap: 1.25rem;
  margin-bottom: 2rem;
}

.block-header__icon {
  width: 56px;
  height: 56px;
  border-radius: var(--radius-lg);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
  color: white;
  flex-shrink: 0;
}

.block-header__icon--primary {
  background: var(--primary);
}

.block-header__icon--secondary {
  background: var(--secondary);
}

.block-header h2 {
  font-size: 1.75rem;
  margin: 0;
}

.block-content {
  background: white;
  padding: 2rem;
  border-radius: var(--radius-lg);
  border: 1px solid var(--border);
}

.block-content p {
  font-size: 1rem;
  color: var(--slate-500);
  line-height: 1.8;
  margin-bottom: 1.25rem;
}

.block-content p:last-child {
  margin-bottom: 0;
}

.block-content--quote {
  border-left: 3px solid var(--primary);
  padding-left: 1.5rem;
}

.block-content--quote p {
  font-size: 1.0625rem;
  font-style: italic;
  color: var(--slate-700);
}

.content-list {
  margin-top: 0.75rem;
  padding-left: 0;
  list-style: none;
}

.content-list li {
  padding-left: 1.5rem;
  position: relative;
  margin-bottom: 0.5rem;
  line-height: 1.6;
}

.content-list li::before {
  content: "→";
  position: absolute;
  left: 0;
  color: var(--primary);
  font-weight: 700;
}

/* ================================
   METRICS
   ================================ */
.metrics-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 1.25rem;
  margin-bottom: 2rem;
}

.metric-card {
  background: var(--bg-secondary);
  padding: 1.5rem;
  border-radius: var(--radius-lg);
  border: 1px solid var(--border);
  text-align: center;
  transition: all var(--transition-fast);
}

.metric-card:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}

.metric-card__value {
  font-size: 2.25rem;
  font-weight: 800;
  color: var(--primary);
  margin-bottom: 0.5rem;
  line-height: 1;
}

.metric-card__label {
  font-size: 0.875rem;
  color: var(--slate-500);
  font-weight: 600;
}

.checklist {
  list-style: none;
  padding: 0;
  margin-top: 1.5rem;
}

.checklist li {
  display: flex;
  gap: 0.75rem;
  margin-bottom: 0.75rem;
  align-items: flex-start;
}

.checklist i {
  color: var(--success);
  margin-top: 0.25rem;
  flex-shrink: 0;
}

/* ================================
   SIDEBAR
   ================================ */
.sidebar-sticky {
  position: sticky;
  top: 7.5rem;
}

.sidebar-card {
  background: white;
  border-radius: var(--radius-lg);
  padding: 1.75rem;
  border: 1px solid var(--border);
  margin-bottom: 1.25rem;
  transition: all var(--transition-fast);
}

.sidebar-card:hover {
  box-shadow: var(--shadow-md);
}

.sidebar-card h3 {
  font-size: 1.0625rem;
  font-weight: 700;
  margin-bottom: 1.25rem;
  color: var(--slate-900);
  display: flex;
  align-items: center;
  gap: 0.625rem;
}

.sidebar-card h3 i {
  color: var(--primary);
  font-size: 1.125rem;
}

.sidebar-card__list {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.sidebar-card__item {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding-bottom: 1rem;
  border-bottom: 1px solid var(--border);
}

.sidebar-card__item:last-child {
  border-bottom: none;
  padding-bottom: 0;
}

.sidebar-card__icon {
  width: 36px;
  height: 36px;
  background: rgba(91, 44, 111, 0.08);
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--primary);
  font-size: 1rem;
  flex-shrink: 0;
}

.sidebar-card__label {
  display: block;
  font-size: 0.75rem;
  color: var(--slate-400);
  font-weight: 600;
  text-transform: uppercase;
}

.sidebar-card__value {
  display: block;
  font-size: 0.875rem;
  color: var(--slate-900);
  font-weight: 700;
}

.sidebar-card__tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.sidebar-card--cta {
  background: var(--primary);
  color: white;
  border: none;
}

.sidebar-card--cta h3 {
  color: white;
}

.sidebar-card--cta p {
  color: rgba(255, 255, 255, 0.9);
  margin-bottom: 1.25rem;
}

/* ================================
   PROJECT NAVIGATION
   ================================ */
.project-navigation {
  background: var(--bg-secondary);
  padding: 3.75rem 0;
  border-top: 1px solid var(--border);
}

.project-nav__grid {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  gap: 1.5rem;
  align-items: center;
}

.project-nav__item {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 1.25rem;
  background: white;
  border-radius: var(--radius-lg);
  border: 1px solid var(--border);
  text-decoration: none;
  transition: all var(--transition-fast);
}

.project-nav__item:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
  border-color: var(--primary);
}

.project-nav__item--next {
  text-align: right;
  justify-content: flex-end;
}

.project-nav__item i {
  font-size: 1.25rem;
  color: var(--primary);
}

.project-nav__label {
  display: block;
  font-size: 0.75rem;
  color: var(--slate-400);
  font-weight: 600;
  text-transform: uppercase;
  margin-bottom: 0.25rem;
}

.project-nav__title {
  display: block;
  font-size: 1rem;
  color: var(--slate-900);
  font-weight: 700;
}

/* ================================
   BACK TO TOP
   ================================ */
.back-to-top-section {
  background: var(--bg-secondary);
  padding: 3rem 0;
  border-top: 1px solid var(--border);
  text-align: center;
}

.back-to-top-btn {
  display: inline-flex;
  gap: 0.75rem;
}

.back-to-top-btn i {
  transition: transform var(--transition-fast);
}

.back-to-top-btn:hover i {
  transform: translateY(-3px);
}

/* ================================
   VISUAL RESOURCES
   ================================ */
.visual-resource {
  margin: 2rem 0;
  border-radius: var(--radius-xl);
  overflow: hidden;
  box-shadow: var(--shadow-lg);
  transition: all var(--transition-base);
  cursor: zoom-in;
}

.visual-resource:hover {
  transform: translateY(-5px);
  box-shadow: var(--shadow-xl);
}

.visual-resource img {
  width: 100%;
  height: auto;
  display: block;
  transition: all var(--transition-base);
}

.visual-resource img:hover {
  transform: scale(1.02);
}

.image-caption {
  padding: 1rem 1.5rem;
  background: var(--bg-secondary);
  color: var(--slate-500);
  font-size: 0.9rem;
  font-style: italic;
  margin: 0;
  text-align: center;
}

.visual-gallery {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 2rem;
  margin: 2rem 0;
}

.gallery-item {
  border-radius: var(--radius-xl);
  overflow: hidden;
  box-shadow: var(--shadow-md);
  transition: all var(--transition-base);
  background: white;
  cursor: zoom-in;
}

.gallery-item:hover {
  transform: translateY(-8px);
  box-shadow: var(--shadow-xl);
}

.gallery-item img {
  width: 100%;
  height: auto;
  display: block;
}

.video-container {
  position: relative;
  width: 100%;
  padding-bottom: 56.25%;
  margin: 2rem 0;
  border-radius: var(--radius-xl);
  overflow: hidden;
  box-shadow: var(--shadow-lg);
}

.video-container iframe,
.video-container video {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  border: none;
}

/* ================================
   LIGHTBOX
   ================================ */
.lightbox {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.95);
  z-index: 9999;
  display: none;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transition: opacity 0.3s ease;
}

.lightbox.active {
  display: flex;
  opacity: 1;
}

.lightbox__content {
  position: relative;
  max-width: 90%;
  max-height: 90vh;
  animation: lightboxZoomIn 0.3s ease;
}

@keyframes lightboxZoomIn {
  from {
    transform: scale(0.8);
    opacity: 0;
  }
  to {
    transform: scale(1);
    opacity: 1;
  }
}

.lightbox__image {
  max-width: 100%;
  max-height: 90vh;
  object-fit: contain;
  border-radius: var(--radius-lg);
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
}

.lightbox__close {
  position: absolute;
  top: -50px;
  right: 0;
  background: white;
  color: var(--slate-900);
  border: none;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  font-size: 1.5rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all var(--transition-fast);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
}

.lightbox__close:hover {
  background: var(--primary);
  color: white;
  transform: rotate(90deg) scale(1.1);
}

.lightbox__caption {
  position: absolute;
  bottom: -60px;
  left: 0;
  right: 0;
  color: white;
  text-align: center;
  font-size: 0.9375rem;
  padding: 1rem;
  background: rgba(0, 0, 0, 0.6);
  backdrop-filter: blur(10px);
  border-radius: var(--radius-md);
}

.lightbox__close:focus-visible {
  outline: 3px solid var(--secondary);
  outline-offset: 4px;
}

/* ================================
   READING PROGRESS BAR
   ================================ */
.reading-progress {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  height: 4px;
  background: rgba(0, 0, 0, 0.05);
  z-index: calc(var(--z-sticky) - 1);
  opacity: 0;
  transition: opacity 0.3s ease;
}

.reading-progress.visible {
  opacity: 1;
  animation: fadeInProgress 0.3s ease;
}

@keyframes fadeInProgress {
  from {
    opacity: 0;
    transform: translateY(4px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.reading-progress__bar {
  height: 100%;
  width: 0%;
  background: linear-gradient(90deg, var(--primary) 0%, var(--secondary) 100%);
  transition: width 0.1s ease-out;
  box-shadow: 0 0 10px rgba(91, 44, 111, 0.5);
}

/* ================================
   ESTILOS ESPECÍFICOS LUMI
   ================================ */
body[data-category="lumi"] {
  --lumi-amarillo: #ffd600;
  --lumi-naranja: #ff8c42;
  --lumi-rosa: #ff6b9d;
  --lumi-morado: #8b5cf6;
  --lumi-azul: #0077ff;
  --lumi-cyan: #00c896;
}

.lumi-features {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 2rem;
  margin-top: 2rem;
}

.lumi-feature {
  background: linear-gradient(135deg, var(--bg-secondary) 0%, white 100%);
  padding: 2rem;
  border-radius: var(--radius-2xl);
  border: 2px solid var(--border);
  transition: all var(--transition-base);
}

.lumi-feature:hover {
  transform: translateY(-5px);
  box-shadow: 0 10px 30px rgba(139, 92, 246, 0.15);
  border-color: var(--lumi-morado);
}

.lumi-feature__icon {
  font-size: 3rem;
  margin-bottom: 1rem;
  display: block;
}

.lumi-feature h5 {
  color: var(--lumi-morado);
  margin-bottom: 0.75rem;
  font-size: 1.25rem;
  font-weight: 700;
}

.lumi-feature p {
  color: var(--slate-500);
  line-height: 1.6;
  margin: 0;
}

.ai-tools-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
  gap: 1.5rem;
  margin-top: 2rem;
}

.ai-tool {
  background: rgba(139, 92, 246, 0.1);
  border: 2px solid rgba(139, 92, 246, 0.2);
  color: var(--slate-700);
  padding: 1.5rem;
  border-radius: var(--radius-lg);
  transition: all var(--transition-base);
}

.ai-tool:hover {
  transform: translateY(-3px);
  box-shadow: 0 8px 25px rgba(139, 92, 246, 0.2);
  border-color: var(--lumi-morado);
}

.ai-tool strong {
  display: block;
  font-size: 1.1rem;
  margin-bottom: 0.5rem;
  color: var(--lumi-morado);
}

.ai-tool p {
  margin: 0;
  font-size: 0.95rem;
  line-height: 1.5;
}

/* ================================
   RESPONSIVE - TABLET
   ================================ */
@media (max-width: 1024px) {
  .content-layout {
    grid-template-columns: 1fr;
  }

  .sidebar-sticky {
    position: static;
  }

  .project-nav__grid {
    grid-template-columns: 1fr;
  }

  .project-nav__item--prev {
    order: 2;
  }

  .project-nav__grid > .btn {
    order: 1;
  }

  .project-nav__item--next {
    order: 3;
  }

  .project-hero {
    min-height: 50vh;
    padding: 6rem 0 3rem;
  }

  .project-hero--simple {
    min-height: 33vh;
    padding: 1.5rem 0 2.5rem;
  }
}

/* ================================
   RESPONSIVE - MOBILE
   ================================ */
@media (max-width: 768px) {
  .lightbox__content {
    max-width: 95%;
  }

  .lightbox__close {
    top: -45px;
    width: 35px;
    height: 35px;
    font-size: 1.25rem;
  }

  .lightbox__caption {
    font-size: 0.8125rem;
    bottom: -50px;
  }

  .project-hero {
    min-height: 60vh;
    padding: 6rem 0 2.5rem;
  }

  .project-hero__title {
    font-size: 2.5rem;
  }

  .project-hero__description {
    font-size: 1rem;
  }

  .reading-progress {
    height: 3px;
  }

  .project-hero--simple {
    min-height: 30vh;
    padding: 1rem 0 2rem;
  }

  .project-hero--simple .back-link {
    display: none !important;
  }

  .project-hero--simple .section-title {
    font-size: 1.5rem !important;
    margin-bottom: 0.75rem;
  }

  .project-hero--simple .section-description {
    font-size: 0.875rem !important;
    line-height: 1.5;
  }

  .quick-info__grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 1.25rem;
  }

  .block-header {
    flex-direction: column;
    align-items: flex-start;
  }

  .metrics-grid {
    grid-template-columns: 1fr;
  }

  .project-nav__item {
    flex-direction: column;
    text-align: center;
  }

  .project-nav__item--next {
    text-align: center;
  }

  .lumi-features,
  .ai-tools-grid {
    grid-template-columns: 1fr;
  }

  .visual-gallery {
    grid-template-columns: 1fr;
    gap: 1.5rem;
  }
}

/* ================================
   RESPONSIVE - SMALL MOBILE
   ================================ */
@media (max-width: 480px) {
  .project-hero {
    min-height: 65vh;
    padding: 5rem 0 2rem;
  }

  .project-hero--simple {
    min-height: 25vh;
    padding: 4.5rem 0 1.5rem;
  }

  .project-hero--simple .section-title {
    font-size: 1.375rem !important;
  }

  .project-hero--simple .section-description {
    font-size: 0.8125rem !important;
  }
}
