/* styles.css */
/* Modernisierte CSS-Datei für KI-Protools - v5 (Mobile Menu Added - Corrected MQ) */

/* Variablen für konsistentes Farbschema */
:root {
  /* --- Apple-inspired Liquid Glass palette (Light theme) --- */
  --surface-950: #020612;
  --surface-900: #071324;
  --surface-800: #0d1f36;
  --surface-700: #162c4b;
  --surface-100: #eef3fb;
  --surface-50: #f7faff;

  --primary-600: #0a84ff;
  --primary-500: #1c8fff;
  --primary-400: #64b5ff;
  --accent-600: #0fadb2;
  --accent-500: #2cd4c8;
  --accent-400: #7ceee0;

  --neutral-900: #111d2f;
  --neutral-700: #1e3146;
  --neutral-500: #3d4f63;
  --neutral-300: #6c7c91;
  --neutral-200: #b5c2d3;
  --neutral-100: #dde5f0;

  --text-primary: #152033;
  --text-secondary: #2d3a4f;
  --text-muted: #586174;
  --text-on-dark: #eef3fb;

  --gradient-primary: linear-gradient(135deg, rgba(10, 132, 255, 0.95) 0%, rgba(59, 201, 255, 0.9) 45%, rgba(44, 212, 200, 0.88) 100%);
  --gradient-surface: radial-gradient(circle at 12% 8%, rgba(91, 168, 255, 0.25), transparent 60%), radial-gradient(circle at 88% 20%, rgba(76, 255, 230, 0.22), transparent 55%);

  --border-color: rgba(12, 91, 177, 0.18);
  --border-color-strong: rgba(10, 132, 255, 0.4);
  --panel-shadow: 0 25px 55px -30px rgba(10, 23, 46, 0.6);
  --panel-blur: blur(18px);

  --radius-sm: 0.5rem;
  --radius-md: 1rem;
  --radius-lg: 1.75rem;
  --transition-base: all 0.35s cubic-bezier(0.22, 1, 0.36, 1);

  --header-height: 72px;
  --header-height-scrolled: 60px;
  --layout-max: 1200px;
  --layout-wide: 1400px;
  --section-space: clamp(4rem, 8vw, 6.5rem);

  --shadow-soft: 0 18px 42px -30px rgba(15, 28, 50, 0.55);
  --shadow-hover: 0 28px 52px -28px rgba(10, 132, 255, 0.45);

  --status-success: #20c997;
  --status-warning: #f6c356;
  --status-error: #f56565;
  --success-color: var(--status-success);
  --warning-color: var(--status-warning);
  --error-color: var(--status-error);

  --mobile-breakpoint: 768px;

  /* Legacy custom properties (for compatibility with existing selectors) */
  --primary-color-dark: var(--surface-900);
  --primary-color-medium: var(--surface-800);
  --primary-color-light: var(--surface-700);
  --secondary-color: var(--primary-500);
  --secondary-color-light: var(--primary-400);
  --secondary-color-dark: var(--primary-600);
  --accent-color: var(--accent-500);
  --accent-color-light: var(--accent-400);
  --accent-color-dark: var(--accent-600);
  --bg-light: #f5f8ff;
  --bg-medium: #e8eef7;
  --bg-card-light: rgba(255, 255, 255, 0.75);
  --text-color-dark: var(--text-primary);
  --text-color-medium: var(--text-secondary);
  --text-color-light: var(--text-muted);
  --text-on-dark-primary: var(--text-on-dark);
  --text-on-dark-secondary: rgba(206, 220, 240, 0.72);
  --gradient: var(--gradient-primary);
  --gradient-text: var(--gradient-primary);

  --darkmode-bg: #020b18;
  --darkmode-bg-medium: rgba(5, 17, 32, 0.9);
  --darkmode-card: rgba(9, 22, 38, 0.78);
  --darkmode-card-hover: rgba(16, 31, 52, 0.9);
  --darkmode-text-primary: rgba(232, 237, 245, 0.97);
  --darkmode-text-secondary: rgba(177, 193, 214, 0.78);
  --darkmode-heading: #f4f7fb;
  --darkmode-border: rgba(40, 137, 255, 0.32);
  --darkmode-accent: #64d2ff;
  --darkmode-secondary: #0a84ff;
  --darkmode-shadow: 0 28px 48px -28px rgba(1, 9, 22, 0.85);
  --darkmode-hover-shadow: 0 32px 56px -26px rgba(16, 110, 255, 0.32);
}

/* Reset & Base Styles */
*,
*::before,
*::after {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  font-size: 16px; /* Base */
}

body {
  font-family: 'Inter', 'Roboto', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  line-height: 1.65;
  color: var(--text-primary);
  background: linear-gradient(180deg, rgba(247, 249, 255, 0.95) 0%, rgba(233, 239, 249, 0.92) 65%), var(--gradient-surface);
  min-height: 100vh;
  padding-top: var(--header-height);
  display: flex;
  flex-direction: column;
  transition: background 0.45s ease, color 0.45s ease;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* Prevent background scroll when mobile menu is open */
body.mobile-menu-open {
    overflow: hidden;
}

/* --- Dark Mode --- */
body.darkmode {
  background: linear-gradient(180deg, rgba(2, 11, 24, 0.96) 0%, rgba(4, 18, 36, 0.94) 70%), radial-gradient(circle at 18% -10%, rgba(16, 123, 255, 0.28), transparent 55%), radial-gradient(circle at 85% 20%, rgba(44, 212, 200, 0.18), transparent 60%);
  color: var(--darkmode-text-primary);
}

body.darkmode h1,
body.darkmode h2,
body.darkmode h3,
body.darkmode h4 {
  color: var(--darkmode-heading);
}

body.darkmode .section-title::after {
 background-color: var(--darkmode-accent);
}

body.darkmode header {
  background: rgba(5, 16, 32, 0.82);
  border-bottom-color: var(--darkmode-border);
  box-shadow: 0 24px 48px -28px rgba(1, 9, 22, 0.85);
}
body.darkmode header.scrolled {
  background: rgba(6, 18, 36, 0.9);
}

body.darkmode .nav-logo {
  color: var(--darkmode-heading);
}
body.darkmode .nav-logo span {
  color: transparent;
  background: var(--gradient-primary);
  -webkit-background-clip: text;
}
body.darkmode header nav ul li a {
  color: var(--darkmode-text-secondary);
}
body.darkmode header nav ul li a:hover,
body.darkmode header nav ul li a.active {
  color: var(--darkmode-accent);
}

/* Styles for dark mode toggle label specifically in dark mode */
body.darkmode .darkmode-label {
   background-color: var(--primary-color-light); /* Consistent dark background for label */
}
body.darkmode .darkmode-label .ball {
    background-color: var(--darkmode-bg);
}
body.darkmode .mobile-menu-toggle {
    color: var(--darkmode-heading);
}
body.darkmode .mobile-menu {
    background-color: var(--darkmode-bg);
    border-left: 1px solid var(--darkmode-border);
}
body.darkmode .mobile-menu ul li a {
    color: var(--darkmode-text-primary);
}
body.darkmode .mobile-menu ul li a:hover,
body.darkmode .mobile-menu ul li a.active {
    color: var(--darkmode-accent);
    background-color: rgba(44, 212, 200, 0.16); /* accent alpha */
}
body.darkmode .mobile-menu .darkmode-label { /* Ensure toggle in mobile menu is also styled */
   background-color: var(--primary-color-light);
}
body.darkmode .mobile-menu .darkmode-label .ball {
    background-color: var(--darkmode-bg);
}


body.darkmode .project-card,
body.darkmode .about-card,
body.darkmode #contact-page .contact-container > div, /* Target columns directly */
body.darkmode .datenschutz-section,
body.darkmode #impressum,
body.darkmode .faq-item,
body.darkmode .testimonial-item,
body.darkmode .blog-teaser,
body.darkmode .blog-post {
  background-color: var(--darkmode-card);
  box-shadow: var(--darkmode-shadow);
  border: 1px solid var(--darkmode-border);
}
body.darkmode .project-card:hover,
body.darkmode .about-card:hover,
body.darkmode .faq-item:hover,
body.darkmode .blog-teaser:hover {
   box-shadow: var(--darkmode-hover-shadow);
   border-color: var(--darkmode-accent);
   background-color: var(--darkmode-card-hover);
}

body.darkmode .btn.primary-btn {
  color: var(--darkmode-heading);
  box-shadow: 0 26px 50px -24px rgba(16, 110, 255, 0.48);
}
body.darkmode .btn.primary-btn:hover,
body.darkmode .btn.primary-btn:focus-visible {
  box-shadow: 0 30px 56px -24px rgba(16, 110, 255, 0.6);
}

body.darkmode .btn.secondary-btn {
  background: rgba(16, 110, 255, 0.18);
  border-color: rgba(40, 137, 255, 0.42);
  color: var(--darkmode-accent);
}
body.darkmode .btn.secondary-btn:hover,
body.darkmode .btn.secondary-btn:focus-visible {
  background: rgba(16, 110, 255, 0.26);
  box-shadow: 0 22px 48px -24px rgba(16, 110, 255, 0.46);
}

body.darkmode a {
  color: var(--darkmode-secondary);
}
body.darkmode a:hover {
  color: var(--darkmode-accent);
}

body.darkmode footer {
  background-color: var(--primary-color-dark); /* Darker than body bg */
  border-top: 1px solid var(--darkmode-border);
}
body.darkmode .footer-container h3 {
   color: var(--darkmode-heading);
}
body.darkmode .footer-container p,
body.darkmode .footer-container a {
   color: var(--darkmode-text-secondary);
}
body.darkmode .footer-container a:hover {
   color: var(--darkmode-accent);
}
body.darkmode .footer-bottom p {
   color: var(--darkmode-text-secondary);
}
body.darkmode .footer-nav a {
   color: var(--darkmode-text-secondary) !important;
}
body.darkmode .footer-nav a:hover {
   color: var(--darkmode-accent) !important;
}

body.darkmode .social-icons a {
  background-color: rgba(44, 212, 200, 0.16);
  color: var(--darkmode-accent);
}
body.darkmode .social-icons a:hover {
  background-color: var(--darkmode-accent);
  color: var(--darkmode-bg);
}
body.darkmode .scroll-to-top {
  background-color: var(--darkmode-accent);
  color: var(--darkmode-bg);
}
body.darkmode .scroll-to-top:hover {
    background-color: var(--accent-color-light); /* Slightly lighter teal */
}

body.darkmode .skill-container {
  background-color: var(--primary-color-light);
}
body.darkmode .skill-progress {
   background: var(--gradient);
}
body.darkmode .counter {
   color: var(--darkmode-accent);
}
body.darkmode .counter-item i {
   background: var(--gradient-text);
   -webkit-background-clip: text;
   background-clip: text;
   color: transparent;
}

body.darkmode .testimonial-item {
  border-left-color: var(--darkmode-accent);
}
body.darkmode .quote-icon {
  color: var(--darkmode-accent);
  opacity: 0.5;
}

body.darkmode .faq-question {
  border-bottom: 1px solid var(--darkmode-border);
}
body.darkmode .faq-item.active .faq-question {
   border-bottom-color: transparent;
}
body.darkmode .faq-toggle i {
  color: var(--darkmode-accent);
}

body.darkmode input,
body.darkmode textarea,
body.darkmode select {
    background-color: var(--primary-color-medium);
    color: var(--darkmode-text-primary);
    border: 1px solid var(--darkmode-border);
}
body.darkmode input::placeholder,
body.darkmode textarea::placeholder {
    color: var(--darkmode-text-secondary);
}
body.darkmode input:focus,
body.darkmode textarea:focus,
body.darkmode select:focus {
    border-color: var(--darkmode-secondary);
    box-shadow: 0 0 0 3px rgba(96, 165, 250, 0.3); /* secondary light alpha */
}
body.darkmode .required {
   color: var(--warning-color); /* More visible required */
}
body.darkmode .checkbox-group label a {
   color: var(--darkmode-secondary);
}
body.darkmode .form-feedback.success {
    background-color: rgba(16, 185, 129, 0.1); /* success alpha */
    color: var(--success-color);
    border-color: var(--success-color);
}
body.darkmode .form-feedback.error {
    background-color: rgba(239, 68, 68, 0.1); /* error alpha */
    color: var(--error-color);
    border-color: var(--error-color);
}
body.darkmode .form-notice {
   color: var(--darkmode-text-secondary);
}
body.darkmode .error-message {
    color: var(--error-color);
}


/* Darkmode Toggle Switch Styles (Inside Nav & Mobile Menu) */
.darkmode-toggle-container {
  display: flex;
  align-items: center;
  margin-left: 1rem; /* Default spacing in desktop nav */
}

.darkmode-label {
  background-color: var(--primary-color-light); /* Dark bg for light mode */
  border-radius: 50px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 5px;
  position: relative;
  height: 26px;
  width: 50px;
  transition: background-color 0.3s ease;
  vertical-align: middle; /* Align with text links */
}

.darkmode-label .ball {
  background-color: var(--bg-light);
  border-radius: 50%;
  position: absolute;
  top: 2px;
  left: 2px;
  height: 22px;
  width: 22px;
  transform: translateX(0px);
  transition: transform 0.2s linear;
}

.darkmode-toggle:checked + .darkmode-label .ball {
  transform: translateX(24px);
}

.darkmode-label .fa-moon {
  color: var(--secondary-color-light);
  font-size: 0.8em;
  margin: 0 2px;
}

.darkmode-label .fa-sun {
  color: var(--warning-color);
   font-size: 0.8em;
   margin: 0 2px;
}

.darkmode-toggle {
  opacity: 0;
  position: absolute;
  width: 1px;
  height: 1px;
}


/* Progress Bar */
.progress-container {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 4px;
  z-index: 1002; /* Above header blur */
  background-color: transparent;
}

.progress-bar {
  height: 100%;
  background: var(--gradient);
  width: 0%;
  transition: width 0.1s linear;
  border-radius: 0 2px 2px 0;
}

/* Typography */
h1, h2, h3, h4, h5, h6 {
  font-family: 'Montserrat', sans-serif;
  margin-bottom: 1rem;
  color: var(--primary-color-dark);
  font-weight: 700;
  line-height: 1.3;
}
h1 { font-size: clamp(2.2rem, 5vw, 3.2rem); }
h2 { font-size: clamp(1.8rem, 4vw, 2.4rem); }
h3 { font-size: clamp(1.3rem, 3vw, 1.6rem); }
h4 { font-size: clamp(1.1rem, 2.5vw, 1.3rem); }


p {
  margin-bottom: 1.2rem;
  font-size: 1rem;
  color: var(--text-color-medium);
}

a {
  color: var(--secondary-color);
  text-decoration: none;
  transition: var(--transition);
}
a:hover {
  color: var(--secondary-color-dark);
  text-decoration: underline;
}

.section-title {
  text-align: center;
  margin-bottom: 3rem;
  position: relative;
}
.section-title::after {
  content: '';
  display: block;
  width: 60px;
  height: 4px;
  background: var(--gradient); /* Use gradient */
  margin: 1rem auto 0;
  border-radius: 2px;
}
.section-intro {
  text-align: center;
  max-width: 750px;
  margin: -1.5rem auto 3.5rem auto;
  font-size: 1.1rem;
  color: var(--text-color-light);
}

.surface-muted {
  background: linear-gradient(180deg, rgba(240, 242, 255, 0.9) 0%, rgba(246, 248, 255, 0.65) 100%);
}

body.darkmode .surface-muted {
  background: linear-gradient(180deg, rgba(9, 12, 28, 0.9) 0%, rgba(16, 21, 45, 0.75) 100%);
}

.glass-panel {
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.9) 0%, rgba(240, 247, 255, 0.6) 100%);
  border: 1px solid var(--border-color);
  backdrop-filter: var(--panel-blur);
  -webkit-backdrop-filter: var(--panel-blur);
  border-radius: var(--radius-lg);
  box-shadow: var(--panel-shadow);
}

body.darkmode .glass-panel {
  background: linear-gradient(135deg, rgba(9, 16, 32, 0.88) 0%, rgba(6, 14, 28, 0.72) 100%);
  border-color: rgba(40, 137, 255, 0.28);
  box-shadow: 0 25px 45px -25px rgba(1, 9, 22, 0.85);
}

/* Header */
header {
  position: fixed;
  inset: 0 0 auto;
  height: var(--header-height);
  display: flex;
  align-items: center;
  padding: 0 2rem;
  background: rgba(244, 248, 255, 0.78);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
  border-bottom: 1px solid var(--border-color);
  box-shadow: var(--shadow-soft);
  transition: var(--transition-base);
  z-index: 1000;
}
header.scrolled {
  height: var(--header-height-scrolled);
  background: rgba(235, 242, 250, 0.94);
  border-bottom-color: var(--border-color-strong);
  box-shadow: 0 18px 35px -24px rgba(12, 28, 52, 0.38);
}

header nav {
  display: flex;
  justify-content: space-between;
  align-items: center;
  width: 100%;
  max-width: 1400px;
  margin: 0 auto;
}

.nav-logo {
  font-family: 'Space Grotesk', 'Montserrat', sans-serif;
  font-weight: 700;
  font-size: 1.45rem;
  letter-spacing: 0.02em;
  color: var(--neutral-900);
  text-decoration: none;
  position: relative;
  z-index: 1005;
}
.nav-logo span {
  display: inline-block;
  background: var(--gradient-primary);
  -webkit-background-clip: text;
  color: transparent;
}
.nav-logo:hover {
  text-decoration: none;
  color: var(--primary-600);
}

header nav ul { /* DESKTOP Navigation List */
  display: flex;
  list-style: none;
  align-items: center;
}

header nav ul li {
  margin: 0;
  padding: 0 1rem;
  display: flex;
  align-items: center;
}

header nav ul li a {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.35rem 0;
  font-size: 0.95rem;
  font-weight: 500;
  letter-spacing: 0.02em;
  color: var(--text-secondary);
  text-decoration: none;
  transition: var(--transition-base);
}

header nav ul li a::after {
  content: '';
  position: absolute;
  inset: auto 0 -0.35rem;
  height: 2px;
  background: var(--gradient-primary);
  border-radius: 999px;
  transform: scaleX(0);
  transform-origin: center;
  transition: transform 0.35s cubic-bezier(0.4, 0, 0, 1);
}

header nav ul li a:hover,
header nav ul li a:focus-visible,
header nav ul li a.active {
  color: var(--primary-600);
}

header nav ul li a:hover::after,
header nav ul li a:focus-visible::after,
header nav ul li a.active::after {
  transform: scaleX(1);
}

header nav ul li:has(.darkmode-toggle-container) {
    padding-right: 0;
}


/* --- MOBILE MENU STYLES --- */
.mobile-menu-toggle {
    display: none; /* Hidden by default */
    background: none;
    border: none;
    font-size: 1.6rem; /* Adjust size */
    cursor: pointer;
    color: var(--text-primary);
    padding: 0.5rem; /* Add some padding for easier clicking */
    z-index: 1005; /* Above mobile menu */
    position: relative; /* Needed for z-index */
}

.mobile-menu {
    display: flex; /* Use flex for content alignment */
    flex-direction: column;
    position: fixed;
    top: 0;
    right: 0;
    width: 300px; /* Adjust width as needed */
    max-width: 80%;
    height: 100vh;
    background: rgba(242, 247, 255, 0.88);
    backdrop-filter: blur(18px);
    -webkit-backdrop-filter: blur(18px);
    border-left: 1px solid var(--border-color);
    box-shadow: -18px 0 40px -28px rgba(12, 28, 52, 0.52);
    transform: translateX(100%); /* Initially off-screen */
    transition: transform 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    z-index: 1004; /* Below toggle button and logo */
    padding-top: calc(var(--header-height) + 1rem); /* Space for header */
    overflow-y: auto; /* Allow scrolling if content is long */
    padding-top: calc(var(--header-height-scrolled) + 1.5rem);
}

.mobile-menu.active {
    transform: translateX(0);
}

.mobile-menu ul {
    list-style: none;
    padding: 1rem 0;
    margin: 0;
    width: 100%;
}

.mobile-menu ul li {
    width: 100%;
    border-bottom: 1px solid rgba(32, 138, 255, 0.2);
}
body.darkmode .mobile-menu {
    background: rgba(9, 12, 28, 0.82);
    border-left-color: rgba(40, 137, 255, 0.3);
    box-shadow: -18px 0 40px -24px rgba(1, 9, 22, 0.85);
}
body.darkmode .mobile-menu ul li {
     border-bottom-color: rgba(40, 137, 255, 0.22);
}

.mobile-menu ul li:last-child {
    border-bottom: none;
}
.mobile-menu ul li:has(.darkmode-toggle-container) {
    padding: 1rem 1.5rem; /* Specific padding for toggle container */
    display: flex;
    justify-content: space-between; /* Align toggle label and switch */
    align-items: center;
}
.mobile-menu ul li:has(.darkmode-toggle-container) span { /* Style potential label */
    font-weight: 500;
    color: var(--text-color-medium);
}
body.darkmode .mobile-menu ul li:has(.darkmode-toggle-container) span {
     color: var(--darkmode-text-secondary);
}


.mobile-menu ul li a {
    display: block;
    padding: 1rem 1.5rem;
    color: var(--text-primary);
    text-decoration: none;
    font-size: 1.1rem;
    font-weight: 500;
    transition: background-color 0.2s ease, color 0.2s ease;
}

.mobile-menu ul li a:hover,
.mobile-menu ul li a.active {
    background-color: rgba(10, 132, 255, 0.12);
    color: var(--primary-600);
}

body.darkmode .mobile-menu ul li a {
    color: var(--darkmode-text-primary);
}
body.darkmode .mobile-menu ul li a:hover,
body.darkmode .mobile-menu ul li a.active {
    background-color: rgba(16, 110, 255, 0.28);
    color: var(--darkmode-accent);
}

/* Mobile Toggle Icon Change (handled by JS adding class 'active') */
.mobile-menu-toggle i {
    transition: transform 0.3s ease;
}
/* No specific style needed for active state if JS swaps the class directly */

/* Close Button Styles */
.mobile-menu-close {
  position: absolute;
  top: 1rem; /* Adjust position as needed */
  right: 1.5rem; /* Adjust position as needed */
  background: none;
  border: none;
  font-size: 1.8rem; /* Make it easily clickable */
  color: var(--text-color-medium);
  cursor: pointer;
  padding: 0.5rem; /* Click area */
  line-height: 1;
  transition: color 0.2s ease, transform 0.2s ease;
}

.mobile-menu-close:hover {
  color: var(--secondary-color);
  transform: rotate(90deg); /* Optional: rotate effect on hover */
}

body.darkmode .mobile-menu-close {
  color: var(--darkmode-text-secondary);
}
body.darkmode .mobile-menu-close:hover {
  color: var(--darkmode-secondary);
}



/* --- END MOBILE MENU STYLES --- */


/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.55rem;
  padding: 0.85rem 1.9rem;
  border-radius: 999px;
  border: 1px solid transparent;
  font-weight: 600;
  font-size: 0.95rem;
  text-decoration: none;
  transition: var(--transition-base);
  cursor: pointer;
  letter-spacing: 0.01em;
}

.btn i {
  font-size: 1rem;
}

.primary-btn {
  background: var(--gradient-primary);
  color: #ffffff;
  box-shadow: 0 22px 40px -22px rgba(10, 132, 255, 0.45);
}

.primary-btn:hover,
.primary-btn:focus-visible {
  transform: translateY(-2px);
  box-shadow: 0 26px 46px -24px rgba(10, 132, 255, 0.55);
  filter: brightness(1.05);
}

.secondary-btn {
  background: rgba(10, 132, 255, 0.12);
  color: var(--primary-600);
  border-color: rgba(10, 132, 255, 0.32);
}

.secondary-btn:hover,
.secondary-btn:focus-visible {
  background: rgba(10, 132, 255, 0.2);
  box-shadow: 0 20px 42px -22px rgba(10, 132, 255, 0.32);
}

/* Hero Section */
#hero {
  position: relative;
  margin-top: calc(-1 * var(--header-height));
  padding: calc(var(--section-space) + var(--header-height)) clamp(1.5rem, 4vw, 3rem) var(--section-space);
  overflow: hidden;
  background: linear-gradient(180deg, rgba(243, 246, 255, 0.94) 0%, rgba(255, 255, 255, 0.6) 60%), var(--gradient-surface);
}

#hero::before,
#hero::after {
  content: '';
  position: absolute;
  border-radius: 50%;
  filter: blur(0);
  z-index: 0;
}

#hero::before {
  width: 540px;
  height: 540px;
  background: radial-gradient(circle, rgba(10, 132, 255, 0.2) 0%, transparent 65%);
  top: -220px;
  left: -120px;
}

#hero::after {
  width: 420px;
  height: 420px;
  background: radial-gradient(circle, rgba(44, 212, 200, 0.22) 0%, transparent 60%);
  bottom: -140px;
  right: -80px;
}

.hero-shell {
  position: relative;
  z-index: 1;
  max-width: var(--layout-wide);
  margin: 0 auto;
}

.hero-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: clamp(2rem, 4vw, 4rem);
  align-items: center;
}

.hero-copy {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.hero-copy h1 {
  font-size: clamp(3rem, 6vw, 4.8rem);
  font-weight: 800;
  line-height: 1.1;
  letter-spacing: -0.02em;
  color: var(--text-primary);
}

.hero-copy h1 span {
  color: transparent;
  background: var(--gradient-primary);
  -webkit-background-clip: text;
}

.hero-lead {
  font-size: clamp(1.05rem, 2.3vw, 1.35rem);
  line-height: 1.7;
  color: var(--text-secondary);
  max-width: 540px;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  align-items: center;
}

.hero-trust {
  display: flex;
  flex-wrap: wrap;
  gap: 1.2rem;
  align-items: center;
  margin-top: 1rem;
}

.hero-trust .trust-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  padding: 0.55rem 1.1rem;
  border-radius: 999px;
  background: rgba(15, 23, 42, 0.05);
  color: var(--text-secondary);
  font-weight: 500;
  font-size: 0.9rem;
}

.hero-trust .trust-badge i {
  color: var(--primary-600);
}

.hero-trust .trust-counter {
  display: flex;
  align-items: baseline;
  gap: 0.45rem;
  font-weight: 600;
  font-size: 0.95rem;
  color: var(--text-secondary);
}

.hero-trust .trust-counter strong {
  font-size: 1.7rem;
  font-weight: 700;
  color: var(--primary-600);
}

.hero-visual {
  position: relative;
  min-height: 420px;
  display: grid;
  place-items: center;
}

.hero-visual .orbit {
  position: relative;
  width: clamp(320px, 38vw, 420px);
  aspect-ratio: 1;
  border-radius: 50%;
  background: radial-gradient(circle at 30% 30%, rgba(255, 255, 255, 0.8), rgba(240, 242, 255, 0.2));
  border: 1px solid rgba(32, 138, 255, 0.28);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  box-shadow: 0 30px 60px -35px rgba(12, 28, 52, 0.55);
}

.hero-visual .orbit::before,
.hero-visual .orbit::after {
  content: '';
  position: absolute;
  border-radius: 50%;
  border: 1px solid rgba(32, 138, 255, 0.35);
  inset: 18%;
}

.hero-visual .orbit::after {
  inset: 34%;
  border-color: rgba(44, 212, 200, 0.32);
}

.hero-visual .floating-card {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 68%;
  padding: 1.75rem;
  border-radius: var(--radius-lg);
  background: linear-gradient(150deg, rgba(255, 255, 255, 0.92) 0%, rgba(233, 242, 255, 0.62) 100%);
  border: 1px solid rgba(32, 138, 255, 0.26);
  box-shadow: 0 24px 40px -24px rgba(12, 28, 52, 0.45);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.hero-visual .floating-card h3 {
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 0.25rem;
}

.hero-visual .floating-card p {
  color: var(--text-secondary);
  font-size: 0.95rem;
  line-height: 1.6;
}

.hero-visual .status-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  padding: 0.4rem 0.85rem;
  border-radius: 999px;
  background: rgba(44, 212, 200, 0.16);
  color: var(--accent-600);
  font-size: 0.85rem;
  font-weight: 600;
  width: fit-content;
}

.hero-visual .data-strip {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.hero-visual .data-strip span {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.9rem;
  color: var(--text-secondary);
}

.hero-visual .data-strip span i {
  color: var(--primary-600);
}

.hero-highlights {
  margin-top: clamp(2rem, 5vw, 3rem);
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 1.2rem;
}

.hero-highlights .highlight-card {
  border-radius: var(--radius-md);
  padding: 1.25rem;
  background: linear-gradient(145deg, rgba(255, 255, 255, 0.92) 0%, rgba(235, 243, 255, 0.6) 100%);
  border: 1px solid rgba(32, 138, 255, 0.22);
  box-shadow: 0 20px 40px -30px rgba(12, 28, 52, 0.48);
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
}

.hero-highlights .highlight-card strong {
  font-size: 1.2rem;
  color: var(--text-primary);
}

.hero-highlights .highlight-card span {
  font-size: 0.9rem;
  color: var(--text-secondary);
}

body.darkmode #hero {
  background: linear-gradient(180deg, rgba(2, 11, 24, 0.94) 0%, rgba(6, 20, 38, 0.94) 55%), radial-gradient(circle at 18% -10%, rgba(16, 123, 255, 0.32), transparent 60%), radial-gradient(circle at 88% 25%, rgba(44, 212, 200, 0.2), transparent 62%);
}

body.darkmode .hero-trust .trust-badge {
  background: rgba(255, 255, 255, 0.04);
  color: var(--darkmode-text-secondary);
}

body.darkmode .hero-visual .floating-card {
  background: linear-gradient(150deg, rgba(9, 17, 34, 0.88) 0%, rgba(6, 14, 28, 0.72) 100%);
  border-color: rgba(32, 138, 255, 0.32);
  color: var(--darkmode-text-primary);
}

body.darkmode .hero-visual .floating-card p,
body.darkmode .hero-visual .data-strip span {
  color: var(--darkmode-text-secondary);
}

body.darkmode .hero-highlights .highlight-card {
  background: linear-gradient(145deg, rgba(8, 15, 32, 0.85) 0%, rgba(6, 14, 28, 0.72) 100%);
  border-color: rgba(40, 137, 255, 0.28);
  color: var(--darkmode-text-primary);
}


/* General Sections */
section {
  padding: var(--section-space) clamp(1.25rem, 4vw, 2.5rem);
  overflow: hidden;
}

.section-shell {
  max-width: var(--layout-wide);
  margin: 0 auto;
}

.section-header {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  max-width: min(640px, 100%);
  margin: 0 auto 3rem;
  text-align: center;
}

.section-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.35rem 0.85rem;
  border-radius: 999px;
  font-size: 0.85rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  background: rgba(10, 132, 255, 0.14);
  color: var(--primary-600);
}

body.darkmode .section-eyebrow {
  background: rgba(16, 110, 255, 0.24);
  color: var(--darkmode-accent);
}

/* Projects Grid / Featured Services */
.projects-grid,
.projects-gallery,
.feature-grid,
.value-grid {
  display: grid;
  gap: clamp(1.5rem, 3vw, 2.5rem);
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  max-width: var(--layout-wide);
  margin: 0 auto;
}

.project-card,
.value-card {
  position: relative;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  background: linear-gradient(145deg, rgba(255, 255, 255, 0.9) 0%, rgba(238, 245, 255, 0.65) 100%);
  border-radius: var(--radius-lg);
  border: 1px solid rgba(32, 138, 255, 0.22);
  box-shadow: 0 28px 46px -32px rgba(12, 28, 52, 0.52);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  transition: var(--transition-base);
}

body.darkmode .project-card,
body.darkmode .value-card {
  background: linear-gradient(145deg, rgba(10, 16, 34, 0.85) 0%, rgba(6, 14, 28, 0.7) 100%);
  border-color: rgba(40, 137, 255, 0.28);
  box-shadow: 0 28px 55px -28px rgba(1, 9, 22, 0.88);
}

.value-card {
  padding: clamp(1.6rem, 3vw, 2.1rem);
  gap: 0.9rem;
}

.project-card::after,
.value-card::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(140deg, rgba(10, 132, 255, 0.2), rgba(44, 212, 200, 0.12));
  opacity: 0;
  transition: opacity 0.45s ease;
  pointer-events: none;
}

.project-card:hover,
.value-card:hover {
  transform: translateY(-8px);
  box-shadow: 0 34px 64px -30px rgba(10, 132, 255, 0.4);
}

.project-card:hover::after,
.value-card:hover::after {
  opacity: 1;
}

.card-link-wrapper {
  display: flex;
  flex-direction: column;
  height: 100%;
  color: inherit;
  text-decoration: none;
}

.card-image-container {
  width: 100%;
  aspect-ratio: 3 / 2;
  overflow: hidden;
}

.card-image-container img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.6s ease;
}

.project-card:hover .card-image-container img,
.value-card:hover .card-image-container img {
  transform: scale(1.05);
}

.project-info,
.value-card .card-body {
  padding: clamp(1.6rem, 3vw, 2.1rem);
  display: flex;
  flex-direction: column;
  gap: 1rem;
  flex: 1;
}

.project-info h3,
.value-card h3 {
  font-size: clamp(1.25rem, 2vw, 1.45rem);
  font-weight: 700;
  color: var(--text-primary);
  letter-spacing: -0.01em;
  display: flex;
  align-items: center;
  gap: 0.6rem;
}

.project-info h3 i,
.value-card h3 i {
  font-size: 1.3rem;
  color: var(--primary-600);
}

.value-card p {
  color: var(--text-secondary);
  line-height: 1.7;
  font-size: 0.98rem;
}

.project-info p,
.value-card p {
  color: var(--text-secondary);
  font-size: 0.97rem;
  line-height: 1.7;
}

.project-info ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 0.7rem;
}

.project-info ul li {
  position: relative;
  padding: 0.6rem 0.85rem 0.6rem 1.9rem;
  border: 1px solid rgba(32, 138, 255, 0.18);
  border-radius: 0;
  background: rgba(255, 255, 255, 0.82);
  box-shadow: 0 16px 28px -24px rgba(12, 28, 52, 0.32);
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--text-secondary);
  line-height: 1.55;
}

.project-info ul li::before {
  content: '\f105';
  font-family: 'Font Awesome 6 Free';
  font-weight: 900;
  position: absolute;
  left: 0.85rem;
  top: 50%;
  transform: translateY(-50%);
  color: var(--primary-600);
  font-size: 0.85rem;
}

body.darkmode .project-info ul li {
  background: rgba(9, 16, 34, 0.86);
  border-color: rgba(40, 137, 255, 0.28);
  color: var(--darkmode-text-secondary);
  box-shadow: 0 20px 34px -26px rgba(1, 9, 22, 0.68);
}

body.darkmode .project-info ul li::before {
  color: var(--darkmode-accent);
}

.learn-more {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  margin-top: auto;
  font-weight: 600;
  color: var(--secondary-color);
  font-size: 0.9rem;
  transition: color 0.3s ease, transform 0.3s ease;
}
.learn-more i {
  transition: transform 0.3s ease;
  font-size: 0.8em;
}
.card-link-wrapper:hover .learn-more {
  color: var(--secondary-color-dark);
  transform: translateX(4px);
}
.card-link-wrapper:hover .learn-more i {
  transform: translateX(0); /* No extra move needed */
}

.cta-container {
    text-align: center;
    margin-top: 3rem;
}

/* Stats Section */
#stats {
  position: relative;
  background: linear-gradient(180deg, rgba(10, 132, 255, 0.12) 0%, rgba(44, 212, 200, 0.08) 100%);
}

.counter-container {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: clamp(1.25rem, 3vw, 2rem);
  max-width: var(--layout-max);
  margin: 3rem auto 0;
}

.counter-item {
  border-radius: var(--radius-md);
  padding: 1.75rem 1.5rem;
  background: linear-gradient(140deg, rgba(255, 255, 255, 0.9) 0%, rgba(236, 244, 255, 0.62) 100%);
  border: 1px solid rgba(32, 138, 255, 0.2);
  box-shadow: 0 28px 45px -30px rgba(12, 28, 52, 0.4);
  text-align: left;
  display: flex;
  flex-direction: column;
  gap: 0.55rem;
}

.counter-item i {
  font-size: 1.9rem;
  color: var(--primary-600);
}

.counter {
  font-size: 2.6rem;
  font-weight: 700;
  color: var(--text-primary);
  font-family: 'Space Grotesk', 'Inter', sans-serif;
}

.counter-item p {
  font-size: 0.95rem;
  color: var(--text-secondary);
}

body.darkmode .counter-item {
  background: linear-gradient(140deg, rgba(10, 16, 34, 0.84) 0%, rgba(6, 14, 28, 0.72) 100%);
  border-color: rgba(40, 137, 255, 0.28);
  box-shadow: 0 28px 50px -28px rgba(1, 9, 22, 0.85);
}

/* Expertise / Skills */
#expertise {
   padding: 5rem 2rem;
}
.skill-bars-container {
  max-width: 900px;
  margin: 2.5rem auto 0;
  display: flex;
  flex-direction: column;
  gap: 1.8rem;
}

.skill-bar h4 {
  margin-bottom: 0.6rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-weight: 500;
  font-size: 1rem;
  color: var(--text-color-dark);
}
body.darkmode .skill-bar h4 {
    color: var(--darkmode-text-primary);
}
.skill-bar .percentage {
  font-weight: 600;
  color: var(--secondary-color);
  font-size: 0.9em;
  padding: 0.1rem 0.4rem;
  background-color: rgba(59, 130, 246, 0.1);
  border-radius: 4px;
}
body.darkmode .skill-bar .percentage {
   color: var(--darkmode-secondary);
   background-color: rgba(96, 165, 250, 0.1);
}

.skill-container {
  background-color: #E2E8F0; /* Slate 200 */
  height: 10px;
  border-radius: 5px;
  overflow: hidden;
}

.skill-progress {
  height: 100%;
  background: var(--gradient);
  width: 0;
  transition: width 1.5s cubic-bezier(0.25, 0.46, 0.45, 0.94);
  border-radius: 5px;
}

/* About Preview Section */
#about-preview {
    padding: 5rem 2rem;
}
.about-preview-container {
  max-width: 800px;
  margin: 0 auto;
  text-align: center;
}
.about-preview-container .section-title {
   margin-bottom: 1.5rem;
}
.about-preview-container p {
    font-size: 1.05rem;
    color: var(--text-color-medium);
    margin-bottom: 2rem;
}

/* Testimonials */
#testimonials {
    background-color: var(--bg-card-light); /* White background */
}
body.darkmode #testimonials {
    background-color: var(--darkmode-card);
}

.testimonial-slider {
  max-width: 1200px;
  margin: 3rem auto 0;
  position: relative; /* For Swiper navigation */
}

/* Swiper Styles for Testimonials */
.swiper-container {
  width: 100%;
  padding: 1rem 0 3rem 0 !important; /* Space for pagination */
}

.testimonial-item {
  background-color: var(--bg-light); /* Slightly off-white */
  padding: 2rem 2.5rem;
  border-radius: var(--border-radius-lg);
  box-shadow: var(--card-shadow);
  border-left: 5px solid var(--secondary-color);
  position: relative;
  height: auto; /* Let Swiper handle height */
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  border: 1px solid #e2e8f0;
}
.quote-icon {
    position: absolute;
    top: 1.5rem;
    left: 1.5rem;
    font-size: 1.6rem;
    color: var(--secondary-color);
    opacity: 0.3;
}
.testimonial-content p {
  font-style: italic;
  margin-bottom: 1.5rem;
  padding-left: 1.5rem; /* More space */
  color: var(--text-color-medium);
  font-size: 1rem;
}
.testimonial-author {
  text-align: right;
  font-size: 0.9rem;
  margin-top: auto;
  padding-top: 1rem;
  border-top: 1px solid #e2e8f0; /* Separator */
}
body.darkmode .testimonial-author {
    border-top-color: var(--darkmode-border);
}
.testimonial-author strong {
  display: block;
  color: var(--primary-color-dark);
  font-weight: 600;
}
body.darkmode .testimonial-author strong {
   color: var(--darkmode-accent);
}
.testimonial-author span { /* For title/company */
    color: var(--text-color-light);
}
body.darkmode .testimonial-author span {
    color: var(--darkmode-text-secondary);
}


/* Swiper Pagination */
.swiper-pagination-bullet {
  background-color: var(--text-color-light) !important;
  opacity: 0.7 !important;
  width: 10px !important;
  height: 10px !important;
}
.swiper-pagination-bullet-active {
  background-color: var(--secondary-color) !important;
  opacity: 1 !important;
}
body.darkmode .swiper-pagination-bullet {
    background-color: var(--darkmode-text-secondary) !important;
}
body.darkmode .swiper-pagination-bullet-active {
    background-color: var(--darkmode-secondary) !important;
}

/* FAQ Section */
#faq {
    background-color: var(--bg-medium);
}
body.darkmode #faq {
    background-color: var(--darkmode-bg-medium);
}
.faq-container {
  max-width: 850px;
  margin: 3rem auto 0;
}
.faq-item {
  background-color: var(--bg-card-light);
  border-radius: var(--border-radius);
  margin-bottom: 1rem;
  box-shadow: var(--card-shadow);
  overflow: hidden;
  border: 1px solid #e2e8f0;
  transition: var(--transition);
}
.faq-item:hover {
   border-color: var(--secondary-color);
}

.faq-question {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1.25rem 1.5rem; /* Slightly less padding */
  cursor: pointer;
  border-bottom: 1px solid #e2e8f0;
}
.faq-question h3 {
  margin: 0;
  font-size: 1.1rem;
  font-weight: 600;
  color: var(--primary-color-dark);
}
body.darkmode .faq-question h3 {
    color: var(--darkmode-heading);
}
.faq-toggle {
  font-size: 1.1rem;
  transition: transform 0.3s ease;
  color: var(--secondary-color);
  line-height: 1; /* Prevent icon causing extra space */
}
.faq-item.active .faq-toggle {
  transform: rotate(180deg);
}
.faq-item.active .faq-question {
  border-bottom-color: transparent;
}

.faq-answer {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.4s ease-out, padding 0.4s ease-out;
  padding: 0 1.5rem;
  background-color: var(--bg-light); /* Slightly different bg for answer */
}
body.darkmode .faq-answer {
    background-color: var(--darkmode-bg); /* Darker answer bg */
}
.faq-answer p {
  margin: 0;
  font-size: 0.95rem;
  padding-bottom: 1.5rem;
  color: var(--text-color-medium);
}
.faq-item.active .faq-answer {
  max-height: 500px; /* Adjust if needed */
}

/* Footer */
footer {
  background-color: var(--primary-color-medium);
  color: var(--text-on-dark-secondary);
  padding: 4rem 2rem 1.5rem;
  margin-top: auto;
  border-top: 4px solid var(--secondary-color);
}

.footer-container {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
  gap: 2.5rem;
  max-width: 1400px;
  margin: 0 auto 3rem;
}

.footer-column h3 {
  color: var(--text-on-dark-primary);
  font-size: 1.1rem;
  margin-bottom: 1.5rem;
  position: relative;
  font-weight: 600;
}
.footer-column h3::after {
  content: '';
  display: block;
  width: 35px;
  height: 3px;
  background-color: var(--accent-color);
  margin-top: 0.6rem;
  border-radius: 2px;
}

.footer-column p {
  font-size: 0.9rem;
  margin-bottom: 0.8rem;
}
.footer-column a {
   color: var(--text-on-dark-secondary);
   text-decoration: none;
   transition: color 0.3s ease;
}
.footer-column a:hover {
   color: var(--accent-color-light);
   text-decoration: underline;
}

.footer-links ul {
  list-style: none;
  padding: 0;
}
.footer-links li {
  margin-bottom: 0.7rem;
}
.footer-links a {
    display: inline-block; /* Prevent wrapping */
    position: relative;
    padding-left: 1.2rem;
}
.footer-links a::before {
  content: '\f054'; /* FontAwesome right arrow */
  font-family: 'Font Awesome 6 Free';
  font-weight: 900;
  position: absolute;
  left: 0;
  top: 0.1em;
  font-size: 0.8em;
  color: var(--accent-color);
  transition: transform 0.3s ease;
}
.footer-links a:hover::before {
    transform: translateX(3px);
}

.footer-contact p {
    display: flex;
    align-items: flex-start; /* Align icon top */
    gap: 0.7rem;
}
.footer-contact p i {
  color: var(--accent-color);
  margin-top: 0.15rem; /* Align icon better */
  width: 18px;
  text-align: center;
  flex-shrink: 0; /* Prevent icon shrinking */
}

.social-icons {
  display: flex;
  flex-wrap: wrap; /* Allow wrapping on small screens */
  gap: 0.8rem;
  margin-top: 1rem;
}
.social-icons a {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  background-color: rgba(44, 212, 200, 0.14);
  border-radius: 50%;
  color: var(--accent-color);
  font-size: 1rem;
  transition: var(--transition);
}
.social-icons a:hover {
  background-color: var(--accent-color);
  color: var(--primary-color-medium);
  transform: translateY(-3px) scale(1.05);
  text-decoration: none;
}

.footer-bottom {
  border-top: 1px solid var(--primary-color-light);
  padding-top: 1.5rem;
  text-align: center;
  font-size: 0.85rem;
  color: var(--text-on-dark-secondary);
}
.footer-nav a {
  color: var(--text-on-dark-secondary) !important;
  margin: 0 0.8rem;
  opacity: 0.9;
}
.footer-nav a:hover {
  opacity: 1;
  color: var(--accent-color-light) !important;
}

/* Scroll-to-Top Icon */
.scroll-to-top {
  position: fixed;
  bottom: 20px;
  right: 20px;
  background: var(--gradient);
  color: #ffffff;
  width: 42px;
  height: 42px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
  font-size: 1.1rem;
  z-index: 1001;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.3s ease, visibility 0.3s ease, transform 0.3s ease, background 0.3s ease;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.2);
}
.scroll-to-top.visible {
   opacity: 1;
   visibility: visible;
}
.scroll-to-top:hover {
  transform: translateY(-4px) scale(1.05);
  filter: brightness(1.1);
  text-decoration: none;
  color: #ffffff;
}

/* Contact Page Specific Styles */
#contact-page {
    padding: 5rem 2rem;
}
#contact-page .contact-container {
    display: grid; /* Use Grid for layout */
    grid-template-columns: 1fr; /* Default single column */
    gap: 3rem;
    max-width: 1100px;
    margin: 3rem auto 0;
}

@media (min-width: 992px) { /* Apply two columns on larger screens */
    #contact-page .contact-container {
        grid-template-columns: 1fr 1.5fr; /* Ratio for columns */
    }
}

.contact-info-column, .contact-form-column {
    background-color: var(--bg-card-light);
    padding: 2rem 2.5rem;
    border-radius: var(--border-radius-lg);
    box-shadow: var(--card-shadow);
    border: 1px solid #e2e8f0;
}

.contact-info-column h2, .contact-form-column h2 {
   text-align: left;
   margin-bottom: 1.5rem;
}
.contact-info-column h2::after, .contact-form-column h2::after {
   margin: 0.8rem 0 0;
   width: 40px;
   background: var(--gradient);
}

.contact-details {
    list-style: none;
    padding: 0;
    margin: 0;
}
.contact-details li {
    display: flex;
    align-items: flex-start;
    margin-bottom: 1.5rem;
    gap: 1rem;
}
.contact-details li i {
    font-size: 1.4rem;
    margin-top: 0.2rem;
    width: 25px;
    text-align: center;
    flex-shrink: 0;
    background: var(--gradient-text);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}
.contact-details li div {
    font-size: 0.95rem;
}
.contact-details li strong {
    display: block;
    font-weight: 600;
    margin-bottom: 0.2rem;
    color: var(--primary-color-dark);
}
.contact-details li a {
    word-break: break-all; /* Prevent long links overflowing */
}

.contact-socials {
    margin-top: 2.5rem;
    padding-top: 1.5rem;
    border-top: 1px solid #e2e8f0;
}
body.darkmode .contact-socials {
    border-top-color: var(--darkmode-border);
}
.contact-socials h3 {
    font-size: 1.1rem;
    margin-bottom: 1rem;
}
.social-icons-contact .fab {
   font-size: 1.2rem;
}

#contact-form .form-group {
    margin-bottom: 1.5rem;
    position: relative;
}
#contact-form label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 500;
    font-size: 0.9rem;
    color: var(--text-color-dark);
}
body.darkmode #contact-form label {
    color: var(--darkmode-text-primary);
}

body.darkmode #contact-form input[type="text"],
body.darkmode #contact-form input[type="email"],
body.darkmode #contact-form select,
body.darkmode #contact-form textarea {
    border-color: rgba(40, 137, 255, 0.28);
    background: linear-gradient(145deg, rgba(10, 16, 32, 0.92) 0%, rgba(6, 14, 26, 0.72) 100%);
    color: var(--darkmode-text-primary);
    box-shadow: 0 24px 45px -28px rgba(1, 9, 22, 0.72);
}

body.darkmode #contact-form select {
    background: linear-gradient(145deg, rgba(10, 16, 32, 0.92) 0%, rgba(6, 14, 26, 0.72) 100%);
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='10' viewBox='0 0 14 10'%3E%3Cpath fill='%2364d2ff' d='M7 10a1 1 0 0 1-.71-.29l-6-6A1 1 0 0 1 1.41 2.3L7 7.88 12.59 2.3A1 1 0 0 1 14 3.71l-6 6A1 1 0 0 1 7 10Z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 1rem center;
    background-size: 14px 10px;
}

body.darkmode #contact-form select option {
    color: var(--darkmode-text-primary);
    background-color: var(--darkmode-bg);
}

#contact-form input[type="text"],
#contact-form input[type="email"],
#contact-form select,
#contact-form textarea {
    width: 100%;
    padding: 0.75rem 1rem;
    border-radius: var(--border-radius);
    border: 1px solid rgba(32, 138, 255, 0.18);
    font-size: 0.95rem;
    transition: border-color 0.3s, box-shadow 0.3s, background 0.3s;
    background: linear-gradient(145deg, rgba(255, 255, 255, 0.92) 0%, rgba(236, 244, 255, 0.6) 100%);
    color: var(--text-color-dark);
    box-shadow: 0 18px 30px -25px rgba(12, 28, 52, 0.32);
}

#contact-form select {
    -webkit-appearance: none;
    appearance: none;
    padding-right: 3rem;
    cursor: pointer;
    background: linear-gradient(145deg, rgba(255, 255, 255, 0.92) 0%, rgba(236, 244, 255, 0.6) 100%);
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='10' viewBox='0 0 14 10'%3E%3Cpath fill='%231c8fff' d='M7 10a1 1 0 0 1-.71-.29l-6-6A1 1 0 0 1 1.41 2.3L7 7.88 12.59 2.3A1 1 0 0 1 14 3.71l-6 6A1 1 0 0 1 7 10Z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 1rem center;
    background-size: 14px 10px;
}

#contact-form select::-ms-expand {
    display: none;
}

#contact-form select option {
    color: var(--text-color-dark);
}
#contact-form input:focus,
#contact-form select:focus,
#contact-form textarea:focus {
    outline: none;
    border-color: var(--secondary-color);
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.2); /* secondary alpha */
}

.required {
  color: var(--error-color);
  margin-left: 2px;
  font-weight: bold;
}
body.darkmode .required {
    color: var(--warning-color);
}


.checkbox-group {
  display: flex;
  align-items: flex-start;
  gap: 0.7rem;
  margin-bottom: 1.5rem;
}
.checkbox-group input[type="checkbox"] {
  margin-top: 0.3rem;
  width: 1em;
  height: 1em;
  accent-color: var(--secondary-color);
  cursor: pointer;
}
.checkbox-group label {
  font-size: 0.9rem;
  line-height: 1.5;
  margin-bottom: 0;
  cursor: pointer;
  color: var(--text-color-medium);
}
body.darkmode .checkbox-group label {
    color: var(--darkmode-text-secondary);
}
.checkbox-group label a {
  font-weight: 500;
  text-decoration: underline;
}

.error-message {
    color: var(--error-color);
    font-size: 0.85rem;
    margin-top: 0.4rem;
    display: block;
    min-height: 1em;
}
.privacy-error {
   margin-left: calc(1em + 0.7rem); /* Align with label text */
}

.form-feedback {
    border-radius: var(--border-radius);
    padding: 1rem 1.5rem;
    margin-top: 1.5rem;
    font-size: 0.95rem;
    display: none;
    opacity: 0;
    transition: opacity 0.3s ease;
    border: 1px solid transparent;
}
.form-feedback.show {
    display: block;
    opacity: 1;
}
.form-feedback.success {
    background-color: rgba(16, 185, 129, 0.05); /* success alpha */
    color: var(--success-color);
    border-color: rgba(16, 185, 129, 0.3);
}
.form-feedback.error {
    background-color: rgba(239, 68, 68, 0.05); /* error alpha */
    color: var(--error-color);
    border-color: rgba(239, 68, 68, 0.3);
}

.form-notice {
    font-size: 0.85rem;
    color: var(--text-color-light);
    margin-top: 1.5rem;
    text-align: center;
}

input.invalid-field, textarea.invalid-field, select.invalid-field {
    border-color: var(--error-color) !important;
    box-shadow: 0 0 0 1px var(--error-color);
}
input[type="checkbox"].invalid-field {
    outline: 1px solid var(--error-color);
}

/* About Page Specifics */
#about_banner div { /* Target the div wrapper */
  background-size: cover !important; /* Ensure cover */
  background-position: center center !important; /* Ensure center */
  height: 350px;
  border-radius: 0 0 var(--border-radius-lg) var(--border-radius-lg);
}

.about-container {
  max-width: 1100px;
  margin: 3rem auto;
  display: grid;
  grid-template-columns: 1fr; /* Single column default */
  gap: 2rem;
}
@media (min-width: 768px) {
    .about-container {
        grid-template-columns: repeat(2, 1fr); /* Two columns on medium screens */
    }
     /* Span specific cards */
    .about-container .competencies { grid-column: span 2; }
    .about-container .values-grid-container { grid-column: span 2; }
}

.about-card {
  background-color: var(--bg-card-light);
  padding: 2rem 2.5rem;
  border-radius: var(--border-radius-lg);
  box-shadow: var(--card-shadow);
  transition: var(--transition);
  border: 1px solid #e2e8f0;
}
.about-card:hover {
  transform: translateY(-5px);
  box-shadow: var(--card-hover-shadow);
}
.about-card h2 {
  margin-bottom: 1.5rem;
  color: var(--primary-color-dark);
  text-align: left;
  font-size: 1.5rem;
}
.about-card h2::after {
  content: '';
  display: block;
  width: 40px;
  height: 3px;
  background: var(--gradient);
  margin: 0.8rem 0 0;
  border-radius: 2px;
}
.about-card ul {
  list-style: none;
  padding-left: 0;
}
.about-card ul li {
  margin-bottom: 0.8rem;
  position: relative;
  padding-left: 1.8rem;
  font-size: 0.95rem;
  color: var(--text-color-medium);
}
.about-card ul li i { /* If using icons directly */
  position: absolute;
  left: 0;
  top: 0.15em;
  color: var(--secondary-color);
  font-size: 1.1em;
  width: 1.2rem;
  text-align: center;
}
body.darkmode .about-card ul li i {
   color: var(--darkmode-secondary);
}
.about-card.competencies ul { /* Specific styling for competencies list */
    columns: 2; /* Create two columns */
    column-gap: 2rem;
}
@media (max-width: 576px) {
    .about-card.competencies ul { columns: 1; } /* Single column on small screens */
}

.values-grid-container h2 { /* Style the H2 for the values section */
    text-align: center;
    margin-bottom: 2.5rem;
}
.values-grid-container h2::after {
    margin-left: auto;
    margin-right: auto;
}
.values-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 2rem;
    margin-top: 1.5rem;
}
.value-item {
    text-align: center;
    padding: 1rem;
    border: 1px solid #e2e8f0;
    border-radius: var(--border-radius);
    background-color: var(--bg-light);
}
body.darkmode .value-item {
    border-color: var(--darkmode-border);
    background-color: var(--darkmode-bg);
}
.value-item i {
    font-size: 2rem;
    margin-bottom: 0.8rem;
    display: block;
    background: var(--gradient);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}
.value-item h3 {
    font-size: 1.1rem;
    margin-bottom: 0.5rem;
    color: var(--primary-color-dark);
}
body.darkmode .value-item h3 {
    color: var(--darkmode-heading);
}
.value-item p {
    font-size: 0.9rem;
    color: var(--text-color-light);
    margin-bottom: 0;
}
body.darkmode .value-item p {
    color: var(--darkmode-text-secondary);
}

/* Dienstleistungen Page Specifics */
.industry-expertise {
    margin-top: 4rem;
    padding: 4rem 2rem;
    background-color: var(--bg-medium);
    border-radius: var(--border-radius-lg);
}
body.darkmode .industry-expertise {
    background-color: var(--darkmode-bg-medium);
}

.industry-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 2rem;
    max-width: 1200px;
    margin: 2rem auto 0;
}
.industry-item {
    text-align: center;
    padding: 1.5rem;
    background-color: var(--bg-card-light);
    border-radius: var(--border-radius);
    box-shadow: var(--card-shadow);
    border: 1px solid #e2e8f0;
    transition: var(--transition);
}
body.darkmode .industry-item {
    background-color: var(--darkmode-card);
    border-color: var(--darkmode-border);
}
.industry-item:hover {
    transform: translateY(-5px);
    box-shadow: var(--card-hover-shadow);
}
.industry-item i {
    font-size: 2.2rem;
    margin-bottom: 1rem;
    display: block;
    background: var(--gradient);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}
.industry-item h3 {
    font-size: 1.1rem;
    margin-bottom: 0.5rem;
    color: var(--primary-color-dark);
}
body.darkmode .industry-item h3 {
    color: var(--darkmode-heading);
}
.industry-item p {
    font-size: 0.9rem;
    color: var(--text-color-light);
    margin-bottom: 0;
}
body.darkmode .industry-item p {
    color: var(--darkmode-text-secondary);
}

/* Blog Page Specifics */
#blog {
    background-color: transparent; /* Remove extra background */
    box-shadow: none;
    padding: 4rem 2rem; /* Consistent padding */
}
#blog .blog-container {
    max-width: 900px;
    margin: 0 auto; /* Remove top margin */
    display: flex;
    flex-direction: column;
    gap: 2.5rem;
}
.blog-teaser {
    background-color: var(--bg-card-light);
    padding: 2rem;
    border-radius: var(--border-radius-lg);
    box-shadow: var(--card-shadow);
    transition: var(--transition);
    border: 1px solid #e2e8f0;
}
.blog-teaser:hover {
    transform: translateY(-5px);
    box-shadow: var(--card-hover-shadow);
    border-color: var(--secondary-color);
}
.blog-teaser h2 {
    margin-top: 0;
    margin-bottom: 0.5rem;
    font-size: 1.4rem;
}
/* Style link within H2 */
.blog-teaser h2 a {
    color: var(--primary-color-dark);
    text-decoration: none;
}
.blog-teaser h2 a:hover {
    color: var(--secondary-color);
    text-decoration: underline;
}
body.darkmode .blog-teaser h2 a {
    color: var(--darkmode-heading);
}
body.darkmode .blog-teaser h2 a:hover {
    color: var(--darkmode-secondary);
}

.blog-teaser .date {
    font-style: normal; /* Remove italic */
    color: var(--text-color-light);
    font-size: 0.85rem;
    margin-bottom: 1rem;
    display: block;
}
body.darkmode .blog-teaser .date {
   color: var(--darkmode-text-secondary);
}
.blog-teaser p {
    margin-bottom: 1.5rem;
    color: var(--text-color-medium);
}
.blog-teaser .btn {
    margin-top: auto; /* Push button down if content is short */
}

/* Blog Post Specifics */
.container.blog-post-container { /* Added container class for centering */
    max-width: 850px;
    margin-left: auto;
    margin-right: auto;
    padding: 4rem 2rem;
}

.blog-post {
    background: var(--bg-card-light);
    padding: 2.5rem 3rem; /* More padding */
    border-radius: var(--border-radius-lg);
    box-shadow: var(--card-shadow);
    border: 1px solid #e2e8f0;
    margin: 0; /* Remove extra margins */
}
.blog-post h1 {
    margin-bottom: 0.5rem;
    line-height: 1.2;
}
.blog-post .date {
    font-style: normal;
    color: var(--text-color-light);
    font-size: 0.9rem;
    margin-bottom: 2.5rem;
    display: block;
}
body.darkmode .blog-post .date {
   color: var(--darkmode-text-secondary);
}
.blog-post p {
   line-height: 1.75;
   margin-bottom: 1.5rem;
}
.blog-post ul, .blog-post ol {
    margin-bottom: 1.5rem;
    padding-left: 2rem; /* Standard indentation */
    color: var(--text-color-medium);
}
.blog-post li {
    margin-bottom: 0.5rem;
}
.blog-post strong {
    font-weight: 600;
    color: var(--primary-color-dark);
}
body.darkmode .blog-post strong {
    color: var(--darkmode-accent);
}
body.darkmode .blog-post ul,
body.darkmode .blog-post ol {
     color: var(--darkmode-text-primary);
}

.blog-post .back-link {
   display: inline-flex; /* Use flex for icon */
   align-items: center;
   gap: 0.5rem;
   margin-bottom: 2.5rem;
   font-weight: 500;
   color: var(--secondary-color);
}
.blog-post .back-link:hover {
   color: var(--secondary-color-dark);
   text-decoration: none;
}
/* Inherit color */
.blog-post .back-link i {
   font-size: 1.1em;
}

/* Legal Pages (Impressum, Datenschutz) */
.legal-page-container { /* Container for centering */
    max-width: 900px;
    margin: 4rem auto;
    padding: 0 2rem;
}
.legal-content {
    background-color: var(--bg-card-light);
    padding: 2.5rem 3rem;
    border-radius: var(--border-radius-lg);
    box-shadow: var(--card-shadow);
    border: 1px solid #e2e8f0;
}
body.darkmode .legal-content {
    background-color: var(--darkmode-card);
    border-color: var(--darkmode-border);
}

.legal-content h1.section-title {
    margin-bottom: 2.5rem; /* Adjust margin for title */
}
.legal-content h1.section-title::after {
    margin-top: 0.8rem;
}

.legal-section h2,
.privacy-section h2 {
    font-size: 1.4rem;
    margin: 2.5rem 0 1rem;
    padding-bottom: 0.6rem;
    border-bottom: 2px solid var(--secondary-color);
    display: inline-block;
    color: var(--primary-color-dark);
}
.legal-section h2:first-of-type,
.privacy-section h2:first-of-type {
    margin-top: 0; /* Remove top margin for the first heading */
}
body.darkmode .legal-section h2,
body.darkmode .privacy-section h2 {
   border-bottom-color: var(--darkmode-accent);
   color: var(--darkmode-heading);
}
.legal-section h2 i,
.privacy-section h2 i {
    margin-right: 0.7rem;
    color: var(--secondary-color);
}
body.darkmode .legal-section h2 i,
body.darkmode .privacy-section h2 i {
    color: var(--darkmode-accent);
}

.legal-section p,
.privacy-section p,
.legal-section ul,
.privacy-section ul {
    font-size: 0.95rem;
    color: var(--text-color-medium);
    margin-bottom: 1rem;
}
body.darkmode .legal-section p,
body.darkmode .privacy-section p,
body.darkmode .legal-section ul,
body.darkmode .privacy-section ul {
    color: var(--darkmode-text-primary);
}
.legal-section ul,
.privacy-section ul {
    list-style-position: inside;
    padding-left: 0.5rem;
}
.legal-section li,
.privacy-section li {
    margin-bottom: 0.5rem;
}
.legal-section strong,
.privacy-section strong {
    font-weight: 600;
    color: var(--primary-color-dark);
}
body.darkmode .legal-section strong,
body.darkmode .privacy-section strong {
    color: var(--darkmode-accent);
}

.legal-disclaimer {
    font-style: italic;
    font-size: 0.85rem;
    color: var(--text-color-light);
    margin-top: 2.5rem;
    text-align: center;
    padding-top: 1.5rem;
    border-top: 1px dashed #CBD5E1; /* Dashed separator */
}
body.darkmode .legal-disclaimer {
   color: var(--darkmode-text-secondary);
   border-top-color: var(--darkmode-border);
}
.privacy-intro {
    margin-bottom: 2rem;
    font-size: 1.05rem;
    padding-bottom: 1.5rem;
    border-bottom: 1px solid #e2e8f0;
}
body.darkmode .privacy-intro {
    border-bottom-color: var(--darkmode-border);
}

/* Tooltip Adjustments */
.tippy-box {
    border-radius: var(--border-radius) !important;
    font-size: 0.9rem !important;
    line-height: 1.4 !important;
}
.tippy-box[data-theme~='light-border'] {
    background-color: var(--bg-card-light) !important;
    color: var(--text-color-dark) !important;
    border: 1px solid #e2e8f0 !important;
    box-shadow: var(--card-shadow) !important;
}
/* Add dark theme for tippy if needed */
/*
.tippy-box[data-theme~='translucent'] {
    background-color: rgba(30, 41, 59, 0.95) !important;
    backdrop-filter: blur(5px);
    color: var(--darkmode-text-primary) !important;
    border: 1px solid var(--darkmode-border) !important;
    box-shadow: var(--darkmode-shadow) !important;
}
.tippy-arrow {
     color: rgba(30, 41, 59, 0.95) !important;
}
*/

/* Responsive Adjustments */
@media (max-width: 992px) {
    html { font-size: 15px; }
    header nav ul li { padding: 0 0.8rem; } /* Reduce nav spacing */
    .projects-grid, .projects-gallery { grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 1.4rem; }
    .hero-grid {
      grid-template-columns: 1fr;
    }
}

/* Styles applied below the mobile breakpoint */
@media (max-width: 768px) { /* --- CORRECTED BREAKPOINT USAGE --- */
    html { font-size: 14px; }
    body { padding-top: var(--header-height-scrolled); } /* Always use scrolled height */
    header { height: var(--header-height-scrolled); padding: 0 1rem; }
    header.scrolled { height: var(--header-height-scrolled); }

    /* Hide Desktop Nav List */
    header nav ul {
        display: none;
    }

    /* Show Mobile Toggle Button */
    .mobile-menu-toggle {
        display: block; /* Or inline-block/flex if needed */
    }

    section { padding: 2.75rem 1rem; }
    .section-title { margin-bottom: 2rem; }
    .section-intro { margin-bottom: 2.5rem; font-size: 1rem; }

    #hero {
      min-height: min(72vh, 520px);
      padding: calc(2.25rem + var(--header-height-scrolled)) 1.2rem 2.25rem;
  }
   .hero-content-wrapper {
      padding: 1rem;
       /* Disable optional glassmorphism on mobile if it causes issues */
       /* background: none; backdrop-filter: none; border: none; box-shadow: none; */
  }
  #hero h1 {
       font-size: clamp(1.9rem, 5.6vw, 2.45rem);
       margin-bottom: 1rem;
  }
   #hero .subtitle {
       font-size: clamp(0.92rem, 3.6vw, 1.1rem);
       margin-bottom: 1.5rem;
   }
    #hero .btn.primary-btn {
       padding: 0.65rem 1.35rem;
       font-size: 0.9rem;
    }

    .counter-container { grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 0.5rem; }
    .counter { font-size: 2.5rem; }
    .counter-item i { font-size: 2.2rem; }

    .footer-container { grid-template-columns: 1fr; text-align: center; gap: 2rem; }
    .footer-column h3::after { margin: 0.5rem auto 1rem; }
    .social-icons { justify-content: center; }
    .footer-contact p { justify-content: center; }

    .about-container { grid-template-columns: 1fr; }
    .about-card.competencies ul { columns: 1; }

    .blog-post { padding: 2rem 1.5rem; }
    .legal-content { padding: 2rem 1.5rem; }

    #contact-page .contact-container { grid-template-columns: 1fr; } /* Ensure single column */

    .rag-hero {
      grid-template-columns: 1fr;
      gap: 2rem;
    }
    .rag-visual-layout {
      gap: clamp(1.5rem, 5vw, 3rem);
    }
    .rag-meta { grid-template-columns: 1fr; }
    .visual-container {
        flex-direction: column;
        min-height: clamp(380px, 68vh, 580px);
        padding: clamp(0.8rem, 3vw, 1.1rem);
    }
    .canvas-shell {
        flex: 1 1 auto;
        min-width: 100%;
        min-height: clamp(260px, 55vh, 420px);
    }
    #rag-scene {
        height: clamp(260px, 55vh, 420px);
        min-height: auto;
    }
    .canvas-step-panel {
        width: 100%;
        max-height: none;
        background: rgba(7, 14, 28, 0.92);
        border-radius: clamp(0.9rem, 3vw, 1.2rem);
        margin-top: 1.1rem;
        box-shadow: 0 18px 32px -24px rgba(3, 7, 18, 0.62);
    }
    .canvas-step-content {
        flex-direction: column;
        gap: 0.7rem;
    }
    .canvas-step-list {
        flex-direction: column;
        gap: 0.5rem;
    }
    .step-item {
        flex: 1 1 100%;
        justify-content: flex-start;
        border-radius: 0.65rem;
        transform: none;
        padding: 0.6rem 1rem;
    }
    .step-item.active {
        transform: translateY(-2px);
    }
    .canvas-step-detail {
        padding: 0.25rem 0;
    }
}


@media (max-width: 480px) {
    .projects-grid, .projects-gallery { grid-template-columns: 1fr; }
    .btn { padding: 0.7rem 1.5rem; font-size: 0.9rem; }
    .footer-container { gap: 1.5rem; }
    .testimonial-item { padding: 1.5rem; }
    .quote-icon { top: 1rem; left: 1rem; }
    .testimonial-content p { padding-left: 1rem; font-size: 0.95rem; }
    .faq-item { margin-bottom: 0.8rem; }
    .faq-question { padding: 1rem 1.25rem; }
    .faq-question h3 { font-size: 1rem; }
    .faq-answer { padding: 0 1.25rem; }
    .faq-answer p { padding-bottom: 1.25rem; font-size: 0.9rem; }
    .blog-post { padding: 1.5rem 1rem; }
    .legal-content { padding: 1.5rem 1rem; }
    .skill-bars-container { gap: 1.5rem; }
    .skill-bar h4 { flex-direction: column; align-items: flex-start; gap: 0.3rem; }
    .skill-bar .percentage { align-self: flex-start; }
    .rag-meta { gap: 1rem; }
    .visual-container {
        padding: clamp(0.7rem, 5vw, 0.95rem);
        min-height: clamp(320px, 64vh, 480px);
    }
    .canvas-shell {
        min-height: clamp(240px, 50vh, 360px);
    }
    #rag-scene {
        height: clamp(240px, 50vh, 360px);
    }
    .canvas-step-panel {
        padding: clamp(0.75rem, 4vw, 1rem);
        gap: 0.75rem;
    }
    .canvas-step-list { gap: 0.4rem; }
    .step-item { padding: 0.58rem 0.9rem; }
    .canvas-step-detail h4 { font-size: 0.92rem; }
    .canvas-step-detail p { font-size: 0.8rem; }
    #hero {
      min-height: calc(80vh - var(--header-height-scrolled));
   }
   #hero h1 {
      font-size: clamp(2rem, 9vw, 2.8rem);
   }
    #hero .subtitle {
       font-size: 0.95rem;
   }
}

/* =========================== */
/* Cookie Consent Banner Styles */
/* =========================== */

.cookie-consent-banner {
  position: fixed;
  bottom: 0;
  left: 0;
  width: 100%;
  background-color: var(--primary-color-medium); /* Darker background */
  color: var(--text-on-dark-primary);
  padding: 1.5rem 2rem;
  box-shadow: 0 -4px 15px rgba(0, 0, 0, 0.15);
  z-index: 1010; /* High z-index */
  display: flex;
  flex-wrap: wrap; /* Allow wrapping on small screens */
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  transform: translateY(100%); /* Initially hidden below */
  transition: transform 0.5s ease-in-out;
  border-top: 1px solid var(--primary-color-light);
}

.cookie-consent-banner.show {
  transform: translateY(0); /* Slide in */
}

.cookie-consent-banner p {
  margin: 0;
  font-size: 0.9rem;
  line-height: 1.5;
  flex-grow: 1; /* Allow text to take available space */
  max-width: calc(100% - 250px); /* Prevent text pushing buttons too far */
}

.cookie-consent-banner a {
  color: var(--accent-color-light); /* Make link stand out */
  text-decoration: underline;
  font-weight: 500;
}

.cookie-consent-banner a:hover {
  color: #ffffff;
}

.cookie-consent-buttons {
  display: flex;
  gap: 1rem;
  flex-shrink: 0; /* Prevent buttons from shrinking */
}

.cookie-consent-buttons .btn-small {
  padding: 0.5rem 1.2rem; /* Smaller buttons */
  font-size: 0.85rem;
}

/* Dark Mode adjustments for banner */
body.darkmode .cookie-consent-banner {
  background-color: var(--darkmode-bg-medium);
  color: var(--darkmode-text-primary);
  border-top-color: var(--darkmode-border);
}

body.darkmode .cookie-consent-banner a {
  color: var(--darkmode-accent);
}
body.darkmode .cookie-consent-banner a:hover {
  color: #ffffff;
}

/* Responsive adjustments for banner */
@media (max-width: 768px) {
  .cookie-consent-banner {
      flex-direction: column;
      align-items: flex-start; /* Align items left */
      padding: 1rem 1.5rem;
  }
  .cookie-consent-banner p {
      max-width: 100%;
      margin-bottom: 1rem;
  }
  .cookie-consent-buttons {
      width: 100%;
      justify-content: flex-end; /* Align buttons right */
  }
}

@media (max-width: 480px) {
  .cookie-consent-buttons {
      justify-content: space-between; /* Space out buttons */
  }
   .cookie-consent-buttons .btn {
      flex-grow: 1; /* Make buttons take equal space */
      text-align: center;
   }
}

/* =========================== */
/* End Cookie Consent Styles  */
/* =========================== */
.approach-grid {
  display: grid;
  gap: clamp(1.5rem, 3vw, 2.5rem);
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  max-width: var(--layout-wide);
  margin: 0 auto;
}

.step-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.4rem 0.9rem;
  border-radius: 999px;
  background: rgba(10, 132, 255, 0.14);
  color: var(--primary-600);
  font-weight: 600;
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

body.darkmode .step-pill {
  background: rgba(16, 110, 255, 0.28);
  color: var(--darkmode-text-primary);
}

.cta-inner {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
  padding: clamp(2rem, 4vw, 3rem);
  align-items: flex-start;
}

.cta-inner h2 {
  font-size: clamp(1.9rem, 3.8vw, 2.4rem);
  line-height: 1.2;
  color: var(--text-primary);
}

.cta-inner p {
  color: var(--text-secondary);
  max-width: 640px;
}

body.darkmode .cta-inner h2 {
  color: var(--darkmode-heading);
}

body.darkmode .cta-inner p {
  color: var(--darkmode-text-secondary);
}

/* RAG Experience */
.rag-hero {
  display: grid;
  grid-template-columns: minmax(0, 2fr) minmax(0, 1fr);
  gap: clamp(1.5rem, 4vw, 3.5rem);
  align-items: flex-start;
  padding-top: var(--section-space);
}

.rag-hero h1 {
  font-size: clamp(2.4rem, 5vw, 3.4rem);
  line-height: 1.15;
  margin-bottom: 1.25rem;
}

.rag-meta {
  display: grid;
  gap: 1.25rem;
}

.meta-card {
  background: rgba(255, 255, 255, 0.82);
  border-radius: var(--radius-md);
  padding: 1.5rem;
  border: 1px solid rgba(32, 138, 255, 0.2);
  box-shadow: 0 20px 40px -28px rgba(15, 23, 42, 0.4);
}

.meta-card h3 {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  font-size: 1.1rem;
  margin-bottom: 0.75rem;
}

.meta-card h3 i {
  color: var(--primary-600);
}

.meta-card p {
  color: var(--text-secondary);
  line-height: 1.6;
}

.rag-hero-copy {
  display: flex;
  flex-direction: column;
  gap: 1.2rem;
}

.rag-visual-section {
  padding-top: clamp(2rem, 4vw, 3rem);
}



.visual-container {
  display: flex;
  gap: clamp(1.2rem, 3vw, 2rem);
  align-items: stretch;
  padding: clamp(1rem, 2vw, 1.4rem);
  border-radius: var(--radius-lg);
  min-height: clamp(520px, 72vh, 880px);
  width: 100%;
  background: inherit;
}

.visual-container.expanded {
  min-height: clamp(560px, 78vh, 940px);
}

.canvas-shell {
  flex: 1 1 60%;
  min-width: clamp(320px, 58vw, 720px);
  display: flex;
  align-items: stretch;
  justify-content: center;
}

#rag-scene {
  width: 100%;
  flex: 1;
  height: 100%;
  min-height: clamp(600px, 82vh, 980px);
  display: block;
  border-radius: var(--radius-md);
}

.canvas-step-panel {
  flex: 1 1 40%;
  min-width: clamp(240px, 36vw, 440px);
  display: flex;
  flex-direction: column;
  gap: 1rem;
  padding: clamp(1rem, 2.5vw, 1.5rem);
  border-radius: clamp(0.9rem, 2vw, 1.2rem);
  background: rgba(6, 12, 28, 0.72);
  border: 1px solid rgba(40, 137, 255, 0.28);
  backdrop-filter: blur(18px);
  box-shadow: 0 22px 48px -28px rgba(3, 7, 18, 0.68);
  overflow-y: auto;
}

.rag-visual-layout {
  display: flex;
  flex-direction: column;
  align-items: stretch;
}

.canvas-step-header {
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
}

.canvas-step-eyebrow {
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: rgba(200, 212, 240, 0.8);
  font-weight: 600;
}

.canvas-step-header p {
  font-size: 0.85rem;
  color: rgba(223, 230, 245, 0.78);
  line-height: 1.5;
}

.canvas-step-content {
  display: flex;
  gap: 1.1rem;
  flex: 1;
  min-height: 0;
}

.canvas-step-list {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  flex: 0 0 44%;
  min-width: 0;
}

.step-item {
  display: inline-flex;
  align-items: center;
  gap: 0.65rem;
  width: 100%;
  padding: 0.65rem 0.9rem;
  border-radius: clamp(0.55rem, 1.2vw, 0.75rem);
  border: 1px solid rgba(100, 210, 255, 0.18);
  background: rgba(26, 40, 68, 0.72);
  color: rgba(231, 236, 248, 0.88);
  font-size: 0.85rem;
  font-weight: 600;
  letter-spacing: 0.01em;
  cursor: pointer;
  transition: background 0.25s ease, border-color 0.25s ease, transform 0.2s ease;
  justify-content: flex-start;
  text-align: left;
}

.step-index {
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 1.6rem;
}

.step-label {
  flex: 1;
  display: block;
  line-height: 1.4;
}

.step-item:hover,
.step-item:focus-visible {
  border-color: rgba(100, 210, 255, 0.4);
  background: rgba(31, 54, 92, 0.82);
  outline: none;
}

.step-item.active {
  border-color: rgba(10, 132, 255, 0.65);
  background: linear-gradient(135deg, rgba(26, 52, 104, 0.92) 0%, rgba(18, 89, 142, 0.88) 100%);
  color: #f4f7fb;
  transform: translateX(4px);
}

.canvas-step-detail {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  padding: 0.35rem 0.25rem 0.35rem 0.85rem;
}

.canvas-step-detail h4 {
  font-size: clamp(1rem, 1.8vw, 1.2rem);
  color: #f4f7fb;
  margin: 0;
}

.canvas-step-detail p {
  font-size: 0.9rem;
  line-height: 1.55;
  color: rgba(226, 232, 245, 0.82);
  margin: 0;
}

.interaction-hint {
  text-align: center;
  margin-top: 1.5rem;
  color: var(--text-secondary);
  font-size: 0.95rem;
}

body.darkmode .interaction-hint {
  color: var(--darkmode-text-secondary);
}

.rag-next-steps {
  padding: clamp(4rem, 8vw, 6rem) clamp(1.5rem, 5vw, 3rem);
  background: linear-gradient(180deg, rgba(243, 246, 255, 0.9) 0%, rgba(233, 239, 249, 0.85) 80%);
}

.next-steps-card {
  display: grid;
  grid-template-columns: minmax(0, 1.4fr) minmax(0, 0.8fr);
  gap: clamp(2rem, 4vw, 3rem);
  padding: clamp(2.5rem, 5vw, 3.2rem);
  background: linear-gradient(145deg, rgba(255, 255, 255, 0.9) 0%, rgba(235, 242, 255, 0.68) 100%);
  border: 1px solid rgba(32, 138, 255, 0.22);
}

.next-steps-content > p {
  max-width: 520px;
}

.next-steps-list {
  list-style: none;
  margin: 1.6rem 0 2rem;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 0.9rem;
}

.next-steps-list li {
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
  font-size: 0.95rem;
  color: var(--text-secondary);
}

.next-steps-list li i {
  color: var(--primary-600);
  margin-top: 0.15rem;
}

.next-steps-meta {
  display: grid;
  gap: 1rem;
  align-content: start;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
}

.meta-badge {
  padding: 1.4rem 1.6rem;
  border-radius: var(--radius-md);
  background: rgba(10, 132, 255, 0.1);
  border: 1px solid rgba(10, 132, 255, 0.28);
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
  box-shadow: 0 22px 40px -28px rgba(12, 28, 52, 0.35);
}

.meta-badge span {
  font-size: 1.9rem;
  font-weight: 700;
  color: var(--primary-600);
}

.meta-badge p {
  margin: 0;
  font-size: 0.9rem;
  color: var(--text-secondary);
}

body.darkmode .meta-card {
  background: rgba(12, 16, 36, 0.82);
  border-color: rgba(40, 137, 255, 0.28);
  box-shadow: 0 24px 52px -32px rgba(1, 9, 22, 0.86);
}

body.darkmode .meta-card p {
  color: var(--darkmode-text-secondary);
}

body.darkmode .interaction-hint {
  color: var(--darkmode-text-secondary);
}

body.darkmode .rag-hero h1,
body.darkmode .rag-next-steps h2 {
  color: var(--darkmode-heading);
}

body.darkmode .next-steps-card {
  background: linear-gradient(145deg, rgba(8, 15, 32, 0.86) 0%, rgba(6, 14, 28, 0.7) 100%);
  border-color: rgba(40, 137, 255, 0.28);
}

body.darkmode .next-steps-list li {
  color: var(--darkmode-text-secondary);
}

body.darkmode .next-steps-list li i {
  color: var(--darkmode-accent);
}

body.darkmode .meta-badge {
  background: rgba(5, 16, 34, 0.82);
  border-color: rgba(40, 137, 255, 0.32);
  box-shadow: 0 24px 45px -26px rgba(1, 9, 22, 0.75);
}

body.darkmode .meta-badge span {
  color: var(--darkmode-accent);
}

body.darkmode .meta-badge p {
  color: var(--darkmode-text-secondary);
}

body.darkmode .rag-next-steps {
  background: linear-gradient(180deg, rgba(2, 11, 24, 0.9) 0%, rgba(6, 18, 36, 0.88) 80%);
}

@media (max-width: 767px) {
  .next-steps-card {
    grid-template-columns: 1fr;
  }
}

/* --- Mobile Overrides (from styles.css) --- */
@media (max-width: 767px) {
  .next-steps-card {
    grid-template-columns: 1fr;
  }
}
