@font-face {
  font-family: 'TheHeraldFont'; 
  src: url('/lhub_frontend/fonts/UnifrakturCook-Bold.ttf') format('truetype');
  font-weight: 700;
  font-style: normal;
}

@font-face {
  font-family: 'LeagueGothicLocal'; 
  src: url('/lhub_frontend/fonts/LeagueGothic-Regular-VariableFont_wdth.ttf') format('truetype');
  font-weight: normal;
  font-style: normal;
}

html {
  font-size: 16px;
}

body, .visualisation, .chart, .network, .vis-network, .wordcloud, .explanation, .legend, .description, .sidebar, .tag-info {

  font-family: 'Segoe UI', 'Arial', 'Helvetica Neue', Arial, sans-serif;
  font-size: 1rem;
  color: #101828 !important;
  background: #F8FAFB; 
  line-height: 1.6;
}

.marker-cluster-low { background: #D0EBFF !important; color: #1766A3; }
.marker-cluster-medium { background: #7CB8E2 !important; color: #FFF; }
.marker-cluster-high { background: #1766A3 !important; color: #FFF; }


.filter-container, .search-bar, .sidebar {
  background: #FFFFFF;
  border-radius: 12px;
  box-shadow: 0 1px 8px rgba(30,60,90,0.06);
  padding: 1em;
}

.fullscreen-graph-overlay {
  position: fixed;
  inset: 0;
  background: rgba(20, 20, 30, 0.98);
  z-index: 20000;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}
.fullscreen-graph-container {
  width: 95vw;
  height: 90vh;
  background: #111b;
  border-radius: 18px;
  padding: 14px;
  box-shadow: 0 0 40px #000c;
  position: relative;
}
.fullscreen-graph-close {
  position: absolute;
  top: 10px;
  right: 14px;
  background: #fff4;
  color: #222;
  border: none;
  font-size: 2rem;
  border-radius: 6px;
  padding: 2px 16px 2px 8px;
  cursor: pointer;
  z-index: 1001;
  font-weight: bold;
  transition: background 0.2s;
}
.fullscreen-graph-close:hover {
  background: #fff;
}
.fullscreen-btn {
  position: absolute;
  top: 10px;
  left: 10px;
  z-index: 500;
  background: #fff9;
  border: 1px solid #eee;
  border-radius: 6px;
  padding: 4px 10px;
  font-size: 13px;
  cursor: pointer;
  box-shadow: 0 2px 6px #0001;
  transition: background 0.2s;
}
.fullscreen-btn:hover {
  background: #fff;
}


button, .button {
  font-family: inherit;
  font-size: 1rem;
  color: #FFF;
  background: #1766A3;
  border: none;
  border-radius: 8px;
  padding: 0.6em 1.2em;
  cursor: pointer;
  transition: background 0.2s;
}
button:hover, .button:hover {
  background: #154a7d;
}


h1 { font-size: 2rem; font-weight: 700; color: #1766A3; text-align: center; }
h2 { font-size: 1.5rem; font-weight: 600; color: #1766A3; text-align: center; }
h3 { font-size: 1.2rem; font-weight: 500; color: #2890E1; text-align: center; }
a { color: #1766A3; text-decoration: underline; font-weight: 500; }
a:hover { color: #154a7d; }

.viz-wrapper {
    position: relative;
    width: 100%;
    height: 400px;
    background-color: #f0f0f0;
    border: 1px solid #ddd;
    border-radius: 8px;
    overflow: hidden;
}

.viz-fullscreen-mode {
    position: fixed !important;
    top: 0 !important;
    left: 0 !important;
    width: 100vw !important;
    height: 100vh !important;
    background-color: #F8FAFB !important;
    z-index: 10000 !important;
    padding: 20px !important;
    box-sizing: border-box !important;
    border-radius: 0 !important;
    display: flex !important; 
    flex-direction: column !important; 
}

.viz-wrapper > div[id$="-diagram"] {
    width: 100% !important;
    height: 100% !important;
}

.fullscreen-toggle-btn {
    position: absolute;
    top: 10px;
    right: 10px;
    z-index: 100;
    padding: 6px 10px;
    background-color: rgba(255, 255, 255, 0.8);
    border: 1px solid #ccc;
    border-radius: 5px;
    cursor: pointer;
    font-size: 0.9em;
    transition: background-color 0.2s;
    color: black;
}

.fullscreen-toggle-btn:hover {
    background-color: rgb(169, 215, 255);
}

.close-fullscreen-btn {
    position: absolute !important;  
    top: 15px !important;
    right: 20px !important;
    font-size: 28px !important;
    font-weight: bold !important;
    background: none !important;
    border: none !important;
    color: #333 !important;
    cursor: pointer !important;
    z-index: 10001 !important;
    padding: 5px !important;
    line-height: 1 !important;
}

.close-fullscreen-btn:hover {
    color: #000;
}

#network-diagram,
#infrastructure-network-diagram {
    width: 100% !important; 
    height: 100% !important;
}
.map-control {
  position: absolute;
  top: 10px;
  right: 10px;
  z-index: 1000;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
}

#searchToggle {
  background: white;
  border: 1px solid #ccc;
  border-radius: 6px;
  padding: 6px;
  font-size: 16px;
  cursor: pointer;
}



#searchSuggestions {
  display: none;
  background: #1b2b3a;  
  border: 1px solid #ccc;
  border-radius: 4px;
  max-height: 150px;
  overflow-y: auto;
  list-style: none;
  padding: 0;
  margin: 6px 0 0 0;
  width: 220px;
  color: white; 
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.6);
}

#searchSuggestions li {
  padding: 8px;
  cursor: pointer;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

#searchSuggestions li:last-child {
  border-bottom: none;
}

#searchSuggestions li:hover {
  background: rgba(255, 255, 255, 0.1); 
}

.info-box {
    background: rgba(255, 255, 255, 0.1);
    padding: 15px;
    border-radius: 12px;
    max-width: 900px;
    margin: 10px auto;
    text-align: justify;
}

#infrastructure-network-diagram {
    opacity: 0;
    transform: scale(0.98);
    transition: opacity 0.6s ease, transform 0.6s ease;
    will-change: opacity, transform;
  }
  
  #infrastructure-network-diagram.visible {
    opacity: 1;
    transform: scale(1);
  }

    #visualizations {
    max-width: 1200px;
    margin: 0 auto;
    padding: 40px 20px;
}

.grid-2 {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(400px, 1fr));
    gap: 40px;
    padding: 0;
    margin-top: 50px; 
}
  
.grid-2 > div {
    background: rgba(255, 255, 255, 0.03);
    padding: 20px;
    border-radius: 12px;
    box-shadow: 0 0 10px rgba(0, 0, 0, 0.2);
}

.viz-container-standalone {
    background: rgba(255, 255, 255, 0.03); 
    padding: 20px;
    border-radius: 12px;
    box-shadow: 0 0 10px rgba(0, 0, 0, 0.2); 
    margin-top: 40px; 
}

.container {
    display: flex;
    flex-direction: column;
    width: 100%;
    max-width: 1800px;
    margin: 0 auto;
}

.filter-info-icon {
    position: relative;
    display: inline-block;
    margin-left: 0.1em;
    cursor: pointer;
    vertical-align: middle;
}

.info-icon-img {
    width: 1.2em;
    height: 1.2em;
    object-fit: contain;
    vertical-align: -0.18em; 
    display: inline-block;
}


.info-circle {
    font-size: 1em;
    color: #3870ad;
    background: #e8f2fa;
    border-radius: 50%;
    padding: 0.08em 0.31em;
    border: 1px solid #bed8ea;
    display: inline-block;
    vertical-align: middle;
    transition: background 0.2s, color 0.2s;
}
.info-circle:hover,
.filter-info-icon:focus .info-circle {
    background: #cbe0f7;
    color: #222f3f;
}
.filter-info-bubble {
    display: none;
    position: absolute;
    left: 50%;
    top: 120%;
    transform: translateX(-50%);
    background: #fafeff;
    color: #234;
    border-radius: 10px;
    box-shadow: 0 2px 14px rgba(32,50,110,0.10);
    border: 1px solid #d2e8fa;
    min-width: 240px;
    max-width: 340px;
    padding: 18px 16px 16px 16px;
    z-index: 9999;
    font-size: 1em;
    text-align: left;
}

.filter-info-icon.open .filter-info-bubble {
    display: block;
    animation: fadeIn 0.2s;
}
.close-info {
    position: absolute;
    right: 10px;
    top: 7px;
    border: none;
    background: none;
    font-size: 1.2em;
    color: #6589a8;
    cursor: pointer;
}
.close-info:focus {
    outline: 2px solid #005bb5;
}

.infra-search-bar {
  display: flex;
  align-items: center;
  gap: 0.7em;
  margin-bottom: 0;
  background: none;
  border-radius: 0;
  box-shadow: none;
  padding: 0;
  justify-content: center;   
}


.filter-checkbox-row {
    display: flex;
    gap: 1.7em;
    justify-content: center;
    align-items: center;
    margin: 1.5em 0 0.5em 0; 
    width: 100%;
}

.pretty-checkbox {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 1em;
    color: #325c74;
    cursor: pointer;
    font-weight: 500;
}
.pretty-checkbox input[type="checkbox"] {
    accent-color: #2d8cff;
    width: 1.1em;
    height: 1.1em;
    border-radius: 4px;
    border: 1.5px solid #b9d8f2;
    margin-right: 5px;
    cursor: pointer;
}
.pretty-checkbox span {
    user-select: none;
    cursor: pointer;
}


.top-panel {
    width: 100%;
    padding: 0.6em 0.8em 0.4em 0.8em;
    background: #f5faff;
    border-radius: 10px;
    margin-bottom: 0.7em;
    box-shadow: 0 1px 6px rgba(30,40,70,0.08);
    color: #1a2233;
    display: flex;
    flex-direction: column;
    align-items: center;
    min-width: 0;
}

.top-panel h3 {
    margin-bottom: 0.4em;
    font-size: 1.22em;
}
@media (max-width: 700px) {
    .top-panel .filters {
        flex-direction: column;
        gap: 0.7em;
    }
}

.main-content {
    flex: 1;
}

#map-wrapper {
    filter: saturate(1.3) brightness(0.9);
    transition: filter 0.3s ease-in-out;
  }
  
  #map {
    width: 100%;
    height: 500px;
  }


#infrastructure-count {
    font-size: 18px;
    font-weight: bold;
    margin-bottom: 10px;
    color: rgb(0, 0, 0);
        text-align: center;
}

#map-visible-count
{
    color: rgb(0, 0, 0);
      text-align: center;
}

.filters {
    margin-bottom: 20px;
}

.filters label {
    font-weight: bold;
}

.filters button {
    background-color: #007AFF;
    color: white;
    cursor: pointer;
    font-size: 14px;
    padding: 6px 18px;
    border-radius: 6px;
    border: none;
    margin: 0 3px;
    min-width: 65px;
}

.filters button:hover {
    background-color: #005BB5;
}



.filters label {
    display: block;
    margin-top: 10px;
    font-weight: bold;
}

.filter-row {
    display: flex;
    align-items: center;
    margin-bottom: 10px;
}

.filters button:hover {
    background-color: #005BB5;
}
.filters input,
.filters select {
    font-size: 14px;
    padding: 6px 8px;
    border-radius: 5px;
    border: 1px solid #c5d6ea;
    width: auto;
    margin: 0 3px;
}
.filter-row {
    margin-bottom: 0px;
}

.filter-buttons {
    display: flex;
    justify-content: space-between;
    margin-top: 15px;
}

.filter-buttons button {
    padding: 8px;
    border-radius: 5px;
    border: none;
    background-color: #007AFF;
    color: white;
    cursor: pointer;
    flex: 1;
    margin: 0 5px;
}


.custom-cluster:hover {
    filter: none !important;
    transform: scale(1.1);
    transition: transform 0.2s ease, filter 0.2s ease;
  }

  #wordcloud-most,
  #wordcloud-least {
      width: 100%;
      height: 300px;
      background: #162447;
      border-radius: 10px;
      border: 2px solid #aee0ff;
      box-sizing: border-box;
      overflow: hidden;
      position: relative;
      padding: 10px;
  }

.viz-description { 
    max-width: 100% !important; 
    padding: 0 10px;            
    margin: 0 auto 15px auto;    
    text-align: justify;         
    color: #101828;              
    font-size: 15px;             
    line-height: 1.7;            
}

#infra-loading {
    color: #ccc;
    text-align: center;
    font-size: 14px;
    margin-top: 10px;
    display: none;
    animation: fadeIn 0.5s ease;
  }
  
  #infrastructure-network-diagram.loading {
    opacity: 0.2;
    pointer-events: none;
  }
  

  @keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
  }

  @media (max-width: 768px) {
    .grid-2 {
      grid-template-columns: 1fr !important;
    }
  
    .container {
      flex-direction: column;
      padding: 0 10px;
    }
  

    .main-content {
      width: 100%;
    }
  
    #wordcloud-most,
    #wordcloud-least {
      width: 100% !important;
      height: auto !important;
      min-height: 200px;
      overflow: hidden;
    }
  
    #bar-chart-container,
    #entanglementChart,
    #network-diagram,
    #infrastructure-network-diagram {
      width: 100% !important;
      height: 300px !important;
    }
  
    #visualizations>div {
      flex-direction: column;
      align-items: center;
    }
  
  }
  

.entanglement-panel {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5em;
}

.entanglement-header {
    display: flex;
    align-items: center;
    gap: 0.4em;
    margin-bottom: 0.5em;
}

.entanglement-label {
    font-size: 1.1em;
    font-weight: 500;
    color: #2890E1;
}

.entanglement-slider-row {
    display: flex;
    align-items: center;
    gap: 0.5em;
}

.entanglement-buttons {
    display: flex;
    gap: 5px;
}

.law-filter-btn {
    padding: 6px 12px;
    border: 1px solid #c5d6ea;
    background-color: #FFF;
    color: #1766A3;
    border-radius: 6px;
    cursor: pointer;
    font-size: 0.9em;
    transition: all 0.2s ease;
}

.law-filter-btn:hover {
    background-color: #e8f2fa;
    border-color: #1766A3;
}

.law-filter-btn.active {
    background-color: #1766A3;
    color: #FFF;
    border-color: #1766A3;
    font-weight: bold;
}

#entanglement-controls-wrapper {
  display: flex;
  flex-wrap: nowrap;
  justify-content: center;
  gap: 2em;
  max-width: 100%;
  position: relative;
  z-index: 2;
}

.entanglement-panel {
  min-width: 250px;
  flex: 0 0 auto;
}

.vertical-divider {
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.4em;
  color: #ccc;
  font-weight: bold;
  user-select: none;
  padding: 0 0.5em;
}

@media (max-width: 860px) {
  #entanglement-controls-wrapper {
    flex-wrap: wrap;
    justify-content: center;
  }

  .vertical-divider {
    display: none;
  }

  .entanglement-panel {
    width: 100%;
    max-width: 400px;
  }
}


.top-intro-section {
    display: flex;
    gap: 1.5em;
    margin: 1em 0 2em 0;
    align-items: stretch;
}

.info-resource-panel {
    flex: 4; 
    padding: 1.5em;
    background: #f5faff; 
    border: 1px solid #e0e8f0;
    border-radius: 12px;
    font-size: 0.95rem;
    line-height: 1.7;
    color: #101828;
    text-align: center;
}

.info-resource-panel p {
    margin-bottom: 1em;
}

.info-resource-panel p:last-child {
    margin-bottom: 0;
}

.vintage-announcements-billboard {
    flex: 1; 
    background-color: #f4f1e9; 
    border: 3px double #333; 
    padding: 1em 1.5em;
    display: flex;
    flex-direction: column;
    overflow: hidden; 
}

.herald-masthead {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    border-bottom: 2px solid #333;
    padding-bottom: 0.5em;
    gap: 1em;
}

.herald-title {
    font-family: 'TheHeraldFont', cursive; 
    font-size: 2.2rem; 
    text-align: center;
    line-height: 1;
    color: #1a1a1a;
}

.masthead-meta {
    font-family: 'Georgia', serif;
    font-size: 0.8rem;
    color: #444;
    white-space: nowrap;
}

.herald-navigation {
    text-align: center;
    margin: 0.2em 0 1.2em 0;
    border-bottom: 1px solid #c8c3ba;
    padding-bottom: 0.8em;
}

.herald-nav-btn {
    font-family: 'LeagueGothicLocal', sans-serif;
    text-transform: uppercase;
    letter-spacing: 1px;
    font-size: 1.2rem;
    color: #666;
    background: none;
    border: none;
    border-bottom: 3px solid transparent;
    padding: 0.2em 0.5em;
    margin: 0 0.5em;
    cursor: pointer;
    transition: all 0.2s ease-in-out;
}

.herald-nav-btn:hover {
    color: #000;
}

.herald-nav-btn.active {
    color: #000;
    border-bottom-color: #333;
}

.herald-content-pane {
    display: none; 
    animation: fadeIn 0.5s;
}

.herald-content-pane.active {
    display: block; 
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

.billboard-content-wrapper {
    height: 250px; 
    overflow-y: auto; 
    padding-right: 10px;
}

.vintage-announcements-billboard ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.vintage-announcements-billboard li {
    margin-bottom: 1.5em;
    font-family: 'Georgia', serif;
    font-size: 1rem;
    line-height: 1.6;
    color: #444;
}

.vintage-announcements-billboard li strong {
    font-family: 'LeagueGothicLocal', sans-serif; 
    font-weight: 400; 
    font-size: 1.9rem; 
    color: #000;
    text-transform: uppercase;
    display: block;
    margin-bottom: 0.3em;
    letter-spacing: 1px;
    line-height: 1.1;
}

.billboard-content-wrapper::-webkit-scrollbar {
    width: 8px;
}
.billboard-content-wrapper::-webkit-scrollbar-track {
    background: #e0dccc;
}
.billboard-content-wrapper::-webkit-scrollbar-thumb {
    background-color: #888;
    border-radius: 4px;
    border: 2px solid #e0dccc;
}

@media (max-width: 900px) {
    .top-intro-section {
        flex-direction: column;
    }
}

.info-panel-header {
    text-align: left; 
    font-size: 1.3rem;
    font-weight: 600;
    color: #1766A3;
    margin-top: 0;
    margin-bottom: 0.8em;
    padding-bottom: 0.4em;
    border-bottom: 2px solid #e0e8f0; 
}

.header-title {
    text-align: center;
    padding: 1.5em 1em;
    margin-bottom: 1em;
    border-bottom: 2px solid #e0e8f0;
}

.header-title h1 {
    font-size: 2.5rem; 
    font-weight: 700;
    color: #1766A3; 
    margin: 0;
    line-height: 1.2;
}