@import url('https://fonts.googleapis.com/css2?family=Noto+Serif:ital,wght@0,100..900;1,100..900&display=swap');
@import url('https://fonts.googleapis.com/css2?family=Roboto:ital,wght@0,100..900;1,100..900&display=swap');

body {
    font-family: Roboto, sans-serif;
    line-height: 1.6;
    margin: 0;
    padding: 0;
    background: url('../images/wbg.jpg');
}
.container {
    max-width: 800px;
    margin: 0 auto;
    padding: 20px;
    width: 90%;
}
.header {
    text-align: center;
    margin-bottom: 20px;
}
.header-table {
    margin: 0 auto;
    border-collapse: collapse;
    width: 100%;
    max-width: 600px;
}
hr {
    border: 0;
    height: 1px;
    background: #777;
    margin: 20px 0;
}
.text {
    margin: 15px 0;
    text-align: justify;
}
a {
    font-weight: bold;
    color: #0066cc;
    text-decoration: none;
}
a:hover {
    text-decoration: underline;
}
.title {
    text-align: center;
    font-size: 24px;
    font-family: "Noto Serif", Times, serif;
    font-weight: bold;
    margin: 20px 0 0;
    color: #000;
    padding: 10px;
    border-radius: 5px;
}
.author {
	text-align: center;
	font-style: italic;
	color: #666;
}
.quote {
    text-align: center;
    font-style: italic;
    margin: 20px 0;
    color: #666;
}
.contact {
    text-align: center;
    font-weight: bold;
    margin: 20px 0;
}
.navigation {
    display: flex;
    justify-content: space-between;
	font-family: "Noto Serif", Times, serif;
    margin: 20px 0;
    gap: 10px;
}
.navigation a {
	width: 200px;
	display: block;
    color: #000;
    text-align: center;
	color: black;
	text-shadow: 
    -2px -2px 0 #ffffff,  
    2px -2px 0 #ffffff,
    -2px 2px 0 #ffffff,
    2px 2px 0 #ffffff,
    3px 3px 0 #cccccc,
    4px 4px 3px rgba(0,0,0,0.2);
    text-decoration: none;
}
.navigation img {
    width: 100%;
    height: 25px;
}
.navigation .lang {
    color: #0066cc;
}
.footer {
    text-align: center;
    background: #f1f1f1;
    padding: 10px;
    border-top: 1px solid #ccc;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
}
.header-logo {
    max-width: 100%;
    height: auto;
}
.header-emblem {
    width: 80px;
    height: auto;
}
.flag-img {
    height: 40px;
    width: auto;
}
.nav-button {
    max-width: 100%;
    height: auto;
}

/* Responsive styles */
@media (max-width: 768px) {
    .header-table {
        width: 100%;
    }
    .header-table td {
        display: block;
        text-align: center;
        padding: 5px 0;
    }
    .header-table tr {
        display: flex;
        flex-wrap: wrap;
        justify-content: center;
    }
    .header-logo {
        max-width: 100%;
        height: auto;
    }
    .navigation {
        flex-direction: column;
        align-items: center;
        gap: 15px;
    }
    .title {
        font-size: 20px;
    }
    .header-emblem {
        width: 60px;
        margin: 0 auto;
    }
    .footer {
        position: static;
        margin-top: 20px;
    }
}

@media (max-width: 480px) {
    .container {
        padding: 10px;
    }
    .title {
        font-size: 18px;
    }
    .flag-img {
        height: 30px;
    }
}
.main-image {
    text-align: center;
    margin: 20px 0;
}
.main-image img {
    max-width: 100%;
	border-radius: 10px;
    height: auto;
}

/* Tree specific styles */
#tree {
    width: 100%;
    height: calc(100vh - 250px);
    position: relative;
    background: #fff;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
}

#tree > svg {
    font-family: "Times New Roman", Times, serif;
    background-image: url('../images/TR1.jpg');
    background-size: cover;
    background-position: center;
    width: 100% !important;
    height: 100% !important;
}

/* Tree page specific styles */
.tree-page {
    width: 100%;
    height: 100vh;
    padding: 0;
    margin: 0;
    overflow: hidden;
}

.tree-page .container {
    position: relative;
    z-index: 1;
}

.tree-page #tree {
    position: relative;
    z-index: 0;
}

@keyframes fadeInOut {
    0% { opacity: 0; }
    20% { opacity: 1; }
    80% { opacity: 1; }
    100% { opacity: 0; }
}

/* Responsive styles for tree */
@media (max-width: 768px) {
    #tree {
        height: calc(100vh - 300px);
        overflow: auto;
        -webkit-overflow-scrolling: touch;
    }
    
    #tree > svg {
        min-width: 200%;
        transform-origin: top left;
    }
    
    .tree-page .container {
        background: #fff;
    }
}

@media (max-width: 480px) {
    #tree {
        height: calc(100vh - 250px);
    }
    
    #tree > svg {
        min-width: 250%;
    }
}

/* Person page styles */
.person-info {
    text-align: center;
    margin: 20px 0;
}

.person-name {
    font-size: 24px;
    font-family: "Noto Serif", Times, serif;
    margin: 10px 0;
}

.person-details {
    font-size: 18px;
    margin: 5px 0;
}
.person-info img {
    max-width: 100%;
    height: auto;
    border-radius: 10px;
}
.achievements {
    font-size: 18px;
    margin: 15px 0;
    color: #333;
}
.photo {
    max-width: 100%;
    height: auto;
    border-radius: 10px;
}

.gray-name {
    fill: #888 !important;
    color: #888 !important;
    font-weight: normal !important;
}

/* Стили для блока обновлений */
.update-log {
    margin-top: 1em;
    padding-left: 0;
    border-left: none;
}
.update-entry {
    margin-bottom: 0.5em;
    font-size: 1.05em;
    line-height: 1.4;
    padding: 10px 0;
}
.update-entry:last-child {
    border-bottom: none;
}
.update-date {
    display: block;
    font-size: 0.95em;
    color: #000;
    margin-bottom: 4px;
    font-weight: bold;
    margin-right: 0;
}