:root {
    --primary-color: #E9711C;
    --secondary-color: #6A7E88; 
    --background-color: #ffffff;
    --light-bg: #f9fafb;
    --text-color: #333333;
    --border-color: #E9711C;
    --shadow: 0 4px 6px rgba(0, 0, 0, 0.05);
    --gradient: linear-gradient(45deg, #E9711C, #F39C6B);
    --radius: 14px;
;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}
header{
    font-family: 'Exo 2', serif;
}
body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    background-color: var(--background-color);
    color: var(--text-color);
    line-height: 1.6;
    min-height: 50vh;
    display: flex;
    flex-direction: column;
}
.main{
    padding: 3rem 2rem;
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    margin-top: 25px;
    margin-bottom: 0px;
    background: #ffffff;
    box-shadow: var(--shadow);
    border-radius: var(--radius);
}
.main-1{flex: 1;}
.header {
    background: var(--background-color);
    padding: 1rem 0;
    border-bottom: 2px solid var(--border-color);
    position: sticky;
    top: 0;
    z-index: 1000;
    animation: slideDown 0.5s ease-out;
}

.header-container {

    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    padding: 0 20px;
}

.logo a {
    color: var(--primary-color);
    font-size: 1.8rem;
    font-weight: 700;
    text-decoration: none;
    transition: color 0.3s ease;
}

.nav ul {
    list-style: none;
    display: flex;
    gap: 20px;
    text-transform: uppercase;
}

.nav ul li a {
    color: gray;
    text-decoration: none;
    font-weight: 400;
    font-size: 0.9em;
    transition: color 0.3s ease;
}

.nav ul li a:hover {
    color: var(--secondary-color);font-weight: 700;
}

@keyframes slideDown {
    from { transform: translateY(-100%); }
    to { transform: translateY(0); }
}

/* Footer */
.footer {
    background: var(--background-color);
    color: var(--text-color);
    padding: 2rem 0;
    font-family: 'Exo 2', serif;
    text-align: center;
    border-top: 2px solid var(--border-color);
    z-index: 999;
}

.footer p {
    font-size: 0.9rem;
    margin: 0.5rem 0;
}

.social-links a {
    color: var(--primary-color);
    text-decoration: none;
    margin: 0 10px;
    transition: color 0.3s ease;
}

.social-links a:hover {
    color: var(--secondary-color);
}
.authors-bt{font-size: 0.7em!important}
.bt-9 {font-size: 0.9em;}

h1 {
    font-size: 2rem;
    margin-bottom: 1.5rem;
    color: var(--primary-color);
    animation: fadeIn 1s ease-in-out;
    border-bottom: 9px solid #bfd4dd;
    line-height: 1.4;
    padding-bottom: 16px;
    padding-top: 10px;
    font-family: 'Exo 2', serif;
    text-shadow: -1px 0 0 #e57221;
}

h2, h3 {
    font-size: 1.5rem;
    margin-bottom: 1rem;
    color: var(--primary-color);
    font-family: 'Exo 2', serif;
    font-weight: 400;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(-10px); }
    to { opacity: 1; transform: translateY(0); }
}


main {
    display: flex;
    flex: 1;
    min-height: 60vh;
}
main p,
main div,
main span,
main li{
    margin-bottom: 20px;
    line-height: 1.7;
    font-size: 1.0em;
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
}
main a {
    text-decoration: none;
    position: relative; 
    transition: color 0.3s ease;
    color: #539ab9;
}
main a::after {
  content: '';
  position: absolute;
  left: 0;
  bottom: -2px; 
  width: 0; 
  height: 2px; 
  background: #febc61; 
  transition: width 0.3s ease; 
}
main a:hover::after {
  width: 100%; 
}
main a:hover {
    color:gray;
}
main a.img-link::after {
  background: white;
}
main ul,
main ul{margin:20px;}
/* Посилання, що містить зображення: лінія білого кольору */
main a:has(img)::after {
  background: white;
}
img 
{max-width: 100px;
max-height: 200px;
}
.logo img{max-width: 100%;}
.search-container {
    flex: 1;
    max-width: 800px;
    margin: 22px;
    padding: 20px;
    animation: fadeIn 0.8s ease-in-out;
    margin-left: 20%;
margin-right: 20%;
}
.main-content, .results, .form-container {
    flex: 1;
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
    animation: fadeIn 0.8s ease-in-out;
}
.annotation{display:block;margin-bottom: 15px;}
.dynamic-field { margin-bottom: 5px; }
.hidden { display: none; }
.tags, .collection{ margin-top: 16px; }
        .collections ul { list-style-type: none; padding: 0; }
        .collections li { margin: 5px 0; }
        .collections a { color: #0066cc; text-decoration: none; }
        .collections a:hover { text-decoration: underline; }
        .filter-panel { margin-bottom: 20px; padding: 10px; border: 1px solid #ddd; border-radius: 5px;background: whitesmoke;padding: 22px;margin: 22px; }
        .filter-panel label { margin-right: 15px; }
        .filter-panel input[type="submit"] { margin-top: 10px; padding: 5px 10px; }
.sidebar {
    width: 300px;
    padding: 20px;
    margin-bottom: 38px;
    background: white;
    border-left: 1px solid #ddd;
    box-shadow: var(--shadow);
    transition: transform 0.3s ease;
    min-height: 90vh;
}
.category {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.5rem 1rem;
  background: #a0a0a0;
  border-radius: var(--radius);
  font-size: 0.8rem;
  color: white;
  margin: 1rem 0;
  width: fit-content;
  box-shadow: var(--shadow);
}
.category a {color:white;}
.category a:hover {color:black}
.sidebar:hover {
    transform: translateX(-5px);
}
.list-1 ul, ol {
  list-style-type: none;
  padding-left: 0;
  }

/* Metadata */
.metadata p,
.metadata div,
.metadata span,
.metadata li,
.metadata em,
.metadata i,
.metadata b,
.metadata strong,
.metadata dt,
.metadata dd{
font-size: 1em;
line-height: 1.7;
}

.metadata dl {
  display: grid;
  grid-template-columns: 150px 1fr;
  gap: 10px;
}

.metadata dt {
  font-weight: 600; 
  color: var(--secondary-color);
  margin-bottom: 15px;
}

.metadata dd {
  color: var(--text-color);
  margin: 0;
  margin-bottom: 15px;
}

  .metadata li{
      margin-bottom:20px;
  }
 
.tags h2,
.collection h2,
.files h2{
    color:var(--secondary-color);
    border-bottom: 6px solid #ececec;
    text-shadow: -1px 0 0 var(--secondary-color);
}
.files{margin-top: 19px;}    

.bibliography {
    background-color: #ececec; 
    border: 1px solid #e0e0e0;
    border-radius: 8px; 
    padding: 15px; 
    margin-bottom: 20px;
    font-family: 'Arial', sans-serif; 
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05); 
}

.bibliography label {
    display: block; 
    font-size: 14px;
    font-weight: bold; 
    color: #333; 
    margin-bottom: 5px;
}

.bibliography select {
    width: 100%; 
    padding: 8px;
    font-size: 14px;
    border: 1px solid #ccc;
    border-radius: 4px; 
    background-color: #fff; 
    color: #333;
    transition: border-color 0.3s ease;
}

.bibliography select:focus {
    outline: none;
    border-color: #007bff;
    box-shadow: 0 0 5px rgba(0, 123, 255, 0.3);
}

.bibliography p {
    margin: 10px 0 5px; 
    font-size: 14px;
    color: #333;
}

.bibliography p strong {
    font-weight: bold;
}

.bibliography #citation-output {
    font-size: 13px;
    line-height: 1.5; 
    color: #444;
    background-color: #fff; 
    padding: 10px; 
    border: 1px solid #ddd;
    border-radius: 4px;
    word-wrap: break-word;
}

/* Items and results */
.item, .result-item {
    background: white;
    border-radius: 10px;
    padding: 20px;
    margin-bottom: 20px;
    box-shadow: var(--shadow);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}
.result-item {
    background: #f9f9f9;
    border-radius: 10px;
    padding: 20px;
    margin-bottom: 20px;
    transition: transform 0.3s ease, box-sh;
}

.item:hover, .result-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 12px rgba(0, 0, 0, 0.1);
}

.file-preview {
    max-width: 100px;
    max-height: 100px;
    border-radius: 5px;
    transition: transform 0.3s ease;
}

.file-preview:hover {
    transform: scale(1.05);
}

.file-link {
    color: var(--primary-color);
    text-decoration: none;
    transition: color 0.3s ease;
}

.file-link:hover{
    color: var(--secondary-color);
    text-decoration: none;
}

/* Forms */
.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    font-weight: 600;
    margin-bottom: 5px;
    color: gray;
    font-size: 1.2em;
}

.form-group input, .form-group select, .form-group textarea {
    width: 100%;
    padding: 10px;
    border: 1px solid #ccc;
    border-radius: 5px;
    font-size: 1rem;
    transition: border-color 0.3s ease, box-shadow 0.3s ease;
}

.form-group input:focus, .form-group select:focus, .form-group textarea:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 5px rgba(233, 113, 28, 0.3);
    outline: none;
}
.hidden-element{height: 1px;position: absolute;width: 1px;clip: rect(1px,1px,1px,1px);overflow: hidden;}
/* Buttons */
button, input[type="submit"] {
    padding: 10px 20px;
    background: var(--gradient);
    color: white;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    font-weight: 600;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    margin: 3px 1px;
}

button:hover, input[type="submit"]:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.15);
}
.button-link {
    padding: 10px 20px;
    background: var(--gradient);
    color: white;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    font-weight: 600;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    display: inline-block;
    margin: 3px 2px;
    font-size:0.8em;
}
.button-link a{color:white}
.button-link a::after{position: relative!important}
.button-link a:hover{color:white}
/* Errors */
.error {
    color: #e63946;
    margin-bottom: 10px;
}

/* Pagination */
.pagination {
    margin-top: 20px;
    text-align: center;
}

.pagination a, .pagination .current {
    display: inline-block;
    margin: 0 5px;
    padding: 8px 16px;
    border-radius: 5px;
    text-decoration: none;
    transition: background 0.3s ease;
}

.pagination a {
    background: white;
    color: var(--primary-color);
    border: 1px solid #ccc;
}

.pagination a:hover {
    background: var(--primary-color);
    color: white;
}

.pagination .current {
    background: var(--primary-color);
    color: white;
    border: 1px solid var(--primary-color);
}

/* Responsive */
@media (max-width: 767px) {
    body {
        flex-direction: column;
    }
main{display:block;}    
.sidebar{
    width:95%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
    background: white;
    border-radius: 10px;
    padding: 20px;
    margin-bottom: 20px;
    box-shadow: var(--shadow);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}
    .main-content, .search-container, .results, .form-container {
        padding: 15px;
    }

    .sidebar {
        width: 100%;
        border-left: none;
        border-top: 1px solid #ddd;
    }

.metadata dl {
    grid-template-columns: 1fr;
  }
  .metadata dt,
  .metadata dd {
    grid-column: 1 / -1;
  }
  .metadata dt {
    margin-top: 1rem;
  }
  .metadata dd {
    padding-left: 0.5rem;
  }

    .file-preview {
        max-width: 80px;
        max-height: 80px;
    }

    .form-group input, .form-group select, .form-group textarea {
        font-size: 0.9rem;
    }
}
.menu-toggle {
    display: none;
    font-size: 2rem;
    background: none;
    border: none;
    color: var(--primary-color);
    cursor: pointer;
    transition: all 0.3s ease;
}

/* При малих екранах показуємо кнопку і ховаємо меню */
@media (max-width: 1260px) {
.menu-toggle {
        display: block;
        position: relative;
        z-index: 1001;
    }

    .nav {
        display: none;
        position: fixed;
        top: 0;
        right: 0;
        width: 100%;
        height: 100%;
        background: #fff;
        z-index: 1000;
        padding: 80px 20px 20px;
        transition: transform 0.3s ease;
        transform: translateX(100%);
    }

    .nav.open {
        display: block;
        transform: translateX(0);
    }

    .nav ul {
        flex-direction: column;
        padding-top: 1rem;
    }

    .nav ul li {
        width: 100%;
    }

    .nav ul li a {
        display: block;
        width: 100%;
        padding: 0.5rem 0;
        text-align: center;
    }
}
.login-form {
  display: flex;
  flex-direction: column;
  gap: 0.3rem;

  margin: auto;

  min-width: 150px;
  max-width: 250px;
}
.login-form input{height: 30px}
.login-form button{margin-top: 34px;}

aside a:hover{color:wheat!important}
.indexed h2{font-size: 1.35em;
color: darkkhaki;
text-shadow: -1px 0 0 darkkhaki;}

@media (max-width: 767px) {
    body {
        font-family: 'Exo 2', serif;
    }
    main p {
        font-family: 'Exo 2', serif;
    }
    h1 {
    font-size: 1.3rem;

}
    h2, h3 {
    font-size: 1.1rem;

}
}