/**
 * Stylesheet for Impact Windows & Doors Gallery Page
 *
 * @package FQRS_Theme
 */

.impact-gallery-page {
  background-color: #f8fafc;
  color: var(--color-navy-dark, #0F172A);
}

/* Hero Section */
.impact-gallery-hero {
  background: linear-gradient(135deg, #09101d 0%, #111e38 60%, #1e293b 100%);
  color: #ffffff;
  padding: 5rem 1.5rem 4rem;
  position: relative;
  overflow: hidden;
  border-bottom: 3px solid #E5A93C;
}

.impact-gallery-hero::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: radial-gradient(circle at 80% 20%, rgba(229, 169, 60, 0.12) 0%, transparent 60%);
  pointer-events: none;
}

.gallery-eyebrow {
  display: inline-block;
  font-family: var(--font-heading, 'Outfit', sans-serif);
  font-size: 0.85rem;
  font-weight: 700;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: #E5A93C;
  margin-bottom: 0.75rem;
}

.gallery-main-title {
  font-family: var(--font-heading, 'Outfit', sans-serif);
  font-size: clamp(2.2rem, 4vw, 3.2rem);
  font-weight: 800;
  color: #ffffff;
  line-height: 1.15;
  margin-bottom: 1.25rem;
}

.gallery-sub-lead {
  font-family: var(--font-body, 'Inter', sans-serif);
  font-size: 1.1rem;
  color: #cbd5e1;
  max-width: 820px;
  margin: 0 auto 1.75rem;
  line-height: 1.65;
}

.gallery-breadcrumb {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.9rem;
  color: #94a3b8;
}

.gallery-breadcrumb a {
  color: #e2e8f0;
  text-decoration: none;
  transition: color 0.2s ease;
}

.gallery-breadcrumb a:hover {
  color: #E5A93C;
}

.gallery-sep {
  color: #64748b;
}

.gallery-current {
  color: #E5A93C;
  font-weight: 600;
}

/* Filter Bar */
.impact-gallery-content-section {
  padding: 3.5rem 1.5rem 5rem;
}

.impact-gallery-filter-bar {
  display: flex;
  justify-content: center;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-bottom: 3rem;
}

.gallery-filter-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.75rem 1.4rem;
  border-radius: 9999px;
  border: 1px solid #cbd5e1;
  background-color: #ffffff;
  color: #1e293b;
  font-family: var(--font-heading, 'Outfit', sans-serif);
  font-size: 0.95rem;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
}

.gallery-filter-btn:hover {
  background-color: #f1f5f9;
  border-color: #94a3b8;
  transform: translateY(-2px);
}

.gallery-filter-btn.is-active {
  background-color: #0F172A;
  border-color: #0F172A;
  color: #ffffff;
  box-shadow: 0 4px 14px rgba(15, 23, 42, 0.25);
}

.gallery-filter-btn .filter-count {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  font-size: 0.75rem;
  font-weight: 800;
  background-color: #f1f5f9;
  color: #0F172A;
  transition: all 0.2s ease;
}

.gallery-filter-btn.is-active .filter-count {
  background-color: #E5A93C;
  color: #0F172A;
}

/* Gallery Grid */
.impact-gallery-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 2rem;
  margin-bottom: 4rem;
}

.gallery-card {
  background: #ffffff;
  border-radius: 14px;
  overflow: hidden;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.06);
  border: 1px solid #e2e8f0;
  display: flex;
  flex-direction: column;
  transition: transform 0.3s ease, box-shadow 0.3s ease, opacity 0.3s ease;
}

.gallery-card:hover {
  transform: translateY(-6px);
  box-shadow: 0 12px 30px rgba(15, 23, 42, 0.12);
}

.gallery-card.is-hidden {
  display: none !important;
}

.gallery-card-media {
  position: relative;
  width: 100%;
  padding-top: 85%; /* Proporción estética uniforme */
  background-color: #0f172a;
  overflow: hidden;
}

.gallery-card-img {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.5s ease;
}

.gallery-card:hover .gallery-card-img {
  transform: scale(1.05);
}

.gallery-card-badge {
  position: absolute;
  top: 1rem;
  left: 1rem;
  background: rgba(15, 23, 42, 0.85);
  backdrop-filter: blur(4px);
  color: #E5A93C;
  font-family: var(--font-heading, 'Outfit', sans-serif);
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  padding: 0.35rem 0.75rem;
  border-radius: 6px;
  border: 1px solid rgba(229, 169, 60, 0.3);
  z-index: 2;
}

.gallery-card-overlay {
  position: absolute;
  inset: 0;
  background: rgba(15, 23, 42, 0.6);
  opacity: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: opacity 0.3s ease;
  z-index: 3;
}

.gallery-card:hover .gallery-card-overlay {
  opacity: 1;
}

.gallery-zoom-trigger {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.65rem 1.25rem;
  background: #E5A93C;
  color: #0F172A;
  border: none;
  border-radius: 9999px;
  font-family: var(--font-heading, 'Outfit', sans-serif);
  font-size: 0.9rem;
  font-weight: 700;
  cursor: pointer;
  transition: background 0.2s ease, transform 0.2s ease;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.2);
}

.gallery-zoom-trigger:hover {
  background: #ffffff;
  transform: scale(1.05);
}

.gallery-card-body {
  padding: 1.5rem;
  display: flex;
  flex-direction: column;
  flex-grow: 1;
  background: #ffffff;
}

.gallery-card-title {
  font-family: var(--font-heading, 'Outfit', sans-serif);
  font-size: 1.15rem;
  font-weight: 700;
  color: #0F172A;
  margin-bottom: 0.5rem;
  line-height: 1.3;
}

.gallery-card-desc {
  font-family: var(--font-body, 'Inter', sans-serif);
  font-size: 0.9rem;
  color: #64748b;
  line-height: 1.55;
  margin: 0;
}

/* Bottom CTA Banner */
.gallery-bottom-cta-banner {
  background: linear-gradient(135deg, #0B132B 0%, #1E293B 100%);
  border-radius: 16px;
  padding: 3rem 2.5rem;
  border: 1px solid rgba(229, 169, 60, 0.3);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
}

.cta-inner-box {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 2rem;
  flex-wrap: wrap;
}

.cta-text-side {
  flex: 1 1 500px;
}

.cta-mini-tag {
  display: inline-block;
  font-family: var(--font-heading, 'Outfit', sans-serif);
  font-size: 0.75rem;
  font-weight: 800;
  letter-spacing: 0.12em;
  color: #E5A93C;
  margin-bottom: 0.5rem;
}

.cta-box-title {
  font-family: var(--font-heading, 'Outfit', sans-serif);
  font-size: clamp(1.5rem, 2.5vw, 2.1rem);
  font-weight: 800;
  color: #ffffff;
  margin-bottom: 0.5rem;
}

.cta-box-desc {
  font-family: var(--font-body, 'Inter', sans-serif);
  font-size: 1rem;
  color: #cbd5e1;
  margin: 0;
  line-height: 1.5;
}

.cta-btn-side {
  flex-shrink: 0;
}

.btn-gallery-cta {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 1rem 2rem;
  background: #E5A93C;
  color: #0F172A;
  font-family: var(--font-heading, 'Outfit', sans-serif);
  font-size: 1rem;
  font-weight: 800;
  border-radius: 8px;
  text-decoration: none;
  box-shadow: 0 4px 14px rgba(229, 169, 60, 0.4);
  transition: all 0.25s ease;
}

.btn-gallery-cta:hover {
  background: #d4952b;
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(229, 169, 60, 0.5);
  color: #0F172A;
}

/* Lightbox Modal */
.gallery-modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(11, 19, 43, 0.92);
  backdrop-filter: blur(8px);
  z-index: 999999;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 2rem 1.5rem;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease;
}

.gallery-modal-overlay.is-active {
  opacity: 1;
  pointer-events: auto;
}

.gallery-modal-dialog {
  position: relative;
  background: #0F172A;
  border-radius: 14px;
  border: 1px solid rgba(229, 169, 60, 0.3);
  max-width: 900px;
  width: 100%;
  max-height: 90vh;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.5);
  animation: modalZoom 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes modalZoom {
  from {
    transform: scale(0.92);
    opacity: 0;
  }
  to {
    transform: scale(1);
    opacity: 1;
  }
}

.gallery-modal-close {
  position: absolute;
  top: 1rem;
  right: 1rem;
  background: rgba(0, 0, 0, 0.6);
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 50%;
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #ffffff;
  cursor: pointer;
  z-index: 10;
  transition: all 0.2s ease;
}

.gallery-modal-close:hover {
  background: #E5A93C;
  color: #0F172A;
}

.gallery-modal-image-wrap {
  width: 100%;
  max-height: 65vh;
  background: #000000;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

.gallery-modal-img {
  max-width: 100%;
  max-height: 65vh;
  object-fit: contain;
}

.gallery-modal-caption {
  padding: 1.25rem 1.75rem;
  background: #0F172A;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.modal-caption-title {
  font-family: var(--font-heading, 'Outfit', sans-serif);
  font-size: 1.25rem;
  font-weight: 700;
  color: #ffffff;
  margin-bottom: 0.35rem;
}

.modal-caption-desc {
  font-family: var(--font-body, 'Inter', sans-serif);
  font-size: 0.95rem;
  color: #94a3b8;
  margin: 0;
}

@media (max-width: 768px) {
  .impact-gallery-grid {
    grid-template-columns: 1fr;
  }
  .impact-gallery-hero {
    padding: 3.5rem 1rem 2.5rem;
  }
  .gallery-bottom-cta-banner {
    padding: 2rem 1.5rem;
  }
}
