/*
Theme Name: GeneratePress Child - Discover Pro
Theme URI: https://github.com/custom/gp-discover-pro
Description: Super-customized, ultra-fast, mobile-first Google Discover optimized child theme for GeneratePress. Built specifically for high-retention news, yojana, education, and career blogs. Zero CLS, LCP < 1s, verified E-E-A-T author cards, 16:9 image ratios, and high-CTR social join buttons.
Author: Discover Pro Studio
Author URI: https://generatepress.com
Template: generatepress
Version: 1.0.0
Text Domain: gp-discover-pro
*/

/* -------------------------------------------------------------------------
 * 1. CSS VARIABLES & COLOR PALETTE (Modern 2026 Mobile UI)
 * ------------------------------------------------------------------------- */
:root {
  --gp-primary: #1a73e8;
  --gp-primary-hover: #1557b0;
  --gp-primary-light: #e8f0fe;
  --gp-accent-green: #25D366;
  --gp-accent-telegram: #0088cc;
  --gp-accent-orange: #f26522;
  --gp-accent-red: #e50914;
  --gp-dark: #1e293b;
  --gp-dark-text: #0f172a;
  --gp-muted: #64748b;
  --gp-light-bg: #f8fafc;
  --gp-border: #e2e8f0;
  --gp-card-bg: #ffffff;
  --gp-shadow-sm: 0 1px 3px rgba(0,0,0,0.06), 0 1px 2px rgba(0,0,0,0.04);
  --gp-shadow-md: 0 4px 6px -1px rgba(0,0,0,0.08), 0 2px 4px -1px rgba(0,0,0,0.04);
  --gp-shadow-lg: 0 10px 15px -3px rgba(0,0,0,0.08), 0 4px 6px -2px rgba(0,0,0,0.03);
  --gp-radius-sm: 6px;
  --gp-radius-md: 10px;
  --gp-radius-lg: 16px;
  --gp-radius-pill: 9999px;
  --gp-font-stack: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

/* -------------------------------------------------------------------------
 * 2. SPEED & CORE WEB VITALS OPTIMIZATIONS
 * ------------------------------------------------------------------------- */
html {
  scroll-behavior: smooth;
  font-family: var(--gp-font-stack);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body {
  background-color: #f1f5f9;
  color: var(--gp-dark-text);
  overflow-x: hidden;
}

/* Pre-reserve ad spaces to prevent CLS (Cumulative Layout Shift) */
.gp-ad-slot-reserved {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  background-color: var(--gp-light-bg);
  border: 1px dashed var(--gp-border);
  border-radius: var(--gp-radius-md);
  margin: 22px auto;
  text-align: center;
  overflow: hidden;
  position: relative;
  max-width: 100%;
}

.gp-ad-slot-reserved::before {
  content: "ADVERTISEMENT";
  font-size: 10px;
  font-weight: 600;
  color: #94a3b8;
  letter-spacing: 1px;
  margin-bottom: 6px;
  text-transform: uppercase;
}

.gp-ad-header { min-height: 90px; width: 100%; max-width: 728px; }
.gp-ad-incontent { min-height: 280px; width: 100%; max-width: 336px; }
.gp-ad-bottom { min-height: 250px; width: 100%; max-width: 336px; }

/* -------------------------------------------------------------------------
 * 3. MOBILE APP CATEGORY CHIPS SLIDER (Horizontal Scrollable Ribbon)
 * ------------------------------------------------------------------------- */
.gp-category-slider-wrap {
  background: #ffffff;
  border-bottom: 1px solid var(--gp-border);
  position: sticky;
  top: 0;
  z-index: 99;
  box-shadow: 0 2px 4px rgba(0,0,0,0.03);
}

.gp-category-slider {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 14px;
  overflow-x: auto;
  white-space: nowrap;
  scrollbar-width: none;
  -ms-overflow-style: none;
  -webkit-overflow-scrolling: touch;
}

.gp-category-slider::-webkit-scrollbar {
  display: none;
}

.gp-cat-chip {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 6px 14px;
  font-size: 13px;
  font-weight: 600;
  color: var(--gp-dark);
  background: var(--gp-light-bg);
  border: 1px solid var(--gp-border);
  border-radius: var(--gp-radius-pill);
  text-decoration: none;
  transition: all 0.2s ease-in-out;
  flex-shrink: 0;
}

.gp-cat-chip:hover,
.gp-cat-chip.active {
  background: var(--gp-primary);
  color: #ffffff;
  border-color: var(--gp-primary);
  transform: translateY(-1px);
}

.gp-cat-chip .pulse-dot {
  width: 7px;
  height: 7px;
  background-color: var(--gp-accent-red);
  border-radius: 50%;
  display: inline-block;
  animation: pulse-red 1.5s infinite;
}

@keyframes pulse-red {
  0% { transform: scale(0.95); box-shadow: 0 0 0 0 rgba(229, 9, 20, 0.7); }
  70% { transform: scale(1); box-shadow: 0 0 0 6px rgba(229, 9, 20, 0); }
  100% { transform: scale(0.95); box-shadow: 0 0 0 0 rgba(229, 9, 20, 0); }
}

/* -------------------------------------------------------------------------
 * 4. DISCOVER FEED CARDS (Homepage & Archive View)
 * ------------------------------------------------------------------------- */
.blog .site-main,
.archive .site-main {
  max-width: 820px;
  margin: 0 auto;
}

/* Transform standard GP article cards */
.blog article.post,
.archive article.post {
  background: #ffffff;
  border-radius: var(--gp-radius-lg);
  overflow: hidden;
  margin-bottom: 20px;
  box-shadow: var(--gp-shadow-sm);
  border: 1px solid var(--gp-border);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.blog article.post:hover,
.archive article.post:hover {
  transform: translateY(-3px);
  box-shadow: var(--gp-shadow-md);
}

.blog .inside-article,
.archive .inside-article {
  padding: 0 !important;
}

/* 16:9 Image container for feed */
.blog .post-image,
.archive .post-image {
  margin: 0 !important;
  width: 100%;
  aspect-ratio: 16 / 9;
  background-color: #e2e8f0;
  overflow: hidden;
}

.blog .post-image img,
.archive .post-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 0.3s ease;
}

.blog article.post:hover .post-image img,
.archive article.post:hover .post-image img {
  transform: scale(1.03);
}

.blog .entry-header,
.archive .entry-header {
  padding: 16px 18px 6px 18px;
}

.blog .entry-title,
.archive .entry-title {
  font-size: 19px !important;
  font-weight: 700 !important;
  line-height: 1.4 !important;
  margin: 0 0 10px 0 !important;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.blog .entry-title a,
.archive .entry-title a {
  color: var(--gp-dark-text);
  text-decoration: none;
}

.blog .entry-title a:hover,
.archive .entry-title a:hover {
  color: var(--gp-primary);
}

.blog .entry-summary,
.archive .entry-summary {
  padding: 0 18px 16px 18px;
  font-size: 14px;
  color: var(--gp-muted);
  line-height: 1.5;
  margin: 0;
}

/* -------------------------------------------------------------------------
 * 5. SINGLE POST DISCOVER HERO & TOP BAR
 * ------------------------------------------------------------------------- */
.single .site-main {
  max-width: 800px;
  margin: 0 auto;
}

.single .inside-article {
  background: #ffffff;
  padding: 24px 28px !important;
  border-radius: var(--gp-radius-lg);
  border: 1px solid var(--gp-border);
  box-shadow: var(--gp-shadow-sm);
}

.gp-single-category {
  display: inline-block;
  background: var(--gp-primary-light);
  color: var(--gp-primary);
  font-size: 12px;
  font-weight: 700;
  padding: 4px 12px;
  border-radius: var(--gp-radius-pill);
  margin-bottom: 12px;
  text-transform: uppercase;
}

.single .entry-title {
  font-size: 27px !important;
  font-weight: 800 !important;
  line-height: 1.35 !important;
  color: var(--gp-dark-text);
  margin: 0 0 16px 0 !important;
}

@media (max-width: 640px) {
  .single .inside-article {
    padding: 16px 16px !important;
  }
  .single .entry-title {
    font-size: 21px !important;
    line-height: 1.38 !important;
  }
}

/* Author & Date Metadata Bar */
.gp-single-meta-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
  padding: 12px 0;
  border-top: 1px solid var(--gp-border);
  border-bottom: 1px solid var(--gp-border);
  margin-bottom: 16px;
  font-size: 13px;
}

.gp-author-flex {
  display: flex;
  align-items: center;
  gap: 10px;
}

.gp-author-avatar {
  width: 42px;
  height: 42px;
  border-radius: 50%;
  object-fit: cover;
  border: 2px solid var(--gp-primary-light);
}

.gp-author-info {
  display: flex;
  flex-direction: column;
}

.gp-author-name {
  font-weight: 700;
  color: var(--gp-dark-text);
  display: flex;
  align-items: center;
  gap: 4px;
}

.gp-verified-badge {
  color: var(--gp-primary);
  display: inline-flex;
}

.gp-publish-date {
  color: var(--gp-muted);
  font-size: 12px;
}

.gp-reading-stat {
  display: flex;
  align-items: center;
  gap: 5px;
  background: var(--gp-light-bg);
  padding: 5px 12px;
  border-radius: var(--gp-radius-pill);
  font-weight: 600;
  color: var(--gp-dark);
}

/* -------------------------------------------------------------------------
 * 6. SOCIAL COMMUNITY JOIN BAR (WhatsApp & Telegram High-CTR)
 * ------------------------------------------------------------------------- */
.gp-social-join-container {
  background: linear-gradient(135deg, #f0fdf4 0%, #f0f9ff 100%);
  border: 1px solid #bbf7d0;
  border-radius: var(--gp-radius-md);
  padding: 14px 16px;
  margin: 16px 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
}

.gp-social-join-text {
  display: flex;
  flex-direction: column;
}

.gp-social-title {
  font-size: 14px;
  font-weight: 700;
  color: #166534;
  display: flex;
  align-items: center;
  gap: 6px;
}

.gp-social-desc {
  font-size: 12px;
  color: #15803d;
  margin-top: 2px;
}

.gp-social-buttons {
  display: flex;
  align-items: center;
  gap: 8px;
}

.gp-btn-whatsapp,
.gp-btn-telegram {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 14px;
  border-radius: var(--gp-radius-pill);
  font-size: 13px;
  font-weight: 700;
  color: #ffffff !important;
  text-decoration: none;
  box-shadow: 0 2px 4px rgba(0,0,0,0.1);
  transition: transform 0.15s ease;
}

.gp-btn-whatsapp { background-color: var(--gp-accent-green); }
.gp-btn-telegram { background-color: var(--gp-accent-telegram); }

.gp-btn-whatsapp:hover,
.gp-btn-telegram:hover {
  transform: translateY(-2px);
  filter: brightness(1.05);
}

/* -------------------------------------------------------------------------
 * 7. DISCOVER 16:9 FEATURED IMAGE WRAPPER (Single Post)
 * ------------------------------------------------------------------------- */
.single .featured-image {
  margin: 18px 0 24px 0 !important;
  aspect-ratio: 16 / 9;
  border-radius: var(--gp-radius-md);
  overflow: hidden;
  background-color: #cbd5e1;
  box-shadow: var(--gp-shadow-sm);
}

.single .featured-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

/* -------------------------------------------------------------------------
 * 8. HIGH-CONVERTING OVERVIEW / HIGHLIGHT TABLE (Mobile-Friendly)
 * ------------------------------------------------------------------------- */
.gp-overview-box {
  background: #ffffff;
  border: 2px solid var(--gp-primary-light);
  border-radius: var(--gp-radius-md);
  overflow: hidden;
  margin: 24px 0;
  box-shadow: var(--gp-shadow-sm);
}

.gp-overview-header {
  background: linear-gradient(90deg, var(--gp-primary) 0%, #2563eb 100%);
  color: #ffffff;
  padding: 12px 18px;
  font-size: 16px;
  font-weight: 700;
  display: flex;
  align-items: center;
  gap: 8px;
}

.gp-overview-table {
  width: 100%;
  border-collapse: collapse;
}

.gp-overview-table tr {
  border-bottom: 1px solid var(--gp-border);
}

.gp-overview-table tr:last-child {
  border-bottom: none;
}

.gp-overview-table tr:nth-child(even) {
  background-color: var(--gp-light-bg);
}

.gp-overview-label {
  width: 40%;
  padding: 12px 16px;
  font-weight: 700;
  color: var(--gp-dark);
  font-size: 14px;
  border-right: 1px solid var(--gp-border);
}

.gp-overview-value {
  width: 60%;
  padding: 12px 16px;
  font-size: 14px;
  color: var(--gp-dark-text);
  font-weight: 500;
}

/* -------------------------------------------------------------------------
 * 9. HIGH-CTR DIRECT ACTION / DOWNLOAD BUTTONS
 * ------------------------------------------------------------------------- */
.gp-action-btn-wrap {
  margin: 24px 0;
  text-align: center;
}

.gp-action-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  background: linear-gradient(135deg, var(--gp-primary) 0%, #1d4ed8 100%);
  color: #ffffff !important;
  font-size: 16px;
  font-weight: 800;
  padding: 14px 28px;
  border-radius: var(--gp-radius-pill);
  text-decoration: none;
  box-shadow: 0 4px 14px rgba(26, 115, 232, 0.4);
  transition: all 0.2s ease;
  width: 100%;
  max-width: 420px;
}

.gp-action-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(26, 115, 232, 0.5);
}

.gp-action-btn.green {
  background: linear-gradient(135deg, #16a34a 0%, #15803d 100%);
  box-shadow: 0 4px 14px rgba(22, 163, 74, 0.4);
}

.gp-action-btn.orange {
  background: linear-gradient(135deg, #ea580c 0%, #c2410c 100%);
  box-shadow: 0 4px 14px rgba(234, 88, 12, 0.4);
}

/* -------------------------------------------------------------------------
 * 10. E-E-A-T AUTHOR CREDIBILITY CARD (End of Post)
 * ------------------------------------------------------------------------- */
.gp-eeat-author-card {
  background: #ffffff;
  border: 1px solid var(--gp-border);
  border-radius: var(--gp-radius-lg);
  padding: 20px;
  margin: 32px 0 20px 0;
  box-shadow: var(--gp-shadow-sm);
  display: flex;
  gap: 18px;
  align-items: flex-start;
}

@media (max-width: 640px) {
  .gp-eeat-author-card {
    flex-direction: column;
    align-items: center;
    text-align: center;
  }
}

.gp-eeat-author-img {
  width: 72px;
  height: 72px;
  border-radius: 50%;
  object-fit: cover;
  border: 3px solid var(--gp-primary-light);
  flex-shrink: 0;
}

.gp-eeat-author-content {
  flex-grow: 1;
}

.gp-eeat-author-role {
  display: inline-block;
  font-size: 11px;
  font-weight: 700;
  color: var(--gp-primary);
  background: var(--gp-primary-light);
  padding: 2px 8px;
  border-radius: var(--gp-radius-pill);
  text-transform: uppercase;
  margin-bottom: 4px;
}

.gp-eeat-author-title {
  font-size: 18px;
  font-weight: 800;
  color: var(--gp-dark-text);
  margin: 0 0 6px 0;
}

.gp-eeat-author-bio {
  font-size: 13px;
  line-height: 1.5;
  color: var(--gp-muted);
  margin-bottom: 12px;
}

.gp-eeat-author-socials {
  display: flex;
  gap: 10px;
  font-size: 13px;
  font-weight: 600;
}

@media (max-width: 640px) {
  .gp-eeat-author-socials {
    justify-content: center;
  }
}

.gp-eeat-author-socials a {
  color: var(--gp-primary);
  text-decoration: none;
}

/* -------------------------------------------------------------------------
 * 11. STICKY READING PROGRESS BAR (Top of viewport)
 * ------------------------------------------------------------------------- */
#gp-reading-progress {
  position: fixed;
  top: 0;
  left: 0;
  height: 3.5px;
  background: linear-gradient(90deg, var(--gp-primary) 0%, var(--gp-accent-red) 100%);
  width: 0%;
  z-index: 99999;
  transition: width 0.1s ease-out;
}

/* -------------------------------------------------------------------------
 * 12. CLEAN UP & HIDE GENERATEPRESS UNWANTED ELEMENTS
 * ------------------------------------------------------------------------- */
.entry-header .entry-meta {
  display: none !important; /* Replaced by our custom Discover Meta Bar */
}

/* Content Typography */
.entry-content {
  font-size: 17px;
  line-height: 1.7;
}

.entry-content p {
  margin-bottom: 1.4em;
}

.entry-content h2 {
  font-size: 22px;
  font-weight: 800;
  margin-top: 32px;
  margin-bottom: 14px;
  color: var(--gp-dark-text);
}

.entry-content h3 {
  font-size: 19px;
  font-weight: 700;
  margin-top: 24px;
  margin-bottom: 12px;
}

@media (max-width: 768px) {
  .entry-content {
    font-size: 16px;
    line-height: 1.65;
  }
  .entry-content h2 {
    font-size: 20px;
    margin-top: 26px;
    margin-bottom: 12px;
  }
  .entry-content h3 {
    font-size: 18px;
    margin-top: 20px;
    margin-bottom: 10px;
  }
}
