/* ===================================
   OCKA - Main Stylesheet
   Modern, Responsive, Mobile-First
   =================================== */

/* CSS Variables */
:root {
  /* Colors - OCKA Brand */
  --primary-color: #E85A2B;
  --primary-dark: #C44A1F;
  --primary-light: #F07B4F;
  --secondary-color: #2C3E50;
  --accent-color: #F39C12;
  
  /* Grays */
  --gray-50: #F8F9FA;
  --gray-100: #E9ECEF;
  --gray-200: #DEE2E6;
  --gray-300: #CED4DA;
  --gray-400: #ADB5BD;
  --gray-500: #6C757D;
  --gray-600: #495057;
  --gray-700: #343A40;
  --gray-800: #212529;
  --gray-900: #000000;
  
  /* Status Colors */
  --success-color: #28A745;
  --warning-color: #FFC107;
  --danger-color: #DC3545;
  --info-color: #17A2B8;
  
  /* Typography */
  --font-family-base: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  --font-size-base: 1rem;
  --font-weight-light: 300;
  --font-weight-normal: 400;
  --font-weight-medium: 500;
  --font-weight-semibold: 600;
  --font-weight-bold: 700;
  
  /* Spacing */
  --spacer: 1rem;
  --spacer-xs: 0.25rem;
  --spacer-sm: 0.5rem;
  --spacer-md: 1rem;
  --spacer-lg: 1.5rem;
  --spacer-xl: 3rem;
  
  /* Borders */
  --border-radius: 0.5rem;
  --border-radius-sm: 0.25rem;
  --border-radius-lg: 1rem;
  --border-width: 1px;
  
  /* Shadows */
  --shadow-sm: 0 0.125rem 0.25rem rgba(0, 0, 0, 0.075);
  --shadow: 0 0.5rem 1rem rgba(0, 0, 0, 0.15);
  --shadow-lg: 0 1rem 3rem rgba(0, 0, 0, 0.175);
  
  /* Transitions */
  --transition-base: all 0.3s ease;
  --transition-fast: all 0.15s ease;
}

/* Base Styles */
* {
  box-sizing: border-box;
}

html {
  font-size: 16px;
  scroll-behavior: smooth;
}

body {
  font-family: var(--font-family-base);
  font-size: var(--font-size-base);
  font-weight: var(--font-weight-normal);
  line-height: 1.6;
  color: var(--gray-700);
  background-color: #fff;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

/* Loading Spinner */
.loading-spinner {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(255, 255, 255, 0.9);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 9999;
  opacity: 1;
  transition: opacity 0.3s ease;
}

.loading-spinner.hide {
  opacity: 0;
  pointer-events: none;
}

/* Main Content */
.main-content {
  flex: 1;
  padding-top: 0;
}

/* Typography */
h1, h2, h3, h4, h5, h6 {
  font-weight: var(--font-weight-semibold);
  line-height: 1.2;
  color: var(--gray-800);
  margin-bottom: var(--spacer-md);
}

h1 { font-size: 2.5rem; }
h2 { font-size: 2rem; }
h3 { font-size: 1.75rem; }
h4 { font-size: 1.5rem; }
h5 { font-size: 1.25rem; }
h6 { font-size: 1rem; }

p {
  margin-bottom: var(--spacer-md);
}

a {
  color: var(--primary-color);
  text-decoration: none;
  transition: var(--transition-fast);
}

a:hover {
  color: var(--primary-dark);
  text-decoration: underline;
}

/* Buttons */
.btn {
  font-weight: var(--font-weight-medium);
  border-radius: var(--border-radius);
  padding: 0.75rem 1.5rem;
  transition: var(--transition-base);
  border: none;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
}

.btn-primary {
  background: linear-gradient(135deg, var(--primary-color) 0%, var(--primary-dark) 100%);
  color: white;
  box-shadow: var(--shadow-sm);
}

.btn-primary:hover {
  background: linear-gradient(135deg, var(--primary-dark) 0%, var(--primary-color) 100%);
  transform: translateY(-2px);
  box-shadow: var(--shadow);
  color: white;
  text-decoration: none;
}

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

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

.btn-lg {
  padding: 1rem 2rem;
  font-size: 1.125rem;
}

.btn-sm {
  padding: 0.5rem 1rem;
  font-size: 0.875rem;
}

/* Forms */
.form-control {
  border-radius: var(--border-radius);
  border: 2px solid var(--gray-200);
  padding: 0.75rem 1rem;
  font-size: var(--font-size-base);
  transition: var(--transition-fast);
  background: white;
}

.form-control:focus {
  border-color: var(--primary-color);
  box-shadow: 0 0 0 0.2rem rgba(232, 90, 43, 0.25);
  outline: none;
}

.form-label {
  font-weight: var(--font-weight-medium);
  color: var(--gray-700);
  margin-bottom: var(--spacer-sm);
}

.form-group {
  margin-bottom: var(--spacer-lg);
}

.invalid-feedback {
  display: block;
  color: var(--danger-color);
  font-size: 0.875rem;
  margin-top: var(--spacer-xs);
}

.is-invalid {
  border-color: var(--danger-color);
}

/* Cards */
.card {
  border: none;
  border-radius: var(--border-radius-lg);
  box-shadow: var(--shadow-sm);
  transition: var(--transition-base);
  overflow: hidden;
}

.card:hover {
  box-shadow: var(--shadow);
  transform: translateY(-4px);
}

.card-header {
  background: var(--gray-50);
  border-bottom: 1px solid var(--gray-200);
  padding: 1.25rem;
  font-weight: var(--font-weight-semibold);
}

.card-body {
  padding: 1.5rem;
}

.card-footer {
  background: var(--gray-50);
  border-top: 1px solid var(--gray-200);
  padding: 1rem 1.5rem;
}

/* Alerts */
.alert {
  border-radius: var(--border-radius);
  padding: 1rem 1.25rem;
  margin-bottom: var(--spacer-lg);
  border: none;
  position: relative;
}

.alert-success {
  background: rgba(40, 167, 69, 0.1);
  color: var(--success-color);
  border-left: 4px solid var(--success-color);
}

.alert-warning {
  background: rgba(255, 193, 7, 0.1);
  color: #856404;
  border-left: 4px solid var(--warning-color);
}

.alert-danger {
  background: rgba(220, 53, 69, 0.1);
  color: var(--danger-color);
  border-left: 4px solid var(--danger-color);
}

.alert-info {
  background: rgba(23, 162, 184, 0.1);
  color: var(--info-color);
  border-left: 4px solid var(--info-color);
}

/* Navigation */
.navbar {
  padding: 1rem 0;
  transition: var(--transition-base);
}

.navbar-brand img {
  max-height: 40px;
  width: auto;
}

.nav-link {
  font-weight: var(--font-weight-medium);
  color: var(--gray-700);
  padding: 0.5rem 1rem;
  transition: var(--transition-fast);
}

.nav-link:hover {
  color: var(--primary-color);
}

.nav-link.active {
  color: var(--primary-color);
  font-weight: var(--font-weight-semibold);
}

/* Hero Section */
.hero {
  background: linear-gradient(135deg, var(--primary-color) 0%, var(--primary-dark) 100%);
  color: white;
  padding: 4rem 0;
  position: relative;
  overflow: hidden;
}

.hero::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100"><defs><pattern id="grain" width="100" height="100" patternUnits="userSpaceOnUse"><circle cx="50" cy="50" r="1" fill="white" opacity="0.1"/></pattern></defs><rect width="100" height="100" fill="url(%23grain)"/></svg>');
  opacity: 0.1;
}

.hero-content {
  position: relative;
  z-index: 1;
}

.hero h1 {
  font-size: 3.5rem;
  font-weight: var(--font-weight-bold);
  margin-bottom: var(--spacer-lg);
  color: white;
}

.hero p {
  font-size: 1.25rem;
  margin-bottom: var(--spacer-xl);
  opacity: 0.9;
}

/* Sections */
.section {
  padding: 4rem 0;
}

.section-title {
  text-align: center;
  margin-bottom: var(--spacer-xl);
}

.section-title h2 {
  font-size: 2.5rem;
  margin-bottom: var(--spacer-md);
}

.section-title p {
  font-size: 1.125rem;
  color: var(--gray-600);
  max-width: 600px;
  margin: 0 auto;
}

/* Feature Cards */
.feature-card {
  text-align: center;
  padding: 2rem;
  height: 100%;
  transition: var(--transition-base);
}

.feature-card:hover {
  transform: translateY(-8px);
}

.feature-icon {
  width: 80px;
  height: 80px;
  background: linear-gradient(135deg, var(--primary-color) 0%, var(--primary-light) 100%);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto var(--spacer-lg);
  font-size: 2rem;
  color: white;
}

/* Statistics */
.stats {
  background: var(--gray-50);
}

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

.stat-number {
  font-size: 3rem;
  font-weight: var(--font-weight-bold);
  color: var(--primary-color);
  display: block;
}

.stat-label {
  font-size: 1.125rem;
  color: var(--gray-600);
  margin-top: var(--spacer-sm);
}

/* Testimonials */
.testimonial {
  background: white;
  padding: 2rem;
  border-radius: var(--border-radius-lg);
  box-shadow: var(--shadow-sm);
  text-align: center;
  height: 100%;
}

.testimonial-avatar {
  width: 80px;
  height: 80px;
  border-radius: 50%;
  margin: 0 auto var(--spacer-lg);
  object-fit: cover;
}

.testimonial-text {
  font-style: italic;
  margin-bottom: var(--spacer-lg);
  color: var(--gray-600);
}

.testimonial-author {
  font-weight: var(--font-weight-semibold);
  color: var(--gray-800);
}

.testimonial-role {
  color: var(--gray-500);
  font-size: 0.875rem;
}

/* CTA Section */
.cta {
  background: linear-gradient(135deg, var(--secondary-color) 0%, var(--gray-800) 100%);
  color: white;
  text-align: center;
}

.cta h2 {
  color: white;
  margin-bottom: var(--spacer-lg);
}

.cta p {
  font-size: 1.125rem;
  margin-bottom: var(--spacer-xl);
  opacity: 0.9;
}

/* Utilities */
.text-primary { color: var(--primary-color) !important; }
.bg-primary { background-color: var(--primary-color) !important; }
.border-primary { border-color: var(--primary-color) !important; }

.text-muted { color: var(--gray-500) !important; }
.text-light { color: var(--gray-400) !important; }
.text-dark { color: var(--gray-800) !important; }

.bg-light { background-color: var(--gray-50) !important; }
.bg-dark { background-color: var(--gray-800) !important; }

.rounded { border-radius: var(--border-radius) !important; }
.rounded-lg { border-radius: var(--border-radius-lg) !important; }

.shadow-sm { box-shadow: var(--shadow-sm) !important; }
.shadow { box-shadow: var(--shadow) !important; }
.shadow-lg { box-shadow: var(--shadow-lg) !important; }

/* Responsive Design */
@media (max-width: 1199.98px) {
  .hero h1 { font-size: 3rem; }
  .section-title h2 { font-size: 2.25rem; }
}

@media (max-width: 991.98px) {
  .hero h1 { font-size: 2.5rem; }
  .hero p { font-size: 1.125rem; }
  .section { padding: 3rem 0; }
  .section-title h2 { font-size: 2rem; }
}

@media (max-width: 767.98px) {
  html { font-size: 14px; }
  
  .hero {
    padding: 3rem 0;
    text-align: center;
  }
  
  .hero h1 { font-size: 2rem; }
  .hero p { font-size: 1rem; }
  
  .section { padding: 2rem 0; }
  .section-title h2 { font-size: 1.75rem; }
  
  .btn {
    padding: 0.75rem 1.25rem;
    width: 100%;
    margin-bottom: var(--spacer-sm);
  }
  
  .btn-lg {
    padding: 1rem 1.5rem;
  }
  
  .card-body { padding: 1rem; }
  
  .feature-card { padding: 1.5rem 1rem; }
  
  .stat-number { font-size: 2.5rem; }
  
  .testimonial { padding: 1.5rem; }
}

@media (max-width: 575.98px) {
  .container {
    padding-left: 1rem;
    padding-right: 1rem;
  }
  
  .hero h1 { font-size: 1.75rem; }
  .section-title h2 { font-size: 1.5rem; }
  
  .feature-icon {
    width: 60px;
    height: 60px;
    font-size: 1.5rem;
  }
  
  .stat-number { font-size: 2rem; }
}

/* Print Styles */
@media print {
  .navbar,
  .footer,
  .btn,
  .alert {
    display: none !important;
  }
  
  body {
    font-size: 12pt;
    line-height: 1.4;
  }
  
  h1, h2, h3, h4, h5, h6 {
    page-break-after: avoid;
  }
}

/* High Contrast Mode */
@media (prefers-contrast: high) {
  :root {
    --primary-color: #000;
    --gray-600: #000;
    --gray-700: #000;
  }
  
  .btn-primary {
    background: #000;
    border: 2px solid #000;
  }
  
  .form-control:focus {
    border-color: #000;
    box-shadow: 0 0 0 0.2rem rgba(0, 0, 0, 0.25);
  }
}

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