
/* ============================================
   iHuB Phase 5 — Page-by-Page Visual Polish
   Purpose: harmonise spacing, cards, forms, heroes,
   typography and conversion elements without changing
   the approved brand palette or navigation foundation.
   ============================================ */

:root {
  --phase5-content-max: 760px;
  --phase5-card-shadow: 0 14px 34px rgba(10, 25, 47, 0.08);
  --phase5-card-shadow-hover: 0 20px 42px rgba(10, 25, 47, 0.13);
}

/* Shared page rhythm */
.page-hero,
.service-hero,
.landing-hero-section,
.ds-hero-section,
.mpe-hero-section {
  isolation: isolate;
}

.page-hero .container,
.service-hero .container,
.landing-hero-section .container,
.ds-hero-section .container,
.mpe-hero-section .container {
  position: relative;
  z-index: 1;
}

.section-header,
.page-hero-content {
  max-width: var(--phase5-content-max);
}

.section-header.text-center {
  margin-inline: auto;
}

.section-title,
.editorial-title,
.featured-article-title,
.press-kit-title,
.media-newsletter-title {
  text-wrap: balance;
}

.section p,
.section li,
.page-hero-description {
  text-wrap: pretty;
}

/* Consistent content cards */
.service-overview-card,
.consultancy-card,
.process-card,
.portfolio-card,
.value-card,
.course-card,
.event-card,
.contact-card,
.media-card,
.resource-card,
.case-study-card {
  transition: transform 180ms ease, box-shadow 180ms ease, border-color 180ms ease;
}

.service-overview-card:hover,
.consultancy-card:hover,
.process-card:hover,
.portfolio-card:hover,
.value-card:hover,
.course-card:hover,
.event-card:hover,
.contact-card:hover,
.media-card:hover,
.resource-card:hover,
.case-study-card:hover {
  transform: translateY(-3px);
  box-shadow: var(--phase5-card-shadow-hover);
}

/* Service/Consultancy overview pages */
.overview-page {
  padding-block: clamp(3.5rem, 7vw, 6rem);
}

.overview-page-header {
  max-width: 780px;
  margin-bottom: clamp(2rem, 5vw, 3.5rem);
}

.overview-page-header h1 {
  margin-bottom: 1rem;
  text-wrap: balance;
}

.overview-page-header p {
  max-width: 680px;
  color: var(--colour-text-secondary);
  font-size: clamp(1rem, 1.7vw, 1.15rem);
}

.overview-card-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: clamp(1rem, 2.5vw, 1.5rem);
}

.overview-card {
  display: flex;
  flex-direction: column;
  min-width: 0;
  height: 100%;
  padding: clamp(1.35rem, 3vw, 2rem);
  background: var(--colour-secondary);
  border: 1px solid var(--colour-border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
}

.overview-card-icon {
  width: 3.25rem;
  height: 3.25rem;
  display: grid;
  place-items: center;
  margin-bottom: 1.25rem;
  border-radius: 1rem;
  background: rgba(212, 175, 55, 0.12);
  color: var(--colour-accent-dark);
  font-weight: 800;
}

.overview-card h2,
.overview-card h3 {
  margin-bottom: 0.65rem;
  color: var(--colour-primary);
  font-family: var(--font-serif);
  font-size: clamp(1.25rem, 2vw, 1.55rem);
}

.overview-card p {
  margin-bottom: 1.25rem;
  color: var(--colour-text-secondary);
  line-height: var(--leading-relaxed);
}

.overview-card .btn {
  margin-top: auto;
  align-self: flex-start;
}

/* Consistent CTA hierarchy */
.cta-section {
  position: relative;
  overflow: hidden;
}

.cta-section .section-title {
  max-width: 820px;
  margin-inline: auto;
}

.cta-section p {
  max-width: 680px;
  margin-inline: auto;
}

/* Forms: make long inline-form pages feel intentional */
.form-card,
.social-form-card,
.registration-card {
  width: 100%;
  max-width: 760px;
  margin-inline: auto;
}

.form-card input,
.form-card textarea,
.form-card select,
.social-form-card input,
.social-form-card textarea,
.social-form-card select,
.registration-card input,
.registration-card textarea,
.registration-card select {
  max-width: 100%;
  box-sizing: border-box;
}

input:focus-visible,
textarea:focus-visible,
select:focus-visible,
button:focus-visible,
a:focus-visible {
  outline: 3px solid rgba(212, 175, 55, 0.35);
  outline-offset: 2px;
}

/* Images should never become oddly stretched */
.section img,
.page-hero img,
.service-hero img,
.landing-hero-section img,
.ds-hero-section img,
.mpe-hero-section img {
  max-width: 100%;
}

/* Special course/landing pages */
.landing-hero-section,
.ds-hero-section,
.mpe-hero-section {
  padding-block: clamp(4rem, 8vw, 7rem);
}

.landing-title,
.ds-title,
.mpe-title {
  text-wrap: balance;
}

.hero-cta-box,
.pricing-card {
  box-sizing: border-box;
}

/* Prevent promotional cards from becoming too wide */
.hero-cta-box {
  width: min(100%, 650px);
}

/* Footer polish */
.site-footer {
  margin-top: auto;
}

.footer-description {
  max-width: 34rem;
}

.footer-link,
.footer-legal-link {
  transition: color 160ms ease, opacity 160ms ease;
}

/* Tablet */
@media (max-width: 1023px) {
  .overview-card-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .section-title {
    max-width: 100%;
  }
}

/* Phones */
@media (max-width: 767px) {
  .overview-page {
    padding-block: 3rem;
  }

  .overview-card-grid {
    grid-template-columns: 1fr;
  }

  .overview-card {
    padding: 1.35rem;
  }

  .overview-card .btn,
  .cta-section .btn {
    width: 100%;
  }

  .landing-hero-section,
  .ds-hero-section,
  .mpe-hero-section {
    padding-block: 3.5rem;
  }

  .hero-cta-box {
    padding: 1.25rem;
  }

  .footer-description {
    max-width: none;
  }
}

/* Very small phones */
@media (max-width: 479px) {
  .overview-page-header h1 {
    font-size: clamp(1.9rem, 9vw, 2.45rem);
  }

  .overview-card-icon {
    width: 3rem;
    height: 3rem;
  }
}

@media (prefers-reduced-motion: reduce) {
  .service-overview-card,
  .consultancy-card,
  .process-card,
  .portfolio-card,
  .value-card,
  .course-card,
  .event-card,
  .contact-card,
  .media-card,
  .resource-card,
  .case-study-card,
  .footer-link,
  .footer-legal-link {
    transition: none;
  }
}
