/**
 * @file
 * Reusable paragraph component styles.
 * These paragraph types can be used on any page (front page, basic pages, markets, news, etc.).
 * Component classes: .paragraph-cta-banner, .paragraph-product-grid, .paragraph-text-image, .paragraph-faq, .paragraph-gallery, .paragraph-feature-list, .paragraph-app-promotion
 * Plus: .front-hero (front page specific hero banner)
 */

/* ============================================
   BOOTSTRAP PARAGRAPHS - DEFAULT CONSTRAINTS
   ============================================ */
/* 
 * Bootstrap Paragraphs (bp_*) should stay constrained by default.
 * They use width classes (tiny, narrow, medium, wide, full).
 * When no width is set OR when set to medium, constrain them.
 * Only allow full-width if explicitly set to paragraph--width--full.
 */

/* Paragraph section wrappers live outside .container (full viewport width).
   overflow-x: hidden is a safety net for any edge cases. */
.page-paragraphs-sections,
.front-sections {
  overflow-x: hidden;
}

/* OFES custom paragraph types: override Bootstrap Paragraphs base styles.
   BP sets display:table, table-layout:fixed, width:100% and clearfix
   pseudo-elements on every .paragraph. Our types use display:block and
   don't need the clearfix. */
.paragraph-cta-banner,
.paragraph-product-grid,
.paragraph-hubspot-popup,
.paragraph-text-image,
.paragraph-video,
.paragraph-faq,
.paragraph-gallery,
.paragraph-feature-list,
.paragraph-feature-icon-grid,
.paragraph-steps,
.paragraph-app-promotion {
  display: block;
  table-layout: auto;
}
.paragraph-cta-banner::before,
.paragraph-cta-banner::after,
.paragraph-product-grid::before,
.paragraph-product-grid::after,
.paragraph-hubspot-popup::before,
.paragraph-hubspot-popup::after,
.paragraph-text-image::before,
.paragraph-text-image::after,
.paragraph-video::before,
.paragraph-video::after,
.paragraph-faq::before,
.paragraph-faq::after,
.paragraph-gallery::before,
.paragraph-gallery::after,
.paragraph-feature-list::before,
.paragraph-feature-list::after,
.paragraph-feature-icon-grid::before,
.paragraph-feature-icon-grid::after,
.paragraph-steps::before,
.paragraph-steps::after,
.paragraph-app-promotion::before,
.paragraph-app-promotion::after {
  display: none;  /* Remove BP clearfix pseudo-elements */
}

/* Default: Constrain Bootstrap Paragraphs to container-equivalent width.
   .page-paragraphs-sections / .front-sections sit outside any .container,
   so BP types would otherwise span the full viewport. max-width + auto margins
   simulate a .container without breaking BP's own display:table / width:100% layout.
   --container-max-width is defined in design-tokens.css and must match the
   theme's .container width (set in local-theme.css).
   DO NOT override width — BP needs width:100% for its table-layout columns. */
.page-paragraphs-sections .paragraph[class*="paragraph--type--bp-"]:not(.paragraph--width--full),
.front-sections .paragraph[class*="paragraph--type--bp-"]:not(.paragraph--width--full) {
  max-width: var(--container-max-width, 1440px);
  margin-left: auto !important;
  margin-right: auto !important;
  margin-top: 1em;
  margin-bottom: 1em;
}

/* Respect explicit width classes (scoped to .paragraph to avoid inner children) */
.page-paragraphs-sections .paragraph.paragraph--width--tiny,
.front-sections .paragraph.paragraph--width--tiny {
  max-width: 400px;
  margin-left: auto !important;
  margin-right: auto !important;
}

.page-paragraphs-sections .paragraph.paragraph--width--narrow,
.front-sections .paragraph.paragraph--width--narrow {
  max-width: 720px;
  margin-left: auto !important;
  margin-right: auto !important;
}

.page-paragraphs-sections .paragraph.paragraph--width--medium,
.front-sections .paragraph.paragraph--width--medium {
  max-width: 960px;
  margin-left: auto !important;
  margin-right: auto !important;
}

.page-paragraphs-sections .paragraph.paragraph--width--wide,
.front-sections .paragraph.paragraph--width--wide {
  max-width: 1320px;
  margin-left: auto !important;
  margin-right: auto !important;
}

/* Only paragraph--width--full gets true full width */
.page-paragraphs-sections .paragraph.paragraph--width--full,
.front-sections .paragraph.paragraph--width--full {
  max-width: none;
  width: 100%;
}

/* Consistent spacing between all paragraph types */
/* Note: Only target our custom paragraph types to avoid Bootstrap Paragraphs conflicts */
.paragraph--type--cta-banner,
.paragraph--type--hubspot-form-popup,
.paragraph--type--feature-list,
.paragraph--type--feature-item,
.paragraph--type--faq,
.paragraph--type--faq-item,
.paragraph--type--gallery,
.paragraph--type--product-category-grid,
.paragraph--type--product-category-card,
.paragraph--type--text-image,
.paragraph--type--video,
.paragraph--type--add-video,
.paragraph--type--app-promotion,
.paragraph--type--feature-grid-with-icon,
.paragraph--type--feature-grid-card,
.paragraph--type--step-by-step-with-links,
.paragraph--type--individual-step {
  margin-bottom: 0;
}

/* Paragraph subtitle (appears above main title) - matches H3 styling */
.paragraph__subtitle {
  color: var(--color-brand-green);
  font-size: var(--text-heading-md);
  font-weight: var(--font-weight-medium);
  text-transform: uppercase;
  letter-spacing: var(--letter-spacing-wider);
  line-height: var(--line-height-tight);
  margin-bottom: 0.5rem;
}

/* ============================================
   HERO BANNER (Front page specific)
   ============================================ */
.front-hero {
  position: relative;
  min-height: 55vh;
  display: flex;
  align-items: center;
  background-color: var(--color-gray-dark);
  color: var(--color-brand-white);
}

@media (max-width: 768px) {
  .front-hero {
    min-height: 400px;
  }
}

.front-hero__image,
.front-hero__media {
  position: absolute;
  inset: 0;
}

.front-hero__image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.front-hero__media--video .front-hero__video,
.front-hero__media--video iframe {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.front-hero__media--video .front-hero__video {
  display: block;
}

.front-hero__overlay {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.4);
}

.front-hero__content {
  position: relative;
  z-index: 1;
  width: 100%;
  padding: 2rem 0;
}

.front-hero__headline {
  color: var(--color-brand-white);
  margin-bottom: 1rem;
}

.front-hero__sub-headline {
  margin-bottom: 1.5rem;
  max-width: 40em;
  font-size: var(--text-heading-md);
}

.front-hero__ctas {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
}

/* ============================================
   CTA BANNER PARAGRAPH
   ============================================ */
/* Override Bootstrap Paragraphs base styles for our custom paragraph */
.paragraph--type--cta-banner.paragraph-cta-banner {
  display: block;
  position: relative;
  padding: var(--paragraph-spacing, 4rem) 0;
  color: var(--color-brand-white);
  overflow: hidden;
  background-repeat: no-repeat;
  background-size: cover;
  background-position: center center;
  /* Parent (.page-paragraphs-sections / .front-sections) is already full-width,
     so width: 100% is sufficient. The old 100vw caused scrollbar overflow. */
  width: 100% !important;
  margin-left: 0 !important;
  margin-right: 0 !important;
  table-layout: auto;
}

@media (max-width: 768px) {
  .paragraph-cta-banner {
    padding: var(--paragraph-spacing-mobile, 2.5rem) 0;
  }
}

.paragraph-cta-banner--yellow {
  background-color: var(--color-brand-orange);
  background-image: url('../../images/pattern-bg-yellow.webp');
}

.paragraph-cta-banner--green {
  background-color: var(--color-brand-green);
  background-image: url('../../images/pattern-bg-green.webp');
}

.paragraph-cta-banner--blue {
  background-color: var(--color-brand-blue);
  background-image: url('../../images/pattern-bg-blue.webp');
}

.paragraph-cta-banner--purple {
  background-color: var(--color-brand-purple);
  background-image: url('../../images/pattern-bg-purple.webp');
}

.paragraph-cta-banner__background {
  position: absolute;
  inset: 0;
  z-index: 0;
}

.paragraph-cta-banner__background img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.paragraph-cta-banner__overlay {
  position: absolute;
  inset: 0;
  background: rgba(1, 66, 106, 0.85);
  z-index: 1;
}

.paragraph-cta-banner__content {
  position: relative;
  z-index: 2;
}

.paragraph-cta-banner__title {
  color: var(--color-brand-white);
  margin-bottom: 1rem;
}

.paragraph-cta-banner__body {
  margin-bottom: 1.5rem;
}

/* Center alignment (default) */
.paragraph-cta-banner--center {
  text-align: center;
}

.paragraph-cta-banner--center .paragraph-cta-banner__body {
  max-width: 40em;
  margin-left: auto;
  margin-right: auto;
}

/* Left alignment */
.paragraph-cta-banner--left {
  text-align: left;
}

.paragraph-cta-banner--left .paragraph-cta-banner__content {
  max-width: 50rem;
  margin-right: auto;
  margin-left: 0;
}

.paragraph-cta-banner--left .paragraph-cta-banner__body {
  max-width: none;
}

.paragraph-cta-banner--left .green-btn {
  margin-left: 0;
  margin-right: auto;
}

/* Inline media content (image/video below the CTA text) */
.paragraph-cta-banner__media-content {
  margin-top: 2.5rem;
  max-width: 900px;
  margin-left: auto;
  margin-right: auto;
}

.paragraph-cta-banner__media-content img {
  max-width: 100%;
  height: auto;
  display: block;
  border-radius: 8px;
}

.paragraph-cta-banner__media-content iframe,
.paragraph-cta-banner__media-content video {
  max-width: 100%;
  height: auto;
  display: block;
  border-radius: 8px;
  aspect-ratio: 16 / 9;
  width: 100%;
}

/* ============================================
   PRODUCT GRID PARAGRAPH
   ============================================ */
/* Override Bootstrap Paragraphs base styles for our custom paragraph */
.paragraph--type--product-category-grid.paragraph-product-grid {
  display: block;
  padding: var(--paragraph-spacing, 4rem) 0;
  width: 100% !important;
  margin-left: 0 !important;
  margin-right: 0 !important;
  table-layout: auto;
}

@media (max-width: 768px) {
  .paragraph-product-grid {
    padding: var(--paragraph-spacing-mobile, 2.5rem) 0;
  }
}

.paragraph-product-grid__header {
  margin-bottom: 2rem;
  align-items: center;
}

.paragraph-product-grid__title {
  margin-bottom: 0;
}

.paragraph-product-grid__intro {
  margin-bottom: 0;
}

@media (max-width: 767px) {
  .paragraph-product-grid__title {
    margin-bottom: 1rem;
  }
}

/* Flexbox: fixed 240px cards, max 5 across at 1410px, each row centered.
   justify-content:center centers each row independently, so a 3+2 split
   puts the 2-card row centered beneath the 3-card row.
   5 × 240 + 4 × 25 = 1300px → fits in 1410px.
   Direct children are card <a> elements (field--field-cards.html.twig
   renders without .field__item wrappers). */
.paragraph-product-grid__grid {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 25px;
  margin-top: 2rem;
}

/* Card: fixed width, internal layout is a flex column. */
a.paragraph-product-grid__card {
  flex: 0 0 240px;
  display: flex;
  flex-direction: column;
  padding: 2rem 1rem;
  border-radius: 8px;
  text-align: center;
  color: var(--color-brand-white);
  text-decoration: none;
  height: 360px;
  transition: transform 0.2s, box-shadow 0.2s;
}

a.paragraph-product-grid__card:hover,
a.paragraph-product-grid__card:focus {
  color: var(--color-brand-white);
  text-decoration: none;
  transform: translateY(-4px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

a.paragraph-product-grid__card--blue { background-color: var(--color-brand-blue); }
a.paragraph-product-grid__card--green { background-color: var(--color-brand-green); }
a.paragraph-product-grid__card--orange { background-color: var(--color-brand-orange); }
a.paragraph-product-grid__card--grey { background-color: var(--color-brand-grey); }

.paragraph-product-grid__card-title {
  font-size: var(--text-heading-md);
  font-weight: var(--font-weight-medium);
  text-transform: uppercase;
  color: var(--color-brand-white);
  margin-bottom: 1rem;
  margin-top: 0;
  line-height: var(--line-height-tight);
  flex-shrink: 0;
  overflow: hidden;
  word-break: break-word;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}

/* Image area: fills remaining card height, object-fit handles scaling */
.paragraph-product-grid__card-image {
  flex: 1;
  overflow: hidden;
  min-height: 0;
  margin: 0.5rem 0;
}

/* Drupal field wrapper (single-value, hidden label) — fill the image area */
.paragraph-product-grid__card-image > .field {
  width: 100%;
  height: 100%;
}

.paragraph-product-grid__card-image img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  display: block;
}

/* ── Product grid: colored background variant ── */
/* When field_color_class is set, the grid gets a full-width patterned
   background (same pattern system as CTA Banner) and the header is centered.
   Without field_color_class, nothing below activates → existing grids
   remain unchanged.                                                        */

.paragraph-product-grid--has-bg {
  color: var(--color-brand-white);
}

/* Color backgrounds (reuse CTA Banner pattern images) */
.paragraph-product-grid--blue {
  background-color: var(--color-brand-blue);
  background-image: url('../../images/pattern-bg-blue.webp');
  background-repeat: no-repeat;
  background-size: cover;
  background-position: center center;
}

.paragraph-product-grid--green {
  background-color: var(--color-brand-green);
  background-image: url('../../images/pattern-bg-green.webp');
  background-repeat: no-repeat;
  background-size: cover;
  background-position: center center;
}

.paragraph-product-grid--orange {
  background-color: var(--color-brand-orange);
  background-image: url('../../images/pattern-bg-yellow.webp');
  background-repeat: no-repeat;
  background-size: cover;
  background-position: center center;
}

.paragraph-product-grid--grey {
  background-color: var(--color-brand-grey);
}

/* When grid has background, title + subtitle are white */
.paragraph-product-grid--has-bg .paragraph-product-grid__title,
.paragraph-product-grid--has-bg .paragraph__subtitle,
.paragraph-product-grid--has-bg .paragraph-product-grid__intro {
  color: var(--color-brand-white);
}

/* ── Product grid: centered header variant ── */
/* Activated automatically when a background color is set.                 */

.paragraph-product-grid__header--centered {
  text-align: center;
  margin-bottom: 2rem;
}

.paragraph-product-grid__header--centered .paragraph-product-grid__intro {
  max-width: 40em;
  margin-left: auto;
  margin-right: auto;
  margin-top: 0.5rem;
}

/* ── Product grid card: compact variant (no image) ── */
/* When a card has no image, it gets a shorter height, centered layout,
   and a CSS arrow indicator. Existing cards with images are unaffected.  */

a.paragraph-product-grid__card--compact {
  height: auto;
  min-height: 140px;
  padding: 1.5rem 1.5rem;
  justify-content: center;
  align-items: center;
  text-align: center;
}

.paragraph-product-grid__card-arrow {
  display: block;
  font-size: var(--font-size-3xl);
  line-height: 1;
  margin-bottom: 0.75rem;
  color: var(--color-brand-white);
  font-weight: var(--font-weight-light);
}

a.paragraph-product-grid__card--compact .paragraph-product-grid__card-title {
  font-size: var(--font-size-base);
  text-transform: none;
  font-weight: var(--font-weight-medium);
  margin-bottom: 0;
  line-height: var(--line-height-snug);
}

/* ============================================
   TEXT + IMAGE PARAGRAPH
   ============================================ */
/* Override Bootstrap Paragraphs base styles for our custom paragraph */
.paragraph--type--text-image.paragraph-text-image {
  display: block;
  padding: var(--paragraph-spacing, 4rem) 0;
  width: 100%;
  margin-left: 0;
  margin-right: 0;
  table-layout: auto;
}

@media (max-width: 768px) {
  .paragraph-text-image {
    padding: var(--paragraph-spacing-mobile, 2.5rem) 0;
  }
}

.paragraph-text-image__image img {
  max-width: 100%;
  height: auto;
  /* Rounded corners: top-left and bottom-right only (matches mockup) */
  border-radius: 40px 0 40px 0;
}

.paragraph-text-image__title {
  margin-bottom: 1rem;
}

.paragraph-text-image__body {
  margin-bottom: 1.5rem;
}

/* CTA link uses .green-btn for consistent styling */
.paragraph-text-image__cta {
  margin-top: 1rem;
}

/* ============================================
   VIDEO PARAGRAPH
   ============================================ */
/* Override Bootstrap Paragraphs base styles for our custom video paragraphs.
   Covers both the ofes_paragraphs "video" type (for future Corrections site)
   and the existing Parks "add_video" type.                                   */
.paragraph--type--video.paragraph-video,
.paragraph--type--add-video.paragraph-video {
  display: block;
  padding: var(--paragraph-spacing, 4rem) 0;
  width: 100%;
  margin-left: 0;
  margin-right: 0;
  table-layout: auto;
}

@media (max-width: 768px) {
  .paragraph-video {
    padding: var(--paragraph-spacing-mobile, 2.5rem) 0;
  }
}

/* Responsive wrapper: force any iframe or <video> to fill the container.
   Uses !important to override Drupal's hardcoded inline width/height
   attributes on oEmbed iframes and file-video.html.twig <video> tags.   */
.paragraph-video__media {
  position: relative;
  width: 100%;
  max-width: 100%;
}

/* Direct <video> rendered by our paragraph--add-video.html.twig override */
.paragraph-video__player {
  width: 100%;
  max-width: 100%;
  height: auto;
  display: block;
  border: 0;
  border-radius: 8px;
}

/* Fallback: if video renders via Media/DS chain (remote oEmbed, etc.) */
.paragraph-video__media iframe,
.paragraph-video__media video {
  width: 100% !important;
  height: auto !important;
  aspect-ratio: 16 / 9;
  display: block;
  border: 0;
  border-radius: 8px;
}

/* Drupal + Display Suite can nest several wrapper layers between our
   .paragraph-video__media div and the actual <iframe>:
     .field > .field__item > article.media > .ds-1col > .field > .field__item > iframe
   Every intermediate element must be 100% width with no max-width
   constraint so the iframe can fill the full container.                 */
.paragraph-video__media .media,
.paragraph-video__media .field,
.paragraph-video__media .field__item,
.paragraph-video__media .ds-1col,
.paragraph-video__media .ds-2col,
.paragraph-video__media [class*="ds-"] {
  width: 100%;
  max-width: 100%;
}

/* ============================================
   FAQ ACCORDION PARAGRAPH
   ============================================ */
/* Override Bootstrap Paragraphs base styles for our custom paragraph */
.paragraph--type--faq.paragraph-faq {
  display: block;
  padding: var(--paragraph-spacing, 4rem) 0;
  width: 100% !important;
  margin-left: 0 !important;
  margin-right: 0 !important;
  table-layout: auto;
}

@media (max-width: 768px) {
  .paragraph-faq {
    padding: var(--paragraph-spacing-mobile, 2.5rem) 0;
  }
}

.paragraph-faq__title {
  margin-bottom: 1rem;
  font-size: var(--text-heading-xl);
  font-weight: var(--font-weight-bold);
  color: var(--color-brand-blue);
}

.paragraph-faq__intro {
  margin-bottom: 3rem;
  font-size: var(--text-heading-sm);
  line-height: var(--line-height-relaxed);
  max-width: 800px;
}

.paragraph-faq__list.panel-group {
  margin-bottom: 0;
}

/* FAQ accordion styling - blue background with white text */
.paragraph--type--faq-item.panel {
  background-color: var(--color-brand-blue);
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: 0;
  margin-bottom: 1rem;
  box-shadow: none;
}

.paragraph--type--faq-item .panel-heading {
  background-color: var(--color-brand-blue);
  border-radius: 0;
  padding: 0;
}

.paragraph--type--faq-item .panel-title {
  font-size: var(--text-heading-sm);
}

/* Default state - all items: white text on blue background */
.paragraph--type--faq-item .panel-title a,
.paragraph--type--faq-item .panel-title a.collapsed {
  display: block;
  padding: 1.25rem 1.5rem;
  color: var(--color-brand-white);
  background-color: var(--color-brand-blue);
  font-weight: var(--font-weight-semibold);
  text-decoration: none;
  transition: all 0.2s ease;
}

/* Hover/focus state - invert to blue text on white background */
.paragraph--type--faq-item .panel-title a:hover,
.paragraph--type--faq-item .panel-title a:focus {
  color: var(--color-brand-blue);
  background-color: var(--color-brand-white);
  text-decoration: none;
}

/* Panel body - blue text on white background */
.paragraph--type--faq-item .panel-body {
  background-color: var(--color-brand-white);
  color: var(--color-brand-blue);
  padding: 1.5rem 1.5rem 2rem;
  border-top: 1px solid rgba(1, 66, 106, 0.1);
  font-size: var(--text-body);
  line-height: var(--line-height-relaxed);
}

.paragraph--type--faq-item .panel-collapse {
  border-radius: 0;
}

/* ============================================
   GALLERY PARAGRAPH
   ============================================ */
/* Override Bootstrap Paragraphs base styles for our custom paragraph */
.paragraph--type--gallery.paragraph-gallery {
  display: block;
  padding: var(--paragraph-spacing, 4rem) 0;
  width: 100% !important;
  margin-left: 0 !important;
  margin-right: 0 !important;
  table-layout: auto;
}

@media (max-width: 768px) {
  .paragraph-gallery {
    padding: var(--paragraph-spacing-mobile, 2.5rem) 0;
  }
}

.paragraph-gallery__header {
  margin-bottom: 1.5rem;
  align-items: center;
}

.paragraph-gallery__title {
  margin: 0;
}

.paragraph-gallery__grid {
  margin-top: 1rem;
}

.paragraph-gallery__thumb {
  position: relative;
  border-radius: 8px;
  overflow: hidden;
  margin-bottom: 1rem;
}

.paragraph-gallery__thumb img {
  width: 100%;
  height: auto;
  display: block;
}

.paragraph-gallery__caption {
  display: block;
  padding: 0.5rem 0;
  font-size: var(--text-caption);
}

/* ============================================
   FEATURE LIST PARAGRAPH
   ============================================ */
/* Override Bootstrap Paragraphs base styles for our custom paragraph */
.paragraph--type--feature-list.paragraph-feature-list {
  display: block;
  padding: var(--paragraph-spacing, 4rem) 0;
  background-color: var(--color-brand-orange);
  color: var(--color-text);
  background-repeat: no-repeat;
  background-size: cover;
  background-position: center center;
  width: 100% !important;
  margin-left: 0 !important;
  margin-right: 0 !important;
  table-layout: auto;
}

@media (max-width: 768px) {
  .paragraph-feature-list {
    padding: var(--paragraph-spacing-mobile, 2.5rem) 0;
  }
}

/* Background pattern variants */
.paragraph-feature-list--yellow {
  background-color: var(--color-brand-orange);
  background-image: url('../../images/pattern-bg-yellow.webp');
}

.paragraph-feature-list--green {
  background-color: var(--color-brand-green);
  background-image: url('../../images/pattern-bg-green.webp');
}

.paragraph-feature-list--blue {
  background-color: var(--color-brand-blue);
  background-image: url('../../images/pattern-bg-blue.webp');
  color: var(--color-brand-white);
}

.paragraph-feature-list--blue .paragraph-feature-list__item-description {
  color: var(--color-brand-white);
}

.paragraph-feature-list--blue .paragraph-feature-list__item-title {
  color: var(--color-brand-white);
}

.paragraph-feature-list--purple {
  background-color: var(--color-brand-purple);
  background-image: url('../../images/pattern-bg-purple.webp');
  color: var(--color-brand-white);
}

.paragraph-feature-list--purple .paragraph-feature-list__item-description {
  color: var(--color-brand-white);
}

.paragraph-feature-list--purple .paragraph-feature-list__item-title {
  color: var(--color-brand-white);
}

.paragraph-feature-list__title {
  margin-bottom: 1rem;
}

.paragraph-feature-list__body {
  margin-bottom: 1.5rem;
}

.paragraph-feature-list__items {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.paragraph-feature-list__item {
  margin-bottom: 0.75rem;
  display: flex;
  gap: 1rem;
  align-items: flex-start;
}

.paragraph-feature-list__item-icon {
  flex-shrink: 0;
  width: 60px;
  height: 60px;
  border-radius: 50%;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0.5rem;
}

.paragraph-feature-list__item-icon img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  display: block;
}

.paragraph-feature-list__item-content {
  flex: 1;
}

.paragraph-feature-list__item-title {
  font-weight: var(--font-weight-bold);
  margin-bottom: 0.25rem;
  font-size: var(--text-heading-sm);
  margin-top: 0;
}

.paragraph-feature-list__item-description {
  font-size: var(--text-body);
  color: var(--color-text);
}

/* ============================================
   APP PROMOTION PARAGRAPH
   ============================================ */
/* Override Bootstrap Paragraphs base styles for our custom paragraph */
.paragraph--type--app-promotion.paragraph-app-promotion {
  display: block;
  padding: var(--paragraph-spacing, 4rem) 0;
  text-align: center;
  width: 100%;
  margin-left: 0;
  margin-right: 0;
  table-layout: auto;
}

@media (max-width: 768px) {
  .paragraph-app-promotion {
    padding: var(--paragraph-spacing-mobile, 2.5rem) 0;
  }
}

.paragraph-app-promotion__title {
  margin-bottom: 1rem;
}

.paragraph-app-promotion__body {
  margin-bottom: 1.5rem;
  max-width: 40em;
  margin-left: auto;
  margin-right: auto;
}

.paragraph-app-promotion__cta {
  margin-bottom: 2rem;
}

.paragraph-app-promotion__screenshots {
  margin-top: 2rem;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 2rem;
  max-width: 900px;
  margin-left: auto;
  margin-right: auto;
}

.paragraph-app-promotion__screenshots .field__item {
  display: flex;
  justify-content: center;
  align-items: center;
}

.paragraph-app-promotion__screenshots img {
  max-width: 100%;
  height: auto;
  border-radius: 8px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

@media (max-width: 768px) {
  .paragraph-app-promotion__screenshots {
    grid-template-columns: 1fr;
    gap: 1.5rem;
  }
}

.paragraph-feature-list  .field--name-field-headline {
  color: var(--color-black);
}

.paragraph-feature-list  .field--name-field-title {
  color: var(--color-black);
}

/* ============================================
   FEATURE GRID WITH ICON PARAGRAPH
   ============================================ */
/* Override Bootstrap Paragraphs base styles for our custom paragraph */
.paragraph--type--feature-grid-with-icon.paragraph-feature-icon-grid {
  display: block;
  padding: var(--paragraph-spacing, 4rem) 0;
  width: 100% !important;
  margin-left: 0 !important;
  margin-right: 0 !important;
  table-layout: auto;
}

@media (max-width: 768px) {
  .paragraph-feature-icon-grid {
    padding: var(--paragraph-spacing-mobile, 2.5rem) 0;
  }
}

/* Header: title + intro, centered */
.paragraph-feature-icon-grid__header {
  text-align: center;
  margin-bottom: 3rem;
}

.paragraph-feature-icon-grid__title {
  margin: 0 0 1rem 0;
  color: var(--color-text);
}

.paragraph-feature-icon-grid__intro {
  max-width: 800px;
  margin-left: auto;
  margin-right: auto;
  font-size: var(--font-size-base);
  line-height: var(--line-height-relaxed);
  color: var(--color-text);
}

/* ---- Grid layout: equal items per row ---- */
.paragraph-feature-icon-grid__grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 2.5rem 2rem;
}

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

@media (min-width: 992px) {
  .paragraph-feature-icon-grid__grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

/* ---- Individual card ---- */
.paragraph-feature-icon-grid__card {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
}

/* Icon / logo image */
.paragraph-feature-icon-grid__card-icon {
  width: 64px;
  height: 64px;
  margin-bottom: 1rem;
  flex-shrink: 0;
}

.paragraph-feature-icon-grid__card-icon img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  display: block;
}

/* Card title */
.paragraph-feature-icon-grid__card-title {
  font-size: var(--text-heading-sm);
  font-weight: var(--font-weight-bold);
  line-height: var(--line-height-tight);
  margin: 0 0 0.5rem 0;
  color: var(--color-text);
}

/* Card body text */
.paragraph-feature-icon-grid__card-body {
  font-size: var(--text-body);
  line-height: var(--line-height-relaxed);
  color: var(--color-text-muted);
}

.paragraph-feature-icon-grid__card-body p {
  margin: 0;
}

/* ============================================
   STEP BY STEP WITH LINKS PARAGRAPH
   ============================================ */
/* Override Bootstrap Paragraphs base styles for our custom paragraph */
.paragraph--type--step-by-step-with-links.paragraph-steps {
  display: block;
  padding: var(--paragraph-spacing, 4rem) 0;
  width: 100%;
  margin-left: 0;
  margin-right: 0;
  table-layout: auto;
}

@media (max-width: 768px) {
  .paragraph-steps {
    padding: var(--paragraph-spacing-mobile, 2.5rem) 0;
  }
}

/* Header: subtitle + title + intro */
.paragraph-steps__header {
  margin-bottom: 3rem;
}

.paragraph-steps__title {
  margin: 0 0 1rem 0;
  color: var(--color-brand-blue);
}

.paragraph-steps__intro {
  font-size: var(--text-body);
  line-height: var(--line-height-relaxed);
  color: var(--color-text);
  max-width: 700px;
}

/* Steps list */
.paragraph-steps__list {
  display: flex;
  flex-direction: column;
  gap: 0;
}

/* Individual step — two-column: text left, CTA right */
.paragraph-steps__step {
  display: flex;
  align-items: flex-start;
  gap: 2rem;
  padding: 2.5rem 0;
  border-top: 1px solid var(--color-border);
}

.paragraph-steps__step:last-child {
  border-bottom: 1px solid var(--color-border);
}

/* Text content column */
.paragraph-steps__step-content {
  flex: 1;
  min-width: 0;
}

.paragraph-steps__step-title {
  font-size: var(--text-heading-lg);
  font-weight: var(--font-weight-bold);
  line-height: var(--line-height-tight);
  color: var(--color-brand-blue);
  margin: 0 0 0.75rem 0;
}

.paragraph-steps__step-body {
  font-size: var(--text-body);
  line-height: var(--line-height-relaxed);
  color: var(--color-text);
}

.paragraph-steps__step-body p {
  margin: 0;
}

/* CTA column */
.paragraph-steps__step-cta {
  flex-shrink: 0;
  display: flex;
  align-items: center;
  align-self: center;
}

.paragraph-steps__step-cta .green-btn {
  white-space: normal;
  text-align: center;
  max-width: 220px;
}

/* Responsive: stack on mobile */
@media (max-width: 767px) {
  .paragraph-steps__step {
    flex-direction: column;
    gap: 1.5rem;
  }

  .paragraph-steps__step-cta {
    padding-top: 0;
  }

  .paragraph-steps__step-cta .green-btn {
    max-width: none;
    width: 100%;
  }
}

/* ============================================
   HUBSPOT FORM POPUP PARAGRAPH
   ============================================ */
/* Base: minimal section (no background color selected).
   Just centered text + button on the page's existing background. */
.paragraph--type--hubspot-form-popup.paragraph-hubspot-popup {
  display: block;
  position: relative;
  padding: var(--paragraph-spacing, 4rem) 0;
  overflow: hidden;
  width: 100% !important;
  margin-left: 0 !important;
  margin-right: 0 !important;
  table-layout: auto;
  text-align: center;
}

@media (max-width: 768px) {
  .paragraph-hubspot-popup {
    padding: var(--paragraph-spacing-mobile, 2.5rem) 0;
  }
}

.paragraph-hubspot-popup__content {
  position: relative;
  z-index: 1;
}

.paragraph-hubspot-popup__title {
  margin-bottom: 1rem;
}

.paragraph-hubspot-popup__body {
  margin-bottom: 1.5rem;
  max-width: 40em;
  margin-left: auto;
  margin-right: auto;
}

.paragraph-hubspot-popup__cta {
  margin-top: 1rem;
}

/* ── Colored background variant ──
   Activated when the editor picks a background color (--has-bg). */
.paragraph-hubspot-popup--has-bg {
  color: var(--color-brand-white);
  background-repeat: no-repeat;
  background-size: cover;
  background-position: center center;
}

.paragraph-hubspot-popup--has-bg .paragraph-hubspot-popup__title {
  color: var(--color-brand-white);
}

.paragraph-hubspot-popup--blue {
  background-color: var(--color-brand-blue);
  background-image: url('../../images/pattern-bg-blue.webp');
}

.paragraph-hubspot-popup--green {
  background-color: var(--color-brand-green);
  background-image: url('../../images/pattern-bg-green.webp');
}

.paragraph-hubspot-popup--purple {
  background-color: var(--color-brand-purple);
  background-image: url('../../images/pattern-bg-purple.webp');
}

.paragraph-hubspot-popup--yellow {
  background-color: var(--color-brand-orange);
  background-image: url('../../images/pattern-bg-yellow.webp');
}

.paragraph-hubspot-popup--teal {
  background-color: var(--color-brand-light-blue);
  background-image: url('../../images/pattern-bg-blue.webp');
}

/* ============================================
   HUBSPOT MODAL (global — works for any trigger)
   ============================================ */
.hubspot-modal {
  position: fixed;
  inset: 0;
  z-index: 10000;
  display: flex;
  align-items: center;
  justify-content: center;
  visibility: hidden;
  opacity: 0;
  transition: opacity 0.25s ease, visibility 0.25s ease;
}

.hubspot-modal--open {
  visibility: visible;
  opacity: 1;
}

/* Dark backdrop */
.hubspot-modal__overlay {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.6);
}

/* Centered white panel */
.hubspot-modal__panel {
  position: relative;
  z-index: 1;
  background: var(--color-brand-white, #fff);
  border-radius: 8px;
  padding: 2.5rem 2rem 2rem;
  width: 90vw;
  max-width: 640px;
  max-height: 90vh;
  overflow-y: auto;
  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.25);
}

/* Close button */
.hubspot-modal__close {
  position: absolute;
  top: 0.75rem;
  right: 0.75rem;
  background: none;
  border: none;
  font-size: 1.75rem;
  line-height: 1;
  color: var(--color-text-muted, #666);
  cursor: pointer;
  padding: 0.25rem 0.5rem;
  transition: color 0.15s;
}

.hubspot-modal__close:hover,
.hubspot-modal__close:focus {
  color: var(--color-text, #333);
}

/* Form container — HubSpot injects its own styles here */
.hubspot-modal__form {
  margin-top: 0.5rem;
}

/* Prevent page scroll while modal is open */
body.hubspot-modal-active {
  overflow: hidden;
}

/* Responsive: full-width on small screens */
@media (max-width: 576px) {
  .hubspot-modal__panel {
    width: 95vw;
    padding: 2rem 1.25rem 1.5rem;
    border-radius: 8px 8px 0 0;
    max-height: 85vh;
    align-self: flex-end;
  }
}
