*{
    border: 0;
    padding: 0;
    margin: 0;
}
body{
    background: #dae3e7;
}
.site{
    margin: 0 auto;
    max-width: 1200px;
    width: 100%;
    font-family: Roboto, sans-serif;
}
h1{
    font-size: 3em;
}
h2{
    font-size: 1.4em;
}
p{
    font-size: 1.2em;
}
.container{
    margin: 0 auto;
    background: #f5f5f5;
}
header, footer {
    width: 100%;
}
.header_btn {
    display: none;
    position: relative;
}
.header_btn span{
    position: absolute;
    width: 30px;
    height: 3px;
    background-color: #000000;
    left: 5px;
    transition: transform .5s, opasity .5s, background-color .5s;
}
.header_btn span:nth-child(1){
    transform: translateY(-10px);
}
.header_btn span:nth-child(3){
    transform: translateY(10px);
}
.header.open .header_btn span{
    background-color: #ffffff;
}
.header.open .header_btn span:nth-child(1){
    transform: translateY(0) rotate(-45deg);
}
.header.open .header_btn span:nth-child(2){
   opacity: 0;
}
.header.open .header_btn span:nth-child(3){
    transform: translateY(0) rotate(45deg);
}
.logo{
    width: 120px;
    margin: 10px 0 0 20px;
}
nav{
    border-bottom: 5px solid #00000010;
    padding-bottom: 10px;
    display: flex;
}
.nav{
    list-style: none;
    margin: 35px 0 0 478px;
}
.nav>li {
    display: inline-block;
    padding-right: 36px;
}
.nav>li>a{
    text-decoration: none;
    color: #000000;
    font-size: 1.2em;
    font-weight: 600;
    text-align: center;
}
.nav>li>a:hover, nav ul li a.active{
    background-color: #dae3e7;
    padding: 5px;
}
.nav_contacts{
    padding-right: 5px;
}
.nav-close-btn{
    display: none;
}
.under_nav{
    background: #f5f5f5 url(/assets/img/container.webp) no-repeat center center;
    background-size: 100%;
    display: flex;
    align-items: center;
}
.main_photo{
    width: 26%;
    padding: 20px;
    border-radius: 50%;
}
.profile-content{
    padding: 20px;
}
.social{
    list-style: none;
    margin-top: 20px;
}
main{
    width: 100%;
    display: flex;
    margin-top: 20px;
    background: #dae3e7;
}
.left{
    background: #f5f5f5;
    width: 75%;
    height: auto;
    margin-right: 38px;
    padding: 28px 30px 40px 30px;
}
.left_experience{
    width: 100%;
    margin: 0;
}
.right{
    width: 25%;
    height: auto;
    background: #f5f5f5;
}
.content{
    width: 100%;
    height: auto;
    background: #f5f5f5;
    padding-top: 5px;
}
.about{
    margin-bottom: 20px;
    border-bottom: 30px solid #dae3e7;
    padding-bottom: 20px;
}
.about>h2{
    margin-bottom: 15px;
}
.about>p{
    text-align: justify;
}
.education, .docs, .job, .gallery{
    margin-top: 30px;
    border-bottom: 30px solid #dae3e7;
    padding-bottom: 20px;
    width: 100%;
    overflow-x: auto;
    display: block;
}
.job table {
    min-width: 600px;
    width: 100%;
}
.education>h2{
    margin-bottom: 15px;
}
.t2_docs, .t2_cert{
    text-align: center;
    border-bottom: 1px solid #000;
    padding-bottom: 10px;
    margin: 5px 50px;
}
.education_list{
    font-size: 1.2em;
    margin-left: 22px;
}
.certificates, .seamans_docs, .medicine{
    justify-content: center;
    position: relative;
    margin: 20px 0 40px 0;
    display: flex;
    flex-wrap: wrap;
    gap: 26px;
}

/* Страница documents.php: по 3 документа в ряд (веб), аккуратные отступы */
.content > .docs .seamans_docs,
.content > .docs .certificates,
.content > .docs .medicine {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    justify-items: center;
    align-items: start;
    gap: 28px;
    padding-left: 48px;
    padding-right: 48px;
    max-width: 100%;
    box-sizing: border-box;
}
.content > .docs .cert_item {
    max-width: 220px;
    width: 100%;
    box-sizing: border-box;
}
.content > .docs .cert_item img {
    width: 100%;
    height: auto;
    display: block;
}
.content > .docs .cert_item figcaption {
    margin-top: 10px;
    font-size: 13px;
}
.cert_item_index{
    background: darkgrey;
    display: contents;
}
.cert_item_index>img{
    width: 23%;
}
.cert_item {
    cursor: pointer;
    position: relative;
    overflow: hidden; /* Обрезаем содержимое, выходящее за пределы контейнера */
}
.cert_item img {
    max-width: 100%; /* Максимальная ширина изображения равна ширине контейнера */
    height: auto;
    transition: transform 0.3s ease;
}
.cert_item.large img {
    z-index: 999; /* устанавливаем высокий z-index */
    position: fixed;
}
.horizontal img{
    height: 250px;
}
.vertical img{
    width: 180px;
}
.horizontal.large img {
    width: 60%;
    height: auto;
    top: 120px;
    left: 220px;
}
.vertical.large img{
    width: auto;
    height: 70%;
    top: 114px;
    left: 356px;
}
#covid.large img{
    width: 34%;
    height: 65%;
    left: 352px;
}
.cert_item figcaption {
    text-align: center;
    font-style: italic;
    font-size: 14px;
    color: #666;
}

.seeMore{
    text-align: right;
    font-weight: 600;
    letter-spacing: 0.1em;
}
.seeMore>a{
    color: #000000;
}
table {
    border-collapse: collapse;
    border: 2px solid rgb(140 140 140);
    font-family: sans-serif;
    font-size: 0.8rem;
    letter-spacing: 1px;
    margin-top: 25px;
    width: 100%;
}
caption {
    caption-side: bottom;
    padding: 10px;
    font-weight: bold;
}
caption>div{
    margin-bottom: 12px;
}

thead {
    background-color: rgb(228 240 245);
}

th, td {
    border: 1px solid rgb(160 160 160);
    padding: 8px 10px;
}
tbody > tr:nth-of-type(even) {
    background-color: rgb(237 238 242);
}
th {
    text-align: center;
    font-size: 1.3em;
    font-weight: 800;
}
td {
    font-weight: bold;
}
.list_workExperience{
    display: none;
}
/* Контейнер сторінки контактів */
.content_contacts {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 40px;
    padding: 20px 0;
}
  
/* Картка контактів */
.content_contacts address,
.address-card {
    padding: 24px;
    margin-left: 40px;
}

.content_contacts .bloc_item {
  display: flex;
  align-items: flex-start;
  gap: 14px;
  padding-top: 10px;
  border-bottom: 1px solid rgba(0,0,0,0.06);
}

.content_contacts .bloc_item:last-child {
  border-bottom: none;
}

/* Іконки */
.content_contacts .bloc_item > i {
  width: 40px;
  height: 40px;
  min-width: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #dae3e7;
  color: #333;
  border-radius: 10px;
  font-size: 1.1rem;
}

.content_contacts .bloc_item .text {
  flex: 1;
}

.content_contacts .bloc_item .text p:first-child {
  font-weight: 600;
  color: #333;
  margin-bottom: 10px;
  font-size: 0.95rem;
}

.content_contacts .bloc_item .text p:not(:first-child) {
  margin: 0;
  color: #555;
  line-height: 1.5;
}

.content_contacts .bloc_item a {
  color: #1a73e8;
  text-decoration: none;
  margin-bottom: 10px;
  font-size: 20px;
}

.content_contacts .bloc_item a:hover {
  text-decoration: underline;
}
.content_contacts .social_row {
    display: flex;           /* було inline-flex — міняємо на flex */
    align-items: center;
    gap: 8px;
    margin-bottom: 8px;
    color: #333;            /* колір як у решти тексту в address */
    text-decoration: none;
  }
  
  .content_contacts .social_row:hover {
    text-decoration: underline;
    color: #333;
  }
  
  .content_contacts .social_row i {
    width: 24px;
    height: 24px;
    min-width: 24px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: #e8e8e8;
    border-radius: 6px;
    font-size: 0.9rem;
    color: #333;
  }
  .content_contacts .bloc_item .bloc_item_social {
    padding-top: 0;
  }
  
  /* Блок форми */
  .form_contacts {
    flex: 1;
    max-width: 50%;
    margin-right: 30px;
}
.title_form {
    font-size: 24px;
    font-weight: bold;
    border-bottom: solid 2px #696969;
    padding-bottom: 5px;
    margin-bottom: 14px;
}
  
  /* Сама форма – все в колонку */
  .form_contacts form {
    display: flex;
    flex-direction: column;
    gap: 8px;
  }
  
  /* Підписи над полями */
  .form_contacts label {
    display: block;
    font-weight: 500;
    margin-top: 4px;
  }
  
  /* Поля на всю ширину */
  .form_contacts input,
  .form_contacts textarea {
    width: 100%;
    box-sizing: border-box;
    padding: 6px 8px;
    height: 33px;
  }
  .form-actions {
    display: flex;       /* Кнопки встают в ряд */
    gap: 15px;           /* Расстояние между кнопками */
    margin-top: 15px;    /* Отступ от поля ввода */
  }
  
  /* Если нужно, чтобы кнопки были одинаковыми по ширине */
  .form-actions button {
    flex: 1;
    padding: 10px;
    text-transform: uppercase;
    font-weight: bold;
  }
  
  /* Кнопки */
  .form_contacts button {
    margin-top: 8px;
  }
  /* Контейнер для кнопок: ставим их в ряд */
.form_contacts .button-container {
    display: flex;
    gap: 10px;           /* Расстояние между кнопками */
    margin-top: 15px;    /* Отступ сверху от textarea */
}

/* Стилизация конкретно этих кнопок внутри формы */
.form_contacts .button-container button {
    display: inline-flex;  /* Флекс для выравнивания текста внутри */
    align-items: center;   /* Центрируем текст по вертикали */
    justify-content: center; /* Центрируем текст по горизонтали */
    
    height: 40px;          /* Фиксированная высота */
    padding: 0 25px;       /* Боковые отступы */
    
    cursor: pointer;
    border: 1px solid #ccc; /* Твои рамки (можно убрать/изменить) */
    background-color: #f0f0f0; /* Фоновый цвет (для примера) */
    
    font-size: 14px;
    font-weight: bold;
}

/* Опционально: стиль для заблокированной кнопки SEND */
.form_contacts .button-container button:disabled {
    cursor: not-allowed;
    opacity: 0.6;
}

/* Thank You page — только CSS */
.containerTH {
    max-width: 600px;
    margin: 0 auto;
    padding: 40px 24px;
}
.thank-you-content {
    background: #f5f5f5;
    border-radius: 12px;
    padding: 48px 32px;
    text-align: center;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.08);
}
.thank-you-title {
    margin: 0 0 16px 0;
    font-size: 2.2rem;
    font-weight: 700;
    color: #333;
}
.thank-you-text {
    margin: 0 0 28px 0;
    font-size: 1.1rem;
    line-height: 1.6;
    color: #555;
}
.thank-you-btn {
    display: inline-block;
    padding: 12px 28px;
    background: #dae3e7;
    color: #333;
    font-weight: 600;
    text-decoration: none;
    border-radius: 8px;
    font-size: 1rem;
    transition: background 0.2s, color 0.2s;
}
.thank-you-btn:hover {
    background: #c5d4d9;
    color: #000;
}

.contact{
    margin: 28px 0 0 20px;
}
.contacts_list>li, .contacts_list>li>ul>li{
    list-style-type: none;
}
.contacts_list>li>h4{
    margin: 20px 0 5px 0;
}
.contact_hr{
    height: 6px;
    background: #dae3e7;
    margin: 20px 20px 20px 0;
}
.img_social{
    display: inline-block;
    width: 20px;
    height: 27px;
    color: azure;
    border: 6px solid #dae3e7;
    padding: 13px;
    border-radius: 26%;
    margin: 7px 4px 0 0;
}
.fb{
    position: relative;
    top: 9px;
}
footer{
    background: dimgrey;
}
.footer{
    display: flex;
    justify-content: space-between;
    gap: 20px;
    padding: 20px 20px 0 20px;
}
.contact_footer{
    display: flex;
    gap: 100px;
    flex-direction: row;
    flex-wrap: wrap;
    align-content: stretch;
    justify-content: space-between;
}
.contact_footer>ul, .contact_footer>ul>li>ul{
    list-style-type: none;
}
.contact_footer>div>h3, .social_footer>h3{
    font-size: 1em;
    margin-bottom: 10px;
    color: #dae3e7;
}
.contact_footer>div>p{
    font-size: 0.8em;
    color: #ffffff;
}
.img_social_footer{
    display: inline-block;
    width: 10px;
    height: 14px;
    color: azure;
    border: 3px solid #dae3e7;
    padding: 10px;
    border-radius: 50%;
    margin: 7px 4px 0 7px;
}
.fb_footer{
    position: relative;
    top: 2px;
}
.social_footer>h3{
    text-align: center;
}
.social_footer>hr{
    margin: 20px 2px 20px 0;
}
.copywriter{
    display: inline-block;
    padding: 10px;
    border-top: 1px solid #dae3e7;
}
.copywriter>p{
    font-size: 1em;
}
@media screen and (max-width:1200px) {
    .site {
        width: 1000px;
    }
    .nav{
        margin-left: 25%;
    }
    .nav-close-btn{
        display: none;
    }
    .profile-content {
        padding: 0;
    }
    .profile-content>h1{
        font-size: 2em;
    }
    .profile-content>h2{
        font-size: 1.5em;
        margin-bottom: 5px;
    }
}
@media screen and (max-width:1000px) {
    .site {
        width: 768px;
    }
    .nav{
        margin-left: 46px;
    }
    .nav>li>a {
        font-size: 1.2em;
        font-weight: 600;
    }
    .nav-close-btn{
        display: none;
    }
    .dtw{
        display: none;
    }
    .right{
        overflow: hidden;
        width: 0;
    }
    .left_mob{
        width: 100%;
        margin: 0;
    }
    .certificates {
        gap: 46px;
    }
    .contact_footer {
        gap: 32px;
    }
    .contact_hr {
        height: 6px;
    }
}
@media screen and (max-width:768px) {
    .site {
        width: 480px;
    }
    .logo {
        width: 80px;
    }
    .nav {
        margin: 25px 0 0 23px;
    }
    .nav>li {
        padding-right: 12px;
    }
    .nav>li>a {
        font-size: 14px;
        font-weight: 600;
    }
    .nav-close-btn{
        display: none;
    }
    .main_photo {
        margin-top: 22px;
        padding: 32px 7px 20px 20px;
    }
    .profile-content{
        margin-top: 44px;
    }
    main {
        width: 100%;
        display: block;
    }
    .left_mob {
        width: 88%;
    }
    .list_workExperience{
        display: block;
    }
    .items_workExperience {
        list-style: none;
        padding: 0;
        margin: 0;
    }
    .left_experience{
        width: auto;
    }
    .work-item {
        background: #fff;
        border-left: 4px solid #dae3e7; /* Твой цвет разделителя */
        margin-bottom: 20px;
        padding: 15px;
        border-radius: 2px;
    }

    .work-header {
        display: flex;
        justify-content: space-between;
        align-items: baseline;
        margin-bottom: 10px;
        border-bottom: 1px solid #dae3e7;
        padding-bottom: 5px;
    }

    .work-rank {
        font-weight: 700;
        font-size: 1.1em;
        color: #333;
    }

    .work-dates {
        font-size: 0.9em;
        color: #666;
    }

    .work-details {
        list-style: none;
        padding: 0;
    }

    .work-details li {
        font-size: 14px;
        margin-bottom: 4px;
        line-height: 1.4;
    }

    .work-details li strong {
        color: #555;
    }
    .table_workExperience{
        display: none;
    }
    .details{
        margin-left: 20px;
        list-style-type: disc;
        font-size: 18px;
        line-height: 30px;
    }
    .date-from{
        font-size: 20px;
        font-weight: bold;
        color: #6d7375;
        display: inline-block;
        margin-bottom: 14px;
    }
    .about>h2, .education>h2, .docs>h2, .job>h2 {
        font-size: 1.5em;
        margin-bottom: 20px;
    }
    .about>p, .education_list{
        font-size: 1.1em;
    }
    /* Страница документов: 768px — по 2 в ряд */
    .content > .docs .seamans_docs,
    .content > .docs .certificates,
    .content > .docs .medicine {
        grid-template-columns: repeat(2, 1fr);
        padding-left: 24px;
        padding-right: 24px;
    }
    .content > .docs .cert_item {
        max-width: 100%;
    }
    th {
        font-size: 12px;
    }
    td{
    font-size: 10px;
    }
    .seeMore{
        margin-top: 10px;
    }
    .seeMore>a{
        font-size: 0.7em;
    }
    .right {
        height: 0;
        width: 0;
    }
    .content_contacts {
        flex-direction: column;
        align-items: stretch;
        gap: 24px;
        padding: 20px 16px;
      }
    
      .content_contacts address,
      .address-card {
        margin-left: 0;
        max-width: 100%;
      }
    
      .form_contacts {
        max-width: 100%;
        margin-right: 0;
      }
    .contact_footer>div>h3, .social_footer>h3 {
        font-size: 1em;
        margin-bottom: 8px;
    }
    .contact_footer>div>p {
        font-size: 0.8em;
    }
    .contact_footer {
        gap: 20px;
        flex-direction: column;
    }
    .social_footer{
        width: 180px;
        margin-left: 30px;
    }
    .copywriter {
        padding: 6px;
        margin-top: 14px;
    }
}
@media screen and (max-width:480px) {
    .site {
        width: 320px;
    }

    .left_mob, .left_experience {
        width: 81%;
    }
    header .container {
        background: #f5f5f5 url('/assets/img/container.png') no-repeat 90%;
        background-size: 165%;
        display: grid;
        grid-template-columns: auto 1fr;
        grid-template-rows: auto auto;
        grid-template-areas:
          "burger logo"
          "under  under";
        align-items: center;
        column-gap: 12px;
    }
    .header_btn {
        grid-area: burger;
        justify-self: flex-start;
        display: flex;              /* ВАЖНО: показать кнопку */
        flex-direction: column;
        justify-content: space-between;
        width: 30px;
        height: 6px;
        padding: 0;
        margin: 15px;
        border: none;
        background: transparent;
        cursor: pointer;
    }
    header nav {
        grid-area: logo;
        display: flex;              /* вместо display: contents */
        justify-content: flex-end;  /* логотип у правого края */
        align-items: center;
        border: none;
        padding: 0;
        position: relative;
    }
    .header_btn span {
        display: block;
        position: static;
        left: auto;          
        width: 100%;
        height: 3px;
        background-color: #000;
        border-radius: 2px;
        transition: transform .3s, opacity .3s, background-color .3s;
    }
    .header.open .header_btn {
        opacity: 0;
        pointer-events: none;
    }
    .under_nav {
        grid-area: under;
        justify-content: flex-start;
        background: none;
    }
    .main_photo {
        width: 35%;
        margin: 0 30px 20px 20px;
        padding: 0;
    }
    .logo_link {
        display: inline-flex;
        justify-content: flex-end;
        width: 38%;
    }
    .logo {
        height: 50px;
        width: auto;
        padding: 20px 10px;
        margin: 0;
    }
    .profile-content {
        display: flex;
        flex-direction: column;
        justify-content: center;
        margin: 0;
    }
    .name {
        font-size: 20px;
        margin: 0;
    }
    main{
        margin-top: 14px;
    }
    .profession {
        font-size: 16px;
    }
    #mobileMenu {
        display: none;
        flex-direction: column;
        background-color: #dae3e7f2;;
        position: absolute;
        top: 0%;
        right: 82%;
        border-radius: 5px;
        box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    }

    #mobileMenu li {
        margin-bottom: 11px;
    }
    #mobileMenu.menu-open {
        display: flex;      /* или block, если хочешь, но с flex удобнее */
    }
    .nav-close {
        text-align: right;
    }
    
    .nav-close-btn {
        background: transparent;
        border: none;
        font-size: 24px;
        padding: 6px 10px 0 10px;
        cursor: pointer;
    }
    .nav {
        display: block;
        position: static;
        margin: 0;
        padding: 0;
    }

    .nav li {
        display: block;
    }

    .nav li a {
        display: block;
        color: black;
        padding: 10px 16px;
    }
    .header.open .nav {
        transform: none;
        background: #dae3e7;
    }
    .work-header {
        flex-direction: column; /* Даты падают под должность */
        gap: 5px;
    }

    .work-rank {
        font-size: 16px;
    }

    .work-dates {
        font-size: 13px;
    }

    .work-details li {
        font-size: 12px; /* Уменьшаем шрифт для совсем маленьких экранов */
    }
    .mobile480 {
        display: none;
    }
    .job table {
        min-width: 0;       /* або min-width: 100%; */
        width: 100%;
        table-layout: fixed; /* опціонально, щоб колонки стискались рівномірно */
      }
    
      .job table th,
      .job table td {
        padding: 4px 6px;   /* трішки менший відступ, щоб усе влізло */
        font-size: 12px;
      }

    th {
        padding: 4px 0;
    }
    .seamans_docs, .certificates, .medicine, .uploaded-images {
        display: grid;
        grid-template-columns: repeat(2, minmax(120px, 1fr));
        justify-items: center;
        margin: 20px auto 40px;
        gap: 15px;
    }
      
      /* Страница documents.php: на узких экранах 1 в ряд — ничего не ломается */
      .content > .docs .seamans_docs,
      .content > .docs .certificates,
      .content > .docs .medicine {
        grid-template-columns: 1fr;
        max-width: 100%;
    }
    .content > .docs .cert_item {
        max-width: 100%;
        box-sizing: border-box;
    }
    .cert_item{
        max-width: 260px;
        text-align: center;
    }
    .cert_item_index>img {
        width: 80%;
    }
    .cert_item img {
        display: block;
        width: 100%;
        height: auto;
    }
    .cert_item figcaption {
        margin: 8px 0 0;
        text-align: center;
    }
    .social_footer a {
        margin-left: 10px;
    }
    /* Контакти і форма одна під одною */
  .content_contacts {
    flex-direction: column;
    align-items: stretch;
    gap: 24px;
    padding: 10px 8px;
  }

  address {
    display: flex;             /* щоб flex-direction працював */
    flex-direction: column;
    width: 100%;               /* замість 87%, щоб не прилипало до лівого краю */
  }
  .content_contacts address {
    width: 100%;            /* замість 87% */
    margin: 0;              /* на всяк випадок прибрати авто‑вирівнювання */
  }

  .form_contacts {
    max-width: 100%;
    margin: 10px 10px 0 36px;
  }
  
  .form_contacts input,
  .form_contacts textarea {
    font-size: 12px;           /* у тебе це вже є, просто залиш */
  }
  .form_contacts input{
    height: 33px;
  }
  /* Якщо хочеш кнопки в один рядок – лишаєш ширину 47%,
     якщо одна під одною – заміни на width: 100%; */
  .form_contacts button {
    width: 47%;
  }
    .contact_hr {
        display: none;
    }
    .table_workExperience{
        display: none;
    }
    .list_workExperience{
        display: block;
    }
    .form_contacts input, .form_contacts textarea {
        font-size: 12px;
    }
    .form_contacts button {
        width: 47%;
    }
    address {
        flex-direction: column;
        width: 87%;
    }
    .bloc_item {
        flex: none;
        max-width: 100%;
    }    
    .bloc_item .text p.long_email {
        font-size: 16px;
    }
    .containerTH {
        padding: 24px 16px;
    }
    .thank-you-content {
        padding: 32px 20px;
    }
    .thank-you-title {
        font-size: 1.8rem;
    }
    .thank-you-text {
        font-size: 1rem;
        margin-bottom: 22px;
    }

}