/* ═══════════════════════════════════════════
   TAKSHVI — FLUX FRONT-END STYLES
   Top navigation, hero section, news grid, trending strip
   ═══════════════════════════════════════════ */

:root {
  --flux-bg: #f7f8fa;
  --flux-card-bg: #ffffff;
  --flux-text: #14181f;
  --flux-text-light: #6b7280;
  --flux-border: #e5e7eb;
  --flux-primary: #2563eb;
  --flux-accent: #16a34a;
  --flux-radius: 12px;
  --flux-shadow: 0 1px 3px rgba(0,0,0,0.06);
  --flux-shadow-md: 0 8px 24px rgba(0,0,0,0.08);
}

[data-theme="dark"] {
  --flux-bg: #0f1117;
  --flux-card-bg: #181b24;
  --flux-text: #f1f3f7;
  --flux-text-light: #9aa1b1;
  --flux-border: #2a2e3a;
  --flux-shadow: 0 1px 3px rgba(0,0,0,0.3);
  --flux-shadow-md: 0 8px 24px rgba(0,0,0,0.4);
}

* { box-sizing: border-box; }

body {
  background: var(--flux-bg);
  color: var(--flux-text);
  font-family: var(--takshvi-font);
}

.flux-page { min-height: 100vh; display: flex; flex-direction: column; }

/* ═══════════════════════════════════════════
   TOP NAVIGATION
   ═══════════════════════════════════════════ */
.flux-topnav {
  background: var(--flux-card-bg);
  border-bottom: 1px solid var(--flux-border);
  position: sticky;
  top: 0;
  z-index: 200;
}

.flux-topnav-inner {
  max-width: 1280px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  gap: 24px;
  padding: 14px 24px;
}

.flux-mobile-toggle {
  display: none;
  background: none;
  border: none;
  font-size: 20px;
  cursor: pointer;
  color: var(--flux-text);
  padding: 6px;
}

.flux-brand {
  display: flex;
  align-items: center;
  gap: 8px;
  text-decoration: none;
  font-size: 20px;
  font-weight: 800;
  color: var(--flux-text);
  white-space: nowrap;
}

.flux-brand-icon { font-size: 22px; }

/* Main nav */
.flux-nav { flex: 1; }

.flux-menu {
  display: flex;
  align-items: center;
  gap: 4px;
  list-style: none;
  margin: 0;
  padding: 0;
}

.flux-menu > li {
  position: relative;
}

.flux-menu > li > a {
  display: flex;
  align-items: center;
  gap: 4px;
  padding: 8px 14px;
  border-radius: 8px;
  color: var(--flux-text);
  text-decoration: none;
  font-size: 14px;
  font-weight: 500;
  transition: background 0.2s, color 0.2s;
}

.flux-menu > li:first-child > a {
  background: var(--flux-bg);
}

.flux-menu > li > a:hover {
  background: var(--flux-bg);
  color: var(--flux-primary);
}

.flux-menu > li.menu-item-has-children > a::after {
  content: '▾';
  font-size: 10px;
  margin-left: 2px;
  opacity: 0.6;
}

.flux-badge {
  background: var(--flux-primary);
  color: #fff;
  font-size: 9px;
  font-weight: 700;
  padding: 1px 6px;
  border-radius: 4px;
  letter-spacing: 0.5px;
}

/* Dropdown submenus */
.flux-submenu {
  position: absolute;
  top: 100%;
  left: 0;
  background: var(--flux-card-bg);
  border: 1px solid var(--flux-border);
  border-radius: 10px;
  box-shadow: var(--flux-shadow-md);
  min-width: 200px;
  list-style: none;
  margin: 6px 0 0;
  padding: 6px;
  opacity: 0;
  visibility: hidden;
  transform: translateY(8px);
  transition: opacity 0.2s, transform 0.2s, visibility 0.2s;
  z-index: 300;
}

.flux-menu > li:hover > .flux-submenu {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.flux-submenu li a {
  display: block;
  padding: 9px 12px;
  border-radius: 6px;
  color: var(--flux-text);
  text-decoration: none;
  font-size: 13px;
  white-space: nowrap;
}

.flux-submenu li a:hover {
  background: var(--flux-bg);
  color: var(--flux-primary);
}

/* Top nav right actions */
.flux-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
}

.flux-icon-btn {
  width: 36px;
  height: 36px;
  border-radius: 8px;
  border: 1px solid var(--flux-border);
  background: var(--flux-card-bg);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 15px;
  cursor: pointer;
  color: var(--flux-text-light);
  transition: all 0.2s;
}

.flux-icon-btn:hover {
  border-color: var(--flux-primary);
  color: var(--flux-primary);
}

.flux-login-btn {
  background: var(--flux-accent);
  color: #fff;
  font-size: 13px;
  font-weight: 700;
  padding: 9px 18px;
  border-radius: 8px;
  text-decoration: none;
  transition: all 0.2s;
  white-space: nowrap;
}

.flux-login-btn:hover {
  background: #15803d;
  color: #fff;
}

/* Expandable search bar */
.flux-search-bar {
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 24px;
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.25s ease, padding 0.25s ease;
}

.flux-search-bar.open {
  max-height: 70px;
  padding: 0 24px 14px;
}

.flux-search-bar form {
  display: flex;
  align-items: center;
  gap: 10px;
  background: var(--flux-bg);
  border: 1px solid var(--flux-border);
  border-radius: 8px;
  padding: 10px 14px;
}

.flux-search-bar input {
  border: none;
  background: transparent;
  outline: none;
  flex: 1;
  font-size: 14px;
  color: var(--flux-text);
}

/* ═══════════════════════════════════════════
   MAIN CONTAINER
   ═══════════════════════════════════════════ */
.flux-main { flex: 1; }

.flux-container {
  max-width: 1280px;
  margin: 0 auto;
  padding: 28px 24px;
}

/* ═══════════════════════════════════════════
   HERO SECTION
   ═══════════════════════════════════════════ */
.flux-hero-section {
  display: grid;
  grid-template-columns: 1.4fr 1fr;
  gap: 16px;
  margin-bottom: 32px;
}

.flux-hero-card {
  position: relative;
  display: block;
  background: var(--flux-card-bg);
  border: 1px solid var(--flux-border);
  border-radius: var(--flux-radius);
  overflow: hidden;
  text-decoration: none;
  color: inherit;
  transition: box-shadow 0.2s;
}

.flux-hero-card:hover { box-shadow: var(--flux-shadow-md); }

.flux-hero-image {
  position: relative;
  height: 320px;
  background: linear-gradient(135deg, #e9d5ff, #c4b5fd);
  overflow: hidden;
}

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

.flux-hero-placeholder {
  width: 100%; height: 100%;
  display: flex; align-items: center; justify-content: center;
  font-size: 48px;
}

.flux-cat-badge {
  position: absolute;
  top: 14px; left: 14px;
  background: #000;
  color: #fff;
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 1px;
  padding: 5px 10px;
  border-radius: 4px;
}

.flux-ai-icon {
  position: absolute;
  top: 14px; right: 14px;
  width: 32px; height: 32px;
  background: rgba(0,0,0,0.4);
  color: #fff;
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: 14px;
}

.flux-hero-overlay {
  position: absolute;
  bottom: 90px;
  left: 0;
  padding: 0 20px;
}

.flux-hero-title {
  display: inline;
  background: #000;
  color: #fff;
  font-size: 30px;
  font-weight: 800;
  line-height: 1.5;
  padding: 4px 12px;
  box-decoration-break: clone;
  -webkit-box-decoration-break: clone;
}

.flux-hero-body {
  padding: 18px 20px;
}

.flux-hero-excerpt {
  font-size: 14px;
  color: var(--flux-text-light);
  line-height: 1.6;
  margin: 0 0 12px;
}

.flux-sparkle { margin-right: 4px; }

.flux-hero-meta {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  color: var(--flux-text-light);
  flex-wrap: wrap;
}

.flux-hero-meta a { color: var(--flux-text-light); text-decoration: underline; }

/* Secondary 2x2 grid */
.flux-secondary-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}

.flux-news-card {
  background: var(--flux-card-bg);
  border: 1px solid var(--flux-border);
  border-radius: var(--flux-radius);
  overflow: hidden;
  text-decoration: none;
  color: inherit;
  display: block;
  transition: box-shadow 0.2s;
}

.flux-news-card:hover { box-shadow: var(--flux-shadow-md); }

.flux-news-image {
  position: relative;
  height: 110px;
  background: #e2e8f0;
  overflow: hidden;
}

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

.flux-news-placeholder {
  width: 100%; height: 100%;
  display: flex; align-items: center; justify-content: center;
  font-size: 28px; color: var(--flux-text-light);
}

.flux-cat-badge.flux-cat-news { background: #ef4444; }
.flux-cat-badge.flux-cat-trends { background: #2563eb; }
.flux-cat-badge.flux-cat-lifestyle { background: #16a34a; }
.flux-cat-badge.flux-cat-most-popular { background: #f59e0b; }
.flux-cat-badge.flux-cat-health { background: #0ea5e9; }

.flux-news-body {
  padding: 12px 14px;
}

.flux-news-title {
  font-size: 14px;
  font-weight: 700;
  line-height: 1.4;
  margin: 0 0 8px;
}

.flux-news-meta {
  display: flex;
  align-items: center;
  gap: 5px;
  font-size: 11px;
  color: var(--flux-text-light);
  flex-wrap: wrap;
}

/* ═══════════════════════════════════════════
   TRENDING TOPICS STRIP
   ═══════════════════════════════════════════ */
.flux-trending-section { margin-bottom: 36px; }

.flux-section-label {
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 1px;
  text-transform: uppercase;
  color: var(--flux-text-light);
  margin: 0 0 14px;
}

.flux-trending-strip {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 14px;
}

.flux-trending-item {
  position: relative;
  display: block;
  height: 100px;
  border-radius: 10px;
  overflow: hidden;
  text-decoration: none;
  background: #e2e8f0;
}

.flux-trending-item img,
.flux-trending-placeholder {
  width: 100%; height: 100%;
  object-fit: cover;
  display: block;
}

.flux-trending-placeholder {
  background: linear-gradient(135deg, #cbd5e1, #94a3b8);
}

.flux-trending-item .flux-cat-badge {
  bottom: 10px;
  left: 10px;
  top: auto;
}

/* ═══════════════════════════════════════════
   MAIN GRID SECTION
   ═══════════════════════════════════════════ */
.flux-grid-section { margin-top: 8px; }

/* ═══════════════════════════════════════════
   FOOTER
   ═══════════════════════════════════════════ */
.flux-footer {
  border-top: 1px solid var(--flux-border);
  padding: 32px 24px;
  background: var(--flux-card-bg);
}

.flux-footer-widgets {
  max-width: 1280px;
  margin: 0 auto;
}

.flux-footer-widgets .widget-title {
  font-size: 14px;
  font-weight: 700;
  margin-bottom: 10px;
}

.flux-footer-widgets .widget {
  font-size: 13px;
  color: var(--flux-text-light);
}

.flux-bottom-bar {
  text-align: center;
  padding: 16px 24px;
  border-top: 1px solid var(--flux-border);
}

/* ═══════════════════════════════════════════
   RESPONSIVE
   ═══════════════════════════════════════════ */
@media (max-width: 1024px) {
  .flux-hero-section { grid-template-columns: 1fr; }
  .flux-trending-strip { grid-template-columns: repeat(3, 1fr); }
}

@media (max-width: 768px) {
  .flux-mobile-toggle { display: block; }

  .flux-nav {
    display: none;
    width: 100%;
    order: 10;
  }

  .flux-nav.open { display: block; }

  .flux-topnav-inner { flex-wrap: wrap; }

  .flux-menu {
    flex-direction: column;
    align-items: stretch;
    width: 100%;
    padding: 10px 0;
    gap: 2px;
  }

  .flux-menu > li > a { width: 100%; }

  .flux-submenu {
    position: static;
    opacity: 1;
    visibility: visible;
    transform: none;
    box-shadow: none;
    border: none;
    background: var(--flux-bg);
    margin: 0;
    display: none;
  }

  .flux-menu > li.open > .flux-submenu { display: block; }

  .flux-secondary-grid { grid-template-columns: 1fr; }
  .flux-trending-strip { grid-template-columns: repeat(2, 1fr); }
  .flux-hero-title { font-size: 22px; }
  .flux-container { padding: 16px; }
}

@media (max-width: 480px) {
  .flux-trending-strip { grid-template-columns: 1fr 1fr; }
}
