/* 
 * essential.css - Combined essential CSS for initial page load
 * 
 * This file includes critical CSS needed for the initial page render
 * to prevent flash of unstyled content (FOUC).
 */

/* Import global variables and reset */
/* brand.css first: it defines the tokens variables.css and the per-page themes
   derive their primary colours from. */
@import 'global/brand.css';
@import 'global/variables.css';
@import 'global/reset.css';
@import 'global/typography.css';
@import 'global/layout.css';

/* Import critical components */
@import 'components/navigation.css?v=3';
@import 'components/buttons.css';
@import 'components/footer.css';

/* Skip navigation link — visible only when focused (keyboard users) */
.skip-link {
  position: absolute;
  top: -100%;
  left: 0;
  background: #3a3a7c;
  color: #fff;
  padding: 0.5rem 1rem;
  z-index: 9999;
  font-size: 0.9rem;
  border-radius: 0 0 4px 0;
  text-decoration: none;
}
.skip-link:focus {
  top: 0;
}

/* Critical base styling to prevent FOUC */
body {
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  line-height: 1.5;
  color: #333;
  background-color: #f8f9fa;
  margin: 0;
  padding: 0;
}

header, footer {
  display: block;
  width: 100%;
}

a {
  text-decoration: none;
  color: #3a3a7c;
}

img {
  max-width: 100%;
  height: auto;
}

/* Container utility */
.container, .container-max {
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  padding-left: 1rem;
  padding-right: 1rem;
}

.container-fluid {
  width: 100%;
  padding-left: 1rem;
  padding-right: 1rem;
}

/* Add minimal flexbox support */
.d-flex {
  display: flex;
}

.flex-column {
  flex-direction: column;
}

.justify-content-between {
  justify-content: space-between;
}

.align-items-center {
  align-items: center;
}

/* Basic spacing */
.mt-1 { margin-top: 0.25rem; }
.mt-2 { margin-top: 0.5rem; }
.mt-3 { margin-top: 1rem; }
.mt-4 { margin-top: 1.5rem; }
.mt-5 { margin-top: 3rem; }

.mb-1 { margin-bottom: 0.25rem; }
.mb-2 { margin-bottom: 0.5rem; }
.mb-3 { margin-bottom: 1rem; }
.mb-4 { margin-bottom: 1.5rem; }
.mb-5 { margin-bottom: 3rem; }

.p-1 { padding: 0.25rem; }
.p-2 { padding: 0.5rem; }
.p-3 { padding: 1rem; }
.p-4 { padding: 1.5rem; }
.p-5 { padding: 3rem; }

/* Text utilities */
.text-center { text-align: center; }
.text-right { text-align: right; }
.text-left { text-align: left; }

/* Admin pages critical styles */
.admin-page { font-family: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif; }
.admin-layout { display: flex; flex-direction: row; flex-wrap: nowrap; margin: 1.5rem; position: relative; }
.admin-sidebar { flex: 0 0 250px; background-color: #ffffff; border-radius: 8px; padding: 1rem; box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1); }
.admin-content { flex: 1; background-color: #ffffff; border-radius: 8px; padding: 1.5rem; box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1); }
.admin-hero { background-color: #4A2C40; color: #ffffff; padding: 2rem 0; text-align: center; margin-bottom: 1.5rem; }

/* Blue background section */
.blue-bg {
  background-color: #0a2647;
}