/* ============================================================
   SAI4RAI — Components Stylesheet
   Reusable UI building blocks used across every page.
   Always load AFTER global.css.
   ============================================================ */


/* ============================================================
   1. BUTTONS
   Usage:
     <a href="#" class="btn btn-primary">Get Involved</a>
     <a href="#" class="btn btn-outline">Learn More</a>
     <a href="#" class="btn btn-ghost">Read the Story</a>
   ============================================================ */

.btn {
  display: inline-block;
  font-family: var(--font-body);
  font-size: 0.95rem;
  font-weight: 700;
  letter-spacing: 0.3px;
  text-align: center;
  text-decoration: none;
  border: 2px solid transparent;
  border-radius: 5px;
  padding: 0.75rem 1.75rem;
  min-height: 48px;           /* mobile-friendly tap target */
  line-height: 1.2;
  cursor: pointer;
  transition: background-color 0.2s ease,
              color 0.2s ease,
              border-color 0.2s ease,
              transform 0.15s ease,
              box-shadow 0.2s ease;
}

.btn:active {
  transform: translateY(1px);
}

/* Primary — filled saffron */
.btn-primary {
  background-color: var(--saffron);
  color: var(--cream);
  border-color: var(--saffron);
}

.btn-primary:hover {
  background-color: #b36615;   /* slightly darker saffron */
  border-color: #b36615;
  color: var(--cream);
  box-shadow: 0 4px 14px rgba(200, 119, 26, 0.35);
  transform: translateY(-1px);
}

/* Outline — transparent with teal border */
.btn-outline {
  background-color: transparent;
  color: var(--teal);
  border-color: var(--teal);
}

.btn-outline:hover {
  background-color: var(--teal);
  color: var(--cream);
  box-shadow: 0 4px 14px rgba(26, 95, 110, 0.25);
  transform: translateY(-1px);
}

/* Ghost — no background, no border, text only with underline on hover */
.btn-ghost {
  background-color: transparent;
  color: var(--teal);
  border-color: transparent;
  padding-left: 0.25rem;
  padding-right: 0.25rem;
}

.btn-ghost:hover {
  color: var(--saffron);
  text-decoration: underline;
  transform: none;
}

/* Button sizes */
.btn-sm {
  font-size: 0.85rem;
  padding: 0.5rem 1.2rem;
  min-height: 40px;
}

.btn-lg {
  font-size: 1.05rem;
  padding: 0.9rem 2.2rem;
  min-height: 54px;
}

/* Full-width button (for mobile forms) */
.btn-block {
  display: block;
  width: 100%;
}

/* Light variant — for use on dark/teal backgrounds */
.btn-light {
  background-color: var(--cream);
  color: var(--teal);
  border-color: var(--cream);
}

.btn-light:hover {
  background-color: transparent;
  color: var(--cream);
  border-color: var(--cream);
}


/* ============================================================
   2. CARDS
   Usage:
     <div class="card">...</div>
     <div class="card card-icon">...</div>   ← with icon at top
     <div class="card card-person">...</div> ← advisory board
   ============================================================ */

.card {
  background-color: #fff;
  border: 1px solid rgba(26, 20, 16, 0.08);
  border-radius: 10px;
  padding: 2rem;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.card:hover {
  transform: translateY(-4px);
  box-shadow: 0 10px 32px rgba(26, 20, 16, 0.10);
}

/* Card grid layout helper */
.card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 1.75rem;
}

/* Icon card — used for "Approach Pillars" and "How We Serve" */
.card-icon .card-icon-wrap {
  width: 52px;
  height: 52px;
  background-color: rgba(200, 119, 26, 0.10);
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 1.25rem;
  font-size: 1.5rem;         /* for emoji or icon fonts */
}

.card-icon .card-title {
  font-family: var(--font-heading);
  font-size: 1.15rem;
  font-weight: 600;
  color: var(--ink);
  margin-bottom: 0.5rem;
}

.card-icon .card-body {
  font-size: 0.95rem;
  color: rgba(26, 20, 16, 0.72);
  line-height: 1.7;
}

/* Person card — used for Advisory Board */
.card-person {
  text-align: center;
  padding: 2rem 1.5rem;
}

.card-person .card-avatar {
  width: 80px;
  height: 80px;
  border-radius: 50%;
  background-color: rgba(26, 95, 110, 0.12);
  margin: 0 auto 1rem;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2rem;
  overflow: hidden;
}

.card-person .card-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.card-person .card-name {
  font-family: var(--font-heading);
  font-size: 1.05rem;
  font-weight: 600;
  color: var(--ink);
  margin-bottom: 0.25rem;
}

.card-person .card-role {
  font-size: 0.85rem;
  color: var(--saffron);
  font-weight: 600;
  letter-spacing: 0.3px;
  margin-bottom: 0.75rem;
}

.card-person .card-bio {
  font-size: 0.9rem;
  color: rgba(26, 20, 16, 0.68);
  line-height: 1.6;
}

/* Stat card — for homepage impact numbers */
.card-stat {
  text-align: center;
  background-color: rgba(26, 95, 110, 0.06);
  border: 1px solid rgba(26, 95, 110, 0.15);
  border-radius: 10px;
  padding: 2rem 1.5rem;
}

.card-stat .stat-number {
  font-family: var(--font-heading);
  font-size: 2.8rem;
  font-weight: 700;
  color: var(--teal);
  line-height: 1;
  margin-bottom: 0.5rem;
}

.card-stat .stat-label {
  font-size: 0.9rem;
  color: rgba(26, 20, 16, 0.65);
  font-weight: 600;
}

/* Community card — for "Who We Serve" page */
.card-community {
  border-left: 4px solid var(--saffron);
  border-radius: 0 10px 10px 0;
  padding: 1.5rem 1.75rem;
}

.card-community .card-title {
  font-family: var(--font-heading);
  font-size: 1.1rem;
  font-weight: 600;
  color: var(--ink);
  margin-bottom: 0.4rem;
}

.card-community .card-body {
  font-size: 0.93rem;
  color: rgba(26, 20, 16, 0.70);
  line-height: 1.65;
}


/* ============================================================
   3. FORMS
   Usage:
     <form class="newsletter-form">
       <input class="form-input" type="email" placeholder="...">
       <button class="btn btn-primary" type="submit">Sign Up</button>
     </form>
   ============================================================ */

/* Generic form field */
.form-input,
.form-textarea,
.form-select {
  width: 100%;
  font-family: var(--font-body);
  font-size: 0.95rem;
  color: var(--ink);
  background-color: #fff;
  border: 1.5px solid rgba(26, 20, 16, 0.20);
  border-radius: 5px;
  padding: 0.75rem 1rem;
  min-height: 48px;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
  appearance: none;
  -webkit-appearance: none;
}

.form-input::placeholder,
.form-textarea::placeholder {
  color: rgba(26, 20, 16, 0.38);
}

.form-input:focus,
.form-textarea:focus,
.form-select:focus {
  outline: none;
  border-color: var(--teal);
  box-shadow: 0 0 0 3px rgba(26, 95, 110, 0.12);
}

.form-textarea {
  min-height: 130px;
  resize: vertical;
}

/* Form label */
.form-label {
  display: block;
  font-size: 0.88rem;
  font-weight: 700;
  color: var(--ink);
  margin-bottom: 0.4rem;
  letter-spacing: 0.2px;
}

/* Form group — wraps label + input */
.form-group {
  margin-bottom: 1.25rem;
}

/* Helper / error text */
.form-hint {
  font-size: 0.8rem;
  color: rgba(26, 20, 16, 0.50);
  margin-top: 0.3rem;
}

.form-error {
  font-size: 0.8rem;
  color: #c0392b;
  margin-top: 0.3rem;
}

.form-input.is-error {
  border-color: #c0392b;
}

/* Newsletter inline form (input + button side by side) */
.newsletter-form {
  display: flex;
  gap: 0.75rem;
  max-width: 480px;
}

.newsletter-form .form-input {
  flex: 1;
}

@media (max-width: 500px) {
  .newsletter-form {
    flex-direction: column;
  }

  .newsletter-form .btn {
    width: 100%;
  }
}

/* Full contact form wrapper */
.contact-form {
  max-width: 580px;
  margin: 0 auto;
}


/* ============================================================
   4. BADGES & TAGS
   Usage:
     <span class="badge badge-saffron">Free Services</span>
     <span class="badge badge-teal">501(c)(3) Nonprofit</span>
     <span class="badge badge-subtle">Coming Soon</span>
   ============================================================ */

.badge {
  display: inline-block;
  font-family: var(--font-body);
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.6px;
  text-transform: uppercase;
  padding: 0.3rem 0.85rem;
  border-radius: 999px;        /* pill shape */
  line-height: 1;
  white-space: nowrap;
}

/* Saffron — warm, highlight */
.badge-saffron {
  background-color: rgba(200, 119, 26, 0.12);
  color: var(--saffron);
  border: 1px solid rgba(200, 119, 26, 0.25);
}

/* Teal — trust, nonprofit status */
.badge-teal {
  background-color: rgba(26, 95, 110, 0.10);
  color: var(--teal);
  border: 1px solid rgba(26, 95, 110, 0.22);
}

/* Subtle — neutral, secondary info */
.badge-subtle {
  background-color: rgba(26, 20, 16, 0.06);
  color: rgba(26, 20, 16, 0.55);
  border: 1px solid rgba(26, 20, 16, 0.10);
}

/* Solid variants (for use on dark backgrounds) */
.badge-solid-saffron {
  background-color: var(--saffron);
  color: var(--cream);
  border: 1px solid var(--saffron);
}

.badge-solid-teal {
  background-color: var(--teal);
  color: var(--cream);
  border: 1px solid var(--teal);
}

/* Tag group — wraps multiple badges with spacing */
.tag-group {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  align-items: center;
}


/* ============================================================
   5. SECTION HEADERS
   The label → heading → subtitle pattern used on every page.

   Usage:
     <div class="section-header">
       <span class="section-label">Our Mission</span>
       <h2 class="section-title">Free AI Education for All</h2>
       <p class="section-subtitle">We believe every community...</p>
     </div>

   Centered variant:
     <div class="section-header section-header-center">...</div>
   ============================================================ */

.section-header {
  margin-bottom: 3rem;
}

/* Small all-caps label above the heading */
.section-label {
  display: inline-block;
  font-family: var(--font-body);
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: var(--saffron);
  margin-bottom: 0.6rem;
}

/* Main heading */
.section-title {
  font-family: var(--font-heading);
  font-size: clamp(1.7rem, 3.5vw, 2.4rem);
  font-weight: 700;
  color: var(--ink);
  line-height: 1.2;
  margin-bottom: 1rem;
  max-width: 680px;
}

/* Supporting subtitle paragraph */
.section-subtitle {
  font-size: 1.05rem;
  color: rgba(26, 20, 16, 0.65);
  line-height: 1.75;
  max-width: 600px;
}

/* Centered variant */
.section-header-center {
  text-align: center;
}

.section-header-center .section-title,
.section-header-center .section-subtitle {
  margin-left: auto;
  margin-right: auto;
}

/* On teal/dark backgrounds — flip colors */
.section-header-light .section-title {
  color: var(--cream);
}

.section-header-light .section-subtitle {
  color: rgba(250, 247, 242, 0.72);
}

.section-header-light .section-label {
  color: rgba(200, 119, 26, 0.9);
}


/* ============================================================
   6. DIVIDERS & DECORATIVE ELEMENTS
   Simple helpers to add visual breathing room between sections.
   ============================================================ */

.divider {
  border: none;
  border-top: 1px solid rgba(26, 20, 16, 0.10);
  margin: 3rem 0;
}

.divider-saffron {
  border-top: 2px solid rgba(200, 119, 26, 0.30);
}

/* Highlight bar — a saffron accent rule above a heading */
.accent-bar {
  display: block;
  width: 48px;
  height: 3px;
  background-color: var(--saffron);
  border-radius: 2px;
  margin-bottom: 1rem;
}

.accent-bar-center {
  margin-left: auto;
  margin-right: auto;
}


/* ============================================================
   7. ALERT / CALLOUT BANNER
   For important announcements at the top of a page.

   Usage:
     <div class="callout callout-info">
       <p>Applications open — <a href="#">Apply now</a></p>
     </div>
   ============================================================ */

.callout {
  padding: 1rem 1.5rem;
  border-radius: 6px;
  font-size: 0.93rem;
  line-height: 1.5;
  margin-bottom: 1.5rem;
}

.callout-info {
  background-color: rgba(26, 95, 110, 0.08);
  border-left: 3px solid var(--teal);
  color: var(--teal);
}

.callout-warm {
  background-color: rgba(200, 119, 26, 0.08);
  border-left: 3px solid var(--saffron);
  color: rgba(26, 20, 16, 0.80);
}

.callout a {
  color: var(--saffron);
  font-weight: 700;
}
