{# --- Unique Module ID for Scoping CSS --- #}
{% set module_id = "industry-module-" ~ name|md5 %}

{# --- CSS Logic --- #}
{% require_css %}
<style>
  /* --- DESKTOP SPACING --- */
  .industry-module-wrapper. {
    padding: 60px 20px;
    
  }

  /* --- MOBILE SPACING --- */
  @media (max-width: 767px) {
    .industry-module-wrapper. {
      padding: 40px 20px;
      
    }
  }

  /* =========================================
     GLOBAL MODULE STYLES & TYPOGRAPHY
     ========================================= */
  .industry-module-wrapper {
    background-color: #fff;
    font-family: 'Outfit', sans-serif;
  }

  .cards-container {
    max-width: 1100px;
    margin: 0 auto;
  }

  /* =========================================
     TOP NAVIGATION
     ========================================= */
  .industry-nav-wrapper {
    margin-bottom: 60px;
    text-align: center;
  }

  .industry-nav ul {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    justify-content: center;
    gap: 15px; 
    flex-wrap: wrap;
  }

  .industry-nav a.nav-link {
    display: inline-flex;
    justify-content: center;
    align-items: center;
    width: auto; 
    padding: 0 30px; 
    height: 61px;
    text-decoration: none;
    font-family: 'Outfit', sans-serif;
    font-weight: 500;
    font-size: 18px;
    color: #093549;
    border-radius: 31px;
    border: 2px solid #EAEAEA;
    background: #FFFFFF;
    transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
    box-sizing: border-box; 
  }

  .industry-nav a.nav-link:hover {
    border-color: transparent !important;
    background: transparent linear-gradient(180deg, #598BA7 0%, #6498B6 29%, #0E3341 100%) 0% 0% no-repeat padding-box;
    color: #ffffff !important;
    box-shadow: 0px 4px 12px rgba(14, 51, 65, 0.25);
    transform: translateY(-2px);
  }

  /* =========================================
     CARD STRUCTURE
     ========================================= */
  .industry-card {
    border-radius: 30px;
    padding: 60px 80px;
    margin-bottom: 50px;
    position: relative;
    overflow: hidden; 
    background: transparent;
    z-index: 1;
  }

  .industry-card::before {
    content: "";
    position: absolute;
    top: 0; left: 0; right: 0; bottom: 0;
    z-index: -1;
    border-radius: 30px;
    opacity: 1;
  }

  .card-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 20px;
    margin-bottom: 20px;
  }

  .header-text {
    flex: 1;
    min-width: 0;
  }

  .header-icon {
    flex: 0 0 auto;
    width: 80px;
  }
  .header-icon img {
    width: 100%;
    height: auto;
    display: block;
  }

  .card-header h2 {
    font-family: 'Outfit', sans-serif;
    font-size: 45px;
    font-weight: 400;
    line-height: 60px;
    color: #073345;
    margin: 0 0 10px 0;
  }

  .industry-card .card-subhead {
    font-family: 'Raleway', sans-serif !important;
    font-size: 25px !important;
    font-weight: 400 !important;
    line-height: 40px !important;
    color: #073345;
    margin-top: 0;
    margin-bottom: 20px;
    display: block;
  }

  .card-main-desc,
  .card-main-desc p {
    font-family: 'Outfit', sans-serif;
    font-size: 18px;
    font-weight: 400;
    line-height: 26px;
    color: #393939;
    margin-bottom: 20px;
  }
  .card-main-desc p:last-child {
    margin-bottom: 0;
  }

  .pill-label {
    display: inline-block;
    background: rgba(255, 255, 255, 0.7);
    padding: 6px 18px;
    border-radius: 20px;
    font-family: 'Outfit', sans-serif;
    font-size: 15px;
    font-weight: 500;
    letter-spacing: 0.10em;
    text-transform: uppercase;
    margin-bottom: 15px;
    color: #000;
  }

  .we-help-text {
    font-family: 'Outfit', sans-serif;
    font-size: 20px;
    font-weight: 400;
    line-height: 40px;
    color: #2B2B2B;
    margin-bottom: 30px;
  }

  .how-help-bullets ul {
    list-style: none;
    padding: 0;
    margin: 0;
  }
  .how-help-bullets li {
    position: relative;
    padding-left: 25px;
    margin-bottom: 8px;
    font-family: 'Outfit', sans-serif;
    font-size: 18px;
    font-weight: 400;
    line-height: 35px;
    color: #333333;
  }

  .how-help-bullets li::before {
    content: ""; 
    position: absolute;
    left: 0;
    top: 12px; 
    width: 11px;
    height: 11px;
    border-radius: 50%;
    background-color: #859CAA; 
  }

  /* =========================================
     BUTTON BASE STYLES
     ========================================= */
  .card-actions {
    display: flex;
    gap: 20px;
    margin-top: 40px;
    flex-wrap: wrap; 
  }

  .btn {
    display: inline-flex;
    justify-content: center;
    align-items: center;
    height: 61px;
    border-radius: 31px;
    padding: 0 35px;
    box-sizing: border-box;
    text-decoration: none;
    font-family: 'Outfit', sans-serif;
    font-weight: 600;
    font-size: 20px;
    text-align: center;
    color: #ffffff !important;
    border: none;
    cursor: pointer;
    transition: transform 0.2s ease, opacity 0.2s ease, box-shadow 0.2s ease;
  }

  .btn:hover {
    opacity: 0.95;
    transform: translateY(-2px);
  }

  /* =========================================
     THEMES (UPDATED RIGHT/SECONDARY BUTTON COHESION)
     ========================================= */

  /* --- HEALTHCARE (Blue) --- */
  .theme-healthcare::before {
    background: transparent linear-gradient(180deg, #FFFFFF 0%, #8CAFC5 0%, #679AB8 61%, #6498B6 85%, #21647E 100%) 0% 0% no-repeat padding-box;
    opacity: 0.16;
  }
  .theme-healthcare .pill-label { background: #FFFFFF; }

  .theme-healthcare .btn-primary { 
    background: #79B3D3 0% 0% no-repeat padding-box;
    width: 287px;
  }
  .theme-healthcare .btn-secondary { 
    /* The targeted blue-teal shadow gradient from your screenshot */
    background: transparent linear-gradient(180deg, #4B8CAE 0%, #4B8CAE 40%, #29607B 100%) 0% 0% no-repeat padding-box;
    width: 307px;
    box-shadow: 0px 4px 10px rgba(41, 96, 123, 0.4);
  }

  /* --- CONSTRUCTION (Gold) --- */
  .theme-construction::before {
    background: transparent linear-gradient(180deg, #FFFFFF 0%, #E3DACD 47%, #E2C8A3 100%) 0% 0% no-repeat padding-box;
    opacity: 0.79;
  }
  .theme-construction .pill-label { background: rgba(255,255,255,0.6); }
  .theme-construction .how-help-bullets li::before { background-color: #313131; }

  .theme-construction .btn-primary { 
    background: #C29F6B 0% 0% no-repeat padding-box;
    width: 287px; 
  }
  .theme-construction .btn-secondary { 
    background: transparent linear-gradient(180deg, #E3DACD 0%, #916D3B 100%) 0% 0% no-repeat padding-box;
    width: 307px; 
    box-shadow: 0px 3px 6px #0000003B;
  }

  /* --- PROFESSIONAL (Gray) --- */
  .theme-professional::before {
    background: #072E3E 0% 0% no-repeat padding-box;
    opacity: 0.05;
  }
  .theme-professional .pill-label { background: #FFFFFF; }

  .theme-professional .btn-primary { 
    background: #859CAA 0% 0% no-repeat padding-box;
    width: 287px; 
  }
  .theme-professional .btn-secondary { 
    /* MATCHED: Same exact gradient fill and shadow signature from the screenshot */
    background: transparent linear-gradient(180deg, #4B8CAE 0%, #4B8CAE 40%, #29607B 100%) 0% 0% no-repeat padding-box;
    width: 307px; 
    box-shadow: 0px 4px 10px rgba(41, 96, 123, 0.4);
  }

  /* =========================================
     MOBILE RESPONSIVE
     ========================================= */
  @media (max-width: 767px) {
    .industry-card { 
      padding: 40px 25px; 
      overflow: visible !important; 
      margin-top: 60px; 
      position: relative; 
    }

    .industry-nav-wrapper { margin-bottom: 0px; }
    .card-header { display: block; margin-bottom: 20px; }
    
    .header-icon { 
      position: absolute; 
      top: -40px; 
      left: 50%;
      transform: translateX(-50%);
      width: 80px !important;
      height: 80px !important;
      margin: 0 !important; 
      z-index: 10; 
    }
    .header-icon img { width: 100% !important; height: auto; display: block; }
    
    .card-header h2 { font-size: 28px; line-height: 40px; color: #1D1D1D; margin-top: 20px; text-align: center; }
    .industry-card .card-subhead { font-family: 'Raleway', sans-serif !important; font-size: 18px !important; line-height: 28px !important; color: #141414; margin-bottom: 20px; text-align: center; }
    .card-main-desc, .card-main-desc p { font-weight: 300; font-size: 15px; line-height: 25px; }
    .pill-label { font-weight: 500; font-size: 15px; line-height: 43px; letter-spacing: 1.5px; }
    .we-help-text { font-size: 18px; line-height: 28px; color: #2B2B2B; }
    .how-help-bullets li { font-size: 15px; line-height: 28px; }
    .how-help-bullets li::before { top: 9px; }
    
    .card-actions { flex-direction: column; gap: 12px; }
    
    .btn { 
      width: 100% !important; 
      height: 55px !important; 
      padding: 0 20px;
      font-weight: 600;
      font-size: 18px;
    }
    
    .industry-nav a.nav-link {
      width: 100%;
      height: auto;
      padding: 15px 20px;
      margin-bottom: 5px;
      font-weight: 500;
      font-size: 18px;
      line-height: normal;
      color: #093549 !important; 
      background: #f9f9f9;
      border: 1px solid #eee !important;
      box-shadow: none;
    }
    .industry-nav a.nav-link:hover {
      background-image: none !important;
      background-color: #fff !important;
      border-color: #C7A97F !important;
      color: #093549 !important;
    }
    .industry-nav ul { flex-direction: column; gap: 10px; }
  }
</style>
{% end_require_css %}

{# --- Main Module Markup --- #}
<div class="industry-module-wrapper ">

  {# --- Top Navigation --- #}
  <div class="industry-nav-wrapper">
    <nav class="industry-nav">
      <ul>
        {% for item in module.industry_cards %}
          <li>
            <a href="#" class="nav-link">
              
            </a>
          </li>
        {% endfor %}
      </ul>
    </nav>
  </div>

  {# --- Cards Container --- #}
  <div class="cards-container">
    {% for item in module.industry_cards %}
      
      <div id="" class="industry-card ">
        <div class="card-inner">
          
          <div class="card-header">
            <div class="header-text">
              <h2></h2>
              {% if item.subheadline %}
                <div class="card-subhead"></div>
              {% endif %}
            </div>
            
            {% if item.icon.src %}
              <div class="header-icon">
                <img src="" alt="" loading="lazy">
              </div>
            {% endif %}
          </div>

          <div class="card-main-desc">
            
          </div>

          {% if item.we_help_text %}
            <div class="info-block">
              <span class="pill-label">WE HELP:</span>
              <div class="info-content we-help-text">
                
              </div>
            </div>
          {% endif %}

          {% if item.how_we_help_bullets %}
            <div class="info-block">
              <span class="pill-label">HOW WE HELP:</span>
              <div class="info-content how-help-bullets">
                
              </div>
            </div>
          {% endif %}

          <div class="card-actions">
            {% if item.btn_text_1 %}
              {% set href_1 = item.btn_link_1.url.href %}
              {% if item.btn_link_1.url.type is equalto "EMAIL_ADDRESS" %}{% set href_1 = "mailto:" + href_1 %}{% endif %}
              <a href="" class="btn btn-primary">
                
              </a>
            {% endif %}

            {% if item.btn_text_2 %}
              {% set href_2 = item.btn_link_2.url.href %}
              {% if item.btn_link_2.url.type is equalto "EMAIL_ADDRESS" %}{% set href_2 = "mailto:" + href_2 %}{% endif %}
              <a href="" class="btn btn-secondary">
                
              </a>
            {% endif %}
          </div>

        </div>
      </div>
    {% endfor %}
  </div>

</div>

<script>
(function() {
  window.addEventListener('DOMContentLoaded', function() {
    var navLinks = document.querySelectorAll('.industry-module-wrapper. .industry-nav a[href^="#"]');
    navLinks.forEach(function(link) {
      link.addEventListener('click', function(e) {
        e.preventDefault();
        var targetId = this.getAttribute('href');
        var targetSection = document.querySelector(targetId);
        if (targetSection) {
          targetSection.scrollIntoView({
            behavior: 'smooth',
            block: 'start'
          });
          history.pushState(null, null, targetId);
        }
      });
    });
  });
})();
</script>