﻿/* Reset & Accessibility */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: Arial, sans-serif;
    line-height: 1.6;
    background-color: #fff;
    color: #000;
    transition: background-color 0.3s, color 0.3s;
}

a {
    text-decoration: none;
    color: inherit;
}

img {
    max-width: 100%;
    height: auto;
}

.skip-link {
    position: absolute;
    top: -40px;
    left: 0;
    background: #000;
    color: #fff;
    padding: 8px;
    z-index: 100;
}

    .skip-link:focus {
        top: 0;
    }

/* ✅ Green Banner Notification */
#banner-message {
    display: none;
    position: fixed;
    top: 0;
    width: 100%;
    background-color: #28a745;
    color: #fff;
    padding: 1rem;
    font-weight: bold;
    text-align: center;
    z-index: 9999;
    transition: opacity 0.3s ease;
}

/* Header (now Blue) */
header {
    position: relative;
    padding: 1rem 2rem;
    background-color: #0056b3;
    color: #fff;
}

.header-overlay {
    position: relative;
    z-index: 2;
}

.logo {
    display: flex;
    align-items: center;
    gap: 10px;
}

    .logo img {
        width: 60px;
        height: 60px;
    }

    .logo h1 {
        font-size: 1.8rem;
    }

/* 🎞 Inline Video Banner */
.video-banner {
    display: flex;
    justify-content: center;
    gap: 1rem;
    padding: 1rem 0;
}

    .video-banner video {
        width: 150px;
        height: 90px;
        border-radius: 10px;
        object-fit: cover;
    }

/* Navigation */
.menu {
    display: flex;
    list-style: none;
    gap: 1.5rem;
    margin-top: 1rem;
}

    .menu a {
        font-weight: bold;
        color: #fff;
    }

.accessibility-buttons {
    margin-top: 1rem;
    display: flex;
    gap: 1rem;
}

    .accessibility-buttons button {
        padding: 0.5rem 1rem;
        font-size: 1rem;
    }

/* Main Layout */
main {
    padding: 2rem;
}

#search-form {
    display: flex;
    justify-content: center;
    gap: 10px;
    margin-bottom: 2rem;
}

#search-input {
    flex: 1;
    padding: 0.5rem;
    font-size: 1rem;
}

#search-form button {
    padding: 0.5rem 1rem;
    font-size: 1rem;
}

/* Results, Favourites, and History */
#results, #favouritesContainer, #historyContainer {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 1rem;
}

.card {
    background-color: #f8f8f8;
    padding: 1rem;
    border-radius: 10px;
    box-shadow: 0 0 8px rgba(0,0,0,0.1);
    cursor: pointer;
    transition: transform 0.2s;
    min-height: 500px; /* ✅ Prevents layout shift */
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}


    .card:hover {
        transform: scale(1.02);
    }

    .card img {
        width: 100%;
        height: auto;
        border-radius: 5px;
    }

    .card h3 {
        font-size: 1.1rem;
        margin: 0.5rem 0;
    }

    .card button {
        margin-top: 0.5rem;
        padding: 0.4rem;
        width: 100%;
    }

/* Footer */
footer {
    text-align: center;
    padding: 1rem;
    font-size: 0.9rem;
    background-color: #f0f0f0;
    margin-top: 3rem;
}

/* Dark Mode */
body.dark-mode {
    background-color: #121212;
    color: #e0e0e0;
}

    body.dark-mode header {
        background-color: #001f4d;
    }

    body.dark-mode .card {
        background-color: #1e1e1e;
        color: #ccc;
    }

    body.dark-mode footer {
        background-color: #1a1a1a;
        color: #999;
    }

/* High Contrast Mode */
body.high-contrast {
    background-color: #000;
    color: #fff;
}

    body.high-contrast a {
        color: yellow;
    }

    body.high-contrast header {
        background: #000;
    }

    body.high-contrast .card {
        background-color: #000;
        border: 2px solid #fff;
    }
