/* ─── PRESUPUESTO PAGE ──────────────────────────────────────────────────────
   Hereda de home.css: variables, cursor, header, nav-overlay, footer.
   ──────────────────────────────────────────────────────────────────────────── */

.presu-page {
  padding-top: 76px; /* clear fixed header */
  padding-bottom: 60px;
  min-height: 100vh;
}

.presu-wrap {
  max-width: 1100px;
  margin: 0 auto;
}


/* ─── PASSWORD FORM ─────────────────────────────────────────────────────────── */

.presu-password-wrap {
  min-height: calc(100vh - 76px);
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: var(--spacing-xl) 40px;
  max-width: 860px;
}

.presu-password-title {
  font-family: var(--font-display);
  font-weight: 300;
  font-size: clamp(52px, 7vw, 88px);
  line-height: 0.95;
  letter-spacing: -0.02em;
  color: #fff;
  margin: 16px 0 var(--spacing-lg);
}

.presu-expired-wrap {
  /* usa la misma estructura que .presu-password-wrap */
}

.presu-expired-msg {
  font-family: var(--font-display);
  font-weight: 300;
  font-size: clamp(16px, 1.6vw, 22px);
  line-height: 1.7;
  color: var(--color-white-dim);
  margin-bottom: var(--spacing-md);
}

.presu-expired-link {
  display: inline-block;
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: .35em;
  text-transform: uppercase;
  color: var(--color-white-dim);
  text-decoration: none;
  border-bottom: var(--line-weight) solid rgba(255,255,255,.25);
  padding-bottom: 4px;
  transition: color .3s, border-color .3s;
}

.presu-expired-link:hover {
  color: #fff;
  border-bottom-color: rgba(255,255,255,.5);
}

.presu-password-error {
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: .25em;
  text-transform: uppercase;
  color: rgba(255, 100, 80, 0.85);
  margin-bottom: var(--spacing-md);
}

.post-password-form {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.post-password-form p { margin: 0; }

.post-password-form label {
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: .3em;
  text-transform: uppercase;
  color: var(--color-white-dim);
  opacity: .5;
  display: block;
  margin-bottom: 8px;
}

.post-password-form input[type="password"] {
  width: 100%;
  background: transparent;
  border: none;
  border-bottom: var(--line-weight) solid rgba(255,255,255,.25);
  color: #fff;
  font-family: var(--font-mono);
  font-size: 14px;
  letter-spacing: .15em;
  padding: 12px 0;
  outline: none;
  transition: border-color .3s;
  box-sizing: border-box;
}

.post-password-form input[type="password"]:focus {
  border-bottom-color: rgba(255,255,255,.6);
}

.post-password-form input[type="submit"] {
  align-self: flex-start;
  background: transparent;
  border: var(--line-weight) solid rgba(255,255,255,.25);
  color: var(--color-white-dim);
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: .35em;
  text-transform: uppercase;
  padding: 12px 28px;
  cursor: pointer;
  transition: color .3s, border-color .3s;
  margin-top: 8px;
}

.post-password-form input[type="submit"]:hover {
  color: #fff;
  border-color: rgba(255,255,255,.5);
}


/* ─── HERO ─────────────────────────────────────────────────────────────────── */

.presu-hero {
  display: flex;
  flex-direction: column;
  padding: 0 40px 40px;
  border-bottom: var(--line-weight) solid var(--color-white-faint);
}

.presu-hero-body {
  order: 1;
  padding-bottom: var(--spacing-md);
}

.presu-hero-meta {
  order: 2;
  display: flex;
  flex-direction: column;
  gap: 20px;
  padding-top: var(--spacing-md);
  border-top: var(--line-weight) solid var(--color-white-faint);
}

.presu-meta-item {
  display: flex;
  flex-direction: column;
  gap: 5px;
}

.presu-meta-label {
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: .4em;
  text-transform: uppercase;
  color: var(--color-white-dim);
  opacity: .45;
}

.presu-meta-value {
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: .2em;
  color: var(--color-white-dim);
}

.presu-eyebrow {
  display: block;
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: .45em;
  text-transform: uppercase;
  color: var(--color-white-dim);
  opacity: .4;
  margin-bottom: 18px;
}

.presu-title {
  font-family: var(--font-display);
  font-weight: 300;
  font-size: clamp(30px, 6.5vw, 92px);
  line-height: 0.93;
  letter-spacing: -0.02em;
  color: #fff;
}


/* ─── PAGE BREAK (solo activo en @media print) ──────────────────────────────── */

.presu-page-break {
  display: none;
}


/* ─── BLOQUES BASE ──────────────────────────────────────────────────────────── */

.presu-block {
  padding: 40px 40px;
  border-bottom: var(--line-weight) solid var(--color-white-faint);
}

.presu-block:last-child {
  border-bottom: none;
}

.presu-block-inner {
}


/* ─── BLOQUE TEXTO ──────────────────────────────────────────────────────────── */

.presu-text,
.presu-block--text .presu-block-inner p {
  font-family: var(--font-display);
  font-weight: 300;
  font-size: clamp(19px, 2.2vw, 30px);
  line-height: 1.6;
  color: var(--color-white-dim);
  margin-bottom: 1em;
}

.presu-block--text .presu-block-inner p:last-child { margin-bottom: 0; }

.presu-text strong,
.presu-block--text .presu-block-inner strong {
  color: #fff;
  font-weight: 400;
}


/* ─── BLOQUE IMAGEN ─────────────────────────────────────────────────────────── */

.presu-block--image {
  padding: var(--spacing-md) 0;
  border-bottom: var(--line-weight) solid var(--color-white-faint);
}

.presu-figure {
  margin: 0;
  position: relative;
  overflow: hidden;
  background: #111;
}

.presu-figure img {
  display: block;
  width: 100%;
  height: auto;
  object-fit: cover;
  transition: transform 1.2s var(--ease-out);
}

.presu-figure:hover img {
  transform: scale(1.02);
}

.presu-caption {
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: .3em;
  text-transform: uppercase;
  color: var(--color-white-dim);
  opacity: .55;
  padding: 14px 40px 0;
}


/* ─── IMG PARA PDF (oculta en pantalla, visible en @media print) ────────────── */

.presu-video-pdf-img {
  display: none;
}


/* ─── BLOQUE VIDEO ──────────────────────────────────────────────────────────── */

.presu-block--video {
  padding: var(--spacing-md) 0;
  border-bottom: var(--line-weight) solid var(--color-white-faint);
}

/* MP4 */
.presu-video-mp4 {
  display: block;
  width: 100%;
  max-height: 85vh;
  background: #111;
  outline: none;
}

/* Vimeo iframe — aspect-ratio se aplica inline desde PHP (ratio real del video) */
.presu-video-vimeo-wrap {
  position: relative;
  background: #111;
  overflow: hidden;
}

.presu-video-vimeo-wrap iframe {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: none;
}

/* caption reutiliza el mismo estilo que imagen */
.presu-block--video .presu-caption {
  padding-left: 40px;
  padding-right: 40px;
}


/* ─── BLOQUE DELIVERABLES ────────────────────────────────────────────────────── */

.presu-section-title {
  font-family: var(--font-display);
  font-weight: 300;
  font-size: clamp(24px, 3.5vw, 52px);
  line-height: 1.15;
  letter-spacing: -0.01em;
  color: #fff;
  margin-bottom: var(--spacing-md);
}

.presu-includes-label {
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: .3em;
  text-transform: uppercase;
  color: var(--color-white-dim);
  opacity: .6;
  margin-bottom: 20px;
}

.presu-includes-list {
  list-style: none;
  padding: 0;
  margin: 0 0 32px;
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.presu-includes-list li {
  font-family: var(--font-display);
  font-weight: 300;
  font-size: clamp(16px, 1.6vw, 22px);
  color: var(--color-white-dim);
  display: flex;
  align-items: flex-start;
  gap: 20px;
  line-height: 1.4;
}

.presu-includes-list li::before {
  content: '—';
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--color-white-dim);
  opacity: .35;
  flex-shrink: 0;
  margin-top: 5px;
}

.presu-includes-list li strong {
  color: #fff;
  font-weight: 400;
}

/* Total */

.presu-total {
  padding-top: var(--spacing-md);
  border-top: var(--line-weight) solid var(--color-white-faint);
}

.presu-total-amount {
  font-family: var(--font-display);
  font-weight: 300;
  font-size: clamp(60px, 9vw, 128px);
  line-height: 1;
  letter-spacing: -0.03em;
  color: #fff;
  margin: 20px 0 10px;
}

.presu-total-amount span {
  font-size: .45em;
  color: var(--color-white-dim);
  letter-spacing: 0;
}

.presu-total-words {
  font-family: var(--font-display);
  font-style: italic;
  font-weight: 300;
  font-size: clamp(15px, 1.6vw, 22px);
  color: var(--color-white-dim);
  margin-bottom: 16px;
}

.presu-total-notes {
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: .2em;
  line-height: 1.9;
  color: var(--color-white-dim);
  opacity: .5;
}


/* ─── BLOQUE SECTION LABEL ──────────────────────────────────────────────────── */
/* Transición cinematográfica entre secciones — texto centrado, fondo oscuro    */

.presu-block--section-label {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--spacing-lg);
  padding: 30px 40px;
  border-bottom: var(--line-weight) solid var(--color-white-faint);
  position: relative;
}

.presu-section-label-text {
  font-family: var(--font-display);
  font-weight: 300;
  font-size: clamp(24px, 3.5vw, 52px);
  line-height: 1.15;
  color: #fff;
  letter-spacing: -0.01em;
}

.presu-section-label-text strong {
  color: #fff;
  font-weight: 400;
}

.presu-section-label-line {
  width: var(--line-weight);
  align-self: stretch;
  flex-shrink: 0;
  background: linear-gradient(
    to bottom,
    transparent 0%,
    rgba(255,255,255,.2) 20%,
    rgba(255,255,255,.2) 80%,
    transparent 100%
  );
}


/* ─── BLOQUE GRID ────────────────────────────────────────────────────────────── */

.presu-block--grid {
  padding: 0;
  border-bottom: var(--line-weight) solid var(--color-white-faint);
}

.presu-grid {
  display: grid;
  gap: 2px;
}

.presu-grid--2 {
  grid-template-columns: 1fr 1fr;
}

.presu-grid--3 {
  grid-template-columns: 1fr 1fr 1fr;
}

.presu-grid-item {
  margin: 0;
  overflow: hidden;
  background: #111;
  aspect-ratio: 16 / 9;
}

.presu-grid-item img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 1s var(--ease-out);
}

.presu-grid-item:hover img {
  transform: scale(1.04);
}


/* ─── EXTRA NOTE (no incluye...) ────────────────────────────────────────────── */

.presu-extra-note {
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: .2em;
  line-height: 1.9;
  color: var(--color-white-dim);
  opacity: .4;
  margin: calc(var(--spacing-md) * -0.5) 0 var(--spacing-md);
}


/* ─── TOTAL SECUNDARIO ───────────────────────────────────────────────────────── */

.presu-total--secondary {
  margin-top: 32px;
  border-top: var(--line-weight) solid var(--color-white-faint);
  padding-top: 24px;
}

.presu-total-label {
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: .2em;
  line-height: 1.8;
  color: var(--color-white-dim);
  opacity: .55;
  margin-bottom: 12px;
}


/* ─── BLOQUE LEGAL ───────────────────────────────────────────────────────────── */

.presu-block-inner--wide {
  max-width: 100%;
}

.presu-block--legal p {
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: .08em;
  line-height: 2;
  color: var(--color-white-dim);
  opacity: .35;
  margin-bottom: 1.2em;
}

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

.presu-block--legal strong {
  opacity: .65;
  font-weight: 400;
}


/* ─── BLOQUE CIERRE ──────────────────────────────────────────────────────────── */

.presu-closing-title {
  font-family: var(--font-display);
  font-weight: 300;
  font-size: clamp(52px, 7vw, 96px);
  line-height: 0.95;
  letter-spacing: -0.02em;
  color: #fff;
  margin-bottom: 32px;
}

.presu-closing-contact {
  display: flex;
  flex-direction: column;
  gap: 0;
  margin-bottom: 32px;
}

.presu-closing-contact a {
  display: flex;
  align-items: center;
  gap: 24px;
  text-decoration: none;
  padding: 14px 0;
  border-bottom: var(--line-weight) solid var(--color-white-faint);
  transition: opacity .3s;
}

.presu-closing-contact a:first-child {
  border-top: var(--line-weight) solid var(--color-white-faint);
}

.presu-closing-contact a:hover {
  opacity: .7;
}

.presu-contact-label {
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: .35em;
  text-transform: uppercase;
  color: var(--color-white-dim);
  opacity: .45;
  width: 100px;
  flex-shrink: 0;
}

.presu-contact-value {
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: .2em;
  color: var(--color-white-dim);
}



/* ─── PDF DOWNLOAD BUTTON ────────────────────────────────────────────────────── */

.presu-pdf-btn-wrap {
  padding: 40px 40px 60px;
  display: flex;
  justify-content: flex-start;
}

.presu-pdf-btn {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  background: transparent;
  border: var(--line-weight) solid rgba(255,255,255,0.2);
  color: var(--color-white-dim);
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: .4em;
  text-transform: uppercase;
  padding: 16px 32px;
  cursor: pointer;
  transition: color .3s, border-color .3s;
}

.presu-pdf-btn:hover {
  color: #fff;
  border-color: rgba(255,255,255,0.5);
}

.presu-pdf-btn:disabled {
  opacity: .4;
  cursor: default;
}

.presu-pdf-btn svg {
  flex-shrink: 0;
}


/* ─── RESPONSIVE — TABLET (≤ 1024px) ───────────────────────────────────────── */

@media (max-width: 1024px) {
  .presu-hero {
    padding: 0 32px 32px;
  }

  .presu-block {
    padding: 30px 32px;
  }

  .presu-caption {
    padding: 12px 32px 0;
  }
}


/* ─── RESPONSIVE — MOBILE (≤ 767px) ────────────────────────────────────────── */

@media (max-width: 767px) {
  .presu-page {
    padding-top: 0px;
  }

  .presu-hero {
    padding: 0 24px 24px;
  }


  .presu-block {
    padding: 24px 24px;
  }

  .presu-caption {
    padding: 10px 24px 0;
  }

  .presu-figure img {
    
  }

  .presu-block--video .presu-caption {
    padding-left: 24px;
    padding-right: 24px;
  }

  .presu-closing-contact {
    gap: 0;
  }

  .presu-block--section-label {
    padding: 30px 24px;
  }

  .presu-grid--2 {
    grid-template-columns: 1fr;
  }

  .presu-grid--3 {
    grid-template-columns: 1fr 1fr;
  }

  .presu-grid-item {
    aspect-ratio: auto;
    overflow: visible;
  }

  .presu-grid-item img {
    height: auto;
    object-fit: initial;
  }

  .presu-pdf-btn-wrap {
    padding: 32px 24px;
  }
}


/* ─── PRINT ──────────────────────────────────────────────────────────────────
   Fondo blanco, texto negro. Imágenes se mantienen.
   Videos reemplazados por frame/thumbnail via JS antes de window.print().
   ─────────────────────────────────────────────────────────────────────────── */

@media print {

  /* Quita los encabezados del browser (URL, fecha, nro de página) */
  @page {
    margin: 0;
  }

  /* Forzar colores aunque el browser tenga "print backgrounds" desactivado */
  *, *::before, *::after {
    -webkit-print-color-adjust: exact !important;
    print-color-adjust: exact !important;
  }

  /* ── Hide UI ──────────────────────────────────────────────────────────── */
  .site-header,
  .nav-overlay,
  .cursor,
  .cursor-ring,
  .site-footer,
  .presu-pdf-btn-wrap,
  .presu-block--video {
    display: none !important;
  }

  /* Si tiene imagen PDF: mostrar el bloque, ocultar solo el player */
  .presu-block--video--has-pdf-img {
    display: block !important;
  }

  .presu-block--video--has-pdf-img .presu-video-vimeo-wrap,
  .presu-block--video--has-pdf-img .presu-video-mp4 {
    display: none !important;
  }

  .presu-video-pdf-img {
    display: block !important;
    margin: 0;
    break-inside: avoid;
  }

  .presu-video-pdf-img img {
    display: block;
    width: 100%;
    height: auto;
  }

  /* ── Base ──────────────────────────────────────────────────────────────── */
  html, body {
    background: #fff !important;
    color: #000 !important;
  }

  .presu-page {
    padding-top: 0 !important;
    padding-bottom: 0 !important;
  }

  /* Márgenes de página compensados en el contenido (ya que @page margin:0) */
  .presu-wrap {
    max-width: 100% !important;
    padding: 1.5cm 2cm !important;
    box-sizing: border-box !important;
  }

  /* ── Hero ──────────────────────────────────────────────────────────────── */
  .presu-hero {
    border-bottom-color: rgba(0,0,0,0.12) !important;
    padding: 0 0 24px !important;
  }

  .presu-hero-meta {
    border-top-color: rgba(0,0,0,0.1) !important;
  }

  /* Todo el texto negro, excepto legal (se sobreescribe abajo) */
  .presu-wrap * {
    color: #000 !important;
    opacity: 1 !important;
  }

  /* ── Bloques ───────────────────────────────────────────────────────────── */
  .presu-block {
    border-bottom-color: rgba(0,0,0,0.1) !important;
    padding: var(--spacing-md) 32px !important;
    /* sin break-inside: avoid — permite que texto largo se corte entre páginas */
  }

  .presu-block:last-child {
    border-bottom: none !important;
  }

  /* ── Section label ─────────────────────────────────────────────────────── */
  .presu-block--section-label {
    min-height: 0 !important;
  }

  .presu-section-label-line {
    background: linear-gradient(
      to bottom,
      transparent 0%,
      rgba(0,0,0,0.15) 20%,
      rgba(0,0,0,0.15) 80%,
      transparent 100%
    ) !important;
  }

  /* ── Imagen / Video — margen reducido ─────────────────────────────────── */
  .presu-block--image,
  .presu-block--video--has-pdf-img {
    padding: 10px 0 !important;
    border-bottom: none !important;
  }

  /* ── Imagen / Grid ─────────────────────────────────────────────────────── */
  .presu-figure {
    background: #f4f4f4 !important;
    break-inside: avoid;
  }

  .presu-figure:hover img {
    transform: none !important;
  }

  /* Forzar 2 columnas en print (el mobile query las colapsa a 1) */
  .presu-grid--2 {
    grid-template-columns: 1fr 1fr !important;
  }

  .presu-grid--3 {
    grid-template-columns: 1fr 1fr 1fr !important;
  }

  .presu-grid-item {
    background: #f4f4f4 !important;
    aspect-ratio: 16 / 9 !important;
    break-inside: avoid;
  }

  .presu-grid-item:hover img {
    transform: none !important;
  }

  /* ── Saltos de página forzados ─────────────────────────────────────────── */
  .presu-page-break {
    display: block !important;
    height: 0 !important;
    padding: 0 !important;
    page-break-after: always;
    break-after: page;
  }

  /* ── Deliverables ──────────────────────────────────────────────────────── */
  .presu-total {
    border-top-color: rgba(0,0,0,0.1) !important;
    break-inside: avoid;
  }

  .presu-total--secondary {
    border-top-color: rgba(0,0,0,0.1) !important;
  }

  /* ── Legal — gris ──────────────────────────────────────────────────────── */
  .presu-block--legal p {
    color: rgba(0,0,0,0.45) !important;
  }

  .presu-block--legal strong {
    color: rgba(0,0,0,0.6) !important;
  }

  /* ── Closing ───────────────────────────────────────────────────────────── */
  .presu-closing-contact a {
    border-color: rgba(0,0,0,0.1) !important;
  }

  .presu-closing-contact a:first-child {
    border-top-color: rgba(0,0,0,0.1) !important;
  }

}
