/* ==========================================================================
   MODULE: CTA Block (Email Capture)

   Full-width blue card with heading, icon bullet list, email capture form,
   and disclaimer copy. Used at the end of blog posts.

   Structure:
   1. Heading — H3 rules, white
   2. Icon bullet list — small icons from blog-icons folder + white body copy
   3. Email form — white input + dark navy pill button
   4. Disclaimer — small white text below form

   ============================================================================
   WORDPRESS / ACF DEVELOPER NOTES
   ============================================================================

   All fields below are fully editable by the content editor in WordPress.

   EDITABLE FIELDS:
   ┌─────────────────┬───────────┬──────────────────────────────────────────┐
   │ Field           │ Type      │ Notes                                    │
   ├─────────────────┼───────────┼──────────────────────────────────────────┤
   │ heading         │ Text      │ H3 heading. Change per blog post.        │
   │ bullet_items    │ Repeater  │ Max 6 rows. Each row has:                │
   │   → icon        │   Select  │ Pick from full icon list (same as icon   │
   │                 │           │ block). Swap any icon per row.           │
   │   → text        │   Text    │ The bullet line copy. Change freely.     │
   │ form_action     │ URL       │ Form submit endpoint — HubSpot/Mailchimp │
   │ button_label    │ Text      │ CTA button text. Default: "Sign up for   │
   │                 │           │ free". Change to anything.               │
   │ disclaimer      │ Text      │ Small print below form. Optional.        │
   └─────────────────┴───────────┴──────────────────────────────────────────┘

   CTA ICONS — separate set from the icon block.
   Copy the "Icons for CTA module" folder to:
   /wp-content/themes/skedulo-1/assets/blog-icons-cta/

   To add a new CTA icon: drop the SVG into that folder and add one line
   to the choices list below.

   ACF Select choices for the CTA icon field (value : Label):
     Frame 5361 : Icon 1
     Frame 5361-1 : Icon 2
     Frame 5361-2 : Icon 3

   PHP src path for this module:
   $src = get_template_directory_uri() . '/assets/blog-icons-cta/' . $icon . '.svg';

   PHP TEMPLATE SNIPPET:
   <?php
     $heading      = get_sub_field('heading');
     $form_action  = get_sub_field('form_action');
     $button_label = get_sub_field('button_label') ?: 'Sign up for free';
     $disclaimer   = get_sub_field('disclaimer');
   ?>
   <div class="skd-module-cta">
     <div class="skd-container">
       <div class="skd-cta-card">

         <!-- EDITABLE: Heading -->
         <h3 class="skd-cta-card__heading"><?php echo esc_html($heading); ?></h3>

         <!-- EDITABLE: Icon bullets — swap icon + change line text per row -->
         <?php if( have_rows('bullet_items') ): ?>
         <ul class="skd-cta-card__bullets">
           <?php while( have_rows('bullet_items') ): the_row();
             $icon = get_sub_field('icon');
             $text = get_sub_field('text');
             $src  = get_template_directory_uri() . '/assets/blog-icons/' . $icon . '.svg';
           ?>
           <li class="skd-cta-card__bullet">
             <img src="<?php echo esc_url($src); ?>" alt="" class="skd-cta-card__bullet-icon">
             <span class="skd-cta-card__bullet-text"><?php echo esc_html($text); ?></span>
           </li>
           <?php endwhile; ?>
         </ul>
         <?php endif; ?>

         <!-- EDITABLE: form_action URL + button_label -->
         <form class="skd-cta-card__form" action="<?php echo esc_url($form_action); ?>" method="POST">
           <input class="skd-cta-card__input" type="email" name="email" placeholder="ENTER YOUR EMAIL" required>
           <button class="skd-cta-card__btn" type="submit"><?php echo esc_html($button_label); ?></button>
         </form>

         <!-- EDITABLE: Disclaimer (optional) -->
         <?php if($disclaimer): ?>
         <p class="skd-cta-card__disclaimer"><?php echo esc_html($disclaimer); ?></p>
         <?php endif; ?>

       </div>
     </div>
   </div>
   ========================================================================== */

.skd-blog-new .skd-module-cta {
  padding-top: 60px;
  padding-bottom: 0;
}

/* — Card — blue background — */
.skd-blog-new .skd-cta-card {
  background-color: #0055FF;
  border-radius: var(--skd-radius-card);
  padding: 48px;
}

/* — Heading — H3 rules, white — */
.skd-blog-new .skd-cta-card__heading {
  font-family: var(--skd-font-heading);
  font-weight: var(--skd-fw-extrabold);
  font-size: var(--skd-fs-h3);
  line-height: var(--skd-lh-h3);
  letter-spacing: var(--skd-ls-h3);
  color: #ffffff;
  margin: 0 0 32px 0;
}

/* — Icon bullet list — */
.skd-blog-new .skd-cta-card__bullets {
  list-style: none;
  padding: 0;
  margin: 0 0 36px 0;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.skd-blog-new .skd-cta-card__bullet {
  display: flex;
  align-items: center;
  gap: 16px;
}

.skd-blog-new .skd-cta-card__bullet-icon {
  width: auto;
  height: 32px;
  flex-shrink: 0;
  border-radius: 0;
}

.skd-blog-new .skd-cta-card__bullet-text {
  font-family: var(--skd-font-body);
  font-weight: var(--skd-fw-regular);
  font-size: var(--skd-fs-body);
  line-height: var(--skd-lh-body);
  color: #ffffff;
}

/* — Email form — */
.skd-blog-new .skd-cta-card__form {
  display: flex;
  align-items: stretch; /* input stretches to match button height exactly */
  gap: 12px;
  margin-bottom: 16px;
}

.skd-blog-new .skd-cta-card__input {
  flex: 1 1 0;
  font-family: var(--skd-font-body);
  font-weight: var(--skd-fw-semibold);
  font-size: 18px;        /* matches button font-size so height is identical */
  line-height: 1;         /* matches button line-height */
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--skd-color-text);
  background-color: #ffffff;
  border: none;
  border-radius: 50px;
  padding: 18px 28px;
  outline: none;
  min-width: 0;
}

.skd-blog-new .skd-cta-card__input::placeholder {
  color: var(--skd-color-text); /* #425466 body copy — full strength */
  opacity: 1;
}

/* — Submit button — dark navy pill — */
/* ::before holds the background so it can fade independently of the text */
.skd-blog-new .skd-cta-card__btn {
  flex-shrink: 0;
  font-family: var(--skd-font-body);
  font-weight: var(--skd-fw-semibold);
  font-size: 18px;
  line-height: 1;
  color: #ffffff;
  background-color: transparent;
  border: none;
  border-radius: 50px;
  padding: 18px 32px;
  cursor: pointer;
  position: relative;
  isolation: isolate;
  white-space: nowrap;
}

.skd-blog-new .skd-cta-card__btn::before {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: 50px;
  background: #002755;
  transition: opacity var(--skd-transition);
  z-index: -1;
}

.skd-blog-new .skd-cta-card__btn:hover::before {
  opacity: 0.75;
}

/* — Disclaimer — */
.skd-blog-new .skd-cta-card__disclaimer {
  font-family: var(--skd-font-body);
  font-weight: var(--skd-fw-regular);
  font-size: 14px;
  line-height: 1.5;
  color: #ffffff;
  opacity: 0.7;
  margin: 0;
}

/* ── Responsive ── */
@media (max-width: 768px) {
  .skd-blog-new .skd-module-cta {
    padding-top: 40px;
  }
  .skd-blog-new .skd-cta-card {
    padding: 32px 24px;
  }
  /* Form stacks vertically on mobile */
  .skd-blog-new .skd-cta-card__form {
    flex-direction: column;
    align-items: stretch;
  }
  .skd-blog-new .skd-cta-card__input,
  .skd-blog-new .skd-cta-card__btn {
    width: 100%;
    text-align: center;
  }
}

@media (max-width: 375px) {
  .skd-blog-new .skd-cta-card {
    padding: 24px 20px;
  }
}


/* .skd-blog-new .newsletter input[type="email"] {
	border-radius: 5px;
	padding-top: 17px;
	padding-right: 22px;
	padding-bottom: 17px;
	padding-left: 22px;
	width: 100%;
	border: 1px solid #EEF4FA;
}
.skd-blog-new .newsletter-wrapper .newsletter input[type="email"]::placeholder {
	font-size:12px;
	line-height: 160%;
	letter-spacing: 11%;
	text-transform: uppercase;
}
.skd-blog-new .newsletter-wrapper .newsletter input[type="email"]::placeholder {
    font-weight: 600;
    color: #002755; 
}
.skd-blog-new .newsletter input[type="email"] {max-width: 50%;}
.skd-blog-new .newsletter {
	background: #0055FF;
	border-radius:10px;
	padding:45px;
	display: flex;
	flex-direction: column;
	gap: 28px;
}
.skd-blog-new .newsletter h3 {padding-top: 0; padding-bottom: 0; color: #ffffff;}
.skd-blog-new .newsletter form,
.skd-blog-new .newsletter ul {gap: 10px;}
.skd-blog-new .newsletter p {
	font-size:12px;
	font-weight: 500;
	line-height: 160%;
	color: #ffffff;
}

.skd-blog-new .newsletter button {
	background-color: #002755;
	color:#ffffff;
	padding-top: 10px;
	padding-bottom: 10px;
}
.skd-blog-new .newsletter input[type="email"] {
	padding-top: 4px;
	padding-bottom: 8px;
}
@media screen and (max-width: 767px) {
	.skd-blog-new .newsletter input[type="email"] {max-width: 100%;}
} */