/* Floating Section Container */
.zzbaimaozi-floating-section {
  position: fixed;
  right: 20px;
  top: 50%;
  transform: translateY(-50%);
  z-index: 9999;
  background-color: var(--e-global-color-primary);
  border-radius: 10px;
  padding: 10px;
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

/* Remove list item markers */
.zzbaimaozi-floating-section ul {
  list-style: none !important;
  margin: 0;
  padding: 0 !important;
}

/* Floating Items */
.zzbaimaozi-floating-item {
  position: relative;
  margin: 10px 0;
  text-align: center;
  cursor: pointer;
  font-size: 20px;
  transition: all 0.3s ease;
}

.zzbaimaozi-floating-item a {
  text-decoration: none;
  display: inline-block;
  color: #fff; /* Default icon color */
  transition: color 0.3s ease;
}

.zzbaimaozi-floating-item a:hover {
  color: var(--e-global-color-accent); /* Elementor accent color on hover */
}

/* Hover Content */
.zzbaimaozi-hover-content {
  display: none;
  position: absolute;
  left: -280px;
  top: 50%;
  transform: translateY(-50%);
  background-color: var(--e-global-color-primary);
  color: var(--e-global-color-secondary);
  padding: 10px;
  border-radius: 5px;
  white-space: nowrap;
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
  transition: opacity 0.3s ease, visibility 0.3s ease;
  opacity: 0;
  visibility: hidden;
}

.zzbaimaozi-floating-item:hover .zzbaimaozi-hover-content {
  display: block;
  opacity: 1;
  visibility: visible;
}

/* Weixin Hover Image */
.zzbaimaozi-hover-content img {
  width: 260px;
  height: 260px;
  object-fit: cover;
  border-radius: 5px;
}

/* Back to Top Icon */
#zzbaimaozi-back-to-top a {
  cursor: pointer;
}

/* Phone Hover Content */
li#zzbaimaozi-phone .zzbaimaozi-hover-content {
  width: 260px !important;
  left: -270px !important;
}

/* Email Hover Content */
li#zzbaimaozi-email .zzbaimaozi-hover-content {
  left: -270px !important;
  width: 260px !important;
}

/* WhatsApp Hover Content */
li#zzbaimaozi-whatsapp .zzbaimaozi-hover-content {
  left: -270px !important;
  width: 260px !important;
}

/* Links Inside Hover Content */
span.zzbaimaozi-hover-content a {
  text-decoration: none !important;
  color: #fff;
  text-align: right !important;
  font-weight: bold;
  transition: color 0.3s ease;
}

span.zzbaimaozi-hover-content a:hover {
  color: var(--e-global-color-accent);
}

/* Icon Hover Effects */
.zzbaimaozi-floating-item:hover i {
  color: #FD7E14 !important; /* Change icon color to blue on hover */
}

/* Weixin Icon Styling */
i.fab.fa-weixin {
  color: #fff !important; /* Default color for Weixin icon */
}

i.fab.fa-weixin:hover {
  color: #FD7E14 !important; /* Change Weixin icon color to blue on hover */
}

/* General Icon Styling */
.zzbaimaozi-floating-section li i {
  font-size: 20px; /* Icon size */
  color: #fff; /* Default icon color */
  transition: color 0.3s ease; /* Smooth transition for hover effects */
}

.zzbaimaozi-floating-section li i:hover {
  /* Change icon color to Elementor accent color color: var(--e-global-color-accent);  on hover */
  color: #FD7E14 !important;
}

/* Persistent Hover Content Visibility */
.zzbaimaozi-hover-content:hover {
  display: block;
  opacity: 1;
  visibility: visible;
}

/* Adjustments for Smaller Screens */
@media (max-width: 768px) {
  .zzbaimaozi-floating-section {
    right: 10px; /* Adjust position for smaller screens */
  }

  .zzbaimaozi-hover-content {
    left: -260px; /* Adjust hover content position */
    width: 260px; /* Reduce width for smaller screens */
  }

  .zzbaimaozi-hover-content img {
    width: 260px;
    height: 220px;
  }
}

/* Adjustments for Larger Screens */
@media (min-width: 1200px) {
  .zzbaimaozi-hover-content {
    left: -300px; /* Adjust hover content position for larger screens */
    width: 280px; /* Increase width for larger screens */
  }

  .zzbaimaozi-hover-content img {
    width: 280px;
    height: 280px;
  }
}











 


/* Container for the child posts grid */
.cf-child-posts-grid {
    /* The !important tag forces the 3-column layout to override Elementor */
    display: grid !important;
    grid-template-columns: repeat(3, 1fr) !important; 
    
    /* 3. Increased the gap between each child post listing */
    gap: 50px !important; 
    margin: 20px 0;
}

/* Responsive formatting for tablets and smaller screens */
@media (max-width: 992px) {
    .cf-child-posts-grid {
        grid-template-columns: repeat(2, 1fr) !important;
    }
}

@media (max-width: 768px) {
    .cf-child-posts-grid {
        grid-template-columns: 1fr !important;
    }
}

/* Individual post card styling */
.cf-child-post-card {
    background: #ffffff;
    border: 1px solid #eaeaea;
    border-radius: 8px;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    transition: box-shadow 0.3s ease, transform 0.3s ease;
    box-shadow: 0 4px 6px rgba(0,0,0,0.04);
    width: 100% !important;
}

.cf-child-post-card:hover {
    box-shadow: 0 8px 15px rgba(0,0,0,0.1);
    transform: translateY(-3px);
}

/* Image wrapper and image styling */
.cf-child-post-image-link {
    display: block;
    width: 100%;
    height: 220px;
    overflow: hidden;
    margin-bottom: 0 !important; 
    padding-bottom: 0 !important;
}

.cf-child-image {
    width: 100%;
    height: 100%;
    object-fit: cover; 
    display: block;
    transition: transform 0.3s ease;
    margin: 0 !important;
    padding: 0 !important;
}

.cf-child-post-card:hover .cf-child-image {
    transform: scale(1.05); 
}

/* Placeholder for posts without images */
.cf-placeholder-image {
    width: 100%;
    height: 100%;
    background-color: #f5f5f5;
}

/* Text Content Area */
.cf-child-post-content {
    /* 2.1 Reduced top padding (10px) to drastically reduce the space between the image and title */
    padding: 10px 20px 20px 20px !important; 
    display: flex;
    flex-direction: column;
    flex-grow: 1;
}

/* Title Styling */
.cf-child-post-title {
    font-size: 1.25rem;
    /* 2.2 Reduced bottom margin (4px) to drastically reduce space between the title and the excerpt */
    margin: 0 0 4px 0 !important; 
    padding: 0 !important;
    line-height: 1.3;
}

.cf-child-post-title a {
    color: #222222;
    text-decoration: none;
    transition: color 0.2s ease;
}

.cf-child-post-title a:hover {
    color: #0056b3; 
}

/* Excerpt Styling */
.cf-child-post-excerpt {
    font-size: 0.95rem;
    color: #666666;
    line-height: 1.6;
    margin: 0 !important;
    padding: 0 !important;
}
