/* =====================================================================
   Homepage premium sections (v40) — loaded only by templates/info-portal/home.php
   Why This Website · History · Personalities · Gallery · Business ·
   Get Started · Final CTA (+ mobile edge fix)
   ===================================================================== */
.hp-sec svg { width: 1.1em; height: 1.1em; flex-shrink: 0; }
.hp-sec { position: relative; }
.hp-sec a { text-decoration: none; }

/* ---- Section heading ---- */
.hp-head { margin-bottom: 2rem; }
.hp-head h2 {
  display: inline-block;
  position: relative;
  padding: 0 0.2rem;
  background: linear-gradient(135deg, var(--kp-red, #b01c2e), var(--kp-navy, #1b3a6b));
  -webkit-background-clip: text; background-clip: text;
  -webkit-text-fill-color: transparent; color: transparent;
}
.hp-head::before { content: none !important; }
.hp-head::after { width: 84px !important; height: 4px !important; margin-top: .7rem; }
.hp-eyebrow {
  display: inline-flex; align-items: center; justify-content: center;
  width: 46px; height: 46px; margin-bottom: .7rem; border-radius: 50%;
  color: #2b1b00; background: linear-gradient(135deg, #d4a12a, #b0801a);
  box-shadow: 0 8px 20px rgba(212,161,42,.35), 0 0 0 5px rgba(212,161,42,.16);
}
.hp-eyebrow svg { width: 22px; height: 22px; }

.hp-more { text-align: center; margin: 2rem 0 0; display: flex; gap: .8rem; justify-content: center; flex-wrap: wrap; }
.hp-more .btn { display: inline-flex; align-items: center; gap: .45rem; text-decoration: none; }

.hp-link { display: inline-flex; align-items: center; gap: .35rem; font-weight: 700; font-size: .88rem; color: var(--kp-red, #b01c2e); transition: gap .2s; }
a:hover > .hp-link, a:hover .hp-link { gap: .6rem; }

.hp-chip {
  position: absolute; top: .7rem; left: .7rem; z-index: 2;
  display: inline-flex; align-items: center; gap: .3rem;
  padding: .22rem .7rem; border-radius: 999px; font-size: .74rem; font-weight: 700;
  color: #2b1b00; background: linear-gradient(135deg, #d4a12a, #b0801a);
  box-shadow: 0 4px 12px rgba(0,0,0,.2);
}
.hp-chip-dark { left: auto; right: .7rem; background: rgba(18,41,76,.82); backdrop-filter: blur(4px); }
.hp-chip-soft { position: static; color: var(--kp-red-dark, #8c1322); background: var(--kp-red-soft, #fdecee); box-shadow: none; margin-bottom: .55rem; }

/* ---- Grids ---- */
.hp-grid { display: grid; gap: 1.3rem; }
.hp-grid-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
@media (max-width: 1000px) { .hp-grid-4 { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 520px)  { .hp-grid { gap: .85rem; } }

/* ---- 1 & 2. Why This Website / History: rich panel ---- */
.hp-panel {
  position: relative; max-width: 980px; margin: 0 auto;
  padding: 2.2rem 2.4rem;
  background: linear-gradient(180deg, #fff, var(--kp-cream, #fffaf5));
  border: 1px solid var(--kp-line, #e9e2da);
  border-radius: 22px;
  box-shadow: 0 18px 46px rgba(25,30,45,.09);
  overflow: hidden;
}
.hp-panel::before {
  content: ""; position: absolute; inset: 0 0 auto 0; height: 5px;
  background: linear-gradient(90deg, var(--kp-red, #b01c2e), var(--kp-gold, #d4a12a), var(--kp-navy, #1b3a6b));
}
.hp-panel::after {
  content: "\2766"; position: absolute; right: 1.2rem; bottom: -1.2rem;
  font-size: 9rem; line-height: 1; color: var(--kp-gold, #d4a12a); opacity: .08; pointer-events: none;
}
.hp-panel .rt-body { position: relative; z-index: 1; }
.hp-panel h3 { font-size: clamp(1.2rem, 2.4vw, 1.55rem); color: var(--kp-red-dark, #8c1322); margin: 0 0 1rem; }
.hp-panel h4 {
  display: flex; align-items: center; gap: .6rem;
  margin: 1.7rem 0 .6rem; font-size: 1.08rem; color: var(--kp-navy, #1b3a6b);
}
.hp-panel h4::before {
  content: ""; width: 10px; height: 10px; flex-shrink: 0; transform: rotate(45deg);
  background: linear-gradient(135deg, #d4a12a, #b0801a); border-radius: 2px;
  box-shadow: 0 0 0 4px rgba(212,161,42,.18);
}
.hp-panel p { line-height: 1.85; color: #3a4156; margin: 0 0 1rem; }
.hp-panel strong { color: var(--kp-red-dark, #8c1322); }
.hp-panel blockquote {
  margin: 1.2rem 0; padding: 1rem 1.3rem; border-left: 4px solid var(--kp-gold, #d4a12a);
  background: var(--kp-gold-soft, #fdf4e0); border-radius: 0 14px 14px 0; font-style: italic;
}

/* Why: feature list -> 2-col numbered cards */
.hp-why .hp-panel ul { list-style: none; padding: 0; margin: 1rem 0 0; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .9rem; counter-reset: hpw; }
.hp-why .hp-panel li {
  counter-increment: hpw; position: relative; line-height: 1.65;
  padding: 1rem 1rem 1rem 3.5rem; background: #fff;
  border: 1px solid var(--kp-line, #e9e2da); border-radius: 16px;
  box-shadow: 0 2px 10px rgba(25,30,45,.05);
  transition: transform .2s, box-shadow .2s, border-color .2s;
}
.hp-why .hp-panel li::before {
  content: counter(hpw); position: absolute; left: .9rem; top: 1rem;
  width: 30px; height: 30px; display: flex; align-items: center; justify-content: center;
  font-weight: 800; font-size: .85rem; color: #fff; border-radius: 50%;
  background: linear-gradient(135deg, var(--kp-red, #b01c2e), var(--kp-red-dark, #8c1322));
  box-shadow: 0 4px 10px rgba(176,28,46,.3);
}
.hp-why .hp-panel li:hover { transform: translateY(-3px); box-shadow: 0 10px 26px rgba(25,30,45,.12); border-color: rgba(176,28,46,.3); }
.hp-why .hp-panel li strong { display: block; margin-bottom: .15rem; }

/* History: timeline look */
.hp-history .hp-panel { background: linear-gradient(135deg, #fffaf5 0%, #fff 55%, #f3f6fc 100%); }
.hp-history .hp-panel .rt-body { padding-left: 1.6rem; border-left: 2px dashed rgba(212,161,42,.7); }
.hp-history .hp-panel h4 { margin-left: -2.35rem; }
.hp-history .hp-panel h4::before { background: linear-gradient(135deg, var(--kp-red, #b01c2e), var(--kp-red-dark, #8c1322)); box-shadow: 0 0 0 4px #fff, 0 0 0 6px rgba(212,161,42,.7); }

/* ---- 3. Personalities ---- */
.hp-person {
  display: flex; flex-direction: column; overflow: hidden; color: inherit;
  background: #fff; border: 1px solid var(--kp-line, #e9e2da); border-radius: 20px;
  box-shadow: 0 2px 10px rgba(25,30,45,.06);
  transition: transform .25s, box-shadow .25s;
}
.hp-person:hover { transform: translateY(-6px); box-shadow: 0 20px 46px rgba(25,30,45,.16); }
.hp-person-photo {
  position: relative; display: block; aspect-ratio: 1 / 1; overflow: hidden;
  background: linear-gradient(135deg, #12294c, #b01c2e);
}
.hp-person-photo img { width: 100%; height: 100%; object-fit: cover; object-position: center top; display: block; transition: transform .5s; }
.hp-person:hover .hp-person-photo img { transform: scale(1.07); }
.hp-person-photo::after { content: ""; position: absolute; inset: auto 0 0 0; height: 40%; background: linear-gradient(transparent, rgba(18,41,76,.55)); pointer-events: none; }
.hp-person-initial { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; font-size: 4rem; font-weight: 800; color: rgba(255,255,255,.9); }
.hp-person-body { display: flex; flex-direction: column; gap: .25rem; padding: 1rem 1.1rem 1.2rem; border-top: 4px solid var(--kp-gold, #d4a12a); }
.hp-person-body h3 { margin: 0; font-size: 1.08rem; color: var(--kp-ink, #1d2433); }
.hp-person-role { color: var(--kp-red, #b01c2e); font-weight: 600; font-size: .9rem; }
.hp-person-loc { display: inline-flex; align-items: center; gap: .3rem; color: var(--kp-muted, #66708a); font-size: .82rem; }
.hp-person-body .hp-link { margin-top: .5rem; }

/* ---- 4. Gallery ---- */
.hp-album {
  position: relative; display: block; aspect-ratio: 4 / 5; overflow: hidden; color: #fff;
  border-radius: 20px; background: linear-gradient(135deg, #12294c, #8c1322);
  box-shadow: 0 6px 20px rgba(25,30,45,.14);
  transition: transform .25s, box-shadow .25s;
}
.hp-album:hover { transform: translateY(-6px); box-shadow: 0 22px 50px rgba(25,30,45,.26); }
.hp-album img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; transition: transform .6s; }
.hp-album:hover img { transform: scale(1.08); }
.hp-album-ph { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; opacity: .35; }
.hp-album-ph svg { width: 3.2rem; height: 3.2rem; }
.hp-album::after { content: ""; position: absolute; inset: 0; background: linear-gradient(transparent 38%, rgba(10,18,38,.88)); }
.hp-album-cap { position: absolute; left: 0; right: 0; bottom: 0; z-index: 2; padding: 1.1rem 1.1rem 1.2rem; display: flex; flex-direction: column; gap: .35rem; }
.hp-album-cap h3 { margin: 0; color: #fff; font-size: 1.05rem; text-shadow: 0 2px 8px rgba(0,0,0,.4); }
.hp-album-cap .hp-link { color: #f6d98a; }

/* ---- 5. Business ---- */
.hp-biz-card {
  display: flex; flex-direction: column; align-items: flex-start; gap: .1rem; color: inherit;
  padding: 1.3rem 1.2rem 1.2rem; background: #fff; position: relative; overflow: hidden;
  border: 1px solid var(--kp-line, #e9e2da); border-radius: 20px;
  box-shadow: 0 2px 10px rgba(25,30,45,.06);
  transition: transform .25s, box-shadow .25s, border-color .25s;
}
.hp-biz-card::before { content: ""; position: absolute; inset: 0 0 auto 0; height: 4px; background: linear-gradient(90deg, var(--kp-red, #b01c2e), var(--kp-gold, #d4a12a)); }
.hp-biz-card:hover { transform: translateY(-6px); box-shadow: 0 20px 46px rgba(25,30,45,.15); border-color: rgba(176,28,46,.3); }
.hp-biz-logo {
  width: 68px; height: 68px; margin-bottom: .8rem; border-radius: 18px; overflow: hidden;
  display: flex; align-items: center; justify-content: center;
  background: linear-gradient(135deg, var(--kp-gold-soft, #fdf4e0), var(--kp-red-soft, #fdecee));
  color: var(--kp-red, #b01c2e); border: 1px solid var(--kp-line, #e9e2da);
}
.hp-biz-logo img { width: 100%; height: 100%; object-fit: cover; }
.hp-biz-logo svg { width: 30px; height: 30px; }
.hp-biz-card h3 { margin: 0 0 .25rem; font-size: 1.08rem; color: var(--kp-ink, #1d2433); }
.hp-biz-card p { margin: .4rem 0 .5rem; color: var(--kp-muted, #66708a); font-size: .88rem; line-height: 1.55; }
.hp-biz-card .hp-link { margin-top: auto; padding-top: .5rem; }

/* ---- 6. Get Started ---- */
.hp-steps { list-style: none; margin: 0 auto 2rem; padding: 0; display: flex; justify-content: center; align-items: center; gap: .5rem; flex-wrap: wrap; max-width: 760px; }
.hp-steps li { display: inline-flex; align-items: center; gap: .6rem; font-weight: 700; color: var(--kp-navy, #1b3a6b); }
.hp-steps li + li::before { content: ""; width: 38px; height: 2px; margin-right: .5rem; background: linear-gradient(90deg, var(--kp-gold, #d4a12a), transparent); }
.hp-step-n { width: 34px; height: 34px; display: inline-flex; align-items: center; justify-content: center; border-radius: 50%; color: #2b1b00; font-weight: 800; background: linear-gradient(135deg, #d4a12a, #b0801a); box-shadow: 0 5px 14px rgba(212,161,42,.4); }
.hp-start-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1.4rem; max-width: 860px; margin: 0 auto; }
.hp-start-card {
  position: relative; overflow: hidden; text-align: center;
  padding: 2rem 1.6rem 1.8rem; background: #fff; border-radius: 22px;
  border: 1px solid var(--kp-line, #e9e2da); border-top: 4px solid var(--kp-gold, #d4a12a);
  box-shadow: 0 8px 26px rgba(25,30,45,.09);
  transition: transform .25s, box-shadow .25s;
}
.hp-start-card:hover { transform: translateY(-5px); box-shadow: 0 22px 50px rgba(25,30,45,.16); }
.hp-start-icon {
  width: 64px; height: 64px; margin: 0 auto 1rem; border-radius: 20px;
  display: flex; align-items: center; justify-content: center;
  color: var(--kp-red, #b01c2e); background: var(--kp-red-soft, #fdecee);
}
.hp-start-icon svg { width: 30px; height: 30px; }
.hp-start-card h3 { margin: 0 0 .5rem; font-size: 1.3rem; }
.hp-start-card p { margin: 0 0 1.3rem; color: var(--kp-muted, #66708a); line-height: 1.6; }
.hp-start-card .btn { display: inline-flex; align-items: center; gap: .45rem; text-decoration: none; }
.hp-start-primary { background: linear-gradient(135deg, #b01c2e 0%, #8c1322 60%, #12294c 130%); border-color: rgba(212,161,42,.6); }
.hp-start-primary h3 { color: #fff; }
.hp-start-primary p { color: rgba(255,255,255,.85); }
.hp-start-primary .hp-start-icon { background: rgba(255,255,255,.14); color: #f6d98a; }
@media (max-width: 640px) {
  .hp-start-grid { grid-template-columns: 1fr; }
  .hp-steps { gap: .4rem .2rem; }
  .hp-steps li { font-size: .82rem; gap: .35rem; }
  .hp-steps li + li::before { width: 14px; margin-right: .1rem; }
}

/* ---- 7. Final CTA + mobile edge fix ----
   Root cause of the border touching the screen on mobile: the generic
   "main.home > section" rule gives every direct section its own
   left/right padding but zero margin, so the CTA box itself spans
   edge-to-edge of the viewport. Keep the box inset on every width. */
main.home > .cta-final.hp-cta {
  box-sizing: border-box;
  width: calc(100% - 2.5rem);
  max-width: 1240px;
  margin: 2.2rem auto;
  padding: 3rem 2rem;
  position: relative; overflow: hidden;
}
main.home > .cta-final.hp-cta::before {
  content: ""; position: absolute; width: 320px; height: 320px; right: -90px; top: -120px; border-radius: 50%;
  background: radial-gradient(circle, rgba(212,161,42,.28), transparent 70%); pointer-events: none;
}
.hp-cta h2 { color: #fff; font-size: clamp(1.4rem, 3.6vw, 2.2rem); margin: 0 0 .6rem; position: relative; }
.hp-cta p { color: rgba(255,255,255,.88); margin: 0 auto; position: relative; }
.hp-cta .hp-cta-btns { display: flex; justify-content: center; flex-wrap: wrap; gap: .9rem; margin-top: 1.6rem; position: relative; }
.hp-cta .hp-cta-btns .btn { text-decoration: none; padding: .8rem 1.7rem; }
.hp-cta .btn-outline-light { border-radius: 999px; background: rgba(255,255,255,.1); border: 2px solid rgba(255,255,255,.75); color: #fff; font-weight: 700; }
.hp-cta .btn-outline-light:hover { background: #fff; color: var(--kp-red-dark, #8c1322); }

/* ---- Mobile ---- */
@media (max-width: 700px) {
  .hp-panel { padding: 1.5rem 1.15rem; border-radius: 18px; }
  .hp-why .hp-panel ul { grid-template-columns: 1fr; }
  .hp-history .hp-panel .rt-body { padding-left: 1.1rem; }
  .hp-history .hp-panel h4 { margin-left: -1.75rem; }
  .hp-head { margin-bottom: 1.4rem; }
  .hp-person-body { padding: .8rem .8rem 1rem; }
  .hp-person-body h3 { font-size: .95rem; }
  .hp-album-cap h3 { font-size: .92rem; }
  .hp-biz-card { padding: 1.1rem .9rem; }
  main.home > .cta-final.hp-cta { width: calc(100% - 2rem); margin: 1.6rem auto; padding: 2rem 1.1rem; border-radius: 18px; }
  .hp-cta .hp-cta-btns { flex-direction: column; align-items: stretch; margin-top: 1.4rem; }
  .hp-cta .hp-cta-btns .btn { text-align: center; justify-content: center; }
}
@media (prefers-reduced-motion: reduce) {
  .hp-person, .hp-album, .hp-biz-card, .hp-start-card, .hp-why .hp-panel li, .hp-person img, .hp-album img { transition: none !important; }
  .hp-person:hover, .hp-album:hover, .hp-biz-card:hover, .hp-start-card:hover { transform: none; }
}
