/* Small additions on top of the compiled Tailwind stylesheet (styles.css). */

html { scroll-behavior: smooth; }

/* Toast notifications (replaces the React "sonner" toaster) */
#toast-root {
  position: fixed;
  right: 1rem;
  bottom: 1rem;
  z-index: 9999;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  max-width: calc(100vw - 2rem);
  pointer-events: none;
}
.toast {
  display: flex;
  align-items: flex-start;
  gap: 0.625rem;
  width: 356px;
  max-width: 100%;
  padding: 0.875rem 1rem;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--popover);
  color: var(--popover-foreground);
  font-size: 0.8125rem;
  line-height: 1.35;
  box-shadow: 0 10px 30px -10px rgb(0 0 0 / 0.25);
  opacity: 0;
  transform: translateY(12px);
  transition: opacity 0.25s ease, transform 0.25s ease;
  pointer-events: auto;
}
.toast-in { opacity: 1; transform: translateY(0); }
.toast-icon { flex: none; display: inline-flex; margin-top: 1px; }
.toast-success .toast-icon { color: #16a34a; }
.toast-info .toast-icon { color: var(--primary); }

/* Hide scrollbars while preserving scrollability */
.no-scrollbar::-webkit-scrollbar { display: none; }
.no-scrollbar { -ms-overflow-style: none; scrollbar-width: none; }

/* Slider track */
div.select-none .overflow-hidden {
  overflow: hidden !important;
}
div.select-none .overflow-hidden > .flex {
  will-change: transform;
  scrollbar-width: none;
  -ms-overflow-style: none;
}
div.select-none .overflow-hidden > .flex::-webkit-scrollbar {
  display: none;
}

/* Print: hide interactive chrome on the legal pages */
@media print {
  header, footer, aside, #toast-root, button { display: none !important; }
}

/* ------------------------------------------------------------------ WordPress additions */

/* Keep the sticky header below the admin bar when logged in. */
.admin-bar header.sticky { top: 32px; }
@media (max-width: 782px) {
  .admin-bar header.sticky { top: 46px; }
}

/* Basic typography for editor-authored content (pages added in wp-admin). */
.ns-content > * + * { margin-top: 1rem; }
.ns-content h2 { font-size: 1.5rem; font-weight: 700; margin-top: 2rem; }
.ns-content h3 { font-size: 1.25rem; font-weight: 700; margin-top: 1.5rem; }
.ns-content p, .ns-content li { font-size: 0.875rem; line-height: 1.7; color: var(--muted-foreground); }
.ns-content ul { list-style: disc; padding-left: 1.25rem; }
.ns-content ol { list-style: decimal; padding-left: 1.25rem; }
.ns-content a { color: var(--primary); text-decoration: underline; }

/* Toast: error variant (form submission failed). */
.toast-error .toast-icon { color: #dc2626; }

/* ------------------------------------------------------------------ Optional header/footer extras
   Only rendered when switched on in Appearance → Customize → NidhiSetu Theme Options. */

/* Phone / email in the header: compact icon buttons (the number/address shows on hover). */
.ns-header-contact {
  display: inline-grid;
  place-items: center;
  width: 2.25rem;
  height: 2.25rem;
  flex: none;
  border: 1px solid var(--border);
  border-radius: 0.5rem;
  color: var(--gold);
  transition: color 0.15s ease, background-color 0.15s ease;
}
.ns-header-contact:hover { color: var(--primary); background-color: var(--muted); }
/* Header extras only appear where the 1152px header has room for them. */
@media (max-width: 1199.98px) {
  .ns-header-extra { display: none !important; }
}
.ns-sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

/* Social media icons in the footer. */
.ns-social {
  margin-top: 1.25rem;
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}
.ns-social-link {
  display: inline-grid;
  place-items: center;
  width: 2rem;
  height: 2rem;
  border-radius: 9999px;
  border: 1px solid rgb(255 255 255 / 0.15);
  color: var(--navy-foreground);
  opacity: 0.85;
  transition: color 0.15s ease, border-color 0.15s ease, opacity 0.15s ease;
}
.ns-social-link:hover {
  color: var(--gold);
  border-color: var(--gold);
  opacity: 1;
}

/* For Every Stage card hover effect matching Grow What You Protect */
.ns-stage-card {
  transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1), border-color 0.3s ease, box-shadow 0.3s ease;
}
.ns-stage-card:hover {
  transform: translateY(-4px);
  border-color: rgb(201 164 76 / 0.5);
  box-shadow: 0 12px 24px -6px rgb(0 0 0 / 0.08), 0 4px 8px -4px rgb(0 0 0 / 0.04);
}
.ns-stage-card:hover h3 {
  color: var(--gold);
}
.ns-stage-card:hover .lucide-arrow-up-right {
  transform: translate(2px, -2px) scale(1.1);
}
.ns-stage-card:hover .ns-stage-icon {
  transform: scale(1.1);
}

/* Contact section logo size */
.ns-contact-logo {
  width: 5.25rem;
  height: 5.25rem;
  flex-shrink: 0;
}
@media (min-width: 640px) {
  .ns-contact-logo {
    width: 6.25rem;
    height: 6.25rem;
  }
}

/* ==========================================================================
   NidhiSetu Branded Website Preloader
   ========================================================================== */
.ns-preloader {
  position: fixed;
  inset: 0;
  z-index: 999999;
  display: flex;
  align-items: center;
  justify-content: center;
  background: radial-gradient(circle at center, #0f2444 0%, #081322 100%);
  color: #ffffff;
  transition: opacity 0.5s cubic-bezier(0.4, 0, 0.2, 1), visibility 0.5s ease;
  pointer-events: auto;
}

.ns-preloader.ns-loaded {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

.ns-preloader-content {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 1.25rem;
  padding: 1.5rem;
  max-width: 90vw;
}

.ns-preloader-logo-wrap {
  position: relative;
  width: 5.5rem;
  height: 5.5rem;
  display: grid;
  place-items: center;
}

.ns-preloader-ring {
  position: absolute;
  inset: -6px;
  border-radius: 9999px;
  border: 2.5px solid transparent;
  border-top-color: #c9a44c;
  border-right-color: rgba(201, 164, 76, 0.4);
  animation: ns-spin 1.2s cubic-bezier(0.5, 0, 0.5, 1) infinite;
}

.ns-preloader-logo {
  width: 4.5rem;
  height: 4.5rem;
  border-radius: 1.15rem;
  object-fit: cover;
  box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.5), 0 0 25px rgba(201, 164, 76, 0.3);
  animation: ns-pulse 2s ease-in-out infinite;
}

.ns-preloader-text {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.35rem;
}

.ns-preloader-brand {
  font-size: 1.35rem;
  font-weight: 800;
  letter-spacing: -0.02em;
  color: #ffffff;
  text-shadow: 0 2px 10px rgba(0, 0, 0, 0.4);
}

.ns-preloader-tagline {
  font-size: 0.6875rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.25em;
  color: #c9a44c;
}

.ns-preloader-bar {
  width: 140px;
  height: 3px;
  background: rgba(255, 255, 255, 0.12);
  border-radius: 9999px;
  overflow: hidden;
  margin-top: 0.25rem;
  position: relative;
}

.ns-preloader-bar-fill {
  position: absolute;
  top: 0;
  bottom: 0;
  left: 0;
  width: 100%;
  background: linear-gradient(90deg, #c9a44c, #f3d489, #c9a44c);
  border-radius: 9999px;
  animation: ns-bar-progress 1.6s ease-in-out infinite;
}

@keyframes ns-spin {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

@keyframes ns-pulse {
  0%, 100% { transform: scale(1); filter: brightness(1); }
  50% { transform: scale(1.04); filter: brightness(1.1); }
}

@keyframes ns-bar-progress {
  0% { transform: translateX(-100%); }
  50% { transform: translateX(0%); }
  100% { transform: translateX(100%); }
}

/* ------------------------------------------------------------------ Home Contact Section (3 cards & map) */
.ns-contact-info-grid {
  display: grid !important;
  grid-template-columns: 1fr !important;
  gap: 1.5rem !important;
  padding: 1.75rem 0 !important;
  margin-top: 2.25rem !important;
  margin-bottom: 2.25rem !important;
  border-top: 1px solid rgba(15, 23, 42, 0.08) !important;
  border-bottom: 1px solid rgba(15, 23, 42, 0.08) !important;
}

@media (min-width: 768px) {
  .ns-contact-info-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
    gap: 1.75rem !important;
    align-items: center !important;
  }
}

.ns-contact-info-item {
  display: flex !important;
  align-items: center !important;
  gap: 0.875rem !important;
  min-width: 0 !important;
}

.ns-contact-icon-badge {
  width: 3.25rem !important;
  height: 3.25rem !important;
  min-width: 3.25rem !important;
  border-radius: 9999px !important;
  background-color: #f7eedd !important;
  color: #c29342 !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  flex-shrink: 0 !important;
  transition: all 0.2s ease !important;
  box-shadow: 0 2px 8px rgba(194, 147, 66, 0.14) !important;
}

.ns-contact-icon-badge:hover {
  background-color: #f0dfbe !important;
  transform: translateY(-2px) !important;
  box-shadow: 0 4px 12px rgba(194, 147, 66, 0.22) !important;
}

.ns-contact-info-body {
  min-width: 0 !important;
  flex: 1 !important;
}

.ns-contact-info-label {
  display: block !important;
  font-size: 0.6875rem !important;
  font-weight: 700 !important;
  text-transform: uppercase !important;
  letter-spacing: 0.08em !important;
  color: #64748b !important;
  line-height: 1.2 !important;
}

.ns-contact-info-value {
  display: block !important;
  margin-top: 0.2rem !important;
  font-size: 0.9375rem !important;
  font-weight: 700 !important;
  color: #0f172a !important;
  line-height: 1.3 !important;
  white-space: nowrap !important;
  transition: color 0.15s ease !important;
}

.ns-contact-info-value:hover {
  color: #1652a2 !important;
}

.ns-contact-action-link {
  display: inline-flex !important;
  align-items: center !important;
  gap: 0.25rem !important;
  margin-top: 0.35rem !important;
  font-size: 0.8125rem !important;
  font-weight: 600 !important;
  color: #1652a2 !important;
  transition: all 0.15s ease !important;
  text-decoration: underline !important;
  text-underline-offset: 3px !important;
}

.ns-contact-action-link:hover {
  color: #c29342 !important;
}

.ns-contact-action-link .ns-arrow {
  display: inline-block !important;
  transition: transform 0.15s ease !important;
}

.ns-contact-action-link:hover .ns-arrow {
  transform: translateX(3px) !important;
}

.ns-contact-map-wrapper {
  border-radius: 1rem !important;
  overflow: hidden !important;
  border: 1px solid rgba(15, 23, 42, 0.1) !important;
  box-shadow: 0 2px 10px rgba(15, 23, 42, 0.04) !important;
  background-color: #fff !important;
}

/* ------------------------------------------------------------------ Form Validation & Response */
.inp-error {
  border-color: #ef4444 !important;
  background-color: #fef2f2 !important;
}
.inp-error:focus {
  border-color: #ef4444 !important;
  --tw-ring-color: #ef4444 !important;
  box-shadow: 0 0 0 2px rgba(239, 68, 68, 0.25) !important;
}
.ns-field-error {
  color: #ef4444;
  font-size: 0.6875rem;
  font-weight: 500;
  margin-top: 0.25rem;
  display: block;
  animation: ns-fade-in 0.2s ease-out;
}
.ns-field-shake {
  animation: ns-shake 0.4s cubic-bezier(0.36, 0.07, 0.19, 0.97) both;
}
@keyframes ns-shake {
  10%, 90% { transform: translate3d(-1px, 0, 0); }
  20%, 80% { transform: translate3d(2px, 0, 0); }
  30%, 50%, 70% { transform: translate3d(-3px, 0, 0); }
  40%, 60% { transform: translate3d(3px, 0, 0); }
}
@keyframes ns-fade-in {
  from { opacity: 0; transform: translateY(-2px); }
  to { opacity: 1; transform: translateY(0); }
}
