/* Import Google Fonts -------------------------------------- */
@import url('https://fonts.googleapis.com/css2?family=Roboto+Slab:wght@300;400;500;600;700&display=swap');
@import url('https://fonts.googleapis.com/css2?family=Lilita+One&display=swap');


/* General -------------------------------------------------- */
:root {
    --green-light: #a6ca92;
    --green-medium: #728e3a;
    --green-dark: #667a5b;
    --green-shade :rgb(237, 241, 238);
}

body {
    font-family: "Open Sans", "Arial", sans-serif;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    background-color: rgb(238, 238, 238);
}

h1, h2, h3, h4, h5, h6 {
    font-family: "Open Sans", "Arial", sans-serif;
}

a {
    text-decoration: none;
    color: black;
}

.link-text {
    text-decoration: underline;
    color: #0000EE;
}

.main-heading {
    color: #485e4a;
    font-weight: bold;
    font-family: "Lilita One", sans-serif;
    font-size: 3rem;
    text-transform: uppercase;
}

.sub-heading {
    border-left: 10px solid var(--green-medium);
    padding-left: 12px;
    color: #585858;
}

@media only screen and (max-width: 575px) {
    .main-heading {
        font-size: 1.8rem;
    }
    
    .sub-heading {
        border-left: 8px solid var(--green-medium);
        padding-left: 9px;
        font-size: 1.4rem;
    } 
}


/* Navbar -------------------------------------------------- */
.logo-container {
    background-color: var(--green-light);
    padding-top: 10px;
}

#nav-logo {
    width: 225px;
    padding: 0;
}

.search {
    width: 35%;
}

.search-form {
    display: flex;
    align-items: center;
}

.search-field {
    border: none;
    padding: 5px 5px 5px 20px;
    height: 50px;
    border-radius: 25px 0 0 25px;
    outline: none;
    font-size: 20px;
    width: 100%;
}

.search-button {
    border: none;
    height: 50px;
    text-align: center;
    color: black;
    background-color: white;
    border-radius: 0 25px 25px 0;
    cursor: pointer;
    font-size: 20px;
    padding: 0 20px;
  }

.navbar {
    background-color: var(--green-light);
}

.nav-link {
    font-size: 1.5rem;
    font-family: "Lilita One", sans-serif;
    text-decoration: none;
    display: inline-block;
    position: relative;
}
  
.nav-link::after {
    content: '';
    position: absolute;
    width: 100%;
    transform: scaleX(0);
    height: 2px;
    bottom: 0;
    left: 0;
    background-color: #1a1a1a;
    transform-origin: bottom right;
    transition: transform 0.5s ease-out;
}

.nav-link:hover::after {
    transform: scaleX(1);
    transform-origin: bottom left;
}

.nav-active {
    color: rgb(0, 0, 0);
}

.dropdown-menu {
    --bs-dropdown-link-hover-bg: var(--green-medium);
    --bs-dropdown-link-hover-color: white;
    --bs-dropdown-link-active-bg: var(--green-medium);
}

.navbar-icon {
    color: rgba(0,0,0, 0.65);
    transition: color 0.25s ease-out;
}

.navbar-icon:hover {
    color: rgba(0,0,0);
    cursor: pointer;
}

.navbar-nav .dropdown-menu {
    display: none;
}

.navbar-nav .dropdown:hover .dropdown-menu {
    display: block;
}

@media only screen and (max-width: 950px) {
    .nav-link {
        font-size: 1.2rem;
    }
}

@media only screen and (max-width: 550px) {
    #nav-logo {
        width: 150px;
    }

    .search {
        width: 45%;
    }

    .search-field {
        border: none;
        padding: 5px 5px 5px 10px;
        height: 30px;
        font-size: 14px;
    }
    
    .search-button {
        height: 30px;
        font-size: 14px;
        padding: 0 10px;
    }

    .navbar-icon {
        font-size: 20px;
    }

    .navbar-toggler {
        margin-top: 10px;
        font-size: 16px;
    }
}


/* Button for infinity scrolling---------------------------- */
.scroll-button {
    background-color: rgb(75, 91, 80);
    height: 55px;
    width: 55px;
    display: none;
    cursor: pointer;
    position: fixed;
    bottom: 30px;
    right: 15px;
}

.scroll-link {
    text-decoration: none;
}


/* Footer -------------------------------------------------- */
footer {
    background-color: var(--green-dark);
    color: white;
}

#footer-logo {
    display: flex;
    justify-content: center;
    align-items: center;
    width: 260px;
    height: auto;
}

@media only screen and (max-width: 990px) {
    #footer-logo {
        width: 200px;
    }
  }

#footer-logo img {
    width: 100%;
    height: 100%;
}

footer a {
    text-decoration: none;
    color: white;
    transition: 0.3s;
}

footer a:hover {
    color: rgb(177, 177, 177);
}


/* Containers -------------------------------------------------- */
.main-container {
    background-color: rgba(255, 255, 255, 0.90);
    border-radius: 5px;
    box-shadow: 0 4px 9px rgba(0, 0, 0, 0.1);
}

.accordion {
    --bs-accordion-bg: #76c09b;
    border: 1px solid #ffffff;
    color: #ffffff;
}

.accordion-button:not(.collapsed) {
    color: #ffffff;
    background-color: #45535c;
    box-shadow: inset 0 calc(-1* var(--bs-accordion-border-width)) 0 #000000;
}

/* Toasts -------------------------------------------------- */
.message-container {
    position: fixed;
    top: 30px;
    right: 30px;
    z-index: 50;
}

.toast-body{
    font-size: 16px;
}

.toast-header{
    font-size: 22px;
}

.info-icon {
    color: #1b6fe4;
}

.success-icon {
    color: #0d8d45;
}

.error-icon {
    color: #d9534f;
}

.warning-icon {
    color: #f0ad4e;
}

.info-border-bottom {
    border-bottom: 3px solid  #1b6fe4;
}

.success-border-bottom {
    border-bottom: 3px solid  #0d8d45;
}

.error-border-bottom {
    border-bottom: 3px solid  #d9534f;
}

.warning-border-bottom {
    border-bottom: 3px solid  #f0ad4e;
}

@media screen and (max-width: 500px) {
    .message-container {
        top: 10px;
        right: 5px;
        width: 250px;
    }

    .toast-body{
        font-size: 14px;
        padding: 5px 7px;
        margin-bottom: 5px;
    }

    .toast-header{
        padding: 5px 7px;
        font-size: 16px;
    }
}

.fadeimage {
    animation: fadeIn 3s; 
}

@keyframes fadeIn {
    0% { opacity: 0; }
    100% { opacity: 1; }
}

/* Posts -------------------------------------------------- */
.post {
    height: 300px;
    box-shadow: 0 4px 8px 0 rgba(0, 0, 0, 0.2), 0 6px 20px 0 rgba(0, 0, 0, 0.19);
    position: relative;
    overflow: hidden;
}

@media screen and (max-width: 400px) {
    .post {
        height: 200px;
    }
}

.post::before {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 100px;
    background: linear-gradient(to top, rgba(0, 0, 0, 0.85), transparent);
    z-index: 4;
}

.recent-post {
    height: 250px;
}

.post-thumbnail {
    width: 100%;
    height: 100%;
    object-fit: cover;
    filter: brightness(80%) saturate(90%);
}

.post-title {
    position: absolute;
    bottom: 10px;
    left: 15px;
    padding-right: 10px;
    z-index: 5;
    font-size: 24px;
    color: white;
    transition: color 0.25s ease-out;
}

.post:hover .post-title {
    color: rgb(170, 170, 170);
}

.post-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.post-img-container {
    height: 400px;
    overflow: hidden;
}

@media (max-width: 575px) {
    .post-hide:nth-child(n+4) { /* Hide all posts after the 3rd one */
        display: none;
    }
}


/* Buttons and icons -------------------------------------------------- */
.btn-main {
    background-color: var(--green-medium);
    color: white;
    padding: 7px 14px;
    transition: 0.3s;
    font-size: 16px;
    border-radius: 7px;
    border: 1px solid rgba(0, 0, 0, 0.3);
}

.btn-main:hover {
    background-color: #5e7a26;
}

.btn-second {
    background-color: white;
    color: var(--green-medium);
    padding: 7px 14px;
    transition: 0.3s;
    font-size: 16px;
    border: 2px solid var(--green-medium);
    border-radius: 7px;
    font-weight: 600;
    --bs-dropdown-link-hover-bg: var(--green-medium);
    --bs-dropdown-link-hover-color: white;
    --bs-dropdown-link-active-bg: var(--green-medium);
}

.btn-second:hover {
    background-color: rgb(247, 247, 247);
}

.btn-edit {
    font-size: 18px;
    color: grey;
    transition: color 0.2s ease-out;
}

.btn-edit:hover {
    color: rgb(41, 45, 255);
}

.btn-delete {
    font-size: 18px;
    color: grey;
    transition: color 0.2s ease-out;
}

.btn-delete:hover {
    color: rgb(255, 71, 71);
}

.btn-admin {
    padding: 10px 20px;
    font-size: 24px;
    border-radius: 10px;
}

@media (max-width: 575px) {
    .btn-main {
        padding: 5px 10px;
        font-size: 14px;
    }

    .btn-second {
        padding: 5px 10px;
        font-size: 14px;
    }

    .btn-admin {
        padding: 7px 14px;
        font-size: 16px;
        border-radius: 7px;
    }
}
