/* =====================================================
   OpsPortal Custom Styles - Garmin-Inspired Design
   ===================================================== */

/* Import Google Fonts */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&display=swap');
@import url('https://cdn.jsdelivr.net/npm/bootstrap-icons@1.11.0/font/bootstrap-icons.css');

/* CSS Custom Properties for Consistent Theming */
:root {
  --primary-color: #1e40af;
  --primary-dark: #1e3a8a;
  --secondary-color: #64748b;
  --dark-color: #0f172a;
  --light-color: #f8fafc;
  --body-bg: #ffffff;
  --body-color: #334155;
  --border-color: #e2e8f0;
  --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
  --shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
  --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
  --border-radius: 0.5rem;
  --border-radius-lg: 0.75rem;
  --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Base Typography */
html {
  font-size: 16px;
  font-family: 'Inter', system-ui, -apple-system, sans-serif;
}

body {
  font-family: 'Inter', system-ui, -apple-system, sans-serif;
  line-height: 1.6;
  color: var(--body-color);
  background-color: var(--body-bg);
  margin: 0;
  padding: 0;
}

/* Main content area with fixed navbar */
main {
  padding-top: 76px; /* Account for fixed navbar height */
}

/* Headings */
h1, h2, h3, h4, h5, h6 {
  font-weight: 600;
  line-height: 1.2;
  color: var(--dark-color);
}

.display-1, .display-2, .display-3, .display-4, .display-5, .display-6 {
  font-weight: 700;
}

/* Navigation Styles */
.navbar {
  background-color: rgba(255, 255, 255, 0.95) !important;
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--border-color);
  transition: var(--transition);
  padding: 1rem 0;
}

.navbar.scrolled {
  padding: 0.5rem 0;
  box-shadow: var(--shadow);
}

.navbar-brand {
  font-weight: 700;
  font-size: 1.5rem;
  color: var(--primary-color) !important;
}

.navbar-nav .nav-link {
  font-weight: 500;
  color: var(--body-color) !important;
  padding: 0.5rem 1rem !important;
  transition: var(--transition);
  position: relative;
}

.navbar-nav .nav-link:hover {
  color: var(--primary-color) !important;
}

.navbar-nav .nav-link.active {
  color: var(--primary-color) !important;
  font-weight: 600;
}

/* Button Styles */
.btn {
  font-weight: 600;
  padding: 0.75rem 1.5rem;
  border-radius: var(--border-radius);
  transition: var(--transition);
  border: none;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
}

.btn-primary {
  background: linear-gradient(135deg, var(--primary-color) 0%, var(--primary-dark) 100%);
  color: white;
  box-shadow: var(--shadow-sm);
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 25px rgba(30, 64, 175, 0.3);
  background: linear-gradient(135deg, var(--primary-dark) 0%, #1e3a8a 100%);
  color: white;
}

.btn-outline-primary {
  border: 2px solid var(--primary-color);
  color: var(--primary-color);
  background: transparent;
}

.btn-outline-primary:hover {
  background: var(--primary-color);
  color: white;
  transform: translateY(-2px);
  box-shadow: var(--shadow);
}

.btn-outline-light {
  border: 2px solid rgba(255, 255, 255, 0.3);
  color: white;
  background: transparent;
}

.btn-outline-light:hover {
  background: rgba(255, 255, 255, 0.1);
  border-color: white;
  color: white;
  transform: translateY(-2px);
}

.btn-lg {
  padding: 1rem 2rem;
  font-size: 1.1rem;
  border-radius: var(--border-radius-lg);
}

/* Hero Section */
.hero-section {
  background: linear-gradient(135deg, var(--dark-color) 0%, var(--primary-dark) 100%);
  min-height: calc(100vh - 76px); /* Account for navbar */
  display: flex;
  align-items: center;
  position: relative;
  overflow: hidden;
  padding-top: 0;
}

.hero-section::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cg fill='%23ffffff' fill-opacity='0.03'%3E%3Ccircle cx='30' cy='30' r='1'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E") repeat;
  pointer-events: none;
}

.hero-content {
  position: relative;
  z-index: 2;
}

.hero-section .display-2 {
  color: white !important;
  margin-bottom: 2rem;
}

.hero-section h1,
.hero-section h2,
.hero-section h3,
.hero-section h4,
.hero-section h5,
.hero-section h6 {
  color: white !important;
}

.hero-section .lead {
  color: rgba(255, 255, 255, 0.9);
  font-size: 1.25rem;
  margin-bottom: 3rem;
}

/* Section Padding */
.section-padding {
  padding: 5rem 0;
}

.section-padding-sm {
  padding: 3rem 0;
}

/* Card Styles */
.card {
  border: 1px solid var(--border-color);
  border-radius: var(--border-radius-lg);
  box-shadow: var(--shadow-sm);
  transition: var(--transition);
  background: white;
}

.feature-card {
  transition: var(--transition);
  border: 1px solid var(--border-color);
  height: 100%;
}

.feature-card:hover {
  transform: translateY(-5px);
  box-shadow: var(--shadow-lg);
  border-color: rgba(30, 64, 175, 0.2);
}

.module-card {
  background: white;
  border: 1px solid var(--border-color);
  border-radius: var(--border-radius-lg);
  padding: 2rem;
  transition: var(--transition);
  height: 100%;
  text-decoration: none;
  color: inherit;
}

.module-card:hover {
  transform: translateY(-8px);
  box-shadow: var(--shadow-lg);
  border-color: var(--primary-color);
  text-decoration: none;
  color: inherit;
}

.module-card .card-icon {
  width: 64px;
  height: 64px;
  background: rgba(30, 64, 175, 0.1);
  border-radius: var(--border-radius);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 1.5rem;
}

.module-card .card-icon i {
  font-size: 2rem;
  color: var(--primary-color);
}

/* Problem/Solution Cards */
.problem-card {
  text-align: center;
  padding: 2rem 1rem;
}

.problem-icon {
  width: 80px;
  height: 80px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 1.5rem;
}

.problem-icon.danger {
  background: rgba(220, 38, 38, 0.1);
}

.problem-icon.warning {
  background: rgba(245, 158, 11, 0.1);
}

.problem-icon.info {
  background: rgba(59, 130, 246, 0.1);
}

.problem-icon.success {
  background: rgba(34, 197, 94, 0.1);
}

.problem-icon i {
  font-size: 2rem;
}

.text-danger i {
  color: #dc2626;
}

.text-warning i {
  color: #f59e0b;
}

.text-info i {
  color: #3b82f6;
}

.text-success i {
  color: #22c55e;
}

/* Gradient Text */
.text-gradient {
  background: linear-gradient(135deg, var(--primary-color) 0%, var(--primary-dark) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  display: inline-block;
}

/* Background Variants */
.bg-gradient-primary {
  background: linear-gradient(135deg, var(--primary-color) 0%, var(--primary-dark) 100%);
}

.bg-light-gray {
  background-color: #f8fafc;
}

/* Form Styles */
.form-control {
  border: 2px solid var(--border-color);
  border-radius: var(--border-radius);
  padding: 0.75rem 1rem;
  transition: var(--transition);
  font-size: 1rem;
}

.form-control:focus {
  border-color: var(--primary-color);
  box-shadow: 0 0 0 0.2rem rgba(30, 64, 175, 0.1);
}

.form-label {
  font-weight: 600;
  color: var(--dark-color);
  margin-bottom: 0.5rem;
}

/* Footer */
.footer {
  background-color: var(--dark-color);
  color: rgba(255, 255, 255, 0.8);
  padding: 3rem 0 2rem;
  margin-top: 5rem;
}

.footer a {
  color: rgba(255, 255, 255, 0.8);
  text-decoration: none;
  transition: var(--transition);
}

.footer a:hover {
  color: white;
  text-decoration: none;
}

/* Utilities */
.text-muted {
  color: var(--secondary-color) !important;
}

.border-0 {
  border: none !important;
}

.shadow-sm {
  box-shadow: var(--shadow-sm) !important;
}

.shadow {
  box-shadow: var(--shadow) !important;
}

.shadow-lg {
  box-shadow: var(--shadow-lg) !important;
}

/* Fixed Top Spacing for different viewport sizes */
.page-top-spacing {
  padding-top: 2rem;
}


/* Responsive Design */
@media (min-width: 1800px) {
  /* Large displays like 1920x1200 and above */
  .page-top-spacing {
    padding-top: 2rem;
  }
  
  .navbar {
    padding: 1.2rem 0;
  }
  
  .navbar.scrolled {
    padding: 0.8rem 0;
  }
}

@media (min-width: 1600px) and (max-width: 1799px) {
  /* Laptops and displays like 1920x1200 */
  .page-top-spacing {
    padding-top: 2rem;
  }
  
  .navbar {
    padding: 1.1rem 0;
  }
  
  .navbar.scrolled {
    padding: 0.75rem 0;
  }
}

@media (min-width: 1200px) and (max-width: 1599px) {
  /* Standard desktop displays */
  .page-top-spacing {
    padding-top: 2rem;
  }
}

@media (max-width: 1199px) {
  /* Tablets and smaller */
  .page-top-spacing {
    padding-top: 1.5rem;
  }
  
  main {
    padding-top: 70px;
  }
}

@media (max-width: 768px) {
  main {
    padding-top: 66px;
  }
  
  .hero-section {
    min-height: auto;
    padding: 2rem 0;
  }
  
  .hero-section .display-2 {
    font-size: 2.5rem;
  }
  
  .section-padding {
    padding: 3rem 0;
  }
  
  .btn {
    width: 100%;
    margin-bottom: 1rem;
  }
  
  .page-top-spacing {
    padding-top: 60px;
  }
  
  .btn:last-child {
    margin-bottom: 0;
  }
}

/* Animation Classes */
.fade-in {
  opacity: 0;
  transform: translateY(30px);
  transition: all 0.8s ease;
}

.fade-in.visible {
  opacity: 1;
  transform: translateY(0);
}

/* Focus States for Accessibility */
.btn:focus, 
.btn:active:focus, 
.btn-link.nav-link:focus, 
.form-control:focus, 
.form-check-input:focus {
  box-shadow: 0 0 0 0.2rem rgba(30, 64, 175, 0.25);
  outline: none;
}

/* Custom Scrollbar */
::-webkit-scrollbar {
  width: 8px;
}

::-webkit-scrollbar-track {
  background: var(--light-color);
}

::-webkit-scrollbar-thumb {
  background: var(--secondary-color);
  border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
  background: var(--primary-color);
}

/* Image Modal Styles */
.modal-image {
  cursor: zoom-in;
  transition: var(--transition);
  display: inline-block;
  max-width: 100%;
  height: auto;
}

.modal-image:hover {
  opacity: 0.9;
  transform: scale(1.02);
}

#imageModal {
  display: none;
  position: fixed;
  z-index: 9999;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  overflow: auto;
  background-color: rgba(0, 0, 0, 0.95);
  animation: modalFadeIn 0.3s ease;
}

@keyframes modalFadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

#imageModal .modal-content {
  position: relative;
  margin: auto;
  display: block;
  max-width: 90%;
  max-height: 90vh;
  margin-top: 5vh;
  animation: modalZoomIn 0.3s ease;
}

@keyframes modalZoomIn {
  from { transform: scale(0.8); opacity: 0; }
  to { transform: scale(1); opacity: 1; }
}

#imageModal .modal-close {
  position: absolute;
  top: 20px;
  right: 35px;
  color: #f1f1f1;
  font-size: 40px;
  font-weight: bold;
  transition: 0.3s;
  cursor: pointer;
  z-index: 10000;
}

#imageModal .modal-close:hover,
#imageModal .modal-close:focus {
  color: #fff;
  text-decoration: none;
}

#imageModal .modal-caption {
  margin: auto;
  display: block;
  width: 80%;
  max-width: 700px;
  text-align: center;
  color: #ccc;
  padding: 20px 0;
  font-size: 18px;
}

/* Mobile adjustments for modal */
@media (max-width: 768px) {
  #imageModal .modal-content {
    max-width: 100%;
    margin-top: 60px;
  }
  
  #imageModal .modal-close {
    top: 10px;
    right: 20px;
    font-size: 35px;
  }
  
  #imageModal .modal-caption {
    font-size: 16px;
    padding: 15px 20px;
  }
}