/* Home page content styling */

.content-grid {
  grid-column: 1 / span 12;
  grid-row: 6;
  display: grid;
  grid-template-columns: repeat(12, 1fr);
  grid-template-rows: 30px 50px minmax(75px, auto) minmax(200px, auto) 20px 30px;
  align-content: center;
  justify-content: center;
  padding: 25px;
}

.header-text {
  font-family: var(--ff-title);
  font-size: 2rem;
  color: var(--clr-yellow);
  text-shadow: 3px 3px 4px rgba(0, 0, 0, 0.8);
  padding-left: 25px;
  grid-column: 1 / span 12;
  grid-row: 2;
  align-self: center;
}

.blurb-box {
  font-family: var(--ff-primary);
  color: var(--clr-white);
  padding-left: 25px;
  padding-right: 25px;
  grid-column: 1 / span 12;
  grid-row: 3;
  margin-top: 20px;
}

.slogan {
  font-family: var(--ff-title);
  grid-column: 1 / span 12;
  grid-row: 6;
  color: var(--clr-yellow);
  justify-self: center;
  letter-spacing: 0.1rem;
  font-size: 1.5rem;
  text-shadow: 3px 3px 4px rgba(0, 0, 0, 0.8);
}

.row {
  grid-column: 1 / span 12;
  grid-row: 4;
  justify-content: center;
  display: flex;
  flex-wrap: wrap;
  padding: 0 10px;
}

/* Create four equal columns that sits next to each other */
.column {
  flex: 25%;
  max-width: 25%;
  padding: 0 10px;
}

.column img {
  margin-top: 8px;
  vertical-align: middle;
  width: 100%;
  max-height: 100%;
  object-fit: cover;
  background-color: white;
  box-shadow: 10px 10px 17px 0 rgba(0, 0, 0, 1);
  padding: 10px;
  border-radius: 25px;
}

/* Filter dropdown styling - now sits in its own row */
/* Container that holds both filter and gallery - they will stack vertically */
.filter-and-gallery {
    grid-column: 1 / span 12;
    grid-row: 4;  /* only one row number for everything */
    display: flex;
    flex-direction: column;
    gap: 20px;    /* space between filter and gallery */
}

/* Filter dropdown styling */
.filter-container {
    font-family: var(--ff-primary);
    color: var(--clr-white);
    margin-left: 25px;  /* keep alignment with text */
}

.filter-container label {
    margin-right: 10px;
    font-weight: bold;
}

#categoryFilter {
    padding: 6px 12px;
    font-size: 1rem;
    border-radius: 8px;
    border: none;
    background-color: var(--clr-yellow);
    color: #000;
    cursor: pointer;
}
/* Gallery grid container */
/* Masonry container – JS will fill this with columns */
.masonry-container {
    position: relative;
    width: 100%;
}

/* Each column created by JS */
.masonry-column {
    float: left;
    width: 25%;          /* 4 columns on desktop */
    padding: 0 10px;
    box-sizing: border-box;
}

/* Clearfix */
.masonry-container::after {
    content: "";
    display: table;
    clear: both;
}

/* Gallery item styling */
.gallery-item {
    width: 100%;
    margin: 10px 0;     /* no vertical gap */
    transition: opacity 0.2s ease;
}

.gallery-item img {
    width: 100%;
    height: auto;
    display: block;
    background-color: white;
    box-shadow: 10px 10px 17px 0 rgba(0, 0, 0, 1);
    padding: 10px;
    border-radius: 25px;
    box-sizing: border-box;
}

/* Hide filter items */
.gallery-item.hide {
    display: none;
}

/* Responsive: 2 columns on tablets */
@media screen and (max-width: 780px) {
    .masonry-column {
        width: 50%;
    }
}

/* Responsive: 1 column on mobiles */
@media screen and (max-width: 400px) {
    .masonry-column {
        width: 100%;
    }
}

/* Filter transition effect (optional) */
.gallery-item {
    transition: opacity 0.2s ease;
}

.gallery-item.hide {
    display: none;
}
/* Media queries */

@media screen and (max-width: 780px) {
  .column {
    -ms-flex: 50%;
    flex: 50%;
    max-width: 50%;
  }
}

@media screen and (max-width: 400px) {
  .header-text {
    justify-self: center;
  }
  .column {
    -ms-flex: 100%;
    flex: 100%;
    max-width: 100%;
  }

  .slogan {
    letter-spacing: 0;
    font-size: 1.2rem;
  }
}
