:root {
    --bg-main: #ffffff;
    --bg-surface: #f5f5f5; /* Light grey for sections */
    --accent: #c24e00; /* Gansohr Orange (Accessible Contrast) */
    --accent-hover: #a34200;
    --text-primary: #333333;
    --text-secondary: #555555;
    --border-color: #e0e0e0;
    --footer-bg: #222222;
    --error: #d32f2f;
    --success: #388e3c;
    --font-main: 'Open Sans', Arial, sans-serif;
    --container-max: 1200px;
    --transition: all 0.3s ease;
}

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

html {
    scroll-behavior: smooth;
    scroll-padding-top: 100px;
}

body {
    font-family: var(--font-main);
    background-color: var(--bg-main);
    color: var(--text-primary);
    line-height: 1.6;
    overflow-x: hidden;
}

h1, h2, h3, h4, h5, h6 {
    line-height: 1.3;
    font-weight: 700;
    margin-bottom: 1rem;
    color: var(--text-primary);
}

p {
    margin-bottom: 1rem;
    color: var(--text-secondary);
}

a {
    color: var(--accent);
    text-decoration: none;
    transition: var(--transition);
}

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

.container {
    width: 100%;
    max-width: var(--container-max);
    margin: 0 auto;
    padding: 0 5%;
}

.section {
    padding: 80px 0;
}

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

.mt-4 { margin-top: 2rem; }
.w-100 { width: 100%; }
.hidden { display: none !important; }
.text-center { text-align: center; }

/* Typography Extras */
.section-title {
    font-size: 2.2rem;
    margin-bottom: 0.5rem;
}

.title-underline {
    height: 4px;
    width: 60px;
    background-color: var(--accent);
    margin-bottom: 1.5rem;
}

.title-underline.center {
    margin: 0 auto 1.5rem auto;
}

/* Buttons */
.btn {
    display: inline-flex;
    justify-content: center;
    align-items: center;
    padding: 12px 24px;
    border-radius: 4px;
    font-weight: 600;
    text-align: center;
    cursor: pointer;
    border: 2px solid transparent;
    transition: var(--transition);
    text-transform: uppercase;
    font-size: 0.9rem;
    letter-spacing: 0.5px;
}

.btn-primary {
    background-color: var(--accent);
    color: #ffffff !important;
}

.btn-primary:hover {
    background-color: var(--accent-hover);
    transform: translateY(-2px);
    box-shadow: 0 4px 10px rgba(230, 92, 0, 0.3);
}

.btn-secondary {
    background-color: transparent;
    border-color: var(--text-primary);
    color: var(--text-primary);
}

.btn-secondary:hover {
    background-color: rgba(0,0,0,0.05);
}

/* Shadows and Boxes */
.shadow-box {
    background: var(--bg-main);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.08);
    border-radius: 4px;
    border: 1px solid var(--border-color);
    height: fit-content;
    align-self: start;
}

/* Nav */
.navbar {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 1000;
    background: var(--bg-main);
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    transition: var(--transition);
    padding: 1rem 0;
}

.nav-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    display: flex;
    align-items: center;
    gap: 15px; /* Space between logo image and text block */
    text-decoration: none;
}

.nav-logo-img {
    height: 40px; /* Adjust size as needed */
    width: auto;
    object-fit: contain;
}

.logo-text-container {
    display: flex;
    flex-direction: column;
    white-space: nowrap;
}

.logo-text {
    font-size: 1.8rem;
    font-weight: 800;
    letter-spacing: 1px;
    color: var(--text-primary);
}

.logo-sub {
    font-size: 0.8rem;
    color: var(--accent);
    text-transform: uppercase;
    font-weight: 600;
}

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

.nav-links li a {
    color: var(--text-primary);
    font-weight: 600;
    font-size: 1rem;
    position: relative;
    padding-bottom: 4px;
}

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

.nav-links li a::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 3px;
    background-color: var(--accent);
    transition: var(--transition);
}

.nav-links li a:hover::after {
    width: 100%;
}

/* Dropdown styling */
.dropdown {
    position: relative;
}

.dropdown-menu {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    background: var(--bg-main);
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
    list-style: none;
    padding: 0.5rem 0;
    min-width: 250px;
    border-radius: 4px;
    z-index: 1000;
}

.dropdown:hover .dropdown-menu {
    display: block;
}

.dropdown-menu li {
    margin: 0;
}

.dropdown-menu li a {
    color: var(--text-primary);
    padding: 0.8rem 1.5rem;
    display: block;
    font-weight: 600;
    font-size: 0.95rem;
    border-bottom: 1px solid var(--bg-surface);
}

.dropdown-menu li:last-child a {
    border-bottom: none;
}

.dropdown-menu li a::after {
    display: none !important;
}

.dropdown-menu li a:hover {
    background: var(--bg-surface);
    color: var(--accent);
}

.mobile-menu-toggle {
    display: none;
    font-size: 1.5rem;
    cursor: pointer;
    color: var(--text-primary);
}

/* Hero */
.hero {
    height: 80vh;
    min-height: 500px;
    display: flex;
    align-items: center;
    position: relative;
    overflow: hidden;
    margin-top: 80px; /* Offset for fixed nav */
}

.hero-bg-image {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -2;
}

.hero-slide {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    opacity: 0;
    transition: opacity 1.5s ease-in-out;
}

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

.hero-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.6); /* Dark overlay to make text readable */
    z-index: -1;
}

.hero-content {
    position: relative;
    z-index: 1;
    max-width: 800px;
    text-align: center;
}

.hero h1 {
    font-size: clamp(2.5rem, 5vw, 4rem);
    font-weight: 800;
    margin-bottom: 1.5rem;
    color: #ffffff;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.5);
}

.hero .subtitle {
    font-size: 1.25rem;
    color: #f0f0f0;
    margin-bottom: 2.5rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    font-weight: 600;
}

.hero-actions {
    display: flex;
    gap: 1rem;
    justify-content: center;
}

/* Layout Grids */
.grid-2-col {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
}

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

/* Blockquote */
.blockquote {
    font-size: 1.2rem;
    font-style: italic;
    border-left: 4px solid var(--accent);
    padding-left: 1.5rem;
    margin: 2rem 0;
    color: var(--text-primary);
    background: var(--bg-surface);
    padding: 1rem 1.5rem;
}

/* Services Grid (Traditional Cards) */
.services-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 2rem;
}

.classic-card {
    background: var(--bg-main);
    border: 1px solid var(--border-color);
    border-radius: 4px;
    display: flex;
    flex-direction: column;
    transition: var(--transition);
    text-decoration: none;
    overflow: hidden;
}

.classic-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.1);
    border-color: var(--accent);
}

.card-img-top {
    height: 200px;
    width: 100%;
    overflow: hidden;
    position: relative;
}

.card-img-top img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.classic-card:hover .card-img-top img {
    transform: scale(1.05);
}

.card-body {
    padding: 1.5rem;
    display: flex;
    flex-direction: column;
    flex-grow: 1;
}

.card-body h3 {
    font-size: 1.4rem;
    margin-bottom: 0.5rem;
    color: var(--text-primary);
}

.card-body p {
    margin: 0 0 1rem 0;
    color: var(--text-secondary);
    flex-grow: 1;
}

.text-link {
    color: var(--accent);
    font-weight: 600;
    font-size: 0.95rem;
    display: inline-block;
}

/* Contact Details */
.contact-item {
    display: flex;
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.contact-item .icon {
    font-size: 1.5rem;
    color: var(--accent);
}

/* Form Styles */
.form-box {
    padding: 2.5rem;
}

.contact-form .form-group {
    margin-bottom: 1.5rem;
}

.contact-form label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 600;
    color: var(--text-primary);
    font-size: 0.95rem;
}

.contact-form textarea {
    resize: none;
}

.contact-form input[type="text"],
.contact-form input[type="email"],
.contact-form input[type="tel"],
.contact-form textarea,
.contact-form input[type="file"] {
    width: 100%;
    padding: 12px;
    background: var(--bg-main);
    border: 1px solid var(--border-color);
    border-radius: 4px;
    color: var(--text-primary);
    font-family: var(--font-main);
    transition: var(--transition);
    font-size: 16px; /* Prevents iOS auto-zoom */
}

.contact-form input:focus,
.contact-form textarea:focus {
    outline: none;
    border-color: var(--accent);
    box-shadow: 0 0 0 2px rgba(230, 92, 0, 0.2);
}

.checkbox-group {
    display: flex;
    align-items: flex-start;
    gap: 0.5rem;
}

.checkbox-group input {
    margin-top: 5px;
}

.checkbox-group label {
    margin: 0;
    font-size: 0.9rem;
    font-weight: 400;
}

.form-success {
    margin-top: 1rem;
    padding: 1rem;
    background-color: #e8f5e9;
    border: 1px solid var(--success);
    color: var(--success);
    border-radius: 4px;
    text-align: center;
}

/* Footer */
.footer {
    background-color: var(--footer-bg);
    color: rgba(255,255,255,0.7);
    padding-top: 4rem;
}

.footer-content {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 2rem;
    margin-bottom: 2rem;
}

.footer-brand p {
    margin-top: 1rem;
}

.footer-links h4 {
    color: #ffffff;
    margin-bottom: 1rem;
    position: relative;
    display: inline-block;
}

.footer-links h4::after {
    content: '';
    position: absolute;
    bottom: -5px;
    left: 0;
    width: 30px;
    height: 2px;
    background-color: var(--accent);
}

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

.footer-links li {
    margin-bottom: 0.5rem;
}

.footer-links a {
    color: rgba(255,255,255,0.7);
}

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

.footer-bottom {
    text-align: center;
    padding: 1.5rem 0;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    font-size: 0.9rem;
}

/* Cookie Banner */
.cookie-banner {
    position: fixed;
    bottom: 20px;
    left: 20px;
    right: 20px;
    max-width: 500px;
    background: var(--bg-main);
    border: 1px solid var(--border-color);
    box-shadow: 0 5px 20px rgba(0,0,0,0.2);
    border-left: 5px solid var(--accent);
    border-radius: 4px;
    padding: 2rem;
    z-index: 9999;
    transform: translateY(150%);
    transition: transform 0.5s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

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

.cookie-content h3 {
    font-size: 1.25rem;
    margin-bottom: 0.5rem;
}

.cookie-content p {
    font-size: 0.9rem;
    margin-bottom: 1.5rem;
}

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

/* Animations Scroll Reveal */
.fade-in-up {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.6s ease-out, transform 0.6s ease-out;
}

.fade-in-up.visible {
    opacity: 1;
    transform: translateY(0);
}

.stagger-1 { transition-delay: 0.1s; }
.stagger-2 { transition-delay: 0.2s; }
.stagger-3 { transition-delay: 0.3s; }

/* Subpage Settings */
.subpage-hero {
    height: 35vh;
    min-height: 250px;
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: var(--bg-surface);
    position: relative;
    padding-top: 80px;
    border-bottom: 1px solid var(--border-color);
}

/* Custom spacing for text-only pages on mobile */
.subpage-hero.text-page-hero {
    height: auto;
    min-height: auto;
    padding-top: 100px;
    padding-bottom: 30px;
}
.subpage-hero.text-page-hero h1 {
    font-size: clamp(1.8rem, 3vw, 2.5rem);
    margin-bottom: 0;
}
@media (max-width: 768px) {
    .subpage-hero.text-page-hero {
        padding-top: 80px;
        padding-bottom: 20px;
    }
}

/* Override background for subpage hero to show image if needed */
.subpage-hero.with-image {
    background-color: var(--text-primary);
    overflow: hidden;
}

.subpage-hero h1 {
    font-size: clamp(2rem, 4vw, 3rem);
    color: var(--text-primary);
    text-align: center;
    position: relative;
    z-index: 1;
}

.subpage-hero.with-image h1 {
    color: #fff;
    text-shadow: 1px 1px 5px rgba(0,0,0,0.7);
}

/* Responsive */
@media (max-width: 900px) {
    .grid-2-col {
        grid-template-columns: 1fr;
        gap: 2rem;
    }
    
    .section {
        padding: 50px 0;
    }

    .hidden-mobile {
        display: none;
    }
    
    .footer-content {
        grid-template-columns: 1fr;
        text-align: center;
    }

    .footer-content h4::after {
        left: 50%;
        transform: translateX(-50%);
    }
}

@media (max-width: 768px) {
    .nav-links {
        display: none;
    }
    
    .mobile-menu-toggle {
        display: block;
        padding: 5px;
        font-size: 1.8rem;
    }
    
    .hero h1 {
        font-size: 2rem;
    }

    .subpage-hero h1 {
        font-size: 1.8rem;
    }

    .btn {
        width: 100%;
        margin-bottom: 0.5rem;
    }

    /* Make dropdowns accessible on mobile */
    .dropdown-menu {
        position: relative;
        box-shadow: none;
        width: 100%;
        background: var(--bg-surface);
        display: none; /* Can be toggled with JS or CSS active state, falling back to basic display for now */
    }

    .dropdown:hover .dropdown-menu,
    .dropdown:active .dropdown-menu {
        display: block;
    }
}

/* Inline Carousel / Slideshow */
.carousel-container {
    position: relative;
    width: 100%;
    /* Let the user control the height via inline style if they want, but default to 250px */
    border-radius: 4px;
    overflow: hidden;
    background: #e0e0e0;
}

.carousel-slide {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
    transition: opacity 0.5s ease-in-out;
    pointer-events: none;
}

.carousel-slide.active {
    opacity: 1;
    pointer-events: auto;
}

.carousel-slide img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.carousel-btn {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(0, 0, 0, 0.4);
    color: white;
    border: none;
    width: 40px;
    height: 40px;
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 1.5rem;
    cursor: pointer;
    border-radius: 50%;
    transition: background 0.3s ease;
    z-index: 10;
    user-select: none;
}

.carousel-btn:hover {
    background: var(--accent);
}

.carousel-prev {
    left: 10px;
}

.carousel-next {
    right: 10px;
}

/* --- Final Polish Additions --- */

/* Back to Top Button */
.back-to-top {
    position: fixed;
    bottom: 20px; /* Same height as cookie fingerprint */
    right: 20px;  /* Same inset as cookie fingerprint */
    width: 45px;
    height: 45px;
    background-color: var(--accent);
    color: white;
    border: none;
    border-radius: 50%;
    font-size: 1.5rem;
    cursor: pointer;
    box-shadow: 0 4px 10px rgba(0,0,0,0.3);
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease, transform 0.3s ease, background-color 0.3s ease;
    z-index: 999;
    display: flex;
    justify-content: center;
    align-items: center;
}

.back-to-top.visible {
    opacity: 1;
    pointer-events: auto;
}

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

/* Active Menu Item */
.nav-links a.active {
    color: var(--accent);
}

.nav-links a.active::after {
    width: 100%;
}

/* Stylish List */
.stylish-list {
    list-style: none;
    padding-left: 0;
    color: var(--text-secondary);
    line-height: 2;
}

.stylish-list li {
    position: relative;
    padding-left: 30px;
    margin-bottom: 15px;
}

.stylish-list li::before {
    content: '';
    position: absolute;
    left: 0;
    top: 10px;
    width: 18px;
    height: 18px;
    background-image: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="%23e65c00" stroke-width="3" stroke-linecap="round" stroke-linejoin="round"><polyline points="20 6 9 17 4 12"></polyline></svg>');
    background-size: contain;
    background-repeat: no-repeat;
}

/* --- Dark Mode Support --- */
@media (prefers-color-scheme: dark) {
    :root {
        --bg-main: #121212;
        --bg-surface: #1e1e1e;
        --text-primary: #e4e4e4;
        --text-secondary: #aaaaaa;
        --border-color: #333333;
        --footer-bg: #0a0a0a;
    }

    img, .subpage-hero.with-image {
        opacity: 0.85; /* Reduce glare of hard white images */
        transition: opacity 0.3s ease;
    }
    
    img:hover {
        opacity: 1;
    }

    .shadow-box, .job-card {
        background-color: #242424 !important;
        background: #242424 !important;
        box-shadow: 0 6px 20px rgba(0, 0, 0, 0.6) !important;
        border-color: #333 !important;
    }

    /* Reduce harshness of white backgrounds in specific hardcoded elements */
    .btn-secondary:hover {
        background-color: rgba(255,255,255,0.05);
    }
}

/* --- Job Cards --- */
.job-card {
    background: var(--bg-main);
    border: 1px solid var(--border-color);
    border-left: 4px solid var(--accent);
    border-radius: 4px;
    padding: 2rem;
    margin-bottom: 2rem;
    box-shadow: 0 4px 10px rgba(0,0,0,0.05);
}
.job-card h3 {
    color: var(--accent);
    font-size: 1.5rem;
    margin-bottom: 0.5rem;
}
.job-meta {
    font-weight: 600;
    color: var(--text-secondary);
    margin-bottom: 1.5rem;
    display: inline-block;
    background: var(--bg-surface);
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 0.85rem;
}
.job-details ul {
    margin-left: 1.5rem;
    margin-bottom: 1.5rem;
    color: var(--text-secondary);
}
.job-details li {
    margin-bottom: 0.5rem;
}
.apply-section {
    display: none;
    margin-top: 2rem;
    padding-top: 2rem;
    border-top: 1px solid var(--border-color);
}
.apply-section.active {
    display: block;
}

/* Philosophie Section Refinement */
.philosophie-section .grid-2-col {
    grid-template-columns: 0.9fr 1.1fr;
    align-items: stretch;
}

.philosophie-section .image-area {
    position: relative;
    height: 100%;
    min-height: 450px;
    overflow: hidden;
    background: transparent; /* Remove potential stripe background */
    border: none; /* Rely on image shadow/radius or section bg */
    box-shadow: none; /* Move shadow to a cleaner container or img */
}

.philosophie-section .image-area img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    box-shadow: 0 10px 30px rgba(0,0,0,0.15);
    border-radius: 8px;
}

@media (max-width: 768px) {
    .philosophie-section .grid-2-col {
        grid-template-columns: 1fr;
    }
    .philosophie-section .image-area {
        min-height: 300px;
        margin-top: 2rem;
    }
}

/* --- A11y Accessibility Focus States --- */
*:focus-visible {
    outline: 3px solid var(--accent);
    outline-offset: 2px;
    border-radius: 2px;
}

a:focus-visible, button:focus-visible, input:focus-visible, textarea:focus-visible {
    box-shadow: 0 0 0 4px rgba(230, 92, 0, 0.3);
}
