/* CSS Reset & Variables */
* { box-sizing: border-box; }
:root {
  --bg: #ffffff;
  --card: #ffffff;
  --text: #0b5bd3; /* Primary font color (blue) */
  --muted: #3f6fe0; /* Muted blue */
  --primary: #4f7cff;
  --primary-600: #3c67e3;
  --danger: #ff4d6d;
  --success: #2ecc71;
  --shadow: 0 6px 20px rgba(0,0,0,0.08);
}
html, body { height: 100%; }
body {
  margin: 0;
  font-family: system-ui, -apple-system, Segoe UI, Roboto, Ubuntu, Cantarell, Noto Sans, Helvetica, Arial, "Apple Color Emoji", "Segoe UI Emoji";
  background: var(--bg);
  color: var(--text);
}

.container {
  max-width: 920px;
  margin: 0 auto;
  padding: 24px;
}

.app-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 16px 24px;
  border-bottom: 1px solid #e6efff;
  background: rgba(255,255,255,0.9);
  position: sticky; top: 0; backdrop-filter: blur(6px);
}
.brand { font-weight: 700; letter-spacing: 0.6px; }
.link { color: var(--text); text-decoration: none; opacity: 0.9; }
.link:hover { opacity: 1; }

/* Global Header (Infosys-like) */
.global-header { position: sticky; top: 0; z-index: 100; background: linear-gradient(180deg, #1f5f8f 0%, #2c6a95 60%, #38779f 100%); color: #ffffff; box-shadow: 0 2px 10px rgba(0,0,0,0.08); }
.global-header .gh-inner { display: flex; align-items: center; gap: 16px; padding: 12px 24px; }
.global-header .gh-brand { display: flex; flex-direction: column; line-height: 1; min-width: 160px; }
.global-header .gh-brand .title { font-weight: 700; letter-spacing: 0.4px; font-size: 1.15rem; color: #fff; }
.global-header .gh-brand .subtitle { font-size: 0.75rem; opacity: 0.95; color: #fff; }
.global-header .gh-nav { display: flex; gap: 28px; flex: 1; justify-content: center; }
.global-header .gh-nav a { color: #ffffff; text-decoration: none; font-weight: 500; opacity: 0.95; }
.global-header .gh-nav a:hover { opacity: 1; text-decoration: underline; text-underline-offset: 4px; }
.global-header .gh-actions { display: flex; align-items: center; gap: 16px; }
.global-header .icon-btn { background: transparent; border: none; padding: 6px; cursor: pointer; display: grid; place-items: center; }
.global-header .icon-btn svg { width: 22px; height: 22px; stroke: #ffffff; fill: none; }
.global-header .menu-btn { width: 36px; height: 36px; border-radius: 999px; background: #ffffff; display: grid; place-items: center; border: 0; }
.global-header .menu-btn svg { width: 18px; height: 18px; stroke: #1f5f8f; }

/* Bold the selected header tab */
.gh-nav [role="tab"].active,
.gh-nav [role="tab"][aria-selected="true"] {
  font-weight: 700;
}

/* Cards & Layout */
.card {
  background: var(--card);
  border: 1px solid #dbe6ff;
  border-radius: 14px;
  padding: 20px;
  box-shadow: var(--shadow);
}
.auth-container { display: grid; place-items: center; min-height: 100vh; }
.auth-card { width: min(520px, 96vw); }

/* Forms */
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.form-group { margin-bottom: 14px; }
.form-group label { display:block; margin-bottom: 8px; font-size: 0.95rem; color: var(--muted); }
.form-group input,
.form-group select {
  width: 100%;
  padding: 12px 14px;
  border-radius: 10px;
  border: 1px solid #c9d6ff;
  background: #ffffff;
  color: var(--text);
  outline: none;
}
.form-group input:focus, .form-group select:focus { border-color: var(--primary); box-shadow: 0 0 0 3px rgba(79,124,255,0.2); }

.form-check { display: flex; align-items: center; gap: 10px; margin: 10px 0 20px; color: var(--muted); }

.btn {
  appearance: none; border: none; cursor: pointer;
  padding: 12px 16px; border-radius: 10px; color: white;
  background: #2a3a7a; transition: transform .05s ease, background .2s ease;
}
.btn:hover { background: #35489a; }
.btn:active { transform: translateY(1px); }
.btn.primary { background: linear-gradient(180deg, var(--primary), var(--primary-600)); }
.btn.primary:hover { filter: brightness(1.05); }
.btn.full { width: 100%; }

.error { color: var(--danger); font-size: 0.85rem; min-height: 1.2em; display: block; margin-top: 6px; }
.auth-links { display: flex; justify-content: space-between; margin-top: 12px; }
.auth-links a { color: var(--muted); }

/* Modal */
.modal { position: fixed; inset: 0; display: grid; place-items: center; background: rgba(0,0,0,0.5); opacity: 0; pointer-events: none; transition: opacity .2s ease; }
.modal[aria-hidden="false"] { opacity: 1; pointer-events: auto; }
.modal-content { width: min(560px, 92vw); background: var(--card); border: 1px solid #dbe6ff; border-radius: 14px; box-shadow: var(--shadow); }
.modal-body { padding: 24px; line-height: 1.6; }
.modal-actions { display: flex; justify-content: flex-end; gap: 12px; padding: 0 24px 18px; }

/* Toast */
.toast { position: fixed; left: 50%; bottom: 24px; transform: translateX(-50%) translateY(20px); opacity: 0; transition: all .2s ease; background: #ffffff; border: 1px solid #dbe6ff; color: var(--text); padding: 10px 14px; border-radius: 10px; box-shadow: var(--shadow); }
.toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }

/* Global Footer */
.global-footer { background: #fafcff; color: var(--text); border-top: 1px solid #e6efff; margin-top: 24px; }
.global-footer .footer-top { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; padding: 28px 24px; }
.global-footer h3 { margin: 0 0 12px; font-size: 1.05rem; color: var(--text); }
.global-footer ul { list-style: none; padding: 0; margin: 0; }
.global-footer li { margin: 10px 0; }
.global-footer a { color: var(--text); text-decoration: underline; text-underline-offset: 4px; opacity: 0.9; }
.global-footer a:hover { opacity: 1; }
.global-footer .socials { display: flex; align-items: center; gap: 16px; padding-top: 6px; }
.global-footer .social svg { width: 22px; height: 22px; fill: var(--text); stroke: none; opacity: 0.85; }
.global-footer .social:hover svg { opacity: 1; }
.global-footer .footer-bottom { border-top: 1px solid #e6efff; font-size: 0.9rem; padding: 14px 24px; color: var(--text); }

/* Footer color override: set all footer text to black */
.global-footer, 
.global-footer h3, 
.global-footer a, 
.global-footer .footer-bottom { color: #000 !important; }
.global-footer .social svg { fill: #000 !important; }

/* Accessibility utilities */
.visually-hidden { position: absolute !important; height: 1px; width: 1px; overflow: hidden; clip: rect(1px, 1px, 1px, 1px); white-space: nowrap; border: 0; padding: 0; margin: -1px; }

/* Accessibility: focus and motion */
:focus { outline: none; }
:focus-visible { outline: 3px solid #0a3ea9; outline-offset: 2px; border-radius: 6px; }

@media (prefers-reduced-motion: reduce) {
  * { animation-duration: 0.001ms !important; animation-iteration-count: 1 !important; transition-duration: 0.001ms !important; scroll-behavior: auto !important; }
}

/* Skip link */
.skip-link { position: absolute; left: 12px; top: -40px; background: #000; color: #fff; padding: 10px 14px; border-radius: 8px; z-index: 9999; transition: top .15s ease; }
.skip-link:focus { top: 12px; }

/* Home: Select a category styled like the reference */
#offeringsSelect {
  width: 100%;
  appearance: none; -webkit-appearance: none; -moz-appearance: none;
  background-color: #ffffff;
  border: 1px solid #dbe6ff;
  border-radius: 10px;
  padding: 12px 44px 12px 14px;
  color: var(--text);
  font-size: 1rem;
  line-height: 1.4;
  box-shadow: var(--shadow);
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M6 9l6 6 6-6' fill='none' stroke='%230b5bd3' stroke-width='2'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 12px center;
  background-size: 18px 18px;
}
#offeringsSelect:focus-visible {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(79,124,255,0.25), var(--shadow);
  outline: none;
}

/* Make the label sit closer and bold, similar to reference */
label[for="offeringsSelect"] { font-weight: 600; margin-bottom: 6px; display: inline-flex; align-items: center; gap: 6px; }

/* Dropdown (Select a category): force heading and values to black */
label[for="offeringsSelect"] { color: #000 !important; }
#offeringsSelect { color: #000 !important; }
#offeringsSelect option { color: #000 !important; }

/* Home: section panels (show only active) */
.section-panel { display: none; }
.section-panel.active { display: block; }

/* Content block text color override */
main, 
main h1, main h2, main h3, main h4, main h5, main h6,
main p, main li, main span, main div,
main label, main small, main a {
  color: #000;
}
/* Inputs/selects text in content blocks should be black */
main .form-group input,
main .form-group select,
main .form-check label { color: #000; }

/* Keep buttons unchanged (text stays white) */
main .btn { color: #fff !important; }

/* Ensure placeholders remain readable */
main ::placeholder { color: #5f6b7a; opacity: 1; }
