/* ═══════════════════════════════════════════════════
   ADA - Proposal Premium Design System (SRI)
   Optimized for A4 Digital View and PDF Export
   ═══════════════════════════════════════════════════ */

:root {
  --prop-primary: #0f172a;
  --prop-secondary: #334155;
  --prop-accent: #10b981;
  --prop-danger: #ef4444;
  --prop-white: #ffffff;
  --prop-gray-light: #f1f5f9;
  --prop-gray-medium: #94a3b8;
  
  --page-w: 210mm;
  --page-h: 297mm;
}

/* ── Proposal Viewer Container ────────────────── */
.proposal-viewer {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: var(--prop-primary);
  z-index: 2000;
  display: none; /* Hidden by default */
  overflow-y: auto;
  padding: 40px 0;
}

.proposal-viewer--open {
  display: block;
}

.proposal-viewer__toolbar {
  position: fixed;
  top: 20px;
  right: 40px;
  display: flex;
  gap: 12px;
  z-index: 2100;
}

.btn-close-proposal, .btn-print-proposal {
  padding: 10px 20px;
  border-radius: 8px;
  border: none;
  font-weight: 700;
  cursor: pointer;
  box-shadow: 0 4px 12px rgba(0,0,0,0.3);
  transition: all 0.2s;
}

.btn-close-proposal { background: #ef4444; color: #fff; }
.btn-print-proposal { background: #10b981; color: #fff; }
.btn-close-proposal:hover, .btn-print-proposal:hover { transform: translateY(-2px); }

/* ── Page Base ────────────────────────────────── */
.prop-page {
  width: var(--page-w);
  min-height: var(--page-h);
  margin: 0 auto 40px auto;
  background: var(--prop-white);
  box-shadow: 0 20px 50px rgba(0,0,0,0.5);
  position: relative;
  overflow: hidden;
  padding: 25mm 20mm;
  display: flex;
  flex-direction: column;
}

.prop-page:last-child { margin-bottom: 0; }

/* ── Page 1: Portada ──────────────────────────── */
.prop-page--cover {
  background: linear-gradient(rgba(15, 23, 42, 0.8), rgba(15, 23, 42, 0.95)), 
              url('/C:/Users/david_s8jkc12/.gemini/antigravity/brain/020fb0d3-ff37-47da-9cc1-386a6339f310/industrial_clean_plant_cover_1775833522642.png');
  background-size: cover;
  background-position: center;
  color: #fff;
  padding: 0;
  justify-content: center;
  align-items: center;
  text-align: center;
}

.cover-content {
  padding: 40px;
}

.cover-brand {
  margin-bottom: 80px;
}

.cover-logo { height: 80px; filter: brightness(0) invert(1); }

.cover-title {
  font-size: 3.5rem;
  font-weight: 900;
  letter-spacing: -0.04em;
  line-height: 1;
  margin-bottom: 24px;
  text-transform: uppercase;
}

.cover-subtitle {
  font-size: 1.25rem;
  font-weight: 500;
  color: var(--prop-accent);
  text-transform: uppercase;
  letter-spacing: 0.2em;
  margin-bottom: 120px;
}

.cover-footer {
  position: absolute;
  bottom: 40mm;
  left: 0;
  right: 0;
  display: flex;
  justify-content: space-around;
  font-size: 0.9rem;
  color: rgba(255,255,255,0.6);
}

.cover-footer b { color: #fff; display: block; font-size: 1.1rem; margin-top: 5px; }

/* ── Typography & Common Elements ──────────────── */
.prop-h2 {
  font-size: 2.2rem;
  font-weight: 900;
  color: var(--prop-primary);
  letter-spacing: -0.02em;
  margin-bottom: 32px;
  border-bottom: 4px solid var(--prop-accent);
  display: inline-block;
  padding-bottom: 8px;
}

.prop-lead {
  font-size: 1.4rem;
  font-weight: 600;
  color: var(--prop-secondary);
  line-height: 1.4;
  margin-bottom: 40px;
}

/* ── Content Blocks ────────────────────────────── */
.pain-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 24px;
}

.pain-card {
  background: var(--prop-gray-light);
  border-left: 6px solid var(--prop-primary);
  padding: 24px;
  border-radius: 0 12px 12px 0;
}

.pain-card h4 {
  font-size: 1.1rem;
  font-weight: 800;
  text-transform: uppercase;
  color: var(--prop-primary);
  margin-bottom: 8px;
  display: flex;
  align-items: center;
  gap: 12px;
}

.pain-card p {
  font-size: 0.95rem;
  color: var(--prop-secondary);
}

.impact-phrase {
  margin-top: auto;
  font-size: 1.2rem;
  font-weight: 700;
  color: var(--prop-danger);
  text-align: center;
  padding: 20px;
  border: 2px dashed var(--prop-danger);
  border-radius: 12px;
}

/* ── Pillars ───────────────────────────────────── */
.pillars-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
  margin-bottom: 40px;
}

.pillar-item {
  padding: 20px;
  background: #fff;
  border: 1px solid var(--prop-gray-light);
  border-radius: 12px;
}

.pillar-item h5 { font-weight: 800; color: var(--prop-primary); margin-bottom: 8px; }

/* ── Visual Charts ─────────────────────────────── */
.chart-box {
  background: #fff;
  border: 1px solid var(--prop-gray-light);
  border-radius: 12px;
  padding: 24px;
  height: 350px;
  margin-bottom: 32px;
}

/* ── Tables ────────────────────────────────────── */
.prop-table {
  width: 100%;
  border-collapse: collapse;
  margin-bottom: 32px;
}

.prop-table th {
  background: var(--prop-primary);
  color: #fff;
  padding: 12px;
  text-align: left;
  font-size: 0.8rem;
  text-transform: uppercase;
}

.prop-table td {
  padding: 12px;
  border-bottom: 1px solid var(--prop-gray-light);
  font-weight: 600;
  color: var(--prop-primary);
}

.prop-table tr:last-child {
  background: var(--prop-gray-light);
  font-weight: 900;
}

/* ── Financial Highlight ──────────────────────── */
.fin-highlight {
  display: flex;
  gap: 20px;
  margin-top: 20px;
}

.fin-card {
  flex: 1;
  background: var(--prop-primary);
  color: #fff;
  padding: 24px;
  border-radius: 12px;
  text-align: center;
}

.fin-card__label { font-size: 0.75rem; color: var(--prop-accent); text-transform: uppercase; font-weight: 800; }
.fin-card__value { font-size: 2rem; font-weight: 900; }

/* ── FAQ ───────────────────────────────────────── */
.faq-list { display: flex; flex-direction: column; gap: 24px; }
.faq-item b { display: block; color: var(--prop-primary); margin-bottom: 8px; font-size: 1.1rem; }
.faq-item p { color: var(--prop-secondary); line-height: 1.5; }

/* ── Roadmap ───────────────────────────────────── */
.timeline-horiz {
  display: flex;
  flex-direction: column;
  gap: 32px;
}

.time-phase {
  display: flex;
  gap: 24px;
}

.time-num {
  width: 48px;
  height: 48px;
  background: var(--prop-accent);
  color: #fff;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 900;
  flex-shrink: 0;
}

.time-content h4 { font-weight: 800; margin-bottom: 4px; }
.time-content p { font-size: 0.9rem; color: var(--prop-secondary); }

/* ── Print Styles ──────────────────────────────── */
@media print {
  body { background: #fff; }
  .proposal-viewer { position: static; display: block; padding: 0; background: #fff; }
  .prop-page { margin: 0; box-shadow: none; border: none; break-after: page; }
  .no-print { display: none !important; }
  
  /* Fix cover background in print */
  .prop-page--cover {
    -webkit-print-color-adjust: exact;
    print-color-adjust: exact;
  }
}
