/* =========================
   RESET + BASE
========================= */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: 'Open Sans', sans-serif;
  line-height: 1.6;
  background-color: var(--light);
  color: var(--dark);
}

/* =========================
   THEME VARIABLES
========================= */
:root {
  --primary: #1e3a8a;
  --accent: #f97316;
  --dark: #0f172a;
  --light: #f8fafc;
  --gray: #64748b;
  --white: #ffffff;

  --radius: 8px;
  --transition: 0.3s ease;
}

/* =========================
   TYPOGRAPHY
========================= */
 h1 {
  font-family: 'Montserrat', sans-serif;
  font-weight: 700;
  color: var(--white);
  line-height: 1.3;
}
 h2, h3, h4, h5 {
  font-family: 'Montserrat', sans-serif;
  font-weight: 700;
  color: var(--dark);
  line-height: 1.3;
}

h1 { font-size: 2.5rem; }
h2 { font-size: 2rem; }
h3 { font-size: 1.5rem; }

p {
  font-size: 1rem;
  color: var(--gray);
  margin-bottom: 10px; /* FIX spacing */
}

a {
  text-decoration: none;
  color: inherit;
}

/* =========================
   LAYOUT SYSTEM
========================= */
.container {
  width: 90%;
  max-width: 1200px;
  margin: auto;
}

.section {
  padding: 70px 0; /* slightly improved spacing */
}

.section-light {
  background-color: var(--light);
}

.section-dark {
  background-color: var(--dark);
  color: var(--white);
}

/* =========================
   FLEX + GRID HELPERS
========================= */
.flex {
  display: flex;
  align-items: center;
}

.flex-between {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.grid {
  display: grid;
  gap: 20px;
}

/* =========================
   BUTTON SYSTEM
========================= */
.btn {
  display: inline-block;
  padding: 10px 20px;
  border-radius: var(--radius);
  font-size: 0.9rem;
  font-weight: 600;
  transition: var(--transition);
}

.btn-primary {
  background-color: var(--primary);
  color: var(--white);
}

.btn-primary:hover {
  background-color: #172554;
}

.btn-accent {
  background-color: var(--accent);
  color: var(--white);
}

.btn-accent:hover {
  background-color: #ea580c;
}

/* NEW: Outline button (used in hero) */
.btn-outline {
  border: 1px solid var(--white);
  color: var(--white);
}

.btn-outline:hover {
  background: var(--white);
  color: var(--dark);
}

/* =========================
   CARD SYSTEM
========================= */
.card {
  background-color: var(--white);
  padding: 20px;
  border-radius: var(--radius);
  box-shadow: 0 5px 20px rgba(0, 0, 0, 0.05);
  transition: var(--transition);
}

.card:hover {
  transform: translateY(-5px);
}

/* =========================
   IMAGE HANDLING
========================= */
img {
  width: 100%;
  display: block;
}

/* =========================
   SPACING UTILITIES
========================= */
.mt-1 { margin-top: 10px; }
.mt-2 { margin-top: 20px; }
.mt-3 { margin-top: 30px; }

.mb-1 { margin-bottom: 10px; }
.mb-2 { margin-bottom: 20px; }
.mb-3 { margin-bottom: 30px; }

/* =========================
   TEXT UTILITIES
========================= */
.text-center {
  text-align: center;
}

.text-white {
  color: var(--white);
}

/* NEW: Section Title Helper */
.section-title {
  text-align: center;
  margin-bottom: 40px;
}

.section-title h2 {
  margin-bottom: 10px;
}

.section-title p {
  max-width: 600px;
  margin: auto;
}

/* =========================
   LOADER
========================= */
#loader {
  position: fixed;
  inset: 0;
  background: #0f172a;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 9999;
  transition: opacity 0.5s ease, visibility 0.5s;
}

/* Hide */
#loader.hidden {
  opacity: 0;
  visibility: hidden;
}

/* CENTER CONTENT */
.loader-content {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}

/* LOGO */
.loader-content img {
  width: 80px;
  margin-bottom: 20px;
}

/* TEXT */
.loader-content p {
  color: #ccc;
  font-size: 14px;
  margin-top: 10px;
}

/* BAR LOADER */
.bar-loader {
  width: 150px;
  height: 4px;
  background: rgba(255,255,255,0.1);
  border-radius: 5px;
  overflow: hidden;
}

.bar {
  height: 100%;
  width: 0%;
  background: var(--accent);
  animation: loadingBar 1.5s ease infinite;
}

@keyframes loadingBar {
  0% {
    width: 0%;
  }
  50% {
    width: 80%;
  }
  100% {
    width: 100%;
  }
}


/* =========================
   SCROLL TO TOP BUTTON
========================= */
#scrollTopBtn {
  position: fixed;
  bottom: 30px;
  right: 30px;
  z-index: 999;

  width: 45px;
  height: 45px;
  border: none;
  border-radius: 50%;

  background: linear-gradient(135deg, #f97316, #fb923c);
  color: #fff;
  font-size: 20px;
  cursor: pointer;

  display: flex;
  align-items: center;
  justify-content: center;

  box-shadow: 0 5px 15px rgba(0,0,0,0.2);

  opacity: 0;
  visibility: hidden;
  transition: 0.3s ease;
}

/* Show button */
#scrollTopBtn.show {
  opacity: 1;
  visibility: visible;
}

/* Hover effect */
#scrollTopBtn:hover {
  transform: translateY(-5px) scale(1.05);
  box-shadow: 0 10px 25px rgba(0,0,0,0.3);
}