/* ── Header ─────────────────────────────────────── */

.site-header {
    background: var(--color-primary-dark) url('/assets/images/schmuckbild_aepfel.jpg') center / cover no-repeat;
    color: #fff;
    position: relative;
}

.site-header::before {
    content: '';
    position: absolute;
    inset: 0;
    background: rgba(30, 50, 25, 0.75);
}

.site-header > .container {
    position: relative;
}

.site-title-bar {
    padding: 0.8rem 0 0.5rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.15);
}

.logo-link {
    display: flex;
    align-items: center;
    gap: 0.8rem;
    text-decoration: none;
    color: #fff;
}

.logo-link:hover {
    color: #fff;
}

.logo-img {
    flex-shrink: 0;
    background: #fff;
    padding: 2px;
}

.logo-text {
    font-family: var(--font-heading);
    font-size: 1.3rem;
    font-weight: 700;
    line-height: 1.3;
}

.nav-bar {
    display: flex;
    justify-content: flex-start;
}

.main-nav ul {
    display: flex;
    list-style: none;
    padding: 0;
    margin: 0;
    flex-wrap: wrap;
}

.nav-link {
    display: block;
    padding: 0.6rem 1rem 0.6rem 0;
    margin-right: 1rem;
    color: rgba(255, 255, 255, 0.85);
    text-decoration: none;
    font-size: 0.95rem;
    font-weight: 600;
    border-bottom: 2px solid transparent;
}

.nav-link:hover {
    color: #fff;
    border-bottom-color: rgba(255, 255, 255, 0.5);
}

.nav-link.active {
    color: #fff;
    border-bottom-color: #fff;
}

.nav-toggle {
    display: none;
    background: none;
    border: none;
    cursor: pointer;
    padding: 0.5rem;
    margin: 0.3rem auto;
}

.nav-toggle-bar {
    display: block;
    width: 22px;
    height: 2px;
    background: #fff;
    margin: 4px 0;
}

@media (max-width: 640px) {
    .logo-text {
        font-size: 1rem;
    }

    .logo-img {
        width: 45px !important;
        height: auto !important;
    }

    .nav-toggle {
        display: block;
    }

    .main-nav {
        display: none;
    }

    .main-nav.open {
        display: block;
    }

    .main-nav ul {
        flex-direction: column;
        align-items: center;
    }

    .nav-link {
        padding: 0.5rem 1rem;
        border-bottom: none;
    }

    .nav-link.active {
        border-bottom: none;
        text-decoration: underline;
    }
}

/* ── Cards ──────────────────────────────────────── */

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

.card {
    background: var(--color-surface);
    border: 1px solid var(--color-border);
    overflow: hidden;
}

.card-image {
    width: 100%;
    height: 180px;
    object-fit: cover;
}

.card-image-placeholder {
    width: 100%;
    height: 180px;
    background: var(--color-bg-alt);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--color-text-light);
    font-size: 2.5rem;
}

.card-body {
    padding: 1rem 1.2rem;
}

.card-date {
    font-size: 0.85rem;
    color: var(--color-text-light);
    margin-bottom: 0.3rem;
}

.card-body h3 {
    margin-bottom: 0.3rem;
}

.card-body h3 a {
    color: var(--color-primary-dark);
    text-decoration: none;
}

.card-body h3 a:hover {
    text-decoration: underline;
}

.card-body p {
    color: var(--color-text-light);
    font-size: 0.93rem;
    margin-bottom: 0.5rem;
}

.read-more {
    font-size: 0.9rem;
    font-weight: 600;
}

/* ── Buttons ────────────────────────────────────── */

.btn {
    display: inline-block;
    padding: 0.5rem 1.2rem;
    font-family: var(--font-body);
    font-size: 0.95rem;
    font-weight: 600;
    border: 1px solid transparent;
    cursor: pointer;
    text-align: center;
    text-decoration: none;
}

.btn-primary {
    background: var(--color-primary);
    color: #fff;
    border-color: var(--color-primary-dark);
}

.btn-primary:hover {
    background: var(--color-primary-dark);
    color: #fff;
}

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

.btn-outline:hover {
    background: var(--color-primary);
    color: #fff;
}

/* ── Tables ─────────────────────────────────────── */

.data-table {
    width: 100%;
    border-collapse: collapse;
    border: 1px solid var(--color-border);
}

.data-table thead {
    background: var(--color-primary-dark);
    color: #fff;
}

.data-table th,
.data-table td {
    padding: 0.55rem 0.8rem;
    text-align: left;
    border: 1px solid var(--color-border);
}

.data-table th {
    font-weight: 600;
    font-size: 0.88rem;
}

.data-table tbody tr:nth-child(even) {
    background: var(--color-bg-alt);
}

@media (max-width: 640px) {
    .data-table {
        font-size: 0.88rem;
    }

    .data-table th,
    .data-table td {
        padding: 0.4rem 0.5rem;
    }
}

/* ── Forms ──────────────────────────────────────── */

.form-group {
    margin-bottom: 1rem;
}

.form-label {
    display: block;
    font-weight: 600;
    margin-bottom: 0.3rem;
    font-size: 0.95rem;
}

.form-input {
    width: 100%;
    padding: 0.5rem 0.7rem;
    font-family: var(--font-body);
    font-size: 1rem;
    border: 1px solid var(--color-border);
    background: #fff;
}

.form-input:focus {
    outline: 2px solid var(--color-primary);
    outline-offset: -1px;
}

.alert {
    padding: 0.6rem 0.8rem;
    margin-bottom: 1rem;
    font-size: 0.95rem;
    border: 1px solid;
}

.alert-error {
    background: var(--color-error-bg);
    color: var(--color-error);
    border-color: #daa;
}

/* ── Login ──────────────────────────────────────── */

.login-wrapper {
    min-height: 60vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 2rem 1rem;
}

.login-card {
    background: var(--color-surface);
    border: 1px solid var(--color-border);
    padding: 2rem;
    width: 100%;
    max-width: 380px;
}

.login-card h1 {
    text-align: center;
    margin-bottom: 1.2rem;
    font-size: 1.4rem;
}

/* ── Footer ─────────────────────────────────────── */

.site-footer {
    background: var(--color-primary-dark);
    color: rgba(255, 255, 255, 0.8);
    padding: 1.5rem 0;
    margin-top: 2rem;
    font-size: 0.9rem;
}

.footer-inner {
    display: flex;
    flex-wrap: wrap;
    gap: 2rem;
    justify-content: space-between;
}

.footer-col {
    min-width: 160px;
}

.site-footer h4 {
    color: #fff;
    font-family: var(--font-body);
    font-size: 0.95rem;
    margin-bottom: 0.5rem;
}

.site-footer p {
    margin-bottom: 0.3rem;
}

.site-footer ul {
    list-style: none;
    padding: 0;
}

.site-footer li {
    margin-bottom: 0.2rem;
}

.site-footer a {
    color: rgba(255, 255, 255, 0.75);
    text-decoration: none;
}

.site-footer a:hover {
    color: #fff;
    text-decoration: underline;
}

.copyright {
    font-size: 0.8rem;
    color: rgba(255, 255, 255, 0.5);
    margin-top: 0.5rem;
}

/* ── Article Detail ─────────────────────────────── */

.article-detail {
    max-width: 720px;
    margin: 0 auto;
}

.article-detail img {
    margin-bottom: 1rem;
    width: 100%;
    max-height: 360px;
    object-fit: cover;
}

.article-meta {
    font-size: 0.9rem;
    color: var(--color-text-light);
    margin-bottom: 1rem;
}

.back-link {
    display: inline-block;
    margin-bottom: 1rem;
    font-weight: 600;
    font-size: 0.9rem;
}

/* ── Admin Dashboard ────────────────────────────── */

.dashboard-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 1.2rem;
}

.dashboard-card {
    background: var(--color-surface);
    border: 1px solid var(--color-border);
    padding: 1.2rem;
}

.dashboard-card h3 {
    margin-bottom: 0.3rem;
}

.dashboard-card p {
    color: var(--color-text-light);
    font-size: 0.9rem;
    margin-bottom: 0;
}

/* ── Download Section ───────────────────────────── */

.download-box {
    background: var(--color-bg-alt);
    border: 1px solid var(--color-border);
    padding: 1.5rem;
    max-width: 420px;
    margin-top: 1rem;
}

.download-box h3 {
    margin-bottom: 0.3rem;
}

.download-box p {
    margin-bottom: 0.8rem;
    color: var(--color-text-light);
    font-size: 0.93rem;
}

.download-icon {
    font-size: 2rem;
    margin-bottom: 0.5rem;
}

/* ── Info Box (Geräte-Kontakt) ──────────────────── */

.info-box {
    background: var(--color-bg-alt);
    border: 1px solid var(--color-border);
    padding: 1.2rem 1.4rem;
    margin-bottom: 1.5rem;
}

.info-box h2 {
    font-size: 1.1rem;
    margin-bottom: 0.6rem;
}

.info-box p {
    margin-bottom: 0.4rem;
    font-size: 0.93rem;
}

.info-box p:last-child {
    margin-bottom: 0;
}

/* ── Geräte Table ───────────────────────────────── */

.table-scroll {
    overflow-x: auto;
    margin-bottom: 1.5rem;
}

.geraete-table th:first-child,
.geraete-table td:first-child {
    width: 45px;
    text-align: center;
}

.gebuehr-cell {
    white-space: nowrap;
}

.badge-free {
    font-weight: 600;
    color: var(--color-primary);
}

/* ── Extras / Tags ──────────────────────────────── */

.extras-section {
    margin-bottom: 1.5rem;
}

.extras-block {
    margin-bottom: 1.2rem;
}

.extras-block h3 {
    margin-bottom: 0.5rem;
}

.tag-list {
    display: flex;
    flex-wrap: wrap;
    gap: 0.4rem;
}

.tag {
    display: inline-block;
    padding: 0.25rem 0.6rem;
    background: var(--color-bg-alt);
    border: 1px solid var(--color-border);
    font-size: 0.88rem;
}

.tag-accent {
    background: #e8f0d8;
    border-color: #b5cc8e;
}

/* ── Hinweise ───────────────────────────────────── */

.hinweise-box {
    background: #fdf8e8;
    border: 1px solid #d6c880;
    padding: 1.2rem 1.4rem;
    margin-top: 1rem;
}

.hinweise-box h3 {
    color: #6b5b00;
    margin-bottom: 0.5rem;
    font-size: 1rem;
}

.hinweise-box ul {
    list-style: disc;
    padding-left: 1.4rem;
}

.hinweise-box li {
    font-size: 0.93rem;
    color: #555;
    margin-bottom: 0.2rem;
}

/* ── Admin ──────────────────────────────────────── */

.admin-actions {
    white-space: nowrap;
}

.admin-actions a {
    margin-right: 0.8rem;
    font-size: 0.9rem;
}

.inline-form {
    display: inline;
}

.link-btn {
    background: none;
    border: none;
    font-family: var(--font-body);
    font-size: 0.9rem;
    cursor: pointer;
    text-decoration: underline;
    padding: 0;
}

.link-btn-danger {
    color: var(--color-error);
}

.link-btn-danger:hover {
    color: #700;
}

.admin-form-wrap {
    max-width: 640px;
}

.admin-form-wrap textarea {
    resize: vertical;
}

.form-actions {
    display: flex;
    gap: 0.8rem;
    margin-top: 1.2rem;
}

.image-preview {
    margin-top: 0.6rem;
}

.image-preview img {
    max-width: 240px;
    max-height: 160px;
    border: 1px solid var(--color-border);
    margin-bottom: 0.4rem;
}

.image-preview label {
    display: block;
    font-size: 0.9rem;
    cursor: pointer;
}

.alert-success {
    background: #e8f5e0;
    color: #2a6e1a;
    border: 1px solid #a8d89a;
    padding: 0.6rem 0.8rem;
    margin-bottom: 1rem;
    font-size: 0.95rem;
}
