/* =========================================================
   article.css
   Dedicated styles for articles.html — a magazine-style
   knowledge hub. Loaded after style.css; reuses its tokens,
   header, footer, buttons, dark-section/badge/glass-card
   primitives, and the cta-card / newsletter-form components.
========================================================= */

/* ---------------------------------------------------------
   Header: transparent over the dark hero until scrolled
--------------------------------------------------------- */
.header:not(.scrolled) .logo,
.header:not(.scrolled) .nav-link {
  color: var(--white);
}

.header:not(.scrolled) .logo-dot {
  color: var(--cyan);
}

.header:not(.scrolled) .hamburger span {
  background: var(--white);
}

/* Small utilities used by the search/filter/load-more JS */
.hidden {
  display: none !important;
}

.hidden-card {
  display: none;
}

/* ---------------------------------------------------------
   HERO + SEARCH
--------------------------------------------------------- */
.articles-hero {
  padding: 190px 0 90px;
  overflow: hidden;
}

.hero-content {
  position: relative;
  z-index: 1;
  max-width: 720px;
  margin: 0 auto;
}

.articles-hero .gradient-title {
  font-size: clamp(30px, 4.4vw, 48px);
  font-weight: 800;
  line-height: 1.4;
  margin-bottom: 20px;
}

.articles-hero .hero-desc {
  color: rgba(255, 255, 255, 0.62);
  font-size: 1.05rem;
  line-height: 1.9;
  max-width: 560px;
  margin: 0 auto 40px;
}

.search-box-wrapper {
  max-width: 620px;
  margin: 0 auto;
}

.search-form {
  display: flex;
  align-items: center;
  gap: 10px;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: 60px;
  padding: 8px 8px 8px 24px;
  backdrop-filter: blur(10px);
}

.search-icon {
  font-size: 1.1rem;
  opacity: 0.7;
  flex-shrink: 0;
}

.search-form input {
  flex: 1;
  border: none;
  background: transparent;
  color: var(--white);
  font-family: inherit;
  font-size: 0.98rem;
  padding: 10px 4px;
}

.search-form input::placeholder {
  color: rgba(255, 255, 255, 0.45);
}

.search-form input:focus {
  outline: none;
}

.search-form .btn {
  flex-shrink: 0;
  padding: 12px 26px;
}

@media (max-width: 560px) {
  .search-form {
    flex-wrap: wrap;
    border-radius: var(--radius-md);
    padding: 14px;
  }

  .search-form input {
    flex-basis: 100%;
    order: 1;
  }

  .search-form .btn {
    order: 2;
    flex: 1;
  }
}

/* ---------------------------------------------------------
   CATEGORIES
--------------------------------------------------------- */
.categories-section {
  padding: 26px 0;
  background: var(--white);
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 72px;
  z-index: 400;
}

.categories-scroll {
  display: flex;
  gap: 12px;
  overflow-x: auto;
  scrollbar-width: none;
  padding-bottom: 2px;
}

.categories-scroll::-webkit-scrollbar {
  display: none;
}

.cat-btn {
  flex-shrink: 0;
  padding: 10px 22px;
  border-radius: 50px;
  border: 1px solid var(--border);
  background: var(--white);
  color: var(--muted);
  font-weight: 600;
  font-size: 0.9rem;
  white-space: nowrap;
  transition: var(--transition);
}

.cat-btn:hover {
  border-color: rgba(108, 59, 255, 0.35);
  color: var(--primary);
}

.cat-btn.active {
  background: var(--primary);
  border-color: var(--primary);
  color: var(--white);
  box-shadow: 0 8px 20px rgba(108, 59, 255, 0.25);
}

/* ---------------------------------------------------------
   SHARED ARTICLE META
--------------------------------------------------------- */
.article-meta {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 14px;
  margin-bottom: 14px;
}

.meta-tag {
  background: rgba(108, 59, 255, 0.08);
  color: var(--primary);
  font-size: 0.78rem;
  font-weight: 700;
  padding: 5px 14px;
  border-radius: 50px;
}

.meta-date,
.meta-time {
  color: var(--muted);
  font-size: 0.82rem;
  font-weight: 600;
}

/* ---------------------------------------------------------
   FEATURED ARTICLE
--------------------------------------------------------- */
.featured-article-section {
  padding: 70px 0 100px;
  background: var(--white);
}

.featured-article-card {
  display: grid;
  grid-template-columns: 1.1fr 1fr;
  align-items: stretch;
  border-radius: var(--radius-lg);
  overflow: hidden;
  background: var(--white);
}

.featured-img-holder {
  position: relative;
  min-height: 320px;
}

.featured-img-holder img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  background: linear-gradient(135deg, rgba(108, 59, 255, 0.15), rgba(34, 211, 238, 0.1));
}

.featured-badge-overlay {
  position: absolute;
  top: 20px;
  right: 20px;
  background: var(--gradient-primary);
  color: var(--white);
  font-size: 0.78rem;
  font-weight: 700;
  padding: 7px 16px;
  border-radius: 50px;
}

.featured-content {
  padding: 48px 50px;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.featured-article-title {
  font-size: clamp(22px, 2.6vw, 30px);
  font-weight: 800;
  line-height: 1.5;
  margin-bottom: 16px;
}

.featured-article-title a {
  color: var(--text);
}

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

.featured-excerpt {
  color: var(--muted);
  line-height: 1.9;
  margin-bottom: 28px;
}

.featured-content .btn-arrow {
  display: inline-block;
  transform: scaleX(-1);
  margin-right: 4px;
  transition: var(--transition);
}

.featured-content .btn:hover .btn-arrow {
  transform: scaleX(-1) translateX(4px);
}

@media (max-width: 900px) {
  .featured-article-card {
    grid-template-columns: 1fr;
  }

  .featured-img-holder {
    min-height: 240px;
  }

  .featured-content {
    padding: 36px 30px;
  }
}

/* ---------------------------------------------------------
   MAGAZINE EDITORIAL GRID
--------------------------------------------------------- */
.magazine-editorial-section {
  padding: 20px 0 100px;
  background: var(--white);
}

.magazine-editorial-section .section-header {
  margin-bottom: 40px;
}

.magazine-editorial-section .section-header h2 {
  font-size: clamp(24px, 3vw, 32px);
  font-weight: 800;
  margin-bottom: 8px;
}

.magazine-editorial-section .section-header p {
  color: var(--muted);
}

.editorial-grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr;
  gap: 32px;
}

.editorial-main-card {
  border-radius: var(--radius-md);
  overflow: hidden;
  border: 1px solid var(--border);
  transition: var(--transition);
}

.editorial-main-card:hover {
  box-shadow: var(--shadow-lg);
  transform: translateY(-4px);
}

.editorial-main-card .card-img-holder {
  height: 300px;
}

.editorial-main-card .card-info {
  padding: 28px;
}

.editorial-main-card .card-title {
  font-size: 1.35rem;
  font-weight: 800;
  line-height: 1.6;
  margin-bottom: 12px;
}

.editorial-side-list {
  display: flex;
  flex-direction: column;
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  overflow: hidden;
}

.editorial-side-card {
  display: flex;
  align-items: flex-start;
  gap: 18px;
  padding: 24px;
  border-bottom: 1px solid var(--border);
  transition: var(--transition);
}

.editorial-side-card:last-child {
  border-bottom: none;
}

.editorial-side-card:hover {
  background: rgba(108, 59, 255, 0.03);
}

.side-num {
  flex-shrink: 0;
  font-size: 1.6rem;
  font-weight: 800;
  color: var(--border);
  font-variant-numeric: tabular-nums;
}

.side-title {
  font-size: 0.98rem;
  font-weight: 700;
  line-height: 1.7;
  margin: 6px 0 8px;
}

.side-title a {
  color: var(--text);
}

.side-title a:hover {
  color: var(--primary);
}

.side-info .meta-date {
  display: block;
}

@media (max-width: 900px) {
  .editorial-grid {
    grid-template-columns: 1fr;
  }
}

/* ---------------------------------------------------------
   CARD BASE (used by editorial-main-card + latest grid)
--------------------------------------------------------- */
.card-img-holder {
  position: relative;
  overflow: hidden;
  aspect-ratio: 16 / 10;
}

.card-img-holder img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  background: linear-gradient(135deg, rgba(108, 59, 255, 0.12), rgba(255, 138, 61, 0.1));
  transition: var(--transition);
}

.article-card:hover .card-img-holder img {
  transform: scale(1.06);
}

.card-title {
  font-size: 1.08rem;
  font-weight: 800;
  line-height: 1.6;
  margin-bottom: 10px;
}

.card-title a {
  color: var(--text);
}

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

.card-desc {
  color: var(--muted);
  font-size: 0.92rem;
  line-height: 1.8;
}

/* ---------------------------------------------------------
   LATEST ARTICLES GRID
--------------------------------------------------------- */
.articles-grid-section {
  padding: 20px 0 110px;
  background: var(--light-bg);
}

.articles-grid-section .section-header h2 {
  font-size: clamp(24px, 3vw, 32px);
  font-weight: 800;
}

.articles-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 28px;
  margin-top: 40px;
}

.article-card {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  overflow: hidden;
  transition: var(--transition);
}

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

.article-card .card-info {
  padding: 24px;
}

.card-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: 18px;
  padding-top: 16px;
  border-top: 1px solid var(--border);
}

.card-date {
  color: var(--muted);
  font-size: 0.82rem;
  font-weight: 600;
}

.card-arrow {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: rgba(108, 59, 255, 0.08);
  color: var(--primary);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.9rem;
  transform: scaleX(-1);
  transition: var(--transition);
}

.card-arrow:hover {
  background: var(--primary);
  color: var(--white);
}

@media (max-width: 992px) {
  .articles-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 640px) {
  .articles-grid {
    grid-template-columns: 1fr;
  }
}

/* Empty state */
.empty-state {
  text-align: center;
  padding: 80px 20px;
}

.empty-icon {
  font-size: 2.6rem;
  margin-bottom: 20px;
}

.empty-state h3 {
  font-size: 1.2rem;
  font-weight: 800;
  margin-bottom: 10px;
}

.empty-state p {
  color: var(--muted);
  margin-bottom: 28px;
}

/* Load more + pagination */
.load-more-container {
  margin-top: 50px;
}

.pagination-wrapper {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 8px;
  margin-top: 34px;
  flex-wrap: wrap;
}

.page-link {
  min-width: 40px;
  height: 40px;
  padding: 0 8px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 0.9rem;
  color: var(--muted);
  transition: var(--transition);
}

.page-link:hover {
  background: rgba(108, 59, 255, 0.08);
  color: var(--primary);
}

.page-link.active {
  background: var(--primary);
  color: var(--white);
}

.page-dots {
  color: var(--muted);
  padding: 0 4px;
}

/* ---------------------------------------------------------
   POPULAR ARTICLES (dark, ranked list)
--------------------------------------------------------- */
.popular-articles-section {
  padding: 100px 0;
  overflow: hidden;
}

.popular-articles-section .section-header {
  margin-bottom: 50px;
}

.popular-articles-section .section-header p {
  color: rgba(255, 255, 255, 0.55);
}

.popular-list {
  position: relative;
  z-index: 1;
  max-width: 780px;
  margin: 0 auto;
}

.popular-item {
  display: flex;
  align-items: center;
  gap: 26px;
  padding: 24px 10px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  transition: var(--transition);
}

.popular-item:first-child {
  padding-top: 0;
}

.popular-item:last-child {
  border-bottom: none;
}

.popular-item:hover {
  padding-right: 14px;
}

.pop-num {
  flex-shrink: 0;
  font-size: 2.2rem;
  font-weight: 800;
  color: rgba(255, 255, 255, 0.15);
  font-variant-numeric: tabular-nums;
  transition: var(--transition);
}

.popular-item:hover .pop-num {
  color: var(--primary);
}

.pop-details {
  flex: 1;
  min-width: 0;
}

.pop-details .meta-tag {
  background: rgba(255, 255, 255, 0.08);
  color: var(--cyan);
}

.pop-title {
  font-size: 1.05rem;
  font-weight: 700;
  line-height: 1.7;
  margin-top: 8px;
}

.pop-title a {
  color: var(--white);
}

.pop-title a:hover {
  color: var(--cyan);
}

.pop-time {
  flex-shrink: 0;
  color: rgba(255, 255, 255, 0.45);
  font-size: 0.85rem;
  font-weight: 600;
}

@media (max-width: 640px) {
  .popular-item {
    flex-wrap: wrap;
    gap: 10px 20px;
  }

  .pop-time {
    margin-right: auto;
    padding-right: 66px;
  }
}

/* ---------------------------------------------------------
   NEWSLETTER
--------------------------------------------------------- */
.newsletter-section {
  padding: 0 0 100px;
  background: var(--light-bg);
}

.newsletter-card {
  position: relative;
  overflow: hidden;
  border-radius: var(--radius-lg);
  padding: 70px 40px;
}

.newsletter-content {
  position: relative;
  z-index: 1;
  max-width: 560px;
  margin: 0 auto;
}

.newsletter-content .gradient-title {
  font-size: clamp(24px, 3vw, 32px);
  font-weight: 800;
  margin-bottom: 14px;
}

.newsletter-content p {
  color: rgba(255, 255, 255, 0.62);
  margin-bottom: 10px;
}

.newsletter-content .newsletter-form {
  max-width: 460px;
  margin: 24px auto 0;
}

/* ---------------------------------------------------------
   FOOTER (page-specific 3-column layout)
--------------------------------------------------------- */
.footer-container {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr;
  gap: 40px;
  padding-bottom: 50px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.footer-col .logo {
  color: var(--white);
  margin-bottom: 16px;
  display: inline-block;
}

.footer-about {
  color: rgba(255, 255, 255, 0.55);
  font-size: 0.92rem;
  line-height: 1.85;
  max-width: 320px;
}

.footer-col p {
  color: rgba(255, 255, 255, 0.55);
  font-size: 0.92rem;
  line-height: 2;
}

@media (max-width: 768px) {
  .footer-container {
    grid-template-columns: 1fr;
    gap: 34px;
  }
}

/* ---------------------------------------------------------
   FLOATING QUICK CONTACT
--------------------------------------------------------- */
.floating-contact {
  position: fixed;
  bottom: 28px;
  left: 28px;
  z-index: 900;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 12px;
}

.floating-menu {
  display: flex;
  flex-direction: column;
  gap: 10px;
  opacity: 0;
  visibility: hidden;
  transform: translateY(10px);
  transition: var(--transition);
}

.floating-menu.active {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.float-item {
  background: var(--white);
  color: var(--text);
  font-size: 0.85rem;
  font-weight: 600;
  padding: 10px 18px;
  border-radius: 30px;
  box-shadow: var(--shadow-lg);
  white-space: nowrap;
}

.float-item:hover {
  background: var(--primary);
  color: var(--white);
}

.floating-btn {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: var(--primary);
  color: var(--white);
  font-size: 1.4rem;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: var(--shadow-glow);
  transition: var(--transition);
  border: none;
  cursor: pointer;
}

.floating-btn:hover {
  transform: scale(1.08);
}

@media (max-width: 768px) {
  .floating-contact {
    left: 18px;
    bottom: 18px;
  }

  .articles-hero {
    padding-top: 150px;
  }

  .categories-section {
    top: 64px;
  }
}
.logo-dot {
    color: var(--primary);
}

.dark-section {
    background: var(--dark);
    color: var(--white);
    position: relative;
}

.gradient-title {
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.badge-tag {
    display: inline-flex;
    align-items: center;
    padding: 8px 18px;
    border-radius: 50px;
    background: rgba(108, 59, 255, 0.12);
    border: 1px solid rgba(108, 59, 255, 0.25);
    color: var(--cyan);
    font-weight: 700;
    font-size: 0.9rem;
    margin-bottom: 22px;
}

.glass-card {
    background: rgba(255, 255, 255, 0.7);
    border: 1px solid rgba(255, 255, 255, 0.5);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    box-shadow: var(--shadow-lg);
}

.hero-glow {
    position: absolute;
    border-radius: 50%;
    filter: blur(120px);
    pointer-events: none;
    z-index: 0;
}

.hero-glow.primary-glow {
    top: -10%;
    right: -8%;
    width: 420px;
    height: 420px;
    background: var(--primary);
    opacity: 0.35;
}

.hero-glow.secondary-glow {
    bottom: -20%;
    left: -8%;
    width: 380px;
    height: 380px;
    background: var(--cyan);
    opacity: 0.2;
}

/* Extra button variants */
.btn-gradient {
    background: var(--gradient-primary);
    background-size: 200% auto;
    color: var(--white);
    box-shadow: var(--shadow-glow);
}

.btn-gradient:hover {
    background-position: right center;
    transform: translateY(-3px);
    box-shadow: 0 18px 40px rgba(108, 59, 255, 0.4);
}

.btn-outline-gradient {
    background: transparent;
    color: var(--primary);
    border: 2px solid rgba(108, 59, 255, 0.3);
}

.btn-outline-gradient:hover {
    border-color: var(--primary);
    background: rgba(108, 59, 255, 0.06);
    transform: translateY(-3px);
}

.btn-lg {
    padding: 17px 38px;
    font-size: 1.05rem;
}
