/* ===============================================
   AKM MUSIC - FIXES & IMPROVEMENTS
   Additional styles to fix specific issues
   =============================================== */

/* LAYOUT: rely on body padding instead of first-section margin to avoid top-gap on bounce */
body {
  padding-top: var(--header-height) !important;
}

/* Prevent background scroll when mobile menu open */
body.menu-open { overflow: hidden; }

/* Fix: Header should have no space above it */
.site-header {
  margin-top: 0;
}

/* Subtle elevated header state */
.site-header.scrolled {
  box-shadow: var(--shadow-md);
}

/* Fix: Add space below header for fixed positioning */
.hero-modern,
.tools-hero,
.about-hero,
.contact-hero,
.blog-hero,
.gallery-hero {
  margin-top: 0 !important;
}

/* Fix: Mobile menu toggle button (was missing) */
.nav-toggle {
  display: none;
  background: none;
  border: none;
  font-size: 1.5rem;
  color: var(--text-primary);
  cursor: pointer;
  padding: 0.5rem;
  transition: color 0.3s ease;
}

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

.header-actions {
  display: flex;
  align-items: center;
  gap: var(--space-md);
}

@media (max-width: 768px) {
  .nav-toggle {
    display: block;
  }
  
  .nav {
    display: none;
    position: fixed;
    top: var(--header-height);
    left: 0;
    right: 0;
    background: var(--color-white);
    flex-direction: column;
    padding: var(--space-lg);
    box-shadow: var(--shadow-xl);
    gap: var(--space-md);
    z-index: var(--z-dropdown);
  }
  
  .nav.active {
    display: flex !important;
  }
  
  .nav a {
    width: 100%;
    padding: var(--space-md);
    border-bottom: 1px solid var(--border-color);
    text-align: center;
  }
}

/* NOTE: Desktop nav styling moved to CRITICAL section at end of file for maximum specificity */

/* Fix: Service Cards - Make smaller and remove specific cards */
.services-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: var(--space-lg);
  margin-top: var(--space-2xl);
}

.service-card {
  background: var(--bg-card);
  border-radius: var(--border-radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-md);
  transition: all var(--transition-normal);
  max-width: 100%;
}

.service-card:hover {
  transform: translateY(-8px);
  box-shadow: var(--shadow-xl);
}

.service-image {
  position: relative;
  width: 100%;
  height: 180px;
  overflow: hidden;
}

.service-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform var(--transition-slow);
}

.service-card:hover .service-image img {
  transform: scale(1.1);
}

.service-overlay {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: linear-gradient(135deg, rgba(37, 99, 235, 0.8), rgba(30, 64, 175, 0.8));
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transition: opacity var(--transition-normal);
}

.service-card:hover .service-overlay {
  opacity: 1;
}

.service-icon {
  font-size: 3rem;
  color: white;
}

.service-content {
  padding: var(--space-lg);
  text-align: center;
}

.service-title {
  font-size: var(--font-size-xl);
  font-weight: var(--font-weight-bold);
  color: var(--text-primary);
  margin-bottom: var(--space-sm);
}

.service-description {
  font-size: var(--font-size-sm);
  color: var(--text-secondary);
  margin-bottom: var(--space-md);
  line-height: var(--line-height-relaxed);
}

.service-link {
  display: inline-flex;
  align-items: center;
  gap: var(--space-xs);
  color: var(--color-primary);
  font-weight: var(--font-weight-semibold);
  font-size: var(--font-size-sm);
  transition: gap var(--transition-fast);
  justify-content: center;
}

.service-link:hover {
  gap: var(--space-sm);
}

/* Hide specific home cards: Instrument Sales and Music Tools */
/* Instrument Sales card (by image alt) */
.services-grid .service-card:has(img[alt="Instrument Sales"]) { display: none !important; }
/* Music Tools card (by image src and link to tools.html) */
.services-grid .service-card:has(img[src*="Service Cards/Tools.jpg"]) { display: none !important; }
.services-grid .service-card:has(a[href$="tools.html"]) { display: none !important; }

@media (max-width: 768px) {
  .services-grid {
    grid-template-columns: 1fr;
    gap: var(--space-md);
  }
  
  .service-image {
    height: 160px;
  }
}

/* Fix: Quick Actions - Center properly */
.quick-actions {
  padding: var(--space-3xl) 0;
  background: var(--bg-section-light);
}

.qa-header {
  text-align: center;
  margin-bottom: var(--space-2xl);
}

.qa-title {
  font-size: var(--font-size-3xl);
  font-weight: var(--font-weight-bold);
  color: var(--text-primary);
  margin-bottom: var(--space-sm);
}

.qa-sub {
  font-size: var(--font-size-lg);
  color: var(--text-muted);
}

.qa-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: var(--space-lg);
  max-width: var(--max-width-content);
  margin: 0 auto;
  padding: 0 var(--space-lg);
}

.qa-card {
  background: var(--bg-card);
  border-radius: var(--border-radius-lg);
  padding: var(--space-lg);
  display: flex;
  align-items: center;
  gap: var(--space-md);
  box-shadow: var(--shadow-sm);
  transition: all var(--transition-normal);
  text-decoration: none;
  color: inherit;
}

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

.qa-icon {
  font-size: 2rem;
  width: 50px;
  height: 50px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: var(--border-radius-md);
  flex-shrink: 0;
}

.qa--wa .qa-icon {
  background: linear-gradient(135deg, #25D366 0%, #128C7E 100%);
  color: white;
}

.qa--ms .qa-icon {
  background: linear-gradient(135deg, #0084FF 0%, #0066CC 100%);
  color: white;
}

.qa--install .qa-icon {
  background: linear-gradient(135deg, var(--color-primary) 0%, var(--color-primary-dark) 100%);
  color: white;
}

.qa--directions .qa-icon {
  background: linear-gradient(135deg, var(--color-accent) 0%, var(--color-accent-dark) 100%);
  color: white;
}

.qa-content {
  flex: 1;
}

.qa-title-sm {
  font-size: var(--font-size-base);
  font-weight: var(--font-weight-bold);
  color: var(--text-primary);
  margin-bottom: 0.25rem;
}

.qa-desc {
  font-size: var(--font-size-sm);
  color: var(--text-muted);
}

.qa-cta {
  font-size: 1.25rem;
  color: var(--color-primary);
}

@media (max-width: 768px) {
  .qa-grid {
    grid-template-columns: 1fr;
    gap: var(--space-md);
  }
}

@media (max-width: 480px) {
  .qa-title {
    font-size: var(--font-size-2xl);
  }
}

/* Fix: Tools Cards - Uniform sizing */
.tools-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: var(--space-xl);
  max-width: var(--max-width-xl);
  margin: 0 auto;
  padding: 0 var(--space-lg);
}

.tool-card {
  background: rgba(255, 255, 255, 0.95);
  border: 1px solid var(--border-color);
  border-radius: var(--border-radius-xl);
  padding: var(--space-xl);
  box-shadow: var(--shadow-md);
  transition: all var(--transition-normal);
  display: flex;
  flex-direction: column;
  min-height: 400px;
}

.tool-card:hover {
  transform: translateY(-6px);
  box-shadow: var(--shadow-xl);
  border-color: var(--color-primary-light);
}

.tool-header {
  text-align: center;
  margin-bottom: var(--space-lg);
}

.tool-icon {
  width: 60px;
  height: 60px;
  margin: 0 auto var(--space-md);
  background: linear-gradient(135deg, var(--color-primary) 0%, var(--color-primary-dark) 100%);
  border-radius: var(--border-radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.75rem;
  color: var(--color-white);
  box-shadow: var(--shadow-md);
}

.tool-header h3 {
  font-size: var(--font-size-xl);
  font-weight: var(--font-weight-bold);
  color: var(--text-primary);
  margin-bottom: 0.25rem;
}

.tool-header p {
  font-size: var(--font-size-sm);
  color: var(--text-muted);
  margin: 0;
}

.tool-body {
  flex: 1;
  display: flex;
  flex-direction: column;
}

@media (max-width: 768px) {
  .tools-grid {
    grid-template-columns: 1fr;
    gap: var(--space-lg);
  }
  
  .tool-card {
    min-height: auto;
    padding: var(--space-lg);
  }
  
  .tool-icon {
    width: 50px;
    height: 50px;
    font-size: 1.5rem;
  }
}

/* Fix: Blog cards - smaller and consistent */
.blog-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: var(--space-xl);
  margin-top: var(--space-2xl);
}

.blog-card {
  background: var(--bg-card);
  border-radius: var(--border-radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-md);
  transition: all var(--transition-normal);
  display: flex;
  flex-direction: column;
  max-width: 100%;
  transition: all 0.4s ease;
}

.blog-card:hover {
  transform: translateY(-6px);
  box-shadow: var(--shadow-xl);
}

.blog-card.expanded {
  grid-column: 1 / -1; /* Take full width when expanded */
  max-width: 100%;
}

.blog-image {
  width: 100%;
  height: 180px;
  overflow: hidden;
}

.blog-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform var(--transition-slow);
}

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

.blog-content {
  padding: var(--space-lg);
  flex: 1;
  display: flex;
  flex-direction: column;
}

.blog-meta {
  font-size: var(--font-size-xs);
  color: var(--text-muted);
  margin-bottom: var(--space-sm);
}

.blog-title {
  font-size: var(--font-size-lg);
  font-weight: var(--font-weight-bold);
  color: var(--text-primary);
  margin-bottom: var(--space-sm);
  line-height: var(--line-height-tight);
}

.blog-excerpt {
  font-size: var(--font-size-sm);
  color: var(--text-secondary);
  margin-bottom: var(--space-md);
  flex: 1;
  line-height: var(--line-height-relaxed);
  transition: opacity 0.3s ease;
}

.blog-read-more {
  display: inline-flex;
  align-items: center;
  gap: var(--space-xs);
  color: var(--color-primary);
  font-weight: var(--font-weight-semibold);
  font-size: var(--font-size-sm);
  transition: gap var(--transition-fast);
}

.blog-read-more:hover {
  gap: var(--space-sm);
}

/* Blog expanded content - stays in same card */
.blog-expanded {
  display: none;
  padding-top: var(--space-md);
  border-top: 1px solid var(--border-color);
  margin-top: var(--space-md);
}

.blog-expanded.active {
  display: block;
}

.blog-full-content {
  font-size: var(--font-size-sm);
  color: var(--text-secondary);
  line-height: var(--line-height-relaxed);
  animation: fadeIn 0.4s ease;
  margin-bottom: var(--space-md);
}

.blog-full-content h1,
.blog-full-content h2,
.blog-full-content h3,
.blog-full-content h4 {
  color: var(--text-primary);
  margin-top: var(--space-lg);
  margin-bottom: var(--space-md);
  font-weight: var(--font-weight-bold);
}

.blog-full-content h1 { font-size: var(--font-size-2xl); }
.blog-full-content h2 { font-size: var(--font-size-xl); }
.blog-full-content h3 { font-size: var(--font-size-lg); }
.blog-full-content h4 { font-size: var(--font-size-md); }

.blog-full-content p {
  margin-bottom: var(--space-md);
}

.blog-full-content ul,
.blog-full-content ol {
  margin-left: var(--space-lg);
  margin-bottom: var(--space-md);
}

.blog-full-content li {
  margin-bottom: var(--space-sm);
}

.blog-full-content strong {
  font-weight: var(--font-weight-bold);
  color: var (--text-primary);
}

.blog-full-content a {
  color: var(--color-primary);
  text-decoration: underline;
}

.blog-full-content a:hover {
  color: var(--color-primary-dark);
}

.read-more-btn {
  display: inline-flex;
  align-items: center;
  gap: var(--space-sm);
  padding: var(--space-sm) var(--space-lg);
  background: var(--color-primary);
  color: var(--color-white);
  border: none;
  border-radius: var(--border-radius-md);
  font-weight: var(--font-weight-semibold);
  cursor: pointer;
  transition: all var(--transition-normal);
  align-self: flex-start;
}

.read-more-btn:hover {
  background: var(--color-primary-dark);
  transform: translateX(4px);
}

.read-more-btn i {
  transition: transform var(--transition-normal);
}

.blog-card.expanded .read-more-btn i {
  transform: rotate(180deg);
}

@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(-10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@media (max-width: 768px) {
  .blog-grid {
    grid-template-columns: 1fr;
    gap: var(--space-md);
  }
  
  .blog-image {
    height: 160px;
  }
  
  .blog-card.expanded {
    grid-column: 1;
  }
}

/* Ensure card content centers on small screens */
@media (max-width: 768px) {
  .service-card .service-content,
  .tool-card .tool-header,
  .blog-card .blog-content { text-align: center; }
}

@media (max-width: 480px) {
  .hero-title-main {
    font-size: var(--font-size-3xl);
  }
  .hero-tagline {
    font-size: var(--font-size-lg);
  }
  .section-title {
    font-size: var(--font-size-3xl);
  }
}

/* Fix: Consistent color scheme across all pages */
.hero-modern,
.tools-hero,
.about-hero,
.contact-hero,
.blog-hero,
.gallery-hero {
  background: linear-gradient(135deg, var(--color-primary) 0%, var(--color-primary-dark) 100%);
  color: white;
}

/* Ensure all section titles use primary color */
.section-title,
.qa-title {
  color: var(--text-primary);
}

/* Fix brand title consistency */
.brand-title {
  font-size: var(--font-size-xl);
  font-weight: var(--font-weight-black);
  color: var(--color-primary);
}

@media (max-width: 768px) {
  .brand-title {
    font-size: var(--font-size-lg);
  }
}

/* Services section spacing */
.services-section {
  padding: var(--space-3xl) 0;
}

.section-header {
  text-align: center;
  margin-bottom: var(--space-2xl);
}

.section-title {
  font-size: var(--font-size-4xl);
  font-weight: var(--font-weight-extrabold);
  margin-bottom: var(--space-sm);
}

.section-subtitle {
  font-size: var(--font-size-lg);
  color: var(--text-muted);
}

@media (max-width: 768px) {
  .section-title {
    font-size: var(--font-size-3xl);
  }
  
  .section-subtitle {
    font-size: var(--font-size-base);
  }
}

/* Customer badge (placeholder for future feature) */
.customer-badge {
  display: none;
}

/* Glass container effect for tools */
.glass-container {
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
}

/* Ensure footer doesn't have top padding issues */
.site-footer {
  margin-top: var(--space-4xl);
}

/* Hero sections consistent styling */
.hero-modern {
  position: relative;
  min-height: 600px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, var(--color-primary) 0%, var(--color-primary-dark) 100%);
  overflow: hidden;
  padding: var(--space-4xl) var(--space-lg);
}

.hero-bg {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 1;
}

.hero-content {
  position: relative;
  z-index: 2;
  max-width: var(--max-width-content);
  margin: 0 auto;
  width: 100%;
}

.hero-text {
  max-width: 700px;
  margin-left: auto;
  margin-right: auto;
}

.hero-title-main {
  font-size: var(--font-size-6xl);
  font-weight: var(--font-weight-black);
  color: white;
  margin-bottom: var(--space-sm);
  line-height: 1.1;
}

.hero-tagline {
  font-size: var(--font-size-2xl);
  font-weight: var(--font-weight-bold);
  color: white;
  margin-bottom: var(--space-lg);
  opacity: 0.95;
}

.hero-description {
  font-size: var(--font-size-lg);
  color: white;
  line-height: var(--line-height-relaxed);
  margin-bottom: var(--space-2xl);
  opacity: 0.9;
}

.hero-actions {
  display: flex;
  gap: var(--space-md);
  flex-wrap: wrap;
}

@media (max-width: 1024px) {
  .hero-modern .hero-text {
    text-align: center;
  }
  .hero-modern .hero-actions {
    justify-content: center;
  }
}

/* 3D Button styles */
.btn-3d {
  display: inline-flex;
  align-items: center;
  gap: var(--space-sm);
  padding: var(--space-md) var(--space-xl);
  font-size: var(--font-size-base);
  font-weight: var(--font-weight-bold);
  border-radius: var(--border-radius-md);
  text-decoration: none;
  transition: all var(--transition-normal);
  box-shadow: 0 4px 0 rgba(0, 0, 0, 0.2), var(--shadow-md);
  position: relative;
  top: 0;
}

.btn-3d:active {
  top: 4px;
  box-shadow: 0 0 0 rgba(0, 0, 0, 0.2), var(--shadow-sm);
}

.btn-primary-3d {
  background: linear-gradient(135deg, var(--color-primary) 0%, var(--color-primary-dark) 100%);
  color: white;
}

.btn-secondary-3d {
  background: white;
  color: var(--color-primary);
}

.btn-3d:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 0 rgba(0, 0, 0, 0.2), var(--shadow-lg);
}

@media (max-width: 768px) {
  .hero-modern {
    min-height: 500px;
    padding: var(--space-3xl) var(--space-lg);
  }
  
  .hero-title-main {
    font-size: var(--font-size-4xl);
  }
  
  .hero-tagline {
    font-size: var(--font-size-xl);
  }
  
  .hero-description {
    font-size: var(--font-size-base);
  }
  
  .hero-actions {
    flex-direction: column;
    width: 100%;
  }
  
  .btn-3d {
    width: 100%;
    justify-content: center;
  }
  
  .header-inner {
    padding: 0 var(--space-md);
  }
  .logo {
    height: 42px;
  }
}

/* Blog specific improvements */
.blog-hero,
.about-hero,
.contact-hero,
.gallery-hero {
  min-height: 400px;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: var(--space-4xl) var(--space-lg);
  background: linear-gradient(135deg, var(--color-primary) 0%, var(--color-primary-dark) 100%);
  color: white;
}

.blog-hero h1,
.about-hero h1,
.contact-hero h1,
.gallery-hero h1 {
  font-size: var(--font-size-5xl);
  font-weight: var(--font-weight-black);
  color: white;
  margin-bottom: var(--space-md);
}

.blog-hero p,
.about-hero .lead,
.contact-hero p,
.gallery-hero p {
  font-size: var(--font-size-xl);
  color: white;
  opacity: 0.95;
  max-width: 700px;
  margin: 0 auto;
}

/* Blog grid container */
.blog-container {
  max-width: var(--max-width-content);
  margin: 0 auto;
  padding: var(--space-3xl) var(--space-lg);
}

/* Blog post toggle functionality */
.blog-toggle-content {
  display: none;
}

.blog-toggle-content.active {
  display: block;
  animation: fadeIn 0.3s ease-in-out;
}

@keyframes fadeIn {
  from { opacity: 0; transform: translateY(-10px); }
  to { opacity: 1; transform: translateY(0); }
}

/* Ensure consistent padding in all sections */
.services-section,
.blog-section,
.about-section,
.contact-section,
.gallery-section {
  padding: var(--space-3xl) 0;
}

/* Footer improvements */
.footer-social-row {
  display: flex;
  justify-content: center;
  gap: var(--space-lg);
  margin-bottom: var(--space-lg);
}

.footer-icon {
  width: 50px;
  height: 50px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  background: var(--color-primary);
  color: white;
  font-size: 1.5rem;
  transition: all var(--transition-normal);
  text-decoration: none;
}

.footer-icon:hover {
  transform: scale(1.1);
  background: var(--color-primary-dark);
}

.footer-copy {
  text-align: center;
  color: var(--text-muted);
  font-size: var(--font-size-sm);
  padding: var(--space-lg) 0;
}

/* Tools section improvements */
.tools-section {
  padding: var(--space-4xl) 0;
  background: var(--bg-section-light);
}

.tools-container {
  max-width: var(--max-width-xl);
  margin: 0 auto;
  padding: 0 var(--space-lg);
}

/* Tuner specific styles */
.tuner-lcd {
  background: var(--color-gray-900);
  border-radius: var(--border-radius-lg);
  padding: var(--space-lg);
  margin-bottom: var(--space-lg);
}

.lcd-screen-sm {
  background: var(--color-gray-800);
  border-radius: var(--border-radius-md);
  padding: var(--space-lg);
}

.lcd-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: var(--space-lg);
  position: relative;
}

.lcd-pointer-wrap {
  position: relative;
  flex: 1;
  margin: 0 var(--space-lg);
  height: 60px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.lcd-center-mark {
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
  color: var(--color-gray-500);
  font-size: var(--font-size-sm);
  font-weight: var(--font-weight-bold);
}

.lcd-pointer {
  position: absolute;
  width: 4px;
  height: 40px;
  background: var(--color-accent);
  border-radius: 2px;
  left: 50%;
  transform: translateX(-50%) rotate(0deg);
  transform-origin: bottom center;
  transition: transform 0.1s ease-out;
  box-shadow: 0 0 10px rgba(220, 38, 38, 0.5);
}

.lcd-pointer.in-tune {
  background: var(--color-success);
  box-shadow: 0 0 10px rgba(16, 185, 129, 0.5);
}

.scale-num {
  color: var(--color-gray-400);
  font-size: var(--font-size-xs);
  font-weight: var(--font-weight-semibold);
}

.lcd-note-row {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: var(--space-lg);
  margin-bottom: var(--space-md);
}

.lcd-big-note {
  font-size: 4rem;
  font-weight: var(--font-weight-black);
  color: var(--color-primary-light);
  font-family: monospace;
  text-shadow: 0 0 20px rgba(37, 99, 235, 0.5);
  min-width: 100px;
  text-align: center;
}

.lcd-big-note.in-tune {
  color: var(--color-success);
  text-shadow: 0 0 20px rgba(16, 185, 129, 0.5);
}

.lcd-instrument {
  font-size: var(--font-size-sm);
  color: var(--color-gray-400);
  font-weight: var(--font-weight-semibold);
}

.tuner-info {
  display: flex;
  justify-content: space-around;
  margin-bottom: var(--space-md);
}

.tuner-info-item {
  text-align: center;
}

.tuner-info-label {
  font-size: var(--font-size-xs);
  color: var(--color-gray-500);
  margin-bottom: 0.25rem;
}

.tuner-info-value {
  font-size: var(--font-size-base);
  color: var(--color-gray-200);
  font-family: monospace;
  font-weight: var(--font-weight-bold);
}

.tuner-start {
  width: 100%;
  padding: var(--space-md);
  background: linear-gradient(135deg, var(--color-primary) 0%, var(--color-primary-dark) 100%);
  color: white;
  border: none;
  border-radius: var(--border-radius-md);
  font-size: var(--font-size-base);
  font-weight: var(--font-weight-bold);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-sm);
  transition: all var(--transition-normal);
  box-shadow: var(--shadow-md);
}

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

.tuner-start.active {
  background: linear-gradient(135deg, var(--color-accent) 0%, var(--color-accent-dark) 100%);
}

/* Metronome styles */
.metronome-display {
  text-align: center;
  margin-bottom: var(--space-xl);
}

.bpm-display {
  font-size: 4rem;
  font-weight: var(--font-weight-black);
  color: var(--text-primary);
  margin-bottom: var(--space-lg);
  display: flex;
  align-items: baseline;
  justify-content: center;
  gap: var(--space-sm);
}

.bpm-display small {
  font-size: var(--font-size-lg);
  font-weight: var(--font-weight-semibold);
  color: var(--text-muted);
}

.metronome-visual {
  width: 100px;
  height: 100px;
  margin: 0 auto var(--space-lg);
  background: var(--color-gray-200);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  box-shadow: inset 0 2px 8px rgba(0, 0, 0, 0.1);
  transition: all 0.1s ease-out;
}

.beat-indicator {
  width: 60px;
  height: 60px;
  background: var(--color-primary);
  border-radius: 50%;
  transition: all 0.1s ease-out;
}

.bpm-slider {
  width: 100%;
  margin-bottom: var(--space-md);
}

.tempo-labels {
  display: flex;
  justify-content: space-between;
  font-size: var(--font-size-xs);
  color: var(--text-muted);
  margin-bottom: var(--space-lg);
}

.metronome-actions {
  display: flex;
  gap: var(--space-md);
  justify-content: center;
}

/* Chord and scale selectors */
.chord-selector {
  display: flex;
  gap: var(--space-md);
  margin-bottom: var(--space-lg);
}

.chord-select {
  flex: 1;
  padding: var(--space-sm) var(--space-md);
  border: 2px solid var(--border-color);
  border-radius: var(--border-radius-md);
  font-size: var(--font-size-base);
  font-family: var(--font-family);
  color: var(--text-primary);
  background: white;
  cursor: pointer;
  transition: border-color var(--transition-fast);
}

.chord-select:focus {
  outline: none;
  border-color: var(--color-primary);
}

/* Make sure all elements respect the no-padding body */
html {
  margin: 0;
  padding: 0;
}

body * {
  box-sizing: border-box;
}

/* Ensure brand logo displays properly */
.hero-brand-logo {
  margin-bottom: var(--space-lg);
}

/* Remove any unwanted spacing */
header + section,
header + main {
  margin-top: 0 !important;
}

/* Ensure blog grid doesn't break when card expands */
.posts-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: var(--space-xl);
  margin-top: var(--space-2xl);
}

@media (max-width: 768px) {
  .posts-grid {
    grid-template-columns: 1fr;
  }
  
  .blog-card.expanded {
    grid-column: 1;
  }
}

/* Footer: center content on mobile for better balance */
@media (max-width: 768px) {
  .footer-content {
    text-align: center;
    gap: var(--space-lg);
  }
  .footer-section ul { list-style: none; padding: 0; }
  .footer-section ul li { margin: var(--space-xs) 0; }
}

/* Blog hero: ensure centered content and responsive search */
.blog-hero .hero-content { text-align: center; }
.hero-search { max-width: 560px; margin: var(--space-lg) auto 0; }
.hero-search input {
  width: 100%;
  max-width: 100%;
  padding: var(--space-md) var(--space-lg);
  border-radius: var(--border-radius-md);
  border: 2px solid var(--border-color);
  font: inherit;
}

/* Tweak quick actions alignment on narrow screens */
@media (max-width: 768px) {
  .qa-card { text-align: left; }
  .qa-cta { display: none; }
}

/* Reduce animated notes clutter on small devices */
@media (max-width: 480px) {
  .music-note { opacity: 0.05; font-size: 1.4rem; }
}

/* Tools hero: ensure inner text block stays centered */
.tools-hero .tools-hero-content, 
.tools-hero .tools-hero-text { margin-left: auto; margin-right: auto; }

/* Ultra-small devices adjustments */
@media (max-width: 380px) {
  .brand-text { display: none; }
  .header-actions { gap: var(--space-sm); }
  .nav-toggle { font-size: 1.25rem; }
  .container, .tools-container, .blog-container { padding-left: var(--space-md); padding-right: var(--space-md); }
  .qa-card { padding: var(--space-md); }
  .footer-icon { width: 44px; height: 44px; font-size: 1.2rem; }
}

/* Ensure mobile nav items are readable and centered */
@media (max-width: 768px) {
  .nav a { display: block; text-align: center; }
}

/* Gradient text utility for hero titles */
.gradient-text {
  background: linear-gradient(90deg, var(--color-primary) 0%, var(--color-primary-light) 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

/* Generic gallery grid layout for responsive display */
.gallery-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: var(--space-lg);
}

@media (max-width: 480px) {
  .gallery-grid { grid-template-columns: repeat(2, 1fr); gap: var(--space-md); }
}

/* Ensure cards center their inner content on small screens */
@media (max-width: 768px) {
  .service-card .service-content, .tool-card .tool-header { text-align: center; }
}

/* SIMPLIFY NAV ACROSS ALL PAGES */
.nav a, .nav .nav-link { padding:0 !important; background:transparent !important; border-radius:0 !important; box-shadow:none !important; }
.nav a.active, .nav .nav-link.active { background:transparent !important; color:var(--color-primary) !important; }
.nav a.active::after, .nav .nav-link.active::after { content:''; position:absolute; left:0; right:0; bottom:-8px; height:2px; background:var(--color-primary); }

/* ALIGN HERO */
.hero-modern .hero-text { text-align:center; margin-left:auto; margin-right:auto; }
.hero-modern .hero-actions { justify-content:center; }
.tools-hero .tools-hero-content { text-align:center; margin-left:auto; margin-right:auto; }
.tools-hero .tools-hero-title { display:inline-block; }

/* SIMPLIFY: Remove any residual pill/button styles from nav links globally */
.nav a,
.nav .nav-link { background: transparent !important; border-radius: 0 !important; padding: 0 !important; box-shadow: none !important; }

/* SIMPLIFY: Consistent underline active state */
.nav a.active,
.nav .nav-link.active { background: transparent !important; color: var(--color-primary) !important; }
.nav a.active::after,
.nav .nav-link.active::after { content: ''; position: absolute; left:0; right:0; bottom:-8px; height:2px; background: var(--color-primary); }

/* ALIGNMENT: Center hero text and actions on index/tools */
.hero-modern .hero-text { text-align: center; margin-left: auto; margin-right: auto; }
.hero-modern .hero-actions { justify-content: center; }
.tools-hero .tools-hero-content { margin-left: auto; margin-right: auto; text-align: center; }
.tools-hero .tools-hero-title { margin-left: auto; margin-right: auto; display: inline-block; }

/* HEADER HARDENING: force solid white header above any overlays */
.site-header {
  /* Ensure solid background with no blending */
  background: #ffffff !important;
  background-color: #ffffff !important;
  opacity: 1 !important;
  mix-blend-mode: normal !important;
  backdrop-filter: none !important;
  -webkit-backdrop-filter: none !important;
  /* Always above hero overlays */
  z-index: 9999 !important;
  position: fixed; /* reinforce fixed positioning */
  isolation: isolate; /* prevent backdrop/overlay effects from bleeding in */
}

/* DEFENSIVE: keep header solid white in all states and remove any pseudo overlays */
.site-header,
.site-header.scrolled {
  background: #ffffff !important;
  background-color: #ffffff !important;
}
.site-header::before,
.site-header::after {
  content: none !important;
  background: none !important;
}

/* Improve compositing to avoid color shift on scroll */
.site-header { will-change: auto; transform: translateZ(0); }

/* Prefer containing overscroll to avoid top rubber-band gaps */
html, body { overscroll-behavior: contain; }

/* Make sure hero decorative overlays sit behind hero content and never above header */
.hero-modern::before,
.tools-hero::before,
.about-hero::before,
.contact-hero::before,
.blog-hero::before,
.gallery-hero::before {
  z-index: 0 !important;
}

/* Ensure hero content is above its own overlay */
.hero-modern .hero-content,
.tools-hero .tools-hero-content {
  position: relative;
  z-index: 1;
}

/* TOP-GAP/TINT FIX: ensure no space above header and prevent color shift on slight scroll */
html, body {
  margin: 0 !important;
  padding: 0 !important;
  background: #ffffff; /* prevents gradient bleed on overscroll */
  overscroll-behavior-y: none; /* avoid rubber-band gap revealing page bg */
}

.site-header {
  top: 0 !important;
  left: 0 !important;
  right: 0 !important;
  margin-top: 0 !important;
  border-top: 0 !important;
  background-clip: padding-box;
  /* only animate shadow to avoid background interpolation */
  transition: box-shadow var(--transition-normal) !important;
}

/* Ensure no element in the document adds a top border/gap before header */
html > body > :first-child {
  margin-top: 0 !important;
  border-top: 0 !important;
}

/* Safety: if any wrapper exists above header, neutralize spacing */
body > .site-header:first-child {
  margin-top: 0 !important;
}

/* REMOVE DECORATIVE OVERLAYS ON HOME/TOOLS (keep blue hero gradient) */
/* Home: hide floating notes layer */
.hero-modern .hero-bg,
.hero-modern .music-note { display: none !important; background: none !important; }

/* Tools: disable dotted overlay */
.tools-hero::before { content: none !important; display: none !important; background: none !important; }

/* Ensure header area never shows underlying gradients */
body, html { background: #ffffff !important; }

/* LINKS: remove browser purple and default underline */
a, a:visited { color: var(--color-primary) !important; }
a { text-decoration: none !important; }
a:hover { text-decoration: underline !important; }

/* HEADER: force inner wrappers to solid white and fixed height */
.site-header { height: var(--header-height) !important; }
.site-header .header-inner,
.site-header .container,
.site-header .brand,
.site-header .nav,
.site-header .header-actions { background: #ffffff !important; }

/* Ensure hero begins below header on all pages */
body { padding-top: var(--header-height) !important; }
.hero-modern, .tools-hero { margin-top: 0 !important; }

/* ================================================
   CRITICAL: HEADER CONSISTENCY OVERRIDE
   Force desktop nav to match blog.html header
   MAXIMUM SPECIFICITY - NUCLEAR OPTION v2
   ================================================ */
@media (min-width: 769px) {
  /* Force nav to display as flex row on desktop */
  header.site-header .nav,
  .site-header nav.nav,
  header .nav,
  nav.nav {
    display: flex !important;
    flex-direction: row !important;
    position: static !important;
    background: transparent !important;
    background-color: transparent !important;
    background-image: none !important;
    padding: 0 !important;
    box-shadow: none !important;
    gap: var(--space-xl) !important;
  }
  
  /* Remove ALL button/pill styling from nav links - ABSOLUTE OVERRIDE */
  html body header.site-header .nav a,
  html body header.site-header .nav .nav-link,
  html body header .nav a,
  html body header .nav .nav-link,
  html body .site-header nav a,
  html body .site-header nav .nav-link,
  html body nav.nav a,
  html body nav.nav .nav-link,
  html body .nav a,
  html body .nav .nav-link,
  header.site-header .nav a,
  header.site-header .nav .nav-link,
  header .nav a,
  header .nav .nav-link,
  .site-header nav a,
  .site-header nav .nav-link,
  nav.nav a,
  nav.nav .nav-link,
  .nav a,
  .nav .nav-link {
    background: transparent !important;
    background-color: transparent !important;
    background-image: none !important;
    border-radius: 0 !important;
    padding: 0 !important;
    padding-left: 0 !important;
    padding-right: 0 !important;
    padding-top: 0 !important;
    padding-bottom: 0 !important;
    margin: 0 !important;
    box-shadow: none !important;
    border: none !important;
    border-width: 0 !important;
    position: relative !important;
    display: inline-block !important;
    width: auto !important;
    min-width: auto !important;
  }
  
  /* Active link: primary color with underline - ABSOLUTE NO BACKGROUND */
  html body header.site-header .nav a.active,
  html body header.site-header .nav .nav-link.active,
  html body header .nav a.active,
  html body header .nav .nav-link.active,
  html body .site-header nav a.active,
  html body .site-header nav .nav-link.active,
  html body nav.nav a.active,
  html body nav.nav .nav-link.active,
  html body .nav a.active,
  html body .nav .nav-link.active,
  header.site-header .nav a.active,
  header.site-header .nav .nav-link.active,
  header .nav a.active,
  header .nav .nav-link.active,
  .site-header nav a.active,
  .site-header nav .nav-link.active,
  nav.nav a.active,
  nav.nav .nav-link.active,
  .nav a.active,
  .nav .nav-link.active {
    color: var(--color-primary) !important;
    background: transparent !important;
    background-color: transparent !important;
    background-image: none !important;
    border-radius: 0 !important;
    padding: 0 !important;
    box-shadow: none !important;
    border: none !important;
  }
  
  /* Active underline indicator */
  html body header.site-header .nav a.active::after,
  html body header.site-header .nav .nav-link.active::after,
  html body header .nav a.active::after,
  html body header .nav .nav-link.active::after,
  html body .site-header nav a.active::after,
  html body .site-header nav .nav-link.active::after,
  html body nav.nav a.active::after,
  html body nav.nav .nav-link.active::after,
  html body .nav a.active::after,
  html body .nav .nav-link.active::after,
  header.site-header .nav a.active::after,
  header.site-header .nav .nav-link.active::after,
  header .nav a.active::after,
  header .nav .nav-link.active::after,
  .site-header nav a.active::after,
  .site-header nav .nav-link.active::after,
  nav.nav a.active::after,
  nav.nav .nav-link.active::after,
  .nav a.active::after,
  .nav .nav-link.active::after {
    content: '' !important;
    position: absolute !important;
    bottom: -8px !important;
    left: 0 !important;
    right: 0 !important;
    height: 2px !important;
    background: var(--color-primary) !important;
    background-color: var(--color-primary) !important;
    background-image: none !important;
    display: block !important;
  }
}

/* ================================================
   CRITICAL: HERO TEXT COLOR CONSISTENCY
   White text on blue backgrounds (no gradient)
   ================================================ */
.tools-hero h1,
.tools-hero .tools-hero-title,
.about-hero h1,
.contact-hero h1,
.gallery-hero h1,
.blog-hero h1 {
  color: white !important;
}

/* Gradient text ONLY for blog title which is styled differently */
.blog-hero .gradient-text {
  background: linear-gradient(90deg, rgba(255,255,255,0.95) 0%, rgba(255,255,255,1) 100%) !important;
  -webkit-background-clip: text !important;
  background-clip: text !important;
  color: transparent !important;
}

/* Remove gradient from hero titles on colored backgrounds */
.tools-hero .gradient-text,
.about-hero .gradient-text,
.contact-hero .gradient-text,
.gallery-hero .gradient-text {
  background: none !important;
  -webkit-background-clip: unset !important;
  background-clip: unset !important;
  color: white !important;
}

/* Home page can use gradient since it's a special design */
.hero-modern .hero-title-main .gradient-text {
  background: linear-gradient(90deg, rgba(255,255,255,0.9) 0%, rgba(255,255,255,1) 100%) !important;
  -webkit-background-clip: text !important;
  background-clip: text !important;
  color: transparent !important;
}
