/* =========================================
   PROJECT DETAILS MODULE
   ========================================= */

.project-details-module {
  font-family: 'Poppins', sans-serif;
  color: var(--text-gray);
  position: relative;
  z-index: 1;
}

.project-details-module * { box-sizing: border-box; }

.project-details-module .container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 24px;
  box-sizing: border-box;
}

/* BACKGROUND DOTTED */
.project-details-module .page-wrapper {
  position: relative;
  background-color: var(--card-bg);
}

.project-details-module .page-wrapper::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-image: radial-gradient(#e2e8f0 1.5px, transparent 1.5px);
  background-size: 30px 30px;
  -webkit-mask-image: linear-gradient(to bottom, transparent 0%, black 15%);
  mask-image: linear-gradient(to bottom, transparent 0%, black 15%);
  pointer-events: none;
  z-index: 0;
}

.project-details-module .project-layout {
  display: flex;
  gap: 50px;
  padding: 60px 0 120px;
  position: relative;
  z-index: 10;
}

/* MAIN CONTENT */
.project-details-module .project-main-content {
  flex: 1;
  font-size: 16px;
  line-height: 1.8;
  color: var(--text-gray);
  min-width: 0;
}

.project-details-module .project-main-content h3 {
  font-size: 22px;
  color: var(--primary-navy);
  font-weight: 700;
  margin-top: 40px;
  margin-bottom: 16px;
  line-height: 1.3;
}

.project-details-module .project-main-content p,
.project-details-module .project-main-content ul {
  margin-top: 0;
  margin-bottom: 24px;
}
.project-details-module .project-main-content ul { padding-left: 20px; }
.project-details-module .project-main-content li { margin-bottom: 10px; }

.project-details-module .project-main-content img {
  max-width: 100% !important;
  height: auto !important;
}

/* FEATURED IMAGE */
.project-details-module .project-featured-image {
  width: 100%;
  height: 400px;
  object-fit: cover;
  border-radius: 16px;
  box-shadow: 0 12px 36px rgba(22, 40, 58, 0.08);
  margin-bottom: 40px;
  border: 1px solid var(--border-color);
  transition: transform 0.4s ease, box-shadow 0.4s ease;
  display: block;
}

.project-details-module .project-featured-image:hover {
  transform: translateY(-4px) !important; 
  box-shadow: 0 20px 45px rgba(22, 40, 58, 0.15);
}

/* SIDEBAR / INFO CARD */
.project-details-module .project-sidebar {
  width: 380px;
  flex-shrink: 0;
}

.project-details-module .info-card {
  background: var(--card-bg);
  border-radius: 20px;
  padding: 40px;
  box-shadow: 0 20px 50px rgba(22, 40, 58, 0.08);
  border: 1px solid var(--border-color);
  position: sticky;
  top: 110px; 
}

.project-details-module .info-rows-wrap {
  display: flex;
  flex-direction: column;
}

.project-details-module .info-row {
  display: flex;
  align-items: center;
  margin-bottom: 24px;
  padding-bottom: 24px;
  border-bottom: 1px dashed var(--border-color);
}

.project-details-module .info-row.info-row--last {
  margin-bottom: 30px;
  padding-bottom: 0;
  border-bottom: none;
}

.project-details-module .info-icon {
  width: 44px;
  height: 44px;
  background: var(--bg-light);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--primary-teal);
  font-size: 18px;
  margin-right: 16px;
  flex-shrink: 0;
}

.project-details-module .info-text-group { display: flex; flex-direction: column; }
.project-details-module .info-label {
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  color: #94a3b8;
  letter-spacing: 1px;
  margin-bottom: 4px;
}
.project-details-module .info-value {
  font-size: 15px;
  font-weight: 600;
  color: var(--primary-navy);
  line-height: 1.4;
}

/* ESTILO DESTACADO DIRECTO PARA EL ACRÓNIMO */
.project-details-module .info-value--acronym {
  font-size: 18px;
  font-weight: 800;
  letter-spacing: 1.5px;
  color: var(--primary-teal);
  text-transform: uppercase;
}

.project-details-module .info-value a {
  color: var(--primary-teal);
  text-decoration: underline;
  word-break: break-all;
  transition: color 0.2s ease;
}
.project-details-module .info-value a:hover {
  color: var(--primary-navy);
}

/* BACK BUTTON */
.project-details-module .sidebar-back-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  min-height: 48px;
  padding: 14px 24px;
  background-color: transparent;
  color: var(--primary-teal) !important;
  border: 2px solid var(--primary-teal);
  font-family: 'Poppins', sans-serif;
  font-weight: 700;
  font-size: 14px;
  text-decoration: none !important;
  border-radius: 50px;
  transition: all 0.3s ease !important;
  box-sizing: border-box;
  -webkit-tap-highlight-color: transparent;
}

.project-details-module .sidebar-back-btn i { margin-right: 8px; }
.project-details-module .sidebar-back-btn:hover {
  background-color: var(--primary-teal) !important;
  color: var(--white) !important;
  transform: translateY(-2px) !important;
  box-shadow: 0 8px 16px rgba(0, 137, 166, 0.2) !important;
}

/* GALLERY STYLES */
.project-gallery-section {
  margin-top: 36px;
  padding-top: 28px;
  border-top: 1px solid var(--border-color);
}

.project-gallery-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 20px;
}

.project-gallery-grid .gallery-item {
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 8px 24px rgba(22, 40, 58, 0.06);
  background: var(--bg-light);
  border: 1px solid var(--border-color);
}

.project-gallery-grid .gallery-item img {
  cursor: zoom-in;
  width: 100%;
  height: 220px;
  object-fit: cover;
  display: block;
  transition: transform 0.4s ease;
}

.project-gallery-grid .gallery-item img:hover {
  transform: scale(1.05);
}

/* ANIMATIONS */
.project-details-module .reveal {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 0.8s ease-out, transform 0.8s cubic-bezier(0.22, 1, 0.36, 1);
}
.project-details-module .reveal.active {
  opacity: 1;
  transform: translateY(0);
}

/* FIX PARA EDITOR HUBSPOT */
{% if is_in_editor %}
  .project-details-module .reveal { opacity: 1 !important; transform: translateY(0) !important; }
{% endif %}

/* SKELETON ANIMATION */
.skeleton-anim {
  background: #f1f5f9;
  background: linear-gradient(110deg, #f1f5f9 8%, #f8fafc 18%, #f1f5f9 33%);
  background-size: 200% 100%;
  animation: 1.5s shine linear infinite;
}
@keyframes shine {
  to { background-position-x: -200%; }
}

/* =========================================
   RESPONSIVE DESIGN (TABLETS Y MÓVILES)
   ========================================= */

@media (max-width: 900px) {
  .project-details-module .project-layout { 
    flex-direction: column;
    gap: 36px;
    padding: 40px 0 70px;
  }

  .project-details-module .project-featured-image {
    height: 320px;
    margin-bottom: 30px;
  }

  .project-details-module .project-sidebar { 
    width: 100%;
    margin-top: 0;
  }

  .project-details-module .info-card { 
    position: static;
    padding: 28px 24px;
    border-radius: 16px;
  }

  .project-details-module .info-rows-wrap {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
    margin-bottom: 24px;
  }

  .project-details-module .info-row {
    margin-bottom: 0;
    padding-bottom: 0;
    border-bottom: none;
  }
}

@media (max-width: 640px) {
  .project-details-module .container {
    padding: 0 16px;
  }

  .project-details-module .project-layout {
    padding: 30px 0 50px;
    gap: 30px;
  }

  .project-details-module .project-featured-image {
    height: 230px;
    border-radius: 12px;
    margin-bottom: 22px;
  }

  .project-details-module .project-main-content {
    font-size: 15px;
    line-height: 1.65;
  }

  .project-details-module .project-main-content h3 {
    font-size: 19px;
    margin-top: 28px;
    margin-bottom: 12px;
  }

  .project-details-module .project-main-content p,
  .project-details-module .project-main-content ul {
    margin-bottom: 18px;
  }

  .project-gallery-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
  }

  .project-gallery-grid .gallery-item {
    border-radius: 10px;
  }

  .project-gallery-grid .gallery-item img {
    height: 140px;
  }
}

@media (max-width: 480px) {
  .project-details-module .info-rows-wrap {
    grid-template-columns: 1fr;
    gap: 16px;
  }

  .project-details-module .info-row:not(.info-row--last) {
    padding-bottom: 16px;
    border-bottom: 1px dashed var(--border-color);
  }

  .project-details-module .info-card {
    padding: 22px 18px;
  }

  .project-details-module .info-icon {
    width: 38px;
    height: 38px;
    font-size: 16px;
    margin-right: 12px;
  }
}

@media (max-width: 380px) {
  .project-details-module .project-featured-image {
    height: 200px;
  }

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

  .project-gallery-grid .gallery-item img {
    height: 180px;
  }
}