:root {
  /* New Color Palette */
  --primary: #0066ff;
  --secondary: #7b42f6;
  --accent: #00d4ff;
  --neutral-dark: #1a1a2e;
  --neutral-light: #f8f9fa;

  /* Semantic Color Variables */
  --text-primary: var(--neutral-dark);
  --text-secondary: #4a5568;
  --background-primary: var(--neutral-light);
  --background-secondary: #ffffff;
  --border-color: #e2e8f0;

  /* Button Colors */
  --button-primary-bg: var(--primary);
  --button-primary-text: #ffffff;
  --button-primary-hover: #0052cc;

  --button-secondary-bg: var(--secondary);
  --button-secondary-text: #ffffff;
  --button-secondary-hover: #6b31e0;

  /* Link Colors */
  --link-color: var(--primary);
  --link-hover: var(--secondary);

  /* Status Colors */
  --success: #10b981;
  --warning: #f59e0b;
  --error: #ef4444;

  /* Typography */
  --font-body: "Inter", sans-serif;
  --font-heading: "Poppins", sans-serif;

  /* Spacing */
  --space-xs: 0.5rem;
  --space-sm: 1rem;
  --space-md: 1.5rem;
  --space-lg: 2rem;
  --space-xl: 3rem;

  /* Border Radius */
  --radius-sm: 0.25rem;
  --radius-md: 0.5rem;
  --radius-lg: 0.75rem;

  /* Shadows */
  --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
  --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1),
    0 2px 4px -1px rgba(0, 0, 0, 0.06);
  --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1),
    0 4px 6px -2px rgba(0, 0, 0, 0.05);

  /* Legacy Neve Variables (renamed for custom theme) */
  --hid-primary-accent: var(--primary);
  --hid-secondary-accent: var(--neutral-dark);

  /* Header Customs */
  --gradient: linear-gradient(90deg, var(--primary), var(--secondary));
  --header-height: 80px;
}

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

html {
  scroll-behavior: smooth;
}

/* Base Typography */
body {
  font-family: var(--font-body);
  color: var(--text-primary);
  background-color: var(--background-primary);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
}

h1,
h2,
h3,
h4,
h5,
h6 {
  font-family: var(--font-heading);
  font-weight: 600;
  /* color: var(--neutral-dark); */
  line-height: 1.3;
  margin-bottom: var(--space-sm);
}

/* Prevent unexpected extra top margin caused by the admin bar */
body.admin-bar {
  margin-top: 0 !important;
}

/* Links */
a {
  color: var(--link-color);
  text-decoration: none;
  transition: color 0.2s ease;
}

a:hover,
a:focus {
  color: var(--link-hover);
}

/* Buttons */
/* .btn-primary {
  background-color: var(--button-primary-bg);
  color: var(--button-primary-text);
  border: none;
  padding: var(--space-sm) var(--space-md);
  border-radius: var(--radius-md);
  font-family: var(--font-heading);
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
}

.btn-primary:hover {
  background-color: var(--button-primary-hover);
  transform: translateY(-1px);
  box-shadow: var(--shadow-md);
}

.btn-secondary {
  background-color: var(--button-secondary-bg);
  color: var(--button-secondary-text);
  border: none;
  padding: var(--space-sm) var(--space-md);
  border-radius: var(--radius-md);
  font-family: var(--font-heading);
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
}

.btn-secondary:hover {
  background-color: var(--button-secondary-hover);
  transform: translateY(-1px);
  box-shadow: var(--shadow-md);
} */
.btn {
  display: inline-block;
  padding: 15px 35px !important;
  border-radius: 50px !important;
  font-family: "Poppins", sans-serif;
  font-weight: 600;
  font-size: 1rem;
  transition: all 0.3s ease;
  text-align: center;
  cursor: pointer;
  border: none;
}

.btn-primary {
  background-color: var(--accent) !important;
  color: var(--neutral-dark) !important;
  box-shadow: 0 4px 15px rgba(0, 212, 255, 0.3) !important;
}

.btn-primary:hover {
  transform: translateY(-3px);
  box-shadow: 0 6px 20px rgba(0, 212, 255, 0.5) !important;
}

.btn-secondary {
  background: transparent !important;
  color: var(--neutral-light) !important;
  border: 2px solid var(--accent) !important;
}

.btn-secondary:hover {
  background-color: var(--accent) !important;
  color: var(--neutral-dark) !important;
  transform: translateY(-3px) !important;
}

/* Images */
.entry-content img {
  border: 3px solid var(--accent);
  padding: var(--space-xs);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-sm);
  transition: all 0.3s ease;
}

.entry-content img:hover {
  border-color: var(--primary);
  box-shadow: var(--shadow-md);
  transform: translateY(-2px);
}

/* Utility Classes */
.text-accent {
  color: var(--accent);
}
.text-primary {
  color: var(--primary);
}
.text-secondary {
  color: var(--secondary);
}

.bg-accent {
  background-color: var(--accent);
}
.bg-primary {
  background-color: var(--primary);
}
.bg-secondary {
  background-color: var(--secondary);
}

.border-accent {
  border-color: var(--accent);
}
.border-primary {
  border-color: var(--primary);
}

/* Gradient Text */
.gradient-text {
  background: linear-gradient(135deg, var(--primary) 0%, var(--secondary) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

/* Cards */
.card {
  background: var(--background-secondary);
  border-radius: var(--radius-lg);
  padding: var(--space-lg);
  box-shadow: var(--shadow-sm);
  border: 1px solid var(--border-color);
  transition: all 0.3s ease;
}

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

/* Form Elements */
input[type="text"],
input[type="email"],
input[type="password"],
input[type="number"],
input[type="url"],
textarea,
select {
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: var(--space-sm);
  font-family: var(--font-body);
  transition: all 0.2s ease;
}

input[type="text"]:focus,
input[type="email"]:focus,
input[type="password"]:focus,
input[type="number"]:focus,
input[type="url"]:focus,
textarea:focus,
select:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(0, 212, 255, 0.1);
}

/* Navigation */
.main-navigation a {
  color: var(--text-primary);
  font-weight: 500;
}

.main-navigation a:hover {
  color: var(--primary);
}

/* Code Blocks (for your tutorials) */
pre,
code {
  background-color: var(--neutral-dark);
  color: var(--neutral-light);
  border-radius: var(--radius-md);
  border-left: 4px solid var(--accent);
  padding-left: 1rem;
}

/* Responsive Typography */
@media (max-width: 768px) {
  :root {
    --space-sm: 0.75rem;
    --space-md: 1.25rem;
    --space-lg: 1.75rem;
    --space-xl: 2.5rem;
  }

  h1 {
    font-size: 2rem;
  }
  h2 {
    font-size: 1.75rem;
  }
  h3 {
    font-size: 1.5rem;
  }
}

/* Site Header and Footer */

/* Header Styles - FIXED */
.site-header {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: var(--header-height);
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0 5%;
  background-color: rgba(248, 249, 250, 0.98);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  box-shadow: 0 2px 20px rgba(0, 0, 0, 0.08);
  z-index: 1000;
  border-bottom: 1px solid rgba(0, 0, 0, 0.05);
}

.logo-link {
  font-size: 1.5rem;
  font-weight: 700;
  flex-shrink: 0;
  display: flex;
}

.logo-gradient-text {
  background: var(--gradient);
  background-clip: text;
  -webkit-background-clip: text;
  color: transparent;
  font-weight: 700;
}

/* Main Navigation */
.main-nav {
  display: flex;
  gap: 2rem;
  align-items: center;
  flex-wrap: wrap;
  justify-content: center;
  flex: 1;
  max-width: 600px;
  margin: 0 2rem;
}

.main-nav a {
  font-size: 0.95rem;
  font-weight: 600;
  position: relative;
  padding: 0.5rem 0;
  color: var(--neutral-dark);
  white-space: nowrap;
  transition: all 0.3s ease;
}

.main-nav a::after {
  content: "";
  position: absolute;
  bottom: 0;
  left: 50%;
  width: 0;
  height: 2px;
  background: var(--gradient);
  transition: all 0.3s ease-in-out;
  transform: translateX(-50%);
}

.main-nav a:hover {
  color: var(--primary);
}

.main-nav a:hover::after {
  width: 100%;
}

/* Header Actions */
.header-actions {
  display: flex;
  align-items: center;
  gap: 1.5rem;
  flex-shrink: 0;
}

.header-cta {
  background: var(--gradient);
  color: white;
  font-weight: 600;
  padding: 0.75rem 1.5rem;
  border-radius: 50px;
  transition: all 0.3s ease;
  box-shadow: 0 4px 15px rgba(0, 102, 255, 0.3);
  border: none;
  cursor: pointer;
  text-decoration: none;
  display: inline-block;
  white-space: nowrap;
  font-size: 0.9rem;
}

.header-cta:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 25px rgba(0, 102, 255, 0.4);
  color: white;
  text-decoration: none;
}

/* Mobile Navigation Toggle */
.mobile-nav-toggle {
  display: none;
  flex-direction: column;
  justify-content: space-around;
  width: 30px;
  height: 24px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 0;
  z-index: 1002;
}

.mobile-nav-toggle span {
  width: 100%;
  height: 3px;
  background-color: var(--neutral-dark);
  border-radius: 5px;
  transition: all 0.3s ease-in-out;
  transform-origin: center;
}

.mobile-nav-toggle:hover {
  background-color: rgba(0, 0, 0, 0);
}

/* Mobile Navigation */
.mobile-nav {
  position: fixed;
  top: 0;
  right: -100%;
  width: 100%;
  height: 100vh;
  background: linear-gradient(135deg, var(--neutral-dark) 0%, #16213e 100%);
  z-index: 1001;
  transition: right 0.4s cubic-bezier(0.77, 0, 0.175, 1);
  display: flex;
  flex-direction: column;
}

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

.mobile-nav-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1.5rem 5%;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.mobile-nav-title {
  color: var(--neutral-light);
  font-size: 1.2rem;
  font-weight: 600;
}

.mobile-nav-close {
  background: none;
  border: none;
  color: var(--neutral-light);
  font-size: 2rem;
  cursor: pointer;
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: color 0.3s ease;
}

.mobile-nav-close:hover {
  color: var(--accent);
}

.mobile-nav-content {
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 2rem 5%;
}

.mobile-menu {
  list-style: none;
  margin-bottom: 2rem;
}

.mobile-menu li {
  margin-bottom: 1rem;
  text-align: center;
}

.mobile-menu a {
  color: var(--neutral-light);
  font-size: 1.4rem;
  font-weight: 600;
  text-decoration: none;
  transition: all 0.3s ease;
  display: block;
  padding: 0.75rem 0;
}

.mobile-menu a:hover {
  color: var(--accent);
  transform: translateX(10px);
}

.mobile-nav-footer {
  text-align: center;
  padding-top: 2rem;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.mobile-cta {
  background: var(--gradient);
  color: white;
  padding: 1rem 2rem;
  border-radius: 50px;
  text-decoration: none;
  font-weight: 600;
  display: inline-block;
  transition: all 0.3s ease;
}

.mobile-cta:hover {
  transform: translateY(-2px);
  box-shadow: 0 5px 15px rgba(0, 102, 255, 0.4);
  color: white;
}

/* Main Content Area */
.main-content {
  min-height: 100vh;
  width: 100%;
}

/* Ensure proper spacing for fixed header */
.admin-bar .site-header {
  top: 32px;
}

@media screen and (max-width: 782px) {
  .admin-bar .site-header {
    top: 46px;
  }
}

/* Footer Styles - IMPROVED */
.site-footer {
  background: linear-gradient(135deg, var(--neutral-dark) 0%, #16213e 100%);
  color: var(--neutral-light);
  padding: 4rem 5% 2rem;
  margin-top: auto;
  position: relative;
}

.site-footer::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 1px;
  background: var(--gradient);
  opacity: 0.3;
}

.footer-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 3rem;
  margin-bottom: 3rem;
}

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

.footer-logo {
  font-size: 1.8rem;
  font-weight: 700;
  margin-bottom: 1rem;
}

.footer-tagline {
  font-size: 0.95rem;
  color: rgba(248, 249, 250, 0.8);
  margin-bottom: 1rem;
  font-weight: 500;
}

.footer-description {
  font-size: 0.9rem;
  line-height: 1.6;
  color: rgba(248, 249, 250, 0.7);
  margin-bottom: 1.5rem;
}

.footer-contact {
  margin-top: auto;
}

.contact-item {
  font-size: 0.85rem;
  margin-bottom: 0.5rem;
  color: rgba(248, 249, 250, 0.8);
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.contact-item strong {
  color: var(--neutral-light);
  min-width: 60px;
}

.contact-item a {
  color: var(--accent);
  text-decoration: none;
  transition: color 0.3s ease;
}

.contact-item a:hover {
  color: #33e0ff;
  text-decoration: underline;
}

.footer-column h4 {
  font-size: 1.1rem;
  margin-bottom: 1.5rem;
  color: var(--neutral-light);
  position: relative;
  padding-bottom: 0.75rem;
}

.footer-column h4::after {
  content: "";
  position: absolute;
  bottom: 0;
  left: 0;
  width: 40px;
  height: 2px;
  background: var(--gradient);
  border-radius: 2px;
}

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

.footer-links li {
  margin-bottom: 0.75rem;
}

.footer-links a {
  color: rgba(248, 249, 250, 0.7);
  transition: all 0.3s ease;
  text-decoration: none;
  font-size: 0.9rem;
  display: block;
}

.footer-links a:hover {
  color: var(--accent);
  padding-left: 8px;
  transform: translateX(5px);
}

.social-links {
  display: flex;
  gap: 1rem;
  margin-bottom: 2rem;
  flex-wrap: wrap;
}

.social-links a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  background: rgba(255, 255, 255, 0.1);
  border-radius: 50%;
  transition: all 0.3s ease;
}

.social-links svg {
  width: 20px;
  height: 20px;
  fill: rgba(248, 249, 250, 0.7);
  transition: all 0.3s ease;
}

.social-links a:hover {
  background: var(--gradient);
  transform: translateY(-2px);
}

.social-links a:hover svg {
  fill: white;
}

.footer-bottom-bar {
  text-align: center;
  padding-top: 2rem;
  border-top: 1px solid rgba(248, 249, 250, 0.1);
  font-size: 0.85rem;
  color: rgba(248, 249, 250, 0.5);
}

/* Mobile Menu Animations */
.mobile-nav-toggle.active span:nth-child(1) {
  transform: rotate(45deg) translate(6px, 6px);
}

.mobile-nav-toggle.active span:nth-child(2) {
  opacity: 0;
  transform: translateX(-10px);
}

.mobile-nav-toggle.active span:nth-child(3) {
  transform: rotate(-45deg) translate(6px, -6px);
}

/* Responsive Design - CRITICAL FIXES */
@media screen and (max-width: 1200px) {
  .site-header {
    padding: 0 4%;
  }

  .main-nav {
    gap: 1.5rem;
    margin: 0 1.5rem;
  }

  .main-nav a {
    font-size: 0.9rem;
  }
}

@media screen and (max-width: 1024px) {
  .main-nav {
    display: none;
  }

  .header-actions {
    gap: 1rem;
  }

  .mobile-nav-toggle {
    display: flex;
  }

  .footer-grid {
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 2.5rem;
  }
}

@media screen and (max-width: 768px) {
  .site-header {
    padding: 0 1rem;
    height: 70px;
  }

  .logo-link {
    font-size: 1.3rem;
  }

  .header-cta {
    padding: 0.6rem 1.2rem;
    font-size: 0.85rem;
  }

  .site-footer {
    padding: 3rem 1rem 1.5rem;
  }

  .footer-grid {
    grid-template-columns: 1fr;
    gap: 2rem;
    text-align: center;
  }

  .footer-column h4::after {
    left: 50%;
    transform: translateX(-50%);
  }

  .social-links {
    justify-content: center;
  }

  .footer-links a:hover {
    padding-left: 0;
    transform: none;
  }

  .mobile-nav-content {
    padding: 1rem 1rem;
  }

  .mobile-menu a {
    font-size: 1.2rem;
    padding: 1rem 0;
  }
}

@media screen and (max-width: 480px) {
  .site-header {
    padding: 0 0.75rem;
  }

  .logo-link {
    font-size: 1.1rem;
  }

  .header-cta {
    padding: 0.5rem 1rem;
    font-size: 0.8rem;
    display: none;
  }

  .mobile-nav-toggle {
    width: 25px;
    height: 20px;
  }
}

/* Fallback menu styling */
.footer-links ul {
  list-style: none;
  padding: 0;
  margin: 0;
}

.footer-links ul li {
  margin-bottom: 0.75rem;
}

.footer-links ul li a {
  color: rgba(248, 249, 250, 0.7);
  transition: all 0.3s ease;
  text-decoration: none;
  font-size: 0.9rem;
  display: block;
}

.footer-links ul li a:hover {
  color: var(--accent);
  padding-left: 8px;
}

/* Ensure no horizontal scroll */
body {
  overflow-x: hidden;
  width: 100%;
}

main {
  padding-top: calc(var(--header-height) - 10px);
}

.admin-bar main {
  padding-top: calc(var(--header-height) + 0px);
}

@media screen and (max-width: 782px) {
  .admin-bar main {
    /* padding-top: calc(var(--header-height) + 46px); */
    padding-top: calc(var(--header-height) - 10px);
  }
}

/* Logo Styling */
.header-logo-img {
  height: 40px;
  width: auto;
  max-width: 200px;
  object-fit: contain;
}

.footer-logo-img {
  height: 50px;
  width: auto;
  max-width: 220px;
  object-fit: contain;
  margin-bottom: 1rem;
}

.mobile-panel-logo {
  height: 35px;
  width: auto;
  max-width: 180px;
  object-fit: contain;
}

/* Footer Column Adjustments for Desktop */
@media screen and (min-width: 1025px) {
  .footer-grid {
    grid-template-columns: 2fr 0.5fr 1fr 1.5fr;
    gap: 2rem;
  }

  .brand-column {
    max-width: none;
    align-items: flex-start;
  }

  /* .footer-grid .footer-column.brand-column{
    align-items: flex-start;
} */

  .links-column {
    min-width: 150px;
  }

  .connect-column {
    min-width: 200px;
  }
}

/* Center contact info on mobile */
@media screen and (max-width: 768px) {
  .footer-contact {
    text-align: center;
  }

  .contact-item {
    justify-content: center;
    flex-direction: column;
    gap: 0.25rem;
  }

  .contact-item strong {
    min-width: auto;
  }

  .footer-logo-img {
    margin-left: auto;
    margin-right: auto;
    display: block;
  }
}

/* Mobile Panel Logo CSS */

.mobile-panel-logo {
  max-height: 35px;
  width: auto;
}

/* Header logo responsive adjustments */
/* @media screen and (max-width: 1024px) {
    .header-logo-img {
        height: 55px;
        max-width: 160px;
    }
}

@media screen and (max-width: 480px) {
    .header-logo-img {
        height: 40px;
        max-width: 140px;
    }
} */

/* Footer logo responsive adjustments */
@media screen and (max-width: 768px) {
  .footer-logo-img {
    height: 55px;
    max-width: 200px;
  }
}

/* Enhanced Logo Styling */
.header-logo-img {
  height: 45px;
  width: auto;
  max-width: 220px;
  object-fit: contain;
  transition: all 0.3s ease;
}

.footer-logo-img {
  height: 65px;
  width: auto;
  max-width: 240px;
  object-fit: contain;
  margin-bottom: 1rem;
  opacity: 0.95;
}

.mobile-panel-logo {
  height: 40px;
  width: auto;
  max-width: 200px;
  object-fit: contain;
  opacity: 0.95;
}

/* Logo hover effects for header */
.site-header .logo-link:hover .header-logo-img {
  opacity: 0.8;
  transform: scale(1.02);
}

/* Ensure logo visibility in different contexts */
.site-header .header-logo-img {
  filter: brightness(1); /* Ensures dark logo looks good on light background */
}

.site-footer .footer-logo-img,
.mobile-nav .mobile-panel-logo {
  filter: brightness(
    1.2
  ); /* Slightly brightens light logos on dark backgrounds */
}

/* Responsive logo adjustments */
@media screen and (max-width: 1024px) {
  .header-logo-img {
    height: 55px;
    max-width: 180px;
  }
}

@media screen and (max-width: 768px) {
  .header-logo-img {
    height: 45px;
    max-width: 160px;
  }

  .footer-logo-img {
    height: 45px;
    max-width: 200px;
  }

  .mobile-panel-logo {
    height: 35px;
    max-width: 170px;
  }
}

@media screen and (max-width: 480px) {
  .header-logo-img {
    height: 40px;
    max-width: 140px;
  }
}
