/* ================================================================
   SGS Cloud Theme — theme.css
   Built on Bootswatch Pulse (Bootstrap 5.3)
   Pulse primary: #593196  |  secondary: #a991d4
   Custom hero uses dark gradient: #17141f → #2d1760
   ================================================================ */

/* ── CSS VARIABLES ─────────────────────────────────────────── */
:root {
  --sgs-purple:      #593196;
  --sgs-purple-lt:   #a991d4;
  --sgs-dark:        #17141f;
  --sgs-dark-mid:    #2d1760;
  --sgs-hero-grad:   linear-gradient(145deg, #17141f 0%, #2d1760 55%, #17141f 100%);
  --sgs-section-alt: #f9f8fc;
  --sgs-border:      rgba(89, 49, 150, 0.12);
  --sgs-card-bg:     #ffffff;
  --sgs-text-muted:  #868e96;
  --sgs-nav-h:       72px;
  --sgs-radius:      0px;     /* Pulse uses sharp corners */
  --sgs-radius-card: 4px;
  --transition:      0.22s ease;
}

/* ── BASE ──────────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  font-family: 'Nunito Sans', 'Segoe UI', system-ui, -apple-system, sans-serif;
  color: #444;
  background: #fff;
  overflow-x: hidden;
}

/* ── NAVBAR ────────────────────────────────────────────────── */
.sgs-navbar {
  height: var(--sgs-nav-h);
  background: rgba(23, 20, 31, 0.96);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid rgba(169, 145, 212, 0.15);
  transition: background var(--transition), box-shadow var(--transition);
  z-index: 1030;
}

.sgs-navbar.scrolled {
  background: rgba(23, 20, 31, 0.99);
  box-shadow: 0 2px 24px rgba(0,0,0,0.35);
}

/* Nav links */
.sgs-navbar .navbar-nav .nav-link {
  color: rgba(255, 255, 255, 0.72);
  font-size: 0.875rem;
  font-weight: 500;
  padding: 0.5rem 0.85rem;
  transition: color var(--transition);
  letter-spacing: 0.01em;
}
.sgs-navbar .navbar-nav .nav-link:hover,
.sgs-navbar .navbar-nav .nav-link.active {
  color: #fff;
}

/* Hamburger */
.sgs-navbar .navbar-toggler-icon {
  filter: invert(1);
}
.sgs-navbar .navbar-toggler:focus { box-shadow: none; }

/* Dropdown */
.sgs-navbar .dropdown-menu {
  background: #1e1830;
  border: 1px solid rgba(169, 145, 212, 0.2);
  border-radius: 4px;
  padding: 6px 0;
}
.sgs-navbar .dropdown-item {
  color: rgba(255, 255, 255, 0.75);
  font-size: 0.85rem;
  padding: 8px 18px;
  transition: all var(--transition);
}
.sgs-navbar .dropdown-item:hover {
  background: rgba(89, 49, 150, 0.25);
  color: #fff;
}

/* Language switcher */
.sgs-lang-switcher { margin: 0; }
.sgs-lang-link {
  color: rgba(255, 255, 255, 0.55);
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-decoration: none;
  padding: 3px 6px;
  border-radius: 3px;
  transition: all var(--transition);
}
.sgs-lang-link:hover,
.sgs-lang-link.active {
  color: #fff;
  background: rgba(89, 49, 150, 0.35);
}

/* CTA in nav */
.sgs-navbar .btn-primary {
  font-size: 0.85rem;
  padding: 7px 18px;
}

/* ── HERO ──────────────────────────────────────────────────── */
.sgs-hero {
  position: relative;
  min-height: 100vh;
  display: flex;
  align-items: center;
  background: var(--sgs-hero-grad);
  padding: calc(var(--sgs-nav-h) + 60px) 0 80px;
  overflow: hidden;
}

/* Atmospheric glow */
.sgs-hero-glow {
  position: absolute;
  top: -100px;
  left: 50%;
  transform: translateX(-50%);
  width: 800px;
  height: 600px;
  background: radial-gradient(ellipse at 50% 40%,
    rgba(89, 49, 150, 0.30) 0%,
    rgba(89, 49, 150, 0.08) 45%,
    transparent 70%);
  pointer-events: none;
}

/* Animated badge */
.sgs-hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 7px 16px;
  background: rgba(89, 49, 150, 0.18);
  border: 1px solid rgba(169, 145, 212, 0.35);
  border-radius: 100px;
  font-size: 0.82rem;
  color: #c9b8e8;
  font-weight: 500;
  letter-spacing: 0.01em;
}

/* Pulse dot animation */
.sgs-pulse-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--sgs-purple-lt);
  animation: sgsPulse 2s ease-in-out infinite;
  flex-shrink: 0;
}
@keyframes sgsPulse {
  0%, 100% { opacity: 1; transform: scale(1); }
  50%       { opacity: 0.4; transform: scale(1.5); }
}

/* Hero title */
.sgs-hero-title {
  font-size: clamp(2.6rem, 6vw, 5rem);
  font-weight: 800;
  line-height: 1.05;
  letter-spacing: -0.04em;
  color: #fff;
  margin-bottom: 1.25rem;
}
.sgs-hero-title em {
  font-style: normal;
  color: var(--sgs-purple-lt);
}

/* Hero subtitle */
.sgs-hero-subtitle {
  font-size: 1.15rem;
  font-weight: 300;
  color: rgba(255, 255, 255, 0.62);
  max-width: 520px;
  margin: 0 auto 2.5rem;
  line-height: 1.65;
}

/* Hero CTA */
.sgs-hero-cta .btn-outline-light {
  border-color: rgba(255, 255, 255, 0.3);
  color: rgba(255, 255, 255, 0.85);
}
.sgs-hero-cta .btn-outline-light:hover {
  background: rgba(255, 255, 255, 0.1);
  border-color: rgba(255, 255, 255, 0.55);
  color: #fff;
}

/* Stats strip */
.sgs-hero-stats {
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  padding-top: 2.5rem;
}
.sgs-stat-number {
  font-size: 2.4rem;
  font-weight: 800;
  letter-spacing: -0.05em;
  line-height: 1;
  color: #fff;
  margin-bottom: 4px;
}
.sgs-stat-accent { color: var(--sgs-purple-lt); }
.sgs-stat-label {
  font-size: 0.78rem;
  color: rgba(255, 255, 255, 0.42);
  letter-spacing: 0.02em;
}
.sgs-stat-divider {
  border-left: 1px solid rgba(255, 255, 255, 0.1);
}

/* ── SHARED SECTION STYLES ─────────────────────────────────── */
.sgs-section {
  padding: 96px 0;
}
.sgs-section-alt {
  background: var(--sgs-section-alt);
}

.sgs-section-tag {
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--sgs-purple);
  margin-bottom: 0.6rem;
}

.sgs-section-title {
  font-size: clamp(1.8rem, 4vw, 3rem);
  font-weight: 800;
  line-height: 1.08;
  letter-spacing: -0.035em;
  color: #17141f;
  margin-bottom: 1rem;
}

.sgs-section-desc {
  font-size: 1.05rem;
  color: var(--sgs-text-muted);
  max-width: 500px;
  line-height: 1.65;
  margin-bottom: 3rem;
  font-weight: 300;
}

/* ── CARDS (Pain / Blog / General) ───────────────────────────*/
.sgs-card {
  background: var(--sgs-card-bg);
  border: 1px solid var(--sgs-border);
  border-radius: var(--sgs-radius-card);
  padding: 28px 28px 32px;
  transition: border-color var(--transition), transform var(--transition), box-shadow var(--transition);
  display: flex;
  flex-direction: column;
}
.sgs-card:hover {
  border-color: rgba(89, 49, 150, 0.35);
  transform: translateY(-3px);
  box-shadow: 0 8px 28px rgba(89, 49, 150, 0.10);
}
.sgs-card-icon {
  font-size: 1.75rem;
  margin-bottom: 1rem;
  display: block;
}
.sgs-card h3 {
  font-size: 1.05rem;
  font-weight: 700;
  color: #17141f;
  margin-bottom: 0.6rem;
  line-height: 1.3;
}
.sgs-card p {
  font-size: 0.9rem;
  color: var(--sgs-text-muted);
  line-height: 1.65;
  margin: 0;
}

/* ── HOW IT WORKS — Steps ──────────────────────────────────── */
.sgs-steps { position: relative; }
.sgs-steps::before {
  content: '';
  position: absolute;
  top: 27px;
  left: 12.5%;
  right: 12.5%;
  height: 1px;
  background: linear-gradient(to right, transparent, var(--sgs-border) 20%, var(--sgs-border) 80%, transparent);
  display: none;
}
@media (min-width: 992px) {
  .sgs-steps::before { display: block; }
}

.sgs-step { padding: 0 16px; }
.sgs-step-circle {
  width: 54px;
  height: 54px;
  border-radius: 50%;
  background: #fff;
  border: 1px solid rgba(89, 49, 150, 0.25);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1rem;
  font-weight: 800;
  color: var(--sgs-purple);
  margin: 0 auto 1.25rem;
  position: relative;
  z-index: 1;
  box-shadow: 0 0 0 6px var(--sgs-section-alt);
}
.sgs-step h3 {
  font-size: 0.95rem;
  font-weight: 700;
  color: #17141f;
  margin-bottom: 0.5rem;
}
.sgs-step p {
  font-size: 0.85rem;
  color: var(--sgs-text-muted);
  line-height: 1.6;
  margin: 0;
}

/* ── VENDORS ───────────────────────────────────────────────── */
.sgs-vendor-quote {
  font-size: 0.9rem;
  color: var(--sgs-text-muted);
  border-left: 2px solid var(--sgs-purple-lt);
  padding-left: 1.25rem;
  font-style: italic;
  line-height: 1.7;
  max-width: 360px;
}

.sgs-vendor-chip {
  background: #fff;
  border: 1px solid var(--sgs-border);
  border-radius: var(--sgs-radius-card);
  padding: 16px 10px;
  transition: all var(--transition);
  cursor: default;
}
.sgs-vendor-chip:hover {
  border-color: rgba(89, 49, 150, 0.3);
  background: var(--sgs-section-alt);
}
.sgs-vendor-chip--hi {
  border-color: rgba(89, 49, 150, 0.28);
  background: rgba(89, 49, 150, 0.03);
}
.sgs-vendor-icon { font-size: 1.5rem; line-height: 1; margin-bottom: 7px; }
.sgs-vendor-name { font-size: 0.72rem; font-weight: 600; color: var(--sgs-text-muted); }
.sgs-vendor-chip--hi .sgs-vendor-name { color: #17141f; }

.sgs-vendor-footnote {
  border: 1px solid var(--sgs-border);
  border-radius: var(--sgs-radius-card);
  padding: 12px 20px;
  font-style: italic;
}

/* ── SERVICES ──────────────────────────────────────────────── */
.sgs-service-card {
  background: var(--sgs-card-bg);
  border: 1px solid var(--sgs-border);
  border-radius: var(--sgs-radius-card);
  padding: 32px 28px;
  transition: all var(--transition);
  display: flex;
  flex-direction: column;
  position: relative;
  overflow: hidden;
}
.sgs-service-card::after {
  content: '';
  position: absolute;
  bottom: 0; left: 0; right: 0;
  height: 2px;
  background: linear-gradient(to right, var(--sgs-purple), var(--sgs-purple-lt));
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.32s ease;
}
.sgs-service-card:hover {
  border-color: rgba(89, 49, 150, 0.32);
  transform: translateY(-3px);
  box-shadow: 0 8px 28px rgba(89, 49, 150, 0.09);
}
.sgs-service-card:hover::after { transform: scaleX(1); }

.sgs-service-icon { font-size: 1.8rem; display: block; margin-bottom: 1.1rem; }
.sgs-service-card h3 {
  font-size: 1.05rem;
  font-weight: 700;
  color: #17141f;
  margin-bottom: 0.6rem;
}
.sgs-service-card p {
  font-size: 0.88rem;
  color: var(--sgs-text-muted);
  line-height: 1.65;
  flex: 1;
}
.sgs-service-tag {
  display: inline-block;
  margin-top: 1rem;
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--sgs-purple-lt);
}

/* ── FOR WHOM ──────────────────────────────────────────────── */
.sgs-whom-card {
  background: var(--sgs-card-bg);
  border: 1px solid var(--sgs-border);
  border-radius: var(--sgs-radius-card);
  padding: 36px 30px;
  transition: border-color var(--transition);
}
.sgs-whom-card:hover { border-color: rgba(89, 49, 150, 0.32); }
.sgs-whom-seg {
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--sgs-purple);
  margin-bottom: 0.75rem;
}
.sgs-whom-card h3 {
  font-size: 1.35rem;
  font-weight: 800;
  letter-spacing: -0.03em;
  color: #17141f;
  margin-bottom: 0.75rem;
  line-height: 1.2;
}
.sgs-whom-card > p {
  font-size: 0.88rem;
  color: var(--sgs-text-muted);
  line-height: 1.65;
  margin-bottom: 1.5rem;
}
.sgs-whom-list { display: flex; flex-direction: column; gap: 8px; }
.sgs-whom-list li {
  font-size: 0.85rem;
  color: var(--sgs-text-muted);
  display: flex;
  align-items: flex-start;
  gap: 8px;
}
.sgs-whom-list li::before {
  content: '→';
  color: var(--sgs-purple-lt);
  flex-shrink: 0;
  font-size: 0.75rem;
  margin-top: 2px;
}

/* ── WHY US ────────────────────────────────────────────────── */
.sgs-why-card {
  background: var(--sgs-card-bg);
  border: 1px solid var(--sgs-border);
  border-radius: var(--sgs-radius-card);
  padding: 28px 28px;
  transition: border-color var(--transition);
}
.sgs-why-card:hover { border-color: rgba(89, 49, 150, 0.32); }
.sgs-why-icon {
  width: 46px;
  height: 46px;
  border-radius: 4px;
  border: 1px solid rgba(89, 49, 150, 0.2);
  background: rgba(89, 49, 150, 0.05);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.25rem;
  flex-shrink: 0;
}
.sgs-why-card h3 {
  font-size: 1rem;
  font-weight: 700;
  color: #17141f;
  margin-bottom: 0.5rem;
}
.sgs-why-card p {
  font-size: 0.88rem;
  color: var(--sgs-text-muted);
  line-height: 1.65;
  margin: 0;
}

/* ── CTA / CONTACT ─────────────────────────────────────────── */
.sgs-cta-section {
  position: relative;
  background: var(--sgs-section-alt);
  overflow: hidden;
}
.sgs-cta-glow {
  position: absolute;
  top: 50%; left: 50%;
  transform: translate(-50%, -50%);
  width: 600px; height: 400px;
  background: radial-gradient(ellipse, rgba(89, 49, 150, 0.08) 0%, transparent 70%);
  pointer-events: none;
}
.sgs-cta-box {
  background: #fff;
  border: 1px solid var(--sgs-border);
  border-radius: 8px;
  padding: 64px 48px;
  position: relative;
  z-index: 1;
}
@media (max-width: 576px) {
  .sgs-cta-box { padding: 40px 24px; }
}

.sgs-contact-form .form-label {
  font-size: 0.82rem;
  font-weight: 600;
  color: #444;
  margin-bottom: 4px;
}
.sgs-contact-form .form-control {
  border-radius: 3px;
  font-size: 0.9rem;
}
#sgsFormMsg.success {
  background: #d1e7dd; color: #0a3622;
  border: 1px solid #a3cfbb;
  border-radius: 4px; padding: 12px 16px;
}
#sgsFormMsg.error {
  background: #f8d7da; color: #58151c;
  border: 1px solid #f1aeb5;
  border-radius: 4px; padding: 12px 16px;
}

.sgs-cta-alt .btn-outline-secondary {
  font-size: 0.875rem;
  font-weight: 600;
}

/* ── FOOTER ────────────────────────────────────────────────── */
.sgs-footer {
  background: #17141f;
  color: rgba(255, 255, 255, 0.65);
}
.sgs-footer-tagline {
  font-size: 0.85rem;
  color: rgba(255, 255, 255, 0.45);
  line-height: 1.6;
  margin-bottom: 0.75rem;
}
.sgs-footer-copy {
  font-size: 0.78rem;
  color: rgba(255, 255, 255, 0.28);
  line-height: 1.6;
}
.sgs-footer-heading {
  color: rgba(255, 255, 255, 0.9);
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.07em;
  text-transform: uppercase;
  margin-bottom: 1rem;
}
.sgs-footer-links { display: flex; flex-direction: column; gap: 7px; }
.sgs-footer-links a {
  font-size: 0.875rem;
  color: rgba(255, 255, 255, 0.5);
  text-decoration: none;
  transition: color var(--transition);
}
.sgs-footer-links a:hover { color: rgba(255, 255, 255, 0.9); }

.sgs-footer-contacts { display: flex; flex-direction: column; gap: 8px; }
.sgs-footer-contacts a {
  font-size: 0.9rem;
  color: rgba(255, 255, 255, 0.7);
  text-decoration: none;
  font-weight: 600;
  transition: color var(--transition);
}
.sgs-footer-contacts a:hover { color: #fff; }

.sgs-footer-divider {
  border-color: rgba(255, 255, 255, 0.08);
}

/* Footer language switcher (dark version) */
.sgs-footer .sgs-lang-link {
  color: rgba(255, 255, 255, 0.38);
}
.sgs-footer .sgs-lang-link:hover,
.sgs-footer .sgs-lang-link.active {
  color: rgba(255, 255, 255, 0.85);
  background: rgba(89, 49, 150, 0.25);
}

/* ── INNER PAGE (page.php / single.php) ────────────────────── */
.sgs-page-main { min-height: 70vh; }
.sgs-page-article h1 {
  font-size: clamp(1.6rem, 4vw, 2.6rem);
  font-weight: 800;
  letter-spacing: -0.03em;
  color: #17141f;
}
.sgs-page-content {
  font-size: 1rem;
  line-height: 1.78;
  color: #444;
  max-width: 740px;
}
.sgs-page-content h2, .sgs-page-content h3 {
  color: #17141f;
  font-weight: 700;
  margin-top: 2rem;
}
.sgs-page-content a { color: var(--sgs-purple); }
.sgs-page-content a:hover { color: var(--sgs-dark-mid); }

/* ── BLOG PAGINATION ───────────────────────────────────────── */
.nav-links { display: flex; gap: 8px; }
.nav-links .page-numbers {
  padding: 6px 14px;
  border: 1px solid var(--sgs-border);
  border-radius: 3px;
  color: #444;
  text-decoration: none;
  font-size: 0.875rem;
  transition: all var(--transition);
}
.nav-links .page-numbers.current,
.nav-links .page-numbers:hover {
  background: var(--sgs-purple);
  border-color: var(--sgs-purple);
  color: #fff;
}

/* ── SCROLL-TRIGGERED FADE IN ──────────────────────────────── */
[data-sgs-fade] {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}
[data-sgs-fade].sgs-visible {
  opacity: 1;
  transform: translateY(0);
}

/* ── UTILITIES ─────────────────────────────────────────────── */
.sgs-text-purple { color: var(--sgs-purple); }
.text-muted      { color: var(--sgs-text-muted) !important; }

/* ── RESPONSIVE TWEAKS ─────────────────────────────────────── */
@media (max-width: 768px) {
  .sgs-section       { padding: 68px 0; }
  .sgs-hero          { min-height: auto; padding: calc(var(--sgs-nav-h) + 40px) 0 60px; }
  .sgs-hero-subtitle { font-size: 1rem; }
  .sgs-stat-number   { font-size: 1.8rem; }
  .sgs-cta-box       { padding: 40px 24px; }
  .sgs-vendor-quote  { max-width: 100%; border-left: none; border-top: 2px solid var(--sgs-purple-lt); padding-left: 0; padding-top: 12px; }
}

@media (max-width: 480px) {
  .sgs-hero-badge { font-size: 0.75rem; }
  .sgs-hero-cta .btn { width: 100%; justify-content: center; }
  .sgs-section-title { letter-spacing: -0.02em; }
}
