/* ============================================================
   Typography System
   Body: Inter (Self-hosted)
   Headings: Domine (Self-hosted)
   ============================================================ */

/* ── Domine 400-700 (Variable) ── */
@font-face {
    font-family: 'Domine';
    font-style: normal;
    font-weight: 400 700;
    font-display: swap;
    src: url('../fonts/domine-v25-latin.woff2') format('woff2');
}

/* ── Inter 400-600 (Variable-ish) ── */
@font-face {
    font-family: 'Inter';
    font-style: normal;
    font-weight: 400 600;
    font-display: swap;
    src: url('../fonts/inter-400-600-latin.woff2') format('woff2');
}

/* ============================================================
   CSS Custom Properties (Variables)
   Change these to restyle the entire site instantly
   ============================================================ */
:root {
    /* Brand colors - Refined for premium feel */
    --color-primary:        #ba986e;   /* slightly more muted gold */
    --color-primary-dark:   #a3835e;
    --color-secondary:      #332b27;   /* refined brown */
    --color-accent:         #f2ebe6;   /* cleaner blush */

    /* Backgrounds */
    --color-bg:             #fcfbf9;   /* warmer, cleaner off-white */
    --color-bg-card:        rgba(255, 255, 255, 0.85); /* For glassmorphism */
    --color-bg-footer:      #2c2420;

    /* Text */
    --color-text:           #3a3633;
    --color-text-light:     #6e6863;
    --color-text-on-dark:   #fcfbf9;

    /* UI */
    --color-border:         rgba(0, 0, 0, 0.08);
    --color-overlay:        rgba(15, 12, 10, 0.4);

    /* Typography - Fluid scaling */
    --font-heading:         'Domine', Georgia, serif;
    --font-body:            'Inter', system-ui, sans-serif;
    
    --fz-body:              clamp(1rem, 0.95rem + 0.25vw, 1.125rem);
    --fz-h1:                clamp(2.5rem, 5vw, 4.5rem);
    --fz-h2:                clamp(1.8rem, 3vw, 2.5rem);

    /* Spacing & Shape */
    --radius-sm:            8px;
    --radius-md:            16px;
    --radius-lg:            32px;
    
    /* Layered Shadow system for better depth */
    --shadow-sm:            0 1px 2px rgba(0,0,0,0.02), 0 2px 4px rgba(0,0,0,0.02);
    --shadow-md:            0 4px 6px rgba(0,0,0,0.03), 0 12px 24px rgba(0,0,0,0.05);
    --shadow-lg:            0 20px 40px rgba(0,0,0,0.08), 0 1px 3px rgba(0,0,0,0.02);
    --shadow-premium:       0 0 0 1px rgba(0,0,0,0.03), 0 10px 30px -5px rgba(0,0,0,0.1), 0 20px 60px -10px rgba(0,0,0,0.15);

    /* Transitions */
    --transition:           0.4s cubic-bezier(0.2, 0.8, 0.2, 1);
}

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

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

body {
    font-family: var(--font-body);
    background-color: var(--color-bg);
    color: var(--color-text);
    font-size: var(--fz-body);
    line-height: 1.7;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* Custom Scrollbar - Removed to use system default */

img {
    max-width: 100%;
    height: auto;
    display: block;
}

a {
    color: var(--color-primary);
    text-decoration: none;
    position: relative;
    transition: color var(--transition);
}

a::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    width: 0;
    height: 1.5px;
    background: var(--color-primary);
    transition: width var(--transition);
}

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

a:hover::after {
    width: 100%;
}

h1, h2, h3, h4, h5 {
    font-family: var(--font-heading);
    color: var(--color-secondary);
    line-height: 1.2;
    font-weight: 600;
}

/* ============================================================
   Utility Classes
   ============================================================ */
.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;
}

/* ============================================================
   Logo & Header
   ============================================================ */
.logo {
    display: flex;
    align-items: center;
    gap: 1rem;
    text-decoration: none;
}

.logo__img {
    height: 50px;
    width: auto;
    border-radius: 4px;
}

.logo-wrap {
    padding: 1.5rem 2.5rem;
    background: transparent;
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 1000;
    border-bottom: none;
}

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

/* Hamburger Button */
.mobile-nav-toggle {
    display: none;
    background: transparent;
    border: none;
    cursor: pointer;
    padding: 0.5rem;
    position: relative;
    z-index: 2000;
}

.hamburger {
    display: block;
    width: 24px;
    height: 2px;
    background: #fff; /* Default for dark heroes */
    position: relative;
    transition: background 0.3s;
}

.hamburger::before,
.hamburger::after {
    content: '';
    position: absolute;
    width: 24px;
    height: 2px;
    background: #fff;
    left: 0;
    transition: transform 0.3s;
}

.hamburger::before { top: -8px; }
.hamburger::after { bottom: -8px; }

.hamburger,
.hamburger::before,
.hamburger::after {
    background: #fff !important; /* Force white default */
}

.mobile-nav-toggle[aria-expanded="false"]:hover .hamburger,
.mobile-nav-toggle:hover .hamburger::before,
.mobile-nav-toggle:hover .hamburger::after {
    background: var(--color-primary) !important;
}

.nav-open .hamburger { background: transparent !important; }
.nav-open .hamburger::before { transform: rotate(45deg); top: 0; }
.nav-open .hamburger::after { transform: rotate(-45deg); bottom: 0; }

.nav-links a {
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--color-text);
    text-transform: uppercase;
    letter-spacing: 0.1em;
    padding: 0.5rem 0;
}

/* Navigation in transparent dark header */
.logo-wrap.section--dark .nav-links a {
    color: #ffffff;
}

.logo-wrap .nav-links a {
    color: #ffffff; /* Default to white since header is mostly on heroes */
}

.logo-wrap.section--dark .nav-links a:hover,
.logo-wrap .nav-links a:hover {
    color: var(--color-primary);
}

.logo::after,
.btn--no-effect::after,
.mobile-nav-toggle::after,
.modal__close::after,
.mobile-nav-toggle:hover::after,
.modal__close:hover::after {
    display: none !important;
}

.logo:hover .logo__img {
    filter: brightness(1.1);
}

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

.nav-links a::after {
    height: 2px;
    background: var(--color-primary);
}

@media (max-width: 768px) {
    .mobile-nav-toggle {
        display: block;
    }

    .nav-links {
        position: fixed;
        top: 0;
        right: 0;
        bottom: 0;
        width: 100%;
        background: var(--color-bg-card);
        backdrop-filter: blur(20px) saturate(180%);
        -webkit-backdrop-filter: blur(20px) saturate(180%);
        flex-direction: column;
        justify-content: center;
        align-items: center;
        gap: 3rem;
        z-index: 1000;
        transform: translateX(100%);
        transition: transform 0.5s cubic-bezier(0.4, 0, 0.2, 1);
    }

    .nav-links.is-open {
        transform: translateX(0);
    }

    .nav-links a {
        font-size: 1.5rem;
        color: var(--color-secondary) !important;
    }
}

/* ============================================================
   Hero Section
   ============================================================ */
.hero {
    flex: 1;
    display: grid;
    grid-template-columns: 1fr 1fr;
    align-items: stretch;
    min-height: 80vh; /* Fill most of the screen while allowing flow */
}

main {
    flex: 1;
    display: flex;
    flex-direction: column;
}

.hero__image-col {
    position: relative;
    overflow: hidden;
    min-height: 400px;
}

.hero__image-col img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center top;
}
.hero__content-col {
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding: clamp(2rem, 8vw, 6rem);
    gap: 2rem;
    animation: revealUp 1s cubic-bezier(0.2, 0.8, 0.2, 1) forwards;
}

@keyframes revealUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.hero__eyebrow {
    font-family: var(--font-body);
    font-size: 0.8rem;
    letter-spacing: 0.15em;
    text-transform: uppercase;
    color: var(--color-primary);
    font-weight: 600;
}

.hero__heading {
    font-size: var(--fz-h1);
    color: var(--color-secondary);
    line-height: 1.05;
    letter-spacing: -0.02em;
}

.hero__text {
    font-size: 1.05rem;
    color: var(--color-text-light);
    max-width: 42ch;
    line-height: 1.8;
}

/* ============================================================
   Button
   ============================================================ */
.btn {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.85rem 2.22rem;
    border-radius: var(--radius-sm);
    font-family: var(--font-body);
    font-size: 0.9rem;
    font-weight: 600;
    letter-spacing: 0.04em;
    cursor: pointer;
    transition: background-color var(--transition), color var(--transition), border-color var(--transition);
    border: none;
    text-decoration: none;
}

.btn--primary {
    background-color: var(--color-primary);
    color: #fff;
}

.btn--primary:hover {
    background-color: var(--color-secondary);
    color: #fff;
}

/* ============================================================
   Footer
   ============================================================ */
footer {
    background-color: var(--color-bg-footer);
    color: var(--color-text-on-dark);
    padding: 1rem 2.5rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    flex-wrap: wrap;
}

.footer__copy {
    font-size: 0.85rem;
    opacity: 0.75;
}

.footer__links {
    display: flex;
    gap: 1.5rem;
}

.footer__links a {
    color: var(--color-text-on-dark);
    font-size: 0.85rem;
    opacity: 0.75;
    transition: opacity var(--transition);
}

.footer__links a:hover {
    opacity: 1;
    color: var(--color-text-on-dark);
}

/* ============================================================
   Modal Overlay
   ============================================================ */
.modal-overlay {
    position: fixed;
    inset: 0;
    background: var(--color-overlay);
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
    z-index: 2000; /* Above header at 1000 */
    display: flex;
    align-items: flex-start; /* Pull to top for scrollability */
    justify-content: center;
    padding: 2rem 1rem;
    overflow-y: auto;
    opacity: 0;
    visibility: hidden;
    transition: opacity var(--transition), visibility var(--transition);
}

.modal-overlay.is-open {
    opacity: 1;
    visibility: visible;
}

.modal {
    background: var(--color-bg-card);
    backdrop-filter: blur(25px) saturate(200%);
    -webkit-backdrop-filter: blur(25px) saturate(200%);
    border: 1px solid rgba(255, 255, 255, 0.3);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-premium);
    width: 100%;
    max-width: 560px;
    padding: clamp(2rem, 5vw, 3.5rem);
    position: relative;
    margin-top: auto;   /* These two ensure it's still centered */
    margin-bottom: auto; /* vertically if content is short */
    transform: translateY(40px) scale(0.95);
    transition: transform 0.6s cubic-bezier(0.34, 1.56, 0.64, 1), opacity 0.5s ease;
}

.modal-overlay.is-open .modal {
    transform: translateY(0) scale(1);
}

.modal__close {
    position: absolute;
    top: 1.2rem;
    right: 1.2rem;
    background: none;
    border: none;
    cursor: pointer;
    color: var(--color-text-light);
    font-size: 1.4rem;
    line-height: 1;
    padding: 0.3rem;
    border-radius: var(--radius-sm);
    transition: color var(--transition), background var(--transition);
}

.modal__close:hover {
    color: var(--color-primary);
}

.modal__title {
    font-size: 1.8rem;
    margin-bottom: 0.4rem;
}

.modal__subtitle {
    font-size: 0.9rem;
    color: var(--color-text);
    margin-bottom: 1.8rem;
}

/* ============================================================
   Contact Form
   ============================================================ */
.form {
    display: flex;
    flex-direction: column;
    gap: 1.2rem;
}

.form__group {
    display: flex;
    flex-direction: column;
    gap: 0.4rem;
}

.form__label {
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--color-secondary);
    letter-spacing: 0.02em;
}

.form__label .required-mark {
    color: var(--color-primary);
    margin-left: 2px;
}

.form__input,
.form__textarea {
    padding: 0.75rem 1rem;
    border: 1px solid #a0a0a0;
    border-radius: var(--radius-sm);
    font-family: var(--font-body);
    font-size: 0.95rem;
    color: var(--color-text);
    background: var(--color-bg);
    transition: border-color var(--transition), box-shadow var(--transition);
    width: 100%;
}

.form__input:focus,
.form__textarea:focus {
    outline: none;
    border-color: var(--color-primary);
    box-shadow: 0 0 0 3px rgba(201,168,124,.18);
}

.form__input::placeholder,
.form__textarea::placeholder {
    color: #a0a0a0;
}

.form__textarea {
    resize: vertical;
    min-height: 130px;
}

/* .form__captcha — Altcha widget container */
.form__captcha {
    margin-top: 0.5rem;
}

/* Unify Altcha with standard inputs */
altcha-widget {
    --altcha-max-width: 100%;
    --altcha-border-radius: var(--radius-sm);
    --altcha-border-color: var(--color-border);
    --altcha-color-base: var(--color-bg);
}

.modal__contact-info {
    background: rgba(186, 152, 110, 0.1);
    padding: 1.25rem;
    border-radius: var(--radius-md);
    margin-bottom: 2rem;
    border-left: 4px solid var(--color-primary);
}

.modal__contact-info p {
    font-size: 0.95rem;
    line-height: 1.5;
    margin-bottom: 0;
    font-weight: 500;
}

.form__row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1.5rem;
}

@media (max-width: 480px) {
    .form__row {
        grid-template-columns: 1fr;
        gap: 1.2rem;
    }
}

.btn--large-cta {
    width: 100%;
    justify-content: center;
    padding: 1rem 2.5rem;
    font-size: 1.05rem;
    text-align: center;
}

.btn__icon {
    transition: transform var(--transition);
}

.btn--large-cta:hover .btn__icon {
    transform: translate(3px, -3px);
}

.form__submit-wrap {
    margin-top: 1rem;
    display: flex;
    justify-content: center;
}

.form__status {
    font-size: 0.9rem;
    padding: 0.75rem 1rem;
    border-radius: var(--radius-sm);
    display: none;
}

.form__status.success {
    background: #e9f7ef;
    color: #2e7d4f;
    border: 1px solid #b7dfc7;
    display: block;
}

.form__status.error {
    background: #fdf0f0;
    color: #c0392b;
    border: 1px solid #f1b0a8;
    display: block;
}

/* ============================================================
   Subpage Layout (Imprint / Privacy)
   ============================================================ */
.subpage-hero {
    position: relative;
    background-image: url('../img/solar-wide.webp');
    background-attachment: scroll;
    background-position: bottom;
    background-size: cover;
    background-repeat: no-repeat;
    padding: 8rem 2.5rem 6rem;
    text-align: center;
    color: #fff;
}

.subpage-hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(to bottom, rgba(0, 0, 0, 1) 0%, rgba(0, 0, 0, 0.5) 100%);
    z-index: 1;
}

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

.subpage-hero h1 {
    color: var(--color-bg);
    font-size: clamp(2.5rem, 5vw, 3.5rem);
    margin: 0;
}

.subpage-content {
    max-width: 860px;
    margin: 0 auto;
    padding: 5rem 2.5rem;
    animation: revealUp 0.8s ease-out forwards;
}

.subpage-content h2 {
    font-size: 1.6rem;
    margin-top: 3rem;
    margin-bottom: 1rem;
    border-bottom: 1px solid var(--color-border);
    padding-bottom: 0.5rem;
}

.subpage-content p {
    color: var(--color-text);
    margin-bottom: 1.5rem;
    opacity: 0.9;
}

.subpage-content ul {
    list-style: none;
    padding: 0;
    margin: 0 0 1.75rem 0;
    display: flex;
    flex-direction: column;
    gap: 0.6rem;
}

.subpage-content ul li {
    position: relative;
    padding-left: 1.5rem;
    color: var(--color-text);
    opacity: 0.9;
    line-height: 1.7;
}

.subpage-content ul li::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0.6em;
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background-color: var(--color-primary);
    flex-shrink: 0;
}

/* Nested list (e.g. DSGVO sub-items) */
.subpage-content ul ul {
    margin: 0.5rem 0 0 0;
    padding-left: 0.5rem;
    gap: 0.4rem;
}

.subpage-content ul ul li::before {
    width: 5px;
    height: 5px;
    background-color: var(--color-text);
    border: none;
    top: 0.68em;
}

/* ─── Extracted from inline styles ─────────────────────────── */

/* header.php: .header-container */
.header-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    max-width: 1200px;
    margin: 0 auto;
    width: 100%;
}

/* index.php: CTA button row in hero */
.hero-cta-buttons {
    display: flex;
    justify-content: center;
    gap: 1.5rem;
}

/* index.php: About section image */
.about-image-wrap img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* index.php: Dienstleistungen section resets */
#dienstleistungen {
    margin: 0;
    border-radius: 0;
}

/* contact-modal.php: standalone required mark (outside .form__label) */
.required-mark {
    color: var(--color-primary);
}

/* ============================================================
   Section Utilities
   ============================================================ */
.section {
    padding: clamp(3.5rem, 10vw, 8rem) 1.5rem;
}

.section--cta {
    color: #fff;
    text-align: center;
    border-top: 5px solid var(--color-primary);
}

.section--cta h2 {
    color: #fff;
    font-size: clamp(2rem, 4vw, 3rem);
    margin-bottom: 1.5rem;
}

.section--cta p {
    color: rgba(255,255,255,0.8);
    font-size: 1.2rem;
    margin-bottom: 2.5rem;
    max-width: 60ch;
    margin-left: auto;
    margin-right: auto;
}

.section--cta .btn--primary:hover {
    background-color: var(--color-primary-dark);
}

.section--dark {
    background-color: #000000;
    color: #ffffff;
}

.section--dark h2, 
.section--dark h3 {
    color: var(--color-primary);
}

.section--dark p {
    color: rgba(255, 255, 255, 0.8);
}

.container {
    max-width: 1200px;
    margin: 0 auto;
}

.grid {
    display: grid;
    gap: 4rem;
    align-items: center;
}

.grid--2-col {
    grid-template-columns: 1fr 1fr;
}

@media (max-width: 900px) {
    .grid--2-col {
        grid-template-columns: 1fr;
        gap: 2.5rem;
    }
}

.gold-text {
    color: var(--color-primary);
}

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

.list-check {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.list-check li {
    position: relative;
    padding-left: 1.8rem;
}

.list-check li::before {
    content: '•';
    position: absolute;
    left: 0;
    color: var(--check-color, var(--color-primary));
    font-size: 1.5rem;
    line-height: 1;
}

/* ============================================================
   Responsive
   ============================================================ */
@media (max-width: 900px) {
    .hero {
        grid-template-columns: 1fr;
        min-height: auto;
    }

    .hero__image-col {
        min-height: 360px;
    }

    .hero__content-col {
        padding: 3rem 2rem;
    }

    .hero-integrated-values {
        grid-template-columns: 1fr !important;
    }
}

@media (max-width: 600px) {
    .logo-wrap {
        padding: 1.2rem 1.2rem;
    }

    .modal {
        padding: 2rem 1.5rem;
    }

    footer {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.75rem;
    }
}

/* ============================================================
   Responsive Background Fixes
   ============================================================ */
@media (max-width: 1024px) {
    .subpage-hero,
    .section--dark.parallax-hero,
    .section--gold-parallax,
    .section--lightgold-parallax,
    .section--light-parallax,
    .section--cta {
        background-attachment: scroll !important; /* Fixed backgrounds often break on mobile */
        background-position: bottom center;
    }
}

.section--dark.parallax-hero {
    position: relative;
    background-image: url('../img/solar-hero.webp');
    background-attachment: fixed;
    background-position: bottom;
    background-size: cover;
    background-repeat: no-repeat;
    overflow: hidden;
    min-height: 80vh;
    display: flex;
    align-items: center;
}

@media (max-width: 768px) {
    .section--dark.parallax-hero {
        min-height: 95vh;
        padding-top: 120px;
        padding-bottom: 60px;
    }

    .section--dark.parallax-hero div[style*="display: flex"] {
        flex-direction: column !important;
        width: 100%;
    }

    .section--dark.parallax-hero .btn,
    .section--dark.parallax-hero .hero-p-s-cta-outline {
        width: 100%;
        justify-content: center;
    }
}

.section--dark.parallax-hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(to bottom, rgba(0, 0, 0, 1) 0%, rgba(0, 0, 0, 0.5) 100%);
    z-index: 1;
}

.section--dark.parallax-hero .container {
    position: relative;
    z-index: 2;
}

.section--gold-parallax {
    position: relative;
    background-image: url('../img/solar-hero.webp');
    background-attachment: fixed;
    background-position: bottom;
    background-size: cover;
    background-repeat: no-repeat;
    overflow: hidden;
}

.section--gold-parallax::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(186, 152, 110, 0.95); /* Primary color with 0.9 opacity */
    backdrop-filter: blur(5px);
    -webkit-backdrop-filter: blur(5px);
    z-index: 1;
}

.section--gold-parallax .container {
    position: relative;
    z-index: 2;
}

.section--lightgold-parallax {
    position: relative;
    background-image: url('../img/solar-hero.webp');
    background-attachment: fixed;
    background-position: bottom;
    background-size: cover;
    background-repeat: no-repeat;
    overflow: hidden;
}

.section--lightgold-parallax::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.95);
    backdrop-filter: blur(5px);
    -webkit-backdrop-filter: blur(5px);
    z-index: 1;
}

.section--lightgold-parallax .container {
    position: relative;
    z-index: 2;
}

#rezensionen .hero__eyebrow {
    color: var(--color-text-on-dark);
}

#rezensionen h2.gold-text {
    color: var(--color-primary);
}

.section--light-parallax {
    position: relative;
    background-image: url('../img/solar-hero.webp');
    background-attachment: fixed;
    background-position: bottom;
    background-size: cover;
    background-repeat: no-repeat;
    overflow: hidden;
}

.section--light-parallax::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(255, 251, 249, 0.95);
    backdrop-filter: blur(5px);
    -webkit-backdrop-filter: blur(5px);
    z-index: 1;
}

.section--light-parallax .container {
    position: relative;
    z-index: 2;
}

.section--cta {
    position: relative;
    background-image: url('../img/solar-hero.webp');
    background-attachment: fixed;
    background-position: bottom;
    background-size: cover;
    background-repeat: no-repeat;
    overflow: hidden;
}

.section--cta::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(51, 43, 39, 0.95);
    backdrop-filter: blur(5px);
    -webkit-backdrop-filter: blur(5px);
    z-index: 1;
}

.section--cta .container {
    position: relative;
    z-index: 2;
}

/* ============================================================
   Testimonial Carousel
   ============================================================ */
.testimonial-carousel {
    position: relative;
    max-width: 800px;
    margin: 2rem auto 0;
    /*padding: 4rem 0 3rem; /* Increased top padding to prevent quote clipping */
    overflow: hidden;
}

.testimonial-track {
    display: flex;
    transition: transform 0.6s cubic-bezier(0.4, 0, 0.2, 1);
    align-items: center;
}

.testimonial-slide {
    min-width: 100%;
    padding: 1rem 2rem; /* Side padding for shadow breathing room */
    opacity: 0;
    transition: opacity 0.6s ease;
}

.testimonial-slide.active {
    opacity: 1;
}

.testimonial-card {
    background: rgba(255, 255, 255, 0.05);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    padding: 3rem;
    border-radius: var(--radius-lg);
    border: 1px solid rgba(255, 255, 255, 0.1);
    position: relative;
    box-shadow: none;
}

.testimonial-card::before {
    content: '"';
    position: absolute;
    top: -0.5rem; /* Slightly lowered to ensure it stays within padded area */
    left: 2rem;
    font-size: 5rem;
    color: var(--color-primary);
    font-family: var(--font-heading);
    opacity: 0.2;
    line-height: 1;
}

.testimonial__text {
    font-size: 1.15rem;
    font-style: italic;
    color: var(--color-text-on-dark);
    line-height: 1.6;
    margin-bottom: 2rem;
}

.testimonial__author {
    font-weight: 600;
    color: var(--color-primary);
    text-transform: uppercase;
    letter-spacing: 0.1em;
    font-size: 0.9rem;
}

.carousel-dots {
    display: flex;
    justify-content: center;
    gap: 0.75rem;
    margin-top: 2rem;
}

.dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.2);
    cursor: pointer;
    transition: background var(--transition), transform var(--transition);
    border: none;
    padding: 0;
    appearance: none;
    display: block;
}

.dot.active {
    background: var(--color-primary);
    transform: scale(1.3);
}

/* ============================================================
   Refactored Page Sections
   ============================================================ */

/* Hero problem/solution */
.hero-p-s-container {
    max-width: 900px;
}

.hero-p-s-eyebrow {
    color: var(--color-primary);
    margin-bottom: 1rem;
    display: block;
}

.hero-p-s-heading {
    color: #fff;
    margin-bottom: 2rem;
}

.hero-p-s-text {
    color: rgba(255, 255, 255, 0.9);
    margin: 0 auto 3rem;
    max-width: 60ch;
}

.hero-p-s-cta-outline {
    background: transparent;
    border: 1px solid var(--color-primary);
    color: var(--color-primary);
    transition: background var(--transition), color var(--transition);
}

.hero-p-s-cta-outline:hover {
    background: var(--color-primary);
    color: #fff;
}

/* About Section Refinements */
.about-image-wrap {
    border-radius: var(--radius-lg);
    overflow: hidden;
    box-shadow: var(--shadow-premium);
}

.about-text-heading {
    margin-bottom: 1.5rem;
}

.about-text-p {
    margin-bottom: 1.5rem;
}

.about-text-p--bold {
    margin-bottom: 1.5rem;
    font-weight: 600;
}

.about-text-p--last {
    margin-bottom: 2rem;
}

.about-values-list {
    margin-bottom: 2rem;
    gap: 0.5rem;
}

.about-austria-box {
    padding: 1.5rem;
    background: var(--color-secondary);
    color: #fff;
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-md);
}

.about-austria-box__title {
    font-size: 1.1rem;
    font-weight: 600;
    margin-bottom: 1rem;
    color: var(--color-primary);
}

.about-austria-box__text {
    font-size: 0.9rem;
    opacity: 0.9;
    line-height: 1.5;
}

.about-austria-box__footer {
    margin-top: 1.5rem;
    font-weight: 600;
    font-size: 0.95rem;
}

/* Dienstleistungen Section */
.services-header {
    margin-bottom: 4rem;
}

.services-eyebrow {
    color: var(--color-bg);
}

.services-heading {
    color: var(--color-secondary);
}

.services-grid {
    gap: 4rem;
    align-items: center;
}

.services-card {
    background: rgba(255, 255, 255, 0.85);
    padding: 2.5rem;
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-sm);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
}

.services-card__title {
    margin-bottom: 2rem;
    color: var(--color-secondary);
    border-bottom: 2px solid var(--color-secondary);
    display: inline-block;
}

.services-card__list {
    --check-color: var(--color-secondary);
    color: var(--color-secondary);
    font-weight: 500;
}

.services-quote-col {
    font-size: clamp(1.1rem, 2vw, 1.4rem);
    color: var(--color-secondary);
    font-style: italic;
    line-height: 1.4;
    margin-bottom: 2rem;
}

.services-quote-footer {
    margin-top: 2rem;
    color: var(--color-secondary);
    font-weight: 600;
    margin-bottom: 3rem;
}

.services-grid .btn--primary {
    background-color: var(--color-secondary);
    color: #fff;
}

.services-grid .btn--primary:hover {
    background-color: #000;
}

/* ============================================================
   Back to Top Button
   ============================================================ */
.back-to-top {
    position: fixed;
    bottom: 30px;
    right: 30px;
    width: 48px;
    height: 48px;
    background-color: var(--color-secondary);
    border: 2px solid var(--color-primary);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    z-index: 1000;
    opacity: 0;
    visibility: hidden;
    transform: translateY(20px);
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: var(--shadow-premium);
}

.back-to-top.is-visible {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.back-to-top:hover {
    background-color: var(--color-primary);
    transform: translateY(-5px);
}

.back-to-top.is-at-bottom {
    bottom: 90px; /* Lift up to avoid covering footer links */
}

/* Hide on mobile devices */
@media (max-width: 768px) {
    .back-to-top {
        display: none !important;
    }
}

.arrow-up {
    width: 12px;
    height: 12px;
    border-left: 3px solid #fff;
    border-top: 3px solid #fff;
    transform: rotate(45deg);
    margin-top: 4px;
    transition: border-color var(--transition);
}

.back-to-top:hover .arrow-up {
    border-color: #fff;
}

/* ============================================================
   Unified Animation System (Scroll Reveal)
   ============================================================ */

/* Base hidden state */
.reveal {
    opacity: 0;
    transition: all 0.8s cubic-bezier(0.2, 0.8, 0.2, 1);
    will-change: transform, opacity;
}

/* Directional variants */
.reveal--up {
    transform: translateY(40px);
}

.reveal--left {
    transform: translateX(-40px);
}

.reveal--right {
    transform: translateX(40px);
}

/* Visible / Active state (triggered by JS) */
.reveal.is-visible {
    opacity: 1;
    transform: translate(0, 0);
}

/* Custom Delays for staggering */
.delay-100 { transition-delay: 100ms; }
.delay-200 { transition-delay: 200ms; }
.delay-300 { transition-delay: 300ms; }
.delay-400 { transition-delay: 400ms; }
.delay-500 { transition-delay: 500ms; }

/* Enhanced Hover Effects */
/* .testimonial-card:hover removed */

.about-image-wrap img {
    transition: transform 1s ease;
}
/* ============================================================
   Refactored Inline Styles
   ============================================================ */
.error-layout {
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

.error-layout main {
    flex-grow: 1;
    display: flex;
}

.error-layout .parallax-hero {
    flex-grow: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0;
    padding: 4rem 1.5rem;
}

/* Ensure buttons don't inherit the global link underline effect */
.btn::after {
    display: none !important;
}

.error-layout .parallax-hero .btn:hover {
    text-decoration: none;
}

.gold-text--small {
    font-size: 0.5em;
}

.about-image-wrap:hover img {
    transform: scale(1.05);
}
