html {
  scroll-behavior: smooth;
}

body {
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* Custom style overrides to blend Bootstrap modals with our premium design */
.modal-content-custom {
  background: rgba(255, 255, 255, 0.98);
  backdrop-filter: blur(20px);
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 24px;
  box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
}
.form-input-custom {
  background: #ffffff;
  border: 1.5px solid #e2e8f0;
  border-radius: 12px;
  padding: 12px 16px;
  font-size: 15px;
  transition: all 0.2s ease;
  color: #0f172a;
  width: 100%;
  outline: none;
}
.form-input-custom:focus {
  border-color: var(--primary-accent) !important;
  box-shadow: 0 0 0 3px var(--primary-accent-trans) !important;
}
.input-icon-wrapper {
  position: relative;
}
.input-icon {
  position: absolute;
  left: 14px;
  top: 50%;
  transform: translateY(-50%);
  color: #94a3b8;
  font-size: 18px;
}
.input-icon-wrapper .form-input-custom {
  padding-left: 44px;
}

/* Sector Theme CSS variables (Toggles accents dynamically) */
:root {
  --text-dark: #0f172a;
  --primary-accent: #dc2626;
  --primary-accent-hover: #b91c1c;
  --primary-accent-trans: rgba(220, 38, 38, 0.15);
  --primary-glow: rgba(220, 38, 38, 0.08);
  --secondary-glow: rgba(5, 150, 105, 0.04);
  --gradient-start: #dc2626;
  --gradient-end: #059669;
}
[data-theme="medical"] {
  --primary-accent: #059669;
  --primary-accent-hover: #047857;
  --primary-accent-trans: rgba(5, 150, 105, 0.15);
  --primary-glow: rgba(5, 150, 105, 0.08);
  --secondary-glow: rgba(220, 38, 38, 0.04);
  --gradient-start: #059669;
  --gradient-end: #dc2626;
}

/* Entrance animation for sections */
.fade-in-up {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 0.8s ease, transform 0.8s ease;
}
.fade-in-up.visible {
  opacity: 1;
  transform: translateY(0);
}
.fade-in-up.delay-1 { transition-delay: 0.1s; }
.fade-in-up.delay-2 { transition-delay: 0.2s; }
.fade-in-up.delay-3 { transition-delay: 0.3s; }

.theme-transition {
  transition: all 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Custom video controls overlay */
.video-overlay-btn {
  background: rgba(15, 23, 42, 0.6);
  backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 255, 255, 0.1);
}
.video-overlay-btn:hover {
  background: var(--primary-accent);
  color: white;
}

/* Modern Theme Toggle Switch */
.theme-toggle {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 8px 14px;
  border-radius: 50px;
  background: #f1f5f9;
  border: 2px solid transparent;
  cursor: pointer;
  transition: all 0.3s ease;
  outline: none;
}
.theme-toggle[data-active="political"] {
  border-color: var(--primary-accent);
  background: var(--primary-glow);
}
.theme-toggle[data-active="medical"] {
  border-color: var(--primary-accent);
  background: var(--secondary-glow);
}
.theme-toggle .toggle-track {
  position: relative;
  width: 44px;
  height: 26px;
  background: #cbd5e1;
  border-radius: 999px;
  transition: background 0.3s ease;
}
.theme-toggle .toggle-track::before {
  content: '';
  position: absolute;
  top: 2px;
  left: 2px;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: white;
  box-shadow: 0 1px 3px rgba(0,0,0,0.2);
  transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}
.theme-toggle .toggle-track.active {
  background: var(--primary-accent);
}
.theme-toggle[data-active="medical"] .toggle-track::before {
  transform: translateX(18px);
}
.theme-toggle .toggle-label {
  font-size: 13px;
  font-weight: 600;
  color: #0f172a;
  white-space: nowrap;
}

/* Google Translate Widget Styling */
#google_translate_element {
  display: inline-block;
  vertical-align: middle;
}
.goog-te-gadget {
  font-family: 'Outfit', sans-serif !important;
  font-size: 13px !important;
}
.goog-te-gadget-simple {
  background-color: #ffffff !important;
  border: 1px solid #e2e8f0 !important;
  padding: 6px 12px !important;
  border-radius: 12px !important;
  cursor: pointer;
  display: inline-flex !important;
  align-items: center;
  text-decoration: none !important;
}
.goog-te-gadget-simple img {
  display: none !important;
}
.goog-te-gadget-simple span {
  color: #0f172a !important;
  font-weight: 600 !important;
}
.goog-te-menu-value span {
  border-left: none !important;
}

/* Landing page art direction: editorial, calm and conversion-focused. */
:root {
  --ink: #172033;
  --muted: #64748b;
  --paper: #fbfaf7;
  --line: #e8e7e2;
}

body#page-body {
  background: var(--paper);
  color: var(--muted);
  overflow-x: hidden;
}

body#page-body::before {
  content: '';
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: -10;
  opacity: .55;
  background-image: radial-gradient(rgba(23, 32, 51, .1) .7px, transparent .7px);
  background-size: 9px 9px;
  mask-image: linear-gradient(to bottom, #000, transparent 42%);
}

#main-header {
  background: rgba(251, 250, 247, .82) !important;
  border-color: rgba(23, 32, 51, .1) !important;
}

#main-header > div { max-width: 1240px; }
#main-header nav a { letter-spacing: .01em; }
#main-header nav a:hover { color: var(--primary-accent) !important; }

/* Hero gets a tactile editorial surface while retaining all original controls. */
body#page-body > section:first-of-type {
  position: relative;
  padding-top: 5.5rem !important;
  padding-bottom: 6rem !important;
}

body#page-body > section:first-of-type::before,
body#page-body > section:first-of-type::after {
  content: '';
  position: absolute;
  z-index: -1;
  border-radius: 999px;
  filter: blur(2px);
  pointer-events: none;
}

body#page-body > section:first-of-type::before {
  width: 32rem;
  height: 32rem;
  right: -13rem;
  top: 4rem;
  background: radial-gradient(circle, var(--primary-glow), transparent 68%);
}

body#page-body > section:first-of-type::after {
  width: 22rem;
  height: 22rem;
  left: -12rem;
  top: 14rem;
  background: radial-gradient(circle, var(--secondary-glow), transparent 70%);
}

#hero-badge-text { letter-spacing: .08em; }
body#page-body > section:first-of-type h1 {
  max-width: 920px;
  font-size: clamp(3rem, 7vw, 5.8rem) !important;
  line-height: .95 !important;
  letter-spacing: -.065em !important;
  text-wrap: balance;
}
body#page-body > section:first-of-type h1 span:last-child { color: var(--primary-accent) !important; }
body#page-body > section:first-of-type p { text-wrap: balance; }

@media (min-width: 1024px) {
  /* The same content is rearranged into a 60/40 launchpad; no controls are duplicated. */
  body#page-body > section:first-of-type {
    display: grid;
    grid-template-columns: minmax(0, .9fr) minmax(0, 1.1fr);
    column-gap: 4.5rem;
    align-items: center;
    text-align: left;
  }
  body#page-body > section:first-of-type > div:nth-of-type(1),
  body#page-body > section:first-of-type > h1,
  body#page-body > section:first-of-type > p,
  body#page-body > section:first-of-type > div:nth-of-type(2),
  body#page-body > section:first-of-type > div:nth-of-type(3) {
    grid-column: 1;
    justify-self: start;
    margin-left: 0;
    margin-right: 0;
  }
  body#page-body > section:first-of-type > div:nth-of-type(4) {
    grid-column: 2;
    grid-row: 1 / span 5;
    width: 100%;
    margin: 0;
    transform: perspective(1500px) rotateY(-3deg) rotateX(1deg);
    transform-origin: center left;
  }
  body#page-body > section:first-of-type > div:nth-of-type(3) { margin-bottom: 0; justify-content: flex-start; }
  body#page-body > section:first-of-type > div:nth-of-type(2) { width: 100%; max-width: 29rem; }
}

#landing-slider-container {
  box-shadow: inset 0 0 0 1px rgba(255,255,255,.25), 0 32px 65px -34px rgba(23, 32, 51, .55);
}
#landing-slider-container::after {
  content: '';
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: linear-gradient(110deg, rgba(23,32,51,.2), transparent 48%, rgba(23,32,51,.13));
  z-index: 2;
}
#landing-slider-container > div { z-index: 3 !important; }

/* Section rhythm and card system. */
body#page-body > section:not(:first-of-type) {
  max-width: 1240px;
  border-color: var(--line) !important;
}
body#page-body > section h2 {
  letter-spacing: -.045em;
  text-wrap: balance;
}

#core-capabilities > div:last-child > div,
#template-showcase > div:last-child > div,
#social-proof > div:last-child,
#process-guide > div:last-child > div {
  border-color: var(--line) !important;
  box-shadow: 0 16px 38px -30px rgba(23, 32, 51, .55);
}

#core-capabilities > div:last-child > div {
  position: relative;
  border-radius: 1.5rem !important;
  overflow: hidden;
}
#core-capabilities > div:last-child > div::before {
  content: '';
  position: absolute;
  inset: 0 auto auto 0;
  width: 100%;
  height: 4px;
  background: linear-gradient(90deg, var(--primary-accent), transparent 72%);
}

#template-showcase > div:last-child > div {
  border-radius: 1.5rem !important;
  background: #fff;
}
#template-showcase img { transition: transform .6s ease; }
#template-showcase > div:last-child > div:hover img { transform: scale(1.045); }

#process-guide > div:last-child { gap: 1rem !important; }
#process-guide > div:last-child > div {
  border-width: 1px !important;
  border-radius: 1.25rem !important;
  background: rgba(255,255,255,.72);
}
#process-guide > div:last-child > div:hover { transform: translateY(-5px); }

#social-proof > div:last-child {
  border-radius: 1.5rem !important;
  background: linear-gradient(135deg, #fff 62%, color-mix(in srgb, var(--primary-accent) 7%, white));
}
body#page-body > section:nth-last-of-type(1) > div {
  border-radius: 1.75rem !important;
  background: linear-gradient(115deg, #172033, #253852 58%, var(--primary-accent)) !important;
  box-shadow: 0 24px 55px -30px rgba(23,32,51,.85);
}

/* Shared affordances */
a[style*="background-color: var(--primary-accent)"],
body#page-body > section:first-of-type > div:nth-of-type(3) a:last-child {
  border-radius: 999px !important;
  box-shadow: 0 12px 24px -13px var(--primary-accent) !important;
}

button:focus-visible, a:focus-visible {
  outline: 3px solid color-mix(in srgb, var(--primary-accent) 45%, white);
  outline-offset: 3px;
}

@media (max-width: 767px) {
  #main-header { padding-top: .75rem !important; padding-bottom: .75rem !important; }
  #main-header > div { padding-left: 1rem; padding-right: 1rem; }
  #main-header .text-2xl { font-size: 1.15rem !important; }
  #main-header a[style*="background-color"] { padding: .7rem .9rem !important; }
  body#page-body > section:first-of-type { padding-top: 3.25rem !important; }
  body#page-body > section:first-of-type .flex.justify-center { flex-direction: column-reverse; padding: 0 1rem; }
  body#page-body > section:first-of-type .flex.justify-center a { width: 100%; }
  #browser-mockup-url { width: 10rem !important; padding-left: .5rem !important; padding-right: .5rem !important; }
  body#page-body > section:not(:first-of-type) { padding-top: 4.5rem !important; padding-bottom: 4.5rem !important; }
}

/* Image-free visual system */
.landing-bg-slide:first-child { background: radial-gradient(circle at 13% 22%, rgba(220,38,38,.12), transparent 25%), radial-gradient(circle at 86% 68%, rgba(5,150,105,.13), transparent 30%); }
.landing-bg-slide:nth-child(2) { background: radial-gradient(circle at 15% 70%, rgba(5,150,105,.14), transparent 30%), radial-gradient(circle at 82% 20%, rgba(220,38,38,.11), transparent 27%); }

.brand-mark {
  display: inline-grid;
  place-items: center;
  width: 2.5rem;
  height: 2.5rem;
  border-radius: .8rem;
  color: #fff;
  font-size: .75rem;
  font-weight: 900;
  letter-spacing: -.06em;
  background: linear-gradient(135deg, #dc2626 0 48%, #059669 48% 100%);
  box-shadow: 0 8px 18px -10px rgba(23,32,51,.7);
}
.brand-mark-small { width: 2rem; height: 2rem; font-size: .64rem; border-radius: .65rem; }

.portal-preview { display: flex; background: #f8fafc; }
.portal-preview-political { --preview: #dc2626; --preview-soft: #fef2f2; }
.portal-preview-medical { --preview: #059669; --preview-soft: #ecfdf5; }
.preview-sidebar { width: 21%; padding: 7% 4%; background: #172033; color: #fff; display: flex; flex-direction: column; align-items: center; gap: 10%; }
.preview-sidebar i { display:grid; place-items:center; width: 2.3rem; height: 2.3rem; border-radius: .7rem; background: var(--preview); font-size: 1.05rem; }
.preview-sidebar span { width: 65%; height: .5rem; border-radius: 99px; background: rgba(255,255,255,.25); }
.preview-main { flex:1; padding: 12% 9%; background: linear-gradient(135deg, #fff, var(--preview-soft)); }
.preview-kicker { width: 22%; height: .55rem; border-radius: 99px; background: var(--preview); margin-bottom: 7%; }
.preview-title { width: 74%; height: 1.35rem; border-radius: .3rem; background: #172033; margin-bottom: 4%; }
.preview-title.short { width: 49%; opacity: .75; margin-bottom: 11%; }
.preview-grid { display:grid; grid-template-columns: repeat(3, 1fr); gap: .8rem; }
.preview-grid span { aspect-ratio: 1; border-radius: .65rem; border: 1px solid color-mix(in srgb, var(--preview) 22%, white); background: color-mix(in srgb, var(--preview) 10%, white); }

.showcase-art { position: relative; height: 100%; padding: 2rem; display: grid; align-content: center; grid-template-columns: auto 1fr; gap: .75rem; overflow: hidden; color: #fff; }
.showcase-art::before { content: ''; position: absolute; width: 15rem; height: 15rem; right: -4rem; bottom: -7rem; border-radius: 50%; background: rgba(255,255,255,.13); }
.showcase-art i { position: relative; z-index: 1; font-size: 2.1rem; }
.showcase-art span { position: relative; z-index: 1; align-self: center; font-size: 1.15rem; font-weight: 800; letter-spacing: -.03em; }
.showcase-art > div { position: relative; z-index: 1; grid-column: span 2; height: .65rem; width: 90%; border-radius: 99px; background: rgba(255,255,255,.78); }
.showcase-art > div:nth-of-type(2) { width: 62%; opacity: .7; }
.showcase-art > div:nth-of-type(3) { width: 76%; opacity: .45; }
.showcase-art-political { background: linear-gradient(135deg, #7f1d1d, #dc2626); }
.showcase-art-medical { background: linear-gradient(135deg, #064e3b, #059669); }
.testimonial-avatar { display: grid; place-items: center; flex: 0 0 auto; background: linear-gradient(135deg, #dc2626, #059669) !important; color: white; font-weight: 800; }
