/* HEGO Management Website Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --primary-color: #1a365d;
    --secondary-color: #2d6187;
    --accent-color: #3182ce;
    --text-color: #2d3748;
    --text-light: #718096;
    --background-color: #ffffff;
    --section-bg: #f7fafc;
    --border-color: #e2e8f0;
    --success-color: #48bb78;
    --warning-color: #ed8936;
    --error-color: #f56565;
    --backoffice-red: #dc2626;
    --backoffice-red-light: #fef2f2;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    line-height: 1.6;
    color: var(--text-color);
    background-color: var(--background-color);
}

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

/* Header & Navigation */
.header {
    background: var(--background-color);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
}

.nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 2rem;
    max-width: 1200px;
    margin: 0 auto;
    position: relative;
}

.nav-brand .logo {
    height: 50px;
    width: auto;
}

.nav-menu {
    display: flex;
    align-items: center;
    gap: 2rem;
}

.nav-link {
    text-decoration: none;
    color: var(--text-color);
    font-weight: 500;
    transition: color 0.3s ease;
    position: relative;
}

.nav-link:hover,
.nav-link.active {
    color: var(--primary-color);
}

.nav-link.active::after {
    content: '';
    position: absolute;
    bottom: -5px;
    left: 0;
    right: 0;
    height: 2px;
    background: var(--primary-color);
}

.lang-switch {
    display: flex;
    gap: 0.5rem;
    margin-left: 1rem;
    padding-left: 1rem;
    border-left: 1px solid var(--border-color);
}

.lang-switch a {
    padding: 0.25rem 0.5rem;
    text-decoration: none;
    color: var(--text-light);
    font-size: 0.875rem;
    font-weight: 500;
    border-radius: 4px;
    transition: all 0.3s ease;
}

.lang-switch a.active,
.lang-switch a:hover {
    color: var(--primary-color);
    background: var(--section-bg);
}

/* Mobile Icons - Shown only on mobile */
.mobile-icons {
    display: none;
    align-items: center;
    gap: 1rem;
}

.mobile-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    background: var(--primary-color);
    color: white;
    border-radius: 50%;
    text-decoration: none;
    transition: all 0.3s ease;
    box-shadow: 0 2px 8px rgba(26, 54, 93, 0.2);
}

.mobile-icon:hover {
    background: var(--secondary-color);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(26, 54, 93, 0.3);
}

.mobile-icon svg {
    width: 20px;
    height: 20px;
    fill: currentColor;
}

/* Hamburger Menu - Mobile Only */
.hamburger-menu {
    display: none;
    flex-direction: column;
    justify-content: space-between;
    width: 30px;
    height: 21px;
    cursor: pointer;
    padding: 0;
    background: transparent;
    border: none;
    outline: none;
}

.hamburger-menu span {
    width: 100%;
    height: 3px;
    background-color: var(--primary-color);
    transition: all 0.3s ease;
    display: block;
    margin: 0;
}

.hamburger-menu.active span:nth-child(1) {
    transform: translateY(9px) rotate(45deg);
}

.hamburger-menu.active span:nth-child(2) {
    opacity: 0;
}

.hamburger-menu.active span:nth-child(3) {
    transform: translateY(-9px) rotate(-45deg);
}

/* Main Content */
main {
    margin-top: 80px;
}

/* Hero Section */
.hero {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 3rem;
    align-items: center;
    padding: 4rem 2rem;
    max-width: 1200px;
    margin: 0 auto;
    min-height: 70vh;
}

.hero-content {
    max-width: 500px;
}

/* Increase vertical spacing between hero texts */
.hero-content > * + * {
    margin-top: 0.75rem;
}

.hero-title {
    font-size: 3rem;
    font-weight: 700;
    color: var(--primary-color);
    margin-bottom: 1rem;
    line-height: 1.2;
}

.hero-subtitle {
    font-size: 1.25rem;
    color: var(--text-light);
    margin-bottom: 1rem;
    font-weight: 500;
}

.hero-text {
    font-size: 1.5rem;
    color: var(--secondary-color);
    margin-bottom: 2rem;
    font-weight: 600;
}

.hero-cta {
    display: flex;
    gap: 1rem;
    flex-wrap: nowrap;
    align-items: center;
}

/* Ensure buttons stay on one line next to each other on desktop */
.hero-cta .btn {
    flex: 0 0 auto;
    white-space: nowrap;
}

.hero-image {
    display: flex;
    justify-content: center;
    align-items: center;
    flex-direction: column;
    gap: 1rem;
}

.profile-image {
    width: 100%;
    max-width: 400px;
    height: auto;
    border-radius: 12px;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.1);
}

/* Buttons */
.btn {
    display: inline-block;
    padding: 0.875rem 1.5rem;
    text-decoration: none;
    border-radius: 6px;
    font-weight: 600;
    text-align: center;
    transition: all 0.3s ease;
    border: 2px solid transparent;
    cursor: pointer;
    font-size: 1rem;
}

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

.btn-primary:hover {
    background: var(--secondary-color);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(26, 54, 93, 0.3);
}

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

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

/* Services Section */
.services {
    padding: 4rem 0;
    background: var(--section-bg);
}

.section-title {
    font-size: 2.5rem;
    font-weight: 700;
    color: var(--primary-color);
    text-align: center;
    margin-bottom: 3rem;
}

.services-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
}

.service-card {
    background: white;
    padding: 2rem;
    border-radius: 12px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.05);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.service-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.1);
}

.service-card h3 {
    color: var(--primary-color);
    font-size: 1.5rem;
    font-weight: 600;
    margin-bottom: 1rem;
}

.service-card p {
    color: var(--text-light);
    line-height: 1.6; /* restore base line-height for normal wraps */
}

/* Add extra spacing for manual line breaks within service descriptions */
.service-card p br {
    display: block;
    margin-top: 0.5rem; /* slightly larger gap than normal line wrap */
}

/* CTA Section */
.cta-section {
    padding: 4rem 0;
    background: var(--primary-color);
    color: white;
    text-align: center;
}

.cta-section h2 {
    font-size: 2.5rem;
    font-weight: 700;
    margin-bottom: 1rem;
}

.cta-section p {
    font-size: 1.25rem;
    margin-bottom: 2rem;
    opacity: 0.9;
}

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

.cta-section .btn-primary:hover {
    background: var(--section-bg);
    transform: translateY(-2px);
}

/* Page Content */
.page-header {
    background: var(--section-bg);
    padding: 3rem 0;
    text-align: center;
    margin-top: 0;
}

.page-header h1 {
    font-size: 3rem;
    font-weight: 700;
    color: var(--primary-color);
    margin-bottom: 1rem;
}

.page-subtitle {
    font-size: 1.25rem;
    color: var(--text-light);
    font-weight: 500;
    max-width: 800px;
    margin: 0 auto;
    line-height: 1.6;
}

.page-content {
    padding: 4rem 0;
}

.content {
    max-width: 800px;
    margin: 0 auto;
    font-size: 1.125rem;
    line-height: 1.8;
}

.content h2 {
    color: var(--primary-color);
    font-size: 2rem;
    margin: 2rem 0 1rem 0;
}

.content h3 {
    color: var(--secondary-color);
    font-size: 1.5rem;
    margin: 1.5rem 0 0.75rem 0;
}

.content p {
    margin-bottom: 1.5rem;
}

.content ul {
    margin-bottom: 1.5rem;
    padding-left: 2rem;
}

.content li {
    margin-bottom: 0.5rem;
}

/* Footer */
.footer {
    background: var(--primary-color);
    color: white;
    padding: 3rem 0 2rem 0;
}

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

.footer-section h4 {
    font-size: 1.25rem;
    font-weight: 600;
    margin-bottom: 1rem;
    color: white;
}

.footer-section p {
    opacity: 0.9;
    margin-bottom: 0.5rem;
}

/* Ensure footer links (e.g., phone/mail) are readable on blue background */
.footer .footer-section a {
    color: #ffffff;
    text-decoration: none;
}

.footer .footer-section a:hover,
.footer .footer-section a:focus {
    color: var(--accent-color);
    text-decoration: underline;
}

.footer-logo {
    height: 60px;
    width: auto;
    margin-bottom: 1rem;
    filter: brightness(0) invert(1);
}

.footer-link {
    display: block;
    color: #ffffff;
    text-decoration: none;
    margin-bottom: 10px;
    padding: 5px 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.3);
    transition: color 0.3s ease;
}

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

/* Impressum Styles */
.impressum-content {
    padding: 40px 0 60px 0;
    background: var(--background-color);
    min-height: calc(100vh - 200px);
}

.impressum-content .container {
    max-width: 1000px;
    margin: 0 auto;
    padding: 0 20px;
}

.impressum-section {
    margin-bottom: 35px;
    padding: 25px;
    background: var(--section-bg);
    border-radius: 12px;
    border-left: 4px solid var(--accent-color);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.impressum-section:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.impressum-section h2 {
    color: var(--primary-color);
    font-size: 1.5rem;
    margin-bottom: 15px;
    font-weight: 600;
}

.impressum-section p {
    line-height: 1.7;
    margin-bottom: 10px;
}

.impressum-section ul {
    margin: 15px 0;
    padding-left: 20px;
}

.impressum-section li {
    margin-bottom: 5px;
    line-height: 1.6;
}

/* Impressum Hero Section */
.impressum-content .hero,
body:has(.impressum-content) .hero {
    background: var(--section-bg);
    color: var(--text-color);
    padding: 3rem 0 !important;
    margin: 0 !important;
    text-align: center;
    min-height: auto !important;
}

.impressum-content .hero .container {
    max-width: 800px;
    padding: 0 20px;
}

.impressum-content .hero h1,
body:has(.impressum-content) .hero h1 {
    font-size: 3rem !important;
    font-weight: 700 !important;
    margin-bottom: 1rem !important;
    padding: 0 !important;
    color: var(--primary-color) !important;
    line-height: 1.2 !important;
}

/* Edit controls in impressum hero section */
.impressum-content .hero .backoffice-edit-controls {
    margin-top: 1rem;
}

.impressum-content .hero .backoffice-edit-btn {
    background: #007bff;
    color: white;
    border: none;
    border-radius: 6px;
    padding: 8px 16px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
    box-shadow: 0 2px 4px rgba(0, 123, 255, 0.2);
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.impressum-content .hero .backoffice-edit-btn:hover {
    background: #0056b3;
    transform: translateY(-1px);
    box-shadow: 0 3px 6px rgba(0, 123, 255, 0.3);
}

@keyframes pulse {
    0% { box-shadow: 0 6px 16px rgba(220, 53, 69, 0.4); }
    50% { box-shadow: 0 6px 20px rgba(220, 53, 69, 0.6); }
    100% { box-shadow: 0 6px 16px rgba(220, 53, 69, 0.4); }
}

/* Nested Object Form Styles */
.nested-object-group {
    margin-bottom: 25px;
    padding: 15px;
    border: 2px solid var(--border-color);
    border-radius: 8px;
    background: #f8f9fa;
}

.nested-object-title {
    color: var(--primary-color);
    font-size: 1.2rem;
    margin-bottom: 15px;
    font-weight: 600;
    border-bottom: 2px solid var(--accent-color);
    padding-bottom: 8px;
}

.nested-fields {
    display: grid;
    gap: 15px;
}

.field-help {
    color: var(--text-light);
    font-size: 0.85rem;
    margin-top: 5px;
    display: block;
}

.membership-logo {
    height: 80px;
    width: auto;
    background: #ffffff;
    padding: 6px 8px;
    border-radius: 8px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.08);
}

/* Contact Page Styles */
.main .container .contact-wrapper,
.contact-wrapper {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 60px;
    padding: 60px 0;
    max-width: 1200px;
    margin: 0 auto;
}

.main .contact-form,
.contact-form {
    background: var(--section-bg);
    padding: 40px;
    border-radius: 12px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

.contact-form h2 {
    color: var(--primary-color);
    font-size: 2rem;
    margin-bottom: 30px;
    font-weight: 600;
}

.contact-form .form,
.form {
    display: flex !important;
    flex-direction: column !important;
    gap: 20px !important;
}

.contact-form .form-group,
.form-group {
    display: flex !important;
    flex-direction: column !important;
}

.contact-form .form-group label,
.form-group label {
    color: var(--text-color) !important;
    font-weight: 500 !important;
    margin-bottom: 8px !important;
    font-size: 0.95rem !important;
}

.contact-form .form-group input,
.contact-form .form-group textarea,
.form-group input,
.form-group textarea {
    padding: 12px 16px !important;
    border: 2px solid var(--border-color) !important;
    border-radius: 8px !important;
    font-size: 1rem !important;
    font-family: inherit !important;
    transition: border-color 0.3s ease !important;
    background: var(--background-color) !important;
}

.form-group input:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--accent-color);
    box-shadow: 0 0 0 3px rgba(49, 130, 206, 0.1);
}

.form-group textarea {
    resize: vertical;
    min-height: 120px;
}

.captcha-group {
    background: #f0f8ff;
    padding: 20px;
    border-radius: 8px;
    border: 1px solid var(--accent-color);
}

.captcha-group label {
    color: var(--accent-color);
    font-weight: 600;
}

.btn {
    padding: 14px 28px;
    border: none;
    border-radius: 8px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    text-decoration: none;
    display: inline-block;
    text-align: center;
}

.btn-primary {
    background: var(--accent-color);
    color: white;
}

.btn-primary:hover {
    background: var(--secondary-color);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(49, 130, 206, 0.3);
}

.contact-info {
    padding: 20px 0;
}

.contact-info h3 {
    color: var(--primary-color);
    font-size: 1.8rem;
    margin-bottom: 30px;
    font-weight: 600;
}

.contact-item {
    margin-bottom: 25px;
    padding: 15px 0;
    border-bottom: 1px solid var(--border-color);
}

.contact-item:last-child {
    border-bottom: none;
}

.contact-item strong {
    color: var(--primary-color);
    font-weight: 600;
    display: block;
    margin-bottom: 5px;
}

.contact-item p {
    color: var(--text-color);
    margin: 0;
    line-height: 1.5;
}

/* Contact info links: keep normal text color, underline for clarity */
.contact-info a,
.contact-info a:visited {
    color: var(--text-color);
    text-decoration: underline;
}

.contact-info a:hover,
.contact-info a:focus {
    color: var(--text-color);
    text-decoration: underline;
}

/* Error/Success Messages */
.error-message {
    background: #fef2f2;
    color: var(--error-color);
    padding: 15px;
    border-radius: 8px;
    border: 1px solid #fecaca;
    margin-bottom: 20px;
}

.success-message {
    background: #f0fff4;
    color: var(--success-color);
    padding: 15px;
    border-radius: 8px;
    border: 1px solid #bbf7d0;
    margin-bottom: 20px;
}

/* Mobile Responsive */
@media (max-width: 768px) {
    .contact-wrapper {
        grid-template-columns: 1fr;
        gap: 40px;
        padding: 40px 20px;
    }
    
    .contact-form {
        padding: 30px 20px;
    }
    
    .contact-form h2 {
        font-size: 1.5rem;
        margin-bottom: 20px;
    }
    
    /* Impressum Mobile Styles */
    .impressum-content {
        padding: 30px 0 40px 0;
    }
    
    .impressum-content .hero,
    body:has(.impressum-content) .hero {
        padding: 2rem 0 !important;
    }
    
    .impressum-content .hero h1,
    body:has(.impressum-content) .hero h1 {
        font-size: 2.5rem !important;
    }
    
    .impressum-section {
        margin-bottom: 25px;
        padding: 20px;
        border-radius: 8px;
    }
    
    .impressum-section h2 {
        font-size: 1.3rem;
        margin-bottom: 12px;
    }
}

/* Responsive Design */
@media (min-width: 769px) {
    .hamburger-menu {
        display: none !important;
    }
    
    .nav-menu {
        display: flex !important;
        position: static;
        flex-direction: row;
        background: transparent;
        box-shadow: none;
        border: none;
        padding: 0;
    }
}

@media (max-width: 768px) {
    .hamburger-menu {
        display: flex !important;
    }

    .nav {
        position: relative;
        flex-wrap: wrap;
        padding: 1rem 2rem;
    }

    .nav-menu {
        display: none;
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        background: var(--background-color);
        flex-direction: column;
        gap: 0;
        text-align: center;
        box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
        border-top: 1px solid var(--border-color);
        padding: 1rem 0;
        z-index: 999;
        width: 100%;
    }

    .nav-menu.active {
        display: flex !important;
    }

    .nav-link {
        padding: 1rem 2rem;
        display: block;
        border-bottom: 1px solid var(--border-color);
        transition: background-color 0.3s ease;
        width: 100%;
    }

    .nav-link:hover {
        background-color: var(--section-bg);
    }

    .nav-link:last-of-type {
        border-bottom: none;
    }

    .lang-switch {
        margin-left: 0;
        padding-left: 0;
        border-left: none;
        border-top: 1px solid var(--border-color);
        padding-top: 1rem;
        justify-content: center;
        width: 100%;
    }

    .hero {
        grid-template-columns: 1fr;
        text-align: center;
        padding: 2rem 1rem;
        gap: 2rem;
    }

    .hero-title {
        font-size: 2.5rem;
    }

    .hero-text {
        font-size: 1.25rem;
    }

    .hero-cta {
        justify-content: center;
    }

    .section-title {
        font-size: 2rem;
    }

    .services-grid {
        grid-template-columns: 1fr;
    }

    .page-header h1 {
        font-size: 2.5rem;
    }

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

@media (max-width: 480px) {
    .hero-title {
        font-size: 2rem;
    }

    .hero-text {
        font-size: 1.125rem;
    }

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

    .hero-cta {
        flex-direction: column;
    }

    .cta-section h2 {
        font-size: 2rem;
    }

    .page-header h1 {
        font-size: 2rem;
    }
}

/* Animations */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.hero-content > * {
    animation: fadeInUp 0.6s ease-out forwards;
}

.hero-content > *:nth-child(1) {
    animation-delay: 0.1s;
}

.hero-content > *:nth-child(2) {
    animation-delay: 0.2s;
}

.hero-content > *:nth-child(3) {
    animation-delay: 0.3s;
}

.hero-content > *:nth-child(4) {
    animation-delay: 0.4s;
}

.service-card {
    animation: fadeInUp 0.6s ease-out forwards;
}

/* Loading States */
.loading {
    opacity: 0.7;
    pointer-events: none;
}

.loading::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 20px;
    height: 20px;
    margin: -10px 0 0 -10px;
    border: 2px solid var(--primary-color);
    border-radius: 50%;
    border-top-color: transparent;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

/* Accessibility */
.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

/* Focus states */
button:focus,
.btn:focus,
.nav-link:focus {
    outline: 2px solid var(--accent-color);
    outline-offset: 2px;
}

/* High contrast mode support */
@media (prefers-contrast: high) {
    :root {
        --primary-color: #000000;
        --secondary-color: #333333;
        --text-color: #000000;
        --text-light: #666666;
        --border-color: #000000;
    }
}

/* About Page Specific Styles */

/* About Hero Section */
.about-hero {
    background: linear-gradient(135deg, var(--section-bg) 0%, var(--background-color) 100%);
    padding: 4rem 0;
    text-align: center;
}

.about-hero-content h1 {
    font-size: 3.5rem;
    font-weight: 700;
    color: var(--primary-color);
    margin-bottom: 1rem;
    line-height: 1.2;
}

.about-subtitle {
    font-size: 1.5rem;
    color: var(--text-light);
    font-weight: 500;
    max-width: 800px;
    margin: 0 auto;
}

/* Profile Section */
.profile-section {
    padding: 4rem 0;
    background: var(--background-color);
}

.profile-grid {
    display: grid;
    grid-template-columns: 350px 1fr;
    gap: 4rem;
    align-items: center;
    max-width: 1000px;
    margin: 0 auto;
}

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

.profile-img {
    width: 100%;
    max-width: 320px;
    height: auto;
    border-radius: 16px;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.15);
    transition: transform 0.3s ease;
}

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

.profile-info h2 {
    font-size: 2.5rem;
    font-weight: 700;
    color: var(--primary-color);
    margin-bottom: 0.5rem;
}

.profile-info h3 {
    font-size: 1.5rem;
    font-weight: 600;
    color: var(--secondary-color);
    margin-bottom: 0.25rem;
}

.profile-info h4 {
    font-size: 1.25rem;
    font-weight: 500;
    color: var(--text-light);
    margin-bottom: 1.5rem;
}

.profile-bio {
    font-size: 1.125rem;
    line-height: 1.8;
    color: var(--text-color);
}

/* Competencies Section */
.competencies-section {
    padding: 4rem 0;
    background: var(--section-bg);
}

.competencies-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    grid-template-rows: repeat(2, 1fr);
    gap: 2rem;
    margin-top: 3rem;
    max-width: 800px;
    margin-left: auto;
    margin-right: auto;
}

.competency-card {
    background: var(--background-color);
    padding: 2rem;
    border-radius: 12px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.05);
    transition: all 0.3s ease;
    border-left: 4px solid var(--primary-color);
}

.competency-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 12px 28px rgba(0, 0, 0, 0.12);
}

.competency-card h3 {
    font-size: 1.25rem;
    font-weight: 600;
    color: var(--primary-color);
    margin-bottom: 1rem;
}

.competency-card p {
    color: var(--text-light);
    line-height: 1.6;
}

/* Current Positions Section */
.current-positions {
    padding: 4rem 0;
    background: var(--background-color);
}

.positions-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 2rem;
    margin-top: 3rem;
}

.position-card {
    background: var(--background-color);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.05);
    transition: all 0.3s ease;
}

.position-card:hover {
    box-shadow: 0 12px 28px rgba(0, 0, 0, 0.12);
    transform: translateY(-3px);
}

.position-header {
    background: var(--section-bg);
    padding: 2rem;
    border-bottom: 1px solid var(--border-color);
}

.timeframe {
    display: inline-block;
    background: var(--primary-color);
    color: white;
    padding: 0.5rem 1rem;
    border-radius: 6px;
    font-size: 0.875rem;
    font-weight: 600;
    margin-bottom: 1rem;
}

.position-header h3 {
    font-size: 1.5rem;
    font-weight: 600;
    color: var(--primary-color);
    margin-bottom: 0.5rem;
}

.position-header h4 {
    font-size: 1.25rem;
    font-weight: 500;
    color: var(--secondary-color);
    margin-bottom: 0.5rem;
}

.company-desc {
    font-style: italic;
    color: var(--text-light);
    margin-bottom: 0;
}

.position-content {
    padding: 2rem;
}

.mandates h5,
.clients h5 {
    font-size: 1rem;
    font-weight: 600;
    color: var(--primary-color);
    margin-bottom: 0.75rem;
}

.mandates ul,
.clients ul {
    list-style: none;
    padding: 0;
}

.mandates li,
.clients li {
    position: relative;
    padding-left: 1.5rem;
    margin-bottom: 0.5rem;
    color: var(--text-color);
}

.mandates li::before,
.clients li::before {
    content: '▪';
    color: var(--primary-color);
    position: absolute;
    left: 0;
    font-weight: bold;
}

/* Career Timeline Section */
.career-timeline {
    padding: 4rem 0;
    background: var(--section-bg);
}

.timeline {
    position: relative;
    max-width: 1200px;
    margin: 3rem auto 0;
    padding: 0 2rem;
}

.timeline::before {
    content: '';
    position: absolute;
    left: 50%;
    top: 0;
    bottom: 0;
    width: 3px;
    background: var(--primary-color);
    transform: translateX(-50%);
}

.timeline-item {
    position: relative;
    width: 100%;
    margin-bottom: 4rem;
}

.timeline-item.left .timeline-content {
    margin-left: 0;
    margin-right: 55%;
    text-align: right;
}

.timeline-item.right .timeline-content {
    margin-left: 55%;
    margin-right: 0;
    text-align: left;
}

.timeline-content {
    background: var(--background-color);
    padding: 2rem;
    border-radius: 12px;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.1);
    position: relative;
    transition: all 0.3s ease;
}

.timeline-content:hover {
    transform: translateY(-5px);
    box-shadow: 0 16px 32px rgba(0, 0, 0, 0.15);
}

/* Timeline connectors */
.timeline-item.left .timeline-content::after {
    content: '';
    position: absolute;
    right: -15px;
    top: 2rem;
    width: 0;
    height: 0;
    border-left: 15px solid var(--background-color);
    border-top: 15px solid transparent;
    border-bottom: 15px solid transparent;
}

.timeline-item.right .timeline-content::after {
    content: '';
    position: absolute;
    left: -15px;
    top: 2rem;
    width: 0;
    height: 0;
    border-right: 15px solid var(--background-color);
    border-top: 15px solid transparent;
    border-bottom: 15px solid transparent;
}

/* Timeline markers */
.timeline-item::before {
    content: '';
    position: absolute;
    left: 50%;
    top: 2rem;
    width: 16px;
    height: 16px;
    background: var(--primary-color);
    border: 4px solid var(--background-color);
    border-radius: 50%;
    transform: translateX(-50%);
    z-index: 2;
    box-shadow: 0 0 0 4px var(--primary-color);
}

.timeline-date {
    display: inline-block;
    background: var(--primary-color);
    color: white;
    padding: 0.5rem 1rem;
    border-radius: 6px;
    font-size: 0.875rem;
    font-weight: 600;
    margin-bottom: 1rem;
}

.timeline-content h3 {
    font-size: 1.5rem;
    font-weight: 600;
    color: var(--primary-color);
    margin-bottom: 0.75rem;
}

.timeline-content h4 {
    font-size: 1.25rem;
    font-weight: 500;
    color: var(--secondary-color);
    margin-bottom: 0.5rem;
}

.parent-company {
    font-style: italic;
    color: var(--text-light);
    margin-bottom: 1rem;
}

.parallel-role {
    background: var(--section-bg);
    padding: 0.75rem 1rem;
    border-radius: 6px;
    margin: 1rem 0;
    font-size: 0.95rem;
}

.responsibilities h5,
.achievements h5,
.additional-roles h5,
.parallel-roles strong,
.company-evolution h5 {
    font-size: 1rem;
    font-weight: 600;
    color: var(--primary-color);
    margin-bottom: 0.75rem;
    margin-top: 1.5rem;
}

.responsibilities ul,
.achievements ul,
.additional-roles ul,
.parallel-roles ul {
    list-style: none;
    padding: 0;
    margin-left: 0;
}

.responsibilities li,
.achievements li,
.additional-roles li,
.parallel-roles li {
    position: relative;
    padding-left: 1.5rem;
    margin-bottom: 0.5rem;
    color: var(--text-color);
    line-height: 1.6;
}

.responsibilities li::before,
.achievements li::before,
.additional-roles li::before,
.parallel-roles li::before {
    content: '→';
    color: var(--primary-color);
    position: absolute;
    left: 0;
    font-weight: bold;
}

.company-evolution {
    background: var(--section-bg);
    padding: 1.5rem;
    border-radius: 8px;
    margin-top: 1.5rem;
}

.evolution-period {
    margin-bottom: 1rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid var(--border-color);
}

.evolution-period:last-child {
    margin-bottom: 0;
    padding-bottom: 0;
    border-bottom: none;
}

/* Testimonials Section */
.testimonials-section {
    padding: 4rem 0;
    background: var(--background-color);
}

.testimonials-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(400px, 1fr));
    gap: 2rem;
    margin-top: 3rem;
}

.testimonial-card {
    background: var(--section-bg);
    padding: 2.5rem;
    border-radius: 12px;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.08);
    transition: all 0.3s ease;
    position: relative;
}

.testimonial-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 16px 32px rgba(0, 0, 0, 0.12);
}

.testimonial-card::before {
    content: '"';
    position: absolute;
    top: 1rem;
    left: 2rem;
    font-size: 4rem;
    color: var(--primary-color);
    opacity: 0.3;
    font-family: serif;
}

.testimonial-header h4 {
    font-size: 1.25rem;
    font-weight: 600;
    color: var(--primary-color);
    margin-bottom: 0.5rem;
}

.employees {
    display: inline-block;
    background: var(--primary-color);
    color: white;
    padding: 0.25rem 0.75rem;
    border-radius: 4px;
    font-size: 0.875rem;
    font-weight: 600;
    margin-bottom: 1rem;
}

.description {
    color: var(--text-light);
    font-size: 0.95rem;
    margin-bottom: 1.5rem;
}

blockquote {
    font-size: 1.125rem;
    line-height: 1.7;
    color: var(--text-color);
    margin: 1.5rem 0;
    padding-left: 1rem;
    border-left: 3px solid var(--primary-color);
    font-style: italic;
}

cite {
    display: block;
    text-align: right;
    font-weight: 600;
    color: var(--secondary-color);
    margin-top: 1rem;
    font-style: normal;
}

.metrics {
    display: flex;
    gap: 1rem;
    margin-top: 1.5rem;
}

.metric {
    text-align: center;
    flex: 1;
}

.metric-value {
    display: block;
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--primary-color);
}

.metric-label {
    display: block;
    font-size: 0.875rem;
    color: var(--text-light);
    margin-top: 0.25rem;
}

/* Client References Section */
.client-references {
    padding: 4rem 0;
    background: var(--section-bg);
}

.section-subtitle {
    text-align: center;
    font-size: 1.125rem;
    color: var(--text-light);
    margin-bottom: 3rem;
    max-width: 800px;
    margin-left: auto;
    margin-right: auto;
}

.references-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 2rem;
    margin-top: 3rem;
    max-width: 900px;
    margin-left: auto;
    margin-right: auto;
}

.reference-card {
    background: var(--background-color);
    padding: 2.5rem;
    border-radius: 12px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.05);
    transition: all 0.3s ease;
    position: relative;
    border-top: 4px solid var(--primary-color);
}

.reference-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 12px 28px rgba(0, 0, 0, 0.12);
}

.reference-number {
    position: absolute;
    top: -2px;
    right: 1rem;
    background: var(--primary-color);
    color: white;
    padding: 0.5rem 1rem;
    border-radius: 0 0 8px 8px;
    font-weight: 700;
    font-size: 1.125rem;
}

.reference-card h4 {
    font-size: 1.25rem;
    font-weight: 600;
    color: var(--primary-color);
    margin-bottom: 0.5rem;
    margin-top: 0.5rem;
}

.industry {
    color: var(--text-light);
    margin-bottom: 1.5rem;
    font-size: 0.95rem;
}

.mandate {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.mandate-label {
    font-weight: 600;
    color: var(--secondary-color);
    font-size: 0.875rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.mandate-value {
    background: var(--section-bg);
    padding: 0.75rem 1rem;
    border-radius: 6px;
    font-weight: 500;
    color: var(--text-color);
    border-left: 3px solid var(--primary-color);
}

/* Mobile Responsive Design for About Page */
@media (max-width: 768px) {
    .about-hero-content h1 {
        font-size: 2.5rem;
    }
    
    .about-subtitle {
        font-size: 1.25rem;
    }
    
    .profile-grid {
        grid-template-columns: 1fr;
        gap: 2rem;
        text-align: center;
    }
    
    .profile-info {
        text-align: center;
    }
    
    .competencies-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 1rem;
        max-width: 600px;
    }
    
    .positions-grid {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }
    
    /* Mobile Timeline */
    .timeline::before {
        left: 1rem;
    }
    
    .timeline-item::before {
        left: 1rem;
    }
    
    .timeline-item.left .timeline-content,
    .timeline-item.right .timeline-content {
        margin-left: 3rem;
        margin-right: 0;
        text-align: left;
    }
    
    .timeline-item.left .timeline-content::after,
    .timeline-item.right .timeline-content::after {
        left: -15px;
        right: auto;
        border-right: 15px solid var(--background-color);
        border-left: none;
    }
    
    .testimonials-grid {
        grid-template-columns: 1fr;
    }
    
    .references-grid {
        grid-template-columns: 1fr;
        gap: 1.5rem;
        max-width: 100%;
    }
    
    .metrics {
        flex-direction: column;
        gap: 0.5rem;
    }
}

@media (max-width: 480px) {
    .about-hero-content h1 {
        font-size: 2rem;
    }
    
    .about-subtitle {
        font-size: 1.125rem;
    }
    
    .profile-info h2 {
        font-size: 2rem;
    }
    
    .timeline {
        padding: 0 1rem;
    }
    
    .timeline-content {
        padding: 1.5rem;
    }
    
    .testimonial-card {
        padding: 2rem;
    }
    
    .reference-card {
        padding: 1.5rem;
    }

    .competencies-grid {
        grid-template-columns: 1fr;
        grid-template-rows: auto;
    }
    
    .references-grid {
        grid-template-columns: 1fr;
        gap: 1rem;
    }
}

/* (Tab styles removed) */

/* Full-width cards for tab content */
.testimonial-card-full,
.reference-card-full {
    background: var(--background-color);
    padding: 3rem;
    border-radius: 12px;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.08);
}

.testimonials-list {
    display: flex;
    flex-direction: column;
    gap: 24px;
}

/* Keep the accent bar only for testimonials */
.testimonial-card-full {
    border-left: 4px solid var(--primary-color);
}

.testimonial-card-full .testimonial-header h3,
.reference-card-full .reference-header h3 {
    font-size: 1.75rem;
    font-weight: 600;
    color: var(--primary-color);
    margin-bottom: 1rem;
}

.testimonial-card-full .company-stats {
    margin-bottom: 2rem;
}

.testimonial-card-full .employees {
    display: inline-block;
    background: var(--primary-color);
    color: white;
    padding: 0.5rem 1rem;
    border-radius: 6px;
    font-size: 0.875rem;
    font-weight: 600;
    margin-bottom: 1rem;
}

.testimonial-card-full .description {
    color: var(--text-light);
    font-size: 1rem;
    margin-bottom: 0;
}

.testimonial-card-full blockquote {
    font-size: 1.25rem;
    line-height: 1.7;
    color: var(--text-color);
    margin: 2rem 0;
    padding: 1.5rem;
    background: var(--section-bg);
    border-left: 4px solid var(--primary-color);
    border-radius: 8px;
    font-style: italic;
    position: relative;
}

.testimonial-card-full blockquote::before {
    content: '"';
    position: absolute;
    top: -0.5rem;
    left: 1rem;
    font-size: 3rem;
    color: var(--primary-color);
    opacity: 0.3;
    font-family: serif;
}

.testimonial-card-full cite {
    display: block;
    text-align: right;
    font-weight: 600;
    color: var(--secondary-color);
    margin-top: 1rem;
    font-style: normal;
    font-size: 1.1rem;
}

.testimonial-card-full .metrics {
    display: flex;
    gap: 2rem;
    margin-top: 2rem;
    padding-top: 2rem;
    border-top: 1px solid var(--border-color);
}

.testimonial-card-full .metric {
    text-align: center;
    flex: 1;
}

.testimonial-card-full .metric-value {
    display: block;
    font-size: 2rem;
    font-weight: 700;
    color: var(--primary-color);
    margin-bottom: 0.5rem;
}

.testimonial-card-full .metric-label {
    display: block;
    font-size: 0.95rem;
    color: var(--text-light);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* Reference Card Full Styles */
.references-list {
    display: flex;
    flex-direction: column;
    gap: 24px;
}

.references-list .reference-card-full + .reference-card-full {
    border-top: 1px dashed var(--border-color);
    padding-top: 16px;
}

.reference-card-full .reference-header {
    margin-bottom: 2rem;
}

.reference-card-full .industry {
    color: var(--text-light);
    font-size: 1.125rem;
    margin-bottom: 2rem;
}

.reference-card-full .mandate {
    background: var(--section-bg);
    padding: 1.5rem;
    border-radius: 8px;
    border: 1px solid var(--border-color);
}

/* Subtle overall delineation for reference cards without a left bar */
.reference-card-full {
    border: 1px solid var(--border-color);
}

.reference-card-full .mandate-label {
    font-weight: 600;
    color: var(--secondary-color);
    font-size: 1rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    display: block;
    margin-bottom: 0.75rem;
}

.reference-card-full .mandate-value {
    font-size: 1.125rem;
    font-weight: 500;
    color: var(--text-color);
    line-height: 1.6;
}

/* Mobile responsiveness for tabs */
@media (max-width: 768px) {
    .testimonial-card-full,
    .reference-card-full {
        padding: 2rem;
    }
    
    .testimonial-card-full .metrics {
        flex-direction: column;
        gap: 1rem;
    }
}

@media (max-width: 480px) {
    .testimonial-card-full,
    .reference-card-full {
        padding: 1.5rem;
    }
    
    .testimonial-card-full .testimonial-header h3,
    .reference-card-full .reference-header h3 {
        font-size: 1.5rem;
    }
    
    .testimonial-card-full blockquote {
        font-size: 1.125rem;
        padding: 1rem;
    }
}

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

/* CRITICAL: Mobile Hamburger Menu - Must be visible */
@media screen and (max-width: 768px) {
    .nav {
        flex-wrap: wrap !important;
    }
    
    .nav-brand {
        order: 1 !important;
    }
    
    .mobile-icons {
        display: flex !important;
        order: 2 !important;
        margin-left: auto !important;
        margin-right: 1rem !important;
    }
    
    .hamburger-menu {
        display: flex !important;
        visibility: visible !important;
        opacity: 1 !important;
        position: relative !important;
        z-index: 1001 !important;
        order: 3 !important;
    }
    
    .nav-menu {
        display: none !important;
        order: 4 !important;
        width: 100% !important;
    }
    
    .nav-menu.active {
        display: flex !important;
    }
}

/* Desktop - Hide hamburger menu and mobile icons */
@media screen and (min-width: 769px) {
    .mobile-icons {
        display: none !important;
    }
    
    .hamburger-menu {
        display: none !important;
    }
    
    .nav-menu {
        display: flex !important;
        position: static !important;
        width: auto !important;
        flex-direction: row !important;
        background: transparent !important;
        box-shadow: none !important;
        border: none !important;
        padding: 0 !important;
    }
}

/* Backoffice-specific styles for JSON content hover effect */
.backoffice-wrapper .hero-title:hover,
.backoffice-wrapper .hero-subtitle:hover,
.backoffice-wrapper .hero-text:hover,
.backoffice-wrapper .section-title:hover,
.backoffice-wrapper .service-card h3:hover,
.backoffice-wrapper .service-card p:hover,
.backoffice-wrapper .cta-section h2:hover,
.backoffice-wrapper .cta-section p:hover,
.backoffice-wrapper .page-header h1:hover,
.backoffice-wrapper .page-subtitle:hover,
.backoffice-wrapper .about-hero h1:hover,
.backoffice-wrapper .about-subtitle:hover,
.backoffice-wrapper .profile-info h2:hover,
.backoffice-wrapper .profile-info h3:hover,
.backoffice-wrapper .profile-info h4:hover,
.backoffice-wrapper .profile-bio:hover,
.backoffice-wrapper .competency-card h3:hover,
.backoffice-wrapper .competency-card p:hover,
.backoffice-wrapper .position-header h3:hover,
.backoffice-wrapper .position-header h4:hover,
.backoffice-wrapper .timeline-content h3:hover,
.backoffice-wrapper .timeline-content h4:hover,
.backoffice-wrapper .timeline-content p:hover,
.backoffice-wrapper .testimonial-card h4:hover,
.backoffice-wrapper .testimonial-card p:hover,
.backoffice-wrapper .testimonial-card blockquote:hover,
.backoffice-wrapper .testimonial-card-full h3:hover,
.backoffice-wrapper .testimonial-card-full p:hover,
.backoffice-wrapper .testimonial-card-full blockquote:hover,
.backoffice-wrapper .reference-card h4:hover,
.backoffice-wrapper .reference-card p:hover,
.backoffice-wrapper .reference-card-full h3:hover,
.backoffice-wrapper .reference-card-full p:hover,
.backoffice-wrapper .contact-item p:hover,
.backoffice-wrapper .form label:hover,
.backoffice-wrapper .contact-info h3:hover {
    border: 2px solid #dc3545 !important;
    border-radius: 4px !important;
    padding: 4px !important;
    margin: -6px !important;
    transition: all 0.2s ease !important;
    box-sizing: border-box !important;
}

/* Additional hover effects for cards in backoffice */
.backoffice-wrapper .service-card:hover,
.backoffice-wrapper .competency-card:hover,
.backoffice-wrapper .position-card:hover,
.backoffice-wrapper .testimonial-card:hover,
.backoffice-wrapper .testimonial-card-full:hover,
.backoffice-wrapper .reference-card:hover,
.backoffice-wrapper .reference-card-full:hover,
.backoffice-wrapper .timeline-content:hover {
    border: 2px solid #dc3545 !important;
    transform: translateY(-5px) !important;
    box-shadow: 0 10px 25px rgba(220, 53, 69, 0.2) !important;
}

/* Hover effect for any text content that comes from JSON in backoffice */
.backoffice-wrapper [data-json-content]:hover,
.backoffice-wrapper .json-content:hover {
    border: 2px solid #dc3545 !important;
    border-radius: 4px !important;
    padding: 4px !important;
    margin: -6px !important;
    transition: all 0.2s ease !important;
}

/* Special handling for specific elements to avoid layout issues */
.backoffice-wrapper .hero-title:hover,
.backoffice-wrapper .section-title:hover,
.backoffice-wrapper .page-header h1:hover,
.backoffice-wrapper .about-hero h1:hover {
    margin: -6px -6px -2px -6px !important;
}

.backoffice-wrapper .profile-img:hover {
    border: 3px solid #dc3545 !important;
    padding: 0 !important;
    margin: 0 !important;
}

/* Editable Content Styling */
.backoffice-wrapper [data-editable="true"] {
    position: relative;
    cursor: pointer;
}

/* Disable hover effects for elements inside array containers */
[data-array-item] * {
    pointer-events: none !important;
}

[data-array-item] [data-editable="true"] {
    pointer-events: none !important;
    cursor: default !important;
}

[data-array-item] [data-editable="true"]:hover {
    background: transparent !important;
}

[data-array-item] [data-editable="true"]:hover::after {
    display: none !important;
}

/* Re-enable pointer events for array control buttons */
[data-array-item] .array-controls {
    pointer-events: auto !important;
}

[data-array-item] .array-controls * {
    pointer-events: auto !important;
}

.backoffice-wrapper [data-editable="true"]:not(.array-field):not(.array-sub-item):hover {
    background: rgba(220, 53, 69, 0.05) !important;
}

.backoffice-wrapper [data-editable="true"]:not(.array-field):not(.array-sub-item):hover::after {
    content: "✏️";
    position: absolute;
    top: -2px;
    right: -2px;
    background: #dc3545;
    color: white;
    font-size: 12px;
    padding: 2px 4px;
    border-radius: 3px;
    z-index: 1000;
    pointer-events: none;
}

/* Edit Mode Styling */
.backoffice-wrapper .edit-mode {
    position: relative;
    padding: 8px;
    border: 2px solid #dc3545;
    border-radius: 4px;
    background: white;
}

.backoffice-wrapper .edit-input {
    width: 100%;
    font-size: inherit;
    font-weight: inherit;
    color: inherit;
    background: transparent;
    border: none;
    outline: none;
    padding: 0;
    margin: 0;
    font-family: inherit;
    line-height: inherit;
}

.backoffice-wrapper .edit-textarea {
    width: 100%;
    font-size: inherit;
    font-weight: inherit;
    color: inherit;
    background: transparent;
    border: none;
    outline: none;
    padding: 0;
    margin: 0;
    font-family: inherit;
    line-height: inherit;
    resize: none;
    min-height: 40px;
}

.backoffice-wrapper .edit-buttons {
    position: absolute;
    bottom: -35px;
    left: 0;
    display: flex;
    gap: 5px;
    z-index: 1001;
}

.backoffice-wrapper .edit-btn {
    padding: 4px 8px;
    font-size: 12px;
    border: none;
    border-radius: 3px;
    cursor: pointer;
    font-weight: 500;
}

.backoffice-wrapper .edit-btn-save {
    background: #28a745;
    color: white;
}

.backoffice-wrapper .edit-btn-cancel {
    background: #6c757d;
    color: white;
}

.backoffice-wrapper .edit-btn:hover {
    opacity: 0.8;
}

/* Profile Edit Controls */
.profile-edit-controls {
    display: flex;
    justify-content: flex-end;
    margin-bottom: 1rem;
}

.profile-edit-btn {
    background: #007bff;
    color: white;
    border: none;
    border-radius: 6px;
    padding: 8px 16px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.profile-edit-btn:hover {
    background: #0056b3;
    transform: translateY(-1px);
}

/* Array Controls */
.array-controls {
    display: flex;
    justify-content: flex-end;
    gap: 8px;
    margin-bottom: 1rem;
    padding: 8px;
    background: rgba(0, 123, 255, 0.1);
    border-radius: 6px;
}

.array-control-btn {
    padding: 6px 10px;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 500;
    transition: all 0.2s ease;
}

.array-control-btn.edit-btn {
    background: #28a745;
    color: white;
}

.array-control-btn.delete-btn {
    background: #dc3545;
    color: white;
}

.array-control-btn:hover {
    opacity: 0.8;
    transform: translateY(-1px);
}

.array-add-controls {
    display: flex;
    justify-content: center;
    margin: 2rem 0;
}

.array-add-btn {
    background: #007bff;
    color: white;
    border: none;
    border-radius: 6px;
    padding: 10px 20px;
    font-size: 16px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
}

.array-add-btn:hover {
    background: #0056b3;
    transform: translateY(-1px);
}

/* Footer Edit Controls */
.footer-edit-controls {
    display: flex;
    justify-content: flex-end;
    padding: 1rem 0 0.5rem 0;
    border-bottom: 1px solid var(--border-color);
    margin-bottom: 1rem;
}

.footer-edit-btn {
    background: #17a2b8;
    color: white;
    border: none;
    border-radius: 6px;
    padding: 8px 16px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.footer-edit-btn:hover {
    background: #138496;
    transform: translateY(-1px);
}

/* Modal Dialog for Content Editing */
.backoffice-modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.7);
    z-index: 10000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.backoffice-modal {
    background: white;
    border-radius: 8px;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.3);
    max-width: 600px;
    width: 100%;
    max-height: 80vh;
    overflow: hidden;
    animation: modalSlideIn 0.3s ease-out;
}

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

.backoffice-modal-header {
    padding: 20px 25px 15px 25px;
    border-bottom: 1px solid #e2e8f0;
    background: #f7fafc;
}

.backoffice-modal-title {
    margin: 0;
    font-size: 18px;
    font-weight: 600;
    color: var(--primary-color);
    display: flex;
    align-items: center;
    gap: 10px;
}

.backoffice-modal-path {
    font-size: 12px;
    color: #6c757d;
    margin-top: 4px;
    font-family: 'Courier New', monospace;
    background: #f8f9fa;
    padding: 2px 6px;
    border-radius: 3px;
    display: inline-block;
}

.backoffice-modal-body {
    padding: 25px;
    max-height: 400px;
    overflow-y: auto;
}

/* Asset picker (image selection) */
.asset-toolbar {
    display: flex;
    justify-content: flex-end;
    margin-bottom: 12px;
}

.asset-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
    gap: 12px;
}

.asset-tile {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    padding: 0;
    border: 1px solid #e2e8f0;
    border-radius: 6px;
    background: #fff;
    cursor: pointer;
    overflow: hidden;
}

.asset-tile img {
    width: 100%;
    height: 120px;
    object-fit: cover;
    display: block;
}

.asset-tile span {
    display: block;
    padding: 8px 10px;
    font-size: 12px;
    color: #334155;
    text-align: left;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

@media (max-width: 480px) {
    .asset-grid {
        grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
    }
    .asset-tile img {
        height: 100px;
    }
}

/* Form grid layout (opt-in, used for nicer grouping) */
.form-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px 20px;
}

.form-grid .form-field {
    display: flex;
    flex-direction: column;
}

.form-grid .form-col-2 {
    grid-column: 1 / -1;
}

/* Inputs inside global forms inherit modal input look */
.global-form input[type="text"],
.global-form input[type="password"],
.global-form select,
.global-form textarea {
    width: 100%;
    padding: 12px;
    border: 2px solid #e2e8f0;
    border-radius: 6px;
    font-size: 14px;
    font-family: inherit;
    line-height: 1.5;
    transition: border-color 0.3s ease;
}

.global-form input:focus,
.global-form select:focus,
.global-form textarea:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(26, 54, 93, 0.1);
}

@media (max-width: 768px) {
    .form-grid {
        grid-template-columns: 1fr;
    }
}

.backoffice-modal-label {
    display: block;
    margin-bottom: 8px;
    font-weight: 500;
    color: var(--text-color);
}

.backoffice-modal-input,
.backoffice-modal-textarea {
    width: 100%;
    padding: 12px;
    border: 2px solid #e2e8f0;
    border-radius: 6px;
    font-size: 14px;
    font-family: inherit;
    line-height: 1.5;
    transition: border-color 0.3s ease;
    resize: vertical;
}

.backoffice-modal-input:focus,
.backoffice-modal-textarea:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(26, 54, 93, 0.1);
}

.backoffice-modal-textarea {
    min-height: 100px;
    max-height: 300px;
}

.backoffice-modal-char-count {
    text-align: right;
    font-size: 12px;
    color: #6c757d;
    margin-top: 5px;
}

.backoffice-modal-footer {
    padding: 15px 25px 20px 25px;
    background: #f7fafc;
    border-top: 1px solid #e2e8f0;
    display: flex;
    gap: 10px;
    justify-content: flex-end;
}

.backoffice-modal-btn {
    padding: 10px 20px;
    border: none;
    border-radius: 6px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    min-width: 80px;
}

.backoffice-modal-btn-primary {
    background: var(--primary-color);
    color: white;
}

.backoffice-modal-btn-primary:hover {
    background: var(--secondary-color);
    transform: translateY(-1px);
}

.backoffice-modal-btn-primary:disabled {
    background: #6c757d;
    cursor: not-allowed;
    transform: none;
}

.backoffice-modal-btn-secondary {
    background: #f8f9fa;
    color: var(--text-color);
    border: 1px solid #e2e8f0;
}

.backoffice-modal-btn-secondary:hover {
    background: #e9ecef;
}

.backoffice-modal-close {
    position: absolute;
    top: 15px;
    right: 20px;
    background: none;
    border: none;
    font-size: 24px;
    color: #6c757d;
    cursor: pointer;
    padding: 5px;
    line-height: 1;
}

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

/* Mobile Responsive */
@media (max-width: 768px) {
    .backoffice-modal-overlay {
        padding: 10px;
    }
    
    .backoffice-modal {
        max-width: 100%;
        margin: 10px;
    }
    
    .backoffice-modal-header,
    .backoffice-modal-body,
    .backoffice-modal-footer {
        padding-left: 20px;
        padding-right: 20px;
    }
    
    .backoffice-modal-footer {
        flex-direction: column;
    }
    
    .backoffice-modal-btn {
        width: 100%;
    }
}

/* Notification System (CSP-Safe) */
.backoffice-notification {
    position: fixed;
    top: 100px;
    right: 20px;
    padding: 12px 18px;
    color: white;
    border-radius: 6px;
    z-index: 20000;
    opacity: 0;
    transform: translateY(-10px);
    transition: all 0.3s ease;
    box-shadow: 0 4px 12px rgba(0,0,0,0.2);
    font-weight: 500;
    pointer-events: none;
}

.backoffice-notification.show {
    opacity: 1;
    transform: translateY(0);
}

.backoffice-notification-success {
    background: #28a745;
}

.backoffice-notification-error {
    background: #dc3545;
}

.backoffice-notification-info {
    background: #17a2b8;
}

/* Array Sub Items - No Edit Buttons */
.backoffice-wrapper .array-sub-item:hover::after {
    display: none !important;
}

.backoffice-wrapper .array-sub-item {
    border: none !important;
    position: relative;
}

/* Array Fields - No Edit Buttons */
.backoffice-wrapper .array-field:hover::after {
    display: none !important;
}

.backoffice-wrapper .array-field {
    border: none !important;
    position: relative;
}

.backoffice-wrapper .array-field:hover {
    border: none !important;
    outline: none !important;
}

/* Stronger rule to override general editable hover */
.backoffice-wrapper [data-array-item] .array-field:hover {
    border: none !important;
    outline: none !important;
    background: transparent !important;
}

.backoffice-wrapper [data-array-item] .array-field:hover::after {
    content: none !important;
    display: none !important;
}

/* Array Control Buttons */
.backoffice-wrapper .array-controls {
    display: flex;
    gap: 10px;
    justify-content: flex-end;
    padding: 10px;
    border-top: 1px solid #e9ecef;
    margin-top: 15px;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.backoffice-wrapper [data-array-item]:hover .array-controls {
    opacity: 1;
}

.array-btn {
    padding: 8px 16px;
    border: none;
    border-radius: 6px;
    font-size: 12px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.array-btn-edit {
    background: #007bff;
    color: white;
}

.array-btn-edit:hover {
    background: #0056b3;
    transform: translateY(-1px);
}

.array-btn-delete {
    background: #dc3545;
    color: white;
}

.array-btn-delete:hover {
    background: #c82333;
    transform: translateY(-1px);
}

.array-btn-add {
    background: #28a745;
    color: white;
    padding: 12px 24px;
    font-size: 14px;
    margin: 20px 0;
    border-radius: 8px;
}

.array-btn-add:hover {
    background: #218838;
    transform: translateY(-2px);
}

.array-add-section {
    text-align: center;
    padding: 20px 0;
    border-top: 2px dashed #dee2e6;
    margin-top: 20px;
}

.backoffice-wrapper [data-array-item] {
    position: relative;
    border: 2px solid transparent;
    transition: all 0.3s ease;
}

.backoffice-wrapper [data-array-item]:hover {
    border-color: #007bff;
    border-radius: 8px;
}

/* Array Modal Styles */
.array-modal {
    max-width: 600px;
}

.array-field-group {
    margin-bottom: 20px;
}

.array-field-label {
    display: block;
    margin-bottom: 5px;
    font-weight: 600;
    color: #333;
}

.array-field-input {
    width: 100%;
    padding: 10px;
    border: 1px solid #ddd;
    border-radius: 6px;
    font-size: 14px;
}

.array-field-textarea {
    width: 100%;
    padding: 10px;
    border: 1px solid #ddd;
    border-radius: 6px;
    font-size: 14px;
    min-height: 100px;
    resize: vertical;
}

.array-subfields {
    margin-left: 20px;
    border-left: 3px solid #e9ecef;
    padding-left: 20px;
}

.array-subfield {
    display: flex;
    gap: 10px;
    margin-bottom: 10px;
    align-items: center;
}

.array-subfield input {
    flex: 1;
}

.array-subfield-remove {
    background: #dc3545;
    color: white;
    border: none;
    padding: 5px 10px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 12px;
}

.array-subfield-add {
    background: #28a745;
    color: white;
    border: none;
    padding: 8px 16px;
    border-radius: 6px;
    cursor: pointer;
    font-size: 12px;
    margin-top: 10px;
}

/* ==============================================
   BACKOFFICE STYLES
   ============================================== */

/* Backoffice Mode - Global */
body.backoffice-mode {
    border: 4px solid var(--backoffice-red);
    min-height: 100vh;
    background: var(--backoffice-red-light);
}

/* Backoffice Banner */
.backoffice-banner {
    background: linear-gradient(135deg, var(--backoffice-red) 0%, #b91c1c 100%);
    color: white;
    /* Layout */
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 18px 24px; /* higher banner for visibility */
    min-height: 64px;
    /* Typography */
    font-weight: 600;
    font-size: 0.95rem;
    /* Positioning */
    position: sticky;
    top: 0;
    z-index: 1001;
    /* Visuals */
    box-shadow: 0 2px 8px rgba(220, 38, 38, 0.3);
    border-bottom: 2px solid #b91c1c;
    animation: pulse 2s ease-in-out infinite alternate;
}

.backoffice-title {
    margin: 0;
    font-size: 1.05rem;
    font-weight: 700;
    letter-spacing: 0.2px;
}

/* Right-aligned action buttons within the banner */
.backoffice-actions {
    margin-left: auto;
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}

.backoffice-action-btn {
    appearance: none;
    background: rgba(255, 255, 255, 0.14);
    color: #fff;
    border: 1px solid rgba(255, 255, 255, 0.35);
    border-radius: 9999px;
    padding: 6px 12px;
    font-size: 13px;
    font-weight: 600;
    line-height: 1;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    transition: background 0.2s ease, transform 0.1s ease, box-shadow 0.2s ease, border-color 0.2s ease;
    white-space: nowrap;
}

.backoffice-action-btn:hover {
    background: rgba(255, 255, 255, 0.22);
    border-color: rgba(255, 255, 255, 0.55);
    transform: translateY(-1px);
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.15);
}

.backoffice-action-btn:active {
    transform: translateY(0);
    box-shadow: none;
}

.backoffice-user {
    font-weight: 500;
    opacity: 0.9;
}

@keyframes pulse {
    from { opacity: 0.9; }
    to { opacity: 1; }
}

/* Backoffice Header Adjustments */
.header.backoffice-mode {
    border-left: 4px solid var(--backoffice-red);
    border-right: 4px solid var(--backoffice-red);
    background: linear-gradient(to bottom, var(--background-color) 0%, var(--backoffice-red-light) 100%);
    padding-top: 0; /* Remove default padding since banner is now inside */
}

/* Backoffice Banner inside Header */
.header .backoffice-banner {
    position: relative; /* inside header */
    top: auto;
    /* Remove negative top margin to avoid clipping; keep horizontal stretch */
    margin: 0 -2rem 1rem -2rem;
}

/* Backoffice Main Content */
.backoffice-mode main {
    border-left: 4px solid var(--backoffice-red);
    border-right: 4px solid var(--backoffice-red);
    background: var(--background-color);
    /* Increase top offset to account for taller banner + fixed header */
    margin-top: 140px;
}

/* Backoffice Footer */
.backoffice-mode footer {
    border-left: 4px solid var(--backoffice-red);
    border-right: 4px solid var(--backoffice-red);
    border-bottom: 4px solid var(--backoffice-red);
    background: var(--primary-color) !important; /* Keep original blue background */
    color: white !important; /* Ensure white text remains visible */
}

/* Backoffice Editable Elements Hover Effects */
.backoffice-mode [data-editable="true"]:hover {
    background-color: rgba(220, 38, 38, 0.1);
    outline: 2px dashed var(--backoffice-red);
    outline-offset: 2px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.backoffice-mode [data-editable="true"]:hover::after {
    content: "✏️ Klicken zum Bearbeiten";
    position: absolute;
    background: var(--backoffice-red);
    color: white;
    padding: 4px 8px;
    font-size: 11px;
    border-radius: 4px;
    margin-top: -30px;
    margin-left: 10px;
    white-space: nowrap;
    z-index: 1000;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

/* Array Control Buttons in Backoffice Mode */
.backoffice-mode .array-controls {
    margin: 8px 0;
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

.backoffice-mode .array-btn {
    background: var(--backoffice-red);
    color: white;
    border: none;
    padding: 6px 12px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 11px;
    font-weight: 500;
    transition: all 0.2s ease;
    display: inline-flex;
    align-items: center;
    gap: 4px;
}

.backoffice-mode .array-btn:hover {
    background: #b91c1c;
    transform: translateY(-1px);
    box-shadow: 0 2px 4px rgba(220, 38, 38, 0.3);
}

.backoffice-mode .array-btn-edit {
    background: #3182ce;
}

.backoffice-mode .array-btn-edit:hover {
    background: #2c5282;
}

.backoffice-mode .array-btn-delete {
    background: #e53e3e;
}

.backoffice-mode .array-btn-delete:hover {
    background: #c53030;
}

.backoffice-mode .array-btn-add {
    background: #38a169;
    margin: 12px 0 8px 0;
    padding: 8px 16px;
    font-size: 12px;
}

.backoffice-mode .array-btn-add:hover {
    background: #2f855a;
}

/* Profile and Section Edit Controls */
.backoffice-mode .profile-edit-controls,
.backoffice-mode .section-edit-controls {
    margin-bottom: 16px;
    text-align: right;
}

.backoffice-mode .profile-edit-btn,
.backoffice-mode .section-edit-btn {
    background: var(--backoffice-red);
    color: white;
    border: none;
    padding: 8px 16px;
    border-radius: 6px;
    cursor: pointer;
    font-size: 12px;
    font-weight: 500;
    transition: all 0.2s ease;
}

.backoffice-mode .profile-edit-btn:hover,
.backoffice-mode .section-edit-btn:hover {
    background: #b91c1c;
    transform: translateY(-1px);
    box-shadow: 0 2px 6px rgba(220, 38, 38, 0.4);
}

/* Backoffice Status Indicator */
.backoffice-status {
    position: fixed;
    top: 50%;
    right: -120px;
    transform: translateY(-50%) rotate(90deg);
    background: var(--backoffice-red);
    color: white;
    padding: 8px 20px;
    font-size: 11px;
    font-weight: 600;
    letter-spacing: 1px;
    z-index: 1002;
    border-radius: 4px 4px 0 0;
    box-shadow: -2px 0 8px rgba(220, 38, 38, 0.3);
}

/* Responsive Backoffice Adjustments */
@media (max-width: 768px) {
    .backoffice-banner {
        padding: 14px 16px;
        font-size: 0.85rem;
        gap: 8px;
        flex-wrap: wrap;
    }
    .backoffice-actions {
        margin-left: 0;
        width: 100%;
        justify-content: flex-end;
        gap: 6px;
    }
    
    .backoffice-mode [data-editable="true"]:hover::after {
        display: none; /* Hide tooltip on mobile */
    }
    
    .backoffice-status {
        display: none; /* Hide status indicator on mobile */
    }
    
    body.backoffice-mode {
        border-width: 2px; /* Thinner border on mobile */
    }
}

/* ==============================================
   Backoffice pickers (simple list modal)
   ============================================== */
.picker-list {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
    gap: 12px;
}

.picker-item {
    appearance: none;
    background: #f3f4f6;
    border: 1px solid #e5e7eb;
    color: #111827;
    border-radius: 10px;
    padding: 10px 14px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.2s ease, transform 0.1s ease, box-shadow 0.2s ease, border-color 0.2s ease;
    text-align: center;
}

.picker-item:hover {
    background: #eaecef;
    border-color: #d1d5db;
    transform: translateY(-1px);
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.06);
}

.picker-item:active {
    transform: translateY(0);
    box-shadow: none;
}
.cookie-banner { position: fixed; left: 0; right: 0; bottom: 0; z-index: 1000; background: rgba(20,20,20,0.96); color: #fff; box-shadow: 0 -2px 10px rgba(0,0,0,0.2); }
.cookie-banner[hidden] { display: none !important; }
.cookie-banner__content { max-width: 1100px; margin: 0 auto; padding: 14px 16px; display: flex; flex-wrap: wrap; align-items: center; gap: 12px; }
.cookie-banner__text { margin: 0; flex: 1 1 400px; font-size: 14px; line-height: 1.4; }
.cookie-banner__actions { display: flex; gap: 8px; flex-wrap: wrap; }
.cookie-banner .btn { cursor: pointer; padding: 8px 12px; border-radius: 6px; border: 1px solid transparent; font-weight: 600; font-size: 14px; }
.cookie-banner .btn-primary { background: #0d6efd; color: #fff; }
.cookie-banner .btn-secondary { background: transparent; color: #fff; border-color: #666; }
.cookie-banner .btn-tertiary { background: #2b2b2b; color: #fff; }
