/* ==========================================================
   Overlay Image Grid Pro v2.5 – Final Frontend Styles
   ========================================================== */

/* --- Filter Bar (Centered, Clean Style) --- */
.oigp-filter-wrap {
  display: flex;
  justify-content: center;
  margin-bottom: 32px;
}

.oigp-filter {
  display: flex;
  gap: 20px;
  align-items: center;
  background: transparent;
  box-shadow: none;
  padding: 0;
  position: relative;
  z-index: 1000; /* ensures dropdowns stay on top */
}

/* --- Dropdown Styling --- */
.oigp-filter select {
  appearance: none;
  -webkit-appearance: none;
  background: #fff url("data:image/svg+xml;utf8,<svg fill='black' height='14' viewBox='0 0 24 24' width='14' xmlns='http://www.w3.org/2000/svg'><path d='M7 10l5 5 5-5z'/></svg>") no-repeat right 18px center;
  background-size: 14px;
  border: 1.5px solid #e1c78c;
  border-radius: 24px;
  font-size: 15px;
  font-weight: 500;
  color: #333;
  padding: 10px 45px 10px 18px;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.04);
  cursor: pointer;
  transition: all 0.3s ease;
  font-family: 'Poppins', sans-serif;
  position: relative;
  z-index: 1001;
  background-color: #fff;
}

.oigp-filter select:hover {
  border-color: #d7b56c;
  box-shadow: 0 4px 12px rgba(215, 181, 108, 0.2);
}

.oigp-filter select:focus {
  outline: none;
  border-color: #caa152;
  box-shadow: 0 0 0 3px rgba(215, 181, 108, 0.25);
}

/* --- Responsive filter alignment --- */
@media (max-width: 900px) {
  .oigp-filter {
    flex-direction: column;
    gap: 10px;
  }
}

/* --- Fix dropdown overlap on desktop --- */
#oigp-filter-month,
#oigp-filter-year {
  position: relative;
  z-index: 1001;
  background-color: #fff;
  cursor: pointer;
}

.oigp-grid {
  position: relative;
  z-index: 1;
}

/* ==========================================================
   Grid Layout
   ========================================================== */

.oigp-grid, 
#oigp-global-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 1.5rem;
  padding: 0;
}

/* --- Image Cards --- */
.oigp-card {
  position: relative;
  border-radius: 14px;
  overflow: hidden;
  height: 320px;
  background-size: cover;
  background-position: center;
  transition: transform 0.35s ease, box-shadow 0.35s ease;
  display: flex;
  align-items: flex-end;
  text-decoration: none;
  color: inherit;
  cursor: pointer;
}

/* --- Overlay Gradient --- */
.oigp-overlay {
  width: 100%;
  padding: 1.25rem;
  background: linear-gradient(to top, rgba(0,0,0,0.75), rgba(0,0,0,0.1));
  color: #fff;
  transition: background 0.35s ease;
}

/* --- Text Styling --- */
.oigp-title {
  font-size: 18px;
  font-weight: 600;
  margin: 0 0 6px;
  line-height: 1.4;
}

.oigp-subtitle {
  font-size: 15px;
  margin: 0;
  opacity: 0.9;
}

.oigp-date {
  font-size: 13px;
  margin-top: 6px;
  opacity: 0.8;
}

/* --- Hover Animations --- */
.oigp-card:hover {
  transform: translateY(-6px);
  box-shadow: 0 14px 28px rgba(0, 0, 0, 0.12);
}

.oigp-card:hover .oigp-overlay {
  background: linear-gradient(to top, rgba(0,0,0,0.85), rgba(0,0,0,0.2));
}

/* --- Hover Styles (Customizable) --- */
.oigp-hover-lift:hover {
  transform: translateY(-8px);
}

.oigp-hover-zoom:hover {
  transform: scale(1.04);
}

/* --- Responsive Adjustments --- */
@media (max-width: 768px) {
  .oigp-card {
    height: 280px;
  }
  .oigp-title {
    font-size: 16px;
  }
  .oigp-subtitle {
    font-size: 14px;
  }
  .oigp-date {
    font-size: 12px;
  }
}

/* ==========================================================
   Center Single Card Layout
   ========================================================== */

#oigp-global-grid {
  justify-items: center;
}

#oigp-global-grid .oigp-card {
  width: 100%;
  max-width: 360px;
}

#oigp-global-grid:has(.oigp-card:only-child) {
  display: flex;
  justify-content: center;
}

@media (max-width: 600px) {
  #oigp-global-grid .oigp-card {
    max-width: 100%;
  }
}

/* No results style */
#oigp-no-results { color:#666; font-size:16px; margin-top:18px; }
