/*
Theme Name: AI Insider Child
Description: Custom editorial theme for AI Insider
Template: astra
Version: 1.0
*/

/* ===========================
   HOMEPAGE HERO
   =========================== */
.home-hero {
  background: linear-gradient(135deg, #0a0a1a 0%, #1a1a3e 50%, #0d0d2b 100%);
  color: #fff;
  padding: 80px 0 60px;
  position: relative;
  overflow: hidden;
}

.home-hero::before {
  content: '';
  position: absolute;
  top: -50%;
  right: -20%;
  width: 600px;
  height: 600px;
  background: radial-gradient(circle, rgba(99,102,241,0.15) 0%, transparent 70%);
  pointer-events: none;
}

.home-hero::after {
  content: '';
  position: absolute;
  bottom: -30%;
  left: -10%;
  width: 400px;
  height: 400px;
  background: radial-gradient(circle, rgba(139,92,246,0.1) 0%, transparent 70%);
  pointer-events: none;
}

.home-hero .container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 24px;
  position: relative;
  z-index: 1;
}

.home-hero-inner {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 60px;
  align-items: center;
}

.home-hero-text {
  max-width: 540px;
}

.home-hero-eyebrow {
  display: inline-block;
  background: rgba(99,102,241,0.2);
  border: 1px solid rgba(99,102,241,0.4);
  color: #a5b4fc;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 2px;
  text-transform: uppercase;
  padding: 5px 14px;
  border-radius: 50px;
  margin-bottom: 20px;
}

.home-hero h1 {
  font-size: 52px;
  font-weight: 800;
  line-height: 1.1;
  margin: 0 0 20px;
  background: linear-gradient(135deg, #fff 0%, #c7d2fe 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.home-hero-desc {
  font-size: 18px;
  line-height: 1.7;
  color: #cbd5e1;
  margin-bottom: 30px;
}

.home-hero-actions {
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
}

.hero-btn-primary {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: #6366f1;
  color: #fff;
  padding: 14px 28px;
  border-radius: 8px;
  font-weight: 600;
  font-size: 15px;
  text-decoration: none;
  transition: all 0.2s;
  border: none;
  cursor: pointer;
}

.hero-btn-primary:hover {
  background: #4f46e5;
  transform: translateY(-1px);
}

.hero-btn-secondary {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: rgba(255,255,255,0.08);
  color: #e2e8f0;
  padding: 14px 28px;
  border-radius: 8px;
  font-weight: 600;
  font-size: 15px;
  text-decoration: none;
  border: 1px solid rgba(255,255,255,0.15);
  transition: all 0.2s;
}

.hero-btn-secondary:hover {
  background: rgba(255,255,255,0.15);
}

.home-hero-image {
  position: relative;
}

.home-hero-image img {
  width: 100%;
  height: 360px;
  object-fit: cover;
  border-radius: 16px;
  box-shadow: 0 25px 80px rgba(0,0,0,0.5);
}

.hero-badge {
  position: absolute;
  bottom: -20px;
  left: 24px;
  background: #fff;
  color: #1e1e3f;
  padding: 14px 20px;
  border-radius: 12px;
  box-shadow: 0 8px 30px rgba(0,0,0,0.2);
  font-size: 13px;
  font-weight: 700;
}

.hero-badge span {
  color: #6366f1;
  font-size: 22px;
}

/* ===========================
   SECTION STYLES
   =========================== */
.home-section {
  padding: 60px 0;
}

.home-section + .home-section {
  border-top: 1px solid #e2e8f0;
}

.section-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 32px;
}

.section-title {
  font-size: 24px;
  font-weight: 700;
  color: #1e1e3f;
  margin: 0;
  display: flex;
  align-items: center;
  gap: 10px;
}

.section-title::before {
  content: '';
  width: 4px;
  height: 24px;
  background: #6366f1;
  border-radius: 2px;
}

.section-link {
  font-size: 14px;
  font-weight: 600;
  color: #6366f1;
  text-decoration: none;
  display: flex;
  align-items: center;
  gap: 4px;
}

.section-link:hover {
  color: #4f46e5;
}

/* ===========================
   FEATURED POSTS GRID
   =========================== */
.featured-grid {
  display: grid;
  grid-template-columns: 1.6fr 1fr;
  grid-template-rows: auto auto;
  gap: 24px;
}

.featured-main {
  grid-row: span 2;
}

.post-card {
  background: #fff;
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 2px 12px rgba(0,0,0,0.06);
  transition: all 0.2s;
  display: flex;
  flex-direction: column;
  height: 100%;
}

.post-card:hover {
  box-shadow: 0 8px 30px rgba(0,0,0,0.1);
  transform: translateY(-2px);
}

.post-card-img {
  width: 100%;
  height: 200px;
  object-fit: cover;
  display: block;
}

.featured-main .post-card-img {
  height: 320px;
}

.post-card-body {
  padding: 20px;
  flex: 1;
  display: flex;
  flex-direction: column;
}

.post-card-cat {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 1px;
  text-transform: uppercase;
  color: #6366f1;
  margin-bottom: 8px;
}

.post-card-title {
  font-size: 17px;
  font-weight: 700;
  line-height: 1.4;
  margin: 0 0 10px;
  color: #1e1e3f;
}

.featured-main .post-card-title {
  font-size: 22px;
}

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

.post-card-title a:hover {
  color: #6366f1;
}

.post-card-excerpt {
  font-size: 14px;
  color: #64748b;
  line-height: 1.6;
  margin: 0 0 14px;
  flex: 1;
}

.post-card-meta {
  font-size: 12px;
  color: #94a3b8;
  display: flex;
  align-items: center;
  gap: 6px;
}

.post-card-meta a {
  color: #6366f1;
  text-decoration: none;
}

.posts-grid-3 {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}

/* ===========================
   CATEGORY HIGHLIGHTS
   =========================== */
.cat-highlights {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}

.cat-card {
  position: relative;
  border-radius: 16px;
  overflow: hidden;
  height: 240px;
  display: block;
  text-decoration: none;
}

.cat-card img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.4s;
}

.cat-card:hover img {
  transform: scale(1.05);
}

.cat-card-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(10,10,26,0.9) 0%, rgba(10,10,26,0.3) 60%, transparent 100%);
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  padding: 24px;
}

.cat-card-title {
  font-size: 20px;
  font-weight: 700;
  color: #fff;
  margin: 0 0 4px;
}

.cat-card-count {
  font-size: 13px;
  color: #a5b4fc;
  font-weight: 500;
}

/* ===========================
   NEWSLETTER SECTION
   =========================== */
.newsletter-section {
  background: linear-gradient(135deg, #1e1b4b 0%, #312e81 100%);
  border-radius: 20px;
  padding: 60px;
  text-align: center;
  color: #fff;
  margin: 40px 0;
}

.newsletter-section h2 {
  font-size: 32px;
  font-weight: 800;
  margin: 20px 0 12px;
  color: #fff;
}

.newsletter-author {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 8px;
  justify-content: center;
}

.newsletter-author-img {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  border: 2px solid rgba(255,255,255,0.3);
  object-fit: cover;
}

.newsletter-author-info {
  font-size: 14px;
  color: #c7d2fe;
  line-height: 1.5;
  text-align: left;
}

.newsletter-author-info strong {
  color: #fff;
  font-size: 15px;
}

.newsletter-section p {
  font-size: 17px;
  color: #c7d2fe;
  margin: 0 0 28px;
  max-width: 500px;
  margin-left: auto;
  margin-right: auto;
}

.newsletter-form {
  display: flex;
  gap: 12px;
  max-width: 460px;
  margin: 0 auto;
}

.newsletter-form input {
  flex: 1;
  padding: 14px 18px;
  border-radius: 8px;
  border: 1px solid rgba(255,255,255,0.2);
  background: rgba(255,255,255,0.1);
  color: #fff;
  font-size: 15px;
  outline: none;
}

.newsletter-form input::placeholder {
  color: #a5b4fc;
}

.newsletter-form button {
  background: #6366f1;
  color: #fff;
  border: none;
  padding: 14px 28px;
  border-radius: 8px;
  font-weight: 700;
  font-size: 15px;
  cursor: pointer;
  white-space: nowrap;
  transition: background 0.2s;
}

.newsletter-form button:hover {
  background: #4f46e5;
}

.newsletter-note {
  font-size: 12px;
  color: #818cf8;
  margin-top: 12px;
}

/* ===========================
   SIDEBAR
   =========================== */
.home-sidebar {
  display: flex;
  flex-direction: column;
  gap: 24px;
}

.sidebar-widget {
  background: #fff;
  border-radius: 12px;
  padding: 24px;
  box-shadow: 0 2px 12px rgba(0,0,0,0.06);
}

.sidebar-widget-title {
  font-size: 14px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1.5px;
  color: #1e1e3f;
  margin: 0 0 16px;
  padding-bottom: 12px;
  border-bottom: 2px solid #6366f1;
}

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

.sidebar-list li {
  padding: 10px 0;
  border-bottom: 1px solid #f1f5f9;
  display: flex;
  gap: 12px;
  align-items: flex-start;
}

.sidebar-list li:last-child {
  border-bottom: none;
}

.sidebar-list img {
  width: 64px;
  height: 64px;
  object-fit: cover;
  border-radius: 8px;
  flex-shrink: 0;
}

.sidebar-list .sidebar-post-title {
  font-size: 14px;
  font-weight: 600;
  line-height: 1.4;
  color: #1e1e3f;
}

.sidebar-list .sidebar-post-title a {
  color: inherit;
  text-decoration: none;
}

.sidebar-list .sidebar-post-title a:hover {
  color: #6366f1;
}

.sidebar-list .sidebar-post-meta {
  font-size: 12px;
  color: #94a3b8;
  margin-top: 4px;
}

/* ===========================
   RESPONSIVE
   =========================== */
@media (max-width: 1024px) {
  .home-hero-inner {
    grid-template-columns: 1fr;
    gap: 40px;
  }
  .home-hero h1 { font-size: 40px; }
  .featured-grid { grid-template-columns: 1fr; }
  .featured-main { grid-row: span 1; }
  .posts-grid-3 { grid-template-columns: repeat(2, 1fr); }
  .cat-highlights { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 640px) {
  .home-hero { padding: 50px 0 40px; }
  .home-hero h1 { font-size: 30px; }
  .posts-grid-3 { grid-template-columns: 1fr; }
  .cat-highlights { grid-template-columns: 1fr; }
  .newsletter-section { padding: 40px 24px; }
  .newsletter-form { flex-direction: column; }
  .newsletter-form button { padding: 16px; }
}
