*, *::before, *::after {
    box-sizing: border-box;
    margin: 1px;
    padding: 1px;
}

body {
    font-family: spinstee, magicalnight, ayuma, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    background-image: url("/dArtpagefiles/gallerybackground.jpg");
    background-repeat: no-repeat;
    background-size: cover;
    background-attachment: fixed;
    color: #222;
    line-height: 1.5;
}

.mobile-divider {
    display: none;
}

a {
    color: #6d4bbf;
    text-decoration: none;
}

a:hover {
    text-decoration: underline;
}

    /* ====== LAYOUT WRAPPER ====== */
.page {
    max-width: 1400px; /* more space for grid */
    margin: 0 auto;
    padding: 0 1rem 2rem;
    display: flex;
    flex-direction: column;
}

    /* ====== TOP NAV (EXTERNAL LINKS) ====== */
.top-nav {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    padding: 0.75rem 0;
    border-bottom: 1px solid #e0d7ff;
    gap: 0.75rem;
}

.site-title {
    font-family: "magicalnight";
    color: black;
    font-weight: 700;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    font-size: 1.5rem;
}

.top-nav-links {
    font-family: "magicalnight";
    text-transform: uppercase;
    color: black;
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
    font-size: 1.5rem;
}

.top-nav-links a {
    color: black;
    padding: 0.4rem 0.75rem;
    border-radius: 999px;
    background: #F5DFF5;
    border: 1px solid #e0d7ff;
    white-space: nowrap;
}

.top-nav-links a:hover {
    background: #e6dcff;
}

/* ====== MAIN LAYOUT (SIDE NAV + CONTENT) ====== */
.layout {
    display: flex;
    margin-top: 1.25rem;
    gap: 1.5rem;
}

 /* ====== SIDE NAV (INTERNAL PAGES) ====== */
.side-nav {
    flex: 0 0 130px; /* was 180px */
    border-right: 1px solid #e0d7ff;
    padding-right: 1rem;
}

.side-nav-title {
    font-family: "magicalnight";
    font-size: 2rem;
    text-transform: uppercase;  
    opacity: 0.7;
    margin-bottom: 0.75rem;
}

.side-nav ul {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 0.4rem;
    font-size: 1.7rem;
}

.side-nav a {
    display: block;  
    color: black;
    padding: 0.4rem 0.75rem;
    border-radius: 999px;
    background: #daeef5;
    border: 1px solid #e0d7ff;
    white-space: nowrap;
}

.side-nav a:hover {
    background: #f2ebff;
}

 /* ====== MAIN CONTENT ====== */
    main {
      flex: 1;
      min-width: 0;
    }

    .page-header {
        font-size: 1.5rem;
      margin-bottom: 1rem;
    }

    .page-header h1 {
        font-family: "ayuma";
      font-size: 2.5rem;
      
    }

    .page-header p {
      font-size: 1.5rem;
      color: #555;
    }

    /* ====== IMAGE GRID ====== */
.image-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr); /* 4 columns desktop */
  gap: 0.8rem;
}

.image-grid figure {
  position: relative;
}

.image-grid figure.wide {
  grid-column: span 2;
}

.image-grid figure:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 18px rgba(0, 0, 0, 0.06);
}

.image-grid img {
  width: 100%;
  height: 300px;     /* or 200px, 250px — choose the thumbnail height you want */
  object-fit: cover; /* fills the space without distortion */
  display: block;
}

    /* ====== LIGHTBOX / POPUP IMAGE ====== */
.lightbox-backdrop {
    position: fixed;
    inset: 0;
    background: rgba(10, 0, 40, 0.75);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 1000;
}

.lightbox-backdrop.open {
    display: flex;
}

.lightbox-content {
    position: relative;
    max-width: 90vw;
    max-height: 90vh;
}

.lightbox-img {
  display: block;
  max-width: 90vw;
  max-height: 90vh;
  width: auto;
  height: auto;
  border-radius: 0.75rem;
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.5);
  background: #000;
  object-fit: contain; /* ensures full image stays visible */
}

.lightbox-close {
    position: absolute;
    top: -2.2rem;
    right: 0;
    background: #fff;
    color: #333;
    border: none;
    border-radius: 999px;
    padding: 0.25rem 0.7rem;
    cursor: pointer;
    font-size: 0.8rem;
    font-weight: 600;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.3);
}

.lightbox-close:hover {
    background: #f2ebff;
}


/* ====== RESPONSIVE STYLES ====== */
@media (max-width: 700px) {
    body {
    background-image: url("https://i.pinimg.com/736x/74/dd/cf/74ddcfed143ab9c0720a3b274953a398.jpg");
    background-repeat: repeat;
    background-size: auto;
    background-attachment: fixed;
    }
    .top-nav {
    order: 2;
    }
    .layout {
    order: 1;
    }

    footer {
    order: 3;
    }
        
        
    .layout {
    gap: 1rem;
    }

    .side-nav {
    flex: 0 0 150px;
    }

    .image-grid {
    grid-template-columns: repeat(2, 1fr);
    }

    .image-grid img {
    height: 200px;   /* MOBILE VERSION: shorter height so it doesn’t cut off too much */
    object-fit: cover;
    }
}

@media (max-width: 700px) {
    .layout {
    flex-direction: column;
    }

    .side-nav {
    border-right: none;
    border-bottom: 1px solid #e0d7ff;
    padding-bottom: 0.75rem;
    }

    .side-nav ul {
    flex-direction: row;
    flex-wrap: wrap;
    gap: 0.35rem;
    }

    .image-grid {
    grid-template-columns: repeat(2, 1fr);
    }

    .image-grid img {
    height: 200px;   /* MOBILE VERSION: shorter height so it doesn’t cut off too much */
    object-fit: cover;
    }
}

