/* ================================================
   Die Hotelsachverständigen - Modern UX 2026
   Beautiful, Elegant, Performance-First
   ================================================ */

:root {
  /* Brand colors (use orange sparingly) */
  --brand-orange: #FA8128;
  --brand-blue: #2B5398;
  --brand-navy: #192184;

  /* Theme tokens */
  --primary-blue: var(--brand-blue);
  --primary-dark: var(--brand-navy);
  --accent: var(--brand-orange);
  
  /* Text colors - high contrast for readability */
  --text-primary: #1a1a1a;       /* 15.8:1 contrast on white */
  --text-secondary: #4a4a4a;     /* 9.2:1 contrast on white */
  --text-muted: #6b6b6b;         /* 5.7:1 contrast on white (AA compliant) */
  
  /* Background colors - light and clean */
  --white: #ffffff;
  --page-bg: #fafafa;            /* Very light gray for subtle contrast */
  --surface: #ffffff;
  --surface-alt: #f5f5f5;        /* Light gray for alternate sections */
  --light-gray: #e8e8e8;
  
  /* Border and overlay colors */
  --border-light: rgba(0, 0, 0, 0.12);  /* 12% opacity for subtle borders */
  --border-medium: rgba(0, 0, 0, 0.2);   /* 20% opacity for medium borders */
  --overlay: rgba(43, 83, 152, 0.08);   /* Light brand-blue overlay */
  --overlay-accent: rgba(250, 129, 40, 0.10); /* Light brand-orange overlay */

  /* Functional Colors - accessible */
  --success: #006644;            /* 6.8:1 contrast on white */
  --warning: #b8860b;            /* 5.1:1 contrast on white (AA compliant) */
  --error: #cc0000;               /* 6.2:1 contrast on white */
  --info: var(--brand-blue);

  /* Spacing - Refined Scale */
  --spacing-xs: 0.25rem;
  --spacing-sm: 0.5rem;
  --spacing-md: 1rem;
  --spacing-lg: 1.5rem;
  --spacing-xl: 2.5rem;
  --spacing-xxl: 4rem;
  --spacing-xxxl: 6rem;

  /* Typography */
  --font-sans: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", sans-serif;
  --font-serif: "Georgia", "Times New Roman", serif;
  --font-mono: "SF Mono", "Monaco", "Courier New", monospace;

  /* Borders - Softer */
  --border-radius-sm: 6px;
  --border-radius: 12px;
  --border-radius-lg: 16px;
  --border-radius-xl: 24px;

  /* Shadows - Subtle and accessible */
  --shadow-xs: 0 1px 2px rgba(0, 0, 0, 0.05);
  --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.08);
  --shadow-md: 0 4px 16px rgba(0, 0, 0, 0.1);
  --shadow-lg: 0 8px 24px rgba(0, 0, 0, 0.12);
  --shadow-xl: 0 12px 32px rgba(0, 0, 0, 0.15);

  /* Transitions */
  --transition-fast: 150ms cubic-bezier(0.4, 0, 0.2, 1);
  --transition-base: 250ms cubic-bezier(0.4, 0, 0.2, 1);
  --transition-slow: 400ms cubic-bezier(0.4, 0, 0.2, 1);

  /* Z-index */
  --z-sticky: 10;
  --z-dropdown: 100;
  --z-modal: 1000;
}

:root {
  --muted-gray: #6b6b6b;
}

/* Remove dark mode - keeping light theme for better accessibility */

/* ================================================
   RESET & BASE STYLES
   ================================================ */

*, *::before, *::after {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

/* Skip link for accessibility */
.skip-link {
  position: absolute;
  top: -40px;
  left: 0;
  background: var(--primary-blue);
  color: var(--white);
  padding: var(--spacing-md) var(--spacing-lg);
  text-decoration: none;
  font-weight: 600;
  z-index: 10000;
  border-radius: 0 0 var(--border-radius) 0;
}

.skip-link:focus {
  top: 0;
  outline: 3px solid var(--white);
  outline-offset: 2px;
}

html {
  font-size: 16px;
  scroll-behavior: smooth;
  overflow-x: hidden;
}

body {
  font-family: var(--font-sans);
  color: var(--text-primary);
  background-color: var(--page-bg);
  line-height: 1.7;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* ================================================
   SCROLL ANIMATIONS
   ================================================ */

.animate-on-scroll {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity var(--transition-slow), transform var(--transition-slow);
}

.animate-on-scroll.animated {
  opacity: 1;
  transform: translateY(0);
}

.animate-fade {
  opacity: 0;
  transition: opacity var(--transition-slow);
}

.animate-fade.animated {
  opacity: 1;
}

.animate-slide-left {
  opacity: 0;
  transform: translateX(-30px);
  transition: opacity var(--transition-slow), transform var(--transition-slow);
}

.animate-slide-left.animated {
  opacity: 1;
  transform: translateX(0);
}

.animate-slide-right {
  opacity: 0;
  transform: translateX(30px);
  transition: opacity var(--transition-slow), transform var(--transition-slow);
}

.animate-slide-right.animated {
  opacity: 1;
  transform: translateX(0);
}

/* ================================================
   TYPOGRAPHY - Enhanced Hierarchy
   ================================================ */

h1, h2, h3, h4, h5, h6 {
  font-weight: 700;
  line-height: 1.25;
  color: var(--text-primary);
  margin-bottom: var(--spacing-lg);
  letter-spacing: -0.02em;
}

h1 {
  font-size: clamp(2.5rem, 6vw, 4rem);
  font-weight: 800;
  margin-bottom: var(--spacing-xl);
  letter-spacing: -0.03em;
}

h2 {
  font-size: clamp(2rem, 5vw, 3rem);
  font-weight: 700;
}

h3 {
  font-size: clamp(1.5rem, 3vw, 2rem);
  font-weight: 600;
}

h4 {
  font-size: clamp(1.25rem, 2.5vw, 1.5rem);
  font-weight: 600;
}

h5, h6 {
  font-size: 1.125rem;
  font-weight: 600;
}

p {
  margin-bottom: var(--spacing-lg);
  color: var(--text-secondary);
  font-size: 1.0625rem;
  line-height: 1.75;
}

.lead {
  font-size: 1.25rem;
  line-height: 1.6;
  color: var(--text-secondary);
  margin-bottom: var(--spacing-xl);
  font-weight: 400;
}

a {
  color: var(--primary-blue);
  text-decoration: underline;
  text-decoration-thickness: 2px;
  text-underline-offset: 3px;
  transition: color var(--transition-fast), text-decoration-color var(--transition-fast);
  position: relative;
}

a:hover {
  color: var(--primary-dark);
  text-decoration-color: var(--accent);
}

a:focus {
  outline: 3px solid var(--primary-blue);
  outline-offset: 2px;
  border-radius: 2px;
  text-decoration: none;
}

a:focus-visible {
  outline: 3px solid var(--primary-blue);
  outline-offset: 2px;
}

ul, ol {
  margin-left: var(--spacing-xl);
  margin-bottom: var(--spacing-lg);
}

li {
  margin-bottom: var(--spacing-sm);
  color: var(--text-secondary);
  line-height: 1.7;
}

/* ================================================
   BUTTONS - Modern & Elegant
   ================================================ */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 1rem 2rem;
  font-size: 1rem;
  font-weight: 600;
  text-align: center;
  text-decoration: none;
  border: 2px solid transparent;
  border-radius: var(--border-radius);
  cursor: pointer;
  transition: all var(--transition-base);
  white-space: nowrap;
  position: relative;
  overflow: hidden;
}

.btn::before {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  width: 0;
  height: 0;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.2);
  transform: translate(-50%, -50%);
  transition: width var(--transition-base), height var(--transition-base);
}

.btn:hover::before {
  width: 300px;
  height: 300px;
}

.btn-primary {
  background: var(--primary-blue);
  color: var(--white);
  box-shadow: var(--shadow-sm);
  text-decoration: none;
}

.btn-primary:hover {
  background: var(--primary-dark);
  box-shadow: 0 6px 18px rgba(25, 33, 132, 0.18);
  transform: translateY(-2px);
  color: var(--white);
}

.btn-primary:focus {
  outline: 3px solid var(--primary-blue);
  outline-offset: 2px;
}

.btn-secondary {
  background: var(--primary-dark);
  color: var(--white);
  box-shadow: var(--shadow-sm);
  text-decoration: none;
}

.btn-secondary:hover {
  background: var(--primary-blue);
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
  color: var(--white);
}

.btn-secondary:focus {
  outline: 3px solid var(--primary-dark);
  outline-offset: 2px;
}

.btn-outline {
  background-color: rgba(43, 83, 152, 0.08);
  color: var(--primary-blue);
  border-color: var(--border-medium);
  border-width: 2px;
  text-decoration: none;
}

.btn-outline:hover {
  background-color: var(--primary-blue);
  color: var(--white);
  border-color: var(--primary-blue);
  transform: translateY(-2px);
}

.btn-outline:focus {
  outline: 3px solid var(--primary-blue);
  outline-offset: 2px;
}

.btn-group {
  display: flex;
  gap: var(--spacing-md);
  flex-wrap: wrap;
  align-items: center;
}

/* ================================================
   FORMS - Clean & Accessible
   ================================================ */

.form-group {
  margin-bottom: var(--spacing-lg);
}

label {
  display: block;
  margin-bottom: var(--spacing-sm);
  font-weight: 600;
  color: var(--text-primary);
  font-size: 0.9375rem;
}

input[type="text"],
input[type="email"],
input[type="tel"],
input[type="url"],
select,
textarea {
  width: 100%;
  padding: 0.875rem 1rem;
  font-size: 1rem;
  font-family: var(--font-sans);
  color: var(--text-primary);
  background-color: var(--white);
  border: 2px solid var(--border-medium);
  border-radius: var(--border-radius);
  transition: all var(--transition-fast);
  appearance: none;
}

input:focus,
select:focus,
textarea:focus {
  outline: 3px solid var(--primary-blue);
  outline-offset: 2px;
  border-color: var(--primary-blue);
  box-shadow: 0 0 0 1px var(--primary-blue);
}

input::placeholder,
textarea::placeholder {
  color: var(--text-muted);
  opacity: 0.8;
}

textarea {
  min-height: 150px;
  resize: vertical;
}

.form-error {
  color: var(--error);
  font-size: 0.875rem;
  margin-top: var(--spacing-xs);
  display: none;
}

.form-group.error .form-error {
  display: block;
}

.form-group.error input,
.form-group.error textarea {
  border-color: var(--error);
}

.form-success {
  padding: var(--spacing-md);
  background-color: rgba(16, 185, 129, 0.1);
  border-left: 4px solid var(--success);
  border-radius: var(--border-radius-sm);
  color: var(--success);
  margin-bottom: var(--spacing-lg);
}

.search-box input {
  width: 100%;
  border: 2px solid var(--border-medium);
  border-radius: var(--border-radius-lg);
  background: var(--white);
  box-shadow: var(--shadow-sm);
}

.search-box input:focus {
  outline: 3px solid var(--primary-blue);
  outline-offset: 2px;
  border-color: var(--primary-blue);
}

/* ================================================
   LAYOUT - Container & Grid
   ================================================ */

.container {
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 var(--spacing-lg);
}


.section {
  padding: var(--spacing-xxxl) 0;
  background-color: var(--surface);
}

.section + .section {
  margin-top: var(--spacing-xl);
}

.section-alt {
  background-color: var(--surface-alt);
}

.section-sm {
  padding: var(--spacing-xxl) 0;
}

.section-title {
  text-align: center;
  max-width: 760px;
  margin: 0 auto var(--spacing-xxl);
}

.section-title h2 {
  margin-bottom: var(--spacing-md);
}

.section-title .section-subtitle,
.section-title .lead {
  margin-bottom: 0;
  color: var(--text-muted);
}

.grid {
  display: grid;
  gap: var(--spacing-xl);
}

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

.grid-3 {
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
}

.grid-4 {
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
}

@media (min-width: 768px) {
  .grid-2 {
    grid-template-columns: repeat(2, 1fr);
  }
  
  .grid-3 {
    grid-template-columns: repeat(3, 1fr);
  }
  
  .grid-4 {
    grid-template-columns: repeat(4, 1fr);
  }
}

/* ================================================
   HEADER & NAVIGATION - Glass Morphism
   ================================================ */

header {
  background: var(--white);
  border-bottom: 2px solid var(--border-medium);
  position: sticky;
  top: 0;
  z-index: var(--z-modal);
  box-shadow: var(--shadow-sm);
  transition: all var(--transition-base);
}

header.scrolled {
  box-shadow: var(--shadow-md);
}

.header-container {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: var(--spacing-lg) 0;
  transition: padding var(--transition-base);
}

header.scrolled .header-container {
  padding: var(--spacing-md) 0;
}

.logo {
  font-size: 1.5rem;
  font-weight: 800;
  color: var(--text-primary);
  letter-spacing: -0.02em;
  transition: transform var(--transition-fast);
  display: flex;
  align-items: center;
  gap: 0.5rem;
  text-decoration: none;
  line-height: 1.1;
  white-space: nowrap;
}

.logo:hover {
  transform: scale(1.02);
}

.logo-pre {
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--accent);
}

.logo-arrow {
  width: 24px;
  height: 24px;
  border-radius: 999px;
  flex: 0 0 auto;
  object-fit: contain;
  display: block;
  aspect-ratio: 1 / 1;
}

.logo-name {
  font-size: 1.35rem;
  font-weight: 800;
  color: var(--primary-dark);
}

.logo:focus {
  outline: 3px solid var(--primary-blue);
  outline-offset: 2px;
  border-radius: 6px;
}

.logo-icon {
  transition: transform var(--transition-base);
}

.logo:hover .logo-icon {
  transform: rotate(5deg);
}

@media (max-width: 480px) {
  .logo {
    white-space: normal;
  }
  .logo-pre {
    font-size: 1rem;
  }
  .logo-name {
    font-size: 1.15rem;
  }
  .logo-arrow {
    width: 22px;
    height: 22px;
  }
}

nav {
  display: flex;
  gap: var(--spacing-sm);
}

nav a {
  color: var(--text-primary);
  font-weight: 500;
  padding: 0.625rem 1.25rem;
  border-radius: var(--border-radius);
  transition: all var(--transition-fast);
  position: relative;
  pointer-events: auto;
  text-decoration: none;
}

nav a::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 50%;
  width: 0;
  height: 3px;
  background: var(--primary-blue);
  transform: translateX(-50%);
  transition: width var(--transition-base);
}

nav a:hover::after,
nav a.active::after {
  width: 70%;
}

nav a:hover {
  background-color: var(--surface-alt);
  text-decoration: none;
  color: var(--primary-blue);
}

nav a.active {
  color: var(--primary-blue);
  background-color: var(--surface-alt);
}

nav a:focus {
  outline: 3px solid var(--primary-blue);
  outline-offset: 2px;
}

.menu-toggle {
  display: none;
  background: none;
  border: 2px solid var(--border-medium);
  border-radius: var(--border-radius-sm);
  cursor: pointer;
  padding: var(--spacing-sm);
  color: var(--text-primary);
  transition: all var(--transition-fast);
}

.menu-toggle:hover {
  background-color: var(--surface-alt);
  border-color: var(--primary-blue);
}

.menu-toggle:focus {
  outline: 3px solid var(--primary-blue);
  outline-offset: 2px;
}

@media (max-width: 768px) {
  .header-container {
    gap: var(--spacing-sm);
  }

  .logo {
    max-width: calc(100% - 56px);
    white-space: normal;
  }

  .logo-pre {
    display: none;
  }

  .logo-name {
    font-size: 1.05rem;
  }

  .logo-arrow {
    width: 18px;
    height: 18px;
  }

  .menu-toggle {
    display: block;
  }

  nav {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: var(--white);
    flex-direction: column;
    padding: var(--spacing-lg);
    box-shadow: var(--shadow-lg);
    border-bottom: 2px solid var(--border-medium);
  }

  nav.active {
    display: flex;
  }

  nav a {
    padding: var(--spacing-md);
    text-align: center;
  }
}

/* ================================================
   HERO SECTION - Light & Accessible
   ================================================ */

.hero {
  background: linear-gradient(135deg, rgba(25, 33, 132, 0.62) 0%, rgba(43, 83, 152, 0.45) 55%, rgba(15, 23, 42, 0.35) 100%), url('../images/background2.png');
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  background-attachment: fixed;
  color: var(--white);
  padding: var(--spacing-xxxl) 0 calc(var(--spacing-xxxl) - var(--spacing-lg));
  text-align: center;
  position: relative;
  overflow: hidden;
  min-height: 520px;
  display: flex;
  align-items: center;
  border-bottom: 1px solid rgba(255, 255, 255, 0.18);
}

.hero::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background:
    linear-gradient(180deg, rgba(15, 23, 42, 0.08) 0%, rgba(15, 23, 42, 0.35) 100%),
    radial-gradient(circle at 20% 20%, rgba(250, 129, 40, 0.16) 0%, transparent 45%),
    radial-gradient(circle at 80% 70%, rgba(255, 255, 255, 0.18) 0%, transparent 55%);
  animation: pulse 8s ease-in-out infinite;
}

@keyframes pulse {
  0%, 100% { opacity: 0.5; }
  50% { opacity: 1; }
}

.hero .container {
  position: relative;
  z-index: 1;
}

.hero h1 {
  color: var(--white);
  margin-bottom: var(--spacing-xl);
  text-shadow: 0 12px 30px rgba(0, 0, 0, 0.35);
}

.hero p {
  font-size: 1.35rem;
  margin-bottom: var(--spacing-xl);
  color: rgba(255, 255, 255, 0.92);
  max-width: 760px;
  margin-left: auto;
  margin-right: auto;
  line-height: 1.7;
}

.hero-content {
  max-width: 75vw;
  margin: 0 auto;
}

.hero-cta {
  display: flex;
  justify-content: center;
  gap: var(--spacing-md);
  flex-wrap: wrap;
}

.hero-cta .btn {
  min-width: 220px;
}

.hero .btn-outline {
  color: var(--white);
  border-color: rgba(255, 255, 255, 0.65);
  background-color: rgba(255, 255, 255, 0.18);
  backdrop-filter: blur(4px);
}

.hero .btn-outline:hover {
  background-color: rgba(255, 255, 255, 0.92);
  color: var(--primary-dark);
  border-color: rgba(255, 255, 255, 0.92);
}

/* ================================================
   PAGE HERO (internal pages) - Light & Consistent
   ================================================ */

.page-hero {
  background: linear-gradient(135deg, #eef3ff 0%, #e6efff 55%, #fff7ef 100%);
  border-bottom: 1px solid var(--border-light);
  padding: var(--spacing-xxl) 0;
}

.page-hero h1 {
  margin: 0 0 var(--spacing-sm);
  color: var(--text-primary);
}

.page-hero p {
  margin: 0;
  color: var(--text-secondary);
  max-width: 860px;
}

/* ================================================
   CARDS - Enhanced with Depth
   ================================================ */

.card {
  background: var(--white);
  border: 2px solid var(--border-medium);
  border-radius: var(--border-radius-lg);
  padding: var(--spacing-xl);
  transition: all var(--transition-base);
  position: relative;
  overflow: hidden;
  height: 100%;
}

.card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(135deg, var(--overlay) 0%, transparent 100%);
  opacity: 0;
  transition: opacity var(--transition-base);
}

.card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-lg);
  border-color: var(--primary-blue);
}

.card:hover::before {
  opacity: 1;
}

.card:focus-within {
  outline: 3px solid var(--primary-blue);
  outline-offset: 2px;
}

.card > * {
  position: relative;
  z-index: 1;
}

.card-icon {
  width: 56px;
  height: 56px;
  margin-bottom: var(--spacing-lg);
  background: var(--primary-blue);
  border-radius: var(--border-radius);
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: var(--shadow-sm);
  transition: transform var(--transition-base);
}

.card-icon-light {
  background: var(--surface);
  border: 1px solid var(--border-light);
  box-shadow: var(--shadow-xs);
}

.card-icon-light img {
  filter: none !important;
}

.card:hover .card-icon {
  transform: scale(1.1) rotate(5deg);
}

.card h3 {
  color: var(--text-primary);
  margin-bottom: var(--spacing-md);
  font-size: 1.5rem;
}

.card p {
  color: var(--text-secondary);
  margin-bottom: 0;
  line-height: 1.7;
}

.card .btn {
  margin-top: var(--spacing-md);
}

/* ================================================
   TRUST SIGNALS - Professional Grid
   ================================================ */

.trust-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: var(--spacing-xl);
  margin-top: var(--spacing-xxl);
}

.trust-item {
  text-align: center;
  padding: var(--spacing-xl);
  background: var(--white);
  border: 2px solid var(--border-medium);
  border-radius: var(--border-radius-lg);
  box-shadow: var(--shadow-sm);
  transition: transform var(--transition-base), box-shadow var(--transition-base);
}

.trust-item:hover {
  transform: translateY(-6px);
  box-shadow: var(--shadow-lg);
}

.trust-icon {
  width: 64px;
  height: 64px;
  margin: 0 auto var(--spacing-md);
  background: var(--primary-blue);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: var(--shadow-md);
  transition: all var(--transition-base);
}

.trust-item:hover .trust-icon {
  transform: scale(1.1);
  box-shadow: var(--shadow-lg);
}

.trust-item h3 {
  font-size: 1.125rem;
  margin-bottom: var(--spacing-sm);
  color: var(--text-primary);
}

.trust-item p {
  font-size: 0.9375rem;
  color: var(--text-secondary);
  line-height: 1.6;
  margin: 0;
}

/* ================================================
   EXPERT DIRECTORY - Advanced Filters
   ================================================ */

.expert-directory,
.expert-directory-layout {
  display: grid;
  grid-template-columns: 280px 1fr;
  gap: var(--spacing-xl);
  margin-top: var(--spacing-xl);
}

.filters,
.expert-filters {
  background: var(--white);
  border: 1px solid var(--border-light);
  border-radius: var(--border-radius-lg);
  padding: var(--spacing-xl);
  position: sticky;
  top: 120px;
  height: fit-content;
  box-shadow: var(--shadow-sm);
}

/* Mobile filter toggle button - hidden on desktop */
.expert-filters-toggle {
  display: none;
  width: 100%;
  padding: var(--spacing-md);
  background: var(--primary-blue);
  color: var(--white);
  border: none;
  border-radius: var(--border-radius);
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  margin-bottom: var(--spacing-md);
  align-items: center;
  justify-content: space-between;
  transition: background-color var(--transition-fast);
}

.expert-filters-toggle:hover {
  background: var(--primary-dark);
}

.expert-filters-toggle svg {
  width: 20px;
  height: 20px;
  transition: transform var(--transition-fast);
}

.expert-filters-toggle[aria-expanded="true"] svg {
  transform: rotate(180deg);
}

/* Filter panel - always visible on desktop, collapsible on mobile */
.expert-filters-panel {
  display: block;
}

.filters h3 {
  font-size: 1.125rem;
  margin-bottom: var(--spacing-lg);
  color: var(--primary-dark);
}

.filter-group {
  margin-bottom: var(--spacing-xl);
}

.filter-group h4 {
  font-size: 0.9375rem;
  font-weight: 600;
  margin-bottom: var(--spacing-md);
  color: var(--graphite);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.filter-group label {
  display: flex;
  align-items: center;
  gap: var(--spacing-sm);
  margin-bottom: var(--spacing-sm);
  font-weight: 400;
  cursor: pointer;
  padding: var(--spacing-xs) 0;
  transition: color var(--transition-fast);
}

.filter-group label:hover {
  color: var(--primary-blue);
}

.filter-group input[type="checkbox"] {
  width: 18px;
  height: 18px;
  cursor: pointer;
  accent-color: var(--primary-blue);
}

.filter-group input[type="checkbox"]:focus {
  outline: 3px solid var(--primary-blue);
  outline-offset: 2px;
  border-radius: 2px;
}

.expert-list {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: var(--spacing-xl);
}

.expert-card {
  background: var(--white);
  border: 2px solid var(--border-medium);
  border-radius: var(--border-radius-lg);
  padding: var(--spacing-xl);
  transition: all var(--transition-base);
  display: flex;
  flex-direction: column;
  gap: var(--spacing-md);
}

.expert-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-lg);
  border-color: var(--primary-blue);
}

.expert-card:focus-within {
  outline: 3px solid var(--primary-blue);
  outline-offset: 2px;
}

.expert-avatar {
  width: 80px;
  height: 80px;
  border-radius: 50%;
  background: var(--primary-blue);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: var(--spacing-md);
  box-shadow: var(--shadow-sm);
  overflow: hidden;
  flex-shrink: 0;
}

.expert-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.expert-avatar svg {
  width: 40px;
  height: 40px;
  color: white;
}

.expert-info h3 {
  font-size: 1.25rem;
  margin-bottom: var(--spacing-xs);
  color: var(--text-primary);
}

.expert-specialization {
  color: var(--primary-blue);
  font-size: 0.9375rem;
  font-weight: 500;
  margin-bottom: var(--spacing-sm);
}

.expert-location {
  color: var(--text-secondary);
  font-size: 0.9375rem;
  margin-bottom: var(--spacing-md);
}

.expert-contact {
  display: flex;
  gap: var(--spacing-sm);
  flex-wrap: wrap;
}

.expert-contact a {
  padding: var(--spacing-xs) var(--spacing-md);
  background-color: var(--overlay);
  border-radius: var(--border-radius-sm);
  font-size: 0.875rem;
  transition: all var(--transition-fast);
}

.expert-contact a:hover {
  background-color: var(--primary-blue);
  color: var(--white);
}

.expert-contact a:focus {
  outline: 3px solid var(--primary-blue);
  outline-offset: 2px;
}

/* ================================================
   EXPERT PROFILE
   ================================================ */

.expert-profile {
  display: grid;
  gap: var(--spacing-xxl);
}

.expert-profile-card {
  display: grid;
  grid-template-columns: minmax(220px, 280px) 1fr;
  gap: var(--spacing-xl);
  align-items: start;
}

.expert-photo {
  background: var(--surface);
  border: 2px solid var(--border-medium);
  border-radius: var(--border-radius-lg);
  padding: var(--spacing-md);
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: var(--shadow-sm);
}

.expert-photo img {
  width: 100%;
  height: auto;
  border-radius: var(--border-radius);
  display: block;
}

.expert-contact-block h2,
.expert-details h2 {
  margin-bottom: var(--spacing-md);
}

.expert-contact-block p {
  margin-bottom: var(--spacing-sm);
}

.expert-actions {
  margin-top: var(--spacing-md);
}

.expert-details {
  background: var(--surface);
  border: 2px solid var(--border-medium);
  border-radius: var(--border-radius-lg);
  padding: var(--spacing-xl);
  box-shadow: var(--shadow-sm);
}

.expert-profile-table td {
  border-bottom: 1px solid var(--border-light);
}

.expert-profile-table tr:last-child td {
  border-bottom: none;
}

.expert-listing-table td {
  border-bottom: 1px solid var(--border-light);
}

.expert-listing-table tr:last-child td {
  border-bottom: none;
}

.expert-meta {
  display: grid;
  gap: var(--spacing-sm);
}

.expert-meta-row {
  display: grid;
  grid-template-columns: minmax(180px, 240px) 1fr;
  gap: var(--spacing-md);
  padding-bottom: var(--spacing-sm);
  border-bottom: 1px solid var(--border-light);
}

.expert-meta-row dt {
  font-weight: 600;
  color: var(--text-primary);
}

.expert-meta-row dd {
  margin: 0;
  color: var(--text-secondary);
}

@media (max-width: 900px) {
  .expert-profile-card {
    grid-template-columns: 1fr;
  }

  .expert-meta-row {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 768px) {
  .expert-directory,
  .expert-directory-layout {
    grid-template-columns: 1fr;
  }

  .filters,
  .expert-filters {
    position: static;
  }

  /* Show mobile filter toggle button */
  .expert-filters-toggle {
    display: flex;
  }

  /* Hide filter panel by default on mobile, show when open */
  .expert-filters-panel {
    display: none;
    margin-top: var(--spacing-md);
  }

  .expert-filters-panel.is-open {
    display: block;
  }

  /* Stack expert profile table cells on mobile */
  .expert-profile-table tr,
  .expert-profile-table td {
    display: block;
    width: 100%;
  }
  
  .expert-profile-table td:first-child {
    padding-bottom: var(--spacing-xs);
  }
  
  .expert-profile-table td:last-child {
    padding-bottom: var(--spacing-md);
  }
}

/* ================================================
   FOOTER - Clean & Structured
   ================================================ */

footer {
  background: var(--surface-alt);
  border-top: 2px solid var(--border-medium);
  padding: var(--spacing-xxl) 0 var(--spacing-xl);
  margin-top: var(--spacing-xxxl);
}

.footer-content {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: var(--spacing-xl);
  margin-bottom: var(--spacing-xl);
}

.footer-section h4 {
  font-size: 1rem;
  margin-bottom: var(--spacing-md);
  color: var(--text-primary);
}

.footer-section ul {
  list-style: none;
  margin: 0;
  padding: 0;
}

.footer-section li {
  margin-bottom: var(--spacing-sm);
}

.footer-section a {
  color: var(--text-secondary);
  font-size: 0.9375rem;
  transition: color var(--transition-fast);
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 2px;
}

.footer-section a:hover {
  color: var(--primary-blue);
}

.footer-section a:focus {
  outline: 3px solid var(--primary-blue);
  outline-offset: 2px;
  text-decoration: none;
}

.footer-bottom {
  border-top: 2px solid var(--border-medium);
  padding-top: var(--spacing-lg);
  text-align: center;
}

.footer-bottom p {
  color: var(--text-secondary);
  font-size: 0.875rem;
  margin: 0;
}

/* ================================================
   UTILITIES
   ================================================ */

.text-center {
  text-align: center;
}

.text-left {
  text-align: left;
}

.text-right {
  text-align: right;
}

.mt-0 { margin-top: 0; }
.mt-sm { margin-top: var(--spacing-sm); }
.mt-md { margin-top: var(--spacing-md); }
.mt-lg { margin-top: var(--spacing-lg); }
.mt-xl { margin-top: var(--spacing-xl); }

.mb-0 { margin-bottom: 0; }
.mb-sm { margin-bottom: var(--spacing-sm); }
.mb-md { margin-bottom: var(--spacing-md); }
.mb-lg { margin-bottom: var(--spacing-lg); }
.mb-xl { margin-bottom: var(--spacing-xl); }

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border-width: 0;
}

/* ================================================
   RESPONSIVE DESIGN
   ================================================ */

@media (max-width: 1024px) {
  :root {
    --spacing-xxxl: 4rem;
  }
  
  .section {
    padding: var(--spacing-xxl) 0;
  }
}

@media (max-width: 768px) {
  :root {
    --spacing-xl: 2rem;
    --spacing-xxl: 3rem;
    --spacing-xxxl: 3rem;
  }

  h1 {
    font-size: clamp(2rem, 8vw, 2.5rem);
  }

  .btn-group {
    flex-direction: column;
    width: 100%;
  }

  .btn {
    width: 100%;
  }

  .grid-2,
  .grid-3,
  .grid-4 {
    grid-template-columns: 1fr;
  }

  .hero {
    min-height: 500px;
    background-attachment: scroll;
  }
}

@media (max-width: 480px) {
  .container {
    padding: 0 var(--spacing-md);
  }

  .card {
    padding: var(--spacing-lg);
  }
}

/* ================================================
   PRINT STYLES
   ================================================ */

@media print {
  header, footer, .btn, .filters {
    display: none;
  }

  body {
    background: white;
    color: black;
  }

  .card {
    border: 1px solid #ccc;
    page-break-inside: avoid;
  }
}
