/* Import Inter font */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700&display=swap');

/* Atlassian Design System CSS Variables */
:root {
    /* Font */
    --app-font-family: 'Inter', system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', SegoeUI, 'Helvetica Neue', Arial, sans-serif;
    
    /* Colors (HSL format) */
    --background: 0 0% 100%; /* #FFFFFF */
    --foreground: 215 25% 27%; /* #172B4D */
    --primary: 214 100% 40%; /* #0052CC - Atlassian Blue */
    --primary-foreground: 0 0% 100%;
    --secondary: 220 13% 91%; /* #DFE1E6 */
    --secondary-foreground: 215 16% 47%; /* #42526E */
    --muted: 220 9% 96%; /* #F4F5F7 */
    --muted-foreground: 215 16% 47%; /* #42526E */
    --accent: 220 9% 96%; /* #F4F5F7 */
    --accent-foreground: 215 25% 27%;
    --border: 220 13% 91%; /* #DFE1E6 */
    
    /* Spacing (4px base unit) */
    --spacing-1: 0.25rem; /* 4px */
    --spacing-2: 0.5rem; /* 8px */
    --spacing-3: 0.75rem; /* 12px */
    --spacing-4: 1rem; /* 16px */
    --spacing-5: 1.25rem; /* 20px */
    --spacing-6: 1.5rem; /* 24px */
    
    /* Border radius */
    --radius: 0.1875rem; /* 3px */
    --radius-md: 0.25rem; /* 4px */
    
    /* Shadows */
    --shadow-sm: 0 1px 1px rgba(9, 30, 66, 0.13), 0 0 1px rgba(9, 30, 66, 0.13);
    --shadow: 0 1px 1px rgba(9, 30, 66, 0.13), 0 0 1px rgba(9, 30, 66, 0.13);
    --shadow-md: 0 4px 8px -2px rgba(9, 30, 66, 0.13), 0 0 1px rgba(9, 30, 66, 0.13);
    --shadow-lg: 0 8px 16px -4px rgba(9, 30, 66, 0.13), 0 0 1px rgba(9, 30, 66, 0.13);
}

html {
  font-size: 14px; /* Atlassian default */
  scroll-behavior: smooth;
  position: relative;
  min-height: 100%;
}

@media (min-width: 768px) {
  html {
    font-size: 14px; /* Keep Atlassian standard */
  }
}

body {
  margin-bottom: 0;
  font-family: var(--app-font-family);
  font-size: 0.875rem; /* 14px */
  line-height: 1.42857; /* 20px line height for 14px text */
  color: hsl(var(--foreground));
  background-color: hsl(var(--background));
  font-weight: 400;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

.btn:focus, .btn:active:focus, .btn-link.nav-link:focus, .form-control:focus, .form-check-input:focus {
  box-shadow: 0 0 0 0.1rem white, 0 0 0 0.25rem hsl(var(--primary));
}

/* Hero Section - Atlassian Blue */
.hero-section {
  background: linear-gradient(135deg, hsl(var(--primary)) 0%, #003d99 100%);
  position: relative;
  overflow: hidden;
}

.hero-logo {
  object-fit: contain;
  transition: transform 0.3s ease;
}

.hero-logo:hover {
  transform: scale(1.1);
}

.hero-section::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: url('data:image/svg+xml,<svg width="100" height="100" xmlns="http://www.w3.org/2000/svg"><rect width="100" height="100" fill="none"/><path d="M0 50 L100 50 M50 0 L50 100" stroke="rgba(255,255,255,0.1)" stroke-width="1"/></svg>');
  opacity: 0.3;
}

.hero-section .container {
  position: relative;
  z-index: 1;
}

/* Module Cards */
.module-card {
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  border: none;
}

.module-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 0.5rem 1rem rgba(0, 0, 0, 0.15) !important;
}

.module-icon {
  display: flex;
  align-items: center;
  justify-content: center;
}

/* Feature Items */
.feature-item {
  padding: 1.5rem;
}

.feature-icon {
  display: flex;
  align-items: center;
  justify-content: center;
}

/* Architecture Diagram */
.architecture-diagram {
  border: 2px solid #e9ecef;
}

.arch-layer {
  transition: all 0.3s ease;
}

.arch-arrow {
  color: #6c757d;
}

/* Custom Scrollbar */
::-webkit-scrollbar {
  width: 10px;
}

::-webkit-scrollbar-track {
  background: #f1f1f1;
}

::-webkit-scrollbar-thumb {
  background: #0d6efd;
  border-radius: 5px;
}

::-webkit-scrollbar-thumb:hover {
  background: #0a58ca;
}

/* Navigation Enhancements - Atlassian Style */
.navbar {
  background-color: hsl(var(--background)) !important;
  border-bottom: 1px solid hsl(var(--border));
  padding: var(--spacing-2) var(--spacing-4);
  min-height: 3.5rem;
  box-shadow: none;
}

.navbar-brand {
  font-size: 1rem; /* 16px */
  font-weight: 600;
  color: hsl(var(--foreground)) !important;
  letter-spacing: -0.01em;
  line-height: 1.5;
  text-decoration: none;
  transition: opacity 0.2s ease;
}

.navbar-brand:hover {
  opacity: 0.8;
}

.navbar-logo {
  object-fit: contain;
  transition: transform 0.2s ease;
}

.navbar-brand:hover .navbar-logo {
  transform: scale(1.05);
}

.navbar-dark .navbar-brand {
  color: white !important;
}

.nav-link {
  color: hsl(var(--muted-foreground)) !important;
  font-weight: 500;
  padding: var(--spacing-2) var(--spacing-3);
  border-radius: var(--radius); /* 3px */
  transition: all 0.1s ease;
  font-size: 0.875rem; /* 14px */
  line-height: 1.42857;
}

.navbar-dark .nav-link {
  color: rgba(255, 255, 255, 0.85) !important;
}

.nav-link:hover {
  background-color: hsl(var(--accent));
  color: hsl(var(--accent-foreground)) !important;
}

.navbar-dark .nav-link:hover {
  background-color: rgba(255, 255, 255, 0.1);
  color: rgba(255, 255, 255, 1) !important;
}

.nav-link.active {
  background-color: hsl(var(--primary));
  color: hsl(var(--primary-foreground)) !important;
  font-weight: 600;
}

/* Dropdown Menu Styling */
.dropdown-menu .dropdown-item {
  transition: background-color 0.2s ease;
}

.dropdown-menu .dropdown-item .bi-chevron-right {
  opacity: 0.6;
  font-size: 0.75rem;
  transition: opacity 0.2s ease, transform 0.2s ease;
}

.dropdown-menu .dropdown-item:hover .bi-chevron-right {
  opacity: 1;
  transform: translateX(3px);
}

/* Navbar Button Styling */
.navbar .btn {
  white-space: nowrap;
  font-size: 0.875rem;
}

.navbar .btn-outline-light {
  border-color: rgba(255, 255, 255, 0.5);
  color: white;
}

.navbar .btn-outline-light:hover {
  background-color: rgba(255, 255, 255, 0.1);
  border-color: white;
  color: white;
}

.navbar .btn-light:hover {
  background-color: rgba(255, 255, 255, 0.9);
}

/* Card Enhancements - Atlassian Style */
.card {
  transition: all 0.2s ease;
  border: 1px solid hsl(var(--border));
  border-radius: var(--radius-md); /* 4px */
  box-shadow: var(--shadow);
  background-color: hsl(var(--card));
  color: hsl(var(--card-foreground));
}

.card:hover {
  box-shadow: var(--shadow-md);
}

.card-header {
  background-color: hsl(var(--muted));
  border-bottom: 1px solid hsl(var(--border));
  font-weight: 600;
  font-size: 0.875rem;
  padding: var(--spacing-3) var(--spacing-4);
}

/* Section Spacing */
section {
  scroll-margin-top: 80px;
}

/* Footer - Atlassian Style */
footer {
  margin-top: auto;
  background-color: hsl(var(--muted));
  border-top: 1px solid hsl(var(--border));
  padding: var(--spacing-6) 0;
}

footer a:hover {
  color: hsl(var(--primary)) !important;
  text-decoration: none;
}

footer.bg-dark {
  background-color: #1D2125 !important;
  color: white;
}

footer.bg-dark a {
  color: rgba(255, 255, 255, 0.72);
}

/* Code Blocks */
code {
  background-color: #f8f9fa;
  padding: 0.2rem 0.4rem;
  border-radius: 0.25rem;
  font-size: 0.875em;
  color: #e83e8c;
}

/* Responsive Adjustments */
@media (max-width: 768px) {
  .hero-section {
    padding: 3rem 0 !important;
  }
  
  .hero-section h1 {
    font-size: 2rem;
  }
  
  .hero-section .lead {
    font-size: 1rem;
  }
}

/* Form Enhancements */
.form-floating > .form-control-plaintext::placeholder, .form-floating > .form-control::placeholder {
  color: var(--bs-secondary-color);
  text-align: end;
}

.form-floating > .form-control-plaintext:focus::placeholder, .form-floating > .form-control:focus::placeholder {
  text-align: start;
}

/* Breadcrumb Styling */
.breadcrumb {
  background-color: transparent;
  padding: 0.5rem 0;
  margin-bottom: 1.5rem;
}

.breadcrumb-item + .breadcrumb-item::before {
  content: ">";
  color: hsl(var(--muted-foreground));
  padding: 0 0.5rem;
}

.breadcrumb-item a {
  color: hsl(var(--primary));
  text-decoration: none;
}

.breadcrumb-item a:hover {
  text-decoration: underline;
}

.breadcrumb-item.active {
  color: hsl(var(--foreground));
}

/* SEO: Skip to main content link (hidden but accessible) */
.skip-to-main {
  position: absolute;
  top: -40px;
  left: 0;
  background: hsl(var(--primary));
  color: white;
  padding: 8px 16px;
  text-decoration: none;
  z-index: 100;
  border-radius: 0 0 4px 0;
}

.skip-to-main:focus {
  top: 0;
}

/* Animation Classes */
@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(30px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.fade-in-up {
  animation: fadeInUp 0.6s ease-out;
}