/* Reset some basic styles */
* {
    box-sizing: border-box;
}

body {
    /* Use a modern, clean typeface and a soft background colour for a more
       polished feel. The pastel hue adds warmth without being
       distracting. */
    font-family: 'Helvetica Neue', Helvetica, Arial, sans-serif;
    margin: 0;
    padding: 0;
    color: #333;
    background-color: #f7f5fa;
    line-height: 1.6;
}

header {
    /* Create a subtle frosted glass effect for the header. This uses a
       translucent background with a blur to let the page content peek
       through and adds a gentle shadow for separation. */
    background: rgba(255, 255, 255, 0.85);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    padding: 1rem 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
    border-bottom: 1px solid rgba(0, 0, 0, 0.05);
}

header .logo h1 {
    margin: 0;
    font-size: 1.5rem;
    color: #222;
}

nav {
    display: flex;
    align-items: center;
}
nav a {
    margin-left: 0.5rem;
    text-decoration: none;
    color: #333;
    font-weight: 600;
    padding: 0.5rem 1rem;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.6);
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.05);
    transition: background-color 0.3s, transform 0.2s;
}

nav a:hover {
    background: rgba(255, 255, 255, 0.85);
    transform: translateY(-2px);
}

/* Hero section: contains a full-width image and overlay text */
.hero {
    position: relative;
    height: 60vh;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #333;
}

/* The background image for the hero section fills the container */
.hero-image {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    z-index: -1;
}

.hero .hero-text {
    background: rgba(255, 255, 255, 0.75);
    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);
    padding: 2rem;
    text-align: center;
    border-radius: 12px;
    max-width: 70%;
}

.hero h2 {
    margin: 0 0 0.5rem 0;
    font-size: 2rem;
}

.about, .gallery, .contact, .admin {
    padding: 2rem;
    max-width: 1100px;
    margin: 0 auto;
}

.about h2, .gallery h2, .contact h2, .admin h2 {
    margin-top: 0;
    font-size: 1.75rem;
    border-bottom: 2px solid #eee;
    padding-bottom: 0.5rem;
    color: #4d355d;
}

.gallery-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 1.5rem;
    margin-top: 1rem;
}

.gallery-item img {
    width: 100%;
    height: auto;
    border-radius: 12px;
    object-fit: cover;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.08);
    transition: transform 0.3s ease, filter 0.3s ease, box-shadow 0.3s ease;
}

.gallery-item img:hover {
    transform: scale(1.05);
    filter: brightness(1.05);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.15);
}

footer {
    background-color: #f8f8fb;
    text-align: center;
    padding: 1rem;
    border-top: 1px solid #eceaec;
    font-size: 0.9rem;
    color: #777;
}

/* Admin styles */
.admin-form {
    max-width: 700px;
    margin: 2rem auto;
    background-color: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);
    padding: 2rem;
    border-radius: 12px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.06);
}

.admin-form .form-group {
    margin-bottom: 1.5rem;
}

.admin-form label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: bold;
}

.admin-form input[type='file'] {
    width: 100%;
    padding: 0.3rem;
}

.admin-form textarea {
    width: 100%;
    padding: 0.5rem;
    border: 1px solid #ccc;
    border-radius: 4px;
    resize: vertical;
    font-family: inherit;
    font-size: 1rem;
}

.admin-form button {
    padding: 0.6rem 1.4rem;
    background-color: #6f4a87;
    color: #fff;
    border: none;
    border-radius: 999px;
    cursor: pointer;
    font-size: 1rem;
    transition: background-color 0.3s, transform 0.2s;
}

.admin-form button:hover {
    background-color: #7f5c97;
    transform: translateY(-2px);
}

.message {
    color: #0a6b02;
    font-weight: bold;
    margin-bottom: 1rem;
}

.note {
    font-size: 0.9rem;
    color: #555;
    margin-top: 1rem;
}

/* Item list styles used in the admin edit collection view */
.item-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.item-entry {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 1rem;
    background: rgba(255, 255, 255, 0.9);
    padding: 0.5rem 1rem;
    border-radius: 8px;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.05);
}

.item-entry .item-info {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.item-entry img {
    width: 60px;
    height: 60px;
    object-fit: cover;
    border-radius: 6px;
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.1);
}

.item-entry .item-actions {
    display: flex;
    gap: 0.5rem;
}

.item-entry .item-actions a,
.item-entry .item-actions button {
    padding: 0.4rem 0.8rem;
    font-size: 0.8rem;
    border-radius: 999px;
    text-decoration: none;
    cursor: pointer;
}

.item-entry .item-actions a {
    background-color: #6f4a87;
    color: #fff;
}

.item-entry .item-actions a:hover {
    background-color: #7f5c97;
}

.item-entry .item-actions button {
    background-color: #d9534f;
    color: #fff;
    border: none;
}

.item-entry .item-actions button:hover {
    background-color: #c64440;
}

/* Collection overview styles on the collections page */
.collection-overview {
    margin-bottom: 2rem;
    padding: 1.5rem;
    border-radius: 12px;
    background-color: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
    border: 1px solid rgba(0, 0, 0, 0.03);
}

.collection-overview h3 a {
    color: #333;
    text-decoration: none;
    transition: color 0.2s;
}

.collection-overview h3 a:hover {
    color: #666;
}

/* Optional: ensure preview images have hover effect */
.collection-preview .gallery-item img:hover {
    transform: scale(1.05);
    filter: brightness(1.1);
}

/* Login form styles */
.login {
    padding: 2rem;
    max-width: 600px;
    margin: 0 auto;
}

.login-form {
    background-color: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);
    padding: 2rem;
    border-radius: 12px;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.05);
}

.login-form .form-group {
    margin-bottom: 1.5rem;
}

.login-form label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: bold;
}

.login-form input[type='text'],
.login-form input[type='password'] {
    width: 100%;
    padding: 0.3rem;
}

.login-form button {
    padding: 0.6rem 1.4rem;
    background-color: #6f4a87;
    color: #fff;
    border: none;
    border-radius: 999px;
    cursor: pointer;
    font-size: 1rem;
    transition: background-color 0.3s, transform 0.2s;
}

.login-form button:hover {
    background-color: #7f5c97;
    transform: translateY(-2px);
}

.error {
    color: #b00020;
    font-weight: bold;
    margin-bottom: 1rem;
}

/* Modal styles for image preview */
.modal {
    display: none;
    position: fixed;
    z-index: 999;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.8);
    align-items: center;
    justify-content: center;
    padding: 2rem;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.modal.open {
    opacity: 1;
}

.modal-image {
    max-width: 90%;
    max-height: 80%;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
    margin-bottom: 1rem;
}

.modal .close {
    position: absolute;
    top: 1rem;
    right: 1.5rem;
    font-size: 2rem;
    color: #fff;
    cursor: pointer;
}

.modal-description {
    color: #fff;
    font-size: 1rem;
    text-align: center;
    max-width: 80%;
    margin: 0 auto;
}