/*
Theme Name: Tuner Buddy
Theme URI: https://tunerbuddy.com
Author: Tuner Buddy Editorial Team
Description: Custom theme for tunerbuddy.com — free online ukulele and guitar tuner.
Version: 1.0
License: GNU General Public License v2 or later
Text Domain: tunerbuddy
*/

:root {
  /* Tailwind v4 Fallbacks */
  --spacing: 0.25rem;
  --radius-sm: 0.125rem;
  --radius-md: 0.375rem;
  --radius-lg: 0.5rem;
  --radius-xl: 0.75rem;
  --radius-2xl: 1rem;
  --radius-3xl: 1.5rem;
  --radius-full: 9999px;

  /* Colors used in widget */
  --color-blue-500: #3b82f6;
  --color-blue-600: #2563eb;
  --color-green-500: #10b981;
  --color-green-600: #059669;
  --color-red-500: #ef4444;
  --color-red-600: #dc2626;
  --color-slate-50: #f8fafc;
  --color-slate-100: #f1f5f9;
  --color-slate-200: #e2e8f0;
  --color-slate-300: #cbd5e1;
  --color-slate-400: #94a3b8;
  --color-slate-500: #64748b;
  --color-slate-600: #475569;
  --color-slate-700: #334155;
  --color-slate-800: #1e293b;
  --color-slate-900: #0f172a;
}

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

html {
  scroll-behavior: smooth;
}

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  background: #0f172a;
  color: #f8fafc;
  min-height: 100vh;
  line-height: 1.7;
}

/* Background image + overlay */
body::before {
  content: '';
  position: fixed;
  inset: 0;
  background: url('assets/guitar-bg.jpg') center/cover no-repeat;
  z-index: -2;
}

body::after {
  content: '';
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.62);
  z-index: -1;
}

/* =============================================
   TYPOGRAPHY
   ============================================= */
h1,
h2,
h3,
h4,
h5,
h6 {
  line-height: 1.3;
  font-weight: 600;
  color: #f1f5f9;
}

h1 {
  font-size: clamp(1.5rem, 4vw, 2.25rem);
}

h2 {
  font-size: clamp(1.25rem, 3vw, 1.75rem);
  margin: 2rem 0 1rem;
}

h3 {
  font-size: 1.25rem;
  margin: 1.5rem 0 0.75rem;
}

p {
  margin-bottom: 1.1rem;
  color: #cbd5e1;
}

a {
  color: #60a5fa;
  text-decoration: underline;
  text-underline-offset: 3px;
  text-decoration-color: rgba(96, 165, 250, 0.4);
  transition: color 0.2s;
}

a:hover {
  color: #93c5fd;
}

ul,
ol {
  padding-left: 1.5rem;
  margin-bottom: 1.2rem;
  color: #cbd5e1;
}

li {
  margin-bottom: 0.4rem;
}

strong {
  color: #f1f5f9;
}

blockquote {
  border-left: 3px solid #3b82f6;
  padding: 0.75rem 1.25rem;
  margin: 1.5rem 0;
  background: rgba(59, 130, 246, 0.08);
  border-radius: 0 8px 8px 0;
  color: #94a3b8;
  font-style: italic;
}

/* =============================================
   LAYOUT
   ============================================= */
.site-wrapper {
  max-width: 860px;
  margin: 0 auto;
  padding: 0 1rem;
  position: relative;
  z-index: 1;
}

/* =============================================
   HEADER & NAV
   ============================================= */
.site-header {
  text-align: center;
  padding: 2rem 0 1.5rem;
}

.site-title-link {
  display: inline-flex;
  align-items: center;
  gap: 0.75rem;
  text-decoration: none;
  color: inherit;
  margin-bottom: 0.5rem;
}

.site-title {
  font-size: clamp(1.25rem, 4vw, 1.875rem);
  font-weight: 300;
  color: #f1f5f9;
}

.site-nav {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.5rem 1rem;
  margin-top: 0.75rem;
}

.site-nav a {
  font-size: 0.875rem;
  color: #94a3b8;
  text-decoration: underline;
  text-decoration-color: rgba(59, 130, 246, 0.3);
  text-underline-offset: 4px;
  transition: color 0.2s;
}

.site-nav a:hover,
.site-nav .current-menu-item a {
  color: #60a5fa;
}

.nav-divider {
  color: #475569;
}

/* =============================================
   MAIN CONTENT
   ============================================= */
.site-main {
  padding-bottom: 3rem;
}

/* =============================================
   CARDS / CONTENT BLOCKS
   ============================================= */
.card {
  background: rgba(30, 41, 59, 0.75);
  backdrop-filter: blur(12px);
  border: 1px solid rgba(71, 85, 105, 0.5);
  border-radius: 16px;
  padding: 2rem;
  margin-bottom: 2rem;
}

/* =============================================
   BLOG POSTS
   ============================================= */
.post-header {
  margin-bottom: 2rem;
  padding-bottom: 1.5rem;
  border-bottom: 1px solid rgba(71, 85, 105, 0.4);
}

.post-meta {
  font-size: 0.8rem;
  color: #64748b;
  margin-top: 0.5rem;
  letter-spacing: 0.02em;
}

.post-content h2 {
  color: #e2e8f0;
  border-left: 3px solid #3b82f6;
  padding-left: 0.75rem;
}

.post-content table {
  width: 100%;
  border-collapse: collapse;
  margin: 1.5rem 0;
  font-size: 0.9rem;
}

.post-content th,
.post-content td {
  border: 1px solid rgba(71, 85, 105, 0.5);
  padding: 0.6rem 0.8rem;
  text-align: left;
}

.post-content th {
  background: rgba(59, 130, 246, 0.15);
  color: #e2e8f0;
  font-weight: 600;
}

.post-content td {
  color: #cbd5e1;
}

/* FAQ blocks */
.faq-block {
  background: rgba(59, 130, 246, 0.07);
  border: 1px solid rgba(59, 130, 246, 0.2);
  border-radius: 10px;
  padding: 1.25rem 1.5rem;
  margin: 1rem 0;
}

.faq-block h3 {
  color: #93c5fd;
  font-size: 1rem;
  margin: 0 0 0.5rem;
}

.faq-block p {
  margin: 0;
  font-size: 0.95rem;
}

/* Related articles */
.related-posts {
  background: rgba(30, 41, 59, 0.6);
  border: 1px solid rgba(71, 85, 105, 0.4);
  border-radius: 12px;
  padding: 1.25rem 1.5rem;
  margin-top: 2.5rem;
}

.related-posts h3 {
  color: #94a3b8;
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin: 0 0 0.75rem;
}

.related-posts ul {
  padding-left: 0;
  list-style: none;
}

.related-posts li::before {
  content: '→ ';
  color: #3b82f6;
}

/* =============================================
   BLOG ARCHIVE / LISTING
   ============================================= */
.blog-grid {
  display: grid;
  gap: 1.25rem;
}

.blog-card {
  background: rgba(30, 41, 59, 0.75);
  backdrop-filter: blur(12px);
  border: 1px solid rgba(71, 85, 105, 0.5);
  border-radius: 14px;
  padding: 1.5rem;
  text-decoration: none;
  display: block;
  transition: border-color 0.2s, transform 0.2s;
}

.blog-card:hover {
  border-color: rgba(96, 165, 250, 0.5);
  transform: translateY(-2px);
  text-decoration: none;
}

.blog-card-tag {
  font-size: 0.7rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  padding: 0.2rem 0.6rem;
  border-radius: 20px;
  display: inline-block;
  margin-bottom: 0.6rem;
}

.tag-ukulele {
  background: rgba(139, 92, 246, 0.2);
  color: #a78bfa;
}

.tag-guitar {
  background: rgba(234, 88, 12, 0.2);
  color: #fb923c;
}

.blog-card-title {
  font-size: 1.05rem;
  font-weight: 600;
  color: #e2e8f0;
  margin-bottom: 0.4rem;
}

.blog-card-excerpt {
  font-size: 0.875rem;
  color: #64748b;
  margin: 0;
}

.blog-card-meta {
  font-size: 0.75rem;
  color: #475569;
  margin-top: 0.75rem;
}

/* =============================================
   FOOTER
   ============================================= */
.site-footer {
  border-top: 1px solid rgba(71, 85, 105, 0.3);
  padding: 2rem 0;
  text-align: center;
  color: #475569;
  font-size: 0.8rem;
}

.site-footer a {
  color: #64748b;
  text-decoration: none;
  margin: 0 0.5rem;
  transition: color 0.2s;
}

.site-footer a:hover {
  color: #94a3b8;
}

.footer-links {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.25rem 0.5rem;
  margin-bottom: 0.75rem;
}

/* =============================================
   TUNER WIDGET CONTAINER
   ============================================= */
#tuner-root {
  min-height: 500px;
}

/* =============================================
   RESPONSIVE
   ============================================= */
@media (max-width: 640px) {
  .card {
    padding: 1.25rem;
  }

  .site-header {
    padding: 1.25rem 0 1rem;
  }
}

/* =============================================
   FORMS & WIDGET FIXES
   ============================================= */
input[type="text"],
input[type="email"],
textarea {
  width: 100%;
  padding: 0.75rem 1rem;
  border-radius: 10px;
  background: rgba(15, 23, 42, 0.4);
  border: 1px solid rgba(71, 85, 105, 0.5);
  color: #f8fafc;
  font-family: inherit;
  font-size: 0.95rem;
  transition: border-color 0.2s, box-shadow 0.2s;
}

input:focus,
textarea:focus {
  outline: none;
  border-color: #3b82f6;
  box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.15);
}

button[type="submit"] {
  background: #3b82f6;
  color: white;
  padding: 0.8rem 2rem;
  border-radius: 12px;
  font-weight: 600;
  border: none;
  cursor: pointer;
  transition: background 0.2s, transform 0.1s;
}

button[type="submit"]:hover {
  background: #2563eb;
}

#tuner-root>div {
  margin-top: 0 !important;
  margin-bottom: 0 !important;
}

#tuner-root button,
#tuner-root select {
  font-family: inherit;
}

/* =============================================
   NUCLEAR UI FIXES (Targeting Tuner Class Conflicts)
   ============================================= */
#tuner-root .flex {
  display: flex !important;
}

#tuner-root .flex-col {
  flex-direction: column !important;
}

#tuner-root .items-center {
  align-items: center !important;
}

#tuner-root .justify-center {
  justify-content: center !important;
}

#tuner-root .gap-2 {
  gap: 0.5rem !important;
}

#tuner-root .gap-3 {
  gap: 0.75rem !important;
}

#tuner-root .gap-4 {
  gap: 1rem !important;
}

#tuner-root .rounded-full {
  border-radius: 9999px !important;
}

#tuner-root .rounded-xl {
  border-radius: 0.75rem !important;
}

#tuner-root .rounded-2xl {
  border-radius: 1rem !important;
}

#tuner-root .rounded-3xl {
  border-radius: 1.5rem !important;
}

#tuner-root .p-1 {
  padding: 0.25rem !important;
}

#tuner-root .p-2 {
  padding: 0.5rem !important;
}

#tuner-root .p-4 {
  padding: 1rem !important;
}

#tuner-root .px-4 {
  padding-left: 1rem !important;
  padding-right: 1rem !important;
}

#tuner-root .py-2 {
  padding-top: 0.5rem !important;
  padding-bottom: 0.5rem !important;
}

#tuner-root .max-w-md {
  max-width: 28rem !important;
}

#tuner-root .mx-auto {
  margin-left: auto !important;
  margin-right: auto !important;
}

/* Fix overlapping tabs */
#tuner-root .inline-flex {
  display: inline-flex !important;
}

#tuner-root .overflow-hidden {
  overflow: hidden !important;
}
/* FINAL HARDENING FOR TUNER WIDGET UI */
#tuner-root {
  padding-top: 3rem !important;
  padding-bottom: 3rem !important;
}

#tuner-root button {
  border-radius: 9999px !important;
  padding-left: 2.5rem !important;
  padding-right: 2.5rem !important;
  margin-top: 1.5rem !important;
  margin-bottom: 1.5rem !important;
  font-family: inherit !important;
}

#tuner-root p {
  margin-top: 0.75rem !important;
}

/* FINAL SURGICAL FIX: ENSURE VERTICAL PADDING FOR BUTTONS */
#tuner-root button {
  padding-top: 0.8rem !important;
  padding-bottom: 0.8rem !important;
  line-height: 1 !important;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
}

#tuner-root .gap-4 {
  gap: 1.25rem !important;
}
