/* ─── PROJECT DETAIL PAGE ────────────────────────────────── */

.proj-detail-hero {
  --hero-bg: none;
  background: var(--blue-deep);
  padding: 72px 80px 56px;
  position: relative; overflow: hidden;
}
.proj-detail-hero::before {
  content: ''; position: absolute; inset: 0;
  background-image: var(--hero-bg);
  background-size: cover;
  background-position: center;
  opacity: 0.45;
  pointer-events: none;
}
.proj-detail-hero::after {
  content: ''; position: absolute; inset: 0;
  background:
    radial-gradient(ellipse at 80% 50%, rgba(26,111,189,0.25) 0%, transparent 60%),
    linear-gradient(180deg, rgba(11,30,58,0.35) 0%, rgba(11,30,58,0.65) 100%);
  pointer-events: none;
}
.proj-detail-back {
  font-size: 12px; font-weight: 500; letter-spacing: 0.1em; text-transform: uppercase;
  color: rgba(255,255,255,0.5); text-decoration: none;
  display: inline-flex; align-items: center; gap: 8px;
  margin-bottom: 32px;
  transition: color var(--transition);
  position: relative; z-index: 2;
}
.proj-detail-back:hover { color: rgba(255,255,255,0.9); }

.proj-detail-meta {
  display: flex; align-items: center; gap: 10px;
  margin-bottom: 20px; position: relative; z-index: 2;
}
.proj-detail-cat {
  font-size: 11px; font-weight: 500; letter-spacing: 0.15em; text-transform: uppercase;
  color: var(--white); background: rgba(255,255,255,0.15);
  padding: 5px 12px; border-radius: 2px;
}
.proj-detail-status {
  font-size: 11px; font-weight: 600; letter-spacing: 0.1em; text-transform: uppercase;
  padding: 5px 12px; border-radius: 2px;
}
.proj-detail-status.activo { background: rgba(0,180,100,0.8); color: #fff; }
.proj-detail-status.finalizado { background: rgba(120,120,140,0.6); color: rgba(255,255,255,0.85); }

.proj-detail-hero h1 {
  font-size: clamp(28px, 4vw, 52px); font-weight: 600;
  color: var(--white); max-width: 700px;
  line-height: 1.15; margin-bottom: 16px;
  position: relative; z-index: 2;
}
.proj-detail-hero p.lead {
  font-size: 16px; font-weight: 300; line-height: 1.8;
  color: rgba(255,255,255,0.65); max-width: 600px;
  position: relative; z-index: 2;
}

/* ─── LAYOUT ────────────────────────────────────────────── */
.proj-detail-body {
  display: grid;
  grid-template-columns: 1fr 360px;
  gap: 2px;
  background: var(--gray-light);
  align-items: start;
}

/* LEFT COLUMN */
.proj-detail-main {
  background: var(--white);
  padding: 56px 64px;
}
.proj-section { margin-bottom: 48px; }
.proj-section:last-child { margin-bottom: 0; }
.proj-section-title {
  font-size: 11px; font-weight: 600; letter-spacing: 0.2em; text-transform: uppercase;
  color: var(--gold); margin-bottom: 16px;
  display: flex; align-items: center; gap: 10px;
}
.proj-section-title::before {
  content: ''; display: block;
  width: 20px; height: 1px; background: var(--gold);
}
.proj-section h3 {
  font-size: 22px; font-weight: 600; color: var(--blue-deep);
  margin-bottom: 16px;
}
.proj-section p {
  font-size: 15px; font-weight: 300; line-height: 1.85;
  color: var(--gray-mid); margin-bottom: 16px;
}
.proj-section p:last-child { margin-bottom: 0; }

/* Gallery */
.proj-gallery {
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 4px;
  margin-top: 8px;
}
.proj-gallery-item {
  aspect-ratio: 4/3; overflow: hidden; background: var(--gray-light);
  cursor: pointer; position: relative;
}
.proj-gallery-item img {
  width: 100%; height: 100%; object-fit: cover;
  transition: transform 0.4s ease;
}
.proj-gallery-item:hover img { transform: scale(1.05); }
.proj-gallery-item--full {
  grid-column: 1 / -1;
  aspect-ratio: auto;
  cursor: default;
}
.proj-gallery-item--full img {
  height: auto;
  object-fit: contain;
}
.proj-gallery-item--full:hover img { transform: none; }

/* Masonry variant — photos keep their natural aspect ratios and pack into
   columns Pinterest-style. Apply with class="proj-gallery proj-gallery--masonry". */
.proj-gallery--masonry {
  display: block;
  column-count: 3;
  column-gap: 8px;
}
.proj-gallery--masonry .proj-gallery-item {
  aspect-ratio: auto;
  break-inside: avoid;
  display: block;
  margin: 0 0 8px;
}
.proj-gallery--masonry .proj-gallery-item img {
  width: 100%;
  height: auto;
  object-fit: contain;
  display: block;
}
@media (max-width: 1024px) {
  .proj-gallery--masonry { column-count: 2; }
}
@media (max-width: 540px) {
  .proj-gallery--masonry { column-count: 1; }
}
.gallery-placeholder {
  width: 100%; height: 100%; display: flex; align-items: center; justify-content: center;
  font-size: 11px; letter-spacing: 0.1em; text-transform: uppercase;
  color: var(--gray-mid);
}

/* Team */
.proj-team-list { display: flex; flex-direction: column; gap: 12px; }
.proj-team-item {
  display: flex; align-items: center; gap: 14px;
  padding: 14px 16px; background: var(--off-white); border-radius: 2px;
}
.proj-team-avatar {
  width: 40px; height: 40px; border-radius: 50%;
  background: var(--blue-deep); flex-shrink: 0;
  display: flex; align-items: center; justify-content: center;
  font-size: 14px; font-weight: 600; color: var(--white);
}
.proj-team-info strong { display: block; font-size: 14px; font-weight: 500; color: var(--blue-deep); }
.proj-team-info span { font-size: 12px; color: var(--gray-mid); }

/* RIGHT COLUMN — Sidebar */
.proj-detail-sidebar {
  background: var(--off-white);
  padding: 40px 36px;
  position: sticky; top: calc(var(--nav-h) + 16px);
}

.sidebar-progress-box {
  background: var(--white); padding: 28px;
  border: 1px solid var(--gray-light);
  margin-bottom: 24px;
}
.sidebar-progress-box h4 {
  font-size: 12px; font-weight: 600; letter-spacing: 0.12em; text-transform: uppercase;
  color: var(--gray-mid); margin-bottom: 20px;
}
.sidebar-amount {
  font-size: 32px; font-weight: 600; color: var(--blue-deep); line-height: 1;
  margin-bottom: 4px;
}
.sidebar-amount-label {
  font-size: 12px; color: var(--gray-mid); margin-bottom: 20px;
}
.sidebar-progress-bar {
  height: 6px; background: var(--gray-light); border-radius: 3px; overflow: hidden; margin-bottom: 8px;
}
.sidebar-progress-fill { height: 100%; background: var(--blue-mid); border-radius: 3px; }
.sidebar-progress-pct {
  font-size: 12px; font-weight: 500; color: var(--gray-mid); text-align: right;
}

.btn-donate-full {
  display: block; width: 100%; text-align: center;
  font-family: var(--font-body); font-size: 13px; font-weight: 600;
  letter-spacing: 0.1em; text-transform: uppercase;
  color: var(--white); background: var(--blue-deep);
  border: none; cursor: pointer;
  padding: 16px 24px; border-radius: 2px;
  text-decoration: none;
  transition: background var(--transition), transform var(--transition);
  margin-bottom: 12px;
}
.btn-donate-full:hover { background: var(--blue-mid); transform: translateY(-1px); }

.btn-donate-us {
  display: block; width: 100%; text-align: center;
  font-family: var(--font-body); font-size: 12px; font-weight: 500;
  letter-spacing: 0.08em; text-transform: uppercase;
  color: var(--blue-deep); background: none;
  border: 1px solid var(--blue-deep);
  cursor: pointer; padding: 13px 24px; border-radius: 2px;
  text-decoration: none;
  transition: background var(--transition);
}
.btn-donate-us:hover { background: var(--blue-pale); }

.sidebar-info-list { margin-top: 28px; }
.sidebar-info-item {
  padding: 14px 0;
  border-bottom: 1px solid var(--gray-light);
}
.sidebar-info-item:last-child { border-bottom: none; }
.sidebar-info-item label {
  font-size: 10px; font-weight: 600; letter-spacing: 0.15em; text-transform: uppercase;
  color: var(--gray-mid); display: block; margin-bottom: 4px;
}
.sidebar-info-item span {
  font-size: 14px; font-weight: 400; color: var(--gray-dark);
}

/* ─── RESPONSIVE ──────────────────────────────────────────── */
@media (max-width: 1100px) {
  .proj-detail-body { grid-template-columns: 1fr; }
  .proj-detail-sidebar { position: static; }
  .proj-detail-main { padding: 48px 40px; }
  .proj-detail-sidebar { padding: 40px; }
}
@media (max-width: 768px) {
  .proj-detail-hero { padding: 48px 24px 40px; }
  .proj-detail-main { padding: 36px 24px; }
  .proj-detail-sidebar { padding: 32px 24px; }
  .proj-gallery { grid-template-columns: 1fr 1fr; }
}

/* ─── DONATE MODAL ──────────────────────────────────────── */
.donate-modal-overlay {
  position: fixed; inset: 0;
  background: rgba(11, 30, 58, 0.85);
  display: flex; align-items: center; justify-content: center;
  z-index: 10000;
  opacity: 0; visibility: hidden;
  transition: opacity 0.25s ease, visibility 0.25s ease;
  padding: 20px;
}
.donate-modal-overlay.is-open { opacity: 1; visibility: visible; }
.donate-modal {
  background: var(--white);
  max-width: 480px; width: 100%;
  padding: 32px;
  border-radius: 6px;
  position: relative;
  box-shadow: 0 12px 48px rgba(0, 0, 0, 0.3);
  max-height: 90vh; overflow-y: auto;
}
.donate-modal-close {
  position: absolute;
  top: 10px; right: 10px;
  background: none; border: none;
  font-size: 26px; line-height: 1;
  cursor: pointer;
  width: 36px; height: 36px;
  color: var(--gray-mid);
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  transition: background 0.2s ease, color 0.2s ease;
}
.donate-modal-close:hover {
  background: var(--off-white);
  color: var(--blue-deep);
}
.donate-modal h3 {
  font-family: var(--font-display);
  font-size: 22px; font-weight: 500;
  color: var(--blue-deep);
  margin-bottom: 12px;
  padding-right: 36px;
  line-height: 1.3;
}
.donate-modal-intro {
  font-size: 14px;
  color: var(--gray-mid);
  line-height: 1.6;
  margin-bottom: 20px;
}
.donate-modal-options {
  display: flex; flex-direction: column;
  gap: 12px;
}
.donate-modal-option {
  background: var(--off-white);
  padding: 18px 20px;
  border-left: 3px solid var(--blue-mid);
  text-decoration: none;
  color: inherit;
  border-radius: 3px;
  transition: background 0.2s ease, border-left-color 0.2s ease;
}
.donate-modal-option:hover {
  background: var(--blue-pale);
  border-left-color: var(--blue-deep);
}
.donate-modal-option strong {
  display: block;
  font-size: 15px;
  color: var(--blue-deep);
  margin-bottom: 4px;
}
.donate-modal-option span {
  display: block;
  font-size: 13px;
  color: var(--gray-mid);
  line-height: 1.55;
}

/* ─── LIGHTBOX ──────────────────────────────────────────── */
.lightbox-overlay {
  position: fixed; inset: 0;
  background: rgba(11, 30, 58, 0.95);
  display: flex; align-items: center; justify-content: center;
  z-index: 9999;
  opacity: 0; visibility: hidden;
  transition: opacity 0.25s ease, visibility 0.25s ease;
}
.lightbox-overlay.is-open { opacity: 1; visibility: visible; }
.lightbox-stage {
  width: 90vw; max-width: 1400px;
  height: 80vh;
  display: flex; align-items: center; justify-content: center;
}
.lightbox-img {
  max-width: 100%; max-height: 100%;
  object-fit: contain;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.4);
  user-select: none; -webkit-user-drag: none;
}
.lightbox-close,
.lightbox-prev,
.lightbox-next {
  position: absolute;
  background: rgba(255, 255, 255, 0.1);
  border: none;
  color: white;
  cursor: pointer;
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  transition: background 0.2s ease, transform 0.2s ease;
  line-height: 1;
  padding: 0;
}
.lightbox-close:hover,
.lightbox-prev:hover,
.lightbox-next:hover {
  background: rgba(255, 255, 255, 0.25);
}
.lightbox-close {
  top: 24px; right: 24px;
  width: 44px; height: 44px;
  font-size: 28px;
}
.lightbox-prev,
.lightbox-next {
  top: 50%; transform: translateY(-50%);
  width: 52px; height: 52px;
  font-size: 36px;
}
.lightbox-prev { left: 24px; }
.lightbox-next { right: 24px; }
.lightbox-caption {
  position: absolute;
  bottom: 56px; left: 50%; transform: translateX(-50%);
  color: rgba(255, 255, 255, 0.9);
  font-size: 14px;
  max-width: 70vw;
  text-align: center;
  line-height: 1.5;
  padding: 0 16px;
}
.lightbox-counter {
  position: absolute;
  bottom: 24px; left: 50%; transform: translateX(-50%);
  color: rgba(255, 255, 255, 0.6);
  font-size: 12px;
  letter-spacing: 0.15em;
  text-transform: uppercase;
}
@media (max-width: 640px) {
  .lightbox-prev,
  .lightbox-next { display: none; }
  .lightbox-close { top: 12px; right: 12px; }
  .lightbox-stage { width: 96vw; height: 75vh; }
  .lightbox-caption { bottom: 48px; font-size: 13px; max-width: 88vw; }
  .lightbox-counter { bottom: 16px; }
}
