/* =========================================================================
   ZYNTARA SUBPAGES & UTILITY COMPONENT STYLES
   Ensures complete styling for Case Studies, Solutions, Insights, Contact,
   Industries, and FAQs in both Day and Night modes.
   ========================================================================= */

/* ─── Page Top Container Offset ───────────────────────────────────────── */
.subpage-container,
.relative.py-16,
.relative.py-20,
.relative.py-24 {
  padding-top: 110px !important;
  padding-bottom: 70px !important;
}

/* ─── Max Width & Centering Containers ────────────────────────────────── */
.max-w-3xl { max-width: 48rem; margin-left: auto; margin-right: auto; }
.max-w-4xl { max-width: 56rem; margin-left: auto; margin-right: auto; }
.max-w-5xl { max-width: 64rem; margin-left: auto; margin-right: auto; }
.max-w-6xl { max-width: 72rem; margin-left: auto; margin-right: auto; }
.mx-auto { margin-left: auto; margin-right: auto; }
.w-full { width: 100%; }

.px-4 { padding-left: 1rem; padding-right: 1rem; }
.px-6 { padding-left: 1.5rem; padding-right: 1.5rem; }
.px-8 { padding-left: 2rem; padding-right: 2rem; }
.py-4 { padding-top: 1rem; padding-bottom: 1rem; }
.py-6 { padding-top: 1.5rem; padding-bottom: 1.5rem; }
.py-8 { padding-top: 2rem; padding-bottom: 2rem; }
.py-12 { padding-top: 3rem; padding-bottom: 3rem; }
.py-16 { padding-top: 4rem; padding-bottom: 4rem; }
.py-20 { padding-top: 5rem; padding-bottom: 5rem; }

.p-4 { padding: 1rem; }
.p-5 { padding: 1.25rem; }
.p-6 { padding: 1.5rem; }
.p-8 { padding: 2rem; }
.p-10 { padding: 2.5rem; }
.p-12 { padding: 3rem; }

@media (min-width: 640px) {
  .sm\:px-6 { padding-left: 1.5rem; padding-right: 1.5rem; }
  .sm\:py-24 { padding-top: 110px !important; padding-bottom: 5rem; }
  .sm\:p-8 { padding: 2rem; }
  .sm\:p-10 { padding: 2.5rem; }
  .sm\:p-12 { padding: 3rem; }
}
@media (min-width: 1024px) {
  .lg\:px-8 { padding-left: 2rem; padding-right: 2rem; }
}

/* ─── Spacing Helpers ─────────────────────────────────────────────────── */
.space-y-1 > * + * { margin-top: 0.25rem; }
.space-y-2 > * + * { margin-top: 0.5rem; }
.space-y-3 > * + * { margin-top: 0.75rem; }
.space-y-4 > * + * { margin-top: 1rem; }
.space-y-6 > * + * { margin-top: 1.5rem; }
.space-y-8 > * + * { margin-top: 2rem; }
.space-y-12 > * + * { margin-top: 3rem; }
.space-y-16 > * + * { margin-top: 4rem; }
.space-y-20 > * + * { margin-top: 4.5rem; }

.gap-1 { gap: 0.25rem; }
.gap-2 { gap: 0.5rem; }
.gap-2\.5 { gap: 0.625rem; }
.gap-3 { gap: 0.75rem; }
.gap-4 { gap: 1rem; }
.gap-6 { gap: 1.5rem; }
.gap-8 { gap: 2rem; }
.gap-12 { gap: 3rem; }

.mb-1 { margin-bottom: 0.25rem; }
.mb-2 { margin-bottom: 0.5rem; }
.mb-3 { margin-bottom: 0.75rem; }
.mb-4 { margin-bottom: 1rem; }
.mb-6 { margin-bottom: 1.5rem; }
.mb-8 { margin-bottom: 2rem; }
.mb-12 { margin-bottom: 3rem; }
.mb-16 { margin-bottom: 4rem; }
.mt-1 { margin-top: 0.25rem; }
.mt-2 { margin-top: 0.5rem; }
.mt-4 { margin-top: 1rem; }
.mt-6 { margin-top: 1.5rem; }
.mt-8 { margin-top: 2rem; }
.pb-4 { padding-bottom: 1rem; }
.pb-8 { padding-bottom: 2rem; }
.pb-12 { padding-bottom: 3rem; }
.pb-16 { padding-bottom: 4rem; }
.pt-2 { padding-top: 0.5rem; }
.pt-4 { padding-top: 1rem; }

/* ─── Flexbox & Grid ──────────────────────────────────────────────────── */
.flex { display: flex; }
.inline-flex { display: inline-flex; }
.flex-col { flex-direction: column; }
.flex-wrap { flex-wrap: wrap; }
.items-center { align-items: center; }
.items-start { align-items: flex-start; }
.items-end { align-items: flex-end; }
.justify-between { justify-content: space-between; }
.justify-center { justify-content: center; }
.shrink-0 { flex-shrink: 0; }
.grow { flex-grow: 1; }

.grid { display: grid; }
.grid-cols-1 { grid-template-columns: repeat(1, minmax(0, 1fr)); }
.grid-cols-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.grid-cols-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.grid-cols-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }

@media (min-width: 640px) {
  .sm\:flex-row { flex-direction: row; }
  .sm\:items-center { align-items: center; }
}
@media (min-width: 768px) {
  .md\:grid-cols-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .md\:grid-cols-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .md\:grid-cols-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .md\:flex-row { flex-direction: row; }
}
@media (min-width: 1024px) {
  .lg\:grid-cols-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .lg\:grid-cols-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .lg\:grid-cols-12 { grid-template-columns: repeat(12, minmax(0, 1fr)); }
  .lg\:col-span-4 { grid-column: span 4 / span 4; }
  .lg\:col-span-5 { grid-column: span 5 / span 5; }
  .lg\:col-span-7 { grid-column: span 7 / span 7; }
  .lg\:col-span-8 { grid-column: span 8 / span 8; }
}

/* ─── Typography & Colors (Adaptive to Light & Dark Theme) ────────────── */
.text-center { text-align: center; }
.text-left { text-align: left; }
.text-right { text-align: right; }
.truncate { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

.font-sans { font-family: var(--font-sans); }
.font-display { font-family: var(--font-display); }
.font-mono { font-family: var(--font-mono, monospace); }

.font-medium { font-weight: 500; }
.font-semibold { font-weight: 600; }
.font-bold { font-weight: 700; }
.font-extrabold { font-weight: 800; }

.uppercase { text-transform: uppercase; }
.tracking-tight { letter-spacing: -0.025em; }
.tracking-wider { letter-spacing: 0.05em; }
.tracking-widest { letter-spacing: 0.1em; }
.leading-tight { line-height: 1.25; }
.leading-relaxed { line-height: 1.625; }

.text-xs { font-size: 0.75rem; }
.text-sm { font-size: 0.875rem; }
.text-base { font-size: 1rem; }
.text-lg { font-size: 1.125rem; }
.text-xl { font-size: 1.25rem; }
.text-2xl { font-size: 1.5rem; }
.text-3xl { font-size: 1.875rem; }
.text-4xl { font-size: 2.25rem; }
.text-5xl { font-size: 3rem; }

@media (min-width: 640px) {
  .sm\:text-3xl { font-size: 1.875rem; }
  .sm\:text-4xl { font-size: 2.25rem; }
  .sm\:text-5xl { font-size: 3rem; }
  .sm\:text-xl { font-size: 1.25rem; }
}

/* Dynamic text colors that adapt to Day/Night mode */
.text-white { color: var(--text-main); }
.text-slate-100 { color: var(--text-main); }
.text-slate-200 { color: var(--text-main); }
.text-slate-300 { color: var(--text-secondary); }
.text-slate-400 { color: var(--text-muted); }
.text-slate-500 { color: var(--text-muted); }

.text-sky-300 { color: #38bdf8; }
.text-sky-400 { color: #0284c7; }
.text-sky-500 { color: #0284c7; }
body[data-mode="night"] .text-sky-400,
body[data-mode="night"] .text-sky-500 { color: #38bdf8; }

.text-emerald-400 { color: #10b981; }
.text-rose-400 { color: #f43f5e; }
.text-amber-400 { color: #f59e0b; }

/* ─── Cards, Backgrounds & Borders ────────────────────────────────────── */
.rounded-lg { border-radius: 8px; }
.rounded-xl { border-radius: 12px; }
.rounded-2xl { border-radius: 16px; }
.rounded-3xl { border-radius: 24px; }
.rounded-full { border-radius: 9999px; }

.border { border-width: 1px; border-style: solid; border-color: var(--border-color); }
.border-b { border-bottom-width: 1px; border-bottom-style: solid; border-bottom-color: var(--border-color); }
.border-t { border-top-width: 1px; border-top-style: solid; border-top-color: var(--border-color); }

.border-slate-800 { border-color: var(--border-color); }
.border-slate-700 { border-color: var(--border-color); }
.border-sky-500\/20 { border-color: rgba(56, 189, 248, 0.25); }
.border-sky-500\/30 { border-color: rgba(56, 189, 248, 0.35); }
.border-emerald-500\/30 { border-color: rgba(16, 185, 129, 0.35); }
.border-rose-500\/20 { border-color: rgba(244, 63, 94, 0.25); }

.bg-slate-900,
.bg-slate-900\/60,
.bg-slate-900\/80,
.bg-slate-950,
.bg-slate-950\/60,
.bg-slate-950\/80 {
  background: var(--surface-card) !important;
  border: 1px solid var(--border-color);
}

.bg-sky-500\/10 { background: rgba(56, 189, 248, 0.08); }
.bg-emerald-500\/10 { background: rgba(16, 185, 129, 0.08); }
.bg-rose-500\/10 { background: rgba(244, 63, 94, 0.08); }

.shadow-sm { box-shadow: var(--card-shadow); }
.shadow-lg { box-shadow: var(--card-shadow); }
.shadow-2xl { box-shadow: var(--card-shadow-hover); }

/* ─── Form Inputs (Contact Page & Search) ──────────────────────────────── */
input[type="text"],
input[type="email"],
input[type="tel"],
input[type="url"],
input[type="number"],
select,
textarea {
  width: 100%;
  box-sizing: border-box;
  background: var(--surface-card);
  color: var(--text-main);
  border: 1px solid var(--border-color);
  border-radius: 10px;
  padding: 0.75rem 1rem;
  font-family: inherit;
  font-size: 0.925rem;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
  outline: none;
}
input:focus, select:focus, textarea:focus {
  border-color: var(--brand-blue);
  box-shadow: 0 0 0 3px rgba(0, 85, 255, 0.15);
}
body[data-mode="night"] input,
body[data-mode="night"] select,
body[data-mode="night"] textarea {
  background: #080f21;
  color: #f8fafc;
  border-color: rgba(255, 255, 255, 0.12);
}
body[data-mode="night"] input:focus,
body[data-mode="night"] select:focus,
body[data-mode="night"] textarea:focus {
  border-color: #38bdf8;
  box-shadow: 0 0 0 3px rgba(56, 189, 248, 0.2);
}

input[type="checkbox"] {
  accent-color: var(--brand-blue);
  width: 16px;
  height: 16px;
}

/* ─── Buttons & Action Links ─────────────────────────────────────────── */
.bg-sky-500 {
  background: linear-gradient(135deg, #0284c7, #2563eb) !important;
  color: #ffffff !important;
  box-shadow: 0 4px 14px rgba(2, 132, 199, 0.35);
}
.bg-sky-500:hover {
  background: linear-gradient(135deg, #0369a1, #1d4ed8) !important;
  transform: translateY(-1px);
}

.transition-colors { transition: color 0.15s ease, background-color 0.15s ease, border-color 0.15s ease; }
.transition-all { transition: all 0.2s ease; }

.hover\:text-sky-400:hover { color: #38bdf8 !important; }
.hover\:text-white:hover { color: var(--text-main) !important; }
