/*
 * REVISED FOR BOOTSTRAP 5
 * Unnecessary or outdated Bootstrap 3 overrides have been removed or commented out.
 * Your custom component styles (events, tooltips, etc.) have been kept as they don't conflict.
*/


/* --- General Layout & Body --- */

/* This is still needed to push content down below your .fixed-top navbar.
   You may need to adjust the value if your navbar height changes. */
body {
  padding-top: 40px; /* Increased slightly for a common BS5 navbar height */
  /* If you implement a sticky footer using flexbox, you may add more styles here */
}

h2 {
    font-weight: bold;
}

/* --- Navbar & Header --- */

.top-container {
    padding-left: 50px;
    padding-right: 50px;
}

.navbar-top {
    border-bottom:none;
    box-shadow: 0 4px 6px -1px rgba(0,0,0,0.1); /* A more modern shadow effect */
    /* NOTE: You can also use Bootstrap's built-in shadow classes like `.shadow-sm`
       directly on the navbar element in your HTML for a similar effect. */
}

/*
 * Navbar Logo Size
*/
.navbar-brand {
    width: 107px;
    height: 70px;
    display: inline-block;
    margin-bottom: -70px; /* Be careful with large negative margins. */
}

.navbar-brand img {
    width: auto;
    height: 90px;
    margin-top: -38px;
    margin-left: -20px;
}

/*
 * Dark Mode Logo Swap
*/

/* By default, hide the dark logo */
.logo-dark {
  display: none;
}
.logo-light {
  display: block;
}

/* When dark mode is active, hide the light logo and show the dark one */
[data-bs-theme="dark"] .logo-dark {
  display: block;
}
[data-bs-theme="dark"] .logo-light {
  display: none;
}

.navbar.bg-light {
    background-color: white !important; /* Overriding BS5's default .bg-light */
}

.navbar .navbar-nav .nav-link {
    color: black;
    font-size: 18px;
}

[data-bs-theme="dark"] .navbar .navbar-nav .nav-link {
  color: rgba(255, 255, 255, 0.65); /* A slightly muted white, Bootstrap's default */
}

[data-bs-theme="dark"] .navbar .navbar-nav .nav-link:hover {
  color: #fff; /* Full white on hover */
}

/* Optional: To make the entire navbar even shorter, you can reduce its padding. */
.navbar {
    padding-top: 0.25rem;
    padding-bottom: 0.25rem;
    background-color: #f8f9fa; /* Bootstrap's light color */
    border-bottom: 1px solid #dee2e6;
}
[data-bs-theme="dark"] .navbar {
    background-color: #212529; /* Bootstrap's dark color */
    border-bottom: 1px solid #343a40;
}

/*
 * Mobile Navbar Fix
 * Adds a top margin to the expanded menu on small screens
 * to prevent it from being overlapped by the site logo.
*/
@media (max-width: 991.98px) {
  .navbar-collapse {
    margin-top: 20px; /* This creates the space. Adjust this value as needed. */
    border-bottom: 1px solid #dee2e6; /* Adds a clean bottom border */
  }
}

/* --- General Utilities & Custom Components (SAFE) --- */
/* The following styles are custom to your site and do not clash with Bootstrap 5. They are safe to keep. */

a[href^="http://"]:not(.btn),
a[href^="https://"]:not(.btn),
a[href^="mailto:"]:not(.btn) {
    background: url(../img/external-link-10.png) center right no-repeat;
    padding-right: 13px;
}

.black_text {
    color: black;
    font-weight: bold;
}

.copyright-text {
    color: black;
    vertical-align: middle;
    padding-top: 14px;
}

img.diploma {
    border:5px solid black;
}

.events-title {
    border-bottom: 1px solid lightgray;
}

/* Event tiles styling */
.event-tile {
  transition: transform 0.2s ease-in-out, box-shadow 0.2s ease-in-out;
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
  display: flex; /* Use flexbox to control the inner layout */
  flex-direction: column; /* Stack image and content vertically */
  height: 100%; /* Ensure tile fills its container (for grid layouts) */
}

.event-tile:hover {
  transform: scale(1.03);
  box-shadow: 0 8px 16px rgba(0,0,0,0.2);
}

.event-tile .card-img-top {
    aspect-ratio: 1 / 1;
    object-fit: contain;
    background-color: transparent;
}

.event-tile .card-body {
  display: flex;
  flex-direction: column; /* Stack content inside the body */
  flex-grow: 1; /* Allow the body to grow and fill space */
}

.event-tile .card-title {
    font-size: 1.25rem;
    font-weight: bold;
}

.event-tile .card-text.event-tile-status {
    margin-top: auto; /* This pushes the status to the bottom */
    font-weight: bold;
}

/* Event list item styling (SAFE) */
/*
 * Flexbox Wrapping Grid for Event Tiles
*/
.event-grid {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-start;
  gap: 1rem; /* A smaller, consistent gap */
}

.event-grid > * {
  width: 350px;
  max-width: 100%;
}

/*
 * Card Image Customization
 * Creates a square image container for event tiles.
*/
.card .card-img-top {
  width: 100%; /* Make the image container take the full width of the card */
  object-fit: contain; /* Scale image down to fit inside the square, without cropping */
  background-color: transparent; /* Optional: A light background for any empty space */
}

[data-bs-theme="dark"] .card {
  background-color: #2b3035; /* A slightly lighter dark gray than the body */
  color: #dee2e6; /* A light gray for text */
  border-color: #495057; /* A subtle border in dark mode */
}

/* For event titles within the card */
[data-bs-theme="dark"] .card .card-title {
  color: #f8f9fa; /* Ensure titles are bright white */
}

[data-bs-theme="dark"] .card .card-body {
  background-color: inherit; /* This makes it match the card's background */
}

/* For muted text (like dates, registration counts) within the card */
[data-bs-theme="dark"] .card .text-body-secondary {
  color: #adb5bd !important; /* Muted light gray for secondary text */
}

/* For the status text (Open/Closed) */
[data-bs-theme="dark"] .event-tile-status.text-success {
  color: #74b88f !important; /* A light green for success */
}

[data-bs-theme="dark"] .event-tile-status.text-danger {
  color: #ea868f !important; /* A light red for danger */
}

/* Dropzone styling (SAFE) */
div#gray-cover {
    position: fixed;
    top: 0;
    left: 0;
    z-index: 9999; /* Adjusted z-index */
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    display: table;
    text-shadow: 1px 1px 2px #000;
    color: #fff;
    font: bold 42px Oswald, DejaVu Sans, Tahoma, sans-serif;
}
div.gray-cover-text {
    display: table-cell;
    text-align: center;
    vertical-align: middle;
}
.event-cover-image-upload {
    max-width: 100%; /* Let the grid system control the size */
    border-radius: 10px;
}
.dropzone {
    border-radius: 10px;
}
.dz-message {
    font-size: 30px;
    font-weight: bold;
}

/* Custom tooltips (SAFE) */
.my_tooltip {
    /* These custom components are fine as they use unique class names. */
}

/* Your custom modal styles (SAFE) */
.rc-modal-background {
    position: fixed;
    z-index: 1060; /* Position it just above BS5's backdrop z-index */
    width: 100%;
    height: 100%;
    top: 0;
    left: 0;
    background: rgba(0,0,0,0.4);
}
.rc-modal-message {
    margin: 5px;
}
.rc-modal-messages-container {
    width: 100%;
    margin: 0 auto;
    top: 0;
    position: relative;
    overflow: auto;
    max-height: 100%;
    padding: 50px 25%;
}

/* --- Footer Link Styling --- */
.footer .nav-link {
  color: #212529; /* A standard dark gray, Bootstrap's default body text color */
  text-decoration: none; /* Removes the underline by default */
}
[data-bs-theme="dark"] .footer .nav-link {
  color: #adb5bd; /* A muted light gray */
}

.footer .nav-link:hover {
  color: #000; /* Makes the link black on hover */
  text-decoration: underline; /* Adds an underline on hover for clear feedback */
}
[data-bs-theme="dark"] .footer .nav-link:hover {
  color: #fff; /* White on hover */
}

/*
 * Fixed Navbar Anchor Link Fix
*/
.scroll-anchor {
  display: block;
  position: relative;
  top: -70px; /* This value should be a little MORE than your navbar's height */
  visibility: hidden;
}