
/*
Theme Name: CyberSec Electric Pro v4.8 PRO MAX
Theme URI: https://example.com
Author: You
Author URI: https://example.com
Description: Fully styled purple cyber security theme with hero, flashcards, smart navigation, dark/light mode, enhanced footer, auto pages and Elementor support.
Version: 4.8
License: GNU General Public License v2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Text Domain: cybersec-electric-pro
Tags: blog, education, custom-menu, custom-logo, featured-images
*/

:root {
  --bg: #0c0716;
  --bg-alt: #18142a;
  --accent: #c45bff;
  --accent-soft: rgba(196,91,255,0.22);
  --accent-secondary: #6df0ff;
  --text-main: #f6f2ff;
  --text-muted: #b8aee0;
  --border-subtle: #2b2444;
  --radius-lg: 18px;
}

/* Light mode overrides */
body.theme-light {
  --bg: #f7f5ff;
  --bg-alt: #ffffff;
  --accent: #8b3dff;
  --accent-soft: rgba(139,61,255,0.12);
  --accent-secondary: #00b8d9;
  --text-main: #14111f;
  --text-muted: #5f6280;
  --border-subtle: #d3c8ff;
}

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

body {
  margin: 0;
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  background: radial-gradient(circle at top, #2a1a4b 0, #0c0716 55%, #05030d 100%);
  color: var(--text-main);
  line-height: 1.6;
}

body.theme-light {
  background: radial-gradient(circle at top, #f7f3ff 0, #efe9ff 40%, #fdfcff 100%);
}

a { color: var(--accent-secondary); text-decoration: none; }
a:hover { text-decoration: underline; }
img { max-width: 100%; height: auto; display: block; }
.container { width: min(1140px, 94vw); margin: 0 auto; }

/* HEADER + NAV */
.site-header {
  background: rgba(12,7,25,0.9);
  border-bottom: 1px solid var(--border-subtle);
  position: sticky;
  top: 0;
  z-index: 80;
  backdrop-filter: blur(18px);
  transition: padding 0.2s ease, background 0.2s ease, box-shadow 0.2s ease;
}
body.theme-light .site-header {
  background: rgba(250,248,255,0.94);
}
.site-header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
  padding: 0.8rem 0;
}
.site-header.shrink .site-header-inner {
  padding: 0.4rem 0;
}
.site-branding {
  display: flex;
  align-items: center;
  gap: 0.9rem;
}
.site-logo img { height: 42px; width: auto; }
.site-title-text { display: flex; flex-direction: column; }
.site-title-text a {
  font-size: 1.35rem;
  font-weight: 700;
  color: var(--text-main);
  letter-spacing: 0.05em;
}
.site-description {
  font-size: 0.8rem;
  color: var(--text-muted);
}
.header-right {
  display: flex;
  align-items: center;
  gap: 1.1rem;
}
.main-navigation { position: relative; }

/* Menu */
.main-navigation ul.menu {
  list-style: none;
  display: flex;
  flex-direction: row;
  gap: 1.4rem;
  margin: 0;
  padding: 0;
  flex-wrap: nowrap;
  white-space: nowrap;
}
.main-navigation ul.menu > li {
  position: relative;
  flex-shrink: 0;
}
.main-navigation a {
  color: var(--text-main);
  font-size: 0.88rem;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.3rem 0;
  position: relative;
}
.main-navigation a .menu-icon { font-size: 0.9rem; }
/* Neon underline */
.main-navigation ul.menu > li > a::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: -4px;
  width: 0;
  height: 2px;
  border-radius: 999px;
  background: linear-gradient(90deg, var(--accent), var(--accent-secondary));
  transition: width 0.25s ease;
}
.main-navigation ul.menu > li:hover > a::after { width: 100%; }
.main-navigation ul.menu > li:hover > a { color: var(--accent-secondary); }

/* Submenus */
.sub-menu {
  list-style: none;
  margin: 0;
  padding: 0.5rem 0;
  background: #171328;
  border-radius: 12px;
  border: 1px solid rgba(255,255,255,0.1);
}
body.theme-light .sub-menu {
  background: #f6f1ff;
  border-color: rgba(0,0,0,0.06);
}
.main-navigation ul.menu > li > .sub-menu {
  position: absolute;
  top: 100%;
  left: 0;
  min-width: 220px;
  opacity: 0;
  transform: translateY(10px);
  pointer-events: none;
  transition: 0.18s ease;
  z-index: 50;
}
.main-navigation ul.menu > li:hover > .sub-menu {
  opacity: 1;
  pointer-events: auto;
  transform: translateY(0);
}
.sub-menu li a {
  padding: 0.55rem 1rem;
  width: 100%;
  display: block;
  font-size: 0.85rem;
}

/* Mega-menu */
.menu-item-mega { position: static !important; }
.menu-item-mega > .mega-menu {
  position: absolute;
  left: 50%;
  transform: translateX(-50%) translateY(10px);
  top: 100%;
  width: min(780px, 96vw);
  background: #15112a;
  border-radius: 18px;
  border: 1px solid rgba(255,255,255,0.12);
  padding: 1.2rem 1.4rem 1.4rem;
  box-shadow: 0 24px 45px rgba(0,0,0,0.8);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s ease, transform 0.2s ease;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 1.4rem;
  z-index: 60;
}
body.theme-light .menu-item-mega > .mega-menu {
  background: #f7f3ff;
  border-color: rgba(0,0,0,0.08);
  box-shadow: 0 20px 35px rgba(0,0,0,0.08);
}
.menu-item-mega:hover > .mega-menu {
  opacity: 1;
  pointer-events: auto;
  transform: translateX(-50%) translateY(0);
}
.mega-column h4 {
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 0.16em;
  color: #f7b6ff;
  margin: 0 0 0.6rem;
}
body.theme-light .mega-column h4 { color: #8b3dff; }
.mega-column ul {
  list-style: none;
  margin: 0;
  padding: 0;
}
.mega-column li a {
  display: block;
  padding: 0.35rem 0;
  color: #e6dcff;
  font-size: 0.86rem;
}
body.theme-light .mega-column li a {
  color: #39324f;
}
.mega-column li a:hover { color: var(--accent-secondary); }

/* Smart 'More' */
.more-menu > a::after {
  content: " ▾";
  font-size: 0.7rem;
}
.more-menu { flex-shrink: 0 !important; }

/* Mobile menu */
.menu-toggle {
  display: none;
  border: 1px solid var(--border-subtle);
  border-radius: 999px;
  padding: 0.35rem 0.8rem;
  align-items: center;
  gap: 0.5rem;
  background: rgba(15,10,35,0.96);
  color: #f5f2ff;
  cursor: pointer;
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.16em;
}
body.theme-light .menu-toggle {
  background: rgba(246,242,255,0.98);
  color: #2a2340;
}
.menu-toggle-burger {
  width: 18px;
  height: 12px;
  position: relative;
}
.menu-toggle-burger span {
  position: absolute;
  left: 0;
  right: 0;
  height: 2px;
  border-radius: 999px;
  background: var(--accent-secondary);
  transition: transform 0.2s ease, top 0.2s ease, opacity 0.2s ease;
}
.menu-toggle-burger span:nth-child(1) { top: 0; }
.menu-toggle-burger span:nth-child(2) { top: 5px; }
.menu-toggle-burger span:nth-child(3) { top: 10px; }
body.nav-open .menu-toggle-burger span:nth-child(1) {
  top: 5px; transform: rotate(45deg);
}
body.nav-open .menu-toggle-burger span:nth-child(2) { opacity: 0; }
body.nav-open .menu-toggle-burger span:nth-child(3) {
  top: 5px; transform: rotate(-45deg);
}

@media (max-width: 900px) {
  .menu-toggle { display: inline-flex; }
  .main-navigation ul.menu {
    position: absolute;
    right: 0;
    top: 120%;
    flex-direction: column;
    background: #120d25;
    border-radius: 14px;
    border: 1px solid var(--border-subtle);
    padding: 0.4rem 0;
    box-shadow: 0 18px 40px rgba(0,0,0,0.85);
    transform: translateY(-8px);
    opacity: 0;
    pointer-events: none;
    width: min(260px, 90vw);
    white-space: normal;
  }
  body.theme-light .main-navigation ul.menu {
    background: #f6f1ff;
    box-shadow: 0 18px 40px rgba(0,0,0,0.08);
  }
  body.nav-open .main-navigation ul.menu {
    opacity: 1;
    transform: translateY(0);
    pointer-events: auto;
  }
  .main-navigation ul.menu > li > .sub-menu,
  .menu-item-mega > .mega-menu {
    position: relative;
    transform: none;
    opacity: 1;
    pointer-events: auto;
    box-shadow: none;
    border-radius: 0;
    border: 0;
    background: transparent;
    padding-left: 1rem;
  }
}

/* Theme toggle */
.theme-toggle {
  border-radius: 999px;
  border: 1px solid var(--border-subtle);
  padding: 0.3rem 0.7rem;
  font-size: 0.8rem;
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  background: rgba(15,10,35,0.9);
  color: var(--text-main);
  cursor: pointer;
}

/* HERO + SECTIONS */
.hero { padding: 4rem 0 3rem; }
.hero-inner {
  display: grid;
  grid-template-columns: minmax(0,1.1fr) minmax(0,1fr);
  gap: 2.5rem;
  align-items: center;
}
.hero-left h1 {
  font-size: clamp(2.4rem, 3.2vw + 1.4rem, 3.4rem);
  margin: 0 0 1rem;
}
.hero-left h1 span {
  background: linear-gradient(120deg, var(--accent), var(--accent-secondary));
  -webkit-background-clip: text;
  color: transparent;
}
.hero-left p {
  color: var(--text-muted);
  font-size: 1.02rem;
}
.hero-cta {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  margin-top: 1.8rem;
}
.hero-right img {
  border-radius: var(--radius-lg);
  box-shadow: 0 0 45px rgba(196,91,255,0.5);
}

/* Hero stats */
.hero-stats {
  display: flex;
  flex-wrap: wrap;
  gap: 1.4rem;
  margin-top: 2.2rem;
}
.hero-stat {
  min-width: 140px;
  padding: 0.9rem 1.1rem;
  border-radius: 999px;
  border: 1px solid var(--border-subtle);
  font-size: 0.85rem;
  display: flex;
  align-items: center;
  gap: 0.6rem;
  background: rgba(5,3,15,0.7);
}
body.theme-light .hero-stat {
  background: rgba(255,255,255,0.9);
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.75rem 1.9rem;
  font-weight: 600;
  border-radius: 999px;
  border: 1px solid transparent;
  font-size: 0.9rem;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  cursor: pointer;
}
.btn-primary {
  background: linear-gradient(120deg, var(--accent), var(--accent-secondary));
  color: #05020b;
  box-shadow: 0 0 28px rgba(196,91,255,0.58);
}
.btn-outline {
  border-color: var(--border-subtle);
  color: var(--text-main);
  background: rgba(15,10,35,0.96);
}
body.theme-light .btn-outline { background: #ffffff; }

/* Sections */
.section { padding: 3.5rem 0; }
.section-heading {
  text-align: center;
  margin-bottom: 2.5rem;
  text-transform: uppercase;
  letter-spacing: 0.18em;
  font-size: 0.75rem;
  color: #f7b6ff;
}
body.theme-light .section-heading { color: #8b3dff; }

/* Flashcards */
.flashcards {
  display: grid;
  grid-template-columns: repeat(auto-fit,minmax(260px,1fr));
  gap: 1.6rem;
  margin-top: 2rem;
}
.flashcard {
  background: var(--bg-alt);
  padding: 1.5rem 1.5rem 1.4rem;
  border-radius: 14px;
  border: 1px solid var(--border-subtle);
  transition: transform 0.25s ease, box-shadow 0.25s ease, border-color 0.25s ease;
}
.flashcard h3 { margin-top: 0; }
.flashcard p {
  color: var(--text-muted);
  font-size: 0.95rem;
}
.flashcard:hover {
  transform: translateY(-6px);
  box-shadow: 0 0 28px rgba(196,91,255,0.55);
  border-color: var(--accent-soft);
}

/* Blog list */
.latest-posts article {
  border-bottom: 1px solid var(--border-subtle);
  padding-bottom: 1rem;
  margin-bottom: 1rem;
}
.latest-posts article:last-child { border-bottom: none; }

/* CTA strip */
.cta-strip {
  padding: 2rem 0;
  background: linear-gradient(120deg, rgba(196,91,255,0.12), rgba(109,240,255,0.08));
  text-align: center;
}

/* FOOTER */
.site-footer {
  background: #05030d;
  padding: 3rem 0 1.8rem;
  margin-top: 3rem;
  border-top: 1px solid var(--border-subtle);
}
body.theme-light .site-footer { background: #130f23; }

.footer-grid {
  display: grid;
  grid-template-columns: minmax(0,2fr) repeat(3,minmax(0,1.1fr));
  gap: 2rem;
}
.footer-brand h3 { margin-top: 0; }
.footer-brand p {
  color: var(--text-muted);
  font-size: 0.9rem;
}
.footer-col h4 {
  text-transform: uppercase;
  letter-spacing: 0.18em;
  font-size: 0.75rem;
  margin-top: 0;
  margin-bottom: 0.8rem;
  color: #f7b6ff;
}
.footer-col ul {
  list-style: none;
  margin: 0;
  padding: 0;
  font-size: 0.9rem;
}
.footer-col li { margin-bottom: 0.35rem; }
.footer-col a { color: var(--text-muted); }
.footer-col a:hover { color: var(--accent-secondary); }

/* Social icons */
.footer-social {
  display: flex;
  gap: 0.6rem;
  margin-top: 0.8rem;
}
.footer-social a {
  width: 32px;
  height: 32px;
  border-radius: 999px;
  border: 1px solid var(--border-subtle);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: var(--accent-secondary);
  transition: background 0.2s ease, transform 0.2s ease, box-shadow 0.2s ease;
}
.footer-social a:hover {
  background: linear-gradient(120deg, var(--accent), var(--accent-secondary));
  color: #05020b;
  transform: translateY(-2px);
  box-shadow: 0 0 16px rgba(196,91,255,0.6);
}

/* Footer bottom */
.footer-bottom {
  margin-top: 2rem;
  border-top: 1px solid var(--border-subtle);
  padding-top: 1.2rem;
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  justify-content: space-between;
  font-size: 0.8rem;
  color: var(--text-muted);
}
.footer-bottom-links {
  display: flex;
  flex-wrap: wrap;
  gap: 0.9rem;
}

@media(max-width:900px){
  .hero-inner{grid-template-columns:minmax(0,1fr);}
  .footer-grid{grid-template-columns:minmax(0,1fr) minmax(0,1fr);}
}
@media(max-width:600px){
  .footer-grid{grid-template-columns:minmax(0,1fr);}
}
