/* ============================================================
   TawkirJournal — Home Page  (aurora-first, no photos in banners)
   ============================================================ */

/* ——— Layout ——— */
.home-wrapper { padding: 2rem 0 4rem; }

/* ============================================================
   HOME SEARCH BAR
   ============================================================ */
.home-search-section {
  margin: 1.5rem 0;
}

.home-search-form {
  display: flex;
  align-items: center;
  gap: 0;
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-full);
  overflow: hidden;
  transition: box-shadow var(--duration-fast), border-color var(--duration-fast);
  max-width: 640px;
  margin: 0 auto;
}

.home-search-form:focus-within {
  box-shadow: 0 0 0 3px var(--accent-glow);
  border-color: var(--accent);
}

.home-search-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0 0.25rem 0 1rem;
  color: var(--text-muted);
  flex-shrink: 0;
}

.home-search-input {
  flex: 1;
  background: none;
  border: none;
  outline: none;
  padding: 0.75rem 0.5rem;
  font-size: 0.95rem;
  color: var(--text);
  font-family: inherit;
}

.home-search-input::placeholder {
  color: var(--text-muted);
}

.home-search-btn {
  padding: 0.65rem 1.25rem;
  background: var(--accent);
  color: #fff;
  border: none;
  font-size: 0.9rem;
  font-weight: 600;
  font-family: inherit;
  cursor: pointer;
  transition: background var(--duration-fast);
}

.home-search-btn:hover {
  background: var(--accent-dark);
}

/* ============================================================
   SIDEBAR SEARCH
   ============================================================ */
.sidebar-search-form {
  display: flex;
  align-items: center;
  gap: 0;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  transition: box-shadow var(--duration-fast);
}

.sidebar-search-form:focus-within {
  box-shadow: 0 0 0 3px var(--accent-glow);
  border-color: var(--accent);
}

.sidebar-search-form input {
  flex: 1;
  background: none;
  border: none;
  outline: none;
  padding: 0.5rem 0.75rem;
  font-size: 0.85rem;
  color: var(--text);
  font-family: inherit;
}

.sidebar-search-form input::placeholder {
  color: var(--text-muted);
}

.sidebar-search-form button {
  padding: 0.5rem 0.75rem;
  background: none;
  border: none;
  color: var(--text-muted);
  cursor: pointer;
  display: flex;
  align-items: center;
  transition: color var(--duration-fast);
}

.sidebar-search-form button:hover {
  color: var(--accent);
}

/* ============================================================
   FEATURED POST BANNER — aurora spinning border + glow + text
   ============================================================ */

@property --feat-angle {
  syntax: '<angle>';
  initial-value: 0deg;
  inherits: false;
}

@keyframes feat-spin    { to { --feat-angle: 360deg; } }
@keyframes feat-drift {
  0%,100% { background-position: 0% 50%, 100% 0%, 50% 100%, 20% 30%; }
  25%      { background-position: 80% 20%, 20% 80%, 10% 40%, 70% 60%; }
  50%      { background-position: 100% 50%, 0% 100%, 80% 10%, 40% 80%; }
  75%      { background-position: 30% 80%, 70% 10%, 90% 70%, 10% 20%; }
}
@keyframes feat-title-glow {
  0%,100% { background-position: 0% 50%; filter: drop-shadow(0 0 20px rgba(0,245,255,0.3)); }
  50%     { background-position: 100% 50%; filter: drop-shadow(0 0 30px rgba(255,0,255,0.4)); }
}
@keyframes orb-pulse-a {
  0%,100% { transform: translate(0, 0) scale(1); opacity: 0.7; }
  33%      { transform: translate(30px,-20px) scale(1.1); opacity: 0.5; }
  66%      { transform: translate(-20px,30px) scale(0.9); opacity: 0.8; }
}
@keyframes orb-pulse-b {
  0%,100% { transform: translate(0, 0) scale(1); opacity: 0.6; }
  33%      { transform: translate(-40px,20px) scale(0.85); opacity: 0.8; }
  66%      { transform: translate(20px,-30px) scale(1.15); opacity: 0.5; }
}
@keyframes cta-pulse {
  0%,100% { box-shadow: 0 0 0 0 rgba(0,245,255,0.4); }
  50%     { box-shadow: 0 0 0 8px rgba(0,245,255,0); }
}

/* Outer glow + spinning border wrapper */
.feat-banner-wrap {
  position: relative;
  border-radius: 24px;
  padding: 4px;
  background: conic-gradient(
    from var(--feat-angle),
    #ff00ff 0%, #7c3aed 14%, #00f5ff 28%, #00ff88 42%,
    #f97316 56%, #ff00ff 70%, #7c3aed 84%, #00f5ff 100%
  );
  animation: feat-spin 5s linear infinite;
  margin-bottom: 2.5rem;
  /* subtle outer glow ring rendered via box-shadow */
  isolation: isolate;
}

/* Blurred outer glow layer */
.feat-banner-wrap::before {
  content: '';
  position: absolute;
  inset: -10px;
  border-radius: 34px;
  background: conic-gradient(
    from var(--feat-angle),
    #ff00ff 0%, #7c3aed 14%, #00f5ff 28%, #00ff88 42%,
    #f97316 56%, #ff00ff 70%, #7c3aed 84%, #00f5ff 100%
  );
  animation: feat-spin 5s linear infinite;
  filter: blur(20px);
  opacity: 0.5;
  z-index: -1;
}

/* Inner panel */
.feat-banner {
  position: relative;
  overflow: hidden;
  border-radius: 20px;
  padding: 4rem 3rem;
  background:
    radial-gradient(ellipse at 8% 30%, rgba(0,245,255,0.16) 0%, transparent 48%),
    radial-gradient(ellipse at 90% 15%, rgba(124,58,237,0.20) 0%, transparent 46%),
    radial-gradient(ellipse at 55% 95%, rgba(0,255,136,0.12) 0%, transparent 42%),
    radial-gradient(ellipse at 35% 5%, rgba(255,0,255,0.10) 0%, transparent 42%),
    linear-gradient(150deg, #06060e 0%, #0a0618 40%, #07090f 70%, #0e0503 100%);
  background-size: 200% 200%, 200% 200%, 200% 200%, 200% 200%, 100% 100%;
  animation: feat-drift 16s ease-in-out infinite;
  cursor: pointer;
  text-decoration: none;
  display: block;
}

/* Scanline retro texture */
.feat-banner::before {
  content: '';
  position: absolute;
  inset: 0;
  background-image:
    repeating-linear-gradient(0deg, transparent, transparent 3px, rgba(0,0,0,0.03) 3px, rgba(0,0,0,0.03) 4px),
    repeating-linear-gradient(90deg, transparent, transparent 40px, rgba(255,255,255,0.008) 40px, rgba(255,255,255,0.008) 41px);
  pointer-events: none;
  z-index: 1;
}

/* Floating aurora orbs inside panel */
.feat-orb-a, .feat-orb-b {
  position: absolute;
  border-radius: 50%;
  pointer-events: none;
  z-index: 0;
}
.feat-orb-a {
  top: -80px; left: -80px;
  width: 360px; height: 360px;
  background: radial-gradient(circle, rgba(0,245,255,0.14) 0%, transparent 70%);
  animation: orb-pulse-a 9s ease-in-out infinite;
}
.feat-orb-b {
  bottom: -100px; right: -60px;
  width: 420px; height: 420px;
  background: radial-gradient(circle, rgba(124,58,237,0.16) 0%, transparent 70%);
  animation: orb-pulse-b 12s ease-in-out infinite;
}

/* Content */
.feat-banner-inner {
  position: relative;
  z-index: 2;
  max-width: 780px;
}

/* Category pills */
.feat-cats {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-bottom: 1.25rem;
}

.feat-cat-pill {
  display: inline-flex;
  align-items: center;
  padding: 0.25rem 0.875rem;
  border-radius: 999px;
  font-size: 0.7rem;
  font-weight: 800;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  background: rgba(255,255,255,0.08);
  color: rgba(255,255,255,0.8);
  border: 1px solid rgba(255,255,255,0.18);
  backdrop-filter: blur(6px);
  transition: all 0.2s;
}

.feat-cat-pill:hover {
  background: rgba(255,255,255,0.18);
  color: white;
}

/* The headline — aurora shimmer text */
.feat-title {
  font-size: clamp(1.9rem, 4.5vw, 3.4rem);
  font-weight: 900;
  letter-spacing: -0.035em;
  line-height: 1.12;
  background: linear-gradient(
    125deg,
    #fff    0%,
    #b8f4ff 15%,
    #fff    30%,
    #e0b8ff 48%,
    #fff    60%,
    #b8ffd8 78%,
    #fff    90%,
    #ffb8f4 100%
  );
  background-size: 300% 300%;
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  animation: feat-title-glow 7s ease-in-out infinite;
  margin-bottom: 1.1rem;
}

.feat-excerpt {
  font-size: clamp(0.9rem, 1.8vw, 1.05rem);
  color: rgba(255,255,255,0.58);
  line-height: 1.75;
  max-width: 640px;
  margin-bottom: 1.75rem;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.feat-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 1rem;
}

.feat-meta {
  display: flex;
  align-items: center;
  gap: 1rem;
  font-size: 0.8rem;
  color: rgba(255,255,255,0.4);
  flex-wrap: wrap;
}

.feat-meta-item {
  display: flex;
  align-items: center;
  gap: 0.4rem;
}

.feat-cta {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.65rem 1.5rem;
  background: rgba(255,255,255,0.1);
  border: 1px solid rgba(255,255,255,0.25);
  border-radius: 999px;
  font-size: 0.85rem;
  font-weight: 700;
  color: white;
  backdrop-filter: blur(8px);
  transition: all 0.25s;
  animation: cta-pulse 3s ease-in-out infinite;
  text-decoration: none;
}

.feat-cta:hover {
  background: rgba(0,245,255,0.18);
  border-color: rgba(0,245,255,0.5);
  box-shadow: 0 0 20px rgba(0,245,255,0.25);
  transform: translateY(-2px);
}

.feat-cta svg {
  transition: transform 0.2s;
}
.feat-cta:hover svg { transform: translateX(4px); }

/* ——— Category Filter ——— */
.category-filter {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  flex-wrap: wrap;
  margin-bottom: 2rem;
  padding-bottom: 1.5rem;
  border-bottom: 1px solid var(--border);
}

.cat-filter-label {
  font-size: 0.78rem;
  font-weight: 700;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.07em;
  margin-right: 0.25rem;
}

.cat-pill {
  display: inline-flex;
  align-items: center;
  padding: 0.35rem 0.875rem;
  border-radius: 999px;
  font-size: 0.8rem;
  font-weight: 600;
  background: var(--bg-elevated);
  color: var(--text-secondary);
  border: 1px solid var(--border);
  transition: all 0.2s;
  cursor: pointer;
  text-decoration: none;
}

.cat-pill:hover,
.cat-pill.active {
  background: var(--accent);
  color: white;
  border-color: var(--accent);
  box-shadow: 0 2px 10px var(--accent-glow);
}

/* ——— Content Grid ——— */
.content-grid {
  display: grid;
  grid-template-columns: 1fr 300px;
  gap: 2.5rem;
  align-items: start;
}

/* ——— Posts Grid ——— */
.posts-section-title {
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--text-muted);
  margin-bottom: 1.5rem;
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.posts-section-title::after {
  content: '';
  flex: 1;
  height: 1px;
  background: var(--border);
}

.posts-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(290px, 1fr));
  gap: 1.5rem;
}

/* ============================================================
   POST CARD — title inside banner area, aurora hover border
   ============================================================ */

@keyframes card-shimmer {
  0%,100% { background-position: 0% 50%, 100% 0%; }
  50%      { background-position: 100% 50%, 0% 100%; }
}

@keyframes card-beam {
  from { transform: translateX(-100%) rotate(15deg); }
  to   { transform: translateX(400%) rotate(15deg); }
}

.post-card {
  position: relative;
  border-radius: var(--radius-lg);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  background: var(--bg-surface);
  border: 1px solid var(--border);
  transition: transform 0.3s var(--ease), box-shadow 0.3s var(--ease);
  z-index: 0;
  text-decoration: none;
}

/* Aurora border that appears on hover */
.post-card::before {
  content: '';
  position: absolute;
  inset: -2px;
  border-radius: calc(var(--radius-lg) + 2px);
  background: linear-gradient(135deg, #00f5ff 0%, #7c3aed 25%, #ff00ff 50%, #f97316 75%, #00ff88 100%);
  background-size: 300% 300%;
  animation: card-shimmer 5s ease-in-out infinite;
  z-index: -1;
  opacity: 0;
  transition: opacity 0.3s ease;
}

.post-card:hover::before { opacity: 1; }

.post-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 20px 40px rgba(0,0,0,0.15), 0 0 40px rgba(0,245,255,0.08);
}

/* The card banner area — dark aurora with title inside */
.post-card-banner {
  height: 200px;
  position: relative;
  overflow: hidden;
  flex-shrink: 0;
}

.post-card-banner img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.5s var(--ease);
  display: block;
}

.post-card:hover .post-card-banner img { transform: scale(1.06); }

/* Gradient (no-image) version */
.post-card-banner-gradient {
  width: 100%;
  height: 100%;
  position: relative;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  justify-content: flex-end;
  padding: 1rem 1.1rem;
  /* background set inline */
}

/* Scanline + grid retro texture */
.post-card-banner-gradient::before {
  content: '';
  position: absolute;
  inset: 0;
  background-image:
    repeating-linear-gradient(0deg, transparent, transparent 3px, rgba(0,0,0,0.04) 3px, rgba(0,0,0,0.04) 4px),
    repeating-linear-gradient(90deg, transparent, transparent 24px, rgba(255,255,255,0.012) 24px, rgba(255,255,255,0.012) 25px);
  z-index: 1;
  pointer-events: none;
}

/* Animated shimmer sweep */
.post-card-banner-gradient::after {
  content: '';
  position: absolute;
  top: -40px;
  left: -60px;
  width: 40px;
  height: 200%;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,0.07), transparent);
  transform: rotate(15deg);
  animation: card-beam 5s ease-in-out infinite;
  animation-delay: var(--card-delay, 0s);
  z-index: 2;
}

/* Floating mini-orb in card header */
.card-orb {
  position: absolute;
  top: -20px;
  right: -20px;
  width: 120px;
  height: 120px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(0,245,255,0.12) 0%, transparent 70%);
  pointer-events: none;
  z-index: 0;
}

/* Content inside gradient banner */
.pcb-inner {
  position: relative;
  z-index: 3;
}

.pcb-cat {
  display: inline-block;
  font-size: 0.62rem;
  font-weight: 800;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: rgba(255,255,255,0.6);
  background: rgba(0,0,0,0.28);
  backdrop-filter: blur(6px);
  padding: 0.18rem 0.65rem;
  border-radius: 999px;
  border: 1px solid rgba(255,255,255,0.14);
  margin-bottom: 0.5rem;
  display: block;
}

/* Title IN the banner — shimmer on hover */
.pcb-title {
  font-size: 0.92rem;
  font-weight: 800;
  line-height: 1.3;
  letter-spacing: -0.01em;
  color: rgba(255,255,255,0.92);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  transition: color 0.2s;
  background: none;
  -webkit-text-fill-color: unset;
}

.post-card:hover .pcb-title {
  background: linear-gradient(90deg, #fff, #b8f4ff, #fff, #e0b8ff);
  background-size: 300% 100%;
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  animation: card-shimmer 3s ease-in-out infinite;
}

/* Card body — excerpt + footer */
.post-card-body {
  padding: 1rem 1.1rem;
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
}

.post-card-excerpt {
  font-size: 0.82rem;
  color: var(--text-secondary);
  line-height: 1.6;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  flex: 1;
}

.post-card-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 0.75rem;
  color: var(--text-muted);
  padding-top: 0.65rem;
  margin-top: auto;
  border-top: 1px solid var(--border-light);
}

.post-card-date {
  display: flex;
  align-items: center;
  gap: 0.3rem;
}

.post-card-read-more {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  font-size: 0.75rem;
  font-weight: 700;
  color: var(--accent);
  text-transform: uppercase;
  letter-spacing: 0.04em;
  transition: gap 0.15s;
}

.post-card:hover .post-card-read-more { gap: 0.4rem; }

/* ——— Sidebar ——— */
.home-sidebar {
  position: sticky;
  top: calc(var(--nav-height) + 1.5rem);
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.sidebar-widget {
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 1.25rem;
  transition: border-color 0.2s;
}

.sidebar-widget:hover { border-color: rgba(0,245,255,0.2); }

[data-theme="dark"] .sidebar-widget { background: var(--bg-elevated); }

.sidebar-widget-title {
  font-size: 0.72rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--text-muted);
  margin-bottom: 1rem;
  padding-bottom: 0.75rem;
  border-bottom: 1px solid var(--border);
}

.cat-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
}

.cat-list-item a {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.5rem 0.625rem;
  border-radius: var(--radius-sm);
  font-size: 0.875rem;
  color: var(--text-secondary);
  transition: background 0.15s, color 0.15s;
  text-decoration: none;
}

.cat-list-item a:hover {
  background: var(--bg-elevated);
  color: var(--accent);
}

.cat-list-dot {
  width: 7px; height: 7px;
  border-radius: 50%;
  background: var(--accent);
  opacity: 0.4;
  margin-right: 0.5rem;
  flex-shrink: 0;
}

/* ——— Pagination ——— */
.pagination-bar {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 2.5rem 0 0;
  flex-wrap: wrap;
}

.page-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 40px;
  height: 40px;
  padding: 0 0.875rem;
  border-radius: var(--radius);
  font-size: 0.875rem;
  font-weight: 600;
  background: var(--bg-surface);
  border: 1px solid var(--border);
  color: var(--text-secondary);
  transition: all 0.2s;
  gap: 0.3rem;
  text-decoration: none;
}

.page-btn:hover {
  background: var(--bg-elevated);
  color: var(--text);
  border-color: rgba(0,245,255,0.3);
}

.page-btn.active {
  background: var(--accent);
  color: white;
  border-color: var(--accent);
  box-shadow: 0 2px 10px var(--accent-glow);
  cursor: default;
}

.page-btn.disabled {
  opacity: 0.3;
  cursor: not-allowed;
  pointer-events: none;
}

.page-info {
  font-size: 0.8rem;
  color: var(--text-muted);
  padding: 0 0.75rem;
}

/* ——— Empty State ——— */
.posts-empty {
  text-align: center;
  padding: 4rem 2rem;
  color: var(--text-muted);
}
.posts-empty svg { margin: 0 auto 1rem; opacity: 0.25; }
.posts-empty h3 { font-size: 1.25rem; font-weight: 600; margin-bottom: 0.5rem; color: var(--text-secondary); }

/* ——— Responsive ——— */
@media (max-width: 1024px) {
  .content-grid { grid-template-columns: 1fr; }
  .home-sidebar { position: static; }
}

@media (max-width: 768px) {
  .feat-banner { padding: 2.5rem 1.5rem; }
  .feat-title { font-size: 1.75rem; }
  .posts-grid { grid-template-columns: 1fr; }
  .post-card-banner { height: 180px; }
  .home-search-form { border-radius: var(--radius); }
  .home-search-btn { padding: 0.65rem 1rem; font-size: 0.85rem; }
  .home-search-input { padding: 0.65rem 0.5rem; font-size: 0.9rem; }
}
