:root {
    --primary-colour: #111;
    --white-colour: #f1f1f1;
    --offwhite-colour: #cdcdcd;
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
    -webkit-font-smoothing: antialiased;
    font-synthesis: none !important;
}

.scrollbar-track, .scrollbar-track-y {
  opacity: 0 !important;
  pointer-events: none !important;
}

body {
    width: 100vw;
    display: flex;
    flex-direction: column;
    background-color: #111;
    cursor: none;
}

html, body {
  overflow: hidden;
}

#content-wrapper {
  height: 100vh;
  overflow: auto;
  display: block; 
}

#overlay-top 
{
    position: absolute;
    height: 100%;
    width: 100%;
    background: linear-gradient(#0000009a, var(--primary-colour));
    z-index: 1;
}

#section1 {
    position: relative; /* Establish positioning context for the overlay */
    height: 80vh;
    width: 100vw;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    background: url("../Images/Ecospark/Header.jpg") center no-repeat #000;
    background-size: cover;
    opacity: 0;
    transform: scale(1.2);
    animation: fadezoom 1s ease forwards;
}

#section1 h1, #section1 h4 {
    color: var(--white-colour);
    z-index: 3;
}

#section1 h4{
    margin-bottom: 80px;
    margin-top: -5px;
}

.picture-section {
    position: relative; /* Establish positioning context for the overlay */
    padding: 0 1rem;
    background-color: var(--primary-colour);
    display: flex;
    justify-content: center;
    align-items: center;
    margin-bottom: 40px;
}

.picture-wrapper {
    width: min(1300px, 50vw);
    aspect-ratio: 16 / 9;
    border-radius: clamp(12px, 4vw, 40px);
    overflow: hidden;
    margin: auto;
    display: flex;
    justify-content: center;
    align-items: center;
}

.picture-wrapper img{
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.picture-wrapper.slideshow {
    position: relative;
}

.picture-wrapper.slideshow img {
    position: absolute;
    inset: 0;
    opacity: 0;
    transform: translateX(20%);
    transition: opacity 0.9s ease, transform 0.9s ease;
}

.picture-wrapper.slideshow img.is-active {
    opacity: 1;
    transform: translateX(0);
    z-index: 2;
}

.picture-wrapper.slideshow img.is-exiting {
    opacity: 0;
    transform: translateX(-20%);
    z-index: 1;
}

.text-section, .text-section-info {
    position: relative;
    padding: 7vh 0;
    min-height: 30vh;
    width: 100%;
    display: block;
}


.text-section h3, .text-section-info h3 {
    max-width: 50rem;      /* readable line length on large screens */
    margin-left: auto;
    margin-right: auto;
    margin-bottom: 20px;
    text-align: left; 
    color: #f1f1f1;
}

.text-section p, .text-section-info p {
    max-width: 50rem;      /* readable line length on large screens */
    margin-left: auto;
    margin-right: auto;
    text-align: left; 
    line-height: 2;
}

.header {
    position: relative;
    height: 60vh;
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-direction: column;
}


.header h2 {
    width: 100%;  
    margin-left: auto;
    margin-right: auto;
    margin-bottom: 20px;
    text-align: center; 
}

.primarybutton-white,
button {
    cursor: none;
}

.header h4 {
    width: 100%;      /* readable line length on large screens */
    margin-left: auto;
    margin-right: auto;
    text-align: center; 
    line-height: 2;
    color: #f1f1f1;
}

.info-entry {
    max-width: 50rem;
    margin-left: auto;
    margin-right: auto;
    margin-bottom: 10px;
    text-align: left; 
    display: flex;
    flex-direction: row;
    align-items: baseline;
    gap: 0.4rem;
}

.info-entry p {
    margin: 0;
    flex: 1;        /* take all remaining space */
    min-width: 0;   /* allow it to shrink if needed */
    color: #dcdcdc;
}

.info-entry h5 {
    margin: 0;
    flex-shrink: 0;
}

.primarybutton-white {
    padding: 0.95rem 1.5rem;
    color: var(--white-colour);
    border: 2px solid var(--white-colour);
    border-radius: 50px;
    background-color: var(transparent);
    z-index: 3;
    transition: 0.2s ease-in;
}

.primarybutton-white:hover {
    background-color: var(--white-colour);
    color: var(--primary-colour);
    transform: scale(1.04);
}

@keyframes fadezoom {
    from {
        opacity: 0;
        transform: scale(1.4);
    }
    
    to {
        opacity: 1;
        transform: scale(1);
    }
}

@media (width <= 1350px) {
    .section-wrapper {
        justify-content: center;
        flex-direction: column;
        text-align: center;
    }  

    #section2 h3 {
        order: 1;
        margin-bottom: 40px;
    }

    #section2 p {
        order: 2;
        text-align: center;
    }

    #section3 h3 {
        margin-bottom: 40px;
    }

    .picture-wrapper {
        width: 70vw;
    }

    .text-section p, .text-section-info p {
        width: 60%;
        text-align: left;
    }

    .text-section h3, .text-section-info h3 {
        text-align: center;
    }

    .info-entry {
        width: 60%;
        justify-content: center;
        flex-direction: column;
        text-align: center;
    }
}

@media (width <= 1000px) {
    .text-section p, .text-section-info p {
        width: 80%;
    }

    .info-entry {
        width: 80%;
    }

    #section1 {
        height: 95vh;
    }

    .picture-wrapper {
        width: 70vw;
    }
}

@media (width <= 530px) {
    .text-section p, .text-section-info p {
        width: 80%;
    }

    #section1 {
        height: 95vh;
    }

    .picture-wrapper {
        width: 85vw;
    }

    .info-entry {
        flex-wrap: wrap;
    }
}
