/* Enhanced Typography and Responsive Styles for Service Cards */

/* Import Google Fonts for better typography */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700;800;900&display=swap');
@import url('https://fonts.googleapis.com/css2?family=Poppins:wght@400;500;600;700;800;900&display=swap');

/* Enhanced base styles for better typography */
.styled-card {
  font-family: var(--font_kanit), 'Arial', 'Helvetica', sans-serif !important;
}

.styled-card .title-box {
  font-family: var(--font_kanit), 'Arial', 'Helvetica', sans-serif !important;
  font-weight: 700 !important;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

.styled-card .text {
  font-family: var(--font_kanit), 'Arial', 'Helvetica', sans-serif !important;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* Enhanced responsive breakpoints for better text scaling */

/* Extra Large Desktop (1400px+) */
@media only screen and (min-width: 1400px) {
  .styled-card .title-box {
    font-size: 24px !important;
    font-family: var(--font_kanit) !important;
    letter-spacing: 0.8px !important;
    margin-bottom: 0px !important;
  }
  
  .styled-card .text {
    font-size: 20px !important;
    font-family: var(--font_kanit) !important;
    font-weight: 400 !important;
    line-height: 1.2 !important;
  }
}

/* Large Desktop (1200px - 1399px) */
@media only screen and (min-width: 1200px) and (max-width: 1399px) {
  .styled-card .title-box {
    font-size: 24px !important;
    font-family: var(--font_kanit) !important;
    letter-spacing: 0.7px !important;
    margin-bottom: 0px !important;
  }
  
  .styled-card .text {
    font-size: 20px !important;
    font-family: var(--font_kanit) !important;
    font-weight: 400 !important;
  }
}

/* Medium Desktop (992px - 1199px) */
@media only screen and (min-width: 992px) and (max-width: 1199px) {
  .styled-card .title-box {
    font-size: 24px !important;
    font-family: var(--font_kanit) !important;
    letter-spacing: 0.6px !important;
    margin-bottom: 0px !important;
  }
  
  .styled-card .text {
    font-size: 20px !important;
    font-family: var(--font_kanit) !important;
    font-weight: 400 !important;
  }
}

/* Large Tablet (768px - 991px) */
@media only screen and (min-width: 768px) and (max-width: 991px) {
  .styled-card .title-box {
    font-size: 18px !important;
    font-family: var(--font_kanit) !important;
    letter-spacing: 0.5px !important;
    line-height: 1.2 !important;
    margin-bottom: 0px !important;
  }
  
  .styled-card .text {
    font-size: 18px !important;
    font-family: var(--font_kanit) !important;
    font-weight: 400 !important;
    line-height: 1.5 !important;
  }
}

/* Small Tablet (576px - 767px) */
@media only screen and (min-width: 576px) and (max-width: 767px) {
  .styled-card .title-box {
    font-size: 20px !important;
    font-weight: 600 !important;
    font-family: var(--font_kanit) !important;
    letter-spacing: 0.4px !important;
    line-height: 1.2 !important;
    margin-bottom: 0px !important;
  }
  
  .styled-card .text {
    font-size: 18px !important;
    font-weight: 400 !important;
    font-family: var(--font_kanit) !important;
    line-height: 1.45 !important;
  }
}

/* Mobile Large (480px - 575px) */
@media only screen and (min-width: 480px) and (max-width: 575px) {
  .styled-card .title-box {
    font-size: 24px !important;
    font-weight: 600 !important;
    font-family: var(--font_kanit) !important;
    letter-spacing: 0.3px !important;
    line-height: 1.15 !important;
    margin-bottom: 0px !important;
  }
  
  .styled-card .text {
    font-size: 20px !important;
    font-weight: 400 !important;
    font-family: var(--font_kanit) !important;
    line-height: 1.4 !important;
  }
}

/* Mobile Small (less than 480px) */
@media only screen and (max-width: 479px) {
  .styled-card .title-box {
    font-size: 24px !important;
    font-weight: 600 !important;
    font-family: var(--font_kanit) !important;
    letter-spacing: 0.3px !important;
    line-height: 1.2 !important;
    word-spacing: 0.3px !important;
    margin-bottom: 0px !important;
  }
  
  .styled-card .text {
    font-size: 18px !important;
    font-weight: 400 !important;
    font-family: var(--font_kanit) !important;
    line-height: 1.4 !important;
    margin-top: 0 !important;
    max-width: 60% !important;
  }
  
  .styled-card {
    padding: 20px 18px 20px !important;
    min-height: 280px !important;
    margin-bottom: 0 !important;
    width: 100% !important;
    max-width: 100% !important;
  }
  
  .styled-card .icon {
    width: 70px !important;
    height: 70px !important;
    margin-bottom: 15px !important;
    padding: 15px !important;
  }
  
  .styled-card .icon img {
    width: 35px !important;
    height: 35px !important;
  }
}

/* Enhanced accessibility and readability */
.styled-card .title-box,
.styled-card .text {
  text-shadow: 0 1px 3px rgba(0,0,0,0.2) !important;
}

/* Improved focus states for accessibility */
.styled-card:focus-within {
  outline: 3px solid rgba(255,255,255,0.5);
  outline-offset: 2px;
}

/* Enhanced hover effects with better typography scaling */
.styled-card:hover .title-box {
  transform: scale(1.02);
  transition: transform 0.3s ease;
}

.styled-card:hover .text {
  opacity: 0.95;
  transition: opacity 0.3s ease;
}

/* Additional mobile optimizations */
@media only screen and (max-width: 767px) {
  .service-area .services-wrapper {
    padding: 0 !important;
  }
  
  .styled-card {
    width: 100% !important;
    max-width: none !important;
  }
}

/* Ensure proper spacing between cards on mobile */
@media only screen and (max-width: 479px) {
  .has_fade_anim {
    margin-bottom: 15px;
  }
  
  .has_fade_anim:last-child {
    margin-bottom: 0;
  }
}