:root {
    --bg-color: #ffffff;
    --text-color: #000000;
    --secondary-text: #666666;
    --accent-color: #f9f9f9;
    --border-color: #eeeeee;
    --font-header: 'Inter', sans-serif;
    --font-body: 'Playfair Display', serif;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    background-color: var(--bg-color);
    color: var(--text-color);
    font-family: var(--font-header);
    line-height: 1.6;
    overflow-x: hidden;
}

html {
    scroll-behavior: smooth;
}

/* --- Utility --- */
.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border-width: 0;
}

/* --- Animations --- */
.fade-in {
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.6s ease-out, transform 0.6s ease-out;
    will-change: opacity, transform;
}

.fade-in.visible {
    opacity: 1;
    transform: translateY(0);
}

a {
    text-decoration: none;
    color: inherit;
    transition: opacity 0.3s ease;
}

a:hover {
    opacity: 0.7;
}

/* --- Layout --- */
header {
    padding: 2rem 4rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    /* Vertically center */
}

.logo {
    font-size: 1.5rem;
    font-weight: 700;
    letter-spacing: 0.1em;
    text-transform: uppercase;
}

/* --- Navigation (Drawer) --- */
.primary-navigation {
    list-style: none;
    position: fixed;
    z-index: 1000;
    top: 0;
    bottom: 0;
    right: 0;
    width: 70%;
    max-width: 400px;
    background: rgba(255, 255, 255, 0.98);
    display: flex;
    flex-direction: column;
    padding: min(20vh, 8rem) 2rem;
    gap: 1.5rem;
    transform: translateX(100%);
    transition: transform 0.5s ease-in-out;
    box-shadow: -10px 0 30px rgba(0, 0, 0, 0.1);
}

.primary-navigation[data-visible="true"] {
    transform: translateX(0%);
}

.primary-navigation li a {
    font-family: var(--font-body);
    font-size: 1.5rem;
    font-style: italic;
    display: block;
    color: var(--text-color);
}


main {
    padding: 0 4rem 4rem 4rem;
}

/* --- Masonry Grid --- */
/* --- Masonry Grid --- */
.gallery-grid {
    column-count: 3;
    column-gap: 2rem;
    width: 100%;
}

.gallery-item {
    position: relative;
    overflow: hidden;
    margin-bottom: 2rem;
    break-inside: avoid;
    /* Prevent items from splitting across columns */
    display: inline-block;
    /* Ensures correct stacking */
    width: 100%;
}

@media (min-width: 1500px) {
    .gallery-grid {
        column-count: 4;
    }
}

@media (max-width: 768px) {
    .gallery-grid {
        column-count: 2;
    }
}

@media (max-width: 480px) {
    .gallery-grid {
        column-count: 1;
    }
}

.gallery-item img {
    width: 100%;
    height: auto;
    display: block;
    transition: transform 0.6s cubic-bezier(0.25, 1, 0.5, 1);
}

.gallery-item:hover img {
    transform: scale(1.02);
}

.gallery-item .caption {
    margin-top: 0.5rem;
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: var(--secondary-text);
}

/* --- Admin Styles --- */
.admin-container {
    max-width: 800px;
    margin: 4rem auto;
    padding: 2rem;
    border: 1px solid var(--border-color);
}

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

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    font-size: 0.9rem;
    font-weight: 600;
}

.form-group input,
.form-group textarea,
.form-group select {
    width: 100%;
    padding: 0.8rem;
    border: 1px solid var(--border-color);
    background: var(--accent-color);
    font-family: inherit;
}

/* --- Quick Links --- */
.quick-links {
    display: flex;
    justify-content: flex-start;
    gap: 2rem;
    padding: 1rem 4rem;
    overflow-x: auto;
    white-space: nowrap;
    /* border-bottom: 1px solid var(--border-color); */
    margin-bottom: 0;
    scrollbar-width: none;
    /* Hide scrollbar for cleaner look */
}

.quick-links::-webkit-scrollbar {
    display: none;
}

.quick-links a {
    font-family: var(--font-body);
    font-style: italic;
    font-size: 1.1rem;
    color: var(--secondary-text);
    flex-shrink: 0;
}

.quick-links a.active {
    color: var(--text-color);
    font-weight: 700;
}

.btn {
    display: inline-flex;
    justify-content: center;
    align-items: center;
    padding: 0.8rem 2rem;
    background: var(--text-color);
    color: var(--bg-color);
    border: 1px solid var(--text-color);
    cursor: pointer;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    font-size: 0.8rem;
    font-weight: 600;
    transition: all 0.3s ease;
    font-family: var(--font-header);
    text-decoration: none;
}

.btn:hover {
    background: transparent;
    color: var(--text-color);
}

.btn-secondary {
    background: #f0f0f0;
    color: #333;
    border-color: #e0e0e0;
}

.btn-secondary:hover {
    background: #e0e0e0;
    color: #000;
    border-color: #d0d0d0;
}

.btn-danger {
    background: #fff;
    color: #d32f2f;
    border-color: #ef9a9a;
}

.btn-danger:hover {
    background: #d32f2f;
    color: white;
    border-color: #d32f2f;
}

.btn-sm {
    padding: 0.5rem 1rem;
    font-size: 0.75rem;
}

/* --- Responsive --- */
/* --- Responsive Navigation --- */
/* --- Responsive Navigation Toggle --- */
.mobile-nav-toggle {
    display: block;
    position: absolute;
    z-index: 2000;
    right: 3rem;
    /* Adjusted for desktop/global */
    top: 2.2rem;
    background: transparent;
    border: 0;
    width: 2rem;
    aspect-ratio: 1;
    cursor: pointer;
}

/* Hamburger Icon */
.mobile-nav-toggle:after {
    content: '';
    display: block;
    width: 100%;
    height: 2px;
    background: var(--text-color);
    box-shadow: 0 8px 0 var(--text-color), 0 -8px 0 var(--text-color);
    transition: all 0.3s ease;
}

.mobile-nav-toggle[aria-expanded="true"]:after {
    background: transparent;
    box-shadow: none;
    width: 30px;
    height: 30px;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 24 24' stroke-width='1.5' stroke='%23000000' class='w-6 h-6'%3E%3Cpath stroke-linecap='round' stroke-linejoin='round' d='M6 18L18 6M6 6l12 12' /%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: center;
}


@media (max-width: 768px) {
    .mobile-nav-toggle {
        right: 2rem;
        top: 2rem;
    }

    .primary-navigation {
        width: 100%;
        /* Full width on mobile */
        max-width: none;
        inset: 0 0 0 0;
        /* Cover all */
        padding-left: 3rem;
        /* Center alignment adjustment */
    }


    header {
        padding: 1.5rem;
        justify-content: space-between;
    }

    .logo {
        font-size: 1.1rem;
        max-width: calc(100% - 3rem);
        /* Leave space for hamburger menu */
        line-height: 1.2;
    }

    .quick-links {
        padding: 0.5rem 1.5rem;
        gap: 1.5rem;
        margin-bottom: 1rem;
    }

    main {

        padding: 1.5rem;
    }

    .gallery-grid {
        column-count: 2;
    }
}

@media (max-width: 480px) {
    .gallery-grid {
        column-count: 1;
    }
}

/* Lightbox */
.lightbox {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(255, 255, 255, 0.95);
    /* White overlay as requested */
    justify-content: center;
    align-items: center;
}

.lightbox.active {
    display: flex;
}

.lightbox-content {
    max-width: 90%;
    max-height: 90vh;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
    animation: fadeIn 0.3s ease;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: scale(0.95);
    }

    to {
        opacity: 1;
        transform: scale(1);
    }
}

/* Admin Reordering */
.admin-photo-list {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    gap: 1rem;
    margin-top: 2rem;
}

.admin-photo-item {
    position: relative;
    cursor: move;
    border: 1px solid var(--border-color);
    background: #fff;
    padding: 0.5rem;
}

.admin-photo-item img {
    width: 100%;
    height: 150px;
    object-fit: cover;
    display: block;
    margin-bottom: 0.5rem;
}

.admin-photo-item.dragging {
    opacity: 0.5;
    border: 2px dashed #000;
}

/* Separated delete-btn class merged into .btn-danger utility */


nav ul li a.active {
    font-weight: 700;
    text-decoration: underline;
    opacity: 1;
}

.lightbox-nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(255, 255, 255, 0.2);
    border: none;
    color: #333;
    font-size: 3rem;
    cursor: pointer;
    padding: 1rem;
    border-radius: 50%;
    transition: background 0.3s;
    user-select: none;
}

.lightbox-nav:hover {
    background: rgba(255, 255, 255, 0.8);
}

/* --- Footer --- */
footer {
    padding: 2rem;
    text-align: center;
    border-top: 1px solid var(--border-color);
    margin-top: auto;
    /* Push to bottom if content is short */
}

.footer-content p {
    font-size: 0.9rem;
    color: var(--secondary-text);
    font-family: var(--font-body);
    font-style: italic;
}