/* ============================================
   Formulando — Apple & Dribbble Redesign
   ============================================ */

@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700;800&display=swap');

:root {
  --color-apple-blue: #0071e3;
  --color-apple-blue-hover: #0077ed;
  --color-text: #1d1d1f;
  --color-text-secondary: #86868b;
  --color-bg: #ffffff;
  --color-bg-alt: #f5f5f7;
  --color-card-bg: #ffffff;
  --color-border: #d2d2d7;
  --font-family: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;

  --radius-hero: 40px;
  --radius-card: 24px;
  --radius-button: 980px;
  /* Pill shape */

  --section-padding: 80px;
  --max-width: 1080px;
}

/* --- Base Styles --- */
* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  font-family: var(--font-family);
  background-color: var(--color-bg);
  color: var(--color-text);
  line-height: 1.47059;
  font-weight: 400;
  letter-spacing: -0.022em;
  -webkit-font-smoothing: antialiased;
}

a {
  text-decoration: none;
  color: var(--color-apple-blue);
  transition: all 0.3s ease;
}

a:hover {
  text-decoration: underline;
}

/* --- Header --- */
.site-header {
  height: 120px;
  background: rgba(255, 255, 255, 0.82);
  backdrop-filter: saturate(180%) blur(20px);
  position: sticky;
  top: 0;
  z-index: 1000;
  border-bottom: 1px solid var(--color-border);
}

.header-inner {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 22px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 100%;
}

.brand-logo {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 700;
  font-size: 19px;
  color: var(--color-text);
  letter-spacing: -0.02em;
}

.logo-box {
  background: linear-gradient(135deg, #0071e3 0%, #3692f4 100%);
  width: 36px;
  height: 36px;
  border-radius: 9px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  box-shadow: 0 4px 12px rgba(0, 113, 227, 0.25);
  transition: transform 0.2s ease;
}

.logo-box:hover {
  transform: scale(1.05);
}

.logo-box .lucide {
  width: 20px;
  height: 20px;
  stroke-width: 2.5px;
}

.header-nav {
  display: flex;
  gap: 24px;
}

.header-nav a {
  font-size: 12px;
  color: var(--color-text);
  opacity: 0.8;
}

.header-nav a:hover {
  opacity: 1;
  text-decoration: none;
}

/* --- Hero Section --- */
.hero {
  text-align: center;
  padding: 100px 22px 60px;
  max-width: 800px;
  margin: 0 auto;
}

.hero-badge {
  background: #f2e7fe;
  color: #7b2cbf;
  padding: 8px 16px;
  border-radius: 980px;
  font-size: 14px;
  font-weight: 600;
  display: inline-block;
  margin-bottom: 24px;
}

.hero h1 {
  font-size: 80px;
  font-weight: 700;
  letter-spacing: -0.04em;
  line-height: 1.05;
  margin-bottom: 24px;
  color: #111;
}

.hero p {
  font-size: 24px;
  line-height: 1.25;
  font-weight: 400;
  letter-spacing: .004em;
  color: var(--color-text-secondary);
  margin-bottom: 40px;
}

.btn-hero {
  background: #111;
  color: #fff;
  padding: 18px 36px;
  border-radius: 980px;
  font-size: 18px;
  font-weight: 600;
  display: inline-block;
  transition: transform 0.2s ease, background 0.2s ease;
}

.btn-hero:hover {
  background: #333;
  transform: scale(1.05);
  color: #fff;
  text-decoration: none;
}

/* --- Grid & Cards --- */
.main {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 40px 22px;
}

.cards-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 24px;
  margin-top: 40px;
}

.card {
  background: var(--color-bg-alt);
  border-radius: var(--radius-card);
  padding: 40px;
  transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  min-height: 480px;
  border: none;
  cursor: pointer;
  position: relative;
  overflow: hidden;
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  background-color: #f5f5f7;
  /* Apple's subtle gray */
}

.card-entschuldigung {
  background-image: url('https://images.unsplash.com/photo-1584036561566-baf8f5f1b144?auto=format&fit=crop&q=80&w=1000');
}

.card-beurlaubung {
  background-image: url('https://images.unsplash.com/photo-1506784365847-bbad939e9335?auto=format&fit=crop&q=80&w=1000');
}

.card-sportbefreiung {
  background-image: url('https://images.unsplash.com/photo-1517836357463-d25dfeac3438?auto=format&fit=crop&q=80&w=1000');
}

.card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: linear-gradient(180deg, rgba(0, 0, 0, 0) 0%, rgba(0, 0, 0, 0.4) 100%);
  z-index: 1;
}

.card:hover {
  transform: scale(1.02);
}

.card-content {
  z-index: 2;
  background: rgba(255, 255, 255, 0.82);
  backdrop-filter: saturate(180%) blur(20px);
  padding: 24px;
  border-radius: 20px;
  width: 100%;
}

.card-icon {
  margin-bottom: 12px;
  color: var(--color-apple-blue);
}

.lucide {
  width: 48px;
  height: 48px;
  stroke-width: 1.5px;
}

.card-title {
  font-size: 28px;
  font-weight: 600;
  margin-bottom: 12px;
}

.card-description {
  font-size: 16px;
  color: var(--color-text-secondary);
  margin-bottom: 24px;
}

/* --- Form Styles (Apple Minimalist) --- */
.form-container {
  max-width: 680px;
  margin: 40px auto;
  background: #fff;
}

.form-section {
  margin-bottom: 48px;
}

.form-section-title {
  font-size: 24px;
  font-weight: 600;
  margin-bottom: 24px;
  border-bottom: 1px solid var(--color-border);
  padding-bottom: 12px;
}

.form-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
}

.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
  grid-column: span 2;
}

.form-group.full-width {
  grid-column: span 2;
}

.search-results {
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  background: rgba(255, 255, 255, 0.8);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid rgba(0, 0, 0, 0.1);
  border-radius: 12px;
  margin-top: 8px;
  max-height: 300px;
  overflow-y: auto;
  z-index: 1000;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
  display: none;
}

.search-result-item {
  padding: 12px 16px;
  cursor: pointer;
  border-bottom: 1px solid rgba(0, 0, 0, 0.05);
  transition: background 0.2s ease;
}

.search-result-item:last-child {
  border-bottom: none;
}

.search-result-item:hover {
  background: rgba(0, 113, 227, 0.05);
}

.result-name {
  display: block;
  font-weight: 600;
  color: var(--color-text);
  font-size: 14px;
}

.result-addr {
  display: block;
  font-size: 12px;
  color: var(--color-text-secondary);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* Loading state for search */
.search-loading {
  position: absolute;
  right: 15px;
  top: 40px;
  width: 20px;
  height: 20px;
  border: 2px solid rgba(0, 113, 227, 0.1);
  border-top-color: var(--color-apple-blue);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
  display: none;
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

.form-label {
  display: block;
  font-size: 14px;
  font-weight: 500;
  margin-bottom: 8px;
  color: var(--color-text);
}

.form-input,
.form-select,
.form-textarea {
  width: 100%;
  padding: 12px 16px;
  border: 1px solid var(--color-border);
  border-radius: 12px;
  font-size: 16px;
  font-family: var(--font-family);
  transition: border-color 0.2s ease;
  background: #fff;
  outline: none;
}

.form-input:focus,
.form-select:focus,
.form-textarea:focus {
  border-color: var(--color-apple-blue);
  box-shadow: 0 0 0 4px rgba(0, 113, 227, 0.1);
}

.form-actions {
  text-align: center;
  margin-top: 60px;
  padding: 40px;
  background: var(--color-bg-alt);
  border-radius: var(--radius-card);
}

.btn-submit {
  background: var(--color-apple-blue);
  color: #fff;
  padding: 14px 28px;
  border-radius: 980px;
  font-size: 16px;
  font-weight: 600;
  border: none;
  cursor: pointer;
  transition: background 0.2s ease, transform 0.15s ease;
}

.btn-submit:hover {
  background: var(--color-apple-blue-hover);
  transform: scale(1.02);
}

.btn-muster {
  background: transparent;
  color: var(--color-text-secondary);
  padding: 14px 28px;
  border-radius: 980px;
  font-size: 15px;
  font-weight: 500;
  border: 1.5px solid var(--color-border);
  cursor: pointer;
  transition: all 0.2s ease;
  margin-top: 12px;
  display: block;
  width: 100%;
}

.btn-muster:hover {
  border-color: var(--color-text-secondary);
  color: var(--color-text);
  transform: scale(1.01);
}

/* --- Utils --- */
.required {
  color: #d60017;
}

.info-banner {
  background: var(--color-bg-alt);
  padding: 16px 24px;
  border-radius: 12px;
  font-size: 14px;
  color: var(--color-text-secondary);
  margin-bottom: 32px;
}

/* --- Footer --- */
.site-footer {
  background: var(--color-bg-alt);
  padding: 60px 22px;
  margin-top: 80px;
  border-top: 1px solid var(--color-border);
}

.footer-inner {
  max-width: var(--max-width);
  margin: 0 auto;
  font-size: 12px;
  color: var(--color-text-secondary);
  line-height: 1.33337;
}

.footer-bottom {
  border-top: 1px solid var(--color-border);
  padding-top: 12px;
  margin-top: 12px;
}

/* Responsive */
@media (max-width: 768px) {
  .hero h1 {
    font-size: 48px;
  }

  .form-grid {
    grid-template-columns: 1fr;
  }

  .form-group.full-width {
    grid-column: span 1;
  }
}

/* --- Validation Alert Bar (compact) --- */
.validation-alert {
  position: fixed;
  top: 60px;
  left: 50%;
  transform: translateX(-50%) translateY(-20px);
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  color: #ff3b30;
  border: 1px solid rgba(255, 59, 48, 0.2);
  padding: 14px 26px;
  border-radius: 980px;
  font-size: 15px;
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 10px;
  z-index: 99999;
  opacity: 0;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
  transition: opacity 0.25s ease, transform 0.25s cubic-bezier(0.34, 1.56, 0.64, 1);
  pointer-events: none;
  white-space: nowrap;
}

.validation-alert.show {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

.validation-alert .alert-icon {
  font-size: 16px;
  flex-shrink: 0;
}

/* Keep modal overlay hidden (used only for school autocomplete warning) */
.modal-overlay {
  display: none !important;
}

/* --- Validation Feedback --- */
.form-input.is-invalid,
.form-select.is-invalid,
.form-textarea.is-invalid {
  border-color: #ff3b30 !important;
  box-shadow: 0 0 0 4px rgba(255, 59, 48, 0.1) !important;
}

/* --- SEO Content --- */
.seo-content {
  background-color: var(--color-bg);
  padding: 80px 22px;
  border-top: 1px solid var(--color-border);
  margin-top: 60px;
}

.seo-inner {
  max-width: 900px;
  margin: 0 auto;
}

.seo-inner h2 {
  font-size: 32px;
  letter-spacing: -0.03em;
  margin-bottom: 50px;
  text-align: center;
  color: var(--color-text);
  font-weight: 700;
}

.seo-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 40px;
}

.seo-block h3 {
  font-size: 20px;
  margin-bottom: 12px;
  letter-spacing: -0.02em;
  color: var(--color-text);
  font-weight: 600;
}

.seo-block p,
.seo-block ul {
  font-size: 16px;
  line-height: 1.6;
  color: var(--color-text-muted);
}

.seo-block.full-width-block {
  grid-column: 1 / -1;
}

.seo-block ul {
  padding-left: 20px;
  margin-top: 10px;
}

.seo-block li {
  margin-bottom: 6px;
}

@media (max-width: 768px) {
  .seo-grid {
    grid-template-columns: 1fr;
    gap: 30px;
  }
}