header {
    background-color: #42008C;
    color: white;
    padding: 0.5rem;
    text-align: center;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.2);
}

h2 {
  margin-left: 10px; /* Adjust the value as needed */
}

h3 {
  margin-left: 10px; /* Adjust the value as needed */
}

/* NAVBAR STUFF
Contains:
- brand tag, which holds picture and website name
- navlinks tab, which has all the links/dropdowns to other pages
*/

.navbar {
    display: flex;
    align-items: center;
    background: rgba(36, 10, 89, 1);
    border-radius: 12px;
    padding: 0 10px;
    height: 80px;
}

/* Brand area:
Contains:
- img tag, which holds picture
- h2 tag, which is the website name
- h4 tag, which is the tagline
*/
.brand {
    display: flex;
    align-items: center;
    gap: 12px;
    width: 100%;
    height: 100%;
}

.brand a {
    display: flex;
    flex-direction: column;
    align-items: center;
}

.brand img {
    border-radius: 8px;
    width: 70px;
    height: 70px;
    display: inline-block
}

.brand-text {
    display: flex;
    flex-direction: column;
    justify-content: center;
    height: 100%;
}

.brand-text h2,
.brand-text h4 {
    margin: 0;
    line-height: 1.2;
    text-align: left;
    color: white;
    text-shadow: 0 0 5px #6a1b9a;
    width: 100%;
}

/* Navbar menu container 
Contains:
-navbar-items, which is a container for:
    - a, which is a simple link (no dropdown)
    - dropbtn, which has no link and just opens a dropdown
*/
.navbar-menu {
    display: flex;
    justify-content: space-evenly;
    align-items: center;
    width: 65%;
    height: 100%;
}

/* Button Widths */

.navbar-item {
    width: 25%;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    height: 100%;
}

.navbar-link,
.navbar-dropdown,
.navbar-dropbtn {
    width: 100%;
    height: 100%;
}

/* Button Styles */
.navbar-menu .navbar-link,
.navbar-menu .navbar-dropbtn {
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    color: white;
    text-decoration: none;
    font-weight: bold;
    transition: background 0.3s, color 0.3s;
    cursor: pointer;
    user-select: none;
}

/* Hover styles for nav links */
.navbar-link:hover,
.navbar-dropbtn:hover {
    background: #fff;
    color: #42008C;
}

/* Dropdown submenu content */
.navbar-dropdown-content {
    display: block;
    visibility: hidden;
    position: absolute;
    top: 100%;
    background-color: #42008C;
    width: 100%;
    z-index: 1;
    overflow: hidden;
    white-space: nowrap;
}

/* Dropdown submenu links */
.navbar-dropdown-content a {
    text-align: center;
    color: white;
    font-size: 1.2rem;
    background-color: #42008C;
    width: 100%;
    display: flex;
    position: relative;
    text-decoration: none;
    font-weight: bold;
    min-height: 40px;
    justify-content: center;
    align-items: center;
    white-space: normal;
}

/* Hover for dropdown submenu links */
.navbar-dropdown-content a:hover {
    background-color: #fff;
    color: #42008C;
}

/* Show dropdown submenu on hover */
.navbar-dropdown:hover .navbar-dropdown-content {
    visibility: visible;
}

/* Hamburger menu button - hidden on wide screens */
.menu-toggle {
    display: none;
    font-size: 2.5rem;
    color: white;
    background: none;
    border: none;
    cursor: pointer;
}

.mobile-menu {
    display: flex;
    flex-direction: row;
    justify-content: space-between;
    width: 30%;
    height:100%;
}

/* Responsive adjustments */
/* Mobile styles */
/* By default hide menu and stack for mobile */
@media (max-width: 1000px) {
    .navbar {
        flex-direction: column;
        align-items: flex-start;
        height: auto;
        padding: 0px;
    }

    .menu-toggle {
        display: block;
    }

    .navbar-menu {
        display: none;
        width: 100%;
        flex-direction: column;
        align-items: stretch;
        padding-bottom: 10px;
    }

    .navbar-menu.show {
        display: flex;
    }

    .navbar-item {
        width: 100%;
    }

    .navbar-link,
    .navbar-dropbtn {
        justify-content: flex-start;
    }

    .navbar-dropdown-content {
        position: static;
        visibility: visible;
        display: none;
        flex-direction: column;
        background-color: #42008C;
    }

    .navbar-dropdown.open .navbar-dropdown-content {
        display: flex;
    }

    /* Override hover behavior for mobile */
    .navbar-dropdown:hover .navbar-dropdown-content {
        visibility: visible;
    }
    .mobile-menu {
        width:100%;
        align-items: center;
    }
    .brand {
        width:80%
    }
}



body {
    margin: 0;
    padding: 0;
    background: linear-gradient(55deg, #fdf7ff 0%, #f9e6ff 51%, #94c3d5 85%);
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    color: #333;
    line-height: 1.6;
    font-size: 14px;
    min-width: 320px;
}

.glow {
    animation: glow 2s ease-in-out infinite alternate;
    color: #fff;
    text-shadow: 0 0 8px #fff, 0 0 12px #42008C;
}

@keyframes glow {
    from {
        text-shadow: 0 0 5px #fff, 0 0 10px #42008C;
    }

    to {
        text-shadow: 0 0 15px #fff, 0 0 25px #04008C;
    }
}

body {
    margin: 0;
    padding: 0;
    background: linear-gradient(55deg, #fdf7ff 0%, #f9e6ff 51%, #dbf5ff 85%);
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    color: #333;
    line-height: 1.6;
    font-size: 14px;
    text-align: left;
}

main {
    max-width: 800px;
    margin: 1.5rem auto;
    padding: 1rem;
    background: rgba(255, 255, 255, 0.8);
    border-radius: 12px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    font-size:14px;
    text-align: left;
}

h1,
h2,
h3,
h4 {
    text-align: left;
}

#contributors {
    background-color: rgba(155, 24, 105, 0.445);
    padding: 30px;
    border-radius: 12px;
    margin-top: 2rem;
    text-align: center
}

.contributors-container {
    display: flex;
    flex-wrap: wrap;
    gap: 2rem;
    justify-content: space-between;
    text-align: center
}

.contrib-column {
    flex: 1 1 300px;
    color: white;
    text-align: center;
}

.contrib-column h3{
    flex: 1 1 300px;
    color: white;
    text-align: center;
}

#contributors p{
    font-size: 16px;
}

a {
    color: #ffffff;
    text-decoration: underline;
}

footer {
    text-align: center;
    padding: 1rem;
    background-color: #42008C;
    color: white;
    margin-top: 2rem;
}

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

.card {
    border-radius: 12px;
    border-width: 12px;
    background-color: white;
    color: black;
    border: 2px solid rgba(36, 10, 89, 1);
    padding: 10px;
    display: flex;
    flex-direction: column;
    text-align: left;
    font-size: 14px;
    text-wrap: wrap;
    line-height: 145%;
}

.subfield-button {
    border: none;
    color: rgba(36, 10, 89, 1);
    padding: 16px 0;
    text-align: center;
    text-decoration: none;
    display: block;
    font-size: 16px;
    margin-top: auto;
    transition-duration: 0.4s;
    cursor: pointer;
    font-weight: bold;
    background-color: white;
    color: black;
    border: 2px solid rgba(36, 10, 89, 1);
    border-radius: 10px;
    width:100%
}

.subfield-button:hover {
    background-color: rgba(36, 10, 89, 1);
    color: white;
}

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

.card h2 {
    margin-bottom: 10px;
    margin-top: 0;
    text-align: center;
}

.card p {
    text-align: justify;
    text-justify: inter-word;
}

.button {
    border: none;
    color: rgba(36, 10, 89, 1);
    padding: 16px 32px;
    text-align: center;
    text-decoration: none;
    display: block;
    font-size: 16px;
    margin-top: auto;
    transition-duration: 0.4s;
    cursor: pointer;
    font-weight: bold;
}

.button1 {
    background-color: white;
    color: black;
    border: 2px solid rgba(36, 10, 89, 1);
    border-radius: 10px;
}

.button1:hover {
    background-color: rgba(36, 10, 89, 1);
    color: white;
}

.button2 {
    background-color: white;
    color: black;
    border: 2px solid rgba(202, 132, 207);
    border-radius: 10px;
}

.button2:hover {
    background-color: rgba(202, 132, 207);
    color: white;
}

a {
    color: #230030;
}

/* Accordion
/* Style the buttons that are used to open and close the accordion panel */
.accordion {
    background-color: rgba(249, 250, 247, 0.5);
    color: #230030;
    font-family: Verdana, Geneva, Tahoma, sans-serif;
    font-size: small;
    cursor: pointer;
    padding: 2px;
    border: 1px solid #ccc;
    /* Light border instead of outline */
    border-radius: 3px;
    width: 95%;
    text-align: left;
    transition: 0.4s;
    margin: 15px
}

/* Add a background color to the button if it is clicked on (add the .active class with JS), and when you move the mouse over it (hover) */
.active,
.accordion:hover {
    background-color: #ffffff;
}

/* Style the accordion panel. Note: hidden by default */
.panel {
    padding: 2px;
    width: 95%;
    background-color: rgba(249, 250, 247, 0.5);
    font-size: 11px;
    font-family: Verdana, Geneva, Tahoma, sans-serif;
    margin: 15px;
}

/* Collapsible cards for the subfields pages */

.collapsible-card {
    overflow: hidden; /* needed for height transition */
    box-sizing: border-box; /* good practice */
    border-radius: 12px;
    border-width: 12px;
    background-color: white;
    color: black;
    border: 2px solid rgba(36, 10, 89, 1);
    padding: 10px;
    display: flex;
    flex-direction: column;
    text-align: left;
    font-size: 12px;
    text-wrap: wrap;
    transition: height 0.3s ease;
}

.collapsible-card.collapsed {
  justify-content: center; /* vertically center children */
}

.collapsible-card-title {
    font-size: 1.5em;          /* matches <h2> size */
    font-weight: bold;         /* matches <h2> weight */
    display: block;            /* ensure block-level appearance */
    cursor: pointer;           /* keep button behavior */
    text-align:center;

}

.collapsible-card.collapsed:hover {
    transition-duration: 0.4s;
    background-color:rgba(36, 10, 89, 1);
}

.collapsible-card.collapsed:hover h2{
    transition-duration: 0.4s;
    color:white;
}


.collapsible-card h2 {
    margin-left: 0;
    margin-bottom: 0;
    margin-top: 0;
}

.collapsible-card.collapsed .collapsible-card-info {
    max-height:0;
    text-align: justify;
    text-justify: inter-word;
    overflow: hidden;
    margin-top: 0;
    margin-bottom: 0;
    padding: 0; /* if needed */
    transition: max-height 0.3s ease;
    opacity:0;
}

.collapsible-card.open .collapsible-card-info {
    display: block;
    text-align: left;
    width: 100%;
    max-height: 500px; /* or large enough for full content */
    background-color: rgba(249, 250, 247, 0.5);
    font-size: 11px;
    font-family: Verdana, Geneva, Tahoma, sans-serif;
    opacity:1;
}

.collapsible-card.open .collapsible-card-info p {
    padding: 0;
    margin-left: 10px;
    margin-right: 10px;
    margin-top: 0px;
}
.collapsible-card.open a {
    color: rgb(223, 0, 174);
    text-decoration: underline;
}

.collapsible-content-button {
    display:block;
    font-size: medium;
    margin: 10px;
    text-align: center;
    text-decoration: none;
}
.collapsible-card.open .collapsible-content-button {
    background-color: white;
    color: black;
    border: 2px solid rgba(202, 132, 207);
    border-radius: 10px;
    max-height: 200px;
    transition-duration: 0.4s;
}

.collapsible-card.open .collapsible-content-button:hover {
    background-color: rgba(202, 132, 207);
    color: white;
    transition-duration: 0.4s;
}

.resource-contributor {
    text-align:right; 
    color:rgb(158, 121, 0)
}

.resource-requirements {
    color:rgb(130, 68, 169);
}


/*Typewritter CSS I stole*/

.wrapper {
  height: 20vh;
  /*This part is important for centering*/
  display: grid;
  place-items: center;
}

.typing-demo {
  width: 40ch;
  animation: typing 2s steps(22), blink .5s step-end infinite alternate;
  white-space: nowrap;
  overflow: hidden;
  border-right: 1px solid;
  font-family: courier;
  font-size: 2em;
}

@keyframes typing {
  from {
    width: 0
  }
}
    
@keyframes blink {
  50% {
    border-color: transparent
  }
}

body {
  text-align: center;
}

.info {
  position: absolute;
  bottom: 0;
  padding: 20px;
}

#featured {
    background-color: rgba(137, 86, 181, 0.209);
    padding: 5px;
    border-radius: 10px;
    text-align: center;
    border: 4px solid #f0ccfc;
}

#featured2 {
    background-color: rgba(71, 126, 141, 0.282);
    padding: 5px;
    border-radius: 10px;
    text-align: center;
    border: 4px solid #cce9fc;
}

.featured-container {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    text-align: center;
}

.featured-column {
    flex: 1 1 300px;
    color: rgb(29, 0, 42);
    text-align: center;
}
