/* ITIDA Innovation Bridge — light corporate theme. Content per PDF only. */

:root {
  --blue-900: #0c2d4a;
  --blue-800: #134567;
  --blue-600: #1a6fb3;
  --blue-500: #2b7ec4;
  --blue-200: #c5dcef;
  --blue-100: #e8f2fa;
  --blue-50: #f4f8fc;

  --gray-900: #1a2332;
  --gray-700: #3d4f62;
  --gray-600: #556575;
  --gray-500: #5f6f80;
  --gray-200: #e2e8f0;
  --gray-100: #f1f5f9;

  /* Section title accent (vertical bar) */
  --heading-accent: #8f1c24;

  --white: #ffffff;
  --off-white: #f8fafc;

  --shadow-sm: 0 1px 2px rgba(12, 45, 74, 0.05);
  --shadow-md: 0 4px 16px rgba(12, 45, 74, 0.07);
  --shadow-lg: 0 12px 40px rgba(12, 45, 74, 0.09);

  --radius-sm: 8px;
  --radius-md: 14px;
  --radius-lg: 20px;

  --font: "DM Sans", system-ui, -apple-system, sans-serif;
  --max: 1080px;
  --space: clamp(2.5rem, 5vw, 4rem);
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: var(--font);
  font-size: clamp(1rem, 0.95rem + 0.2vw, 1.0625rem);
  line-height: 1.65;
  color: var(--gray-700);
  background: var(--off-white);
  -webkit-font-smoothing: antialiased;
}

.site {
  min-height: 100vh;
  overflow: visible;
  max-height: none;
}

/* Override common host / web-part wrappers that clip embedded pages (SharePoint, iframes) */
main.site,
.content,
.section,
.overview__layout,
.section__body {
  overflow: visible !important;
  max-height: none !important;
}

#overview .section__body.iib-prose {
  height: auto !important;
}

/* Hero — same card shell as other sections (inside .content) */
.section.section--hero {
  color: var(--gray-900);
  position: relative;
  padding: clamp(2rem, 4.5vw, 3rem) clamp(1.75rem, 4vw, 2.5rem);
}

.section.section--hero::after {
  content: "";
  position: absolute;
  left: 50%;
  bottom: 0;
  transform: translateX(-50%);
  width: min(100% - 2rem, calc(var(--max) - 3rem));
  height: 3px;
  background: linear-gradient(90deg, var(--blue-600), var(--blue-500));
  border-radius: 3px 3px 0 0;
  opacity: 0.85;
  pointer-events: none;
}

.section.section--hero::before {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  background: radial-gradient(ellipse 90% 70% at 15% -30%, var(--blue-50), transparent 55%),
    radial-gradient(ellipse 60% 50% at 100% 0%, rgba(26, 111, 179, 0.05), transparent 50%);
  pointer-events: none;
}

.hero__inner {
  position: relative;
  z-index: 1;
  margin: 0 auto;
}

/* Logos row — same pattern as Project NINJA (itida.gov.eg) */
.hero__branding {
  margin-top: 1.2rem;
  text-align: center;
}

.iib-hero-supported-label {
  margin: 0 0 1rem;
  font-size: 0.8125rem;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--gray-500);
}

.hero__logos {
  display: inline-flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 0.65rem 1rem;
  padding: 0.65rem 1.25rem;
  background: var(--off-white);
  border: 1px solid var(--gray-200);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-sm);
}

.hero__logo {
  height: 52px;
  width: auto;
  max-height: 52px;
  object-fit: contain;
  display: block;
}

.hero__logo--itida,
.hero__logo--jica {
  height: 52px;
  max-height: 52px;
}

.hero__amp {
  font-size: 1.2rem;
  font-weight: 400;
  color: var(--gray-500);
  line-height: 1;
  user-select: none;
}

@media (min-width: 640px) {
  .hero__logo,
  .hero__logo--itida,
  .hero__logo--jica {
    height: 64px;
    max-height: 64px;
  }
}

/* Single-line program name; subtle horizontal scroll only if viewport is too narrow */
.iib-hero-heading {
  margin: 0;
  font-size: clamp(1.05rem, 0.55rem + 2.6vw, 3rem);
  font-weight: 700;
  line-height: 1.2;
  letter-spacing: -0.03em;
  color: var(--gray-900);
  text-align: center;
  white-space: normal;
}

.iib-hero-tagline {
  margin: 0.65rem auto 0;
  max-width: min(32rem, 100%);
  font-size: clamp(0.8125rem, 0.74rem + 0.28vw, 0.9375rem);
  font-weight: 500;
  line-height: 1.45;
  letter-spacing: 0.01em;
  color: var(--gray-600);
  text-align: center;
}

.content {
  max-width: var(--max);
  margin: 0 auto;
  padding: 1.25rem 1.5rem calc(var(--space) + 1rem);
  position: relative;
  /* Keep wrapper transparent: a full-height z-index layer here was covering the hero tagline & logos when the host layout overlaps columns. */
  background: transparent;
}

/* Consistent stacking for all section cards in the main column */
.content > .section {
  position: relative;
  z-index: 0;
}

/* Keep all local content layers under SharePoint floating UI. */
.site,
.content,
.section,
.card,
.steps__item,
.feature,
.benefit,
.timeline,
.timeline__item,
.callout,
.join-panel,
.overview__layout,
.overview__media {
  position: relative;
  z-index: 0;
}

/* Sections */
.section {
  background: var(--white);
  border: 1px solid var(--gray-200);
  border-radius: var(--radius-lg);
  padding: clamp(1.75rem, 4vw, 2.5rem);
  margin-bottom: 1.25rem;
  box-shadow: var(--shadow-sm);
}

.section:first-of-type {
  box-shadow: var(--shadow-md);
}

/* Hero card: no frame — only this section */
.section.section--hero {
  border: none;
  box-shadow: none;
}

.iib-section-title {
  margin: 0 0 1.25rem;
  font-size: clamp(1.2rem, 1rem + 0.8vw, 1.45rem);
  font-weight: 700;
  color: var(--gray-900);
  letter-spacing: -0.02em;
  padding-left: 0.9rem;
  border-left: 4px solid var(--heading-accent);
}

.iib-subsection-title {
  margin: 0 0 0.85rem;
  font-size: 1.02rem;
  font-weight: 700;
  color: var(--gray-900);
  line-height: 1.35;
  padding-left: 0.75rem;
  border-left: 3px solid var(--blue-200);
}

.iib-subsection-title--spaced {
  margin-top: 1.5rem;
}

.section__body {
  max-width: none;
  width: 100%;
}

.iib-benefits-intro {
  margin: 0 0 1rem;
  font-weight: 600;
  color: var(--gray-900);
}

.section--band {
  background: linear-gradient(135deg, var(--blue-100) 0%, var(--white) 100%);
  border-color: rgba(26, 111, 179, 0.15);
}

.iib-section-title--inverse {
  border-left-color: var(--heading-accent);
}

.iib-lead-paragraph {
  margin: 0;
  font-size: 1.075rem;
  line-height: 1.65;
  font-weight: 500;
  color: var(--gray-700);
}

.iib-lead-paragraph--inverse {
  max-width: 65ch;
}

/* Keep all key paragraph-style text consistent */
.iib-lead-paragraph {
  width: 100%;
  max-width: none;
}

.iib-prose-text,
.iib-lead-paragraph,
.iib-differentiator-text,
.iib-flow-step-text,
.iib-benefits-intro,
.iib-phase-note,
.iib-flow-note,
.iib-join-disclaimer,
.iib-contract-item-title,
.iib-contract-item-text,
.iib-deadline-banner__label,
.iib-deadline-banner__date,
.iib-benefit-card-text,
.iib-contract-block-footer,
.list li {
  font-size: 16px;
}

/* Body copy blocks — div-based for SharePoint isolation */
.iib-prose .iib-prose-text {
  margin: 0 0 1rem;
}

.iib-prose .iib-prose-text:last-child {
  margin-bottom: 0;
}

.iib-prose--tight .iib-prose-text {
  margin-bottom: 0.85rem;
}

.iib-prose--tight .iib-prose-text:last-child {
  margin-bottom: 0;
}

.iib-prose--compact .iib-flow-step-text,
.iib-prose--compact .iib-prose-text {
  margin: 0 0 0.75rem;
}

.iib-prose--compact .iib-flow-step-text:last-child,
.iib-prose--compact .iib-prose-text:last-child {
  margin-bottom: 0;
}

.iib-flow-step-text {
  line-height: 1.65;
  color: var(--gray-700);
  font-size: 0.98rem;
}

/* Lists */
.list {
  margin: 0.5rem 0 1rem;
  padding-left: 1.25rem;
  list-style-type: disc !important;
  list-style-position: outside !important;
  color: var(--gray-700);
}

.list li {
  margin-bottom: 0.35rem;
  display: list-item !important;
}

.list li::marker {
  color: var(--blue-600);
}

.steps__content .list,
.feature .list {
  padding-left: 1.35rem;
}

.feature .list--phase,
.timeline .list--phase {
  margin-top: 0.35rem;
  margin-bottom: 0.75rem;
  padding-left: 0;
}

/* Program phase bullet lists — explicit bullets for SharePoint hosts */
.list--phase {
  margin: 0;
  padding: 0;
  list-style: none !important;
  text-align: left;
}

.list--phase li {
  position: relative;
  margin: 0 0 0.5rem;
  padding: 0 0 0 1.15rem;
  display: block !important;
  text-align: left;
}

.list--phase li::before {
  content: "•";
  position: absolute;
  left: 0;
  top: 0;
  color: var(--blue-600);
  font-weight: 700;
  line-height: 1.65;
}

.list--phase li::marker {
  content: none;
}

.list--phase li:last-child {
  margin-bottom: 0;
}

.list li:last-child {
  margin-bottom: 0;
}

.iib-phase-note {
  margin: 1rem 0 0;
  font-size: 0.95rem;
  color: var(--gray-500);
  line-height: 1.55;
  text-align: left;
}

.iib-flow-note {
  margin: 0 0 1.25rem;
  padding: 0.9rem 1.15rem;
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--gray-900);
  line-height: 1.55;
  background: #fff3e0;
  border-radius: var(--radius-sm);
  border: 1px solid #f0c78a;
  border-left: 4px solid var(--heading-accent);
}

.iib-flow-step-date {
  display: inline;
  font-weight: 700;
  color: var(--heading-accent);
  white-space: nowrap;
}

@media (max-width: 639px) {
  .iib-flow-step-date {
    display: block;
    margin-top: 0.25rem;
    white-space: normal;
  }
}

/* Cards */
.card {
  background: var(--white);
  border: 1px solid var(--gray-200);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-sm);
}

/* Program phases — step layout */
.steps {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 1.25rem;
}

@media (min-width: 768px) {
  .steps--phases {
    grid-template-columns: 1fr 1fr;
    align-items: stretch;
  }

  /* Phase 3 — full width below Phases 1 & 2 */
  .steps--phases .steps__item:nth-child(3) {
    grid-column: 1 / -1;
  }
}

.steps__item {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 1rem 1.25rem;
  padding: 1.35rem 1.35rem 1.35rem 1.15rem;
  align-items: start;
}

.steps__marker {
  width: 2.5rem;
  height: 2.5rem;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 0.95rem;
  color: var(--white);
  background: linear-gradient(145deg, var(--blue-600), var(--blue-500));
  border-radius: var(--radius-sm);
  box-shadow: 0 2px 8px rgba(26, 111, 179, 0.25);
}

.iib-phase-card-title {
  margin: 0 0 0.75rem;
  font-size: 1rem;
  font-weight: 700;
  line-height: 1.35;
  color: var(--gray-900);
}

.steps__content .list {
  margin-bottom: 0;
}

.steps__content {
  text-align: left;
}

/* Feature grid — “What makes this program different?” */
.feature-grid {
  display: grid;
  gap: 1.25rem;
}

@media (min-width: 768px) {
  .feature-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  /* Card 5 — ITIDA’s ecosystem leadership — full row width */
  .feature-grid .feature:nth-child(5) {
    grid-column: 1 / -1;
  }
}

.feature {
  position: relative;
  padding: 1.5rem 1.5rem 1.5rem 1.35rem;
}

.feature__num {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 2rem;
  height: 2rem;
  padding: 0 0.5rem;
  margin-bottom: 0.85rem;
  font-size: 0.8rem;
  font-weight: 700;
  color: var(--blue-600);
  background: var(--blue-50);
  border-radius: var(--radius-sm);
  border: 1px solid var(--blue-100);
}

.iib-differentiator-title {
  margin: 0 0 0.75rem;
  font-size: 1.02rem;
  font-weight: 700;
  color: var(--gray-900);
  line-height: 1.3;
}

.iib-differentiator-text {
  margin: 0 0 0.75rem;
  font-size: 0.98rem;
}

.feature .iib-differentiator-text:last-child {
  margin-bottom: 0;
}

.feature .list {
  margin-top: 0.35rem;
}

/* Benefits */
.benefit-grid {
  display: grid;
  gap: 1rem;
  margin-bottom: 1.5rem;
}

@media (min-width: 640px) {
  .benefit-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

.benefit {
  padding: 1.15rem 1.2rem;
  display: grid;
  grid-template-columns: minmax(64px, 1fr) 5fr;
  align-items: center;
  gap: 0.9rem;
}

.benefit__photo {
  width: 100%;
  aspect-ratio: 1 / 1;
  border-radius: 12px;
  background-color: var(--gray-100);
  background-image: var(--benefit-image);
  background-repeat: no-repeat;
  background-position: center;
  background-size: cover;
  border: 1px solid var(--gray-200);
}

/* Program overview with right-side image */
.overview__layout {
  display: grid;
  gap: 1rem;
}

@media (min-width: 900px) {
  .overview__layout {
    grid-template-columns: 1.3fr 1.2fr;
    /* Top-align so a short image column does not inherit a huge stretched height from prose. */
    align-items: start;
    gap: 1.25rem;
  }
}

.overview__foot {
  grid-column: 1 / -1;
  margin-top: 0.25rem;
}

@media (min-width: 900px) {
  .overview__foot {
    margin-top: 0.5rem;
  }
}

.overview__media {
  min-height: 200px;
  /* Wider frame fits city + flag artwork; avoid 4:3 + cover which cropped the sides */
  aspect-ratio: 3 / 2;
  max-height: min(520px, 88vh);
  width: 100%;
  border-radius: var(--radius-md);
  border: 1px solid var(--gray-200);
  background-color: var(--blue-900);
  background-image: linear-gradient(rgba(8, 28, 46, 0.12), rgba(8, 28, 46, 0.12)),
    var(--overview-image),
    linear-gradient(180deg, var(--blue-900) 0%, var(--blue-800) 100%);
  /* contain = full image visible (no crop); letterboxing uses background behind it */
  background-size: 100% 100%, contain, 100% 100%;
  background-repeat: no-repeat, no-repeat, no-repeat;
  background-position: center, center, center;
  box-shadow: var(--shadow-sm);
}

.iib-benefit-card-text {
  margin: 0;
  font-weight: 500;
  line-height: 1.55;
  color: var(--gray-700);
}

/* Callouts */
.callout {
  border-radius: var(--radius-md);
  padding: 1.35rem 1.5rem;
  border: 1px solid var(--gray-200);
}

.callout--financial {
  background: linear-gradient(180deg, var(--blue-50) 0%, var(--white) 100%);
  border-color: rgba(26, 111, 179, 0.18);
  box-shadow: var(--shadow-sm);
}

.callout--financial .section__body {
  max-width: none;
}

.callout--contract {
  margin-top: 1.25rem;
  background: var(--gray-100);
  border-color: var(--gray-200);
}

.iib-contract-block-title {
  margin: 0 0 1rem;
  font-size: 0.9rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--blue-800);
}

.list--contract {
  margin: 0 0 1rem;
}

.list--contract li {
  margin-bottom: 1rem;
}

.iib-contract-item-title {
  margin: 0 0 0.65rem;
  font-size: 1rem;
  font-weight: 700;
  color: var(--gray-900);
  line-height: 1.35;
}

.iib-contract-item-text {
  margin: 0;
  font-size: 0.95rem;
  font-weight: 400;
  color: var(--gray-600);
  line-height: 1.6;
}

.iib-contract-block-footer {
  margin: 0;
  font-size: 0.95rem;
  color: var(--gray-500);
}

/* Timeline — program flow */
.timeline {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 1rem;
  position: relative;
}

@media (min-width: 900px) {
  .timeline::before {
    content: "";
    position: absolute;
    left: 0.85rem;
    top: 0.5rem;
    bottom: 2rem;
    width: 2px;
    background: linear-gradient(180deg, var(--blue-200), var(--gray-200));
    border-radius: 2px;
  }
}

.timeline__item {
  position: relative;
  padding: 1.35rem;
}

.iib-flow-step-title {
  margin: 0 0 0.85rem;
  font-size: 1rem;
  font-weight: 700;
  line-height: 1.35;
  color: var(--gray-900);
}

.timeline__step {
  color: var(--blue-600);
  font-weight: 800;
  margin-right: 0.25rem;
}

/* How to join */
.section--join {
  border: 2px solid rgba(26, 111, 179, 0.25);
  box-shadow: var(--shadow-md);
}

.join-panel {
  background: var(--blue-50);
  border-radius: var(--radius-md);
  padding: 1.5rem 1.5rem;
  border: 1px solid rgba(26, 111, 179, 0.12);
}

.join-panel .iib-prose {
  max-width: none;
  width: 100%;
}

.iib-join-form-btn {
  display: inline-block;
  margin: 0.35rem 0.15rem 0.35rem 0.2rem;
  padding: 0.55rem 1.35rem;
  font-size: 16px;
  font-weight: 600;
  font-family: inherit;
  line-height: 1.35;
  color: var(--white);
  text-decoration: none;
  border-radius: var(--radius-sm);
  background: linear-gradient(145deg, #6b1218 0%, var(--heading-accent) 50%, #4a0c10 100%);
  box-shadow: 0 2px 8px rgba(75, 12, 16, 0.35);
  transition: background 0.15s ease, box-shadow 0.15s ease, color 0.15s ease;
  -webkit-tap-highlight-color: rgba(90, 90, 90, 0.25);
}

.iib-join-form-btn:hover {
  font-size: 16px;
  font-weight: 600;
  color: var(--off-white);
  background: linear-gradient(145deg, #5a0f14 0%, #72141c 50%, #3d080c 100%);
  box-shadow: 0 4px 14px rgba(75, 12, 16, 0.42);
}

.iib-join-form-btn:active {
  font-size: 16px;
  font-weight: 600;
  color: var(--gray-200);
  background: linear-gradient(145deg, #4a0c10 0%, #631016 100%);
  box-shadow: 0 1px 6px rgba(75, 12, 16, 0.35);
}

.iib-join-form-btn:focus-visible {
  outline: 2px solid var(--gray-500);
  outline-offset: 3px;
}

.iib-join-form-btn:visited {
  color: var(--white);
}

.iib-join-form-btn:visited:hover {
  color: var(--off-white);
}

.iib-join-form-btn:visited:active {
  color: var(--gray-200);
}

.iib-join-disclaimer {
  margin: 1.25rem 0 0;
  padding: 1rem 1.15rem;
  background: var(--white);
  border-radius: var(--radius-sm);
  border: 1px solid var(--gray-200);
  font-size: 0.95rem;
  color: var(--gray-700);
  line-height: 1.55;
}

.iib-join-disclaimer--highlight {
  margin-top: 1rem;
  padding: 1.1rem 1.25rem;
  font-weight: 600;
  color: var(--gray-900);
  background: #fff8e6;
  border: 1px solid #e8c97a;
  border-left: 4px solid var(--heading-accent);
}

.iib-hero-deadline {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  align-items: center;
  gap: 0.35rem 0.5rem;
  margin-top: 1.25rem;
  text-align: center;
}

.iib-deadline-banner__label {
  font-size: 1rem;
  font-weight: 700;
  color: var(--heading-accent);
  letter-spacing: 0.01em;
}

.iib-deadline-banner__date {
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--gray-900);
}

.iib-join-deadline-block {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.35rem 0.5rem;
  margin: 1rem 0 1.25rem;
  padding: 0.85rem 1.15rem;
  background: linear-gradient(135deg, #fde8ea 0%, #fff5f5 100%);
  border: 2px solid var(--heading-accent);
  border-radius: var(--radius-sm);
  text-align: left;
  box-shadow: 0 2px 8px rgba(143, 28, 36, 0.12);
}

/* Reveal */
.reveal {
  opacity: 0;
  transform: translateY(12px);
  transition: opacity 0.5s ease, transform 0.5s ease;
}

.reveal.is-visible {
  opacity: 1;
  transform: translateY(0);
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  .reveal {
    opacity: 1;
    transform: none;
    transition: none;
  }
}