/*
Theme Name: PixaQuant
Theme URI: https://pixaquant.com
Author: PixaQuant
Author URI: https://pixaquant.com
Description: A modern, minimal, conversion-focused WordPress theme for PixaQuant — a software engineering, security, and WordPress development company.
Version: 1.0.0
Requires at least: 6.0
Tested up to: 6.7
Requires PHP: 7.4
License: GNU General Public License v2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Text Domain: pixaquant
Tags: custom-background, custom-logo, custom-menu, featured-images, threaded-comments, translation-ready
*/

/* ========================================
   BASE RESET & TYPOGRAPHY
   ======================================== */

*, *::before, *::after { box-sizing: border-box; }

html {
  scroll-behavior: smooth;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body {
  font-family: 'Inter', system-ui, -apple-system, sans-serif;
  color: #1f2937;
  background: #ffffff;
  margin: 0;
  padding: 0;
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

/* ========================================
   SCROLLBAR
   ======================================== */

::-webkit-scrollbar { width: 8px; }
::-webkit-scrollbar-track { background: #f9fafb; }
::-webkit-scrollbar-thumb { background: #d1d5db; border-radius: 4px; }
::-webkit-scrollbar-thumb:hover { background: #9ca3af; }

/* ========================================
   ANIMATIONS
   ======================================== */

.fade-up {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.5s ease, transform 0.5s ease;
  will-change: opacity, transform;
}
.fade-up.visible {
  opacity: 1;
  transform: translateY(0);
}

@media (max-width: 767px) {
  .fade-up {
    opacity: 1;
    transform: none;
    transition: none;
  }

  .fade-up.visible {
    transform: none;
  }
}

.card-lift {
  transition: transform 0.25s ease, box-shadow 0.25s ease;
  will-change: transform;
}
.card-lift:hover {
  transform: translateY(-4px);
  box-shadow: 0 12px 40px -8px rgba(20, 99, 247, 0.12), 0 4px 12px -2px rgba(0,0,0,0.06);
}

/* ========================================
   BUTTONS
   ======================================== */

.btn-primary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  background: #1463f7;
  color: #fff;
  font-weight: 500;
  border: none;
  cursor: pointer;
  transition: background 0.2s ease, box-shadow 0.2s ease, transform 0.15s ease;
}
.btn-primary:hover {
  background: #0d4fd4;
  box-shadow: 0 4px 16px -2px rgba(20, 99, 247, 0.4);
}
.btn-primary:active { transform: scale(0.98); }
.btn-primary:disabled {
  opacity: 0.6;
  cursor: not-allowed;
  box-shadow: none;
}
.btn-primary:disabled:hover { background: #1463f7; }

.btn-secondary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  background: transparent;
  border: 1.5px solid #d1d5db;
  color: #374151;
  font-weight: 500;
  cursor: pointer;
  transition: border-color 0.2s ease, color 0.2s ease, background 0.2s ease, transform 0.15s ease;
}
.btn-secondary:hover {
  border-color: #1463f7;
  color: #1463f7;
  background: #eef5ff;
}
.btn-secondary:active { transform: scale(0.98); }

/* ========================================
   NAVIGATION (WordPress menu output)
   ======================================== */

/* Footer menu output */
#site-footer .footer-nav {
  margin: 0;
  padding: 0;
  list-style: none;
}
#site-footer .footer-nav > li {
  margin: 0 0 0.75rem;
  padding: 0;
  list-style: none;
}
#site-footer .footer-nav > li:last-child {
  margin-bottom: 0;
}
#site-footer .footer-nav > li > a {
  display: inline-block;
  color: #9ca3af !important;
  font-size: 0.875rem !important;
  font-weight: 400 !important;
  line-height: 1.25rem !important;
  text-decoration: none !important;
  opacity: 1 !important;
  visibility: visible !important;
  transition: color 0.2s ease;
}
#site-footer .footer-nav > li > a:hover,
#site-footer .footer-nav > li > a:focus-visible,
#site-footer .footer-nav > .current-menu-item > a {
  color: #ffffff !important;
}

/* Desktop nav link styling */
.primary-nav a,
.mobile-nav a {
  font-size: 0.875rem;
  font-weight: 500;
  color: #4b5563;
  text-decoration: none;
  transition: color 0.2s ease;
}
.primary-nav a:hover,
.mobile-nav a:hover,
.primary-nav .current-menu-item > a,
.mobile-nav .current-menu-item > a {
  color: #1463f7;
}
.primary-nav li,
.mobile-nav li {
  list-style: none;
}

.primary-nav .menu-item-has-children {
  position: relative;
}
.primary-nav .submenu-toggle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 1.75rem;
  height: 1.75rem;
  flex: 0 0 auto;
  color: #6b7280;
  cursor: pointer;
}
.primary-nav > ul > .menu-item-has-children {
  display: flex;
  align-items: center;
  gap: 0.25rem;
}
.primary-nav .desktop-submenu li > a {
  display: flex;
  align-items: center;
  min-height: 2.25rem;
  white-space: nowrap;
}
.primary-nav .desktop-submenu .menu-item-has-children {
  display: flex;
  align-items: center;
}
.primary-nav .desktop-submenu .menu-item-has-children > a {
  flex: 1 1 auto;
  width: 100%;
  min-width: 0;
  padding-right: 2.5rem;
}
.primary-nav .desktop-submenu .menu-item-has-children > .submenu-toggle {
  position: relative;
  z-index: 1;
  margin-left: -2.25rem;
}

.primary-nav .desktop-submenu {
  display: none;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transform: translateY(8px);
  transition: opacity 0.18s ease, transform 0.18s ease, visibility 0.18s ease;
}
.primary-nav .menu-item-has-children:hover > .desktop-submenu,
.primary-nav .menu-item-has-children:focus-within > .desktop-submenu,
.primary-nav .desktop-submenu.open {
  display: block;
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
  transform: translateY(0);
}
.primary-nav .menu-item-has-children .menu-item-has-children > .desktop-submenu {
  transform: translateX(8px);
}
.primary-nav .menu-item-has-children .menu-item-has-children:hover > .desktop-submenu,
.primary-nav .menu-item-has-children .menu-item-has-children:focus-within > .desktop-submenu,
.primary-nav .menu-item-has-children .menu-item-has-children > .desktop-submenu.open {
  transform: translateX(0);
}

/* Mobile nav wrapper */
.mobile-nav-wrapper {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.3s ease;
}
.mobile-nav-wrapper.open {
  max-height: calc(100vh - 4rem);
  overflow-y: auto;
  overscroll-behavior: contain;
}
#mobileMenu a:hover,
#mobileMenu .current-menu-item > a {
  color: #1463f7;
  background: #eef5ff;
}
#mobileMenu .menu-item-has-children {
  position: relative;
}
#mobileMenu .menu-item-has-children > a {
  padding-right: 3rem;
}
#mobileMenu .submenu-toggle {
  position: absolute;
  top: 0.375rem;
  right: 0.25rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2rem;
  height: 2rem;
  color: #6b7280;
  border-radius: 0.5rem;
  transition: background 0.2s ease, color 0.2s ease, transform 0.2s ease;
}
#mobileMenu .submenu-toggle:hover {
  color: #1463f7;
  background: #eef5ff;
}
#mobileMenu .submenu-toggle[aria-expanded="true"] {
  color: #1463f7;
  transform: rotate(180deg);
}
#mobileMenu .menu-item-has-children > ul {
  max-height: 0;
  overflow: hidden;
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
  transform: none;
  transition: max-height 0.25s ease;
}
#mobileMenu .menu-item-has-children > ul.open {
  max-height: 360px;
}
.pixaquant-hp {
  position: absolute;
  left: -9999px;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

/* ========================================
   HERO CODE BLOCK
   ======================================== */

.code-line {
  opacity: 0;
  animation: codeReveal 0.4s ease forwards;
}
@keyframes codeReveal {
  to { opacity: 1; }
}
.code-line:nth-child(1) { animation-delay: 0.3s; }
.code-line:nth-child(2) { animation-delay: 0.5s; }
.code-line:nth-child(3) { animation-delay: 0.7s; }
.code-line:nth-child(4) { animation-delay: 0.9s; }
.code-line:nth-child(5) { animation-delay: 1.1s; }
.code-line:nth-child(6) { animation-delay: 1.3s; }
.code-line:nth-child(7) { animation-delay: 1.5s; }
.code-line:nth-child(8) { animation-delay: 1.7s; }

/* ========================================
   PROCESS CONNECTOR
   ======================================== */

.process-connector {
  position: absolute;
  top: 28px;
  left: calc(50% + 28px);
  width: calc(100% - 56px);
  height: 2px;
  background: linear-gradient(90deg, #1463f7, #58c4ff);
  opacity: 0.3;
}

/* ========================================
   FAQ ACCORDION
   ======================================== */

.faq-answer {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.3s ease, padding 0.3s ease;
}
.faq-answer.open {
  max-height: 300px;
}
.faq-chevron {
  transition: transform 0.25s ease;
}
.faq-chevron.rotated {
  transform: rotate(180deg);
}

/* ========================================
   SERVICE DETAIL (Services page)
   ======================================== */

.service-detail {
  border-left: 3px solid transparent;
  transition: border-color 0.3s ease;
}
.service-detail:hover {
  border-left-color: #1463f7;
}

/* ========================================
   CONTACT FORM
   ======================================== */

.form-input {
  width: 100%;
  padding: 0.625rem 0.875rem;
  font-size: 0.875rem;
  color: #1f2937;
  background: #ffffff;
  border: 1.5px solid #e5e7eb;
  border-radius: 0.625rem;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
  font-family: inherit;
}
.form-input:hover { border-color: #d1d5db; }
.form-input:focus {
  border-color: #1463f7;
  box-shadow: 0 0 0 3px rgba(20, 99, 247, 0.08);
  outline: none;
}
.form-input::placeholder { color: #9ca3af; }
.form-input.error { border-color: #ef4444; }
.form-input.error:focus { box-shadow: 0 0 0 3px rgba(239, 68, 68, 0.08); }

.form-label {
  display: block;
  font-size: 0.8125rem;
  font-weight: 500;
  color: #374151;
  margin-bottom: 0.375rem;
}
.form-label .required { color: #ef4444; margin-left: 2px; }

.error-text {
  font-size: 0.75rem;
  color: #ef4444;
  margin-top: 0.25rem;
  display: none;
}
.error-text.show { display: block; }

/* Toast */
.toast {
  position: fixed;
  bottom: 24px;
  right: 24px;
  padding: 14px 20px;
  border-radius: 12px;
  font-size: 0.875rem;
  font-weight: 500;
  box-shadow: 0 10px 40px -8px rgba(0,0,0,0.15);
  transform: translateY(100px);
  opacity: 0;
  transition: transform 0.3s ease, opacity 0.3s ease;
  z-index: 100;
  display: flex;
  align-items: center;
  gap: 10px;
}
.toast.show { transform: translateY(0); opacity: 1; }
.toast.success { background: #065f46; color: #fff; }
.toast.error { background: #991b1b; color: #fff; }

/* ========================================
   FOCUS & ACCESSIBILITY
   ======================================== */

a:focus-visible,
button:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible {
  outline: 2px solid #1463f7;
  outline-offset: 2px;
  border-radius: 4px;
}

/* Skip to content (screen readers) */
.skip-link {
  position: absolute;
  top: -100%;
  left: 0;
  background: #1463f7;
  color: #fff;
  padding: 0.5rem 1rem;
  z-index: 9999;
  font-size: 0.875rem;
  text-decoration: none;
}
.skip-link:focus {
  top: 0;
}

/* ========================================
   WORDPRESS ALIGNMENT CLASSES
   ======================================== */

.alignleft { float: left; margin-right: 1.5rem; margin-bottom: 1.5rem; }
.alignright { float: right; margin-left: 1.5rem; margin-bottom: 1.5rem; }
.aligncenter { clear: both; display: block; margin-left: auto; margin-right: auto; margin-bottom: 1.5rem; }
.alignwide { max-width: 80rem; margin-left: auto; margin-right: auto; }
.alignfull { width: 100vw; max-width: 100vw; margin-left: calc(-50vw + 50%); }

.wp-caption { margin-bottom: 1.5rem; max-width: 100%; }
.wp-caption-text { font-size: 0.8125rem; color: #6b7280; margin-top: 0.5rem; }

/* ========================================
   GENERIC PAGE CONTENT
   ======================================== */

.page-content h1, .page-content h2, .page-content h3, .page-content h4, .page-content h5, .page-content h6, .entry-content h1, .entry-content h2, .entry-content h3, .entry-content h4, .entry-content h5, .entry-content h6 {
  color: #111827;
  font-weight: 600;
  line-height: 1.3;
  margin-top: 2rem;
  margin-bottom: 0.75rem;
}
.page-content h1, .entry-content h1 { font-size: 2.25rem; }
.page-content h2, .entry-content h2 { font-size: 1.875rem; }
.page-content h3, .entry-content h3 { font-size: 1.5rem; }
.page-content h4, .entry-content h4 { font-size: 1.125rem; }

.page-content p, .entry-content p {
  margin-bottom: 1.25rem;
  line-height: 1.75;
  color: #4b5563;
}

.page-content ul, .page-content ol, .entry-content ul, .entry-content ol {
  margin-bottom: 1.25rem;
  padding-left: 1.5rem;
  color: #4b5563;
}
.page-content li, .entry-content li {
  margin-bottom: 0.375rem;
  line-height: 1.75;
}

.page-content a, .entry-content a {
  color: #1463f7;
  text-decoration: underline;
  text-underline-offset: 2px;
}
.page-content a:hover, .entry-content a:hover { color: #0d4fd4; }

.page-content img, .entry-content img {
  border-radius: 1rem;
  margin: 1.5rem 0;
}

.page-content blockquote, .entry-content blockquote {
  border-left: 3px solid #1463f7;
  padding-left: 1.25rem;
  margin: 1.5rem 0;
  font-style: italic;
  color: #6b7280;
}

.page-content pre, .entry-content pre {
  background: #1f2937;
  color: #e5e7eb;
  padding: 1.25rem;
  border-radius: 0.75rem;
  overflow-x: auto;
  margin: 1.5rem 0;
  font-size: 0.875rem;
  line-height: 1.7;
}

.page-content code, .entry-content code {
  background: #f3f4f6;
  padding: 0.125rem 0.375rem;
  border-radius: 0.25rem;
  font-size: 0.875em;
}
.page-content pre code, .entry-content pre code {
  background: none;
  padding: 0;
}

/* ========================================
   BLOG / SINGLE POST
   ======================================== */

.entry-meta {
  font-size: 0.8125rem;
  color: #9ca3af;
  margin-bottom: 1.5rem;
}
.entry-meta a {
  color: #6b7280;
  text-decoration: none;
}
.entry-meta a:hover { color: #1463f7; }

.post-navigation {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  padding-top: 2rem;
  margin-top: 3rem;
  border-top: 1px solid #f3f4f6;
}
.post-navigation a {
  font-size: 0.875rem;
  font-weight: 500;
  color: #374151;
  text-decoration: none;
  transition: color 0.2s ease;
}
.post-navigation a:hover { color: #1463f7; }

/* ========================================
   COMMENTS
   ======================================== */

.comment-list { list-style: none; padding: 0; margin: 0; }
.comment-list .children { margin-left: 3rem; margin-top: 1rem; list-style: none; padding: 0; }
.comment-list .children li { margin-bottom: 0.75rem; }
.comment-list .reply { margin-top: 0.5rem; }
.comment-list .reply a {
  font-size: 0.8125rem;
  font-weight: 500;
  color: #1463f7;
  text-decoration: none;
}
.comment-list .reply a:hover { text-decoration: underline; }
.comment-respond { margin-top: 2rem; }
.comment-form .form-input { width: 100%; }

/* ========================================
   SEARCH FORM
   ======================================== */

.search-form input[type="search"] { padding-right: 3rem; }

/* ========================================
   SHARE BUTTONS
   ======================================== */

.share-buttons a:focus-visible { outline: 2px solid #1463f7; outline-offset: 2px; }

/* ========================================
   READING TIME
   ======================================== */

.reading-time { display: inline-flex; align-items: center; gap: 0.25rem; }

/* ========================================
   PAGINATION
   ======================================== */

.nav-links {
  display: flex;
  align-items: center;
  gap: 0.375rem;
  flex-wrap: wrap;
  justify-content: center;
}
.nav-links .page-numbers {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 2.25rem;
  height: 2.25rem;
  padding: 0 0.5rem;
  font-size: 0.8125rem;
  font-weight: 500;
  color: #6b7280;
  text-decoration: none;
  border-radius: 0.5rem;
  transition: all 0.2s ease;
}
.nav-links .page-numbers:hover {
  color: #1463f7;
  background: #eef5ff;
}
.nav-links .page-numbers.current {
  color: #fff;
  background: #1463f7;
}
.nav-links .page-numbers.dots {
  color: #9ca3af;
  pointer-events: none;
}
.nav-links .page-numbers.next,
.nav-links .page-numbers.prev {
  font-weight: 600;
}

/* ========================================
   SIDEBAR WIDGETS
   ======================================== */

.widget {
  padding: 1.25rem;
  background: #f9fafb;
  border-radius: 1rem;
  border: 1px solid #f3f4f6;
}
.widget-title {
  font-size: 0.8125rem;
  font-weight: 600;
  color: #111827;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 1rem;
}

/* Search widget */
.widget_search .search-form { position: relative; }
.widget_search .search-form input[type="search"] {
  width: 100%;
  padding: 0.625rem 0.875rem;
  padding-right: 2.75rem;
  font-size: 0.8125rem;
  color: #1f2937;
  background: #fff;
  border: 1.5px solid #e5e7eb;
  border-radius: 0.625rem;
  font-family: inherit;
}
.widget_search .search-form input[type="search"]:focus {
  border-color: #1463f7;
  box-shadow: 0 0 0 3px rgba(20,99,247,0.08);
  outline: none;
}
.widget_search .search-form button[type="submit"] {
  position: absolute;
  right: 0.5rem;
  top: 50%;
  transform: translateY(-50%);
  background: none;
  border: none;
  padding: 0.375rem;
  color: #9ca3af;
  cursor: pointer;
}
.widget_search .search-form button[type="submit"]:hover { color: #1463f7; }

/* List widgets (categories, archives, recent posts, pages, meta) */
.widget ul {
  list-style: none;
  padding: 0;
  margin: 0;
}
.widget ul li {
  padding: 0.5rem 0;
  border-bottom: 1px solid #f3f4f6;
  font-size: 0.8125rem;
}
.widget ul li:last-child { border-bottom: none; }
.widget ul li a {
  color: #4b5563;
  text-decoration: none;
  transition: color 0.2s ease;
}
.widget ul li a:hover { color: #1463f7; }
.widget ul li .post-date {
  display: block;
  font-size: 0.6875rem;
  color: #9ca3af;
  margin-top: 0.125rem;
}

/* Tag cloud */
.widget_tag_cloud .tagcloud {
  display: flex;
  flex-wrap: wrap;
  gap: 0.375rem;
}
.widget_tag_cloud .tagcloud a {
  display: inline-block;
  font-size: 0.6875rem !important;
  font-weight: 500;
  color: #6b7280;
  background: #fff;
  border: 1px solid #e5e7eb;
  padding: 0.25rem 0.625rem;
  border-radius: 9999px;
  text-decoration: none;
  transition: all 0.2s ease;
}
.widget_tag_cloud .tagcloud a:hover {
  color: #1463f7;
  background: #eef5ff;
  border-color: #d9e8ff;
}

/* Text widget */
.widget_text .textwidget {
  font-size: 0.8125rem;
  color: #6b7280;
  line-height: 1.625;
}

/* Calendar widget */
.widget_calendar table {
  width: 100%;
  font-size: 0.75rem;
  text-align: center;
}
.widget_calendar caption {
  font-weight: 600;
  margin-bottom: 0.5rem;
  font-size: 0.8125rem;
}
.widget_calendar th,
.widget_calendar td {
  padding: 0.375rem 0.25rem;
}
.widget_calendar td a {
  color: #1463f7;
  font-weight: 600;
  text-decoration: none;
}

/* Recent comments */
.widget_recent_comments .recentcomments {
  font-size: 0.8125rem;
  color: #4b5563;
}
.widget_recent_comments .recentcomments a { color: #1463f7; }

/* Select dropdown (for archive/category dropdowns) */
.widget select {
  width: 100%;
  padding: 0.5rem 0.75rem;
  font-size: 0.8125rem;
  border: 1.5px solid #e5e7eb;
  border-radius: 0.5rem;
  background: #fff;
  color: #1f2937;
  font-family: inherit;
}

/* Keep long post titles on their own breadcrumb row on mobile. */
@media (max-width: 767px) {
  .pixaquant-breadcrumb ol {
    flex-wrap: wrap;
  }

  .pixaquant-breadcrumb ol > li:last-child:nth-child(n+7) {
    flex-basis: 100%;
  }
}
