/**
 * Layout fixes for TrendLine Insights
 * Fixes for hero images and other layout elements that relied on Squarespace JS
 */

/* Hero banner image fixes */
.banner-thumbnail-wrapper {
  position: relative;
  width: 100%;
  min-height: 400px;
  overflow: hidden;
}

.banner-thumbnail-wrapper #thumbnail {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  width: 100%;
  height: 100%;
}

.banner-thumbnail-wrapper #thumbnail img {
  width: 100% !important;
  height: 100% !important;
  object-fit: cover !important;
  object-position: center center !important;
  position: absolute !important;
  top: 0 !important;
  left: 0 !important;
}

/* Content image blocks - Wind/Solar cards on homepage */
.sqs-block-image .sqs-image-shape-container-element img {
  width: 100% !important;
  height: 100% !important;
  object-fit: cover !important;
  position: absolute !important;
  top: 0 !important;
  left: 0 !important;
}

/* Image block intrinsic sizing */
.image-block .intrinsic {
  position: relative;
  width: 100%;
}

.image-block .image-inset {
  position: relative;
  width: 100%;
}

/* Gallery images */
.sqs-gallery-design-grid-slide img {
  width: 100% !important;
  height: auto !important;
  position: relative !important;
  left: 0 !important;
  top: 0 !important;
}

.sqs-gallery-design-grid-slide .margin-wrapper {
  display: flex;
  align-items: center;
  justify-content: center;
}

/* Ensure content-fill images work correctly */
.content-fill img {
  object-fit: cover;
}

/* Fix for poster-style image blocks (Wind/Solar cards) */
.design-layout-poster {
  position: relative;
  overflow: hidden;
}

.design-layout-poster .intrinsic {
  position: relative;
  width: 100%;
}

.design-layout-poster .sqs-image-shape-container-element {
  position: relative;
  overflow: hidden;
}

/* Poster image card wrapper - positioned over the image */
.design-layout-poster .image-card-wrapper {
  display: flex;
  align-items: center;
  justify-content: center;
  position: absolute;
  top: 0;
  left: 0;
  bottom: 0;
  right: 0;
  z-index: 2;
}

.design-layout-poster .image-card {
  width: 75%;
  text-align: center;
}

/* Dark overlay on poster images */
.design-layout-poster .image-overlay {
  background-color: rgba(0, 0, 0, 0.3) !important;
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 1;
}

/* Title styling */
.design-layout-poster .image-title-wrapper {
  margin-bottom: 15px;
}

.design-layout-poster .image-title p {
  color: #fff !important;
  font-size: 2.5rem !important;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  margin: 0;
}

/* Button styling */
.design-layout-poster .image-button-wrapper {
  margin-top: 10px;
}

.design-layout-poster .image-button-inner a {
  display: inline-block;
  padding: 12px 30px;
  background-color: transparent;
  border: 2px solid #fff;
  color: #fff !important;
  text-decoration: none !important;
  font-size: 0.9rem;
  font-weight: 600;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  transition: background-color 0.3s ease, color 0.3s ease;
}

.design-layout-poster .image-button-inner a:hover {
  background-color: #fff;
  color: #000 !important;
}

/* Enable reveal animation for poster blocks */
.design-layout-poster.combination-animation-reveal .image-inset,
.design-layout-poster.combination-animation-reveal .sqs-image-content {
  opacity: 1 !important;
  transform: none !important;
}

.design-layout-poster.combination-animation-reveal .sqs-dynamic-text-container {
  opacity: 1 !important;
  transform: none !important;
}

/* Responsive hero height */
@media (max-width: 768px) {
  .banner-thumbnail-wrapper {
    min-height: 300px;
  }

  /* Responsive poster text */
  .design-layout-poster .image-title p {
    font-size: 1.5rem !important;
  }

  .design-layout-poster .image-button-inner a {
    padding: 10px 20px;
    font-size: 0.8rem;
  }
}

@media (min-width: 769px) {
  .banner-thumbnail-wrapper {
    min-height: 450px;
  }
}

@media (min-width: 1200px) {
  .banner-thumbnail-wrapper {
    min-height: 500px;
  }
}

/* Standardized Simple Footer */
.simple-footer {
  background-color: #1a1a1a;
  padding: 30px 20px;
  text-align: center;
}

.simple-footer .footer-content {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 15px;
}

.simple-footer .linkedin-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  padding: 8px;
  box-sizing: border-box;
  background-color: transparent;
  border: 2px solid #fff;
  border-radius: 50%;
  transition: background-color 0.3s ease;
}

.simple-footer .linkedin-link:hover {
  background-color: rgba(255, 255, 255, 0.2);
}

.simple-footer .linkedin-link svg {
  width: 24px;
  height: 24px;
  fill: #fff;
}

.simple-footer .phone-number {
  color: #fff;
  font-size: 1rem;
  letter-spacing: 0.05em;
}

.simple-footer .phone-number a {
  color: #fff;
  text-decoration: none;
}

.simple-footer .phone-number a:hover {
  text-decoration: underline;
}

/* Hide the old preFooter and footer styles when using simple footer */
#preFooter {
  display: none;
}

#footer {
  display: none;
}
