/* =============================
   Red Beard Mechanix Theme Core
   ============================= */
:root {
  --rb-red: #c8102e;
  --rb-red-dark: #a00d26;
  --rb-red-light: #ffe5ea;
  --rb-black: #111111;
  --rb-black-2: #1e1e1e;
  --rb-gray-1: #f5f5f5;
  --rb-gray-2: #e0e0e0;
  --rb-white: #ffffff;
  --rb-text: #1b1b1b;
  --rb-text-light: #fafafa;
  --rb-warning: #ffb400;
  --rb-error: var(--rb-red);

  --space-0: 0;
  --space-1: 0.25rem;
  --space-2: 0.5rem;
  --space-3: 0.75rem;
  --space-4: 1rem;
  --space-5: 1.5rem;
  --space-6: 2rem;
  --space-7: 3rem;
}

/* Base reset-ish */
*{box-sizing:border-box;}
html{font-size:16px;line-height:1.5;-webkit-text-size-adjust:100%;}
@media (min-width:48rem){html{font-size:17px}}
@media (min-width:75rem){html{font-size:18px}}
body{margin:0;font-family:system-ui,"Segoe UI",Roboto,Helvetica,Arial,sans-serif;color:var(--rb-text);background:var(--rb-white);}

/* Type hierarchy */
h1,h2,h3,h4{line-height:1.2;font-weight:700;margin:0 0 0.5em;}
h1{font-size:clamp(2rem,5vw,2.75rem);}
h2{font-size:clamp(1.5rem,3.5vw,2rem);}
h3{font-size:clamp(1.25rem,2.5vw,1.5rem);}
h4{font-size:1.125rem;}

/* Layout wrappers */
.wrapper{width:min(90%,75rem);margin-inline:auto;}
.section{padding-block:var(--space-6);}
.section.alt{background:var(--rb-gray-1);}
.section.dark{background:var(--rb-black-2);color:var(--rb-text-light);}
.section.dark h1,.section.dark h2,.section.dark h3{color:var(--rb-white);}

/* Header */
.site-header{position:sticky;top:0;z-index:100;background:var(--rb-black);color:var(--rb-white);box-shadow:0 2px 4px rgba(0,0,0,.4);}
.site-header .wrapper{display:flex;align-items:center;justify-content:space-between;gap:var(--space-4);padding-block:var(--space-2);}
.site-logo{display:flex;align-items:center;gap:var(--space-2);font-weight:700;font-size:1.125rem;text-transform:uppercase;letter-spacing:.5px;color:var(--rb-white);text-decoration:none;}
.site-logo span{color:var(--rb-red);}

/* Nav (if added later) */
.site-nav ul{list-style:none;margin:0;padding:0;display:flex;gap:var(--space-4);}
.site-nav a{text-decoration:none;color:var(--rb-white);font-weight:600;}
.site-nav a:hover{color:var(--rb-red-light);}

/* Buttons */
.btn{
  --btn-bg:var(--rb-red);--btn-bg-hover:var(--rb-red-dark);--btn-color:var(--rb-white);
  --btn-pad-y:0.75rem;--btn-pad-x:1.5rem;--btn-radius:4px;
  display:inline-block;padding:var(--btn-pad-y) var(--btn-pad-x);
  color:var(--btn-color);background:var(--btn-bg);
  border:2px solid transparent;border-radius:var(--btn-radius);
  font-weight:600;text-decoration:none;line-height:1;
  transition:background .15s,transform .15s;
}
.btn:hover,.btn:focus-visible{background:var(--btn-bg-hover);transform:translateY(-1px);}
.btn:focus-visible{outline:2px solid var(--rb-warning);outline-offset:2px;}
.btn-outline{
  --btn-bg:transparent;--btn-bg-hover:var(--rb-red-light);--btn-color:var(--rb-red);
  border-color:var(--rb-red);
}
.btn-outline:hover,.btn-outline:focus-visible{color:var(--rb-red-dark);background:var(--rb-red-light);}
.btn-ghost{
  --btn-bg:transparent;--btn-bg-hover:rgba(255,255,255,.1);--btn-color:inherit;
  border-color:transparent;padding-inline:var(--space-3);
}
a.btn-ghost {
  color: var(--rb-red);
  font-weight: bold;
  text-decoration: none;
}
a.btn-ghost:hover {
  color: var(--rb-red-dark);
  text-decoration: underline;
}

/* Hero */
.hero{
  position:relative;text-align:center;color:var(--rb-white);
  padding-block:clamp(4rem,10vw,8rem);
  background:var(--rb-black);
  background-size:cover;background-position:center;
}
.hero::after{content:"";position:absolute;inset:0;background:rgba(0,0,0,.5);}
.hero>*{position:relative;z-index:1;}
.hero .btn{margin-inline:.25rem;margin-top:var(--space-3);}

/* Services */
.service-grid{--cols:3;display:grid;grid-template-columns:repeat(var(--cols),1fr);gap:var(--space-4);}
@media(max-width:60rem){.service-grid{--cols:2}}
@media(max-width:40rem){.service-grid{--cols:1}}
.service-card{
  background:var(--rb-white);border:1px solid var(--rb-gray-2);border-top:4px solid var(--rb-red);
  border-radius:6px;padding:var(--space-4);
  box-shadow:0 1px 3px rgba(0,0,0,.08);transition:box-shadow .15s,transform .15s;
}
.service-card:hover{transform:translateY(-2px);box-shadow:0 4px 16px rgba(0,0,0,.15);}
.service-card h3{margin-top:0;color:var(--rb-red-dark);}

/* Pricing */
.pricing-table{width:100%;border-collapse:collapse;margin-block:var(--space-4);font-size:1rem;}
.pricing-table th,.pricing-table td{border:1px solid var(--rb-gray-2);padding:var(--space-3) var(--space-4);text-align:left;}
.pricing-table thead th{background:var(--rb-black);color:var(--rb-white);}
.pricing-highlight{background:var(--rb-red-light);font-weight:600;}
.pricing-note{font-size:.875rem;color:var(--rb-red-dark);margin-top:var(--space-2);}

/* Form */
.contact-form{max-width:32rem;margin-inline:auto;display:grid;gap:var(--space-3);}
.contact-form label{font-weight:600;font-size:.95rem;}
.contact-form input[type="text"],.contact-form input[type="tel"],.contact-form input[type="email"],.contact-form select,.contact-form textarea{
  width:100%;padding:var(--space-3);border:1px solid var(--rb-gray-2);border-radius:4px;font-size:1rem;
}
.contact-form input:focus,.contact-form textarea:focus{border-color:var(--rb-red);outline:2px solid var(--rb-red-light);outline-offset:0;}
.contact-form .error{border-color:var(--rb-error);}
.contact-form .error-msg{color:var(--rb-error);font-size:.8rem;margin-top:-.25rem;}

/* Divider stripe */
.section-divider{height:4px;background:linear-gradient(90deg,var(--rb-red) 0%,var(--rb-black) 100%);margin-block:var(--space-6);border-radius:2px;}

/* Footer */
.site-footer{background:var(--rb-black-2);color:var(--rb-text-light);padding-block:var(--space-6);font-size:.95rem;}
.site-footer a{color:var(--rb-red-light);text-decoration:none;}
.site-footer a:hover{color:var(--rb-white);}

/* Skip link for accessibility */
.skip-link{position:absolute;top:-40px;left:0;padding:var(--space-2) var(--space-4);background:var(--rb-red);color:var(--rb-white);z-index:200;}
.skip-link:focus{top:0;}

/* Reduced motion */
@media(prefers-reduced-motion:reduce){
  *{transition-duration:.001ms!important;animation-duration:.001ms!important;animation-iteration-count:1!important;}
}

/* Print */
@media print{
  .site-header,.hero,.cta-buttons,.map-embed{display:none!important;}
  body{color:#000;background:#fff;font-size:12pt;}
  a:after{content:" (" attr(href) ")";font-size:10pt;}
}

.gallery-link {
  color: var(--rb-red);
  font-weight: 700;
  text-decoration: none;
  display: inline-block;
  border: 2px solid var(--rb-red);
  padding: 0.75rem 1.5rem;
  border-radius: 4px;
  transition: background 0.2s ease, color 0.2s ease;
}

.gallery-link:hover {
  background: var(--rb-red-light);
  color: var(--rb-red-dark);
}

/* Request Service Link */
a.request-link {
  color: var(--rb-red);
  font-weight: 700;
  text-decoration: none;
}

a.request-link:hover {
  color: var(--rb-red-dark);
  text-decoration: underline;
}


/* === Services page: make all service card images a uniform size === */
.page-services .service-card img{
  width: 100%;
  height: clamp(160px, 22vw, 220px);
  object-fit: cover;
  display: block;
}
@media (max-width: 640px){
  .page-services .service-card img{ height: 200px; }
}


/* Logo image sizing */
.site-logo .logo-img{
  height: 40px;
  width: auto;
  display: block;
  border-radius: 0;
}
@media (min-width: 64rem){
  .site-logo .logo-img{ height: 48px; }
}


/* Open/Closed status badge */
.open-badge {
  display: inline-flex;
  align-items: center;
  gap: .5rem;
  padding: .25rem .6rem;
  border-radius: 999px;
  font-size: .875rem;
  font-weight: 600;
  line-height: 1;
  margin-left: 1rem;
  white-space: nowrap;
  background: #0f172a;
  color: #e2e8f0;
  border: 1px solid rgba(255,255,255,.12);
}
.open-badge .dot {
  width: .5rem;
  height: .5rem;
  border-radius: 999px;
  display: inline-block;
  background: currentColor;
}
.open-badge.open { background: #064e3b; color: #ecfdf5; }
.open-badge.closed { background: #581c1c; color: #fee2e2; }


/* Normalize service & gallery card images */
.service-card img {
  width: 100%;
  height: auto;
  max-height: 220px;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  border-radius: 4px;
  display: block;
  margin-top: var(--space-2);
}


/* ==== Fleet-only link color update (matches site brand) ==== */
/* Home: Fleet card title & CTA */
.service-card h3 a[href="fleet-services.html"]:link,
.service-card h3 a[href="fleet-services.html"]:visited {
  color: var(--rb-red-dark);
  font-weight: 700;
  text-decoration: none;
}
.service-card h3 a[href="fleet-services.html"]:hover,
.service-card h3 a[href="fleet-services.html"]:focus {
  color: var(--rb-red);
  text-decoration: underline;
}

/* Services page: Fleet section ONLY (keeps other links unchanged) */
#fleet a:link,
#fleet a:visited {
  color: var(--rb-red);
  font-weight: 700;
  text-decoration: none;
}
#fleet a:hover,
#fleet a:focus {
  color: var(--rb-red-dark);
  text-decoration: underline;
}

/* Ensure the Fleet "Learn More" link/button is on brand */
.service-card a.gallery-link[href="fleet-services.html"] {
  color: var(--rb-red);
  border-color: var(--rb-red);
}
.service-card a.gallery-link[href="fleet-services.html"]:hover,
.service-card a.gallery-link[href="fleet-services.html"]:focus {
  background: var(--rb-red-light);
  color: var(--rb-red-dark);
}
/* ==== End Fleet-only link color update ==== */


/* ==== Fleet-only link color fix (high-specificity, no variables) ==== */
/* Home: Fleet card title + link(s) */
.service-card h3 > a[href$="fleet-services.html"]:link,
.service-card h3 > a[href$="fleet-services.html"]:visited,
.service-card a.gallery-link[href$="fleet-services.html"]:link,
.service-card a.gallery-link[href$="fleet-services.html"]:visited {
  color: #C01212 !important;
  font-weight: 700;
  text-decoration: none;
  outline: none;
}

.service-card h3 > a[href$="fleet-services.html"]:hover,
.service-card h3 > a[href$="fleet-services.html"]:focus,
.service-card a.gallery-link[href$="fleet-services.html"]:hover,
.service-card a.gallery-link[href$="fleet-services.html"]:focus {
  color: #9e0f0f !important;
  text-decoration: underline;
}

/* Services page: ONLY the Fleet section (e.g., Pestcom link & internal link) */
#fleet a:link,
#fleet a:visited {
  color: #C01212 !important;
  font-weight: 700;
  text-decoration: none;
}
#fleet a:hover,
#fleet a:focus {
  color: #9e0f0f !important;
  text-decoration: underline;
}

/* Button-style link inside Fleet card/section */
#fleet .gallery-link,
.service-card a.gallery-link[href$="fleet-services.html"] {
  display: inline-block;
  border: 2px solid #C01212;
  color: #C01212 !important;
  border-radius: 10px;
  padding: .6rem 1rem;
}
#fleet .gallery-link:hover,
#fleet .gallery-link:focus,
.service-card a.gallery-link[href$="fleet-services.html"]:hover,
.service-card a.gallery-link[href$="fleet-services.html"]:focus {
  background: #C01212;
  color: #fff !important;
}
/* ==== End fleet-only fix ==== */
/* ==== Contact form layout (site-wide) ==== */
.contact-form{
  display: grid;
  gap: var(--space-3);
  max-width: 40rem;          /* keeps the form from stretching too wide */
  margin-inline: auto;       /* centers the form */
}

.contact-form label{
  font-weight: 600;
  font-size: .95rem;
}

.contact-form input[type="text"],
.contact-form input[type="tel"],
.contact-form input[type="email"],
.contact-form select,
.contact-form textarea{
  width: 100%;
  padding: var(--space-3);
  border: 1px solid var(--rb-gray-2);
  border-radius: 4px;
  font-size: 1rem;
  background: var(--rb-white);
  color: var(--rb-text);
}

.contact-form textarea{
  min-height: 7rem;
  resize: vertical;
}

.contact-form input:focus,
.contact-form select:focus,
.contact-form textarea:focus{
  border-color: var(--rb-red);
  outline: 2px solid var(--rb-red-light);
  outline-offset: 0;
}

/* Button sits nicely below fields */
.contact-form .btn{
  justify-self: start;   /* left-align; change to 'center' if you want centered */
}

/* Optional: show inline validation style if you add .error or .error-msg */
.contact-form .error{ border-color: var(--rb-error); }
.contact-form .error-msg{ color: var(--rb-error); font-size: .85rem; margin-top: -.25rem; }

/* Small helper if a status line exists under the button */
#form-status{ margin-top: var(--space-1); }



/* ==== Contact form layout override (high specificity; safe) ==== */
main .wrapper .contact-form{
  display:grid;
  gap:var(--space-3);
  max-width:40rem;
  margin-inline:auto;
}
main .wrapper .contact-form label{font-weight:600;font-size:.95rem;}
main .wrapper .contact-form input[type="text"],
main .wrapper .contact-form input[type="tel"],
main .wrapper .contact-form input[type="email"],
main .wrapper .contact-form select,
main .wrapper .contact-form textarea{
  width:100%;
  padding:var(--space-3);
  border:1px solid var(--rb-gray-2);
  border-radius:4px;
  font-size:1rem;
}
