/**
 * @file
 * Rcomms Paragraphs – reusable paragraph component styles.
 *
 * Paragraph types: cta_banner, text_image, product_category_grid,
 * product_category_card, feature_list, feature_item, faq, faq_item,
 * gallery, app_promotion, video, hubspot_form_popup, feature_grid_with_icon,
 * feature_grid_card, step_by_step_with_links, individual_step.
 *
 * DESIGN TOKEN CONTRACT
 * ---------------------
 * This file references CSS custom properties that each site defines in its
 * own design-tokens.css. No site-specific colors are hardcoded here.
 *
 * Required color tokens:
 *   --color-brand-primary       Main brand color (FAQ panels, step titles, overlay)
 *   --color-brand-primary-rgb   Same as above in R, G, B format (for rgba overlay)
 *   --color-brand-secondary     Dark/header variant (feature-icon-grid titles, card headers)
 *   --color-brand-accent        Highlight/accent (subtitles, accent backgrounds)
 *   --color-brand-blue          Editor "blue" color-class variant
 *   --color-brand-green         Editor "green" color-class variant
 *   --color-brand-orange        Editor "yellow/orange" color-class variant
 *   --color-brand-purple        Editor "purple" color-class variant (optional)
 *   --color-brand-white         White (#fff)
 *   --color-text                Body text color
 *   --color-text-muted          Secondary/muted text
 *   --color-border              Default border color
 *
 * Required spacing tokens:
 *   --paragraph-spacing          Desktop vertical padding (e.g. 4rem)
 *   --paragraph-spacing-mobile   Mobile vertical padding  (e.g. 2.5rem)
 *   --container-max-width        Theme container width    (e.g. 1440px)
 *
 * Required typography tokens:
 *   --font-weight-light / --font-weight-semibold / --font-weight-bold
 *   --text-heading-sm / --text-heading-md / --text-heading-lg / --text-heading-xl
 *   --text-body / --text-caption
 *   --line-height-tight / --line-height-snug / --line-height-relaxed / --line-height-loose
 *   --letter-spacing-wider / --letter-spacing-widest
 */

/* ============================================
   SECTION WRAPPERS
   ============================================ */
.page-paragraphs-sections,
.front-sections {
  overflow-x: hidden;
}

/* Custom paragraph types: display block, no BP clearfix */
.paragraph-cta-banner,
.paragraph-product-grid,
.paragraph-text-image,
.paragraph-video,
.paragraph-faq,
.paragraph-gallery,
.paragraph-feature-list,
.paragraph-app-promotion,
.paragraph-feature-icon-grid,
.paragraph-steps,
.paragraph-hubspot-popup {
  display: block;
  table-layout: auto;
}
.paragraph-cta-banner::before,
.paragraph-cta-banner::after,
.paragraph-product-grid::before,
.paragraph-product-grid::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-app-promotion::before,
.paragraph-app-promotion::after,
.paragraph-feature-icon-grid::before,
.paragraph-feature-icon-grid::after,
.paragraph-steps::before,
.paragraph-steps::after,
.paragraph-hubspot-popup::before,
.paragraph-hubspot-popup::after {
  display: none;
}

/* Bootstrap Paragraphs width constraints (when used alongside BP) */
.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;
}

.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;
}

.page-paragraphs-sections .paragraph.paragraph--width--full,
.front-sections .paragraph.paragraph--width--full {
  max-width: none;
  width: 100%;
}

.paragraph--type--cta-banner,
.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--step-by-step-with-links,
.paragraph--type--hubspot-form-popup {
  margin-bottom: 0;
}

/* Paragraph subtitle (appears above main title) */
.paragraph__subtitle {
  color: var(--color-brand-accent);
  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;
}

/* ============================================
   CTA BANNER
   ============================================ */
/* 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--accent { background-color: var(--color-brand-accent); }
.paragraph-cta-banner--primary { background-color: var(--color-brand-primary); }
.paragraph-cta-banner--secondary { background-color: var(--color-brand-secondary); }

.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(var(--color-brand-primary-rgb), 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;
}

/* Hide the field label that Drupal adds above the paragraph field */
.page-paragraphs-sections > .field > .field--label {
  display: none;
}

/* Prevent double-rendering: hide rcomms paragraph field when it appears
   inside the node content area (it should only render full-width via
   page_paragraphs outside the .container). Belt-and-suspenders for
   hook_entity_view_alter() + render cache edge cases. */
#main-content .field--name-field-rcomms-paragraph,
#main-content .field--name-field-content-sections {
  display: none;
}
.paragraph-cta-banner__media-content {
  margin-top: 2.5rem;
  width: 76%;
  margin-inline: auto;
}

/* Drupal wraps media in .field > .field__item > article > .field > .field__item > a > img —
   force every layer to full width so the image fills the centered container. */
.paragraph-cta-banner__media-content .field,
.paragraph-cta-banner__media-content .field__item,
.paragraph-cta-banner__media-content .media,
.paragraph-cta-banner__media-content article,
.paragraph-cta-banner__media-content a {
  display: block;
  width: 100%;
  max-width: 100%;
}

.paragraph-cta-banner__media-content img {
  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--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; text-align: left; }
.paragraph-product-grid__intro { margin-bottom: 0; }
.paragraph-product-grid__grid {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 25px;
  margin-top: 2rem;
}

a.paragraph-product-grid__card {
  flex: 1 1 240px;
  max-width: 320px;
  display: flex;
  flex-direction: column;
  padding: 0;
  border-radius: 8px;
  overflow: hidden;
  text-align: center;
  color: var(--color-brand-white);
  text-decoration: none;
  height: 360px;
  transition: transform 0.2s, filter 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);
  filter: drop-shadow(0 8px 16px rgba(0, 0, 0, 0.2));
}

a.paragraph-product-grid__card--secondary { background-color: var(--color-brand-secondary); }
a.paragraph-product-grid__card--primary { background-color: var(--color-brand-primary); }
a.paragraph-product-grid__card--accent { background-color: var(--color-brand-accent); }
a.paragraph-product-grid__card--grey { background-color: var(--color-gray-dark, #6c757d); }

.paragraph-product-grid__card-title {
  background-color: var(--color-brand-primary);
  color: var(--color-brand-white);
  font-size: var(--text-heading-md);
  font-weight: var(--font-weight-medium);
  text-transform: uppercase;
  margin: 0;
  padding: 0.875rem 1rem;
  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;
}

.paragraph-product-grid__card-image {
  flex: 1;
  overflow: hidden;
  min-height: 0;
}
.paragraph-product-grid__card-image .field,
.paragraph-product-grid__card-image .field__item { width: 100%; height: 100%; }
.paragraph-product-grid__card-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.paragraph-product-grid--has-bg { color: var(--color-brand-white); }
.paragraph-product-grid--secondary { background-color: var(--color-brand-secondary); }
.paragraph-product-grid--primary { background-color: var(--color-brand-primary); }
.paragraph-product-grid--accent { background-color: var(--color-brand-accent); }
.paragraph-product-grid--grey { background-color: var(--color-gray-dark, #6c757d); }
.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); }
.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;
}

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 {
  background-color: transparent;
  padding: 0;
  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--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;
  border-radius: 40px 0 40px 0;
}
.paragraph-text-image__title { margin-bottom: 1rem; text-align: left; }
.paragraph-text-image__body { margin-bottom: 1.5rem; }
.paragraph-text-image__cta { margin-top: 1rem; }

/* ============================================
   VIDEO
   ============================================ */
.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; }
}

.paragraph-video__media {
  position: relative;
  width: 100%;
  max-width: 100%;
}

/* Direct <video> rendered by paragraph--video.html.twig (uploaded file) */
.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
   ============================================ */
.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-primary);
}
.paragraph-faq .paragraph__subtitle,
.paragraph-steps .paragraph__subtitle {
  text-align: center;
}
.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; }

.paragraph--type--faq-item.panel {
  background-color: var(--color-brand-primary);
  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-primary);
  border-radius: 0;
  padding: 0;
}
.paragraph--type--faq-item .panel-title {
  font-size: var(--text-heading-sm);
}

.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-primary);
  font-weight: var(--font-weight-semibold);
  text-decoration: none;
  transition: all 0.2s ease;
}
.paragraph--type--faq-item .panel-title a:hover {
  color: var(--color-brand-primary);
  background-color: var(--color-brand-white);
  text-decoration: none;
}
.paragraph--type--faq-item .panel-body {
  background-color: var(--color-brand-white);
  color: var(--color-brand-primary);
  padding: 1.5rem 1.5rem 2rem;
  border-top: 1px solid rgba(var(--color-brand-primary-rgb), 0.1);
  font-size: var(--text-body);
  line-height: var(--line-height-relaxed);
}

/* ============================================
   GALLERY
   ============================================ */
.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; text-align: left; }
.paragraph-gallery__view-all a {
  color: var(--color-brand-secondary);
}
.paragraph-gallery__grid {
  margin-top: 1rem;
  width: 100%;
}

.row.paragraph-gallery__grid {
  margin-inline: 0;
}

@media (max-width: 991px) {
  .paragraph-gallery__view-all {
    text-align: left;
  }
}

/* Drupal renders field_images as .field__items > .field__item > img */
.paragraph-gallery__grid .field__items {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 1rem;
  width: 100%;
}

.paragraph-gallery__grid .field__item {
  border-radius: 8px;
  overflow: hidden;
}

.paragraph-gallery__grid .field__item img {
  width: 100%;
  height: 220px;
  object-fit: cover;
  display: block;
}

/* ============================================
   FEATURE LIST
   ============================================ */
.paragraph--type--feature-list.paragraph-feature-list {
  display: block;
  padding: var(--paragraph-spacing, 4rem) 0;
  background-color: var(--color-brand-accent);
  color: var(--color-text-muted);
  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; }
}

.paragraph-feature-list--accent { background-color: var(--color-brand-accent); }
.paragraph-feature-list--primary { background-color: var(--color-brand-primary); }
.paragraph-feature-list--secondary {
  background-color: var(--color-brand-secondary);
  color: var(--color-brand-white);
}
.paragraph-feature-list--secondary .paragraph-feature-list__item-description,
.paragraph-feature-list--secondary .paragraph-feature-list__item-title { color: var(--color-brand-white); }

.paragraph-feature-list--purple {
  background-color: var(--color-brand-purple, #5b4f97);
  color: var(--color-brand-white);
}

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

.paragraph-feature-list__title { margin-bottom: 1rem; text-align: left; }
.paragraph-feature-list__body { margin-bottom: 1.5rem; color: var(--color-gray-dark); }
@media (min-width: 992px) {
  .paragraph-feature-list .row {
    display: flex;
    align-items: center;
  }
}

.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: center;
}
.paragraph-feature-list__item-icon {
  align-self: center;
  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-gray-dark);
}

.paragraph-feature-list .field--name-field-headline,
.paragraph-feature-list .field--name-field-title {
  color: inherit;
}

/* ============================================
   APP PROMOTION
   ============================================ */
.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;
  }
}

/* ============================================
   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: repeat(auto-fit, minmax(160px, 200px));
  justify-content: center;
  gap: 1.5rem 2rem;
}

/* ---- Individual card ---- */
.paragraph--type--feature-grid-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: 0 auto 1rem;
  flex-shrink: 0;
}

.paragraph-feature-icon-grid__card-icon img {
  width: 64px;
  height: 64px;
  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-primary);
}

.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-primary);
  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 .btn-primary {
  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 .btn-primary {
    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--secondary {
  background-color: var(--color-brand-secondary);
}

.paragraph-hubspot-popup--primary {
  background-color: var(--color-brand-primary);
}

.paragraph-hubspot-popup--purple {
  background-color: var(--color-brand-purple, #5b4f97);
}

.paragraph-hubspot-popup--accent {
  background-color: var(--color-brand-accent);
}

/* ============================================
   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, #999);
  cursor: pointer;
  padding: 0.25rem 0.5rem;
  transition: color 0.15s;
}

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

/* 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;
  }
}

/* ============================================
   PRIMARY BUTTON
   ============================================ */
.btn-primary {
  display: inline-block;
  padding: 15px 23px;
  font-size: 18px;
  font-weight: var(--font-weight-bold);
  text-transform: uppercase;
  text-decoration: none;
  line-height: 1;
  border-radius: 4px;
  border: 1px solid var(--color-brand-primary);
  background-color: var(--color-brand-primary);
  color: var(--color-brand-white);
  transition: all 0.2s ease-in-out;
  margin: 10px 0;
  text-align: center;
  cursor: pointer;
}

.btn-primary:hover,
.btn-primary:focus {
  background-color: var(--color-brand-white);
  border-color: var(--color-brand-primary);
  color: var(--color-brand-primary);
  text-decoration: none;
}

/* ============================================
   CTA BUTTON OVERRIDES (paragraph-specific)
   ============================================ */
.paragraph-cta-banner--left .btn-primary {
  margin-left: 0;
  margin-right: auto;
}
