/* ===== VARIABLES ===== */
:root {
  --primary-color: #002868;
  --secondary-color: #FFC627;
  --accent-color: #d4af37;
  --light-color: #FFFFFF;
  --dark-color: #010E30;
  --success-color: #6CB2E2;
  --warning-color: #FFC627;
  --danger-color: #dc3545;
  --tertiary-color: #EFF2F9; 
  --font-main: 'Vito Regular', sans-serif;
  --font-heading: 'Lora Medium', serif;
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

/* ===== TYPOGRAPHY & GLOBAL ELEMENTS ===== */
.fas {
  color: var(--primary-color);
}

hr {
  border: 0;
  border-top: 1px solid #eee;
  margin: 1rem 0;
}

table {
  width: 100%;
  display: table;
  border-collapse: collapse;
  border-spacing: 0;
  border: none;
}

th, td {
  border: none;
}

table.striped>tbody>tr:nth-child(odd) {
  background-color: #ddd;
}

table.striped tr {
  border-bottom: none;
}

tr {
  border-bottom: 1px solid rgba(0,0,0,.12);
}

/* ===== SIDEBAR ===== */
.sidebar {
  position: fixed;
  top: 0;
  left: -300px;
  width: 300px;
  height: 100vh;
  background: var(--tertiary-color);
  z-index: 1000;
  box-shadow: 5px 0 15px rgba(0,0,0,0.1);
  transition: all 0.4s ease;
  overflow-y: auto;
  padding: 20px 0;
  display: flex;
  flex-direction: column;
}

.sidebar.active {
  left: 0;
}

.sidebar.active + .main-content {
  margin-left: 353px;
}

.logo-container {
  text-align: center;
  padding: 15px;
  margin-bottom: 15px;
  border-bottom: 1px solid --primary-color;
  box-shadow: none;
}

.logo-container a {
  text-decoration: none;   /* Removes default underline */
  border: none;            /* Removes any borders */
  outline: none;           /* Removes focus outline */
  display: inline-block;   /* Prevents extra space below image */
}

/* Fix image spacing and borders */
.logo-container img {
  display: block;          /* Eliminates baseline spacing */
  border: 0;               /* Removes image borders */
  vertical-align: middle;  /* Alternative to block display */
}

.logo {
  max-width: 180px;
  height: auto;
  margin: 0 auto;
  box-shadow: none;
}

.sidebar-nav {
  list-style: none;
  padding: 0 15px;
  flex-grow: 1;
  min-height: 0;
  overflow-y: auto;
}

.sidebar-nav li {
  margin-bottom: 5px;
}

.sidebar-nav a {
  display: flex;
  align-items: center;
  padding: 12px 15px;
  color: var(--dark-color);
  text-decoration: none;
  border-radius: 5px;
  transition: all 0.2s ease;
  font-size: 1rem;
}

.sidebar-nav a:hover,
.sidebar-nav a:focus {
  background: linear-gradient(to bottom, #e0e7ff, #d1ddff);
  color: var(--primary-color);
}

.sidebar-nav a i {
  margin-right: 12px;
  font-size: 1.1rem;
  width: 25px;
  text-align: center;
}

/* Mobile Menu Toggle Button */
.mobile-menu-toggle {
  display: none;
  position: fixed;
  top: 15px;
  left: 15px;
  z-index: 1000;
  background: var(--primary-color);
  color: white;
  border: none;
  border-radius: 4px;
  padding: 10px 15px;
  cursor: pointer;
  font-size: 1.2rem;
  box-shadow: 0 2px 8px rgba(0,0,0,0.2);
  transition: all 0.3s ease;
}

.mobile-menu-toggle:hover {
  background: var(--secondary-color);
  transform: scale(1.05);
}

/* ===== FORM ELEMENTS ===== */
.form-control {
  display: block;
  width: 100%;
  padding: 0.375rem 0.75rem;
  font-size: 1.25rem;
  font-weight: 400;
  line-height: 1.5;
  color: #212529;
  background-clip: padding-box;
  border: 1px solid #ced4da;
  -webkit-appearance: searchfield;
  -moz-appearance: searchfield;
  appearance: searchfield;
  border-radius: 0.25rem;
  transition: border-color 0.15s ease-in-out, box-shadow 0.15s ease-in-out;
}

/* ===== LAYOUT & STRUCTURE ===== */
#homepage-main-and-footer {
  background-image: url('/images/img_9.png');
}

.second-section-main {
  background-color: #fff;
  padding: 1rem 1.5rem 0.5rem 1rem;
}

.nobackground {
  background: none;
}

.pull-left {
  width: 40%;
  float: left;
}

.pull-right {
  width: 40%;
  float: right;
}

.links-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.5rem;
  margin-top: 0.25rem;
}

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

.links-column p {
  margin: 0.2rem 0;
}

/* ===== CARDS ===== */
.card-base {
  position: relative;
  background-color: #fff;
  transition: box-shadow .25s;
  border-radius: 2px;
  box-shadow: 0 2px 2px 0 rgb(0 0 0 / 14%), 0 3px 1px -2px rgb(0 0 0 / 12%), 0 1px 5px 0 rgb(0 0 0 / 20%);
  box-sizing: border-box;
  padding: 0.5rem;
  margin: 0.5rem 0.75rem;
  height: auto;
  display: flex;
  margin-left: 2rem;
  width: calc(100% - 1.5rem);
  overflow: hidden;
}

.card {
  position: relative;
  background-color: #fff;
  transition: box-shadow .25s;
  border-radius: 2px;
  box-shadow: 0 2px 2px 0 rgb(0 0 0 / 14%), 0 3px 1px -2px rgb(0 0 0 / 12%), 0 1px 5px 0 rgb(0 0 0 / 20%);
  padding:1rem;
  margin: 0 0.5rem 1rem 0;
  height: 25rem;
  overflow: hidden;
}

.mini-card {
  padding: 1rem;
  margin: 0 0.75rem 1.25rem 0.75rem;
  height: 1rem;
}

.card h3 {
  font-size: 1rem;
  font-weight: bold;
  font-family: vito bold,sans-serif;
  margin: 0.3rem 0.5rem;
  margin-bottom: 0.75rem;
}

.card p.no-up-margin {
  margin: 0.2rem 0;
}

.card hr {
  margin: 0.5rem 0;
}

.card .btn {
  margin-top: 0.5rem;
}

.card .links-grid {
  margin-top: 0;
}

.jacket-title {
  border-radius: 0 0 2px 2px;
  padding: 0.75rem;
  width: 100%;
  bottom: 0;
  position: absolute;
  background: rgba(255,255,255,0.93);
}

.jacket-title p {
  margin-top: 0.5rem;
}

/* ===== BUTTONS ===== */
.card-button {
  background-color: #e7e7e7;
  border: none;
  color: white;
  padding: 15px 32px;
  text-align: center;
  text-decoration: none;
  display: inline-block;
  font-size: 16px;
  margin: 4px 2px;
  cursor: pointer;
}

.btn, .searchquery {
  margin-top: 1em;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  position: relative;
  padding: 5px 22px;
  background: linear-gradient(to right, #001F5B, #00217a);
  color: white !important;
  font-size: 1rem;
  font-weight: 500;
  text-decoration: none !important;
  border-radius: 25px;
  border-bottom: none !important;
  outline: none !important;
  overflow: hidden;
  z-index: 1;
  border: none;
  cursor: pointer;
  box-shadow: 0 8px 20px rgba(52, 152, 219, 0.3);
  transition: all 0.4s ease;
  margin-top: 10px;
  margin-bottom: 10px;
}

.btn::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 0%;
  height: 100%;
  background: white;
  transition: all 0.4s ease;
  z-index: -1;
}

.btn:hover {
  color: #001F5B !important;
  transform: translateY(-5px);
  box-shadow: 0 12px 25px rgba(52, 152, 219, 0.4);
}

.btn:hover::before {
  width: 100%;
}

a[href="https://forms.gle/8tFtqYTVD6WY9vqTA"] {
    text-decoration: none !important;
    display: inline-block;
    border-bottom: none !important;
}

a[href="https://forms.gle/8tFtqYTVD6WY9vqTA"]:hover,
a[href="https://forms.gle/8tFtqYTVD6WY9vqTA"]:focus {
    text-decoration: none !important;
    border-bottom: none !important;
}

.archives-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  position: relative;
  padding: 5px 22px;
  background: linear-gradient(to right, #001F5B, #00217a);
  color: white;
  font-size: 1rem;
  font-weight: 300;
  text-decoration: none;
  border-radius: 25px;
  overflow: hidden;
  z-index: 1;
  box-shadow: 0 8px 20px rgba(52, 152, 219, 0.3);
  transition: all 0.4s ease;
  margin-top: 10px;
}

.archives-button::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 0%;
  height: 100%;
  background: white;
  transition: all 0.4s ease;
  z-index: -1;
}

.archives-button:hover {
  color: #001F5B;
  transform: translateY(-5px);
  box-shadow: 0 12px 25px rgba(52, 152, 219, 0.4);
}

.archives-button:hover::before {
  width: 100%;
}

/* ===== SPECIFIC COMPONENTS ===== */
.libchat_offline {
  display: none !important;
}

#libchat_776a12eb7834f00b1664afc3f902f086 button.libchat_online {
  display: block;
}

.searchbox {
  background-color: rgba(255, 255, 255, 0.8);
  padding: 1rem 2rem;
  max-width: 40rem;
  margin: 2rem auto 1rem auto;
}

.searchbox .btn {
  width: 100%;
  margin: auto;
}

#radioscope {
  border: none;
  width: 100%;
}

#announcement {
  padding: 1rem 2rem;
  max-width: 40rem;
  margin: 0 auto;
  min-height: 2rem;
}

#announcement:not(:empty) {
  margin-bottom: 1rem;
  background-color: rgba(255, 255, 255, 0.95);
}

.home-link > p {
  font-size: 0.9rem;
  margin-bottom: 0;
}

.no-up-margin {
  margin-top: 0.3rem;
}

.pad-left-sm {
  display: none;
}

#reference {
  width: 100%;
  padding: 0;
  margin-top: 1rem;
  display: block;
}

.reference-text {
  width: 55%;
  float: left;
  display: block;
  overflow-wrap: break-word;
}

.reference-picture {
  display: block;
}

.reference-picture > img {
  max-height: 7rem;
  width: auto;
  padding-left: 0.5rem;
}

#blog-jacket {
  height: 100%;
}

#blog-jacket img {
  max-width: 100%;
  height: auto;
  object-fit: contain;
}

.hours-highlight {
  padding: 1px 1px;
  border-radius: 1px;
  margin: 1px 0;
  font-weight: bold;
  font-size: 1.1rem;
}

.appointment-container {
  margin-top: 2px;
}

.appointment-container p {
  margin-bottom: 12px;
  font-weight: 100;
}

/* ===== FOOTER ===== */
.footer {
  background: var(--dark-color);
  color: white;
  padding: 1% 0 20px;
  margin-left: 200px;
  width: 100%;
}

.footer-grid {
  display: grid;
  grid-template-columns: 3 1fr;
  gap: 1px;
  padding: 0 15px;
  max-width: calc(100% - 280px);
  margin-left: 280px;
}

.footer-title {
  font-size: 1.rem;
  margin-bottom: 20px;
  position: relative;
  padding-bottom: 10px;
  font-weight: 600;
}

.footer-title::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 60px;
  height: 3px;
  background: var(--accent-color);
}

.footer-links {
  list-style: none;
  padding: 0;
}

.footer-links li {
  margin-bottom: 12px;
}

.footer-links a {
  color: var(--secondary-color);
  text-decoration: none;
  transition: all 0.2s ease;
  display: inline-block;
}

.footer-links a:hover,
.footer-links a:focus {
  color: white;
  transform: translateX(5px);
  outline: none;
}

address p {
  margin-bottom: 15px;
  line-height: 1.6;
}

.social-links {
  display: flex;
  gap: 15px;
  margin-top: 20px;
}

.social-link {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  background: rgba(255,255,255,0.1);
  border-radius: 50%;
  color: white;
  text-decoration: none;
  transition: all 0.3s ease;
}

.social-link:hover,
.social-link:focus {
  background: var(--primary-color);
  transform: translateY(-3px);
  outline: none;
}

/* ===== MEDIA QUERIES ===== */
/* Min-width: 768px media query - DESKTOP ONLY */
@media (min-width: 768px) {
  .mobile-menu-toggle {
    display: none;
  }
  .sidebar {
    left: 0;
    width: 353px;
  }
  .main-content {
    margin-left: 250px;
  }
}

/* MOBILE ONLY FIXES - ONLY APPLIES TO SCREENS < 768px */
@media (max-width: 767px) {
  /* Mobile menu button */
  .mobile-menu-toggle {
    display: block;
    z-index: 1001; /* Above sidebar */
  }
  
  /* Sidebar as overlay menu */
  .sidebar {
    left: -300px;
    width: 85%;
    max-width: 300px;
    box-shadow: 5px 0 15px rgba(0,0,0,0.3);
  }
  
  .sidebar.active {
    left: 0;
  }
  
  .sidebar.active + .main-content {
    margin-left: 0;
  }
  
  /* Prevent body scroll when menu is open */
  body.sidebar-active {
    overflow: hidden;
  }
  
  /* Card adjustments */
  .card, .mini-card {
    padding: 0.75rem;
    margin: 0 0.75rem 1rem 0.75rem;
    width: calc(100% - 1.5rem);
  }
  
  /* Float elements become full width */
  .pull-left, .pull-right {
    width: 100%;
    float: none;
    margin-bottom: 1rem;
  }
  
  /* Reference section adjustment */
  .reference-text, 
  .reference-picture {
    width: 100%;
    float: none;
  }
  
  .reference-picture > img {
    max-height: none;
    max-width: 100%;
    padding-left: 0;
    margin-top: 1rem;
  }
  
  /* Footer mobile fixes */
  .footer {
    margin-left: 0;
    padding: 20px 15px;
  }
  
  .footer-grid {
    grid-template-columns: 1fr;
    max-width: 100%;
    margin-left: 0;
  }
  
  .links-grid {
    grid-template-columns: 1fr;
  }
}

/* Other existing media queries remain unchanged */
@media screen and (max-width: 79rem) {
  .box {
    border: 1px solid;
    clear: right;
    float: left;
  }
  .secondary-main {
    padding: 0.01rem;
  }
}

@media screen and (min-width: 80rem) and (max-width: 90rem) {
  .card {
    height: 27rem;
    padding: 0.3rem 0.8rem;
  }

  .bootstrap-wrapper .col-1, .bootstrap-wrapper .col-2, .bootstrap-wrapper .col-3, 
  .bootstrap-wrapper .col-4, .bootstrap-wrapper .col-5, .bootstrap-wrapper .col-6, 
  .bootstrap-wrapper .col-7, .bootstrap-wrapper .col-8, .bootstrap-wrapper .col-9, 
  .bootstrap-wrapper .col-10, .bootstrap-wrapper .col-11, .bootstrap-wrapper .col-12, 
  .bootstrap-wrapper .col, .bootstrap-wrapper .col-auto, .bootstrap-wrapper .col-sm-1, 
  .bootstrap-wrapper .col-sm-2, .bootstrap-wrapper .col-sm-3, .bootstrap-wrapper .col-sm-4, 
  .bootstrap-wrapper .col-sm-5, .bootstrap-wrapper .col-sm-6, .bootstrap-wrapper .col-sm-7, 
  .bootstrap-wrapper .col-sm-8, .bootstrap-wrapper .col-sm-9, .bootstrap-wrapper .col-sm-10, 
  .bootstrap-wrapper .col-sm-11, .bootstrap-wrapper .col-sm-12, .bootstrap-wrapper .col-sm, 
  .bootstrap-wrapper .col-sm-auto, .bootstrap-wrapper .col-md-1, .bootstrap-wrapper .col-md-2, 
  .bootstrap-wrapper .col-md-3, .bootstrap-wrapper .col-md-4, .bootstrap-wrapper .col-md-5, 
  .bootstrap-wrapper .col-md-6, .bootstrap-wrapper .col-md-7, .bootstrap-wrapper .col-md-8, 
  .bootstrap-wrapper .col-md-9, .bootstrap-wrapper .col-md-10, .bootstrap-wrapper .col-md-11, 
  .bootstrap-wrapper .col-md-12, .bootstrap-wrapper .col-md, .bootstrap-wrapper .col-md-auto, 
  .bootstrap-wrapper .col-lg-1, .bootstrap-wrapper .col-lg-2, .bootstrap-wrapper .col-lg-3, 
  .bootstrap-wrapper .col-lg-4, .bootstrap-wrapper .col-lg-5, .bootstrap-wrapper .col-lg-6, 
  .bootstrap-wrapper .col-lg-7, .bootstrap-wrapper .col-lg-8, .bootstrap-wrapper .col-lg-9, 
  .bootstrap-wrapper .col-lg-10, .bootstrap-wrapper .col-lg-11, .bootstrap-wrapper .col-lg-12, 
  .bootstrap-wrapper .col-lg, .bootstrap-wrapper .col-lg-auto, .bootstrap-wrapper .col-xl-1, 
  .bootstrap-wrapper .col-xl-2, .bootstrap-wrapper .col-xl-3, .bootstrap-wrapper .col-xl-4, 
  .bootstrap-wrapper .col-xl-5, .bootstrap-wrapper .col-xl-6, .bootstrap-wrapper .col-xl-7, 
  .bootstrap-wrapper .col-xl-8, .bootstrap-wrapper .col-xl-9, .bootstrap-wrapper .col-xl-10, 
  .bootstrap-wrapper .col-xl-11, .bootstrap-wrapper .col-xl-12, .bootstrap-wrapper .col-xl, 
  .bootstrap-wrapper .col-xl-auto {
    padding-left: 0;
    padding-right: 0;
  }

  p {
    margin-top: 0;
  }

  .bootstrap-wrapper {
    width: 100%;
    margin-left: 0.5rem;
  }

  .searchbox {
    margin: 2rem auto 0.5rem auto;
  }

  #announcement {
    background-color: #f8f9fa;
    border-radius: 1px;
    padding: 2px;
    margin: 0 auto 3px;
    text-align: center;
    max-width: 800px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.05);
    border-left: 1px solid #001F5B;
  }

  #announcement p {
    margin: 0 0 1.2px 0;
    line-height: 2;
  }

  * {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
  }

  body {
    font-family: 'Poppins', sans-serif;
    color: var(--dark);
    background-color: var(--light);
    line-height: 1.6;
    margin: 0;
    padding: 0;
    visibility: visible;
    opacity: 1;
  }

  a {
    text-decoration: none !important;
    border-bottom: none !important;
    display: inline-block;
    color: var(--primary);
    transition: all 0.3s ease;
  }

  a:hover {
    color: var(--secondary);
    text-decoration: none !important;
    border-bottom: none !important;
  }
}

a[target="_blank"] {
    text-decoration: none !important;
    border-bottom: none !important;
    outline: none !important;
    display: inline-block;
}

a[target="_blank"]:hover {
    text-decoration: none !important;
    border-bottom: none !important;
    outline: none !important; 
}

a[target="_blank"] .btn:hover,
a[target="_blank"] .btn:focus {
    border-bottom: none !important;
    text-decoration: none !important;
    outline: none !important;
}

/* Print Styles */
@media print {
  .sidebar, .mobile-menu-toggle, .search-section, .announcement, .footer {
    display: flex;
  }

  .main-content {
    margin-left: 250px !important;
  }
}

/* Visually hide checkbox but keep accessible */
.vh {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

/* Button styles */
.theme-button {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 16px;
  background: #f0f0f0;
  color: #333;
  border-radius: 50px;
  cursor: pointer;
  font-family: sans-serif;
  font-size: 14px;
  border: 1px solid #ddd;
  transition: all 0.3s ease;
  position: fixed;
  top: 15px;
  right: 15px;
  z-index: 1000;
  box-shadow: 0 2px 5px rgba(0,0,0,0.1);
}

/* Button hover state */
.theme-button:hover {
  background: #e0e0e0;
  transform: translateY(-2px);
  box-shadow: 0 4px 8px rgba(0,0,0,0.15);
}

/* Button active state */
.theme-button:active {
  transform: translateY(0);
}

/* Moon/Sun icon */
.theme-icon {
  display: inline-block;
  width: 20px;
  height: 20px;
  background: #333;
  border-radius: 50%;
  position: relative;
  transition: all 0.3s ease;
}

/* Moon details */
.theme-icon::before {
  content: "";
  position: absolute;
  top: 3px;
  left: 10px;
  width: 16px;
  height: 16px;
  background: #f0f0f0;
  border-radius: 50%;
  transition: all 0.3s ease;
}

/* Dark mode styles */
#themer:checked ~ .theme-button {
  background: #333;
  color: #fff;
  border-color: #444;
}

#themer:checked ~ .theme-button .theme-icon {
  background: #ffd700;
  transform: rotate(90deg);
}

#themer:checked ~ .theme-button .theme-icon::before {
  background: transparent;
  box-shadow: 4px -2px 0 #333;
  transform: translate(-5px, 1px);
}

/* Optional: Hide button text on small screens */
@media (max-width: 480px) {
  .theme-text {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip: rect(0,0,0,0);
  }
}
