/* =======================
   BASE RESET & TYPOGRAPHY
   ======================= */
html, body {
  width: 100%;
  overflow-x: hidden;
  margin: 0;
  padding: 0;
  font-family: Arial, Helvetica, sans-serif;
  color: #222;
  background: #f7f9fc;
}

*, *::before, *::after {
  box-sizing: border-box;
}

.container {
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 16px;
}

/* =======================
   HEADER
   ======================= */
.site-header .topbar {
  display: none;
}

.brand {
  display: flex;
  flex-direction: row;
  align-items: center;
  gap: 12px;
  padding: 0;
}

.logo {
  width: 100px;
  height: auto;
  max-height: 60px;
  object-fit: contain;
  display: block;
}

.sitename {
  margin: 0;
  font-size: 28px;
  color: #fff;
  font-weight: 700;
  text-align: left;
}

/* =======================
   NAVIGATION
   ======================= */
.main-nav {
  background: #1e55a6;
  box-shadow: 0 2px 0 rgba(0,0,0,0.15);
  position: fixed;   /* changed from sticky */
  top: 0;
  left: 0;
  width: 100%;       /* ensure full width */
  z-index: 9999;     /* higher than everything */
}

.nav-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 8px 16px;
  position: relative;
}

.nav-menu {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  gap: 8px;
  align-items: center;
}

.nav-menu li a {
  color: #fff;
  text-decoration: none;
  padding: 10px 14px;
  display: block;
  border: 2px solid rgba(255,255,255,0.06);
  border-radius: 4px;
  transition: background 0.3s ease;
}

.nav-menu li a:hover {
  background: rgba(255,255,255,0.1);
}

.main-nav {
  background: #1e55a6;
  box-shadow: 0 2px 0 rgba(0,0,0,0.15);
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  z-index: 9999;
  border-bottom: 4px solid #f3c300; /* yellow line below header */
}


/* =======================
   MOBILE TOGGLE
   ======================= */
.mobile-toggle {
  display: none;
  background: transparent;
  border: 0;
  color: #fff;
  font-size: 28px;
  cursor: pointer;
  position: relative;
  z-index: 9999;
}

/* =======================
   LAYOUT
   ======================= */
/* add top padding equal to nav height so content doesn't go under fixed nav */
.site-content {
  display: grid;
  grid-template-columns: 1fr 300px;
  gap: 24px;
  margin-top: 80px; /* adjust according to nav height */
  padding-bottom: 40px;
}

.content-area {
  background: #fff;
  padding: 20px;
  border-radius: 8px;
  min-height: 400px;
}

/* =======================
   SIDEBAR
   ======================= */
.sidebar {
  background: #ffffff;
  padding: 18px;
  border-radius: 10px;
  box-shadow: 0 4px 12px rgba(0,0,0,0.08);
  min-height: 200px;
  border: 1px solid #e8edf7;
  position: relative;
  overflow: hidden;
}

.sidebar::before {
  content: "";
  position: absolute;
  top: -40px;
  right: -40px;
  width: 120px;
  height: 120px;
  background: radial-gradient(circle at center, #f5d90a 40%, transparent 70%);
  opacity: 0.15;
  border-radius: 50%;
}

/* =======================
   WIDGETS
   ======================= */
.widget {
  margin-bottom: 20px;
  background: #fff;
  border-radius: 8px;
  border: 1px solid #e6ecf8;
  padding: 14px 16px;
  transition: all 0.25s ease;
}

.widget:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 10px rgba(0,0,0,0.05);
}

.widget h3 {
  margin: 0 0 10px;
  font-size: 17px;
  color: #0f4ea8;
  border-bottom: 2px solid #f3c300;
  display: inline-block;
  padding-bottom: 4px;
}

.sidebar-list {
  list-style: none;
  padding: 0;
  margin: 0;
}

.sidebar-list li {
  margin: 8px 0;
}

.sidebar-list a {
  color: #1e55a6;
  text-decoration: none;
  font-weight: 500;
  display: block;
  padding: 8px 10px;
  border-radius: 6px;
  transition: background 0.3s ease, color 0.3s ease;
}

.sidebar-list a:hover {
  background: #1e55a6;
  color: #fff;
}

/* =======================
   CARDS
   ======================= */
.cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px,1fr));
  gap: 12px;
  margin-top: 16px;
}

.card {
  background: #f8f9fb;
  padding: 18px;
  border-radius: 8px;
  border: 1px solid #eee;
}

/* =======================
   FOOTER
   ======================= */
.site-footer {
  background: linear-gradient(135deg,#1a1a2e,#3a0ca3);
  color: #fff;
  padding: 24px 16px;
  font-size: 14px;
  border-top: 4px solid #f3c300;
}

.site-footer a {
  color: #ffd700;
  text-decoration: none;
  transition: color 0.3s ease;
}

.site-footer a:hover {
  color: #fff;
}

.site-footer .container {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px;
}

.site-footer .footer-col {
  flex: 1 1 auto;
  min-width: 200px;
}

.footer-nav a {
  margin-right: 8px;
}

.footer-nav a:last-child {
  margin-right: 0;
}

/* =======================
   RESPONSIVE
   ======================= */
@media (max-width: 880px) {
  .site-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    width: 100%;
    gap: 12px;
    margin-top: 100px; /* account for fixed nav on smaller screens */
    padding: 0 12px;
  }

  .sidebar {
    order: 2;
    width: 100%;
  }

  .mobile-toggle {
    display: block;
  }

  .nav-inner {
    position: relative;
  }

  .nav-menu {
    display: none;
    flex-direction: column;
    background: #1e55a6;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    padding: 12px 0;
    margin: 0;
    border-top: 1px solid rgba(255,255,255,0.15);
  }

  .nav-menu.show {
    display: flex;
  }

  .nav-menu li {
    width: 100%;
  }

  .nav-menu li a {
    border: none;
    border-radius: 0;
    padding: 12px 16px;
    border-bottom: 1px solid rgba(255,255,255,0.1);
  }

  .sitename {
    font-size: 24px;
  }
}

@media (max-width: 600px) {
  .site-footer .container {
    flex-direction: column;
    text-align: center;
    gap: 8px;
  }

  .footer-nav a {
    display: inline-block;
    margin: 4px 6px;
  }

  .site-footer .footer-col {
    min-width: 100%;
  }
}
