/**
 * Kibo Journey WordPress Plugin - Main Styles
 * Version: 2.0.0
 * Includes: Updated muted-foreground color for better visibility
 */

/* CSS Variables - Updated for better visibility */
:root {
  --kibo-primary: #1E88E5;
  --kibo-primary-dark: #1565C0;
  --kibo-primary-light: #E6F7FF;
  --kibo-orange: #FF9800;
  --kibo-orange-dark: #e55a2b;
  --kibo-green: #ABB71D;
  --kibo-pink: #CE6784;
  --kibo-pink-light: #FFF5F5;
  --kibo-yellow-light: #FFEB8A;
  --kibo-peach: #FFB78E;
  --kibo-teal: #0E4449;
  
  /* Updated muted foreground for better visibility */
  --kibo-muted-foreground: hsl(215.4, 16.3%, 25%);
  --kibo-foreground: hsl(222.2, 84%, 4.9%);
  --kibo-background: hsl(0, 0%, 100%);
  --kibo-border: hsl(214.3, 31.8%, 91.4%);
  --kibo-radius: 0.5rem;
}

/* Base Styles */
.kibo-journey-container {
  font-family: 'Montserrat', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  line-height: 1.6;
  color: var(--kibo-foreground);
  width: 100%;
  margin: 0;
  padding: 0;
}

.kibo-journey-container * {
  box-sizing: border-box;
}

/* Loading Styles */
.kibo-journey-loading {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: 200px;
  padding: 2rem;
  text-align: center;
}

.loading-spinner {
  width: 40px;
  height: 40px;
  border: 4px solid var(--kibo-border);
  border-top: 4px solid var(--kibo-primary);
  border-radius: 50%;
  animation: spin 1s linear infinite;
  margin-bottom: 1rem;
}

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

/* Hero Section */
.kibo-hero {
  background: linear-gradient(135deg, var(--kibo-primary) 0%, var(--kibo-primary-dark) 100%);
  color: white;
  padding: 80px 20px;
  text-align: center;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  position: relative;
  overflow: hidden;
}

.kibo-hero::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-image: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 1000 1000"><polygon fill="rgba(255,255,255,0.05)" points="0,0 1000,300 1000,1000 0,700"/></svg>');
  background-size: cover;
  background-position: center;
}

.kibo-hero-content {
  position: relative;
  z-index: 2;
  max-width: 800px;
}

.kibo-hero h1 {
  font-size: 3.5rem;
  font-weight: 700;
  margin-bottom: 1rem;
  line-height: 1.2;
}

.kibo-hero .subtitle {
  font-size: 1.25rem;
  margin-bottom: 2rem;
  opacity: 0.9;
  color: var(--kibo-primary-light);
}

.kibo-hero-buttons {
  display: flex;
  gap: 1rem;
  justify-content: center;
  flex-wrap: wrap;
  margin-top: 2rem;
}

/* Buttons */
.kibo-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 15px 30px;
  font-size: 1.1rem;
  font-weight: 600;
  text-decoration: none;
  border-radius: 50px;
  transition: all 0.3s ease;
  cursor: pointer;
  border: none;
  min-width: 160px;
}

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

.kibo-btn-primary:hover {
  background: var(--kibo-primary-dark);
  transform: translateY(-2px);
  box-shadow: 0 10px 25px rgba(30, 136, 229, 0.3);
}

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

.kibo-btn-secondary:hover {
  background: var(--kibo-orange-dark);
  transform: translateY(-2px);
  box-shadow: 0 10px 25px rgba(255, 152, 0, 0.3);
}

.kibo-btn-outline {
  background: transparent;
  color: white;
  border: 2px solid white;
}

.kibo-btn-outline:hover {
  background: white;
  color: var(--kibo-primary);
}

/* Section Styles */
.kibo-section {
  padding: 80px 20px;
  max-width: 1200px;
  margin: 0 auto;
}

.kibo-section-title {
  font-size: 2.5rem;
  font-weight: 700;
  text-align: center;
  margin-bottom: 1rem;
  color: var(--kibo-primary);
}

.kibo-section-subtitle {
  font-size: 1.2rem;
  text-align: center;
  margin-bottom: 3rem;
  color: var(--kibo-muted-foreground);
  max-width: 800px;
  margin-left: auto;
  margin-right: auto;
}

/* Grid Layouts */
.kibo-grid {
  display: grid;
  gap: 2rem;
  margin-top: 3rem;
}

.kibo-grid-2 {
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
}

.kibo-grid-3 {
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
}

.kibo-grid-4 {
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
}

/* Cards */
.kibo-card {
  background: white;
  padding: 2rem;
  border-radius: var(--kibo-radius);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
  transition: all 0.3s ease;
  border: 1px solid var(--kibo-border);
}

.kibo-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.15);
}

.kibo-card h3 {
  color: var(--kibo-primary);
  margin-bottom: 1rem;
  font-size: 1.5rem;
  font-weight: 600;
}

.kibo-card p {
  color: var(--kibo-muted-foreground);
  line-height: 1.6;
}

.kibo-card-icon {
  width: 60px;
  height: 60px;
  margin: 0 auto 1rem;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--kibo-primary-light);
  border-radius: 50%;
  color: var(--kibo-primary);
}

/* Statistics Section */
.kibo-stats {
  background: linear-gradient(135deg, var(--kibo-primary-light) 0%, white 100%);
}

.kibo-stat-item {
  text-align: center;
  padding: 2rem;
}

.kibo-stat-number {
  font-size: 3rem;
  font-weight: 700;
  color: var(--kibo-primary);
  display: block;
  margin-bottom: 0.5rem;
}

.kibo-stat-label {
  font-size: 1.1rem;
  color: var(--kibo-muted-foreground);
  font-weight: 500;
}

/* Progress Bars */
.kibo-progress {
  background: var(--kibo-border);
  border-radius: 10px;
  height: 20px;
  overflow: hidden;
  margin: 1rem 0;
}

.kibo-progress-bar {
  height: 100%;
  border-radius: 10px;
  transition: width 0.8s ease;
}

.kibo-progress-bar.estimated { background: var(--kibo-primary); }
.kibo-progress-bar.available { background: var(--kibo-green); }
.kibo-progress-bar.planned { background: var(--kibo-orange); }
.kibo-progress-bar.gap { background: #ef4444; }

/* Programs Section */
.kibo-programs {
  background: white;
}

.kibo-program-tabs {
  display: flex;
  justify-content: center;
  margin-bottom: 3rem;
  border-bottom: 1px solid var(--kibo-border);
}

.kibo-tab {
  padding: 1rem 2rem;
  background: none;
  border: none;
  font-size: 1.1rem;
  font-weight: 500;
  color: var(--kibo-muted-foreground);
  cursor: pointer;
  border-bottom: 3px solid transparent;
  transition: all 0.3s ease;
}

.kibo-tab.active {
  color: var(--kibo-primary);
  border-bottom-color: var(--kibo-primary);
}

.kibo-tab:hover {
  color: var(--kibo-primary);
}

/* Get Involved Section */
.kibo-get-involved {
  background: linear-gradient(135deg, var(--kibo-orange) 0%, var(--kibo-orange-dark) 100%);
  color: white;
}

.kibo-get-involved .kibo-section-title {
  color: white;
}

.kibo-get-involved .kibo-section-subtitle {
  color: rgba(255, 255, 255, 0.9);
}

.kibo-get-involved .kibo-card {
  background: rgba(255, 255, 255, 0.1);
  backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 255, 255, 0.2);
  color: white;
}

.kibo-get-involved .kibo-card h3 {
  color: white;
}

.kibo-get-involved .kibo-card p {
  color: rgba(255, 255, 255, 0.9);
}

/* Forms */
.kibo-form {
  max-width: 600px;
  margin: 3rem auto 0;
  background: white;
  padding: 2rem;
  border-radius: var(--kibo-radius);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
}

.kibo-form-group {
  margin-bottom: 1.5rem;
}

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

.kibo-form-input,
.kibo-form-textarea,
.kibo-form-select {
  width: 100%;
  padding: 0.75rem;
  border: 1px solid var(--kibo-border);
  border-radius: calc(var(--kibo-radius) - 2px);
  font-size: 1rem;
  transition: border-color 0.3s ease;
}

.kibo-form-input:focus,
.kibo-form-textarea:focus,
.kibo-form-select:focus {
  outline: none;
  border-color: var(--kibo-primary);
  box-shadow: 0 0 0 3px rgba(30, 136, 229, 0.1);
}

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

/* Footer */
.kibo-footer {
  background: var(--kibo-teal);
  color: white;
  padding: 3rem 2rem 2rem;
  text-align: center;
}

.kibo-footer-content {
  max-width: 1200px;
  margin: 0 auto;
}

.kibo-footer-links {
  display: flex;
  justify-content: center;
  gap: 2rem;
  margin-bottom: 2rem;
  flex-wrap: wrap;
}

.kibo-footer-links a {
  color: white;
  text-decoration: none;
  transition: opacity 0.3s ease;
}

.kibo-footer-links a:hover {
  opacity: 0.8;
}

.kibo-social-links {
  display: flex;
  justify-content: center;
  gap: 1rem;
  margin: 2rem 0;
}

.kibo-social-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  background: rgba(255, 255, 255, 0.1);
  border-radius: 50%;
  color: white;
  text-decoration: none;
  transition: all 0.3s ease;
}

.kibo-social-link:hover {
  background: rgba(255, 255, 255, 0.2);
  transform: translateY(-2px);
}

/* Responsive Design */
@media (max-width: 768px) {
  .kibo-hero h1 {
    font-size: 2.5rem;
  }
  
  .kibo-hero-buttons {
    flex-direction: column;
    align-items: center;
  }
  
  .kibo-section {
    padding: 60px 20px;
  }
  
  .kibo-section-title {
    font-size: 2rem;
  }
  
  .kibo-grid {
    grid-template-columns: 1fr;
    gap: 1.5rem;
  }
  
  .kibo-program-tabs {
    flex-direction: column;
    align-items: center;
  }
  
  .kibo-tab {
    padding: 0.75rem 1.5rem;
  }
  
  .kibo-footer-links {
    flex-direction: column;
    gap: 1rem;
  }
}

@media (max-width: 480px) {
  .kibo-hero {
    padding: 60px 15px;
  }
  
  .kibo-hero h1 {
    font-size: 2rem;
  }
  
  .kibo-section {
    padding: 40px 15px;
  }
  
  .kibo-card {
    padding: 1.5rem;
  }
  
  .kibo-btn {
    padding: 12px 24px;
    font-size: 1rem;
  }
}

/* Accessibility */
.kibo-journey-container *:focus {
  outline: 2px solid var(--kibo-primary);
  outline-offset: 2px;
}

.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;
}

/* Animation Classes */
.fade-in {
  animation: fadeIn 0.6s ease-out;
}

.slide-up {
  animation: slideUp 0.6s ease-out;
}

@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

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

/* Theme Compatibility */
.kibo-journey-full-mode {
  margin: 0 !important;
  padding: 0 !important;
}

.kibo-journey-full-mode .kibo-journey-container {
  width: 100vw !important;
  max-width: none !important;
  margin: 0 !important;
  padding: 0 !important;
}

/* NoScript Fallback */
.kibo-journey-noscript {
  padding: 2rem;
  text-align: center;
  background: var(--kibo-primary-light);
  border-radius: var(--kibo-radius);
  margin: 2rem 0;
}

.kibo-journey-noscript h2 {
  color: var(--kibo-primary);
  margin-bottom: 1rem;
}

.kibo-journey-noscript p {
  color: var(--kibo-muted-foreground);
  margin-bottom: 1rem;
}
