/* CSS Пользовательские настройки */
:root {
   --primary-color: #007a7a;
   --secondary-color: #add8e6;
   --Monochromatic-color: #006363;
   --accent-color: #007bff;
   --text-color: #0F1F1E;
   --text-light: #006363;
   --bg-color: #fff;
   --border-color: #ddd;
   --shadow: 0 0.125rem 0.625rem #303636;
   --border-radius: 0.05rem;
   --transition: all 0.3s ease;
   --font-family: system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
   --max-width: 75rem;   
   --header-height: 3.75rem; 
   --spacing-xs: 0.25rem;
   --spacing-sm: 0.5rem;
   --spacing-md: 1rem;
   --spacing-lg: 1.5rem;
   --spacing-xl: 2rem;
   --spacing-xll: 3rem;
}

* {
   margin: 0;
   padding: 0;
   box-sizing: border-box;
}
html {
   font-size: 16px;
   scroll-behavior: smooth;
}

body {
   font-family: var(--font-family);
   line-height: 1.5;
   color: var(--text-color);
   background-color: var(--bg-color);
}

img {
   max-width: 100%;
   height: auto;
   display: block;
}

/* Skip link for accessibility */
.skip-link {
   position: absolute;
   top: -40px;
   left: 6px;
   background: var(--primary-color);
   color: white;
   padding: 8px;
   text-decoration: none;
   border-radius: 0 0 4px 4px;
   z-index: 9999;
   transition: top 0.3s;
}
.skip-link:focus {
   top: 0;
}

/* Layout container */
#allcontent {
   min-height: 100vh;
   display: flex;
   flex-direction: column;
}

/* Mobile menu toggle */
.mobile-menu-toggle {
   display: none;
   position: fixed;
   top: var(--spacing-md);
   right: var(--spacing-md);
   z-index: 9999;
   background: var(--primary-color);
   border: none;
   border-radius: var(--border-radius);
   padding: var(--spacing-sm);
   cursor: pointer;
   flex-direction: column;
   gap: 3px;
}
.mobile-menu-toggle span {
   display: block;
   width: 25px;
   height: 3px;
   background: white;
   border-radius: 2px;
   transition: var(--transition);
}

.mobile-menu-toggle[aria-expanded="true"] span:nth-child(1) {
   transform: rotate(45deg) translate(6px, 6px);
}

.mobile-menu-toggle[aria-expanded="true"] span:nth-child(2) {
   opacity: 0;
}

.mobile-menu-toggle[aria-expanded="true"] span:nth-child(3) {
   transform: rotate(-45deg) translate(6px, -6px);
}

@media (max-width: 768px) {
  .mobile-menu-toggle {
    display: flex; 
  }

  .main-nav {
    display: none;
  }

  body.nav-open .main-nav {
    display: block;
  }
}

/* Главная Навигация */
header {
   position: sticky;
   top: 0;
   z-index: 1000;
   background: var(--primary-color);
   box-shadow: var(--shadow);
}
.main-nav {
   margin: 0 auto;
   padding: 0 var(--spacing-md);
   gap: var(--spacing-xll);
   justify-items: center;
}

.nav-menu {
   display: flex;
   list-style: none;
   align-items: center;
   min-height: var(--header-height);
   flex-wrap: nowrap;
   gap: var(--spacing-sm);
}

.nav-menu li {
   position: relative;
   flex: 0 0 auto; 
}

.nav-menu a {
   display: flex;
   align-items: center;
   padding: var(--spacing-sm) var(--spacing-md);
   color: white;
   text-decoration: none;
   border-radius: var(--border-radius);
   transition: var(--transition);
}
.nav-menu a:hover,
.nav-menu a:focus {
    background-color: rgba(255, 255, 255, 0.1);
    transform: translateY(-1px);
}

/* Выпадающее Меню */
.has-dropdown > a::after {
    content: '▼';
    margin-left: var(--spacing-xs);
    font-size: 0.8em;
    transition: var(--transition);
}

.has-dropdown:hover > a::after,
.has-dropdown:focus-within > a::after {
    transform: rotate(180deg);
}

.dropdown-menu {
    position: absolute;
    top: 120%;
    left: 0;
    background: var(--secondary-color);
    list-style: none;
    min-width: 250px;
    box-shadow: var(--shadow);
    border-radius: var(--border-radius);
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    transition: var(--transition);
}
.has-dropdown:hover .dropdown-menu,
.has-dropdown:focus-within .dropdown-menu {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.dropdown-menu a {
    color: var(--text-color);
    padding: var(--spacing-md);
    border-bottom: 1px solid var(--border-color);
}
.drop-menu-list a {
    display: block;            
    text-decoration: none;     
    color: var(--text-color);
    padding: var(--spacing-md);
    border-bottom: 1px solid var(--border-color);
}

.dropdown-menu a:hover {
    background-color: rgba(0, 99, 99, 0.3); 
}
.drop-menu-list a:hover {
    background-color: rgba(0, 99, 99, 0.3);
}

.dropdown-menu {
    z-index: 2000; 
}
.has-dropdown.open .dropdown-menu {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

/* Search form */
.search-item {
    margin-left: auto;
    display: flex;
    align-items: center;
}

.search-form {
    display: flex;
    align-items: center;
    gap: var(--spacing-xs);
}
.search-input {
    padding: var(--spacing-sm) var(--spacing-md);
    border: 2px solid transparent;
    border-radius: var(--border-radius);
    font-size: 0.9rem;
    width: 200px;
    transition: var(--transition);
}

.search-input:focus {
    outline: none;
    border-color: var(--accent-color);
    box-shadow: 0 0 0 2px rgba(0, 123, 255, 0.25);
}

.search-button {
    position: absolute;
    right: var(--spacing-xs);
    background: none;
    border: none;
    cursor: pointer;
    padding: var(--spacing-xs);
    border-radius: var(--border-radius);
    transition: var(--transition);
}

.search-button:hover {
    background-color: rgba(0, 0, 0, 0.1);
}
.search-button svg {
    width: 18px;
    height: 18px;
    fill: var(--text-light);
}

/* Вторая Строка */
.contact-bar {
    background: white;
    border-bottom: 1px solid var(--border-color);
    padding: var(--spacing-md) 0;
    justify-items: center;
}

.contact-container {
    max-width: var(--max-width);
    margin: 0 auto;
    display: flex;
    align-items: center;
    gap: var(--spacing-lg);
    flex-wrap: wrap;
    gap: 5rem;
}

.social-links,
.contact-info,
.utility-links {
    display: flex;
    align-items: center;
    gap: var(--spacing-xl);
}
.contact-item {
   display: flex;
   align-items: center;
   /*gap: var(--spacing-sm);*/
   color: black;
   text-decoration: none;
   transition: var(--transition);
   padding: 0.4rem;
   border: 1px dotted grey;
   border-radius: 5px;
   background-color: lightgrey;
}

.contact-item:hover {
   color: var(--accent-color);
   background-color: var(--secondary-color);
}

/* Третья строка */
.org-header {
   min-height: 60px; 
   background: white;
   padding: var(--spacing-xs) 0;
   text-align: center;
}

.org-container {
   max-width: var(--max-width);
   min-height: 60px; 
   margin: 0 auto;
   padding: 0 var(--spacing-sm);
   display: grid;
   grid-template-columns: auto 1fr auto;
   align-items: center;
   gap: var(--spacing-xl);
}

.org-title h1 {
   font-size: clamp(1.5rem, 7vw, 2.5rem);
   color: black;
   margin-bottom: var(--spacing-sm);
   font-weight: 700;
}

.org-title h2 {
   font-size: clamp(1rem, 5vw, 1.25rem);
   color: black;
   font-weight: 700;
}

/* Для INDEX.HTML */
main {
   flex: 1;
   margin: 0 auto;
   width: 100%;
}

/* Горизонтальная прокрутка */
.media-carousel {
   width: 100%;
   background: lightblue;
   border-radius: 0;
   padding: 0;
   overflow: hidden;
   display: flex;
   align-items: center;
   justify-content: center;
   height: 7rem;
   margin: 0 auto;
}

.carousel-container {
    display: flex;
    flex-direction: row;
    gap: var(--spacing-md);
    width: var(--max-width);
    max-width: 80%; 
    height: 5rem; 
    overflow-x: hidden; 
    scrollbar-width: none;
    -ms-overflow-style: none;
    align-items: center;
    justify-content: flex-start;
    margin: 0 auto;
}

.carousel-container::-webkit-scrollbar {
   display: none;
}

.carousel-item {
    flex-shrink: 0;
    /*width: 200px; */
    flex: 0 0 calc((var(--max-width) - (var(--spacing-md) * 4)) / 5);
    height: 4rem; 
    transition: var(--transition);
    border: 2px solid grey;
    border-radius: var(--border-radius);
    overflow: hidden;
}

.carousel-item:hover {
    transform: scale(1.01); 
}

.carousel-item img {
    width: 100%;
    height: 100%; 
    border-radius: var(--border-radius);
    transition: var(--transition);
}

.carousel-item img:hover {
    transform: scale(1.01); 
}

.carousel-item:last-child {
    margin-right: 0; 
}


/* Футер */
footer {
    display: flex;
    flex-direction: column;
}

.site-footer {
   background: var(--primary-color);
   color: white;
}

.footer-content {
   text-align: center;
   display: flex;
   align-items: center;
   flex-direction: column;
   margin: 0 auto;
}

.footer-content p {
   font-size: 0.9rem;
   padding-top: 0.8rem;
}

/* Выпадающее меню */
.has-dropdown {
  position: relative;
}

/* Мягкие Куки */
#cookie-banner {
    position: fixed;
    bottom: 1rem;
    left: 50%;
    transform: translateX(-50%);
    background: #fff;
    color: #333;
    border: 1px solid #ccc;
    border-radius: 1rem;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
    max-width: 90%;
    width: 400px;
    padding: 1.5rem;
    z-index: 1000;
    text-align: center;
    animation: fadeIn 0.5s ease-in-out;
}

#cookie-banner p {
    margin-bottom: 1rem;
    font-size: 1rem;
    line-height: 1.4;
}

.cookie-btn {
    background-color: #4caf50;
    color: white;
    border: none;
    border-radius: 0.5rem;
    padding: 0.6rem 1.2rem;
    margin: 0.25rem;
    font-size: 0.9rem;
    cursor: pointer;
    transition: background-color 0.3s;
}

.cookie-btn:hover {
    background-color: #45a049;
}

.cookie-btn.secondary {
    background-color: #ddd;
    color: #333;
}

.cookie-btn.secondary:hover {
    background-color: #ccc;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(20px) translateX(-50%); }
    to { opacity: 1; transform: translateY(0) translateX(-50%); }
}

/* Кнопки */
.btn {
   padding: var(--spacing-sm) var(--spacing-lg);
   border: none;
   border-radius: var(--border-radius);
   cursor: pointer;
   font-size: 0.9rem;
   transition: var(--transition);
   text-decoration: none;
   display: inline-block;
}

.btn-primary {
   background: var(--accent-color);
   color: white;
}

.btn-primary:hover {
   background: #0056b3;
}

.btn-secondary {
   background: var(--border-color);
   color: var(--text-color);
}
.btn-secondary:hover {
   background: #c6c6c6;
}

/* Адаптивность */
@media (max-width: 1024px) {
   .org-container {
       grid-template-columns: 1fr;
       text-align: center;
       gap: var(--spacing-md);
   }
   .contact-container {
       flex-direction: column;
       gap: var(--spacing-md);
   }
}

@media (max-width: 768px) {
   .contact-bar {
       padding: var(--spacing-sm) 0;
   }
   .contact-container {
       padding: 0 var(--spacing-sm);
       gap: var(--spacing-sm);
   }
   .social-links,
   .contact-info,
   .utility-links {
       gap: var(--spacing-sm);
   }
   .contact-item {
       padding: 0.25rem 0.5rem;
       font-size: 0.9rem;
   }

   .org-logo {
        display: none;
   }

   .mobile-menu-toggle {
       display: flex;
   }
   .main-nav {
      position: fixed;
      top: 0;
      left: 0;
      right: 0;
      bottom: 0;
      background: var(--primary-color);
      transform: translateX(-100%);
      transition: transform 0.3s ease;
      padding: var(--spacing-xl) var(--spacing-md);
      overflow-y: auto;
  }
  .nav-open .main-nav {
      transform: translateX(0);
  }
  .nav-menu {
      flex-direction: column;
      align-items: stretch;
      height: 100%;
      justify-content: flex-start;
      padding-top: 60px;
  }
  .nav-menu li {
   width: 100%;
   }
   .nav-menu a {
   padding: var(--spacing-lg);
   border-bottom: 1px solid rgba(255, 255, 255, 0.1);
   }
   .dropdown-menu {
   position: static;
   opacity: 1;
   visibility: visible;
   transform: none;
   box-shadow: none;
   background: rgba(255, 255, 255, 0.1);
   margin-left: var(--spacing-md);
   }
   .search-item {
   margin-left: 0;
   margin-top: var(--spacing-md);
   }
   .search-input {
   width: 100%;
   }
   .contact-info {
   flex-direction: column;
   align-items: flex-start;
   gap: var(--spacing-sm);
   }
   .carousel-container {
   padding: 0 var(--spacing-sm);
   }
   /*.carousel-item {
   width: 150px;
   height: 90px;
   }*/
}

@media (max-width: 480px) {
:root {
   --spacing-md: 0.75rem;
   --spacing-lg: 1rem;
   --spacing-xl: 1.25rem;
}
.org-header {
   padding: var(--spacing-lg) 0;
}
.org-title h1 {
   font-size: 1.5rem;
}
.org-title h2 {
   font-size: 1rem;
}
.cookie-banner {
   bottom: var(--spacing-sm);
   left: var(--spacing-sm);
   right: var(--spacing-sm);
   transform: none;
   width: auto;
   max-width: none;
}
.cookie-buttons {
   flex-direction: column;
   }
}

/* Стили печати */
@media print {
   .mobile-menu-toggle,
   .cookie-banner,
   .search-form,
   .social-links {
   display: none !important;
}
.main-nav {
   position: static;
   background: white;
   color: black;
}
.nav-menu a {
   color: black;
   }
}

/* Режим высокого контраста */
@media (prefers-contrast: high) {
:root {
   --primary-color: #000;
   --secondary-color: #fff;
   --text-color: #000;
   --bg-color: #fff;
   --border-color: #000;
   }
}
/* Ограничение подвижности */
@media (prefers-reduced-motion: reduce) {
   * {
       animation-duration: 0.01ms !important;
       animation-iteration-count: 1 !important;
       transition-duration: 0.01ms !important;
   }
   .carousel-container {
       scroll-behavior: auto;
   }
}

/* Управление фокусом */
*:focus-visible {
   outline: 2px solid var(--accent-color);
   outline-offset: 2px;
}

/* Используемые классы */
.visually-hidden {
   position: absolute !important;
   width: 1px !important;
   height: 1px !important;
   padding: 0 !important;
   margin: -1px !important;
   overflow: hidden !important;
   clip: rect(0, 0, 0, 0) !important;
   white-space: nowrap !important;
   border: 0 !important;
}
.container {
   max-width: var(--max-width);
   margin: 0 auto;
   padding: 0 var(--spacing-md);
}

.text-center {
   text-align: center;
}

.mt-auto {
   margin-top: auto;
}

/* Секция с видами транспорта */
#move {
    position: relative;
    margin-bottom: var(--spacing-xl);
    width: 100%;     
}

#one {
    position: relative;
    background: var(--primary-color);
    width: 100%;      
    margin: 0;        
    /*padding: var(--spacing-md) 0;*/
    height: 35rem;

    display: grid;
    place-items: center;
}

.kind {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    max-width: var(--max-width);
    margin-left: auto;
    margin-right: auto;
    justify-content: center;  
    gap: 3rem;                
    margin-bottom: 0rem;
}

.kind-1 {
    background: rgba(255, 255, 255, 0.7);
    border-radius: var(--border-radius);
    transition: var(--transition);
    position: relative;
    overflow: hidden;
    border: 2px solid #fff;
    width: 17rem;
    height: 10rem;
}

.kind-1::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(45deg, transparent 30%, rgba(0, 99, 99, 0.1) 50%, transparent 70%);
    opacity: 0;
    transition: var(--transition);
}

.kind-1:hover::before {
    opacity: 1;
}

.kind-1:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow);
}

/* Надписи видов транспорта */
#one_1 {
    position: absolute;
    top: 0;
    left: 50%;                    
    transform: translateX(-50%);  
    max-width: var(--max-width);  
    width: 100%;
    height: 35rem;
    pointer-events: none;
    /*padding-top: 0.8rem;*/
    padding-bottom: 0rem;
    display: grid;
    place-items: center;
}

.lettering {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    height: 50%;
    padding: 0;
    justify-content: center;  
    gap: 3rem;                
    margin-bottom: 0;
}

.lettering-1 {
    display: flex;
    flex-direction: column;
    gap: var(--spacing-sm);
    pointer-events: auto;
    width: 17rem;
    height: 10rem;
}

.menu-02 {
    text-decoration: none;
    color: inherit;
    transition: var(--transition);
}

.menu-02:hover {
    transform: scale(1.02);
}

.t-kind-cell-1,
.t-kind-cell-2,
.t-kind-cell-3,
.t-kind-cell-4 {
    background: var(--Monochromatic-color);
    padding: var(--spacing-sm) var(--spacing-md);
    border-radius: var(--border-radius);
    font-size: clamp(0.75rem, 1.5vw, 1rem);
    font-weight: 700;
    text-align: center;
    color: white;
    border: 2px solid transparent;
    border-color: lightblue;
    transition: var(--transition);
    margin: 0;
    line-height: 1.2;
    min-height:  5rem; 
    width: 17rem;
    height: 10rem;
    display: flex;
    align-items: center;
    justify-content: center;
}

.t-kind-cell-2,
.t-kind-cell-3,
.t-kind-cell-4 {
     height: 4.5rem;
}

.t-kind-cell-1:hover,
.t-kind-cell-2:hover,
.t-kind-cell-3:hover,
.t-kind-cell-4:hover {
    background: lightblue;
    color: black;
    border-color: var(--primary-color);
    transform: translateY(-2px);
    box-shadow: var(--shadow);
}

.t-kind-cell-1,
.t-kind-cell-2,
.t-kind-cell-3,
.t-kind-cell-4 {
    font-size: clamp(1rem, 1.5vw, 1.25rem);
    min-height: 30px;
}

/* Блок новостей */
.two {
    display: grid;
    grid-template-columns: 3fr 1fr;
    gap: var(--spacing-xl);
    margin-bottom: var(--spacing-xl);
    max-width: var(--max-width);
    margin: 0 auto;
}

#section-two {
    background: white;
    border-radius: var(--border-radius);
    padding: var(--spacing-lg);
}

.new-1 {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: var(--spacing-lg);
    padding-bottom: var(--spacing-md);
    border-bottom: 2px solid var(--secondary-color);
}

#new-novosti h3 {
    color: var(--primary-color);
    font-size: clamp(1.2rem, 2.5vw, 1.5rem);
    margin: 0;
    font-weight: 700;
}

#new-archive {
    background: var(--primary-color);
    color: white;
    padding: var(--spacing-sm) var(--spacing-md);
    border: 2px solid;
    border-color: var(--primary-color);
    border-radius: var(--border-radius);
    transition: var(--transition);
}

#new-archive:hover {
    background: lightblue; 
    color: black;
    border-color: var(--primary-color);
    transform: translateY(-1px);
}

#new-archive h3 {
    margin: 0;
    font-size: clamp(0.9rem, 1.8vw, 1.1rem);
}

.new-2 {
    display: grid;
    gap: var(--spacing-md);
}

.new-foto-text {
    display: flex;
    gap: var(--spacing-md);
    padding: var(--spacing-md);
    background: rgba(173, 216, 230, 0.1);
    border-radius: var(--border-radius);
    border-left: 4px solid var(--primary-color);
    transition: var(--transition);
}

.new-foto-text:hover {
    background: rgba(173, 216, 230, 0.2);
    transform: translateX(5px);
}

.new-foto {
    width: 5rem;
    height: auto;
    flex-shrink: 0;
}

.new-foto img {
    width: 100%;
    height: auto;
    border-radius: var(--border-radius);
    transition: var(--transition);
}

.new-foto img:hover {
    transform: scale(1.05);
}

.new-text {
    flex: 1;
    font-size: clamp(0.85rem, 1.6vw, 1rem);
    line-height: 1.2; 
}

.new-text a {
    color: var(--accent-color);
    text-decoration: none;
    transition: var(--transition);
}

.new-text a:hover {
    color: var(--primary-color);
    text-decoration: underline;
}

/* Блок с фото и виджетами */
#block-foto-video {
    display: flex;
    flex-direction: column;
    gap: var(--spacing-lg);
    align-items: center;
    justify-content: center;
}

#foto-text {
    display: flex;
    flex-direction: column;
    gap: var(--spacing-lg);
    background: white;
    padding: var(--spacing-sm);
    border-radius: var(--border-radius);
    align-items: center;
    justify-content: center;
}

#foto {
    flex-shrink: 1;
}

#foto img {
    max-width: 100%;
    width: 100%; 
    height: auto;
    border-radius: var(--border-radius);
    transition: var(--transition);
}

#foto img:hover {
    transform: scale(1.02);
}

#text {
    flex: 1;
}

#text p {
    font-size: clamp(1rem, 2vw, 1.2rem);
    color: var(--text-color);
    margin: 0;
    line-height: 1.4;
}

/* Вертикальная прокрутка */
.videous {
    display: block;
    height: 635px;
    -ms-overflow-style: none;  
    scrollbar-width: none;     
    overflow-y: hidden;
    padding: var(--spacing-sm);
    background: rgba(173, 216, 230, 0.1);
    border-radius: var(--border-radius);
}

.videous::-webkit-scrollbar {
    display: none;
}

.videous::-webkit-scrollbar-track {
    background: rgba(173, 216, 230, 0.2);
    border-radius: 3px;
}

.videous::-webkit-scrollbar-thumb {
    background: var(--primary-color);
    border-radius: 3px;
}

.videous::-webkit-scrollbar-thumb:hover {
    background: var(--accent-color);
}

.videous-1 {
    width: 100%;
    height: auto;
    margin-bottom: var(--spacing-md);
    transition: var(--transition);
}
.videous-1:last-child {
  margin-bottom: 0;
}
.videous-1:hover {
    transform: scale(1.01);
}
.videous-1 img {
    border-radius: var(--border-radius);
    transition: var(--transition);
}
.videous-1 img:hover {
    transform: scale(1.01);
    box-shadow: var(--shadow);
}

/* Адаптивность для мобильных устройств */
@media (max-width: 768px) {
    #one {
        display: none;
    }
    #one_1 {
        position: static;
        transform: none;
        height: auto;
        padding-top: var(--spacing-md);
        padding-bottom: var(--spacing-md);
        pointer-events: auto;
    }
    .kind {
        display: block;
        max-width: 100%;
        margin-left: 0;
        margin-right: 0;
    }
    .kind-1 {
        width: 100%;
        max-width: 20rem;
        height: auto;
        margin: 0 auto var(--spacing-sm);
    }
    .lettering {
        display: flex;
        flex-direction: column;
        align-items: center;
        gap: var(--spacing-sm);
        padding: var(--spacing-sm) 0;
        height: auto;
    }

    .two {
        display: flex;
        flex-direction: column;
        gap: var(--spacing-lg);
    }
    #section-two,
    #block-foto-video {
        width: 100%;
    }

    .t-kind-cell-1,
    .t-kind-cell-2,
    .t-kind-cell-3,
    .t-kind-cell-4 {
        min-height: 50px;
        font-size: clamp(0.8rem, 3vw, 1rem);
    }
    .new-1 {
        flex-direction: column;
        gap: var(--spacing-md);
        text-align: center;
    }
    .new-foto-text {
        flex-direction: column;
        text-align: center;
    }
    .new-foto {
        align-self: center;
    }
    #foto-text {
        padding: var(--spacing-md);
    }
    .videous {
        max-height: 250px;
    }
}

/* Адаптивность для маленьких экранов */
@media (max-width: 480px) {
    #one {
        padding: var(--spacing-sm);
    }
    .kind-1 {
        height: 50px;
    }
    .t-kind-cell-1,
    .t-kind-cell-2,
    .t-kind-cell-3,
    .t-kind-cell-4 {
        min-height: 40px;
        padding: var(--spacing-xs) var(--spacing-sm);
    }
    .new-foto-text {
        padding: var(--spacing-sm);
    }
    #foto-text {
        padding: var(--spacing-sm);
    }
    .videous {
        max-height: 200px;
    }
}

/* Улучшения для доступности */
@media (prefers-reduced-motion: reduce) {
    .kind-1,
    .t-kind-cell-1,
    .t-kind-cell-2,
    .t-kind-cell-3,
    .t-kind-cell-4,
    .new-foto-text,
    .videous-1,
    .new-foto img,
    .videous-1 img,
    #foto img {
        transition: none;
        transform: none;
    }
}

/* Высокий контраст */
@media (prefers-contrast: high) {
    .kind-1 {
        border-color: #000;
        background: #fff;
    }
    .t-kind-cell-1,
    .t-kind-cell-2,
    .t-kind-cell-3,
    .t-kind-cell-4 {
        border-color: #000;
        background: #fff;
        color: #000;
    }
    .new-foto-text {
        border-left-color: #000;
    }
}

/* Центрирование заголовков */
.org-title {
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

.org-title h1 {
    font-size: clamp(1.5rem, 6vw, 2.5rem);
    color: black;
    margin-bottom: var(--spacing-xs);
    font-weight: 700;
    text-align: center;
    width: 100%;
}

.org-title h2 {
    font-size: clamp(1rem, 6vw, 1.25rem);
    color: var(--text-light);
    font-weight: 700;
    text-align: center;
    width: 100%;
    max-width: 800px;
    margin: 0 auto;
}

/* Улучшенное центрирование для всех экранов */
.org-container {
    max-width: var(--max-width);
    margin: 0 auto;
    padding: 0 var(--spacing-md);
    display: grid;
    grid-template-columns: auto 1fr auto;
    align-items: center;
    gap: var(--spacing-xl);
    justify-items: center;
}

/* Для мобильных устройств */
@media (max-width: 1024px) {
    .org-container {
        grid-template-columns: 1fr;
        text-align: center;
        gap: var(--spacing-md);
        justify-items: center;
    }
    .org-title {
        order: 2;
        width: 100%;
    }
    .org-logo {
        order: 1;
    }
    .org-logo:last-child {
        order: 3;
    }
}

/* Для очень маленьких экранов */
@media (max-width: 480px) {
    .org-title h1 {
        font-size: clamp(1.2rem, 5vw, 1.8rem);
        line-height: 1.2;
    }

    .org-title h2 {
        font-size: clamp(0.9rem, 3vw, 1.1rem);
        line-height: 1.3;
    }
}

/*  МОДАЛКА для Email */
body.modal-open {
    overflow: hidden;
}

html, body {
    height: 100%;
}

body.modal-open {
    position: fixed;
    width: 100%;
}

.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(0,0,0,0.5);
    backdrop-filter: blur(5px);
    z-index: 10000;
    overflow-y: auto;     
    pointer-events: auto; 
}

.modal.active {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;   
}

.modal-dialog {
    background: white;
    border-radius: 8px;
    width: 100%;
    max-width: 500px;
    padding: 1rem;
    box-shadow: 0 2px 10px rgba(0,0,0,0.2);
    animation: fadeInUp 0.3s ease;
    margin: auto; 
    position: relative;  
    z-index: 10001; 
}

#emailModal.modal {
    z-index: 10000 !important;
    position: fixed !important;
}

@keyframes fadeIn {
    from { opacity: 0; transform: scale(0.95); }
    to { opacity: 1; transform: scale(1); }
}

@keyframes slideUp {
    from { transform: translateY(30px); opacity: 0; }
    to { transform: translateY(0); opacity: 1; }
}

.modal-header {
    background: var(--primary-color);
    color: white;
    padding: 1rem 1.5rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.modal-header h5 {
    margin: 0;
    font-size: 1.2rem;
}

.close-btn {
    background: transparent;
    border: none;
    font-size: 1.5rem;
    color: white;
    cursor: pointer;
    transition: transform 0.2s ease;
}
.close-btn:hover {
    transform: scale(1.2);
}

.modal-body {
    padding: 1.5rem;
}

.modal-body form {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.modal-body button[type="submit"] {
    background: var(--primary-color);
    color: white;
    border: none;
    padding: 0.75rem;
    border-radius: 8px;
    cursor: pointer;
    font-weight: 600;
    transition: background 0.25s ease, transform 0.15s ease;
}

.modal-body button[type="submit"]:hover {
    background: var(--secondary-color);
    color: black;
    transform: translateY(-2px);
}

/* СООБЩЕНИЯ МОДАЛКИ */
.alert {
    padding: 0.75rem 1rem;
    border-radius: 6px;
    font-size: 0.9rem;
}

.alert.success {
    background: #dcfce7;
    color: #166534;
}

.alert.error {
    background: #fee2e2;
    color: #991b1b;
}

@media (max-width: 480px) {
    .modal-dialog {
        width: 95%;
        border-radius: 12px;
    }
}

/* Полоска Голубая для рабочих Страниц */
#string {
   display: flex;
   flex-wrap: wrap;
   align-content: center;
   height: 4rem; /*60px;*/
   width: 100%;
   background-color: lightblue;
   padding-left: 8rem;
}

/* Боковое Меню и Рабочее Поле */
#section-menu-list {
   display: flex;
   justify-content: center;
}

/* Левое Боковое Меню */
.side-menu {
   display: inline-block;
   margin: 0px;
   padding: 0px;
}

ul.drop-menu-list {
    display: inline-block;
    background-color: lightblue;
    border-radius: 5px;
    list-style-type: none;
    min-width: 250px;
    box-shadow: var(--shadow);
    border-radius: var(--border-radius);
    transition: var(--transition);
}

.drop-menu-list li {
  line-height: 1.5;          
}

div.work-field {
   border-left: 1px dotted grey;
   border-right: 1px dotted grey;
   width: 65%;
   margin: 0px 5px;
   padding: 5px;
}

/* СТРАНИЦА manager.html */

.name {
    text-align: center;
 }

div.img-text-spoil {
    display: flex;
    flex-wrap: wrap;
    flex-direction: column;
    border: solid 1px grey;
    border-radius: 5px;
    padding: 1em;
    margin: 1em;
    gap: 1em;
}

div.img-text {
    display: flex;
    flex-wrap: nowrap;
    gap: 0.5em;
}

.gerald-img {
    width: 18%;
    align-content: center;
}

.gerald-text {
    width: 82%;
}

a.bio {
    text-decoration: none;
}

h4#biography {
    padding: 1em;
}

div.spoil {
   display: flex;
   align-items: center;
   height: 30px;
   width: 100%;
   border-radius: 5px;
   background-color: lightblue;
}

/*Страница Функции и задачи*/
.fzh2 {
    text-align: center;
    color: black;
}
.fzp {
    font-family: sans-serif; 
    font-size: 1.1rem;
    text-indent: 2.25em !important;
    text-align: justify;
}
.fzp1 {
    text-align: center;
    color: black;
    font-size: 1.1rem;
}

/* Пагинатор */
.pagination {
    display: flex;
    list-style: none;
    padding: 0;
    margin: 1rem 0;
    justify-content: center;
    flex-wrap: wrap;
}

.page-item {
    margin: 0 4px;
}

.page-link {
    display: inline-block;
    padding: 8px 14px;
    color: #007bff;
    background-color: #fff;
    border: 1px solid #dee2e6;
    text-decoration: none;
    border-radius: 4px;
    transition: background-color 0.2s, color 0.2s;
}

.page-link:hover {
    background-color: #e9ecef;
    color: #0056b3;
}

.page-item.active .page-link {
    background-color: lightblue;
    color: #fff;
    border-color: grey;
    cursor: default;
}

.page-item.disabled .page-link {
    color: #6c757d;
    background-color: #f8f9fa;
    pointer-events: none;
    cursor: not-allowed;
    border-color: #dee2e6;
}

/* Страницы ЖД Транспорта */
h2.title-rwt {
    text-align: center;
}
h3.rwtrubric {
    padding: 0.3em;
    border: solid 1px grey;
    text-align: center;
    border-radius: 3px;
    background-color: lightblue;
}

ul.npa {
    list-style-type:none;
}

li.npa {
    margin-bottom: 1em;
}

div.npa-text {
    margin-bottom: 3px;
}
a.npa_1 {
    border: solid 0.5px grey;
    border-radius: 3px;
    padding: 3px;
    margin-left: 90%;
    text-decoration: none;
}

a.npa_1:hover {
    text-decoration: underline;
    color: #0056b3;
}

/* К странице Городской ЭТ*/
.rwtrubric {
    scroll-margin-top: 70px; 
}

.npa-rwt-1 {
    text-decoration: none;
    color: #0056b3;
    list-style-type: none;
}

.npa-rwt-2 {
    text-decoration: none;
    color: blue;
}
a.npa-rwt-2:hover {
    text-decoration: underline;
    color: #0056b3;
}

/* К странице Руководство */
p.tlf {
   display: flex;
   flex-wrap: wrap;
   align-items: center;
}

a.tel {
   margin-left: 1em;
}

@media (max-width: 768px) {
  .new-foto-text, .video-foto-text, .md {
    flex-direction: column;
    align-items: flex-start;
 }

 .new-foto img, .video-foto img {
    width: 100%;
    height: auto;
 }

 .new-text, .video-text {
    font-size: 14px;
 }
 }

/* К странице викансии */
.fzp-v {
    font-family: sans-serif;
    color: black;
    font-size: 1.2rem;
    text-indent: 2.25em;
    text-align: justify;
    font-weight: 700;
}

.vacant {
    border: 2px dotted grey;
    border-radius: 5px;
    margin-bottom: 1rem;
}

.no-markers {
    list-style-type: none;
}


.breadcrumbs {
    display: flex;
    flex-wrap: wrap;
    font-size: 16px;
    color: black;
}

.breadcrumbs a {
    font-size: 16px;
    color: blue;
    text-decoration: none;
}

.breadcrumbs a:hover {
    text-decoration: underline;
}

.breadcrumbs .current {
    color: #000;
}

.breadcrumbs .section-label {
    font-style: italic;
    color: black;
    cursor: default;
}

.separator {
    color: #888;
}

@media (max-width: 768px) {
  #section-menu-list {
    flex-direction: column;
    align-items: stretch;
  }

  .side-menu,
  .work-field,
  .work-field-structure {
    width: 100%;
    margin: 0;
    padding: var(--spacing-sm);
  }

  #string {
    padding-left: var(--spacing-md);
    height: auto;
    min-height: 3rem;
  }

  .structure-2,
  .structure-5,
  .structure-6,
  .structure-7,
  .structure-8,
  .structure-10 {
    width: 100%;
    height: auto;
  }
}

#cookie-overlay {
    position: fixed;
    top: 0; left: 0;
    width: 100vw; height: 100vh;
    background-color: rgba(0,0,0,0.5);
    z-index: 9998;
}

#cookie-banner {
    position: fixed;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    background: white;
    padding: 20px;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.3);
    z-index: 9999;
    max-width: 90%;
    text-align: center;
}

#cookies-1 {
    margin-right: 10px;
    margin-top: 10px;
    padding: 5px;
    background-color: lightgreen;
    border-radius: 5px;
}

#cookies-2 {
    margin-right: 10px;
    margin-top: 10px;
    padding: 5px;
    background-color: red;
    border-radius: 5px;
}

/* Страницы с сообщением об ошибках */
div.frame-mistake  {
    height: 200px;
    width: 400px;
    justify-content: center;
    text-align: center;

    border: solid 1px grey;
    border-radius: 3px;
    background-color: lightblue;
    margin-top: 300px;
    margin-left: 300px;
}

/* Для таблиц в CKeditor */
.ck-content table {
    border: 2px solid #000;
    border-collapse: collapse;
    margin-top: 0.5em;
    color: black;
}

.ck-content th {
    text-align: center;
    vertical-align: middle;
    border: 2px solid #000;
    border-collapse: collapse;
}

.ck-content tr {
    border: 2px solid #000;
    border-collapse: collapse;
}

.ck-content td {
    border: 2px solid #000;
    border-collapse: collapse;
    text-indent: 2em;
    color: black;
}

.ck-content p {
    color: black;
    text-indent: 2em;
}

/* Таблица СКediter5 2 */
.ck-contentt table {
    border-collapse: collapse;
    margin: 0.1em;
    margin-top: 0.5em;
    color: black;
    table-layout: fixed;        
    width: 100%;                
    background-color: #E5E4E2;
}

.ck-contentt th {
    text-align: center;
    vertical-align: middle;
    border-collapse: collapse;
    margin: 0.5em;
    padding: 0;
}

.ck-contentt tr {
    border-collapse: collapse;
}

.ck-contentt td {
    border-collapse: collapse;
    color: black;
    padding: 0;      
    vertical-align: middle;    
    text-align: center;        
    height: 2em;
    line-height: 1;
    justify-content: center; 
    align-items: center; 
}

.ck-contentt p {
    color: black;
    text-indent: 0.2em;
    margin: 0.1em;
}

.ck-contentt img {
    height: 4em;               
    object-fit: contain; 
    margin: 0;             
    display: flex;
    justify-content: center; 
    align-items: center; 
}

/* Специально для изображений в ячейках таблицы */
.ck-contentt td img {
    height: 4em;
    object-fit: contain; 
    margin: 0;
    width: 32px;
    display: flex;
    justify-content: center; 
    align-items: center; 
}

/* Для таблиц в CKeditor Разрешительная система */
.ck-contentrs table {
    border: 2px solid #000;
    border-collapse: collapse;
    margin-top: 0.5em;
    color: black;
    width: 100%;
}

.ck-contentrs th {
    border: 2px solid #000;
    text-align: center;
    vertical-align: middle;
    border-collapse: collapse;
}

.ck-contentrs tr {
    border: 2px solid #000;
}

.ck-contentrs td {
    border: 2px solid #000;
    color: black;
    padding: 0.5em;
}

.npa .ck-contentrs p {
    color: black;
    padding: 0.3em;
    display: block;
 }


/* К Меню на странице Реестр*/
.wrap-text {
    width: 270px;              
    white-space: normal;       
    word-wrap: break-word;     
    overflow-wrap: break-word; 
}

/* К Меню на странице Админпроцедуры */
.wrap-text-admin {
    width: 300px;              
    white-space: normal;       
    word-wrap: break-word;     
    overflow-wrap: break-word; 
}


/*Контакты*/
.upperline {
    border-top: 1px solid #c7c7cd;
    padding-top: 30px;
    margin-top: 35px;
    margin-bottom: 0;
}

.scroll-top {
    position: fixed;
    bottom: 20px;
    right: 20px;
    font-weight: bold;
    background: #f0f0f0;
    padding: 10px 15px;
    border-radius: 5px;
    text-decoration: none;
}

 .bootstrap-scope #start,#headofinspectorate,#central,#minsk,#brest,#vitebsk,#gomel,#grodno,#mogilev {
    padding-top: 65px;
    margin-top: -65px;
 }

.bootstrap-scope a {
    color: #428bca;
    text-decoration: none;
}

.bootstrap-scope .container,
.bootstrap-scope .container-fluid {
    width: 100%;
    padding-right: 15px;
    padding-left: 15px;
    margin-right: auto;
    margin-left: auto;
}

.bootstrap-scope .row,
.bootstrap-scope .row-fluid {
    display: flex;
    flex-wrap: wrap;
    margin-right: -15px;
    margin-left: -15px;
}

.bootstrap-scope .col-12 {
    flex: 0 0 100%;
    max-width: 100%;
    padding-right: 15px;
    padding-left: 15px;
}

.bootstrap-scope .col-md-3 {
    flex: 0 0 25%;
    max-width: 25%;
    padding-right: 15px;
    padding-left: 15px;
}

.bootstrap-scope .col-md-4 {
    flex: 0 0 33.3333%;
    max-width: 33.3333%;
    padding-right: 15px;
    padding-left: 15px;
}

.bootstrap-scope .col-md-6 {
    flex: 0 0 50%;
    max-width: 50%;
    padding-right: 15px;
    padding-left: 15px;
}

.bootstrap-scope .col-md-8 {
    flex: 0 0 66.6667%;
    max-width: 66.6667%;
    padding-right: 15px;
    padding-left: 15px;
}

.bootstrap-scope .col-lg-4 {
    flex: 0 0 33.3333%;
    max-width: 33.3333%;
    padding-right: 15px;
    padding-left: 15px;
}

.bootstrap-scope .col-lg-8 {
    flex: 0 0 66.6667%;
    max-width: 66.6667%;
    padding-right: 15px;
    padding-left: 15px;
}

/* Контейнер для карты */
.bootstrap-scope .col-lg-9 {
    flex: 0 0 100%;
    max-width: 100%;
    padding-right: 15px;
    padding-left: 15px;
}

.bootstrap-scope .text-center {
    text-align: center !important;
}

.bootstrap-scope .w-100 {
    width: 100% !important;
}

.bootstrap-scope .borderb {
    display: flex;
    flex-wrap: wrap;
    border-bottom: 1px solid #e6e6e6;
    padding: 10px 0;
}

.bootstrap-scope .borderb:last-child {
    border-bottom: none;
}

.bootstrap-scope .borderb a {
    display: block;
    width: 100%;
    text-align: center;
}

.bootstrap-scope .borderb .col-md-6:last-child a {
    text-align: right;
}

.bootstrap-scope .map iframe {
    width: 100%;
    height: 450px;
    border: 0;
    padding-top: 15px;
}

.bootstrap-scope .d-none {
    display: none !important;
}

@media (min-width: 768px) {
  .bootstrap-scope .d-md-flex {
    display: flex !important;
  }
}

/* Таблица в Лицензировании */
.table-liс {
    width: 100%;
}

.accordion {
  background-color: #eee;
  color: #444;
  cursor: pointer;
  border: none;

}

.panel {
  display: none;
  overflow: hidden;
}

.tab {
    margin: 1px;
    padding: 1px;
    text-indent: 0;
    text-align: center;
}

/* Обтекание Изображения */
figure.image.image-style-align-left {
    float: left;
    margin: 0 5px 5px 0; 
}

figure.image img {
    max-width: 100%;
    height: auto;
}
