.dm-serif-text-regular {
  font-family: "DM Serif Text", serif;
  font-weight: 400;
  font-style: normal;
}

.dm-serif-text-regular-italic {
  font-family: "DM Serif Text", serif;
  font-weight: 400;
  font-style: italic;
}
html, body {
  height: 100%;
  margin: 0;
}

body{
    display: flex;
    flex-direction: column;
    font-family: 'DM Serif Text';
    font-size: 18px;
}
#hero{
    /* height: 100%; */
    display: flex;
    flex-direction: column;
    position: relative;
}
#hero-bg{
    position: absolute;
    inset: 0;         
    width: 100%;
    height: 100%;
    z-index: -1;
}
#hero-content{
    position: relative;
}
.svg-mobile{ 
    display: block;
}
.svg-desktop{
    display: none;
}
main {
  flex: 1;
}
#header-settings img{
    width: 24px;
    height: 24px;
}
hr{
    margin: 0;
    border-bottom: 0.1em solid #868c91; width: 100%;
}

/* General Styles */
.inactive-link{
    text-decoration: none;
    color: hsla(210, 12%, 29%, 75%);
}
.inactive-link:hover{
    color: hsla(210, 12%, 29%, 100%);
}
#active-link{
    text-decoration: underline;
}
.light-text{
    color: #f3f3f3;
}
.hidden {
  opacity: 0;
  pointer-events: none;
}

/* Header Styles */
header{
    margin: 2em 1em 0 1em;
    display: grid;
    grid-template-columns: 0.1fr 1fr 0.1fr;
    align-items: center;
    font-size: 1rem;
}
#header-title{
    display: flex;
    flex-direction: column;
    text-align: center;
}
#header-links{
    display: flex;
    justify-content: space-evenly;
    text-align: center;
}
#header-settings{
    display: flex;
    justify-content: center;

}
#header-settings button{
    text-align: left;
    text-decoration: none;
    border: none;
    background-color: transparent;
    font-family: 'DM Serif Text';
}
#settings-menu{
    position: absolute;
    padding: 5px;
    flex-direction: column;
    top: 4%;
    right: 1em;
    background-color: #ffffff;
    border: 1px solid #868c91;
    border-radius: 1em;

    opacity: 0;
    transform: translateY(-5px);
    max-height: 0;
    overflow: hidden;
    transition: opacity 0.25s ease, transform 0.25s ease, max-height 0.25s ease;
}
#settings-menu hr{
    margin: 0.5em 0 0.5em 0;
}
#settings-menu.show{
  opacity: 1;
  transform: translateY(0);
  max-height: 20em;
}
.settings-submenu{
    display: grid;
    grid-template-columns: 1fr;
}
.settings-submenu div{
    display: flex;
}
.settings-submenu h4{
    margin: 0;
    padding-left: 0.5em;
    font-weight: 500;
}
#settings-menu .settings-submenu:nth-child(1){
    margin-bottom: 1em;
}
.languageImg{
    width: 20px;
    height: 20px;
    padding-right: 5px;
}
.settings-submenu button{
    display: flex;
}

/* Main Styles */
#main-title{
    text-align: center;
    margin: 0;
    font-size: 2rem;
}
#main-title p{
    margin: 0;
}
#certificates-grid{
    margin: 1vh 0;
    display: grid;
    grid-template-columns: 0.8fr;
    gap: 5vw;
    justify-content: center;
}
.certificate-card{
    justify-items: center;
    border: 1px solid #868c91;
    border-radius: 1em;
    background-color: #ffffff;
    max-width: 700px;
    box-shadow: 0 4px 10px rgba(0,0,0,0.2);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}
.certificate-card:hover {
  transform: scale(1.05);
  box-shadow: 0 10px 20px rgba(0,0,0,0.3);
}
.card-preview{
    display: flex;
    justify-content: center;
    align-items: center;
    width: 100%;
    max-width: 700px;
    max-height: 30em;
    object-fit: contain;
    aspect-ratio: 9/10;
    overflow: hidden;
    border-bottom: 1px solid #868c91;
}
.card-preview img{
    display: block;
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
}
.card-title p{
    text-align: center;
    margin: 0;
}

#modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0; 
    top: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.6);
    align-items: center;
    flex-flow: column;
    justify-content: center;
}
#modal-content {
    text-align: right;
    max-width: 90%;
    max-height: 90%;
    background: #fff;
    border-radius: 12px;
    max-height: 100vh;
    overflow-y: auto;
    box-shadow: 0 4px 20px rgba(0,0,0,0.5);
}
#modal-carousel{
    /* position: relative; */
    /* width: 100%; */
    /* max-width: 900px; */
    /* max-height: 30em; */
    display: flex;
    align-items: center;
    justify-content: space-between;
    overflow: hidden;
}
#modal-img{
    max-width: 100%;
    max-height: 60vh;
    border-radius: 8px;
}
#modal-title{
    margin: 0;
    border-top: 1px solid #868c91;
    padding: 1vh 0;
    text-align: center;
}
#modal-prevButton, #modal-nextButton{
    position: relative;
    top: 50%;
    font-size: 2rem;
    background: transparent;
    color: #868c91;
    padding: 12px 16px;
    cursor: pointer;
    border: none;
    z-index: 2;
}
#closeModal{
    font-size: 2rem;
    z-index: 2;
    position: relative;
    background: transparent;
    color: #868c91; 
    border: none;
    cursor: pointer;
}

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

@media(max-width: 350px) {
    header{
        font-size: 0.8rem;
    }
    #settings-button img{
        width: 20px;
        height: 20px;
    }
    .settings-submenu{
        font-size: 0.8rem;
    }
    .settings-submenu button{
        font-size: 0.6rem;
    }
    .settings-submenu img{
        height: 15px;
        width: 15px;
    }
    #modal-title{
        font-size: 1rem;
    }
    .card-title p{
        font-size: 0.8rem;
    }
    footer p{
        color: #f3f3f3;
        margin: 2vw 10vw;
        font-size: 0.6rem;
    }
}
@media(max-width: 375px){
    header{
        font-size: 0.8rem;
    }
    .card-title p{
        font-size: 0.9rem;
    }
}
@media(max-width: 320px){
    header{
        font-size: 0.7rem;
    }
    .card-title p{
        font-size: 0.8rem;
    }
}
@media(min-width: 500px){
    header{
        font-size: 1.3rem;
    }
    #settings-button img{
        width: 30px;
        height: 30px;
    }
    .card-content p{
        font-size: 1.4rem;
    }
    #modal-title{
        font-size: 2.5rem;
    }
    #modal-content h4{
        font-size: 2rem;
    }
    #modal-content p, #modal-content li, #modal-content span{
        font-size: 1.5rem;  
    }
    footer p{
        font-size: 1rem;
    }
}   
@media(min-width: 720px){
    #certificates-grid{
        grid-template-columns: 0.5fr 0.5fr;
        gap: 3vw;
        margin: 2vh 5vw;
    }
    .card-title{
        font-size: 1.5rem;
    }
    .card-title p{
        margin: 1vh 0;
    }
    #modal-img{
        max-height: 70vh;
    }
}
@media (min-height: 1000px) {
    header{
        font-size: 2rem;
    }
    #settings-button img{
        width: 40px;
        height: 40px;
    }
    #main-title{
        font-size: 3rem;
    }
    .card-title{
        font-size: 2rem;
    }
    footer p{
        font-size: 1.5rem;
    }
}
@media (min-width: 1024px){
    #modal-img{
        max-height: 80vh;
    }
    #header-title{
        flex-direction: row;
        gap: 0.5vw;
    }
}
@media (min-width: 1440px){
    header{
        grid-template-columns: 0.2fr 1fr 0.2fr;
    }
    #header-title{
        font-size: 1.6rem;
        justify-content: center;
    }
    #header-links{
        font-size: 1.5rem;
    }
    #main-title p{
        margin: 2vh 0;
        font-size: 2.5rem;
    }
    footer p{
        font-size: 1.2rem;
    }
}
@media (min-width: 2560px){
    #header-title{
        font-size: 2.5rem;
    }
    #header-links{
        font-size: 2rem;
    }
    #main-title p{
        font-size: 3.5rem;
    }
    #certificates-grid{
        justify-items: end;
    }
    .certificate-card:nth-of-type(even){
        justify-self : start;
    }
    .certificate-card{
        max-width: fit-content;
    }
    .card-preview{
        max-width: fit-content;
        max-height: 50em;
    }
    footer p{
        font-size: 1.7rem;
    }
}