/**
 * SG Homepage Signpost Module - Frontend Styles
 * @author Seldom Group
 * Displays 1-3 clickable images as navigation signposts
 */

/* Main Section */
.sg-homepage-signpost-section {
  padding: 80px 0 100px;
  background: linear-gradient(135deg, #f8f9fa 0%, #ffffff 100%);
  position: relative;
  overflow: hidden;
}

.sg-homepage-signpost-section::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: radial-gradient(circle at 30% 20%, rgba(184, 132, 82, 0.03) 0%, transparent 50%),
              radial-gradient(circle at 70% 80%, rgba(184, 132, 82, 0.05) 0%, transparent 50%);
  pointer-events: none;
  z-index: 1;
}

.sg-homepage-signpost-section .container {
  position: relative;
  z-index: 2;
}

/* Title */
.sg-signpost-title {
  font-size: 42px;
  font-weight: 400;
  color: #b2aba2;
  text-align: center;
  margin-bottom: 20px;
  line-height: 1.2;
  font-family: 'Nunito', 'Helvetica Neue', Helvetica, Arial, sans-serif;
  letter-spacing: -0.01em;
  position: relative;
}

/* Title with divider */
.sg-signpost-title.sg-signpost-with-divider::after {
  content: '';
  display: block;
  width: 80px;
  height: 4px;
  background: linear-gradient(90deg, #B88452 0%, rgba(184, 132, 82, 0.3) 100%);
  margin: 20px auto 0;
  border-radius: 2px;
}

/* Subtitle */
.sg-signpost-subtitle {
  font-size: 16px;
  font-weight: 400;
  color: #000000;
  text-align: center;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  margin-bottom: 60px;
  margin-top: 20px;
  line-height: 1.6;
  font-family: 'Nunito', 'Helvetica Neue', Helvetica, Arial, sans-serif;
}

/* Images Row */
.sg-signpost-images-row {
  display: flex;
  flex-wrap: wrap;
  margin: 0 -15px;
}

/* Item Wrapper */
.sg-signpost-item-wrapper {
  padding: 15px;
  margin-bottom: 30px;
}

.sg-signpost-item {
  height: 100%;
}

/* Image Wrapper */
.sg-signpost-image-wrapper {
  position: relative;
  width: 100%;
  overflow: hidden;
  border-radius: 0px;
  box-shadow:
    0 20px 40px rgba(0, 0, 0, 0.12),
    0 8px 16px rgba(0, 0, 0, 0.08);
  transition: all 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94);
  background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
  cursor: pointer;
}

.sg-signpost-image-wrapper.sg-signpost-no-link {
  cursor: default;
}

.sg-signpost-link {
  display: block;
  text-decoration: none;
  color: inherit;
}

/* Image */
.sg-signpost-image {
  width: 100%;
  height: auto;
  min-height: 400px;
  object-fit: cover;
  display: block;
  border-radius: 0px;
  transition: all 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94);
  position: relative;
  z-index: 2;
}

/* Overlay */
.sg-signpost-overlay {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: linear-gradient(135deg, rgba(184, 132, 82, 0.85) 0%, rgba(44, 62, 80, 0.85) 100%);
  background: linear-gradient(135deg, #2c3e506b 0%, #2c3e50 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transition: opacity 0.4s ease;
  border-radius: 0px;
  z-index: 3;
}

.sg-signpost-text {
  font-size: 28px;
  color: #ffffff;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  text-align: center;
  padding: 0 30px;
  line-height: 1.3;
  transform: translateY(20px);
  opacity: 0;
  transition: all 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94);
  font-family: 'Nunito', 'Helvetica Neue', Helvetica, Arial, sans-serif;
}

/* Hover Effects */
.sg-signpost-link:hover .sg-signpost-image-wrapper,
.sg-signpost-image-wrapper:hover {
  transform: translateY(-8px);
  box-shadow:
    0 30px 60px rgba(0, 0, 0, 0.18),
    0 12px 24px rgba(0, 0, 0, 0.12),
    0 0 0 1px rgba(184, 132, 82, 0.2);
}

.sg-signpost-link:hover .sg-signpost-overlay,
.sg-signpost-image-wrapper:hover .sg-signpost-overlay {
  opacity: 1;
}

.sg-signpost-link:hover .sg-signpost-text,
.sg-signpost-image-wrapper:hover .sg-signpost-text {
  transform: translateY(0);
  opacity: 1;
}

.sg-signpost-link:hover .sg-signpost-image,
.sg-signpost-image-wrapper:hover .sg-signpost-image {
  transform: scale(1.08);
}

/* No link hover - subtle effect */
.sg-signpost-image-wrapper.sg-signpost-no-link:hover {
  transform: translateY(-4px);
  box-shadow:
    0 25px 50px rgba(0, 0, 0, 0.15),
    0 10px 20px rgba(0, 0, 0, 0.1);
}

.sg-signpost-image-wrapper.sg-signpost-no-link:hover .sg-signpost-image {
  transform: scale(1.03);
}

/* Layout Adjustments Based on Count */

/* Single image - centered and larger */
.sg-signpost-count-1 .sg-signpost-item-wrapper {
  max-width: 900px;
  margin-left: auto;
  margin-right: auto;
}

.sg-signpost-count-1 .sg-signpost-image {
  min-height: 500px;
}

/* Two images */
.sg-signpost-count-2 .sg-signpost-image {
  min-height: 450px;
}

/* Three images */
.sg-signpost-count-3 .sg-signpost-image {
  min-height: 400px;
}

/* Responsive Design */

/* Large Desktop (1400px and up) */
@media (min-width: 1400px) {
  .sg-homepage-signpost-section {
    padding: 100px 0 120px;
  }

  .sg-signpost-title {
    font-size: 48px;
    margin-bottom: 20px;
  }

  .sg-signpost-subtitle {
    font-size: 18px;
    margin-bottom: 70px;
  }

  .sg-signpost-count-1 .sg-signpost-image {
    min-height: 600px;
  }

  .sg-signpost-count-2 .sg-signpost-image {
    min-height: 500px;
  }

  .sg-signpost-count-3 .sg-signpost-image {
    min-height: 450px;
  }
}

/* Desktop (1200px to 1399px) */
@media (min-width: 1200px) and (max-width: 1399px) {
  .sg-homepage-signpost-section {
    padding: 80px 0 100px;
  }

  .sg-signpost-title {
    font-size: 44px;
    margin-bottom: 20px;
  }

  .sg-signpost-subtitle {
    font-size: 17px;
    margin-bottom: 60px;
  }

  .sg-signpost-count-1 .sg-signpost-image {
    min-height: 500px;
  }

  .sg-signpost-count-2 .sg-signpost-image {
    min-height: 450px;
  }

  .sg-signpost-count-3 .sg-signpost-image {
    min-height: 400px;
  }
}

/* Medium Desktop (992px to 1199px) */
@media (min-width: 992px) and (max-width: 1199px) {
  .sg-homepage-signpost-section {
    padding: 70px 0 90px;
  }

  .sg-signpost-title {
    font-size: 40px;
    margin-bottom: 20px;
  }

  .sg-signpost-subtitle {
    font-size: 16px;
    margin-bottom: 50px;
  }

  .sg-signpost-count-1 .sg-signpost-image {
    min-height: 450px;
  }

  .sg-signpost-count-2 .sg-signpost-image {
    min-height: 400px;
  }

  .sg-signpost-count-3 .sg-signpost-image {
    min-height: 380px;
  }

  .sg-signpost-text {
    font-size: 24px;
    padding: 0 25px;
  }
}

/* Tablet (768px to 991px) */
@media (min-width: 768px) and (max-width: 991px) {
  .sg-homepage-signpost-section {
    padding: 60px 0 80px;
  }

  .sg-signpost-title {
    font-size: 36px;
    margin-bottom: 20px;
  }

  .sg-signpost-subtitle {
    font-size: 15px;
    margin-bottom: 45px;
  }

  .sg-signpost-item-wrapper {
    margin-bottom: 25px;
  }

  .sg-signpost-image {
    min-height: 350px;
  }

  .sg-signpost-count-1 .sg-signpost-image,
  .sg-signpost-count-2 .sg-signpost-image,
  .sg-signpost-count-3 .sg-signpost-image {
    min-height: 350px;
  }

  .sg-signpost-text {
    font-size: 22px;
    padding: 0 20px;
  }
  
  .sg-signpost-images-row {
    display: flex;
    flex-wrap: nowrap;
    flex-direction: row;
	}
  
  .sg-signpost-image-wrapper {
	  width: 100%;
	}
}

/* Mobile (up to 767px) */
@media (max-width: 767px) {
  .sg-homepage-signpost-section {
    padding: 50px 0 60px;
  }

  .sg-signpost-title {
    font-size: 32px;
    margin-bottom: 18px;
  }

  .sg-signpost-subtitle {
    font-size: 14px;
    margin-bottom: 40px;
  }

  .sg-signpost-images-row {
    margin: 0 -10px;
  }

  .sg-signpost-item-wrapper {
    padding: 10px;
    margin-bottom: 20px;
  }

  .sg-signpost-image {
    min-height: 300px;
  }

  .sg-signpost-count-1 .sg-signpost-image,
  .sg-signpost-count-2 .sg-signpost-image,
  .sg-signpost-count-3 .sg-signpost-image {
    min-height: 300px;
  }

  .sg-signpost-text {
    font-size: 20px;
    padding: 0 20px;
  }

  /* Reduce hover effects on mobile */
  .sg-signpost-link:hover .sg-signpost-image-wrapper,
  .sg-signpost-image-wrapper:hover {
    transform: translateY(-4px);
  }

  .sg-signpost-link:hover .sg-signpost-image,
  .sg-signpost-image-wrapper:hover .sg-signpost-image {
    transform: scale(1.04);
  }
  .sg-signpost-images-row {
    display: flex;
    flex-wrap: nowrap;
    flex-direction: row;
	}
}

/* Mobile (up to 567px) */
@media (max-width: 567px) {
  .sg-signpost-images-row {
    display: flex;
    flex-wrap: nowrap;
    flex-direction: row;
	}
}
/* Extra Small Mobile (up to 480px) */
@media (max-width: 480px) {
  .sg-homepage-signpost-section {
    padding: 40px 0 50px;
  }

  .sg-signpost-title {
    font-size: 28px;
    margin-bottom: 16px;
  }

  .sg-signpost-title.sg-signpost-with-divider::after {
    width: 60px;
    height: 3px;
    margin-top: 15px;
  }

  .sg-signpost-subtitle {
    font-size: 13px;
    margin-bottom: 35px;
    letter-spacing: 0.08em;
  }

  .sg-signpost-image {
    min-height: 250px;
    border-radius: 12px;
  }

  .sg-signpost-count-1 .sg-signpost-image,
  .sg-signpost-count-2 .sg-signpost-image,
  .sg-signpost-count-3 .sg-signpost-image {
    min-height: 250px;
  }

  .sg-signpost-image-wrapper {
    border-radius: 12px;
  }

  .sg-signpost-overlay {
    border-radius: 12px;
  }

  .sg-signpost-text {
    font-size: 18px;
    padding: 0 15px;
    letter-spacing: 0.03em;
  }
}

/* Accessibility Improvements */
@media (prefers-reduced-motion: reduce) {
  .sg-signpost-image-wrapper,
  .sg-signpost-image,
  .sg-signpost-overlay,
  .sg-signpost-text {
    transition: none !important;
  }

  .sg-signpost-link:hover .sg-signpost-image-wrapper,
  .sg-signpost-image-wrapper:hover {
    transform: none !important;
  }

  .sg-signpost-link:hover .sg-signpost-image,
  .sg-signpost-image-wrapper:hover .sg-signpost-image {
    transform: none !important;
  }

  .sg-signpost-link:hover .sg-signpost-text,
  .sg-signpost-image-wrapper:hover .sg-signpost-text {
    transform: none !important;
  }
}

/* High Contrast Mode Support */
@media (prefers-contrast: high) {
  .sg-signpost-title {
    color: #000000;
  }

  .sg-signpost-image-wrapper {
    border: 2px solid #000000;
  }

  .sg-signpost-overlay {
    background: rgba(0, 0, 0, 0.85);
  }
}

/* Dark Mode Support */
@media (prefers-color-scheme: dark) {
  .sg-homepage-signpost-section {
    background: linear-gradient(135deg, #1a202c 0%, #2d3748 100%);
  }

  .sg-signpost-title {
    color: #f7fafc;
  }

  .sg-signpost-subtitle {
    color: #e2e8f0;
  }

  .sg-signpost-title.sg-signpost-with-divider::after {
    background: linear-gradient(90deg, #B88452 0%, rgba(184, 132, 82, 0.4) 100%);
  }
}

/* Focus states for accessibility */
.sg-signpost-link:focus {
  outline: 3px solid #B88452;
  outline-offset: 5px;
  border-radius: 15px;
}

.sg-signpost-link:focus {
  outline: 0px solid #B88452;
  outline-offset: 0px;
  border-radius: 0px;
}

.sg-signpost-link:focus .sg-signpost-image-wrapper {
  box-shadow:
    0 0 0 4px rgba(184, 132, 82, 0.3),
    0 20px 40px rgba(0, 0, 0, 0.12);
}

/* Print styles */
@media print {
  .sg-homepage-signpost-section {
    padding: 20px 0;
    background: transparent !important;
  }

  .sg-homepage-signpost-section::before {
    display: none;
  }

  .sg-signpost-image-wrapper {
    box-shadow: none;
    border: 1px solid #ccc;
    page-break-inside: avoid;
  }

  .sg-signpost-overlay {
    display: none;
  }

  .sg-signpost-image {
    min-height: auto;
  }

  .sg-signpost-title.sg-signpost-with-divider::after {
    display: none;
  }
}
