/* ═══════════════════════════════════════════════════════════════════
   HERO PERGAMINO V2 — Antorcha 3D + Logo COPALCREN
   COPALCREN — Consejo Pastoral La Capital Región Norte
   ═══════════════════════════════════════════════════════════════════ */

/* ── Base section ─────────────────────────────────────────────── */
.hero-parchment {
  position: relative;
  width: 100%;
  min-height: calc(100vh - 68px);
  background-image: url('../images/pergamino-bg.jpg');
  background-size: cover;
  background-position: center center;
  background-repeat: no-repeat;
  background-color: #0a1628;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: visible;
  padding: 64px 56px 56px;
  box-sizing: border-box;
}

/* ── Ambient sparkles ─────────────────────────────────────────── */
.parch-particles {
  position: absolute; inset: 0;
  pointer-events: none; z-index: 2; overflow: hidden;
}
.parch-spark {
  position: absolute; width: 4px; height: 4px; border-radius: 50%;
  background: #ffd060; box-shadow: 0 0 6px 2px rgba(255,200,60,0.6);
  opacity: 0; animation: parchSparkle 5s infinite ease-in-out;
}
@keyframes parchSparkle {
  0%   { opacity: 0;   transform: translateY(0)    scale(0.5); }
  20%  { opacity: 0.9; transform: translateY(-12px) scale(1); }
  60%  { opacity: 0.4; transform: translateY(-28px) scale(0.7); }
  100% { opacity: 0;   transform: translateY(-50px) scale(0.3); }
}

/* ── Warm glow from flame ─────────────────────────────────────── */
.parch-flame-glow {
  position: absolute;
  top: 80px; left: 26%; transform: translateX(-50%);
  width: 340px; height: 320px;
  background: radial-gradient(ellipse 55% 60% at 40% 22%,
    rgba(255,190,60,0.24) 0%, rgba(255,140,20,0.14) 35%,
    rgba(255,90,0,0.06) 60%, transparent 80%);
  pointer-events: none; z-index: 3;
  animation: parchGlowPulse 4s ease-in-out infinite;
  filter: blur(22px);
}
@keyframes parchGlowPulse {
  0%, 100% { opacity: 0.75; }
  50%       { opacity: 1.0;  }
}

/* ── Scene wrapper ────────────────────────────────────────────── */
.parch-v2-scene {
  position: relative; z-index: 5;
  display: flex; flex-direction: column; align-items: center;
  width: 100%; max-width: 1020px;
  gap: 14px;
}

/* ══════════════════════════════════════════════════════════════════
   HEADER ROW: antorcha (left) + título (right)
   antorcha3d.png native ratio ≈ 750×1260 (h=1.68×w)
   At w=210px → natural h ≈ 353px
   Cup rim ≈ 7% from top of image = 353 × 0.07 = ~25px
   padding-top = 115px  (space for flame above cup)
   Cup rim from col-top = 115 + 25 = 140px
   Flame w=120px → natural h = 120×170/180 ≈ 113px
   Flame base (97% of h) = 110px
   Flame top = 140 - 110 = 30px  →  give 10px overlap inside cup = 20px
   ══════════════════════════════════════════════════════════════════ */
.parch-v2-header-row {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 44px;
  width: 100%;
}

/* ── Torch column ─────────────────────────────────────────────── */
.parch-v2-torch-col {
  position: relative;
  flex-shrink: 0;
  width: 210px;
  padding-top: 115px;
  overflow: visible;
  align-self: flex-start;
}

.parch-v2-torchimg {
  width: 100%;
  height: auto;
  position: relative;
  z-index: 5;
  display: block;
  filter: drop-shadow(0 10px 28px rgba(0,0,0,0.40));
}

/* ── Animated flame SVG ───────────────────────────────────────── */
.parch-v2-flame {
  position: absolute;
  width: 120px;
  left: 50%;
  top: 20px;
  transform: translateX(-50%);
  z-index: 9;
  opacity: 0;
  animation:
    parchIgnite    1.2s ease-out 0.5s  forwards,
    parchFlameFloat 3.5s ease-in-out 1.7s infinite;
  pointer-events: none;
  filter: drop-shadow(0 0 16px rgba(255,160,20,0.9));
  overflow: visible;
}
@keyframes parchIgnite {
  from { opacity: 0; transform: translateX(-50%) scaleY(0.3); }
  to   { opacity: 1; transform: translateX(-50%) scaleY(1);   }
}
@keyframes parchFlameFloat {
  0%,  100% { transform: translateX(-50%) scaleX(1)    scaleY(1)    rotate(0deg);     }
  25%        { transform: translateX(-52%) scaleX(0.95) scaleY(1.05) rotate(-1.2deg); }
  75%        { transform: translateX(-48%) scaleX(1.05) scaleY(0.96) rotate(1.2deg);  }
}

/* ── Cup glow ─────────────────────────────────────────────────── */
.parch-v2-cupglow {
  position: absolute;
  left: 50%; top: 122px;
  transform: translateX(-50%);
  width: 92px; height: 72px;
  z-index: 7; pointer-events: none;
  background: radial-gradient(ellipse at 50% 30%,
    rgba(255,200,60,0.68) 0%, rgba(255,120,0,0.40) 45%, transparent 80%);
  filter: blur(10px); border-radius: 50%;
  animation: cupGlowPulse 3s ease-in-out infinite;
}
@keyframes cupGlowPulse {
  0%, 100% { opacity: 0.75; transform: translateX(-50%) scale(1);    }
  50%       { opacity: 1.0;  transform: translateX(-50%) scale(1.18); }
}

/* ── Title column ─────────────────────────────────────────────── */
.parch-v2-title-col {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  flex: 1;
  min-width: 0;
}

/* COPALCREN 3D logo PNG */
.parch-v2-logotext {
  width: 100%;
  max-width: 520px;
  height: auto;
  display: block;
  filter: drop-shadow(0 4px 16px rgba(80,40,0,0.45));
}

/* Subtitle below logo */
.parch-subtitle {
  font-family: 'Cinzel', 'Palatino Linotype', Georgia, serif;
  font-size: clamp(1.05rem, 2.4vw, 1.5rem);
  font-weight: 600;
  color: #3d1a00;
  text-align: center;
  margin: 14px 0 0;
  line-height: 1.5;
  text-shadow: 0 1px 3px rgba(220,180,80,0.35);
}

/* ══════════════════════════════════════════════════════════════════
   TEXT BLOCK: description + motto + buttons
   ══════════════════════════════════════════════════════════════════ */
.parch-v2-textblock {
  display: flex; flex-direction: column; align-items: center; text-align: center;
  width: 100%; max-width: 680px;
  position: relative; z-index: 6;
}

.parch-divider {
  width: 60%; height: 2px; margin: 10px auto;
  background: linear-gradient(90deg, transparent, #b8922a 20%, #d4aa44 50%, #b8922a 80%, transparent);
  border-radius: 2px; opacity: 0.8;
}

.parch-desc {
  font-family: 'Lora', 'Palatino Linotype', Georgia, serif;
  font-size: clamp(0.93rem, 1.7vw, 1.12rem);
  color: #2c1a00;
  line-height: 1.78;
  margin: 6px 0 4px;
  text-shadow: 0 1px 3px rgba(255,240,200,0.6);
  font-weight: 600;
}
.parch-desc strong { color: #1a0c00; }

.parch-motto {
  font-family: 'Cinzel', 'Palatino Linotype', Georgia, serif;
  font-size: clamp(1.05rem, 2.2vw, 1.42rem);
  font-weight: 600;
  color: #6a3600;
  letter-spacing: 0.08em;
  font-style: italic;
  margin: 10px 0 20px;
  text-shadow: 1px 1px 4px rgba(220,180,60,0.45);
}

/* ── Buttons ──────────────────────────────────────────────────── */
.parch-btns {
  display: flex; gap: 20px; flex-wrap: wrap;
  justify-content: center; margin-top: 6px;
}
.parch-btn {
  display: inline-block; padding: 14px 38px;
  font-family: 'Cinzel', Georgia, serif;
  font-size: 1rem; font-weight: 700; letter-spacing: 0.1em;
  text-decoration: none; border-radius: 6px; cursor: pointer;
  transition: all 0.25s ease; border: 2px solid transparent;
  white-space: nowrap;
}
.parch-btn-primary {
  background: linear-gradient(135deg, #c49a28 0%, #e8c040 50%, #c49a28 100%);
  color: #1a0e00; border-color: #a07820;
  box-shadow: 0 3px 14px rgba(180,140,20,0.45), inset 0 1px 0 rgba(255,240,180,0.4);
}
.parch-btn-primary:hover {
  background: linear-gradient(135deg, #d4aa38 0%, #f0d050 50%, #d4aa38 100%);
  box-shadow: 0 6px 22px rgba(200,160,30,0.55); transform: translateY(-2px);
}
.parch-btn-secondary {
  background: linear-gradient(135deg, #0d2048 0%, #1a3668 100%);
  color: #e8d898; border-color: #c49a28;
  box-shadow: 0 3px 12px rgba(10,20,60,0.45);
}
.parch-btn-secondary:hover {
  background: linear-gradient(135deg, #1a3668 0%, #243c78 100%);
  box-shadow: 0 6px 22px rgba(10,20,60,0.55); transform: translateY(-2px);
}

/* ══════════════════════════════════════════════════════════════════
   RESPONSIVE
   ══════════════════════════════════════════════════════════════════ */

/* Large desktop (≥1400px) */
@media (min-width: 1400px) {
  .hero-parchment { padding: 72px 80px 60px; }
  .parch-v2-scene  { max-width: 1120px; }
  .parch-v2-torch-col { width: 240px; padding-top: 128px; }
  .parch-v2-flame  { width: 136px; top: 22px; }
  .parch-v2-cupglow { width: 104px; height: 82px; top: 136px; }
  .parch-v2-logotext { max-width: 600px; }
  .parch-v2-header-row { gap: 52px; }
  .parch-v2-textblock { max-width: 760px; }
}

/* Tablet (≤900px) */
@media (max-width: 900px) {
  .hero-parchment   { padding: 80px 24px 48px; }
  .parch-v2-scene   { max-width: 840px; gap: 10px; }
  .parch-v2-header-row { gap: 28px; }
  .parch-v2-torch-col  { width: 168px; padding-top: 92px; }
  .parch-v2-flame  { width: 96px; top: 15px; }
  .parch-v2-cupglow { width: 74px; height: 58px; top: 98px; }
  .parch-v2-logotext  { max-width: 380px; }
  .parch-subtitle  { font-size: 1.1rem; }
  .parch-v2-textblock { max-width: 540px; }
  .parch-btn { padding: 12px 28px; font-size: 0.93rem; }
}

/* Mobile landscape / small tablet (≤680px) */
@media (max-width: 680px) {
  .hero-parchment {
    padding: 80px 16px 44px;
    min-height: 100svh;
    align-items: flex-start;
  }
  .parch-v2-scene   { gap: 8px; padding-top: 4px; }
  .parch-v2-header-row {
    flex-direction: row;
    align-items: flex-start;
    gap: 14px;
  }
  .parch-v2-torch-col { width: 110px; padding-top: 60px; }
  .parch-v2-flame  { width: 62px; top: 10px; }
  .parch-v2-cupglow { width: 50px; height: 40px; top: 64px; }
  .parch-v2-title-col { align-items: flex-start; text-align: left; }
  .parch-v2-logotext  { max-width: 220px; }
  .parch-subtitle  { font-size: 0.88rem; margin-top: 8px; }
  .parch-flame-glow { width: 220px; height: 200px; top: 60px; left: 18%; }
  .parch-divider   { width: 88%; }
  .parch-btns { gap: 12px; }
  .parch-btn  { padding: 11px 22px; font-size: 0.86rem; }
  .parch-v2-textblock { max-width: 100%; }
  .parch-desc  { font-size: 0.88rem; }
  .parch-motto { font-size: 0.98rem; }
}

/* Mobile portrait (≤440px) — stack vertically */
@media (max-width: 440px) {
  .hero-parchment { padding: 80px 14px 40px; }
  .parch-v2-header-row {
    flex-direction: column;
    align-items: center;
    gap: 8px;
  }
  .parch-v2-torch-col {
    width: 120px; padding-top: 66px;
    align-self: center;
  }
  .parch-v2-flame  { width: 68px; top: 10px; }
  .parch-v2-cupglow { width: 56px; height: 44px; top: 70px; }
  .parch-v2-title-col { align-items: center; text-align: center; }
  .parch-v2-logotext  { max-width: 260px; }
  .parch-subtitle  { font-size: 0.9rem; }
  .parch-btns { flex-direction: column; align-items: center; gap: 10px; }
  .parch-btn  { width: 100%; max-width: 240px; text-align: center; }
  .parch-flame-glow { left: 50%; width: 200px; height: 180px; top: 70px; }
}
