/* ═══════════════════════════════════════════════════════════════
   Page Base — Shared hero, section, container, button styles.
   Replaces duplicate patterns across 12+ page-specific CSS files.
   ═══════════════════════════════════════════════════════════════ */

/* ── Page wrapper ── */
.page-wrap {
  color: var(--color-text);
  font-family: var(--font-primary);
  line-height: var(--leading-normal);
}

/* ── Container ── */
.pg-container {
  max-width: var(--max-w-content);
  margin: 0 auto;
  padding: 0 var(--space-container);
}

.pg-container-wide {
  max-width: var(--max-w-wide);
  width: 80%;
}

/* ── Section ── */
.pg-section {
  padding: var(--space-section) 0;
}

.pg-section-header {
  text-align: center;
  margin-bottom: 40px;
}

.pg-section-header h2 {
  font-size: var(--text-3xl);
  font-weight: 700;
  line-height: var(--leading-tight);
  color: var(--color-text-dark);
  margin: 0 0 12px;
}

.pg-section-subtitle {
  font-size: var(--text-md);
  color: var(--color-text-light);
  margin-top: 12px;
}

/* ── Hero Banner (reusable) ── */
.pg-hero {
  position: relative;
  min-height: 60vh;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  color: var(--color-white);
  overflow: hidden;
  background: var(--color-bg-dark);
}

.pg-hero-bg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}

.pg-hero-bg-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.pg-hero-video {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.pg-hero-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(to bottom, rgba(0, 0, 0, 0.2), rgba(0, 0, 0, 0.4));
  z-index: 1;
}

.pg-hero-content {
  position: relative;
  z-index: 2;
  max-width: var(--max-w-hero);
  padding: 60px var(--space-container);
  color: #fff;
}

.pg-hero-content h1 {
  font-size: var(--text-5xl);
  font-weight: 800;
  margin: 0 0 16px;
  line-height: 1.15;
  color: #fff;
}

.pg-hero-subtitle {
  font-size: 1.15rem;
  opacity: 0.9;
  margin-bottom: 24px;
}

/* ── Hero Modifiers ── */
.pg-hero--product {
  min-height: 50vh;
}

.pg-hero--product .pg-hero-content {
  max-width: 800px;
  padding: 48px 24px;
}

.pg-hero--tall {
  min-height: 70vh;
}

.pg-hero--compact {
  min-height: auto;
  padding: 80px 0;
  background: linear-gradient(135deg, #0f172a 0%, #1e3a5f 100%);
}

.pg-hero--compact .pg-hero-content h1 {
  font-size: 3.5rem;
  word-break: break-word;
  overflow-wrap: break-word;
}

.pg-hero--minimal {
  min-height: 160px;
  background: #0c1220;
}

.pg-hero--grid-bg {
  background: #1b222d url('../assets/web-images/half-grid-overlay.png') center / cover no-repeat;
}

.pg-hero--fixed {
  min-height: 700px;
}

/* Logo in hero (replaces h1 for branded product pages) */
.pg-hero-logo {
  margin: 0 auto 20px;
  max-width: 300px;
  width: 90%;
}

.pg-hero-logo svg {
  width: 100%;
  height: auto;
  display: block;
}

/* Divider */
.pg-hero-divider {
  width: 60px;
  height: 3px;
  background: var(--color-primary);
  margin: 1.5rem auto;
}

/* ── Primary Button ── */
.pg-btn-primary {
  display: inline-block;
  background: var(--color-primary-dark);
  color: var(--color-white) !important;
  font-weight: 700;
  font-size: 0.88rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  padding: 14px 40px;
  text-decoration: none;
  border-radius: var(--radius-sm);
  box-shadow: var(--shadow-btn);
  transition: background var(--transition-normal), transform var(--transition-fast);
}

.pg-btn-primary:hover {
  background: var(--color-primary-hover);
  transform: translateY(-2px);
  text-decoration: none;
}

/* ── Centered text block ── */
.pg-center-text {
  max-width: var(--max-w-narrow);
  margin: 0 auto;
  text-align: center;
}

.pg-center-text p {
  font-size: var(--text-md);
  line-height: var(--leading-relaxed);
  color: var(--color-text-light);
  margin-bottom: 15px;
}

/* ── Workflow (alternating image+text) ── */
.pg-workflow {
  display: flex;
  gap: 40px;
  align-items: center;
  margin-bottom: 50px;
}

.pg-workflow-reverse {
  flex-direction: row-reverse;
}

.pg-workflow-media {
  flex: 1;
  min-width: 0;
}

.pg-workflow-media img {
  width: 100%;
  display: block;
  border-radius: var(--radius-md);
  object-fit: cover;
}

.pg-workflow-text {
  flex: 1;
  min-width: 0;
}

.pg-workflow-text h3 {
  font-size: var(--text-2xl);
  font-weight: 700;
  color: var(--color-text-dark);
  margin: 0 0 12px;
}

.pg-workflow-text p {
  font-size: var(--text-base);
  line-height: 1.7;
  color: var(--color-text-body);
  margin: 0;
}

.pg-workflow-text a {
  color: var(--color-primary);
}

/* ── Divider ── */
.pg-divider-block {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  margin-top: 12px;
}

.pg-divider-red {
  width: 60px;
  height: 3px;
  background: var(--color-primary);
}

.pg-divider-gray {
  width: 200px;
  height: 1px;
  background: var(--color-border);
}

/* ── Line pixels decoration ── */
.pg-line-pixels {
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
  opacity: 0.5;
  z-index: 2;
  pointer-events: none;
}

.pg-line-pixels img {
  width: 100%;
  display: block;
}

/* Portrait screens — cap hero height so it doesn't fill the tall viewport */
@media (orientation: portrait) and (min-width: 768px) {
  .pg-hero {
    min-height: auto;
    padding: 10rem 0 6rem;
  }
}

/* ── Responsive ── */
@media (max-width: 1024px) {
  .pg-container-wide { width: 90%; }
}

@media (max-width: 768px) {
  .pg-section { padding: var(--space-section-mobile) 0; }
  .pg-container-wide { width: 92%; }
  .pg-hero { min-height: 50vh; }
  .pg-hero-content h1 { font-size: 2rem; }
  .pg-section-header h2 { font-size: 24px; }
  .pg-workflow { flex-direction: column !important; gap: 24px; }
  .pg-hero--compact { padding: 50px 0; }
  .pg-hero--compact .pg-hero-content h1 { font-size: 2rem; }
  .pg-hero--tall { min-height: 50vh; }
  .pg-hero--fixed { min-height: 400px; }
  .pg-hero--minimal { min-height: 160px; }
  .pg-hero--product .pg-hero-logo { max-width: 220px; }
}

@media (max-width: 480px) {
  .pg-hero-content h1 { font-size: 1.6rem; }
  .pg-hero-content { padding: 40px 16px; }
}
