/* ==================================== */
/*              JBS  CSS                */
/* ==================================== */

/* ===== Local Variable Font Definition ===== */
@font-face {
    font-family: 'Inter';
    src: url('fonts/Inter-VariableFont_opsz,wght.woff2') format('woff2-variations'),
        url('fonts/Inter-VariableFont_opsz,wght.ttf') format('truetype-variations');
    font-weight: 100 900;
    font-style: normal;
    font-display: swap;
    font-optical-sizing: auto;
}

:root {
    --primary-color: #091d22;
    --secondary-color: #fff;
    --accent-color: #0a2e3a;
    --text-color: #f0f0f0;
    --text-dark: #333;
    --transition-slow: 0.6s cubic-bezier(0.4, 0, 0.2, 1);
    --transition-medium: 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    --transition-fast: 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    --glass-background: rgba(255, 255, 255, 0.07);
    --glass-border: rgba(255, 255, 255, 0.1);
    --glass-shadow: 0 8px 32px rgba(0, 0, 0, 0.2);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

/* ===== Global Styles ===== */
html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Inter', sans-serif;
    background-color: var(--primary-color);
    color: var(--text-color);
    overflow-x: hidden;
    line-height: 1.5;
}

.container {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 2rem;
}

/* Glass effect mixin */
.glass-effect {
    background: var(--glass-background);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid var(--glass-border);
    border-radius: 10px;
    box-shadow: var(--glass-shadow);
    transition: all var(--transition-medium);
}

/* ===== Header & Navigation ===== */
header {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 1000;
    padding: 1.5rem 0;
    transition: background-color var(--transition-medium), padding var(--transition-medium), border-color var(--transition-medium);
    background-color: transparent;
    /* Start transparent */
    border-bottom: 1px solid transparent;
    /* Use transparent border for smoother transition */
}

header.scrolled {
    background-color: rgba(9, 29, 34, 0.8);
    backdrop-filter: blur(15px);
    -webkit-backdrop-filter: blur(15px);
    box-shadow: 0 5px 25px rgba(0, 0, 0, 0.3);
    padding: 1rem 0;
    border-bottom: 1px solid var(--glass-border);
    /* Border appears on scroll */
}

.header-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo-link {
    line-height: 0;
    /* Prevent extra space below logo */
    display: inline-block;
    /* Ensure proper layout */
}

.logo {
    max-width: 150px;
    height: auto;
    z-index: 10;
    transition: transform var(--transition-medium);
}

.logo:hover {
    transform: scale(1.05);
}

.nav-toggle {
    display: none;
    background: none;
    border: none;
    cursor: pointer;
    z-index: 1001;
    /* Ensure above scrolled header */
}

.nav-toggle span {
    display: block;
    width: 30px;
    height: 2px;
    margin: 6px 0;
    background-color: var(--secondary-color);
    transition: var(--transition-medium);
}

/* Nav Toggle Active State */
.nav-toggle.active span:nth-child(1) {
    transform: translateY(8px) rotate(45deg);
}

.nav-toggle.active span:nth-child(2) {
    opacity: 0;
}

.nav-toggle.active span:nth-child(3) {
    transform: translateY(-8px) rotate(-45deg);
}

nav {
    z-index: 999;
}

nav ul {
    display: flex;
    list-style: none;
    gap: 2.5rem;
}

nav ul li a {
    color: var(--secondary-color);
    text-decoration: none;
    font-size: 1rem;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 1px;
    position: relative;
    transition: color var(--transition-medium);
}

nav ul li a::after {
    content: '';
    position: absolute;
    bottom: -4px;
    left: 0;
    width: 0;
    height: 2px;
    background-color: var(--secondary-color);
    transition: width var(--transition-medium), transform var(--transition-medium);
    transform: translateX(0);
}

nav ul li a:hover {
    color: rgba(255, 255, 255, 0.95);
}

nav ul li a:hover::after {
    width: 100%;
    transform: translateX(0);
}

/* Mobile Overlay */
.overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.7);
    z-index: 998;
    /* Below nav */
    display: none;
    opacity: 0;
    transition: opacity var(--transition-medium);
}

.overlay.active {
    display: block;
    opacity: 1;
}

/* ===== Hero Section (Index Page) ===== */
.hero {
    position: relative;
    height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

.hero-bg {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image: linear-gradient(rgba(9, 29, 34, 0.7), rgba(9, 29, 34, 0.8)), url('images/background.jpg');
    background-size: cover;
    background-position: center;
    z-index: -1;
    animation: heroZoom 15s infinite alternate ease-in-out;
}

@keyframes heroZoom {
    0% {
        transform: scale(1);
    }

    100% {
        transform: scale(1.1);
    }
}

.hero-content {
    text-align: center;
    z-index: 2;
    max-width: 800px;
    margin: 4rem auto 0;
    opacity: 0;
    transform: translateY(30px);
    animation: fadeIn 1s forwards 0.5s;
    width: 100%;
}

.hero-title {
    font-size: 3rem;
    font-weight: 600;
    line-height: 1.2;
    margin-bottom: 1.5rem;
    letter-spacing: 1px;
}

.hero-buttons {
    display: flex;
    gap: 1.5rem;
    justify-content: center;
    margin-top: 3rem;
}

.btn {
    display: inline-block;
    padding: 1rem 2.5rem;
    border-radius: 2rem;
    font-size: 1rem;
    font-weight: 500;
    text-decoration: none;
    text-align: center;
    cursor: pointer;
    transition: all var(--transition-medium);
    position: relative;
    overflow: hidden;
    z-index: 1;
    backdrop-filter: blur(5px);
    -webkit-backdrop-filter: blur(5px);
}

.btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 0;
    height: 100%;
    background-color: rgba(255, 255, 255, 0.1);
    transition: width var(--transition-medium);
    z-index: -1;
}

.btn:hover::before {
    width: 100%;
}

.btn-primary {
    background-color: rgba(255, 255, 255, 0.9);
    color: var(--primary-color);
    border: 1px solid rgba(255, 255, 255, 0.8);
}

.btn-primary:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 30px rgba(0, 0, 0, 0.3);
    background-color: rgba(255, 255, 255, 1);
}

.btn-secondary {
    background-color: rgba(255, 255, 255, 0.05);
    color: var(--secondary-color);
    border: 1px solid rgba(255, 255, 255, 0.3);
}

.btn-secondary:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 30px rgba(0, 0, 0, 0.3);
    background-color: rgba(255, 255, 255, 0.15);
}

/* ===== Common Section Styling ===== */
.section {
    padding: 8rem 0;
    position: relative;
}

.section-title {
    text-align: center;
    font-size: 2.5rem;
    font-weight: 600;
    margin-bottom: 4rem;
    position: relative;
    letter-spacing: 2px;
}

.section-title::after {
    content: '';
    position: absolute;
    bottom: -15px;
    left: 50%;
    transform: translateX(-50%);
    width: 80px;
    height: 3px;
    background: linear-gradient(90deg, rgba(255, 255, 255, 0.1) 0%, rgba(255, 255, 255, 0.8) 50%, rgba(255, 255, 255, 0.1) 100%);
    transition: width var(--transition-medium);
}

.section:hover .section-title::after,
.section-title.fade-in.animate::after {
    /* Apply hover state when animated */
    width: 120px;
}


/* ===== Services Section (Index Page) ===== */
.tabs {
    width: 100%;
    margin-top: 3rem;
}

.tab-nav {
    display: flex;
    justify-content: center;
    margin-bottom: 3rem;
    gap: 1.5rem;
    flex-wrap: wrap;
}

.tab-button {
    padding: 1rem 2rem;
    background-color: rgba(255, 255, 255, 0.05);
    color: var(--secondary-color);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 2rem;
    cursor: pointer;
    font-size: 1rem;
    font-weight: 500;
    transition: all var(--transition-medium);
    backdrop-filter: blur(5px);
    -webkit-backdrop-filter: blur(5px);
}

.tab-button:hover {
    background-color: rgba(255, 255, 255, 0.1);
    transform: translateY(-3px);
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.15);
}

.tab-button.active {
    background-color: rgba(255, 255, 255, 0.95);
    color: var(--primary-color);
    border: 1px solid rgba(255, 255, 255, 0.8);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}

.tab-content {
    display: none;
    animation: fadeIn 0.5s ease forwards;
}

.tab-content.active {
    display: block;
}

/* --- START: Gallery Styles Refactoring --- */

/* A) Service Gallery Styling (Index Page Tabs) - General Rule */
.service-gallery {
    display: grid;
    grid-template-columns: repeat(auto-fit, 360px);
    /* Larger fixed width */
    gap: 1.5rem;
    margin-bottom: 3rem;
    justify-content: center;
    /* Center items horizontally */
}

.service-gallery-item {
    overflow: hidden;
    border-radius: 10px;
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.12);
    transition: all var(--transition-medium);
    cursor: pointer;
    border: 1px solid rgba(255, 255, 255, 0.05);
    position: relative;
    background-color: rgba(255, 255, 255, 0.03);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    opacity: 0;
    transform: translateY(30px);
    aspect-ratio: 4 / 3;
    /* Keep aspect ratio */
}

/* Animation for service gallery items */
.service-gallery-item.fade-in {
    animation: fadeIn 0.8s cubic-bezier(0.215, 0.61, 0.355, 1) forwards;
}

.service-gallery-item::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(to bottom, rgba(0, 0, 0, 0) 75%, rgba(0, 0, 0, 0.5) 100%);
    z-index: 1;
    opacity: 0.4;
    transition: opacity var(--transition-medium);
    pointer-events: none;
}

.service-gallery-item:hover {
    transform: translateY(-8px) scale(1.04);
    box-shadow: 0 15px 30px rgba(0, 0, 0, 0.25);
    border-color: rgba(255, 255, 255, 0.1);
}

.service-gallery-item:hover::before {
    opacity: 0.6;
}

.service-gallery-item img {
    width: 100%;
    height: 100%;
    /* Fill container */
    object-fit: cover;
    /* Cover the area */
    transition: transform 0.6s cubic-bezier(0.215, 0.61, 0.355, 1);
    cursor: pointer;
    display: block;
}

.service-gallery-item:hover img {
    transform: scale(1.1);
}

/* B) Main Gallery Grid Styling (Galerie Page) */
.gallery-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 1.5rem;
    margin-top: 3rem;
}

.gallery-item {
    overflow: hidden;
    border-radius: 12px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.15);
    transition: all var(--transition-medium);
    cursor: pointer;
    border: 1px solid rgba(255, 255, 255, 0.05);
    position: relative;
    background-color: rgba(255, 255, 255, 0.03);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    opacity: 0;
    transform: translateY(30px);
    aspect-ratio: 4 / 3;
    /* Keep aspect ratio */
}

/* Animation applied via JS or directly if JS isn't handling it */
.gallery-item.fade-in {
    animation: fadeIn 0.8s cubic-bezier(0.215, 0.61, 0.355, 1) forwards;
    animation-delay: calc(var(--item-index, 0) * 0.1s + 0.2s);
}

.gallery-item::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(to bottom, rgba(0, 0, 0, 0) 70%, rgba(0, 0, 0, 0.7) 100%);
    z-index: 1;
    opacity: 0.5;
    transition: opacity var(--transition-medium);
    pointer-events: none;
}

.gallery-item:hover {
    transform: translateY(-15px) scale(1.03);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.3);
    border-color: rgba(255, 255, 255, 0.1);
}

.gallery-item:hover::before {
    opacity: 0.7;
}

.gallery-item img {
    width: 100%;
    height: 100%;
    /* Fill container */
    object-fit: cover;
    /* Cover the area */
    transition: transform 0.7s cubic-bezier(0.215, 0.61, 0.355, 1);
    cursor: pointer;
    display: block;
}

.gallery-item:hover img {
    transform: scale(1.12);
}

/* --- END: Gallery Styles Refactoring --- */


/* Service Item Grid (Index Page - Unrelated to galleries) */
.services-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    /* Explicitly 3 columns for desktop */
    grid-template-rows: repeat(2, auto);
    /* Explicitly 2 rows */
    gap: 1.5rem;
    margin-top: 3rem;
}

.service-item {
    background-color: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.1);
    padding: 1.5rem;
    border-radius: 8px;
    text-align: center;
    transition: all var(--transition-medium);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.05);
    min-height: 80px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.95rem;
}

.service-item:hover {
    transform: translateY(-8px) scale(1.03);
    background-color: rgba(255, 255, 255, 0.08);
    box-shadow: 0 15px 30px rgba(0, 0, 0, 0.15);
    border-color: rgba(255, 255, 255, 0.2);
}

/* ===== Stats Section (Index Page) ===== */
.stats-section {
    background-color: rgba(255, 255, 255, 0.02);
    padding: 6rem 0;
    position: relative;
    overflow: hidden;
}

.stats-section::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, rgba(255, 255, 255, 0.03) 0%, rgba(0, 0, 0, 0) 70%);
    z-index: 0;
    animation: pulse 15s infinite alternate ease-in-out;
    pointer-events: none;
}

@keyframes pulse {
    0% {
        transform: scale(1);
        opacity: 0.5;
    }

    100% {
        transform: scale(1.2);
        opacity: 0.8;
    }
}

.stats-container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
    position: relative;
    z-index: 1;
}

.stat-item {
    text-align: center;
    padding: 2.5rem 2rem;
    border-radius: 16px;
    transition: all var(--transition-medium);
    background-color: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
}

.stat-item:hover {
    transform: translateY(-15px) scale(1.05);
    background-color: rgba(255, 255, 255, 0.07);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.2);
    border-color: rgba(255, 255, 255, 0.15);
}

.stat-number {
    font-size: 3.5rem;
    font-weight: 700;
    margin-bottom: 1.5rem;
    background: linear-gradient(90deg, #f0f0f0, #8a8a8a);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    transition: all var(--transition-medium);
}

.stat-item:hover .stat-number {
    background: linear-gradient(90deg, #ffffff, #b3b3b3);
    -webkit-background-clip: text;
    background-clip: text;
    transform: scale(1.1);
}

.stat-label {
    font-size: 1.2rem;
    font-weight: 400;
    color: var(--text-color);
    transition: all var(--transition-medium);
}

.stat-item:hover .stat-label {
    letter-spacing: 0.5px;
}

/* ===== Why Choose Us Section (Index Page) ===== */
.why-us-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 3rem;
}

.why-us-item {
    padding: 2.5rem;
    background-color: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 16px;
    transition: all var(--transition-medium);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.1);
    position: relative;
    overflow: hidden;
}

.why-us-item::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: radial-gradient(circle at top right, rgba(255, 255, 255, 0.1) 0%, rgba(255, 255, 255, 0) 70%);
    opacity: 0;
    transition: opacity var(--transition-medium);
    pointer-events: none;
}

.why-us-item:hover {
    transform: translateY(-15px) scale(1.02);
    background-color: rgba(255, 255, 255, 0.06);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.2);
    border-color: rgba(255, 255, 255, 0.15);
}

.why-us-item:hover::before {
    opacity: 1;
}

.why-us-title {
    font-size: 1.5rem;
    font-weight: 600;
    margin-bottom: 1.5rem;
    position: relative;
    padding-bottom: 1rem;
}

.why-us-title::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 50px;
    height: 2px;
    background: linear-gradient(90deg, rgba(255, 255, 255, 0.8) 0%, rgba(255, 255, 255, 0.1) 100%);
    transition: width var(--transition-medium);
}

.why-us-item:hover .why-us-title::after {
    width: 80px;
}

.why-us-text {
    font-size: 1rem;
    line-height: 1.7;
    color: rgba(255, 255, 255, 0.8);
    transition: color var(--transition-medium);
}

.why-us-item:hover .why-us-text {
    color: rgba(255, 255, 255, 0.95);
}

.summary-text {
    text-align: center;
    max-width: 800px;
    margin: 5rem auto 0;
    font-size: 1.3rem;
    line-height: 1.8;
    color: rgba(255, 255, 255, 0.9);
    padding: 2rem;
    background-color: rgba(255, 255, 255, 0.03);
    border-radius: 16px;
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
    transition: all var(--transition-medium);
}

.summary-text:hover {
    transform: translateY(-5px);
    background-color: rgba(255, 255, 255, 0.05);
    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.15);
    border-color: rgba(255, 255, 255, 0.15);
}

/* ===== Map Section (Index Page) ===== */
.map-section {
    padding: 6rem 0;
    position: relative;
}

.map-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(45deg, rgba(10, 46, 58, 0.3) 0%, rgba(9, 29, 34, 0) 70%);
    z-index: 0;
    pointer-events: none;
}

.map-container {
    height: 500px;
    border-radius: 20px;
    overflow: hidden;
    position: relative;
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.2);
    border: 1px solid rgba(255, 255, 255, 0.1);
    z-index: 1;
}

.map-placeholder {
    width: 100%;
    height: 100%;
    background-color: rgba(255, 255, 255, 0.02);
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    overflow: hidden;
}

.consent-slider {
    background: rgba(255, 255, 255, 0.95);
    padding: 3rem;
    border-radius: 20px;
    box-shadow: 0 25px 50px rgba(0, 0, 0, 0.3);
    max-width: 600px;
    width: 90%;
    /* Ensure it fits on smaller screens */
    text-align: center;
    position: relative;
    z-index: 2;
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.8);
    animation: fade-up 0.6s ease-out;
}

@keyframes fade-up {
    0% {
        opacity: 0;
        transform: translateY(30px);
    }

    100% {
        opacity: 1;
        transform: translateY(0);
    }
}

.consent-slider p {
    color: var(--text-dark);
    margin-bottom: 1.5rem;
    line-height: 1.7;
    font-size: 1.1rem;
}

.consent-slider p:first-of-type {
    font-size: 1.6rem;
    font-weight: 600;
    margin-bottom: 1rem;
    color: var(--accent-color);
}

.consent-slider a {
    color: var(--accent-color);
    font-weight: 600;
    text-decoration: none;
    position: relative;
    transition: all var(--transition-fast);
}

.consent-slider a::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    width: 0;
    height: 1px;
    background-color: var(--accent-color);
    transition: width var(--transition-medium);
}

.consent-slider a:hover {
    color: #0c3545;
}

.consent-slider a:hover::after {
    width: 100%;
}

.consent-slider button {
    background-color: var(--accent-color);
    color: var(--secondary-color);
    border: none;
    padding: 1rem 2rem;
    border-radius: 30px;
    cursor: pointer;
    font-size: 1.1rem;
    font-weight: 500;
    transition: all var(--transition-medium);
    margin-top: 1.5rem;
    box-shadow: 0 10px 20px rgba(10, 46, 58, 0.2);
    position: relative;
    overflow: hidden;
    margin-bottom: 1rem;
}

.consent-slider button::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 0;
    height: 100%;
    background-color: rgba(255, 255, 255, 0.1);
    transition: width var(--transition-medium);
    z-index: 0;
}

.consent-slider button:hover {
    background-color: #0c3545;
    transform: translateY(-5px);
    box-shadow: 0 15px 30px rgba(10, 46, 58, 0.3);
}

.consent-slider button:hover::before {
    width: 100%;
}

/* ===== Page Specific Sections (Galerie, Impressum, Datenschutz, Über Uns) ===== */

/* ----- Galerie Page ----- */
.gallery-section {
    padding: 10rem 0 6rem;
    position: relative;
    background-color: var(--primary-color);
}

.gallery-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: radial-gradient(circle, rgba(10, 46, 58, 0.4) 0%, rgba(9, 29, 34, 0) 70%);
    z-index: 0;
    pointer-events: none;
}

/* Styles for .gallery-grid and .gallery-item are now defined above */
.gallery-title {
    /* Title specific to galerie.html */
    color: var(--secondary-color);
    font-size: 2.5rem;
    margin-bottom: 2.5rem;
    text-align: center;
    position: relative;
}

.gallery-title::after {
    content: '';
    position: absolute;
    bottom: -15px;
    left: 50%;
    transform: translateX(-50%);
    width: 80px;
    height: 3px;
    background: linear-gradient(90deg, rgba(255, 255, 255, 0.1) 0%, rgba(255, 255, 255, 0.8) 50%, rgba(255, 255, 255, 0.1) 100%);
}

/* ----- Impressum Page ----- */
.impressum-section {
    padding: 10rem 0 6rem;
    position: relative;
    background-color: var(--primary-color);
}

.impressum-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: radial-gradient(circle, rgba(10, 46, 58, 0.4) 0%, rgba(9, 29, 34, 0) 70%);
    z-index: 0;
    pointer-events: none;
}

.impressum-container {
    position: relative;
    z-index: 1;
    max-width: 900px;
    margin: 0 auto;
    padding: 3rem;
    background-color: rgba(255, 255, 255, 0.03);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.15);
    border-radius: 20px;
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    opacity: 0;
    transform: scale(0.9);
    animation: scaleIn 0.8s cubic-bezier(0.215, 0.61, 0.355, 1) forwards;
    animation-delay: 0.2s;
}

.impressum-title {
    color: var(--secondary-color);
    font-size: 2.5rem;
    margin-bottom: 2.5rem;
    text-align: center;
    position: relative;
}

.impressum-title::after {
    content: '';
    position: absolute;
    bottom: -15px;
    left: 50%;
    transform: translateX(-50%);
    width: 80px;
    height: 3px;
    background: linear-gradient(90deg, rgba(255, 255, 255, 0.1) 0%, rgba(255, 255, 255, 0.8) 50%, rgba(255, 255, 255, 0.1) 100%);
}

.impressum-content {
    color: var(--text-color);
    font-size: 1.1rem;
    line-height: 1.7;
}

.impressum-content h3 {
    color: rgba(255, 255, 255, 0.9);
    margin: 2rem 0 1rem;
    font-size: 1.5rem;
}

.impressum-content p {
    margin-bottom: 1rem;
    color: rgba(255, 255, 255, 0.8);
}

.impressum-content a {
    color: rgba(255, 255, 255, 0.9);
    text-decoration: none;
    position: relative;
    transition: all var(--transition-fast);
    word-break: break-word;
}

.impressum-content a::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    width: 0;
    height: 1px;
    background-color: rgba(255, 255, 255, 1);
    transition: width var(--transition-medium);
}

.impressum-content a:hover {
    color: rgba(255, 255, 255, 1);
}

.impressum-content a:hover::after {
    width: 100%;
}


/* ----- Datenschutz Page ----- */
.datenschutz-section {
    padding: 10rem 0 6rem;
    position: relative;
    background-color: var(--primary-color);
}

.datenschutz-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: radial-gradient(circle, rgba(10, 46, 58, 0.4) 0%, rgba(9, 29, 34, 0) 70%);
    z-index: 0;
    pointer-events: none;
}

.datenschutz-container {
    position: relative;
    z-index: 1;
    max-width: 900px;
    margin: 0 auto;
    padding: 3rem;
    background-color: rgba(255, 255, 255, 0.03);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.15);
    border-radius: 20px;
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    opacity: 0;
    transform: scale(0.9);
    animation: scaleIn 0.8s cubic-bezier(0.215, 0.61, 0.355, 1) forwards;
    animation-delay: 0.2s;
}

.datenschutz-title {
    color: var(--secondary-color);
    font-size: 2.5rem;
    margin-bottom: 2.5rem;
    text-align: center;
    position: relative;
}

.datenschutz-title::after {
    content: '';
    position: absolute;
    bottom: -15px;
    left: 50%;
    transform: translateX(-50%);
    width: 80px;
    height: 3px;
    background: linear-gradient(90deg, rgba(255, 255, 255, 0.1) 0%, rgba(255, 255, 255, 0.8) 50%, rgba(255, 255, 255, 0.1) 100%);
}

.datenschutz-content {
    color: var(--text-color);
    font-size: 1.1rem;
    line-height: 1.7;
}

.datenschutz-content h2 {
    color: rgba(255, 255, 255, 0.95);
    margin: 2.5rem 0 1.5rem;
    font-size: 1.8rem;
    position: relative;
    padding-bottom: 0.5rem;
}

.datenschutz-content h2::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 60px;
    height: 2px;
    background: linear-gradient(90deg, rgba(255, 255, 255, 0.8) 0%, rgba(255, 255, 255, 0.1) 100%);
}

.datenschutz-content h3 {
    color: rgba(255, 255, 255, 0.9);
    margin: 2rem 0 1rem;
    font-size: 1.5rem;
}

.datenschutz-content h4 {
    color: rgba(255, 255, 255, 0.85);
    margin: 1.5rem 0 0.8rem;
    font-size: 1.25rem;
}

.datenschutz-content p {
    margin-bottom: 1rem;
    color: rgba(255, 255, 255, 0.8);
}

.datenschutz-content ul {
    margin: 1rem 0 1.5rem 1.5rem;
    color: rgba(255, 255, 255, 0.8);
}

.datenschutz-content li {
    margin-bottom: 0.5rem;
}

.datenschutz-content a {
    color: rgba(255, 255, 255, 0.9);
    text-decoration: none;
    position: relative;
    transition: all var(--transition-fast);
    word-break: break-word;
}

.datenschutz-content a::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    width: 0;
    height: 1px;
    background-color: rgba(255, 255, 255, 1);
    transition: width var(--transition-medium);
}

.datenschutz-content a:hover {
    color: rgba(255, 255, 255, 1);
}

.datenschutz-content a:hover::after {
    width: 100%;
}


/* ----- Über Uns Page ----- */
.about-section {
    padding: 10rem 0 6rem;
    position: relative;
    background-color: var(--primary-color);
}

.about-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: radial-gradient(circle, rgba(10, 46, 58, 0.4) 0%, rgba(9, 29, 34, 0) 70%);
    z-index: 0;
    pointer-events: none;
}

.about-container {
    position: relative;
    z-index: 1;
    max-width: 900px;
    margin: 0 auto;
    padding: 3rem;
    background-color: rgba(255, 255, 255, 0.03);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.15);
    border-radius: 20px;
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    opacity: 0;
    transform: scale(0.9);
    animation: scaleIn 0.8s cubic-bezier(0.215, 0.61, 0.355, 1) forwards;
    animation-delay: 0.2s;
}

.about-title {
    color: var(--secondary-color);
    font-size: 2.5rem;
    margin-bottom: 2.5rem;
    text-align: center;
    position: relative;
}

.about-title::after {
    content: '';
    position: absolute;
    bottom: -15px;
    left: 50%;
    transform: translateX(-50%);
    width: 80px;
    height: 3px;
    background: linear-gradient(90deg, rgba(255, 255, 255, 0.1) 0%, rgba(255, 255, 255, 0.8) 50%, rgba(255, 255, 255, 0.1) 100%);
}

.about-content {
    color: var(--text-color);
    font-size: 1.2rem;
    line-height: 1.8;
    color: rgba(255, 255, 255, 0.9);
}

.about-content p {
    margin-bottom: 1.5rem;
}


/* ===== Contact Section (Common) ===== */
.contact-section {
    padding: 6rem 0;
    background-color: rgba(255, 255, 255, 0.02);
    position: relative;
    overflow: hidden;
}

.contact-section::before {
    content: '';
    position: absolute;
    width: 150%;
    height: 150%;
    top: -25%;
    left: -25%;
    background: radial-gradient(ellipse at center, rgba(255, 255, 255, 0.03) 0%, rgba(255, 255, 255, 0) 70%);
    z-index: 0;
    pointer-events: none;
}

/* Added common title styling for Contact section */
.contact-section .section-title {
    margin-bottom: 4rem;
    /* Use standard margin */
}

.contact-container {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
    position: relative;
    z-index: 1;
}

.contact-info {
    display: flex;
    flex-direction: column;
}

.contact-logo {
    max-width: 180px;
    margin-bottom: 3rem;
    transition: transform var(--transition-medium);
}

.contact-logo:hover {
    transform: scale(1.05);
}

.contact-text {
    font-size: 1.1rem;
    line-height: 1.7;
    margin-bottom: 1.5rem;
    color: rgba(255, 255, 255, 0.9);
    transition: all var(--transition-medium);
}

.contact-text:hover {
    transform: translateX(5px);
    color: rgba(255, 255, 255, 1);
}

.social-icons {
    display: flex;
    gap: 1.5rem;
    margin-top: 3rem;
    flex-wrap: wrap;
}

.social-icon {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background-color: rgba(255, 255, 255, 0.05);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all var(--transition-medium);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.social-icon:hover {
    transform: translateY(-8px) scale(1.1);
    background-color: rgba(255, 255, 255, 0.1);
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.15);
    border-color: rgba(255, 255, 255, 0.2);
}

.social-icon img {
    width: 24px;
    filter: invert(1);
    transition: transform var(--transition-medium);
}

.social-icon:hover img {
    transform: scale(1.1);
}

.contact-form {
    background-color: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.1);
    padding: 3rem;
    border-radius: 20px;
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.15);
    transition: all var(--transition-medium);
}

.contact-form:hover {
    box-shadow: 0 25px 50px rgba(0, 0, 0, 0.2);
    transform: translateY(-5px);
    background-color: rgba(255, 255, 255, 0.05);
    border-color: rgba(255, 255, 255, 0.15);
}

.form-group {
    margin-bottom: 1.5rem;
}

.form-label {
    display: block;
    margin-bottom: 0.7rem;
    font-size: 1rem;
    font-weight: 500;
    color: rgba(255, 255, 255, 0.9);
    transition: color var(--transition-medium);
}

.form-group:hover .form-label {
    color: rgba(255, 255, 255, 1);
}

.form-input {
    width: 100%;
    padding: 1.2rem 1rem;
    border: 1px solid rgba(255, 255, 255, 0.1);
    background-color: rgba(255, 255, 255, 0.03);
    border-radius: 8px;
    color: var(--text-color);
    font-size: 1rem;
    transition: all var(--transition-medium);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.05) inset;
}

.form-input:focus {
    outline: none;
    border-color: rgba(255, 255, 255, 0.3);
    background-color: rgba(255, 255, 255, 0.05);
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.1) inset;
    transform: translateY(-2px);
}

textarea.form-input {
    min-height: 150px;
    resize: vertical;
}

.form-submit {
    width: 100%;
    padding: 1.2rem;
    background-color: var(--accent-color);
    color: var(--secondary-color);
    border: none;
    border-radius: 8px;
    font-size: 1.1rem;
    font-weight: 500;
    cursor: pointer;
    transition: all var(--transition-medium), background-color 0.2s ease, color 0.2s ease;
    /* Faster transition for hover */
    margin-top: 1.5rem;
    position: relative;
    overflow: hidden;
    box-shadow: 0 10px 20px rgba(10, 46, 58, 0.2);
}

/* Style for disabled button */
.form-submit:disabled {
    background-color: #555;
    /* Darker, less active color */
    cursor: not-allowed;
    opacity: 0.7;
}

.form-submit:disabled:hover {
    background-color: #555;
    color: var(--secondary-color);
    transform: none;
    box-shadow: 0 10px 20px rgba(10, 46, 58, 0.2);
}

.form-submit:disabled::before {
    width: 0;
    /* Prevent hover effect */
}


.form-submit::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 0;
    height: 100%;
    background-color: rgba(255, 255, 255, 0.1);
    transition: width var(--transition-medium);
    z-index: 0;
}

.form-submit:hover {
    background-color: rgba(255, 255, 255, 0.9);
    color: var(--primary-color);
    transform: translateY(-5px);
    box-shadow: 0 15px 30px rgba(0, 0, 0, 0.2);
}

.form-submit:hover::before {
    width: 100%;
}

/* Form Status Messages */
.form-status-message {
    margin-top: 1.5rem;
    padding: 0.8rem 1rem;
    border-radius: 6px;
    font-size: 0.95rem;
    text-align: center;
    opacity: 0;
    /* Hidden by default, controlled by JS */
    max-height: 0;
    /* Hidden by default */
    overflow: hidden;
    transition: opacity 0.3s ease, max-height 0.3s ease, padding 0.3s ease;
}

.form-status-message.sending,
.form-status-message.error {
    opacity: 1;
    max-height: 100px;
    /* Allow space for content */
    padding: 0.8rem 1rem;
    /* Restore padding */
}

.form-status-message.sending {
    background-color: rgba(255, 255, 255, 0.1);
    color: var(--text-color);
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.form-status-message.error {
    background-color: rgba(255, 100, 100, 0.15);
    color: #ffc0c0;
    /* Lighter red for dark bg */
    border: 1px solid rgba(255, 100, 100, 0.3);
}

/* ===== Footer (Common) ===== */
footer {
    background-color: rgba(0, 0, 0, 0.3);
    padding: 2rem 0;
    position: relative;
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border-top: 1px solid rgba(255, 255, 255, 0.05);
}

footer::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(to right, rgba(255, 255, 255, 0.02) 0%, rgba(255, 255, 255, 0.05) 50%, rgba(255, 255, 255, 0.02) 100%);
    opacity: 0.3;
    z-index: 0;
    pointer-events: none;
}

.footer-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 1rem;
    /* Added gap for wrapping */
    position: relative;
    z-index: 1;
}

.copyright {
    font-size: 0.95rem;
    color: rgba(255, 255, 255, 0.7);
    transition: color var(--transition-medium);
}

.copyright:hover {
    color: rgba(255, 255, 255, 0.9);
}

.footer-links {
    display: flex;
    gap: 2rem;
    flex-wrap: wrap;
}

.footer-link {
    color: rgba(255, 255, 255, 0.7);
    text-decoration: none;
    font-size: 0.95rem;
    transition: all var(--transition-medium);
    position: relative;
    padding-bottom: 3px;
}

.footer-link::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 1px;
    background-color: rgba(255, 255, 255, 0.9);
    transition: width var(--transition-medium);
}

.footer-link:hover {
    color: var(--secondary-color);
    transform: translateY(-2px);
}

.footer-link:hover::after {
    width: 100%;
}

/* ===== Lightbox (Common) ===== */
.lightbox {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.9);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.5s cubic-bezier(0.19, 1, 0.22, 1),
        visibility 0s 0.5s;
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
}

.lightbox.active {
    opacity: 1;
    visibility: visible;
    transition-delay: 0s;
}

.lightbox-img {
    min-width: 50%;
    max-width: 80%;
    min-height: 50%;
    max-height: 80%;
    object-fit: contain;
    border: 3px solid rgba(255, 255, 255, 0.2);
    box-shadow: 0 0 100px rgba(0, 0, 0, 0.5);
    transform: scale(0.9);
    transition: transform 0.5s cubic-bezier(0.19, 1, 0.22, 1);
    border-radius: 5px;
}

.lightbox.active .lightbox-img {
    transform: scale(1);
}

.lightbox-close {
    position: absolute;
    top: 30px;
    right: 30px;
    width: 60px;
    height: 60px;
    background-color: rgba(255, 255, 255, 0.2);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all var(--transition-medium), transform 0.5s cubic-bezier(0.19, 1, 0.22, 1);
    transform: scale(0.9);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 2px solid rgba(255, 255, 255, 0.3);
    box-shadow: 0 5px 25px rgba(0, 0, 0, 0.3);
    z-index: 10000;
}

.lightbox.active .lightbox-close {
    transform: scale(1);
}

.lightbox-close:hover {
    background-color: rgba(255, 255, 255, 0.4);
    transform: scale(1.1);
}

.lightbox-close:before,
.lightbox-close:after {
    content: '';
    position: absolute;
    width: 30px;
    height: 3px;
    background-color: white;
    transition: all var(--transition-medium);
}

.lightbox-close:before {
    transform: rotate(45deg);
}

.lightbox-close:after {
    transform: rotate(-45deg);
}

.lightbox-close:hover:before,
.lightbox-close:hover:after {
    background-color: rgba(255, 255, 255, 1);
    width: 35px;
}

/* ===== Success Popup Styles ===== */
.popup {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.7);
    /* Semi-transparent overlay */
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10000;
    /* Above everything else */
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.4s ease, visibility 0s 0.4s;
    backdrop-filter: blur(5px);
    -webkit-backdrop-filter: blur(5px);
}

.popup.active {
    opacity: 1;
    visibility: visible;
    transition-delay: 0s;
}

.popup-content {
    background-color: var(--secondary-color);
    /* White background */
    color: var(--text-dark);
    /* Dark text */
    padding: 2.5rem 3rem;
    border-radius: 15px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.3);
    text-align: center;
    max-width: 450px;
    width: 90%;
    position: relative;
    transform: scale(0.9);
    transition: transform 0.4s cubic-bezier(0.18, 0.89, 0.32, 1.28);
    /* Bounce effect */
}

.popup.active .popup-content {
    transform: scale(1);
}

.popup-content h2 {
    color: var(--primary-color);
    /* Dark heading */
    margin-top: 0;
    margin-bottom: 1rem;
    font-size: 1.8rem;
}

.popup-content p {
    margin-bottom: 2rem;
    line-height: 1.6;
    font-size: 1.1rem;
}

.popup-close {
    position: absolute;
    top: 15px;
    right: 20px;
    font-size: 2rem;
    font-weight: bold;
    color: #aaa;
    cursor: pointer;
    transition: color 0.2s ease;
}

.popup-close:hover {
    color: var(--text-dark);
}

.popup-ok-button {
    /* Reuse button styles, adjust as needed */
    padding: 0.8rem 2rem;
    font-size: 1rem;
    background-color: var(--accent-color);
    /* Use accent color */
    color: var(--secondary-color);
    border: none;
    /* Inherits .btn styles like border-radius, cursor, etc. */
}

.popup-ok-button:hover {
    background-color: #0c3545;
    /* Darker accent */
    color: var(--secondary-color);
    transform: translateY(-3px);
    box-shadow: 0 8px 15px rgba(10, 46, 58, 0.2);
}

/* ===== Animation Classes (Common) ===== */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(30px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes fadeInLeft {
    from {
        opacity: 0;
        transform: translateX(-30px);
    }

    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes fadeInRight {
    from {
        opacity: 0;
        transform: translateX(30px);
    }

    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes scaleIn {
    from {
        opacity: 0;
        transform: scale(0.9);
    }

    to {
        opacity: 1;
        transform: scale(1);
    }
}

@keyframes floatAnimation {
    0% {
        transform: translateY(0px);
    }

    50% {
        transform: translateY(-10px);
    }

    100% {
        transform: translateY(0px);
    }
}

/* Base states for JS-triggered animations */
.fade-in,
.service-gallery-item,
.gallery-item {
    /* Apply initial fade-in state to gallery items too */
    opacity: 0;
    transform: translateY(30px);
}

.fade-in-left {
    opacity: 0;
    transform: translateX(-30px);
}

.fade-in-right {
    opacity: 0;
    transform: translateX(30px);
}

.scale-in {
    opacity: 0;
    transform: scale(0.9);
}

/* Active animation states (applied by JS or directly) */
.fade-in.animate,
.service-gallery-item.animate,
/* Includes service gallery items */
.gallery-item.animate {
    /* Includes main gallery items */
    animation: fadeIn 0.8s cubic-bezier(0.215, 0.61, 0.355, 1) forwards;
}

.animate-left {
    animation: fadeInLeft 0.8s cubic-bezier(0.215, 0.61, 0.355, 1) forwards;
}

.animate-right {
    animation: fadeInRight 0.8s cubic-bezier(0.215, 0.61, 0.355, 1) forwards;
}

.animate-scale {
    animation: scaleIn 0.8s cubic-bezier(0.215, 0.61, 0.355, 1) forwards;
}

/* Stagger delay for main gallery */
.gallery-item.animate {
    animation-delay: calc(var(--item-index, 0) * 0.1s + 0.2s);
}

/* Other animations */
.floating {
    animation: floatAnimation 3s ease-in-out infinite;
}


/* ===== Responsive Design (Common) ===== */
@media (max-width: 1024px) {
    .hero-title {
        font-size: 2.5rem;
    }

    .section-title {
        font-size: 2.2rem;
    }

    .contact-container {
        gap: 2rem;
    }

    /* Page Specific Adjustments */
    .gallery-title,
    .impressum-title,
    .datenschutz-title,
    .about-title {
        font-size: 2.2rem;
    }
}

@media (max-width: 768px) {
    header {
        padding: 1rem 0;
    }

    .header-container {
        justify-content: center;
        position: relative;
    }

    .nav-toggle {
        display: block;
        position: absolute;
        right: 2rem;
        top: 50%;
        transform: translateY(-50%);
    }

    nav {
        position: fixed;
        top: 0;
        right: -100%;
        width: 70%;
        max-width: 300px;
        height: 100vh;
        background-color: var(--primary-color);
        display: flex;
        align-items: center;
        justify-content: center;
        transition: right var(--transition-medium);
        z-index: 1000;
        box-shadow: none;
    }

    nav.active {
        right: 0;
        box-shadow: -5px 0 15px rgba(0, 0, 0, 0.2);
    }

    nav ul {
        flex-direction: column;
        align-items: center;
        gap: 2rem;
    }

    nav ul li a {
        font-size: 1.2rem;
    }

    .hero-title {
        font-size: 2rem;
    }

    .hero-buttons {
        flex-direction: column;
        gap: 1rem;
        align-items: center;
    }

    .btn {
        width: 100%;
        max-width: 250px;
    }

    .section {
        padding: 6rem 0;
    }

    .section-title {
        font-size: 2rem;
        margin-bottom: 3rem;
    }

    .tab-nav {
        flex-direction: column;
        gap: 1rem;
        align-items: center;
    }

    .tab-button {
        width: 100%;
        max-width: 250px;
    }

    .stats-container {
        grid-template-columns: 1fr;
        gap: 2rem;
    }

    .contact-container {
        grid-template-columns: 1fr;
    }

    .contact-info {
        order: 2;
        align-items: center;
        text-align: center;
    }

    .social-icons {
        justify-content: center;
    }

    .contact-form {
        order: 1;
    }

    .footer-container {
        flex-direction: column;
        gap: 1.5rem;
        text-align: center;
    }

    /* Responsive Gallery Adjustments */
    .service-gallery {
        grid-template-columns: repeat(auto-fit, 300px);
        /* Larger tablet size */
        gap: 1rem;
    }

    .gallery-grid {
        grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
        gap: 1rem;
    }

    /* Make services grid 2 columns on tablets */
    .services-grid {
        grid-template-columns: repeat(2, 1fr);
        /* Explicitly 2 columns */
        grid-template-rows: repeat(3, auto);
        /* Adjust rows accordingly */
        gap: 1rem;
        /* Maybe reduce gap slightly */
    }

    /* Page Specific Adjustments */
    .gallery-section,
    .impressum-section,
    .datenschutz-section,
    .about-section {
        padding: 8rem 0 4rem;
    }

    .gallery-title,
    .impressum-title,
    .datenschutz-title,
    .about-title {
        font-size: 2rem;
    }

    .impressum-container,
    .datenschutz-container,
    .about-container {
        padding: 2rem;
    }

    .impressum-content,
    .about-content {
        font-size: 1.1rem;
    }

    .datenschutz-content {
        font-size: 1rem;
    }

    .consent-slider {
        padding: 2rem;
    }

    .consent-slider p {
        font-size: 1rem;
    }

    .consent-slider p:first-of-type {
        font-size: 1.4rem;
    }

    /* Popup Adjustments */
    .popup-content {
        padding: 2rem;
    }

    .popup-content h2 {
        font-size: 1.6rem;
    }

    .popup-content p {
        font-size: 1rem;
    }

    .lightbox-close {
        width: 50px;
        height: 50px;
        top: 20px;
        right: 20px;
    }
}

@media (max-width: 480px) {
    .container {
        padding: 0 1rem;
    }

    .nav-toggle {
        right: 1rem;
    }

    .hero-title {
        font-size: 1.8rem;
    }

    .section-title {
        font-size: 1.8rem;
    }

    .section {
        padding: 5rem 0;
    }

    /* Single column for galleries on smallest screens */
    .service-gallery {
        grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
        /* Larger min size */
        justify-content: initial;
        /* Reset centering */
    }

    .gallery-grid {
        grid-template-columns: 1fr;
    }

    /* Make services grid 1 column on mobile */
    .services-grid {
        grid-template-columns: 1fr;
        /* Ensure single column */
        grid-template-rows: auto;
        /* Let rows flow naturally */
    }

    .contact-form {
        padding: 2rem;
    }

    .footer-links {
        justify-content: center;
    }

    .lightbox-close {
        top: 15px;
        right: 15px;
        width: 50px;
        height: 50px;
    }

    .lightbox-close:before,
    .lightbox-close:after {
        width: 25px;
        height: 2px;
    }

    .lightbox-close:hover:before,
    .lightbox-close:hover:after {
        width: 30px;
    }

    /* Page Specific Adjustments */
    .gallery-section,
    .impressum-section,
    .datenschutz-section,
    .about-section {
        padding: 7rem 0 3rem;
    }

    .gallery-title,
    .impressum-title,
    .datenschutz-title,
    .about-title {
        font-size: 1.8rem;
    }

    .impressum-container,
    .datenschutz-container,
    .about-container {
        padding: 1.5rem;
    }

    .impressum-content h3 {
        font-size: 1.3rem;
    }

    .datenschutz-content h2 {
        font-size: 1.6rem;
    }

    .datenschutz-content h3 {
        font-size: 1.3rem;
    }

    .consent-slider {
        padding: 1.5rem;
    }

    .consent-slider p {
        font-size: 0.9rem;
    }

    .consent-slider p:first-of-type {
        font-size: 1.2rem;
    }

    .consent-slider button {
        font-size: 1rem;
        padding: 0.8rem 1.5rem;
    }

    .stat-number {
        font-size: 3rem;
    }

    .stat-label {
        font-size: 1.1rem;
    }

    .why-us-item {
        padding: 2rem;
    }

    .why-us-title {
        font-size: 1.3rem;
    }

    .summary-text {
        font-size: 1.1rem;
        padding: 1.5rem;
    }

    .contact-text {
        font-size: 1rem;
    }

    .contact-form {
        padding: 1.5rem;
    }

    /* Popup Adjustments */
    .popup-content {
        padding: 1.5rem;
    }

    .popup-content h2 {
        font-size: 1.4rem;
    }

    .popup-content p {
        font-size: 0.95rem;
    }
}