/* ═══════════════════════════════════════════════════════════════
   ARATCO Camp Operations — Global Design System (style.css)
   Contains: Variables, Resets, Utilities, Navigation, Core UI
   ═══════════════════════════════════════════════════════════════ */

/* ── 1. CSS Variables & Reset ───────────────────────────────── */
:root {
  /* Brand Palette */
  --navy:        #1B3A6B;
  --navy-dark:   #0D2141;
  --navy-light:  #2563EB;
  --gold:        #FFD600;
  --gold-dark:   #EAB308;
  
  /* UI Colors */
  --bg:          #F8FAFC;
  --off:         #F1F5F9;
  --white:       #FFFFFF;
  --text:        #1E293B;
  --muted:       #64748B;
  --border:      #E2E8F0;
  --border-dark: #CBD5E1;
  
  /* Semantic */
  --success:     #10B981;
  --success-bg:  #DCFCE7;
  --danger:      #EF4444;
  --danger-bg:   #FEF2F2;
  --warning:     #F59E0B;

  /* Geometry */
  --r-sm:        6px;
  --r-md:        10px;
  --r-lg:        16px;
  --r-xl:        24px;
  --container:   1200px;
  --shadow-sm:   0 2px 4px rgba(0,0,0,0.05);
  --shadow-md:   0 10px 25px -5px rgba(0,0,0,0.08);
  
  /* Fonts */
  --font-head:   'Outfit', sans-serif;
  --font-body:   'Plus Jakarta Sans', sans-serif;
}

* { margin: 0; padding: 0; box-sizing: border-box; }

html { scroll-behavior: smooth; font-size: 16px; }

body {
  font-family: var(--font-body);
  background-color: var(--bg);
  color: var(--text);
  line-height: 1.6;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

main { flex: 1; display: flex; flex-direction: column; }

.container {
  width: 90%;
  max-width: var(--container);
  margin: 0 auto;
}

/* ── 2. Global Utilities (Tailwind Inspired) ────────────────── */

/* Backgrounds */
.bg-off { background-color: var(--off); }
.bg-grad-navy { background: linear-gradient(135deg, var(--navy) 0%, #2563EB 100%); }
.bg-grad-green { background: linear-gradient(135deg, #047857 0%, #10B981 100%); }

/* Typography */
.text-4xl { font-size: 2.5rem !important; }
.text-2xl { font-size: 1.5rem !important; }
.text-sm { font-size: 0.95rem !important; }
.text-body-lg { font-size: 1.05rem; line-height: 1.7; color: var(--text); }
.text-body { color: var(--text); }
.text-navy { color: var(--navy); }
.text-muted { color: var(--muted); }
.text-orange { color: #D97706; }
.text-red { color: #DC2626; }
.text-gray { color: #4B5563; }
.text-blue { color: #3B82F6; }
.text-green { color: #10B981; }
.text-blue-dark { color: #1E3A8A; }
.text-red-dark { color: #991B1B; }
.text-orange-dark { color: #92400E; }
.text-green-dark { color: #064E3B; }
.text-orange-medium { color: #B45309; }

.font-medium { font-weight: 500; }
.font-semibold { font-weight: 600; }
.block { display: block; }

/* Structural Typography Elements */
.intro-text { font-size: 1.1rem; color: var(--navy); font-weight: 500; margin-bottom: 25px; line-height: 1.6; }
.muted-subtitle { color: var(--muted); margin-bottom: 15px; }
.hero-sub-text { font-size: 1.1rem; opacity: 0.9; max-width: 600px; margin: 0 auto; }
.tag-glass { background: rgba(255, 255, 255, 0.15) !important; border: 1px solid rgba(255,255,255,0.2) !important; }
.waste-list { padding-left: 20px; color: var(--text); line-height: 1.7; margin-bottom: 25px; }

/* Spacing */
.mb-0 { margin-bottom: 0 !important; }
.mb-4 { margin-bottom: 4px; }
.mb-15 { margin-bottom: 15px; }
.mb-20 { margin-bottom: 20px; }
.mb-25 { margin-bottom: 25px; }
.mb-30 { margin-bottom: 30px; }
.mt-10 { margin-top: 10px; }
.mt-20 { margin-top: 20px; }
.mt-30 { margin-top: 30px; }
.p-15 { padding: 15px; }
.p-25 { padding: 25px; }

/* Flexbox & Layout */
.flex { display: flex; }
.flex-wrap { flex-wrap: wrap; }
.flex-col-center { display: flex; flex-direction: column; justify-content: center; }
.flex-center { display: flex; align-items: center; justify-content: center; }
.items-center { align-items: center; }
.items-start { align-items: flex-start; }
.items-stretch { align-items: stretch; }
.content-flex-reverse { flex-direction: row-reverse; }

.flex-0-7 { flex: 0.7; }
.flex-0-8 { flex: 0.8; }
.flex-1 { flex: 1; }
.flex-1-5 { flex: 1.5; }
.flex-2 { flex: 2; }
.self-start { align-self: flex-start; }

.gap-10 { gap: 10px; }
.gap-15 { gap: 15px; }
.gap-20 { gap: 20px; }

/* Dimensions & Opacity */
.min-w-150 { min-width: 150px; }
.min-w-200 { min-width: 200px; }
.min-w-250 { min-width: 250px; }
.max-h-250 { max-height: 250px; }
.max-h-300 { max-height: 300px; }
.opacity-50 { opacity: 0.5; }

/* Borders & Edges */
.border-green { border-left-color: #10B981 !important; border-color: #10B981 !important; }
.border-blue { border-left-color: #3B82F6 !important; border-color: #3B82F6 !important; }
.border-yellow { border-left-color: #EAB308 !important; border-color: #EAB308 !important; }
.border-red { border-left-color: #EF4444 !important; border-color: #EF4444 !important; }
.border-t-orange { border-top-color: #D97706 !important; }
.border-t-red { border-top-color: #DC2626 !important; }
.border-t-gray { border-top-color: #4B5563 !important; }
.border-t-blue { border-top-color: #3B82F6 !important; }
.border-t-green { border-top-color: #10B981 !important; }
.border-b-blue { border-bottom-color: #3B82F6 !important; }
.border-b-yellow { border-bottom-color: #EAB308 !important; }
.border-b-green { border-bottom-color: #10B981 !important; }
.border-b-red { border-bottom-color: #EF4444 !important; }
.border-b-purple { border-bottom-color: #8B5CF6 !important; }
.border-b-orange { border-bottom-color: #F97316 !important; }

/* Structural Page Wrappers */
.training-container { max-width: 1200px; margin-top: -60px; position: relative; z-index: 10; padding-bottom: 60px; }
.ops-container { margin-top: 40px; margin-bottom: 80px; }

/* ── 3. Navigation ─────────────────────────────────────────── */
.navbar {
  height: 80px;
  background: var(--white);
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 0;
  z-index: 1000;
  display: flex;
  align-items: center;
  transition: all 0.3s ease;
}

.nav-inner {
  display: flex;
  justify-content: space-between;
  align-items: center;
  width: 100%;
}

.nav-brand {
  display: flex;
  align-items: center;
  text-decoration: none;
  gap: 12px;
}

.nav-logo {
  height: 50px;
  width: auto;
  object-fit: contain;
}

.nav-links {
  display: flex;
  gap: 30px;
  align-items: center;
}

.nav-link {
  text-decoration: none;
  color: var(--muted);
  font-weight: 600;
  font-size: 0.95rem;
  transition: color 0.2s;
  background: none;
  border: none;
  font-family: inherit;
  cursor: pointer;
}

.nav-link:hover, .nav-link.active {
  color: var(--navy);
}

.nav-logout { color: var(--danger) !important; font-weight: 700 !important; }

.lang-btn { background: transparent; border: none; cursor: pointer; font-weight: 600; color: var(--muted); font-size: 0.95rem; font-family: var(--font-head); transition: color 0.2s; }
.lang-btn:hover { color: var(--navy); }
.lang-btn.active-lang { color: var(--navy); font-weight: 800; }
.text-border-dark { color: var(--border-dark); }

.hamburger {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  padding: 5px;
}

.hamburger span {
  display: block;
  width: 25px;
  height: 2px;
  background: var(--navy);
  margin: 5px 0;
  transition: 0.3s;
}

/* ── 4. Core Hero Defaults ─────────────────────────────────── */
.hero {
  padding: 100px 0 120px;
  color: var(--white);
  text-align: center;
  position: relative;
  overflow: hidden;
}

.hero-inner {
  max-width: 800px;
  margin: 0 auto;
}

.hero-tag {
  display: inline-block;
  padding: 8px 18px;
  background: rgba(255,255,255,0.1);
  backdrop-filter: blur(5px);
  border-radius: 30px;
  font-size: 0.85rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1px;
  margin-bottom: 25px;
}

.hero h1 {
  font-family: var(--font-head);
  font-size: clamp(2.5rem, 5vw, 4rem);
  font-weight: 800;
  line-height: 1.1;
  margin-bottom: 20px;
}

.hero p {
  font-size: 1.2rem;
  opacity: 0.9;
  margin-bottom: 40px;
  max-width: 600px;
  margin-left: auto;
  margin-right: auto;
}

.hero-actions {
  display: flex;
  gap: 15px;
  justify-content: center;
  flex-wrap: wrap;
}

/* ── 5. Buttons ────────────────────────────────────────────── */
.btn {
  display: inline-flex;
  align-items: center;
  padding: 14px 28px;
  border-radius: var(--r-md);
  font-weight: 700;
  text-decoration: none;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  font-family: var(--font-head);
  cursor: pointer;
}

.btn-primary {
  background: var(--gold);
  color: var(--navy-dark);
  box-shadow: 0 4px 15px rgba(255, 214, 0, 0.3);
}

.btn-primary:hover {
  background: var(--gold-dark);
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(255, 214, 0, 0.4);
}

.btn-outline {
  background: transparent;
  border: 2px solid var(--white);
  color: var(--white);
}

.btn-outline:hover {
  background: var(--white);
  color: var(--navy);
  transform: translateY(-2px);
}

/* ── 6. Global Structural Grids ────────────────────────────── */
.section { padding: 80px 0; }

.section-title {
  font-family: var(--font-head);
  font-size: 2.2rem;
  font-weight: 800;
  color: var(--navy);
  margin-bottom: 40px;
  text-align: center;
}

/* Stats Strip (Home) */
.stats-strip {
  background: var(--white);
  padding: 30px 0;
  border-bottom: 1px solid var(--border);
  margin-top: -40px;
  position: relative;
  z-index: 5;
  border-radius: var(--r-lg);
  box-shadow: var(--shadow-md);
  width: 95%;
  max-width: 1100px;
  margin-left: auto;
  margin-right: auto;
}

.stats-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px; }
.stat-item { text-align: center; padding: 0 15px; }
.stat-item:not(:last-child) { border-right: 1px solid var(--border); }
.stat-label { display: block; font-size: 0.8rem; color: var(--muted); text-transform: uppercase; font-weight: 700; margin-bottom: 5px; }
.stat-val { display: block; font-family: var(--font-head); font-size: 1.1rem; color: var(--navy); font-weight: 800; }

/* Homepage Grids */
.module-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 25px; }
.guide-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 30px; }

/* Module Cards */
.mod-card {
  background: var(--white);
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  border-radius: var(--r-lg);
  text-decoration: none;
  color: var(--white);
  border: 1px solid var(--border);
  transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  justify-content: flex-end;
  text-align: left;
  min-height: 280px;
  position: relative;
  overflow: hidden;
}

.mod-card-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(0, 0, 0, 0.2) 0%, rgba(0, 0, 0, 0.6) 100%);
  z-index: 1;
  transition: background 0.3s ease;
}

.mod-card:hover .mod-card-overlay {
  background: linear-gradient(180deg, rgba(0, 0, 0, 0.3) 0%, rgba(0, 0, 0, 0.75) 100%);
}

.mod-card-content {
  position: relative;
  z-index: 2;
  padding: 25px;
  display: flex;
  flex-direction: column;
  width: 100%;
}

.mod-card:hover { 
  transform: translateY(-10px); 
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.3);
  border-color: var(--navy-light);
}

.mod-card:hover .mod-card-content h3 {
  color: var(--gold);
}

.mod-card h3 { 
  font-family: var(--font-head); 
  font-size: 1.3rem; 
  color: var(--white); 
  margin: 0 0 12px 0; 
  transition: color 0.3s ease;
  font-weight: 600;
}

.mod-card p { 
  font-size: 0.95rem; 
  color: rgba(255, 255, 255, 0.85); 
  margin: 0 0 20px 0; 
  flex-grow: 1;
  line-height: 1.5;
}

.mod-action { 
  font-weight: 700; 
  color: var(--gold); 
  font-size: 0.9rem;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  transition: all 0.3s ease;
}

.mod-card:hover .mod-action {
  color: var(--white);
  gap: 10px;
}

.mod-soon { 
  background: rgba(255, 255, 255, 0.2); 
  color: rgba(255, 255, 255, 0.7); 
  padding: 6px 14px; 
  border-radius: 20px; 
  font-size: 0.75rem; 
  display: inline-block;
  margin-top: 5px;
}

.mod-card.anim-up .mod-card-overlay {
  animation: fadeInOverlay 0.6s ease-out forwards;
}

@keyframes fadeInOverlay {
  from { opacity: 0; }
  to { opacity: 1; }
}

/* Guide Cards */
.guide-card {
  background: var(--white);
  border-radius: var(--r-lg);
  overflow: hidden;
  border: 1px solid var(--border);
  transition: all 0.3s ease;
  text-decoration: none;
  display: block;
}

.guide-card:hover { transform: translateY(-5px); box-shadow: var(--shadow-md); }
.guide-card img { width: 100%; height: 200px; object-fit: cover; }
.guide-card h3 { padding: 20px 20px 10px; font-family: var(--font-head); color: var(--navy); }
.guide-card p { padding: 0 20px 20px; font-size: 0.9rem; color: var(--muted); }
.read-link { display: block; padding: 15px 20px; border-top: 1px solid var(--border); color: var(--navy-light); font-weight: 700; }

/* Operations Layout Wrapper */
.ops-layout { display: flex; gap: 30px; }
.ops-main { flex: 1; }
.ops-sidebar {
  flex: 0 0 280px;
  background: var(--white);
  padding: 20px;
  border-radius: var(--r-lg);
  border: 1px solid var(--border);
  height: fit-content;
  position: sticky;
  top: 100px;
}
.sidebar-title { font-family: var(--font-head); font-size: 0.85rem; text-transform: uppercase; color: var(--muted); letter-spacing: 1px; margin-bottom: 20px; }
.ops-tab { display: flex; align-items: center; gap: 12px; padding: 12px 15px; text-decoration: none; color: var(--text); font-weight: 600; border-radius: var(--r-sm); margin-bottom: 8px; transition: all 0.2s; }
.ops-tab.active { background: var(--navy); color: var(--white); }
.ops-tab:not(.active):hover { background: var(--off); }

/* ── 7. Animations ─────────────────────────────────────────── */
.anim-up {
  opacity: 0;
  transform: translateY(30px);
  animation: slideUp 0.6s cubic-bezier(0.23, 1, 0.32, 1) forwards;
}

.delay-100 { animation-delay: 0.1s; }
.delay-200 { animation-delay: 0.2s; }
.delay-300 { animation-delay: 0.3s; }
.delay-400 { animation-delay: 0.4s; }
.delay-500 { animation-delay: 0.5s; }

@keyframes slideUp {
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* ── 8. Footer ─────────────────────────────────────────────── */
.site-footer {
  background: var(--navy-dark);
  color: rgba(255,255,255,0.7);
  padding: 60px 0;
  margin-top: auto;
}

.footer-inner {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 30px;
}

.footer-logo img,
.footer-logo img[loading="lazy"] {
  height: 40px;
  width: auto;
  display: block;
  background: transparent !important;
  animation: none !important;
  transition: none !important;
  transform: none !important;
  filter: none !important;
  box-shadow: none !important;
  opacity: 1 !important;
}

/* ── 9. Global Responsive Queries ──────────────────────────── */

/* Tablet & Smaller Desktops */
@media (max-width: 992px) {
  .module-grid, .guide-grid { grid-template-columns: repeat(2, 1fr); }
  .stats-grid { grid-template-columns: repeat(2, 1fr); }
  .stat-item:nth-child(2) { border-right: none; }
  .ops-layout { flex-direction: column; }
  .ops-sidebar { 
    flex: none !important; 
    width: 100% !important; 
    position: static !important; 
    margin-bottom: 30px; 
    display: none; /* Controlled by mobile tabs logic if active */
  }
  .hero { padding: 80px 0; }
}

/* Mobile Devices */
@media (max-width: 768px) {
  .nav-links { display: none; }
  
  .nav-links.open {
    display: flex;
    flex-direction: column;
    position: absolute;
    top: 80px;
    left: 0;
    width: 100%;
    background: var(--white);
    padding: 20px;
    box-shadow: 0 10px 15px -3px rgba(0,0,0,0.1);
    border-top: 1px solid var(--border);
  }
  
  .hamburger { display: block; }
  
  .hamburger.open span:nth-child(1) { transform: rotate(45deg) translate(5px, 5px); }
  .hamburger.open span:nth-child(2) { opacity: 0; }
  .hamburger.open span:nth-child(3) { transform: rotate(-45deg) translate(5px, -5px); }
  
  .module-grid, .guide-grid { grid-template-columns: 1fr; }
  .stats-strip { margin-top: -20px; padding: 20px 0; }
  .stat-item { border-right: none !important; border-bottom: 1px solid var(--border); padding: 15px 0; }
  .stat-item:last-child { border-bottom: none; }
  
  .hero h1 { font-size: 2.2rem; }
  .hero p { font-size: 1rem; }
  .text-4xl { font-size: 2rem !important; }
  
  .section { padding: 50px 0; }
}