html {
    scroll-behavior: smooth;
}

:root{
    /*COLOURS*/
    --black: #000000;  
    --navy: #0a101b;         
    --plum: #1d1f52;      
    --acc: #7a1e2e;
    --burn: #521821;
    --cream: #ead7ce;  
    --baby: #bbc5df; /* Light cream for contrast */    

    --bs: 0 4px 6px rgba(0,0,0,0.1);
}

body{
    background-color: #000000; /* Set the background color to navy */
    color: var(--cream); /* Ensure text is readable on navy background */
    margin: 0;
    padding: 0;
}

/* drama */
.reveal {
    opacity: 0;
    transform: translateY(50px);
    transition: opacity 0.8s ease-out, transform 0.8s ease-out;
}

.reveal.active {
    opacity: 1;
    transform: translateY(0);
}

h1, h2, p {
    font-family: 'Oxygen';
}

/* navbar */
.navbar {
    position: fixed;
    width: 100%;
    background: rgba(0, 0, 0, 0.6); /* Semi-transparent background */
    z-index: 1000; /* Ensure it stays on top */;
    text-transform: uppercase;
}

/* Header menu styling */
.header-menu {
    list-style: none;
    z-index: 1000;
    display: flex;
    flex-wrap: wrap;
    flex-direction: row;
    justify-content: center;
    margin: 3 auto; /* Center horizontally */
    padding: 0; /* Remove any default padding */
}

.header-menu a {
    font-size: 1.25em; /* Enlarge the h1 text size */
    color: var(--cream);
    text-decoration: none;
    font-family: 'Oxygen';
    flex: 1 1 40%;
    min-width: 120px;
    margin: 8px;
}

.header-menu a:hover {
    color: var(--baby); /* Change color on hover */
}

/* Hero Section Styles */
.hero {
    position: relative;
    width: 100%;
    height: 100vh;
    overflow: hidden;
    display: flex;
    align-items: flex-start;
    justify-content: center;
    margin: 0; /* Remove any default margin */
    padding: 0; /* Remove any default padding */
}

.hero__stars {
    position: absolute;
    width: 100%;
    height: 100%;
    object-fit: cover;
    top: 0; left: 0;
    z-index: 1;
}

.hero__moon {
    position: absolute;
    left: 50%;
    top: 50%; /* Position the moon halfway down the viewport */
    transform: translate(-50%, -50%); /* Center the moon */
    width: auto; /* 2/3 of the viewport width */
    max-width: 200%;
    z-index: 4;
    transition: transform 0.2s;
    will-change: transform;
    pointer-events: none;
}

.hero__content {
    position: absolute;
    top: 50%; /* Position halfway down the viewport */
    left: 50%; /* Center horizontally */
    transform: translate(-50%, -50%); /* Adjust for centering */
    text-align: center; /* Center the text */
    z-index: 5;
    font-family: 'Oxygen', bold;

    margin: 0; /* Remove any default margin */
    padding: 0; /* Remove any default padding */    
}


.hero__content h2{

    font-size: 2em; /* Enlarge the h1 text size */
    color: var(--black);

    font-family: 'Oxygen', bold;
    margin: 0; /* Remove any default margin */
    padding: 1em; /* Remove any default padding */

}

.hero__header{
    font-family: 'Oxygen', bold;
    font-size: 3em; /* Enlarge the h1 text size */

    animation: fadeInUp 1s ease-out forwards;
    color: var(--black);

    position: relative;
    text-align: center;
    margin-bottom: 2em;

    align-items: center;
    opacity: 0;
    transform: translateY(50px);
    transition: opacity 0.8s ease-out, transform 0.8s ease-out;
}


.hero__header:hover, .hero__content h2:hover {
    color: var(--plum);
}

.hero__scroll-arrow {
    position: absolute;
    bottom: -10%;
    left: 50%;
    transform: translateX(-50%);
    font-size: 2em;
    color: var(--black);
    animation: bounce 2s infinite;
}

.hero__scroll-arrow a {
    text-decoration: none;
    color: inherit;
}

.button {
    background-color: var(--acc); /* Button color */
    color: var(--cream); /* Text color */
    padding: 0.5em 1em; /* Padding for the button */
    border-radius: 10px; /* Rounded corners */
    font-size: 2em; /* Font size for the button text */
    text-transform: uppercase;
    font-family: 'Oxygen';
    transition: transform 300ms ease-in-out;
    display: inline-block; /* Ensure transforms work properly */
    text-decoration: none;
}

.button:hover {
    transform: scale(1.05);
    background-color: var(--cream); /* Button color */
    color: var(--navy); /* Text color */
}
.subteams {
    padding-top: 5em;
    padding-bottom: 4em;
    background: linear-gradient(to bottom, 
        rgb(0, 0, 0),
        rgba(29, 31, 82, 0.3),
        rgb(0, 0, 0)
    ), url('../img/hubble.jpg');

    background-size: cover;
    background-attachment: fixed;
    text-align: center;
    align-items: center; /* Center the experiences horizontally */
    font-family: 'Oxygen', bold;  
}

.subteam__header{
    animation: fadeInUp 1s ease-out forwards;
    text-align: center;
    margin-bottom: 1em;
    font-size: 3em; /* Enlarge the h1 text size */
}

/* Collapsible Subteam Styles */
.subteams-collapsible {
    max-width: 70%;
    margin: 0 auto;
}

.subteam-panel {
    background: rgba(0, 0, 0, 0.263); /* Changed to black for collapsed state */
    color: var(--cream);
    border-radius: 6px;
    margin-bottom: 1em;
    box-shadow: var(--bs);
    overflow: hidden;
    transition: box-shadow 0.3s, background-color 0.3s ease;
}

.subteam-panel-header {
    cursor: pointer;
    padding: .5em 1em;
    font-size: 1.5em;
    font-family: 'Oxygen', bold;
    background: rgba(0, 0, 0, 0.45); /* Black background for collapsed headers */
    color: var(--cream);
    border: 2px solid transparent; /* Always have border to prevent jumping */
    outline: none;
    display: flex;
    align-items: center;
    justify-content: space-between;
    position: relative;
    transition: border-color 0.4s ease, box-shadow 0.4s ease, background-color 0.3s ease;
}

/* Stylish moving blue outline on hover */
.subteam-panel-header:hover {
    color: var(--cream);
    border-color: #1262a4; /* Fade in border color */
    animation: pulseBlue 2s infinite;
}

/* Pulsing blue outline animation */
@keyframes pulseBlue {
    0% {
        border-color: #4dabf7;
        box-shadow: 0 0 15px rgba(77, 171, 247, 0.4);
    }
    50% {
        border-color: #74c0fc;
        box-shadow: 0 0 25px rgba(116, 192, 252, 0.6);
    }
    100% {
        border-color: #4dabf7;
        box-shadow: 0 0 15px rgba(77, 171, 247, 0.4);
    }
}

.subteam-panel-header::after {
    content: '+';
    transition: transform 0.3s ease;
}

.subteam-panel.active .subteam-panel-header::after {
    transform: rotate(45deg);
}

/* Header styling for expanded panels */
.subteam-panel.active .subteam-panel-header {
    background: #0000005b; /* Match the expanded content background */
    border-color: #1262a4; /* Fade in border color */
    animation: pulseBlue 2s infinite;
}

.subteam-panel-content {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.5s ease, opacity 0.5s ease, padding 0.5s ease;
    opacity: 0;
    background: rgba(0, 0, 0, 0.283); /* Force background to remain consistent */
    display: flex;
    flex-direction: row; /* Image left, text right on desktop */
    align-items: flex-start;
    gap: 2em;
    padding: 0; /* Ensure padding transitions smoothly */
}

.subteam-panel.active .subteam-panel-content {
    max-height: 100%; /* Use a specific pixel value that's larger than your content */
    opacity: 1;
    padding: 1.5em; 
}


.subteam-panel-desc {
    flex: 1; /* Take remaining 60% space */
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    align-items: flex-start;
    text-align: left;
    min-width: 0; /* Prevent overflow */
}

.subteam-panel-desc h3 {
    font-size: 1.5em;
    line-height: 1.2;
    text-align: left;
    color: var(--cream);
    margin-bottom: 1em;
}

.subteam-panel-desc li {
    color: var(--cream);
}

.subteam-panel-desc p {
    font-size: clamp(1em, 1vw + 0.8em, 1.3em);
    color: var(--cream);
    text-align: left;
    line-height: 1.5;
}

/* Mobile responsive design */
@media (max-width: 900px) {
    .subteam-panel-content {
        flex-direction: column; /* Stack image on top of text */
        align-items: center;
        min-height: 100%;
    }
    
    .subteam-panel.active .subteam-panel-content {
        padding: 2em 1em 1.5em 1em;
    }
    
    .subteam-panel-desc {
        align-items: center;
        text-align: center;
        padding: 0;
    }
    
    .subteam-panel-desc h3 {
        text-align: center;
    }
    
    .subteam-panel-desc p {
        text-align: center;
        font-size: clamp(1em, 1vw + 0.8em, 1.3em);
    }
}

#discord{
    margin-bottom: 2em;
}


/* sponsors */
.sponsors-logos p {
    font-size: clamp(1em, 1vw + 0.8em, 1.3em);

    text-align: center;
    padding-left: 2em;
    padding-right: 2em;
}

.sponsors-logos {
    overflow: hidden;
    width: calc(100% - 10em); /* Subtract the txotal horizontal padding */
    padding: 1em 5em;
    position: relative;
    margin: 0 auto;
}

.logo-slider {
    padding-top: 2em;
    display: flex;
    align-items: center;
    gap: 4em;
    width: max-content;
    animation: slide 20s linear infinite;
}

.logo-slider img {
    height: 80px; /* Adjust size as needed */
    margin: 0 2em;
}


/* members */
.members {
    padding-top: 6em;
    padding-bottom: 3em;
    z-index: 5;
    font-family: 'Oxygen';  

}

.members-header {
    animation: fadeInUp 1s ease-out forwards;
    z-index: 20;
    position: relative;
    text-align: center;
    margin-bottom: 1em;
    opacity: 0;
    transform: translateY(50px);
    transition: opacity 0.8s ease-out, transform 0.8s ease-out;
    z-index: 10;
    font-size: 3em; /* Enlarge the h1 text size */
    text-align: center;
}

.member-grid {
    display: flex;
    flex-wrap: wrap; /* Allow items to wrap */
    align-items: center; /* Center items horizontally */
    justify-content: center; /* Center items vertically */
    gap: 1.5em; /* Add spacing between items */
    padding: 0; /* Remove padding */
    margin: 0 auto; /* Center the grid itself */
}

/* Container for each print item */
.member__img-container {
    margin: 0; /* Remove any margins */
    text-align: center; /* Ensure content is centered */
    transition: transform 500ms ease-in-out;
    flex: 0 1 175px;
    display: flex;
    flex-direction: column;
    align-items: center;
    z-index: 5;
}

.member__img-container:hover {
    transform: scale(1.15);
}

.member__img-container a {
    text-decoration: none;
    color: inherit;
    display: block;
    
}

/* Style for the member image */
.member__img {
    width: 200px; /* Set a fixed width */
    height: 200px; /* Set a fixed height */
    object-fit: cover; /* Crop the image to fit the dimensions */
    box-shadow: var(--bs);
    border-radius: 5px;         /* Optional: rounded corners */
}

/* Container for text details under the image */
.member__details {
    margin-top: 0.5em;
    font-size: 0.75rem;
    color: var(--cream);
    line-height: 1.4;
}

.member__name{
    font-size: 1.75em;
    display: block;
    margin-bottom: 0.2em;
    font-family: 'Oxygen', bold;
}
.member__role{
    display: block;
    margin-bottom: 0.2em;
    font-family: 'Oxygen', bold;
}
.member__description {
    display: block;
    margin-bottom: 0.2em;
    font-family: 'Oxygen';
}


/* IN THE NEWS Section */
.in-the-news {
    padding-top: 5em;
    padding-bottom: 5em;
    background: linear-gradient(to bottom, 
        rgb(0, 0, 0),
        rgba(29, 31, 82, 0.3),
        rgb(0, 0, 0)
    ), url('../img/hubble.jpg');

    background-size: cover;
    background-attachment: fixed;
    text-align: center;
    align-items: center;
    font-family: 'Oxygen', bold;
}

.in-the-news__header {
    font-size: 3em;
    color: var(--cream);
    margin-bottom: 1em;
    animation: fadeInUp 1s ease-out forwards;
}

.in-the-news__grid {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 2em;
    max-width: 90%;
    margin: 0 auto;
}

.in-the-news__item {
    border-radius: 10px;
    overflow: hidden;
    transition: background 0.3s ease, transform 0.3s ease;
    cursor: pointer;
    text-align: center;
    flex: 1 1 calc(33.333% - 2em); /* Adjusts to screen size */
    max-width: calc(33.333% - 2em);
    min-width: 250px;
    text-decoration: none;
    background: #00000079; /* Match the expanded content background */
    border: 2px solid transparent; /* Always have border to prevent jumping */
}

.in-the-news__item:hover {
    transform: scale(1.05);
    border-color: #1262a4;
    animation: pulseBlue 2s infinite;

}

.in-the-news__item img {
    width: 90%;
    height: auto;
    margin-top: .8em;
    border-radius: 10px;
}

.in-the-news__item h2 {
    font-size: 1.5em;
    color: var(--cream);
    margin: 1em 0 0.5em;
    text-decoration: none;
}

.in-the-news__item p {
    font-size: 1em;
    color: var(--cream);
    margin: 0 1em 1em;
    text-decoration: none;
}

.in-the-news__item a {
    display: block;
    text-decoration: none;
    color: inherit;
}


/* footer */
.footer {
    background: var(--black);
    color: var(--cream);
    text-align: center;
    padding: 3em;
    font-family: 'Oxygen';
    font-size: 1rem;
}

.footer p {
    margin: 0 0 1em;
}

.footer__social {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 1.5em; /* space between icons */
}

.footer__link {
    color: var(--cream);
    font-size: 1.5em; /* Adjust icon size */
    text-decoration: none;
    transition: color 300ms ease;
}

.footer__link:hover {
    color: var(--acc);
}



/* Starry Night Animation */
.starry-night {
    position: absolute;
    width: 100%;
    height: 100%;
    top: 0;
    left: 0;
    overflow: hidden;
    z-index: 1;
}
.stars, .twinkling, .clouds {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: block;
}
.stars {
    background: url('../img/style/stars.png') repeat;
    z-index: 1;
}
.twinkling {
    background: url('../img/style/twinkling.png') repeat;
    animation: moveTwinkling 200s linear infinite;
    z-index: 2;
    opacity: 0.7;
}

@keyframes moveTwinkling {
    from { background-position: 0 0; }
    to { background-position: -10000px 5000px; }
}


/* Ensure starry night layers do not block pointer events */
.starry-night, .stars, .twinkling {
    pointer-events: none;
}

/* Restore pointer events for header and navbar */
header, .navbar, .header-menu, .header-menu a {
    pointer-events: auto;
}

/* Transformations */

/* Adjust the keyframe percentage based on the width of your content */
@keyframes slide {
    0% {
        transform: translateX(0);
    }
    100% {
        transform: translateX(-50%);
    }
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(50px); /* starts 50px below */
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}


@keyframes bounce {
    0%, 20%, 50%, 80%, 100% {
        transform: translateY(0);
    }
    40% {
        transform: translateY(-10px);
    }
    60% {
        transform: translateY(-5px);
    }
}
