/* ============================================================
   LISORECT — style.css
   ============================================================ */

:root {
    --color-primary:     #204a30;
    --color-primary-mid: #355E3B;
    --color-sidebar-bg:  #d8dece;
    --color-text:        #333;
    --color-white:       #ffffff;
    --color-content-bg:  rgba(255, 255, 255, 0.92);

    --header-height:     70px;
    --footer-height:     80px;
    --border-radius:     6px;
    --transition:        0.3s ease;
}

/* ── Reset ─────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; }

body {
    margin: 0;
    padding-top: var(--header-height);
    font-family: Arial, sans-serif;
    background-color: #2c2c2c;
    color: var(--color-text);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

/* ── Background per page (Bilder deaktiviert, einheitliches Dunkelgrau) ── */
/* Zum Reaktivieren: body.home { background-image: url('assets/backgrounds/HomeBackground.jpg'); } */

/* ── Main content area ──────────────────────────────────── */
#main-content {
    flex: 1;
    padding: 24px 32px;
    max-width: 1100px;
    margin: 0 auto;
    width: 100%;
}

.content-card {
    background-color: var(--color-content-bg);
    border-radius: var(--border-radius);
    padding: 28px 32px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.25);
}

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

.content-card.page-enter {
    animation: pageEnter 0.35s ease-out both;
}

h1 {
    color: var(--color-primary);
    margin-top: 0;
}

/* ── HEADER ─────────────────────────────────────────────── */
.site-header {
    position: fixed;
    top: 0; left: 0; right: 0;
    height: var(--header-height);
    background-color: var(--color-primary);
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 24px;
    z-index: 1000;
    box-shadow: 0 2px 8px rgba(0,0,0,0.4);
}

/* Logo */
.header-logo {
    display: flex;
    align-items: center;
    flex-shrink: 0;
}

.header-logo img {
    height: 52px;
    width: auto;
    display: block;
}

/* Nav */
.header-nav {
    display: flex;
    align-items: center;
    gap: 8px;
    flex: 1;
    justify-content: center;
}

.header-nav a {
    color: var(--color-sidebar-bg);
    text-decoration: none;
    font-weight: bold;
    font-size: 0.95rem;
    padding: 6px 12px;
    border-radius: 4px;
    transition: color var(--transition), background-color var(--transition);
    white-space: nowrap;
}

.header-nav a:hover {
    color: var(--color-white);
    background-color: var(--color-primary-mid);
}

.header-nav a.active {
    color: var(--color-white);
    text-decoration: underline;
    text-underline-offset: 4px;
    font-weight: bold;
}

/* Header right: matrix mini + lang switcher */
.header-right {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-shrink: 0;
}

/* Language switcher */
.lang-switcher {
    display: flex;
    gap: 4px;
}

.lang-switcher a {
    color: var(--color-sidebar-bg);
    text-decoration: none;
    font-size: 0.75rem;
    font-weight: bold;
    padding: 3px 7px;
    border: 1px solid var(--color-sidebar-bg);
    border-radius: 3px;
    transition: all var(--transition);
    opacity: 0.7;
}

.lang-switcher a:hover,
.lang-switcher a.active-lang {
    background-color: var(--color-sidebar-bg);
    color: var(--color-primary);
    opacity: 1;
}

/* Hamburger button (mobile only) */
.hamburger {
    display: none;
    background: none;
    border: none;
    color: var(--color-white);
    font-size: 1.6rem;
    cursor: pointer;
    padding: 4px 8px;
    line-height: 1;
}

/* Mobile dropdown nav */
.mobile-nav {
    display: none;
    position: fixed;
    top: var(--header-height);
    left: 0; right: 0;
    background-color: var(--color-primary);
    z-index: 999;
    box-shadow: 0 4px 12px rgba(0,0,0,0.4);
    flex-direction: column;
    padding: 8px 0;
}

.mobile-nav.open {
    display: flex;
}

.mobile-nav a {
    color: var(--color-sidebar-bg);
    text-decoration: none;
    font-weight: bold;
    font-size: 1rem;
    padding: 14px 28px;
    border-bottom: 1px solid rgba(255,255,255,0.1);
    transition: background-color var(--transition);
}

.mobile-nav a:hover {
    background-color: var(--color-primary-mid);
    color: var(--color-white);
}

.mobile-nav a.active {
    color: var(--color-white);
    text-decoration: underline;
    text-underline-offset: 4px;
}

.mobile-nav .mobile-lang {
    display: flex;
    gap: 8px;
    padding: 12px 28px;
}

.mobile-nav .mobile-lang a {
    border: 1px solid var(--color-sidebar-bg);
    border-radius: 3px;
    padding: 4px 10px;
    font-size: 0.8rem;
    border-bottom: 1px solid var(--color-sidebar-bg);
}

.mobile-nav .mobile-lang a.active-lang {
    background-color: var(--color-sidebar-bg);
    color: var(--color-primary);
}

/* ── FOOTER ─────────────────────────────────────────────── */
.site-footer {
    background-color: var(--color-primary);
    color: var(--color-sidebar-bg);
    padding: 0;
    min-height: var(--footer-height);
    display: flex;
    flex-direction: column;
}

/* Partner ticker */
.partner-ticker {
    overflow: hidden;
    height: 56px;
    display: flex;
    align-items: center;
    background-color: rgba(0,0,0,0.2);
    border-bottom: 1px solid rgba(255,255,255,0.1);
}

.partner-ticker-inner {
    display: flex;
    align-items: center;
    gap: 40px;
    white-space: nowrap;
    will-change: transform;
    opacity: 0; /* Sofort verstecken – JS setzt Position, dann opacity:1 */
}

.partner-ticker-item {
    display: inline-flex;
    align-items: center;
}

.partner-ticker-item a {
    display: block;
    transition: background var(--transition), padding var(--transition);
}

.partner-ticker-item img {
    width: 120px;
    height: 44px;
    object-fit: contain;
    opacity: 0.75;
    transition: opacity var(--transition), transform var(--transition);
}

.partner-ticker-item a:hover img {
    opacity: 1;
    transform: scale(1.1);
}

/* Footer bottom bar */
.footer-bottom {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    padding: 10px 24px;
    font-size: 0.75rem;
    opacity: 0.8;
    flex-wrap: wrap;
}

/* ── HOME — App Slideshow ────────────────────────────────── */
.slideshow-container {
    position: relative;
}

.slide {
    display: none;
    gap: 32px;
    align-items: flex-start;
}

.slide.active {
    display: flex;
}

.slide-image {
    flex: 0 0 48%;
    max-width: 48%;
}

.slide-image img {
    width: 100%;
    height: auto;
    border-radius: var(--border-radius);
    box-shadow: 0 4px 16px rgba(0,0,0,0.2);
    display: block;
    cursor: zoom-in;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.slide-image img:hover {
    transform: scale(1.01);
    box-shadow: 0 6px 24px rgba(0,0,0,0.3);
}

/* Lightbox */
#lightbox {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.88);
    z-index: 9999;
    align-items: center;
    justify-content: center;
    cursor: zoom-out;
    padding: 20px;
}

#lightbox-img {
    max-width: 92vw;
    max-height: 88vh;
    object-fit: contain;
    border-radius: var(--border-radius);
    box-shadow: 0 8px 40px rgba(0,0,0,0.6);
    pointer-events: none;
    user-select: none;
    -webkit-user-select: none;
}

.slide-text {
    flex: 1;
    min-width: 0;
}

.slide-text h2 {
    color: var(--color-primary);
    margin-top: 0;
}

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

/* "Mehr anzeigen" Logik */
.slide-text-body {
    max-height: 160px;
    overflow: hidden;
    transition: max-height 0.4s ease;
}

.slide-text-body.expanded {
    max-height: 1000px;
}

.slide-more-btn {
    background: none;
    border: none;
    color: var(--color-primary-mid);
    font-weight: bold;
    font-size: 0.88rem;
    cursor: pointer;
    padding: 6px 0 0 0;
    display: none;
    text-decoration: underline;
    text-underline-offset: 3px;
}

.slide-more-btn.visible {
    display: inline-block;
}

/* Fortschrittsbalken */
.slide-progress-bar {
    width: 100%;
    height: 4px;
    background-color: rgba(32, 74, 48, 0.15);
    border-radius: 2px;
    margin-top: 20px;
    overflow: hidden;
}

.slide-progress-fill {
    height: 100%;
    width: 0%;
    background: linear-gradient(90deg, #2d7a45, #5cb87a);
    border-radius: 2px;
    transition: width 0.1s linear;
}

/* Slideshow controls */
.slideshow-controls {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    margin-top: 20px;
}

.slide-btn {
    background-color: var(--color-primary);
    color: white;
    border: none;
    width: 42px;
    height: 42px;
    border-radius: 50%;
    cursor: pointer;
    font-size: 1.4rem;
    font-family: Arial, sans-serif;
    padding: 0;
    line-height: 42px;
    text-align: center;
    box-shadow: 0 2px 8px rgba(0,0,0,0.2);
    transition: background-color var(--transition), transform var(--transition), box-shadow var(--transition);
    flex-shrink: 0;
}

.slide-btn:hover {
    background-color: var(--color-primary-mid);
    transform: scale(1.1);
    box-shadow: 0 4px 14px rgba(0,0,0,0.3);
}

.slide-btn:active {
    transform: scale(0.95);
}

.slide-play-btn {
    background-color: rgba(32, 74, 48, 0.55);
    font-size: 1rem;
}

.slide-dots {
    display: flex;
    gap: 8px;
}

.dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background-color: #ccc;
    cursor: pointer;
    transition: background-color var(--transition);
    border: none;
    padding: 0;
}

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

/* ── ABOUT ──────────────────────────────────────────────── */
.about-bio {
    font-size: 0.97rem;
    line-height: 1.55;
    margin-bottom: 16px;
}

.skills-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 16px;
}

.skill-badge {
    background-color: var(--color-primary);
    color: white;
    padding: 6px 14px;
    border-radius: 20px;
    font-size: 0.88rem;
    font-weight: bold;
    letter-spacing: 0.3px;
}

.projects-list {
    margin-top: 24px;
}

.project-item {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    padding: 8px 0;
    border-bottom: 1px solid #e0e0e0;
    font-size: 0.93rem;
    line-height: 1.5;
}

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

.project-icon {
    font-size: 1.4rem;
    flex-shrink: 0;
    margin-top: 2px;
}

/* ── IMPRESSUM ──────────────────────────────────────────── */
.impressum-card {
    background: #f8faf8;
    border: 1px solid #d4e6d8;
    border-radius: var(--border-radius);
    padding: 20px 24px;
    margin-bottom: 16px;
}

.impressum-row {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    padding: 8px 0;
    border-bottom: 1px solid #e8efe9;
    font-size: 0.97rem;
}

.impressum-row:last-child {
    border-bottom: none;
}

.impressum-icon {
    font-size: 1.1rem;
    flex-shrink: 0;
    width: 24px;
    text-align: center;
    margin-top: 1px;
}

.impressum-label {
    font-weight: bold;
    color: var(--color-primary);
    min-width: 110px;
    flex-shrink: 0;
}

.impressum-value a {
    color: var(--color-primary-mid);
}

/* ── PARTNERS ───────────────────────────────────────────── */
.partners-table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 16px;
}

.partners-table th {
    background-color: var(--color-primary);
    color: white;
    padding: 12px 16px;
    text-align: left;
}

.partners-table td {
    padding: 12px 16px;
    border-bottom: 1px solid #e0e0e0;
    vertical-align: middle;
}

.partners-table tr:hover td {
    background-color: #f0f5f1;
}

.partners-table img {
    width: 160px;
    height: 64px;
    object-fit: contain;
    display: block;
    filter: grayscale(1);
    opacity: 0.75;
    transition: filter var(--transition), opacity var(--transition);
}

.partners-table tr:hover img {
    filter: grayscale(0);
    opacity: 1;
}

.partners-table a {
    color: var(--color-primary-mid);
    font-weight: bold;
}

.no-partners {
    text-align: center;
    padding: 40px;
    color: #888;
    font-style: italic;
}

.cookie-text {
    opacity: 0.6;
    font-style: italic;
}

/* ── NEWS ───────────────────────────────────────────────── */
.news-page-title {
    color: var(--color-primary);
    margin-top: 0;
    margin-bottom: 4px;
}

.news-page-subtitle {
    color: #555;
    font-style: italic;
    font-size: 0.97rem;
    margin-top: 0;
    margin-bottom: 24px;
    border-left: 3px solid var(--color-primary);
    padding-left: 12px;
}

.news-list {
    display: flex;
    flex-direction: column;
    gap: 20px;
    margin-top: 8px;
}

.news-article {
    border: 1px solid #d4e6d8;
    border-radius: var(--border-radius);
    padding: 20px 24px;
    background: #f8faf8;
    transition: box-shadow var(--transition);
}

.news-article:hover {
    box-shadow: 0 2px 14px rgba(32, 74, 48, 0.18);
}

.news-article-date {
    font-size: 0.78rem;
    color: #888;
    margin-bottom: 4px;
    letter-spacing: 0.3px;
}

.news-article-title {
    color: var(--color-primary);
    font-size: 1.12rem;
    font-weight: bold;
    margin: 0 0 10px 0;
}

.news-article-preview {
    color: var(--color-text);
    font-size: 0.95rem;
    line-height: 1.6;
    margin: 0;
}

.news-article-body {
    display: none;
    margin-top: 14px;
    color: var(--color-text);
    font-size: 0.95rem;
    line-height: 1.6;
    border-top: 1px solid #d4e6d8;
    padding-top: 14px;
}

.news-article-body.open {
    display: block;
}

.news-read-more {
    display: inline-block;
    margin-top: 10px;
    color: var(--color-primary-mid);
    font-weight: bold;
    font-size: 0.88rem;
    cursor: pointer;
    background: none;
    border: none;
    padding: 0;
    text-decoration: underline;
    text-underline-offset: 3px;
    transition: color var(--transition);
}

.news-read-more:hover {
    color: var(--color-primary);
}

/* Code & tables inside news articles */
.news-article pre {
    background: #1e1e2e;
    color: #cdd6f4;
    border-radius: 6px;
    padding: 14px 16px;
    overflow-x: auto;
    font-size: 0.82rem;
    line-height: 1.6;
    margin: 12px 0;
}

.news-article code {
    font-family: 'Courier New', Courier, monospace;
}

.news-article pre code {
    background: none;
    padding: 0;
    color: inherit;
}

.news-article :not(pre) > code {
    background: rgba(0,0,0,0.08);
    border-radius: 3px;
    padding: 1px 5px;
    font-size: 0.88em;
    color: #204a30;
}

.news-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.88rem;
    margin: 12px 0;
}

.news-table th,
.news-table td {
    padding: 7px 12px;
    text-align: left;
    border: 1px solid #ddd;
}

.news-table thead th {
    background: var(--color-primary);
    color: #fff;
    font-weight: bold;
}

.news-table tbody tr:nth-child(even) {
    background: rgba(0,0,0,0.04);
}

.news-article h3 {
    color: var(--color-primary);
    font-size: 1rem;
    margin: 20px 0 8px;
}


/* ── MOBILE-ONLY TITLES ──────────────────────────────────── */
.mobile-only-title {
    display: none;
}

/* ── RESPONSIVE ─────────────────────────────────────────── */
@media (max-width: 768px) {
    .mobile-only-title {
        display: block;
        margin-top: 0;
        margin-bottom: 12px;
        color: var(--color-primary-light);
    }
    .header-nav,
    .header-right {
        display: none;
    }

    .hamburger {
        display: block;
    }

    #main-content {
        padding: 16px;
    }

    .content-card {
        padding: 20px 18px;
    }

    .slide.active {
        flex-direction: column;
        gap: 12px;
    }

    .slide-image {
        flex: 0 0 auto;
        max-width: 100%;
    }

    .slide-image img {
        max-height: 200px;
        width: 100%;
        object-fit: cover;
    }

    .slide-text-body {
        max-height: 320px;
    }

    .slide-text h2 {
        font-size: 1.1rem;
        margin-top: 0;
        margin-bottom: 0;
    }

    .slide-text-body p {
        margin-top: 4px;
    }

    .slideshow-controls {
        margin-top: 12px;
    }

    .impressum-label {
        min-width: 80px;
    }

    .partners-table,
    .partners-table tbody,
    .partners-table tr,
    .partners-table td {
        display: block;
        width: 100%;
    }

    .partners-table tr {
        border-bottom: 1px solid #e0e0e0;
        padding: 12px 0;
    }

    .partners-table tr:last-child {
        border-bottom: none;
    }

    .partners-link-col {
        padding-top: 6px;
    }

    .partners-table img {
        width: 140px;
        height: 56px;
    }

    .footer-bottom {
        flex-direction: column;
        align-items: center;
        text-align: center;
        gap: 4px;
    }

    .news-article {
        padding: 16px 16px;
    }

    .news-article-title {
        font-size: 1rem;
    }

    .news-article-preview,
    .news-article-body {
        font-size: 0.92rem;
    }
}

/* ── Automation Section ─────────────────────────────────── */
.automation-section {
    margin-top: 36px;
    padding-top: 28px;
    border-top: 1px solid #ccc;
}

.automation-canvas-wrap {
    width: 100%;
    background: #1e1e2e;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: inset 0 2px 8px rgba(0,0,0,0.4);
}

.automation-canvas-wrap canvas {
    display: block;
}

.automation-text {
    margin-top: 16px;
    line-height: 1.75;
    color: var(--color-text);
}
