/* assets/style.css */

/* =========================================
   THEME VARIABLES
   Default = Dark, Light via body.theme-light
   ========================================= */

:root {
  /* Dark theme (schwarz / grau) */
  --bg: #020617;
  --bg-alt: #020617;
  --surface: #020617;
  --surface-elevated: #020617;
  --surface-soft: #020617;

  --border-subtle: rgba(148, 163, 184, 0.35);
  --border-strong: rgba(148, 163, 184, 0.6);

  --text-main: #f9fafb;
  --text-muted: #9ca3af;
  --text-soft: #6b7280;

  --accent: #2563eb;
  --accent-soft: rgba(37, 99, 235, 0.12);
  --accent-gradient: linear-gradient(90deg, #38bdf8, #6366f1);

  --nav-bg: rgba(15, 23, 42, 0.92);
  --nav-border: rgba(148, 163, 184, 0.35);

  --input-bg: #020617;
  --input-border: rgba(75, 85, 99, 0.9);
  --input-focus-border: #38bdf8;
  --input-focus-shadow: 0 0 0 1px rgba(56, 189, 248, 0.4);

  --card-bg: #020617;
  --card-border: rgba(51, 65, 85, 0.9);
  --card-shadow: 0 18px 40px rgba(15, 23, 42, 0.85);

  --chip-bg: rgba(15, 23, 42, 1);
  --chip-border: rgba(55, 65, 81, 1);

  --row-hover-bg: rgba(15, 23, 42, 0.9);

  --footer-text: #6b7280;

  --alert-error-bg: rgba(248, 113, 113, 0.1);
  --alert-error-border: rgba(248, 113, 113, 0.8);
  --alert-error-text: #fecaca;

  --alert-success-bg: rgba(34, 197, 94, 0.08);
  --alert-success-border: rgba(34, 197, 94, 0.85);
  --alert-success-text: #bbf7d0;

  --btn-ghost-text: #e5e7eb;
  --btn-ghost-border: rgba(148, 163, 184, 0.6);
  --btn-ghost-hover-bg: rgba(15, 23, 42, 0.9);
}

/* Light theme (weiß / grau) */
body.theme-light {
  --bg: #f5f5f7;
  --bg-alt: #f9fafb;
  --surface: #ffffff;
  --surface-elevated: #ffffff;
  --surface-soft: #f4f4f5;

  --border-subtle: rgba(209, 213, 219, 1);
  --border-strong: rgba(148, 163, 184, 1);

  --text-main: #020617;
  --text-muted: #6b7280;
  --text-soft: #9ca3af;

  --accent: #2563eb;
  --accent-soft: rgba(37, 99, 235, 0.12);
  --accent-gradient: linear-gradient(90deg, #2563eb, #6366f1);

  --nav-bg: rgba(255, 255, 255, 0.92);
  --nav-border: rgba(229, 231, 235, 1);

  --input-bg: #f9fafb;
  --input-border: rgba(209, 213, 219, 1);
  --input-focus-border: #2563eb;
  --input-focus-shadow: 0 0 0 1px rgba(37, 99, 235, 0.3);

  --card-bg: #ffffff;
  --card-border: rgba(229, 231, 235, 1);
  --card-shadow: 0 20px 45px rgba(15, 23, 42, 0.08);

  --chip-bg: #f3f4f6;
  --chip-border: rgba(209, 213, 219, 1);

  --row-hover-bg: #f3f4f6;

  --footer-text: #9ca3af;

  --alert-error-bg: rgba(248, 113, 113, 0.05);
  --alert-error-border: rgba(239, 68, 68, 0.9);
  --alert-error-text: #b91c1c;

  --alert-success-bg: rgba(22, 163, 74, 0.04);
  --alert-success-border: rgba(22, 163, 74, 0.9);
  --alert-success-text: #166534;

  --btn-ghost-text: #111827;
  --btn-ghost-border: rgba(148, 163, 184, 0.8);
  --btn-ghost-hover-bg: rgba(243, 244, 246, 0.95);
}

/* =========================================
   RESET & BASE
   ========================================= */

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

html,
body {
  min-height: 100%;
}

body {
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "SF Pro Text",
    sans-serif;
  background: var(--bg);
  color: var(--text-main);
  -webkit-font-smoothing: antialiased;
}

/* =========================================
   NAVIGATION
   ========================================= */

.nav {
  position: sticky;
  top: 0;
  z-index: 50;
  backdrop-filter: blur(20px);
  background: var(--nav-bg);
  border-bottom: 1px solid var(--nav-border);
}

.nav-inner {
  max-width: 1100px;
  margin: 0 auto;
  padding: 0.75rem 1.5rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.logo {
  font-weight: 600;
  letter-spacing: 0.08em;
  font-size: 0.9rem;
  text-transform: uppercase;
  color: var(--text-main);
}

.logo span {
  color: var(--accent);
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.nav-links a {
  text-decoration: none;
  color: var(--text-muted);
  font-size: 0.85rem;
  padding: 0.2rem 0.4rem;
  border-radius: 999px;
  transition: color 0.18s ease, background 0.18s ease, transform 0.15s ease;
}

.nav-links a:hover {
  color: var(--text-main);
  background: var(--accent-soft);
  transform: translateY(-1px);
}

/* Theme Toggle Button */

.theme-toggle {
  background: transparent;
  border-radius: 999px;
  border: 1px solid var(--btn-ghost-border);
  padding: 0.25rem 0.7rem;
  font-size: 0.85rem;
  cursor: pointer;
  color: var(--btn-ghost-text);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: background 0.18s ease, border-color 0.18s ease,
    transform 0.12s ease;
}

.theme-toggle:hover {
  background: var(--btn-ghost-hover-bg);
  transform: translateY(-1px);
}

/* =========================================
   LAYOUT
   ========================================= */

.page {
  max-width: 1100px;
  margin: 0 auto;
  padding: 2.25rem 1.5rem 3rem;
}

/* =========================================
   HERO
   ========================================= */

.hero {
  display: grid;
  gap: 2.25rem;
  grid-template-columns: minmax(0, 1.8fr) minmax(0, 1.3fr);
  align-items: center;
  margin-top: 1.5rem;
}

.hero-content h1 {
  font-size: clamp(2rem, 3.1vw, 2.7rem);
  font-weight: 600;
  letter-spacing: -0.04em;
  margin-bottom: 0.75rem;
}

.hero-content p {
  color: var(--text-muted);
  max-width: 31rem;
  margin-bottom: 1.5rem;
  font-size: 0.95rem;
}

.hero-actions {
  display: flex;
  gap: 0.75rem;
  flex-wrap: wrap;
}

.hero-card {
  background: var(--card-bg);
  border-radius: 1.3rem;
  padding: 1.4rem;
  border: 1px solid var(--card-border);
  box-shadow: var(--card-shadow);
}

.hero-card h2 {
  font-size: 1rem;
  margin-bottom: 0.4rem;
}

.hero-card p {
  color: var(--text-muted);
  font-size: 0.9rem;
  margin-bottom: 0.6rem;
}

.hero-card ul {
  list-style: none;
  color: var(--text-main);
  font-size: 0.9rem;
}

.hero-card li + li {
  margin-top: 0.3rem;
}

/* =========================================
   BUTTONS
   ========================================= */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  padding: 0.55rem 1.25rem;
  font-size: 0.9rem;
  border: 1px solid transparent;
  cursor: pointer;
  text-decoration: none;
  transition: transform 0.12s ease, box-shadow 0.15s ease,
    background 0.15s ease, border-color 0.15s ease;
  white-space: nowrap;
}

.btn.primary {
  background: var(--accent-gradient);
  color: #f9fafb;
  font-weight: 500;
  box-shadow: 0 12px 28px rgba(37, 99, 235, 0.35);
}

.btn.primary:hover {
  transform: translateY(-1px);
  box-shadow: 0 16px 38px rgba(37, 99, 235, 0.4);
}

.btn.ghost {
  background: transparent;
  color: var(--btn-ghost-text);
  border-color: var(--btn-ghost-border);
}

.btn.ghost:hover {
  border-color: var(--btn-ghost-border);
  background: var(--btn-ghost-hover-bg);
}

.btn.small {
  padding: 0.3rem 0.75rem;
  font-size: 0.8rem;
}

/* =========================================
   CARDS & SECTIONS
   ========================================= */

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

.feature-card {
  padding: 1.2rem;
  border-radius: 1.1rem;
  background: var(--surface-soft);
  border: 1px solid var(--border-subtle);
  box-shadow: 0 14px 32px rgba(15, 23, 42, 0.14);
}

.feature-card h3 {
  font-size: 0.95rem;
  margin-bottom: 0.35rem;
}

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

.center-card {
  max-width: 480px;
  margin: 3rem auto;
  background: var(--card-bg);
  border-radius: 1.3rem;
  padding: 1.75rem;
  border: 1px solid var(--card-border);
  box-shadow: var(--card-shadow);
}

.center-card h1 {
  font-size: 1.35rem;
  margin-bottom: 0.9rem;
}

.page-section {
  margin-top: 2.5rem;
}

.card,
.job-card {
  background: var(--card-bg);
  border-radius: 1.1rem;
  padding: 1.25rem;
  border: 1px solid var(--card-border);
  box-shadow: var(--card-shadow);
}

.card + .card {
  margin-top: 1.25rem;
}

.card-list {
  display: grid;
  gap: 1rem;
}

.job-card h2 {
  font-size: 1.05rem;
  margin-bottom: 0.2rem;
}

.job-meta {
  font-size: 0.85rem;
  color: var(--text-muted);
  margin-bottom: 0.5rem;
}

/* =========================================
   FORMS
   ========================================= */

.form {
  display: flex;
  flex-direction: column;
  gap: 0.7rem;
  margin-top: 0.5rem;
}

.form label {
  font-size: 0.85rem;
  color: var(--text-main);
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}

input,
select,
textarea {
  background: var(--input-bg);
  border-radius: 0.7rem;
  border: 1px solid var(--input-border);
  padding: 0.55rem 0.75rem;
  font-size: 0.9rem;
  color: var(--text-main);
  outline: none;
  transition: border-color 0.15s ease, box-shadow 0.15s ease,
    background 0.15s ease;
}

input::placeholder,
textarea::placeholder {
  color: var(--text-soft);
}

input:focus,
select:focus,
textarea:focus {
  border-color: var(--input-focus-border);
  box-shadow: var(--input-focus-shadow);
}

textarea {
  resize: vertical;
}

.form-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.75rem;
}

.inline-form textarea {
  margin-top: 0.4rem;
  margin-bottom: 0.5rem;
}

/* =========================================
   TABLES & LISTS
   ========================================= */

.table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.85rem;
}

.table th,
.table td {
  padding: 0.55rem 0.5rem;
  border-bottom: 1px solid var(--border-subtle);
}

.table th {
  text-align: left;
  color: var(--text-muted);
  font-weight: 500;
}

.table tr:hover {
  background: var(--row-hover-bg);
}

.list {
  list-style: none;
  font-size: 0.9rem;
}

.list li + li {
  margin-top: 0.6rem;
  padding-top: 0.6rem;
  border-top: 1px solid var(--border-subtle);
}

/* =========================================
   UTILITIES
   ========================================= */

.muted {
  color: var(--text-muted);
  font-size: 0.85rem;
}

.mt {
  margin-top: 2rem;
}

.grid-2 {
  display: grid;
  grid-template-columns: minmax(0, 1.3fr) minmax(0, 1fr);
  gap: 1.5rem;
}

.alert {
  border-radius: 0.9rem;
  padding: 0.6rem 0.8rem;
  font-size: 0.85rem;
  margin-bottom: 0.75rem;
}

.alert.error {
  background: var(--alert-error-bg);
  border: 1px solid var(--alert-error-border);
  color: var(--alert-error-text);
}

.alert.success {
  background: var(--alert-success-bg);
  border: 1px solid var(--alert-success-border);
  color: var(--alert-success-text);
}

/* =========================================
   FOOTER
   ========================================= */

.footer {
  max-width: 1100px;
  margin: 0 auto;
  padding: 1.5rem;
  font-size: 0.8rem;
  color: var(--footer-text);
}

/* =========================================
   HOMEPAGE SECTIONS
   ========================================= */

.home-intro {
  margin-top: 3rem;
  max-width: 52rem;
}

.home-intro h2 {
  font-size: 1.2rem;
  margin-bottom: 0.6rem;
}

.home-intro p + p {
  margin-top: 0.6rem;
}

.chips-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  margin-top: 1rem;
}

.chip {
  font-size: 0.75rem;
  padding: 0.25rem 0.6rem;
  border-radius: 999px;
  border: 1px solid var(--border-subtle);
  background: var(--chip-bg);
  color: var(--text-muted);
}

.home-how {
  margin-top: 3rem;
}

.home-how h2 {
  font-size: 1.1rem;
  margin-bottom: 1.2rem;
}

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

.step-card {
  background: var(--card-bg);
  border-radius: 1.1rem;
  padding: 1.1rem;
  border: 1px solid var(--card-border);
  box-shadow: var(--card-shadow);
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
}

.step-number {
  width: 1.5rem;
  height: 1.5rem;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 0.8rem;
  font-weight: 500;
  background: var(--accent-soft);
  color: var(--accent);
}

.step-card h3 {
  font-size: 0.95rem;
  margin-top: 0.2rem;
}

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

.step-card .btn {
  margin-top: 0.6rem;
}

/* Auth Call-to-Action auf Startseite – überarbeitet */

.auth-cta {
  margin: 4rem auto 2.5rem;
  max-width: 1100px;
}

.auth-cta h2 {
  font-size: 1.1rem;
  margin-bottom: 0.35rem;
}

.auth-cta p {
  max-width: 40rem;
}

.auth-cta-grid {
  margin-top: 1.3rem;
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(0, 1.4fr);
  gap: 0;
  background: var(--card-bg);
  border-radius: 1.7rem;
  padding: 1.4rem 1.8rem;
  border: 1px solid var(--border-subtle);
  box-shadow: 0 22px 55px rgba(15, 23, 42, 0.12);
}

.auth-cta-box {
  padding: 0.3rem 0.4rem;
}

.auth-cta-box h3 {
  font-size: 0.95rem;
  margin-bottom: 0.35rem;
}

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

.auth-cta-box:first-child {
  padding-right: 1.5rem;
}

.auth-cta-box:last-child {
  padding-left: 1.5rem;
  border-left: 1px solid var(--border-subtle);
}

.auth-cta-options {
  margin-top: 0.7rem;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.9rem;
}

.auth-cta-options h4 {
  font-size: 0.9rem;
  margin-bottom: 0.25rem;
}

/* Login / Auth Mini-Section unter dem Login-Formular */

.auth-mini-grid {
  margin-top: 1.2rem;
}

.auth-mini-card {
  margin-top: 0.8rem;
  padding-top: 0.85rem;
  border-top: 1px solid var(--border-subtle);
}

.auth-mini-card h2 {
  font-size: 0.95rem;
  margin-bottom: 0.3rem;
}

.auth-mini-actions {
  margin-top: 0.7rem;
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

/* =========================================
   ANIMATION
   ========================================= */

.fade-in {
  animation: fadeInUp 0.45s ease forwards;
  opacity: 0;
  transform: translateY(8px);
}

@keyframes fadeInUp {
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* =========================================
   RESPONSIVE
   ========================================= */

@media (max-width: 800px) {
  .hero {
    grid-template-columns: minmax(0, 1fr);
  }

  .grid-2 {
    grid-template-columns: minmax(0, 1fr);
  }

  .nav-inner {
    padding-inline: 1rem;
  }

  .page {
    padding-inline: 1rem;
  }

  .auth-cta-grid {
    grid-template-columns: minmax(0, 1fr);
    padding: 1.2rem 1.1rem;
  }

  .auth-cta-box:first-child {
    padding-right: 0;
    padding-bottom: 1.1rem;
    border-right: none;
    border-bottom: 1px solid var(--border-subtle);
    margin-bottom: 0.7rem;
  }

  .auth-cta-box:last-child {
    padding-left: 0;
    border-left: none;
  }

  .auth-cta-options {
    grid-template-columns: minmax(0, 1fr);
  }
}

.job-card-hero {
  width: 100%;
  border-radius: 0.9rem;
  padding-top: 45%; /* 16:9-artiges Verhältnis */
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  margin-bottom: 0.3rem;
}

.job-page .job-layout {
  display: grid;
  grid-template-columns: minmax(0, 2fr) minmax(0, 1.1fr);
  gap: 1.5rem;
}

.job-side {
  display: flex;
  flex-direction: column;
}

.job-card-hero {
  width: 100%;
  border-radius: 0.9rem;
  padding-top: 45%; /* ungefähr 16:9 */
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  margin-bottom: 0.8rem;
}

@media (max-width: 800px) {
  .job-page .job-layout {
    grid-template-columns: minmax(0, 1fr);
  }
}

.badge {
  display: inline-flex;
  align-items: center;
  padding: 0.15rem 0.6rem;
  border-radius: 999px;
  font-size: 0.75rem;
  border: 1px solid var(--border-subtle);
}

.badge-active {
  background: rgba(34, 197, 94, 0.12);
  border-color: rgba(34, 197, 94, 0.6);
}

.badge-inactive {
  background: rgba(148, 163, 184, 0.12);
  border-color: rgba(148, 163, 184, 0.8);
}

.badge-archived {
  background: rgba(107, 114, 128, 0.18);
  border-color: rgba(55, 65, 81, 0.9);
}

/* Standard großes Hero-Bild (z.B. in job.php oder im Company-Dashboard) */
.job-card-hero {
  width: 100%;
  border-radius: 0.9rem;
  padding-top: 45%; /* ~16:9 */
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  margin-bottom: 0.8rem;
}

/* Kleine Vorschau im Schüler-Dashboard */
.job-card-hero--small {
  padding-top: 22%;    /* deutlich kleiner */
  margin-bottom: 0.5rem;
  border-radius: 0.7rem;
}