/**
 * Featured Highlight Block Styles
 *
 * @package ericville25
 */

/* Base mobile-first styles */
.featured-highlight-wrapper {
	width: 100%;
	position: relative;
	max-width: unset!important;
}

.featured-highlight {
  width: 100%;
  min-height: 200px;
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  position: relative;
  overflow: hidden;
  display: flex;
  align-items: center;
  cursor: pointer;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.featured-highlight-overlay {
  display: flex;
  flex-direction: column;
  justify-content: center;
  transition: all 200ms ease;
	max-width: var(--breakpoint-l);
	margin: 0 auto;
	padding: 4rem 0;
}

.featured-highlight-content {
    color: white;
	background: #0009;
	text-shadow: 0 0 5px 100% #000;
    max-width: 60%;
	padding: 2rem var(--page-gutter-l);
    z-index: 2;
    position: relative;
	transition: all 200ms ease;
}

.featured-highlight:hover .featured-highlight-overlay {
	transform: scale(1.05);
}

.featured-highlight-title {
	font-size: 24px;
	font-weight: bold;
	line-height: 1.4;
	margin: 0 0 10px 0;
	color: white;
    text-decoration: underline;
    text-decoration-thickness: 0;
	text-decoration-color: transparent;
	text-underline-offset: 2px;
    transition: all 200ms ease-in-out;
}
.featured-highlight:hover .featured-highlight-title {
	text-decoration-color: currentcolor;
	text-decoration-thickness: 3px;
	text-underline-offset: 3px;
}

.featured-highlight-description {
  font-size: 1.2rem;
  line-height: 1.4;
  margin: 0 0 15px 0;
  opacity: 0.95;
  color: white;
    font-weight: 200;
}

.featured-highlight-link {
  font-size: 1.2rem;
  text-decoration: underline;
  font-weight: 500;
  transition: opacity 0.3s ease;
  color: white;
    display: none;
}

.featured-highlight-clickable {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 3;
  text-decoration: none;
  color: transparent;
}

.screen-reader-text {
  position: absolute !important;
  width: 1px !important;
  height: 1px !important;
  padding: 0 !important;
  margin: -1px !important;
  overflow: hidden !important;
  clip: rect(0, 0, 0, 0) !important;
  white-space: nowrap !important;
  border: 0 !important;
}

@container (max-width: 900px) {
	.featured-highlight-content {
		max-width: 80%;
	}
}

@container (max-width: 700px) {
    .featured-highlight-overlay {
        background: #0009;
    }
    .featured-highlight:hover .featured-highlight-overlay {
        transform: none;
    }
    .featured-highlight-content {
		max-width: unset;
		padding: var(--page-gutter-s);
        background: transparent;
	}
    .featured-highlight:hover .featured-highlight-content {
        background: transparent;
        
    }
}

/* Container scaling - adapts to parent container */
.featured-highlight-wrapper {
  container-type: inline-size;
}

/* Container queries for responsive scaling */
@container (max-width: 400px) {
  .featured-highlight {
    min-height: 180px;
  }
}

/* Flexbox/Grid integration - when used in layouts */
.featured-highlight-wrapper {
  flex: 1;
  min-width: 0; /* Allows flex item to shrink below content size */
}

/* When used in a grid or flex layout with multiple items */
.featured-highlight-wrapper:only-child {
  width: 100%;
}

/* Fallback background for when no image is provided */
.featured-highlight:not([style*="background-image"]) {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
}
