/**
 * Service Boxes Widget Styles
 * Version: 1.0.1
 * Date: 2025.12.05
 * Default styling to match original design
 */

/* Grid Layout */
.mg-service-boxes-wrapper {
  width: 100%;
}

.mg-service-boxes-grid {
  display: grid;
  gap: 1rem;
}

/* Service Box Item */
.mg-service-box-item {
  width: 100%;
}

/* Service Box Link (Card) */
.mg-service-box-link {
  display: block;
  height: 100%;
  text-decoration: none;
  position: relative;
  background-color: #ffffff;
  border-top: 0.25rem solid var(--mg-color-accent, #fdcb35);
  box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.mg-service-boxes-grid.mg-layout-column .mg-service-box-link {
  box-shadow: none;
  height: auto;
  /* Don't override border - let Elementor controls handle it */
}

.mg-service-box-link:hover {
  transform: translateY(-2px);
  box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
}

/* Service Box Content */
.mg-service-box-content {
  display: flex;
  flex-direction: column;
  height: 100%;
  padding: 3rem 1.5rem 4rem;
  text-align: center;
}

/* Column Layout - Horizontal */
.mg-service-boxes-grid.mg-layout-column .mg-service-box-content {
  flex-direction: row;
  align-items: center;
  text-align: left;
  padding: 1.5rem 2rem;
  height: auto;
}

/* Icon Wrapper */
.mg-service-box-icon-wrapper {
  text-align: center;
  margin-bottom: 1rem;
}

.mg-service-boxes-grid.mg-layout-column .mg-service-box-icon-wrapper {
  text-align: left;
  margin-bottom: 0;
  margin-right: 1.5rem;
  flex-shrink: 0;
  display: flex;
  align-items: center;
}

/* Ensure only one icon shows in column layout */
.mg-service-boxes-grid.mg-layout-column .mg-service-box-icon-wrapper:only-child {
  display: flex;
}

.mg-service-box-icon-box {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 4rem;
  height: 4rem;
  border-radius: 50%;
  background-color: var(--mg-color-secondary-lightest, #d5f3ff);
  margin: 0 auto;
}

/* Icon styling - solid icons with chosen color */
/* Default color as fallback - Elementor inline styles will override */
.mg-service-box-icon-box i,
.mg-service-box-icon-box svg {
  font-size: 2.5rem;
  color: var(--mg-color-secondary, #3ec8fd);
}

.mg-service-box-icon-box svg {
  width: 2.5rem;
  height: 2.5rem;
  fill: currentColor;
}

.mg-service-boxes-grid.mg-layout-column .mg-service-box-icon-box {
  width: 3.5rem;
  height: 3.5rem;
}

.mg-service-boxes-grid.mg-layout-column .mg-service-box-icon-box i,
.mg-service-boxes-grid.mg-layout-column .mg-service-box-icon-box svg {
  font-size: 2rem;
}

.mg-service-boxes-grid.mg-layout-column .mg-service-box-icon-box svg {
  width: 2rem;
  height: 2rem;
}

/* Title - Bold, uppercase, dark gray */
.mg-service-box-title {
  text-align: center;
  margin: 0.75rem 0 0.5rem;
  font-weight: 700;
  font-size: 1.125rem;
  text-transform: uppercase;
  letter-spacing: 0.025em;
  color: var(--mg-color-text, #1f2937);
  line-height: 1.3;
}

.mg-service-boxes-grid.mg-layout-column .mg-service-box-title {
  text-align: left;
  margin: 0;
  flex-grow: 1;
}

/* Description - Smaller, dark gray */
.mg-service-box-description {
  text-align: center;
  flex-grow: 1;
  margin: 0 0 1rem;
  font-size: 0.9375rem;
  color: var(--mg-color-text, #1f2937);
  line-height: 1.6;
  font-weight: 400;
}

.mg-service-boxes-grid.mg-layout-column .mg-service-box-description {
  display: none;
}

/* Learn More Link - Orange, underlined */
.mg-service-box-learn-more {
  display: block;
  text-align: center;
  position: absolute;
  bottom: 1.5rem;
  left: 0;
  right: 0;
  width: 100%;
  color: var(--mg-color-accent, #fdcb35);
  font-weight: 700;
  font-size: 1rem;
  text-decoration: underline;
  text-underline-offset: 2px;
}

.mg-service-boxes-grid.mg-layout-column .mg-service-box-learn-more {
  position: static;
  text-align: right;
  width: auto;
  margin-left: 1rem;
  flex-shrink: 0;
  /* Show the actual text, not an arrow */
  font-size: inherit;
  line-height: inherit;
}

/* Remove the arrow - show text instead */
.mg-service-boxes-grid.mg-layout-column .mg-service-box-learn-more::after {
  display: none;
}

.mg-service-box-link:hover .mg-service-box-learn-more {
  color: var(--mg-color-accent-dark, #e3ab02);
}

/* Responsive */
@media (max-width: 1024px) {
  .mg-service-box-content {
    padding: 2.5rem 1.25rem 3.5rem;
  }
  
  .mg-service-box-icon-box {
    width: 3.5rem;
    height: 3.5rem;
  }
  
  .mg-service-box-icon-box i,
  .mg-service-box-icon-box svg {
    font-size: 2rem;
  }
  
  .mg-service-box-icon-box svg {
    width: 2rem;
    height: 2rem;
  }
}

@media (max-width: 767px) {
  .mg-service-box-content {
    padding: 2rem 1rem 3rem;
  }
  
  .mg-service-box-icon-box {
    width: 3rem;
    height: 3rem;
  }
  
  .mg-service-box-icon-box i,
  .mg-service-box-icon-box svg {
    font-size: 1.75rem;
  }
  
  .mg-service-box-icon-box svg {
    width: 1.75rem;
    height: 1.75rem;
  }
  
  /* Move Learn More link to appear right after title on mobile */
  .mg-service-box-content {
    position: relative;
  }
  
  .mg-service-box-icon-wrapper {
    order: 1;
  }
  
  .mg-service-box-title {
    order: 2;
    margin-bottom: 0.5rem;
  }
  
  .mg-service-box-learn-more {
    order: 3;
    position: static !important;
    width: 100%;
    text-align: center;
    margin: 0.5rem 0 1rem;
    bottom: auto;
    left: auto;
    right: auto;
  }
  
  .mg-service-box-description {
    order: 4;
  }
}

