/* Component-specific CSS - Bypass Tailwind for complex custom styling */

/* Image Block Styles - Simplified */

/* ============================================ */
/* GRID STYLES - STATIC WITH SMART ASPECT RATIOS */
/* ============================================ */
.image-grid-static {
  display: grid;
  grid-template-columns: repeat(var(--columns), 1fr);
  gap: 1rem;
  padding: 1rem;
  width: 100%;
  max-width: 100%;
  box-sizing: border-box;
}

.image-grid-item {
  position: relative;
  overflow: hidden;
  transition: all 0.3s ease;
  display: flex;
  align-items: center;
  justify-content: center;
  background: transparent;
  /* Height will be set dynamically by JavaScript based on column count */
}

.image-grid-item:hover {
  transform: translateY(-2px);
}

.image-grid-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  transition: transform 0.3s ease;
  display: block;
  background: transparent;
}

.image-grid-item:hover .image-grid-img {
  transform: scale(1.05);
}

.image-grid-caption {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  background: linear-gradient(transparent, rgba(0, 0, 0, 0.7));
  color: var(--web-neutral-text-high, #ffffff);
  padding: 1rem;
  opacity: 0;
  transition: opacity 0.3s ease;
}

.image-grid-item:hover .image-grid-caption {
  opacity: 1;
}

.image-grid-caption p {
  margin: 0;
  font-size: 0.875rem;
  line-height: 1.25rem;
}

/* ============================================ */
/* SLIDER STYLES - UNIFORM CONTAINERS */
/* ============================================ */
.image-slider {
  position: relative;
  overflow: hidden;
  border-radius: 0.5rem;
  background: transparent !important;
}

.image-slide {
  display: flex;
  transition: transform 0.5s ease-in-out;
  background: transparent !important;
}

.image-slide-page {
  width: 100%;
  flex-shrink: 0;
  background: transparent;
  display: flex;
  align-items: center;
  justify-content: center;
}

.image-slider-grid {
  display: flex;
  gap: 1rem;
  align-items: center;
  justify-content: center;
  width: 100%;
  padding: 0;
  background: transparent;
}

.image-slider-item {
  position: relative;
  overflow: hidden;
  transition: all 0.3s ease;
  display: flex;
  align-items: center;
  justify-content: center;
  background: transparent !important;
}

.image-slider-item:hover {
  transform: translateY(-2px);
}

.image-slider-img {
  width: auto;
  max-width: 100%;
  object-fit: contain;
  object-position: center;
  transition: transform 0.3s ease;
  display: block;
  background: transparent;
}

.image-slider-item:hover .image-slider-img {
  transform: scale(1.05);
}

.image-slider-caption {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  background: linear-gradient(transparent, rgba(0, 0, 0, 0.7));
  color: var(--web-neutral-text-high, #ffffff);
  padding: 1rem;
  opacity: 0;
  transition: opacity 0.3s ease;
}

.image-slider-item:hover .image-slider-caption {
  opacity: 1;
}

.image-slider-caption p {
  margin: 0;
  font-size: 0.875rem;
  line-height: 1.25rem;
}

/* ============================================ */
/* SLIDER FIT WIDTH MODE - PER-SLIDE HEIGHT */
/* ============================================ */
.image-slider-fit-width {
  position: relative;
  overflow: hidden;
  width: 100%;
  background: transparent !important;
  /* Height will be set dynamically by JavaScript based on current slide */
}

.image-slide-page-fit-width {
  width: 100%;
  flex-shrink: 0;
  background: transparent;
  display: block;
  height: auto;
  margin: 0;
  padding: 0;
}

.image-slider-item-fit-width {
  position: relative;
  width: 100%;
  background: transparent !important;
  display: block;
  margin: 0;
  padding: 0;
  height: auto;
}

.image-slider-item-fit-width img {
  width: 100% !important;
  height: auto !important;
  object-fit: contain !important;
  object-position: center !important;
  display: block;
  margin: 0;
  padding: 0;
  max-width: 100%;
}

/* ============================================ */
/* CAROUSEL STYLES - FIXED HEIGHT, VARIABLE WIDTH */
/* ============================================ */
.image-carousel-grid {
  display: flex;
  gap: 1rem;
  align-items: center;
  justify-content: flex-start;
  height: 200px;
  width: 100%;
  overflow: hidden;
  flex-wrap: nowrap; /* FORCE SINGLE ROW */
}

.image-carousel-item {
  position: relative;
  background-color: transparent;
  overflow: hidden;
  flex: 0 0 auto; /* NO GROW, NO SHRINK */
  /* Width and height set by parent, no flex centering */
}

.image-carousel-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  transition: transform 0.3s ease;
  display: block;
}

.image-carousel-item:hover .image-carousel-img {
  transform: scale(1.02);
}

.image-carousel-caption {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  background: linear-gradient(transparent, rgba(0, 0, 0, 0.7));
  color: var(--web-neutral-text-high, #ffffff);
  padding: 1rem;
  opacity: 0;
  transition: opacity 0.3s ease;
}

.image-carousel-item:hover .image-carousel-caption {
  opacity: 1;
}

.image-carousel-caption p {
  margin: 0;
  font-size: 0.875rem;
  line-height: 1.25rem;
}

/* ============================================ */
/* RESPONSIVE BEHAVIOR */
/* ============================================ */
@media (max-width: 640px) {
  .image-grid-static {
    grid-template-columns: repeat(2, 1fr);
    gap: 0.5rem;
    padding: 0.5rem;
  }
  
  .image-slider-grid {
    gap: 0.5rem;
    padding: 0.5rem;
  }
  
  .image-carousel-item {
    margin-right: 0.5rem;
  }
}

@media (min-width: 768px) {
  .image-grid-static {
    grid-template-columns: repeat(var(--columns), 1fr);
  }
}

/* ============================================ */
/* LOGOS GRID STYLES - SAME PATTERN AS IMAGE GRID */
/* ============================================ */
.logos-grid-static {
  display: grid;
  grid-template-columns: repeat(var(--columns), minmax(0, 1fr));
  gap: 1.5rem;
  padding: 0;
  width: 100%;
  max-width: 100%;
  overflow-x: hidden;
  box-sizing: border-box;
  margin: 0;
}

.logos-grid-item {
  display: flex;
  align-items: center;
  justify-content: center;
  min-width: 0;
  max-width: 100%;
  padding: 0.75rem 1rem;
  box-sizing: border-box;
  overflow: hidden;
  width: 100%;
}

.logos-grid-item img {
  width: auto;
  max-width: 100%;
  height: auto;
  box-sizing: border-box;
  display: block;
}

/* Responsive behavior - prevent horizontal scrollbar */
/* Force 2 columns on mobile/tablet to prevent overflow - same as image-grid */
@media (max-width: 767px) {
  .logos-grid-static {
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    gap: 1rem;
  }
}

/* Use configured columns on desktop */
@media (min-width: 768px) {
  .logos-grid-static {
    grid-template-columns: repeat(var(--columns), minmax(0, 1fr));
  }
}

/* ============================================ */
/* IMAGE BLOCK TITLE STYLING */
/* ============================================ */
.image-block-title {
  margin-bottom: 2rem;
  text-align: center;
}

.image-block-title h1,
.image-block-title h2,
.image-block-title h3,
.image-block-title h4,
.image-block-title h5,
.image-block-title h6,
.image-block-title p {
  margin: 0;
  line-height: 1.2;
}

.image-block-title h1 {
  font-size: 2.5rem;
  font-weight: 700;
}

.image-block-title h2 {
  font-size: 2rem;
  font-weight: 700;
}

@media (min-width: 768px) {
  .image-block-title h1 {
    font-size: 3rem;
  }
  
  .image-block-title h2 {
    font-size: 2.5rem;
  }
}

/* ============================================ */
/* TEXTBLOCK QUOTE STYLING */
/* ============================================ */
.web-textblock-quote-small {
  font-size: 1rem !important;
  line-height: 1.6;
  font-style: italic;
  /* Color inherits from parent - no hardcoded color */
  border-left: 4px solid #e5e7eb;
  padding-left: 1.5rem;
  margin: 1.5rem 0;
}

.web-textblock-quote-medium {
  font-size: 1.25rem !important;
  line-height: 1.6;
  font-style: italic;
  /* Color inherits from parent - no hardcoded color */
  border-left: 4px solid #e5e7eb;
  padding-left: 1.5rem;
  margin: 1.5rem 0;
}

.web-textblock-quote-large {
  font-size: 1.5rem !important;
  line-height: 1.6;
  font-style: italic;
  /* Color inherits from parent - no hardcoded color */
  border-left: 4px solid #e5e7eb;
  padding-left: 1.5rem;
  margin: 1.5rem 0;
}

@media (min-width: 768px) {
  .web-textblock-quote-small {
    font-size: 1.125rem !important;
  }
}

@media (min-width: 768px) {
  .web-textblock-quote-medium {
    font-size: 1.5rem !important;
  }
}

@media (min-width: 768px) {
  .web-textblock-quote-large {
    font-size: 1.875rem !important;
  }
}
