/* contents.css v3.0 — contents block aligned with hero, vertically centered */

/* ==========================================================================
   1) SECTION ROOT
   - <section id="contents_section_1001">
   - Any margin/padding here affects spacing between hero and contents
   ========================================================================== */
#contents_section_1001 {
  /* Sit tight under hero */
  margin: 0;
  padding: 0;

  width: 100%;

  /* Section-level CSS variables (fallbacks if CMS doesn’t override) */
  --fallback-max-width: 1120px;
  --fallback-title-color: #111827;
  --fallback-body-color: #374151;
  --fallback-subtitle-color: #4b5563;

  --fallback-title-size: 2rem;
  --fallback-subtitle-size: 1.1rem;
  --fallback-body-size: 1rem;

  --fallback-title-weight: 700;
  --fallback-subtitle-weight: 500;
  --fallback-body-weight: 400;

  --fallback-title-font: "Inter", system-ui, sans-serif;
  --fallback-subtitle-font: "Inter", system-ui, sans-serif;
  --fallback-body-font: "Inter", system-ui, sans-serif;

  --fallback-img-basis: 40%;    /* used if not provided via style */
  --fallback-text-basis: 60%;
}

/* ==========================================================================
   2) TEMPLATE WRAPPER FIX
   - If contents_block.html uses <div class="relative py-10 md:py-16">
   - These Tailwind classes add vertical padding.
   - We override them so spacing is controlled only by this file.
   ========================================================================== */
#contents_section_1001 > .relative {
  margin-top: 0;
  margin-bottom: 0;
  padding-top: 0;      /* kills py-10 / md:py-16 */
  padding-bottom: 0;
}

/* ==========================================================================
   3) BLOCK WRAPPER (CARD)
   - .contents-block-item is the main card/container
   - We give it a min-height and let inner content be vertically centered
   ========================================================================== */
.contents-block-item {
  position: relative;
  border-radius: 2px;
  overflow: hidden;
  /* border: 1px solid #e5e7eb; */
  background: #ffffff;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.06);

  /* Give the contents block some presence */
  min-height: 60vh;

  /* No outside margin so spacing is handled at section/layout level */
  margin: 0;
}

/* ==========================================================================
   4) INNER CONTAINER (VERTICAL CENTER)
   - .contents-block-inner lives inside contents-block-item
   - We make this flex so the image+text row is centered vertically
   ========================================================================== */
.contents-block-inner {
  position: relative;

  /* Internal padding */
  padding: 2rem 1.5rem;

  width: 100%;
  max-width: 100%;
  min-height: 60vh;           /* match wrapper height for centering */

  margin-left: 0;
  margin-right: 0;

  /* Center the .contents-flex row inside this block */
  display: flex;
  align-items: center;         /* vertical center */
  justify-content: center;     /* horizontal center of row */
}

/* ==========================================================================
   5) FLEX LAYOUT
   - .contents-flex is the image+text row
   - Mobile: stacked; Desktop: side-by-side (or reversed via Jinja)
   ========================================================================== */
.contents-flex {
  display: flex;
  flex-direction: column;      /* mobile-first: stack */
  gap: 1.5rem;
}

@media (min-width: 768px) {
  .contents-flex {
    flex-direction: row;       /* desktop: row or row-reverse via extra classes */
    gap: 2.5rem;
  }
}

/* ==========================================================================
   6) COLUMNS
   - .contents-image-col: image column
   - .contents-text-col : text column
   - Widths from CSS vars; content centered vertically in each column
   ========================================================================== */
.contents-image-col {
  flex-basis: var(--fallback-img-basis);
  flex-shrink: 0;

  display: flex;
  flex-direction: column;
  justify-content: center;     /* center image vertically */
}

.contents-text-col {
  flex-basis: var(--fallback-text-basis);

  display: flex;
  flex-direction: column;
  justify-content: center;     /* center text vertically */
}

/* ==========================================================================
   7) IMAGE STYLING
   ========================================================================== */
.contents-image-col img,
.contents-image {
  width: 100%;
  height: auto;
  border-radius: 6px;
  object-fit: cover;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.10);
}

/* ==========================================================================
   8) TYPOGRAPHY
   - Fallbacks; CMS can override via inline styles or extra classes
   ========================================================================== */
.contents-title {
  margin-bottom: 0.75rem;
  color: var(--fallback-title-color);
  font-size: var(--fallback-title-size);
  font-weight: var(--fallback-title-weight);
  font-family: var(--fallback-title-font);
  line-height: 1.2;
}

.contents-subtitle {
  margin-bottom: 0.75rem;
  color: var(--fallback-subtitle-color);
  font-size: var(--fallback-subtitle-size);
  font-weight: var(--fallback-subtitle-weight);
  font-family: var(--fallback-subtitle-font);
}

.contents-body {
  color: var(--fallback-body-color);
  font-size: var(--fallback-body-size);
  font-weight: var(--fallback-body-weight);
  font-family: var(--fallback-body-font);
  line-height: 1.55;
}

.contents-body p {
  margin-bottom: 0.75rem;
}

/* ==========================================================================
   9) OVERLAY (optional)
   - If you add a dark overlay div in the template
   ========================================================================== */
.contents-overlay {
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: black;
  opacity: 0;
}
