/* General styling */
body {
    font-family: 'Roboto Slab', serif;
    margin: 0;
    padding: 0;
    background-image: url('images/backg.avif');
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

html {
    width: 100%;
}

.content-container {
    min-width: 40%;
    width: 70%;
    margin: auto;
}


/* Header styling */

.nav-header {
    background-color: #290404;
    height: 144px;
    width: 100%;
    z-index: 3;
    font-family: 'Roboto Slab', serif;
}

.nav-header a{
    color: white;
    transition: color 0.2s ease, transform 0.2s ease;
}

.nav-header a:hover {
    text-decoration: none;
    transform: scale(1.02);
    color: lightgray;

}

.nav-img {
    height: 144px;
    width: auto;
}

.nav-header-content {
    width: fit-content;
    margin: auto;
    height: 144px;
    display: flex;
    flex-direction: row;
}

.nav-first-row, .nav-second-row {
    height: 72px;
    display: flex;
    justify-content: center; /* Centers horizontally */
    align-items: center; /* Centers vertically */
    gap: 10px;
}

.nav-first-row {
    border-bottom: 1px solid white;
}

/* Default Styles */
.nav-header {
    position: fixed;
}

.nav-toggle {
    display: none;
    background: none;
    border: none;
    font-size: 24px;
    cursor: pointer;
}

/* Default state: show hamburger icon, hide close icon */
.nav-toggle .fa-bars {
    display: inline; /* Show the hamburger icon */
    color: white;

}

.nav-toggle .fa-times {
    display: none; /* Hide the close icon */
    color: white;
}

/* When the menu is active (expanded), show the close icon and hide the hamburger icon */
.nav-toggle.active .fa-bars {
    display: none; /* Hide the hamburger icon */
}

.nav-toggle.active .fa-times {
    display: inline; /* Show the close icon */
}

/* Responsive Styles */
@media (max-width: 1200px) {
    .nav-header-content {
        position: fixed;
        width: 100%;
        margin: 0;
        z-index: 1000;
    }
    .nav-header {
        z-index: 1000;
    }
    .nav-collapsiblelinks {
        margin-left: auto;
        margin-right: 20px;
    }

    .nav-toggle {
        display: block; /* Show the toggle button on smaller screens */
        z-index: 1000;
    }

    .nav-links-wrapper {
        display: flex;
        position: fixed;
        bottom: 0;
        left: -100%; /* Start off-screen */
        width: 100%;
        height: calc(100% - 144px);
        background-color: #F7F5F4;
        align-items: center;
        flex-direction: column-reverse;
        transition: left 0.2s ease-in-out; /* Smooth transition */
        overflow-y: auto; /* Enable scrolling when necessary */
        justify-content: space-between;
    }

    .nav-links-wrapper.active {
        left: 0; /* Slide into view */
    }


    .no-scroll {
        overflow: hidden; /* Prevent body scroll when menu is open */
        height: 100%; /* Ensure body doesn't scroll */
    }
}

.nav-socials a,
.nav-associates-links a{
    margin: 10px
}

@media (max-width: 1200px) {
    .nav-second-row{
        display: flex;
        flex-direction: column;
        width: 100%;
        gap: 0px;
        height: fit-content;
        align-items: flex-start;
        z-index: 999;

    }

    .nav-home {
        display: none;
    }

    .nav-header{
        position: fixed;
    }

    .nav-first-row {
        display: flex;
        flex-direction: column;
        margin-bottom: 40px;
        z-index: 999;

    }

    .nav-first-row a {
        text-align: center;
        padding: 10px;
        white-space: nowrap;
    }

    .nav-socials{
        text-align: center;
    }

    .nav-associates-links {
        text-align: center;
    }

    .page-img {
        margin-top: 144px;
    }
}

.page-img {
    margin-top: 144px;
    border-bottom: 1px solid black;
}

.nav-collapsiblelinks {
    display: flex;
    align-items: center;
    margin-left: 5px;
}

/* Dropdown container */
.dropdown {
    position: relative;
    display: flex;
    height: 72px;
    align-items: center;
}

/* Style the dropdown button */
.dropbtn {
    display: none;
    color: black;
    padding: 10px;
    text-align: center;
    border: none;
    cursor: pointer;
}

/* Dropdown content (hidden by default) */
.dropdown-content {
    position: absolute;
    width: 200px; /* Final width */
    top: 72px;
    background-color: #f9f9f9;
    box-shadow: 0px 8px 16px 0px rgba(0, 0, 0, 0.2);
    z-index: 1;
    overflow: hidden;
    max-height: 0; /* Hidden by default */
    opacity: 0; /* Transparent by default */
    transform-origin: top left; /* Start transformation from the top-left corner */
    transform: scaleX(0) scaleY(0); /* Start scaled down both horizontally and vertically */
    transition: max-height 0.3s ease-in-out, transform 0.2s ease-in-out, opacity 0.2s ease-in-out; /* Animate scale, opacity, and max-height */
}

/* Links inside the dropdown */
.dropdown-content a {
    color: black;
    padding: 12px 16px;
    text-decoration: none;
    display: block;
    border-bottom: 1px solid lightgray;
}

/* Change color of dropdown links on hover */
.dropdown-content a:hover {
    background-color: #f1f1f1;
}

/* Show the dropdown on hover */
.dropdown:hover .dropdown-content {
    max-height: fit-content; /* Set this to a value that accommodates all dropdown items */
    opacity: 1; /* Fade in */
    transform: scaleX(1) scaleY(1); /* Scale to original size both horizontally and vertically */
}


.nav-bar-link {
    padding: 10px;
}

@media (max-width: 1200px) {
    .nav-collapsiblelinks{
        margin-left: auto;
    }
    .dropdown {
        display: flex;
        width: calc(100% - 20px);
        align-items: flex-start;
        flex-direction: column;
        height: fit-content;
        margin: 10px;
    }

    .nav-header a {
        color: black;
    }

    .nav-header a:hover {
        color: #A31008;
        transform: none;
    }

    .dropdown.active a.dropbtn{
        border-bottom: none;
    }

    .nav-second-row a{
        width: 100%;
        border-bottom: 1px solid black;
    }

    .nav-bar-link{
        display: flex;
        height: 45px;
        align-items: center;
        width: calc(100% - 20px) !important;
        margin: 10px;
        padding: 10px;
    }

    .dropbtn {
        display: block;
        text-align: left;
        padding: 10px;
    }

    .dropdown-content {
        position: relative;
        box-shadow: none;
        display: none;
        background-color: white;
        max-height: fit-content;
        transition: none;
        opacity: 1;
        transform: none;
    }

    .dropdown-content a{
        padding: 10px;
        width: calc(100% - 20px);
    }

    /* Remove hover behavior, links will only open on click */
    .dropdown .active:hover .dropdown-content {
        display: none;
    }

    .dropdown.active .dropdown-content {
        display: block;
        width: 100%;
        top: 5px;
        left: 0px;
        height: fit-content;
    }

    .dropdown-content a {

        margin: 10px;
    }
}

/* Login & Registration Page Styling */
.login-container, .register-container {
    max-width: 400px;
    margin: 50px auto;
    background-color: #ffdede;
    padding: 40px;
    border-radius: 10px;
    height: fit-content;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    box-shadow: rgba(0, 0, 0, 0.24) 0px 3px 8px;
}

.form-group {
    margin-bottom: 15px;
}

.form-label {
    display: block;
    margin-bottom: 5px;
    font-weight: bold;
    color: #290404;
}

.form-input {
    width: 100%;
    padding: 10px;
    border: 1px solid #290404;
    border-radius: 5px;
    background-color: #fff;
}

.btn-primary {
    width: 100%;
    padding: 10px;
    background-color: #290404;
    border-radius: 5px;
    color: #fff0f0;
    font-size: 16px;
    cursor: pointer;
}

.btn-primary:hover {
    background-color: #b32424;
}

/* Articles on home page */
.card {
    min-width: 300px;
    border-radius: 4px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
    background-color: #f9f9f9;
    transition: transform 0.2s;
    margin-bottom: 20px;
    max-width: 300px;
    z-index: 1;
}

.card:hover {
    transform: scale(1.008);
}

.card-img-top {
    width: 100%;
    height: 200px;
    object-fit: cover;
}

.card-body {
    padding: 15px;
    background-color: #fff;
    border-top: 1px solid #e1e1e1;
}

.card-title a {
    color: #290404;
    text-decoration: none;
    font-size: 1.25rem;
    overflow: hidden;
}

.card-title a:hover {
    color: #b32424;
}

.card-text {
    font-size: 0.875rem;
    color: #666;
    margin: 0;
}

/* Adjustments for the layout */
.row {
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
    margin-left: -15px;
    margin-right: -15px;
}

.col-md-4 {
    display: flex;
    justify-content: center;
    padding: 0 15px;
    min-width: 300px;
}

/* Headline container styling */
.headline-container {
    display: flex;
    align-items: center;
    margin-bottom: 30px;
    padding: 20px 0;
    background-color: white;
    border-bottom: 3px solid #042001;
}

.headline-image {
    width: 48px;
    margin-right: 15px;
}

.headline-text {
    font-size: 2rem;
    font-family: 'Roboto Slab', serif;
    color: #042001;
    font-weight: bold;
}

/* Content Wrapper Styling */
.content-wrapper {
    background-color: #f4f4f4;
    padding: 20px 0;
}

.content-block {
    display: flex;
    flex-direction: column;
    min-width: 475px;
    min-height: 100vh;
    background-color: #fff;
    padding: 30px;
    margin: 30px auto 0;
    max-width: 100%;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
    border-radius: 8px;
}


@media (min-width: 1200px) {
    .second-row {
        display: flex !important;
    }
}

.chapter-wrapper {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 20px;
  padding: 20px;
}

.chapter-container {
  border: 1px solid #ddd;
  border-radius: 8px;
  overflow: hidden;
  max-width: 400px;
  text-align: left;
  background-color: #fff;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
  transition: transform 0.2s ease-in-out;
}

.chapter-container:hover {
    transform: scale(1.03);
}

/* Basic styling for the link */
.animated-link {
    position: relative; /* For positioning the pseudo-element */
    color: #540202;
    text-decoration: none;
    width: fit-content;
    margin-left: 20px;
    margin-bottom: 20px;
}

/* Create a pseudo-element for the animated border */
.animated-link::after {
    content: ''; /* Empty content for the pseudo-element */
    position: absolute;
    left: 0; /* Start from the left */
    bottom: 0;
    width: 100%; /* Full width initially */
    height: 1px; /* Border thickness */
    background-color: #540202; /* Border color */
    transition: transform 0.3s ease-out; /* Smooth transition effect */
    transform-origin: left;
}

/* Hover effect to animate the border */
.chapter-container:hover .animated-link::after {
    transform: scaleX(0); /* Shrink the border to 0 width */
}



.chapter-container a {
  text-decoration: none;
  color: #333;
  display: block;
  padding: 10px;
  transition: color 0.2s ease;
}

.chapter-container img {
  width: 100%;
  height: auto;
  display: block;
  margin-bottom: 10px;
}

.chapter-container a p {
  margin: 10px 0 0;
  font-size: 16px;
  font-weight: bold;
}

.chapter-container:hover a {
    color: gray;
}

/* Style for the document list */
.dokumendid-list ul {
    list-style-type: none;
    padding: 0;
    margin: 20px 0;
}

.dokumendid-list li {
    margin: 10px 0;
    padding-left: 1em;
    padding-right: 1em;
}
.dokumendid-list ul li {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.dokumendid-list a {
    text-decoration: none;
    color: #8c0412;
    font-size: 18px;
    transition: color 0.3s ease;
    padding: 10px;
    border-radius: 5px;
    display: block;
    background-color: #f8f9fa;
}

.dokumendid-list a:hover {
    color: #b30517;
    background-color: #e2e6ea;
}

.dokumendid-list a:active {
    color: #003865;
}

/* Container for the upload button */
.custom-upload-container {
    display: flex;
    justify-content: center;
    align-items: center;
    margin: 20px;
    padding: 10px;
    border: 2px dashed #ddd;
    border-radius: 8px;
    background-color: #f9f9f9;
}

/* Form styling */
.custom-upload-form {
    display: flex;
    flex-direction: column;
    align-items: center;
}

/* File input wrapper */
.custom-file-upload-wrapper {
    position: relative;
    display: inline-block;
    margin-bottom: 10px;
    cursor: pointer;
}

/* File input styling (hidden) */
.custom-file-input {
    position: absolute;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
    cursor: pointer; /* Ensure the cursor is a pointer on hover */
}

/* Custom file upload button styling */
.custom-file-upload-label {
    display: inline-block;
    padding: 10px 20px;
    background-color: #28a745;
    color: #fff;
    border-radius: 4px;
    font-size: 14px;
    cursor: pointer; /* Set the cursor to pointer */
    transition: background-color 0.3s ease, color 0.3s ease;
}

.custom-file-upload-label:hover {
    background-color: #218838; /* Darker green on hover */
    color: #e9ecef; /* Slightly lighter text color on hover */
}

/* Upload button styling */
.custom-upload-button {
    padding: 10px 20px;
    background-color: #007bff;
    color: #fff;
    border: none;
    border-radius: 4px;
    cursor: pointer; /* Set the cursor to pointer */
    font-size: 14px;
    transition: background-color 0.3s ease;
}

.custom-upload-button:hover {
    background-color: #0056b3;
}

.worker-table thead th {
    background-color: #f8f9fa;
    padding: 10px;
    text-align: left;
    border-bottom: 2px solid #dee2e6;
}

.worker-table tbody td {
    padding: 10px;
    border-bottom: 1px solid #dee2e6;
}

.worker-table tr:hover {
    background-color: #f1f1f1;
}

/* Button styling */
.btn, .btn-edit, .btn-delete {
    display: inline-block;
    padding: 8px 12px;
    font-size: 14px;
    text-align: center;
    cursor: pointer;
    text-decoration: none;
    border: none;
    border-radius: 4px;
    transition: background-color 0.3s ease;
}

.btn {
    background-color: #007bff;
    color: white;
    margin-bottom: 20px;
}

.btn:hover {
    background-color: #0056b3;
}

.btn-edit {
    background-color: #28a745;
    color: white;
}

.btn-edit:hover {
    background-color: #218838;
}

.btn-delete {
    background-color: #dc3545;
    color: white;
    margin-left: 10px;
}

.btn-delete:hover {
    background-color: #c82333;
}

.delete-form {
    display: inline-block;
}

.form-container {
    width: 50%;
    margin: 50px auto;
    padding: 20px;
    background-color: #fff;
    border-radius: 8px;
    box-shadow: 0px 2px 10px rgba(0, 0, 0, 0.1);
}

.form-container {
    width: 50%;
    margin: 50px auto;
    padding: 20px;
    background-color: #fff;
    border-radius: 8px;
    box-shadow: 0px 2px 10px rgba(0, 0, 0, 0.1);
}

@media (max-width: 768px) {
    .form-container {
        width: 90%;
    }
}

.search-form {
    max-width: 800px;
    margin: 0 auto;
    padding: 20px;
    background-color: #f9f9f9;
    border-radius: 10px;
    box-shadow: 0 0 15px rgba(0, 0, 0, 0.1);
    margin-bottom: 10px;
}

.form-group {
    display: flex;
    align-items: center;
    width: 100%;
}

.search-input-wrapper {
    position: relative;
    width: 100%;
}

.search-input {
    width: calc(100% - 50px); /* Adjust width to accommodate button */
    padding: 12px 20px;
    border: 1px solid #ccc;
    border-radius: 25px; /* Rounded corners */
    font-size: 16px;
    box-sizing: border-box; /* Includes padding in width */
    outline: none;
    transition: border-color 0.3s ease;
}

.search-input:focus {
    border-color: #28a745; /* Green border on focus */
}

.search-button {
    position: absolute;
    right: 10px;
    top: 50%;
    transform: translateY(-50%);
    background-color: #28a745;
    color: white;
    padding: 10px;
    border: none;
    border-radius: 25px; /* Rounded corners */
    font-size: 16px;
    cursor: pointer;
    transition: background-color 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1;
}

.search-button i {
    font-size: 18px;
}

.search-button:hover {
    background-color: #218838;
}

.tox-tinymce {
    width: 100%;
}

.btn-primary {
    background-color: #290404;
}
.btn-primary:hover {
    background-color: #b32424;
}
.event-wrapper {
    display: flex;
    flex-direction: column;
    background-color: #290404;
    color: white;
    border-radius: 29px 29px 25px 25px;
    margin: 10px;
    box-shadow: 0px 0px 33px 3px rgba(0,0,0,0.4);
}
.event-date {
    display: flex;
    justify-content: center;
    flex-direction: column;
    align-items: center;
    border-radius: 25px 25px 0px 0px;
    background-color: white;
    box-shadow: rgba(60, 64, 67, 0.3) 0px 1px 2px 0px, rgba(60, 64, 67, 0.15) 0px 2px 6px 2px;
    color: black;
    width: 100%;
    height: fit-content;
    margin: auto;
}
.event-day {
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 60px;
    padding: 5px;
    height: fit-content;
    border-bottom: 1px solid lightgray;
}
.event-month {
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 10px;
    height: fit-content;
    font-size: 25px;
}

.event-time {
    display: flex;
    justify-content: center;
    align-items: center;
    height: 15%;
    font-size: 30px;
}

.event-title {
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 10px;
}
.event-location {
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 10px;
}
.event-wrapper a {
    padding: 10px;
    border-radius: 25px;
    margin: 2px;
    background-color: #660a0a;
    color: white;
    transition: background-color 0.1s ease;
}
.event-wrapper a:hover {
    background-color: #470606;
    text-decoration: none;
}

.event-container {
    min-width: 300px;
    max-width: 300px;
    margin: auto;
}

.events-page {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    width: 100%;
    height: 100%;
}
.event-content {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 5px;
}

.happening-now {
    width: 100%;
    display: grid;
    gap: 10px;
    grid-template-columns: 1fr;
    margin-top: 20px;
    min-width: 475px;
}

.happening-now-element {
    display: flex;
    align-items: center;
    justify-content: space-between;
    color: white;
    background-color: #660a0a;
    height: 80px;
    padding: 10px;
    font-size: 150%;
    font-weight: bold;
    border-radius: 5px;
    padding-left: 30px;
    padding-right: 30px;
}

.happening-now-element a{
    font-weight: lighter;
    font-size: 80%;
    padding: 10px;
    background-color: white;
    border-radius: 25px;
    color: #660a0a;
    border: 2px solid white;
    transition: background-color 0.2s ease-in-out, color 0.2s ease-in-out;
}

.happening-now-element a:hover {
    background-color: #660a0a;
    color: white;
    text-decoration: none;
}

html {
    min-width: 760px;
}

.dropdown-link {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-direction: row;
    padding: 5px;
}
.dropdown-link a{
    width: 95%;
    padding: 10px;
    border-bottom: none;
}

.dropdown-link .dropbtn {
    text-align: center;
    color: white;
    width: 5%;
    background-color: #660a0a;
    border-radius: 25px;
}

.dropdown-link-custom {
    display: flex;
    flex-direction: row;
    align-items: center;
    text-wrap: nowrap;
}

.dropdown-link-custom svg {
    margin-left: 2px;
}

@media (max-width: 1200px) {
    .dropdown-link-custom svg {
        display: none;
    }
    .dropdown-link {
        border-bottom: 1px solid black;
    }

}

.footer {
    background-color: #290404;
    color: white;
    padding: 20px 0;
    text-align: center;
    position: relative;
    bottom: 0;
    width: 100%;
    margin-top: 2em;
    min-width: 765px;
}

.footer-columns {
    display: flex;
    justify-content: space-between;
    padding: 20px 60px;
    gap: 20px;
    box-sizing: border-box;
}

.footer-column {
    flex: 1;
    padding: 0 10px;
    box-sizing: border-box;
    min-width: 220px;
    text-align: left;
}

.footer-bottom {
    text-align: center;
    margin-top: 3em;
    font-size: 12px;
    margin-bottom: 1em;
}

/* Ensure footer is off-screen and you need to scroll to see it */
.content-wrapper {
    min-height: 100vh;
    margin-bottom: 150px; /* Ensures content doesn't overlap footer */
}

.footer-column p{
    line-height: 25px;
}

.footer-column-title {
    font-size: 1.2em;
    margin-bottom: 10px;
}
.footer-column table, th, td{
    border: none;
}
.footer-column-content {
        line-height: 1.8; /* Adjust this value to increase/decrease spacing */
    }
.footer-column-content a {
        color: inherit; /* Matches the surrounding text color */
        text-decoration: none; /* Removes the underline by default */
    }
.footer-column-content a:hover {
    text-decoration: underline; /* Adds underline on hover */
}

.align-left {
    float: left;
    margin-right: 10px;
}
.align-right {
    float: right;
    margin-left: 10px;
}
.align-center {
    display: block;
    margin-left: auto;
    margin-right: auto;
}

.more-news {
    display: flex;
    justify-content: center;
    width: 100%;
}
.more-news a{
    margin: auto;
    color: white;
    width: fit-content;
    padding: 10px;
    background-color:#290404;
    border-radius: 25px;
    transition: color 0.2s ease, background-color 0.2s ease;
    border: 2px solid #290404;
}

.more-news a:hover{
    text-decoration: none;
    color: #290404;
    background-color: white;
}

.form-label {
    font-weight: 400;
}
.form-group-login {
    margin-top: 20px;
    margin-bottom: 20px;
    padding: 20px;
}

.form-group-login .form-input {
    background-color: #ffdede;
    border: none;
}

.form-login-username {
    border-bottom: 1px solid #290404;
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
}

.form-login-username .form-input:focus-visible {
    border: none;
    outline: none;
}

.btn-primary.focus, .btn-primary:focus {
    background-color: #b32424;
    border-color: #b32020;
    box-shadow: 0 0 0 .2rem #b32020;
}

.event-page {
    display: flex;
    align-items: flex-start;
    flex-direction: column;
}

.event-page-muted-title {
    font-size: 24px;
    width: 100%;
    padding: 10px;
    border-bottom: 1px solid lightgray;
}

.event-page-title {
    width: 100%;
    margin-top: 20px;
}

.event-page-date {
    color: gray;
}

.event-page-content {
    font-weight: bold;
    border-bottom: 1px solid black;
}

.user-actions {
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
}