* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

a {
    text-decoration: none;
    color: #c00;
}

code {
    margin: 2rem 0;
    padding: 1rem;
    background: #293042;
    border-left: 5px solid #1a6ec0;
    border-radius: 0.3rem;
    box-sizing: border-box;
    display: flex;
    align-items: center;
}

body {
    font-family: "Montserrat", sans-serif;
    display: flex;
    flex-direction: column;
    align-items: center;
    min-height: 100vh;
    background-color: #000;
    color: white;
    --setWidth: 80rem;
}

header {
    width: 100%;
    height: 5rem;
    padding: 1rem 0;
}

nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    max-width: var(--setWidth);
    margin: auto;
    position: relative;
}

nav img {
    height: 4rem;
}

input[type="checkbox" i] {
    margin: 0 0.4rem;
}

.logo {
    display: block;
    margin: 0rem 2rem;
    height: 3rem;
}

#menu {
    display: block;
}

.nav-links {
    list-style: none;
    display: flex;
    padding: 0rem 2rem;
}

.nav-links li {
    margin: 0rem 1rem;
    padding: 0.5rem 0rem;
}


.nav-links a {
    color: white;
    text-decoration: none;
}

.nav-links a:hover {
    color: #c00;
    text-decoration: none;
}

.nav-links .current-link {
    box-shadow:
        0px 3px #c00;

}

.menu-close {
    display: none;
    flex-direction: column;
    cursor: pointer;
    margin: 0rem 2rem;
}

.menu-open {
    display: none;
    flex-direction: column;
    cursor: pointer;
    margin: 0rem 2rem;
}

.menu-open div {
    width: 3rem;
    height: 3px;
    background: white;
    margin: 0.3rem;
}

form {
    display: flex;
    flex-direction: column;
    margin: auto;
}

button {
    background: #c00;
    color: white;
    border: none;
    cursor: pointer;
}

footer {
    max-width: var(--setWidth);
    color: white;
    padding: 2rem 0;
    text-align: center;
    margin-top: auto;
}

.social-links {
    margin-top: 1rem;
}

.social-links a {
    color: white;
    text-decoration: none;
}

/* Index Declarations */

.hero {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    align-items: stretch;
    padding: 0rem 2rem 4rem 2rem;
    text-align: center;
    width: 100%;
    background-image: url(hero.jpg);
    background-position: center;
    background-size: auto 100%;
    background-repeat: no-repeat;
    background-color: #000;
    min-height: 600px;
}

.hero-text {
    max-width: 28rem;
    text-align: center;
    text-shadow: 0px 5px 0.5rem black;
}

.hero-text img {
    width: 60%;
}

.hero-text h1 {
    font-size: 2em;
    margin: 1rem;
}

h2 {
    margin-bottom: 2rem;
}

.hero-text p {
    margin: 0.5rem;
}

.btn {
    display: inline-block;
    margin-top: 0.75rem;
    padding: 0.75rem 1.5rem;
    background: #c00;
    color: white;
    font-weight: bold;
    font-size: 1.5em;
    border-radius: 5rem;
    box-shadow: 0 0 1rem #000;
}

.btn:hover {
    background: #202634;
    ;

}

.hero-image img {
    max-width: 100%;
    height: auto;
    padding: 2rem 4rem;
    -webkit-filter: drop-shadow(0 0.2rem 0.2rem rgba(0, 0, 0, 0.));
    filter: drop-shadow(0 0.2rem 0.2rem rgba(0, 0, 0, 0.5));
}


section {
    padding: 2rem 2rem 0 2rem;
    max-width: var(--setWidth);

}

p {
    margin-bottom: 1rem;
}

.services {
    text-align: center;
}

.service-container {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
}

.service {
    width: 100%;
    max-width: 16rem;
    padding: 1rem;
}

.service h3 {
    margin: 1rem 0;
    color: #c00;
}

.material-icons {
    font-size: 2rem;
}

/* Guide elements */

#kb {
    display: flex;
    justify-content: center;
    align-items: flex-start;
    gap: 2rem;
}

pre {
    text-wrap: pretty;
}

.sidebar {
    position: sticky;
    top: 20px;
    /* Adjust this to control where it sticks */
    background: #293042;
    padding: 1rem 2rem;
    border-radius: 0.3rem;
    margin: 1rem 0;
}

.sidebar a {

    color: white;
    text-decoration: none;
    font-weight: normal;
}

.sidebar a:hover {
    color: #1a6ec0;
}

.sidebar li {
    margin: 1rem 0 0 1rem;
}

.info-window {
    flex: 3;
    margin: 1rem 0;
}

.tile-window {
    flex: 3;
}

/* Library elements */
#lb {
    display: flex;
    flex: 1;
    justify-content: center;
    align-items: flex-start;
    padding: 2rem 2rem;
    gap: 2rem;
    width: 100%;
}

/* Filter section */
.filter-section {
    margin-bottom: 20px;
}

.filter-section label {
    display: block;
    margin-bottom: 5px;
}

.filter-section input[type="text"] {

    border-radius: 50px;
    padding: 0.5rem;
    margin-bottom: 1rem;
}


/* Gallery */
.gallery {
    flex: 1;
    /* Allow gallery to take the remaining space */
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(14rem, 1fr));
    /* Adjusted for width */
    gap: 1rem;
    padding: 1rem;
    align-content: flex-start;
    overflow-y: auto;
}

.ex-tile {
    color: white;
    cursor: pointer;
    text-align: center;
    display: flex;
    flex-direction: column;
    /* Add shadow on hover */
    justify-content: space-between;
    overflow: hidden;
    border-radius: 0.3rem;
    transition: transform 0.5s, box-shadow 0.5s, border 0.5s;
    /* Transition effect for hover */
    aspect-ratio: 4 / 3;
    /* Enforce 4:3 aspect ratio */
}

.ex-tile:hover {
    transform: scale(1.02);
    /* Scale up on hover for emphasis */
    box-shadow: 0 0.4rem 1rem rgba(0, 0, 0, 0.6);
    /* Add shadow on hover */
    border: 2px solid #00509e;
    border-radius: 0.5rem;
}

.ex-tile h3 {
    padding: 20px 20px 20px 20px;
    font-size: 1.2rem;
    margin: 0;
    background: linear-gradient(0deg, rgb(0, 0, 0, 0) 0%, #171b25 80%);
}

/* Align attributes in a row at the bottom */
.ex-attributes {
    display: flex;
    justify-content: space-around;
    padding: 20px 10px 10px 10px;
    background: linear-gradient(180deg, rgb(0, 0, 0, 0) 0%, #171b25 100%);
}

.ex-attributes p {
    margin: 0;
    font-size: 0.9rem;
}

/* Modal */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.8);
    justify-content: center;
    align-items: center;
}

.modal-content {
    color: white;
    background-color: #171b25;
    border-radius: 0.5rem;
    overflow: auto;
    min-width: 40%;
    max-width: 70%;

    min-height: 40%;
    max-height: 80%;
    aspect-ratio: 4 / 3;
    /* Enforce 4:3 aspect ratio */
    display: flex;
    flex-direction: column;
    /* Add shadow on hover */
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-direction: column;
    height: 50%;
    background-position: center center;
}

#modal-title::before {
    display: inline-block;
    content: '';
    height: 100%;
    vertical-align: bottom;
}

#modal-title {
    width: 100%;
    padding: 2rem;
    margin: 0;
    background: linear-gradient(180deg, rgb(0, 0, 0, 0) 0%, #171b25 80%);
    height: 100%;

}

.close {
    cursor: pointer;
    font-size: 20px;
    width: 100%;
    padding: 1rem 1rem 0 0;
    text-align: end;
    background: linear-gradient(4deg, rgb(0, 0, 0, 0) 50%, #171b25 100%);
}

#modal-summary {

    flex: 1;
    color: white;
    padding: 1rem 2rem;

}

.modal-body {
    flex: 1;
    display: flex;
    padding: 0;

}

.modal-left {
    flex: 1;
    padding: 0;
    display: flex;
    flex-direction: column;
}


#modal-attributes {
    display: flex;
    padding: 1rem;
    margin: 0;
    text-align: center;
    justify-content: center;
    height: 100%;
}

#modal-attributes p {
    padding: 0.5rem;
    margin: 0;
}

.icon-title {
    display: flex;
    align-items: center;
    padding-bottom: 1rem;
}

#tag-bar {
    display: flex;
    padding: 1.6rem;
    margin: 0;
    flex-direction: row;
    justify-content: center;
    flex-wrap: wrap-reverse;
}

#tag-header {
    display: flex;
    align-items: center;
    flex: 1;
}

#tag-content {
    font-weight: bold;
    font-style: italic;
    padding: 0rem 0.5rem;
    display: flex;
    justify-content: center;
    /* Align horizontal */
    align-items: center;
    /* Align vertical */
}

.ex-links {
    list-style: none;
    display: flex;
    padding: 0rem 2rem;
    margin: 0;
}

.ex-links li {
    display: inline;
}

.ex-links a {
    color: white;
    text-decoration: none;
    font-size: 1rem;
    padding: 0.5rem 1rem;
    margin-right: 0.5rem;
    transition: background-color 0.3s, color 0.3s;
    border-radius: 2rem;
    border: 2px #f4f4f4 solid;
    display: flex;
    align-items: center;
}

.ex-links a:hover {
    background-color: #c00;
    /* Lighter blue for hover */
}

.ex-links a.active {
    background-color: #fff;
    color: #00509e;
    /* Lighter blue for active link */
    font-weight: bold;
}

.ex-links a:active {
    background-color: #fff;
    color: #00509e;
    /* Lighter blue for active link */
    font-weight: bold;
}




@media (max-width: 768px) {
    .nav-links {
        display: none;
        flex-direction: column;
        position: absolute;
        background-color: #000;
        top: 6rem;
        right: 0;
        width: 100%;
        text-align: center;
    }

    .menu-close {
        position: absolute;
        right: 0;
        top: 0;
        padding: 2rem;
        background-color: #000;
        margin: 0;

    }

    #menu:target .menu-close {
        display: flex;
    }

    #menu:target .nav-links {
        display: flex;
    }

    .nav-links li {
        margin: 1rem 0;
    }

    .menu-open {
        display: flex;
    }

    #menu {
        transform: translateY(-100%);
        transition: transform 0.2s ease;
        position: fixed;
        /* give the menu a larger z-index than the ham link
  to put the menu above it */
        z-index: 100;
        top: 0;
        left: 0;
        right: 0;
        bottom: 0;
        width: 100%;
    }

    #menu:target {
        transform: translateY(0);
        transition: transform 0.2s ease;

    }


    #kb {
        flex-direction: column;
    }

    #lb {
        flex-direction: column;
    }

    .modal-content {
        width: 100%;
        height: 100%;
        max-width: 100%;
        max-height: 100%;
    }

    .gallery {
        grid-template-columns: 1fr;
    }

    .info-window {
        width: 100%
    }

    .sidebar {
        position: initial;
        width: 100%;
    }
}