/* =============================================
   ELEKTRO MARKT Berlin — Phase 2 UI/UX Overrides
   Applied on top of compiled Tailwind CSS
   ============================================= */

/* ---------------------------------------------
   1. HERO SECTION — stronger first screen
   --------------------------------------------- */
.cinematic-hero h1 {
  text-shadow: 0 4px 48px rgba(0, 0, 0, 0.55);
  letter-spacing: -0.03em;
}

.cinematic-hero .hero-trust-line {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 0.5rem 1rem;
  margin-top: 1.25rem;
  font-size: 0.8125rem;
  color: rgba(255, 255, 255, 0.7);
  letter-spacing: 0.01em;
}

.cinematic-hero .hero-trust-line span {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  white-space: nowrap;
}

.cinematic-hero .hero-trust-line .dot {
  display: none;
}
@media (min-width: 640px) {
  .cinematic-hero .hero-trust-line .dot {
    display: inline;
    opacity: 0.35;
  }
}

/* Enhanced CTA buttons in hero */
.hero-btn-primary {
  background: linear-gradient(135deg, #00a3ff 0%, #0077c2 100%) !important;
  color: #fff !important;
  font-weight: 700 !important;
  padding: 0.875rem 2rem !important;
  font-size: 1.05rem !important;
  border-radius: 9999px !important;
  box-shadow: 0 8px 28px rgba(0, 163, 255, 0.35) !important;
  transition: all 0.25s ease !important;
  letter-spacing: 0.01em;
}
.hero-btn-primary:hover {
  transform: translateY(-2px) !important;
  box-shadow: 0 12px 36px rgba(0, 163, 255, 0.45) !important;
}
.hero-btn-primary:active {
  transform: translateY(0) scale(0.98) !important;
}

.hero-btn-secondary {
  background: rgba(255, 255, 255, 0.1) !important;
  color: #fff !important;
  font-weight: 600 !important;
  padding: 0.875rem 2rem !important;
  font-size: 1.05rem !important;
  border-radius: 9999px !important;
  border: 1.5px solid rgba(255, 255, 255, 0.3) !important;
  backdrop-filter: blur(4px) !important;
  transition: all 0.25s ease !important;
  letter-spacing: 0.01em;
}
.hero-btn-secondary:hover {
  background: rgba(255, 255, 255, 0.18) !important;
  border-color: rgba(255, 255, 255, 0.5) !important;
  transform: translateY(-2px) !important;
}
.hero-btn-secondary:active {
  transform: translateY(0) scale(0.98) !important;
}

/* ---------------------------------------------
   2. PROVIDER BADGES
   --------------------------------------------- */
.provider-badges-section {
  padding: 2.5rem 0;
  background: linear-gradient(180deg, rgba(6,17,31,0.04) 0%, rgba(255,255,255,0.5) 40%, #ffffff 100%);
  position: relative;
  z-index: 2;
}
.provider-badges-title {
  text-align: center;
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.2em;
  color: #94a3b8;
  margin-bottom: 1.25rem;
}
.provider-badges {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  align-items: center;
  gap: 0.75rem;
}
.provider-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.5rem 1.125rem;
  border-radius: 9999px;
  font-size: 0.8125rem;
  font-weight: 600;
  border: 1.5px solid;
  transition: all 0.2s ease;
  cursor: default;
  text-decoration: none;
}
.provider-badge:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.08);
}
.provider-badge svg {
  width: 16px;
  height: 16px;
  flex-shrink: 0;
}
.provider-badge--telekom {
  color: #d9007f;
  border-color: rgba(217, 0, 127, 0.25);
  background: rgba(217, 0, 127, 0.06);
}
.provider-badge--vodafone {
  color: #e60000;
  border-color: rgba(230, 0, 0, 0.25);
  background: rgba(230, 0, 0, 0.06);
}
.provider-badge--o2 {
  color: #0050a0;
  border-color: rgba(0, 80, 160, 0.25);
  background: rgba(0, 80, 160, 0.06);
}
.provider-badge--pyur {
  color: #78be20;
  border-color: rgba(120, 190, 32, 0.25);
  background: rgba(120, 190, 32, 0.06);
}
.provider-badge-subtitle {
  text-align: center;
  margin-top: 0.75rem;
  font-size: 0.75rem;
  color: #94a3b8;
}

/* ---------------------------------------------
   3. "WARUM ELEKTRO MARKT BERLIN?" — Trust Cards
   --------------------------------------------- */
.why-section {
  padding: 4rem 0;
  background: linear-gradient(180deg, #f8fafc 0%, #ffffff 100%);
}
.why-section .section-badge {
  display: inline-flex;
  align-items: center;
  padding: 0.3rem 0.85rem;
  border-radius: 9999px;
  font-size: 0.7rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.15em;
  background: #e0f2fe;
  color: #0077c2;
  margin-bottom: 1rem;
}
.why-section h2 {
  font-family: 'Space Grotesk', 'Inter', sans-serif;
  font-weight: 700;
  letter-spacing: -0.02em;
  line-height: 1.15;
  color: #0f172a;
  margin-bottom: 0.75rem;
}
.why-section h2 .highlight {
  color: #00a3ff;
}
.why-section .section-sub {
  color: #64748b;
  max-width: 32rem;
  margin: 0 auto 2.5rem;
  font-size: 0.95rem;
  line-height: 1.6;
}
.trust-cards-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.25rem;
  max-width: 80rem;
  margin: 0 auto;
  padding: 0 1rem;
}
@media (min-width: 640px) {
  .trust-cards-grid {
    grid-template-columns: 1fr 1fr;
    padding: 0 1.5rem;
  }
}
@media (min-width: 1024px) {
  .trust-cards-grid {
    grid-template-columns: 1fr 1fr 1fr;
  }
}
.trust-card {
  background: #fff;
  border-radius: 1.5rem;
  padding: 1.5rem;
  border: 1px solid #e2e8f0;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04);
  transition: all 0.3s ease;
}
.trust-card:hover {
  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.07);
  transform: translateY(-2px);
  border-color: #cbd5e1;
}
.trust-card-icon {
  width: 44px;
  height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 14px;
  margin-bottom: 0.875rem;
  flex-shrink: 0;
}
.trust-card h3 {
  font-family: 'Space Grotesk', 'Inter', sans-serif;
  font-size: 1.05rem;
  font-weight: 600;
  margin-bottom: 0.35rem;
  color: #0f172a;
  line-height: 1.3;
}
.trust-card p {
  font-size: 0.875rem;
  color: #64748b;
  line-height: 1.55;
  margin: 0;
}

/* Trust card icon color variants */
.tci-green {
  background: #e8f8f0;
  color: #00c853;
}
.tci-blue {
  background: #e0f2fe;
  color: #0077c2;
}
.tci-purple {
  background: #f3e8ff;
  color: #7c3aed;
}
.tci-amber {
  background: #fffbeb;
  color: #d97706;
}
.tci-rose {
  background: #fff1f2;
  color: #e11d48;
}
.tci-emerald {
  background: #ecfdf5;
  color: #059669;
}

/* ---------------------------------------------
   4. STICKY MOBILE CTA BAR
   --------------------------------------------- */
.mobile-sticky-cta {
  display: none;
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: 9999;
  background: rgba(255, 255, 255, 0.96);
  backdrop-filter: blur(14px) saturate(180%);
  -webkit-backdrop-filter: blur(14px) saturate(180%);
  border-top: 1px solid #e2e8f0;
  padding: 0.65rem 0.75rem;
  box-shadow: 0 -4px 24px rgba(0, 0, 0, 0.08);
  padding-bottom: calc(0.65rem + env(safe-area-inset-bottom, 0px));
}
.mobile-sticky-cta-inner {
  display: flex;
  gap: 0.6rem;
  max-width: 48rem;
  margin: 0 auto;
  align-items: center;
}
.mobile-sticky-cta-btn {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  padding: 0.7rem 0.75rem;
  border-radius: 12px;
  font-size: 0.8125rem;
  font-weight: 600;
  border: none;
  cursor: pointer;
  transition: all 0.2s ease;
  text-decoration: none;
  line-height: 1.2;
  white-space: nowrap;
}
.mobile-sticky-cta-btn:active {
  transform: scale(0.97);
}
.mobile-sticky-cta-btn svg {
  width: 18px;
  height: 18px;
  flex-shrink: 0;
}
.mobile-sticky-cta-btn--primary {
  background: #00a3ff;
  color: #fff;
  box-shadow: 0 4px 14px rgba(0, 163, 255, 0.35);
}
.mobile-sticky-cta-btn--primary:hover {
  background: #0090e0;
}
.mobile-sticky-cta-btn--secondary {
  background: #f1f5f9;
  color: #0f172a;
}
.mobile-sticky-cta-btn--secondary:hover {
  background: #e2e8f0;
}

@media (max-width: 1023px) {
  .mobile-sticky-cta {
    display: block;
  }
  body {
    padding-bottom: 68px;
  }
}

/* ---------------------------------------------
   5. TYPOGRAPHY & SPACING IMPROVEMENTS
   --------------------------------------------- */
/* Consistent section vertical rhythm */
section:not(.cinematic-hero) {
  margin-top: 2rem;
}

/* Better line heights for body copy */
p, li, .text-sm, .text-base {
  line-height: 1.6;
}

/* Card consistency */
.premium-card-surface {
  padding: 1.5rem !important;
}

/* Section heading refinements */
h2.font-display,
h2.text-3xl,
h2.text-4xl {
  letter-spacing: -0.02em;
  line-height: 1.15;
}

/* Stats section refinements */
.bg-brand-dark.rounded-3xl.p-10 .text-4xl,
.bg-brand-dark.rounded-3xl.p-10 .text-3xl {
  line-height: 1;
  letter-spacing: -0.02em;
}

/* ---------------------------------------------
   6. MOBILE NAVIGATION IMPROVEMENTS
   --------------------------------------------- */
@media (max-width: 1023px) {
  /* Ensure nav items have adequate touch targets */
  header button,
  nav button {
    min-height: 44px;
  }

  /* Prevent content being hidden behind floating action buttons + sticky bar */
  body {
    padding-bottom: calc(68px + 60px);
  }
}

/* ---------------------------------------------
   7. CONTACT SECTION ENHANCEMENTS
   --------------------------------------------- */
.contact-quick-card {
  background: linear-gradient(135deg, rgba(0, 163, 255, 0.05), rgba(0, 230, 118, 0.03));
  border: 1px solid rgba(0, 163, 255, 0.15);
  border-radius: 1.5rem;
  padding: 1.5rem;
  transition: all 0.2s ease;
}
.contact-quick-card:hover {
  border-color: rgba(0, 163, 255, 0.3);
  box-shadow: 0 4px 16px rgba(0, 163, 255, 0.08);
}
.contact-quick-card h3 {
  font-family: 'Space Grotesk', 'Inter', sans-serif;
  font-size: 1rem;
  font-weight: 600;
  margin-bottom: 0.4rem;
  color: #0f172a;
}
.contact-quick-card a,
.contact-quick-card p {
  font-size: 0.875rem;
  color: #64748b;
  line-height: 1.5;
}

/* ---------------------------------------------
   8. ACCESSIBILITY — Focus & Reduced Motion
   --------------------------------------------- */
button:focus-visible,
a:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible {
  outline: 2.5px solid #00a3ff;
  outline-offset: 2px;
  border-radius: 8px;
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}

/* ---------------------------------------------
   9. RESPONSIVE TWEAKS
   --------------------------------------------- */
@media (max-width: 639px) {
  /* Smaller screens need tighter spacing */
  .cinematic-hero .max-w-7xl {
    padding-left: 1rem;
    padding-right: 1rem;
  }

  /* Fix potential overflow on very small screens */
  .cinematic-hero button {
    font-size: 0.9rem !important;
    padding: 0.75rem 1.25rem !important;
  }

  /* Card grid gap reduction on small screens */
  .grid.gap-6 {
    gap: 1rem;
  }
}

/* Prevent horizontal scroll issues */
body {
  overflow-x: hidden;
  width: 100%;
}

.provider-badges-section + section {
  margin-top: 0;
}

/* Home page — injected sections blend */
.p2-injected + section,
.p2-injected + div > section {
  margin-top: 0;
}


/* ---------------------------------------------
   11. MOBILE STICKY CTA — small screens
   --------------------------------------------- */
@media (max-width: 400px) {
  .mobile-sticky-cta-btn {
    font-size: 0.7rem !important;
    padding: 0.6rem 0.4rem !important;
    gap: 0.2rem;
  }
  .mobile-sticky-cta-btn svg {
    width: 15px;
    height: 15px;
  }
}

/* ---------------------------------------------
   12. INJECTION — smooth reveal
   --------------------------------------------- */
.p2-injected {
  animation: p2FadeUp 0.5s ease both;
}
@keyframes p2FadeUp {
  from {
    opacity: 0;
    transform: translateY(16px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* ---------------------------------------------
   13. EXISTING CTA OVERRIDES — make "Termin anfragen" more visible
   --------------------------------------------- */
/* Target the success/green button variant used for appointment requests */
[class*="bg-brand-green"],
button.bg-brand-green,
a.bg-brand-green {
  box-shadow: 0 6px 20px rgba(0, 230, 118, 0.4) !important;
  transition: all 0.25s ease !important;
}
[class*="bg-brand-green"]:hover,
button.bg-brand-green:hover,
a.bg-brand-green:hover {
  transform: translateY(-2px) !important;
  box-shadow: 0 10px 28px rgba(0, 230, 118, 0.5) !important;
}

/* ---------------------------------------------
   14. SERVICE CARDS — spacing & polish
   --------------------------------------------- */
[class*="rounded-"][class*="p-"] h3,
[class*="rounded-"][class*="p-"] h4 {
  letter-spacing: -0.01em;
}

/* ---------------------------------------------
   15. FOOTER TRUST BAR
   --------------------------------------------- */
footer .flex.flex-wrap.items-center.justify-center.gap-4 svg,
footer .flex.flex-wrap.items-center.justify-center.gap-4 img {
  transition: opacity 0.2s ease;
  opacity: 0.7;
}
footer .flex.flex-wrap.items-center.justify-center.gap-4 svg:hover,
footer .flex.flex-wrap.items-center.justify-center.gap-4 img:hover {
  opacity: 1;
}
