/**
 * TH Banners - Frontend CSS
 * Responsive banner styling for all template types
 */

/* Banner Container */
.th-banners-container {
  margin: 20px 0;
  width: 100%;
}

/* Individual Banner Wrapper */
.th-banner {
  position: relative;
  margin-bottom: 20px;
  overflow: hidden;
}



.th-banner:last-child {
  margin-bottom: 0;
}

/* Banner Title */
.th-banner-title {
  padding: 20px;
  text-align: center;
  background-color: rgba(255, 255, 255, 0.95);
  border-bottom: 1px solid #e0e0e0;
}

.th-banner-title h2 {
  margin: 0;
  font-size: 1.5rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 1px;
}

/* Banner Content */
.th-banner-content {
  position: relative;
}

/* Common Image Styles */
.th-banner-image {
  width: 100%;
  height: auto;
  display: block;
}

.th-banner-link {
  display: block;
  text-decoration: none;
}

.th-banner-image-wrapper {
  position: relative;
  overflow: hidden;
}

/* Single Image Banner */
.th-banner-single-image .th-banner-image-wrapper {
  text-align: center;
}

.th-banner-single-image .th-banner-image {
  object-fit: cover;
  width: 100%;
}

/* Two Images Banner */
.th-banner-two-images .th-banner-image {
  object-fit: cover;
}

/* Image + Text Banner */
.th-banner-image-text {
  padding: 20px;
}

.th-banner-image-text .th-banner-image {
  object-fit: cover;
}

.th-banner-text-wrapper {
  padding: 20px;
  display: flex;
  align-items: center;
  min-height: 250px;
}

.th-banner-text-content p:last-child {
  margin-bottom: 0;
}

/* Hook-specific styling */
.th-banners-hook-displayHome .th-banner {
  margin-bottom: 30px;
}

.th-banners-hook-displayTop .th-banner {
  margin-bottom: 0;
  border-radius: 0;
  box-shadow: none;
}

.th-banners-hook-displayFooter .th-banner {
  margin-bottom: 20px;
}

.th-banners-hook-displayContentWrapperTop .th-banner,
.th-banners-hook-displayContentWrapperBottom .th-banner {
  margin: 15px 0;
}

/* Responsive Design */
@media (max-width: 991.98px) {
  .th-banner-image-text .th-banner-text-wrapper {
    min-height: auto;
    padding: 15px;
  }
  
  .th-banner-title h2 {
    font-size: 1.25rem;
  }
}

@media (max-width: 767.98px) {
  .th-banner {
    margin-bottom: 15px;
    border-radius: 4px;
  }
  
  .th-banner-title {
    padding: 15px;
  }
  
  .th-banner-title h2 {
    font-size: 1.125rem;
  }
  
  .th-banner-image-text {
    padding: 15px;
  }
  
  .th-banner-text-wrapper {
    padding: 10px;
    text-align: center;
  }
  
  .th-banner-image-text .th-banner-image {
    margin-bottom: 15px;
  }
}

@media (max-width: 575.98px) {
  .th-banners-container {
    margin: 15px 0;
  }
  
  .th-banner-title {
    padding: 10px;
  }
  
  .th-banner-title h2 {
    font-size: 1rem;
  }
  
  .th-banner-image-text {
    padding: 10px;
  }
  
  .th-banner-text-wrapper {
    padding: 5px;
  }
  
  .th-banner-image-column {
    padding: 5px;
  }
}

/* Animation and Effects */
@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.th-banner {
  animation: fadeIn 0.6s ease-out;
}

/* Print Styles */
@media print {
  .th-banner {
    box-shadow: none;
    border: 1px solid #ddd;
    margin-bottom: 20px;
    page-break-inside: avoid;
  }
  
  .th-banner:hover {
    transform: none;
  }
  
  .th-banner-link:hover .th-banner-image {
    transform: none;
  }
}

/* High Contrast Mode Support */
@media (prefers-contrast: high) {
  .th-banner {
    border: 2px solid #000;
  }
  
  .th-banner-title {
    border-bottom: 2px solid #000;
  }
  
  .th-banner-text-content {
    color: #000;
  }
  
  .th-banner-text-content a {
    color: #0000ff;
    text-decoration: underline;
  }
}

/* Reduced Motion Support */
@media (prefers-reduced-motion: reduce) {
  .th-banner,
  .th-banner-image,
  .th-banner-link:hover .th-banner-image {
    transition: none;
    animation: none;
    transform: none;
  }
  
  .th-banner:hover {
    transform: none;
  }
}

/* Full Width Banner Support */
.th-banners-wrapper {
  width: 100%;
}

.th-banners-wrapper > .th-banner {
  width: 100%;
}

/* Ensure full width banners extend properly */
.th-banner:not(.th-banner-contained) {
  margin-left: calc(-50vw + 50%);
  margin-right: calc(-50vw + 50%);
  width: 100vw;
  max-width: 100vw;
}

/* Container banners maintain normal behavior */
.container .th-banner {
  margin-left: 0;
  margin-right: 0;
  width: 100%;
  max-width: 100%;
}

/* Full Width Background Support */
.th-banner-full-width-wrapper {
  /*width: calc(100vw - var(--bs-gutter-x) * .3);*/
  /*margin-left: calc(-50vw + 50%);*/
  /*margin-right: calc(-50vw + 50%);*/
  position: relative;
  overflow: hidden;
}

.th-banner-full-width-wrapper .th-banner {
  width: 100%;
  max-width: 100%;
  margin-left: 0;
  margin-right: 0;
  background: transparent !important;
}

.th-banner-full-width-wrapper .th-banner.container {
  max-width: 1200px;
  margin: 0 auto;
  padding-left: 15px;
  padding-right: 15px;
}

/* Responsive adjustments for full-width backgrounds */
@media (max-width: 1200px) {
  .th-banner-full-width-wrapper .th-banner.container {
    max-width: 960px;
  }
}

@media (max-width: 992px) {
  .th-banner-full-width-wrapper .th-banner.container {
    max-width: 720px;
  }
}

@media (max-width: 768px) {
  .th-banner-full-width-wrapper .th-banner.container {
    max-width: 540px;
  }
}

@media (max-width: 576px) {
  .th-banner-full-width-wrapper .th-banner.container {
    max-width: 100%;
    padding-left: 10px;
    padding-right: 10px;
  }
}