/* =========================================================
   SLDS — slds-base.css
   Shared structure for the campaign components:
     - hero counter block (first fold)
     - pledge / certificate section (third fold)

   Loaded at EVERY screen size. Anything width-specific lives
   in slds-desktop.css or slds-mobile.css, which load after.

   Load order in index.php:
     styles.css  ->  slds-base.css  ->  slds-desktop.css  ->  slds-mobile.css
   ========================================================= */

.hero-counter-block {
  margin: 1.5rem 0 0.5rem;
}

.hero-counter {
  display: block;
  font-family: var(--font-head);
  font-size: clamp(3.2rem, 9vw, 6rem);
  font-weight: 900;
  line-height: 1;
  letter-spacing: -0.02em;
  color: var(--white);
  text-shadow: 0 6px 24px rgba(0, 30, 70, 0.35);
  font-variant-numeric: tabular-nums;
}

.hero-counter-label {
  font-family: var(--font-head);
  font-size: clamp(1.1rem, 2.2vw, 1.65rem);
  font-weight: 700;
  line-height: 1.3;
  color: var(--white);
  margin-top: 0.9rem;
}

.hero-counter-label .hl {
  color: #cfe6ff;
}

.hero-counter-sub {
  font-size: 0.98rem;
  color: rgba(255, 255, 255, 0.82);
  margin-top: 0.85rem;
  max-width: 460px;
}

.hero-counter-cta {
  font-family: var(--font-head);
  font-size: 1rem;
  /* font-weight: 700; */
  color: var(--white);
  line-height: 1.5;
  margin-top: 0.9rem;
  max-width: 460px;
}

.hero-pledge {
  margin-top: 1.75rem;
}

/* =========================================================
   PLEDGE / CERTIFICATE SECTION (third fold)
   Sits inside .media-section.bg-light so it inherits the
   existing section background, spacing and headings.
   ========================================================= */

#pledge {
  padding-bottom: clamp(3.5rem, 6vw, 5rem);
}

/* Mobile-first: one column by default.
   slds-desktop.css widens this to two from 901px up. */
.pledge-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.5rem;
  align-items: start;
  max-width: 560px;
  margin-inline: auto;
}

/* ---- form card ---- */
.pledge-form {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 2rem 1.75rem;
}

.pledge-field {
  margin-bottom: 1.15rem;
}

.pledge-field label {
  display: block;
  font-family: var(--font-head);
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--text-dark);
  margin-bottom: 0.45rem;
}

/* The inputs used to be white on a white card, so the fields
   disappeared into the panel. They now carry a light blue fill and
   a blue border so the tappable area reads immediately. Colours are
   derived from --primary, so nothing new enters the palette. */
.pledge-field input[type="text"],
.pledge-field input[type="tel"] {
  width: 100%;
  padding: 0.85rem 1rem;
  border: 1.5px solid rgba(0, 64, 133, 0.28);
  border-radius: var(--radius-sm);
  font-family: var(--font-body);
  font-size: 1rem;
  font-weight: 600;
  color: var(--primary-deeper);
  background: #eef4fd;
  transition: var(--transition);
}

.pledge-field input[type="text"]::placeholder,
.pledge-field input[type="tel"]::placeholder {
  color: rgba(0, 64, 133, 0.45);
  font-weight: 500;
}

.pledge-field input:hover {
  border-color: rgba(0, 64, 133, 0.45);
  background: #e7f0fc;
}

.pledge-field input:focus {
  outline: none;
  border-color: var(--primary);
  background: var(--white);
  box-shadow: 0 0 0 4px rgba(0, 123, 255, 0.16);
}

.pledge-tel {
  display: flex;
  gap: 0.6rem;
}

.pledge-tel span {
  display: flex;
  align-items: center;
  padding: 0 0.9rem;
  border: 1.5px solid var(--primary-deeper);
  border-radius: var(--radius-sm);
  background: var(--primary-deeper);
  color: var(--white);
  font-family: var(--font-head);
  font-weight: 700;
  font-size: 0.95rem;
}

.pledge-helper {
  margin-top: 0.4rem;
  font-size: 0.78rem;
  color: var(--mid-gray);
  line-height: 1.4;
  min-height: 1.1em;
}

.pledge-helper.is-error {
  color: var(--accent-red);
}

.pledge-consent {
  display: flex;
  align-items: flex-start;
  gap: 0.6rem;
  margin: 0.25rem 0 1.4rem;
}

.pledge-consent input {
  margin-top: 0.2rem;
  width: 16px;
  height: 16px;
  flex-shrink: 0;
  accent-color: var(--primary);
}

.pledge-consent label {
  font-size: 0.78rem;
  line-height: 1.6;
  color: var(--mid-gray);
}

/* ---- buttons: mirror .btn-primary, inverted for light bg ---- */
.pledge-btn {
  width: 100%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  background: var(--primary);
  color: var(--white);
  font-family: var(--font-head);
  font-weight: 700;
  font-size: 0.9rem;
  padding: 0.9rem 2rem;
  border-radius: 50px;
  transition: var(--transition);
  box-shadow: 0 4px 20px rgba(0, 123, 255, 0.25);
}

.pledge-btn:hover:not(:disabled) {
  background: var(--primary-dark);
  transform: translateY(-2px);
  box-shadow: 0 8px 28px rgba(0, 123, 255, 0.32);
}

.pledge-btn:disabled {
  opacity: 0.45;
  cursor: not-allowed;
  transform: none;
  box-shadow: none;
}

.pledge-btn-wa {
  background: #25d366;
  box-shadow: 0 4px 20px rgba(37, 211, 102, 0.25);
}

.pledge-btn-wa:hover:not(:disabled) {
  background: #1fb855;
  box-shadow: 0 8px 28px rgba(37, 211, 102, 0.32);
}

.pledge-note {
  margin-top: 1rem;
  font-size: 0.75rem;
  color: var(--mid-gray);
  text-align: center;
  line-height: 1.55;
}

/* ---- certificate panel ---- */
.pledge-cert-frame {
  border-radius: var(--radius);
  overflow: hidden;
  padding: clamp(0.5rem, 2.2vw, 0.85rem);
  box-shadow: var(--shadow-lg);
  background: var(--primary-deeper);
}

.pledge-cert-frame canvas {
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: 1003 / 1683;
  /* bilingual "I Stand By" v7 */
}

.pledge-cert-caption {
  margin-top: 0.75rem;
  text-align: center;
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--mid-gray);
}

.pledge-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.75rem;
  margin-top: 1rem;
}

.pledge-actions[hidden] {
  display: none;
}

.pledge-status {
  min-height: 1.1em;
  margin-top: 0.7rem;
  text-align: center;
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--primary);
}

/* ---- responsive: matches the site's existing breakpoints ---- */

/* ---------------------------------------------------------
   Language toggle (English / हिन्दी)
   Segmented control, styled from the same tokens as the
   pledge buttons so it reads as part of the existing form.
   --------------------------------------------------------- */
.pledge-field-label {
  display: block;
  margin-bottom: 0.45rem;
  font-family: var(--font-head);
  font-size: 0.82rem;
  font-weight: 700;
  color: var(--primary-deeper);
  letter-spacing: 0.01em;
}

.pledge-lang {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 6px;
  padding: 5px;
  background: #eef4fd;
  border: 1.5px solid rgba(0, 64, 133, 0.28);
  border-radius: 50px;
}

.pledge-lang-btn {
  appearance: none;
  border: none;
  cursor: pointer;
  padding: 0.6rem 0.5rem;
  border-radius: 50px;
  background: transparent;
  font-family: var(--font-head);
  font-size: 0.88rem;
  font-weight: 700;
  color: var(--primary-deeper);
  transition: var(--transition);
}

.pledge-lang-btn:hover {
  background: rgba(0, 123, 255, 0.10);
}

.pledge-lang-btn.is-active {
  background: var(--primary);
  color: var(--white);
  box-shadow: 0 3px 12px rgba(0, 123, 255, 0.32);
}

.pledge-lang-btn:focus-visible {
  outline: 3px solid var(--primary);
  outline-offset: 2px;
}


/* Updated */
.sticky-pledge-link {
  font-weight: 600 !important;
  font-size: 16px !important;
}

#hero {
  min-height: 85vh;
}

@media screen and (max-width: 749px) {
  div#singleLine {
    display: block;
    align-items: center;
  }

  div#singleLine span.stat-num-unit {
    margin: 0 !important;
    font-size: 28px;
  }

  .sticky-pledge-counter-inner {
    gap: 0.75rem 0.75rem;
    padding: 20px 10px;
  }

  .hero-inner {
    padding: 1rem 1.5rem 1rem;
  }

  .hero-pledge {
    margin: 0;
  }

  .hero-pledge .rupee-icon {
    width: min(250px, 100%) !important;
    margin: 0 auto !important;
  }

  .hero-counter-block {
    margin: 0.5rem 0 0.5rem;
  }

  .modal-overlay.active .modal-header {
    max-width: 85%;
  }

  .modal-close {
    position: absolute;
    right: 5%;
  }
}

@media screen and (min-width: 650px) and (max-width: 780px) {
  .allout-header-logo img {
    height: 165px;
  }

  .allout-footer-links a {
    font-size: 20px;
  }

  .back-to-top-btn {
    right: 0px;
    bottom: 155px;
  }

  .modal-overlay.active .modal-header {
    max-width: 100% !important;
  }
}