/* Fonts - Locally Hosted (GDPR Compliant) */
@font-face {
    font-family: 'Outfit';
    src: url('../assets/fonts/outfit-v15-latin-regular.woff2') format('woff2');
    font-weight: 400;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: 'Inter';
    src: url('../assets/fonts/inter-v20-latin-regular.woff2') format('woff2');
    font-weight: 400;
    font-style: normal;
    font-display: swap;
}

:root {
    /* Color Palette */
    --primary-color: #0e4d59;
    /* Deep Teal */
    --primary-light: #1a6b7a;
    --primary-dark: #073b45;
    --accent-color: #826638;
    /* Darker Gold for better contrast */
    --accent-light: #b89a66;
    --bg-color: #f8fbfb;
    /* Light cool gray */
    --surface-color: #ffffff;
    --text-main: #1a1a1a;
    --text-muted: #555555;
    --text-light: #ffffff;
    --bg-dark: #f0f4f5;
    /* Light abgetsetzter Hintergrund statt Dunkel */

    /* Gradients */
    --gradient-primary: linear-gradient(135deg, var(--primary-color) 0%, var(--primary-light) 100%);
    --gradient-accent: linear-gradient(135deg, var(--accent-color) 0%, var(--accent-light) 100%);

    /* Typography */
    --font-heading: 'Outfit', sans-serif;
    --font-body: 'Inter', sans-serif;

    /* Dropdown Menu */
    --dropdown-bg: var(--surface-color);
    --dropdown-shadow: var(--shadow-md);

    /* Spacing */
    --spacing-sm: 1rem;
    --spacing-md: 2rem;
    --spacing-lg: 2.5rem;
    --spacing-xl: 3.5rem;

    /* Shadows */
    --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.05);
    --shadow-md: 0 8px 24px rgba(0, 0, 0, 0.08);

    /* Border Radius */
    --radius-sm: 8px;
    --radius-md: 16px;
    --radius-full: 9999px;

    /* Transitions */
    --transition-normal: 0.3s ease;
}

/* Reset */
*,
*::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(--bg-color);
    color: var(--text-main);
    line-height: 1.6;
    /* Removed overflow-x: hidden to prevent scrolling issues */
}

/* Typography */
h1,
h2,
h3,
h4,
h5,
h6 {
    font-family: var(--font-heading);
    font-weight: 600;
    line-height: 1.2;
    margin-bottom: var(--spacing-sm);
    color: var(--primary-dark);
}

h1 {
    font-size: clamp(2.5rem, 5vw, 4rem);
}

h2 {
    font-size: clamp(2rem, 4vw, 3rem);
}

h3 {
    font-size: 1.5rem;
}

p {
    margin-bottom: var(--spacing-sm);
    color: var(--text-muted);
}

a {
    text-decoration: none;
    color: inherit;
    transition: var(--transition-normal);
}

img {
    max-width: 100%;
    height: auto;
    display: block;
}

/* Utility Classes */
.container {
    width: 90%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 var(--spacing-sm);
}

.section {
    padding: var(--spacing-xl) 0;
}

.text-center {
    text-align: center;
}

.text-primary {
    color: var(--primary-color);
}

.text-accent {
    color: var(--accent-color);
}

.grid {
    display: grid;
    gap: var(--spacing-md);
}

.grid-cols-2 {
    grid-template-columns: repeat(2, 1fr);
}

.grid-cols-3 {
    grid-template-columns: repeat(3, 1fr);
}

.grid-cols-4 {
    grid-template-columns: repeat(4, 1fr);
}

@media (min-width: 769px) {
    .grid-item-center {
        grid-column: 2;
    }
}

/* Components */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.8rem 2rem;
    border-radius: var(--radius-full);
    font-weight: 600;
    font-family: var(--font-heading);
    cursor: pointer;
    transition: var(--transition-normal);
    border: none;
    font-size: 1rem;
}

.btn-primary {
    background: var(--gradient-primary);
    color: var(--text-light);
    box-shadow: var(--shadow-sm);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

.btn-outline {
    background: transparent;
    border: 2px solid var(--primary-color);
    color: var(--primary-color);
}

.btn-outline:hover {
    background: var(--primary-color);
    color: var(--text-light);
}

/* Header */
.header {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 1000;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid rgba(0, 0, 0, 0.05);
    padding: 1rem 0;
    transition: var(--transition-normal);
}

.header.scrolled {
    padding: 0.5rem 0;
    box-shadow: var(--shadow-sm);
}

.nav-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    height: 50px;
    /* Adjust based on actual logo aspect ratio */
}

.logo img {
    height: 100%;
    width: auto;
}

.nav-links {
    display: flex;
    gap: 2rem;
    align-items: center;
}

.nav-link {
    font-weight: 500;
    position: relative;
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: -4px;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--accent-color);
    transition: var(--transition-normal);
}

.nav-link:hover::after {
    width: 100%;
}

.mobile-menu-btn {
    display: none;
    background: none;
    border: none;
    font-size: 1.5rem;
    color: var(--primary-dark);
    cursor: pointer;
}

/* Hero Section */
.hero {
    position: relative;
    min-height: 90vh;
    display: flex;
    align-items: center;
    padding-top: 80px;
    overflow: hidden;
}

.hero-bg {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
}

.hero-bg img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.hero-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, rgba(255, 255, 255, 0.95) 0%, rgba(255, 255, 255, 0.8) 40%, rgba(255, 255, 255, 0) 100%);
    z-index: 0;
}

.hero-content {
    position: relative;
    z-index: 1;
    max-width: 600px;
}

/* Cards */
.card {
    background: var(--surface-color);
    border-radius: var(--radius-md);
    padding: 2rem;
    box-shadow: var(--shadow-sm);
    transition: transform 0.3s ease, box-shadow 0.3s ease, border-color 0.3s ease;
    border: 1px solid rgba(0, 0, 0, 0.03);
    contain: layout;
}

.card h2 {
    font-size: 1.5rem !important;
    line-height: 1.3 !important;
    word-wrap: break-word !important;
    overflow-wrap: break-word !important;
    word-break: break-word !important;
    hyphens: auto !important;
    white-space: normal !important;
    overflow: visible !important;
    text-overflow: clip !important;
}

/* .card:hover moved to end of file to override .reveal.active */

/* Footer */
.footer {
    background: var(--primary-dark);
    color: var(--text-light);
    padding: 4rem 0 2rem;
}

.footer a {
    color: rgba(255, 255, 255, 0.8);
}

.footer a:hover {
    color: var(--accent-color);
}

/* Responsive */
@media (max-width: 768px) {

    .grid-cols-2,
    .grid-cols-3,
    .grid-cols-4 {
        grid-template-columns: 1fr;
    }

    .nav-links {
        display: none;
        /* Hidden by default on mobile */
        position: absolute;
        top: 100%;
        left: 0;
        width: 100%;
        background: white;
        flex-direction: column;
        align-items: flex-start;
        padding: 2rem;
        box-shadow: var(--shadow-md);
        border-top: 1px solid rgba(0, 0, 0, 0.05);
    }

    .nav-links>* {
        width: 100%;
        text-align: left;
    }

    .nav-links>.nav-link {
        display: block;
        text-align: left;
        padding: 0;
    }

    .nav-links.active {
        display: flex;
    }

    .mobile-menu-btn {
        display: flex;
        align-items: center;
        justify-content: center;
        width: 48px;
        height: 48px;
    }

    .hero-overlay {
        background: rgba(255, 255, 255, 0.85);
    }
}

/* Dropdown Menu */
.dropdown {
    position: relative;
    display: inline-block;
}

.dropdown-content {
    display: none;
    position: absolute;
    background-color: var(--surface-color);
    min-width: 220px;
    box-shadow: var(--shadow-md);
    border-radius: var(--radius-sm);
    padding: 0.5rem 0;
    z-index: 1000;
    top: 100%;
    left: 0;
    border: 1px solid rgba(0, 0, 0, 0.05);
}

.dropdown-content a {
    color: var(--text-main);
    padding: 0.8rem 1.2rem;
    text-decoration: none;
    display: block;
    transition: var(--transition-normal);
    font-size: 0.95rem;
}

.dropdown-content a:hover {
    background-color: rgba(14, 77, 89, 0.05);
    color: var(--primary-color);
}

.dropdown:hover .dropdown-content {
    display: block;
}

/* Mobile Dropdown */
@media (max-width: 768px) {
    .dropdown {
        width: 100%;
        text-align: left;
    }

    .dropdown .nav-link {
        display: block;
        text-align: left;
        width: 100%;
    }

    .dropdown-content {
        position: relative;
        box-shadow: none;
        border: none;
        padding-left: 1rem;
        background: transparent;
    }

    .dropdown-content a {
        text-align: left;
    }

    .dropdown-content a.sub-item {
        padding-left: 2rem;
        font-size: 0.9rem;
        opacity: 0.9;
    }
}

/* Sub-item Indicator for Web (Desktop) */
.dropdown-content a.sub-item {
    padding-left: 2rem;
    position: relative;
}

.dropdown-content a.sub-item::before {
    content: '—';
    position: absolute;
    left: 0.8rem;
    color: var(--accent-light);
    font-weight: 300;
}

/* Navigation Active State */
.nav-link.active {
    color: var(--primary-color) !important;
    font-weight: 600;
}

.nav-link.active::after {
    content: '';
    position: absolute;
    bottom: -4px;
    left: 0;
    width: 100%;
    height: 2px;
    background: var(--gradient-primary);
    border-radius: var(--radius-full);
}

/* Animations */
.reveal {
    opacity: 0;
    transform: translate3d(0, 30px, 0);
    transition: opacity 0.8s ease-out, transform 0.8s ease-out;
    will-change: opacity, transform;
}

.reveal.active {
    opacity: 1;
    transform: translate3d(0, 0, 0);
    will-change: auto;
}

/* Centralized Component Styles */
.btn-jameda {
    background-color: #978258 !important;
    color: white !important;
    border: none !important;
    transition: var(--transition-normal) !important;
}

.btn-jameda:hover {
    background-color: #86724a !important;
    transform: translateY(-2px);
    box-shadow: var(--shadow-sm);
}

/* Responsive Fixes for WebP Picture tags */
picture img {
    width: 100%;
    height: auto;
}

/* FAQ Accordion */
.faq-container {
    max-width: 800px;
    margin: 0 auto;
}

.faq-item {
    background: var(--surface-color);
    border-radius: var(--radius-md);
    margin-bottom: 1rem;
    box-shadow: var(--shadow-sm);
    overflow: hidden;
    border: 1px solid rgba(0, 0, 0, 0.03);
    transition: var(--transition-normal);
}

.faq-item:hover {
    border-color: var(--accent-light);
}

.faq-header {
    width: 100%;
    padding: 1.5rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: none;
    border: none;
    cursor: pointer;
    text-align: left;
    outline: none;
}

.faq-header h3 {
    font-size: 1.1rem;
    margin: 0;
    color: var(--primary-dark);
    font-weight: 600;
}

.faq-icon {
    font-size: 0.9rem;
    color: var(--accent-color);
    transition: transform 0.3s ease;
}

.faq-item.active .faq-icon {
    transform: rotate(180deg);
}

.faq-content {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.4s ease-out, padding 0.3s ease;
    padding: 0 1.5rem;
}

.faq-item.active .faq-content {
    max-height: 500px;
    /* Adjust based on content */
    padding: 0 1.5rem 1.5rem;
}

.faq-content p {
    color: var(--text-muted);
    font-size: 1rem;
    line-height: 1.6;
}

/* Back to Top Button */
#backToTop {
    position: fixed;
    bottom: 30px;
    right: 30px;
    width: 45px;
    height: 45px;
    background: var(--primary-color);
    color: white;
    border: none;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    box-shadow: var(--shadow-md);
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease, transform 0.3s ease, background 0.3s ease;
    z-index: 1000;
    will-change: opacity, transform;
}

#backToTop.visible {
    opacity: 1;
    visibility: visible;
}

#backToTop:hover {
    background: var(--accent-color);
    transform: translate3d(0, -5px, 0);
}

/* Testimonial Slider */
.testimonials-section {
    position: relative;
    padding: var(--spacing-xl) 0;
    overflow: hidden;
    background: var(--bg-color);
}

.testimonial-slider {
    position: relative;
    max-width: 900px;
    margin: 0 auto;
    padding: 0 40px;
}

.testimonial-wrapper {
    overflow: hidden;
}

.testimonial-container {
    display: flex;
    transition: transform 0.6s cubic-bezier(0.4, 0, 0.2, 1);
    will-change: transform;
}

.testimonial-slide {
    min-width: 100%;
    opacity: 0;
    transition: opacity 0.6s ease;
    padding: 1rem;
}

.testimonial-slide.active {
    opacity: 1;
}

.testimonial-card {
    background: var(--surface-color);
    padding: 3rem;
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-md);
    text-align: center;
    position: relative;
    border: 1px solid rgba(0, 0, 0, 0.03);
}

.testimonial-quote {
    font-size: 1.25rem;
    line-height: 1.8;
    color: var(--text-main);
    font-style: italic;
    margin-bottom: 2rem;
    position: relative;
}

.testimonial-quote::before {
    content: '“';
    font-family: serif;
    font-size: 5rem;
    position: absolute;
    top: -2rem;
    left: 50%;
    transform: translateX(-50%);
    opacity: 0.1;
    color: var(--primary-color);
}

.testimonial-author {
    font-weight: 700;
    color: var(--primary-color);
    display: block;
    margin-bottom: 0.25rem;
}

.testimonial-rating {
    color: #ffc107;
    margin-bottom: 0.5rem;
    display: block;
}

.slider-nav {
    display: flex;
    justify-content: center;
    gap: 0.75rem;
    margin-top: 2.5rem;
}

.slider-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: rgba(14, 77, 89, 0.1);
    border: none;
    cursor: pointer;
    transition: all 0.3s ease;
}

.slider-dot.active {
    background: var(--primary-color);
    width: 25px;
    border-radius: 5px;
}

.slider-arrow {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: var(--surface-color);
    color: var(--primary-color);
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    box-shadow: var(--shadow-sm);
    border: 1px solid rgba(0, 0, 0, 0.05);
    z-index: 10;
    transition: all 0.3s ease;
}

.slider-arrow:hover {
    background: var(--primary-color);
    color: white;
}

.slider-arrow-prev {
    left: 0;
}

.slider-arrow-next {
    right: 0;
}

@media (max-width: 768px) {
    .testimonial-card {
        padding: 2rem 1.5rem;
    }

    .testimonial-quote {
        font-size: 1.1rem;
    }

    .slider-arrow {
        display: none;
    }

    .testimonial-slider {
        padding: 0;
    }
}

/* Fix for footer social media icons */
.footer a i.fa-brands {
    color: white !important;
    display: inline-block !important;
    min-width: 1.5rem;
    text-align: center;
}

/* Fix for incorrectly mapped fa-bars icon */
.fa-bars:before {
    content: "\f0c9" !important;
}