@import url(https://fonts.googleapis.com/css?family=Gilda Display);

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

body {
    font-family: 'Gilda Display', serif;
    background: #e1e2ed;
    min-height: 100vh;
    overflow-x: hidden;
    cursor: url("Images/cursor_default.png"), auto;
}

.container {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    padding: 100px 100px;
    margin-left: auto;
    margin-right: auto;
}

.content {
    text-align: center;
}

h1 {
    color: #3d3ea0;
    font-size: 2rem;
    margin-bottom: 40px;
}

h2 {
    color: #e1e2ed;
    font-size: 1.8rem;
    margin-bottom: 20px;
}

.page-header {
    max-width: 1600px;
    width: 100%;
    height: fit-content;
    top: 0;
    margin-bottom: 15em;
}

.page-header h1 {
    text-align: left;
    font-size: 2.5rem;
    width: fit-content;
    display: inline;
    float: left;
}

/*-----------------------------------------------------------------*/

 /* Dropdown Button */
.filter-button {
  color: #3d3ea0;
  padding: 16px;
  font-size: 1.5em;
  border: none;
  cursor: url("Images/cursor_hover.png"), auto;
  align-items: center;
  justify-content: right;
  background-color: transparent;
  padding: 0;
  display: flex;
  width: 230px;

  font-family: 'Gilda Display', serif;
  font-weight: 600;
}

.filter-icon {
    width: 1.5em;
    height: 1.5em;
    margin-left: 0.5em;
}

/* The container <div> - needed to position the dropdown content */
.dropdown {
  position: relative;
  display: block;
  float: right;
}

/* Dropdown Content (Hidden by Default) */
.dropdown-content {
  display: none;
  position: absolute;
  background-color: transparent;
  min-width: 230px;
  border: none;
  z-index: 1;
  text-align: right;
}

/* Links inside the dropdown */
.dropdown-content a {
  color: #3d3ea0;
  padding: 6px 16px;
  text-decoration: none;
  display: block;
  font-size: 1.25em;
  font-family: 'Gilda Display', serif;
}

/* Change color of dropdown links on hover */
.dropdown-content a:hover {
    text-decoration: underline;
    cursor: url("Images/cursor_hover.png"), auto;
}

/* Show the dropdown menu (use JS to add this class to the .dropdown-content container when the user clicks on the dropdown button) */
.show {display:block;} 

/*-----------------------------------------------------------------*/

.image-grid {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    column-gap: 10em;
    row-gap: 5em;
    max-width: 1600px;
    width: 100%;
    margin: 0;
    height: fit-content;
}

.grid-item {
    aspect-ratio: 1;
    overflow: hidden;
    position: relative;
    cursor: url("Images/cursor_hover.png"), auto;
}

.grid-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: opacity 0.3s ease;
}

.hover-label {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    color: #3d3ea0;
    padding: 4px 8px 6px 8px;
    font-size: 1rem;
    font-weight: 800;
    background-color: #e1e2ed;
    transition: opacity 0.3s ease;
    text-align: left;
    opacity: 0;
}

.grid-item:hover .hover-label {
    opacity: 1;
}

/* Project Gallery Wrapper - in-flow, spans all grid columns */
.project-gallery-wrapper {
    grid-column: 1 / -1;
    /* bleed out to full viewport width while staying in grid flow */
    width: 100vw;
    margin-left: calc(-1 * (100vw - 100%) / 2);
    overflow: hidden;
    /* collapsed by default */
    max-height: 0;
    opacity: 0;
    transition: max-height 0.5s ease, opacity 0.4s ease;
}

.project-gallery-wrapper.open {
    max-height: 70vh; /* generous upper-bound; actual size driven by content */
    opacity: 1;
}

/* Project Gallery Container */
.project_gallery_container {
    width: 100%;
    background-color: #e1e2ed;
    padding: 25px 60px 50px 60px;
    box-sizing: border-box;
    display: none;
}

.project_gallery_container.active {
    display: block;
}

/* --- Header: title + meta table --- */
.gallery-header {
    margin-bottom: 36px;
    text-align: left;
}

.gallery-header h2 {
    color: #3d3ea0;
    font-size: 2.2rem;
    margin-bottom: 12px;
    font-weight: 600;
}

.gallery-meta {
    display: table;
    text-align: left;
}

.gallery-meta-row {
    display: table-row;
}

.gallery-meta-row span {
    display: table-cell;
    color: #3d3ea0;
    font-size: 1.25rem;
    padding-right: 80px;
    padding-bottom: 4px;
    font-family: Arial, Helvetica, sans-serif;
}

/* --- Horizontal scroll row: images & text blocks side by side --- */
.gallery-scroll-row {
    display: flex;
    align-items: normal;
    gap: 30px;
    overflow-x: scroll;
    overflow-y: hidden;
    padding-bottom: 1em;
    scroll-behavior: smooth;
    height: 55vh;
}

.gallery-scroll-row::-webkit-scrollbar {
    height: 6px;
}

.gallery-scroll-row::-webkit-scrollbar-track {
    background: #e1e2ed;
    border-radius: 3px;
}

.gallery-scroll-row::-webkit-scrollbar-thumb {
    background: #3d3ea0;
    border-radius: 3px;
}

.gallery-scroll-row::-webkit-scrollbar-thumb:hover {
    background: #3d3ea0;
}

/* Images inside the scroll row */
.gallery-scroll-row img {
    height: 100%;
    width: auto;
    object-fit: cover;
    flex-shrink: 0;
}

/* Text blocks inside the scroll row */
.gallery-text-block {
    flex-shrink: 0;
    width: 300px;
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    padding-top: 10px;
    text-align: left;
    font-family: Arial, Helvetica, sans-serif;
}

.gallery-text-block h3 {
    color: #3d3ea0;
    font-size: 1.5rem;
    font-weight: 700;
    margin-bottom: 12px;
    line-height: 1.3;
}

.gallery-text-block p {
    color: #3d3ea0;
    font-size: 1.15rem;
    line-height: 1.6;
    margin-bottom: 14px;
}

/* Close button */
.close-btn {
    position: relative;
    float: right;
    background: none;
    border: none;
    color: #3d3ea0;
    font-size: 1.8rem;
    cursor: url("Images/cursor_hover.png"), auto;
    padding: 0;
    width: 40px;
    height: 40px;
    display: block;
    align-items: center;
    justify-content: center;
    transition: transform 0.2s ease;
    z-index: 10;
}

.close-btn:hover {
    transform: scale(1.1);
}

/* Responsive design */
@media (max-width: 1024px) {
    .image-grid {
        grid-template-columns: repeat(3, 1fr);
        gap: 60px;
    }
    
    .container {
        padding: 60px 60px;
    }

    .project_gallery_container {
        padding: 50px 40px 50px 40px;
    }
}

@media (max-width: 768px) {
    .image-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 50px;
    }
    
    h1 {
        font-size: 2rem;
    }
    
    .hover-label {
        font-size: 0.9rem;
        padding: 10px;
    }
    
    .container {
        padding: 40px 40px;
    }
    
    .project_gallery_container {
        padding: 40px 30px 40px 30px;
    }

    .gallery-header h2 {
        font-size: 1.8rem;
    }

    .gallery-scroll-row {
        height: 45vh;
    }

    .gallery-text-block {
        width: 220px;
    }
}

@media (max-width: 480px) {
    .image-grid {
        grid-template-columns: 1fr;
        gap: 40px;
    }
    
    h1 {
        font-size: 1.5rem;
        margin-bottom: 30px;
    }
    
    .hover-label {
        font-size: 0.85rem;
        padding: 8px;
    }
    
    .container {
        padding: 30px 20px;
    }
    
    .project_gallery_container {
        padding: 30px 20px 30px 20px;
    }

    .gallery-header h2 {
        font-size: 1.5rem;
    }

    .gallery-scroll-row {
        height: 40vh;
        gap: 20px;
    }

    .gallery-text-block {
        width: 180px;
    }

    .gallery-text-block p {
        font-size: 0.85rem;
    }
    
    .close-btn {
        font-size: 1.5rem;
        width: 35px;
        height: 35px;
    }
}
