/* WhatsApp Group HK - Based on Twenty Seventeen Theme */
*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  line-height: 1.15;
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  padding: 0;
  font-family: "Libre Franklin", "Helvetica Neue", helvetica, arial, sans-serif;
  font-size: 15px;
  line-height: 1.73;
  color: #333;
  background: #fff;
  -webkit-font-smoothing: antialiased;
}

a {
  color: #222;
  text-decoration: none;
  transition: color 0.15s ease-in-out;
}

a:hover,
a:focus {
  color: #767676;
}

h1, h2, h3, h4, h5, h6 {
  font-weight: 800;
  margin: 0 0 0.5em;
  line-height: 1.2;
}

img {
  max-width: 100%;
  height: auto;
  vertical-align: middle;
}

table {
  border-collapse: collapse;
  width: 100%;
}

/* Header */
.site-header {
  position: relative;
}

.custom-header {
  position: relative;
  background: #fafafa;
}

.site-branding {
  padding: 2em 0;
}

.site-branding .wrap {
  max-width: 1000px;
  margin: 0 auto;
  padding: 0 2em;
  display: flex;
  align-items: center;
  flex-wrap: wrap;
}

.custom-logo-link {
  display: inline-block;
  margin-right: 1em;
}

.custom-logo {
  width: 80px;
  height: 80px;
  border-radius: 8px;
}

.site-branding-text {
  flex: 1;
  min-width: 200px;
}

.site-title {
  font-size: 2rem;
  font-weight: 800;
  margin: 0;
  line-height: 1.2;
}

.site-title a {
  color: #333;
}

.site-title a:hover {
  color: #767676;
}

.site-description {
  color: #767676;
  font-size: 0.875rem;
  margin: 0.25em 0 0;
}

/* Main Content */
.site-content-contain {
  background: #fff;
}

.site-content {
  max-width: 1000px;
  margin: 0 auto;
  padding: 2.5em 2em;
}

.page-header {
  margin-bottom: 1.5em;
}

.entry-title {
  font-size: 1.75rem;
  color: #333;
  margin-bottom: 0.5em;
}

.entry-content {
  margin-top: 1em;
}

.entry-content h1 {
  font-size: 1.5rem;
  margin: 1em 0 0.5em;
}

/* Group Listing Table */
.group-heading {
  color: #339966;
  font-size: 1.5rem;
  margin: 0.5em 0;
}

.group-table {
  width: 100%;
  margin: 1em 0 2em;
}

.group-table tr {
  border-bottom: 1px solid #eee;
  transition: background 0.15s;
}

.group-table tr:hover {
  background: #f9f9f9;
}

.group-table td {
  padding: 0;
  vertical-align: middle;
}

.group-table td:first-child {
  width: auto;
}

.group-table td:last-child {
  width: 80px;
  text-align: center;
}

.group-table .crop {
  overflow: hidden;
  height: 50px;
  line-height: 50px;
  padding: 0 10px;
}

.group-table .crop a {
  color: #333;
  font-size: 0.95rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  display: block;
}

.group-table .crop a:hover {
  color: #25D366;
}

.group-table td:last-child a {
  display: inline-block;
  background: #25D366;
  color: #fff;
  padding: 6px 16px;
  border-radius: 4px;
  font-size: 0.85rem;
  font-weight: 600;
  transition: background 0.15s;
}

.group-table td:last-child a:hover {
  background: #128C7E;
  color: #fff;
}

/* CTA Links Section */
.cta-section {
  margin: 2em 0;
  padding: 1.5em;
  background: #f9f9f9;
  border-radius: 8px;
}

.cta-section h1 {
  margin: 0.75em 0 0.25em;
}

.cta-section h1:first-child {
  margin-top: 0;
}

.cta-section a {
  word-break: break-all;
}

.green-text {
  color: #339966;
}

.blue-text {
  color: #3366ff;
}

/* Sharing */
.sharing-buttons {
  margin: 2em 0;
  padding: 1em 0;
  border-top: 1px solid #eee;
}

.sharing-buttons h3 {
  font-size: 0.9rem;
  color: #767676;
  margin-bottom: 0.75em;
}

.share-btn {
  display: inline-block;
  padding: 8px 20px;
  border-radius: 4px;
  color: #fff;
  font-size: 0.85rem;
  font-weight: 600;
  margin-right: 8px;
  transition: opacity 0.15s;
}

.share-btn:hover {
  opacity: 0.85;
  color: #fff;
}

.share-whatsapp {
  background: #25D366;
}

.share-telegram {
  background: #0088cc;
}

/* Detail Page */
.group-detail {
  display: flex;
  gap: 2em;
  flex-wrap: wrap;
}

.group-detail-main {
  flex: 2;
  min-width: 300px;
}

.group-detail-sidebar {
  flex: 1;
  min-width: 200px;
}

.group-detail-label {
  color: #3366ff;
  font-size: 1.1rem;
  font-weight: 800;
  margin: 1.25em 0 0.25em;
}

.group-detail-label:first-child {
  margin-top: 0;
}

.group-detail-value {
  margin: 0 0 0.5em;
  line-height: 1.6;
}

.group-detail-link a {
  color: #25D366;
  font-weight: 600;
  word-break: break-all;
}

.group-detail-link a:hover {
  color: #128C7E;
}

.join-btn {
  display: inline-block;
  background: #25D366;
  color: #fff;
  padding: 12px 32px;
  border-radius: 6px;
  font-size: 1rem;
  font-weight: 700;
  margin-top: 1em;
  transition: background 0.15s;
}

.join-btn:hover {
  background: #128C7E;
  color: #fff;
}

.group-image img {
  width: 100%;
  max-width: 300px;
  border-radius: 8px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

/* Post Navigation */
.post-navigation {
  margin: 2em 0;
  padding: 1em 0;
  border-top: 1px solid #eee;
  display: flex;
  justify-content: space-between;
}

.post-navigation a {
  color: #333;
  font-weight: 600;
}

.post-navigation a:hover {
  color: #25D366;
}

/* Sidebar Widgets */
.widget-area {
  margin-top: 2em;
  padding-top: 2em;
  border-top: 1px solid #eee;
}

.widget {
  margin-bottom: 2em;
}

.widget-title {
  font-size: 0.9rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: #767676;
  margin-bottom: 0.75em;
}

.widget ul {
  list-style: none;
  padding: 0;
  margin: 0;
}

.widget li {
  padding: 0.25em 0;
  border-bottom: 1px solid #f0f0f0;
}

.widget li a {
  color: #333;
  font-size: 0.9rem;
}

.search-form {
  display: flex;
}

.search-field {
  flex: 1;
  padding: 8px 12px;
  border: 1px solid #ddd;
  border-radius: 4px 0 0 4px;
  font-size: 0.9rem;
  outline: none;
}

.search-field:focus {
  border-color: #25D366;
}

.search-submit {
  background: #25D366;
  color: #fff;
  border: none;
  padding: 8px 16px;
  border-radius: 0 4px 4px 0;
  cursor: pointer;
  font-weight: 600;
}

.search-submit:hover {
  background: #128C7E;
}

/* Footer */
.site-footer {
  background: #222;
  color: #999;
  padding: 2em 0;
}

.site-footer .wrap {
  max-width: 1000px;
  margin: 0 auto;
  padding: 0 2em;
  text-align: center;
}

.site-footer a {
  color: #ccc;
}

.site-footer a:hover {
  color: #fff;
}

/* Call Now Button */
.call-now-bar {
  display: none;
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  background: #009900;
  color: #fff;
  text-align: center;
  padding: 10px;
  z-index: 10;
  font-weight: 600;
}

.call-now-bar a {
  color: #fff;
  text-decoration: none;
}

/* Search & Filter */
.search-bar {
  margin: 1em 0;
  padding: 0;
}

.search-bar input {
  width: 100%;
  padding: 12px 16px;
  border: 2px solid #ddd;
  border-radius: 8px;
  font-size: 1rem;
  outline: none;
  transition: border-color 0.15s;
}

.search-bar input:focus {
  border-color: #25D366;
}

.search-bar input::placeholder {
  color: #aaa;
}

/* Pagination */
.pagination {
  margin: 2em 0;
  text-align: center;
}

.pagination a,
.pagination span {
  display: inline-block;
  padding: 6px 12px;
  margin: 2px;
  border-radius: 4px;
  font-size: 0.9rem;
}

.pagination a {
  background: #f0f0f0;
  color: #333;
}

.pagination a:hover {
  background: #25D366;
  color: #fff;
}

.pagination .current {
  background: #25D366;
  color: #fff;
  font-weight: 700;
}

/* Breadcrumb */
.breadcrumb {
  font-size: 0.85rem;
  color: #767676;
  margin-bottom: 1em;
}

.breadcrumb a {
  color: #767676;
}

.breadcrumb a:hover {
  color: #25D366;
}

.breadcrumb .separator {
  margin: 0 0.4em;
}

/* Responsive */
@media (max-width: 768px) {
  .site-branding .wrap {
    padding: 0 1em;
    text-align: center;
    flex-direction: column;
  }

  .custom-logo-link {
    margin-right: 0;
    margin-bottom: 0.5em;
  }

  .site-title {
    font-size: 1.5rem;
  }

  .site-content {
    padding: 1.5em 1em;
  }

  .group-table .crop {
    max-width: 200px;
  }

  .group-detail {
    flex-direction: column;
  }

  .call-now-bar {
    display: block;
  }

  .post-navigation {
    flex-direction: column;
    gap: 0.5em;
  }
}

@media (max-width: 480px) {
  .site-title {
    font-size: 1.25rem;
  }

  .group-table .crop {
    max-width: 150px;
  }

  .entry-title {
    font-size: 1.25rem;
  }
}

/* Back to top */
.back-to-top {
  position: fixed;
  bottom: 60px;
  right: 20px;
  background: #25D366;
  color: #fff;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.2rem;
  box-shadow: 0 2px 8px rgba(0,0,0,0.2);
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.3s, visibility 0.3s;
  cursor: pointer;
  z-index: 5;
  border: none;
}

.back-to-top.visible {
  opacity: 1;
  visibility: visible;
}

.back-to-top:hover {
  background: #128C7E;
  color: #fff;
}

/* Group count badge */
.group-count {
  display: inline-block;
  background: #25D366;
  color: #fff;
  padding: 2px 12px;
  border-radius: 12px;
  font-size: 0.85rem;
  font-weight: 600;
  margin-left: 0.5em;
  vertical-align: middle;
}
