/* Base Reset & Variables */
:root {
  --bg-color: #F7F8FC;
  --text-main: #002F4D;
  --primary-blue: #0262A1;
  --accent-cyan: #34B0ED;
  --bg-light: #F7F8FC;
  --font-family: 'Inter', system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  font-family: var(--font-family);
  background-color: var(--bg-color);
  background-image: url('bagroundblue.png');
  background-repeat: no-repeat;
  background-position: top center;
  background-size: 100% auto;
  color: var(--text-main);
  min-height: 100vh;
  width: 100%;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

/* Page Frame Container */
.page-container {
  width: 100%;
  max-width: 1280px;
  min-height: 100vh;
  margin: 0 auto;
  position: relative;
  background: transparent;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 95px 20px 0 20px;
  box-sizing: border-box;
}

/* Header & Logo Placement */
.header-section {
  position: fixed;
  top: 20px;
  left: 60px;
  z-index: 1000;
  display: flex;
  align-items: center;
}

@media (max-width: 1024px) {
  .header-section {
    left: 20px;
  }
}

.logo-wrapper {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transform: none !important;
}

.logo-wrapper:hover {
  transform: none !important;
}

.site-logo-img {
  width: 85px;
  height: 44px;
  display: block;
}

/* Black Navbar Component */
.navbar {
  position: fixed;
  top: 20px;
  left: 50%;
  transform: translateX(-50%);
  width: 340px;
  height: 44px;
  background-color: #222222;
  color: #ffffff;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0 12px;
  z-index: 1000;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
  transition: all 0.45s cubic-bezier(0.34, 1.25, 0.64, 1);
  overflow: hidden;
}

.navbar.scrolled {
  left: calc(100% - 100px);
  transform: none;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  padding: 0;
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.3);
  background-color: #222222;
  cursor: pointer;
}

.nav-list {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 16px;
  width: 100%;
  list-style: none;
  margin: 0;
  padding: 0;
  transition: opacity 0.25s ease, transform 0.25s ease;
}

.nav-link {
  font-family: 'Raleway', sans-serif;
  font-size: 12px;
  color: #ffffff;
  text-decoration: none;
  font-weight: 700;
  opacity: 0.8;
  white-space: nowrap;
  letter-spacing: 0.5px;
  transition: opacity 0.2s ease, color 0.2s ease;
  position: relative;
  padding-bottom: 2px;
  background: transparent;
  border: none;
  cursor: pointer;
}

.nav-link.active {
  opacity: 1;
  color: #FFFFFF;
}

.nav-link:hover {
  opacity: 1;
  color: #36AFFF;
}

.navbar-scrolled-icon {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transform: scale(0.5);
  transition: opacity 0.3s ease, transform 0.3s ease;
  pointer-events: none;
}

.mini-logo-img {
  width: 24px;
  height: 24px;
  object-fit: contain;
  filter: brightness(0) invert(1);
}

.navbar.scrolled .nav-list {
  opacity: 0;
  transform: scale(0.6);
  pointer-events: none;
}

.navbar.scrolled .navbar-scrolled-icon {
  opacity: 1;
  transform: scale(1);
  pointer-events: auto;
}

/* Moon SVG Theme Toggle Component */
.moon-wrapper {
  position: fixed;
  top: 20px;
  right: 40px;
  width: 38px;
  height: 38px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  z-index: 1000;
  background: rgba(255, 255, 255, 0.8);
  border-radius: 50%;
  backdrop-filter: blur(8px);
  border: 1px solid rgba(0, 0, 0, 0.08);
  box-shadow: 0 2px 8px rgba(0,0,0,0.06);
  transition: transform 0.2s ease, opacity 0.2s ease;
}

.moon-wrapper:hover {
  transform: scale(1.08);
}

.moon-img {
  width: 22px;
  height: 22px;
  display: block;
  pointer-events: none;
}

/* Badge Subtitle Component */
.badge-subtitle {
  position: relative;
  top: auto;
  left: auto;
  transform: none;
  font-family: 'Inter', sans-serif;
  font-weight: 600;
  font-size: 11px;
  line-height: 12px;
  text-align: center;
  color: #002F4D;
  white-space: nowrap;
  letter-spacing: 0.8px;
  margin-top: 10px;
  margin-bottom: 14px;
}

/* Main Hero Title Component */
.hero-title {
  position: relative;
  top: auto;
  left: auto;
  width: 100%;
  max-width: 640px;
  font-family: 'Raleway', sans-serif;
  font-weight: 700;
  font-size: 34px;
  line-height: 1.2;
  text-align: center;
  color: var(--text-main);
  margin-bottom: 14px;
}

/* Hero Description Component */
.hero-description {
  position: relative;
  top: auto;
  left: auto;
  width: 100%;
  max-width: 520px;
  font-family: 'Inter', sans-serif;
  font-weight: 400;
  font-size: 13px;
  line-height: 1.5;
  text-align: center;
  color: #002F4D;
  opacity: 0.7;
  margin-bottom: 28px;
}

/* Search Bar Component & Overlay */
.search-bar-wrapper {
  position: relative;
  top: auto;
  left: auto;
  width: 100%;
  max-width: 580px;
  height: 48px;
  background-color: #FFFFFF;
  border-radius: 24px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 0 18px;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.06);
  border: 1px solid rgba(0, 0, 0, 0.08);
  z-index: 10;
  box-sizing: border-box;
  margin-bottom: 32px;
  transition: all 0.25s ease;
}

.search-bar-wrapper.active {
  z-index: 1300;
  height: auto;
  border-radius: 20px;
  padding: 0 16px 14px 16px;
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.3);
}

.search-input-row {
  position: relative;
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  height: 44px;
}

.search-icon,
.search-input-row .search-icon,
.search-bar-wrapper .search-icon {
  position: static !important;
  top: auto !important;
  left: auto !important;
  transform: none !important;
  width: 14px !important;
  height: 14px !important;
  min-width: 14px;
  min-height: 14px;
  display: block;
  flex-shrink: 0;
  margin: 0 !important;
  pointer-events: none;
}

.search-input {
  flex: 1;
  border: none;
  outline: none;
  background: transparent;
  font-family: 'Inter', sans-serif;
  font-size: 14px;
  color: var(--text-main);
  padding: 0;
  margin: 0;
  line-height: 44px;
  height: 44px;
}

.search-input::placeholder {
  color: #8899A6;
  font-size: 12px;
  line-height: 44px;
}

.search-ctrl-badge,
.search-esc-badge {
  font-family: 'Inter', sans-serif;
  font-size: 9px;
  font-weight: 600;
  color: #8899A6;
  background: #F2F4F7;
  padding: 3px 6px;
  border-radius: 4px;
  border: 1px solid #E4E7EC;
  line-height: 1;
  white-space: nowrap;
  flex-shrink: 0;
}

.search-ctrl-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.search-esc-badge {
  display: none;
}

.search-bar-wrapper.active .search-ctrl-badge {
  display: none;
}

.search-bar-wrapper.active .search-esc-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.search-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background-color: rgba(0, 0, 0, 0.5);
  z-index: 1200;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.25s ease;
}

.search-overlay.active {
  opacity: 1;
  pointer-events: auto;
}

.search-dropdown-content {
  display: none;
  opacity: 0;
  width: 100%;
  transition: opacity 0.2s ease;
}

.search-bar-wrapper.active .search-dropdown-content {
  display: block;
  opacity: 1;
}

.search-divider {
  width: 100%;
  height: 1px;
  background-color: #EFEFEF;
  margin: 10px 0 6px 0;
}

.search-results-list {
  display: flex;
  flex-direction: column;
  gap: 3px;
  max-height: 240px;
  overflow-y: auto;
}

.search-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 8px 10px;
  border-radius: 10px;
  cursor: pointer;
  transition: background-color 0.15s ease;
}

.search-item:hover {
  background-color: #F7F9FA;
}

.search-item-icon {
  width: 26px;
  height: 26px;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.search-item-title {
  font-family: 'Raleway', sans-serif;
  font-weight: 600;
  font-size: 11px;
  color: #002F4D;
}

/* Category Tabs Bar Component */
.category-tabs-bar {
  position: relative;
  top: auto;
  left: auto;
  width: 100%;
  max-width: 720px;
  display: flex;
  align-items: flex-end;
  z-index: 10;
}

.tab-item {
  flex: 1;
  height: 48px;
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  cursor: pointer;
  border-radius: 16px 16px 0 0;
  transition: background-color 0.2s ease, opacity 0.2s ease;
}

.tab-item.active {
  background-color: #FEFCDA;
}

.tab-item.active::after {
  content: '';
  position: absolute;
  bottom: 0;
  right: -12px;
  width: 12px;
  height: 12px;
  background: radial-gradient(circle at 100% 0%, transparent 12px, #FEFCDA 12.5px);
  pointer-events: none;
  z-index: 12;
}

.tab-item.active::before {
  content: '';
  position: absolute;
  bottom: 0;
  left: -12px;
  width: 12px;
  height: 12px;
  background: radial-gradient(circle at 0% 0%, transparent 12px, #FEFCDA 12.5px);
  pointer-events: none;
  z-index: 12;
}

.tab-item:first-child.active::before {
  display: none !important;
}

.tab-item:last-child.active::after {
  display: none !important;
}

.tab-item:not(.active) {
  background: transparent;
  opacity: 0.8;
}

.tab-item:not(.active):hover {
  opacity: 1;
}

.tab-icon {
  width: 16px;
  height: 16px;
}

.tab-item.active .tab-icon {
  display: block;
}

.tab-item:not(.active) .tab-icon {
  display: none;
}

.tab-text {
  font-family: 'Raleway', sans-serif;
  font-size: 12px;
  line-height: 1;
  color: var(--text-main);
  text-transform: uppercase;
  margin: 0;
}

.tab-item.active .tab-text {
  font-weight: 700;
}

.tab-item:not(.active) .tab-text {
  font-weight: 400;
}

/* Tools List Container Component */
.tools-container {
  position: relative;
  top: auto;
  left: auto;
  width: 100%;
  max-width: 720px;
  min-height: 237px;
  height: auto;
  padding: 24px 32px 32px 32px;
  background: linear-gradient(180deg, #FEFCDA 0%, #F2F0B3 100%);
  border-radius: 0 16px 16px 16px;
  z-index: 6;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.04);
  transition: border-radius 0.25s ease;
  margin-bottom: 40px;
  box-sizing: border-box;
}

.tools-container.active-tab-0 {
  border-radius: 0 16px 16px 16px;
}

.tools-container.active-tab-1,
.tools-container.active-tab-2,
.tools-container.active-tab-3 {
  border-radius: 16px 16px 16px 16px;
}

.tools-container.active-tab-4 {
  border-radius: 16px 0 16px 16px;
}

.tools-container-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  margin-bottom: 18px;
}

.tools-container-title {
  position: relative;
  left: auto;
  bottom: auto;
  font-family: 'Inter', sans-serif;
  font-weight: 600;
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: var(--text-main);
  opacity: 0.5;
}

.tools-container-link {
  position: relative;
  right: auto;
  bottom: auto;
  font-family: 'Inter', sans-serif;
  font-weight: 500;
  font-size: 11px;
  color: var(--text-main);
  text-decoration: none;
  opacity: 0.85;
  transition: opacity 0.2s ease;
}

.tools-container-link:hover {
  opacity: 1;
  text-decoration: underline;
}

/* Tools Grid Component */
.tools-grid {
  position: relative;
  top: auto;
  left: auto;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(145px, 1fr));
  gap: 14px;
  z-index: 10;
  width: 100%;
}

.tool-card {
  width: 100%;
  min-height: 68px;
  background-color: #FFFFFF;
  border-radius: 10px;
  border: 1px solid #EFEFEF;
  display: flex;
  align-items: center;
  padding: 10px 12px;
  gap: 10px;
  cursor: pointer;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.03);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
  box-sizing: border-box;
}

.tool-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
}

.tool-icon-box {
  width: 36px;
  height: 36px;
  background-color: #FCFFF5;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  border: 1px solid #EFEFEF;
}

.tool-card-title {
  font-family: 'Inter', sans-serif;
  font-size: 11px;
  font-weight: 500;
  line-height: 1.2;
  color: var(--text-main);
}

/* Features Banner Component */
.features-banner {
  position: relative;
  top: auto;
  left: auto;
  width: 100%;
  max-width: 680px;
  height: auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  z-index: 10;
  margin-bottom: 40px;
  padding: 0 16px;
  box-sizing: border-box;
}

.feature-item {
  flex: 1;
  text-align: center;
}

.feature-text {
  font-family: 'Raleway', sans-serif;
  font-weight: 700;
  font-size: 18px;
  line-height: 1.2;
  color: #94A8B6;
}

/* Info Section */
.info-section {
  position: relative;
  top: auto;
  left: auto;
  width: 100%;
  max-width: 720px;
  text-align: center;
  z-index: 10;
  margin-bottom: 60px;
  padding: 0 16px;
  box-sizing: border-box;
}

.info-title {
  font-family: 'Raleway', sans-serif;
  font-weight: 700;
  font-size: 24px;
  line-height: 1.3;
  color: var(--text-main);
  margin-bottom: 12px;
}

.info-body {
  font-family: 'Inter', sans-serif;
  font-weight: 400;
  font-size: 12px;
  line-height: 1.6;
  color: var(--text-main);
  opacity: 0.85;
}

.main-content {
  width: 100%;
  position: relative;
}

/* Footer Section Component */
.footer-section {
  position: relative;
  top: auto;
  left: auto;
  transform: none;
  width: 100vw;
  min-height: 380px;
  background-color: #1F1F1F;
  color: #FFFFFF;
  box-sizing: border-box;
  margin-top: auto;
}

.footer-container {
  max-width: 1280px;
  width: 100%;
  height: 100%;
  margin: 0 auto;
  padding: 45px 80px 35px 80px;
  box-sizing: border-box;
  position: relative;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.footer-columns {
  display: flex;
  width: 100%;
  justify-content: space-between;
  gap: 20px;
}

.footer-bottom-brand {
  position: absolute;
  bottom: 35px;
  left: 83px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.footer-logo {
  width: 85px;
  height: 44px;
  display: block;
}

.footer-col {
  display: flex;
  flex-direction: column;
}

.footer-col-stacked {
  gap: 14px;
}

.footer-subgroup {
  display: flex;
  flex-direction: column;
}

.footer-col-title {
  font-family: 'Raleway', sans-serif;
  font-size: 11px;
  font-weight: 600;
  color: #FFFFFF;
  opacity: 0.95;
  margin: 0 0 8px 0;
  letter-spacing: 0.2px;
}

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

.footer-links li {
  margin-bottom: 5px;
}

.footer-links a {
  font-family: 'Inter', sans-serif;
  font-size: 10px;
  color: #FFFFFF;
  opacity: 0.65;
  text-decoration: none;
  transition: opacity 0.2s ease;
  line-height: 1.4;
  white-space: nowrap;
}

.footer-links a:hover {
  opacity: 1;
  text-decoration: underline;
}

.footer-copyright {
  font-family: 'Inter', sans-serif;
  font-size: 9.5px;
  color: #FFFFFF;
  opacity: 0.45;
  margin: 0;
  letter-spacing: 0.2px;
  line-height: 1.4;
  white-space: nowrap;
}

/* ==========================================================================
   Floating Help Button & Popover Card Component
   ========================================================================== */
.floating-help-wrapper {
  position: fixed;
  bottom: 24px;
  right: 24px;
  z-index: 99999;
}

.floating-help-btn {
  width: 32px;
  height: 32px;
  background: transparent;
  border: none;
  box-shadow: none;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  outline: none;
  padding: 0;
  color: #1F1F1F;
  transition: transform 0.2s ease, opacity 0.2s ease, color 0.25s ease;
  opacity: 0.85;
}

.floating-help-btn.on-dark-bg {
  color: #FFFFFF;
  opacity: 0.95;
}

.floating-help-btn:hover {
  transform: scale(1.12);
  opacity: 1;
}

.help-popover-card {
  position: absolute;
  bottom: 56px;
  right: 0;
  width: 220px;
  background: #FFFFFF;
  border-radius: 18px;
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.18), 0 2px 10px rgba(0, 0, 0, 0.05);
  border: 1px solid rgba(0, 0, 0, 0.06);
  padding: 10px 8px;
  box-sizing: border-box;
  opacity: 0;
  visibility: hidden;
  transform: translateY(10px) scale(0.95);
  transition: opacity 0.25s ease, transform 0.25s cubic-bezier(0.34, 1.25, 0.64, 1), visibility 0.25s ease;
  transform-origin: bottom right;
}

.help-popover-card.active {
  opacity: 1;
  visibility: visible;
  transform: translateY(0) scale(1);
}

.help-menu-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.help-menu-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 14px;
  border-radius: 12px;
  text-decoration: none;
  color: #334155;
  font-family: 'Inter', sans-serif;
  font-size: 13px;
  font-weight: 500;
  transition: background-color 0.15s ease, color 0.15s ease;
}

.help-menu-item:hover {
  background-color: #F1F5F9;
  color: #0F172A;
}

.help-menu-item svg {
  color: #64748B;
  flex-shrink: 0;
  transition: color 0.15s ease;
}

.help-menu-item:hover svg {
  color: #0262A1;
}

/* ==========================================================================
   Dark Mode Theme System (Toggled by moon-icon)
   ========================================================================== */

body {
  transition: background-color 0.3s ease, color 0.3s ease;
}

body.dark-mode {
  background-color: #0F172A;
  background-image: linear-gradient(180deg, #0B0F19 0%, #0F172A 100%);
  color: #F8FAFC;
}

/* Header & Moon Icon */
body.dark-mode .site-logo-img {
  filter: brightness(0) invert(1);
}

body.dark-mode .moon-wrapper {
  background-color: rgba(255, 255, 255, 0.1);
  border-color: rgba(255, 255, 255, 0.15);
}

body.dark-mode .moon-img {
  filter: brightness(0) invert(1);
}

/* Badge Subtitle & Typography */
body.dark-mode .badge-subtitle {
  color: #94A3B8;
}

body.dark-mode .hero-title {
  color: #FFFFFF;
}

body.dark-mode .hero-description {
  color: #CBD5E1;
  opacity: 0.65;
}

/* Search Bar Component Dark Mode */
body.dark-mode .search-bar-wrapper {
  background-color: #1E293B;
  border-color: rgba(255, 255, 255, 0.1);
  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.4);
}

body.dark-mode .search-input {
  color: #F8FAFC;
}

body.dark-mode .search-input::placeholder {
  color: #64748B;
}

body.dark-mode .search-icon {
  filter: brightness(0) invert(0.8);
}

body.dark-mode .search-ctrl-badge,
body.dark-mode .search-esc-badge {
  background: #334155;
  border-color: #475569;
  color: #94A3B8;
}

body.dark-mode .search-divider {
  background-color: #334155;
}

body.dark-mode .search-item:hover {
  background-color: #334155;
}

body.dark-mode .search-item-title {
  color: #F1F5F9;
}

/* Category Tabs & Active Tab Concave Fillet in Dark Mode */
body.dark-mode .tab-item {
  color: rgba(255, 255, 255, 0.7) !important;
}

body.dark-mode .tab-text {
  color: rgba(255, 255, 255, 0.7) !important;
}

body.dark-mode .tab-item.active {
  background: #FEFCDA !important;
  color: #002F4D !important;
}

body.dark-mode .tab-item.active .tab-text {
  color: #002F4D !important;
}

body.dark-mode .tab-item.active::before {
  background: radial-gradient(circle at 0% 0%, transparent 12px, #FEFCDA 12.5px) !important;
}

body.dark-mode .tab-item.active::after {
  background: radial-gradient(circle at 100% 0%, transparent 12px, #FEFCDA 12.5px) !important;
}

body.dark-mode .tab-icon {
  filter: none !important;
}

/* Tools Container & Cards Dark Mode (Yellow Box preserved in both modes) */
body.dark-mode .tools-container,
body.dark-mode .tools-container.active-tab-0,
body.dark-mode .tools-container.active-tab-1,
body.dark-mode .tools-container.active-tab-2,
body.dark-mode .tools-container.active-tab-3 {
  background: linear-gradient(180deg, #FEFCDA 0%, #F2F0B3 100%) !important;
  border-color: transparent !important;
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.35) !important;
}

body.dark-mode .tools-container-title {
  color: #002F4D !important;
  opacity: 0.5 !important;
}

body.dark-mode .tools-container-link {
  color: #002F4D !important;
  opacity: 0.85 !important;
}

body.dark-mode .tool-card {
  background-color: #FFFFFF !important;
  border: 1px solid rgba(0, 0, 0, 0.05) !important;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.04) !important;
}

body.dark-mode .tool-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.08) !important;
}

body.dark-mode .tool-card-title {
  color: #002F4D !important;
}

body.dark-mode .tool-icon-box {
  background-color: #F7F9FA !important;
  filter: none !important;
}

body.dark-mode .tool-icon-box svg {
  filter: none !important;
}

/* Features Banner & Info Section Dark Mode */
body.dark-mode .features-banner {
  border-color: rgba(255, 255, 255, 0.1);
}

body.dark-mode .feature-text {
  color: #F1F5F9;
}

body.dark-mode .info-title {
  color: #FFFFFF;
}

body.dark-mode .info-body {
  color: #94A3B8;
}

/* Floating Help Popover Card Dark Mode */
body.dark-mode .help-popover-card {
  background-color: #1E293B;
  border-color: #334155;
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.6);
}

body.dark-mode .help-menu-item {
  color: #E2E8F0;
}

body.dark-mode .help-menu-item:hover {
  background-color: #334155;
  color: #FFFFFF;
}

body.dark-mode .help-menu-item svg {
  color: #94A3B8;
}

body.dark-mode .help-menu-item:hover svg {
  color: #38BDF8;
}

body.dark-mode .floating-help-btn {
  color: #FFFFFF;
}

/* ==========================================================================
   Comprehensive Responsive System for Laptops, Tablets, and Mobile Phones
   ========================================================================== */

@media (max-width: 1024px) {
  /* Reset page container height & absolute bounds */
  .page-container {
    min-height: auto;
    height: auto;
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 90px 16px 0 16px;
    box-sizing: border-box;
  }

  /* Fixed Header Elements Responsive Alignment */
  .header-section {
    position: fixed;
    top: 16px;
    left: 16px;
  }

  .site-logo-img {
    width: 75px;
    height: 38px;
  }

  .navbar {
    position: fixed;
    top: 16px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 1000;
  }

  .navbar.scrolled {
    position: fixed;
    top: 16px;
    left: auto;
    right: 64px;
    transform: none;
  }

  .moon-wrapper {
    position: fixed;
    top: 18px;
    left: auto;
    right: 16px;
    z-index: 1000;
  }

  /* Flow Hero Section Elements vertically without overlap */
  .badge-subtitle {
    position: relative;
    top: auto;
    left: auto;
    transform: none;
    width: auto;
    margin: 10px 0 16px 0;
    text-align: center;
  }

  .hero-title {
    position: relative;
    top: auto;
    left: auto;
    width: 100%;
    max-width: 600px;
    margin: 0 0 14px 0;
    font-size: 26px;
    line-height: 1.3;
    white-space: normal;
    text-align: center;
  }

  .hero-description {
    position: relative;
    top: auto;
    left: auto;
    width: 100%;
    max-width: 480px;
    margin: 0 0 28px 0;
    text-align: center;
  }

  .search-bar-wrapper {
    position: relative;
    top: auto;
    left: auto;
    width: 100%;
    max-width: 500px;
    margin: 0 0 36px 0;
  }

  /* Flow Tabs and Tools Container */
  .category-tabs-bar {
    position: relative;
    top: auto;
    left: auto;
    width: 100%;
    max-width: 680px;
    margin: 0 auto;
  }

  .tab-item {
    height: 44px;
  }

  .tools-container {
    position: relative;
    top: auto;
    left: auto;
    width: 100%;
    max-width: 680px;
    height: auto;
    padding: 24px 20px 24px 20px;
    margin: 0 auto 36px auto;
  }

  .tools-container-title {
    position: relative;
    left: auto;
    bottom: auto;
    top: auto;
    margin-bottom: 16px;
  }

  .tools-container-link {
    position: relative;
    right: auto;
    bottom: auto;
    top: auto;
    display: block;
    margin-top: 16px;
    text-align: right;
  }

  .tools-grid {
    position: relative;
    top: auto;
    left: auto;
    width: 100%;
    grid-template-columns: repeat(4, 1fr);
    gap: 12px;
  }

  .tool-card {
    width: 100%;
    height: 64px;
  }

  .features-banner {
    position: relative;
    top: auto;
    left: auto;
    width: 100%;
    max-width: 631px;
    margin: 0 auto 36px auto;
    height: auto;
    gap: 20px;
    padding: 0 16px;
  }

  .info-section {
    position: relative;
    top: auto;
    left: auto;
    width: 100%;
    max-width: 680px;
    margin: 0 auto 50px auto;
    padding: 0 16px;
    box-sizing: border-box;
  }

  .main-content {
    min-height: 0;
    height: 0;
  }

  /* Responsive Footer */
  .footer-section {
    position: relative;
    top: auto;
    left: 0;
    transform: none;
    width: 100%;
    height: auto;
    padding: 40px 24px;
    background-color: #1F1F1F;
    box-sizing: border-box;
    margin-top: 20px;
  }

  .footer-container {
    max-width: 1280px;
    width: 100%;
    height: auto;
    padding: 0;
    gap: 36px;
  }

  .footer-columns {
    flex-wrap: wrap;
    gap: 28px;
  }

  .footer-bottom-brand {
    position: relative;
    bottom: auto;
    left: auto;
    margin-top: 20px;
  }

  .footer-copyright {
    white-space: normal;
  }
}

@media (max-width: 768px) {
  .hero-title {
    font-size: 22px;
  }

  .search-bar-wrapper {
    max-width: 100%;
  }

  .tools-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 10px;
  }

  .tool-card {
    height: 60px;
    padding: 6px 10px;
  }

  .features-banner {
    flex-direction: column;
    gap: 16px;
    text-align: center;
  }

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

/* ── TOOL WORKSPACE & UPLOAD COMPONENTS (iLovePDF / Lovable Aesthetic) ── */
#tool-view {
  width: 100%;
  max-width: 820px;
  margin: 60px auto 30px auto !important;
  padding: 0 16px;
  box-sizing: border-box;
  display: block;
}

.tool-workspace {
  background: #FFFFFF !important;
  border-radius: 20px !important;
  padding: 40px !important;
  box-shadow: 0 10px 40px rgba(0, 47, 77, 0.08) !important;
  border: 1px solid rgba(2, 98, 161, 0.12) !important;
  color: #002F4D !important;
  text-align: center !important;
  margin-bottom: 30px !important;
}

.tw-header h1 {
  font-size: 28px !important;
  font-weight: 800 !important;
  color: #002F4D !important;
  margin-bottom: 8px !important;
}

.tw-header p {
  font-size: 15px !important;
  color: #4A6B82 !important;
  margin-bottom: 24px !important;
}

.tw-icon-wrap {
  width: 64px !important;
  height: 64px !important;
  border-radius: 16px !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  margin: 0 auto 16px !important;
}

/* Upload Zone Component */
.upload-zone {
  background: #F7F8FC !important;
  border: 2px dashed #34B0ED !important;
  border-radius: 16px !important;
  padding: 48px 24px !important;
  text-align: center !important;
  cursor: pointer !important;
  transition: all 0.2s ease !important;
  position: relative !important;
  margin-bottom: 24px !important;
}

.upload-zone:hover,
.upload-zone.drag-over {
  border-color: #0262A1 !important;
  background: #EFF6FC !important;
  transform: translateY(-2px) !important;
}

.upload-zone input[type="file"] {
  position: absolute !important;
  inset: 0 !important;
  opacity: 0 !important;
  cursor: pointer !important;
  width: 100% !important;
  height: 100% !important;
}

.upload-zone h3 {
  font-size: 18px !important;
  font-weight: 700 !important;
  color: #002F4D !important;
  margin: 12px 0 6px !important;
}

.upload-zone p {
  font-size: 14px !important;
  color: #4A6B82 !important;
  margin-bottom: 16px !important;
}

.upload-btn-secondary {
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  background: #0262A1 !important;
  color: #FFFFFF !important;
  font-size: 14px !important;
  font-weight: 600 !important;
  padding: 10px 24px !important;
  border-radius: 30px !important;
  border: none !important;
  cursor: pointer !important;
  transition: background 0.2s ease !important;
}

.upload-btn-secondary:hover {
  background: #004B7D !important;
}

.upload-hint {
  font-size: 12px !important;
  color: #7A95A8 !important;
  margin-top: 14px !important;
}

/* Options & Buttons */
.options-panel {
  background: #F7F8FC !important;
  border-radius: 14px !important;
  padding: 20px !important;
  margin-bottom: 24px !important;
  text-align: left !important;
  border: 1px solid rgba(2, 98, 161, 0.1) !important;
}

.options-panel h4 {
  font-size: 16px !important;
  font-weight: 700 !important;
  color: #002F4D !important;
  margin-bottom: 14px !important;
}

.option-row {
  display: flex !important;
  align-items: center !important;
  justify-content: space-between !important;
  padding: 10px 0 !important;
  border-bottom: 1px solid rgba(0, 47, 77, 0.06) !important;
}

.option-row:last-child {
  border-bottom: none !important;
}

.option-label {
  font-size: 14px !important;
  font-weight: 600 !important;
  color: #002F4D !important;
}

.option-sub {
  font-size: 12px !important;
  color: #4A6B82 !important;
}

.action-btn {
  width: 100% !important;
  padding: 16px 24px !important;
  background: linear-gradient(135deg, #0262A1 0%, #34B0ED 100%) !important;
  color: #FFFFFF !important;
  font-size: 16px !important;
  font-weight: 700 !important;
  border-radius: 14px !important;
  border: none !important;
  cursor: pointer !important;
  transition: all 0.2s ease !important;
  box-shadow: 0 4px 16px rgba(2, 98, 161, 0.25) !important;
  margin-top: 16px !important;
}

.action-btn:hover:not(:disabled) {
  opacity: 0.95 !important;
  transform: translateY(-1px) !important;
}

.action-btn:disabled {
  background: #C4D3E0 !important;
  cursor: not-allowed !important;
  box-shadow: none !important;
}

/* File Selected Card */
.file-selected {
  display: none;
  align-items: center !important;
  gap: 16px !important;
  background: #EFF6FC !important;
  border: 1px solid #34B0ED !important;
  border-radius: 12px !important;
  padding: 16px 20px !important;
  margin-bottom: 24px !important;
  text-align: left !important;
}

.file-meta {
  flex: 1 !important;
  overflow: hidden !important;
}

.file-name {
  font-weight: 700 !important;
  font-size: 15px !important;
  color: #002F4D !important;
  white-space: nowrap !important;
  overflow: hidden !important;
  text-overflow: ellipsis !important;
}

.file-size {
  font-size: 13px !important;
  color: #4A6B82 !important;
}

.file-remove {
  background: transparent !important;
  border: none !important;
  color: #E63946 !important;
  cursor: pointer !important;
  font-size: 18px !important;
}

@media (max-width: 480px) {
  .navbar {
    display: none;
  }

  .navbar.scrolled {
    display: flex;
  }

  .badge-subtitle {
    font-size: 8.5px;
  }

  .hero-title {
    font-size: 19px;
  }

  .tab-text {
    font-size: 10px;
  }

  .tools-grid {
    grid-template-columns: 1fr;
  }

  .footer-columns {
    grid-template-columns: 1fr;
    gap: 20px;
  }
}

/* ==========================================================================
   Tool-Specific SEO Content Section (How-To Steps & FAQ)
   ========================================================================== */
.tool-seo-section {
  width: 100%;
  max-width: 760px;
  margin: 40px auto 20px auto;
  padding: 32px 28px;
  background: #FFFFFF;
  border-radius: 18px;
  border: 1px solid rgba(0, 0, 0, 0.08);
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.04);
  text-align: left;
  color: var(--text-main);
  box-sizing: border-box;
}

body.dark-mode .tool-seo-section {
  background: #1E293B;
  border-color: #334155;
  color: #F8FAFC;
  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.3);
}

.tool-seo-title {
  font-family: 'Raleway', sans-serif;
  font-size: 20px;
  font-weight: 700;
  margin-bottom: 12px;
  color: var(--text-main);
}

body.dark-mode .tool-seo-title {
  color: #FFFFFF;
}

.tool-seo-intro {
  font-family: 'Inter', sans-serif;
  font-size: 13px;
  line-height: 1.6;
  opacity: 0.85;
  margin-bottom: 24px;
}

.tool-seo-steps {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 16px;
  margin-bottom: 28px;
}

.tool-seo-step-card {
  padding: 16px;
  background: #F8FAFC;
  border-radius: 12px;
  border: 1px solid rgba(0, 0, 0, 0.06);
}

body.dark-mode .tool-seo-step-card {
  background: #0F172A;
  border-color: #334155;
}

.tool-seo-step-num {
  font-size: 10px;
  font-weight: 700;
  color: #0262A1;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 6px;
}

.tool-seo-step-title {
  font-size: 13px;
  font-weight: 600;
  margin-bottom: 4px;
}

.tool-seo-step-desc {
  font-size: 11px;
  line-height: 1.45;
  opacity: 0.75;
}

.tool-seo-faq-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-top: 14px;
}

.tool-seo-faq-item {
  padding: 14px 16px;
  background: #F8FAFC;
  border-radius: 12px;
  border: 1px solid rgba(0, 0, 0, 0.06);
}

body.dark-mode .tool-seo-faq-item {
  background: #0F172A;
  border-color: #334155;
}

.tool-seo-faq-q {
  font-size: 13px;
  font-weight: 600;
  margin-bottom: 6px;
  color: var(--text-main);
}

body.dark-mode .tool-seo-faq-q {
  color: #FFFFFF;
}

.tool-seo-faq-a {
  font-size: 12px;
  line-height: 1.5;
  opacity: 0.8;
}