/* Base Reset & Layout */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: "Poppins", "Inter", "Segoe UI", sans-serif;
  background: #f4f4f4;
  color: #2e2e2e;
  padding: 1.5rem;
  max-width: 980px;
  margin: 0 auto;
  line-height: 1.7;
}

/* Header */
header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: #ffffff;
  padding: 1.2rem 1.5rem;
  border-radius: 16px;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.03);
  margin-bottom: 2rem;
  flex-wrap: wrap;
}

header img.logo {
  height: 52px;
  max-width: 150px;
}
.pagination {
    display: flex;
    gap: 8px;
    align-items: center;
    justify-content: center;
    flex-wrap: wrap;
    margin-top: 20px;
    font-family: sans-serif;
}

.pagination a {
    padding: 6px 12px;
    text-decoration: none;
    background: #f0f0f0;
    color: #333;
    border-radius: 5px;
    border: 1px solid #ddd;
    transition: background 0.2s ease;
}

.pagination a:hover {
    background: #e0e0e0;
}

.pagination .current {
    padding: 6px 12px;
    background: #007bff;
    color: white;
    border-radius: 5px;
    border: 1px solid #007bff;
}

.pagination .dots {
    padding: 6px 10px;
    color: #999;
}


nav {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  margin-top: 0.5rem;
}

nav a {
  font-weight: 600;
  font-size: 0.9rem;
  color: #1c2833;
  text-decoration: none;
  padding: 6px 10px;
  border-radius: 8px;
  transition: background 0.2s ease, color 0.2s;
}

nav a:hover {
  background-color: rgba(43, 93, 255, 0.08);
  color: #1a3ecf;
}

/* Cards */
.affair-card {
  background: #ffffff;
  border-radius: 16px;
  padding: 1.5rem 1.6rem;
  margin-bottom: 1.5rem;
  border: 1px solid #e6eaf0;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.03);
  transition: transform 0.2s, box-shadow 0.2s;
}
h1 {
  display: flex;
  align-items: center;
  gap: 0.6rem; /* spacing between icon and text */
  font-size: 1.8rem;
  font-weight: 600;
  margin-bottom: 10px;
  border-left: 4px solid #cb4335; /* red left border */
  padding-left: 12px; /* spacing between border and text */
}


.affair-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 12px 20px rgba(0, 0, 0, 0.05);
}

.affair-card h2 {
  font-size: 1.35rem;
  margin-bottom: 0.4rem;
  font-weight: 600;
  color: #212121;
}

.affair-card h2 a {
  color: #1e40af;
  text-decoration: none;
}

.affair-card h2 a:hover {
  text-decoration: underline;
}

.meta {
  font-size: 0.85rem;
  color: #1a5276;
  margin-bottom: 0.9rem;
  display: flex;
  flex-wrap: wrap;
  gap: 0.8rem;
  opacity: 0.85;
}

.excerpt {
  font-size: 1.02rem;
  margin-bottom: 1rem;
  color: #3d3d3d;
}

a.read-more {
  font-weight: 600;
  color: #1565c0;
  text-decoration: none;
  font-size: 0.95rem;
}

a.read-more:hover {
  text-decoration: underline;
}

/* Detail Article */
.affair-detail {
  background: #ffffff;
  padding: 1.5rem;
  border-radius: 16px;
  border: 1px solid #e0e0e0;
  box-shadow: 0 8px 18px rgba(0, 0, 0, 0.035);
}
#date {
  display: inline-flex;
  align-items: center;
  gap: 6px; /* space between SVG and text */
  font-size: 0.95rem;
  color: #444;
}

#date svg {
 
  fill: currentColor; /* optional: makes SVG take text color */
}

.detail-title {
  font-size: 1.4rem;
  font-weight: 600;
  color: red;
  margin-bottom: 0.7rem;
}

.detail-content {
  font-size: 1rem;
  color: #333;
  margin-top: 1rem;
  line-height: 1.75; /* balanced default */
  white-space: normal; /* change from pre-line for auto structure */
  word-wrap: break-word;
  overflow-wrap: break-word;
  text-align: justify;
}

/* Smart fallback: If content has long unbroken sections or multiple empty lines */
.detail-content p,
.detail-content ul,
.detail-content li {
  line-height: 1.75;
  margin-bottom: 0.75rem;
}

/* Prevent excessive gaps caused by empty tags or double spacing */
.detail-content p:empty,
.detail-content br + br {
  display: none;
}

/* Handle accidental double spacing or misaligned nesting */
.detail-content * {
  margin-top: 0;
  margin-bottom: 0;
}

/* Make headings visually aligned and structured */
.detail-content h2,
.detail-content h3,
.detail-content h4 {
  margin-top: 1.2rem;
  margin-bottom: 0.6rem;
  font-weight: 600;
  line-height: 1.4;
}

/* Ensure list indentation is visible */
.detail-content ul {
  padding-left: 1.2rem;
  list-style-type: disc;
}
.detail-content ul ul {
  list-style-type: circle;
}

.detail-image {
  width: 100%;
  max-width: 820px;
  height: 420px;
  overflow: hidden;
  border-radius: 12px;
  margin: 24px 0;
  display: flex;
  justify-content: center;
  align-items: center;
  background-color: #f0f2f5;
}

.detail-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  display: block;
}

.source-link {
  margin-top: 2rem;
  font-size: 0.95rem;
  color: #4a4a4a;
}

.source-link a {
  color: #0d6efd;
  text-decoration: underline;
}

.live-views {
 
 color: green;

}
.live-dot {
  display: inline-block;
  height: 8px;
  width: 8px;
  background-color: red;
  border-radius: 50%;
  margin-right: 8px;
  animation: blink 1.2s infinite;
  vertical-align: middle;
}

@keyframes blink {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.4; }
}

.share-section {
  margin-top: 2rem;
  border-top: 1px solid #e0e0e0;
  padding-top: 1rem;
}

.share-section h3 {
  font-size: 1.1rem;
  margin-bottom: 0.5rem;
  color: #333;
}

.share-buttons {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
}

.share-btn {
  text-decoration: none;
  padding: 6px 12px;
  border-radius: 6px;
  color: #fff;
  font-size: 0.9rem;
  font-weight: 500;
  transition: background 0.3s ease;
}

.share-btn.whatsapp { background-color: #25D366; }
.share-btn.twitter { background-color: #1DA1F2; }
.share-btn.telegram { background-color: #0088cc; }
.share-btn.facebook { background-color: #4267B2; }
.share-btn.linkedin { background-color: #0077B5; }

.share-btn:hover {
  opacity: 0.9;
}
.share-btn i {
  margin-right: 6px;
  vertical-align: middle;
}




/* Not Found */
.not-found {
  text-align: center;
  background: #fff;
  padding: 3rem 2rem;
  border-radius: 16px;
  box-shadow: 0 6px 14px rgba(0, 0, 0, 0.04);
}

.not-found h2 {
  font-size: 1.9rem;
  margin-bottom: 1rem;
}

.not-found a.read-more {
  font-size: 1rem;
  color: #007bff;
  text-decoration: none;
  font-weight: 600;
}

.not-found a.read-more:hover {
  text-decoration: underline;
}

/* Footer */
footer {
  text-align: center;
  margin-top: 3rem;
  padding-top: 2rem;
  font-size: 0.9rem;
  color: #999;
  border-top: 1px solid #ddd;
}

.detail-image-wrapper {
  text-align: center;
  margin: 20px 0;
  position: relative;
}

.detail-image {
  position: relative;
  display: inline-block;
  cursor: pointer;
}

.detail-image img {
  max-width: 100%;
  border-radius: 6px;
  transition: transform 0.3s ease;
}

.detail-image:hover img {
  transform: scale(1.01);
}

.click-overlay {
  position: absolute;
  bottom: 10px;
  left: 50%;
  transform: translateX(-50%);
  background: rgba(0, 119, 204, 0.8);
  color: #fff;
  padding: 5px 12px;
  border-radius: 20px;
  font-size: 0.9rem;
  animation: pulse 1.5s infinite;
  pointer-events: none; /* allow clicks to pass through to the image */
}

@keyframes pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.6; }
}

/* Modal styling */
.modal {
  display: none;
  position: fixed;
  z-index: 10000;
  padding-top: 60px;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  overflow: auto;
  background-color: rgba(0,0,0,0.85);
}

.modal-content {
  margin: auto;
  display: block;
  max-width: 90%;
  max-height: 80vh;
  border-radius: 6px;
}

.close {
  position: absolute;
  top: 25px;
  right: 40px;
  color: #fff;
  font-size: 35px;
  font-weight: bold;
  cursor: pointer;
}


/* Responsive */
@media (max-width: 600px) {
  body {
    padding: 1rem;
  }

  .affair-card,
  .affair-detail {
    padding: 1.2rem;
  }

  header {
    flex-direction: column;
    align-items: flex-start;
    gap: 1rem;
  }

  nav {
    justify-content: flex-start;
    gap: 0.8rem;
  }

  .detail-title {
    font-size: 1.4rem;
  }
  .detail-content {
    text-align: left;
    margin-left: 0;
    margin-right: 0;
  }
  
}



