/* Common workspace styles extracted from page inline styles */
:root {
  --bg: #07122a;
  --on-surface: #d9e2ff;
  --primary: #00daf3;
}

html, body {
  background-color: var(--bg);
  color: var(--on-surface);
  scroll-behavior: smooth;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

.glass-card,
.glass-panel {
  background: rgba(10, 25, 47, 0.7);
  backdrop-filter: blur(12px);
  border: 1px solid rgba(255, 255, 255, 0.08);
  transition: all 0.3s ease;
}
.glass-card:hover,
.glass-panel:hover {
  border-color: rgba(0, 218, 243, 0.25);
  transform: translateY(-4px);
  box-shadow: 0 10px 30px -10px rgba(0, 218, 243, 0.12);
}

.inner-glow {
  box-shadow: inset 0 1px 0 0 rgba(255, 255, 255, 0.05);
}

.material-symbols-outlined {
  font-variation-settings: 'FILL' 0, 'wght' 400, 'GRAD' 0, 'opsz' 24;
}

.hero-vignette {
  background: radial-gradient(circle at center, transparent 0%, var(--bg) 100%);
}

.hero-gradient {
  background: radial-gradient(circle at top right, rgba(0, 218, 243, 0.15), transparent 40%),
              radial-gradient(circle at bottom left, rgba(0, 104, 117, 0.2), transparent 40%);
}

/* Small helpers used across pages */
.top-fab {
  position: fixed;
  right: 1rem;
  bottom: 2.5rem;
  width: 64px;
  height: 64px;
  border-radius: 9999px;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 10px 30px rgba(0,0,0,0.25);
}

/* Make sure forms and inputs have consistent focus outlines when Tailwind isn't used */
input:focus, textarea:focus, select:focus {
  outline: none;
  box-shadow: 0 0 0 3px rgba(0, 218, 243, 0.12);
  border-color: var(--primary);
}

/* Responsive overflow fixes */
html, body {
  overflow-x: hidden;
}

/* Define utility used in templates (container max) */
.max-w-container-max {
  max-width: 1280px;
  margin-left: auto;
  margin-right: auto;
  box-sizing: border-box;
  padding-left: 1rem;
  padding-right: 1rem;
}

/* Prevent OwlCarousel from creating horizontal scroll */
.owl-carousel,
.owl-stage-outer {
  overflow: hidden;
  max-width: 100%;
}
.owl-stage,
.owl-item {
  box-sizing: border-box;
}

/* Allow flex children to shrink and break long words */
.glass-card {
  min-width: 0;
  word-break: break-word;
}

section { box-sizing: border-box; }

/* Make images and svgs responsive */
img, svg { max-width: 100%; height: auto; display: block; }

/* Responsive typography for large headings to prevent overflow */
h1.text-display-xl, .text-display-xl {
  font-size: clamp(2rem, 8vw, 4.5rem);
  line-height: 1.02;
  word-break: break-word;
  overflow-wrap: break-word;
  hyphens: auto;
}

.font-headline-lg, .text-headline-lg, h2 {
  font-size: clamp(1.25rem, 5.5vw, 3rem);
  line-height: 1.15;
  word-break: break-word;
  overflow-wrap: break-word;
}

.font-headline-md, .text-headline-md, h3 {
  font-size: clamp(1rem, 4.2vw, 1.9rem);
  line-height: 1.2;
}

/* Ensure headings don't create horizontal scroll on very small screens */
h1, h2, h3 {
  max-width: 100%;
  box-sizing: border-box;
  margin-left: auto;
  margin-right: auto;
}

@media (max-width: 420px) {
  .text-display-xl { font-size: clamp(1.6rem, 9.5vw, 3rem); }
  .text-headline-lg { font-size: clamp(1rem, 6.5vw, 1.6rem); }
}

/* Global box-sizing and overflow guard to prevent right-side padding/overflow */
*::before, *::after {
  box-sizing: border-box;
}

html, body {
  max-width: 100%;
  overflow-x: hidden;
}

body {
  margin: 0;
}

/* OwlCarousel defensive rules */
.owl-carousel {
  padding: 0 !important;
  margin: 0 !important;
  max-width: 100%;
}
.owl-stage-outer { overflow: hidden; }

/* Ensure fixed/floating elements don't extend layout width */
.fixed, .top-fab, a.fixed { max-width: 100%; box-sizing: border-box; }

/* Safety: prevent elements using 100vw from causing horizontal scroll */
*[style*="width: 100vw"] {
  width: 100% !important;
}

/* Reusable card max-height utility: constrain card total height and allow internal scrolling if needed */
.card-max-h-450 {
  max-height: 450px;
}

.summary {
  display: block;
  font-size: 10px;
  color: rgba(255, 255, 255, 0.6);
  margin-top: 4px;
}

