:root {
    --primary-color: #3b82f6; /* Bright Blue */
    --secondary-color: #6366f1; /* Indigo */
    --bg-dark: #0f172a; /* Slate 900 */
    --bg-card: #1e293b; /* Slate 800 */
    --text-main: #f8fafc;
    --text-muted: #94a3b8;
    --accent: #22d3ee; /* Cyan */
}

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

body {
    font-family: 'Inter', system-ui, -apple-system, sans-serif;
    background-color: var(--bg-dark);
    color: var(--text-main);
    line-height: 1.6;
    display: grid;
    grid-template-rows: auto 1fr auto; /* header / main / footer */
    height: 100vh;
    min-height: 100vh;
}

/* Header & Footer */
header, footer {
    background-color: #020617;
    padding: 1rem 2rem;
    border-bottom: 1px solid #334155;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

header h1 {
    font-weight: 800;
    letter-spacing: -1px;
    background: linear-gradient(to right, var(--primary-color), var(--accent));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

header h1.logo-text {
    font-family: 'Orbitron', sans-serif; /* Apply the custom font */
    font-weight: 700;
    letter-spacing: 0;
}

nav a {
    color: var(--text-main);
    text-decoration: none;
    margin-left: 1.5rem;
    font-weight: 500;
    transition: color 0.2s;
}

nav a:hover {
    color: var(--accent);
}

footer {
    border-top: 1px solid #334155;
    border-bottom: none;
    font-size: 0.9rem;
    color: var(--text-muted);
    justify-content: center;
}

/* Layout Container */
.main-container {
    display: flex;
    /* Fill the grid's middle row so columns can control their own scrolling */
    height: 100%;
    min-height: 0; /* Important so children can scroll internally */
}

/* Left Third - Image */
.hero-section {
    flex: 1; /* 1 part */
    position: relative;
    height: 100%; /* Fill full height of the main row (between header/footer) */
    min-height: 0;
    overflow: hidden; /* Keep image static and clipped to column */
    background-color: var(--bg-dark); /* Fallback background */
}

.hero-images {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
}

.hero-image {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-size: cover;
    background-position: center;
    opacity: 0;
    animation: imageFade 100s infinite; /* 20 images * 5s each */
}

.hero-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 2rem;
    background: linear-gradient(to top, rgba(15, 23, 42, 1), rgba(15, 23, 42, 0));
    z-index: 2; /* Ensure overlay is on top of images */
}

.hero-overlay h2 {
    font-size: 2rem;
    margin-bottom: 0.5rem;
}

/* Right Two-Thirds - Content */
.content-section {
    flex: 2; /* 2 parts */
    padding: 2rem;
    overflow-y: auto; /* Only this column scrolls vertically */
    min-height: 0; /* Allow overflow-y to work inside flex child */
}

.category-group {
    margin-bottom: 3rem;
}

.category-title {
    font-size: 1.5rem;
    border-left: 4px solid var(--accent);
    padding-left: 1rem;
    margin-bottom: 1.5rem;
    color: var(--text-main);
}

.category-title .edit-icon {
    font-size: 0.8em;
    color: var(--text-muted);
    margin-right: 0.5rem;
    text-decoration: none;
}

.category-title .edit-icon:hover {
    color: var(--accent);
}

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

.tile {
    background-color: var(--bg-card);
    border: 1px solid #334155;
    border-radius: 12px;
    padding: 1.5rem;
    text-decoration: none;
    color: var(--text-main);
    transition: transform 0.2s, box-shadow 0.2s, border-color 0.2s;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
}

.tile:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 20px rgba(0,0,0,0.3);
    border-color: var(--primary-color);
}

.tile-icon {
    font-size: 2rem;
    color: var(--accent);
    margin-bottom: 1rem;
    background: rgba(34, 211, 238, 0.1);
    padding: 10px;
    border-radius: 8px;
}

.tile h3 {
    margin-bottom: 0.5rem;
    font-size: 1.1rem;
}

.tile p {
    font-size: 0.9rem;
    color: var(--text-muted);
}

.tile-meta {
    margin-top: auto; /* Pushes meta to the bottom */
    padding-top: 1rem;
    width: 100%;
    border-top: 1px solid #334155;
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem 1.5rem; /* row-gap column-gap */
    font-size: 0.8rem;
    color: var(--text-muted);
}

.tile-meta .meta-item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

/* Detail Page Styles */
.detail-container {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    padding: 2rem 1rem;
    flex-grow: 1; /* Allow it to fill the space in the main body grid */
}

.detail-container--flush,
.detail-container--wide {
    align-items: stretch;
    width: 100%;
}

.detail-container--center {
    align-items: center;
}

.detail-container--narrow {
    width: 100%;
    max-width: 650px;
    margin: 0 auto;
    padding: 2rem 1.5rem;
}

.detail-container--wide {
    max-width: 1200px;
    margin: 0 auto;
}

.page-heading {
    width: 100%;
    margin-bottom: 2rem;
}

.page-heading h1 {
    margin-bottom: 0.5rem;
}

.page-heading p {
    color: var(--text-muted);
}

.detail-header {
    display: flex;
    align-items: center;
    gap: 1.5rem;
    margin-bottom: 2rem;
}

.detail-icon {
    font-size: 3rem;
    color: var(--accent);
}

.price-tag {
    display: inline-block;
    background-color: var(--primary-color);
    color: white;
    padding: 0.5rem 1rem;
    border-radius: 50px;
    font-weight: bold;
    margin-top: 1rem;
}

.seminar-meta {
    display: flex;
    gap: 2rem;
    margin-top: 2rem;
    padding-top: 1.5rem;
    border-top: 1px solid #334155;
    color: var(--text-muted);
}

.meta-item {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.meta-item i {
    color: var(--accent);
}
.back-link {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    color: var(--text-muted);
    text-decoration: none;
    margin-bottom: 2rem;
}

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

.form-shell {
    width: min(1100px, 100%);
    display: grid;
    gap: 2rem;
}

@media (min-width: 900px) {
    .form-shell {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

.auth-shell {
    align-items: stretch;
}

.auth-highlight {
    background: radial-gradient(circle at top left, rgba(34, 211, 238, 0.25), transparent 55%),
        linear-gradient(135deg, rgba(99, 102, 241, 0.25), rgba(15, 23, 42, 0.9));
    border: 1px solid #334155;
    border-radius: 20px;
    padding: 2rem;
    box-shadow: 0 20px 45px rgba(2, 6, 23, 0.6);
}

.auth-highlight h2 {
    margin: 1rem 0;
    font-size: 1.8rem;
}

.auth-highlight p {
    color: var(--text-muted);
    margin-bottom: 1.5rem;
}

.auth-benefits {
    list-style: none;
    margin-bottom: 1.75rem;
    display: flex;
    flex-direction: column;
    gap: 0.65rem;
}

.auth-benefits i {
    color: var(--accent);
    margin-right: 0.5rem;
}

.auth-benefits--compact {
    border-top: 1px solid rgba(51, 65, 85, 0.8);
    padding-top: 1.5rem;
    margin-top: 1rem;
    gap: 0.5rem;
}

.auth-card {
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.auth-card--standalone {
    width: min(600px, 100%);
    margin: 0 auto;
    gap: 1rem;
}

.auth-card--focus {
    background: linear-gradient(160deg, rgba(15, 23, 42, 0.96), rgba(15, 23, 42, 0.88)),
        radial-gradient(circle at top, rgba(34, 211, 238, 0.15), transparent 45%);
    border-color: rgba(148, 163, 184, 0.4);
}

.auth-card-head {
    text-align: center;
}

.form-card {
    background-color: var(--bg-card);
    border: 1px solid #1f2937;
    border-radius: 20px;
    padding: 2rem;
    width: 100%;
    box-shadow: 0 25px 45px rgba(2, 6, 23, 0.55);
}

.form-card--accent {
    background: linear-gradient(135deg, rgba(34, 211, 238, 0.15), rgba(99, 102, 241, 0.15));
    border-color: rgba(148, 163, 184, 0.4);
}

.ai-card {
    margin-bottom: 2.5rem;
}

.form-card--stretch {
    padding: 2.5rem;
}

.profile-card {
    display: flex;
    flex-direction: column;
    gap: 2rem;
}

.profile-mast {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 1.5rem;
}

.profile-avatar {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    background: linear-gradient(135deg, rgba(34, 211, 238, 0.35), rgba(59, 130, 246, 0.35));
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 2rem;
    color: var(--text-main);
    box-shadow: 0 10px 25px rgba(15, 23, 42, 0.6);
}

.profile-label {
    text-transform: uppercase;
    font-size: 0.75rem;
    letter-spacing: 0.08em;
    color: var(--text-muted);
}

.profile-muted {
    color: var(--text-muted);
}

.status-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    font-weight: 600;
    padding: 0.45rem 0.9rem;
    border-radius: 999px;
    border: 1px solid rgba(148, 163, 184, 0.3);
    background: rgba(15, 23, 42, 0.5);
}

.status-badge--active {
    border-color: rgba(34, 197, 94, 0.5);
    color: #86efac;
}

.status-badge--pending {
    border-color: rgba(250, 204, 21, 0.5);
    color: #fcd34d;
}

.status-badge--suspended {
    border-color: rgba(239, 68, 68, 0.5);
    color: #fca5a5;
}

.profile-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 1.5rem;
}

.profile-field span {
    text-transform: uppercase;
    font-size: 0.75rem;
    letter-spacing: 0.08em;
    color: var(--text-muted);
    display: block;
    margin-bottom: 0.35rem;
}

.profile-field p {
    font-size: 1.05rem;
    font-weight: 600;
}

.profile-meta {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1rem;
}

.profile-meta-card {
    background: rgba(15, 23, 42, 0.65);
    border: 1px solid rgba(51, 65, 85, 0.9);
    border-radius: 16px;
    padding: 1rem 1.25rem;
}

.profile-meta-card span {
    text-transform: uppercase;
    letter-spacing: 0.08em;
    font-size: 0.75rem;
    color: var(--text-muted);
    display: block;
    margin-bottom: 0.35rem;
}

.profile-meta-card strong {
    font-size: 1rem;
    font-weight: 600;
}

.profile-actions {
    margin-top: 0.5rem;
    display: flex;
    justify-content: flex-end;
}

.form-card-head {
    margin-bottom: 1.5rem;
}

.form-card-head h2 {
    margin-bottom: 0.35rem;
}

.form-card-head p {
    color: var(--text-muted);
    font-size: 0.95rem;
}

.form-card-head--split {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    flex-wrap: wrap;
}

.form-tag {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    text-transform: uppercase;
    font-size: 0.75rem;
    letter-spacing: 0.08em;
    color: var(--accent);
    background: rgba(34, 211, 238, 0.12);
    padding: 0.35rem 0.75rem;
    border-radius: 999px;
}

.pill {
    display: inline-flex;
    align-items: center;
    font-weight: 600;
    color: var(--accent);
    background: rgba(34, 211, 238, 0.12);
    padding: 0.4rem 0.9rem;
    border-radius: 999px;
    border: 1px solid rgba(148, 163, 184, 0.3);
}

.page-heading + .alert,
.form-card + .alert {
    margin-top: 1rem;
}

.stacked-form {
    display: flex;
    flex-direction: column;
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 0.45rem;
    margin-bottom: 1.25rem;
}

.form-group label {
    font-size: 0.85rem;
    font-weight: 600;
    letter-spacing: 0.02em;
    color: var(--text-muted);
}

.form-group input,
.form-group textarea,
.form-group select {
    background-color: rgba(15, 23, 42, 0.75);
    border: 1px solid #334155;
    border-radius: 12px;
    padding: 0.85rem 1rem;
    color: var(--text-main);
    font-size: 1rem;
    transition: border-color 0.2s, box-shadow 0.2s;
}

.form-group input:focus,
.form-group textarea:focus,
.form-group select:focus {
    outline: none;
    border-color: var(--accent);
    box-shadow: 0 0 0 3px rgba(34, 211, 238, 0.15);
}

.auth-input-stack {
    background: rgba(15, 23, 42, 0.9);
    border: 1px solid rgba(148, 163, 184, 0.35);
    border-radius: 16px;
    padding: 1.25rem 1.35rem;
    display: grid;
    gap: 1rem;
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.25);
}

.input-with-icon {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    background-color: rgba(15, 23, 42, 0.75);
    border: 1px solid #334155;
    border-radius: 12px;
    padding: 0.75rem 1rem;
}

.input-with-icon i {
    color: var(--text-muted);
}

.input-with-icon input {
    border: none;
    background: #808080;
    padding: 8px;
    flex: 1;
}

.input-with-icon--lg {
    padding: 1.25rem 1.35rem;
    border-radius: 16px;
    background: rgba(15, 23, 42, 0.9);
    border-color: rgba(148, 163, 184, 0.35);
}

.input-with-icon--lg i {
    font-size: 1.2rem;
    color: var(--accent);
}

.input-with-icon--lg input {
    font-size: 1.05rem; /* keep size consistent focused/unfocused */
    font-weight: 600;
    line-height: 1.4;
    color: var(--text-main);
}

.form-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
    margin-top: 1rem;
}

.form-actions--split {
    justify-content: flex-end;
    border-top: 1px solid #334155;
    padding-top: 1.5rem;
    margin-top: 2rem;
}

.form-actions--center {
    justify-content: center;
}

.btn-primary,
button.btn-primary {
    background: linear-gradient(135deg, var(--primary-color), var(--accent));
    border: none;
    color: var(--bg-dark);
    font-weight: 700;
    border-radius: 12px;
    padding: 0.9rem 1.4rem;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    transition: transform 0.2s, box-shadow 0.2s;
}

.btn-primary:hover {
    transform: translateY(-1px);
    box-shadow: 0 10px 20px rgba(34, 211, 238, 0.2);
}

.btn-ghost {
    background: rgba(148, 163, 184, 0.15);
    border: 1px solid rgba(148, 163, 184, 0.2);
    color: var(--text-main);
    border-radius: 12px;
    padding: 0.9rem 1.4rem;
    cursor: pointer;
    transition: border-color 0.2s, background 0.2s;
}

.btn-ghost:hover {
    border-color: var(--accent);
    background: rgba(34, 211, 238, 0.08);
}

.btn-danger {
    background: linear-gradient(135deg, #ef4444, #f97316);
    border: none;
    color: #fff;
    font-weight: 700;
    border-radius: 12px;
    padding: 0.9rem 1.4rem;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    box-shadow: 0 10px 25px rgba(239, 68, 68, 0.3);
    transition: transform 0.2s, box-shadow 0.2s;
}

.btn-danger:hover {
    transform: translateY(-1px);
    box-shadow: 0 15px 30px rgba(239, 68, 68, 0.35);
}

.ghost-button {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    border: 1px solid rgba(148, 163, 184, 0.3);
    border-radius: 999px;
    padding: 0.6rem 1.1rem;
    text-decoration: none;
    color: var(--text-main);
    font-weight: 600;
    transition: border-color 0.2s, background-color 0.2s;
}

.ghost-button:hover {
    border-color: var(--accent);
    background-color: rgba(34, 211, 238, 0.12);
}

.alert {
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
    padding: 1rem 1.25rem;
    border-radius: 16px;
    border: 1px solid;
    margin-bottom: 1.5rem;
}

.alert i {
    margin-top: 0.15rem;
}

.alert-error {
    background: rgba(239, 68, 68, 0.08);
    border-color: rgba(239, 68, 68, 0.4);
    color: #fecaca;
}

.alert-success {
    background: rgba(34, 197, 94, 0.12);
    border-color: rgba(34, 197, 94, 0.4);
    color: #c8f7d4;
}

.form-check-group {
    display: flex;
    flex-direction: column;
    gap: 0.85rem;
    padding-top: 1rem;
    border-top: 1px solid #334155;
    margin-top: 1.5rem;
}

.form-check {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    cursor: pointer;
    color: var(--text-muted);
    font-weight: 600;
}

.form-check input {
    width: 1.1rem;
    height: 1.1rem;
    accent-color: var(--accent);
}

.form-switch-link {
    margin-top: 1.5rem;
    text-align: center;
    color: var(--text-muted);
}

.form-switch-link a {
    color: var(--accent);
    text-decoration: none;
}

.form-switch-link a:hover {
    text-decoration: underline;
}

.ai-inline-form {
    display: grid;
    gap: 1rem;
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: end;
}

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

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

/* Edit Form Layout */
.edit-form-layout {
    display: grid;
    grid-template-columns: 1fr 380px; /* Main content and a sidebar */
    gap: 2rem;
    align-items: flex-start;
}

.form-main-content {
    background-color: var(--bg-card);
    border: 1px solid #334155;
    border-radius: 12px;
    padding: 1.5rem;
}

.form-sidebar {
    background-color: var(--bg-card);
    border: 1px solid #334155;
    border-radius: 12px;
    padding: 1.5rem;
    position: sticky;
    top: 2rem; /* Stick to top with some padding */
}

.form-card--stretch .form-main-content,
.form-card--stretch .form-sidebar {
    background-color: rgba(15, 23, 42, 0.75);
    border-color: rgba(51, 65, 85, 0.8);
}

.form-sidebar h3 {
    margin-top: 0;
    margin-bottom: 1.5rem;
    border-bottom: 1px solid #334155;
    padding-bottom: 1rem;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    font-size: 0.85rem;
    color: var(--text-muted);
}

/* Tabs for EN/DE */
.tab-container {
    display: flex;
    border-bottom: 1px solid #334155;
    margin-bottom: 1.5rem;
}

.tab-button {
    padding: 0.75rem 1.25rem;
    cursor: pointer;
    border: none;
    background: none;
    color: var(--text-muted);
    font-weight: 500;
    border-bottom: 2px solid transparent;
    margin-bottom: -1px; /* Overlap the container's border */
    transition: color 0.2s, border-color 0.2s;
}

.tab-button.active {
    color: var(--accent);
    border-bottom-color: var(--accent);
}

.tab-content {
    display: none;
}

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


/* Responsive Design */
@media (max-width: 768px) {
    .main-container {
        flex-direction: column;
        height: auto; /* Allow full page scroll on mobile */
        overflow: visible;
    }

    .hero-section {
        height: 300px;
        flex: none;
    }

    .content-section {
        overflow-y: visible;
    }

    .edit-form-layout {
        grid-template-columns: 1fr; /* Stack columns on mobile */
    }

    .form-sidebar {
        position: static; /* Un-stick the sidebar */
        top: auto;
        margin-top: 2rem;
    }
}

/* Keyframes for the image fading animation */
@keyframes imageFade {
    0% { opacity: 0; }
    1% { opacity: 1; } /* Fade in over 1s (1% of 100s) */
    4% { opacity: 1; } /* Stay visible for 3s (3% of 100s) */
    5% { opacity: 0; } /* Fade out over 1s (1% of 100s) */
    100% { opacity: 0; }
}

/* The first image should be visible on load */
.hero-image:first-child {
    opacity: 1;
}

/* Header Right alignment */
.header-right {
    display: flex;
    align-items: center;
    gap: 1.5rem;
}
