/* ZeeMaps World of Maps Gallery — plugin stylesheet.
   Canonical copy: Marketing repo, Gallery/zeemaps-gallery/gallery.css.
   Cards/background match the production blog (www.zeemaps.com/blog). */

/* Shortcode section wrapper (raw HTML gets no Gutenberg layout classes) */

.zmaps-gallery-section {
  max-width: 72rem;
  margin-left: auto;
  margin-right: auto;
  padding-left: 1.5rem;
  padding-right: 1.5rem;
}

/* Page background (only on pages containing the gallery hero) */

body:has(.zmaps-gallery-hero) {
  background-color: var(--ast-global-color-4, #F0F5FA);
}

/* Astra underlines all entry-content links on single pages; the gallery is a
   card UI, so keep links clean at rest (they still underline on hover) */

body:has(.zmaps-gallery-hero) .entry-content a:not(:hover) {
  text-decoration: none;
}

/* Overall hero */

.zmaps-gallery-hero {
  padding: 4rem 1.5rem 2.25rem;
}

.zmaps-gallery-hero h1 {
  margin-bottom: 0.75rem;
}

.zmaps-gallery-hero p {
  max-width: 48rem;
  margin-left: auto;
  margin-right: auto;
}

/* Search box — the hero form reuses Astra's sidebar search markup inside a
   .widget_search wrapper, so the theme's own widget rules give it the exact
   sidebar look (gray #fafafa field, 2px radius, magnifier icon inside).
   Here we only set the hero size and center the icon in the taller field. */

.zmaps-gallery-hero .zmaps-hero-search {
  max-width: 42rem;
  margin: 1.75rem auto 0;
}

.zmaps-gallery-hero .zmaps-hero-search .search-field,
.zmaps-gallery-hero .zmaps-hero-search .search-field:focus {
  height: 48px;
  font-size: 1rem;
}

.zmaps-gallery-hero .zmaps-hero-search .search-form button.ast-search-submit {
  top: 0;
  bottom: 0;
  display: flex;
  align-items: center;
}

/* Category buttons */

.zmaps-category-pills {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  margin: 1.5rem auto 2.5rem;
  gap: 0.75rem;
}

.zmaps-category-pills .wp-block-button__link {
  border-radius: 999px;
  padding: 0.5rem 1.1rem;
  font-size: 1.1rem;
  text-decoration: none;
}

/* Support strip below hero */

.zmaps-support-strip {
  max-width: 72rem;
  margin: 1.5rem auto 2.75rem;
  padding: 0.85rem 1.25rem;
  border-radius: 999px;
  background: var(--ast-global-color-5, #fff);
  box-shadow: 0px 6px 15px -2px rgba(16, 24, 40, 0.05);
  gap: 0.85rem 1.25rem;
  font-size: 1rem;
}

.zmaps-support-strip p {
  margin: 0;
}

.zmaps-support-strip a {
  text-decoration: none;
}

.zmaps-support-strip a:hover {
  text-decoration: underline;
}

.zmaps-support-strip .wp-block-buttons {
  margin: 0;
}

/* Strip button gets Astra's default button padding/font so it matches the
   help-card and CTA buttons exactly */

.zmaps-support-strip .wp-block-button__link {
  border-radius: 999px;
}

/* Section spacing */

.entry-content .wp-block-heading {
  margin-top: 2.25rem;
}

.entry-content h2.wp-block-heading {
  margin-bottom: 1.25rem;
}

/* Gallery grid */

.zmaps-gallery-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1.75rem;
  align-items: stretch;
  margin: 1.5rem 0 3.5rem;
}

/* Remove Gutenberg/Astra block-gap offsets inside the grid */

.zmaps-gallery-grid > * {
  margin-top: 0 !important;
  margin-block-start: 0 !important;
}

/* Gallery cards — blog article-card recipe */

.zmaps-gallery-card {
  height: 100%;
  margin-top: 0 !important;
  margin-block-start: 0 !important;
  border-radius: 6px;
  overflow: hidden;
  background: var(--ast-global-color-5, #fff);
  box-shadow: 0px 6px 15px -2px rgba(16, 24, 40, 0.05);
  transition: transform 160ms ease, box-shadow 160ms ease;
}

.zmaps-gallery-card:hover {
  transform: translateY(-0.15rem);
  box-shadow: 0px 10px 24px -2px rgba(16, 24, 40, 0.1);
}

.zmaps-gallery-card figure {
  margin: 0;
}

.zmaps-gallery-card img {
  width: 100%;
  aspect-ratio: 16 / 10;
  object-fit: cover;
  display: block;
}

/* Card text spacing */

.zmaps-gallery-card h3,
.zmaps-gallery-card .zmaps-gallery-card-description,
.zmaps-gallery-card .zmaps-gallery-card-category {
  padding-left: 1.5rem;
  padding-right: 1.5rem;
}

.zmaps-gallery-card h3 {
  font-size: 1.15rem;
  line-height: 1.3;
  margin: 1.1rem 0 0.5rem;
}

.zmaps-gallery-card h3 a {
  color: var(--ast-global-color-2, #1e293b);
  text-decoration: none;
}

.zmaps-gallery-card h3 a:hover {
  color: var(--ast-global-color-0, #046bd2);
  text-decoration: underline;
}

.zmaps-gallery-card-description {
  color: var(--ast-global-color-3, #334155);
  margin: 0 0 0.9rem;
  line-height: 1.55;
}

.zmaps-gallery-card-category {
  margin: 0 0 1.25rem;
  font-size: 0.82rem;
  font-weight: 700;
  color: var(--ast-global-color-0, #046bd2);
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

/* Help card */

.zmaps-help-card {
  margin: 2rem 0 4rem;
  padding: 2rem;
  border-radius: 6px;
  background: var(--ast-global-color-5, #fff);
  box-shadow: 0px 6px 15px -2px rgba(16, 24, 40, 0.05);
}

.zmaps-help-card h2 {
  margin-top: 0;
}

.zmaps-help-card .wp-block-buttons {
  margin-top: 1.25rem;
}

/* Bottom CTA */

.zmaps-gallery-cta {
  margin-top: 4rem;
  padding: 3rem 1.5rem;
  border-radius: 6px;
  background: var(--ast-global-color-5, #fff);
  box-shadow: 0px 6px 15px -2px rgba(16, 24, 40, 0.05);
}

.zmaps-gallery-cta h2 {
  margin-top: 0;
}

.zmaps-gallery-cta .wp-block-buttons {
  margin-top: 1.25rem;
}

/* Map-page CTA — plugin-rendered markup gets no Gutenberg layout classes,
   so provide the centering/flex the gallery scaffold gets from blocks.
   Map pages have a white background (no gallery hero), so the card is
   tinted blue — the inverse of the gallery's white-card-on-blue. */

.zmaps-map-cta {
  text-align: center;
  background: var(--ast-global-color-4, #F0F5FA);
}

.zmaps-map-cta .wp-block-buttons {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.75rem;
}

.zmaps-map-cta p.zmaps-explore-link {
  margin: 1.5rem 0 0;
}

/* p element in the selector outranks Astra's .ast-single-post .entry-content a
   underline rule regardless of stylesheet order */

.zmaps-map-cta p.zmaps-explore-link a {
  font-weight: 600;
  text-decoration: none;
}

.zmaps-map-cta p.zmaps-explore-link a:hover {
  text-decoration: underline;
}

/* Buttons */

.zmaps-gallery-cta .wp-block-button__link,
.zmaps-help-card .wp-block-button__link {
  border-radius: 999px;
  text-decoration: none;
}

/* Responsive layout */

@media (max-width: 1024px) {
  .zmaps-gallery-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .zmaps-support-strip {
    border-radius: 1.25rem;
  }
}

@media (max-width: 700px) {
  .zmaps-gallery-hero {
    padding-top: 3rem;
  }

  .zmaps-gallery-grid {
    grid-template-columns: 1fr;
    gap: 1.5rem;
  }

  .zmaps-support-strip {
    justify-content: flex-start;
    align-items: flex-start;
  }

  .zmaps-help-card,
  .zmaps-gallery-cta {
    padding: 1.5rem;
  }
}
