/* Robinson Welding & Fabrication — Main Stylesheet
   Loaded after style.css (which holds the WP theme header + WP-specific overrides).
   This file contains the site design system.
   ============================================================ */

/* ── Custom Properties ──────────────────────────────────────── */
:root {
  --accent:       #B22222;
  --accent-light: #D44444;
  --bg-dark:      #0f0f0f;
  --bg-card:      #1a1a1a;
  --bg-alt:       #141414;
  --text-primary: #f0f0f0;
  --text-muted:   #888888;
  --border:       #2a2a2a;
  --font-head:    'Oswald', sans-serif;
  --font-body:    'Open Sans', sans-serif;
}

/* ── Base ───────────────────────────────────────────────────── */
html { scroll-behavior: smooth; }

/* !important overrides WP classic-theme-styles / global-styles white body */
html,
body {
  background-color: #0f0f0f !important;
  color: #f0f0f0 !important;
}

body {
  font-family: var(--font-body);
  font-size: 1rem;
  line-height: 1.7;
}

h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-head);
  letter-spacing: .04em;
  color: var(--text-primary);
}

a { color: var(--accent-light); }
a:hover { color: var(--accent); }

img { max-width: 100%; height: auto; }

/* ── Navbar ─────────────────────────────────────────────────── */
#mainNav {
  background-color: transparent !important;
  transition: background-color .3s, box-shadow .3s, padding .3s;
  padding-top: 1rem;
  padding-bottom: 1rem;
  position: fixed !important;
  top: 0;
  width: 100%;
  z-index: 1040 !important;
}

#mainNav.scrolled {
  background-color: rgba(15,15,15,.97) !important;
  box-shadow: 0 2px 20px rgba(0,0,0,.6);
  padding-top: .5rem;
  padding-bottom: .5rem;
}

.navbar-brand .brand-text {
  font-family: var(--font-head);
  font-size: 1.25rem;
  color: var(--text-primary);
  letter-spacing: .08em;
  line-height: 1.1;
}

.navbar-brand .brand-sub {
  font-family: var(--font-body);
  font-size: .65rem;
  color: var(--text-muted);
  letter-spacing: .12em;
  display: block;
}

.navbar-nav .nav-link {
  font-family: var(--font-head);
  font-size: .9rem;
  letter-spacing: .08em;
  color: rgba(240,240,240,.85) !important;
  padding: .4rem .75rem;
  transition: color .2s;
}

.navbar-nav .nav-link:hover,
.navbar-nav .nav-link.active-link,
.navbar-nav .nav-item.active > .nav-link {
  color: var(--accent-light) !important;
}

.navbar-toggler {
  border-color: var(--border);
}

.navbar-toggler-icon {
  background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 30 30'%3e%3cpath stroke='rgba%28240,240,240,0.8%29' stroke-width='2' stroke-linecap='round' stroke-miterlimit='10' d='M4 7h22M4 15h22M4 23h22'/%3e%3c/svg%3e");
}

/* Dropdown */
.dropdown-menu {
  background-color: var(--bg-card);
  border: 1px solid var(--border);
}

.dropdown-item {
  color: var(--text-primary);
  font-family: var(--font-head);
  font-size: .85rem;
  letter-spacing: .06em;
}

.dropdown-item:hover,
.dropdown-item:focus {
  background-color: var(--accent);
  color: #fff;
}

/* ── Hero ───────────────────────────────────────────────────── */
.hero-section,
section#home {
  position: relative;
  min-height: 70vh;
  max-height: 800px;
  display: flex;
  align-items: center;
  overflow: hidden;
}

.hero-bg {
  position: absolute;
  inset: 0;
  background-size: cover;
  background-position: center;
  transform: scale(1.06);
  transition: transform 1.2s ease;
}

.hero-bg.loaded { transform: scale(1); }

.hero-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, rgba(15,15,15,.88) 0%, rgba(178,34,34,.35) 100%);
}

.hero-content { position: relative; z-index: 2; }

.hero-eyebrow {
  font-family: var(--font-head);
  font-size: .85rem;
  letter-spacing: .22em;
  color: var(--accent-light);
  text-transform: uppercase;
  margin-bottom: .75rem;
}

.hero-title {
  font-family: var(--font-head);
  font-size: clamp(2.4rem, 6vw, 4.5rem);
  font-weight: 700;
  line-height: 1.05;
  color: #fff;
  text-shadow: 0 2px 20px rgba(0,0,0,.5);
}

.hero-title .accent { color: var(--accent-light); }

.hero-sub {
  font-size: clamp(.95rem, 2vw, 1.15rem);
  color: rgba(255,255,255,.8);
  max-width: 560px;
}

.hero-scroll-hint {
  position: absolute;
  bottom: 2rem;
  left: 50%;
  transform: translateX(-50%);
  z-index: 2;
  animation: bounce 2s infinite;
}

.hero-scroll-hint a { color: rgba(255,255,255,.5); font-size: 1.5rem; }
.hero-scroll-hint a:hover { color: var(--accent-light); }

@keyframes bounce {
  0%, 100% { transform: translateX(-50%) translateY(0); }
  50%       { transform: translateX(-50%) translateY(8px); }
}

/* ── Section Helpers ────────────────────────────────────────── */
.section-title {
  font-family: var(--font-head);
  font-size: clamp(1.6rem, 3vw, 2.2rem);
  letter-spacing: .06em;
  color: var(--text-primary);
}

.section-sub {
  font-size: 1rem;
  color: var(--text-muted);
  max-width: 600px;
}

.section-rule {
  border: none;
  height: 3px;
  background: linear-gradient(90deg, var(--accent) 0%, transparent 100%);
  opacity: 1;
  width: 60px;
  margin: 0;
}

.section-rule.mx-auto { margin-left: auto !important; margin-right: auto !important; }

/* ── Services ───────────────────────────────────────────────── */
#services { background-color: var(--bg-alt); }

.service-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: .5rem;
  padding: 2rem 1.5rem;
  height: 100%;
  transition: border-color .25s, transform .25s;
}

.service-card:hover {
  border-color: var(--accent);
  transform: translateY(-4px);
}

.service-icon {
  font-size: 2.6rem;
  color: var(--accent-light);
  margin-bottom: 1rem;
}

.service-card h3 {
  font-size: 1.2rem;
  letter-spacing: .06em;
  margin-bottom: .5rem;
}

.service-mini {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-left: 3px solid var(--accent);
  border-radius: .375rem;
  padding: .75rem 1rem;
  display: flex;
  align-items: center;
  gap: .75rem;
  transition: border-color .2s;
}

.service-mini:hover { border-color: var(--accent-light); }
.service-mini i { color: var(--accent-light); font-size: 1.1rem; }
.service-mini span { font-family: var(--font-head); font-size: .9rem; letter-spacing: .05em; }

/* ── About ──────────────────────────────────────────────────── */
#about { background-color: var(--bg-dark); }

.about-img-wrap {
  position: relative;
  border-radius: .5rem;
  overflow: hidden;
}

.about-img-wrap img {
  width: 100%;
  height: 420px;
  object-fit: cover;
  border-radius: .5rem;
  display: block;
}

.about-badge {
  position: absolute;
  bottom: 1.25rem;
  right: 1.25rem;
  background: var(--accent);
  color: #fff;
  border-radius: .375rem;
  padding: .75rem 1.25rem;
  text-align: center;
  font-family: var(--font-head);
  line-height: 1;
}

.about-badge .badge-num {
  font-size: 2.2rem;
  font-weight: 700;
  display: block;
}

.about-badge .badge-label {
  font-size: .7rem;
  letter-spacing: .1em;
  text-transform: uppercase;
}

.stat-box {
  border-left: 3px solid var(--accent);
  padding-left: 1rem;
}

.stat-box .stat-num {
  font-family: var(--font-head);
  font-size: 2rem;
  color: var(--accent-light);
  line-height: 1;
}

.stat-box .stat-label {
  font-size: .8rem;
  color: var(--text-muted);
  letter-spacing: .08em;
  text-transform: uppercase;
}

/* ── Why Choose Us ──────────────────────────────────────────── */
#why-choose-us { background-color: var(--bg-alt); }

.why-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: .5rem;
  padding: 1.5rem;
  height: 100%;
  transition: border-color .25s;
}

.why-card:hover { border-color: var(--accent); }

.why-icon {
  width: 48px;
  height: 48px;
  background: rgba(178,34,34,.15);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--accent-light);
  font-size: 1.25rem;
  margin-bottom: 1rem;
  flex-shrink: 0;
}

.why-card h4 {
  font-size: 1rem;
  letter-spacing: .05em;
  margin-bottom: .35rem;
}

.why-card p {
  font-size: .875rem;
  color: var(--text-muted);
  margin: 0;
}

/* ── Projects ───────────────────────────────────────────────── */
#projects { background-color: var(--bg-dark); }

.projects-nav {
  border-bottom: 1px solid var(--border);
  padding-bottom: .5rem;
  flex-wrap: wrap;
  gap: .35rem;
}

.projects-nav .nav-link {
  font-family: var(--font-head);
  font-size: .78rem;
  letter-spacing: .07em;
  color: var(--text-muted);
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 2rem;
  padding: .3rem .85rem;
  transition: all .2s;
  white-space: nowrap;
}

.projects-nav .nav-link:hover,
.projects-nav .nav-link.active {
  background: var(--accent);
  border-color: var(--accent);
  color: #fff;
}

.job-desc-bar {
  background: linear-gradient(90deg, rgba(178,34,34,.15) 0%, transparent 100%);
  border-left: 3px solid var(--accent);
  border-radius: 0 .375rem .375rem 0;
  padding: .85rem 1.25rem;
  margin-bottom: 1.25rem;
}

.job-desc-bar h4 {
  font-size: 1rem;
  letter-spacing: .06em;
  margin-bottom: .25rem;
}

.job-desc-bar p {
  font-size: .875rem;
  color: var(--text-muted);
  margin: 0;
}

.gallery-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: .75rem;
}

.gallery-item {
  position: relative;
  overflow: hidden;
  border-radius: .375rem;
  aspect-ratio: 4/3;
  background: var(--bg-card);
}

.gallery-item a {
  display: block;
  width: 100%;
  height: 100%;
}

.gallery-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform .35s;
  display: block;
}

.gallery-item:hover img { transform: scale(1.06); }

.gallery-overlay {
  position: absolute;
  inset: 0;
  background: rgba(178,34,34,.0);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background .25s;
}

.gallery-item:hover .gallery-overlay { background: rgba(178,34,34,.35); }

.gallery-overlay i {
  color: rgba(255,255,255,0);
  font-size: 1.8rem;
  transition: color .25s;
}

.gallery-item:hover .gallery-overlay i { color: rgba(255,255,255,.9); }

/* ── Contact ────────────────────────────────────────────────── */
#contact { background-color: var(--bg-alt); }

.contact-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: .5rem;
  padding: 1.5rem;
  height: 100%;
}

.contact-card h4 {
  font-size: 1rem;
  letter-spacing: .06em;
  border-bottom: 1px solid var(--border);
  padding-bottom: .5rem;
  margin-bottom: 1rem;
}

.contact-row {
  display: flex;
  align-items: flex-start;
  gap: .75rem;
  margin-bottom: .85rem;
  font-size: .9rem;
}

.contact-row i {
  color: var(--accent-light);
  margin-top: .15rem;
  width: 1rem;
  text-align: center;
  flex-shrink: 0;
}

.contact-row a { color: var(--text-primary); text-decoration: none; }
.contact-row a:hover { color: var(--accent-light); }

.map-wrap {
  border-radius: .5rem;
  overflow: hidden;
  border: 1px solid var(--border);
  height: 320px;
}

.map-wrap iframe { width: 100%; height: 100%; border: 0; }

/* ── Footer ─────────────────────────────────────────────────── */
.site-footer {
  background: #080808;
  border-top: 1px solid var(--border);
  padding: 2.5rem 0 1.5rem;
}

.footer-brand {
  display: flex;
  align-items: center;
  gap: .75rem;
  margin-bottom: .75rem;
}

.footer-brand-name {
  font-family: var(--font-head);
  font-size: 1.1rem;
  letter-spacing: .06em;
}

.footer-tagline {
  font-size: .8rem;
  color: var(--text-muted);
  font-family: var(--font-head);
  letter-spacing: .08em;
}

.footer-links {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-wrap: wrap;
  gap: .25rem 1.25rem;
}

.footer-links a {
  font-family: var(--font-head);
  font-size: .8rem;
  letter-spacing: .06em;
  color: var(--text-muted);
  text-decoration: none;
  transition: color .2s;
}

.footer-links a:hover { color: var(--accent-light); }

.footer-bottom {
  border-top: 1px solid var(--border);
  margin-top: 1.5rem;
  padding-top: 1rem;
  font-size: .78rem;
  color: var(--text-muted);
}

/* ── Back to Top ────────────────────────────────────────────── */
#back-to-top {
  position: fixed;
  bottom: 2rem;
  right: 1.5rem;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: var(--accent);
  color: #fff;
  border: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: .9rem;
  opacity: 0;
  visibility: hidden;
  transition: opacity .3s, visibility .3s, background .2s;
  z-index: 999;
  box-shadow: 0 2px 10px rgba(0,0,0,.4);
}

#back-to-top.visible { opacity: 1; visibility: visible; }
#back-to-top:hover { background: var(--accent-light); }

/* ── Buttons ────────────────────────────────────────────────── */
.btn-danger {
  background-color: var(--accent);
  border-color: var(--accent);
}

.btn-danger:hover,
.btn-danger:focus {
  background-color: var(--accent-light);
  border-color: var(--accent-light);
}

.btn-outline-danger {
  color: var(--accent-light);
  border-color: var(--accent);
}

.btn-outline-danger:hover {
  background-color: var(--accent);
  border-color: var(--accent);
  color: #fff;
}

/* ── WordPress Search Form ──────────────────────────────────── */
.search-form {
  display: flex;
  max-width: 480px;
  margin: 1rem auto;
}

.search-form .search-field {
  flex: 1;
  background: var(--bg-card);
  border: 1px solid var(--border);
  color: var(--text-primary);
  padding: .5rem 1rem;
  border-radius: .375rem 0 0 .375rem;
  font-family: var(--font-body);
}

.search-form .search-field:focus {
  outline: none;
  border-color: var(--accent);
}

.search-form .search-submit {
  background: var(--accent);
  border: 1px solid var(--accent);
  color: #fff;
  padding: .5rem 1.25rem;
  border-radius: 0 .375rem .375rem 0;
  cursor: pointer;
  font-family: var(--font-head);
  letter-spacing: .06em;
  transition: background .2s;
}

.search-form .search-submit:hover { background: var(--accent-light); }

/* ── Widget Area ────────────────────────────────────────────── */
.widget-area .widget {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: .375rem;
  padding: 1.25rem;
  margin-bottom: 1.5rem;
}

.widget-title {
  font-family: var(--font-head);
  font-size: 1rem;
  letter-spacing: .06em;
  border-bottom: 1px solid var(--border);
  padding-bottom: .5rem;
  margin-bottom: 1rem;
  color: var(--text-primary);
}

.widget ul { list-style: none; padding: 0; margin: 0; }
.widget ul li { border-bottom: 1px solid var(--border); padding: .35rem 0; font-size: .9rem; }
.widget ul li:last-child { border-bottom: none; }
.widget ul li a { color: var(--text-muted); text-decoration: none; }
.widget ul li a:hover { color: var(--accent-light); }

/* ── Blog / Post ────────────────────────────────────────────── */
.entry-title a { color: var(--text-primary); text-decoration: none; }
.entry-title a:hover { color: var(--accent-light); }
.entry-meta { font-size: .82rem; color: var(--text-muted); margin-top: .25rem; }

.blog-layout {
  display: grid;
  grid-template-columns: 1fr 300px;
  gap: 3rem;
  align-items: start;
}

@media (max-width: 991px) {
  .blog-layout { grid-template-columns: 1fr; }
}

/* ── Pagination ─────────────────────────────────────────────── */
.nav-links { display: flex; gap: .5rem; flex-wrap: wrap; }

.nav-links .page-numbers,
.nav-links a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 36px;
  height: 36px;
  padding: 0 .5rem;
  border: 1px solid var(--border);
  border-radius: .25rem;
  color: var(--text-muted);
  text-decoration: none;
  font-family: var(--font-head);
  font-size: .85rem;
  transition: all .2s;
}

.nav-links a:hover,
.nav-links .current {
  background: var(--accent);
  border-color: var(--accent);
  color: #fff;
}

/* ── Comments ───────────────────────────────────────────────── */
.comment-list { list-style: none; padding: 0; }

.comment-body {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: .375rem;
  padding: 1.25rem;
  margin-bottom: 1rem;
}

.comment-meta { font-size: .8rem; color: var(--text-muted); margin-bottom: .5rem; }
.comment-author { font-weight: 600; color: var(--text-primary); }

.comment-form textarea,
.comment-form input[type="text"],
.comment-form input[type="email"],
.comment-form input[type="url"] {
  background: var(--bg-card);
  border: 1px solid var(--border);
  color: var(--text-primary);
  border-radius: .375rem;
  padding: .5rem .75rem;
  width: 100%;
  font-family: var(--font-body);
}

.comment-form textarea:focus,
.comment-form input:focus {
  outline: none;
  border-color: var(--accent);
}

/* ── Responsive ─────────────────────────────────────────────── */
@media (max-width: 767px) {
  .about-img-wrap img { height: 260px; }
  .gallery-grid { grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); }
  .hero-title { font-size: 2.2rem; }
}

@media (max-width: 575px) {
  .gallery-grid { grid-template-columns: repeat(2, 1fr); }
  .projects-nav .nav-link { font-size: .72rem; padding: .25rem .65rem; }
}
