@font-face {
  font-family: 'Kabel';
  src: url('../fonts/ITCKabelStd-Book.woff2') format('woff2'),
    url('../fonts/ITCKabelStd-Book.woff') format('woff');
  font-weight: normal;
  font-style: normal;
}

/* --- Base Styles (Desktop First) --- */

body {
  padding: 2rem;
}

/* Fix for placeholder visibility on dark background */
.form-control::placeholder {
  color: rgba(255, 255, 255, 0.6);
  opacity: 1;
}

/* Header Title */
.header-text {
  font-family: 'Kabel', sans-serif;
  font-weight: normal;
  font-size: 3.5rem;
}

.header-logo {
  height: 1em;
  width: auto;
  filter: invert(1);
  transform: translateY(10%);
}

.header-logo-link {
  display: flex;
  align-items: center;
}

.font-kabel {
  font-family: 'Kabel', sans-serif;
  font-weight: normal;
}

/* Header Navigation Links */
header nav a:not(.btn) {
  font-size: 1.25rem;
}

/* Header Navigation Buttons */
header nav .btn {
  padding: 0.5rem 1rem;
  font-size: 1.25rem;
}

/* Section Headings */
section h2,
aside h2,
aside h3 {
  font-family: 'Kabel', sans-serif;
  font-weight: normal;
  font-size: 2rem;
}

/* Transcript Synchronization */
.transcript-segment {
  cursor: pointer;
  transition: background-color 0.2s, color 0.2s;
  padding: 2px 4px;
  border-radius: 4px;
}

.transcript-segment:hover {
  background-color: rgba(255, 255, 255, 0.1);
}

.transcript-segment.active {
  background-color: rgba(108, 117, 125, 0.5);
  font-weight: bold;
  color: white;
}

/* Accordion Arrow Fix */
.accordion-button::after {
  filter: invert(1) grayscale(100%) brightness(200%);
}

/* Geo & Person Filter Layout */
/* Default (Desktop) */
#collapseGeo .accordion-body,
#collapsePerson .accordion-body {
  column-count: 3;
  column-gap: 1rem;
}

#collapseGeo .accordion-body .form-check,
#collapsePerson .accordion-body .form-check {
  break-inside: avoid;
  page-break-inside: avoid;
}

/* Carousel */
/* Default (Desktop) */
.people-carousel {
  -ms-overflow-style: none;
  /* IE and Edge */
  scrollbar-width: none;
  /* Firefox */
}

.people-carousel::-webkit-scrollbar {
  display: none;
  /* Chrome, Safari and Opera */
}

/* Standard on Desktop */
.person-carousel-item {
  width: 200px;
}

.carousel-nav-btn {
  width: 40px;
  height: 40px;
  font-size: 1rem;
}


/* Sidebar Layout */
.lesson-sidebar {
  border-left: 1px solid;
  /* Color inherited from border-secondary class */
}


/* --- Media Queries (Mobile/Tablet Overrides) --- */
/* Mobile (approx < 768px) */
@media (max-width: 768px) {
  body {
    padding: 1rem;
  }

  /* Header Title */
  .header-text {
    font-size: 2rem;
  }

  /* Header Navigation Links */
  header nav a:not(.btn) {
    font-size: 0.875rem;
  }

  /* Header Navigation Buttons */
  header nav .btn {
    padding: 0.25rem 0.5rem;
    font-size: 0.875rem;
  }

  /* Section Headings */
  section h2 {
    font-size: 1.5rem;
  }

  /* Carousel Item Sizing: Big on Mobile */
  .person-carousel-item {
    width: 250px;
  }

  /* Carousel Nav Buttons Sizing */
  .carousel-nav-btn {
    width: 32px;
    height: 32px;
    font-size: 0.8rem;
  }

  /* Sidebar Layout: Border Top instead of Left on Mobile */
  .lesson-sidebar {
    border-left: none;
    border-top: 1px solid;
  }
}

/* Small Mobile (approx < 576px) */
@media (max-width: 576px) {

  /* Hide header text, show only logo */
  .header-text a.text-white {
    display: none;
  }
}

/* --- Tooltip Styles --- */
.entity-tooltip {
  position: absolute;
  background: #fff;
  color: #212529;
  border: 1px solid #dee2e6;
  border-radius: 6px;
  padding: 12px;
  z-index: 1000;
  box-shadow: 0 0.5rem 1rem rgba(0, 0, 0, 0.15);
  pointer-events: auto;
  min-width: 250px;
  max-width: 300px;
}

.entity-tooltip h6 {
  margin-bottom: 0.5rem;
  font-size: 1rem;
  border-bottom: 1px solid #dee2e6;
  padding-bottom: 0.5rem;
  font-weight: 600;
}

.tooltip-map {
  width: 100%;
  height: 150px;
  border-radius: 4px;
  margin-top: 8px;
  border: 1px solid #dee2e6;
}

.tooltip-image-container {
  width: 100%;
  aspect-ratio: 1 / 1;
  border-radius: 4px;
  margin-top: 8px;
  overflow: hidden;
  border: 1px solid #dee2e6;
  background: #f8f9fa;
  display: flex;
  align-items: center;
  justify-content: center;
}

.tooltip-image {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* Base close button (hidden on desktop usually, but structure might need it) */
.tooltip-close {
  display: none;
}

@media (max-width: 768px) {
  .entity-tooltip {
    position: fixed;
    top: auto !important;
    /* Override inline styles from JS */
    left: 0 !important;
    bottom: 0 !important;
    width: 100%;
    max-width: none;
    height: auto;
    border-radius: 12px 12px 0 0;
    padding: 20px;
    z-index: 1050;
    background: #212529;
    color: #fff;
    border: 1px solid #343a40;
    border-bottom: none;
    box-shadow: 0 -5px 20px rgba(0, 0, 0, 0.5);
    display: flex;
    flex-direction: column;
    animation: slideUp 0.3s ease-out;
  }

  /* Overlay effect using box-shadow abuse or a separate element? 
     Let's stick to just the sheet for now as per image. 
  */

  .entity-tooltip h6 {
    font-size: 1.1rem;
    margin-right: 20px;
    /* Space for close button */
    border-bottom-color: #495057;
  }

  .tooltip-close {
    display: block;
    position: absolute;
    top: 15px;
    right: 15px;
    background: none;
    border: none;
    color: rgba(255, 255, 255, 0.7);
    font-size: 1.5rem;
    line-height: 1;
    padding: 0;
    cursor: pointer;
  }

  .tooltip-close:hover {
    color: #fff;
  }

  /* Adjust internal content for mobile */
  .tooltip-map {
    height: 200px;
    border-color: #495057;
  }

  .tooltip-image-container {
    background: #343a40;
    border-color: #495057;
  }

  @keyframes slideUp {
    from {
      transform: translateY(100%);
    }

    to {
      transform: translateY(0);
    }
  }

  /* Hero Section */
  .hero-content {
    max-width: 900px;
    margin: 0 auto;
  }
}