/* Глобальные настройки и сбросы */
* {
    box-sizing: border-box;
}

html::-webkit-scrollbar {
    width: 14px;
}

::-webkit-scrollbar-track {
    background: white;
}

::-webkit-scrollbar-thumb {
    background: white;
    border-radius: 10px;
    border: 1px solid rgb(36, 128, 76);
    background-clip: padding-box;
}

::-webkit-scrollbar-thumb:hover {
    background: #d4f598;
}

#app-content {
    flex: 1 0 auto; /* Растягивает блок, заполняя всё пустое место и выталкивая футер вниз */
}

body, html {
    font-family: 'Roboto', sans-serif;
    font-weight: 300;
    font-style: normal;
    margin: 0;
    padding: 0;
    height: 100%;
    width: 100%;
}

body {
    display: flex;
    flex-direction: column;
    min-height: 100dvh;
    min-width: 320px; /* СТОПОР ДЛЯ КОНСОЛИ */
    overflow-wrap: break-word; /* Современный стандарт для разрыва длинных слов */
    -webkit-user-select: none;  /* Chrome, Safari, iOS */
    -moz-user-select: none;     /* Firefox */
    -ms-user-select: none;      /* IE/Edge */
    user-select: none;
}

h1, h2, h3, h4, h5, h6 {
    margin-top: 0;
    margin-bottom: 0;
}

img {
    -webkit-touch-callout: none;
}

.site-header, footer {
    flex-grow: 0; 
}

.site-header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    background-color: #ffffff;
    z-index: 2000;
    display: flex;
    justify-content: space-between;
    align-items: center;    
    flex-wrap: wrap;
    border-top: 1px solid rgb(36, 128, 76);
    border-bottom: 2px solid rgb(36, 128, 76);
    padding: 0.5rem 2rem;
}

/* Элементы навигации и лого */
.logo a {
    text-decoration: none;
    font-size: 1.5em;
    font-weight: bold;
}

.main-nav ul {
    list-style-type: none;
    margin: 0;
    display: flex;
}

.main-nav ul li a {
    text-align: center;
    color: rgb(36, 128, 76);
    text-decoration: none;
    padding: 10px 10px;
    display: block;
    position: relative;
    transition: color 0.3s ease;
    font-size: 1rem;
    text-transform: uppercase;
    font-weight: bold;
}

.main-nav li a::after {
    content: '';
    position: absolute;
    width: 0;
    height: 2px;
    bottom: -5px;
    left: 0;
    background-color: #b18d3f; /* Ваш золотистый цвет */
    transition: width 0.3s ease;
}

.main-nav li a:hover {
    color: #b18d3f; /* Текст тоже меняет цвет */
    background-color: transparent; /* Убираем старую заливку */
}

.main-nav li a:hover::after {
    width: 100%; /* Линия плавно растягивается */
}

/* Гамбургер-меню */
.hamburger-toggle {
    display: none; 
    background: none;
    border: none;
    cursor: pointer;
    padding: 0;
    width: 30px;
    height: 21px;
    position: relative;
}

.hamburger-toggle .bar {
    display: block;
    width: 100%;
    height: 3px;
    margin: 4px 0;
    background-color: rgb(36, 128, 76);
    transition: 0.25s;
}

/* Текст защиты авторских прав */
#copy-protection-toast {
    visibility: hidden;
    min-width: 300px;
    max-width: 1000px;
    background-color: #333;
    color: #fff;
    text-align: left;
    border-radius: 8px;
    padding: 0 16px;
    position: fixed;
    z-index: 1000;
    left: 20px;
    bottom: 30px;
    font-size: 14px;
    line-height: 1.4;
    box-shadow: 0 4px 15px rgba(0,0,0,0.3);
    border-left: 4px solid #ff4d4d; /* Красная полоска для строгости */
}

#copy-protection-toast.show {
    visibility: visible;
    animation: fadein 0.5s, fadeout 0.5s 4.5s;
}

@keyframes fadein { from {bottom: 0; opacity: 0;} to {bottom: 30px; opacity: 1;} }
@keyframes fadeout { from {bottom: 30px; opacity: 1;} to {bottom: 0; opacity: 0;} }

/* Для левого блока страница portfolio.html */
/* Скрываем стандартную стрелку */
details summary {
    list-style: none;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px;
    cursor: pointer;
    font-weight: 500;
    color: #333;
}

/* Убираем стрелку в Chrome/Safari */
details summary::-webkit-details-marker {
    display: none;
}

/* Добавляем свой символ в конце */
details summary::after {
    content: '+';
    font-size: 1.2rem;
    color: #666;
}

/* Меняем на минус при открытии */
details[open] summary::after {
    content: '−';
}


/* Футер */
[th\:fragment="content"] {
    display: flex;
    flex-direction: column;
    min-height: 100dvh; /* Занимает весь экран */
    margin: 0;
}

footer {
    flex-shrink: 0; /* Запрещает футеру сжиматься */
    margin-top: auto;
    border-top: 2px solid rgb(36, 128, 76);
    border-bottom: 1px solid rgb(36, 128, 76);
    background-color: white;
    display: flex;
    flex-direction: column;
}

footer .first {
    width: 100%;
    text-align: center;
    padding: 0rem 2rem;
}

footer .first .footer-protection {
    padding: 15px;
    border-top: 1px solid #eeeeee;
    font-size: 12px;
    color: #888888;
    line-height: 1.6;
    text-align: center;
    font-family: sans-serif;
}

footer .first .footer-protection p { margin: 0; }

footer .second {
    width: 100%;
    display: flex;
    justify-content: space-between; 
    align-items: center;
}

/* Элементы футера */
.social-links {
    display: flex;
    flex-direction: row;
    align-items: center;
    gap: 1rem;
}
.social-links a {
    height: 100%;
    text-decoration: none;
}

.footer-meta {
    display: flex;
    flex-direction: column;
    align-items: center;
    color: rgb(36, 128, 76);
    text-align: left; 
    margin-left: 2rem;
    max-width: 15rem;
    text-align: center;
}

.footer-policy {
    margin-right: 2rem;
}

.footer-policy a.policy-link {
    color: rgb(36, 128, 76);
    text-decoration: none;
    font-size: 0.9rem;
}

.footer-policy a.policy-link:hover {
    text-decoration: underline;
}
