/*
Theme Name: Nationwide Mobile Truck Repair
Theme URI: https://nationwidemobiletruckrepair.com
Author: Nationwide Mobile Truck Repair
Description: Custom WordPress theme for a nationwide mobile truck repair company. Includes Services, States, GMB Listings and Reviews custom post types, per-state editable phone numbers, and SEO-friendly templates for semi truck, RV, reefer, trailer and box truck repair services across the USA.
Version: 1.0.3
Requires PHP: 7.4
Text Domain: nwmtr
*/

/* ==========================================================================
   1. VARIABLES / VIBE
   Matches the reference mockup: black header bar, white body, red (#e2231a)
   accent, bold condensed headings, thin red divider rules, dark footer.
   ========================================================================== */
:root{
  --nwmtr-black:#141414;
  --nwmtr-dark:#1c1c1c;
  --nwmtr-red:#e2231a;
  --nwmtr-red-dark:#b91a13;
  --nwmtr-white:#ffffff;
  --nwmtr-offwhite:#f7f7f7;
  --nwmtr-gray:#6b6b6b;
  --nwmtr-border:#e6e6e6;
  --nwmtr-yellow:#ffb400;
  --font-head: 'Oswald', Arial, sans-serif;
  --font-body: 'Roboto', Arial, sans-serif;
}

*{box-sizing:border-box;}
html{overflow-x:hidden;width:100%;}
body{margin:0;font-family:var(--font-body);color:#333;line-height:1.7;font-size:16px;background:#fff;overflow-x:hidden;width:100%;}
img,svg,video{max-width:100%;}
h1,h2,h3,h4{font-family:var(--font-head);text-transform:uppercase;font-weight:700;letter-spacing:.5px;margin:0 0 16px;color:var(--nwmtr-black);}
a{color:var(--nwmtr-red);text-decoration:none;}
img{max-width:100%;height:auto;display:block;}
.container{max-width:1180px;margin:0 auto;padding:0 20px;}
.btn{display:inline-block;background:var(--nwmtr-red);color:#fff;padding:14px 30px;border-radius:4px;font-family:var(--font-head);text-transform:uppercase;font-weight:600;letter-spacing:1px;transition:.2s;border:none;cursor:pointer;}
.btn:hover{background:var(--nwmtr-red-dark);color:#fff;}
.btn-outline{background:transparent;border:2px solid #fff;color:#fff;}
.section{padding:70px 0;}
.section-title{text-align:center;font-size:32px;position:relative;padding-bottom:16px;}
.section-title:after{content:"";display:block;width:70px;height:3px;background:var(--nwmtr-red);margin:14px auto 0;}
.section-sub{text-align:center;max-width:720px;margin:0 auto 40px;color:var(--nwmtr-gray);}
.bg-dark{background:var(--nwmtr-dark);color:#ddd;}
.bg-dark h2, .bg-dark h3{color:#fff;}
.bg-red{background:var(--nwmtr-red);color:#fff;}
.bg-offwhite{background:var(--nwmtr-offwhite);}

/* ==========================================================================
   2. TOP BAR / HEADER
   ========================================================================== */
.top-bar{background:var(--nwmtr-black);color:#ccc;font-size:13px;padding:8px 0;}
.top-bar .container{display:flex;justify-content:space-between;align-items:center;flex-wrap:wrap;}
.top-bar a{color:#ccc;}
.top-bar .call-now{color:#fff;font-weight:700;}
.top-bar .call-now span{color:var(--nwmtr-red);}

.site-header{background:#fff;border-bottom:1px solid var(--nwmtr-border);padding:14px 0;position:sticky;top:0;z-index:999;}
.site-header .container{display:flex;align-items:center;justify-content:space-between;}
.site-logo{display:flex;align-items:center;gap:10px;font-family:var(--font-head);font-weight:700;font-size:22px;color:var(--nwmtr-black);}
.site-logo span{color:var(--nwmtr-red);}
.header-cta{display:flex;align-items:center;gap:26px;}
.header-phone{display:flex;align-items:center;gap:10px;}
.header-phone strong{display:block;font-family:var(--font-head);font-size:20px;color:var(--nwmtr-black);}
.header-phone small{color:var(--nwmtr-gray);text-transform:uppercase;font-size:11px;}
.header-badge{text-align:center;font-size:11px;color:var(--nwmtr-gray);text-transform:uppercase;}

.main-nav{background:var(--nwmtr-black);position:relative;z-index:900;}
.main-nav ul{list-style:none;display:flex;margin:0;padding:0;}
.main-nav li{position:relative;}
.main-nav a{display:block;padding:16px 20px;color:#fff;font-family:var(--font-head);text-transform:uppercase;font-size:14px;letter-spacing:1px;}
.main-nav li:first-child a{background:var(--nwmtr-red);}
.main-nav a:hover, .main-nav li.current-menu-item>a{background:var(--nwmtr-red);}
.nav-toggle{display:none;background:none;border:0;color:#fff;font-size:26px;padding:14px 20px;cursor:pointer;}

/* Submenu for state / service listings if used in menu */
.main-nav ul ul{display:none;position:absolute;left:0;top:100%;background:var(--nwmtr-dark);min-width:220px;flex-direction:column;z-index:50;}
.main-nav li:hover>ul{display:flex;}
.main-nav ul ul a{padding:12px 18px;font-size:12px;}

/* ==========================================================================
   3. HERO
   ========================================================================== */
.hero{position:relative;background-size:cover;background-position:center;color:#fff;padding:130px 0;}
.hero:before{content:"";position:absolute;inset:0;background:linear-gradient(180deg,rgba(10,10,10,.55),rgba(10,10,10,.8));}
.hero .container{position:relative;z-index:2;max-width:820px;}
.hero h1{color:#fff;font-size:46px;line-height:1.15;margin-bottom:10px;}
.hero h1 span{color:var(--nwmtr-red);}
.hero p.lead{font-size:19px;color:#eee;margin-bottom:30px;max-width:600px;}
.hero .btn{margin-right:14px;}

.hero-strip{background:var(--nwmtr-black);}
.hero-strip .container{display:flex;}
.hero-strip .strip-item{flex:1;display:flex;align-items:center;gap:14px;padding:22px 24px;color:#fff;border-right:1px solid rgba(255,255,255,.08);}
.hero-strip .strip-item:nth-child(2){background:var(--nwmtr-red);}
.hero-strip .strip-item .ic{width:38px;height:38px;border-radius:50%;background:rgba(255,255,255,.12);display:flex;align-items:center;justify-content:center;flex:none;}
.hero-strip strong{display:block;font-family:var(--font-head);text-transform:uppercase;font-size:14px;}
.hero-strip small{color:#ccc;font-size:12px;}

/* ==========================================================================
   4. GRIDS: SERVICES / CARDS
   ========================================================================== */
.grid{display:grid;gap:28px;}
.grid-3{grid-template-columns:repeat(3,1fr);}
.grid-2{grid-template-columns:repeat(2,1fr);}
.grid-4{grid-template-columns:repeat(4,1fr);}

.card{background:#fff;border:1px solid var(--nwmtr-border);border-radius:6px;overflow:hidden;transition:.2s;}
.card:hover{box-shadow:0 10px 30px rgba(0,0,0,.12);transform:translateY(-4px);}
.card .card-img{height:190px;overflow:hidden;}
.card .card-img img{width:100%;height:100%;object-fit:cover;}
.card .card-body{padding:22px;}
.card .card-body h3{font-size:18px;margin-bottom:10px;}
.card .card-body p{color:var(--nwmtr-gray);font-size:14px;margin-bottom:16px;}
.card.active{background:var(--nwmtr-black);color:#fff;}
.card.active h3{color:#fff;}

/* ==========================================================================
   5. WHO WE ARE / WHY CHOOSE US (split section like reference)
   ========================================================================== */
.split{display:grid;grid-template-columns:1fr 1fr;}
.split .half{padding:70px 50px;}
.split .half.who{background:var(--nwmtr-red);color:#fff;}
.split .half.who h2{color:#fff;}
.split .half.why{background:var(--nwmtr-dark);color:#ddd;}
.split .half.why h2{color:#fff;}
.social-links a{display:inline-block;margin:0 8px;color:#fff;border:1px solid rgba(255,255,255,.5);border-radius:50%;width:34px;height:34px;line-height:34px;text-align:center;}
.why-tabs{display:flex;gap:20px;border-bottom:1px solid rgba(255,255,255,.15);margin:26px 0;padding-bottom:16px;}
.why-tabs .tab{width:44px;height:44px;border-radius:50%;background:rgba(255,255,255,.08);display:flex;align-items:center;justify-content:center;}
.why-tabs .tab.active{background:var(--nwmtr-red);}

/* ==========================================================================
   6. TESTIMONIALS / REVIEWS
   ========================================================================== */
.testimonial{max-width:760px;margin:0 auto;text-align:center;}
.testimonial p{font-style:italic;font-size:18px;color:#444;}
.testimonial .avatar{width:70px;height:70px;border-radius:50%;object-fit:cover;margin:20px auto 10px;}
.testimonial .stars{color:var(--nwmtr-yellow);letter-spacing:2px;}
.review-grid{display:grid;grid-template-columns:repeat(3,1fr);gap:24px;}
.review-card{background:#fff;border:1px solid var(--nwmtr-border);border-radius:6px;padding:24px;}
.review-card .stars{color:var(--nwmtr-yellow);margin-bottom:10px;}
.review-card .reviewer{font-family:var(--font-head);text-transform:uppercase;font-size:13px;margin-top:12px;color:var(--nwmtr-black);}

/* ==========================================================================
   7. STATES DIRECTORY
   ========================================================================== */
.state-grid{display:grid;grid-template-columns:repeat(auto-fill,minmax(150px,1fr));gap:14px;}
.state-pill{display:block;text-align:center;padding:16px 10px;border-radius:6px;background:var(--nwmtr-offwhite);border:1px solid var(--nwmtr-border);color:#555;font-family:var(--font-head);text-transform:uppercase;font-size:14px;}
.state-pill.covered{background:var(--nwmtr-red);border-color:var(--nwmtr-red);color:#fff;}
.state-pill.covered:after{content:" \25CF";color:#fff;font-size:9px;vertical-align:super;}
.state-pill:hover{opacity:.85;}
.legend{display:flex;gap:24px;justify-content:center;margin-bottom:30px;font-size:13px;color:var(--nwmtr-gray);}
.legend span.dot{display:inline-block;width:12px;height:12px;border-radius:50%;margin-right:6px;vertical-align:middle;}
.legend .covered-dot{background:var(--nwmtr-red);}
.legend .uncovered-dot{background:#ccc;}

/* ==========================================================================
   8. GMB / LISTING CARDS (state page locations)
   ========================================================================== */
.listing-card{display:flex;justify-content:space-between;align-items:center;flex-wrap:wrap;gap:16px;background:#fff;border:1px solid var(--nwmtr-border);border-left:4px solid var(--nwmtr-red);border-radius:6px;padding:20px 24px;margin-bottom:16px;}
.listing-card h4{margin:0 0 6px;font-size:16px;}
.listing-card .addr{color:var(--nwmtr-gray);font-size:14px;}
.listing-card .rating{color:var(--nwmtr-yellow);font-size:14px;font-weight:700;}
.listing-card .rating span{color:var(--nwmtr-gray);font-weight:400;}
.listing-card .actions a{margin-left:10px;}

/* ==========================================================================
   9. CONTACT PAGE — state selector + form
   ========================================================================== */
.state-select-bar{display:flex;flex-wrap:wrap;gap:10px;justify-content:center;margin-bottom:30px;}
.state-select-bar button{background:var(--nwmtr-offwhite);border:1px solid var(--nwmtr-border);padding:10px 18px;border-radius:30px;font-family:var(--font-head);text-transform:uppercase;font-size:13px;cursor:pointer;}
.state-select-bar button.is-active{background:var(--nwmtr-red);color:#fff;border-color:var(--nwmtr-red);}
.state-listings-panel{display:none;max-width:820px;margin:0 auto 50px;}
.state-listings-panel.is-open{display:block;}
.contact-form input, .contact-form textarea, .contact-form select{width:100%;padding:13px 14px;border:1px solid var(--nwmtr-border);border-radius:4px;margin-bottom:16px;font-family:var(--font-body);font-size:15px;}
.contact-form label{font-size:13px;text-transform:uppercase;color:var(--nwmtr-gray);font-family:var(--font-head);letter-spacing:.5px;}

/* ==========================================================================
   10. SINGLE SERVICE / STATE PAGE CONTENT
   ========================================================================== */
.page-hero{position:relative;background-size:cover;background-position:center;padding:90px 0;color:#fff;}
.page-hero:before{content:"";position:absolute;inset:0;background:rgba(10,10,10,.62);}
.page-hero .container{position:relative;z-index:2;}
.page-hero h1{color:#fff;font-size:38px;margin-bottom:8px;}
.breadcrumb{font-size:13px;color:#ddd;}
.breadcrumb a{color:#fff;text-decoration:underline;}

.entry-content{max-width:900px;margin:50px auto;padding:0 20px;}
.entry-content h2{font-size:26px;margin-top:40px;}
.entry-content h3{font-size:20px;margin-top:26px;}
.entry-content ul{padding-left:20px;}
.entry-content li{margin-bottom:8px;}

.recommended{background:var(--nwmtr-offwhite);padding:50px 0;}
.cta-band{background:var(--nwmtr-red);color:#fff;text-align:center;padding:50px 0;}
.cta-band h2{color:#fff;}

/* ==========================================================================
   11. FOOTER — matches reference: black bg, columns, no embedded map
   ========================================================================== */
.site-footer{background:var(--nwmtr-black);color:#bbb;padding-top:60px;}
.footer-top{border-bottom:1px solid rgba(255,255,255,.08);padding-bottom:40px;}
.footer-grid{display:grid;grid-template-columns:1.4fr 1fr 1fr 1.2fr;gap:36px;}
.footer-grid h4{color:#fff;font-size:15px;margin-bottom:18px;}
.footer-grid ul{list-style:none;margin:0;padding:0;}
.footer-grid li{margin-bottom:10px;font-size:14px;}
.footer-grid a{color:#bbb;}
.footer-grid a:hover{color:#fff;}
.footer-brand{font-family:var(--font-head);font-size:20px;color:#fff;margin-bottom:12px;}
.footer-brand span{color:var(--nwmtr-red);}
.footer-tagline{color:#888;font-size:14px;max-width:280px;}
.footer-social a{display:inline-block;margin-right:10px;margin-top:16px;color:#fff;border:1px solid rgba(255,255,255,.3);border-radius:50%;width:32px;height:32px;line-height:32px;text-align:center;}
.footer-bottom{display:flex;justify-content:space-between;flex-wrap:wrap;gap:10px;padding:22px 0;font-size:13px;color:#888;}
.footer-bottom a{color:#888;margin-left:16px;}

/* ==========================================================================
   12. RESPONSIVE — mobile-first performance friendly
   ========================================================================== */
@media(max-width:900px){
  .grid-3,.grid-4,.grid-2{grid-template-columns:1fr 1fr;}
  .footer-grid{grid-template-columns:1fr 1fr;}
  .split{grid-template-columns:1fr;}
  .review-grid{grid-template-columns:1fr;}
}
@media(max-width:640px){
  .container{padding:0 16px;}

  /* Top bar: stack and shrink instead of forcing a wide row */
  .top-bar{font-size:11px;line-height:1.5;padding:8px 0;}
  .top-bar .container{flex-direction:column;align-items:center;justify-content:center;text-align:center;gap:2px;}
  .top-bar .call-now{white-space:normal;}

  /* Header: logo on its own row, phone + CTA stack full-width below it */
  .site-header{padding:12px 0;}
  .site-header .container{flex-direction:column;align-items:flex-start;gap:12px;}
  .site-logo{font-size:18px;flex-wrap:wrap;}
  .header-cta{width:100%;flex-direction:column;align-items:stretch;gap:10px;}
  .header-badge{display:none;}
  .header-phone{width:100%;justify-content:center;text-align:center;}
  .header-phone strong{font-size:18px;}
  .header-cta .btn{width:100%;text-align:center;padding:12px 20px;}

  .main-nav ul{display:none;flex-direction:column;position:absolute;top:100%;left:0;right:0;background:var(--nwmtr-black);z-index:1000;box-shadow:0 12px 20px rgba(0,0,0,.35);max-height:calc(100vh - 60px);overflow-y:auto;}
  .main-nav.open ul{display:flex;}
  .nav-toggle{display:block;margin-left:auto;}
  .main-nav .container{display:flex;justify-content:flex-end;padding:0 16px;}
  .hero{padding:80px 0;}
  .hero h1{font-size:30px;}
  .hero-strip .container{flex-direction:column;padding:0;}
  .hero-strip .strip-item{border-right:0;border-bottom:1px solid rgba(255,255,255,.08);padding:18px 20px;}
  .grid-3,.grid-4,.grid-2{grid-template-columns:1fr;}
  .footer-grid{grid-template-columns:1fr;}
  .section{padding:44px 0;}
  .state-select-bar button{font-size:12px;padding:8px 14px;}
  .listing-card{flex-direction:column;align-items:flex-start;}
  .listing-card .actions{width:100%;display:flex;gap:8px;}
  .listing-card .actions a{margin-left:0;flex:1;text-align:center;}
}

@media(max-width:400px){
  .header-phone strong{font-size:16px;}
  .site-logo{font-size:16px;}
}
