/* Import Fonts - Bricolage Grotesque for headings, Raleway for body */
@import url('https://fonts.googleapis.com/css2?family=Bricolage+Grotesque:wght@400;500;600;700;800&family=Public+Sans:wght@300;400;500;600;700;800&display=swap');

/* Reset and Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

/* Global responsive media elements */
img, video, iframe, svg {
    max-width: 100%;
    height: auto;
}

/* Prevent horizontal scrolling */
html, body {
    overflow-x: hidden;
}

/* Responsive typography with text wrapping */
h1, h2, h3, h4, h5, h6, p, a, span, div {
    overflow-wrap: break-word;
    word-wrap: break-word;
    hyphens: none;
}

/* Disable hyphenation in all headlines */
h1, h2, h3, h4, h5, h6 {
    hyphens: none;
}

/* Focus styles for accessibility */
button:focus-visible,
a:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible {
    outline: 2px solid var(--primary);
    outline-offset: 2px;
}

/* Respect reduced motion preferences */
@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
        scroll-behavior: auto !important;
    }
}

/* Design System Variables */
:root{
  /* Brand Colors */
  --primary: #5e17eb;
  /* Alias to support older usages in the CSS */
  --primary-color: var(--primary);
  --primary-hover: #4A00D8;
  --accent: #FEFBF5;
  --text: #0E010D;
  --surface: #FEFBF5;
  --page: #F7F6F2;

  /* Design Elements */
  --radius-lg: 20px;
  --shadow-sm: 0 4px 16px rgba(0,0,0,.08);
  --shadow-md: 0 8px 32px rgba(0,0,0,.12);
  --gradient-brand: linear-gradient(135deg, var(--primary) 0%, var(--primary-hover) 100%);
}

/* Base Styles */
html {
    scroll-behavior: smooth;
}

body{ 
    color: var(--text); 
    background: var(--page);
    font-family: 'Public Sans', Arial, sans-serif;
    line-height: 1.6;
    /* TEST: This should make the background bright red if CSS is loading */
    background: #0E010D !important;
}

.container {
    max-width: 1200px; /* match .nav-container width */
    margin: 0 auto;
    padding: 0 clamp(1rem, 5vw, 3rem);
    width: 100%;
}

/* Typography */
h1, h2, h3, h4, h5, h6{ 
    color: var(--text);
    font-family: 'Public Sans', Arial, sans-serif;
    font-weight: 800;
    line-height: 1.2;
    margin-bottom: 1rem;
}

h1 { font-size: 3rem; }
h2 { 
    font-size: 24px; /* Desktop */
    font-weight: 600; /* SemiBold */
    text-align: left; /* Linksbündig */
}
h3 { font-size: 1.75rem; }
h4 { font-size: 1.5rem; }

p{ 
    color: rgba(14, 1, 13, 0.8);
    margin-bottom: 1rem;
    font-family: 'Public Sans', Arial, sans-serif;
}

/* Buttons */
.btn{
  display: inline-block; 
  padding: .9rem 2rem; 
  border-radius: 2rem;
  font-weight: 600; 
  cursor: pointer; 
  border: none;
  font-family: 'Public Sans', Arial, sans-serif;
  font-size: 1rem;
  text-decoration: none;
  transition: transform .2s ease, background .2s ease, color .2s ease, border-color .2s ease;
}

.btn-primary{ 
    background: var(--primary); 
    color: #F8F0EF; 
}
.btn-primary:hover{ 
    background: var(--primary-hover); 
    transform: translateY(-2px); 
}

.btn-secondary,
.btn-outline{
  background: var(--surface); 
  color: var(--text);
  border: 2px solid var(--text);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
  position: relative;
  overflow: hidden;
  transition: transform .2s ease, box-shadow .2s ease, border-color .2s ease;
}
.btn-secondary::before,
.btn-outline::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-hover) 100%);
    transform: scaleX(0);
    transition: transform .2s ease;
}

.btn-secondary:hover,
.btn-outline:hover{ 
    transform: translateY(-6px);
    box-shadow: var(--shadow-md); 
    border-color: rgba(14, 1, 13, 0.35);
}

.btn-secondary:hover::before,
.btn-outline:hover::before {
    transform: scaleX(1);
}

.btn-ghost{ 
    background: transparent; 
    color: var(--primary); 
}
.btn-ghost:hover{ 
    color: var(--primary-hover); 
}

/* Cards */
.card{
  background: var(--surface);
  border: 2px solid var(--text);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
  position: relative; 
  overflow: hidden; 
  padding: 2.5rem;
  transition: transform .2s ease, box-shadow .2s ease, border-color .2s ease;
}

.card::before{
  content: ''; 
  position: absolute; 
  left: 0; 
  right: 0; 
  top: 0; 
  height: 4px;
  background: var(--gradient-brand); 
  transform: scaleX(0); 
  transition: transform .2s ease;
}

.card:hover{ 
    transform: translateY(-6px); 
    box-shadow: var(--shadow-md); 
    border-color: rgba(220,237,154,.35); 
}
.card:hover::before{ 
    transform: scaleX(1); 
}

/* Navigation */
.navbar{ 
    background: #F7F6F2; 
    border-bottom: 2px solid #12282C;
    position: fixed;
    top: 0;
    width: 100%;
    backdrop-filter: blur(10px);
    z-index: 1000;
    padding: 1rem 0;
    transition: all 0.3s ease;
}

.nav-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.nav-logo {
    display: flex;
    align-items: center;
}

.nav-logo-img {
    height: 2.5rem;
    width: auto;
    object-fit: contain;
}

.nav-menu {
    display: flex;
    list-style: none;
    gap: 2rem;
}

.nav-link{ 
    color: var(--text); 
    font-weight: 600; 
    position: relative;
    text-decoration: none;
    transition: color 0.3s ease;
}
.nav-link:hover{ 
    color: var(--primary); 
}
.nav-link::after{ 
    content: ''; 
    position: absolute; 
    left: 0; 
    bottom: -6px; 
    width: 0; 
    height: 2px; 
    background: var(--primary); 
    transition: width .2s ease; 
}
.nav-link:hover::after{ 
    width: 100%; 
}

.hamburger {
    display: none;
    flex-direction: column;
    cursor: pointer;
}

.bar {
    width: 25px;
    height: 3px;
    background: var(--text);
    margin: 3px 0;
    transition: 0.3s;
}

/* Hero Section */
.hero {
    position: relative;
    min-height: 100vh;
    display: flex;
    align-items: center;
    overflow: hidden;
    background: var(--primary);
}

.hero-background {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1;
}

.hero-bg-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: 60% center;
    transform: scaleX(-1);
    filter: brightness(0.8) contrast(1.1);
}

.hero-container {
    position: relative;
    z-index: 2;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 clamp(1rem, 5vw, 3rem);
    width: 100%;
    margin-top: 25vh;
}

.hero-card {
    background: transparent;
    backdrop-filter: none;
    border-radius: 0;
    padding: 3rem 0;
    box-shadow: none;
    border: none;
    max-width: 800px;
    margin: 0;
    position: relative;
    z-index: 2;
    text-align: left; /* Linksbündig für einheitliche Ausrichtung */
}

.hero-title {
    font-family: 'Public Sans', Arial, sans-serif;
    font-size: 4rem;
    font-weight: 700;
    margin-bottom: 1rem;
    color: var(--primary);
    line-height: 1.1;
}

.hero-subtitle {
    font-family: 'Bricolage Grotesque', Arial, sans-serif;
    font-size: 1.75rem;
    margin-bottom: 1.5rem;
    color: #12282C;
    font-weight: 600;
}

.hero-intro {
    font-family: 'Public Sans', Arial, sans-serif;
    font-size: 1.1rem;
    margin-bottom: 2rem;
    color: var(--text);
    line-height: 1.6;
    opacity: 0.8;
}

.hero-buttons {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
}

/* Hero button overrides: filled dark buttons without frames */
.hero .btn,
.hero .btn-secondary,
.hero .btn-outline {
    background: #12282C;
    color: #FEFBF5;
    border: none;
    box-shadow: none;
}

.hero .btn:hover,
.hero .btn-secondary:hover,
.hero .btn-outline:hover {
    background: var(--primary); /* purple on hover */
    color: #FEFBF5;
    transform: translateY(-6px);
    box-shadow: var(--shadow-md);
}

.hero .btn-secondary::before,
.hero .btn-outline::before { content: none !important; }

/* Section Headers */
.section-header {
    text-align: center;
    margin-bottom: 4rem;
}

.about .section-header {
    text-align: left;
}

.section-header h2 {
    font-family: 'Public Sans', Arial, sans-serif;
    font-size: 24px; /* Desktop */
    font-weight: 600; /* SemiBold */
    margin-bottom: 1.0rem;
    color: var(--text);
    text-align: left; /* Linksbündig */
}

.section-header p {
    font-size: 1.2rem;
    color: var(--text);
    opacity: 0.9;
}

/* About Section */
.about {
    padding: 80px 0;
    background: #FEFBF5;
    color: #F8F0EF;
    border-top: none;
    border-bottom: 1px solid #F8F0EF;
}

.about .section-header h2,
.about .section-header p,
.services .section-header h2,
.services .section-header p,
.references .section-header h2,
.references .section-header p {
    color: #F8F0EF;
}

.approach .section-header h2,
.approach .section-header p {
    color: #F8F0EF;
}

/* Override: headline color for "Meine Arbeitsweise" */
.approach .section-header h2 {
    color: #0E010D;
}

.about .section-header p,
.about .section-header p,
.services .section-header p,
.approach .section-header p,
.references .section-header p {
    font-size: 1.3rem;
    opacity: 0.95;
}

.about-content {
    display: grid;
    grid-template-columns: 2fr 1fr;
    grid-template-rows: auto auto; /* row1: text+photo, row2: stats */
    column-gap: clamp(1rem, 6vw, 4rem);
    row-gap: calc(clamp(1rem, 6vw, 4rem) / 2); /* half the vertical gap */
    align-items: start;
    text-align: left;
}

/* Headline spans both columns */
/* About headline now sits inside left Vstack */
.about-headline {
    color: #5e17eb;
    margin-bottom: 0.75rem;
    font-family: 'Bricolage Grotesque', Arial, sans-serif;
}

/* Ensure left column behaves like a vertical stack */
.about-text {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
}

.about-text h3 {
    color: #5e17eb;
    margin-bottom: 1.5rem;
    font-family: 'Bricolage Grotesque', Arial, sans-serif;
}

.about-text p {
    font-size: 1.1rem;
    margin-bottom: 1.5rem;
    color: #0E010D;
    font-family: 'Public Sans', Arial, sans-serif;
    opacity: 0.9;
}

/* Override heading color for ÜBER MICH title */
.about .section-header h2 {
    color: #0E010D;
}

.about-stats {
    display: flex;
    gap: 2rem;
    margin-top: 0.5rem;
    justify-content: flex-start;
    grid-column: 1; /* same width as copy */
    grid-row: 2;    /* below text/photo */
}

.stat {
    text-align: center;
    flex: 1 1 0;      /* make all stat blocks equal width */
    min-width: 0;     /* allow flex to shrink evenly */
}

.stat-number {
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2.5rem;
    font-weight: 700;
    color: #1A6868;
    font-family: 'Public Sans', Arial, sans-serif;
    height: 3rem;
    margin-bottom: 0.5rem;
}

.stat-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2rem;
    color: #1A6868;
    height: 3rem;
    margin-bottom: 0.5rem;
}

.stat-label {
    font-size: 0.9rem;
    color: #12282C;
    text-transform: uppercase;
    letter-spacing: 1px;
    font-family: 'Public Sans', sans-serif;
    opacity: 0.8;
    display: block;
    text-align: center;
}

.about-image {
    display: flex;
    justify-content: center;
    align-items: center;
    grid-column: 2;
    grid-row: 1; 
    align-self: center; /* vertically center vs headline+copy (row 1) */
}

.about-profile-image {
    width: 400px;
    height: auto;                /* responsive height */
    aspect-ratio: 1 / 1;         /* quadratisch wie Kontakt */
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-md);
    object-fit: cover;
    object-position: 35% center;
    transition: transform 0.3s ease;
    border: none;
}

.about-profile-image:hover {
    transform: none;
}

/* Services Section */
.services {
    padding: 100px 0;
    background: #12282C;
    border-top: none;
    border-bottom: none;
}

.services-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(min(300px, 100%), 1fr));
    gap: clamp(1.5rem, 4vw, 2.5rem);
    margin-top: 3rem;
}

.service-card {
    background: var(--surface);
    padding: 2.5rem;
    border-radius: var(--radius-lg);
    box-shadow: none;
    border: none;
    position: relative;
    overflow: hidden;
    transition: none;
}

.service-card::before { content: none; }

.service-card:hover { transform: none; box-shadow: none; border-color: inherit; }

.service-card:hover::before { transform: none; }

.service-icon {
    font-size: 3rem;
    color: #122812;
    margin-bottom: 1.5rem;
    transition: none;
}

.service-card:hover .service-icon { transform: none; color: #1A6868; }

/* Ensure no hover effects anywhere in the services section */
.services .card:hover { transform: none !important; box-shadow: none !important; border-color: inherit !important; }
.services .card::before { content: none !important; }
.services .card:hover::before { transform: none !important; }

.service-card h3 {
    color: var(--primary);
    margin-bottom: 1.2rem;
    font-family: 'Bricolage Grotesque', Arial, sans-serif;
    font-size: 1.4rem;
    font-weight: 600;
}

/* Teil nach dem Gedankenstrich schwarz und in neuer Zeile */
.service-card h3 .service-h3-aux {
    display: block;            /* neue Zeile */
    color: #12282c;        
    font-size: 1.1rem;         /* smaller than h3 */
    font-weight: 500;          /* lighter weight */
}

.service-card p {
    color: var(--text);
    font-size: 1rem;
    line-height: 1.6;
    opacity: 0.85;
    font-family: 'Public Sans', Arial, sans-serif;
    margin-bottom: 1.5rem;
}

.service-features {
    list-style: none;
    text-align: left;
    margin-top: 1.5rem;
}

.service-features li {
    position: relative;
    padding-left: 1.5rem;
    margin-bottom: 0.8rem;
    color: var(--text);
    font-family: 'Public Sans', Arial, sans-serif;
    font-size: 0.95rem;
    opacity: 0.9;
}

.service-features li::before {
    content: '✓';
    position: absolute;
    left: 0;
    color: var(--primary);
    font-weight: bold;
    font-size: 1.1rem;
}

/* Approach Section */
.approach {
    padding: 100px 0;
    background: #FEFBF5;
    border-top: none;
    border-bottom: none;
}

.approach-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(min(300px, 100%), 1fr));
    gap: clamp(1.5rem, 4vw, 2.5rem);
    margin-top: 3rem;
}

.approach-item {
    background: var(--surface);
    padding: 10px;
    border-radius: var(--radius-lg);
    box-shadow: none;
    border: none;
    position: relative;
    overflow: hidden;
}

.approach-item::before { content: none; }

/* Disable all hover effects for approach items */
.approach .approach-item:hover { 
    transform: none !important; 
    box-shadow: none !important; 
    border-color: inherit !important; 
}

.approach .approach-item:hover::before { 
    transform: none !important; 
}

.approach-icon {
    font-size: 3rem;
    color: #12282C;
    margin-bottom: 1.5rem;
}

.approach-portrait {
    width: 100%;
    aspect-ratio: 1;
    border-radius: var(--radius-lg);
    object-fit: cover;
    object-position: center;
    position: absolute;
    top: 0;
    left: 0;
}

.approach-item:has(.approach-portrait) {
    padding: 0;
    overflow: hidden;
    aspect-ratio: 1;
    border: none;
}

.approach-item h3 {
    color: #5e17eb;
    margin-bottom: 1.2rem;
    font-family: 'Bricolage Grotesque', Arial, sans-serif;
    font-size: 1.4rem;
    font-weight: 600;
}

.approach-item p {
    color: #0E010D;
    font-size: 1rem;
    line-height: 1.6;
    opacity: 0.85;
    font-family: 'Public Sans', Arial, sans-serif;
}

/* References Section */
.references {
    padding: 80px 0;
    background: #5e17eb;
    border-top: none;
    border-bottom: none;
}

/* Horizontal Scrolling References */
.references-scroll-container {
    margin-top: 3rem;
    overflow: visible;
    position: relative;
    padding: 0; /* bündig wie andere Sections; Container steuert die Außenabstände */
    padding-bottom: 72px; /* Platz für Pfeilleiste unter den Karten */
}

.references-scroll {
    /* Slider-Viewport: kein nativer Scroll, wir animieren per transform */
    overflow: hidden;
}

/* Track enthält Slides; wird horizontal verschoben */
.references-track {
    display: flex;
    gap: 2.5rem; /* visueller Abstand zwischen Karten auch slide-übergreifend */
    will-change: transform;
    transition: transform .45s ease;
}

/* Eine Slide kann 1 oder 2 Karten enthalten, je nach Breakpoint */
.reference-slide {
    flex: 0 0 100%; /* genau eine Slide pro Viewportbreite */
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr)); /* zwei gleich breite Spalten */
    gap: 2.5rem;
    padding-bottom: 1rem;
    justify-content: stretch;
}

/* Arrow Navigation - bottom bar for slider */
.references-arrows {
    position: absolute;
    left: 0; right: 0; bottom: 12px; /* Pfeile stets auf gleicher Höhe innerhalb der Section */
    display: flex; justify-content: center; gap: 1rem;
    z-index: 9;
    pointer-events: none; /* let only the buttons take clicks */
}

.references-arrow {
    width: 48px; height: 48px;
    border-radius: 50%;
    background: rgba(254, 251, 245, 0.95);
    border: 2px solid var(--primary-color);
    color: var(--primary-color);
    font-size: 1.1rem;
    cursor: pointer;
    transition: background .2s ease, transform .2s ease;
    z-index: 10;
    display: flex; align-items: center; justify-content: center;
    backdrop-filter: blur(10px);
    pointer-events: auto;
    touch-action: manipulation; /* Prevent double-tap zoom and improve touch response */
    user-select: none; /* Prevent text selection on long press */
    -webkit-tap-highlight-color: transparent; /* Remove tap highlight on mobile */
}

.references-arrow:hover { background: var(--primary-color); color: #F8F0EF; transform: scale(1.05); }

/* explicit side positions removed; arrows live in bottom bar */

.references-arrow:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    /* keep disabled arrow on the same baseline */
    transform: none;
}

.references-arrow:disabled:hover {
    background: rgba(254, 251, 245, 0.9);
    color: var(--primary-color);
}

.reference-card {
    background: var(--surface);
    padding: 2rem;
    border-radius: var(--radius-lg);
    box-shadow: none;
    border: none;
    position: relative;
    overflow: hidden;
    transition: none;
    width: 100%;     /* Desktop: fülle Spalte */
    min-width: 0;    /* keine Mindestbegrenzung, damit bündig */
    max-width: none; 
}

.reference-card::before { content: none; }

.reference-card:hover { transform: none; box-shadow: none; border-color: inherit; }

.reference-card:hover::before { transform: none; }

.reference-avatar {
    font-size: 3rem;
    color: var(--text);
    margin-bottom: 1.5rem;
    transition: none;
}

.reference-card:hover .reference-avatar { transform: none; color: var(--text); }

.reference-card h3 {
    color: #12282C;
    margin-bottom: 0.25rem;
    font-family: 'Public Sans', Arial, sans-serif;
    font-size: 1rem;
    line-height: 1.6;
    font-weight: 600;
}

.reference-role {
    color: #5e17eb;
    font-size: 1.4rem;
    font-weight: 600;
    margin-bottom: 0.75rem;
    font-family: 'Bricolage Grotesque', Arial, sans-serif;
    text-transform: none;
    letter-spacing: normal;
    line-height: 1.2;
    hyphens: none;
}

.reference-text {
    color: var(--text);
    font-size: 1rem;
    line-height: 1.6;
    opacity: 0.85;
    font-family: 'Public Sans', Arial, sans-serif;
    margin-bottom: 0.5rem;
    font-style: normal;
}

.reference-stats {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.reference-stats .stat {
    background: var(--primary);
    color: #F8F0EF;
    padding: 0.5rem 1rem;
    border-radius: 20px;
    font-size: 0.9rem;
    font-weight: 600;
    font-family: 'Public Sans', Arial, sans-serif;
}

/* Contact Section */
.contact{ 
    background: #12282C; 
    color: #F8F0EF;
    padding: 80px 0;
    border-top: none;
}

.contact .section-header {
    text-align: left; /* Left align KONTAKT heading on desktop */
}

.contact .container {
    margin: 0 auto; /* keep outer container centered */
}

.contact .section-header h2,
.contact .section-header p,
.contact h2,
.contact h3,
.contact p,
.contact a{ 
    color: #F8F0EF; 
}

.contact .btn-outline{ 
    border-color: #F8F0EF; 
    color: #F8F0EF; 
}
.contact .btn-outline:hover{ 
    background: #F8F0EF; 
    color: var(--primary); 
}

.contact-content {
    display: grid;
    grid-template-columns: auto 1fr; /* photo width + content */
    column-gap: 80px;            /* fixed margin between photo and content */
    row-gap: clamp(1rem, 3vw, 2rem);
    align-items: center;         /* vertically center photo with right copy */
    justify-items: start;
    max-width: none;   /* use full container width */
    margin: 0;         /* left-aligned inside container */
}

.contact-info {
    text-align: left;
    width: 100%;
}

.contact-info h3 {
    color: #F8F0EF;
    margin-top: 0;               /* avoid pushing content down */
    margin-bottom: 1rem;
    font-family: 'Bricolage Grotesque', Arial, sans-serif;
}

.contact-info p {
    font-size: 1.1rem;
    margin-bottom: 2rem;
    color: #F8F0EF;
    opacity: 0.9;
    font-family: 'Public Sans', Arial, sans-serif;
}

.contact-details {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
    align-items: flex-start;
}

.contact-item {
    display: flex;
    align-items: center;
    gap: 1rem;
    flex-direction: row;
}

.contact-item i {
    font-size: 1.5rem;
    color: #F8F0EF;
    width: 30px;
}

.contact-item h4 {
    margin: 0;
    color: #F8F0EF;
    font-size: 1rem;
    font-family: 'Public Sans', Arial, sans-serif;
}

.contact-item a {
    color: var(--accent);
    text-decoration: none;
    font-weight: 500;
    transition: color 0.3s ease;
    font-family: 'Public Sans', Arial, sans-serif;
}

.contact-item a:hover {
    color: #F8F0EF;
}

.contact-image {
    display: flex;
    justify-content: flex-start; /* Left align photo on desktop */
    align-items: center;
    align-self: center;          /* vertically center vs right copy */
}

.contact-profile-image {
    width: 400px;
    height: 400px;
    border-radius: var(--radius-lg);
    object-fit: cover;
    object-position: center;
    box-shadow: var(--shadow-md);
    border: none;
    transition: transform 0.3s ease;
}

.contact-profile-image:hover {
    transform: scale(1.02);
}

/* Footer */
.footer {
    background: var(--surface);
    color: var(--text);
    padding: 3rem 0 1rem;
    border-top: 2px solid var(--text);
}

.footer-content {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(min(250px, 100%), 1fr));
    gap: clamp(1.5rem, 3vw, 2rem);
    margin-bottom: 2rem;
}

.footer-section h3,
.footer-section h4 {
    color: var(--primary);
    margin-bottom: 1rem;
    font-family: 'Public Sans', Arial, sans-serif;
}

.footer-section p {
    color: var(--text);
    opacity: 0.8;
    font-family: 'Public Sans', Arial, sans-serif;
}

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

.footer-section ul li {
    margin-bottom: 0.5rem;
    color: var(--text);
    opacity: 0.8;
    font-family: 'Public Sans', Arial, sans-serif;
}

/* Footer Horizontal Navigation Styles */
.footer-nav-horizontal {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 2.5rem;
    flex-wrap: wrap;
    margin-bottom: 2rem;
}

.footer-nav-horizontal a {
    color: var(--text-dark);
    text-decoration: none;
    font-family: 'Public Sans', Arial, sans-serif;
    font-weight: 600;
    font-size: 1rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    transition: color 0.3s ease;
    opacity: 0.9;
}

.footer-nav-horizontal a:hover {
    color: var(--primary-color);
    opacity: 1;
}

.social-links {
    display: flex;
    gap: 1rem;
}

.social-links a {
    color: var(--primary);
    font-size: 1.5rem;
    transition: color 0.3s ease;
}

.social-links a:hover {
    color: var(--accent);
}

.footer-bottom {
    border-top: 1px solid rgba(84, 0, 241, 0.1);
    padding-top: 2rem;
    margin-top: 3rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 1rem;
    color: var(--text);
    opacity: 0.7;
    font-family: 'Public Sans', Arial, sans-serif;
}

.footer-links {
    display: flex;
    gap: 2rem;
}

.footer-links a {
    color: var(--text);
    text-decoration: none;
    font-weight: 500;
    transition: color 0.3s ease;
    font-family: 'Public Sans', Arial, sans-serif;
}

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

/* Responsive Design */
@media (max-width: 768px) {
    .hamburger {
        display: flex;
    }

    .nav-menu {
        position: fixed;
        left: -100%;
        top: 70px;
        flex-direction: column;
        background-color: var(--surface);
        width: 100%;
        text-align: center;
        transition: 0.3s;
        box-shadow: var(--shadow-sm);
        padding: 2rem 0;
    }

    .nav-menu.active {
        left: 0;
    }

    .about-content {
        grid-template-columns: 1fr;
        grid-template-rows: auto auto auto; /* text, stats, photo */
        gap: 2rem;
        text-align: left;
    }

    /* Order items: text → stats → photo */
    .about-text { grid-column: 1; grid-row: 1; }
    .about-stats { grid-column: 1; grid-row: 2; margin-top: 0; }
    .about-image { grid-column: 1; grid-row: 3; align-self: center; }

    /* Stack stats vertically on mobile */
    .about-stats {
        flex-direction: column;
        align-items: center;
        justify-content: center;
        text-align: center;
        gap: 1rem;
    }

    .about-profile-image {
        width: 350px;
        height: 350px;
    }

    .contact-content {
        grid-template-columns: 1fr;
        grid-template-rows: auto auto; /* photo above, text below */
        gap: 2rem;
        text-align: center;
    }
    
    .contact-image { 
        grid-column: 1; 
        grid-row: 1; 
        justify-content: center;
        justify-self: center;
        width: 100%;
    }
    
    .contact-info { grid-column: 1; grid-row: 2; text-align: left; }
    
    .contact-details {
        align-items: flex-start; /* Linksbündig für einheitliche Ausrichtung */
    }

    .contact-profile-image {
        width: 350px;
        height: 350px;
    }

    .hero-title {
        font-size: 3.2rem;
    }
    
    .hero-subtitle {
        font-size: 1.4rem;
    }

    .section-header h2 {
        font-size: 20px; /* Tablet */
        text-align: left;
    }

    /* References: keine zusätzlichen Innenabstände; Slider bleibt transform-basiert */
    .references-scroll-container { padding: 0; padding-bottom: 72px; }
    .references-scroll { overflow-x: hidden !important; }
    .references-arrows { bottom: 12px; gap: 1rem; }
    .references-arrow { width: 44px; height: 44px; font-size: 1rem; }
}

/* Additional responsive breakpoints */
@media (max-width: 1024px) {
    .services-grid {
        grid-template-columns: repeat(auto-fit, minmax(min(280px, 100%), 1fr));
        gap: clamp(1.5rem, 3vw, 2rem);
    }
    
    .approach-grid {
        grid-template-columns: repeat(auto-fit, minmax(min(280px, 100%), 1fr));
        gap: clamp(1.5rem, 3vw, 2rem);
    }
    
    .about-profile-image {
        width: min(350px, 80vw);
        height: min(350px, 80vw);
    }
    
    .contact-profile-image {
        width: min(350px, 80vw);
        height: min(350px, 80vw);
    }
}

@media (max-width: 480px) {
    .hero-title {
        font-size: clamp(2rem, 8vw, 2.8rem);
    }
    
    .hero-subtitle {
        font-size: clamp(1rem, 4vw, 1.3rem);
    }
    
    .section-header h2 {
        font-size: 16px; /* Mobile */
        text-align: left;
    }
    
    .about-profile-image,
    .contact-profile-image {
        width: min(300px, 90vw);
        height: min(300px, 90vw);
    }

    /* Keep tighter mobile gutter in hero */
    .hero-container { padding: 0 15px; }
    
    .service-card,
    .approach-item,
    .reference-card {
        padding: clamp(1.25rem, 3.5vw, 1.75rem);
        padding-right: clamp(0.75rem, 3vw, 1rem); /* tighter right padding on mobile */
    }
    
    .footer-nav-horizontal {
        flex-direction: column;
        gap: 1rem;
        text-align: center;
    }
}

@media (max-width: 600px) {
    /* Mobil: eine Karte pro Slide, volle Spaltenbreite */
    .reference-slide { grid-template-columns: 1fr; gap: 0; }
    .reference-card { flex: 0 0 100%; min-width: 100%; max-width: 100%; width: 100%; }
    .reference-card { padding: 1.25rem 0.5rem 1.25rem 1.25rem; }
    /* Pfeilleiste sicher unterhalb der Karten halten */
    .references-scroll-container { padding-bottom: 92px; }

    /* Hero: heller Glas-Hintergrund hinter dem Text, Textfarben bleiben erhalten */
    .hero-card {
        background: rgba(254, 251, 245, 0.56); /* sehr subtil */
        -webkit-backdrop-filter: blur(2px);
        backdrop-filter: blur(2px);
        border: 1px solid rgba(14, 1, 13, 0.04);
        border-radius: 12px;
        box-shadow: 0 4px 12px rgba(0, 0, 0, 0.06);
        padding: 2rem 0; /* keine seitlichen Innenabstände auf Mobile */
        margin: 1rem 0;  /* bündig mit Container-Gutter */
    }
}

/* Ensure hero title brand color is visible everywhere */
.hero-title { color: var(--primary) !important; }
    .hero-bg-image {
        object-position: 40% center;
    }
    
    .hero-container {
        margin-top: 20vh;
        padding: 0 15px; /* gleiche Mobile-Gutter wie .container */
    }
    
    .hero-card {
        padding: 2rem;
        margin: 1rem;
    }
    
    .hero-title {
        font-size: 2.8rem;
    }
    
    .hero-subtitle {
        font-size: 1.3rem;
    }

    .about-profile-image,
    .contact-profile-image {
        width: 300px;
        height: 300px;
    }

    .btn, .btn-primary, .btn-secondary, .btn-outline {
        padding: 0.8rem 1.5rem;
        font-size: 0.95rem;
    }


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

    .reference-card { padding: 1.25rem 0.5rem 1.25rem 1.25rem; }
}

/* Modal Styles */
.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(5px);
    animation: fadeIn 0.3s ease;
}

.modal-content {
    background-color: #fefbf5;
    margin: 5% auto;
    padding: 0;
    border-radius: 12px;
    width: 90%;
    max-width: 600px;
    max-height: 80vh;
    overflow-y: auto;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    animation: slideIn 0.3s ease;
    position: relative;
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 2rem 2rem 1rem 2rem;
    border-bottom: 1px solid #e5e7eb;
}

.modal-header h2 {
    margin: 0;
    font-family: 'Bricolage Grotesque', sans-serif;
    font-size: 2rem;
    font-weight: 700;
    color: var(--text-dark);
}

.modal-close {
    color: var(--text-dark);
    font-size: 2rem;
    font-weight: bold;
    cursor: pointer;
    line-height: 1;
    transition: color 0.3s ease;
    user-select: none;
}

.modal-close:hover,
.modal-close:focus {
    color: var(--primary-color);
}

.modal-body {
    padding: 1rem 2rem 2rem 2rem;
}

.impressum-section {
    margin-bottom: 2rem;
}

.impressum-section:not(:last-child) {
    border-bottom: 1px solid #e5e7eb;
    padding-bottom: 1.5rem;
}

.impressum-section h3 {
    font-family: 'Bricolage Grotesque', Arial, sans-serif;
    font-size: 1.2rem;
    font-weight: 600;
    color: var(--primary-color);
    margin: 0 0 1rem 0;
}

.impressum-section p {
    font-family: 'Public Sans', Arial, sans-serif;
    font-size: 1rem;
    line-height: 1.6;
    color: var(--text-dark);
    margin: 0;
}

.impressum-section a {
    color: var(--primary-color);
    text-decoration: none;
    transition: color 0.3s ease;
}

.impressum-section a:hover {
    color: var(--text-dark);
    text-decoration: underline;
}

/* Datenschutz Section Styles */
.datenschutz-section {
    margin-bottom: 2rem;
}

.datenschutz-section:not(:last-child) {
    border-bottom: 1px solid #e5e7eb;
    padding-bottom: 1.5rem;
}

.datenschutz-section h3 {
    font-family: 'Bricolage Grotesque', Arial, sans-serif;
    font-size: 1.2rem;
    font-weight: 600;
    color: var(--primary-color);
    margin: 0 0 1rem 0;
}

.datenschutz-section p {
    font-family: 'Public Sans', Arial, sans-serif;
    font-size: 1rem;
    line-height: 1.6;
    color: var(--text-dark);
    margin: 0;
}

.datenschutz-section a {
    color: var(--primary-color);
    text-decoration: none;
    transition: color 0.3s ease;
}

.datenschutz-section a:hover {
    color: var(--text-dark);
    text-decoration: underline;
}

/* Modal Animations */
@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes slideIn {
    from {
        opacity: 0;
        transform: translateY(-50px) scale(0.9);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

/* Responsive Modal Styles */
@media (max-width: 768px) {
    .modal-content {
        width: 95%;
        margin: 10% auto;
        max-height: 85vh;
    }
    
    .modal-header {
        padding: 1.5rem 1.5rem 1rem 1.5rem;
    }
    
    .modal-header h2 {
        font-size: 1.6rem;
    }
    
    .modal-body {
        padding: 1rem 1.5rem 1.5rem 1.5rem;
    }
    
    .impressum-section {
        margin-bottom: 1.5rem;
    }
    
    .impressum-section:not(:last-child) {
        padding-bottom: 1rem;
    }
}

@media (max-width: 480px) {
    .modal-content {
        width: 98%;
        margin: 5% auto;
        border-radius: 8px;
    }
    
    .modal-header {
        padding: 1.2rem 1.2rem 0.8rem 1.2rem;
    }
    
    .modal-header h2 {
        font-size: 1.4rem;
    }
    
    .modal-body {
        padding: 0.8rem 1.2rem 1.2rem 1.2rem;
    }
    
    .impressum-section h3 {
        font-size: 1.1rem;
    }
    
    .impressum-section p {
        font-size: 0.95rem;
    }
    
    .footer-nav-horizontal {
        gap: 1.5rem;
        flex-direction: column;
    }
    
    .footer-nav-horizontal a {
        font-size: 0.9rem;
    }
    
    .reference-card {
        /* Wider cards on small tablets; phones override below at 600px */
        flex: 0 0 min(480px, 80vw);
        min-width: min(480px, 80vw);
        max-width: min(480px, 80vw);
        padding: 2rem;
    }
    
    .references-scroll {
        gap: 1.5rem;
    }
    
    .references-arrow {
        width: 40px;
        height: 40px;
        font-size: 1rem;
    }
    
    .references-scroll-container { padding: 0; padding-bottom: 92px; }
    
    .references-arrow-left {
        left: 5px;
    }
    
    .references-arrow-right {
        right: 5px;
    }
}

/* Cookie Banner Styles - Responsive and Accessible */
.cookie-banner {
    position: fixed;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%) translateY(120%);
    z-index: 1001;
    background: #fefbf5;
    border: 2px solid var(--primary-color);
    border-radius: 12px;
    box-shadow: 0 4px 24px rgba(0, 0, 0, 0.15);
    padding: 1rem 1.25rem;
    padding-bottom: max(1rem, env(safe-area-inset-bottom));
    transition: transform 0.3s ease;
    max-width: min(600px, calc(100vw - 40px));
    width: auto;
}

.cookie-banner.show {
    transform: translateX(-50%) translateY(0);
}

.cookie-banner-content {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    width: 100%;
    position: relative;
    padding-right: 2.5rem; /* space for close button */
}

/* Final mobile overrides to ensure tight right padding on reference cards */
@media (max-width: 600px) {
  .reference-slide { gap: 0 !important; }
  .reference-card {
    padding: 1.25rem 0.5rem 1.25rem 1.25rem !important;
    max-width: 100% !important;
    min-width: 100% !important;
    flex: 0 0 100% !important;
  }
}
@media (max-width: 480px) {
  .reference-card { padding: 1.25rem 0.5rem 1.25rem 1.25rem !important; }
}

.cookie-banner-text h3 {
    font-family: 'Bricolage Grotesque', Arial, sans-serif;
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--primary-color);
    margin: 0 0 0.35rem 0;
}

.cookie-banner-text p {
    font-family: 'Public Sans', Arial, sans-serif;
    font-size: 0.9rem;
    line-height: 1.4;
    color: var(--text-dark);
    margin: 0;
}

.cookie-banner-buttons {
    display: flex;
    align-items: center;
    flex-shrink: 0;
}

.cookie-banner-close {
    position: absolute;
    right: 6px;
    top: 6px;
    background: transparent;
    color: #666;
    border: none;
    padding: 0;
    line-height: 1;
    font-weight: 400;
    font-size: 1.2rem;
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    z-index: 2;
    transition: color 0.2s ease;
}

.cookie-banner-close:hover,
.cookie-banner-close:focus-visible {
    color: var(--text);
}

.cookie-banner-button {
    background: var(--primary-color);
    color: #F8F0EF;
    border: none;
    padding: 0.6rem 1.25rem;
    border-radius: 8px;
    font-family: 'Public Sans', Arial, sans-serif;
    font-weight: 600;
    font-size: 0.9rem;
    cursor: pointer;
    transition: all 0.2s ease;
    white-space: nowrap;
}

.cookie-banner-button:hover {
    background: var(--primary-hover);
    transform: translateY(-1px);
    box-shadow: 0 2px 8px rgba(84, 0, 241, 0.3);
}

/* Responsive Cookie Banner - Stack on narrow screens */
@media (max-width: 768px) {
    .cookie-banner {
        bottom: 0;
        left: 0;
        right: 0;
        max-width: 100%;
        border-radius: 16px 16px 0 0;
        border-left: none;
        border-right: none;
        border-bottom: none;
        transform: translateY(100%);
    }
    
    .cookie-banner.show {
        transform: translateY(0);
    }
    
    .cookie-banner-content {
        flex-direction: column;
        text-align: center;
        gap: 0.75rem;
        padding-right: 1rem;
    }
    
    .cookie-banner-text h3 {
        margin-top: 0.5rem;
    }
    
    .cookie-banner-buttons {
        justify-content: center;
        width: 100%;
    }
    
    .cookie-banner-button {
        width: 100%;
        max-width: 220px;
    }
}

/* Disable purple hover underline/line animations sitewide (except main nav) */
.btn-secondary::before,
.btn-outline::before,
.card::before,
.service-card::before,
.approach-item::before,
.reference-card::before {
    content: none !important;
}