/* Milligram overrides */
:root {
  --color-cakephp-red: #fd5d5d;
  --color-cakephp-gray: #9f9f9f;
  --color-cakephp-blue: #2f85ae;
  --color-cakephp-lightblue: #34bdd7;

  --color-lightgray: #606c76;
  --color-white: #fff;

  --color-button-bg: #eaeaea;
  --color-button-border: #cdcdcd;
  --color-button-text: #3c3c3c;

  --color-main-bg: #f5f7fa;
  --color-links: var(--color-cakephp-blue);
  --color-links-active: #2a6496;
  --color-headings: #363637;

  --color-message-success-bg: #e3fcec;
  --color-message-success-text: #1f9d55;
  --color-message-success-border: #51d88a;

  --color-message-warning-bg: #fffabc;
  --color-message-warning-text: #8d7b00;
  --color-message-warning-border: #d3b800;

  --color-message-error-bg: #fcebea;
  --color-message-error-text: #cc1f1a;
  --color-message-error-border: #ef5753;

  --color-message-info-bg: #eff8ff;
  --color-message-info-text: #2779bd;
  --color-message-info-border: #6cb2eb;
}

/* Basic typography and body */
body {
  font-family: "Montserrat", sans-serif;
  font-weight: 400;
  background: var(--color-white);
}

h1, h2, h3, h4, h5, h6 {
  font-weight: 400;
  color: var(--color-headings);
}

/* Links */
a {
  color: var(--color-links);
  text-decoration: none;
  transition: color 0.2s linear;
  font-family: "Montserrat", sans-serif;
  font-size: 16px; /* Ensure uniform font size for links */
}

a:hover,
a:focus,
a:active {
  color: var(--color-links-active);
  transition: color 0.2s ease-out;
}

/* Top navigation links */
.top-nav-links a,
.header-nav-links a,
.side-nav a,
.pages-links .nav-item-link,
.contact-icon-link,
.social-links .icon-link {
  font-family: "Montserrat", sans-serif;
  font-weight: 500;
  font-size: 16px; /* consistent across all links */
  line-height: 1.5;
  text-decoration: none;
  color: var(--color-lightgray);
  margin: 0 0.5rem;
  padding: 0.4rem 0.5rem;
  display: inline-block;
}

.top-nav-links a:hover,
.side-nav a:hover,
.pages-links .nav-item-link:hover,
.contact-icon-link:hover,
.social-links .icon-link:hover {
  color: #EF233C; /* uniform hover color */
}

/* Active link state */
.top-nav-links a.active,
.side-nav a.active {
  color: #283B77;
  font-weight: 600;
}

/* Side nav styling */
.side-nav {
  display: flex;
  flex-direction: column;
  padding-top: 20px;
}

.side-nav-item {
  display: block;
  padding: 0.5rem 0;
}

/* Sidebar nav-link consistent sizing */
.side-nav a {
  font-size: 16px;
  font-weight: 500;
  color: var(--color-lightgray);
  text-decoration: none;
  padding: 10px 15px;
}

.side-nav a:hover,
.side-nav a:focus {
  color: #EF233C;
  background-color: rgba(239, 35, 60, 0.1);
  border-radius: 5px;
}

/* Responsive adjustments */
@media screen and (max-width: 768px) {
  .top-nav-links a,
  .side-nav a,
  .header-nav-links a {
    font-size: 14px;
    margin: 0 0.3rem;
  }
}

@media screen and (max-width: 576px) {
  .top-nav-links a,
  .side-nav a,
  .header-nav-links a {
    font-size: 13px;
    margin: 0 0.2rem;
  }
}
