/**
 * SENTRE Theme — Layout
 * Container, sections, columns, grids, header, nav, footer.
 * No component-specific styles (buttons, cards, forms) — those are in components.css.
 * All values reference tokens.css variables.
 */

/* ─── Container ──────────────────────────────────────────── */

.sentre-container {
  width: 100%;
  max-width: 1280px;
  margin-left: auto;
  margin-right: auto;
  padding-left: 2rem;
  padding-right: 2rem;
}

@media (min-width: 992px) {
  .sentre-container {
    padding-left: 4rem;
    padding-right: 4rem;
  }
}

/* ─── Sections ───────────────────────────────────────────── */

.sentre-section {
  padding-top: 3rem;
  padding-bottom: 3rem;
}

@media (min-width: 768px) {
  .sentre-section {
    padding-top: 4rem;
    padding-bottom: 4rem;
  }
}

/* Section background variants */
.sentre-bg-white     { background-color: var(--color-white); }
.sentre-bg-gray      { background-color: var(--color-gray-lighter); }
.sentre-bg-gray-light { background-color: var(--color-gray-light); }
.sentre-bg-dark-blue {
  background-color: var(--color-blue);
  color: var(--color-white);
}
.sentre-bg-midnight  { background-color: #0c161d; }

/* ─── Two-column layout (60/40, 65/35, 50/50) ───────────── */

.sentre-2col {
  display: flex;
  flex-direction: column;
  gap: 3rem;
}

@media (min-width: 992px) {
  .sentre-2col {
    flex-direction: row;
    align-items: center;
    gap: 4rem;
  }

  .sentre-2col.align-top {
    align-items: flex-start;
  }
}

/* Column width classes — mobile: full width, desktop: fractional */
.sentre-col-60,
.sentre-col-40,
.sentre-col-50,
.sentre-col-65,
.sentre-col-35 {
  width: 100%;
}

@media (min-width: 992px) {
  .sentre-col-60 { width: 60%; flex-shrink: 0; }
  .sentre-col-40 { width: 40%; flex-shrink: 0; }
  .sentre-col-50 { width: 50%; flex-shrink: 0; }
  .sentre-col-65 { width: 65%; flex-shrink: 0; }
  .sentre-col-35 { width: 35%; flex-shrink: 0; }
}

/* ─── Card grids ─────────────────────────────────────────── */

/* 2-column grid */
.sentre-grid-2 {
  display: grid;
  grid-template-columns: 1fr;
  gap: 2rem;
}

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

/* 3-column grid */
.sentre-grid-3 {
  display: grid;
  grid-template-columns: 1fr;
  gap: 2rem;
}

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

@media (min-width: 1024px) {
  .sentre-grid-3 {
    grid-template-columns: repeat(3, 1fr);
  }
}

/* 4-column grid */
.sentre-grid-4 {
  display: grid;
  grid-template-columns: 1fr;
  gap: 2rem;
}

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

@media (min-width: 1200px) {
  .sentre-grid-4 {
    grid-template-columns: repeat(4, 1fr);
  }
}

/* ─── Hero ───────────────────────────────────────────────── */

.sentre-hero {
  position: relative;
  width: 100%;
  min-height: 650px;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  color: var(--color-white);
  justify-content: flex-start;
}

/* Background layer (image or color) */
.sentre-hero-bg {
  position: absolute;
  inset: 0;
  z-index: 0;
}

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

/* Dark overlay for contrast */
.sentre-hero-overlay {
  position: absolute;
  inset: 0;
  background-color: rgba(0, 0, 0, 0.5);
  z-index: 1;
}

/* Hero content sits above bg + overlay */
.sentre-hero-content {
  position: relative;
  z-index: 10;
  display: flex;
  flex-direction: column;
  flex-grow: 1;
  padding-top: 2rem;
  padding-bottom: 4rem;
  justify-content: flex-start;
}

/* Home page specific hero background */
.sentre-home-hero-bg {
  background-repeat: no-repeat;
  background-color: #0c161d;
  background-size: contain;
  background-position: center center;
}

@media (max-width: 992px) {
  .sentre-home-hero-bg {
    background-size: cover;
    background-position: top center;
  }
}

/* Light background hero (interior pages) */
.sentre-hero-bg-light {
  background-position: center;
  background-repeat: no-repeat;
  background-color: #e1e5e4;
  background-size: contain;
}

/* wp:cover based dark hero — home page */
.sentre-hero-dark-cover {
  width: 100%;
}

.sentre-hero-dark-cover .wp-block-cover__inner-blocks {
  width: 100%;
  padding: 5rem 0;
  display: flex;
  align-items: center;
}

.sentre-hero-dark-cover .wp-block-cover__image-background {
  object-fit: cover !important;
  object-position: center center !important;
}

/* wp:cover based light hero — interior pages */
.sentre-hero-light-cover {
  width: 100%;
}

.sentre-hero-light-cover .wp-block-cover__inner-blocks {
  width: 100%;
  padding: 4rem 0;
}

/* Restore WP's absolute positioning but use contain so full image height shows.
   We set the cover min-height via aspect-ratio so the container grows with the image. */
.sentre-hero-light-cover.wp-block-cover {
  aspect-ratio: 2 / 1; /* matches image ratio — adjust per image if needed */
  min-height: 0 !important;
  height: auto !important;
}

.sentre-hero-light-cover .wp-block-cover__image-background {
  position: absolute !important;
  inset: 0 !important;
  width: 100% !important;
  height: 100% !important;
  object-fit: contain !important;
  object-position: center center !important;
}

/* Hero image placeholder (right column) — hidden on mobile */
.sentre-hero-placeholder {
  display: flex;
  justify-content: center;
  align-items: center;
  height: 100%;
  min-height: 400px;
}

@media (max-width: 992px) {
  .sentre-hero-placeholder {
    display: none;
    min-height: 0;
  }
}

/* Hero CTA button group */
.sentre-hero-actions {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  width: 100%;
}

.sentre-hero-actions .sentre-btn {
  width: 100%;
}

@media (min-width: 768px) {
  .sentre-hero-actions {
    flex-direction: row;
    flex-wrap: wrap;
    align-items: center;
    width: auto;
  }

  .sentre-hero-actions .sentre-btn {
    width: auto;
  }
}

/* ─── Header / nav ───────────────────────────────────────── */

.sentre-header {
  width: 100%;
  position: sticky;
  top: 0;
  z-index: 50;
  box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.05);
}

/* Frosted glass effect via ::before pseudo-element */
.sentre-header::before {
  content: "";
  position: absolute;
  inset: 0;
  background-color: rgba(255, 255, 255, 0.05);
  backdrop-filter: blur(4px);
  z-index: -1;
  transition: background-color 0.3s ease;
}

.sentre-header:hover::before {
  background-color: rgba(255, 255, 255, 0.2);
}

.sentre-header-content {
  display: flex;
  justify-content: space-between;
  align-items: center;
  width: 100%;
  max-width: 1400px;
  margin-left: auto;
  margin-right: auto;
  padding: 1rem 2rem;
}

@media (min-width: 992px) {
  .sentre-header-content {
    height: 100px;
    padding: 0 4rem;
  }
}

/* Logo */
.sentre-logo {
  height: 3rem;
  width: auto;
  object-fit: contain;
}

@media (min-width: 992px) {
  .sentre-logo {
    height: 4.2rem;
  }
}

/* Mobile hamburger toggle */
.sentre-mobile-toggle {
  display: block;
  background: none;
  border: none;
  color: var(--color-red);
  cursor: pointer;
  z-index: 101;
  padding: 0.5rem;
}

@media (min-width: 992px) {
  .sentre-mobile-toggle {
    display: none;
  }
}

/* Navigation — mobile: slide-out drawer, desktop: inline row */
.sentre-header .wp-block-navigation {
  position: fixed;
  top: 0;
  right: 0;
  bottom: 0;
  width: 300px;
  background-color: #0c161d !important;
  z-index: 100;
  padding: 6rem 2rem 2rem;
  transform: translateX(100%);
  transition: transform 0.3s ease-in-out;
  flex-direction: column !important;
  gap: 0 !important;
  box-shadow: -4px 0 10px rgba(0, 0, 0, 0.3);
  overflow-y: auto;
  margin-block-start: 0 !important;
  margin-top: 0 !important;
  color: var(--color-white) !important;
}

.sentre-header .wp-block-navigation.open {
  transform: translateX(0);
}

/* The UL inside — WP also copies classes onto it, reset ALL drawer properties */
.sentre-header .wp-block-navigation .wp-block-navigation__container {
  position: static !important;
  transform: none !important;
  width: 100% !important;
  height: auto !important;
  overflow-y: visible !important;
  box-shadow: none !important;
  background: none !important;
  background-color: transparent !important;
  padding: 0 !important;
  margin: 0 !important;
  top: auto !important;
  right: auto !important;
  bottom: auto !important;
  z-index: auto !important;
  transition: none !important;
  display: flex !important;
  flex-direction: column !important;
  flex-wrap: nowrap !important;
  gap: 0 !important;
  list-style: none !important;
  justify-content: flex-start !important;
  align-items: flex-start !important;
  flex-grow: 1 !important;
}

/* Individual list items */
.sentre-header .wp-block-navigation .wp-block-navigation-item {
  width: 100%;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

/* Backdrop scrim behind open mobile nav */
.sentre-nav-backdrop {
  position: fixed;
  inset: 0;
  background-color: rgba(0, 0, 0, 0.5);
  backdrop-filter: blur(2px);
  z-index: 90;
}

@media (min-width: 992px) {
  .sentre-header .wp-block-navigation {
    position: static !important;
    width: auto !important;
    height: auto !important;
    background-color: transparent !important;
    padding: 0 !important;
    transform: none !important;
    flex-direction: row !important;
    gap: 2rem !important;
    box-shadow: none !important;
    overflow-y: visible !important;
  }

  .sentre-header .wp-block-navigation .wp-block-navigation__container {
    flex-direction: row !important;
    gap: 2rem !important;
    align-items: center !important;
  }

  .sentre-header .wp-block-navigation .wp-block-navigation-item {
    width: auto;
    border-bottom: none;
  }

  .sentre-nav-backdrop {
    display: none !important;
  }
}

/* Nav links */
.sentre-header .wp-block-navigation a,
.sentre-header .wp-block-navigation .wp-block-navigation-item__content {
  color: var(--color-white) !important;
  text-decoration: none !important;
  font-size: 1rem;
  font-weight: 600;
  display: block;
  padding: 0.85rem 0;
  border-bottom: 2px solid transparent;
  transition: var(--transition);
}

@media (min-width: 992px) {
  .sentre-header .wp-block-navigation a,
  .sentre-header .wp-block-navigation .wp-block-navigation-item__content {
    color: var(--color-blue) !important;
    font-size: 0.9rem;
    padding: 0.25rem 0;
  }
}

.sentre-header .wp-block-navigation a:hover,
.sentre-header .wp-block-navigation .wp-block-navigation-item__content:hover {
  color: var(--color-red) !important;
  border-bottom-color: var(--color-red);
}

.sentre-header .wp-block-navigation .current-menu-item > a,
.sentre-header .wp-block-navigation .current-menu-item .wp-block-navigation-item__content {
  border-bottom-color: var(--color-red);
}

/* ─── Trust strip ────────────────────────────────────────── */

.sentre-trust {
  background-color: var(--color-gray-light);
  padding: 2rem 0;
}

.sentre-trust-row {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2rem;
}

@media (min-width: 992px) {
  .sentre-trust-row {
    flex-direction: row;
    justify-content: space-between;
  }
}

.sentre-trust-label {
  font-size: 1.25rem;
  font-weight: 600;
  color: var(--color-text-main);
  text-align: center;
  line-height: 1.3;
}

@media (min-width: 992px) {
  .sentre-trust-label {
    text-align: left;
    margin-right: auto;
  }
}

.sentre-trust-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 2rem;
  align-items: center;
  justify-content: center;
  margin-top: 1rem;
}

@media (min-width: 992px) {
  .sentre-trust-badges {
    margin-top: 0;
  }
}

.sentre-trust-item {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  font-weight: 600;
  color: var(--color-text-main);
  font-size: 0.9rem;
}

.sentre-trust-pill {
  background-color: var(--color-white);
  border: 1px solid #d1d5db;
  padding: 0.25rem 1rem;
  border-radius: 9999px;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--color-text-muted);
  white-space: nowrap;
}

/* ─── Diagram (CENTRE ↔ SENTRE) ──────────────────────────── */

.sentre-diagram-flex {
  display: flex;
  flex-direction: column;
  gap: 2rem;
  width: 100%;
}

@media (min-width: 992px) {
  .sentre-diagram-flex {
    flex-direction: row;
    align-items: stretch;
    justify-content: space-between;
    gap: 1rem;
  }

  .sentre-diagram-flex .sentre-box {
    flex: 1;
  }

  .sentre-diagram-flex .sentre-connector-label {
    flex: 0 0 auto;
  }
}

/* ─── CTA band ───────────────────────────────────────────── */

.sentre-cta-band {
  background-color: var(--color-red);
  color: var(--color-white);
  padding: 3rem 0;
  text-align: center;
}

.sentre-cta-text {
  font-size: var(--text-body);
  margin-bottom: 2rem;
  max-width: 48rem;
  margin-left: auto;
  margin-right: auto;
}

/* ─── Footer ─────────────────────────────────────────────── */

.sentre-footer {
  background-color: var(--color-blue); /* Source: Footer.tsx — blue not red */
  color: var(--color-white);
  padding: 4rem 0 2rem;
}

.sentre-footer-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 3rem;
}

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

@media (min-width: 1024px) {
  .sentre-footer-grid {
    grid-template-columns: repeat(4, 1fr);
  }
}

.sentre-footer-link {
  color: var(--color-white);
  text-decoration: none;
  display: block;
  margin-bottom: 0.5rem;
  font-size: 0.875rem;
  opacity: 0.9;
}

.sentre-footer-link:hover {
  text-decoration: underline;
  opacity: 1;
  color: var(--color-white);
}

/* Footer navigation — WP renders links as .wp-block-navigation-item__content */
.sentre-footer .wp-block-navigation-item__content,
.sentre-footer .wp-block-navigation a,
.sentre-footer-legal-link .wp-block-navigation-item__content,
.sentre-footer-legal-link a {
  color: var(--color-white) !important;
  text-decoration: none !important;
  font-size: 0.875rem !important;
  opacity: 0.9;
}

.sentre-footer .wp-block-navigation-item__content:hover,
.sentre-footer .wp-block-navigation a:hover,
.sentre-footer-legal-link .wp-block-navigation-item__content:hover,
.sentre-footer-legal-link a:hover {
  text-decoration: underline !important;
  opacity: 1;
  color: var(--color-white) !important;
}

.sentre-footer-divider {
  border-top: 1px solid rgba(255, 255, 255, 0.3);
  margin-top: 2rem;
  padding-top: 1.5rem;
  text-align: center;
  font-size: 0.75rem;
  opacity: 0.8;
}

/* ─── Section overlap utility ────────────────────────────── */

/* Pulls the next section up over the previous one */
.sentre-section-overlap {
  padding-bottom: 0;
  transform: translateY(-3rem);
  position: relative;
  z-index: 20;
}


/* ─── 5-column grid (phase timeline) ────────────────────── */

.sentre-grid-5 {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.5rem;
}

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

@media (min-width: 1024px) {
  .sentre-grid-5 {
    grid-template-columns: repeat(5, 1fr);
  }
}


/* ─── Hero light variant ─────────────────────────────────── */

.sentre-hero-light {
  color: var(--color-text-main);
  min-height: 420px;
}

.sentre-hero-overlay-light {
  background-color: rgba(225, 229, 228, 0.88);
}

/* Hero inner — constrain centered content width */
.sentre-hero-inner {
  max-width: 780px;
  margin-left: auto;
  margin-right: auto;
}

/* Lead paragraph width constraint in hero */
.sentre-lead-constrained {
  max-width: 680px;
  margin-left: auto;
  margin-right: auto;
}

/* Rack image col — hide on mobile */
.sentre-hero-rack-col {
  display: none;
}

@media (min-width: 992px) {
  .sentre-hero-rack-col {
    display: flex;
    align-items: center;
    justify-content: center;
  }
}

/* Rack image sizing */
.sentre-hero-rack img {
  width: 100%;
  max-width: 480px;
  height: auto;
  object-fit: contain;
  filter: drop-shadow(0 8px 32px rgba(0,0,0,0.35));
}