/* GyaanPost Homepage Styles
   Matches mockup exactly - responsive for all devices
   ============================================================ */

/* ============================================================
   FEATURED HERO SECTION
   ============================================================ */

.gp-featured-hero {
  display: grid;
  grid-template-columns: 1fr 380px;
  gap: var(--space-6);
  padding: var(--space-8) 0;
}

/* Main featured article */
.gp-featured-main {
  position: relative;
  border-radius: var(--radius-xl);
  overflow: hidden;
  min-height: 420px;
}

.gp-featured-main-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  position: absolute;
  inset: 0;
}

.gp-featured-main-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(0,0,0,0.85) 0%, rgba(0,0,0,0.3) 50%, rgba(0,0,0,0.1) 100%);
}

.gp-featured-main-content {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  padding: var(--space-8);
  color: var(--gp-white);
}

.gp-featured-main-badge {
  display: inline-block;
  padding: 4px 10px;
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  background: var(--gp-primary);
  color: var(--gp-white);
  border-radius: var(--radius-sm);
  margin-bottom: var(--space-3);
}

.gp-featured-main-date {
  font-size: var(--text-sm);
  color: rgba(255,255,255,0.7);
  margin-bottom: var(--space-3);
}

.gp-featured-main-title {
  font-family: var(--font-heading);
  font-size: var(--text-3xl);
  font-weight: var(--fw-bold);
  color: var(--gp-white);
  line-height: 1.3;
  margin-bottom: var(--space-3);
}

.gp-featured-main-desc {
  font-size: var(--text-sm);
  color: rgba(255,255,255,0.8);
  line-height: 1.6;
  margin-bottom: var(--space-4);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.gp-featured-main-author {
  display: flex;
  align-items: center;
  gap: var(--space-3);
}

.gp-featured-main-author img {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  object-fit: cover;
}

.gp-featured-main-author span {
  font-size: var(--text-sm);
  color: rgba(255,255,255,0.8);
}

.gp-featured-main-readtime {
  font-size: var(--text-xs);
  color: rgba(255,255,255,0.6);
}

.gp-featured-main-btn {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  padding: 10px 20px;
  background: var(--gp-red);
  color: var(--gp-white);
  border-radius: var(--radius-md);
  font-size: var(--text-sm);
  font-weight: var(--fw-medium);
  text-decoration: none;
  margin-top: var(--space-4);
  transition: background var(--transition-fast);
}

.gp-featured-main-btn:hover {
  background: #DC2626;
  color: var(--gp-white);
}

/* Sidebar featured articles */
.gp-featured-sidebar {
  display: flex;
  flex-direction: column;
  gap: var(--space-4);
}

.gp-featured-sidebar-item {
  display: flex;
  gap: var(--space-3);
  padding: var(--space-3);
  border-radius: var(--radius-md);
  background: var(--gp-white);
  border: 1px solid var(--gp-gray-200);
  transition: all var(--transition-fast);
  text-decoration: none;
}

.gp-featured-sidebar-item:hover {
  box-shadow: var(--shadow-md);
  border-color: var(--gp-primary);
}

.gp-featured-sidebar-img {
  width: 100px;
  height: 72px;
  border-radius: var(--radius-sm);
  object-fit: cover;
  flex-shrink: 0;
}

.gp-featured-sidebar-content {
  flex: 1;
  min-width: 0;
}

.gp-featured-sidebar-badge {
  display: inline-block;
  font-size: 10px;
  font-weight: 600;
  text-transform: uppercase;
  color: var(--gp-primary);
  margin-bottom: 4px;
}

.gp-featured-sidebar-title {
  font-family: var(--font-heading);
  font-size: 13px;
  font-weight: var(--fw-semibold);
  color: var(--gp-navy);
  line-height: 1.4;
  margin-bottom: 4px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.gp-featured-sidebar-meta {
  font-size: 11px;
  color: var(--gp-gray-400);
}

/* ============================================================
   LATEST ARTICLES + NEWSLETTER SIDEBAR
   ============================================================ */

.gp-latest-section {
  display: grid;
  grid-template-columns: 1fr 320px;
  gap: var(--space-8);
  align-items: start;
}

.gp-articles-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: var(--space-5);
}

.gp-article-card {
  background: var(--gp-white);
  border: 1px solid var(--gp-gray-200);
  border-radius: var(--radius-lg);
  overflow: hidden;
  transition: all var(--transition-base);
}

.gp-article-card:hover {
  box-shadow: var(--shadow-lg);
  transform: translateY(-3px);
}

.gp-article-card-img {
  width: 100%;
  height: 160px;
  object-fit: cover;
}

.gp-article-card-body {
  padding: var(--space-4);
}

.gp-article-card-badge {
  display: inline-block;
  font-size: 10px;
  font-weight: 600;
  text-transform: uppercase;
  color: var(--gp-primary);
  margin-bottom: var(--space-2);
}

.gp-article-card-title {
  font-family: var(--font-heading);
  font-size: var(--text-sm);
  font-weight: var(--fw-semibold);
  color: var(--gp-navy);
  line-height: 1.4;
  margin-bottom: var(--space-2);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.gp-article-card-title a {
  color: inherit;
  text-decoration: none;
}

.gp-article-card-title a:hover {
  color: var(--gp-primary);
}

.gp-article-card-meta {
  font-size: 12px;
  color: var(--gp-gray-400);
  display: flex;
  align-items: center;
  gap: var(--space-2);
}

/* Newsletter sidebar widget */
.gp-newsletter-sidebar {
  background: var(--gp-gray-50);
  border: 1px solid var(--gp-gray-200);
  border-radius: var(--radius-xl);
  padding: var(--space-6);
  position: sticky;
  top: 88px;
}

.gp-newsletter-sidebar h4 {
  font-family: var(--font-heading);
  font-size: var(--text-lg);
  font-weight: var(--fw-semibold);
  color: var(--gp-navy);
  margin-bottom: var(--space-2);
}

.gp-newsletter-sidebar > p {
  font-size: var(--text-sm);
  color: var(--gp-gray-500);
  margin-bottom: var(--space-4);
  line-height: 1.5;
}

.gp-newsletter-sidebar .gp-input {
  margin-bottom: var(--space-3);
}

.gp-newsletter-sidebar .gp-btn {
  width: 100%;
}

.gp-newsletter-sidebar .gp-newsletter-note {
  font-size: 12px;
  color: var(--gp-gray-400);
  margin-top: var(--space-3);
  text-align: center;
}

/* ============================================================
   PRODUCTS SECTION
   ============================================================ */

.gp-products-section {
  display: grid;
  grid-template-columns: 1fr 320px;
  gap: var(--space-8);
  align-items: start;
}

.gp-products-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: var(--space-5);
}

/* Featured product promo card */
.gp-product-promo {
  background: var(--gp-gray-50);
  border: 1px solid var(--gp-gray-200);
  border-radius: var(--radius-xl);
  padding: var(--space-6);
  position: sticky;
  top: 88px;
}

.gp-product-promo-label {
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  color: var(--gp-primary);
  letter-spacing: 0.5px;
  margin-bottom: var(--space-3);
}

.gp-product-promo h4 {
  font-family: var(--font-heading);
  font-size: var(--text-xl);
  font-weight: var(--fw-bold);
  color: var(--gp-navy);
  margin-bottom: var(--space-2);
}

.gp-product-promo > p {
  font-size: var(--text-sm);
  color: var(--gp-gray-500);
  margin-bottom: var(--space-4);
}

.gp-product-promo-features {
  list-style: none;
  padding: 0;
  margin: 0 0 var(--space-5) 0;
}

.gp-product-promo-features li {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  font-size: var(--text-sm);
  color: var(--gp-gray-700);
  padding: 6px 0;
  list-style: none;
}

.gp-product-promo-features li::before {
  content: none;
}

.gp-product-promo-features .check-icon {
  color: var(--gp-green);
  font-size: 14px;
  flex-shrink: 0;
}

/* ============================================================
   SERVICES + TOOLS SECTION
   ============================================================ */

.gp-services-section {
  display: grid;
  grid-template-columns: 1fr 320px;
  gap: var(--space-8);
  align-items: start;
}

.gp-services-grid {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: var(--space-4);
}

/* Free Tools sidebar */
.gp-tools-sidebar {
  background: var(--gp-gray-50);
  border: 1px solid var(--gp-gray-200);
  border-radius: var(--radius-xl);
  padding: var(--space-5);
  position: sticky;
  top: 88px;
}

.gp-tools-sidebar-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: var(--space-4);
}

.gp-tools-sidebar-header h5 {
  font-family: var(--font-heading);
  font-size: var(--text-base);
  font-weight: var(--fw-semibold);
  color: var(--gp-navy);
  margin: 0;
}

.gp-tools-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: var(--space-3);
}

.gp-tool-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--space-2);
  padding: var(--space-3);
  background: var(--gp-white);
  border: 1px solid var(--gp-gray-200);
  border-radius: var(--radius-md);
  text-decoration: none;
  transition: all var(--transition-fast);
  text-align: center;
}

.gp-tool-card:hover {
  border-color: var(--gp-primary);
  box-shadow: var(--shadow-sm);
}

.gp-tool-card-icon {
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: var(--radius-md);
  font-size: 16px;
}

.gp-tool-card-name {
  font-size: 11px;
  font-weight: var(--fw-medium);
  color: var(--gp-navy);
}

.gp-tool-card-desc {
  font-size: 10px;
  color: var(--gp-gray-400);
}

/* ============================================================
   RESPONSIVE - ALL DEVICES
   ============================================================ */

/* Tablet */
@media (max-width: 1024px) {
  .gp-featured-hero {
    grid-template-columns: 1fr 280px;
  }
  .gp-latest-section,
  .gp-products-section,
  .gp-services-section {
    grid-template-columns: 1fr;
  }
  .gp-articles-grid {
    grid-template-columns: repeat(3, 1fr);
  }
  .gp-products-grid {
    grid-template-columns: repeat(4, 1fr);
  }
  .gp-services-grid {
    grid-template-columns: repeat(3, 1fr);
  }
  .gp-newsletter-sidebar,
  .gp-product-promo,
  .gp-tools-sidebar {
    position: static;
  }
}

/* Small tablet */
@media (max-width: 768px) {
  .gp-featured-hero {
    grid-template-columns: 1fr;
  }
  .gp-featured-main {
    min-height: 300px;
  }
  .gp-featured-sidebar {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: var(--space-3);
  }
  .gp-articles-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  .gp-products-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  .gp-services-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  .gp-stats-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

/* Mobile */
@media (max-width: 480px) {
  .gp-featured-main {
    min-height: 260px;
  }
  .gp-featured-main-title {
    font-size: var(--text-xl);
  }
  .gp-featured-main-content {
    padding: var(--space-5);
  }
  .gp-featured-sidebar {
    grid-template-columns: 1fr;
  }
  .gp-articles-grid {
    grid-template-columns: 1fr 1fr;
    gap: var(--space-3);
  }
  .gp-products-grid {
    grid-template-columns: 1fr 1fr;
    gap: var(--space-3);
  }
  .gp-services-grid {
    grid-template-columns: 1fr 1fr;
    gap: var(--space-3);
  }
  .gp-tools-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  .gp-section-header {
    flex-direction: column;
    align-items: flex-start;
    gap: var(--space-2);
  }
}
