/*
Theme Name: LogicX WP Theme v2
Author: LogicX
Description: LogicX WP Theme with 1280px full-width header/footer layout, refined navigation, and modern spacing. Based on LogicX WP Theme v1.
Version: 2.0.0
Requires at least: 6.0
Tested up to: 6.5
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: novapress
Tags: full-site-editing, blog, portfolio, business, custom-colors, custom-menu, featured-images, responsive-layout, rtl-language-support, translation-ready
*/

/* ============================================================
   CSS CUSTOM PROPERTIES — PURPLE + NEUTRAL PALETTE
   ============================================================ */
:root {
  /* Purple ramp */
  --p50:  #EEEDFE;
  --p100: #CECBF6;
  --p200: #AFA9EC;
  --p400: #7F77DD;
  --p600: #534AB7;
  --p800: #3C3489;
  --p900: #26215C;

  /* Neutral warm ramp */
  --n50:  #F8F7F5;
  --n100: #EFEDE8;
  --n200: #D3D1C7;
  --n400: #888780;
  --n600: #5F5E5A;
  --n800: #2C2C2A;

  /* White */
  --white: #FFFFFF;

  /* Typography */
  --font-sans: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --font-serif: 'Georgia', 'Times New Roman', serif;

  /* Radii */
  --radius-sm: 4px;
  --radius-md: 8px;
  --radius-lg: 12px;
  --radius-xl: 16px;

  /* Shadows */
  --shadow-sm: 0 1px 4px rgba(83,74,183,0.08);
  --shadow-md: 0 4px 20px rgba(83,74,183,0.12);
  --shadow-lg: 0 12px 40px rgba(83,74,183,0.15);

  /* Transitions */
  --trans: 0.2s ease;

  /* Layout — v2 */
  --layout-max: 1280px;
  --layout-gutter: 32px;
  --header-height: 72px;
}

/* ============================================================
   RESET & BASE
   ============================================================ */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: smooth; }

body {
  font-family: var(--font-sans);
  font-size: 16px;
  line-height: 1.7;
  color: var(--n800);
  background: var(--white);
  -webkit-font-smoothing: antialiased;
}

img { max-width: 100%; height: auto; display: block; }
a { color: var(--p600); text-decoration: none; transition: color var(--trans); }
a:hover { color: var(--p800); }
ul { list-style: none; }

h1, h2, h3, h4, h5, h6 {
  font-weight: 700;
  line-height: 1.2;
  color: var(--p900);
}

/* ============================================================
   UTILITY CLASSES
   ============================================================ */
.container {
  width: 100%;
  max-width: var(--layout-max);
  margin: 0 auto;
  padding: 0 var(--layout-gutter);
}
.section-label {
  font-size: 12px; font-weight: 700; letter-spacing: 1.5px;
  color: var(--p600); text-transform: uppercase;
  text-align: center; margin-bottom: 8px;
}
.section-title {
  font-size: 30px; font-weight: 800; color: var(--p900);
  text-align: center; margin-bottom: 8px; letter-spacing: -0.5px;
}
.section-sub {
  font-size: 15px; color: var(--n600);
  text-align: center; margin-bottom: 44px;
}

/* ============================================================
   SKIP LINK (ACCESSIBILITY)
   ============================================================ */
.skip-link {
  position: absolute; top: -40px; left: 0;
  background: var(--p600); color: #fff;
  padding: 8px 16px; z-index: 9999;
  border-radius: 0 0 var(--radius-md) 0;
  transition: top var(--trans);
}
.skip-link:focus { top: 0; }

/* ============================================================
   NAVBAR
   ============================================================ */
.site-header {
  width: 100%;
  background: rgba(255,255,255,0.92);
  border-bottom: 1px solid rgba(83,74,183,0.08);
  position: sticky; top: 0; z-index: 1000;
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  box-shadow: 0 1px 0 rgba(38,33,92,0.04), 0 4px 24px rgba(83,74,183,0.06);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 28px;
  min-height: var(--header-height);
}

/* Logo */
.site-branding { display: flex; align-items: center; gap: 9px; flex-shrink: 0; }
.logo-mark {
  width: 34px; height: 34px; border-radius: var(--radius-md);
  background: var(--p600); display: flex; align-items: center;
  justify-content: center; flex-shrink: 0;
}
.logo-mark svg { width: 18px; height: 18px; fill: #fff; }
.site-title {
  font-size: 18px; font-weight: 800; color: var(--p900);
  letter-spacing: -0.3px; white-space: nowrap;
}
.site-title span { color: var(--p600); }

/* Primary Navigation */
.primary-nav {
  flex: 1;
  display: flex;
  justify-content: center;
  min-width: 0;
}
.nav-menu { display: flex; align-items: center; justify-content: center; flex-wrap: wrap; }
.nav-menu > li { position: relative; }
.nav-menu > li > a {
  display: flex; align-items: center; gap: 4px;
  padding: 0 16px; height: var(--header-height);
  color: var(--n600); font-size: 13.5px; font-weight: 500;
  transition: color var(--trans); white-space: nowrap;
}
.nav-menu > li > a:hover,
.nav-menu > li:focus-within > a { color: var(--p600); }

/* Dropdown arrow */
.nav-menu > li > a .menu-arrow {
  font-size: 10px; color: var(--n400);
  transition: transform var(--trans);
  margin-left: 2px;
}
.nav-menu > li:hover > a .menu-arrow,
.nav-menu > li:focus-within > a .menu-arrow { transform: rotate(180deg); color: var(--p600); }

/* Level-1 dropdown */
.sub-menu {
  display: none; position: absolute; top: calc(100% + 4px); left: 0;
  background: var(--white); border: 1px solid rgba(83,74,183,0.1);
  border-top: 2.5px solid var(--p600);
  border-radius: var(--radius-lg);
  min-width: 220px; box-shadow: var(--shadow-lg);
  z-index: 200;
  padding: 6px 0;
}
.nav-menu > li:hover > .sub-menu,
.nav-menu > li:focus-within > .sub-menu { display: block; }

.sub-menu li { position: relative; }
.sub-menu li a {
  display: flex; align-items: center; justify-content: space-between;
  padding: 10px 16px; color: var(--n600); font-size: 13.5px;
  border-bottom: 1px solid var(--n100);
  transition: background var(--trans), color var(--trans);
}
.sub-menu li:last-child a { border-bottom: none; }
.sub-menu li a:hover { background: var(--p50); color: var(--p800); }

/* Level-2 sub-dropdown */
.sub-menu .sub-menu {
  top: 0; left: 100%; border-top: none;
  border-left: 2.5px solid var(--p400);
  border-radius: 0 var(--radius-lg) var(--radius-lg) 0;
  box-shadow: 6px 0 24px rgba(83,74,183,0.10);
}
.sub-menu li:hover > .sub-menu,
.sub-menu li:focus-within > .sub-menu { display: block; }

/* Header actions */
.header-actions { display: flex; align-items: center; gap: 10px; flex-shrink: 0; }

.search-form {
  display: flex; align-items: center;
  background: var(--n50); border: 1px solid var(--n200);
  border-radius: var(--radius-md); overflow: hidden;
  transition: border-color var(--trans);
}
.search-form:focus-within { border-color: var(--p400); }
.search-form input[type="search"] {
  background: none; border: none; outline: none;
  color: var(--n800); padding: 7px 12px; font-size: 13px; width: 170px;
}
.search-form input[type="search"]::placeholder { color: var(--n400); }
.search-form button[type="submit"] {
  background: var(--p600); border: none; padding: 0 12px; height: 34px;
  cursor: pointer; display: flex; align-items: center; justify-content: center;
  transition: background var(--trans);
}
.search-form button[type="submit"]:hover { background: var(--p800); }
.search-form button[type="submit"] svg { width: 15px; height: 15px; fill: #fff; }

.btn-cta {
  background: var(--p600); color: #fff; border: none;
  padding: 9px 20px; font-size: 13.5px; font-weight: 600;
  border-radius: var(--radius-md); cursor: pointer;
  white-space: nowrap; transition: background var(--trans);
}
.btn-cta:hover { background: var(--p800); color: #fff; }

/* Mobile toggle */
.menu-toggle {
  display: none; background: none; border: none; cursor: pointer;
  padding: 6px; color: var(--p900);
}
.menu-toggle svg { width: 24px; height: 24px; fill: currentColor; }

/* ============================================================
   HERO — 3-stop gradient
   ============================================================ */
.hero-section {
  background: linear-gradient(135deg, var(--p900) 0%, var(--p600) 48%, #B8B0E8 100%);
  padding: 80px var(--layout-gutter) 90px;
  text-align: center;
}
.hero-badge {
  display: inline-flex; align-items: center; gap: 6px;
  background: rgba(255,255,255,0.12); border: 1px solid rgba(255,255,255,0.25);
  border-radius: 20px; padding: 5px 16px;
  font-size: 12px; color: var(--p100); margin-bottom: 24px;
  letter-spacing: 0.5px;
}
.hero-title {
  font-size: clamp(34px, 5vw, 52px); font-weight: 800; color: #fff;
  line-height: 1.15; letter-spacing: -1px; margin-bottom: 18px;
}
.hero-title em { color: var(--p100); font-style: normal; }
.hero-description {
  color: var(--p100); font-size: 17px; max-width: 520px;
  margin: 0 auto 36px; line-height: 1.75; opacity: 0.92;
}
.hero-buttons { display: flex; gap: 14px; justify-content: center; flex-wrap: wrap; }

.btn-hero-primary {
  background: #fff; color: var(--p800); border: none;
  padding: 14px 30px; font-size: 15px; font-weight: 700;
  border-radius: var(--radius-md); cursor: pointer;
  transition: transform var(--trans), box-shadow var(--trans);
}
.btn-hero-primary:hover { transform: translateY(-1px); box-shadow: var(--shadow-lg); color: var(--p900); }

.btn-hero-outline {
  background: transparent; color: #fff;
  border: 1.5px solid rgba(255,255,255,0.55);
  padding: 14px 30px; font-size: 15px; font-weight: 500;
  border-radius: var(--radius-md); cursor: pointer;
  transition: background var(--trans), border-color var(--trans);
}
.btn-hero-outline:hover { background: rgba(255,255,255,0.1); border-color: rgba(255,255,255,0.8); color: #fff; }

.hero-stats {
  display: flex; justify-content: center; gap: 48px; flex-wrap: wrap;
  margin-top: 56px; padding-top: 44px;
  border-top: 1px solid rgba(255,255,255,0.15);
}
.hero-stat { text-align: center; }
.hero-stat-num { font-size: 30px; font-weight: 800; color: #fff; }
.hero-stat-label { font-size: 12px; color: var(--p100); opacity: 0.82; margin-top: 3px; letter-spacing: 0.3px; }

/* ============================================================
   FEATURES — Warm neutral bg
   ============================================================ */
.features-section { background: var(--n50); padding: 72px var(--layout-gutter); }
.features-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 22px;
}
.feature-card {
  background: var(--white); border: 1px solid var(--p100);
  border-radius: var(--radius-lg); padding: 26px 24px;
  transition: border-color var(--trans), box-shadow var(--trans);
}
.feature-card:hover { border-color: var(--p400); box-shadow: var(--shadow-md); }
.feature-icon {
  width: 46px; height: 46px; border-radius: var(--radius-md);
  background: var(--p50); display: flex; align-items: center;
  justify-content: center; margin-bottom: 18px;
}
.feature-icon svg { width: 22px; height: 22px; fill: var(--p600); }
.feature-title { font-size: 15px; font-weight: 700; color: var(--p900); margin-bottom: 8px; }
.feature-text { font-size: 13.5px; color: var(--n600); line-height: 1.65; }

/* ============================================================
   SERVICES — Deep purple bg
   ============================================================ */
.services-section { background: var(--p900); padding: 72px var(--layout-gutter); }
.services-section .section-label { color: var(--p200); }
.services-section .section-title { color: #fff; }
.services-section .section-sub { color: var(--p200); }

.services-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 18px;
}
.service-card {
  background: rgba(255,255,255,0.06); border: 1px solid rgba(255,255,255,0.1);
  border-radius: var(--radius-lg); padding: 28px 24px; cursor: pointer;
  transition: background var(--trans), border-color var(--trans);
}
.service-card:hover { background: rgba(255,255,255,0.11); border-color: var(--p400); }
.service-num { font-size: 11px; font-weight: 700; letter-spacing: 1px; color: var(--p400); margin-bottom: 14px; }
.service-title { font-size: 16px; font-weight: 700; color: #fff; margin-bottom: 10px; }
.service-text { font-size: 13.5px; color: var(--p200); line-height: 1.65; }
.service-link {
  display: inline-flex; align-items: center; gap: 6px;
  margin-top: 16px; font-size: 13px; color: var(--p400);
  font-weight: 600; transition: color var(--trans);
}
.service-link:hover { color: var(--p200); }
.service-link svg { width: 14px; height: 14px; fill: currentColor; }

/* ============================================================
   TESTIMONIALS — Soft neutral bg
   ============================================================ */
.testimonials-section { background: var(--n100); padding: 72px var(--layout-gutter); }
.testimonials-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 22px;
}
.testimonial-card {
  background: var(--white); border: 1px solid var(--n200);
  border-radius: var(--radius-lg); padding: 26px 22px;
}
.testimonial-stars { display: flex; gap: 3px; margin-bottom: 14px; }
.testimonial-stars svg { width: 15px; height: 15px; fill: var(--p400); }
.testimonial-text {
  font-size: 13.5px; color: var(--n600); line-height: 1.75;
  margin-bottom: 18px; font-style: italic;
}
.testimonial-author { display: flex; align-items: center; gap: 12px; }
.testimonial-avatar {
  width: 38px; height: 38px; border-radius: 50%;
  background: var(--p100); display: flex; align-items: center; justify-content: center;
  font-size: 12px; font-weight: 700; color: var(--p800); flex-shrink: 0;
}
.testimonial-name { font-size: 13.5px; font-weight: 700; color: var(--p900); }
.testimonial-role { font-size: 12px; color: var(--n400); }

/* ============================================================
   CTA BAND
   ============================================================ */
.cta-section {
  background: linear-gradient(90deg, var(--p800) 0%, var(--p600) 100%);
  padding: 60px var(--layout-gutter); text-align: center;
}
.cta-section h2 { font-size: 30px; font-weight: 800; color: #fff; margin-bottom: 12px; }
.cta-section p { color: var(--p100); font-size: 16px; margin-bottom: 30px; max-width: 480px; margin-left: auto; margin-right: auto; }
.cta-buttons { display: flex; gap: 14px; justify-content: center; flex-wrap: wrap; }
.btn-white {
  background: #fff; color: var(--p800); border: none;
  padding: 13px 28px; font-size: 14px; font-weight: 700;
  border-radius: var(--radius-md); cursor: pointer;
  transition: transform var(--trans);
}
.btn-white:hover { transform: translateY(-1px); color: var(--p900); }
.btn-ghost-white {
  background: transparent; color: #fff;
  border: 1.5px solid rgba(255,255,255,0.45);
  padding: 13px 28px; font-size: 14px; font-weight: 500;
  border-radius: var(--radius-md); cursor: pointer;
  transition: background var(--trans);
}
.btn-ghost-white:hover { background: rgba(255,255,255,0.12); color: #fff; }

/* ============================================================
   FOOTER
   ============================================================ */
.site-footer {
  width: 100%;
  background: var(--n800);
  padding: 0;
  position: relative;
}
.site-footer::before {
  content: '';
  display: block;
  height: 3px;
  background: linear-gradient(90deg, var(--p600) 0%, var(--p400) 50%, transparent 100%);
}
.site-footer > .container {
  padding-top: 56px;
  padding-bottom: 28px;
}
.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: 40px 48px;
  margin-bottom: 44px;
}
.footer-brand .site-title { color: #fff; }
.footer-description { font-size: 13px; color: var(--n400); margin-top: 12px; line-height: 1.7; max-width: 280px; }
.footer-widget h4 {
  font-size: 11px; font-weight: 700; letter-spacing: 1.2px;
  color: var(--n400); text-transform: uppercase; margin-bottom: 16px;
}
.footer-widget ul li { margin-bottom: 10px; }
.footer-widget ul li a { font-size: 13.5px; color: var(--n400); transition: color var(--trans); }
.footer-widget ul li a:hover { color: var(--p200); }
.footer-bottom {
  border-top: 1px solid rgba(255,255,255,0.08); padding-top: 22px;
  display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 12px;
}
.footer-copy { font-size: 12.5px; color: var(--n400); }
.footer-socials { display: flex; gap: 16px; }
.footer-socials a { color: var(--n400); font-size: 18px; transition: color var(--trans); }
.footer-socials a:hover { color: var(--p200); }

/* ============================================================
   WORDPRESS CORE CLASSES
   ============================================================ */
.alignleft { float: left; margin: 0 1.5rem 1rem 0; }
.alignright { float: right; margin: 0 0 1rem 1.5rem; }
.aligncenter { display: block; margin: 0 auto 1rem; }
.wp-caption { max-width: 100%; }
.wp-caption-text { font-size: 12px; color: var(--n400); text-align: center; margin-top: 4px; }
.screen-reader-text {
  clip: rect(1px,1px,1px,1px); position: absolute;
  height: 1px; width: 1px; overflow: hidden;
}

/* ============================================================
   SINGLE POST / PAGE CONTENT
   ============================================================ */
.entry-content {
  max-width: 720px; margin: 48px auto; padding: 0 var(--layout-gutter);
}
.entry-content h1 { font-size: 36px; margin-bottom: 20px; }
.entry-content h2 { font-size: 26px; margin: 36px 0 14px; }
.entry-content h3 { font-size: 20px; margin: 28px 0 10px; }
.entry-content p { margin-bottom: 18px; color: var(--n600); }
.entry-content ul, .entry-content ol { padding-left: 22px; margin-bottom: 18px; color: var(--n600); }
.entry-content li { margin-bottom: 8px; }
.entry-content blockquote {
  border-left: 3px solid var(--p600); padding: 12px 20px;
  margin: 24px 0; background: var(--p50);
  border-radius: 0 var(--radius-md) var(--radius-md) 0;
  font-style: italic; color: var(--p800);
}
.entry-content code {
  background: var(--n100); padding: 2px 7px;
  border-radius: var(--radius-sm); font-size: 14px; font-family: monospace;
}
.entry-content pre {
  background: var(--n800); color: var(--n100); padding: 20px;
  border-radius: var(--radius-md); overflow-x: auto; margin-bottom: 20px;
}

/* ============================================================
   BLOG ARCHIVE
   ============================================================ */
.blog-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 24px; padding: 48px var(--layout-gutter); max-width: var(--layout-max); margin: 0 auto;
}
.post-card {
  background: var(--white); border: 1px solid var(--p100);
  border-radius: var(--radius-lg); overflow: hidden;
  transition: box-shadow var(--trans), border-color var(--trans);
}
.post-card:hover { box-shadow: var(--shadow-md); border-color: var(--p400); }
.post-thumbnail img { width: 100%; height: 200px; object-fit: cover; }
.post-card-body { padding: 20px 22px; }
.post-category {
  font-size: 11px; font-weight: 700; letter-spacing: 1px;
  color: var(--p600); text-transform: uppercase; margin-bottom: 8px;
}
.post-card-title { font-size: 17px; font-weight: 700; color: var(--p900); margin-bottom: 10px; line-height: 1.4; }
.post-card-title a { color: inherit; }
.post-card-title a:hover { color: var(--p600); }
.post-excerpt { font-size: 13.5px; color: var(--n600); line-height: 1.65; margin-bottom: 16px; }
.read-more { font-size: 13px; font-weight: 600; color: var(--p600); }

/* ============================================================
   PAGINATION
   ============================================================ */
.pagination { display: flex; justify-content: center; gap: 8px; padding: 40px 0; }
.pagination a, .pagination span {
  display: flex; align-items: center; justify-content: center;
  width: 38px; height: 38px; border-radius: var(--radius-md);
  font-size: 14px; font-weight: 500; color: var(--n600);
  border: 1px solid var(--n200); transition: all var(--trans);
}
.pagination a:hover { background: var(--p50); border-color: var(--p400); color: var(--p600); }
.pagination .current { background: var(--p600); color: #fff; border-color: var(--p600); }

/* ============================================================
   FORMS
   ============================================================ */
.wp-form input[type="text"],
.wp-form input[type="email"],
.wp-form input[type="tel"],
.wp-form textarea,
.wp-form select {
  width: 100%; padding: 10px 14px; border: 1px solid var(--n200);
  border-radius: var(--radius-md); font-size: 14px; color: var(--n800);
  background: var(--white); outline: none; transition: border-color var(--trans);
  font-family: var(--font-sans);
}
.wp-form input:focus, .wp-form textarea:focus, .wp-form select:focus {
  border-color: var(--p400);
  box-shadow: 0 0 0 3px rgba(127,119,221,0.12);
}
.wp-form textarea { resize: vertical; min-height: 130px; }
.wp-form button[type="submit"], .wp-form input[type="submit"] {
  background: var(--p600); color: #fff; border: none;
  padding: 12px 28px; font-size: 14px; font-weight: 600;
  border-radius: var(--radius-md); cursor: pointer;
  transition: background var(--trans);
}
.wp-form button[type="submit"]:hover { background: var(--p800); }

/* ============================================================
   WOOCOMMERCE BASIC OVERRIDES
   ============================================================ */
.woocommerce .button {
  background: var(--p600) !important; color: #fff !important;
  border-radius: var(--radius-md) !important; font-weight: 600 !important;
  transition: background var(--trans) !important;
}
.woocommerce .button:hover { background: var(--p800) !important; }
.woocommerce-message { border-top-color: var(--p600) !important; }
.woocommerce .woocommerce-info { border-top-color: var(--p400) !important; }

/* ============================================================
   RESPONSIVE
   ============================================================ */
@media (max-width: 1024px) {
  .footer-grid { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 768px) {
  .menu-toggle { display: flex; margin-left: auto; }
  .primary-nav { display: none; width: 100%; order: 3; }
  .primary-nav.open { display: block; }
  :root { --layout-gutter: 20px; --header-height: 64px; }
  .header-inner { flex-wrap: wrap; min-height: var(--header-height); }
  .primary-nav { justify-content: flex-start; }
  .nav-menu { flex-direction: column; align-items: stretch; gap: 0; }
  .nav-menu > li > a { height: auto; padding: 12px 0; border-bottom: 1px solid var(--n100); }
  .sub-menu { position: static; box-shadow: none; border: none; border-left: 3px solid var(--p200); padding-left: 12px; }
  .sub-menu .sub-menu { border-left: 3px solid var(--p100); }
  .header-actions { display: none; }
  .hero-section { padding: 56px 20px 64px; }
  .hero-stats { gap: 24px; }
  .footer-grid { grid-template-columns: 1fr; }
  .features-grid, .services-grid, .testimonials-grid { grid-template-columns: 1fr; }
}

@media (max-width: 480px) {
  .hero-title { font-size: 28px; }
  .section-title { font-size: 24px; }
  .cta-section h2 { font-size: 24px; }
}
