/*
Theme Name: Divergence Neuro
Theme URI: https://divergenceneuro.com
Description: A modern WordPress theme for neurofeedback and biofeedback platforms
Version: 1.0
Author: Divergence Neuro
*/

:root {
  --primary: #773DFF;
  --secondary: #FC8AC8;
  --dark: #1E004B;
  --grey: #F1F2F6;
  --white: #ffffff;
  --text: #1a1a2e;
  --text-muted: #6b7280;
  --gradient: linear-gradient(135deg, #773DFF 0%, #FC8AC8 100%);
  --gradient-dark: linear-gradient(135deg, #1E004B 0%, #773DFF 100%);
  --radius: 16px;
  --shadow: 0 20px 60px rgba(119,61,255,0.15);
}

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

body {
  font-family: 'DM Sans', sans-serif;
  background: var(--white);
  color: var(--text);
  overflow-x: hidden;
}

img {
  max-width: 100%;
}

/* WordPress Core Styles */
.alignleft { float: left; margin-right: 1.5rem; }
.alignright { float: right; margin-left: 1.5rem; }
.aligncenter { display: block; margin-left: auto; margin-right: auto; }
.are-vertically-aligned-top { align-items: flex-start; }

/* Navigation */
.site-navigation {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 100;
  padding: 1rem 4%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: rgba(255,255,255,0.96);
  backdrop-filter: blur(20px);
  border-bottom: 1px solid rgba(0,0,0,0.06);
}

.nav-logo { 
  display: flex; 
  align-items: center;
  flex-shrink: 0;
}

.nav-logo a { 
  text-decoration: none; 
  color: var(--dark); 
  font-weight: 700; 
  font-size: 1.2rem; 
}

.header-logo-img {
  max-height: 50px;
  width: auto;
  display: block;
}

.nav-center {
  flex: 1;
  display: flex;
  justify-content: center;
  align-items: center;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 2rem;
  list-style: none;
  margin: 0;
  padding: 0;
}

.nav-links li {
  margin: 0;
  padding: 0;
  position: relative;
}

.nav-links > li {
  display: flex;
  align-items: center;
}

.nav-links a {
  text-decoration: none;
  color: var(--text);
  font-size: 0.9rem;
  font-weight: 500;
  transition: color 0.2s;
  display: block;
  padding: 0.5rem 0;
}

.nav-links > li > a {
  padding: 0.5rem 0.75rem;
  position: relative;
}

.nav-links > li > a::before {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0.75rem;
  right: 0.75rem;
  height: 2px;
  background: var(--secondary);
  transform: scaleX(0);
  transition: transform 0.3s ease;
}

.nav-links > li > a:hover::before,
.nav-links > li.current-menu-item > a::before,
.nav-links > li.current-menu-ancestor > a::before {
  transform: scaleX(1);
}

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

/* Dropdown indicator for parent items */
.nav-links .menu-item-has-children > a::after {
  content: '▾';
  margin-left: 0.4rem;
  font-size: 0.75rem;
  transition: transform 0.2s;
}

.nav-links .menu-item-has-children:hover > a::after {
  transform: rotate(180deg);
}

/* Submenu styles */
.nav-links .sub-menu {
  position: absolute;
  top: 100%;
  left: 0;
  min-width: 220px;
  background: white;
  border-radius: 8px;
  box-shadow: 0 10px 40px rgba(0,0,0,0.15);
  padding: 0.75rem 0;
  margin: 0;
  list-style: none;
  opacity: 0;
  visibility: hidden;
  transform: translateY(-10px);
  transition: all 0.3s ease;
  z-index: 1000;
  border: 1px solid rgba(0,0,0,0.08);
}

.nav-links .menu-item-has-children:hover > .sub-menu {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.nav-links .sub-menu li {
  display: block;
  margin: 0;
  padding: 0;
}

.nav-links .sub-menu a {
  padding: 0.65rem 1.25rem;
  font-size: 0.85rem;
  color: var(--text);
  white-space: nowrap;
  transition: all 0.2s;
}

.nav-links .sub-menu a:hover {
  background: var(--grey);
  color: var(--primary);
  padding-left: 1.5rem;
}

/* Multi-level submenu (nested dropdowns) */
.nav-links .sub-menu .menu-item-has-children {
  position: relative;
}

.nav-links .sub-menu .menu-item-has-children > a::after {
  content: '›';
  margin-left: auto;
  float: right;
  margin-right: -0.5rem;
  font-size: 1rem;
}

.nav-links .sub-menu .sub-menu {
  top: 0;
  left: 100%;
  margin-left: 0.5rem;
}

.nav-links .sub-menu .menu-item-has-children:hover > .sub-menu {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

/* Active menu item */
.nav-links .current-menu-item > a,
.nav-links .current-menu-ancestor > a {
  color: var(--primary);
}

/* Submenu active items */
.nav-links .sub-menu .current-menu-item > a {
  background: rgba(119,61,255,0.08);
  color: var(--primary);
}

.nav-right { 
  display: flex; 
  align-items: center; 
  gap: 1rem;
  flex-shrink: 0;
}

.btn-primary {
  background: var(--gradient);
  color: white !important;
  border: none;
  padding: 0.6rem 1.4rem;
  border-radius: 50px;
  font-family: 'DM Sans', sans-serif;
  font-size: 0.88rem;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.3s;
  text-decoration: none !important;
  display: inline-block;
}

.btn-primary:hover { 
  transform: translateY(-2px); 
  box-shadow: 0 8px 20px rgba(119,61,255,0.35); 
}

.btn-ghost {
  background: transparent;
  color: white !important;
  border: 1px solid rgba(255,255,255,0.3);
  padding: 0.6rem 1.4rem;
  border-radius: 50px;
  font-family: 'DM Sans', sans-serif;
  font-size: 0.88rem;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.3s;
  text-decoration: none !important;
}

.btn-ghost:hover { 
  background: rgba(255,255,255,0.1); 
  border-color: rgba(255,255,255,0.6); 
}

/* Main Content */
.site-content {
  padding: 40px 0 0;
}

/* Full Width Template */
.site-content--full-width {
  max-width: 100%;
  margin: 0;
}

.site-content--full-width .entry-content {
  line-height: 1.8;
  color: var(--text);
}

/* Boxed Template (blog posts) */
.site-content--boxed {
  max-width: 1200px;
  margin: 0 auto;
  padding: 90px 4% 80px;
}

.single .site-content--boxed {
  max-width: 820px;
}

.page-title {
    font-family: 'Roboto', sans-serif;
    font-size: clamp(2.5rem, 5vw, 4rem);
    font-weight: 800;
    line-height: 1.1;
    color: var(--dark);
    margin-bottom: 1.5rem;
}

.page-content {
  padding-top: 40px;
}

.entry-header {
  margin-bottom: 2rem;
}

.entry-title {
  font-family: 'Roboto', sans-serif;
  font-size: clamp(2rem, 4vw, 3rem);
  font-weight: 700;
  color: var(--dark);
  margin-bottom: 0.5rem;
}

.entry-title a {
  color: var(--dark);
  text-decoration: none;
  transition: color 0.2s;
}

.entry-title a:hover {
  color: var(--primary);
}

.entry-meta {
  display: flex;
  gap: 1rem;
  font-size: 0.85rem;
  color: var(--text-muted);
  margin-top: 0.5rem;
}

.entry-thumbnail {
  margin-bottom: 2rem;
  border-radius: var(--radius);
  overflow: hidden;
}

.entry-thumbnail img {
  width: 100%;
  height: auto;
  display: block;
}

.entry-content {
  line-height: 1.8;
  color: var(--text);
}

.entry-content h2,
.entry-content h3,
.entry-content h4 {
  font-family: 'Roboto', sans-serif;
  font-weight: 700;
  color: var(--dark);
  margin-top: 2rem;
  margin-bottom: 1rem;
}

.entry-content p {
  margin-bottom: 1.5rem;
}

.entry-content a {
  color: var(--primary);
  text-decoration: none;
}

.entry-content a:hover {
  text-decoration: underline;
}

.btn-primary a {
  color: unset;
}

.btn-primary a:hover {
  text-decoration: none;
}

/* Blog listing grid */
.blog-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 2rem;
}

.blog-card {
  background: white;
  border-radius: var(--radius);
  overflow: hidden;
  border: 1px solid var(--grey);
  transition: all 0.3s;
  display: flex;
  flex-direction: column;
}

.blog-card:hover {
  box-shadow: 0 14px 35px rgba(0,0,0,0.08);
  transform: translateY(-4px);
}

.blog-card-thumbnail {
  display: block;
  aspect-ratio: 1;
  overflow: hidden;
}

.blog-card-thumbnail img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 0.3s;
}

.blog-card:hover .blog-card-thumbnail img {
  transform: scale(1.05);
}

.blog-card-body {
  padding: 1.25rem;
  display: flex;
  flex-direction: column;
  flex: 1;
}

.blog-card-body .entry-meta {
  margin-bottom: 0.5rem;
}

.blog-card-title {
  font-family: 'Roboto', sans-serif;
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--dark);
  line-height: 1.35;
  margin-bottom: 0.75rem;
}

.blog-card-title a {
  color: var(--dark);
  text-decoration: none;
  transition: color 0.2s;
}

.blog-card-title a:hover {
  color: var(--primary);
}

.blog-card-excerpt {
  color: var(--text-muted);
  font-size: 0.88rem;
  line-height: 1.6;
  flex: 1;
}

.blog-card-excerpt p {
  margin: 0;
}

/* Blog pagination */
.blog-pagination {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 0.5rem;
  margin-top: 3rem;
  flex-wrap: wrap;
}

.blog-pagination .page-numbers {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 40px;
  height: 40px;
  padding: 0 0.75rem;
  border-radius: 8px;
  font-size: 0.88rem;
  font-weight: 500;
  text-decoration: none;
  color: var(--text);
  background: var(--grey);
  transition: all 0.2s;
}

.blog-pagination .page-numbers:hover {
  background: var(--primary);
  color: white;
}

.blog-pagination .page-numbers.current {
  background: var(--primary);
  color: white;
}

.blog-pagination .page-numbers.dots {
  background: transparent;
  pointer-events: none;
}

.blog-pagination .prev,
.blog-pagination .next {
  font-size: 0.85rem;
}

/* SECTION STYLES */
.section {
  padding: 90px 4%;
  margin: 0 auto;
  display: flex;
  justify-content: center;
}

.section-short {
  padding: 45px 4% 10px;
  margin: 0 auto;
  display: flex;
  justify-content: center;
}

.section-nopad {
  padding: 0 4%;
  margin: 0 auto;
  display: flex;
  justify-content: center;
}

.section-stats {
  padding: 1rem;
}

.section-primary {
  background-color: var(--primary);
  color: white;
}

.section-dark {
  background-color: var(--dark);
  color: white;
}

.rounded {
  border-radius: var(--radius);
}

.inner-section {
  max-width: 1200px;
}

.testimonials-section {
  gap: 1.5rem;
}

.center {
  text-align: center;
}

.vertical-center {
  align-items: center !important;
}

.section-label {
  font-family: 'Roboto', sans-serif;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--primary);
  margin-bottom: 0.75rem;
}

.section-title {
  font-family: 'Roboto', sans-serif;
  font-size: clamp(1.8rem, 3vw, 2.6rem);
  font-weight: 700;
  line-height: 1.2;
  color: var(--dark);
  margin-bottom: 1rem;
}

.section-desc {
  color: var(--text-muted);
  font-size: 1rem;
  line-height: 1.7;
  margin-bottom: 2.5rem;
}

.section-desc-dark {
  color: rgba(255,255,255,0.62);
  font-size: 1rem;
  line-height: 1.7;
  margin-bottom: 2.5rem;
  transition: all 0.4s ease;
}

/* TILES */
.selectable-tile:hover, .selectable-tile.active {
  transform: translateY(-6px);
  box-shadow: 0 20px 45px rgba(119, 61, 255, 0.18);
  border-color: var(--primary);
}

.selectable-tile {
  background: white;
  border-radius: var(--radius);
  padding: 2rem 1.25rem;
  cursor: pointer;
  transition: all 0.3s;
  border: 2px solid transparent;
  text-align: center;
}

.selectable-tile-short {
  padding: 0.5rem 1rem;
  text-align: left;
  border-color: var(--grey);
  margin-bottom: 0.25rem;
}

.selectable-tile-dark {
  background: var(--dark);
  border-radius: var(--radius);
  padding: 2rem 1.25rem;
  cursor: pointer;
  transition: all 0.3s;
  border: 2px solid transparent;
  text-align: center;
}

.selectable-tile-dark:hover, .selectable-tile-dark.active {
  background: rgba(119,61,255,0.12);
  border-color: rgba(119,61,255,0.4);
  transform: translateY(-4px);
}

.tile {
  background: var(--dark);
  border-radius: var(--radius);
  padding: 2rem 1.25rem;
  border: 2px solid transparent;
}

.tile-white {
  background: white;
  border-radius: var(--radius);
  padding: 2rem 1.25rem;
  border: 2px solid transparent;
  transition: all 0.3s;
  border: 2px solid transparent;
  text-align: center;
}

.tile-white:hover, .tile-white.active {
  box-shadow: 0 14px 35px rgba(0,0,0,0.08);
  transform: translateY(-4px);
}

.tile-icon {
  font-size: 2rem;
  margin-bottom: 0.75rem;
  display: block;
}

.tile-image {
  display: flex;
  justify-content: center;
}

.tile-title {
  font-family: 'Roboto', sans-serif;
  font-size: 0.92rem;
  font-weight: 700;
  color: var(--dark);
  margin-bottom: 0.4rem;
}

.tile-title-white {
  font-family: 'Roboto', sans-serif;
  font-size: 0.92rem;
  font-weight: 700;
  color: white;
  margin-bottom: 0.4rem;
}

.tile-title-light {
  font-family: 'Roboto', sans-serif;
  font-size: 2.2rem;
  font-weight: 800;
  color: var(--grey);
  line-height: 1;
  margin-bottom: 0.6rem;
}

.tile-desc {
  font-size: 0.78rem;
  color: var(--text-muted);
  line-height: 1.5;
}

.tile-desc-dark {
  font-size: 0.78rem;
  color: rgba(255, 255, 255, 0.6);
  line-height: 1.5;
}

.icon-container {
  display: flex;
  justify-content: center;
}

.gradient-icon {
  font-size: 1.8rem;
  margin-bottom: 1rem;
  width: 48px;
  height: 48px;
  background: var(--gradient);
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.tag {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  background: rgba(119, 61, 255, 0.18);
  border: 1px solid rgba(119, 61, 255, 0.35);
  color: #c4a8ff;
  padding: 0.4rem 1rem;
  border-radius: 50px;
  font-size: 0.78rem;
  font-weight: 500;
  margin-bottom: 1.5rem;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.white {
  color: white;
}

.no-underline {
  text-decoration: none !important;
}

#products-section .selectable-tile-dark p {
  margin-bottom: 0.75rem;
  color: white;
}

#products-section .tile-desc-dark {
  margin-bottom: unset !important;
  color: rgba(255, 255, 255, 0.6) !important;
}

/* CASES */
.case-card {
  border-radius: var(--radius);
  overflow: hidden;
  background: var(--dark);
  transition: all 0.3s;
}

.case-header {
  padding: 2rem 2rem 1.5rem;
  background: var(--gradient-dark);
  min-height: 136px;
}

.case-tag {
  background: rgba(252, 138, 200, 0.2);
  color: var(--secondary);
  font-size: 0.68rem;
  font-weight: 600;
  padding: 0.2rem 0.65rem;
  border-radius: 50px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  display: inline-block;
  margin-bottom: 0.9rem;
}

.case-title {
  font-family: 'Roboto', sans-serif;
  font-weight: 700;
  font-size: 1rem;
  color: white;
  line-height: 1.35;
}

.case-body {
  padding: 1.5rem 2rem 2rem;
}

.case-quote {
  font-style: italic;
  font-size: 0.85rem;
  color: rgba(255, 255, 255, 0.55);
  line-height: 1.65;
  margin-bottom: 1.25rem;
  border-left: 3px solid var(--primary);
  padding-left: 1rem;
}

.case-author {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.case-headshot {
  max-width: 60px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.case-author-name {
  font-family: 'Roboto', sans-serif;
  font-weight: 600;
  font-size: 0.83rem;
  color: white;
}

.case-author-title {
  font-size: 0.72rem;
  color: rgba(255, 255, 255, 0.4);
}

/* Footer */
.site-footer { 
  background: #0d0022; 
  padding: 4rem 4% 2rem; 
}

.footer-grid {
  display: grid;
  grid-template-columns: 1fr 1.5fr;
  max-width: 1200px;
  margin-left: auto;
  margin-right: auto;
}

.footer-grid-row-2 {
  padding-top: 2rem;
  border-top: 1px solid rgba(255,255,255,0.07);
}

.footer-brand h3 {
  color: white;
  font-family: 'Roboto', sans-serif;
  font-weight: 700;
  margin-bottom: 1rem;
}

.footer-logo-img {
  max-height: 60px;
  width: auto;
  display: block;
  margin-bottom: 1rem;
}

.footer-brand p { 
  color: rgba(255,255,255,0.4); 
  font-size: 0.85rem; 
  line-height: 1.65; 
  margin-top: 1rem; 
  max-width: 260px; 
}

.footer-left-widget-area {
  margin-top: 1.5rem;
}

.footer-left-widget h4 {
  font-family: 'Roboto', sans-serif; 
  font-size: 0.72rem; 
  font-weight: 700; 
  letter-spacing: 0.12em; 
  text-transform: uppercase; 
  color: rgba(255,255,255,0.3); 
  margin-bottom: 1rem;
}

.footer-left-widget ul {
  list-style: none;
  margin: 0;
  padding: 0;
}

.footer-left-widget ul li {
  margin-bottom: 0.55rem;
}

.footer-left-widget ul a {
  color: rgba(255,255,255,0.5);
  text-decoration: none;
  font-size: 0.85rem;
  transition: color 0.2s;
}

.footer-left-widget ul a:hover {
  color: var(--secondary);
}

.footer-left-widget p {
  color: rgba(255,255,255,0.4);
  font-size: 0.85rem;
  line-height: 1.65;
}

.footer-col h2 { 
  font-family: 'Roboto', sans-serif; 
  font-size: 0.72rem; 
  font-weight: 700; 
  letter-spacing: 0.12em; 
  text-transform: uppercase; 
  color: rgba(255,255,255,0.3); 
  margin-bottom: 1.25rem; 
}

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

.footer-col ul li { 
  margin-bottom: 0.55rem; 
}

.footer-col ul a { 
  color: rgba(255,255,255,0.5); 
  text-decoration: none; 
  font-size: 0.85rem; 
  transition: color 0.2s; 
}

.footer-col ul a:hover { 
  color: var(--secondary); 
}

.footer-bottom { 
  border-top: 1px solid rgba(255,255,255,0.07); 
  padding-top: 2rem; 
  display: flex; 
  justify-content: space-between; 
  align-items: center; 
  flex-wrap: wrap; 
  gap: 1rem; 
  max-width: 1200px;
  margin: 0 auto;
}

.footer-bottom p { 
  font-size: 0.78rem; 
  color: rgba(255,255,255,0.28); 
  margin: 0;
}

.footer-links {
  display: flex;
  gap: 1.5rem;
  list-style: none;
  margin: 0;
  padding: 0;
}

.footer-links a {
  color: rgba(255,255,255,0.4);
  text-decoration: none;
  font-size: 0.78rem;
  transition: color 0.2s;
}

.footer-links a:hover {
  color: var(--secondary);
}

.hide {
  display: none !important;
}

/* Responsive */
@media (max-width: 1200px) {
  .nav-links {
    gap: 1.25rem;
  }
  
  .nav-links > li > a {
    padding: 0.5rem 0.4rem;
    font-size: 0.88rem;
  }

  .inner-section {
    max-width: 940px;
  }
}

@media (max-width: 1024px) {
  .nav-links {
    gap: 1.5rem;
  }
  
  .nav-links a {
    font-size: 0.85rem;
  }
  
  .nav-links > li > a {
    padding: 0.5rem 0.5rem;
  }

  .blog-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .inner-section {
    max-width: 800px;
  }

  .stats-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr)) !important;
  }
}

@media (max-width: 768px) {
  body {
    padding-top: 70px;
  }
  
  .nav-center,
  .nav-links { 
    display: none; 
  }
  
  .site-navigation {
    justify-content: space-between;
  }
  
  .site-content {
    padding: 0;
  }
  
  .site-content--boxed {
    padding: 30px 4% 60px;
  }

  .blog-grid {
    grid-template-columns: 1fr;
  }
  
  .footer-grid { 
    grid-template-columns: 1fr; 
  }

  .inner-section {
    max-width: none;
  }

  .stats-grid {
    grid-template-columns: repeat(auto-fill, minmax(min(14rem, 100%), 1fr)) !important;
    container-type: inline-size;
  }
}
