/**
 * Fengyue Silk - Custom Overrides
 * Uses CSS variables from design tokens
 */

:root {
  /* Legacy aliases for template compatibility */
  --skin-color: var(--color-primary);
  --skin-color-dark: var(--color-primary-dark);
  --accent-gold: var(--color-accent);
}

/* Dark sections follow theme color (except footer) */
.ttm-bgcolor-darkgrey {
  background-color: var(--color-primary-dark) !important;
}

/* Footer stays pure dark grey, not theme color */
footer.ttm-bgcolor-darkgrey,
footer .ttm-bgcolor-darkgrey {
  background-color: #1b1a1a !important;
}

/* Override all skin-color backgrounds */
.ttm-bgcolor-skincolor {
  background-color: var(--skin-color) !important;
}

/* Override skin color text */
.ttm-textcolor-skincolor {
  color: var(--skin-color) !important;
}

/* Button overrides — fill style */
.ttm-btn-style-fill.ttm-btn-color-skincolor {
  background-color: var(--skin-color) !important;
  border-color: var(--skin-color) !important;
  color: #fff !important;
}

.ttm-btn-style-fill.ttm-btn-color-skincolor:hover {
  background-color: var(--skin-color-dark) !important;
  border-color: var(--skin-color-dark) !important;
}

/* Button overrides — border/outline style */
.ttm-btn-style-border.ttm-btn-color-skincolor {
  background-color: transparent !important;
  border-color: var(--skin-color) !important;
  color: var(--skin-color) !important;
}

.ttm-btn-style-border.ttm-btn-color-skincolor:hover {
  background-color: var(--skin-color) !important;
  color: #fff !important;
}

/* Stats section improvements */
.facts-section {
  padding: 40px 0 !important;
}

.facts-section .ttm-fid-digit {
  font-size: 42px !important;
  font-weight: 700 !important;
}

.facts-section .ttm-fid-suffix {
  font-size: 28px !important;
}

.facts-section .ttm-fid-title {
  font-size: 15px !important;
  margin-top: 8px !important;
  opacity: 0.9;
}

/* Reduce section spacing */
.ttm-row {
  padding-top: 60px !important;
  padding-bottom: 60px !important;
}

/* Allow zero-padding sections to override .ttm-row padding */
.ttm-row.padding_top_zero-section {
  padding-top: 0 !important;
}

.ttm-row.padding_zero-section {
  padding: 0 !important;
}

/* Testimonial section: bottom spacing for dot navigation */
.ttm-row.padding_zero-section.mt_180 {
  padding-bottom: 24px !important;
}

/* About section specific adjustments */
.about-section {
  padding-top: 80px !important;
  padding-bottom: 80px !important;
}

/* Footer link colors */
footer a:hover {
  color: var(--skin-color) !important;
}

/* Remove green dots from breadcrumbs */
.breadcrumb-wrapper span:after,
.ttm-bread-sep:after {
  display: none !important;
}

/* Hero section improvements */
.banner_slider_wrapper .slide__content {
  position: relative;
  z-index: 2;
}

/* Navigation improvements */
.ttm-stickable-header.sticky-active {
  box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

/* Service cards: grey bg on white section for contrast */
.services-section .featured-imagebox {
  background-color: var(--grey-color);
  border-radius: 6px;
  overflow: hidden;
}

.services-section .featured-imagebox .featured-content {
  padding: 20px 15px;
}

/* Icon highlight blocks: grey bg on white section */
.featured-icon-box.style9 {
  background-color: var(--grey-color);
  border-radius: 6px;
}

.featured-imagebox {
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.featured-imagebox:hover {
  transform: translateY(-5px);
  box-shadow: 0 10px 30px rgba(0,0,0,0.1);
}

.featured-icon-box.style1 .ttm-icon:before {
  display: none !important;
}

.featured-icon-box .ttm-icon {
  display: flex;
  align-items: center;
  justify-content: center;
}

.featured-icon-box .ttm-icon i {
  padding: 0 !important;
}

.featured-imagebox:not(.featured-imagebox-post) .featured-thumbnail {
  height: 280px;
  overflow: hidden;
}

.featured-imagebox:not(.featured-imagebox-post) .featured-thumbnail img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.5s ease;
}

.featured-imagebox:hover .featured-thumbnail img {
  transform: scale(1.05);
}

/* Blog/News section: preserve large bottom padding for footer CTA overlap */
.ttm-row.blog-section {
  padding-bottom: 150px !important;
}

/* Blog post cards: tall portrait to match demo-3 template (740x1000) */
.featured-imagebox-post.style3 .featured-thumbnail {
  height: 480px;
}

.featured-imagebox-post.style3 .featured-thumbnail img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* Date badge: use theme color instead of template green */
.featured-imagebox-post.style3 .ttm-box-post-date {
  background-color: var(--skin-color) !important;
}

/* Post card: no lift on hover (template doesn't have it) */
.featured-imagebox-post:hover {
  transform: none;
  box-shadow: none;
}

.contact-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 15px 40px rgba(0,0,0,0.12) !important;
}

.capability-card:hover {
  transform: translateY(-8px);
  box-shadow: 0 15px 40px rgba(0,0,0,0.1) !important;
}

input:focus,
textarea:focus,
select:focus {
  outline: none;
  border-color: var(--color-primary) !important;
}

/* Footer gallery: 3×2 grid with rounded thumbnails */
.gallery-wrapper {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 6px;
}

.gallery-wrapper .gallery-item {
  display: block;
  max-width: none;
  float: none;
  padding: 0;
  margin: 0;
}

/* Testimonial avatar: force square + circle crop */
.testimonials.ttm-testimonial-box-view-style4 .testimonial-img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.gallery-wrapper .gallery-item img {
  width: 100%;
  height: auto;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  border-radius: var(--radius-md);
}

.ttm-row.about-section,
.ttm-row.capabilities-section,
.ttm-row.process-section,
.ttm-row.trust-section,
.ttm-row.contact-info-section,
.ttm-row.contact-form-section,
.ttm-row.why-choose-section {
  padding-top: 80px !important;
  padding-bottom: 80px !important;
}

/* CTA section: less padding so testimonial overlap looks proportional */
.ttm-row.cta-section {
  padding-top: 60px !important;
  padding-bottom: 40px !important;
}

/* Reduce inner bottom padding when combined with lower section padding */
.cta-section .padding_bottom185 {
  padding-bottom: 140px !important;
}

.page-title-row {
  background-size: cover !important;
  background-position: center !important;
}

footer .social-icons a:hover {
  transform: translateY(-3px);
  opacity: 0.9;
}

.ttm-fid-contents h4 span {
  font-size: 42px !important;
  font-weight: 700 !important;
}

@media (max-width: 991px) {
  .featured-imagebox:not(.featured-imagebox-post) .featured-thumbnail {
    height: 220px;
  }
  
  .gallery-image-container,
  .gallery-image-container img,
  .gallery-image-container .gallery-img {
    height: 180px !important;
  }
}

@media (max-width: 767px) {
  .featured-imagebox:not(.featured-imagebox-post) .featured-thumbnail {
    height: 200px;
  }
  
  .ttm-row.about-section,
  .ttm-row.capabilities-section,
  .ttm-row.process-section {
    padding-top: 50px !important;
    padding-bottom: 50px !important;
  }
}


/* Header contact buttons - clickable area & link reset */
a.widget_info,
a.widget_info:hover,
a.widget_info:focus {
  text-decoration: none;
  color: inherit;
}

a.widget_info .widget_title {
  color: #0d2c4d;
}

a.widget_info:hover .widget_title {
  color: var(--skin-color);
}

/* Mobile: show icon-only contact buttons */
@media (max-width: 1199px) {
  .site-navigation {
    gap: 8px;
  }

  .site-navigation .site-branding {
    margin-right: auto !important;
  }

  .site-navigation .site-description {
    margin-right: 0 !important;
    margin-left: 16px !important;
    order: 3;
  }

  .header-contact-btn.widget_info {
    display: flex !important;
    visibility: visible !important;
    padding: 0 !important;
    margin: 0 !important;
  }

  .header-contact-btn .widget_content {
    display: none !important;
  }

  .header-contact-btn .widget_icon {
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
  }

  .header-contact-btn.widget_info:not(:last-child):before {
    display: none !important;
  }
}

/* Core value feature blocks below hero - let img-fluid handle proportional scaling */

/* Hero slider: prevent FOUC (flash of all slides stacked) before slick init */
.banner_slider:not(.slick-initialized) .slide:not(:first-child) {
  display: none;
}

/* Hero slider: dark background to hide white gaps during image load / animation */
.banner_slider_wrapper {
  overflow: hidden;
  background-color: #1b1a1a;
}

.banner_slider .slide {
  background-color: #1b1a1a;
}

/* Hero slide_img: ensure it covers the full slide (banner.css misses inset) */
.banner_slider .slide_img {
  inset: 0;
}

/* Hero dark overlay for text readability */
.banner_slider .slide_img::after {
  content: '';
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.4);
  z-index: 1;
}

/* News slider navigation - floating side arrows */
.news-slider-container {
  position: relative;
}

.news-slider-btn {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  z-index: 10;
  width: 40px;
  height: 40px;
  padding: 0;
  border-radius: 50%;
  border: none;
  background: rgba(0, 0, 0, 0.45);
  color: #fff;
  cursor: pointer;
  font-size: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  visibility: hidden;
  transition: all 0.3s ease;
}

.news-slider-container:hover .news-slider-btn {
  opacity: 1;
  visibility: visible;
}

.news-slider-btn:hover {
  background: var(--skin-color);
}

.news-slider-btn.prev {
  left: 10px;
}

.news-slider-btn.next {
  right: 10px;
}

@media (max-width: 767px) {
  .news-slider-btn {
    width: 34px;
    height: 34px;
    font-size: 12px;
    opacity: 1;
    visibility: visible;
  }
}

/* Hero - use template defaults, only minor tweaks */
.banner_slider .ttm-btn i {
  margin-left: 8px;
}
