/* Global crap */
:root {
    --mybg: rgb(192, 198, 209);
    --contentbg: rgb(255, 255, 255);

}

@media (prefers-color-scheme: dark) {
    :root {
        --mybg: rgb(0, 0, 0);
        --contentbg: rgb(59, 57, 57);
    }
}

* {
    box-sizing: border-box;
}

body {
    grid-template-columns: 1fr min(90%) 1fr;
}

h3 h4 {
    margin: 0rem auto;
}

.center {
    text-align: center;
}

/* The grid containers */
.grid-container {
    display: grid;
    grid-template-areas:
        'header header header'
        'left middle right';
    width: 70%;
    margin: auto;
}

.main-grid-container {
    display: grid;
    grid-template-areas:
        'maincontent maincontent maincontent sidebar'
        'content content content sidebar'
        'footer footer footer footer';
    width: 100%;
    grid-template-columns: 1fr 1fr 1fr 1fr;
}


.footer-grid-container {
    background-color: var(--mybg);
    display: grid;
    grid-template-areas:
        "pic1 pic2 pic3 pic4"
        "foot foot foot foot";

}

/* Style the header */
.header {
    grid-area: header;
    padding: 0px;
    text-align: center;
    font-size: 35px;
}

/* coming soon boxes */
.left,
.middle,
.right {
    padding: 1px;
    text-align: center;
}

.left {
    grid-area: left;
}

.middle {
    grid-area: middle;
}

.right {
    grid-area: right;
}

/* Main content */
.content {
    grid-area: content;
    padding: 0px;
    text-align: center;
    max-width: 40em;
    margin: auto;
}

.maincontent {
    grid-area: maincontent;
    padding: 0px 10px 0px 0px;
    text-align: center;
}

/* About us */



.org-list-container {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    flex-wrap: wrap;
    gap: 20px;
    margin: 20px auto;
    max-width: 1200px;
}

.org-list-section {
    flex: 1 1 300px;
    background-color: var(--contentbg);
    padding: 10px;
    border-radius: 5px;
    box-sizing: border-box;
    text-align: left;
}

.org-item {
    margin-bottom: 10px;
}

.org-item p {
    margin: 0;
    line-height: 1.2;
}

.org-item .title {
    font-weight: bold;
}

/* Local Lessons */
.lessons {
    text-align: left;
    width: 90%;
}

.lessondetails {
    text-align: left;
    width: 90%;
}

.rental {
    text-align: left;
    width: 80%;
}

.floatleft {
    float: left;
    margin-right: 10px;
}

.floatright {
    float: right;
    margin-right: 10px;
}

/* Contact page */
.contactbox {
    display: flex;
    justify-content: center;
    margin: auto;
}


.contact {
    flex-direction: column;
}

.info,
.address,
.email,
.text,
.webmaster {
    text-align: left;
}


/* Image Gallery */
.gallery-container {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
    gap: 16px;
}

/* The individual gallery item */
div.gallery {
    border: 1px solid #ccc;
    transition: border-color 0.3s;
    text-align: center;
    display: flex;
    flex-direction: column;
}

div.gallery:hover {
    border-color: #777;
}

/* The image inside the gallery item */
div.gallery img {
    width: 100%;
    height: auto;
    display: block;
}

/* The description text */
div.desc {
    padding: 10px;
    flex-grow: 1;
    display: flex;
    align-items: center;
    justify-content: center;
}

#quote-wrapper {
    position: relative;
    width: 80%;
}

.quote-container {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    padding: 40px;
    border-radius: 8px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);

    opacity: 0;
    /* Hidden by default */
    transition: opacity 1.5s ease-in-out;
}

/* This class makes a container visible */
.quote-container.visible {
    opacity: 1;
}






/* sidebar stuff */
.sidebar {
    grid-area: sidebar;
    text-align: center;
    background-color: var(--mybg);
    padding-top: 60px;
    color: #000000;
}

.sidebar form {
    text-align: center;
    margin: 20px 0;
}

.sidebar form input[type="image"] {
    max-width: 100%;
    height: auto;
    width: auto;
}

.sidebar>p {
    text-align: left;
    padding: 0px 3em;
}

.slideslarge {
    position: relative;
    width: 384px;
    height: 256px;
    overflow: hidden;
    /*background-color: #f0f0f0;*/
    margin: auto;
    border-radius: 8px;
    /*box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);*/
    display: flex;
    /* Add this */
    align-items: center;
    /* Add this */
    justify-content: center;
    /* Add this */
}

.slideslarge img {
    position: absolute;
    top: 50%;
    /* Change from 0 */
    left: 50%;
    /* Change from 0 */
    transform: translate(-50%, -50%);
    /* Add this to center */
    max-width: 100%;
    max-height: 100%;
    width: auto;
    /* Change from 100% */
    height: auto;
    /* Change from 100% */
    object-fit: contain;
    opacity: 0;
    transition: opacity 1.5s ease-in-out;
}

/* Make active images visible */
.slideslarge img.active,
.slidessmall img.active {
    opacity: 1;
}

/* Hide small slideshow on large screens */
.slidessmall {
    display: none;
}


.datesbox {
    display: flex;
    justify-content: center;
    margin: auto;
}


.datestoknow {
    flex-direction: column;
}

.dates {
    text-align: left;
}

.volunteers {
    text-align: center;
    padding: 3em;
}

/* footer pics */
.pic1,
.pic2,
.pic3,
.pic4 {
    padding: 1em;
}

.pic1 {
    grid-area: pic1;
}

.pic2 {
    grid-area: pic2;
}

.pic3 {
    grid-area: pic3;
}

.pic4 {
    grid-area: pic4;
}

.logos {
    width: 60%;
}

.foot {
    grid-area: foot;
    margin: auto;
}

.footer {
    grid-area: footer;
    background-color: #f1f1f1;
    padding: 10px;
    text-align: center;
}


@media (max-width: 1200px) {
    .org-list-container {

        justify-content: center;
    }
}

/* Media query for small screens */
@media (max-width: 900px) {

    /* Hide large slideshow on small screens */
    .slideslarge {
        display: none;
    }

    /* Show and style small slideshow */
    .slidessmall {
        display: flex;
        align-items: center;
        justify-content: center;
        position: relative;
        width: 256px;
        height: 171px;
        overflow: hidden;
        /*background-color: #f0f0f0;*/
        margin: auto;
        border-radius: 8px;
        /*box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);*/
    }

    .slidessmall img {
        position: absolute;
        top: 50%;
        /* Change from 0 */
        left: 50%;
        /* Change from 0 */
        transform: translate(-50%, -50%);
        /* Add this to center */
        width: auto;
        /* Change from 100% */
        height: auto;
        /* Change from 100% */
        object-fit: contain;
        object-position: center;
        opacity: 0;
        transition: opacity 1.5s ease-in-out;
    }
}





/* Responsive layout - makes the three columns stack on top of each other instead of next to each other */
@media (max-width: 720px) {
    .grid-container {
        grid-template-areas:
            'header header header'
            'left left left'
            'middle middle middle'
            'right right right'
    }


    .main-grid-container {
        grid-template-areas:
            'maincontent maincontent maincontent'
            'sidebar sidebar sidebar'
            'content content content'
            'footer footer footer';
    }

    .footer-grid-container {
        display: grid;
        grid-template-areas:
            "pic1 pic2"
            "pic3 pic4"
            "foot foot foot foot";
    }

    .org-list-container {
        justify-content: center;
    }
}

/* Small screens (1-column layout) */
@media (max-width: 768px) {
    .org-list-container {
        flex-direction: column;
        align-items: center;
        gap: 10px;
        /* Reduce the gap between the stacked sections */
        margin: 10px auto;
        /* Reduce the overall container margin */
    }

    .org-list-section {
        width: 95%;
        padding: 5px;
        /* Reduce padding inside each section */
    }

    .org-list-section h4 {
        margin: 0 0 5px 0;
        /* Reduce the margin on the heading */
    }

    .org-item {
        margin-bottom: 5px;
        /* Reduce the space between each list item */
    }

}



.bold {
    font-weight: bold;
}