/* 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;
   scrollbar-gutter: stable;
}

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;
}

/* Layout container */
#allcontent {
   min-height: 100vh;
   display: flex;
   flex-direction: column;
}

/* ОСНОВНОЕ МЕНЮ  */

.main-nav {
    max-width: var(--max-width);
    margin: 0 auto;
    padding: 0 var(--spacing-md);
    display: flex;
    justify-content: center;
}

.nav-menu {
    display: flex;
    align-items: center;
    min-height: var(--header-height);
    list-style: none;
    margin: 0;
    padding: 0;
    gap: var(--spacing-sm);
    flex-wrap: nowrap;
}

.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: black;
    text-decoration: none;
    white-space: nowrap;
    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: 1.5em;
    transition: var(--transition);
}

.has-dropdown:hover > a::after,
.has-dropdown:focus-within > a::after {
    transform: rotate(180deg);
}


/* ВЫПАДАЮЩЕЕ МЕНЮ */

.dropdown-menu {
    position: absolute;
    top: 100%;
    left: 0;

    width: 85%;
    min-width: 0;
    max-width: 85%;

    margin-left: 20px;
    padding: 0;
    list-style: none;

    background: var(--secondary-color);
    box-shadow: var(--shadow);
    border-radius: var(--border-radius);

    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    transition: var(--transition);
    z-index: 2000;

    box-sizing: border-box;
}


/* Показ меню */

.has-dropdown:hover .dropdown-menu,
.has-dropdown:focus-within .dropdown-menu,
.has-dropdown.open .dropdown-menu {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}


/* ПУНКТЫ ВЫПАДАЮЩЕГО МЕНЮ */

.dropdown-menu a,
.dropdown-menu .logout-button {
    display: block;
    width: 100%;
    box-sizing: border-box;

    padding: var(--spacing-md);

    color: var(--text-color);
    text-decoration: none;

    border-bottom: 1px solid var(--border-color);

    /* разрешаем перенос */
    white-space: normal;
    overflow-wrap: break-word;
    word-break: normal;
}


.dropdown-menu li:last-child a,
.dropdown-menu li:last-child .logout-button {
    border-bottom: none;
}


.dropdown-menu a:hover,
.dropdown-menu a:focus,
.dropdown-menu .logout-button:hover,
.dropdown-menu .logout-button:focus {
    background-color: rgba(0, 99, 99, 0.3);
}


/* Кнопка "Выйти" */

.logout-button {
    background: none;
    border: none;
    margin: 0;
    width: 100%;
    cursor: pointer;
    text-align: left;
    font: inherit;
}

/* Кнопка Сохранить */
.save-button {
    display: inline-block;
    padding: 10px 24px;
    background-color: var(--primary-color);
    color: #fff;
    border: 1px solid var(--primary-color);
    border-radius: 6px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.15);
}

.save-button:hover {
    background-color: var(--Monochromatic-color);
    border-color: var(--Monochromatic-color);
    transform: translateY(-1px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.18);
}

.save-button:active {
    transform: translateY(0);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.15);
}

.save-button:focus {
    outline: 2px solid var(--secondary-color);
    outline-offset: 2px;
}


/* Для Заявки на Каботаж*/
#allcontentCab {
   background: var(--secondary-color);
   padding: 8px;
   margin: 0 var(--spacing-xs);
   align-items: center;
   text-align: center;
}

#cab {
    color: red;
}
#cabform {
    display: flex;
    flex-direction: column;
    margin: 0 100px;
    text-align: left;

}

.pcab {
    background: var(--secondary-color);
}

.new-archive-cab {
    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);
    width: 20rem;
    height: 3rem;
    text-align: center;
}

.new-archive-cab:hover {
    background: lightblue;
    color: black;
    border-color: var(--primary-color);
    transform: translateY(-1px);
}

.new-archive-cab h3 {
    margin: 0;
    font-size: clamp(0.9rem, 1.8vw, 1.1rem);
}

.close {
    position:absolute;
    right:15px;
    top:10px;
    cursor:pointer;
    font-size:24px;
}

.cabbutten {
    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);*/
}

/* Всплывающие сообщения */
.messages-container {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    z-index: 10000;
}

.message {
    position: relative;
    min-width: 350px;
    max-width: 500px;
    padding: 20px 50px 20px 25px;
    border-radius: 10px;
    background: var(--bg-color);
    color: var(--text-color);
    border-left: 6px solid var(--primary-color);
    box-shadow: 0 5px 25px rgba(0, 0, 0, 0.25);
    font-size: 18px;
    font-weight: 500;
    text-align: center;
}

.message.success {
    border-left-color: var(--primary-color);
}

.message-close {
    position: absolute;
    top: 8px;
    right: 12px;
    cursor: pointer;
    font-size: 24px;
    color: var(--text-light);
}

.message-close:hover {
    color: var(--accent-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%;
}

/* Неактивные ссылки */
.disabled-link {
    opacity: 0.5;
    cursor: not-allowed;
    filter: grayscale(100%);
}

/* Адаптивность */
@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;
}

.menu-02 {
    text-decoration: none;
    color: inherit;
    transition: var(--transition);
}

.menu-02:hover {
    transform: scale(1.02);
}



/* Адаптивность для мобильных устройств */
@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 !important;
    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;
    }
}

