/* ═══════════════════════════════════════════════════════════
 * MySA — Solutions Pages Stylesheet (LIGHT THEME)
 * Light palette synced with the main site (SME / Real Estate /
 * Freelancer / Education). Scoped to /solutions/ pages only.
 * Only colors changed vs the original; all selectors/structure
 * (incl. the FAQ accordion contract) are preserved.
 * ═══════════════════════════════════════════════════════════ */

:root {
  --bg-color: #FFFFFF;
  --bg-dark: #F8FAFC;            /* alternating light section */
  --text-main: #0F172A;         /* slate 900 */
  --text-muted: #64748B;        /* slate 500 */
  --text-light: #0F172A;

  --accent-cyan: #09A7EF;
  --accent-green: #3AB85F;
  --accent-teal: #007884;
  --accent-purple: #8B5CF6;

  --surface: #FFFFFF;           /* card background */
  --surface-glass: rgba(15, 23, 42, 0.04);
  --border: #E2E8F0;

  --shadow-sm: 0 1px 2px 0 rgba(15, 23, 42, 0.05);
  --shadow-md: 0 4px 6px -1px rgba(15, 23, 42, 0.08), 0 2px 4px -2px rgba(15, 23, 42, 0.06);
  --shadow-lg: 0 12px 24px -6px rgba(15, 23, 42, 0.12), 0 6px 10px -6px rgba(15, 23, 42, 0.06);
  --shadow-glow: 0 0 24px rgba(9, 167, 239, 0.22);

  --radius-md: 12px;
  --radius-lg: 16px;
  --radius-xl: 24.85px;
  --radius-full: 9999px;
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  font-family: var(--font-primary);
  background-color: var(--bg-color);
  color: var(--text-main);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

h1, h2, h3, h4 {
  font-family: var(--font-primary);
  color: var(--text-main);
  line-height: 1.2;
}

a {
  text-decoration: none;
  color: inherit;
}

ul, ol {
  list-style: none;
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

/* Background Blobs — removed (no colorful glow on the light theme) */
.bg-blobs {
  display: none;
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  overflow: hidden;
  z-index: -1;
  pointer-events: none;
}

.blob-cyan {
  position: absolute;
  width: 500px;
  height: 500px;
  background: rgba(9, 167, 239, 0.10);
  filter: blur(150px);
  border-radius: 50%;
}

.blob-green {
  position: absolute;
  width: 500px;
  height: 500px;
  background: rgba(74, 222, 128, 0.10);
  filter: blur(150px);
  border-radius: 50%;
}

.blob-purple {
  position: absolute;
  width: 500px;
  height: 500px;
  background: rgba(139, 92, 246, 0.08);
  filter: blur(150px);
  border-radius: 50%;
}

/* Layout */
.container {
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 24px;
  position: relative;
  z-index: 1;
}

/* Typography */
.text-center { text-align: center; }

.section-title {
  font-size: 2.5rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  margin-bottom: 16px;
}

@media (min-width: 768px) {
  .section-title { font-size: 3.5rem; }
}

.section-subtitle {
  font-size: 1.125rem;
  color: var(--text-muted);
  max-width: 700px;
  margin: 0 auto;
}

@media (min-width: 768px) {
  .section-subtitle { font-size: 1.25rem; }
}

/* Quotes */
.figma-quote {
  font-size: 1.05rem;
  color: #64748B;
  line-height: 1.5;
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 14px 32px;
  border-radius: 44px;
  font-family: var(--font-primary);
  font-weight: 600;
  font-size: 1.15rem;
  cursor: pointer;
  transition: all 0.3s ease;
  border: none;
  text-decoration: none; /* so a.btn links render like the buttons */
}

.btn-primary {
  background: linear-gradient(89.97deg, #3AB85F 0.02%, #007884 103.12%);
  border: 1px solid rgba(58, 184, 95, 0.4);
  color: white;
  box-shadow: 0px 4px 12px rgba(0, 120, 132, 0.18);
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-glow);
}

.btn-secondary {
  background: #FFFFFF;
  color: var(--text-main);
  border: 1px solid var(--border);
  box-shadow: var(--shadow-sm);
}

.btn-secondary:hover {
  background: #F1F5F9;
}

/* Cards */
.card {
  background: var(--surface);
  border-radius: var(--radius-xl);
  padding: 32px;
  transition: all 0.3s ease;
  border: 1px solid var(--border);
  box-shadow: var(--shadow-sm);
}

.card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-lg);
  border: 1px solid #CBD5E1;
}

/* Glass cards — solid white on the light theme */
.glass {
  background: #FFFFFF;
  border: 1px solid var(--border);
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow-sm);
}

.glass-pill {
  border: 1px solid var(--border);
  border-radius: 28px;
  padding: 12px 24px;
  background: #FFFFFF;
  color: var(--text-main);
}

/* Nav */
.navbar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  padding: 24px 0;
  transition: all 0.3s ease;
  border-bottom: 1px solid transparent;
}

/* Scrolled state — light glass */
.navbar.scrolled {
  padding: 16px 0;
  background: rgba(255, 255, 255, 0.85);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
}

.navbar .container {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.nav-brand {
  font-family: var(--font-primary);
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--text-main);
  display: flex;
  align-items: center;
  gap: 8px;
}

.nav-links {
  display: none;
}

@media (min-width: 768px) {
  .nav-links {
    display: flex;
    gap: 32px;
    align-items: center;
    font-weight: 500;
    color: var(--text-muted);
  }
  .nav-links a:hover {
    color: var(--text-main);
  }
}

/* Sections Base */
.section {
  padding: 100px 0;
  position: relative;
}

.bg-dark-section {
  background-color: var(--bg-dark);
}

/* Badge */
.badge {
  display: inline-flex;
  align-items: center;
  padding: 6px 16px;
  border-radius: var(--radius-full);
  font-size: 0.875rem;
  font-weight: 500;
  background: rgba(9, 167, 239, 0.12);
  color: #0284c7;
  border: 1px solid rgba(9, 167, 239, 0.3);
}

/* Gradient Text */
.gradient-text {
  background: linear-gradient(90deg, #3AB85F 0%, #0090A8 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  color: transparent;
}

/* ═══════════════════════════════════════════════════════════
 * FAQ accordion — markup contract preserved (js/solutions.js):
 *   .faq-list > .faq-item(.open) > .faq-q(h4 + .faq-chevron) + .faq-a
 * ═══════════════════════════════════════════════════════════ */
.faq-item {
  padding: 24px;
  cursor: pointer;
  border-left: 4px solid transparent;
}

.faq-item.open {
  border-left: 4px solid var(--accent-teal);
}

.faq-q {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.faq-q h4 {
  font-weight: 600;
  font-size: 1.25rem;
  color: var(--text-main);
  margin: 0;
}

.faq-item.open .faq-q h4 {
  color: var(--accent-teal);
}

/* chevron swap: down (muted) when closed, teal when open */
.faq-chevron-up { display: none; color: var(--accent-teal); }
.faq-chevron-down { display: block; color: var(--text-muted); }
.faq-item.open .faq-chevron-up { display: block; }
.faq-item.open .faq-chevron-down { display: none; }

.faq-a {
  display: none;
  margin-top: 24px;
  color: #475569;
  line-height: 1.6;
  font-size: 1.1rem;
}

.faq-item.open .faq-a {
  display: block;
}

/* ═══════════════════════════════════════════════════════════
 * Hero typewriter effect (used in the solution-page <h1>s).
 * The hidden .tw-ghost reserves the full final space so the
 * layout never shifts while .tw-text types in over it.
 * ═══════════════════════════════════════════════════════════ */
.tw-block { display: block; position: relative; }
/* ghost reserves the full space from the very first paint (before JS),
   so the layout never drops/shifts when the typewriter starts */
.tw-ghost { visibility: hidden; display: block; pointer-events: none; user-select: none; }
/* live overlays the ghost; JS reveals its chars in place over the reserved space */
.tw-live  { position: absolute; top: 0; left: 0; width: 100%; }

.tw-caret {
  position: absolute;          /* out of flow → never affects text wrapping */
  width: 3px;
  height: 0.8em;
  border-radius: 1px;
  pointer-events: none;
  animation: tw-blink 0.8s steps(1) infinite;
}

@keyframes tw-blink {
  0%, 50% { opacity: 1; }
  50.01%, 100% { opacity: 0; }
}

/* ═══════════════════════════════════════════════════════════
 * Problem / pain-point cards (solutions pages).
 * Each card carries its own accent via the inline `--pain` and
 * `--pain-soft` custom properties.
 * ═══════════════════════════════════════════════════════════ */
.pain-badge {
  margin-bottom: 18px;
  background: rgba(201, 154, 94, 0.12);
  color: #8A5E2B;
  border-color: rgba(201, 154, 94, 0.4);
}

.pain-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr) !important;
  gap: 24px;
  margin-top: 56px;
}

.pain-card {
  display: flex;
  flex-direction: column;
  background: #FFFFFF;
  border: 1px solid var(--border);
  border-radius: 20px;
  padding: 28px;
  box-shadow: var(--shadow-sm);
  transition: transform 0.25s ease, box-shadow 0.25s ease, border-color 0.25s ease;
}

.pain-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-lg);
  border-color: #CBD5E1;
}

.pain-icon {
  width: 48px;
  height: 48px;
  border-radius: 12px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 22px;
  background: var(--pain-soft);
  color: var(--pain);
}

.pain-card h3 {
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--text-main);
  margin-bottom: 12px;
}

.pain-card p {
  flex: 1 1 auto;
  margin: 0 0 24px;
  color: var(--text-muted);
  font-size: 0.975rem;
  line-height: 1.65;
}

.pain-cost {
  display: flex;
  align-items: center;
  gap: 9px;
  padding-top: 18px;
  border-top: 1px solid var(--border);
  color: var(--pain);
  font-weight: 600;
  font-size: 0.9rem;
}

.pain-cost svg {
  flex: none;
}

/* Below desktop: one centered column so every card is identical in size and
   no card is ever stranded on the left. */
@media (max-width: 991px) {
  .pain-grid {
    grid-template-columns: 1fr !important;
    max-width: 480px;
    margin-left: auto;
    margin-right: auto;
    gap: 20px;
  }
}

/* ═══════════════════════════════════════════════════════════
 * Use-case / scenario cards (solutions pages).
 * Turns the dense "Situation / Without / With / Result" blocks
 * into scannable labelled steps, with the result pinned to the
 * bottom so every card in a row lines up.
 * ═══════════════════════════════════════════════════════════ */
.usecase-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr) !important;
  gap: 24px;
}

.usecase-card {
  display: flex;
  flex-direction: column;
  background: #FFFFFF;
  border: 1px solid var(--border);
  border-radius: 20px;
  padding: 28px;
  box-shadow: var(--shadow-sm);
  transition: transform 0.25s ease, box-shadow 0.25s ease, border-color 0.25s ease;
}

.usecase-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-lg);
  border-color: #CBD5E1;
}

.usecase-card > h4 {
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--text-main);
  line-height: 1.35;
  margin-bottom: 20px;
}

.usecase-steps {
  flex: 1 1 auto;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.usecase-step .lbl {
  display: block;
  margin-bottom: 5px;
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.07em;
  text-transform: uppercase;
  color: #94A3B8;
}

.usecase-step p {
  margin: 0;
  font-size: 0.925rem;
  line-height: 1.6;
  color: #475569;
}

.usecase-step i {
  color: #334155;
}

.usecase-result {
  margin-top: 22px;
  padding: 14px 16px;
  border-radius: 12px;
  background: rgba(201, 154, 94, 0.1);
  color: #9A6A34;
  font-weight: 600;
  font-size: 0.9rem;
  line-height: 1.5;
}

/* Below desktop: one centered column so every card is identical in size and
   no card is ever stranded on the left. */
@media (max-width: 991px) {
  .usecase-grid {
    grid-template-columns: 1fr !important;
    max-width: 480px;
    margin-left: auto;
    margin-right: auto;
    gap: 20px;
  }
}

/* ── Document / status vault rows (solutions pages) ── */
.vault-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.vault-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 16px;
  border-radius: 12px;
  background: #FFFFFF;
  border: 1px solid var(--border);
}

.vault-row.urgent {
  background: rgba(220, 38, 38, 0.06);
  border-color: rgba(220, 38, 38, 0.28);
  border-left: 4px solid #DC2626;
}

.vault-row .doc strong {
  font-size: 0.95rem;
  color: var(--text-main);
}

.vault-row.urgent .doc strong {
  color: #DC2626;
}

.vault-row .doc div {
  margin-top: 3px;
  font-size: 0.82rem;
  color: var(--text-muted);
}

.vault-status {
  flex: none;
  font-size: 0.82rem;
  font-weight: 600;
  white-space: nowrap;
}

.vault-status.ok { color: #16A34A; }
.vault-status.urgent { color: #DC2626; }

@media (max-width: 560px) {
  .vault-row {
    flex-direction: column;
    align-items: flex-start;
    gap: 6px;
  }
  .vault-status { white-space: normal; }
}

/* ═══════════════════════════════════════════════════════════
 * Mobile & tablet responsiveness (desktop ≥ 992px is unchanged).
 * These pages lay out with inline `display:grid/flex`. Grid/flex
 * items default to `min-width:auto`, so a nested card grid keeps
 * its intrinsic min-content width and forces the whole page wider
 * than the viewport (clipping the hero, headings & text). Letting
 * those items shrink lets the nested grids collapse and stack.
 * ═══════════════════════════════════════════════════════════ */
@media (max-width: 991px) {
  /* Let grid/flex items shrink below their intrinsic min-content width. */
  .hero-section [style*="display:grid"] > *,
  .hero-section [style*="display:flex"] > *,
  .section [style*="display:grid"] > *,
  .section [style*="display:flex"] > * {
    min-width: 0;
  }
  /* The inline `repeat(auto-fit, minmax(…))` grids are grid items with
     `margin:auto`, which sizes them to max-content — so auto-fit renders
     every column (overflowing narrow screens). Pin them to 2-up on tablet. */
  .section [style*="minmax("] {
    grid-template-columns: 1fr 1fr !important;
  }
}

@media (max-width: 640px) {
  /* Phones: single column for the auto-fit grids and any fixed 2-col blocks. */
  .section [style*="minmax("],
  [style*="grid-template-columns:1fr 1fr"] {
    grid-template-columns: 1fr !important;
  }
  /* Lighter vertical rhythm than the 100px desktop sections. */
  .section { padding: 64px 0; }
  .hero-section {
    padding-top: 120px !important;
    padding-bottom: 56px !important;
  }
}
