/* how-tos.css */
.howto-wrapper {
  position: relative;
  overflow: hidden;    /* so bg never spills out */
  background-color: #f8f9fa;   /* same fallback as content */
  padding: 10px 20px;  /* match your original spacing */
}

.howto-bg {
  position: absolute;
  top: 0; left: 0;
  width: 100%; height: 100%;
  pointer-events: none;  /* allow clicks through */
  z-index: 0;
}

.howto-bg img {
  width: 100%; height: 100%;
  object-fit: cover;
  opacity: 0.2;          /* adjust opacity to taste */
}

.howto-content {
  position: relative;
  z-index: 1;            /* sit above the bg */
}
/* ---------------- Portal wrapper & typography ---------------- */
.howto-portal {
    position: relative;
    background-color: transparent;
    padding: 60px 20px;
    color: #333;
    text-align: center;
    font-family: Arial, sans-serif;
  }
  
  .howto-portal h1 {
    font-size: 3rem;
    margin-bottom: 20px;
    font-weight: normal;
    color: #000000;
  }
  
  .howto-portal .lead {
    font-size: 1.2rem;
    margin: 0 auto 40px;
    max-width: 800px;
    line-height: 1.6;
    color: #666;
  }
  
  /* ---------------- Toggle buttons & search ---------------- */
  .view-toggle {
    display: flex;
    gap: 0.5rem;
    justify-content: center;
    margin-bottom: 1rem;
  }
  .view-toggle button {
    background: #f0f0f0;
    border: 1px solid #ccc;
    padding: 0.5rem 1rem;
    font-size: 0.9rem;
    cursor: pointer;
    border-radius: 4px;
    transition: background 0.2s, border-color 0.2s;
  }
  .view-toggle button.active,
  .view-toggle button:hover {
    background: #00152d;
    border-color: #00152d;
    color: #fff;
  }
  
  #guideSearch {
    display: block;
    width: 100%;
    max-width: 400px;
    margin: 0 auto 1.5rem;
    padding: 0.5rem;
    font-size: 0.95rem;
    border: 1px solid #ccc;
    border-radius: 4px;
  }
  
  /* ---------------- Cards: Grid & List ---------------- */
  .howto-cards {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 1rem;
    margin-bottom: 2rem;
    transition: all 0.3s;
  }
  
/* -------- Clean, professional list view -------- */
/* -------- Slimmer & wider list view -------- */
/* ---------- New Card‑Style List View ---------- */
.howto-cards.list-view {
    display: block;
    max-width: 900px;       /* limit width for readability */
    margin: 0 auto 2rem;    /* center and add bottom space */
    padding: 0;
  }
  
  .howto-cards.list-view .howto-card {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.75rem 1rem;
    margin-bottom: 0.5rem;
    background: #fff;
    border: 1px solid #e0e0e0;
    border-radius: 4px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.05);
    background-image: none !important;  /* remove the logo */
    cursor: pointer;
    transition: background 0.2s, box-shadow 0.2s;
  }
  
  .howto-cards.list-view .howto-card:hover {
    background: #f7f9fa;
    box-shadow: 0 2px 6px rgba(0,0,0,0.1);
  }
  
  .howto-cards.list-view .howto-card p {
    margin: 0;
    font-size: 1rem;
    color: #002147;
    flex: 1;  /* fill available space */
  }
  
  /* arrow indicator on the right */
  .howto-cards.list-view .howto-card::after {
    content: '›';
    font-size: 1.4rem;
    color: #ccc;
    margin-left: 1rem;
  }


  .howto-card {
    position: relative;
    padding: 1rem;
    min-height: 120px;
    background: #fff;
    background-size: 40px 40px;
    background-repeat: no-repeat;
    background-position: bottom right;
    border: 1px solid #e0e0e0;
    border-radius: 6px;
    cursor: pointer;
    display: flex;
    align-items: flex-start;
    transition: transform 0.2s, box-shadow 0.2s;
  }
  .howto-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.08);
  }
  .howto-card p {
    margin: 0;
    font-size: 1.2rem;
    font-weight:600;
    line-height: 1.3;
    color: #002147;
  }
  
  /* ---------------- Full‑screen modal overlay ---------------- */
  /* Compensate for body {zoom:0.7;} */
  .viewer-container {
    display: none;                     /* hidden by default */
    position: fixed;                   /* sit on top of everything */
    top: 0; left: 0;
    width: calc(100vw / 0.7);          /* grow to full viewport */
    height: calc(100vh / 0.7);
    background-color: rgba(0,0,0,0.6); /* dim backdrop */
    align-items: center;               /* flex centering */
    justify-content: center;
    z-index: 1000;
  }
  .viewer-container.flex {
    display: flex;                     /* show as flex when active */
  }
  
  .viewer-container .close-btn {
    position: absolute;
    top: 1.5rem;
    right: 1.5rem;
    background: #ff5c5c;
    color: #fff;
    border: none;
    padding: 0.5rem 0.75rem;
    font-size: 1rem;
    border-radius: 4px;
    cursor: pointer;
    z-index: 1100;
  }
  
  /* ---------------- Content viewer sizing ---------------- */
  #contentViewer {
    width: 90%;           /* leave 5% margin each side */
    height: 90%;
    max-width: none;
    max-height: none;
    border-radius: 6px;
    overflow: hidden;
  }
  #contentViewer iframe,
  #contentViewer video {
    width: 100%;
    height: 100%;
    border: none;
  }
  
  /* ---------------- Responsive tweaks ---------------- */
  @media (max-width: 768px) {
    .view-toggle { flex-wrap: wrap; }
    #guideSearch { max-width: 100%; }
    .howto-cards { grid-template-columns: 1fr; }
  }
  