:root {
    --logo-width: 100px;
    --logo-height: 100px;
    --logo-width-large: 120px;
    --logo-height-large: 120px;
    --logo-width-xlarge: 140px;
    --logo-height-xlarge: 140px;
    --logo-width-xxlarge: 160px;
    --logo-height-xxlarge: 160px;
}

@font-face {
    font-family: 'ColaKind';
    src: url('fonts/colakind/ColaKind.otf') format('opentype'),
         url('fonts/colakind/ColaKind.ttf') format('truetype');
    font-weight: normal;
    font-style: normal;
}

body {
    font-family: Arial, sans-serif;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    background-color: #f7f7f7;
    background-image: url('images/background (1).jpg');
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
}

.wrapper {
    background-color: rgba(0, 0, 0, 0.7);
    padding: 35px;
    border-radius: 13px;
    position: relative;
    z-index: 1;
    margin: 20px;
    max-width: 1200px;
    box-sizing: border-box;
}

.title-bar {
    position: absolute;
    top: 17px;
    right: 17px;
    display: flex;
    gap: 8px;
    align-items: center;
}

.social-links {
    display: flex;
    gap: 2px;
    align-items: center;
}

.social-links a {
    color: #d63026;
    text-decoration: none;
    font-size: 1.4em;
    transition: transform 0.3s ease, color 0.3s ease;
    font-family: Arial, sans-serif;
    display: flex; /* Use flexbox for better alignment */
    align-items: center;
    justify-content: center;
    width: 1.5em; /* Fixed width */
    height: 1.5em; /* Fixed height */
}

.social-links a .large-social-icon {
    font-size: 1.1em;
}

.social-links a:hover {
    transform: scale(1.2);
    color: #ff413b;
}

.title {
    font-family: 'ColaKind', Arial, sans-serif;
    color: #ffffff;
    text-align: center;
    margin: 25px 0;
    font-size: 3.75em;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.5);
    position: relative;
    z-index: 1;
    background-color: #ff413b;
    padding: 10px 20px;
    border-radius: 10px;
    display: inline-block;
}

.about-section {
    padding: 0px;
    margin: auto;
    margin-bottom: 25px;
    max-width: 700px;
    text-align: center;
}

.about-section p {
    color: #d63026;
    line-height: 1.6;
    margin: 0;
    font-size: 1em;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.5);
    font-weight: bold;
}

.about-section .maple-leaf {
    font-size: 1.05em;
    margin-left: 7px;
    vertical-align: middle;
    color: #ff413b;
}

.container {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 15px;
    max-width: 1200px;
    margin: 15px;
    position: relative;
    z-index: 1;
}

.item {
    position: relative;
    display: flex;
    justify-content: center;
    align-items: center;
    width: 160px;
    height: 120px;
    min-width: 160px;
    min-height: 120px;
    border-radius: 7px;
    overflow: hidden;
    background-color: #fff;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1),
               0 6px 12px rgba(139, 0, 0, 0.3);
    transition: all 0.3s ease;
    border: 2px solid transparent;
    box-sizing: border-box;
}

.item img {
    width: var(--logo-width);
    height: var(--logo-height);
    transition: opacity 0.3s ease;
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    object-fit: contain;
}

/* Make Province of Canada and Indigo images larger */
.large-logo img { /* For logos that need to be larger */
    width: var(--logo-width-large);
    height: var(--logo-height-large);
}

/* Make Province of Canada and CanadianProtein images extra large */
.xlarge-logo img { /* For logos that need to be extra large */
    width: var(--logo-width-xlarge);
    height: var(--logo-height-xlarge);
}

/* Make logos extra extra large */
.xxlarge-logo img { /* For logos that need to be extra extra large */
    width: var(--logo-width-xxlarge);
    height: var(--logo-height-xxlarge);
}

/* Make Tentree logo square */
.square-logo img { /* For logos that need to be square */
    width: var(--logo-width);
    height: var(--logo-height);
    object-fit: cover;
    object-position: center;
}

/* Add rounded corners for square logos */
.round-corner img { /* For logos that need rounded corners */
    border-radius: 8px;
}

.item a {
    position: absolute;
    width: 100%;
    height: 100%;
    top: 0;
    left: 0;
    text-decoration: none;
    color: transparent;
    z-index: 2;
}

.item:hover {
    border: 2px solid red; /* Red border on hover */
    transform: translateY(-5px); /* Lift the container up slightly */
    box-shadow: 0 6px 12px rgba(0, 0, 0, 0.2),
               0 8px 16px rgba(139, 0, 0, 0.4);
}

.item:hover .overlay {
    opacity: 0.4;
}

.overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(255,0,0, 0.3);
    z-index: 1;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.copyright {
    color: #d63026;
    text-align: right;
    margin-top: 15px;
    margin-right: 30px;
    font-size: 0.88em;
    font-weight: bold;
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.5);
    position: absolute;
    bottom: 17px;
    right: 17px;
}

.footer-text {
    color: #d63026;
    text-align: center;
    margin-top: 27px;
    margin-bottom: 27px;
    font-size: 0.98em;
    font-weight: bold;
    line-height: 1.6;
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.5);
}

.footer-text a {
    color: #ff413b;
    text-decoration: none;
    transition: color 0.3s ease;
}

.footer-text a:hover {
    color: #ff6b6b;
}

/* Section Header Styling */
.section-header {
    grid-column: 1 / -1;
    text-align: center;
    margin: 10px 0;
    padding-left: 0;
}

.section-header h2 {
    color: #ff413b;
    font-family: Arial, sans-serif;
    font-size: 2em;
    margin: 0;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.5),
                 4px 4px 8px rgba(139, 0, 0, 0.7);
}

/* Responsive layout for smaller screens */
@media (max-width: 1200px) {
    .container {
        grid-template-columns: repeat(3, 1fr);
    }
}

@media (max-width: 900px) {
    .container {
        grid-template-columns: repeat(2, 1fr);
        justify-items: center;
    }
    .item {
        width: 180px;
        height: 140px;
        min-width: 180px;
        min-height: 140px;
    }
    .item img {
        width: calc(var(--logo-width) * 1.2);
        height: calc(var(--logo-height) * 1.2);
    }
    .large-logo img {
        width: calc(var(--logo-width-large) * 1.2);
        height: calc(var(--logo-height-large) * 1.2);
    }
    .xlarge-logo img {
        width: calc(var(--logo-width-xlarge) * 1.2);
        height: calc(var(--logo-height-xlarge) * 1.2);
    }
    .xxlarge-logo img {
        width: calc(var(--logo-width-xxlarge) * 1.2);
        height: calc(var(--logo-height-xxlarge) * 1.2);
    }
}

@media (max-width: 600px) {
    .container {
        grid-template-columns: repeat(2, 1fr);
        justify-items: center;
        margin: 0;
        gap: 15px;
    }
    .item {
        width: 140px;
        height: 110px;
        min-width: 140px;
        min-height: 110px;
    }
    .item img {
        width: calc(var(--logo-width) * 1);
        height: calc(var(--logo-height) * 1);
    }
    .large-logo img {
        width: calc(var(--logo-width-large) * 1);
        height: calc(var(--logo-height-large) * 1);
    }
    .xlarge-logo img {
        width: calc(var(--logo-width-xlarge) * 1);
        height: calc(var(--logo-height-xlarge) * 1);
    }
    .xxlarge-logo img {
        width: calc(var(--logo-width-xxlarge) * 1);
        height: calc(var(--logo-height-xxlarge) * 1);
    }
    .wrapper {
        padding: 50px 10px;
        margin: 10px;
        width: calc(100% - 20px);
    }
    .social-links a {
        font-size: 1em; /* Make social media links smaller on mobile */
    }   
    .title {
        font-size: 1.50em;
        padding: 5px;
        margin: 0px auto 15px auto;
        white-space: nowrap;
        text-align: center;
        display: block;
    }
    .about-section {
        margin-bottom: 10px;
    }
    .about-section p {
        font-size: 0.8em;
    }
    .section-header h2 {
        font-size: 1.5em;
    }
    .footer-text {
        font-size: 0.8em;
        margin-bottom: 0;
    }
    .copyright {
        font-size: 0.6em;
        margin-top: 0;
        margin-right: 0;
    }
}

/* Language Switcher */
.language-switcher {
    display: flex;
    gap: 4px;
    align-items: center;
}

.language-switcher a {
    color: #d63026;
    text-decoration: none;
    font-size: 0.75em;
    font-weight: 600;
    padding: 2px 6px;
    border-radius: 3px;
    border: 1px solid rgba(214, 48, 38, 0.3);
    background: rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    height: 1.2em;
    min-width: 1.5em;
}

.language-switcher a.active {
    background-color: #d63026;
    color: white;
    border-color: #d63026;
}

.language-switcher a:hover:not(.active) {
    transform: scale(1.05);
    background: rgba(214, 48, 38, 0.1);
    border-color: #d63026;
}

@media (max-width: 600px) {
    .language-switcher {
        gap: 2px;
    }
    
    .language-switcher a {
        font-size: 0.65em;
        padding: 1px 4px;
        height: 1em;
        min-width: 1.2em;
    }
}
