/* ====================================================
   MODERN DESIGN FALLBACK & DIAGNOSTIC CSS
   Ensures basic styling works even with conflicts
   ==================================================== */

/* Basic reset and fallbacks */
.modern-layout * {
  box-sizing: border-box;
}

/* Container fallback */
.container-modern {
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 24px;
}

/* Section spacing fallback */
.section {
  padding: 80px 0;
}

/* Grid system fallback */
.grid {
  display: grid;
  gap: 24px;
}

.grid-cols-1 {
  grid-template-columns: repeat(1, 1fr);
}

.grid-cols-2 {
  grid-template-columns: repeat(2, 1fr);
}

.grid-cols-3 {
  grid-template-columns: repeat(3, 1fr);
}

.grid-cols-4 {
  grid-template-columns: repeat(4, 1fr);
}

/* Flex utilities fallback */
.flex {
  display: flex;
}

.items-center {
  align-items: center;
}

.justify-center {
  justify-content: center;
}

.justify-between {
  justify-content: space-between;
}

.gap-2 { gap: 8px; }
.gap-3 { gap: 12px; }
.gap-4 { gap: 16px; }
.gap-6 { gap: 24px; }
.gap-8 { gap: 32px; }
.gap-12 { gap: 48px; }

/* Text utilities fallback */
.text-center {
  text-align: center;
}

.font-bold {
  font-weight: 700;
}

.font-semibold {
  font-weight: 600;
}

.font-medium {
  font-weight: 500;
}

/* Colors fallback */
.text-white {
  color: white;
}

.text-gray-600 {
  color: #6b7280;
}

.text-gray-700 {
  color: #374151;
}

.text-gray-900 {
  color: #111827;
}

.bg-white {
  background-color: white;
}

.bg-gray-50 {
  background-color: #f9fafb;
}

/* Hero section fallback */
.hero-section {
  min-height: 80vh;
  background: linear-gradient(135deg, #2563eb, #1e40af);
  color: white;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  overflow: hidden;
}

.hero-title {
  font-size: 3.75rem;
  font-weight: 800;
  margin-bottom: 1.5rem;
  line-height: 1.2;
  text-align: center;
}

.hero-subtitle {
  font-size: 1.25rem;
  margin-bottom: 2rem;
  opacity: 0.9;
  line-height: 1.6;
  text-align: center;
}

/* Button fallback */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 12px 24px;
  font-size: 16px;
  font-weight: 500;
  text-decoration: none;
  border-radius: 8px;
  transition: all 150ms ease;
  cursor: pointer;
  border: 1px solid transparent;
}

.btn-primary {
  background-color: #2563eb;
  color: white;
  border-color: #2563eb;
}

.btn-primary:hover {
  background-color: #1d4ed8;
  border-color: #1d4ed8;
  transform: translateY(-1px);
  box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
  text-decoration: none;
  color: white;
}

.btn-secondary {
  background-color: white;
  color: #2563eb;
  border-color: #2563eb;
}

.btn-secondary:hover {
  background-color: #2563eb;
  color: white;
  transform: translateY(-1px);
  box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
  text-decoration: none;
}

/* Size utilities fallback */
.btn-lg {
  padding: 16px 32px;
  font-size: 18px;
}

.btn-xl {
  padding: 20px 40px;
  font-size: 20px;
}

/* Cards fallback */
.card {
  background: white;
  border: 1px solid #e5e7eb;
  border-radius: 12px;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
  overflow: hidden;
  transition: all 300ms ease;
}

.card:hover {
  box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1);
  transform: translateY(-2px);
}

/* Spacing utilities fallback */
.p-4 { padding: 16px; }
.p-6 { padding: 24px; }
.p-8 { padding: 32px; }

.mb-4 { margin-bottom: 16px; }
.mb-6 { margin-bottom: 24px; }
.mb-8 { margin-bottom: 32px; }
.mb-12 { margin-bottom: 48px; }
.mb-16 { margin-bottom: 64px; }

.mt-8 { margin-top: 32px; }
.mt-12 { margin-top: 48px; }

/* Position utilities fallback */
.relative { position: relative; }
.absolute { position: absolute; }
.inset-0 { top: 0; right: 0; bottom: 0; left: 0; }

/* Overflow utilities fallback */
.overflow-hidden { overflow: hidden; }

/* Width/Height utilities fallback */
.w-full { width: 100%; }
.h-full { height: 100%; }
.max-w-4xl { max-width: 56rem; margin-left: auto; margin-right: auto; }

/* Navigation fallback */
.modern-header {
  background: white;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
  position: sticky;
  top: 0;
  z-index: 1000;
}

.modern-top-header {
  background-color: #f8fafc;
  border-bottom: 1px solid #e5e7eb;
  padding: 12px 0;
}

/* Responsive breakpoints */
@media (max-width: 768px) {
  .hero-title {
    font-size: 2.5rem;
  }
  
  .hero-subtitle {
    font-size: 1.125rem;
  }
  
  .container-modern {
    padding: 0 16px;
  }
  
  .section {
    padding: 64px 0;
  }
  
  .grid-cols-2,
  .grid-cols-3,
  .grid-cols-4 {
    grid-template-columns: repeat(1, 1fr);
  }
  
  .flex-col-mobile {
    flex-direction: column;
  }
}

/* Diagnostic styles - will show red border if modern design isn't loading */
.modern-layout .hero-section {
  border: 3px solid transparent;
}

/* If modern design loads properly, this will be overridden */
.diagnostic-check {
  display: none;
  background: red;
  color: white;
  padding: 20px;
  text-align: center;
  font-weight: bold;
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 9999;
}

/* Show diagnostic if modern design system doesn't load */
body:not(.modern-design-loaded) .diagnostic-check {
  display: block;
}