@media (min-width: 851px) {
    main {
        margin-top: 120px;
        padding-top: 130px; /* For desktop header #header height + a little extra */
    }
}
/* General styles */
html {
    background-color: #f0f0f0;
    font-family: Arial, sans-serif;
}

header {
    display: flex;
    justify-content: flex-start;
    align-items: center;
    height: 120px;
    background: #f8df80;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
    padding: 0 20px;
    margin: 0;
    gap: 10px;
    transition: transform 0.3s ease;
    border-radius: 4px;
    position: fixed;
    top: 10px;
    left: 10px;
    right: 10px;
    z-index: 100;
}

header.hide-on-scroll {
    transform: translateY(-150%);
    transition: transform 0.3s ease;
}

header h1 {
    position: absolute;
    top: 10px;
    left: 50%;
    transform: translateX(-50%);
    margin: 0;
    padding: 0;
    font-size: 1.4em;
    white-space: nowrap;
    z-index: 10;
}

header img {
    border-radius: 100%;
    background-color: white;
    max-height: 100px;
    width: auto;
    display: block;
    margin: 0;
    padding: 0;
}

header nav {
    flex: 1;
    position: static;
}

.menu {
    list-style: none;
    display: flex;
    gap: 9px;
    margin: 0;
    padding: 0;
    justify-content: center;
    padding-top: 50px;
}

.menu li {
    display: inline;
}

.menu a {
    display: inline-block;
    background: #ffffff;
    color: #000000;
    padding: 10px 20px;
    border-radius: 4px;
    margin-bottom: 0;
    font-size: 1.1em;
    font-weight: bold;
    text-decoration: none;
    transition: background 0.2s, color 0.2s;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.07);
    text-align: center;
    margin-left: 0px;
}

.menu a:hover {
    background: #388e3c;
    color: #fff;
}

main {
    margin: 20px;
    /* margin-top: 120px; */
    padding: 20px;
    padding-top: 130px; /* For desktop header #header height + a little extra */
    background-color: white;
    border-radius: 5px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    height: 700px;
}

footer {
    text-align: center;
    padding: 10px 0;
    background-color: #f8df80;
    color: black;
    position: fixed;
    width: 100%;
    bottom: 0;
}

/* Hide menu toggle by default */
.menu-toggle {
    display: none;
    background: none;
    border: none;
    font-size: 2em;
    cursor: pointer;
    margin-left: auto;
}

/* Responsive styles for phones */
@media (max-width: 850px) {
    iframe {
        width: 100%;
        height: 200px;
    }

    #youtube-videos {
        display: flex;
        flex-direction: column;
        gap: 16px;
        align-items: center;
        background-color: rgb(255, 255, 255);
        margin: 2em 0;
    }

    header {
        flex-direction: row;
        justify-content: space-between;
        align-items: center;
        height: auto;
        gap: 10px;
        padding: 10px;
        position: fixed;
        height: 80px;
        top: 0;
        left: 0;
        right: 0;
        z-index: 100;
    }

    header img {
        max-height: 60px;
        order: 1;
    }

    main {
        padding-top: 90px; /* For mobile header #header height + a little extra */
    }

    .menu-toggle {
        display: block;
        margin-left: 0;
        order: 3;
        z-index: 101;
    }

    header nav {
        order: 2;
        width: auto;
        position: static;
    }

    .menu {
        display: none;
        flex-direction: column;
        gap: 10px;
        width: 60vw;
        background: #fff;
        position: absolute;
        top: 100%;
        right: 0;
        left: auto;
        box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
        z-index: 100;
        padding: 10px 10px;
        margin: 1%;
        text-align: center;
        border-radius: 4px;
    }

    .menu a {
        display: block;
        width: 100%;
        background: #ffffff;
        color: #000000;
        padding: 10px 0;
        border-radius: 4px;
        margin-bottom: 8px;
        font-size: 1em;
        font-weight: bold;
        text-decoration: none;
        transition: background 0.2s, color 0.2s;
        box-shadow: 0 2px 6px rgba(0, 0, 0, 0.07);
        text-align: center;
    }

    .menu a:hover {
        background: #388e3c;
        color: #fff;
    }

    .menu.open {
        display: flex;
    }

    .youtube-video {
        width: 90%;
        max-width: 500px;
        min-width: 0;
        margin: 0 auto;
        padding: 12px;
    }

    .youtube-video-iframe-wrap {
        width: 100%;
        max-width: 560px;      /* Increase this value for larger videos */
        aspect-ratio: 16 / 9;
        margin: 0 auto 12px auto;
        border-radius: 8px;
        overflow: hidden;
        background: #000;
        display: flex;
        align-items: center;
        justify-content: center;
    }

    .youtube-video iframe {
        width: 100%;
        height: 100%;
        border: 0;
        border-radius: 8px;
        display: block;
    }

    .youtube-video {
        background: #f8df80;
    }
}

@media (min-width: 851px) {
    .menu-toggle {
        display: none;
    }
}

/* YouTube videos grid */
#youtube-videos {
    display: flex;
    gap: 32px;
    justify-content: center;
    margin: 2em 0;
}

.youtube-video {
    background: #f8df80;
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    padding: 16px;
    flex: 1 1 0;
    min-width: 0;
    max-width: none;
    text-align: center;
    transition: box-shadow 0.2s;
    display: flex;
    flex-direction: column;
    align-items: center;
    margin: 12px; /* Add this for spacing */
}

.youtube-video:hover {
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.16);
}

.youtube-video-iframe-wrap {
    width: 100%;
    max-width: 560px;      /* Increase this value for larger videos */
    aspect-ratio: 16 / 9;
    margin: 0 auto 12px auto;
    border-radius: 8px;
    overflow: hidden;
    background: #000;
    display: flex;
    align-items: center;
    justify-content: center;
}

.youtube-video iframe {
    width: 100%;
    height: 100%;
    border: 0;
    border-radius: 8px;
    display: block;
}

.youtube-video h3 {
    font-size: 1.2em;
    font-weight: bold;
    color: #333;
    margin: 0 0 18px 0;   /* Adds space below the title */
    text-align: center;
    letter-spacing: 0.02em;
    line-height: 1.3;
}

/* Channel buttons */
.youtube-channel-link {
    display: flex;
    justify-content: center;
    margin-bottom: 24px;
}

.visit-channel-btn {
    background: #ff0000;
    color: #fff;
    padding: 12px 32px;
    border-radius: 6px;
    font-size: 1.1em;
    font-weight: bold;
    text-decoration: none;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    transition: background 0.2s, box-shadow 0.2s;
    border: none;
    outline: none;
    cursor: pointer;
}

.visit-channel-btn:hover {
    background: #cc0000;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.16);
}

.subscribe-btn {
    background: #ff3333;
    color: #fff;
    padding: 12px 32px;
    border-radius: 6px;
    font-size: 1.1em;
    font-weight: bold;
    text-decoration: none;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    transition: background 0.2s, box-shadow 0.2s;
    border: none;
    outline: none;
    cursor: pointer;
    margin-left: 16px;
}

.subscribe-btn:hover {
    background: #b30000;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.16);
}

/* Playlist buttons */
#youtube-playlists {
    display: flex;
    flex-wrap: wrap;
    gap: 16px;
    justify-content: center;
    margin: 32px 0;
}

.playlist-btn {
    background: #1976d2;
    color: #fff;
    padding: 10px 24px;
    border-radius: 6px;
    font-size: 1em;
    font-weight: 500;
    text-decoration: none;
    margin: 4px 0;
    transition: background 0.2s, box-shadow 0.2s;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    border: none;
    outline: none;
    cursor: pointer;
    display: inline-block;
}

.playlist-btn:hover {
    background: #125ea2;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.16);
}

/* Description dropdown */
.desc-toggle {
    margin: 8px 0;
    padding: 6px 18px;
    background: #1976d2;
    color: #fff;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 1em;
    transition: background 0.2s;
}

.desc-toggle:hover {
    background: #125ea2;
}

.video-desc {
    background: #f7f7f7;
    border-radius: 6px;
    padding: 10px 14px;
    margin-top: 6px;
    text-align: left;
    font-size: 0.98em;
    color: #222;
}

#playlist-videos {
    margin-top: 32px;
    display: flex;
    flex-wrap: wrap;
    gap: 32px;
    justify-content: center;
}

.playlist-video {
    background: #f8df80;
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
    padding: 16px;
    max-width: 380px;
    text-align: center;
    margin-bottom: 24px;
}

.playlist-video h4 {
    font-size: 1em;
    margin-bottom: 12px;
}

.youtube-video-iframe-wrap {
    width: 100%;
    max-width: 560px;      /* Increase this value for larger videos */
    aspect-ratio: 16 / 9;
    margin: 0 auto 12px auto;
    border-radius: 8px;
    overflow: hidden;
    background: #000;
    display: flex;
    align-items: center;
    justify-content: center;
}