/* =========================================
   MINDER - MODERN DESIGN SYSTEM 2.0
   Slick, Professional, Mobile-First, i18n-Safe
   ========================================= */

:root {
  /* Brand Colors */
  --minder-teal: #367588;       
  --minder-teal-dark: #24515e;
  --minder-teal-light: #f0f9fa;
  --minder-gold: #d4af37;
  --minder-gold-dark: #b8860b;
  --minder-slate: #475569;      
  --minder-navy: #0f172a;       
  
  /* UI Colors */
  --primary: var(--minder-teal);
  --primary-hover: var(--minder-teal-dark);
  --secondary: var(--minder-slate);
  --success: #10b981;           
  --warning: #f59e0b;           
  --danger: #ef4444;            
  --info: #0ea5e9;              
  --light: #f8fafc;
  --dark: var(--minder-navy);
  --white: #ffffff;

  /* Surfaces & Borders */
  --surface: #ffffff;
  --surface-muted: #f1f5f9;
  --hairline: #e2e8f0;
  --hairline-dark: #cbd5e1;

  /* Design System Units */
  --radius-sm: 8px;
  --radius-md: 14px;
  --radius-lg: 24px;
  --radius-pill: 999px;

  /* Spacing */
  --container-max: 1200px;

  /* Shadows - Layered & Realistic */
  --shadow-sm: 0 1px 2px 0 rgb(0 0 0 / 0.05);
  --shadow-md: 0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.1);
  --shadow-lg: 0 10px 15px -3px rgb(0 0 0 / 0.1), 0 4px 6px -4px rgb(0 0 0 / 0.1);
  --shadow-xl: 0 20px 25px -5px rgb(0 0 0 / 0.1), 0 8px 10px -6px rgb(0 0 0 / 0.1);
  --shadow-inner: inset 0 2px 4px 0 rgb(0 0 0 / 0.05);

  /* Transitions */
  --transition-fast: 150ms cubic-bezier(0.4, 0, 0.2, 1);
  --transition-base: 250ms cubic-bezier(0.4, 0, 0.2, 1);
}

/* =========================================
   BASE STYLES & i18n SAFETY
   ========================================= */

html, body {
  height: 100%;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body {
  font-family: 'Inter', system-ui, -apple-system, sans-serif;
  background-color: var(--surface-muted);
  background-image: 
    radial-gradient(at 0% 0%, hsla(194, 43%, 37%, 0.03) 0, transparent 50%), 
    radial-gradient(at 100% 0%, hsla(194, 43%, 37%, 0.03) 0, transparent 50%);
  background-attachment: fixed;
  color: var(--dark);
  line-height: 1.6;
  overflow-x: hidden;
  display: flex;
  flex-direction: column;
}

/* Global i18n Safe Typography */
h1, h2, h3, h4, h5, h6, p, a, span, label, div {
  overflow-wrap: break-word;
  word-wrap: break-word;
  hyphens: auto;
}

h1, h2, h3, h4, h5, h6 {
  color: var(--dark);
  font-weight: 800;
  letter-spacing: -0.02em;
}

.text-gradient {
  background: linear-gradient(135deg, var(--minder-teal), var(--minder-navy));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

/* =========================================
   LAYOUT
   ========================================= */

.main-container {
  flex: 1 0 auto;
  width: 100%;
  max-width: var(--container-max);
  margin: 0 auto;
  padding: 2rem 1rem;
}

@media (max-width: 768px) {
  .main-container { padding: 1rem 0.75rem; }
}

/* =========================================
   COMPONENTS
   ========================================= */

/* Navbar - Modern & Glassy */
.navbar {
  background: rgba(255, 255, 255, 0.8) !important;
  backdrop-filter: blur(12px) saturate(180%);
  -webkit-backdrop-filter: blur(12px) saturate(180%);
  border-bottom: 1px solid var(--hairline);
  padding: 0.75rem 0;
  transition: var(--transition-base);
}

.navbar.scrolled {
  padding: 0.5rem 0;
  box-shadow: var(--shadow-md);
}

.nav-link {
  font-weight: 600;
  color: var(--dark) !important;
  padding: 0.5rem 1rem !important;
  border-radius: var(--radius-sm);
  transition: var(--transition-fast);
}

.nav-link:hover {
  background: var(--minder-teal-light);
  color: var(--primary) !important;
}

/* Slick Cards */
.card {
  background: var(--white);
  border: 1px solid var(--hairline);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-sm);
  transition: var(--transition-base);
}

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

.card-header {
  background: transparent;
  border-bottom: 1px solid var(--hairline-dark);
  padding: 1.25rem 1.5rem;
  font-weight: 700;
}

/* Interactive Buttons */
.btn {
  border-radius: var(--radius-md);
  font-weight: 700;
  padding: 0.75rem 1.5rem;
  transition: var(--transition-base);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  cursor: pointer;
  border: 2px solid transparent;
}

.btn-primary {
  background-color: var(--primary);
  color: var(--white);
  border-color: var(--primary);
  box-shadow: var(--shadow-sm);
}

.btn-primary:hover {
  background-color: var(--primary-hover);
  border-color: var(--primary-hover);
  transform: translateY(-1px);
  box-shadow: var(--shadow-md);
}

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

/* =========================================
   ANIMATIONS
   ========================================= */

.animate-fade-in {
  animation: fadeIn 0.5s ease-out;
}

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

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

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

/* i18n specific spacing adjustments */
[lang="hy"] body, [lang="ru"] body {
  /* Russian and Armenian can be ~20% longer, allow slightly more line height */
  line-height: 1.7;
}

/* Tooltip & Popper custom styling */
.tooltip {
  --bs-tooltip-bg: var(--minder-navy);
  --bs-tooltip-border-radius: var(--radius-sm);
}

/* =========================================
   HOLISTIC LAYERING & STICKY FIX
   ========================================= */

/* Ensure Navbar is ALWAYS on top of everything */
#mainNavbar.navbar.sticky-top {
  z-index: 1050 !important;
}

/* All other sticky elements (sidebars, headers) must be below Navbar */
.sticky-top:not(#mainNavbar) {
  z-index: 1020 !important;
  /* Default top offset for sidebars to prevent them from hitting the very top edge */
  top: 100px;
}

/* Mobile-friendly adjustments for sticky elements */
@media (max-width: 991.98px) {
  .sticky-top:not(#mainNavbar) {
    position: relative !important;
    top: 0 !important;
    z-index: 1 !important;
  }
}
