/* =========
   Global Styles
   ========= */
:root {
  --bg-body: #ffffff;
  --bg-card: #ffffff;
  --bg-chip: #f1edff;
  --overlay-backdrop: rgba(15, 23, 42, 0.55);

  --primary: #420BB9;
  --primary-soft: rgba(90, 61, 240, 0.1);

  /* --text-main: #030859; */
  --text-main: #420BB9;
  --text: #000000;
  --text-muted: #444444;

  --border-soft: #1a1c2b;
  --shadow-soft: 0 16px 40px rgba(15, 23, 42, 0.08);

  --radius-lg: 15px;
  --radius-pill: 999px;
}

/* Dark theme = only variables + a few layout tweaks */
body.dark-theme {
  --bg-body: #020617;
  --bg-card: #0e0e0e;
  --bg-chip: #111827;
  --overlay-backdrop: rgba(15, 23, 42, 0.8);

  --primary: #ff809a;
  --primary-soft: rgba(168, 85, 247, 0.18);

  --text-main: #f9fafb;
  --text: #ffffff;
  --text-muted: #9ca3af;

  --border-soft: #1f2937;
  --shadow-soft: 0 18px 40px rgba(0, 0, 0, 0.8);
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: "Poppins";
  background: var(--bg-body) !important;
  color: var(--text-main);
}

img {
  max-width: 100%;
}

p {
  color: var(--text);
}

a {
  color: inherit;
  text-decoration: none;
}

a:hover {
  color: var(--primary);
}

.container {
  width: min(1120px, 100% - 3rem);
  margin: 0 auto;
}

.logo {
  height: 65px;
  width: auto;
}

article ul {
  padding-left: 18px !important;
}

article li {
  padding-left: 10px;
}

article ul li {
  list-style: decimal !important;
  color: var(--text);
}

.highlight {
  color: var(--primary) !important;
}

.dark-theme .highlight {
  color: var(--primary) !important;
}

/* =========
   Header / Nav
   ========= */

.site-header {
  position: sticky;
  top: 0;
  z-index: 20;
  backdrop-filter: blur(14px);
  background: rgba(247, 246, 255, 0.9);
  border-bottom: 1px solid rgba(227, 230, 255, 0.6);
}

.navbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.75rem 0;
}

.nav-left {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.logo-circle {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: var(--primary);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-weight: 700;
  font-size: 18px;
}

.nav-links {
  display: flex;
  gap: 1.5rem;
  font-size: 0.95rem;
}

.nav-links a {
  font-weight: 500;
  color: var(--text-muted);
}

.nav-links a.active {
  color: var(--primary);
}

.nav-right {
  display: flex;
  gap: 1rem;
  align-items: center;
  padding: 25px 0px;
  padding-right: 25px;
}

.fixed-header .nav-right {
  /* display: none; */
}

.toggle-btn {
  width: 34px;
  height: 34px;
  border-radius: 50px;
  border: 1px solid var(--border-soft);
  background: var(--bg-card);
  color: var(--text);
}

.toggle-btn:hover {
  color: var(--text-muted);
}

.icon-btn {
  width: 34px;
  height: 34px;
  color: var(--text);
  border-radius: var(--radius-pill);
  border: 1px solid var(--border-soft);
  background: var(--bg-card);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
}

/* dark header tweaks */
body.dark-theme .site-header {
  background: rgba(15, 23, 42, 0.92);
  border-bottom: 1px solid rgba(31, 41, 55, 0.9);
}

body.dark-theme .icon-btn {
  background: #020617;
  border-color: var(--border-soft);
}

/* =========
   Hero section
   ========= */

.hero {
  padding: 3rem 0 2rem;
  text-align: center;
}

.hero-title {
  font-size: 45px;
  font-weight: 700;
  line-height: 1.2;
  margin: 0;
  color: var(--text);
}

.hero-highlight {
  color: var(--primary);
}

.hero-subtitle {
  max-width: 640px;
  margin: 0 auto 2.5rem;
  color: var(--text-muted);
  font-size: 0.98rem;
}

/* chips / tags */

.chip-row {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.75rem;
}

.chip {
  padding: 0.55rem 1.25rem;
  border-radius: var(--radius-pill);
  background: var(--bg-chip);
  font-size: 0.85rem;
  color: var(--text-main);
  font-weight: 500;
  border: 1px solid transparent;
  cursor: pointer;
}

.chip.chip-primary {
  background: var(--primary);
  color: #fff;
  box-shadow: 0 10px 20px rgba(90, 61, 240, 0.35);
}

/* Section heading */

.section-heading {
  margin: 2.5rem 0 1.5rem;
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 1rem;
}

.section-heading h2 {
  font-size: 1.35rem;
  margin: 0;
  color: var(--text-main);
}

.section-heading span {
  font-size: 0.9rem;
  color: var(--text-muted);
}

/* =========
   Blog cards grid
   ========= */

.blog-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1.75rem;
}

.blog-card {
  background: var(--bg-card);
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-soft);
  display: flex;
  flex-direction: column;
  transition: transform 0.2s ease, box-shadow 0.2s ease, translate 0.2s ease;
}

.blog-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 20px 45px rgba(15, 23, 42, 0.12);
}

.blog-card-image {
  position: relative;
  overflow: hidden;
}

.blog-card-image img {
  width: 100%;
  height: 235px;
  object-fit: cover;
}

.badge {
  position: absolute;
  top: 14px;
  right: 14px;
  padding: 0.35rem 0.9rem;
  background: #ff4b70;
  color: #f9fafb;
  border-radius: var(--radius-pill);
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.badge-soft {
  background: rgba(17, 24, 39, 0.8);
}

.blog-card-content {
  padding: 1.2rem 1.3rem 1.3rem;
  display: flex;
  flex-direction: column;
  flex: 1;
}

.meta-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.85rem;
  font-size: 0.78rem;
  color: var(--text-muted);
  margin-bottom: 0.6rem;
}

.meta-row span {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
}

.blog-card-title {
  font-size: 1.05rem;
  margin: 0 0 0.5rem;
  font-weight: 650;
  color: var(--text-main);
}

.blog-card-excerpt {
  font-size: 0.88rem;
  color: var(--text-muted);
  margin-bottom: 0.9rem;
}

.read-link {
  margin-top: auto;
  font-size: 0.86rem;
  font-weight: 600;
  color: var(--text-main) !important;
}

.read-link:hover {
  color: var(--text-muted) !important;
}


/* =========
   Pagination
   ========= */

.pagination {
  display: flex;
  justify-content: center;
  align-items: center;
  margin: 2.5rem 0 3rem;
  gap: 0.4rem;
}

.page-btn {
  width: 38px;
  height: 38px;
  border-radius: var(--radius-pill);
  border: 1px solid var(--border-soft);
  background: var(--bg-card);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 0.85rem;
  cursor: pointer;
  color: var(--text-main);
}

.page-btn.active {
  border-color: var(--primary);
  color: var(--primary);
  box-shadow: var(--shadow-soft);
}

/* Dark mode pagination tweak (active more visible) */
body.dark-theme .page-btn {
  background: #020617;
}

body.dark-theme .page-btn.active {
  background: var(--primary);
  color: #fff;
}

/* =========
   Newsletter strip
   ========= */

.newsletter {
  background: var(--bg-card);
  border-radius: var(--radius-lg);
  padding: 2rem 1.5rem;
  box-shadow: var(--shadow-soft);
  text-align: center;
  margin-bottom: 3rem;
}

.newsletter h3 {
  margin: 0 0 0.75rem;
  color: var(--text-main);
}

.newsletter p {
  margin: 0 0 1.3rem;
  font-size: 0.9rem;
  color: var(--text-muted);
}

.newsletter-form {
  display: flex;
  gap: 0.75rem;
  flex-wrap: wrap;
  justify-content: center;
}

.newsletter-form input {
  padding: 0.75rem 0.9rem;
  min-width: min(260px, 100%);
  border-radius: var(--radius-pill);
  border: 1px solid var(--border-soft);
  outline: none;
  font-size: 0.9rem;
  background: var(--bg-body);
  color: var(--text-main);
}

.btn-primary {
  padding: 0.75rem 1.4rem;
  border-radius: var(--radius-pill);
  border: none;
  background: linear-gradient(135deg, var(--primary), #d04747);
  color: #fff;
  font-weight: 600;
  cursor: pointer;
  font-size: 0.9rem;
  box-shadow: 0 16px 30px rgba(90, 61, 240, 0.45);
}

.btn-primary:hover {
  background: linear-gradient(135deg, #d04747, var(--primary));

}

/* =========
   Single post page
   ========= */

/* .page-shell {
  padding: 2.5rem 0 3rem;
} */

/* .breadcrumb {
  font-size: 0.8rem;
  color: var(--text-muted);
  margin-bottom: 1.5rem;
}

.breadcrumb a {
  color: var(--text-muted);
} */

.layout-main {
  display: grid;
  grid-template-columns: minmax(0, 3fr) minmax(280px, 1.4fr);
  gap: 2.5rem;
}

.post-article {
  background: var(--bg-card);
  border-radius: var(--radius-lg);
  padding: 1.8rem 1.8rem 2rem;
  box-shadow: var(--shadow-soft);
}

.post-title {
  font-size: 35px;
  margin: 0 0 20px;
  color: var(--text-main);
  line-height: 1.2 !important;
}

.post-meta {
  font-size: 0.84rem;
  color: var(--text-muted);
  display: flex;
  flex-wrap: wrap;
  gap: 0.9rem;
  margin-bottom: 1.2rem;
}

.post-featured {
  margin: 1.2rem 0 1.6rem;
  border-radius: 18px;
  overflow: hidden;
}

.post-article p {
  line-height: 1.4;
  font-size: 16px;
  margin: 0 0 12px;
}

.post-article h2 {
  color: var(--text-main);
  font-size: 26px;
  margin-top: 20px;
  margin-bottom: 12px;
}

.post-article h3 {
  color: var(--text);
  font-size: 20px;
  margin-top: 20px;
  margin-bottom: 12px;
}

.border-seperator {
  margin-top: 30px;
  margin-bottom: 25px;
  border-top: 1px solid var(--border-soft);
}

/* Social share */

.share-row {
  margin-top: 2rem;
  padding-top: 1.25rem;
  border-top: 1px solid var(--border-soft);
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 1rem;
  font-size: 0.9rem;
  color: var(--text);
}

.share-icons {
  display: flex;
  gap: 0.6rem;
}

/* =========
   Sidebar widgets
   ========= */

.sidebar {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.widget {
  background: var(--bg-card);
  border-radius: var(--radius-lg);
  padding: 1.4rem 1.3rem 1.5rem;
  box-shadow: var(--shadow-soft);
}

.widget-title {
  font-size: 18px !important;
  margin: 0 0 15px;
  color: var(--text-main) !important;
  font-weight: 700 !important;
}

.widget+.widget {
  margin-top: 0.2rem;
}

.widget-search input {
  width: 100%;
  border-radius: var(--radius-pill);
  border: 1px solid var(--border-soft);
  padding: 0.7rem 0.9rem;
  font-size: 0.9rem;
  outline: none;
  background: var(--bg-body);
  color: var(--text-main);
}

.widget-about p {
  font-size: 0.9rem;
  color: var(--text-muted);
}

.widget-recent ul,
.widget-categories ul {
  list-style: none;
  padding: 0;
  margin: 0;
}

.widget-recent li {
  display: flex;
  gap: 0.7rem;
  margin-bottom: 15px;
  align-items: center;
}

.recent-thumb {
  width: 48px;
  height: 48px;
  border-radius: 12px;
  background: var(--primary-soft);
  flex-shrink: 0;
  text-align: center;
  align-content: center;
}

.recent-thumb i {
  color: var(--primary);
  font-size: 20px;
}

.recent-post {
  font-size: 14px;
  font-weight: 600;
  color: var(--text) !important;
}

.recent-meta {
  margin-top: 5px;
  font-size: 13px;
  color: var(--text-muted);
}

.widget-categories li {
  display: flex;
  justify-content: space-between;
  padding: 0.4rem 0;
  font-size: 0.88rem;
  color: var(--text-muted);
}

.widget-tags .tag-cloud {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
}

.tag-cloud a {
  font-size: 0.8rem;
  padding: 0.35rem 0.75rem;
  border-radius: 999px;
  background: var(--bg-chip);
  color: var(--text-main);
}

.tag-cloud p {
  font-size: 0.8rem;
  padding: 0.35rem 0.75rem;
  border-radius: 999px;
  background: var(--bg-chip);
  color: var(--text-main);
  margin: 0;
}

.widget-newsletter p {
  font-size: 0.86rem;
  color: var(--text-muted);
  margin-bottom: 0.9rem;
}

.widget-newsletter input {
  width: 100%;
  border-radius: var(--radius-pill);
  border: 1px solid var(--border-soft);
  padding: 0.6rem 0.8rem;
  margin-bottom: 0.75rem;
  font-size: 0.88rem;
  background: var(--bg-body);
  color: var(--text-main);
}

.widget-newsletter button {
  width: 100%;
  padding: 0.65rem 1rem;
  border-radius: var(--radius-pill);
  border: none;
  background: linear-gradient(135deg, var(--primary), #9b5cf6);
  color: #fff;
  font-size: 0.88rem;
  font-weight: 600;
  cursor: pointer;
}


/* =========
   Search overlay
   ========= */

.search-overlay {
  position: fixed;
  inset: 0;
  background: var(--overlay-backdrop);
  display: flex;
  align-items: flex-start;
  justify-content: center;
  padding-top: 15%;
  opacity: 0;
  pointer-events: none;
  transform: translateY(6px);
  transition: opacity 0.2s ease, transform 0.2s ease;
  z-index: 40;
}

.search-dialog {
  width: min(520px, 100% - 2.5rem);
  background: var(--bg-card);
  border-radius: 20px;
  padding: 1.4rem 1.6rem 1.5rem;
  box-shadow: 0 20px 50px rgba(15, 23, 42, 0.35);
  position: relative;
  color: var(--text-main);
  border: 1px solid var(--border-soft);
  backdrop-filter: blur(12px);
}

.search-dialog h3 {
  margin: 0 0 0.9rem;
  font-size: 1.05rem;
  color: var(--text-main);
}

#search-input {
  width: 100%;
  border-radius: 999px;
  border: 1px solid var(--border-soft);
  padding: 0.75rem 1rem;
  font-size: 0.9rem;
  outline: none;
  background: var(--bg-body);
  color: var(--text-main);
}

#search-input::placeholder {
  color: var(--text-muted);
}

.search-hint {
  margin-top: 0.6rem;
  font-size: 0.8rem;
  color: var(--text-muted);
}

.search-close {
  position: absolute;
  right: 0.9rem;
  top: 0.9rem;
  border: none;
  background: transparent;
  cursor: pointer;
  color: var(--text-main);
}

/* Show overlay when body has search-open */
body.search-open .search-overlay {
  opacity: 1;
  pointer-events: auto;
  transform: translateY(0);
}

/* =========
   Responsive
   ========= */

@media (max-width: 960px) {
  .blog-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .layout-main {
    grid-template-columns: minmax(0, 1fr);
  }
}

@media (max-width: 720px) {

  .hero-title {
    font-size: 30px;
  }

  .navbar {
    flex-wrap: wrap;
    gap: 0.8rem;
  }

  .nav-links {
    display: none;
  }

  .blog-grid {
    grid-template-columns: minmax(0, 1fr);
  }

  .hero {
    padding-top: 2.3rem;
  }

  .post-title {
    font-size: 25px;
  }

  .post-article h2 {
    font-size: 20px;
  }

  .post-article h3 {
    font-size: 17px;
  }

  .post-article p {
    font-size: 13px;
  }

  .post-meta {
    font-size: 12px;
  }

  article ul li {
    font-size: 13px;
  }

  .post-featured {
    border-radius: 10px;
  }
}


/* Scroll to Top Button */
.back-to-top {
  position: fixed;
  bottom: 28px;
  right: 28px;
  width: 46px;
  height: 46px;
  border-radius: 50%;
  background: var(--primary);
  color: #fff;
  font-size: 1.4rem;
  font-weight: 600;
  border: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 6px 18px rgba(90, 61, 240, 0.4);
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.25s ease, transform 0.25s ease, visibility 0.25s;
  z-index: 9999;
}

.back-to-top.show {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.back-to-top:hover {
  transform: translateY(-4px);
}

/* Dark mode override */
body.dark-theme .back-to-top {
  background: var(--primary);
  color: #fff;
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.65);
}


/* Nav Bar In Dark Mode  */

/* .dark-theme .sticky-header {
  background: var(--bg-body);
  border-bottom: none;
}

.dark-theme .ft1-main-header .header-upper .inner-container {
  background-color: var(--bg-body);
}

.dark-theme .main-menu .navigation>li>a {
  color: var(--text-main);
}

.dark-theme .sticky-header .main-menu .navigation>li>a {
  color: var(--text-main);
}


.dark-theme .ft1-main-header::before {
  background-color: #00022c;
}

.dark-theme .ft1-main-footer {
  background-color: #00022c;
} */


/* ===============================
   Floating Theme Toggle Button
   =============================== */

.theme-float-btn {
  position: fixed;
  right: 10px;
  top: 30%;
  transform: translateY(-50%);
  width: 50px;
  height: 50px;
  border-radius: 50%;
  border: none;
  background: linear-gradient(140deg, var(--cta-1), var(--cta-3), var(--cta-2));
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  z-index: 99999;
  box-shadow: 0 14px 35px rgba(124, 58, 237, 0.45);
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}

/* Hover lift */
.theme-float-btn:hover {
  color: #d7d7d7;
  transform: translateY(-50%) scale(1.08);
  box-shadow: 0 20px 45px rgba(124, 58, 237, 0.6);
}

/* Icon animation */
.theme-float-btn i {
  font-size: 18px;
  transition: transform 0.45s ease, opacity 0.25s ease;
}

/* Rotate when dark */
body.dark-theme .theme-float-btn i {
  transform: rotate(180deg);
}

/* Dark mode button background */
body.dark-theme .theme-float-btn {
  color: #fff;
  background: linear-gradient(140deg, #5100ff, #230007, #020006);
}

/* ===============================
   Mobile UX Improvements
   =============================== */

@media (max-width: 768px) {
  .theme-float-btn {
    top: 33%;
    bottom: 0;
    right: 8px;
    width: 40px;
    height: 40px;
  }
}

/* =================================================
   TOOLTIP (BASE)
   ================================================= */

.theme-float-btn::after {
  content: attr(data-tooltip);
  position: absolute;
  background: #111827;
  color: #ffffff;
  font-size: 12px;
  padding: 6px 10px;
  border-radius: 999px;
  white-space: nowrap;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.25s ease, transform 0.25s ease;
}

/* =================================================
   DESKTOP TOOLTIP (HOVER)
   ================================================= */

@media (hover: hover) {
  .theme-float-btn::after {
    right: 60px;
    top: 50%;
    transform: translateY(-50%) translateX(6px);
  }

  .theme-float-btn:hover::after {
    opacity: 1;
    transform: translateY(-50%) translateX(0);
  }
}

/* =================================================
   MOBILE UX + TOOLTIP (LEFT SIDE)
   ================================================= */

@media (max-width: 768px) {

  /* Tooltip always on LEFT, never top */
  .theme-float-btn::after {
    right: 56px;
    left: auto;
    top: 50%;
    transform: translateY(-50%) translateX(6px);
    max-width: calc(100vw - 90px);
    /* prevent viewport cut */
  }

  /* Tooltip shown only when JS adds class */
  .theme-float-btn.show-tooltip::after {
    opacity: 1;
    transform: translateY(-50%) translateX(0);
  }
}

/* =================================================
   ACCESSIBILITY / SAFETY
   ================================================= */

.theme-float-btn:focus {
  outline: none;
}

.theme-float-btn:focus-visible {
  box-shadow: 0 0 0 3px rgba(124, 58, 237, 0.35);
}