/*
Theme Name: kingwoodsnews-child-theme
Template: generatepress
Version: 1.0
Author: KingwoodsNews Team
*/

/* =============================
   ✅ Typography & Font Styling
============================= */
body, p, a, li, span, div, h1, h2, h3, h4, h5, h6, input, button, textarea {
  font-family: Latha, Arial, sans-serif !important;
  font-size: 16px;
  font-weight: 400;
  line-height: 1.6;
  letter-spacing: 0.5px;
  color: #111111;
  word-break: break-word;
}

.entry-content * {
  font-family: 'Noto Sans Tamil', Latha, sans-serif;
}

.entry-content *:not(:lang(ta)) {
  font-family: Arial, sans-serif !important;
}

h1, h2, h3, h4, h5, h6 {
  font-weight: 600;
  line-height: 1.3;
  margin-bottom: 0.5em;
  color: #1a1a1a;
}

p {
  margin-bottom: 1em;
}

/* =============================
   ✅ Link Styling
============================= */
a {
  color: #b91c1c;
  text-decoration: none;
  transition: color 0.3s ease;
}
a:hover, a:focus {
  color: #991b1b;
  text-decoration: underline;
}

/* =============================
   ✅ Image Styling
============================= */
.single .entry-content img {
  display: block;
  margin-bottom: 15px;
  max-width: 100%;
  height: auto;
  border-radius: 6px;
}

img + h3, img + h2 {
  margin-top: 0.5em;
  font-weight: 600;
}

/* =============================
   ✅ Horizontal Category Bar
============================= */
.horizontal-category-bar {
  background-color: #b91c1c;
  overflow-x: auto;
  white-space: nowrap;
  scrollbar-width: none;
  -ms-overflow-style: none;
  margin-bottom: 20px;
}
.horizontal-category-bar::-webkit-scrollbar {
  display: none;
}
.horizontal-category-bar ul {
  display: flex;
  gap: 6px;
  padding: 07px 10px 07px 15px;
  margin: 0;
  list-style: none;
}
.horizontal-category-bar li {
  flex-shrink: 0;
}
.horizontal-category-bar a {
  color: white;
  font-size: 14px;
  padding: 6px 12px;
  background-color: #b91c1c;
  border-radius: 4px;
  font-weight: 700;
  font-family: 'Noto Sans Tamil', Latha, sans-serif;
  transition: background-color 0.3s ease;
  display: inline-block;
}
.horizontal-category-bar a:hover {
  background-color: #dc2626;
  text-decoration: underline;
}
.horizontal-category-bar a.active {
  background-color: #991b1b;
  text-decoration: underline;
}

/* =============================
   ✅ Post Cards (Loop)
============================= */
.loop-small-card-link {
  text-decoration: none;
  color: #000;
}

.loop-small-card-img {
  width: 100%;
  border-radius: 6px;
  margin-bottom: 6px;
}

.loop-small-card-title {
  font-size: 15px;
  font-weight: 600;
  margin: 0 0 4px;
  font-family: 'Noto Sans Tamil', Latha, sans-serif;
}

.meta-line {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 4px;
  font-size: 13px;
  color: #666;
  font-family: 'Noto Sans Tamil', Latha, sans-serif;
  flex-wrap: wrap;
  gap: 6px;
}

.meta-category {
  color: #1e40af;
  font-weight: 500;
  text-decoration: none;
}
.meta-category:hover {
  text-decoration: underline;
}

/* =============================
   ✅ Pagination
============================= */
.pagination-wrap {
  display: flex;
  justify-content: center;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
  margin: 30px auto 0;
  text-align: center;
  width: 100%;
}
.pagination-wrap a,
.pagination-wrap span {
  padding: 6px 12px;
  border: 1px solid #ccc;
  border-radius: 4px;
  font-weight: 600;
  text-decoration: none;
  color: #1a1a1a;
}
.pagination-wrap a:hover {
  background-color: #eee;
}
.pagination-wrap .current,
.pagination-wrap .current-page {
  background-color: #b91c1c;
  color: #fff;
  border-color: #b91c1c;
}

/* =============================
   ✅ Share Buttons
============================= */
.custom-share-container {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px;
  margin: 20px 0;
}
.share-icons {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}
.share-icons .icon {
  width: 42px;
  height: 42px;
  border-radius: 50%;
  display: inline-block;
  background-size: 60%;
  background-repeat: no-repeat;
  background-position: center;
  cursor: pointer;
  border: none;
  outline: none;
}
.icon.whatsapp {
  background-color: #25D366;
  background-image: url('https://img.icons8.com/ios-filled/50/ffffff/whatsapp.png');
}
.icon.facebook {
  background-color: #3b5998;
  background-image: url('https://img.icons8.com/ios-filled/50/ffffff/facebook--v1.png');
}
.icon.telegram {
  background-color: #0088cc;
  background-image: url('https://img.icons8.com/ios-filled/50/ffffff/telegram-app.png');
}
.icon.x {
  background-color: #000000;
  background-image: url('https://img.icons8.com/ios-filled/50/ffffff/x--v1.png');
}
.icon.copylink {
  background-color: #4b5563;
  background-image: url('https://img.icons8.com/ios-filled/50/ffffff/link.png');
}
.icon.native {
  display: inline-block;
  position: relative;
  width: 80px;
  height: 40px;
  background-color: #d71920;
  border-radius: 20px;
  box-shadow: 0 2px 4px rgba(0,0,0,0.15);
  cursor: pointer;
}
.icon.native::after {
  content: "Share";
  position: absolute;
  top: 50%;
  left: 10%;
  transform: translateY(-50%);
  font-size: 15px;
  color: #ffffff;
  font-weight: bold;
  font-family: Arial, sans-serif;
}
.icon.native::before {
  content: "";
  position: absolute;
  top: 50%;
  left: 79%;
  transform: translate(-50%, -50%);
  width: 17px;
  height: 17px;
  background-image: url('https://img.icons8.com/ios-filled/50/ffffff/share.png');
  background-size: contain;
  background-repeat: no-repeat;
}

/* =============================
   ✅ Share Button Reset (All Browsers)
============================= */
.share-btn {
  all: unset;
  background: none !important;
  border: none !important;
  padding: 4px !important;
  margin: 0 !important;
  cursor: pointer;
  display: inline-flex !important;
  align-items: center;
  justify-content: center;
  appearance: none !important;
  box-shadow: none !important;
  border-radius: 0 !important;
}

/* ✅ Optional: Share Icon Consistency */
.share-btn svg {
  width: 18px;
  height: 18px;
  fill: #6b7280 !important; /* Tailwind gray-500 */
}

/* =============================
   ✅ Horizontal Category Bar
   (Sticky – Scroll Padding Adjust)
============================= */
.horizontal-category-bar {
  background-color: #b91c1c;
  overflow-x: auto;
  white-space: nowrap;
  scrollbar-width: none;
  -ms-overflow-style: none;
  margin-bottom: 20px;

  /* ✅ Sticky Style */
  position: sticky;
  top: 0;
  z-index: 999;
}
.horizontal-category-bar {
  box-shadow: 0 1px 5px rgba(0,0,0,0.1);
}
.horizontal-category-bar {
  scroll-behavior: smooth;
}

/* 🔸 Author link black but underline on hover */
.author-link {
  color: #333;
  font-weight: bold;
  text-decoration: underline; /* ✅ add underline */
}

.author-link:hover {
  color: #007BFF; /* Optional: blue on hover */
}

@media (max-width: 600px) {
  .author-info-box {
    flex-direction: column;
    align-items: center; /* ✅ center align all content */
    text-align: center;  /* ✅ center text inside box */
  }

  .author-image {
    margin: 0 !important;
    margin-bottom: 10px;
    width: 100%;
    text-align: center;
  }

  .author-image img {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    display: inline-block;
  }

  .author-text {
    width: 100%;
    text-align: center; /* ✅ center text under image */
  }
}
.author-link {
  text-decoration: underline !important;
}

/* Archive Grid */
.archive-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 20px;
  margin-top: 20px;
}
@media (max-width: 1024px) {
  .archive-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}
@media (max-width: 600px) {
  .archive-grid {
    grid-template-columns: 1fr;
  }
}

/* Latest Posts Grid - சற்றுமுன் */
.latest-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);  /* 4 columns */
  gap: 20px;
  margin-top: 20px;
}

/* Tablet & Medium screens */
@media (max-width: 1024px) {
  .latest-grid {
    grid-template-columns: repeat(2, 1fr); /* 2 columns */
  }
}

/* Mobile screens */
@media (max-width: 600px) {
  .latest-grid {
    grid-template-columns: 1fr; /* 1 column */
  }
}
