/* --- NAVBAR & DROPDOWN FIXES --- */
.navbar {
  position: sticky;
  top: 0;
  z-index: 1000;
  background: rgba(10, 10, 15, 0.75);
  backdrop-filter: blur(20px) saturate(150%);
  -webkit-backdrop-filter: blur(20px) saturate(150%);
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  box-shadow: 0 4px 30px rgba(0, 0, 0, 0.5);
  height: 70px;
  display: flex;
  align-items: center;
  transition: all 0.3s ease;
}

.nav-container {
  width: 90%;
  max-width: 1400px;
  margin: 0 auto;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.nav-logo {
  font-family: 'Space Grotesk', sans-serif;
  font-weight: 700;
  font-size: 1.5rem;
  color: #fff;
  text-decoration: none;
}

.nav-logo span { color: #2563eb; }

.nav-menu {
  display: flex;
  list-style: none;
  gap: 2rem;
}

.nav-menu li { position: relative; }

.nav-menu a {
  color: rgba(255, 255, 255, 0.7);
  text-decoration: none;
  font-weight: 500;
  font-size: 0.95rem;
  transition: all 0.3s ease;
  padding: 10px 0;
  display: block;
  position: relative;
}

.nav-menu > li > a::after {
  content: '';
  position: absolute;
  bottom: 0px;
  left: 0;
  width: 0%;
  height: 2px;
  background: #3b82f6;
  transition: width 0.3s ease;
  box-shadow: 0 0 8px rgba(59, 130, 246, 0.8);
}

.nav-menu > li > a:hover::after,
.nav-menu > li > a.active::after {
  width: 100%;
}

.nav-menu a:hover,
.nav-menu a.active { 
  color: #fff; 
  text-shadow: 0 0 10px rgba(255,255,255,0.3);
}

.dropdown-header.active {
  color: #60a5fa !important;
  text-shadow: 0 0 12px rgba(96, 165, 250, 0.4);
}

/* The Hover Bridge Fix */
.sub-nav {
  position: absolute;
  top: 100%;
  left: 0;
  background: #111827;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 8px;
  min-width: 220px;
  padding: 10px 0;
  box-shadow: 0 10px 25px rgba(0,0,0,0.5);
  opacity: 0;
  visibility: hidden;
  transform: translateY(10px);
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  list-style: none;
  z-index: 1001;
}

/* Mega Dropdown Styling */
.mega-dropdown {
  position: static !important;
}

.mega-content {
  width: 90%;
  max-width: 1200px;
  left: 50% !important;
  transform: translateX(-50%) translateY(10px) !important;
  display: grid !important;
  grid-template-columns: repeat(3, 1fr);
  padding: 30px !important;
  gap: 40px;
}

.has-dropdown:hover .mega-content {
  transform: translateX(-50%) translateY(0) !important;
}

/* --- Mobile Hamburger --- */
.nav-hamburger {
  display: none;
  flex-direction: column;
  justify-content: space-between;
  width: 26px;
  height: 18px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 0;
  z-index: 1100;
  margin-left: 15px;
}

.nav-hamburger span {
  width: 100%;
  height: 2px;
  background-color: #fff;
  border-radius: 10px;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

body.light-mode .nav-hamburger span {
  background-color: #0f172a;
}

.nav-hamburger.active span:nth-child(1) { transform: translateY(8px) rotate(45deg); }
.nav-hamburger.active span:nth-child(2) { opacity: 0; }
.nav-hamburger.active span:nth-child(3) { transform: translateY(-8px) rotate(-45deg); }

/* --- Mobile Nav Responsive --- */
@media (max-width: 992px) {
  .nav-hamburger { display: flex; }

  .nav-menu {
    position: fixed;
    top: 0;
    right: -100%;
    width: 85%;
    max-width: 350px;
    height: 100vh;
    background: #0f172a;
    flex-direction: column;
    padding: 100px 30px 40px;
    transition: right 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: -10px 0 30px rgba(0,0,0,0.5);
    overflow-y: auto;
    z-index: 1050;
    gap: 0;
  }

  body.light-mode .nav-menu { background: #fff; }

  .nav-menu.active { right: 0; }

  .nav-menu li { width: 100%; }

  .nav-menu a {
    font-size: 1.1rem;
    padding: 15px 0;
    border-bottom: 1px solid rgba(255,255,255,0.05);
  }

  body.light-mode .nav-menu a { border-bottom-color: rgba(0,0,0,0.05); }

  .has-dropdown .sub-nav {
    position: static;
    opacity: 1;
    visibility: visible;
    transform: none;
    display: none;
    box-shadow: none;
    padding: 0 0 10px 20px;
    background: transparent;
    border: none;
  }

  .has-dropdown.open > .sub-nav { display: block; }

  .mega-content {
    grid-template-columns: 1fr;
    padding: 10px 0 10px 20px !important;
    gap: 20px;
  }

  .dropdown-column { gap: 10px; }
  
  .nav-container { width: 95%; }
  .nav-actions { gap: 10px; }
  .search-box { width: 140px; }
  .search-box input:focus { width: 160px; }
}

body.nav-open { overflow: hidden; }


.dropdown-column {
  flex: 1;
  display: flex;
  flex-direction: column;
}

.dropdown-header {
  color: #2563eb;
  font-size: 0.85rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1px;
  margin-bottom: 12px;
  padding: 0 15px;
}

.sub-nav a {
  padding: 8px 15px;
  font-size: 0.9rem;
  color: rgba(255, 255, 255, 0.6);
  display: block;
  text-decoration: none;
  transition: all 0.2s;
  border-radius: 4px;
}

.sub-nav a:hover {
  background: rgba(37, 99, 235, 0.1);
  color: #fff;
  padding-left: 20px;
}

.dropdown-divider {
  height: 1px;
  background: rgba(255, 255, 255, 0.05);
  margin: 10px 0;
}

/* Invisible bridge to prevent mouse-out gap */
.sub-nav::before {
  content: '';
  position: absolute;
  top: -20px;
  left: 0;
  width: 100%;
  height: 20px;
}

.has-dropdown:hover .sub-nav {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

/* --- PREMIUM HERO SECTION --- */
.premium-hero {
  position: relative;
  min-height: 85vh;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  background: #020617;
  padding: 80px 5%;
  text-align: center;
}

.hero-glow {
  position: absolute;
  width: 100%;
  height: 100%;
  background: radial-gradient(circle at 50% 50%, rgba(37, 99, 235, 0.1) 0%, transparent 70%);
}

.hero-orb {
  position: absolute;
  border-radius: 50%;
  filter: blur(80px);
  z-index: 1;
  opacity: 0.4;
  animation: float 20s infinite alternate;
}

.orb-1 { width: 400px; height: 400px; background: #1e3a8a; top: -100px; right: -100px; }
.orb-2 { width: 300px; height: 300px; background: #581c87; bottom: -50px; left: -50px; animation-delay: -5s; }

@keyframes float {
  0% { transform: translate(0, 0); }
  100% { transform: translate(50px, 100px); }
}

.hero-container { position: relative; z-index: 10; max-width: 900px; }

.badge-new {
  display: inline-block;
  padding: 6px 16px;
  background: rgba(37, 99, 235, 0.1);
  border: 1px solid rgba(37, 99, 235, 0.3);
  color: #60a5fa;
  border-radius: 30px;
  font-size: 0.85rem;
  font-weight: 600;
  margin-bottom: 2rem;
}

.premium-hero h1 {
  font-family: 'Space Grotesk', sans-serif;
  font-size: 4.5rem;
  line-height: 1;
  font-weight: 700;
  margin-bottom: 1.5rem;
  background: linear-gradient(to bottom, #fff 40%, rgba(255,255,255,0.7));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.premium-hero h1 span {
  background: linear-gradient(to right, #2563eb, #7c3aed);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.hero-description {
  font-size: 1.25rem;
  color: rgba(255, 255, 255, 0.6);
  margin-bottom: 3rem;
  line-height: 1.6;
}

/* --- HERO SEARCH --- */
.hero-search {
  max-width: 600px;
  margin: 0 auto 4rem auto;
  position: relative;
}

.search-input-wrapper {
  display: flex;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.1);
  padding: 8px;
  border-radius: 50px;
  backdrop-filter: blur(10px);
  transition: border 0.3s;
}

.search-input-wrapper:focus-within { border-color: #2563eb; }

.hero-search input {
  flex: 1;
  background: transparent;
  border: none;
  padding: 0 25px;
  color: #fff;
  font-size: 1.1rem;
  outline: none;
}

.search-main-btn {
  background: #2563eb;
  color: #fff;
  border: none;
  padding: 12px 30px;
  border-radius: 30px;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.3s;
}

.search-main-btn:hover { background: #1d4ed8; }

/* --- HERO STATS --- */
.hero-stats {
  display: flex;
  justify-content: center;
  gap: 3rem;
  margin-top: 2rem;
}

.stat-item { display: flex; flex-direction: column; }
.stat-num { font-size: 2.5rem; font-weight: 700; font-family: 'Space Grotesk'; color: #fff; }
.stat-label { color: rgba(255,255,255,0.4); font-size: 0.9rem; font-weight: 500; text-transform: uppercase; letter-spacing: 1px; }
.stat-divider { width: 1px; height: 50px; background: rgba(255,255,255,0.1); align-self: center; }

/* --- LOADER --- */
#loader {
  position: fixed;
  inset: 0;
  background: #020617;
  z-index: 9999;
  display: flex;
  align-items: center;
  justify-content: center;
}

.loader-circle {
  width: 50px;
  height: 50px;
  border: 3px solid rgba(37, 99, 235, 0.1);
  border-top-color: #2563eb;
  border-radius: 50%;
  animation: spin 1s linear infinite;
  margin: 0 auto 1rem;
}

@keyframes spin { to { transform: rotate(360deg); } }

/* --- SEARCH DROPDOWN --- */
.search-dropdown {
  position: absolute;
  top: 110%;
  left: 0;
  width: 100%;
  background: #111827;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 12px;
  padding: 10px;
  box-shadow: 0 10px 40px rgba(0,0,0,0.6);
  z-index: 1000;
  display: none;
  text-align: left;
}

.search-dropdown.active { display: block; }

.search-item {
  padding: 12px 18px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  cursor: pointer;
  border-radius: 8px;
  transition: background 0.2s;
}

.search-item:hover { background: rgba(255,255,255,0.05); }
.cat-tag { font-size: 0.7rem; color: #60a5fa; background: rgba(37, 99, 235, 0.1); padding: 2px 8px; border-radius: 4px; }

/* ===================================================================
   COMPUTER PARTS MAP — Global Design System (Legacy Recovery)
   =================================================================== */

:root {
  --primary:       #2563eb;
  --primary-dark:  #1d4ed8;
  --primary-glow:  rgba(37, 99, 235, 0.25);
  --accent:        #f59e0b;
  --accent-dark:   #d97706;
  --success:       #10b981;
  --danger:        #ef4444;

  --bg:            #f0f4ff;
  --bg-secondary:  #e8edf8;
  --card-bg:       #ffffff;
  --navbar-bg:     rgba(15, 23, 42, 0.97);
  --footer-bg:     #0f172a;
  --text:          #1e293b;
  --text-muted:    #64748b;
  --text-light:    #94a3b8;
  --border:        rgba(30, 41, 59, 0.12);

  --radius-sm:     6px;
  --radius-md:     12px;
  --radius-lg:     20px;
  --radius-xl:     28px;

  --shadow-sm:     0 1px 3px rgba(0,0,0,0.08), 0 1px 2px rgba(0,0,0,0.06);
  --shadow-md:     0 4px 16px rgba(0,0,0,0.10);
  --shadow-lg:     0 8px 32px rgba(0,0,0,0.14);
  --shadow-glow:   0 0 24px var(--primary-glow);

  --font-ui:      'Inter', system-ui, sans-serif;
  --font-heading: 'Space Grotesk', system-ui, sans-serif;

  --transition:   0.28s cubic-bezier(0.4, 0, 0.2, 1);
}

body.dark-mode {
  --bg:           #0f172a;
  --bg-secondary: #1e293b;
  --card-bg:      #1e293b;
  --text:         #e2e8f0;
  --text-muted:   #94a3b8;
  --text-light:   #64748b;
  --border:       rgba(255,255,255,0.08);
}

body.light-mode {
  --bg:           #f8fafc;
  --bg-secondary: #f1f5f9;
  --card-bg:      #ffffff;
  --text:         #0f172a;
  --text-muted:   #475569;
  --text-light:   #94a3b8;
  --border:       rgba(0,0,0,0.08);
}

/* --- Base & Scroll --- */
html { scroll-behavior: smooth; }
body { background: var(--bg); color: var(--text); font-family: var(--font-ui); transition: background 0.3s, color 0.3s; }

/* --- Theme Toggle & Nav Actions --- */
.nav-actions {
  display: flex;
  align-items: center;
  gap: 15px;
}

#theme-toggle {
  background: rgba(255, 255, 255, 0.03);
  backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 255, 255, 0.1);
  color: #fff;
  width: 42px;
  height: 42px;
  border-radius: 12px; /* Sleeker squircle shape */
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.2rem;
  transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
  box-shadow: 0 4px 15px rgba(0,0,0,0.2);
}

#theme-toggle:hover {
  background: rgba(37, 99, 235, 0.15);
  border-color: var(--primary);
  transform: translateY(-2px) rotate(15deg);
  box-shadow: 0 0 20px var(--primary-glow);
}

body.light-mode .navbar {
  background: rgba(255, 255, 255, 0.9);
  border-bottom: 1px solid rgba(0,0,0,0.05);
}

body.light-mode .nav-logo,
body.light-mode .nav-menu a {
  color: #0f172a;
}

body.light-mode #theme-toggle {
  background: rgba(0, 0, 0, 0.03);
  border-color: rgba(0, 0, 0, 0.1);
  color: #0f172a;
  box-shadow: 0 4px 10px rgba(0,0,0,0.05);
}

body.light-mode #theme-toggle:hover {
  background: rgba(0, 0, 0, 0.08);
  box-shadow: 0 5px 15px rgba(0,0,0,0.1);
}

/* --- Navbar Search Box --- */
.search-box {
  position: relative;
  width: 220px;
}

.search-box input {
  width: 100%;
  background: rgba(255, 255, 255, 0.03);
  backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 255, 255, 0.1);
  padding: 10px 18px;
  border-radius: 12px;
  color: #fff;
  font-size: 0.9rem;
  outline: none;
  transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  box-shadow: inset 0 2px 4px rgba(0,0,0,0.1);
}

.search-box input:focus {
  width: 280px;
  border-color: var(--primary);
  background: rgba(37, 99, 235, 0.05);
  box-shadow: 0 0 25px var(--primary-glow), inset 0 2px 4px rgba(0,0,0,0.05);
}

.search-box input::placeholder {
  color: rgba(255, 255, 255, 0.3);
}

body.light-mode .search-box input {
  background: rgba(0, 0, 0, 0.03);
  border-color: rgba(0, 0, 0, 0.1);
  color: #0f172a;
}

body.light-mode .search-box input::placeholder {
  color: rgba(0, 0, 0, 0.4);
}

body.light-mode .search-box input:focus {
  border-color: var(--primary);
  background: #fff;
  box-shadow: 0 10px 25px rgba(37, 99, 235, 0.1);
}

/* --- LIGHT MODE OVERRIDES --- */
body.light-mode .premium-hero,
body.light-mode .about-hero,
body.light-mode .component-hero {
  background: linear-gradient(135deg, #f8fafc 0%, #e2e8f0 100%);
  color: #0f172a;
}

body.light-mode .premium-hero h1 {
  background: linear-gradient(to bottom, #0f172a 40%, rgba(15,23,42,0.7));
  -webkit-background-clip: text;
}

body.light-mode .hero-description,
body.light-mode .section-header p {
  color: #475569;
}

body.light-mode .section-header h2,
body.light-mode .section-title,
body.light-mode .cat-card h3,
body.light-mode .page-card-info h4 {
  color: #0f172a;
}

body.light-mode .cat-card,
body.light-mode .page-mini-card {
  background: #fff;
  border-color: rgba(0, 0, 0, 0.05);
  box-shadow: 0 4px 6px rgba(0,0,0,0.02);
}

body.light-mode .cat-card p {
  color: #64748b;
}

body.light-mode .main-footer {
  background: #f8fafc;
  border-top: 1px solid rgba(0,0,0,0.05);
  color: #0f172a;
}

body.light-mode .footer-logo,
body.light-mode .footer-links h4 {
  color: #0f172a;
}

body.light-mode .footer-brand p,
body.light-mode .footer-links a,
body.light-mode .footer-bottom p {
  color: #475569;
}

body.light-mode .footer-social a {
  background: rgba(0,0,0,0.03);
  border-color: rgba(0,0,0,0.05);
  color: #475569;
}

body.light-mode .footer-social a:hover {
  background: rgba(37, 99, 235, 0.1);
  color: #2563eb;
}

body.light-mode .stat-num { color: #0f172a; }
body.light-mode .stat-label { color: #64748b; }
body.light-mode .stat-divider { background: rgba(0,0,0,0.1); }
body.light-mode .search-input-wrapper { background: #fff; border-color: rgba(0,0,0,0.1); }
body.light-mode .hero-search input { color: #0f172a; }
body.light-mode .sub-nav { background: #fff; border-color: rgba(0,0,0,0.1); box-shadow: 0 10px 25px rgba(0,0,0,0.05); }
body.light-mode .sub-nav a { color: #475569; }
body.light-mode .sub-nav a:hover { background: rgba(37, 99, 235, 0.05); color: #2563eb; }


/* --- Component Hero --- */
.component-hero {
  background: linear-gradient(135deg, #0f172a 0%, #1e3a5f 50%, #0f172a 100%);
  padding: 8rem 2rem 5rem;
  position: relative;
  overflow: hidden;
  color: #fff;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
}

.component-hero .badge {
  display: inline-block;
  background: rgba(37,99,235,0.2);
  border: 1px solid rgba(37,99,235,0.3);
  padding: 6px 16px;
  border-radius: 20px;
  font-size: 0.85rem;
  font-weight: 600;
  margin-bottom: 1.5rem;
  color: #60a5fa;
}

.component-hero h1 { 
  font-family: var(--font-heading); 
  font-size: 3.5rem; 
  margin-bottom: 1.5rem; 
  line-height: 1.1;
  max-width: 900px;
}

.component-hero .hero-subtitle { 
  font-size: 1.2rem; 
  opacity: 0.8; 
  max-width: 700px; 
  margin: 0 auto 2.5rem;
  line-height: 1.6;
}

.hero-img { 
  width: 100%;
  max-width: 500px; 
  height: auto; 
  border-radius: 24px; 
  box-shadow: 0 20px 50px rgba(0,0,0,0.5);
  transition: transform 0.5s cubic-bezier(0.4, 0, 0.2, 1);
  margin: 0 auto;
}

.hero-img:hover {
  transform: scale(1.03) translateY(-5px);
}

@media (max-width: 768px) {
  .component-hero { padding-top: 6rem; }
  .component-hero h1 { font-size: 2.5rem; }
  .hero-img { max-width: 100%; }
}

body.light-mode .component-hero {
  background: linear-gradient(135deg, #f8fafc 0%, #e2e8f0 100%);
}



.component-hero h1 { font-family: var(--font-heading); font-size: 3rem; margin-bottom: 1rem; }
.component-hero .hero-subtitle { font-size: 1.1rem; opacity: 0.7; max-width: 700px; margin: 0 auto 2rem; }
.hero-img { width: 300px; height: auto; border-radius: 12px; filter: drop-shadow(0 10px 30px rgba(0,0,0,0.5)); }

/* --- Page Layout --- */
.page-content { max-width: 1000px; margin: 0 auto; padding: 3rem 1.5rem; }

.content-section {
  background: var(--card-bg);
  border-radius: var(--radius-lg);
  padding: 2.5rem;
  margin-bottom: 2rem;
  box-shadow: var(--shadow-sm);
  border: 1px solid var(--border);
}

.content-section h2 { font-family: var(--font-heading); font-size: 1.6rem; margin-bottom: 1.5rem; border-bottom: 2px solid var(--primary); display: inline-block; padding-bottom: 5px; }
.content-section p { line-height: 1.8; color: var(--text-muted); margin-bottom: 1.2rem; }

/* --- Tables --- */
.spec-table { width: 100%; border-collapse: collapse; margin: 1.5rem 0; border-radius: 8px; overflow: hidden; }
.spec-table th { background: var(--primary); color: #fff; text-align: left; padding: 12px; }
.spec-table td { padding: 12px; border-bottom: 1px solid var(--border); color: var(--text-muted); }
.spec-table tr:hover { background: rgba(37,99,235,0.05); }

/* --- Products --- */
.products-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 1.5rem; margin-top: 1.5rem; }
.product-card { background: var(--bg-secondary); border-radius: 12px; padding: 1.5rem; text-align: center; transition: transform 0.3s; }
.product-card:hover { transform: translateY(-5px); }
.product-card img { width: 150px; height: 150px; object-fit: contain; margin-bottom: 1rem; }
.product-price { font-size: 1.2rem; font-weight: 700; color: var(--accent); margin: 0.5rem 0; }
.buy-btn { display: inline-block; background: var(--primary); color: #fff; padding: 8px 20px; border-radius: 6px; text-decoration: none; font-weight: 600; }
.buy-btn.flipkart { background: #2874f0; }

/* --- Callouts --- */
.did-you-know { background: rgba(245,158,11,0.1); border-left: 4px solid var(--accent); padding: 1.25rem; border-radius: 0 8px 8px 0; margin: 1.5rem 0; }
.dyk-label { font-weight: 700; color: var(--accent); margin-bottom: 0.5rem; }

/* --- Related --- */
.related-grid { display: flex; flex-wrap: wrap; gap: 0.75rem; }
.related-link { background: var(--bg-secondary); padding: 8px 16px; border-radius: 30px; font-size: 0.9rem; color: var(--text); text-decoration: none; transition: background 0.3s; }
.related-link:hover { background: var(--primary); color: #fff; }

/* --- Stat Bars --- */
.stat-bar-wrap { margin-bottom: 1rem; }
.stat-bar-label { display: flex; justify-content: space-between; font-size: 0.9rem; margin-bottom: 5px; }
.stat-bar { height: 8px; background: rgba(255,255,255,0.1); border-radius: 4px; overflow: hidden; }
.stat-bar-fill { height: 100%; background: linear-gradient(90deg, var(--primary), var(--accent)); transition: width 1.5s ease-in-out; }

/* --- About Page Specific --- */
.about-hero { padding: 6rem 2rem 4rem; background: #020617; text-align: center; color: #fff; }
.about-avatar-placeholder { font-size: 4rem; margin-bottom: 1rem; }
.role-tag { background: rgba(37,99,235,0.1); padding: 4px 16px; border-radius: 20px; color: #60a5fa; display: inline-block; margin-bottom: 1rem; }
.social-links { display: flex; justify-content: center; gap: 1rem; margin-top: 2rem; }
.social-link { padding: 10px 20px; border-radius: 8px; text-decoration: none; color: #fff; font-weight: 600; }
.social-link.github { background: #333; }
.social-link.youtube { background: #ff0000; }

/* --- Category Details Section --- */
.category-detail-section {
  padding: 60px 5%;
  max-width: 1400px;
  margin: 0 auto;
}

.section-title {
  font-family: \"Space Grotesk\", sans-serif;
  font-size: 2rem;
  margin-bottom: 30px;
  color: #fff;
  border-left: 4px solid #2563eb;
  padding-left: 20px;
}

.pages-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 20px;
}

.page-mini-card {
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.05);
  border-radius: 12px;
  padding: 20px;
  display: flex;
  align-items: center;
  gap: 15px;
  text-decoration: none;
  transition: all 0.3s;
}

.page-mini-card:hover {
  background: rgba(37, 99, 235, 0.1);
  border-color: #2563eb;
  transform: translateY(-5px);
}

.page-card-icon {
  font-size: 1.5rem;
  width: 50px;
  height: 50px;
  background: rgba(255, 255, 255, 0.05);
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.page-card-info h4 {
  color: #fff;
  margin-bottom: 5px;
  font-size: 1.1rem;
}

.page-card-info p {
  color: rgba(255, 255, 255, 0.4);
  font-size: 0.85rem;
  margin: 0;
}



/* --- MAIN CONTAINER --- */
.main-container {
  max-width: 1400px;
  margin: 0 auto;
  padding: 80px 5%;
}

.section-header {
  margin-bottom: 50px;
  text-align: center;
}

.section-header h2 {
  font-family: \"Space Grotesk\", sans-serif;
  font-size: 2.5rem;
  color: #fff;
  margin-bottom: 15px;
}

.section-header p {
  color: rgba(255, 255, 255, 0.5);
  font-size: 1.1rem;
}

/* --- CATEGORY GRID --- */
.category-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 30px;
  margin-bottom: 80px;
}

.cat-card {
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 20px;
  padding: 40px 30px;
  text-decoration: none;
  transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  text-align: center;
  position: relative;
  overflow: hidden;
}

.cat-card::before {
  content: \"\";
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, rgba(37, 99, 235, 0.1), transparent);
  opacity: 0;
  transition: opacity 0.4s;
}

.cat-card:hover {
  transform: translateY(-10px);
  border-color: rgba(37, 99, 235, 0.5);
  background: rgba(37, 99, 235, 0.05);
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.3);
}

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

.cat-icon {
  font-size: 3rem;
  margin-bottom: 20px;
  display: block;
}

.cat-card h3 {
  font-family: \"Space Grotesk\", sans-serif;
  font-size: 1.5rem;
  color: #fff;
  margin-bottom: 12px;
}

.cat-card p {
  color: rgba(255, 255, 255, 0.4);
  font-size: 0.95rem;
  line-height: 1.5;
}

/* --- FOOTER STYLING --- */
.main-footer {
  background: #020617;
  border-top: 1px solid rgba(255, 255, 255, 0.05);
  padding: 100px 5% 40px;
  margin-top: 120px;
  color: #fff;
}

.footer-container {
  max-width: 1400px;
  margin: 0 auto;
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 60px;
  margin-bottom: 80px;
}

.footer-brand {
  flex: 1;
  min-width: 300px;
}

.footer-logo {
  font-family: 'Space Grotesk', sans-serif;
  font-weight: 700;
  font-size: 2rem;
  color: #fff;
  text-decoration: none;
  display: block;
  margin-bottom: 25px;
}

.footer-logo span { color: #2563eb; }

.footer-brand p {
  color: rgba(255, 255, 255, 0.5);
  line-height: 1.8;
  font-size: 1rem;
  margin-bottom: 35px;
  max-width: 450px;
}

.footer-social {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.footer-social a {
  display: flex;
  align-items: center;
  gap: 10px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.05);
  padding: 10px 20px;
  border-radius: 50px;
  color: rgba(255, 255, 255, 0.7);
  text-decoration: none;
  font-size: 0.9rem;
  font-weight: 500;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.footer-social a span {
  font-size: 1.2rem;
}

.footer-social a:hover {
  background: rgba(37, 99, 235, 0.1);
  border-color: #2563eb;
  color: #fff;
  transform: translateY(-3px);
  box-shadow: 0 10px 20px rgba(0, 0, 0, 0.2);
}

.footer-links-group {
  flex: 2;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 40px;
  min-width: 500px;
}

.footer-links h4 {
  font-family: 'Space Grotesk', sans-serif;
  font-size: 1.1rem;
  font-weight: 600;
  color: #fff;
  margin-bottom: 30px;
  text-transform: uppercase;
  letter-spacing: 1px;
}

.footer-links a {
  display: block;
  color: rgba(255, 255, 255, 0.4);
  text-decoration: none;
  margin-bottom: 15px;
  font-size: 0.95rem;
  transition: all 0.2s;
}

.footer-links a:hover {
  color: #2563eb;
  padding-left: 5px;
}

.footer-bottom {
  max-width: 1400px;
  margin: 0 auto;
  padding-top: 40px;
  border-top: 1px solid rgba(255, 255, 255, 0.05);
}

.footer-bottom-content {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 20px;
}

.footer-bottom p {
  color: rgba(255, 255, 255, 0.3);
  font-size: 0.9rem;
}

.footer-bottom strong {
  color: rgba(255, 255, 255, 0.6);
  font-weight: 600;
}

@media (max-width: 992px) {
  .footer-container {
    flex-direction: column;
    gap: 60px;
  }
  
  .footer-links-group {
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    min-width: 100%;
  }

  .footer-bottom-content {
    flex-direction: column;
    text-align: center;
  }
}

@media (max-width: 480px) {
  .footer-links-group {
    grid-template-columns: 1fr;
    text-align: center;
  }
  
  .footer-social {
    justify-content: center;
  }
  
  .footer-brand {
    text-align: center;
  }
  
  .footer-brand p {
    margin: 0 auto 30px;
  }
}

/* ==============================================
   HAMBURGER BUTTON
   ============================================== */
.nav-hamburger {
  display: none;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  width: 42px;
  height: 42px;
  background: rgba(255, 255, 255, 0.03);
  backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 12px;
  cursor: pointer;
  gap: 5px;
  padding: 0;
  transition: all 0.3s ease;
}

.nav-hamburger span {
  display: block;
  width: 20px;
  height: 2px;
  background: #fff;
  border-radius: 2px;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.nav-hamburger.active span:nth-child(1) {
  transform: translateY(7px) rotate(45deg);
}

.nav-hamburger.active span:nth-child(2) {
  opacity: 0;
  transform: scaleX(0);
}

.nav-hamburger.active span:nth-child(3) {
  transform: translateY(-7px) rotate(-45deg);
}

body.light-mode .nav-hamburger {
  background: rgba(0, 0, 0, 0.03);
  border-color: rgba(0, 0, 0, 0.1);
}

body.light-mode .nav-hamburger span {
  background: #0f172a;
}

body.nav-open {
  overflow: hidden;
}

/* ==============================================
   MOBILE RESPONSIVE — NAVBAR (max 992px)
   ============================================== */
@media (max-width: 992px) {
  .nav-hamburger {
    display: flex;
  }

  .navbar {
    height: 60px;
  }

  .nav-menu {
    position: fixed;
    top: 60px;
    left: 0;
    width: 100%;
    height: calc(100vh - 60px);
    background: rgba(10, 10, 15, 0.98);
    backdrop-filter: blur(20px);
    flex-direction: column;
    gap: 0;
    padding: 20px 0;
    overflow-y: auto;
    transform: translateX(100%);
    transition: transform 0.35s cubic-bezier(0.4, 0, 0.2, 1);
    z-index: 999;
    -webkit-overflow-scrolling: touch;
  }

  body.light-mode .nav-menu {
    background: rgba(255, 255, 255, 0.98);
  }

  .nav-menu.active {
    transform: translateX(0);
  }

  .nav-menu li {
    width: 100%;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
  }

  body.light-mode .nav-menu li {
    border-color: rgba(0, 0, 0, 0.05);
  }

  .nav-menu > li > a {
    padding: 16px 24px;
    font-size: 1.05rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
  }

  .has-dropdown:hover .sub-nav,
  .has-dropdown:hover .mega-content {
    opacity: 0;
    visibility: hidden;
  }

  .mega-dropdown {
    position: relative !important;
  }

  .sub-nav,
  .mega-content {
    position: static !important;
    width: 100% !important;
    max-width: 100% !important;
    left: 0 !important;
    transform: none !important;
    opacity: 0;
    visibility: hidden;
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.35s ease, opacity 0.25s ease, visibility 0.25s ease;
    box-shadow: none;
    border: none;
    border-radius: 0;
    background: rgba(0, 0, 0, 0.15);
    padding: 0 !important;
    flex-direction: column;
  }

  body.light-mode .sub-nav,
  body.light-mode .mega-content {
    background: rgba(0, 0, 0, 0.03);
  }

  .has-dropdown.open > .sub-nav,
  .has-dropdown.open > .mega-content {
    opacity: 1;
    visibility: visible;
    max-height: 1200px;
    padding: 10px 0 !important;
  }

  .mega-content {
    flex-direction: column !important;
    gap: 0 !important;
  }

  .dropdown-column {
    padding: 8px 20px;
  }

  .dropdown-column .dropdown-header,
  h4.dropdown-header {
    padding: 10px 24px 6px;
    font-size: 0.8rem;
    color: #2563eb;
  }

  .sub-nav a {
    padding: 12px 32px;
    font-size: 0.95rem;
  }

  .sub-nav li a {
    padding: 12px 32px;
  }

  .dropdown-divider {
    margin: 5px 24px;
  }

  .sub-nav li.dropdown-header {
    padding: 10px 24px 4px;
    font-size: 0.8rem;
    color: #2563eb;
  }

  .search-box {
    display: none;
  }

  .nav-actions {
    gap: 10px;
  }

  #theme-toggle {
    width: 38px;
    height: 38px;
    font-size: 1rem;
  }
}

/* ==============================================
   SMALLER SCREENS (max 768px)
   ============================================== */
@media (max-width: 768px) {
  .premium-hero {
    padding: 60px 5%;
    min-height: auto;
  }

  .premium-hero h1 {
    font-size: 2.5rem;
  }

  .hero-description {
    font-size: 1rem;
  }

  .hero-stats {
    flex-direction: column;
    gap: 1.5rem;
    align-items: center;
  }

  .stat-divider {
    width: 50px;
    height: 1px;
  }

  .search-input-wrapper {
    flex-direction: column;
    border-radius: 16px;
    gap: 8px;
  }

  .hero-search input {
    text-align: center;
    padding: 12px 16px;
  }

  .search-main-btn {
    border-radius: 12px;
    width: 100%;
  }

  .main-container {
    padding: 40px 5%;
  }

  .section-header h2 {
    font-size: 1.8rem;
  }

  .category-grid {
    gap: 16px;
    margin-bottom: 40px;
  }

  .cat-card {
    padding: 28px 20px;
  }

  .page-content {
    padding: 2rem 1rem;
  }

  .content-section {
    padding: 1.5rem;
  }

  .content-section h2 {
    font-size: 1.3rem;
  }

  .spec-table {
    display: block;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
  }

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

  .about-hero {
    padding: 5rem 1.5rem 3rem;
  }

  .social-links {
    flex-direction: column;
    align-items: center;
  }

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

  .footer-container {
    gap: 40px;
  }

  .main-footer {
    padding: 60px 5% 30px;
    margin-top: 60px;
  }
}

/* ==============================================
   EXTRA SMALL SCREENS (max 480px)
   ============================================== */
@media (max-width: 480px) {
  .premium-hero h1 {
    font-size: 2rem;
  }

  .component-hero h1 {
    font-size: 1.8rem;
  }

  .component-hero .hero-subtitle {
    font-size: 0.95rem;
  }

  .stat-num {
    font-size: 2rem;
  }

  .nav-logo {
    font-size: 1.25rem;
  }

  .related-grid {
    flex-direction: column;
  }

  .related-link {
    text-align: center;
    width: 100%;
  }

  .content-section h2 {
    font-size: 1.15rem;
  }
}

/* ==============================================
   GLOBAL ANIMATIONS & GAMIFICATION (ADVANCED UX)
   ============================================== */

/* Reading Progress Bar */
#reading-progress-container {
  position: fixed;
  top: 70px; /* Right below navbar */
  left: 0;
  width: 100%;
  height: 4px;
  background: rgba(255, 255, 255, 0.05);
  z-index: 999;
}

#reading-progress-bar {
  height: 100%;
  background: linear-gradient(90deg, #3b82f6, #8b5cf6, #ec4899);
  width: 0%;
  transition: width 0.1s ease-out;
  box-shadow: 0 0 10px rgba(139, 92, 246, 0.5);
}

/* Scroll Reveal Base Classes */
.reveal {
  opacity: 0;
  transform: translateY(40px);
  transition: opacity 0.8s cubic-bezier(0.25, 0.46, 0.45, 0.94), 
              transform 0.8s cubic-bezier(0.25, 0.46, 0.45, 0.94);
  will-change: opacity, transform;
}

.reveal.active {
  opacity: 1;
  transform: translateY(0);
}

.reveal-left {
  opacity: 0;
  transform: translateX(-40px);
  transition: all 0.8s ease-out;
}
.reveal-left.active {
  opacity: 1;
  transform: translateX(0);
}

.reveal-scale {
  opacity: 0;
  transform: scale(0.9);
  transition: all 0.7s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}
.reveal-scale.active {
  opacity: 1;
  transform: scale(1);
}

/* Enhanced Glassmorphism for Content Blocks */
.content-section {
  background: rgba(30, 41, 59, 0.4);
  backdrop-filter: blur(12px);
  border: 1px solid rgba(255, 255, 255, 0.05);
  border-radius: 16px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
  transition: transform 0.3s ease, box-shadow 0.3s ease, border-color 0.3s ease;
}

.content-section:hover {
  transform: translateY(-2px);
  box-shadow: 0 15px 40px rgba(0, 0, 0, 0.3);
  border-color: rgba(255, 255, 255, 0.1);
}

/* Dynamic Hover Effects for Images and Links */
.content-section img {
  transition: transform 0.4s ease, box-shadow 0.4s ease;
}

.content-section img:hover {
  transform: scale(1.02);
  box-shadow: 0 10px 25px rgba(0,0,0,0.5);
}

/* Fun Fact Toast Widget */
#fun-fact-toast {
  position: fixed;
  bottom: 30px;
  right: -400px;
  width: 320px;
  background: rgba(15, 23, 42, 0.9);
  backdrop-filter: blur(16px);
  border: 1px solid rgba(59, 130, 246, 0.3);
  border-left: 4px solid #3b82f6;
  border-radius: 12px;
  padding: 15px 20px;
  box-shadow: 0 15px 40px rgba(0,0,0,0.4);
  color: #e2e8f0;
  z-index: 10000;
  transition: right 0.6s cubic-bezier(0.68, -0.55, 0.265, 1.55);
  display: flex;
  flex-direction: column;
  gap: 8px;
}

#fun-fact-toast.show {
  right: 30px;
}

.toast-header {
  font-weight: 700;
  font-size: 0.9rem;
  color: #60a5fa;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.toast-close {
  background: none;
  border: none;
  color: #94a3b8;
  cursor: pointer;
  font-size: 1.2rem;
  line-height: 1;
  padding: 0;
}

.toast-close:hover {
  color: #fff;
}

.toast-body {
  font-size: 0.85rem;
  line-height: 1.5;
}

@media (max-width: 768px) {
  #fun-fact-toast {
    bottom: 20px;
    width: calc(100% - 40px);
    right: -100%;
  }
  #fun-fact-toast.show {
    right: 20px;
  }
}

/* ==============================================
   PHASE 4: VISUAL HOMEPAGE REDESIGN
   ============================================== */

/* Zero to Hero Explainer Pathway */
.zth-pathway {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 20px;
  margin-top: 40px;
  flex-wrap: wrap;
}

@media (max-width: 768px) {
  .zth-pathway {
    flex-direction: column;
    gap: 10px;
  }
}

.zth-step {
  flex: 1;
  background: rgba(30, 41, 59, 0.4);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid rgba(255, 255, 255, 0.05);
  border-radius: 16px;
  padding: 30px 20px;
  text-align: center;
  min-width: 250px;
  transition: transform 0.3s ease, box-shadow 0.3s ease, border-color 0.3s ease;
}

.zth-step:hover {
  transform: translateY(-5px);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5), 0 0 20px rgba(96, 165, 250, 0.1);
  border-color: rgba(96, 165, 250, 0.3);
}

.zth-icon {
  font-size: 3rem;
  margin-bottom: 15px;
  filter: drop-shadow(0 4px 6px rgba(0,0,0,0.3));
}

.zth-step h4 {
  color: #f8fafc;
  font-weight: 600;
  margin-bottom: 10px;
}

.zth-step p {
  color: #94a3b8;
  font-size: 0.95rem;
  margin: 0;
}

.zth-connector {
  flex-shrink: 0;
  width: 40px;
  height: 4px;
  background: linear-gradient(90deg, rgba(96, 165, 250, 0.5), rgba(192, 132, 252, 0.5));
  border-radius: 2px;
  position: relative;
}

@media (max-width: 768px) {
  .zth-connector {
    width: 4px;
    height: 40px;
    background: linear-gradient(180deg, rgba(96, 165, 250, 0.5), rgba(192, 132, 252, 0.5));
  }
}

.zth-connector::after {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 12px;
  height: 12px;
  background: #3b82f6;
  border-radius: 50%;
  box-shadow: 0 0 10px #3b82f6, 0 0 20px #c084fc;
  animation: pulseNeon 2s infinite;
}

@keyframes pulseNeon {
  0% { box-shadow: 0 0 10px rgba(59, 130, 246, 0.5), 0 0 20px rgba(192, 132, 252, 0.2); transform: translate(-50%, -50%) scale(1); }
  50% { box-shadow: 0 0 15px rgba(59, 130, 246, 0.9), 0 0 30px rgba(192, 132, 252, 0.6); transform: translate(-50%, -50%) scale(1.2); }
  100% { box-shadow: 0 0 10px rgba(59, 130, 246, 0.5), 0 0 20px rgba(192, 132, 252, 0.2); transform: translate(-50%, -50%) scale(1); }
}

/* Massive Visual Category Cards */
.visual-category-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 30px;
  margin-top: 30px;
  margin-bottom: 80px;
}

.v-cat-card {
  position: relative;
  border-radius: 20px;
  overflow: hidden;
  text-decoration: none;
  background: #0f172a;
  border: 1px solid rgba(255, 255, 255, 0.05);
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
  transition: transform 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275), box-shadow 0.4s ease, border-color 0.4s ease;
  display: flex;
  flex-direction: column;
  min-height: 480px;
}

.v-cat-card:hover {
  transform: translateY(-10px) scale(1.02);
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.6), 0 0 30px rgba(59, 130, 246, 0.2);
  border-color: rgba(96, 165, 250, 0.4);
}

.v-cat-img-wrapper {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 60%;
  overflow: hidden;
  z-index: 0;
}

.v-cat-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.8s ease, filter 0.8s ease;
  filter: brightness(0.6) saturate(0.8);
}

.v-cat-card:hover .v-cat-img {
  transform: scale(1.1);
  filter: brightness(0.9) saturate(1.2);
}

.v-cat-overlay {
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(to top, #0f172a 10%, rgba(15, 23, 42, 0.8) 50%, rgba(15, 23, 42, 0) 100%);
}

.v-cat-content {
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
  padding: 30px;
  z-index: 1;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  height: 60%;
}

.v-cat-icon {
  font-size: 2.5rem;
  margin-bottom: 10px;
  filter: drop-shadow(0 2px 4px rgba(0,0,0,0.5));
  transition: transform 0.3s ease;
}

.v-cat-card:hover .v-cat-icon {
  transform: scale(1.1) rotate(5deg);
}

.v-cat-content h3 {
  color: #fff;
  font-size: 1.8rem;
  font-weight: 700;
  margin-bottom: 10px;
  text-shadow: 0 2px 10px rgba(0,0,0,0.5);
}

.v-cat-content p {
  color: #cbd5e1;
  font-size: 1rem;
  line-height: 1.5;
  margin-bottom: 25px;
  text-shadow: 0 1px 5px rgba(0,0,0,0.8);
}

.v-cat-btn {
  align-self: flex-start;
  padding: 10px 24px;
  background: rgba(255, 255, 255, 0.1);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 30px;
  color: #fff;
  font-weight: 600;
  font-size: 0.95rem;
  transition: all 0.3s ease;
}

.v-cat-card:hover .v-cat-btn {
  background: linear-gradient(90deg, #3b82f6, #8b5cf6);
  border-color: transparent;
  box-shadow: 0 4px 15px rgba(59, 130, 246, 0.4);
  transform: translateX(5px);
}
