html::after {
    content: "Built by Thissanth Ragitharan for Chelmsford Tamil School";
    font-size: 12px;
    color: rgba(0, 0, 0, 0.05);
    position: fixed;
    bottom: 5px;
    right: 10px;
}

body,
header,
html {
    background-color: var(--background-colour);
    display: flex
}

.logo,
body,
header,
html,
nav ul {
    display: flex
}

nav ul,
nav ul li {
    list-style: none
}

header,
nav ul li a:hover {
    color: var(--navbar-button-red)
}

button,
nav ul li,
nav ul li a {
    transition: .3s ease-in-out
}

a:focus,
button:focus,
button:hover {
    outline: 2px solid var(--navbar-yellow)
}

.active,
footer a:hover {
    color: var(--navbar-yellow);
    text-decoration: underline
}

address::first-line,
footer a:hover {
    font-size: 1.1rem
}

button,
nav ul,
th {
    background-color: var(--navbar-button-red)
}

button,
th {
    color: #fff
}

.blank-container,
.full-container,
.heading,
address,
main,
td {
    text-align: center
}

.active,
.contact-form label,
.gallery-btn,
.heading,
address::first-line,
button,
nav ul li a:hover {
    font-weight: 700
}

.contact-form button:hover,
button:hover {
    background-color: var(--button-hover-red)
}

.active,
.affiliates a:hover,
footer a:hover {
    text-decoration: underline
}

:root {
    --background-colour: #F8F8F8;
    --navbar-button-red: #9B021C;
    --button-hover-red: #C8102E;
    --navbar-yellow: #E6BC00;
    --light-yellow: #FDF4C5;
    --text-grey: #222222;
    --text-white: #F0F0F0;
    --accent-blue: #01187A;
    --footer-red: #7A0118
}

* {
    box-sizing: border-box
}

body,
html {
    min-height: 100dvh;
    min-width: 300px;
    margin: 0;
    padding: 0;
    font-family: 'Alumni Sans SC', Arial, sans-serif;
    flex-direction: column;
    font-size: 1.2rem;
    color: var(--text-grey)
}

header {
    justify-content: space-between;
    margin: 1% 15%;
    align-items: center;
    padding: .5%
}

.logo {
    align-items: center;
    flex-shrink: 0
}

.logo img {
    width: auto;
    height: auto;
    max-width: 25vw
}

.error,
.menu-icon {
    display: none
}

nav ul {
    padding: 1%;
    margin: 0;
    gap: 5vw;
    flex-wrap: nowrap;
    flex-direction: row;
    justify-content: center;
    min-width: 0
}

nav ul.show-menu {
    opacity: 1;
    transform: translateY(0)
}

nav ul li a {
    font-size: 1.2rem;
    color: var(--text-white);
    margin: auto 10px;
    border-radius: 5px
}

nav ul li a:hover {
    background-color: var(--text-white);
    transform: scale(1.1);
    border-radius: 5px;
    padding: 7px
}

main {
    flex: 1;
    margin: auto;
    width: 70%
}

.inline-container,
footer {
    justify-content: center;
    display: flex
}

.heading {
    background-color: var(--navbar-yellow);
    color: var(--text-grey);
    margin: 0;
    font-size: 1.3rem;
    text-transform: uppercase
}

button {
    outline: transparent solid 2px;
    border: none;
    padding: 12px 24px;
    cursor: pointer;
    font-size: 1.5rem;
    border-radius: 5px;
    margin: 1%
}

a:focus,
button:focus {
    box-shadow: 0 0 5px var(--navbar-yellow)
}

footer {
    background-color: var(--footer-red);
    padding: .25%
}

footer,
footer a {
    color: #fff;
    font-weight: lighter
}

address {
    padding: .3em
}

.blank-container {
    padding: 3%;
    border-radius: 10px;
    margin: auto
}

.blank-container.last {
    padding-bottom: 4%
}

.inline-container {
    align-items: center;
    flex-wrap: wrap;
    gap: 20px;
    padding: 20px;
    margin: auto
}

.full-container {
    background-color: var(--light-yellow);
    box-shadow: 0 4px 10px rgba(0, 0, 0, .1);
    border: 1px solid var(--navbar-yellow);
    border-radius: 10px;
    padding: 2%;
    justify-content: center;
    align-items: center;
    margin: .5%;
    flex: 1
}

.disabled {
    cursor: not-allowed;
    opacity: .5;
    pointer-events: none
}

#left-decor,
#right-decor {
    min-height: 100vh;
    position: fixed;
    top: 10vh;
    bottom: 0;
    width: 20%;
    pointer-events: none;
    display: flex;
    flex-direction: column;
    justify-content: space-between
}

#left-decor {
    left: 0;
    justify-content: flex-end;
    padding-right: 10px
}

#right-decor {
    right: 0;
    justify-content: flex-start;
    padding-left: 10px
}

.floating-letter {
    position: absolute;
    font-size: 2rem;
    opacity: 0.7;
    text-shadow: 2px 2px 5px rgba(0, 0, 0, 0.2);
    animation: 5s ease-in-out infinite alternate floatAnim
}

@keyframes floatAnim {
    0% {
        transform: translateY(0) rotate(0)
    }

    50% {
        transform: translateY(-20px) rotate(5deg)
    }

    100% {
        transform: translateY(0) rotate(-5deg)
    }
}

@keyframes waveAnim {

    0%,
    100% {
        transform: translateY(0) translateX(0)
    }

    50% {
        transform: translateY(-10px) translateX(10px)
    }
}

@keyframes randomFloat {

    0%,
    100% {
        transform: translate(0, 0) rotate(0)
    }

    25% {
        transform: translate(5px, -10px) rotate(3deg)
    }

    50% {
        transform: translate(-5px, 5px) rotate(-3deg)
    }

    75% {
        transform: translate(3px, -5px) rotate(2deg)
    }
}

@keyframes bounceAnim {

    0%,
    100% {
        transform: translateY(0)
    }

    50% {
        transform: translateY(-15px)
    }
}

.donations,
.newsletter {
    flex-direction: column;
    min-width: 45%;
    max-width: 50%
}

h3 {
    margin-top: 0
}

table {
    width: 80%;
    margin: auto;
    background-color: #fff;
    border-collapse: collapse
}

th {
    padding: 10px
}

td {
    border: 1px solid var(--text-grey);
    padding: 10px
}

.event-card,
.teacher-profile {
    box-shadow: 2px 2px 10px rgba(0, 0, 0, .1);
    border-radius: 10px
}

.teacher-profile {
    display: inline-block;
    width: 10vw;
    background-color: var(--navbar-yellow);
    padding: 15px;
    margin: 10px
}

.teacher-profile img {
    width: 100%;
    height: auto;
    border-radius: 50%;
    margin-bottom: 10px
}

.end-of-year,
.mid-year {
    font-size: 1rem;
    flex-direction: column;
    min-width: 45%;
    max-width: 50%
}

.end-of-year h3,
.mid-year h3 {
    width: 100%;
    margin-bottom: 10px
}

.table-responsive {
    overflow-x: auto;
    display: flex;
    justify-content: center;
    width: 100%
}

.highlight-column,
.highlight-row {
    background-color: var(--light-yellow)
}

.event-card,
td:hover,
th:hover {
    background-color: var(--navbar-yellow)
}

.highlight-column th {
    color: #000;
    font-weight: 700
}

body.library-page .inline-container {
    max-width: 100% !important;
    width: 100% !important
}

body.library-page table {
    width: 100% !important
}

body.library-page .end-of-year,
body.library-page .mid-year {
    min-width: 45vw !important;
    max-width: 100vw !important
}

.event-scroll {
    display: flex;
    flex-wrap: wrap;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    scroll-behavior: smooth;
    gap: 20px;
    padding-bottom: 10px;
    justify-content: center;
}

.event-card {
    flex: 0 0 auto;
    width: 80%;
    max-width: 250px;
    padding: 20px;
    scroll-snap-align: start
}

.event-card img {
    width: 100%;
    height: auto;
    border-radius: 5px
}

.gallery-btn {
    display: block;
    background: var(--navbar-button-red);
    color: #fff;
    padding: 10px 20px;
    margin-top: 10px;
    border-radius: 5px
}

.gallery-btn:hover {
    background: var(--button-hover-red)
}

.gallery {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 10px;
    padding: 20px;
    justify-content: center
}

.gallery a {
    display: block;
    overflow: hidden;
    border-radius: 10px
}

.gallery img {
    width: 100%;
    height: auto;
    border-radius: 10px;
    transition: transform .3s ease-in-out;
    object-fit: cover
}

.gallery img:hover {
    transform: scale(1.05)
}

.play-button {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 50px;
    height: 50px;
    background: url('../../images/play-icon.svg') no-repeat center;
    background-size: contain;
    pointer-events: none;
}

.contact-form {
    flex: 1;
    min-width: 350px
}

.contact-form form {
    display: flex;
    flex-direction: column;
    gap: 10px
}

.contact-form input,
.contact-form textarea {
    width: 100%;
    padding: 10px;
    border: 1px solid #ccc;
    border-radius: 5px
}

.contact-form button {
    background-color: var(--navbar-button-red);
    color: #fff;
    padding: 12px 24px;
    border: none;
    cursor: pointer;
    font-size: 1.5rem
}

.affiliates a,
.affiliates a:hover {
    font-weight: 700;
    border-radius: 5px
}

.contact-details {
    display: flex;
    flex-direction: column
}

.contact-info {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 10px;
    padding: 10px 20px;
    border-radius: 10px
}

.contact-info svg,
.social-media svg {
    height: 6vh
}

.contact-info.footer svg,
.social-media.footer svg {
    height: 5vh
}

.affiliates ul {
    list-style-type: disc;
    padding-left: 20px;
    color: var(--navbar-button-red)
}

.affiliates li {
    margin: 5px 0
}

.affiliates a {
    color: var(--footer-red);
    text-decoration: none;
    margin: auto 10px;
    transition: .3s ease-in-out
}

.affiliates a:hover {
    background-color: var(--navbar-button-red);
    padding: 7px;
    color: var(--text-white)
}

.map iframe {
    width: 100%;
    max-width: 800px;
    height: 450px
}

@media (min-width:1440px) {
    main {
        max-width: 60%
    }
}

@media (max-width:1024px) {
    main {
        width: 80%
    }

    header {
        flex-direction: column;
        text-align: center;
        padding: 2% 0
    }

    .logo img {
        max-width: 75vw;
        margin: 0 auto
    }

    body {
        font-size: 1rem
    }

    h1,
    h2 {
        font-size: 1.6rem
    }

    #left-decor,
    #right-decor {
        display: none
    }

    h1 {
        margin-top: 10px
    }

    button {
        padding: 10px 20px;
        font-size: 1.2rem
    }

    .contact-container,
    .inline-container {
        flex-direction: column;
        align-items: center
    }

    .donations,
    .newsletter {
        width: 80% !important;
        text-align: center
    }

    .event-card,
    table {
        width: 90%
    }

    .teacher-profile {
        width: 6vw
    }

    .end-of-year,
    .mid-year {
        font-size: .9rem;
        min-width: 80%;
        max-width: 90%
    }

    .event-scroll {
        display: flex;
        flex-direction: column;
        align-items: center;
        gap: 15px
    }

    .contact-details,
    .contact-form {
        width: 90%;
        text-align: center
    }

    .contact-info svg,
    .social-media svg {
        height: 4vh
    }
}

@media (max-width:768px) {

    h1,
    h2 {
        margin-top: 10px
    }

    #left-decor,
    #right-decor,
    nav ul {
        display: none
    }

    nav,
    nav ul {
        position: relative;
        width: 100%
    }

    .event-card,
    main,
    nav,
    nav ul,
    nav ul li,
    nav ul li a {
        width: 100%
    }

    .menu-icon,
    header,
    nav ul,
    nav ul li {
        text-align: center
    }

    header {
        flex-direction: column;
        padding: 2% 0
    }

    .logo img {
        max-width: 60vw;
        margin: 0 auto
    }

    body {
        font-size: 1rem
    }

    h1 {
        font-size: 1.3rem
    }

    h2 {
        font-size: 1.2rem
    }

    nav {
        background-color: var(--navbar-button-red)
    }

    .menu-icon {
        display: block;
        cursor: pointer;
        font-size: 2rem;
        padding: 15px;
        margin: 1%;
        color: #fff;
        background: var(--navbar-button-red);
        width: 98vw;
    }

    .error,
    nav ul li a {
        display: block;
        font-size: 1rem
    }

    .menu-icon:focus {
        outline: white solid 2px
    }

    nav ul {
        display: none;
        justify-content: center;
        height: 100%;
        flex-direction: column;
        align-items: center
    }

    nav ul.show-menu {
        display: flex
    }

    nav ul li {
        align-items: center;
        text-align: center;
        border-bottom: 1px solid rgba(255, 255, 255, .3)
    }

    nav ul li:last-child {
        border-bottom: none
    }

    nav ul li a {
        height: 100%;
        padding: .5%
    }

    nav ul li a:hover {
        height: 100%;
        padding: 3px
    }

    button {
        padding: 10px 20px;
        font-size: 1.1rem
    }

    .inline-container {
        flex-direction: column;
        align-items: center;
        width: 100%
    }

    .donations,
    .newsletter {
        width: 100% !important;
        max-width: 100% !important
    }

    .full-container {
        width: 100% !important;
        max-width: 100%
    }

    table {
        width: 90%
    }

    .teacher-profile {
        width: 6vw
    }

    .error {
        color: var(--text-white);
        background-color: var(--button-hover-red);
        margin: 3%;
        margin-bottom: 5%;
        padding: 1%;
        border-radius: 10px;
        font-weight: bold;
    }

    .end-of-year,
    .mid-year {
        font-size: .8rem;
        min-width: 80%;
        max-width: 90%
    }

    .event-scroll {
        display: flex;
        flex-direction: column;
        align-items: center;
        gap: 15px
    }

    .contact-container {
        flex-direction: column;
        align-items: center
    }

    .contact-details,
    .contact-form {
        width: 90%;
        text-align: center
    }

    .contact-info svg,
    .social-media svg {
        height: 4vh
    }
}