/* =========================================================
MOBILE-FIRST GLOBAL STYLESHEET – Light/Dark, Cards, Accordion
========================================================= */

/* ---------- 1. BASE (light) ---------- */
:root {
  --font-body: 'Segoe UI', sans-serif;
  --font-heading: var(--font-body);
  --clr-bg:           #ffffff;
  --clr-bg-light:     #f4f9fc;
  --clr-bg-muted:     #eef4f8;
  --clr-text:         #ffffff;
  --clr-muted:        #555;
  --clr-link:         #0000EE;
  --clr-link-hover:   #004080;
  --clr-banner:       #004080;
  --clr-banner-light: #007bb5;
  --clr-accent:       #00C2FF;
  --clr-accent-hover: #00A2D1;
  --radius:   0.5rem;
  --shadow:   0 2px 8px rgba(0,0,0,.08);
  --trans:    0.2s ease-in-out;
}


/* ---------- 3. RESET + BASE ---------- */
*,*::before,*::after{box-sizing:border-box}
html,body{margin:0;padding:0}
body {
  font-family: var(--font-body);
  color: var(--clr-text);
  background: var(--clr-bg);
  line-height: 1.6;
  font-size: 1.05rem;
  padding: 1rem;
}

h1,h2,h3,h4,h5,h6 {
  font-family: var(--font-heading);
  margin: 0 0 0.5em;
  line-height: 1.25;
}
p { margin: 0 0 1em; }
a { color: var(--clr-link); text-decoration: none; }
a:hover { color: var(--clr-link-hover); text-decoration: underline; }

.mb-1{margin-bottom:.5rem}.mb-2{margin-bottom:1rem}.mb-3{margin-bottom:2rem}
.text-center{text-align:center}
.grid-2{display:grid;grid-template-columns:1fr;gap:1rem}
@media (min-width: 600px) {
  .grid-2 { grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); }
}
.container{max-width: 960px;margin: auto;padding: 0 1rem}

.site-banner {
  background: var(--clr-banner);
  color: #fff;
  padding: 0.75rem;
  text-align: center;
  font-size: 1.25rem;
}
.cta-button {
  display: inline-block;
  background-color: var(--clr-accent);
  color: #000;
  padding: 1rem;
  font-size: 1rem;
  min-height: 48px;
  border-radius: var(--radius);
  font-weight: bold;
  text-align: center;
  text-decoration: none;
  transition: background var(--trans);
}
.cta-button:hover {
  background: var(--clr-accent-hover);
}
.card {
  background: var(--clr-bg-light);
  padding: 1rem;
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

input, textarea, select {
  width: 100%;
  padding: 0.75rem;
  font: inherit;
  border: 1px solid #ccc;
  border-radius: var(--radius);
  background: var(--clr-bg-light);
  color: var(--clr-text);
  margin-bottom: 1rem;
}

.accordion {
  border: 1px solid var(--clr-bg-muted);
  border-radius: var(--radius);
  overflow: hidden;
}
.accordion-item + .accordion-item {
  border-top: 1px solid var(--clr-bg-muted);
}
.accordion-button {
  all: unset;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1rem;
  display: inline-flex;
  font-weight: bold;
  background: var(--clr-bg);
  cursor: pointer;
}
.accordion-button svg {
  transition: transform var(--trans);
}
.accordion-button[aria-expanded="true"] svg {
  transform: rotate(90deg);
}
.accordion-panel {
  display: none;
  padding: 0 1rem 1rem;
}
.accordion-button[aria-expanded="true"] + .accordion-panel {
  display: block;
}
.accordion-panel.card {
  margin-top: -0.5rem;
}

ul.list-none {
  padding-left: 0;
  margin-left: 0;
  list-style: none;
}

.accordion-list.list-none {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  list-style: none;
  padding-left: 0;
  margin-left: 0;
}

.accordion-toggle {
  font-size: 1.25rem;
  font-weight: bold;
  padding: 0.5rem 1rem;
  border-radius: 0.5rem;
  margin-bottom: 0.25rem;
  text-align: center;
  min-width: 200px;
  color: #4f46e5;
  display: inline-block;
  width: auto; 
  background: #f9f9ff;
  border: 2px solid #4f46e5;
  cursor: pointer;
  transition: background 0.2s, border-color 0.2s;
}

.accordion-toggle:hover {
  background: #eef2ff;
  border-color: #4338ca;
}

@media (max-width: 768px) {
  .action-buttons {
    position: absolute;
    top: 0.5rem;
    right: 0.5rem;
    transform: none;
    z-index: 10;
  }
  
  .search-toggle {
    font-size: 1.35rem;
    display: inline-block;
  }
}

.audio-panel {
  background: var(--clr-bg-light);
  color: #222; /* Dark text for readability */
}

.audio-panel .cta-button {
  background-color: #e6f0f5;
  border: 1px solid #333;
  color: #111;
  padding: 0.4rem 0.75rem;
  border-radius: 4px;
  font-size: 0.9rem;
  cursor: pointer;
  transition: background 0.2s ease;
}

.audio-panel .cta-button:hover {
  background-color: #dceaf0;
  border-color: #000;
}

.audio-panel select,
.audio-panel input[type="range"] {
  background: var(--clr-bg);
  color: #222; /* Dark text for visibility */
  border: 1px solid #ccc;
}

.audio-panel #speechProgress {
  color: var(--clr-muted);
}

.header-row {
  color: #fff;
}


  .hero-image {
    flex: 1 1 300px;
    text-align: center;
    max-height: 250px;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative; /* Add this line */
  }
  
  .sticker {
    position: absolute; /* Changed from static */
    top: 10px;
    right: 10px;
    background: #ff4081;
    color: white;
    padding: 0.4rem 1rem;
    font-size: 0.85rem;
    font-weight: bold;
    border-radius: 5px;
    transform: rotate(10deg);
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.2);
    z-index: 10;
  }
  
  .hero-image img {
    width: auto;
    height: 100%;
    max-height: 250px;
    object-fit: contain;
  }
  
  .sticker.animate-on-view {
    opacity: 0;
    transform: rotate(10deg) scale(0.9);
    transition: opacity 0.6s ease, transform 0.6s ease;
  }
  
  .sticker.animate-on-view.visible {
    opacity: 1;
    transform: rotate(10deg) scale(1);
  }
  
  .enhanced-banner {
    background: linear-gradient(to right, #004080, #007bb5);
    padding: 1.5rem 1rem;
    color: white;
  }
  
.hero-grid {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 2rem;
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 1rem; 
}
  
  .hero-text {
    flex: 1 1 350px;
  }
  
  .hero-text h1 {
    font-size: 1.75rem;
    margin-bottom: 0.5rem;
  }
  
  .hero-text p {
    margin-bottom: 0.75rem;
  }
  .accent {
    color: #00C2FF;
  }
  .subhead {
    font-size: 1.1rem;
    margin-bottom: 1rem;
  }
  .cta-button {
    background-color: #00C2FF;
    color: #000;
    padding: 0.75rem 1.5rem;
    border-radius: 5px;
    text-decoration: none;
    font-weight: bold;
    display: inline-block;
    margin-bottom: 1rem;
  }
  .cta-button:hover {
    background-color: #00A2D1;
  }
  .disclaimer {
    font-size: 0.8rem;
    max-width: 600px;
  }
  
  .testimonial-section {
    background: #eef4f8;
    padding: 0.25rem 0.25rem;
    text-align: center;
  }
  .testimonial-grid {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 2rem;
    max-width: 1000px;
    margin: 0 auto;
  }
  .testimonial-box {
    flex: 1 1 250px;
    font-style: italic;
    font-size: 0.8rem;
  }
  .testimonial-box cite {
    display: block;
    margin-top: 0.5rem;
    font-style: normal;
    font-weight: bold;
  }
  
  .value-prop {
    padding: 1.25rem 0.75rem;
    background-color: #f4f9fc;
  }
  .value-grid {
    display: flex;
    flex-direction: column;
    gap: 0;
    max-width: 960px;
    margin: 0 auto;
  }
  
  .icon-row {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 1rem;
    text-align: center;
    min-height: 80px;
    height: 80px;
  }
  .text-row {
    display: flex;
    justify-content: space-around;
    gap: 1rem;
    text-align: center;
  }
  
  .icon-row div,
  .text-row div {
    flex: 1;
  }
  .icon-row div {
    display: flex;
    justify-content: center;
    align-items: center;
    height: 100%;
  }
  
  .icon-row img {
    width: 48px;
    height: auto;
  }
  
  .text-row h3 {
    font-size: 1.05rem;
    margin-bottom: 0.25rem;
  }
  
  .text-row p {
    font-size: 0.85rem;
    margin-top: 0;
  }
  
  .category-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
    margin-top: 1rem;
  }
  .category-badge {
    background-color: #004080;
    color: #fff;
    padding: 0.5rem 1rem;
    border-radius: 20px;
    text-decoration: none;
    font-size: 0.95rem;
    transition: background-color 0.2s ease;
  }
  .category-badge:hover {
    background-color: #0059b3;
  }
  
  .summary-list {
    list-style: none;
    padding: 0;
  }
  .summary-item {
    margin-bottom: 2rem;
  }
  .summary-item h3 {
    margin: 0.2rem 0;
    font-size: 1.25rem;
  }
  .summary-item p {
    margin: 0.2rem 0;
  }
  .tags {
    font-size: 0.85rem;
    color: #666;
  }
  
  @media (max-width: 768px) {
    .site-banner.enhanced-banner {
      padding: 0.1rem 0.1rem;
    }
    .hero-grid {
      flex-direction: column;
      text-align: center;
    }
    .hero-text h1 {
      font-size: 1.5rem;
    }
    .cta-button {
      width: 85%;
    }
    .value-grid {
      flex-direction: column;
      align-items: center;
    }
    .value-grid div {
      padding: 0.1rem 0;
      min-height: auto;
    }
    .value-grid div h3,
    .value-grid div p {
      margin: 0.15rem 0;
    }
    .icon-row {
      gap: 2rem;
      margin-bottom: 0;
    }
    .text-row {
      gap: 0.25rem;
    }
    /* Reduce spacing for testimonial boxes on mobile */
    .testimonial-box {
      margin-bottom: 0.25rem;
      font-size: 0.7rem;
    }
    /* Reduce gap in testimonial grid for tighter layout */
    .testimonial-grid {
      gap: 0.5rem;
    }
  }
/* Improve link visibility on dark backgrounds like .enhanced-banner */
.enhanced-banner a {
  color: #ffffff;
  font-weight: bold;
  text-decoration: underline;
}

.enhanced-banner a:hover {
  color: #ffdd57; /* High contrast hover */
  text-decoration: none;
}

@media (max-width: 400px) {
  .hero-grid {
    flex-direction: column;
    align-items: flex-start;
    padding: 0 1rem;
    text-align: left;
  }
  .hero-text {
    padding-left: 0;
    padding-right: 0;
    width: 100%;
  }
  .hero-image {
    width: 100%;
    max-width: 100%;
    justify-content: center;
    align-items: center;
  }
  .hero-image img {
    width: 100%;
    height: auto;
    max-height: none;
    object-fit: contain;
  }
}

.az-tile {
  flex: 1 0 3rem;
  text-align: center;
  border: 2px solid #ddd;
  border-radius: 8px;
  padding: 0.75rem;
  font-weight: bold;
  background-color: #f9f9f9;
  transition: all 0.2s ease-in-out;
}

.az-tile a {
  text-decoration: none;
  color: var(--clr-link);
  display: block;
}

.az-tile:hover {
  background-color: #efefef;
  border-color: #bbb;
  transform: scale(1.05);
}

/* Markdown Table Enhancements */
.markdown table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.95rem;
  margin-bottom: 1.5rem;
  table-layout: auto;
  word-break: normal;
}

.markdown th,
.markdown td {
  border: 1px solid #ddd;
  padding: 0.5rem 0.75rem;
}

.markdown th {
  background-color: #f4f7fb;
  font-weight: 600;
}

.markdown tr:nth-child(even) {
  background-color: #fafafa;
}

@media (max-width: 600px) {
  .markdown table {
    display: block;
    overflow-x: auto;
    table-layout: auto;
  }
}

/* Markdown Headings and Typography */
.markdown h2 {
  font-size: 1.5rem;
  margin-top: 2rem;
  border-bottom: 1px solid #ddd;
  padding-bottom: 0.25rem;
}

.markdown h3 {
  font-size: 1.25rem;
  margin-top: 1.5rem;
}

.markdown p {
  font-size: 1rem;
  line-height: 1.6;
}

/* Markdown Lists with Visual Markers */
.markdown ul,
.markdown ol {
  margin-left: 1.5rem;
  margin-bottom: 1rem;
}

.markdown li::marker {
  color: var(--clr-accent);
  font-weight: bold;
}

/* Markdown Blockquotes as Info Boxes */
.markdown blockquote {
  background: #f4f7fb;
  border-left: 4px solid #336699;
  padding: 0.75rem 1rem;
  margin: 1rem 0;
  font-style: italic;
  color: #333;
}

/* Print Styles for Markdown Tables */
@media print {
  .markdown table th,
  .markdown table td {
    font-size: 0.8rem;
    border: 1px solid #000;
  }
}
/* Optional wrapper for better table handling on mobile */
.table-wrapper {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}

.table-wrapper table {
  width: 100%;
  min-width: 600px;
}

.markdown table::-webkit-scrollbar {
  height: 6px;
}
.markdown table::-webkit-scrollbar-thumb {
  background: #ccc;
  border-radius: 3px;
}