/* ==========================================================================
   DESIGN SYSTEM & TYPOGRAPHY - SKALA Paramedics Website
   ========================================================================== */

/* Font Definitions (WixMadeforText Variable Font) */
@font-face {
  font-family: 'WixMadeforText';
  src: url('fonts/WixMadeforText-VariableFont_wght Kopie.ttf') format('truetype-variations');
  font-weight: 100 900;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: 'WixMadeforText';
  src: url('fonts/WixMadeforText-Italic-VariableFont_wght Kopie.ttf') format('truetype-variations');
  font-weight: 100 900;
  font-style: italic;
  font-display: swap;
}

/* Custom CSS Custom Properties (Tokens) */
:root {
  --brand: #ff3838;
  --brand-rgb: 255, 56, 56;
  --brand-hover: #e02828;
  
  --bg-base: #fafafa;
  --bg-card: #ffffff;
  --bg-card-transparent: rgba(255, 255, 255, 0.75);
  
  --text-primary: #0f0f11;
  --text-secondary: #27272a;
  --text-muted: #71717a;
  --text-light: #f4f4f5;
  
  --border-color: rgba(0, 0, 0, 0.08);
  --border-focus: rgba(255, 56, 56, 0.5);
  
  --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.02);
  --shadow-md: 0 8px 30px rgba(0, 0, 0, 0.04);
  --shadow-lg: 0 16px 40px rgba(0, 0, 0, 0.08);
  --shadow-glow: 0 0 20px rgba(255, 56, 56, 0.15);
  
  --font-sans: 'WixMadeforText', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  --transition-fast: 0.2s cubic-bezier(0.25, 0.8, 0.25, 1);
  --transition-normal: 0.4s cubic-bezier(0.25, 1, 0.5, 1);
  --transition-slow: 0.6s cubic-bezier(0.16, 1, 0.3, 1);
  
  --navbar-height: 80px;
}

/* ==========================================================================
   RESET & GLOBAL BASE STYLES
   ========================================================================== */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  font-family: var(--font-sans);
  scroll-behavior: smooth;
  scroll-padding-top: var(--navbar-height);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  background-color: var(--bg-base);
  color: var(--text-primary);
}

body {
  position: relative;
  overflow-x: hidden;
  line-height: 1.6;
}

/* Custom Selection Color */
::selection {
  background-color: rgba(var(--brand-rgb), 0.2);
  color: var(--brand);
}

/* Custom Scrollbar */
::-webkit-scrollbar {
  width: 10px;
  height: 10px;
}
::-webkit-scrollbar-track {
  background: var(--bg-base);
}
::-webkit-scrollbar-thumb {
  background: #d4d4d8;
  border-radius: 5px;
  border: 2px solid var(--bg-base);
}
::-webkit-scrollbar-thumb:hover {
  background: #a1a1aa;
}

/* ==========================================================================
   VISUAL ACCENTS - FLOATING BACKGROUND GLOWS
   ========================================================================== */
.bg-glow {
  position: absolute;
  width: 600px;
  height: 600px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(var(--brand-rgb), 0.05) 0%, rgba(var(--brand-rgb), 0) 70%);
  z-index: -1;
  pointer-events: none;
  filter: blur(80px);
}
.bg-glow-1 {
  top: 10%;
  right: -10%;
  animation: float-glow 20s infinite alternate ease-in-out;
}
.bg-glow-2 {
  top: 60%;
  left: -10%;
  animation: float-glow 25s infinite alternate-reverse ease-in-out;
}

@keyframes float-glow {
  0% { transform: translate(0, 0) scale(1); }
  100% { transform: translate(80px, 50px) scale(1.2); }
}

/* ==========================================================================
   REUSABLE UTILITIES & COMPONENTS
   ========================================================================== */
.section-container {
  width: 100%;
  max-width: 1280px;
  margin: 0 auto;
  padding: 100px 24px;
}

.section-header {
  margin-bottom: 60px;
}
.section-header.text-center {
  text-align: center;
}
.section-header h2 {
  font-size: 2.5rem;
  font-weight: 800;
  margin-top: 12px;
  letter-spacing: -0.02em;
}
.section-desc {
  color: var(--text-muted);
  font-size: 1.15rem;
  max-width: 650px;
  margin: 16px auto 0;
}

/* Badges */
.badge {
  display: inline-block;
  padding: 6px 16px;
  background-color: rgba(var(--brand-rgb), 0.08);
  color: var(--brand);
  font-size: 0.85rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  border-radius: 100px;
  border: 1px solid rgba(var(--brand-rgb), 0.12);
}

/* Highlight text */
.text-highlight {
  color: var(--brand);
  background: linear-gradient(120deg, rgba(var(--brand-rgb), 0.1) 0%, rgba(var(--brand-rgb), 0) 100%);
  padding: 0 4px;
  border-radius: 4px;
}

/* Standard Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 14px 28px;
  font-size: 0.95rem;
  font-weight: 700;
  border-radius: 12px;
  cursor: pointer;
  transition: all var(--transition-fast);
  text-decoration: none;
  border: 2px solid transparent;
  position: relative;
  overflow: hidden;
}

.btn-primary {
  background-color: var(--brand);
  color: var(--text-light);
  box-shadow: 0 4px 14px rgba(var(--brand-rgb), 0.3);
}
.btn-primary:hover {
  background-color: var(--brand-hover);
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(var(--brand-rgb), 0.4);
}
.btn-primary:active {
  transform: translateY(0);
}

.btn-secondary {
  background-color: transparent;
  border-color: var(--border-color);
  color: var(--text-secondary);
}
.btn-secondary:hover {
  background-color: rgba(0, 0, 0, 0.03);
  border-color: var(--text-secondary);
  color: var(--text-primary);
  transform: translateY(-2px);
}
.btn-secondary:active {
  transform: translateY(0);
}

.btn-block {
  display: flex;
  width: 100%;
}

/* ==========================================================================
   RIPPLE EFFECT STYLES
   ========================================================================== */
.ripple-btn {
  position: relative;
  overflow: hidden;
}

.ripple-circle {
  position: absolute;
  background-color: rgba(255, 255, 255, 0.4);
  border-radius: 50%;
  transform: scale(0);
  animation: ripple 0.6s linear;
  pointer-events: none;
}
@keyframes ripple {
  to {
    transform: scale(4);
    opacity: 0;
  }
}

/* ==========================================================================
   NAVBAR & HEADER
   ========================================================================== */
.navbar {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: var(--navbar-height);
  background-color: var(--bg-card-transparent);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border-color);
  z-index: 100;
  transition: all var(--transition-fast);
}

.navbar.scrolled {
  background-color: rgba(255, 255, 255, 0.9);
  height: 70px;
  box-shadow: var(--shadow-sm);
}

.nav-container {
  max-width: 1280px;
  height: 100%;
  margin: 0 auto;
  padding: 0 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.nav-logo {
  display: flex;
  align-items: center;
  height: 100%;
  text-decoration: none;
}
.logo-img {
  height: 38px;
  width: auto;
  object-fit: contain;
  transition: transform var(--transition-fast);
}
.nav-logo:hover .logo-img {
  transform: scale(1.04);
}

.nav-menu {
  display: flex;
  align-items: center;
  gap: 32px;
}

.nav-link {
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--text-secondary);
  text-decoration: none;
  position: relative;
  padding: 8px 0;
  transition: color var(--transition-fast);
}
.nav-link:hover, .nav-link.active {
  color: var(--brand);
}

/* Slide in line hover effect */
.nav-link::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 50%;
  width: 0;
  height: 2px;
  background-color: var(--brand);
  transition: all var(--transition-fast);
  transform: translateX(-50%);
}
.nav-link:hover::after, .nav-link.active::after {
  width: 100%;
}

.nav-actions {
  display: flex;
  align-items: center;
  gap: 16px;
}

.nav-btn {
  padding: 10px 20px;
  font-size: 0.85rem;
  font-weight: 700;
  background-color: var(--brand);
  color: var(--text-light);
  border-radius: 8px;
  text-decoration: none;
  transition: all var(--transition-fast);
  box-shadow: 0 4px 10px rgba(var(--brand-rgb), 0.2);
}
.nav-btn:hover {
  background-color: var(--brand-hover);
  transform: translateY(-1px);
  box-shadow: 0 6px 14px rgba(var(--brand-rgb), 0.3);
}

.nav-btn-mobile {
  display: none;
}

/* Hamburger mobile button */
.hamburger {
  display: none;
  flex-direction: column;
  justify-content: space-between;
  width: 24px;
  height: 18px;
  background: transparent;
  border: none;
  cursor: pointer;
  z-index: 110;
}
.hamburger span {
  width: 100%;
  height: 2px;
  background-color: var(--text-primary);
  border-radius: 2px;
  transition: all var(--transition-fast);
}

/* ==========================================================================
   HERO SECTION
   ========================================================================== */
.hero {
  height: 100vh;
  min-height: 700px;
  display: flex;
  align-items: center;
  position: relative;
  overflow: hidden;
  padding-top: var(--navbar-height);
}

.hero-bg {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-size: cover;
  background-position: center;
  z-index: 1;
  transform: scale(1.02);
  transition: transform var(--transition-slow);
}

.hero-container {
  max-width: 1280px;
  width: 100%;
  margin: 0 auto;
  padding: 0 24px;
  position: relative;
  z-index: 2;
}

.hero-badge {
  display: inline-block;
  padding: 6px 18px;
  background-color: rgba(var(--brand-rgb), 0.08);
  border: 1px solid rgba(var(--brand-rgb), 0.15);
  color: var(--brand);
  border-radius: 100px;
  font-weight: 700;
  font-size: 0.85rem;
  letter-spacing: 0.05em;
  margin-bottom: 24px;
  text-transform: uppercase;
}

.hero-title {
  font-size: 4rem;
  line-height: 1.15;
  font-weight: 900;
  color: var(--text-primary);
  letter-spacing: -0.03em;
  margin-bottom: 24px;
  max-width: 800px;
}

.hero-subtitle {
  font-size: 1.25rem;
  color: var(--text-secondary);
  max-width: 600px;
  margin-bottom: 40px;
  line-height: 1.6;
}

.hero-ctas {
  display: flex;
  gap: 16px;
}

.hero-scroll-indicator {
  position: absolute;
  bottom: 40px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  font-size: 0.8rem;
  font-weight: 700;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.1em;
  z-index: 2;
  pointer-events: none;
}

.mouse-icon {
  width: 20px;
  height: 32px;
  border: 2px solid var(--text-muted);
  border-radius: 12px;
  position: relative;
}
.mouse-icon .wheel {
  width: 4px;
  height: 8px;
  background-color: var(--brand);
  border-radius: 2px;
  position: absolute;
  top: 6px;
  left: 50%;
  transform: translateX(-50%);
  animation: scroll-wheel 1.5s infinite;
}

@keyframes scroll-wheel {
  0% { opacity: 1; transform: translate(-50%, 0); }
  100% { opacity: 0; transform: translate(-50%, 12px); }
}

/* ==========================================================================
   FEATURES / BENEFITS SECTION
   ========================================================================== */
.features {
  background-color: var(--bg-base);
  position: relative;
}

.features-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 32px;
}

.feature-card {
  background-color: var(--bg-card);
  border-radius: 20px;
  padding: 40px;
  border: 1px solid var(--border-color);
  box-shadow: var(--shadow-md);
  transition: transform 0.1s ease-out, box-shadow var(--transition-fast);
  will-change: transform;
}
.feature-card:hover {
  box-shadow: var(--shadow-lg), var(--shadow-glow);
}

.feature-icon {
  width: 64px;
  height: 64px;
  border-radius: 16px;
  background-color: rgba(var(--brand-rgb), 0.05);
  color: var(--brand);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 24px;
  transition: all var(--transition-fast);
}
.feature-card:hover .feature-icon {
  background-color: var(--brand);
  color: var(--text-light);
  transform: scale(1.05) rotate(5deg);
}

.feature-card h3 {
  font-size: 1.35rem;
  font-weight: 800;
  margin-bottom: 14px;
  letter-spacing: -0.01em;
}

.feature-card p {
  color: var(--text-muted);
  font-size: 0.95rem;
  line-height: 1.6;
}

/* ==========================================================================
   SERVICES SECTION
   ========================================================================== */
.services {
  background-color: #ffffff;
}

.services-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(450px, 1fr));
  gap: 32px;
}

.service-card {
  position: relative;
  min-height: 380px;
  border-radius: 24px;
  overflow: hidden;
  background-size: cover;
  background-position: center;
  border: 1px solid var(--border-color);
  box-shadow: var(--shadow-md);
  display: flex;
  align-items: flex-end;
  background-image: linear-gradient(to top, rgba(255, 255, 255, 0.98) 0%, rgba(255, 255, 255, 0.85) 60%, rgba(255, 255, 255, 0.1) 100%), var(--bg-img);
  transition: transform 0.1s ease-out, box-shadow var(--transition-fast);
  will-change: transform;
}
.service-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: var(--bg-img) no-repeat center;
  background-size: cover;
  z-index: 1;
  transition: transform var(--transition-slow);
}
.service-card:hover::before {
  transform: scale(1.06);
}

.service-card:hover {
  box-shadow: var(--shadow-lg), var(--shadow-glow);
}

.service-content {
  position: relative;
  z-index: 2;
  padding: 40px;
  width: 100%;
  background: linear-gradient(to top, rgba(255, 255, 255, 1) 75%, rgba(255, 255, 255, 0) 100%);
}

.service-icon {
  width: 52px;
  height: 52px;
  border-radius: 12px;
  background-color: rgba(var(--brand-rgb), 0.08);
  color: var(--brand);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 20px;
  transition: all var(--transition-fast);
}
.service-card:hover .service-icon {
  background-color: var(--brand);
  color: var(--text-light);
}

.service-card h3 {
  font-size: 1.5rem;
  font-weight: 800;
  margin-bottom: 12px;
  letter-spacing: -0.015em;
  color: var(--text-primary);
}

.service-card p {
  color: var(--text-secondary);
  font-size: 0.95rem;
  line-height: 1.6;
  margin-bottom: 20px;
}

.service-link {
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--brand);
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  transition: color var(--transition-fast), transform var(--transition-fast);
}
.service-card:hover .service-link {
  color: var(--brand-hover);
  transform: translateX(4px);
}

/* ==========================================================================
   INTERACTIVE BEDARFSRECHNER
   ========================================================================== */
.calculator-section {
  background-color: var(--bg-base);
}

.calculator-wrapper {
  display: grid;
  grid-template-columns: 1.2fr 1fr;
  gap: 40px;
  align-items: start;
}

.calc-panel {
  background-color: var(--bg-card);
  border-radius: 24px;
  padding: 40px;
  border: 1px solid var(--border-color);
  box-shadow: var(--shadow-md);
}

/* Inputs Panel */
.inputs-panel {
  display: flex;
  flex-direction: column;
  gap: 32px;
}

.input-group {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.input-label {
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--text-secondary);
}

/* Styled Form Inputs */
.form-input {
  width: 100%;
  padding: 16px 20px;
  font-size: 0.95rem;
  font-family: var(--font-sans);
  background-color: var(--bg-base);
  border: 2px solid var(--border-color);
  border-radius: 12px;
  outline: none;
  transition: all var(--transition-fast);
  color: var(--text-primary);
}
.form-input:focus {
  border-color: var(--brand);
  background-color: #ffffff;
  box-shadow: 0 0 0 4px rgba(var(--brand-rgb), 0.1);
}

/* Dropdown Custom Arrow Wrapper */
.select-wrapper {
  position: relative;
}
.select-wrapper::after {
  content: '▼';
  font-size: 0.75rem;
  color: var(--text-muted);
  position: absolute;
  right: 20px;
  top: 50%;
  transform: translateY(-50%);
  pointer-events: none;
}
.select-wrapper select {
  appearance: none;
  cursor: pointer;
}

/* Sliders */
.slider-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.slider-value {
  font-size: 1.35rem;
  font-weight: 800;
  color: var(--brand);
  background-color: rgba(var(--brand-rgb), 0.05);
  padding: 4px 12px;
  border-radius: 8px;
  font-variant-numeric: tabular-nums;
  border: 1px solid rgba(var(--brand-rgb), 0.1);
}

.range-container {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

/* Input Range Slider Styling */
.range-slider {
  appearance: none;
  width: 100%;
  height: 8px;
  border-radius: 100px;
  background-color: #e4e4e7;
  outline: none;
  cursor: pointer;
}
.range-slider::-webkit-slider-runnable-track {
  width: 100%;
  height: 8px;
  border-radius: 100px;
}
.range-slider::-webkit-slider-thumb {
  appearance: none;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background-color: var(--brand);
  border: 3px solid #ffffff;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.15);
  cursor: pointer;
  transition: transform 0.1s ease-out, background-color var(--transition-fast);
  margin-top: -8px; /* necessary alignment in webkit */
}
.range-slider::-webkit-slider-thumb:hover {
  transform: scale(1.15);
  background-color: var(--brand-hover);
}
.range-slider::-webkit-slider-thumb:active {
  transform: scale(1.25);
  box-shadow: 0 0 0 8px rgba(var(--brand-rgb), 0.15);
}

.range-ticks {
  display: flex;
  justify-content: space-between;
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--text-muted);
  padding: 0 4px;
}

/* Checkbox Grid */
.checkbox-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 16px;
}

.checkbox-container {
  display: flex;
  align-items: center;
  position: relative;
  padding-left: 36px;
  cursor: pointer;
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--text-secondary);
  user-select: none;
  min-height: 24px;
}
.checkbox-container input {
  position: absolute;
  opacity: 0;
  cursor: pointer;
  height: 0;
  width: 0;
}

.checkmark {
  position: absolute;
  top: 0;
  left: 0;
  height: 24px;
  width: 24px;
  background-color: var(--bg-base);
  border: 2px solid var(--border-color);
  border-radius: 6px;
  transition: all var(--transition-fast);
}
.checkbox-container:hover input ~ .checkmark {
  border-color: var(--brand);
  background-color: #ffffff;
}
.checkbox-container input:checked ~ .checkmark {
  background-color: var(--brand);
  border-color: var(--brand);
}

/* Draw a checkmark */
.checkmark::after {
  content: "";
  position: absolute;
  display: none;
}
.checkbox-container input:checked ~ .checkmark::after {
  display: block;
}
.checkbox-container .checkmark::after {
  left: 8px;
  top: 4px;
  width: 5px;
  height: 10px;
  border: solid white;
  border-width: 0 2px 2px 0;
  transform: rotate(45deg);
}

.checkbox-text {
  transition: color var(--transition-fast);
}
.checkbox-container input:checked ~ .checkbox-text {
  color: var(--text-primary);
}

/* Results Panel */
.results-panel {
  border-color: rgba(var(--brand-rgb), 0.15);
  box-shadow: var(--shadow-lg), 0 0 40px rgba(var(--brand-rgb), 0.02);
  display: flex;
  flex-direction: column;
  gap: 28px;
  position: sticky;
  top: calc(var(--navbar-height) + 20px);
}

.results-header {
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.results-header h3 {
  font-size: 1.5rem;
  font-weight: 800;
}
.score-badge {
  display: flex;
  justify-content: space-between;
  align-items: center;
  background-color: rgba(0, 0, 0, 0.03);
  padding: 8px 16px;
  border-radius: 10px;
  font-size: 0.9rem;
  font-weight: 600;
}
.score-num {
  font-weight: 800;
  color: var(--brand);
  font-size: 1.1rem;
}

/* Gauge visual representation */
.results-visual {
  display: flex;
  justify-content: center;
  align-items: center;
  position: relative;
  padding: 10px 0;
}
.gauge-container {
  position: relative;
  width: 180px;
}
.gauge-svg {
  width: 100%;
}
#gauge-fill {
  transition: stroke-dashoffset 0.8s cubic-bezier(0.25, 1, 0.5, 1);
}
.gauge-text {
  position: absolute;
  bottom: 0;
  left: 50%;
  transform: translate(-50%, 0);
  font-weight: 800;
  font-size: 1.05rem;
  color: var(--text-primary);
  text-align: center;
  width: 100%;
}

.results-list {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.result-item {
  display: flex;
  align-items: center;
  gap: 18px;
  padding: 16px;
  background-color: rgba(0, 0, 0, 0.015);
  border: 1px solid var(--border-color);
  border-radius: 12px;
  transition: transform var(--transition-fast), background-color var(--transition-fast);
}
.result-item:hover {
  background-color: rgba(0, 0, 0, 0.03);
  transform: translateX(4px);
}

.result-icon {
  font-size: 1.5rem;
  width: 44px;
  height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
  background-color: #ffffff;
  border-radius: 10px;
  box-shadow: var(--shadow-sm);
}

.result-details h4 {
  font-size: 0.95rem;
  font-weight: 800;
  color: var(--text-primary);
}
.result-details p {
  font-size: 0.8rem;
  color: var(--text-muted);
}

/* ==========================================================================
   PHOTO GALLERY & SHOWCASE
   ========================================================================== */
.gallery-section {
  background-color: #ffffff;
}

.gallery-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 20px;
  grid-auto-flow: dense;
}

.gallery-item {
  position: relative;
  border-radius: 16px;
  overflow: hidden;
  aspect-ratio: 4 / 3;
  cursor: pointer;
  border: 1px solid var(--border-color);
  box-shadow: var(--shadow-sm);
  transition: all var(--transition-normal);
}

/* Make some elements tall or wide for visual rhythm */
.gallery-item:nth-child(3n) {
  aspect-ratio: 3 / 4;
  grid-row: span 2;
}
.gallery-item:nth-child(5n) {
  aspect-ratio: 16 / 9;
  grid-column: span 2;
}

.gallery-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform var(--transition-normal);
}

.gallery-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(var(--brand-rgb), 0.75);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transition: opacity var(--transition-fast);
  z-index: 2;
}

.gallery-overlay span {
  padding: 12px 24px;
  border-radius: 8px;
  background-color: #ffffff;
  color: var(--brand);
  font-weight: 800;
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
  transform: translateY(10px);
  transition: transform var(--transition-fast);
}

.gallery-item:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-lg);
}
.gallery-item:hover img {
  transform: scale(1.05);
}
.gallery-item:hover .gallery-overlay {
  opacity: 1;
}
.gallery-item:hover .gallery-overlay span {
  transform: translateY(0);
}

/* ==========================================================================
   CUSTOM LIGHTBOX (DIALOG)
   ========================================================================== */
.lightbox {
  border: none;
  background: transparent;
  width: 100%;
  height: 100%;
  max-width: 100%;
  max-height: 100%;
  outline: none;
  padding: 0;
  display: none; /* Handled by dialog showModal in JS */
  align-items: center;
  justify-content: center;
}

/* Polyfill for flex center on modern dialog display */
.lightbox[open] {
  display: flex;
}

.lightbox::backdrop {
  background-color: rgba(15, 15, 17, 0.95);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}

.lightbox-content {
  position: relative;
  width: 90%;
  max-width: 1100px;
  height: 90%;
  max-height: 800px;
  display: flex;
  align-items: center;
  justify-content: center;
  outline: none;
}

.lightbox-media-wrapper {
  position: relative;
  max-width: 100%;
  max-height: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.lightbox-content img {
  max-width: 100%;
  max-height: 70vh;
  object-fit: contain;
  border-radius: 12px;
  box-shadow: 0 10px 50px rgba(0, 0, 0, 0.5);
  animation: lightbox-zoom 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes lightbox-zoom {
  from { transform: scale(0.95); opacity: 0; }
  to { transform: scale(1); opacity: 1; }
}

.lightbox-caption {
  color: #ffffff;
  font-size: 1.05rem;
  font-weight: 600;
  text-align: center;
  margin-top: 20px;
  text-shadow: 0 2px 4px rgba(0, 0, 0, 0.5);
  max-width: 600px;
}

.lightbox-close {
  position: absolute;
  top: -40px;
  right: 0;
  background: transparent;
  border: none;
  color: #ffffff;
  font-size: 2.5rem;
  line-height: 1;
  cursor: pointer;
  transition: color var(--transition-fast), transform var(--transition-fast);
  z-index: 10;
}
.lightbox-close:hover {
  color: var(--brand);
  transform: scale(1.1);
}

.lightbox-nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  background-color: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.1);
  color: #ffffff;
  font-size: 1.5rem;
  width: 52px;
  height: 52px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all var(--transition-fast);
  user-select: none;
  z-index: 10;
}
.lightbox-nav:hover {
  background-color: #ffffff;
  color: var(--text-primary);
  border-color: #ffffff;
}
.lightbox-prev {
  left: 0;
}
.lightbox-next {
  right: 0;
}

/* ==========================================================================
   CAREER SECTION
   ========================================================================== */
.career {
  background-color: var(--bg-base);
}

.career-cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 32px;
}

.career-card {
  background-color: var(--bg-card);
  border-radius: 20px;
  padding: 40px;
  border: 1px solid var(--border-color);
  box-shadow: var(--shadow-md);
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  transition: all var(--transition-fast);
}
.career-card:hover {
  transform: translateY(-6px);
  box-shadow: var(--shadow-lg), 0 0 0 2px var(--brand);
}

.career-tag {
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--brand);
  background-color: rgba(var(--brand-rgb), 0.05);
  padding: 4px 10px;
  border-radius: 6px;
  margin-bottom: 20px;
}

.career-card h3 {
  font-size: 1.4rem;
  font-weight: 800;
  margin-bottom: 12px;
  letter-spacing: -0.015em;
}

.career-card p {
  color: var(--text-muted);
  font-size: 0.95rem;
  line-height: 1.6;
  margin-bottom: 28px;
  flex-grow: 1;
}

.career-card .btn {
  width: 100%;
}

/* ==========================================================================
   ACCESSIBLE CUSTOM MODALS (DIALOGS)
   ========================================================================== */
.custom-dialog {
  border: none;
  border-radius: 24px;
  background-color: #ffffff;
  box-shadow: var(--shadow-lg);
  max-width: 550px;
  width: 90%;
  margin: auto;
  outline: none;
  overflow: hidden;
  display: none;
}

.custom-dialog[open] {
  display: block;
  animation: dialog-appear 0.5s cubic-bezier(0.16, 1, 0.3, 1);
}

.custom-dialog::backdrop {
  background-color: rgba(15, 15, 17, 0.4);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
}

@keyframes dialog-appear {
  from { transform: scale(0.9) translateY(20px); opacity: 0; }
  to { transform: scale(1) translateY(0); opacity: 1; }
}

.dialog-content {
  padding: 40px;
}

.dialog-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 28px;
}
.dialog-header h3 {
  font-size: 1.5rem;
  font-weight: 800;
  letter-spacing: -0.02em;
}

.dialog-close {
  background: transparent;
  border: none;
  font-size: 2rem;
  line-height: 1;
  color: var(--text-muted);
  cursor: pointer;
  transition: color var(--transition-fast), transform var(--transition-fast);
}
.dialog-close:hover {
  color: var(--brand);
  transform: scale(1.1);
}

.dialog-form {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.input-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}

.text-area {
  min-height: 100px;
  resize: vertical;
}

/* Legal text formatting inside Impressum/Datenschutz */
.legal-text {
  max-height: 400px;
  overflow-y: auto;
  padding-right: 8px;
}
.legal-text h4 {
  font-size: 1.05rem;
  font-weight: 800;
  margin: 20px 0 8px;
}
.legal-text p {
  font-size: 0.9rem;
  color: var(--text-secondary);
  margin-bottom: 12px;
}

/* ==========================================================================
   CONTACT SECTION
   ========================================================================== */
.contact-section {
  background-color: #ffffff;
}

.contact-grid {
  display: grid;
  grid-template-columns: 1fr 1.3fr;
  gap: 60px;
  align-items: center;
}

.contact-info {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 24px;
}
.contact-info h2 {
  font-size: 2.5rem;
  font-weight: 800;
  letter-spacing: -0.02em;
}
.contact-info p {
  color: var(--text-secondary);
  font-size: 1.05rem;
}

.info-items {
  display: flex;
  flex-direction: column;
  gap: 24px;
  width: 100%;
  margin-top: 12px;
}

.info-item {
  display: flex;
  align-items: center;
  gap: 16px;
}

.info-icon {
  font-size: 1.25rem;
  width: 48px;
  height: 48px;
  display: flex;
  align-items: center;
  justify-content: center;
  background-color: rgba(var(--brand-rgb), 0.05);
  border: 1px solid rgba(var(--brand-rgb), 0.1);
  border-radius: 12px;
  color: var(--brand);
}

.info-text span {
  display: block;
  font-size: 0.8rem;
  font-weight: 700;
  text-transform: uppercase;
  color: var(--text-muted);
}
.info-text a {
  font-size: 1.15rem;
  font-weight: 800;
  color: var(--text-primary);
  text-decoration: none;
  transition: color var(--transition-fast);
}
.info-text a:hover {
  color: var(--brand);
}
.info-text p {
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--text-primary);
}

/* ECG Heartbeat Graphic Animation */
.info-graphic {
  width: 100%;
  max-width: 250px;
  margin-top: 10px;
}
.heartbeat-path {
  stroke-dasharray: 1000;
  stroke-dashoffset: 1000;
  animation: draw-heartbeat 4s linear infinite;
}
@keyframes draw-heartbeat {
  to {
    stroke-dashoffset: 0;
  }
}

.contact-form-card {
  background-color: var(--bg-card);
  border-radius: 24px;
  padding: 48px;
  border: 1px solid var(--border-color);
  box-shadow: var(--shadow-lg);
}

.form-title {
  font-size: 1.5rem;
  font-weight: 800;
  margin-bottom: 32px;
  letter-spacing: -0.015em;
}

#contact-form {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

/* ==========================================================================
   FOOTER
   ========================================================================== */
.footer {
  background-color: #0f0f11;
  color: var(--text-light);
  padding: 80px 0 40px;
}

.footer-container {
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 24px;
  display: grid;
  grid-template-columns: 2fr 1fr 1fr;
  gap: 60px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  padding-bottom: 48px;
}

.footer-brand {
  display: flex;
  flex-direction: column;
  gap: 20px;
  align-items: flex-start;
}
.footer-logo {
  height: 42px;
  width: auto;
  filter: brightness(0) invert(1); /* make it white on dark background */
}
.footer-brand p {
  color: rgba(255, 255, 255, 0.6);
  font-size: 0.95rem;
  max-width: 380px;
}

.footer-links-group {
  display: flex;
  flex-direction: column;
  gap: 16px;
}
.footer-links-group h4 {
  font-size: 1rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: rgba(255, 255, 255, 0.4);
}
.footer-links-group a, .footer-modal-trigger {
  color: rgba(255, 255, 255, 0.7);
  text-decoration: none;
  font-size: 0.95rem;
  font-weight: 600;
  text-align: left;
  background: transparent;
  border: none;
  cursor: pointer;
  transition: color var(--transition-fast);
  outline: none;
  width: fit-content;
}
.footer-links-group a:hover, .footer-modal-trigger:hover {
  color: var(--brand);
}

.footer-bottom {
  max-width: 1280px;
  margin: 0 auto;
  padding: 30px 24px 0;
  display: flex;
  justify-content: center;
  font-size: 0.85rem;
  color: rgba(255, 255, 255, 0.4);
}

/* ==========================================================================
   SUCCESS MODAL CHECKMARK ANIMATION
   ========================================================================== */
.success-dialog {
  max-width: 420px;
}

.success-icon-wrapper {
  width: 80px;
  height: 80px;
  margin: 0 auto 24px;
}

.success-checkmark {
  width: 80px;
  height: 80px;
  border-radius: 50%;
  display: block;
  stroke-width: 3;
  stroke: #4caf50;
  stroke-miterlimit: 10;
  box-shadow: inset 0px 0px 0px #4caf50;
  animation: fill-checkmark .4s ease-in-out .4s forwards, scale-checkmark .3s ease-in-out .9s both;
}

.checkmark-circle {
  stroke-dasharray: 166;
  stroke-dashoffset: 166;
  stroke-width: 3;
  stroke-miterlimit: 10;
  stroke: #4caf50;
  fill: none;
  animation: stroke-circle 0.6s cubic-bezier(0.65, 0, 0.45, 1) forwards;
}

.checkmark-check {
  transform-origin: 50% 50%;
  stroke-dasharray: 48;
  stroke-dashoffset: 48;
  stroke-width: 3;
  stroke: #4caf50;
  animation: stroke-checkmark 0.3s cubic-bezier(0.65, 0, 0.45, 1) 0.8s forwards;
}

@keyframes stroke-circle {
  100% {
    stroke-dashoffset: 0;
  }
}
@keyframes stroke-checkmark {
  100% {
    stroke-dashoffset: 0;
  }
}
@keyframes fill-checkmark {
  100% {
    box-shadow: inset 0px 0px 0px 40px rgba(76, 175, 80, 0.1);
  }
}
@keyframes scale-checkmark {
  0%, 100% {
    transform: none;
  }
  50% {
    transform: scale3d(1.1, 1.1, 1);
  }
}

/* ==========================================================================
   SCROLL REVEAL ANIMATIONS (IntersectionObserver class-based)
   ========================================================================== */
.reveal-el {
  opacity: 0;
  transform: translateY(30px) scale(0.96);
  transition: opacity 0.8s cubic-bezier(0.16, 1, 0.3, 1), transform 0.8s cubic-bezier(0.16, 1, 0.3, 1);
}

.reveal-el.revealed {
  opacity: 1;
  transform: translateY(0) scale(1);
}

/* Stagger animations for child elements */
.stagger-el {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.6s cubic-bezier(0.16, 1, 0.3, 1), transform 0.6s cubic-bezier(0.16, 1, 0.3, 1);
}
.reveal-el.revealed .stagger-el {
  opacity: 1;
  transform: translateY(0);
}
.reveal-el.revealed .stagger-el:nth-child(1) { transition-delay: 0.1s; }
.reveal-el.revealed .stagger-el:nth-child(2) { transition-delay: 0.2s; }
.reveal-el.revealed .stagger-el:nth-child(3) { transition-delay: 0.3s; }
.reveal-el.revealed .stagger-el:nth-child(4) { transition-delay: 0.4s; }

/* Simple keyframe entries for Hero */
.animate-fade-in {
  animation: fade-in 1s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}
.animate-slide-up {
  animation: slide-up 1s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}
.animate-slide-up-delayed {
  opacity: 0;
  animation: slide-up 1s cubic-bezier(0.16, 1, 0.3, 1) 0.2s forwards;
}

@keyframes fade-in {
  from { opacity: 0; }
  to { opacity: 1; }
}
@keyframes slide-up {
  from { opacity: 0; transform: translateY(30px); }
  to { opacity: 1; transform: translateY(0); }
}

/* ==========================================================================
   MEDIA QUERIES - RESPONSIVE STYLING
   ========================================================================== */

/* Large Tablets & Small Desktops (under 1024px) */
@media (max-width: 1024px) {
  .hero-title {
    font-size: 3.2rem;
  }
  .calculator-wrapper {
    grid-template-columns: 1fr;
  }
  .results-panel {
    position: static;
  }
  .contact-grid {
    grid-template-columns: 1fr;
    gap: 40px;
  }
}

/* Tablets (under 768px) */
@media (max-width: 768px) {
  :root {
    --navbar-height: 70px;
  }
  .section-container {
    padding: 60px 16px;
  }
  .section-header h2 {
    font-size: 2rem;
  }
  .hero {
    min-height: 600px;
    height: auto;
    padding: 120px 0 80px;
  }
  .hero-title {
    font-size: 2.5rem;
  }
  .hero-subtitle {
    font-size: 1.1rem;
  }
  .hero-ctas {
    flex-direction: column;
    width: 100%;
  }
  .hero-ctas .btn {
    width: 100%;
  }
  
  .services-grid {
    grid-template-columns: 1fr;
  }
  .service-card {
    min-height: 320px;
  }
  
  /* Mobile Menu logic */
  .hamburger {
    display: flex;
  }
  
  .nav-menu {
    position: fixed;
    top: var(--navbar-height);
    left: 0;
    width: 100%;
    height: calc(100vh - var(--navbar-height));
    background-color: #ffffff;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 28px;
    padding: 40px 0;
    z-index: 99;
    transform: translateX(100%);
    transition: transform var(--transition-normal);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.05);
  }
  
  .nav-menu.active {
    transform: translateX(0);
  }
  
  .hamburger.active span:nth-child(1) {
    transform: translateY(8px) rotate(45deg);
  }
  .hamburger.active span:nth-child(2) {
    opacity: 0;
  }
  .hamburger.active span:nth-child(3) {
    transform: translateY(-8px) rotate(-45deg);
  }
  
  .nav-btn {
    display: none;
  }
  .nav-btn-mobile {
    display: flex;
    width: 80%;
    max-width: 300px;
    justify-content: center;
    padding: 14px;
    background-color: var(--brand);
    color: #ffffff;
    border-radius: 10px;
    font-weight: 700;
    text-decoration: none;
  }
  
  .input-row {
    grid-template-columns: 1fr;
  }
  .contact-form-card {
    padding: 24px;
  }
  .footer-container {
    grid-template-columns: 1fr;
    gap: 40px;
  }
  .gallery-item:nth-child(5n) {
    grid-column: span 1;
    aspect-ratio: 4 / 3;
  }
}

/* Small devices (under 480px) */
@media (max-width: 480px) {
  .hero-title {
    font-size: 2.2rem;
  }
  .feature-card {
    padding: 28px;
  }
  .service-content {
    padding: 24px;
  }
  .calc-panel {
    padding: 24px;
  }
  .dialog-content {
    padding: 24px;
  }
}
