/* style.css (Definitive Version) */

/* General Setup */
:root {
    --primary-bg: #ffffff;
    --secondary-bg: #f7f7f7;
    --text-color: #333333;
    --accent-color: #007bff;
    --border-color: #dddddd;
    --shadow-color: rgba(0, 0, 0, 0.1);
}

body {
    font-family: 'Inter', sans-serif;
    margin: 0;
    background-color: var(--primary-bg);
    color: var(--text-color);
    line-height: 1.6;
}

header, footer, main {
    max-width: 1200px;
    margin: 0 auto;
    padding: 1rem 2rem;
}

header {
    text-align: center;
    border-bottom: 1px solid var(--border-color);
    padding-bottom: 1rem;
    margin-top: 1rem;
}

h1 { margin: 0; }
h3 { margin: 0 0 0.25rem; }
a { text-decoration: none; color: var(--accent-color); }
a:hover { text-decoration: underline; }

header p { margin: 0.25rem 0 0; color: #777; }
footer { text-align: center; margin-top: 2rem; padding: 1.5rem; font-size: 0.9rem; color: #888; }

/* Main Grid Layout */
#gallery-container, #photo-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 1.5rem;
    padding-top: 2rem;
}

/* The clickable card link */
.gallery-card, .photo-card, .sub-gallery-card {
    display: block;
    color: var(--text-color);
    text-decoration: none;
}

/* The white frame container */
.thumbnail-frame {
    background-color: white;
    border-radius: 8px;
    box-shadow: 0 4px 12px var(--shadow-color);
    transition: transform 0.2s ease-in-out, box-shadow 0.2s ease-in-out;
    aspect-ratio: 1 / 1;
    position: relative;
    overflow: hidden;
    width: 100%;
}

.gallery-card:hover .thumbnail-frame, .photo-card:hover .thumbnail-frame, .sub-gallery-card:hover .thumbnail-frame {
    transform: translateY(-5px);
    box-shadow: 0 8px 20px rgba(0,0,0,0.15);
}

/* The image inside the frame */
.thumbnail-frame img {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    max-width: 90%;
    max-height: 90%;
    width: auto;
    height: auto;
    object-fit: contain; /* Failsafe, though max-width/height should handle it */
}

/* The info text below the frame */
.gallery-card .info, .photo-card .info, .sub-gallery-card .info {
    padding: 0.75rem 0.25rem;
}
.photo-card .info .title { font-weight: bold; }


/* Single Photo Page */
.single-photo-view img {
    max-width: 100%;
    height: auto;
    border-radius: 8px;
    display: block;
    margin: 0 auto;
}
.photo-details {
    margin-top: 1rem;
    padding: 1rem;
    background-color: var(--secondary-bg);
    border-radius: 8px;
}