/* Main wrapper for the entire gallery shortcode output */
.adg-wrapper {
  margin: 20px 0;
  font-family: Arial, sans-serif;
  color: #fff; /* Default text color for the wrapper */
}

/* Filter buttons container */
.adg-filter {
  text-align: center;
  margin-bottom: 30px;
}

/* Individual filter buttons */
.adg-filter button {
  /* Changed from .filter-btn */
  background: #e8442d; /* New background color for inactive buttons */
  color: #fff;
  border: none;
  padding: 10px 20px; /* Adjusted padding from 8px 15px to match previous adg-filter */
  margin: 5px;
  border-radius: 0; /* No radius on buttons */
  cursor: pointer;
  transition: all 0.3s ease; /* Ensure transition is smooth */
  font-size: 1rem; /* Added for consistency */
  font-weight: bold; /* Added for consistency */
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1); /* Added for consistency */
}

/* Active and hover states for filter buttons */
.adg-filter button.active, /* Changed from .filter-btn.active */
.adg-filter button:hover {
  /* Changed from .filter-btn:hover */
  background: #2c5364; /* New background color for active/hover buttons */
  transform: translateY(-2px); /* Maintain hover effect */
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2); /* Maintain hover effect */
}

/* Gallery grid container */
.adg-gallery {
  /* Changed from .gallery-grid */
  display: grid;
  grid-template-columns: repeat(
    auto-fill,
    minmax(240px, 1fr)
  ); /* Adjusted minmax from 220px to 240px and gap from 20px to 25px to match previous adg-gallery */
  gap: 25px;
  justify-content: center;
  align-items: start;
}

/* Individual gallery item */
.adg-item {
  /* Changed from .gallery-item */
  background: #111927; /* Background color of the card */
  border-radius: 0; /* No radius on gallery items */
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.3); /* Added for consistency */
  overflow: hidden; /* Crucial for containing transformed images and overlays */
  position: relative; /* Essential for positioning the overlay */
  transition: opacity 0.4s ease, transform 0.4s ease, height 0.4s ease,
    padding 0.4s ease, margin 0.4s ease;
  min-height: 250px; /* Ensure a minimum height for items */
}

/* Make the entire item linkable */
.adg-link-wrapper {
  display: block;
  text-decoration: none;
  color: inherit;
  position: relative; /* For overlay positioning */
  height: 100%; /* Ensure link covers the entire item */
}

/* Container for image and its overlay */
.adg-image-container {
  position: relative;
  width: 100%;
  padding-top: 100%; /* Creates a 1:1 aspect ratio container for the image */
  overflow: hidden;
  border-radius: 0; /* Apply no radius to image container as well */
}

.adg-image-container img {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  object-fit: cover; /* Ensures image covers the area */
  display: block;
  transition: transform 0.3s ease; /* Smooth hover effect for image zoom */
}

/* Overlay for title and icon */
.adg-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(
    44,
    83,
    100,
    0.9
  ); /* Darker, slightly transparent background */
  color: #fff;
  display: flex;
  flex-direction: column; /* Stack icon, title, year vertically */
  align-items: center;
  justify-content: center;
  opacity: 0; /* Hidden by default */
  transition: opacity 0.3s ease; /* Smooth fade-in transition */
  padding: 20px;
  box-sizing: border-box;
  text-align: center;
  gap: 5px; /* Space between flex items */
}

/* Icon inside the overlay */
.adg-overlay-icon {
  font-size: 3em; /* Larger icon */
  margin-bottom: 5px; /* Reduced margin due to gap */
  color: #ff66c4; /* Pink color for icon */
}

/* Title inside the overlay */
.adg-overlay-title {
  font-size: 1.4em; /* Larger title */
  font-weight: bold;
  margin-bottom: 0; /* Rely on gap */
  line-height: 1.3;
}

/* Year inside the overlay */
.adg-overlay-year {
  font-size: 1em;
  color: #ddd; /* Slightly lighter text for year */
  margin-bottom: 5px;
}

/* Artist Link and Contact Number Styling */
.adg-overlay-link,
.adg-overlay-contact {
  font-size: 0.9em;
  color: #eee;
  display: flex;
  align-items: center;
  gap: 5px; /* Space between icon and text */
  text-decoration: none;
  transition: color 0.3s ease;
}

.adg-overlay-link:hover {
  color: #ff66c4;
}

.adg-overlay-link .dashicons,
.adg-overlay-contact .dashicons {
  font-size: 1em; /* Adjust Dashicon size */
  width: auto; /* Allow Dashicon to size naturally */
  height: auto;
}

/* Hover effect: zoom image and show overlay */
.adg-item:hover .adg-image-container img {
  transform: scale(1.1); /* Image zoom effect */
}

.adg-item:hover .adg-overlay {
  opacity: 1; /* Overlay becomes visible */
}

/* Hide class for filtering */
.adg-item.hide {
  /* Changed from .gallery-item.hide */
  opacity: 0;
  transform: scale(0.8);
  pointer-events: none;
  height: 0;
  padding: 0;
  margin: 0;
  overflow: hidden;
  transition: opacity 0.4s ease, transform 0.4s ease, height 0s 0.4s,
    padding 0s 0.4s, margin 0s 0.4s;
}

/* Messages for no post type or no posts found */
.adg-error-message,
.adg-no-posts {
  background-color: #ffe0e0;
  border: 1px solid #ff9999;
  color: #cc0000;
  padding: 15px;
  border-radius: 5px;
  text-align: center;
  margin: 20px 0;
}
