:root {
      --body: #000000;
      --fg: #ffffff;
      --accent-color: #3376f2;
      --card-color: #3c4148;
      --border-color: #444;
      --bg: #333;
      --popup-bg: rgba(42, 42, 42, 0.9);
      --button: #1a3b7a;
}

* {
  box-sizing: border-box;
  padding: 0;
  max-width: 100vw;
    scroll-behavior: smooth;
}

body, main {
  min-width: 70%;
  max-width: 100vw;
  overflow-x: hidden;
}

body {
  font-family: 'Inter', system-ui, sans-serif;
  background-color: var(--body);
  color: var(--fg);
  max-height: 100%;
  max-width: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  -webkit-text-size-adjust: 100%;
}

.banner {
  width: 100vw;
  position: sticky;
  z-index: 0;
  top: 0;
}

.container {
    position: relative;
    z-index: 2;
  width: 90%;
  max-width: 90%;
  background-color: var(--bg);
  border: 1px solid var(--border-color);
  padding: 20px;
  margin: 20px auto;
  border-radius: 12px;
  box-shadow: 0 4px 12px rgba(0,0,0,0.15);
}

h1, h2, h3, h4 {
  color: var(--fg);
  margin-bottom: 20px;
}

h1 { font-size: 2.3rem; }
h2 { font-size: 2rem; }
h3 { font-size: 1.6rem; white-space: pre-wrap; }
h4 { font-size: 1.4rem; }

p {
  font-size: 1.2rem;
  line-height: 1.6;
  margin: 15px;
}

a {
  color: var(--accent-color);
  text-decoration: none;
  font-weight: 500;
}

a:hover {
  text-decoration: underline;
}

hr { border: 1px solid var(--accent-color); height: 2px; margin-bottom: 15px; }

.modal, .contact-modal {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    z-index: 1001;
    background: var(--popup-bg);
    padding: 25px;
    border-radius: 12px;
    display: none;
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
    max-width: 90%;
    width: 400px;
    text-align: left;
    transition: opacity 0.3s ease;
}
.modal p, .contact-modal p {
    margin: 10px 0;
}
.modal-overlay, #contact-modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    z-index: 1000;
    display: none;
    transition: opacity 0.3s ease;
}
.popup {
    position: fixed;
    bottom: 0;
    margin-right: auto;
    margin-left: auto;
    width: 100%;
    z-index: 1001;
    background: var(--popup-bg);
    padding: 20px;
    display: block;
    box-shadow: 0 -4px 12px 0 rgba(0, 0, 0, 0.15);
    opacity: 1;
    animation: fadeIn 0.5s ease-in;
}

@keyframes fadeIn {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}
     
button, .button {
    display: block;
    width: fit-content;
    padding: 12px 20px;
    background-color: var(--button);
    color: var(--fg);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    margin: 15px auto 15px auto;
    font-weight: bold;
    cursor: pointer;
    font-size: 1.1rem;
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
    transition: background-color 0.2s ease, transform 0.1s ease;
}

button:hover:not(.disabled) {
  background-color: var(--accent-color);
  transform: translateY(-2px);
}

button:disabled {
  background-color: #666;
  cursor: not-allowed;
}

.obutton {
    display: block;
    width: fit-content;
  padding: 12px 20px;
  background: none;
  color: var(--accent-color);
  border: 1px solid var(--accent-color);
  border-radius: 8px;
  margin: 15px auto 15px auto;
  font-weight: bold;
  cursor: pointer;
  font-size: 1.1rem;
  box-shadow: 0 4px 12px rgba(0,0,0,0.15);
  transition: background-color 0.2s ease, transform 0.1s ease;
}

.obutton:hover {
  background-color: var(--accent-color);
  transform: translateY(-2px);
}

.widebutton {
    display: block;
    width: fit-content;
  padding: 12px 20px;
  background-color: var(--button);
  color: var(--fg);
  border: 1px solid var(--border-color);
  border-radius: 8px;
  margin: 15px auto 15px auto;
  font-weight: bold;
  cursor: pointer;
  font-size: 1.1rem;
  box-shadow: 0 4px 12px rgba(0,0,0,0.15);
  transition: background-color 0.2s ease, transform 0.1s ease;
}

.widebutton:hover {
  background-color: var(--accent-color);
  transform: translateY(-2px);
}

.bigbutton {
    display: block;
    width: 70%;
  padding: 12px 20px;
  background-color: var(--button);
  color: var(--fg);
  border: 1px solid var(--border-color);
  border-radius: 8px;
  margin: 30px auto 30px auto;
  font-weight: bold;
  cursor: pointer;
  font-size: 1.1rem;
  box-shadow: 0 4px 12px rgba(0,0,0,0.15);
  transition: background-color 0.2s ease, transform 0.1s ease;
}

.bigbutton:hover {
  background-color: var(--accent-color);
  transform: translateY(-2px);
}

.button-group {
    display: flex;
    flex-direction: row;
    gap: 7.5px;
    width: 100%;
    margin-right: auto;
    margin-left: auto;
}

.button-group .button, .button-group button, .button-group .obutton, .button-group input, .button-group select {
    display: block;
    margin: 7.5px;
    width: 50%;
}

.button-list {
  width: 90%;
  display: block;
  flex-direction: column;
  gap: 0px;
  border: 1px solid var(--border-color); /* Fixed typo: '1pm' to '1px' */
  border-radius: 8px;
  margin-right: auto;
  margin-left: auto;
}

.button-list .button, .button-list button {
  width: 100%;
  background-color: var(--card-color);
  border: 0px;
  margin: 0px;
  position: relative;
  text-align: left;
}

.button-list .button:hover:not(.disabled) {
  background-color: var(--accent-color);
}

.button-list .button::after {
  content: "▶";
  position: absolute;
  right: 15px;
  top: 50%;
  transform: translateY(-50%);
  font-size: 16px;
}

form {
  display: flex;
  flex-direction: column;
  gap: 10px;
  max-width: 97%;
  margin: 0 auto;
}

button[type="submit"] {
    margin: 15px auto;
    min-width: 50%;
}

label {
    display: inline;
  font-size: 1rem;
  text-align: left;
}

.checkbox {
    display: inline;
    width: 15px;
    height: 15px;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    cursor: pointer;
}

input, textarea, select {
  padding: 12px;
  margin: 15px auto 15px auto;
  border: 1px solid var(--border-color);
  border-radius: 8px;
  background-color: #333;
  color: var(--fg);
  font-size: 1rem;
  width: 95%;
  box-shadow: 0 2px 6px rgba(0,0,0,0.1);
}

input[type="tel"], input[type="email"] {
  background-color: var(--bg);
  border-color: var(--accent-color);
  font-family: 'Inter', sans-serif;
}

input:focus, textarea:focus, select:focus {
  border-color: var(--accent-color);
  outline: none;
  box-shadow: 0 0 0 2px rgba(51, 118, 242, 0.3);
}

textarea {
  resize: vertical;
  min-height: 100px;
}

audio {
  background-color: var(--button);
  color: var(--fg);
  border: 1px solid var(--border-color);
  border-radius: 8px;
  margin-top: 15px;
  margin-bottom: 15px;
  margin-left: auto;
  margin-right: auto;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
  display: block;
  width: 600px;
  max-width: 90%;
}

audio::-webkit-media-controls-panel {
  background-color: var(--button);
  color: var(--fg);
  border: 1px solid var(--border-color);
  border-radius: 8px;
  padding: 0;
}

audio::-webkit-media-controls-enclosure {
  background-color: var(--button);
  border: none;
  border-radius: 8px;
  overflow: hidden;
}

audio::-webkit-media-controls-play-button,
audio::-webkit-media-controls-volume-slider, 
audio::-webkit-media-controls-volume-button,
audio::-webkit-media-controls-timeline {
  background-color: var(--button);
  color: var(--fg);
  border: none;
  border-radius: 4px;
}

audio::-webkit-media-controls-current-time-display,
audio::-webkit-media-controls-time-remaining-display {
  color: var(--fg);
}

.resource-list {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 15px;
}

.list-item {
    position: relative;
    background-color: var(--card-color);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 16px 16px 60px 16px;
    text-align: center;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    cursor: pointer;
    align-items: center;
    text-align: center;
}
    
.list-item .button-group {
        display: flex;
        flex-direction: row;
        position: absolute;
        width: fit-content;
        bottom: 0;
        left: 0;
        right: 0;
        margin-left: auto;
        margin-right: auto;
        margin-bottom: 15px;
        margin-top: 15px;
    }

    .list-item .button {
        display: block;
        margin: 5px;
        width: fit-content;
        background-color: var(--button);
        color: var(--fg);
        border: 1px solid var(--border-color);
        border-radius: 8px;
        font-weight: bold;
        cursor: pointer;
        box-shadow: 0 4px 12px rgba(0,0,0,0.15);
        text-decoration: none;
    }

.no-results {
  font-size: 1.2rem;
  margin-top: 20px;
}

img, video {
    display: block;
    max-height: 80vh;
    width: auto;
    margin-bottom: 20px;
    margin-top: 20px;
    margin-right: auto;
    margin-left: auto;
    border-radius: 8px;
}

@media (max-width: 1030px) {
    header .container {
        flex-direction: column;
        gap: 15px;
    }
    header nav {
        display: none;
    }
    header .menu-toggle {
        display: block;
    }
    header .mobile-nav.active {
        display: flex;
    }
}

@media (max-width: 800px) {
    h1 { font-size: 2.2rem; }
    h2 { font-size: 1.8rem; }
    h3 { font-size: 1.4rem; }
    h4 { font-size: 1.2rem; }
    .container {
        width: 95%;
        max-width: 95%;
    }
    button, .button {
        font-size: 0.8rem;
    }
    .search-form input, .search-form button {
        border-radius: 8px;
        width: 100%;
    }
    .list-item {
        display: flex;
        flex-direction: column;
    }
    .list-item .button-group {
        position: relative;
        display: flex;
        flex-direction: row;
        width: 90%;
        margin: 0px;
        padding: 0px;
    }
    .list-item .button-group .button, .list-item .button-group a {
        display: block;
        width: 100%;
        margin: 0px;
        margin-right: auto;
        margin-left: auto;
    }
}

@media (max-width: 600px) {
    .container {
    width: 95vw;
    max-width: 580px;
    padding: 35px;
  }
  h1 { font-size: 1.9rem; }
  h2 { font-size: 1.6rem; }
  h3 { font-size: 1.2rem; }
  h4 { font-size: 1rem; }
  button, .button {
        padding: 10px 15px;
  }
  p, button, .button, input, textarea, select {
    font-size: 0.95rem;
  }
  .list-item .button-group {
      flex-direction: column;
      flex: 1;
  }
}

/* New Dashboard Classes */
.navbar-ibe {
    position: fixed;
    top: 0;
    z-index: 1030;
    width: 100%;
    box-shadow: 0 2px 10px rgba(0,0,0,0.15);
    background-color: var(--body);
    border-bottom: 1px solid var(--border-color);
}

.navbar-toggler-ibe {
    border: 1px solid var(--border-color);
    background-color: var(--card-color);
}

.navbar-toggler-icon {
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 30 30'%3e%3cpath stroke='rgba%28255, 255, 255, 0.75%29' stroke-linecap='round' stroke-miterlimit='10' stroke-width='2' d='M4 7h22M4 15h22M4 23h22'/%3e%3c/svg%3e");
}

.sidebar-ibe, .offcanvas-ibe {
    width: 240px;
    background-color: var(--card-color);
    box-shadow: 2px 0 8px rgba(0,0,0,0.15);
    position: fixed;
    top: 56px;
    bottom: 0;
    padding: 6px;
    overflow-y: auto;
    z-index: 1000;
    border-right: 1px solid var(--border-color);
}

.sidebar-ibe .list-group-item-ibe, .offcanvas-ibe .list-group-item-ibe {
    background-color: transparent;
    border: none;
    color: var(--fg);
    cursor: pointer;
    padding: 8px 12px;
    border-radius: 6px;
    margin-top: 4px;
    transition: background-color 0.2s ease;
}

.sidebar-ibe .list-group-item-ibe:hover, .offcanvas-ibe .list-group-item-ibe:hover {
    background-color: var(--accent-color);
    color: var(--fg);
}

.sidebar-ibe .list-group-item-ibe.active, .offcanvas-ibe .list-group-item-ibe.active {
    background-color: var(--accent-color);
    color: var(--fg);
    font-weight: 500;
}

.sidebar-ibe .bottom-tabs, .offcanvas-ibe .bottom-tabs {
    position: absolute;
    bottom: 16px;
    width: 230px;
    border-top: 1px solid var(--border-color);
    padding-top: 16px;
}

.main-content-ibe {
    flex: 1;
    margin-left: 240px;
    padding: 16px;
    margin-top: 56px;
    background-color: var(--body);
    min-height: calc(100vh - 56px);
}

.tab-pane-ibe {
    display: none;
    padding: 20px;
    background-color: var(--bg);
    border-radius: 12px;
    border: 1px solid var(--border-color);
}

.tab-pane-ibe.show.active {
    display: block;
}

.empty-message {
    text-align: center;
    font-size: 1.1rem;
    margin-top: 40px;
    color: var(--fg);
    opacity: 0.7;
}

.ibe-table {
    width: 100%;
    border-collapse: collapse;
    background-color: var(--card-color);
    border-radius: 8px;
    overflow: hidden;
    margin-top: 20px;
}

.ibe-table th, .ibe-table td {
    padding: 12px;
    text-align: left;
    border-bottom: 1px solid var(--border-color);
    color: var(--fg);
}

.ibe-table th {
    background-color: var(--button);
}

.resource-form {
    display: flex;
    flex-direction: column;
    gap: 15px;
    max-width: 600px;
    margin-bottom: 30px;
}

.resource-form label {
    text-align: left;
    font-weight: 500;
}

.resource-card-wrapper {
    margin-bottom: 20px;
}

.resource-card-wrapper-new {
    display: flex;
    align-items: flex-start;
    background-color: var(--card-color);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 20px;
    margin-bottom: 20px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
    transition: box-shadow 0.2s;
}

.resource-card-wrapper-new:hover {
    box-shadow: 0 6px 16px rgba(0,0,0,0.2);
}

.resource-logo-new {
    width: 100px;
    height: 100px;
    object-fit: contain;
    border-radius: 8px;
    margin-right: 20px;
}

.resource-info-new {
    flex: 1;
    text-align: left;
}

.resource-info-new h2 {
    margin: 0 0 10px 0;
    color: var(--accent-color);
}

.resource-info-new p {
    margin: 0;
    font-size: 1rem;
}

.resource-actions-new {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 10px;
}

.resource-actions-new .button {
    width: 200px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    text-align: center;
    margin: 0;
}

.categories {
    display: flex;
    flex-wrap: nowrap;
    overflow-x: auto;
    gap: 8px;
    margin: 15px 0 25px 0;
    white-space: nowrap;
    padding-bottom: 5px;
}

.category-badge {
    display: inline-block;
    color: var(--fg);
    padding: 6px 12px;
    border: 1px solid var(--border-color);
    border-radius: 20px;
    font-size: 0.95rem;
    cursor: pointer;
    transition: background-color 0.2s, transform 0.1s;
    min-width: fit-content;
}

.category-badge:hover {
    background-color: var(--accent-color);
    transform: translateY(-2px);
}

.category-badge.selected {
    background-color: var(--accent-color);
}

.tag-badge-new {
    display: inline-block;
    color: var(--fg);
    padding: 5px 10px;
    border: 1px solid var(--border-color);
    border-radius: 20px;
    font-size: 0.9rem;
    cursor: pointer;
    transition: background-color 0.2s;
    max-width: 200px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.tag-badge-new:hover {
    background-color: var(--accent-color);
}

.resource-card-wrapper .resource-card {
    background-color: var(--card-color);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 20px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
    transition: box-shadow 0.2s;
}

.resource-card:hover {
    box-shadow: 0 6px 16px rgba(0,0,0,0.2);
}

.resource-card h2 {
    margin-top: 0;
    color: var(--accent-color);
}

.list-buttons {
    display: flex;
    gap: 10px;
    justify-content: center;
    margin-top: 15px;
}

.ibe-alert {
    background-color: var(--popup-bg);
    color: var(--fg);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 15px;
    margin-bottom: 20px;
}

.btn-close-white {
    filter: invert(1);
}

.form-control {
    width: 100%;
    padding: 10px;
    border: 1px solid var(--border-color);
    border-radius: 6px;
    background-color: #333;
    color: var(--fg);
}

.tags {
    display: flex;
    flex-direction: row;
    gap: 5px;
    margin-bottom: 10px;
}

.tag-badge {
    display: block;
    color: var(--fg);
    padding: 12px 20px;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    font-size: 12px;
}

.highlight {
    background-color: yellow;
    color: black;
    transition: background-color 1s ease;
}

.highlight.fade {
    background-color: transparent;
}

.collapsible {
    background-color: var(--button);
    color: var(--fg);
    cursor: pointer;
    padding: 18px;
    width: 100%;
    border: none;
    text-align: left;
    outline: none;
    font-size: 15px;
    border-radius: 8px;
    margin-bottom: 10px;
}

.collapsible-content {
    padding: 0 18px;
    overflow: hidden;
    background-color: var(--bg);
    border-radius: 8px;
}

.extended-item, .content-item {
    background-color: var(--bg);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 10px;
    margin-bottom: 10px;
}

.extended-items, .content-items {
    list-style-type: none;
    padding: 0;
}

.extended-field, .content-field {
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.contact-btn {
    background-color: var(--button);
}

@media (max-width: 768px) {
    .resource-card-wrapper-new {
        flex-direction: column;
        align-items: center;
        padding: 15px;
    }
    .resource-logo-new {
        width: 30px;
        height: 30px;
        margin-right: 10px;
        margin-bottom: 0;
    }
    .resource-info-new {
        flex: 1;
        width: 100%;
        text-align: center;
    }
    .resource-info-new h2 {
        font-size: 1.4rem;
        display: flex;
        align-items: center;
        justify-content: center;
    }
    .resource-info-new p {
        font-size: 0.95rem;
        margin-top: 10px;
    }
    .resource-actions-new {
        flex-direction: column;
        align-items: stretch;
        gap: 10px;
        margin-top: 15px;
        width: 100%;
    }
    .resource-actions-new .button {
        width: 100%;
        text-align: center;
    }
}

@media (max-width: 900px) {
    .main-content-ibe {
        margin-left: 0;
    }
    .sidebar-ibe {
        display: none;
    }
    .offcanvas-ibe .list-group-item-ibe {
        color: var(--fg);
    }
    .offcanvas-ibe {
        background-color: var(--bg);
    }
    .resource-list {
        grid-template-columns: 1fr;
    }
    .resource-card-wrapper-new {
        flex-direction: column;
        align-items: center;
    }
    .resource-logo-new {
        margin-right: 0;
        margin-bottom: 15px;
    }
    .resource-info-new {
        text-align: center;
    }
    .resource-actions-new {
        align-items: center;
        margin-top: 15px;
    }
}