/* Reset */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html, body {
    height: 100%;
    width: 100%;
}

/* Generic Styles */
.flex-container {
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
    justify-content: center;
    align-items: center;
}

.height-zero {
    height: 0;
}

.hidden {
    display: none;
}

h1 {
    font-size: 20px;
    background-color: white;
    margin: 30px 0 0 0 ;
    text-align: center;
}

.flip {
    transform: rotateX(180deg)
}

.sticky {
    position: sticky;
    top: 0;
    z-index: 10;
}


/* Body */

body {
    background: linear-gradient(to bottom, #ffffff 10%, #b0b0b0);
    background-attachment: fixed;
    background-repeat: no-repeat;
    background-size: cover;
    font-family: Arial, sans-serif;
    color: black;
    padding: 0 10px;
    max-width: 1400px;
    margin: 0 auto;
    min-height: 100%;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

/* Nav Bar */
nav {
    padding: 10px;
    text-align: center;
    background: linear-gradient(to bottom, rgb(255, 0, 0), rgb(0, 0, 0));
    position: fixed;
    top: 0;
    z-index: 9;
    overflow: hidden;
    transition: height 0.5s ease;
    width: 95%;
}

nav ul {
    list-style-type: none;
    padding: 0;
    margin: 0;
    display: flex;
    flex-direction: column;;
    justify-content: center;
    align-items: center;
    transition: all 1s ease;
}

nav a {
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    text-decoration: none;
    margin: 10px 15px;
    font-size: 20px;
    display: block;
    outline: 2px solid white;
    padding: 5px 10px;
    border-radius: 5px;
    background: linear-gradient(to left, rgb(0, 0, 0), rgb(255, 0, 0), rgb(0, 0, 0));
    height: 40px;
}

nav a:hover {
    transform: scale(1.1);
    transition: all 0.3s ease;
}

.nav-collapsed {
    height: 33px;
}

.nav-extended{
    height: 340px;
}

.fa-caret-down {
    transform: scale(3);
}

#nav-toggle {
    border: none;
    background-color: transparent;
    color: white;
    display: block;
    margin: auto;
}

/* Main Content */

section.flex-container {
    padding: 20px;
    align-items: stretch;
    justify-items: left;
}

.card {
    background: linear-gradient(to right, rgb(62, 62, 62), rgb(0, 0, 0));
    color: white;
    padding: 20px;
    border-radius: 10px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
    width: 300px;
    height: 300px;
    text-align: center;
}

.card a {
    color: white;
    text-decoration: none;
    font-size: 18px;
    display: flex;
    align-items: center;
    margin-top: 10px;
    outline: 2px solid white;
    padding: 5px 10px;
    border-radius: 5px;
    background: linear-gradient(to right, rgb(0, 0, 0), rgb(255, 0, 0), rgb(0, 0, 0));
}

.card a:hover {
    transform: scale(1.05);
    transition: transform 0.3s ease;
}

.card p {
    height: 50%;
}

/* Responsive Design For Mobile*/
@media (min-width: 680px) {
    /* Body */
    h1 {
        font-size: 30px;
        text-align: left;
    }
    /* Nav Bar */

    nav {
        position: sticky;
        top: 0;
        width: 100%;
    }

    .nav-collapsed, .nav-extended {
        height: auto;
    }
    
    nav ul {
        flex-direction: row;
        justify-content: center;
        align-items: center;
    }
    
    nav a {
        display: inline-block;
        background: linear-gradient(to right, rgb(62, 62, 62), rgb(0, 0, 0));
    }
    
    #nav-toggle {
        display: none;
    }
}
