@import url('https://fonts.googleapis.com/css2?family=Forum&display=swap');

html,
body {
    height: 100%;
    margin: 0;
    max-width: 100%;
}

body {
    font-family: "Forum", serif;
    font-weight: 400;
    font-style: normal;
    color: #333333;
    margin: 0 auto;
    min-height: 100vh;
    margin-bottom: 3.5rem;
    line-height: 1.5rem;
    padding: 0;
}

.brand {
    height: 2.8rem;
}

main {
    max-width: 1950px;
    margin: 0 auto;
}

.navbar {
    max-width: 1920px;
    margin: 0 auto;
}

a,
#viewMapBtn {
    text-decoration: none;
    color: #339999;
}

#viewMapBtn {
    margin-top: 2.5rem;
    color: #cc6666;
}

a:hover {
    cursor: crosshair;
    color: #ff9999;
}

.map-link {
    color: #cc6666;
    margin-right: 1rem;
}

#map-link-active {
    color: #ffcccc;
}

#viewMapBtn:hover {
    cursor: zoom-in;
}

h1 {
    font-size: 3rem;
    font-weight: 500;
    line-height: 2.8rem;
    color: #336633;
}

.hero h1 {
    font-size: 4rem;
    margin-bottom: 2rem;
    letter-spacing: 0.1rem
}

#site-intro {
    max-width: 1080px;
    text-align: center;
    margin: 0 auto;
    padding: 0rem 1.2rem 3rem 1.2rem;
    font-weight: 900;
    background-color: #FAF9F6;
}

#site-intro p {
    letter-spacing: 0.05rem;
    font-size: 1.1rem;
}

h2 {
    font-size: 1.8rem;
}

h2,
h3,
h4,
h5,
h6 {
    font-weight: 400;
}

.navbar {
    background: #fff;
    padding: 0.6rem 0.7rem 0rem 0.6rem;
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    align-items: center;
    font-size: 1.3rem;
    font-weight: 900;
}

.navbar .menu {
    display: flex;
    gap: 1.5rem;
}

.navbar a {
    text-decoration: none;
    padding-left: 1rem;
    color: #336633;
}

.navbar a:hover {
    opacity: 0.6;
}

.navbar-toggle {
    display: none;
    cursor: pointer;
    font-size: 1.5rem;
    color: #339999;
}

.hero .card p {
    line-height: 1.5rem;
    letter-spacing: 0.015rem;
}

.hero {
    background-image: url("../imgs/geology-main.jpg");
    min-height: 100%;
    /* Create the parallax scrolling effect */
    background-attachment: fixed;
    background-position: center;
    background-repeat: no-repeat;
    background-size: cover;
    padding: 1rem;
}

.hero .card {
    border: 0;
}

iframe {
    width: 1100px;
    height: 100vh;
}

footer {
    color: #cccc99;
    padding: 0.2rem 1rem;
    text-align: center;
}

footer a {
    color: #cccc99;
}

#glossary {
    padding: 1.5rem 0 2rem 0;
    max-width: 1100px;
    margin: 0 auto;
}

#glossary h1 {
    text-align: left;
    margin: 0rem 1rem 1.5rem 1rem;
}

#glossary .card-grid {
    display: grid;
    grid-template-columns: 1fr;
    /* One column per row */

    /* Center horizontally */
}

#glossary .card {
    flex-direction: column;
    width: 100%;
    /* Ensure card fills the grid column */
    box-sizing: border-box;
    background-color: #FAF9F6;
    box-shadow: 1px 1px 0.5px lightblue;
}

#glossary strong {
    font-size: 1.05rem;
    font-weight: 300;
    padding-bottom: 0.5rem;
}

#glossary-intro {
    margin-left: 1.2rem;
    padding-right: 0.8rem;
}

/* about styles below */

#about-main {
    display: flex;
    flex-wrap: wrap;
    gap: 2rem;
    padding: 0.4rem;
    align-items: flex-start;
}

#about-inner {
    max-width: 1100px;
    margin: 0 auto;
}

#concept-map {
    width: 900px;
    max-width: 100%;
}

.card-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(50%, 1fr));
    padding: 1rem;
    gap: 1rem;
}

.card .tags {
    font-size: 0.9rem;
    color: #555;
}

#cards {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(20%, 1fr));
    gap: 1.25rem;
    padding: 1rem 1rem;
}

.card {
    border: 0.5px solid #99cccc;
    border-radius: 2px;
    padding: 1rem 2rem;
    display: flex;
    flex-direction: column;
}

.card p {
    margin: 0;
    line-height: 1.2rem;
}

#filters {
    padding: 1rem 0.5rem;
    border: 0.5px solid #99cccc;
    margin: 1rem;
    border-radius: 2px;
}

#filters fieldset {
    border: none;
    line-height: 1.5rem;
    margin-top: 0;
    display: inline-block;
    vertical-align: top;
    padding: 1rem;
}

fieldset legend {
    font-weight: bold;
}

#filter-buttons {
    margin: 1rem 1rem;
    display: flex;
    flex-direction: row;
    justify-content: space-between;
}

#funding-container {
    display: flex;
    flex-direction: row;
    gap: 1rem;
}

#caseStudyMain p {
    padding: 0;
    margin: 0;
    line-height: 1.2rem;
}

#caseContent p {
    margin: 0;
    line-height: 1.2rem;
}

.close-btn {
    position: absolute;
    right: 1rem;
    margin-top: 1.5rem;
}

#toggleFiltersBtn,
#reset-btn,
#open-map-btn {
    border: 0.5px solid #99cccc;
    border-radius: 2px;
    padding: 0.5rem 1rem;
    font-size: 1rem;
    background: white;
    font-family: "Forum", serif;
    letter-spacing: 0.05rem;
    font-weight: 900;
}

#reset-btn a {
    color: #99cc99;
}

#toggleFiltersBtn {
    color: #006699;
}

#toggleFiltersBtn,
#reset-btn {
    margin-right: 0.5rem;
}

#open-map-btn a {
    color: #cc6666;
}

#open-map-btn:hover,
#toggleFiltersBtn:hover,
#reset-btn:hover {
    background-color: #ffcccc80;
}

@media (max-width: 1180px) {
    .card-grid {
        grid-template-columns: repeat(auto-fit, minmax(50%, 1fr));
    }

    #cards {
        grid-template-columns: repeat(auto-fill, minmax(40%, 1fr));
    }
}

@media (max-width: 768px) {
    .navbar .menu {
        flex-direction: column;
        width: 100%;
        display: none;
    }

    .navbar {
        padding: 1rem 1rem 0rem 0.5rem;
    }

    .navbar .menu.active {
        display: flex;
        margin-top: 3rem;
        margin-bottom: 1rem;
    }

    .navbar-toggle {
        display: block;
    }

    h1 {
        font-size: 2.3rem;
        margin-top: 0rem;
        padding: 0;
    }

    .hero {
        background-image: url("../imgs/geology-mobile.jpg");
        background-attachment: inherit; 
        background-position: inherit;
    }

    .hero h1 {
        font-size: 3rem;
        margin-bottom: 1.8rem;
        margin-top: 2.5rem;
    }

    h2 {
        font-size: 1.7rem;
    }

    footer {
        font-size: 0.8rem;
        text-align: left;
    }

    .card {
        padding: 0.6rem;
    }

    .close-btn {
        margin-top: 0.2rem;
    }

    .card-grid {
        grid-template-columns: repeat(auto-fit, minmax(100%, 1fr));
    }

    #cards {
        grid-template-columns: repeat(auto-fill, minmax(100%, 1fr));
    }

    #toggleFiltersBtn,
    #reset-btn,
    #open-map-btn {
        padding: 0.3rem 0.4rem;
        font-size: 1rem;
        letter-spacing: 0.02rem;
    }

    #filter-buttons {
        margin-bottom: 0;
    }
    
    #filters fieldset {
        width: 60%;
    }

    #about-inner {
        padding: 1rem;
    }
}

/*styles terms in glossary */
#glossary .card > :first-child::first-line {
    font-weight: 900;
    font-size: 1.2rem;
}

hr {
    border: solid 0.2px #99cccc;
}

/*fade in elements */

.fade-in,
#map {
    opacity: 0;
    transform: scale(0.95);
    animation: fadeInZoom ease 2s;
    animation-fill-mode: forwards;
}

@keyframes fadeInZoom {
    0% {
        opacity: 0;
        transform: scale(0.95);
    }

    100% {
        opacity: 1;
        transform: scale(1);
    }
}

.slide-down, .card-grid {
    opacity: 0.6;
    transform: translateY(-30px);
    animation: slideDownFade 0.8s ease-out forwards;
}

@keyframes slideDownFade {
    to {
        opacity: 1;
        transform: translateY(0);
    }
}
