/*
Theme Name: TuneStrings Lite
Theme URI: https://www.tunestrings.com/
Author: Jalin Film / TuneStrings
Description: Lightweight custom theme for TuneStrings.com. Keeps WordPress content/URLs but presents instrument pages as tuner-first landing pages.
Version: 11
Text Domain: tunestrings-lite
*/

:root{
  --ts-bg:#f7f5f1;
  --ts-paper:#fff;
  --ts-ink:#181818;
  --ts-muted:#74716b;
  --ts-line:#e7e1d8;
  --ts-accent:#c72836;
  --ts-max:1080px;
}
*{box-sizing:border-box}
html{scroll-behavior:smooth}
body{
  margin:0;background:var(--ts-bg);color:var(--ts-ink);
  font-family:-apple-system,BlinkMacSystemFont,"Segoe UI",Inter,Roboto,Helvetica,Arial,sans-serif;
  -webkit-font-smoothing:antialiased;
}
a{color:inherit}
img{max-width:100%;height:auto}
.ts-shell{width:min(var(--ts-max),calc(100% - 36px));margin-inline:auto}
.ts-site-header{background:#f4f4f4;border-top:6px solid #111}
.ts-header-inner{min-height:96px;display:flex;align-items:center;justify-content:space-between;gap:24px}
.ts-brand{display:flex;align-items:center;min-width:0;text-decoration:none}
.ts-brand .custom-logo{display:block;max-width:330px;max-height:74px;width:auto;height:auto}
.ts-brand-fallback{font-weight:900;letter-spacing:-.05em;font-size:34px}
.ts-brand-fallback span{color:var(--ts-accent)}
.ts-menu{display:flex;align-items:center;gap:24px;font-size:13px;font-weight:800;text-transform:uppercase}
.ts-menu a{text-decoration:none}
.ts-menu a:hover{opacity:.65}
.ts-main{padding:48px 0 70px}
.ts-hero{text-align:center;padding:18px 0 32px}
.ts-eyebrow{font-size:11px;letter-spacing:.2em;text-transform:uppercase;font-weight:850;color:#9c7060;margin-bottom:14px}
.ts-hero h1,.ts-article-head h1{margin:0;font-size:clamp(42px,7vw,78px);line-height:.96;letter-spacing:-.055em;font-weight:800}
.ts-hero p{max-width:720px;margin:20px auto 0;color:var(--ts-muted);font-size:18px;line-height:1.55}
.ts-tool-wrap{margin:14px auto 0}
.ts-ad{margin:28px auto;min-height:90px;display:flex;align-items:center;justify-content:center}
.ts-ad:empty{display:none}
.ts-ad-label{font-size:9px;letter-spacing:.14em;text-transform:uppercase;color:#aaa;text-align:center;margin-bottom:6px}
.ts-content-card{
  background:var(--ts-paper);border:1px solid var(--ts-line);border-radius:24px;padding:clamp(26px,5vw,58px);
  box-shadow:0 12px 42px rgba(28,24,20,.045);
}
.ts-content-card + .ts-content-card{margin-top:22px}
.ts-content-card h2{font-size:clamp(26px,4vw,38px);letter-spacing:-.035em;margin:0 0 16px}
.ts-content-card h3{font-size:20px;margin:30px 0 10px}
.ts-content-card p,.ts-content-card li{font-size:17px;line-height:1.72;color:#45423e}
.ts-content-card ul{padding-left:22px}
.ts-instrument-head{display:grid;grid-template-columns:minmax(0,1fr) minmax(220px,360px);gap:38px;align-items:center;margin-bottom:26px}
.ts-instrument-image img{display:block;width:100%;border-radius:22px;aspect-ratio:4/3;object-fit:cover}
.ts-related{display:flex;flex-wrap:wrap;gap:10px;margin-top:18px}
.ts-related a{display:inline-flex;padding:10px 14px;border:1px solid var(--ts-line);border-radius:999px;text-decoration:none;background:#fff;font-size:14px;font-weight:700}
.ts-related a:hover{background:#f2eee7}
.ts-home-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:14px;margin-top:22px}
.ts-home-grid a{display:block;background:#fff;border:1px solid var(--ts-line);border-radius:18px;padding:18px;text-decoration:none}
.ts-home-grid strong{display:block;font-size:18px;margin-bottom:4px}
.ts-home-grid span{font-size:13px;color:var(--ts-muted)}
.ts-article-head{margin-bottom:26px}
.ts-article-head p{font-size:18px;line-height:1.55;color:var(--ts-muted);max-width:760px;margin:18px 0 0}
.ts-site-footer{border-top:1px solid var(--ts-line);padding:34px 0 46px;color:var(--ts-muted);font-size:13px}
.ts-footer-inner{display:flex;justify-content:space-between;gap:24px;flex-wrap:wrap}
.ts-legacy-content{background:#fff;border:1px solid var(--ts-line);border-radius:22px;padding:34px}
@media(max-width:760px){
 .ts-shell{width:min(100% - 24px,var(--ts-max))}
 .ts-header-inner{min-height:76px}
 .ts-brand .custom-logo{max-width:235px;max-height:54px}
 .ts-menu{gap:14px;font-size:11px}
 .ts-main{padding:28px 0 48px}
 .ts-instrument-head{grid-template-columns:1fr}
 .ts-instrument-image{order:-1}
 .ts-home-grid{grid-template-columns:1fr 1fr}
}
@media(max-width:480px){
 .ts-menu{display:none}
 .ts-home-grid{grid-template-columns:1fr}
}

.ts-menu-list{display:flex;align-items:center;gap:24px;list-style:none;margin:0;padding:0}
.ts-menu-list li{margin:0;padding:0}
.ts-menu-list a{text-decoration:none}
@media(max-width:480px){.ts-menu-list{display:none}}

/* v3: align tuner and editorial cards on desktop */
.ts-tool-wrap,
.ts-content-card,
.ts-legacy-content,
.ts-article-head,
.ts-ad{
  width:100%;
  max-width:1080px;
  margin-left:auto;
  margin-right:auto;
}
.ts-tool-wrap .tsg{
  max-width:1080px!important;
  margin-left:auto!important;
  margin-right:auto!important;
}
@media(min-width:761px){
  .ts-content-card,
  .ts-legacy-content{
    width:100%;
  }
}

/* v4 ad placements */
.ts-ad{
  width:100%;
  max-width:1080px;
  margin:28px auto;
  text-align:center;
  overflow:hidden;
}
.ts-ad-label{
  margin-bottom:7px;
  font-size:9px;
  font-weight:700;
  letter-spacing:.14em;
  text-transform:uppercase;
  color:#aaa49b;
}
.ts-ad-after_tuner{min-height:90px}
.ts-ad-ad_after_tuner{min-height:90px}
.ts-ad-ad_mid_content{min-height:100px}
.ts-ad-ad_lower{min-height:120px}

/* v5: existing Newspaper page-view counter */
.ts-post-views{
  display:inline-flex;
  align-items:center;
  gap:7px;
  margin-top:17px;
  color:var(--ts-muted);
  font-size:12px;
  font-weight:700;
  letter-spacing:.02em;
}
.ts-post-views svg{
  width:16px;
  height:16px;
  opacity:.72;
}

/* v6: responsive AdSense slots need a real width before Google initializes them */
.ts-ad{
  display:block;
  width:100%;
  min-width:0;
}
.ts-ad .adsbygoogle{
  display:block!important;
  width:100%!important;
  min-width:250px;
}
@media(max-width:320px){
  .ts-ad .adsbygoogle{min-width:0}
}

/* v7: high-viewability top ad and richer browse grid */
body > .ts-ad-ad_top{
  width:min(1080px,calc(100% - 36px));
  margin:18px auto 8px;
  min-height:90px;
}
.ts-ad-ad_top .adsbygoogle{
  width:100%!important;
}
.ts-home-grid{
  grid-template-columns:repeat(3,minmax(0,1fr));
}
.ts-home-grid a{
  position:relative;
  min-height:118px;
}
.ts-home-views{
  display:block;
  margin-top:12px;
  font-size:11px;
  color:#9a958e;
  font-weight:700;
}
@media(max-width:760px){
  body > .ts-ad-ad_top{
    width:calc(100% - 24px);
    margin:10px auto 4px;
    min-height:60px;
  }
  .ts-home-grid{grid-template-columns:1fr 1fr}
}
@media(max-width:480px){
  .ts-home-grid{grid-template-columns:1fr}
}


/* v9 — simplified TuneStrings navigation */
.ts-header-inner{
  min-height:86px;
}

.ts-header-actions{
  display:flex;
  align-items:center;
  gap:20px;
}

.ts-made-in{
  font-size:11px;
  line-height:1;
  font-weight:800;
  letter-spacing:.12em;
  text-transform:uppercase;
  color:#77716b;
  white-space:nowrap;
}

.ts-menu-toggle{
  width:46px;
  height:46px;
  display:flex;
  flex-direction:column;
  align-items:center;
  justify-content:center;
  gap:5px;
  padding:0;
  border:1px solid var(--ts-line);
  border-radius:50%;
  background:#fff;
  color:var(--ts-ink);
  cursor:pointer;
  transition:transform .15s ease, background .15s ease;
}

.ts-menu-toggle:hover{
  background:#f7f3ed;
  transform:translateY(-1px);
}

.ts-menu-toggle span{
  display:block;
  width:18px;
  height:2px;
  border-radius:2px;
  background:currentColor;
  transition:transform .18s ease, opacity .18s ease;
}

.ts-menu-toggle[aria-expanded="true"] span:nth-child(1){
  transform:translateY(7px) rotate(45deg);
}
.ts-menu-toggle[aria-expanded="true"] span:nth-child(2){
  opacity:0;
}
.ts-menu-toggle[aria-expanded="true"] span:nth-child(3){
  transform:translateY(-7px) rotate(-45deg);
}

.ts-menu-panel{
  border-top:1px solid var(--ts-line);
  background:rgba(255,255,255,.98);
  box-shadow:0 18px 40px rgba(22,20,17,.08);
}

.ts-menu-panel-inner{
  padding-top:26px;
  padding-bottom:24px;
}

.ts-drawer-nav{
  display:grid;
  grid-template-columns:repeat(4,minmax(0,1fr));
  gap:10px;
}

.ts-drawer-nav a,
.ts-drawer-nav button{
  display:flex;
  align-items:center;
  min-height:64px;
  padding:14px 16px;
  border:1px solid var(--ts-line);
  border-radius:15px;
  background:#fff;
  color:var(--ts-ink);
  font:inherit;
  font-size:14px;
  font-weight:750;
  text-align:left;
  text-decoration:none;
  cursor:pointer;
}

.ts-drawer-nav a:hover,
.ts-drawer-nav button:hover{
  background:#f7f3ed;
}

.ts-menu-meta{
  margin-top:18px;
  font-size:10px;
  font-weight:750;
  letter-spacing:.12em;
  text-transform:uppercase;
  color:#aaa39a;
}

.ts-footer-links{
  display:flex;
  align-items:center;
  flex-wrap:wrap;
  gap:14px 20px;
}

.ts-footer-links a,
.ts-footer-links button{
  border:0;
  padding:0;
  background:none;
  color:var(--ts-muted);
  font:inherit;
  font-size:13px;
  text-decoration:none;
  cursor:pointer;
}

.ts-footer-links a:hover,
.ts-footer-links button:hover{
  color:var(--ts-ink);
}

.ts-footer-links span{
  color:#aaa39a;
}

@media(max-width:760px){
  .ts-header-inner{
    min-height:72px;
  }

  .ts-made-in{
    display:none;
  }

  .ts-menu-toggle{
    width:42px;
    height:42px;
  }

  .ts-drawer-nav{
    grid-template-columns:1fr;
  }

  .ts-drawer-nav a,
  .ts-drawer-nav button{
    min-height:54px;
  }

  .ts-menu-panel-inner{
    padding-top:16px;
    padding-bottom:18px;
  }

  .ts-footer-inner{
    display:block;
  }

  .ts-footer-links{
    margin-top:12px;
  }
}

/* v10 — precise in-page anchor landing and safer spacing around the top ad */
#instruments{
  scroll-margin-top:34px;
}

/* Keep the top ad visually separate from navigation and the first interactive content. */
body > .ts-ad-ad_top{
  margin-top:22px;
  margin-bottom:22px;
}

/* When jumping to Instruments, keep the heading comfortably inside the viewport. */
html{
  scroll-padding-top:24px;
}

@media(max-width:760px){
  #instruments{
    scroll-margin-top:18px;
  }

  body > .ts-ad-ad_top{
    margin-top:12px;
    margin-bottom:16px;
  }

  html{
    scroll-padding-top:12px;
  }
}

/* v11 — homepage hero + compact tuner: remove duplicated vertical messaging */
.home .ts-hero{
  padding-bottom:18px;
}
.home .ts-tool-wrap{
  margin-top:0;
}
@media(max-width:760px){
  .home .ts-hero{
    padding-top:8px;
    padding-bottom:12px;
  }
  .home .ts-hero p{
    margin-top:14px!important;
  }
}
