/* Hybrid Branding: Previous NRA color scheme with new FRDM logo/fonts */

/* Google Fonts should be imported in base.html */
/* Font-family variables from new branding */
:root {
  --font-primary: 'Libre Baskerville', serif; /* For headings */
  --font-secondary: 'Montserrat', sans-serif; /* For body text */
}

/* Color variables from previous (red) theme */
:root {
  --primary-color: #b71c1c;
  --primary-hover: #911515;
  --secondary-color: #0a3161;
  --text-color: #212121;
  --bg-color: #f8f9fa;
  --card-bg: #ffffff;
  --border-color: #dee2e6;

  /* Font Setup from new branding, but using sans-serif for body */
  --bs-font-sans-serif: var(--font-secondary);
  --bs-body-font-family: var(--bs-font-sans-serif);
  --bs-body-font-size: .95rem;
  --bs-body-line-height: 1.6;
}

[data-bs-theme="dark"] {
  --primary-color: #c62828;
  --primary-hover: #d32f2f;
  --secondary-color: #1565c0;
  --text-color: #e0e0e0;
  --bg-color: #121212;
  --card-bg: #1e1e1e;
  --border-color: #424242;
}

/* Typography from new branding */
h1, h2, h3, h4, h5, h6,
.h1, .h2, .h3, .h4, .h5, .h6,
.card-title {
  font-family: var(--font-primary);
  font-weight: 700;
}
.navbar-brand { /* Keep brand font distinct */
    font-family: var(--font-primary);
    font-weight: 700;
}


body {
  font-family: var(--bs-body-font-family);
  background-color: var(--bg-color);
  color: var(--text-color);
  transition: background-color 0.3s ease, color 0.3s ease;
  display: flex;
  flex-direction: column;
}

/* Navbar & Logo styling from new branding */
.navbar {
  background-color: var(--card-bg) !important;
  box-shadow: 0 2px 12px 0 rgba(0, 0, 0, 0.07);
}
.navbar-brand img {
    max-height: 35px; /* Control logo height */
    width: auto;
    transition: content 0.3s ease;
}
/* Swap logo for dark mode */
[data-bs-theme="dark"] .logo-dark {
    display: none;
}
[data-bs-theme="dark"] .logo-light {
    display: inline-block;
}
.logo-light {
    display: none;
}

/* Buttons using previous (red) theme */
.btn-primary {
  --bs-btn-color: #fff;
  --bs-btn-bg: var(--primary-color);
  --bs-btn-border-color: var(--primary-color);
  --bs-btn-hover-color: #fff;
  --bs-btn-hover-bg: var(--primary-hover);
  --bs-btn-hover-border-color: var(--primary-hover);
  --bs-btn-focus-shadow-rgb: 183, 28, 28;
  --bs-btn-active-color: #fff;
  --bs-btn-active-bg: var(--primary-hover);
  --bs-btn-active-border-color: var(--primary-hover);
}

/* General Links */
a {
  color: var(--primary-color);
  text-decoration: none;
}
a:hover {
  color: var(--primary-hover);
  text-decoration: underline;
}

/* Gradient Text for headers (Red to Blue) */
.bg-gradient-primary {
  background: linear-gradient(135deg, var(--primary-color) 0%, var(--secondary-color) 100%);
}
.text-gradient.text-primary {
    background-clip: text;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    position: relative;
    z-index: 1;
    background-image: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
}
.text-primary {
  color: var(--primary-color) !important;
}

/* Cards */
.card {
  background-color: var(--card-bg);
  border: 1px solid var(--border-color);
  box-shadow: 0 0.5rem 1rem rgba(0, 0, 0, 0.05);
  transition: all 0.3s ease;
  border-radius: 0.5rem;
}

/* Forms */
.form-control, .form-select {
  background-color: var(--bg-color);
  border: 1px solid var(--border-color);
  color: var(--text-color);
}
.form-control:focus, .form-select:focus {
  border-color: var(--primary-color);
  box-shadow: 0 0 0 0.2rem rgba(183, 28, 28, 0.25);
  background-color: var(--card-bg);
}

/* Other components from original CSS, adapted */
.nav-link {
  color: var(--text-color) !important;
  font-weight: 500;
  transition: color 0.3s ease;
}
.nav-link:hover, .nav-link.active {
  color: var(--primary-color) !important;
}

.theme-toggle {
  cursor: pointer;
  background-color: transparent;
  border: 1px solid var(--border-color);
  color: var(--text-color);
  font-size: 1rem;
  transition: all 0.3s ease;
  padding: 0.375rem 0.75rem;
  border-radius: 50px;
  display: flex;
  align-items: center;
  justify-content: center;
  width: auto;
  min-width: 38px;
  height: 38px;
}
.theme-toggle:hover, .theme-toggle:focus {
  background-color: var(--primary-color);
  color: white !important;
  border-color: var(--primary-color);
}

.footer {
  width: 100%;
  background-color: var(--bg-color);
  padding-top: 2rem;
  padding-bottom: 2rem;
}
.footer .nav-link {
    padding: 0.3rem 0;
    color: var(--text-color) !important;
    opacity: 0.8;
}
.footer .nav-link:hover {
    color: var(--primary-color) !important;
    opacity: 1;
}
