/* ==============================
   General Site-wide Styles
============================== */
body {
  font-family: "Segoe UI", "Helvetica Neue", sans-serif;
  background-color: #f9f9f9;
  color: #1a1a1a;
  line-height: 1.6;
  margin: 0;
  padding: 0;
}

/* ==============================
   Headings
============================== */
h1, h2, h3 {
  color: #004b8d;
  margin-top: 1.5em;
  font-weight: 700;
}

h1 { font-size: 2rem; }
h2 { font-size: 1.75rem; }
h3 { font-size: 1.5rem; }

/* ==============================
   Navigation Bar
============================== */
.navbar {
  background-color: #004b8d;
}

.navbar a {
  color: #ffffff !important;
  font-weight: 600;
}

.navbar a:hover,
.navbar a:focus {
  color: #ffc107 !important;
  text-decoration: underline;
  outline: 2px solid #ffc107;
  outline-offset: 2px;
}

/* ==============================
   Skip Link (Accessibility)
============================== */
.skip-link {
  position: absolute;
  left: -999px;
  top: auto;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

.skip-link:focus {
  position: static;
  width: auto;
  height: auto;
  margin: 1em;
  padding: 0.5em 1em;
  background: #004b8d;
  color: #fff;
  z-index: 1000;
}

/* ==============================
   Main Content Area
============================== */
main {
  background: white;
  padding: 2em;
  border-radius: 8px;
  box-shadow: 0 0 10px rgba(0, 0, 0, 0.05);
  margin-bottom: 2em;
}

/* ==============================
   Typography & Links
============================== */
a {
  color: #004b8d;
  text-decoration: none;
  font-weight: 500;
}

a:hover,
a:focus {
  text-decoration: underline;
  outline: 2px dashed #004b8d;
  outline-offset: 2px;
}

a[aria-label]::after {
  content: " ↗";
  font-size: 0.9em;
  color: #555;
  padding-left: 0.2em;
}

a[target="_blank"] {
  position: relative;
}

a[target="_blank"]:hover::after,
a[target="_blank"]:focus::after {
  content: " (opens in new tab)";
  font-size: 0.85em;
  color: #888;
  padding-left: 0.3em;
}

/* ==============================
   Footer
============================== */
.footer {
  font-size: 0.9em;
  color: #666;
  padding: 1em 0;
  text-align: center;
}

/* ==============================
   Code Blocks
============================== */
pre, code {
  background-color: #f1f1f1;
  padding: 0.2em 0.4em;
  border-radius: 4px;
  font-family: Consolas, monospace;
  color: #000;
  font-size: 0.95rem;
}

/* ==============================
   Focus Styles
============================== */
button:focus,
a:focus,
input:focus,
textarea:focus,
select:focus {
  outline: 2px dashed #004b8d;
  outline-offset: 2px;
}

/* ==============================
   Responsive Hamburger Button
============================== */
.navbar-toggler {
  display: inline-block;
  padding: 0.5rem 1rem;
  background-color: #004b8d;
  border: 2px solid #ffffff;
  color: #ffffff;
  font-size: 1rem;
  font-weight: bold;
}

.navbar-toggler-icon {
  display: none !important;
}

.navbar-toggler::after {
  content: "Menu";
  color: #ffffff;
  font-weight: 600;
  font-size: 1rem;
}

.navbar-toggler:focus {
  outline: 3px dashed #ffc107;
  outline-offset: 4px;
}

/* ==============================
   Algolia Search Button/Icon
============================== */
.aa-SubmitIcon {
  color: #ffffff !important;
  width: 24px !important;
  height: 24px !important;
  filter: drop-shadow(0 0 2px rgba(0, 0, 0, 0.7));
  transition: color 0.3s ease;
}

.aa-SubmitIcon:hover,
.aa-SubmitIcon:focus {
  color: #ffc107 !important;
  outline: none;
}

.search-button {
  background: none;
  border: none;
  color: #ffffff;
  cursor: pointer;
  padding: 0.5rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2.5rem;
  height: 2.5rem;
  user-select: none;
  filter: drop-shadow(0 0 2px rgba(0,0,0,0.7));
  transition: color 0.3s ease;
}

.search-button:hover,
.search-button:focus {
  color: #ffc107;
  outline: 3px dashed #ffc107;
  outline-offset: 3px;
}

.search-button svg {
  width: 24px;
  height: 24px;
  fill: currentColor;
  pointer-events: none;
}

/* ==============================
   Contact Me Button
============================== */
.contact-button {
  display: inline-block;
  padding: 0.6em 1.2em;
  font-size: 1rem;
  font-weight: 600;
  color: #ffffff;
  background-color: #004b8d;
  border: 2px solid #004b8d;
  border-radius: 6px;
  text-decoration: none;
  transition: background-color 0.3s ease, border-color 0.3s ease;
}

.contact-button:hover,
.contact-button:focus {
  background-color: #003366;
  border-color: #003366;
  text-decoration: underline;
  outline: 2px dashed #ffc107;
  outline-offset: 3px;
}

/* ==============================
   Contact Fallback Paragraph
============================== */
.contact-fallback {
  margin-top: 1em;
  font-size: 0.95rem;
  color: #333;
}

.contact-fallback a {
  color: #004b8d;
  text-decoration: underline;
}

.contact-fallback a:hover,
.contact-fallback a:focus {
  outline: 2px dashed #004b8d;
  outline-offset: 2px;
}

/* ==============================
   Netlify & Contact Form Styling (merged)
============================== */
form.contact-form,
form.netlify-form {
  margin-top: 2em;
  padding: 1.5em;
  border: 2px solid #004b8d;
  border-radius: 8px;
  background-color: #ffffff;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.03);
}

form.contact-form label,
form.netlify-form label {
  display: block;
  font-weight: 600;
  margin-bottom: 0.5em;
  color: #004b8d;
}

form.contact-form input,
form.contact-form textarea,
form.netlify-form input,
form.netlify-form textarea {
  width: 100%;
  padding: 0.75em;
  margin-bottom: 1.2em;
  border: 1px solid #cccccc;
  border-radius: 5px;
  font-size: 1rem;
  font-family: inherit;
}

form.contact-form input:focus,
form.contact-form textarea:focus,
form.netlify-form input:focus,
form.netlify-form textarea:focus {
  border-color: #004b8d;
  outline: 2px dashed #004b8d;
  outline-offset: 3px;
}

form.contact-form button,
form.netlify-form button {
  display: inline-block;
  background-color: #004b8d;
  color: #ffffff;
  border: 2px solid #004b8d;
  border-radius: 6px;
  padding: 0.6em 1.2em;
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  transition: background-color 0.3s ease, border-color 0.3s ease;
}

form.contact-form button:hover,
form.contact-form button:focus,
form.netlify-form button:hover,
form.netlify-form button:focus {
  background-color: #003366;
  border-color: #003366;
  text-decoration: underline;
  outline: 2px dashed #ffc107;
  outline-offset: 3px;
}

/* ==============================
   Thank You Page Styling (example)
============================== */
.thank-you-message {
  max-width: 600px;
  margin: 3em auto;
  padding: 2em;
  background-color: #e6f0ff;
  border: 2px solid #004b8d;
  border-radius: 8px;
  color: #004b8d;
  font-size: 1.25rem;
  text-align: center;
  box-shadow: 0 0 12px rgba(0, 75, 141, 0.3);
}

.thank-you-message h1 {
  font-size: 2rem;
  margin-bottom: 0.5em;
}

.thank-you-message p {
  margin-top: 0;
}

/* ==============================
   Responsive adjustments (optional)
============================== */
@media (max-width: 600px) {
  main {
    padding: 1em;
  }
  .thank-you-message {
    margin: 2em 1em;
    padding: 1.5em;
    font-size: 1.1rem;
  }
}

/* ==============================
   Footer Social Link Styling
============================== */
.footer-social-link {
  color: #004b8d;
  text-decoration: none;
  font-weight: 600;
  margin: 0 0.5em;
}

.footer-social-link:hover,
.footer-social-link:focus {
  color: #ffc107;
  text-decoration: underline;
  outline: 2px dashed #ffc107;
  outline-offset: 2px;
}
