/* --- style.css --- */
:root {
    --bg-color: #E8DDCB; /* Vintage Beige */
    --text-color: #2C2C2C; /* Anthrazit */
    --accent-color: #A0522D; /* Rost/Sienna */
    --header-bg: #3E3E3E;
    --light-text: #F4F1E8;
}

body {
    font-family: 'Georgia', serif; /* Klassische Serifenschrift für Vintage-Look */
    margin: 0;
    padding: 0;
    background-color: var(--bg-color);
    color: var(--text-color);
    line-height: 1.6;
}

/* Navigation */
header {
    background-color: var(--header-bg);
    color: var(--light-text);
    padding: 1rem 0;
    box-shadow: 0 2px 5px rgba(0,0,0,0.2);
    background-image: url('images/bg_01.png');
}

.nav-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

.logo {
    display: flex;
    align-items: center;
    gap: 15px;
    text-decoration: none;
    color: var(--light-text);
    font-size: 1.5rem;
    font-weight: bold;
    text-transform: uppercase;
    letter-spacing: 2px;
}

.logo::before {
    content: "";
    display: block;
    width: 80px;
    height: 80px;
    background: url('images/gussundgarn_logo.png') no-repeat center center;
    background-size: contain;
}

.main-nav ul {
    list-style: none;
    display: flex;
    gap: 20px;
    margin: 0;
    padding: 0;
}

.main-nav a {
    color: var(--light-text);
    text-decoration: none;
    font-weight: bold;
    padding: 5px 10px;
    transition: color 0.3s ease;
}

.main-nav a:hover {
    color: var(--accent-color);
}

/* Menüpunkt für später (ausgegraut) */
.nav-future {
    opacity: 0.5;
    cursor: not-allowed;
}

/* Main Content Layout */
.container {
    max-width: 1100px;
    margin: 40px auto;
    padding: 0 20px;
}

h1, h2, h3 {
    color: var(--header-bg);
    text-transform: uppercase;
}

/* Buttons & Links */
.btn {
    display: inline-block;
    background-color: var(--accent-color);
    color: var(--light-text);
    padding: 10px 20px;
    text-decoration: none;
    border-radius: 4px;
    transition: background-color 0.3s;
}

.btn:hover {
    background-color: var(--header-bg);
}

/* --- Speziell für die Auswahlseiten (Marken/Hersteller) --- */
.selection-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
    margin-top: 30px;
}

.selection-card {
    background: #fff;
    padding: 30px;
    text-align: center;
    border: 2px solid var(--header-bg);
    border-radius: 8px;
    transition: transform 0.3s;
}

.selection-card:hover {
    transform: translateY(-5px);
    background-color: var(--accent-color);
}

.selection-card a {
    text-decoration: none;
    color: var(--text-color);
    font-size: 1.5rem;
    font-weight: bold;
    display: block;
}
.selection-card:hover a {
    color: var(--light-text);
}


/* --- Speziell für die Maschinen-Detailseite (Anker-Navigation) --- */
.anchor-layout {
    display: grid;
    grid-template-columns: 250px 1fr; /* Linke Spalte Menü, rechte Spalte Inhalt */
    gap: 40px;
    position: relative;
}

/* Das klebende Seitenmenü */
.sticky-menu {
    position: sticky;
    top: 20px;
    background: #fff;
    padding: 20px;
    border: 1px solid var(--accent-color);
    border-radius: 8px;
    max-height: 80vh; /* Verhindert, dass es höher als der Bildschirm wird */
    overflow-y: auto;
}

.sticky-menu ul {
    list-style: none;
    padding: 0;
}

.sticky-menu li {
    margin-bottom: 10px;
}

.sticky-menu a {
    text-decoration: none;
    color: var(--text-color);
    display: block;
    padding: 5px;
    border-left: 3px solid transparent;
}

.sticky-menu a:hover {
    color: var(--accent-color);
    border-left: 3px solid var(--accent-color);
}

/* Einzelne Maschinen-Sektion */
.machine-section {
    scroll-margin-top: 20px; /* Abstand beim Scrollen zum Anker */
    background: #fff;
    padding: 30px;
    margin-bottom: 40px;
    border-radius: 8px;
    box-shadow: 0 4px 8px rgba(0,0,0,0.05);
    border-top: 4px solid var(--accent-color);
}

.machine-gallery img {
    max-width: 100%;
    height: auto;
    border-radius: 4px;
    margin-bottom: 15px;
}

/* --- Thumbnail Galerie & Lightbox --- */
.gallery-thumbnails {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.gallery-thumbnails img {
    width: 150px;
    height: 150px;
    object-fit: cover;
    cursor: pointer;
    border-radius: 4px;
    transition: transform 0.2s, filter 0.2s;
}

.gallery-thumbnails img:hover {
    transform: scale(1.05);
    filter: brightness(1.1);
}

/* --- Maschinendetails Tabelle --- */
.machine-details {
    width: 100%;
    border-collapse: collapse;
    margin: 20px 0;
}

.machine-details th, .machine-details td {
    padding: 8px 12px;
    border-bottom: 1px solid #eee;
    text-align: left;
    vertical-align: top;
}

.machine-details th {
    width: 150px;
    color: var(--accent-color);
    font-weight: bold;
    text-align: right;
}

.lightbox {
    display: none; /* Standardmäßig ausgeblendet */
    position: fixed;
    z-index: 2000;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0,0,0,0.9);
    justify-content: center;
    align-items: center;
    cursor: zoom-out;
}

.lightbox img {
    max-width: 95%;
    max-height: 95%;
    border-radius: 4px;
    box-shadow: 0 0 20px rgba(0,0,0,0.5);
    cursor: pointer; /* Zeigt an, dass man klicken kann (Navigation) */
}

/* Schließen-Button oben rechts */
.close-btn {
    position: absolute;
    top: 20px;
    right: 30px;
    color: #fff;
    font-size: 50px;
    font-weight: bold;
    cursor: pointer;
    z-index: 2001;
    line-height: 1;
    transition: color 0.3s;
}

.close-btn:hover {
    color: var(--accent-color);
}

.video-container {
    position: relative;
    padding-bottom: 56.25%; /* 16:9 Aspect Ratio */
    height: 0;
    overflow: hidden;
    margin-top: 20px;
}

.video-container iframe {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
}

/* Responsive Anpassung für kleine Bildschirme */
@media (max-width: 768px) {
    .nav-container {
        flex-direction: column;
        gap: 15px;
    }
    .anchor-layout {
        grid-template-columns: 1fr; /* Menü rutscht über den Inhalt */
    }
    .sticky-menu {
        position: static; /* Klebt nicht mehr mobil */
        margin-bottom: 20px;
    }
}

/* --- Research Page Styles --- */
.research-content {
    background: #fff;
    padding: 40px;
    border-radius: 8px;
    box-shadow: 0 4px 8px rgba(0,0,0,0.05);
    line-height: 1.8;
    margin-top: 20px;
}

.research-content h1 {
    margin-top: 0;
    color: var(--header-bg);
    font-size: 2rem;
    line-height: 1.2;
    margin-bottom: 20px;
}

.research-content h2 {
    border-bottom: 2px solid var(--accent-color);
    padding-bottom: 10px;
    margin-top: 40px;
    margin-bottom: 20px;
    color: var(--header-bg);
    font-size: 1.5rem;
}

.research-content h3 {
    color: var(--accent-color);
    margin-top: 30px;
    margin-bottom: 15px;
    font-size: 1.2rem;
}

.research-content h4 {
    font-size: 1.1rem;
    font-weight: bold;
    margin-top: 20px;
    margin-bottom: 10px;
}

.research-content p {
    margin-bottom: 15px;
    text-align: justify;
}

.research-content ul, .research-content ol {
    margin-bottom: 15px;
    padding-left: 20px;
}

.research-content li {
    margin-bottom: 5px;
}

.research-content table {
    width: 100%;
    border-collapse: collapse;
    margin: 30px 0;
    font-size: 0.95rem;
}

.research-content th, .research-content td {
    border: 1px solid #ddd;
    padding: 12px;
    text-align: left;
    vertical-align: top;
}

.research-content th {
    background-color: var(--bg-color);
    font-weight: bold;
    color: var(--header-bg);
}

.research-content tr:nth-child(even) {
    background-color: #f9f9f9;
}

.research-content sup {
    color: var(--accent-color);
    font-weight: bold;
    font-size: 0.8em;
}

.research-references {
    margin-top: 50px;
    border-top: 1px solid #eee;
    padding-top: 20px;
    font-size: 0.9rem;
    color: #555;
}

.research-references h4 {
    color: var(--text-color);
    text-transform: uppercase;
    font-size: 1rem;
}

.research-references a {
    color: var(--accent-color);
    word-break: break-all;
}

/* --- Research Figures --- */
.research-figure {
    margin: 30px 0;
    text-align: center;
}
.research-figure img {
    max-width: 100%;
    height: auto;
    border-radius: 4px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}
.research-figure figcaption {
    font-size: 0.9rem;
    color: #666;
    margin-top: 10px;
    font-style: italic;
}

/* Bild linksbündig mit Textumfluss */
.research-figure.float-left {
    float: left;
    margin: 5px 30px 20px 0;
    max-width: 200px;
}

@media (max-width: 700px) {
    .research-figure.float-left {
        float: none;
        margin: 30px auto;
        max-width: 100%;
    }
}