/* ========================================
   High Risk Protection Guard - Custom CSS
   Ergänzende Styles zu Tailwind CSS
   ======================================== */

/* ===== Google Fonts Import ===== */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700&family=Poppins:wght@600;700;800&display=swap');

/* ===== CSS Variables ===== */
:root {
  /* Farben */
  --color-primary: #FFFFFF;
  --color-secondary: #1F2937;
  --color-accent: #0EA5E9;
  --color-neutral-light: #F9FAFB;
  --color-neutral-medium: #E5E7EB;
  --color-bavarian-blue: #0099CC;
  --color-bavarian-white: #FFFFFF;

  /* Schriftarten */
  --font-heading: 'Poppins', sans-serif;
  --font-body: 'Inter', sans-serif;

  /* Abstände */
  --spacing-section: 6rem;
}

/* ===== Custom Background Colors ===== */
.bg-off-white {
  background-color: #cccccc;
}

/* ===== Base Styles ===== */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: var(--font-body);
  color: var(--color-secondary);
  line-height: 1.6;
  overflow-x: hidden;
  word-wrap: break-word;
  overflow-wrap: break-word;
  hyphens: auto;
}

/* Headings */
h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-heading);
  font-weight: 700;
  line-height: 1.2;
  color: var(--color-secondary);
  word-wrap: break-word;
  overflow-wrap: break-word;
  hyphens: auto;
}

h1 {
  font-size: 3.5rem;
}

h2 {
  font-size: 2.5rem;
}

h3 {
  font-size: 1.75rem;
}

/* Responsive Typography */
@media (max-width: 640px) {
  h1 {
    font-size: 1.875rem;
  }

  h2 {
    font-size: 1.5rem;
  }

  h3 {
    font-size: 1.25rem;
  }
}

@media (min-width: 641px) and (max-width: 768px) {
  h1 {
    font-size: 2.5rem;
  }

  h2 {
    font-size: 2rem;
  }

  h3 {
    font-size: 1.5rem;
  }
}

/* ===== Modern Hero Background (Dark) ===== */
.modern-hero {
  position: relative;
  overflow: hidden;
  background: linear-gradient(135deg, #0f172a 0%, #1e293b 40%, #0f172a 100%);
  color: white;
}

.modern-hero::before {
  content: '';
  position: absolute;
  top: -50%;
  right: -20%;
  width: 80%;
  height: 150%;
  background: radial-gradient(ellipse at center, rgba(14, 165, 233, 0.2) 0%, transparent 60%);
  pointer-events: none;
  z-index: 1;
}

.modern-hero::after {
  content: '';
  position: absolute;
  bottom: -30%;
  left: -10%;
  width: 60%;
  height: 100%;
  background: radial-gradient(ellipse at center, rgba(59, 130, 246, 0.15) 0%, transparent 60%);
  pointer-events: none;
  z-index: 1;
}

.modern-hero > * {
  position: relative;
  z-index: 2;
}

/* Override text colors in dark hero */
.modern-hero h1,
.modern-hero h2,
.modern-hero h3 {
  color: white;
}

.modern-hero p {
  color: #cbd5e1;
}

.modern-hero .text-gray-900 {
  color: white !important;
}

.modern-hero .text-gray-600 {
  color: #94a3b8 !important;
}

/* Bewertungskarten im modern-hero sollen normale Textfarben haben */
.modern-hero .bg-white p {
  color: inherit;
}

.modern-hero .bg-white .text-black {
  color: #000000 !important;
}

.modern-hero .bg-white .text-gray-600 {
  color: #4b5563 !important;
}

.modern-hero .trust-badge {
  background: rgba(255, 255, 255, 0.1);
  backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 255, 255, 0.1);
  color: white;
}

/* Floating Gradient Orbs (brighter for dark bg) */
.gradient-orb {
  position: absolute;
  border-radius: 50%;
  filter: blur(80px);
  opacity: 0.6;
  pointer-events: none;
  z-index: 1;
}

.gradient-orb-1 {
  top: 10%;
  right: 10%;
  width: 500px;
  height: 500px;
  background: linear-gradient(135deg, rgba(14, 165, 233, 0.4) 0%, rgba(59, 130, 246, 0.3) 100%);
  animation: float-slow 20s ease-in-out infinite;
}

.gradient-orb-2 {
  bottom: 10%;
  left: 5%;
  width: 400px;
  height: 400px;
  background: linear-gradient(135deg, rgba(99, 102, 241, 0.3) 0%, rgba(14, 165, 233, 0.2) 100%);
  animation: float-slow 25s ease-in-out infinite reverse;
}

.gradient-orb-3 {
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 600px;
  height: 600px;
  background: radial-gradient(circle, rgba(14, 165, 233, 0.15) 0%, transparent 70%);
  animation: pulse-slow 15s ease-in-out infinite;
}

@keyframes float-slow {
  0%, 100% {
    transform: translateY(0) translateX(0);
  }
  25% {
    transform: translateY(-20px) translateX(10px);
  }
  50% {
    transform: translateY(0) translateX(20px);
  }
  75% {
    transform: translateY(20px) translateX(10px);
  }
}

@keyframes pulse-slow {
  0%, 100% {
    transform: translate(-50%, -50%) scale(1);
    opacity: 0.5;
  }
  50% {
    transform: translate(-50%, -50%) scale(1.1);
    opacity: 0.3;
  }
}

/* Modern Grid Pattern (subtle) */
.modern-grid {
  position: relative;
  overflow: hidden;
}

.modern-grid::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-image:
    linear-gradient(rgba(14, 165, 233, 0.03) 1px, transparent 1px),
    linear-gradient(90deg, rgba(14, 165, 233, 0.03) 1px, transparent 1px);
  background-size: 60px 60px;
  pointer-events: none;
  z-index: 1;
}

.modern-grid > * {
  position: relative;
  z-index: 2;
}

/* Modern CTA Section */
.modern-cta {
  position: relative;
  overflow: hidden;
  background: linear-gradient(135deg, #0f172a 0%, #1e293b 50%, #0f172a 100%);
}

.modern-cta::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background:
    radial-gradient(ellipse at 20% 50%, rgba(14, 165, 233, 0.15) 0%, transparent 50%),
    radial-gradient(ellipse at 80% 50%, rgba(59, 130, 246, 0.1) 0%, transparent 50%);
  pointer-events: none;
  z-index: 1;
}

.modern-cta::after {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.02) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.02) 1px, transparent 1px);
  background-size: 40px 40px;
  pointer-events: none;
  z-index: 1;
}

.modern-cta > * {
  position: relative;
  z-index: 2;
}

/* Buttons in dark sections (CTA, Hero) */
.modern-cta .btn-primary,
.modern-hero .btn-primary {
  background-color: transparent;
  color: white;
  border: 2px solid white;
}

.modern-cta .btn-primary:hover,
.modern-hero .btn-primary:hover {
  background-color: white;
  color: var(--color-secondary);
  box-shadow: 0 10px 25px rgba(255, 255, 255, 0.2);
}

.modern-cta .btn-secondary,
.modern-hero .btn-secondary {
  background-color: transparent;
  color: white;
  border: 2px solid white;
}

.modern-cta .btn-secondary:hover,
.modern-hero .btn-secondary:hover {
  background-color: white;
  color: var(--color-secondary);
  box-shadow: 0 10px 25px rgba(255, 255, 255, 0.2);
}

/* Equal width buttons in CTA section */
.modern-cta .btn-primary,
.modern-cta .btn-secondary {
  min-width: 280px;
  text-align: center;
  justify-content: center;
}

@media (max-width: 640px) {
  .modern-cta .btn-primary,
  .modern-cta .btn-secondary {
    min-width: 100%;
  }
}

/* Legacy support - keep bavarian-pattern for other pages */
.bavarian-pattern {
  position: relative;
  overflow: hidden;
}

.bavarian-pattern::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-image:
    repeating-linear-gradient(
      45deg,
      transparent,
      transparent 35px,
      rgba(14, 165, 233, 0.12) 35px,
      rgba(14, 165, 233, 0.12) 70px
    ),
    repeating-linear-gradient(
      -45deg,
      transparent,
      transparent 35px,
      rgba(14, 165, 233, 0.12) 35px,
      rgba(14, 165, 233, 0.12) 70px
    );
  pointer-events: none;
  z-index: 1;
}

.bavarian-pattern > * {
  position: relative;
  z-index: 2;
}

/* ===== Navigation Styles ===== */
.nav-sticky {
  position: sticky;
  top: 0;
  z-index: 1000;
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(10px);
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
  transition: all 0.3s ease;
}

.nav-link {
  position: relative;
  transition: color 0.3s ease;
}

.nav-link::after {
  content: '';
  position: absolute;
  bottom: -4px;
  left: 0;
  width: 0;
  height: 2px;
  background-color: var(--color-accent);
  transition: width 0.3s ease;
}

.nav-link:hover::after,
.nav-link.active::after {
  width: 100%;
}

/* Mobile Menu */
.mobile-menu {
  display: none;
  position: fixed;
  top: 0;
  right: 0;
  width: 280px;
  height: 100vh;
  background: white;
  box-shadow: -4px 0 20px rgba(0, 0, 0, 0.1);
  transform: translateX(100%);
  transition: transform 0.3s ease;
  z-index: 9999;
  padding: 2rem;
}

.mobile-menu.active {
  display: block;
  transform: translateX(0);
}

.mobile-overlay {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.5);
  z-index: 9998;
  opacity: 0;
  transition: opacity 0.3s ease;
}

.mobile-overlay.active {
  display: block;
  opacity: 1;
}

/* ===== Button Styles ===== */
.btn {
  display: inline-block;
  padding: 0.875rem 2rem;
  font-weight: 600;
  text-align: center;
  text-decoration: none;
  border-radius: 0.5rem;
  transition: all 0.3s ease;
  cursor: pointer;
  border: none;
  font-family: var(--font-body);
}

.btn-primary {
  background-color: white;
  color: var(--color-secondary);
}

.btn-primary:hover {
  background-color: #f1f5f9;
  transform: translateY(-2px);
  box-shadow: 0 10px 25px rgba(255, 255, 255, 0.2);
}

.btn-secondary {
  background-color: transparent;
  color: var(--color-secondary);
  border: 2px solid var(--color-secondary);
}

.btn-secondary:hover {
  background-color: var(--color-secondary);
  color: white;
}

.btn-white {
  background-color: white;
  color: var(--color-secondary);
}

.btn-white:hover {
  background-color: var(--color-neutral-light);
  transform: translateY(-2px);
}

/* ===== Card Styles ===== */
.service-card {
  position: relative;
  padding: 2rem;
  background: white;
  border-radius: 1rem;
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.07);
  transition: all 0.3s ease;
  border: 1px solid var(--color-neutral-medium);
}

.service-card:hover {
  transform: translateY(-8px);
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.12);
  border-color: var(--color-accent);
}

.service-card-icon {
  width: 60px;
  height: 60px;
  background: linear-gradient(135deg, var(--color-accent) 0%, #0284c7 100%);
  border-radius: 1rem;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 1.5rem;
}

/* ===== Trust Badge ===== */
.trust-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.5rem 1rem;
  background: rgba(255, 255, 255, 0.9);
  border-radius: 2rem;
  font-size: 0.875rem;
  font-weight: 600;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

/* ===== Form Styles ===== */
.form-group {
  margin-bottom: 1.5rem;
}

.form-label {
  display: block;
  margin-bottom: 0.5rem;
  font-weight: 600;
  color: var(--color-secondary);
}

.form-input,
.form-select,
.form-textarea {
  width: 100%;
  padding: 0.875rem 1rem;
  border: 2px solid var(--color-neutral-medium);
  border-radius: 0.5rem;
  font-family: var(--font-body);
  font-size: 1rem;
  transition: border-color 0.3s ease;
  background-color: white;
}

.form-input:focus,
.form-select:focus,
.form-textarea:focus {
  outline: none;
  border-color: var(--color-accent);
  box-shadow: 0 0 0 3px rgba(14, 165, 233, 0.1);
}

.form-textarea {
  min-height: 150px;
  resize: vertical;
}

.form-error {
  color: #EF4444;
  font-size: 0.875rem;
  margin-top: 0.25rem;
}

.form-checkbox {
  display: flex;
  align-items: start;
  gap: 0.75rem;
}

.form-checkbox input[type="checkbox"] {
  margin-top: 0.25rem;
  width: 18px;
  height: 18px;
  cursor: pointer;
}

/* ===== Alert Messages ===== */
.alert {
  padding: 1rem 1.5rem;
  border-radius: 0.5rem;
  margin-bottom: 1rem;
  font-weight: 500;
}

.alert-success {
  background-color: #D1FAE5;
  color: #065F46;
  border: 1px solid #10B981;
}

.alert-error {
  background-color: #FEE2E2;
  color: #991B1B;
  border: 1px solid #EF4444;
}

/* ===== Section Spacing ===== */
.section {
  padding: var(--spacing-section) 0;
}

@media (max-width: 768px) {
  .section {
    padding: 3rem 0;
  }
}

/* ===== Utilities ===== */
.text-gradient {
  background: linear-gradient(135deg, var(--color-accent) 0%, #0284c7 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.animate-fade-in {
  animation: fadeIn 0.6s ease-in;
}

@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Loading Spinner */
.spinner {
  border: 3px solid var(--color-neutral-medium);
  border-top: 3px solid var(--color-accent);
  border-radius: 50%;
  width: 24px;
  height: 24px;
  animation: spin 0.8s linear infinite;
}

@keyframes spin {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

/* ===== Footer Bavarian Accent ===== */
.footer-bavarian {
  position: relative;
}

.footer-bavarian::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 4px;
  background: linear-gradient(90deg,
    #FFFFFF 0%, #FFFFFF 25%,
    #0099CC 25%, #0099CC 50%,
    #FFFFFF 50%, #FFFFFF 75%,
    #0099CC 75%, #0099CC 100%
  );
  background-size: 80px 4px;
}

/* ===== Responsive Images ===== */
img {
  max-width: 100%;
  height: auto;
  display: block;
}

/* Lazy Loading Effect */
img[loading="lazy"] {
  opacity: 0;
  transition: opacity 0.3s;
}

img[loading="lazy"].loaded {
  opacity: 1;
}

/* ===== Print Styles ===== */
@media print {
  .no-print {
    display: none !important;
  }

  body {
    background: white;
  }
}

/* ===== Cookie Banner ===== */
.cookie-banner {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  background: rgba(31, 41, 55, 0.98);
  color: white;
  padding: 1.5rem;
  z-index: 10000;
  box-shadow: 0 -4px 20px rgba(0, 0, 0, 0.2);
  transform: translateY(100%);
  transition: transform 0.4s ease;
}

.cookie-banner.active {
  transform: translateY(0);
}

.cookie-banner-content {
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

@media (min-width: 768px) {
  .cookie-banner-content {
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
  }
}

.cookie-banner-text {
  flex: 1;
}

.cookie-banner-text p {
  margin: 0;
  font-size: 0.9rem;
  line-height: 1.6;
  color: #D1D5DB;
}

.cookie-banner-text a {
  color: var(--color-accent);
  text-decoration: underline;
}

.cookie-banner-text a:hover {
  color: #38BDF8;
}

.cookie-banner-buttons {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
}

.cookie-btn {
  padding: 0.75rem 1.5rem;
  border-radius: 0.5rem;
  font-weight: 600;
  font-size: 0.875rem;
  cursor: pointer;
  transition: all 0.3s ease;
  border: none;
  white-space: nowrap;
}

.cookie-btn-accept {
  background: var(--color-accent);
  color: white;
}

.cookie-btn-accept:hover {
  background: #0284c7;
}

.cookie-btn-settings {
  background: transparent;
  color: white;
  border: 2px solid #6B7280;
}

.cookie-btn-settings:hover {
  border-color: white;
  background: rgba(255, 255, 255, 0.1);
}

.cookie-btn-reject {
  background: transparent;
  color: #9CA3AF;
  border: none;
  text-decoration: underline;
}

.cookie-btn-reject:hover {
  color: white;
}

/* Cookie Settings Modal */
.cookie-modal {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.7);
  z-index: 10001;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 1rem;
}

.cookie-modal.active {
  display: flex;
}

.cookie-modal-content {
  background: white;
  border-radius: 1rem;
  max-width: 600px;
  width: 100%;
  max-height: 90vh;
  overflow-y: auto;
  padding: 2rem;
}

.cookie-modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1.5rem;
}

.cookie-modal-header h2 {
  font-size: 1.5rem;
  color: var(--color-secondary);
  margin: 0;
}

.cookie-modal-close {
  background: none;
  border: none;
  font-size: 1.5rem;
  cursor: pointer;
  color: #6B7280;
  padding: 0.5rem;
}

.cookie-modal-close:hover {
  color: var(--color-secondary);
}

.cookie-category {
  padding: 1rem;
  border: 1px solid var(--color-neutral-medium);
  border-radius: 0.5rem;
  margin-bottom: 1rem;
}

.cookie-category-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.cookie-category-title {
  font-weight: 600;
  color: var(--color-secondary);
}

.cookie-category p {
  margin-top: 0.5rem;
  font-size: 0.875rem;
  color: #6B7280;
}

.cookie-toggle {
  position: relative;
  width: 50px;
  height: 26px;
}

.cookie-toggle input {
  opacity: 0;
  width: 0;
  height: 0;
}

.cookie-toggle-slider {
  position: absolute;
  cursor: pointer;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-color: #D1D5DB;
  transition: 0.3s;
  border-radius: 26px;
}

.cookie-toggle-slider:before {
  position: absolute;
  content: "";
  height: 20px;
  width: 20px;
  left: 3px;
  bottom: 3px;
  background-color: white;
  transition: 0.3s;
  border-radius: 50%;
}

.cookie-toggle input:checked + .cookie-toggle-slider {
  background-color: var(--color-accent);
}

.cookie-toggle input:checked + .cookie-toggle-slider:before {
  transform: translateX(24px);
}

.cookie-toggle input:disabled + .cookie-toggle-slider {
  background-color: #9CA3AF;
  cursor: not-allowed;
}

.cookie-modal-footer {
  display: flex;
  gap: 1rem;
  margin-top: 1.5rem;
  flex-wrap: wrap;
}

.cookie-modal-footer .cookie-btn {
  flex: 1;
  min-width: 120px;
}

/* ===== Skip Link (Accessibility) ===== */
.skip-link {
  position: absolute;
  top: -100%;
  left: 0;
  background: var(--color-accent);
  color: white;
  padding: 1rem;
  z-index: 10000;
  transition: top 0.3s;
}

.skip-link:focus {
  top: 0;
}

/* ===== Focus Styles (Accessibility) ===== */
*:focus-visible {
  outline: 3px solid var(--color-accent);
  outline-offset: 2px;
}

button:focus-visible,
a:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible {
  outline: 3px solid var(--color-accent);
  outline-offset: 2px;
}

/* ===== Screen Reader Only ===== */
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}
