/**
 * Outreach & Education + GEORGE Technology Development Blocks
 * MASONRY MAGAZINE + MASONRY DESIGN Blocks
 * Feature blocks with background images and hero images
 */

/* ===== OUTREACH & EDUCATION BLOCK ===== */
.outreach-education-block {
  position: relative;
  overflow: hidden;
}

.outreach-education-block::before {
  content: '';
  position: absolute;
  inset: 0;
  z-index: 0;
  background-image: url('../img/outreach-education-bg.jpg');
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  
  /* Grayscale filter + low opacity for subtlety */
  filter: grayscale(100%) blur(2px);
  opacity: 0.25;
  
  /* Radial gradient mask */
  -webkit-mask-image: radial-gradient(
    ellipse 80% 70% at center,
    rgba(0,0,0,0.05) 0%,
    rgba(0,0,0,0.2) 30%,
    rgba(0,0,0,0.6) 70%,
    rgba(0,0,0,0.9) 100%
  );
  mask-image: radial-gradient(
    ellipse 80% 70% at center,
    rgba(0,0,0,0.05) 0%,
    rgba(0,0,0,0.2) 30%,
    rgba(0,0,0,0.6) 70%,
    rgba(0,0,0,0.9) 100%
  );
  
  transition: opacity 0.8s ease-in-out, filter 0.8s ease-in-out;
}

/* GEORGE Technology Block */
.george-tech-block {
  position: relative;
  overflow: hidden;
}

.george-tech-block::before {
  content: '';
  position: absolute;
  inset: 0;
  z-index: 0;
  background-image: url('../img/george-tech-bg.jpg');
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  
  /* Grayscale filter + low opacity for subtlety */
  filter: grayscale(100%) blur(2px);
  opacity: 0.25;
  
  /* Radial gradient mask */
  -webkit-mask-image: radial-gradient(
    ellipse 80% 70% at center,
    rgba(0,0,0,0.05) 0%,
    rgba(0,0,0,0.2) 30%,
    rgba(0,0,0,0.6) 70%,
    rgba(0,0,0,0.9) 100%
  );
  mask-image: radial-gradient(
    ellipse 80% 70% at center,
    rgba(0,0,0,0.05) 0%,
    rgba(0,0,0,0.2) 30%,
    rgba(0,0,0,0.6) 70%,
    rgba(0,0,0,0.9) 100%
  );
  
  transition: opacity 0.8s ease-in-out, filter 0.8s ease-in-out;
}

/* Ensure content stays above background */
.outreach-education-block .feature-block-text,
.george-tech-block .feature-block-text {
  position: relative;
  z-index: 1;
}

/* Theme-aware blending for Outreach block */
:root[data-bs-theme="light"] .outreach-education-block::before {
  mix-blend-mode: multiply;
  opacity: 0.2;
}

:root[data-bs-theme="dark"] .outreach-education-block::before {
  mix-blend-mode: overlay;
  opacity: 0.3;
}

/* Theme-aware blending for GEORGE block */
:root[data-bs-theme="light"] .george-tech-block::before {
  mix-blend-mode: multiply;
  opacity: 0.2;
}

:root[data-bs-theme="dark"] .george-tech-block::before {
  mix-blend-mode: overlay;
  opacity: 0.3;
}

/* Hero image container styling */
.feature-hero-image {
  width: 100%;
  max-width: 100%;
  margin-top: 1.5rem;
}

.feature-hero-image img {
  width: 100%;
  height: auto;
  border-radius: 0.75rem;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.feature-hero-image img:hover {
  transform: translateY(-4px);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.15);
}

/* Dark mode hero image adjustments */
:root[data-bs-theme="dark"] .feature-hero-image img {
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
}

:root[data-bs-theme="dark"] .feature-hero-image img:hover {
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.4);
}

/* Reduced motion support */
@media (prefers-reduced-motion: reduce) {
  .outreach-education-block::before,
  .george-tech-block::before {
    transition: none !important;
    animation: none !important;
  }
  
  .feature-hero-image img {
    transition: none !important;
  }
  
  .feature-hero-image img:hover {
    transform: none;
  }
}

/* Responsive adjustments */
@media (max-width: 991.98px) {
  .feature-hero-image {
    margin-top: 1.25rem;
  }
  
  .feature-hero-image img {
    border-radius: 0.5rem;
  }
}

@media (max-width: 767.98px) {
  .feature-hero-image {
    margin-top: 1rem;
  }
}

/* ===== MASONRY MAGAZINE & MASONRY DESIGN BLOCKS ===== */

/* MASONRY MAGAZINE Block */
.masonry-magazine-block {
  position: relative;
  overflow: hidden;
}

.masonry-magazine-block::before {
  content: '';
  position: absolute;
  inset: 0;
  z-index: 0;
  background-image: url('../img/masonry-magazine-bg.jpg');
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  
  /* Grayscale filter + low opacity for subtlety */
  filter: grayscale(100%) blur(2px);
  opacity: 0.25;
  
  /* Radial gradient mask */
  -webkit-mask-image: radial-gradient(
    ellipse 80% 70% at center,
    rgba(0,0,0,0.05) 0%,
    rgba(0,0,0,0.2) 30%,
    rgba(0,0,0,0.6) 70%,
    rgba(0,0,0,0.9) 100%
  );
  mask-image: radial-gradient(
    ellipse 80% 70% at center,
    rgba(0,0,0,0.05) 0%,
    rgba(0,0,0,0.2) 30%,
    rgba(0,0,0,0.6) 70%,
    rgba(0,0,0,0.9) 100%
  );
  
  transition: opacity 0.8s ease-in-out, filter 0.8s ease-in-out;
}

/* MASONRY DESIGN Block */
.masonry-design-block {
  position: relative;
  overflow: hidden;
}

.masonry-design-block::before {
  content: '';
  position: absolute;
  inset: 0;
  z-index: 0;
  background-image: url('../img/masonry-design-bg.jpg');
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  
  /* Grayscale filter + low opacity for subtlety */
  filter: grayscale(100%) blur(2px);
  opacity: 0.25;
  
  /* Radial gradient mask */
  -webkit-mask-image: radial-gradient(
    ellipse 80% 70% at center,
    rgba(0,0,0,0.05) 0%,
    rgba(0,0,0,0.2) 30%,
    rgba(0,0,0,0.6) 70%,
    rgba(0,0,0,0.9) 100%
  );
  mask-image: radial-gradient(
    ellipse 80% 70% at center,
    rgba(0,0,0,0.05) 0%,
    rgba(0,0,0,0.2) 30%,
    rgba(0,0,0,0.6) 70%,
    rgba(0,0,0,0.9) 100%
  );
  
  transition: opacity 0.8s ease-in-out, filter 0.8s ease-in-out;
}

/* Ensure content stays above background */
.masonry-magazine-block .feature-block-text,
.masonry-design-block .feature-block-text {
  position: relative;
  z-index: 1;
}

/* Theme-aware blending for MASONRY MAGAZINE */
:root[data-bs-theme="light"] .masonry-magazine-block::before {
  mix-blend-mode: multiply;
  opacity: 0.2;
}

:root[data-bs-theme="dark"] .masonry-magazine-block::before {
  mix-blend-mode: overlay;
  opacity: 0.3;
}

/* Theme-aware blending for MASONRY DESIGN */
:root[data-bs-theme="light"] .masonry-design-block::before {
  mix-blend-mode: multiply;
  opacity: 0.2;
}

:root[data-bs-theme="dark"] .masonry-design-block::before {
  mix-blend-mode: overlay;
  opacity: 0.3;
}

/* Hero image at TOP (above title) styling */
.feature-hero-image-top {
  width: 100%;
  max-width: 100%;
  margin-bottom: 1.5rem;
}

.feature-hero-image-top img {
  width: 100%;
  height: auto;
  border-radius: 0.75rem;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.feature-hero-image-top img:hover {
  transform: translateY(-4px);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.15);
}

/* Dark mode hero image adjustments */
:root[data-bs-theme="dark"] .feature-hero-image-top img {
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
}

:root[data-bs-theme="dark"] .feature-hero-image-top img:hover {
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.4);
}

/* Reduced motion support for magazine blocks */
@media (prefers-reduced-motion: reduce) {
  .masonry-magazine-block::before,
  .masonry-design-block::before {
    transition: none !important;
    animation: none !important;
  }
  
  .feature-hero-image-top img {
    transition: none !important;
  }
  
  .feature-hero-image-top img:hover {
    transform: none;
  }
}

/* Responsive adjustments for top hero images */
@media (max-width: 991.98px) {
  .feature-hero-image-top {
    margin-bottom: 1.25rem;
  }
  
  .feature-hero-image-top img {
    border-radius: 0.5rem;
  }
}

@media (max-width: 767.98px) {
  .feature-hero-image-top {
    margin-bottom: 1rem;
  }
}
