:root {
    --bg-color: #f7f6f2;
    --card-bg: #ffffff;
    --text-main: #172b19;
    --text-muted: #666666;
    --radius-soft: 20px;
    --transition: all 0.6s cubic-bezier(0.16, 1, 0.3, 1);
}

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

body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    background-color: var(--bg-color);
    color: var(--text-main);
    -webkit-font-smoothing: antialiased;
}

/* --- SPRACH-STEUERUNG --- */
html[lang="de"] [lang="en"] {
    display: none !important;
}

html[lang="en"] [lang="de"] {
    display: none !important;
}

/* --- STICKY HEADER & LOGO --- */
.site-header {
    position: sticky;
    top: 0;
    z-index: 1000;
    background-color: rgba(247, 246, 242, 0.9);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border-bottom: 1px solid rgba(0, 0, 0, 0.04);
    padding: 20px 40px;
}

.header-container {
    max-width: 1100px;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo-link {
    display: flex;
    align-items: center;
    text-decoration: none;
    color: inherit;
}

.logo-area {
    display: flex;
    align-items: center;
    gap: 12px;
}

.logo-img {
    height: 28px;
    width: auto;
}

.logo-text {
    font-weight: 800;
    font-size: 1.15rem;
    letter-spacing: 2px;
    color: var(--text-main);
}

/* --- NAVIGATION & DROPDOWN --- */
.site-nav {
    display: flex;
    align-items: center;
    gap: 32px;
}

.nav-link {
    text-decoration: none;
    color: var(--text-muted);
    font-weight: 500;
    font-size: 0.95rem;
    transition: var(--transition);
}

.nav-link:hover {
    color: var(--text-main);
}

.dropdown {
    position: relative;
    display: inline-block;
}

.dropdown-content {
    display: none;
    position: absolute;
    background-color: #ffffff;
    min-width: 180px;
    box-shadow: 0px 8px 16px rgba(0, 0, 0, 0.15);
    z-index: 1001;
    border-radius: 8px;
    overflow: hidden;
    top: 100%;
    left: 0;
    margin-top: 8px;
}

.dropdown-content a {
    color: var(--text-main);
    padding: 12px 16px;
    text-decoration: none;
    display: block;
    font-size: 0.95rem;
    white-space: nowrap;
    transition: background-color 0.2s ease;
}

.dropdown-content a:hover {
    background-color: #f1f1f1;
}

.dropdown.active .dropdown-content {
    display: block;
}

/* --- SPRACH-BUTTON --- */
/* --- SCHIEBESCHALTER (LANG-BTN) --- */
.lang-btn {
    background-color: rgba(0, 0, 0, 0.06);
    border: none;
    border-radius: 50px;
    width: 64px;
    height: 32px;
    display: flex;
    align-items: center;
    position: relative;
    cursor: pointer;
    padding: 3px;
    transition: var(--transition);
}

.lang-btn span {
    flex: 1;
    text-align: center;
    font-size: 0.75rem;
    font-weight: 700;
    color: var(--text-muted);
    z-index: 2;
    transition: color 0.3s ease;
}

/* Der weiße Schieber */
.lang-btn::before {
    content: '';
    position: absolute;
    width: 28px;
    height: 26px;
    background-color: var(--card-bg);
    border-radius: 50px;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.1);
    transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1);
    left: 3px;
    z-index: 1;
}

/* Aktive Sprache hervorheben */
html[lang="de"] .lang-btn .lang-de,
html[lang="en"] .lang-btn .lang-en {
    color: var(--text-main);
}

/* Schieber nach rechts bewegen, wenn Englisch aktiv ist */
html[lang="en"] .lang-btn::before {
    transform: translateX(30px);
}

/* --- HAUPTBEREICH & INTRO --- */
.main-content {
    padding: 50px 24px 100px 24px;
}

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

.intro-section {
    text-align: center;
    margin-bottom: 50px;
}

h1 {
    font-size: 2.5rem;
    font-weight: 800;
    letter-spacing: 3px;
    color: var(--text-main);
    margin-bottom: 12px;
}

.portfolio-intro {
    font-size: 0.95rem;
    color: var(--text-muted);
}

.intro-link {
    color: var(--text-main);
    font-weight: 600;
    text-decoration: underline;
    text-underline-offset: 3px;
}

/* --- BENTO-GRID (Startseite) --- */
.portfolio-grid {
    display: grid;
    grid-template-columns: repeat(12, 1fr);
    gap: 24px;
}

.portfolio-card {
    background-color: var(--card-bg);
    border-radius: var(--radius-soft);
    overflow: hidden;
    text-decoration: none;
    position: relative;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.03);
    transition: var(--transition);
    display: flex;
    flex-direction: column;
}

.card-large { grid-column: span 7; }
.card-tall  { grid-column: span 5; }
.card-wide  { grid-column: span 5; }
.card-small { grid-column: span 7; }

.portfolio-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 22px 45px rgba(0, 0, 0, 0.08);
}

.image-stack {
    width: 100%;
    height: 340px;
    position: relative;
    overflow: hidden;
    background-color: #eee;
}

.stack-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    position: absolute;
    top: 0;
    left: 0;
    opacity: 0;
    transition: opacity 0.6s ease, transform 0.6s cubic-bezier(0.16, 1, 0.3, 1);
}

.stack-img.img-1 {
    opacity: 1;
    z-index: 1;
}

.portfolio-card:hover .stack-img.img-1 {
    opacity: 0; 
}

/* Universelle Hover-Animation für alle per JS geladenen Bildstapel */
.portfolio-card:hover .stack-img.img-2 { opacity: 1; z-index: 2; transition-delay: 0.5s; }
.portfolio-card:hover .stack-img.img-3 { opacity: 1; z-index: 3; transition-delay: 1.0s; }
.portfolio-card:hover .stack-img.img-4 { opacity: 1; z-index: 4; transition-delay: 1.5s; }
.portfolio-card:hover .stack-img.img-5 { opacity: 1; z-index: 5; transition-delay: 2.0s; }
.portfolio-card:hover .stack-img.img-6 { opacity: 1; z-index: 6; transition-delay: 2.5s; }
.portfolio-card:hover .stack-img.img-7 { opacity: 1; z-index: 7; transition-delay: 3.0s; }
.portfolio-card:hover .stack-img.img-8 { opacity: 1; z-index: 8; transition-delay: 3.5s; }
.portfolio-card:hover .stack-img.img-9 { opacity: 1; z-index: 9; transition-delay: 4.0s; }
.portfolio-card:hover .stack-img.img-10 { opacity: 1; z-index: 10; transition-delay: 4.5s; }

.portfolio-card:hover .stack-img {
    transform: scale(1.03);
}

.card-footer {
    padding: 22px 28px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    background-color: var(--card-bg);
}

.portfolio-label {
    font-size: 1.05rem;
    font-weight: 700;
    color: var(--text-main);
}

.badge-action {
    position: relative;
    background-color: var(--bg-color);
    padding: 8px 18px;
    border-radius: 50px;
    overflow: hidden;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    min-width: 130px;
    transition: var(--transition);
}

.badge-count, .badge-text {
    font-size: 0.85rem;
    font-weight: 600;
    white-space: nowrap;
    transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1), opacity 0.4s ease;
}

.badge-count {
    color: var(--text-muted);
    opacity: 1;
    transform: translateY(0);
}

.badge-text {
    position: absolute;
    color: var(--text-main);
    opacity: 0;
    transform: translateY(22px);
}

.portfolio-card:hover .badge-action {
    background-color: var(--text-main);
}

.portfolio-card:hover .badge-count {
    opacity: 0;
    transform: translateY(-22px);
}

.portfolio-card:hover .badge-text {
    opacity: 1;
    transform: translateY(0);
    color: #ffffff;
}

/* --- GALERIE-SEITEN & GRID --- */
.gallery-header {
    margin-bottom: 40px;
}

.gallery-subtitle {
    font-size: 1rem;
    color: var(--text-muted);
    margin-top: 6px;
}

.gallery-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 24px;
}

.gallery-item {
    background-color: var(--card-bg);
    border-radius: var(--radius-soft);
    overflow: hidden;
    aspect-ratio: 4 / 3;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.03);
    transition: var(--transition);
    cursor: pointer;
}

.gallery-item:hover {
    transform: translateY(-6px);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.08);
}

.gallery-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* --- LIGHTBOX / POPUP --- */
.lightbox-modal {
    display: none;
    position: fixed;
    z-index: 2000;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.85);
    justify-content: center;
    align-items: center;
    flex-direction: column;
    padding: 20px;
    box-sizing: border-box;
}

.lightbox-content {
    max-width: 90%;
    max-height: 80vh;
    object-fit: contain;
    border-radius: 4px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.5);
}

.lightbox-caption {
    color: #fff;
    margin-top: 15px;
    font-size: 1.1rem;
    text-align: center;
    font-family: sans-serif;
}

.lightbox-close {
    position: absolute;
    top: 20px;
    right: 30px;
    color: #fff;
    font-size: 40px;
    font-weight: bold;
    cursor: pointer;
    background: none;
    border: none;
}

.lightbox-close:hover {
    color: #ccc;
}

/* --- FOOTER --- */
.site-footer {
    background-color: var(--text-main);
    color: #ffffff;
    padding: 50px 40px;
    border-radius: 32px 32px 0 0;
    margin-top: 80px;
}

.footer-container {
    max-width: 1100px;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.footer-brand {
    font-weight: 800;
    letter-spacing: 2px;
    font-size: 0.95rem;
}

.footer-links {
    display: flex;
    gap: 32px;
}

.footer-links a {
    color: #a3a3a3;
    text-decoration: none;
    font-size: 0.9rem;
    transition: var(--transition);
}

.footer-links a:hover {
    color: #ffffff;
}

/* --- RESPONSIVE --- */
@media (max-width: 768px) {
    .card-large, .card-tall, .card-wide, .card-small {
        grid-column: span 12;
    }
    .image-stack {
        height: 260px;
    }
    .site-header {
        padding: 16px 20px;
    }
    .header-container, .footer-container {
        flex-direction: column;
        gap: 16px;
        text-align: center;
    }
    .site-nav, .footer-links {
        gap: 20px;
    }
}

/* Vom statischen Generator ergänzte Regeln */
.language-links {
    display: inline-flex;
    align-items: center;
    gap: 3px;
    padding: 3px;
    border-radius: 50px;
    background: rgba(0, 0, 0, 0.06);
    font-size: 0.75rem;
    font-weight: 700;
}

.language-links a,
.language-links .active-language {
    min-width: 28px;
    padding: 6px 7px;
    border-radius: 50px;
    color: var(--text-muted);
    text-align: center;
    text-decoration: none;
}

.language-links .active-language {
    background: var(--card-bg);
    color: var(--text-main);
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.1);
}

.gallery-item {
    aspect-ratio: auto;
    cursor: default;
}

.gallery-image-button {
    display: block;
    width: 100%;
    padding: 0;
    border: 0;
    background: transparent;
    cursor: zoom-in;
    aspect-ratio: 4 / 3;
    overflow: hidden;
}

.gallery-image-button img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.gallery-item figcaption {
    padding: 14px 16px 16px;
    color: var(--text-muted);
    font-size: 0.86rem;
    line-height: 1.45;
}

.gallery-item figcaption strong {
    display: block;
    margin-bottom: 3px;
    color: var(--text-main);
    font-size: 0.95rem;
}

.artwork-description {
    display: block;
    margin-top: 6px;
}

.gallery-image-button:focus-visible,
.language-links a:focus-visible {
    outline: 3px solid #46784b;
    outline-offset: 3px;
}

