/* ======= ПК ВЕРСИЯ ======= */
@media (min-width: 769px) {
  body, html {
    margin: 0;
    padding: 0;
    height: 100%;
    font-family: Arial, sans-serif;
  }

  #topHeader {
    background-color: #2e7d32;
    color: white;
    text-align: center;
    font-size: 46px;
    font-weight: bold;
    padding: 10px;
  }
  
  #topHeader .trail-name {
    display: inline; /* на ПК оставляем в одной строке */
  }

  #map-section {
    position: relative; /* чтобы #info позиционировался относительно карты */
    height: 90vh;       /* обязательно, чтобы карта занимала место */
  }

  #map {
    width: 100%;
    height: 100%;
  }

  #info {
    position: absolute;
    top: 50%;
    right: 40px;
    transform: translateY(-50%);
    width: 440px;
    max-height: 90%;
    padding: 15px;
    background: rgba(46, 125, 50, 0.90);
    overflow-y: auto;
    z-index: 1000; /* выше карты */
    border-radius: 12px;
    color: white;
    box-shadow: rgba(0, 0, 0, 0.3) 0px 19px 38px, rgba(0, 0, 0, 0.22) 0px 15px 12px;
            
  }

  #info h2 {
    font-size: 30px;   /* размер заголовка */
    font-weight: bold;
    margin-bottom: 25px; 
    text-align: center;   
  }

  #info .tree-id {
    font-size: 22px;
    font-weight: bold;
    margin-bottom: 5px;
    text-align: center;
  }

  #info .tree-name {
    font-weight: bold;
    font-size: 26px;
    margin-bottom: 3px;
    text-align: center;
    
  }

  #info .tree-latin {
    font-size: 18px;
    font-style: italic;
    margin-bottom: 25px;
    text-align: center;
  }

  #info .tree-data {
    font-size: 22px; 
    font-style: italic;
    margin-bottom: 5px;   
  }

  #treeSearch {
    position: absolute;
    top: 10px;
    left: 50%;
    transform: translateX(-50%);
    width: 350px;
    padding: 8px;
    font-size: 20px;
    border-radius: 8px;
    border: 1px solid #888;
    z-index: 1100; /* выше блока #info */
  }
}

/* ======= МОБИЛЬНАЯ ВЕРСИЯ ======= */
@media (max-width: 768px) {
  body, html {
  display: flex;
  flex-direction: column;
  margin: 0;
  padding: 0;
  height: 100%;
  font-family: Arial, sans-serif;
  }

  #topHeader {
    height: 10vh; 
    background-color: #2e7d32;         
    display: flex;
    flex-direction: column;      /* элементы ставим друг под другом */
    justify-content: center;     /* центрируем по вертикали */
    align-items: center;         /* центрируем по горизонтали */
    text-align: center;
    font-size: 26px;
    width: 100%;                 /* занимает всю ширину экрана */    
    box-sizing: border-box;
    color: white;
    font-weight: bold;
    padding: 5px;
  }

  #topHeader .trail-name {
    display: block;
  }

  #map-section {
    flex: 0 0 65vh;          
    position: relative;    /* можно оставить, чтобы search был над картой */
  }

  #map {
    width: 100%;
    height: 100%;
  }

  #info {             
    flex: 1;
    width: 100%;            /* занимает всю ширину */          
    overflow: visible;    
    background: rgba(46, 125, 50, 0.90);
    color: white;    
  }

  #info h2 {
    font-size: 26px;   /* размер заголовка */
    font-weight: bold;
    margin-bottom: 25px; 
    text-align: center;   
  }

  #info .tree-id {
    font-size: 20px;
    font-weight: bold;
    margin-bottom: 5px;
    text-align: center;
  }

  #info .tree-name {
    font-weight: bold;
    font-size: 24px;
    margin-bottom: 3px;
    text-align: center;
    
  }

  #info .tree-latin {
    font-size: 16px;
    font-style: italic;
    margin-bottom: 25px;
    text-align: center;
  }

  #info .tree-data {
    padding: 5px;
    font-size: 18px; 
    font-style: italic;       
  }

  #treeSearch {
    position: absolute;
    top: 10px;
    left: 50%;
    transform: translateX(-50%);
    width: 250px;    
    font-size: 16px;
    padding: 8px;
    border-radius: 8px;
    border: 1px solid #888;
    z-index: 1100; /* выше блока #info */
  }
}
