:root{
  --bg: #f7f7fb;
  --panel: #ffffff;
  --text: #0b1220;
  --muted: rgba(11,18,32,.68);
  --muted2: rgba(11,18,32,.52);
  --line: rgba(11,18,32,.10);

  /* Theme (Red primary + optional Yellow/Green accents) */
  --brand: #c0161d;        /* red */
  --brand2:#e11d2a;        /* brighter red */
  --accent: #f59e0b;       /* yellow (highlights) */
  --success:#16a34a;       /* green (success CTA) */

  --shadow: 0 14px 40px rgba(2,8,23,.10);
  --radius: 18px;
  --radius2: 24px;

  --container: 1180px;
}

*{box-sizing:border-box}
html,body{height:100%}
body{
  margin:0;
  font-family: Inter, system-ui, -apple-system, Segoe UI, Roboto, Arial, sans-serif;
  color:var(--text);
  background: radial-gradient(1200px 600px at 20% 0%, rgba(192,22,29,.10), transparent 55%),
              radial-gradient(900px 520px at 80% 10%, rgba(245,158,11,.12), transparent 55%),
              linear-gradient(180deg, #ffffff 0%, #f5f6fb 100%);
}

a{color:inherit; text-decoration:none}
img{max-width:100%; display:block}
button, input, select, textarea{font:inherit}

.container{
  width:min(var(--container), calc(100% - 40px));
  margin:0 auto;
}

.skip{
  position:absolute; left:-9999px; top:auto; width:1px; height:1px; overflow:hidden;
}
.skip:focus{
  left:16px; top:16px; width:auto; height:auto;
  background:#fff; padding:10px 12px; border-radius:12px;
  box-shadow: var(--shadow);
  z-index: 9999;
}

/* Header */
.header{
  position:sticky; top:0; z-index:1000;
  backdrop-filter: blur(10px);
  background: rgba(255,255,255,.78);
  border-bottom:1px solid rgba(11,18,32,.08);
}
.header-inner{
  display:flex; align-items:center; justify-content:space-between;
  padding:14px 0;
  gap:16px;
}
.brand{
  display:flex; align-items:center; gap:12px;
  font-weight:900; letter-spacing:.2px;
}
.brand img{ height:42px; width:auto; }
.brand small{
  display:block; font-weight:700;
  color: rgba(11,18,32,.56);
  letter-spacing:.08em; text-transform:uppercase; font-size:11px;
  margin-top:-4px;
}
.nav{ display:flex; align-items:center; gap:18px; }
.nav a{
  font-weight:700;
  color: rgba(11,18,32,.78);
  padding:10px 10px;
  border-radius: 12px;
}
.nav a:hover{ background: rgba(11,18,32,.04); color: rgba(11,18,32,.92); }
.nav .active{ background: rgba(192,22,29,.10); color: rgba(11,18,32,.92); }

.header-ctas{display:flex; align-items:center; gap:10px}

.btn{
  display:inline-flex; align-items:center; justify-content:center;
  gap:8px;
  border-radius: 12px;
  padding:10px 14px;
  font-weight:800;
  border:1px solid rgba(11,18,32,.12);
  background: #fff;
  cursor:pointer;
  transition: transform .08s ease, box-shadow .16s ease, background .16s ease, border-color .16s ease;
}
.btn:hover{ box-shadow: 0 12px 30px rgba(2,8,23,.10); transform: translateY(-1px); }
.btn:active{ transform: translateY(0px); box-shadow:none; }

.btn-primary{
  background: linear-gradient(180deg, var(--brand2) 0%, var(--brand) 100%);
  border-color: rgba(255,255,255,.22);
  color:#fff;
}
.btn-ghost{ background: rgba(255,255,255,.75); }
.btn-success{
  background: linear-gradient(180deg, #22c55e 0%, var(--success) 100%);
  border-color: rgba(255,255,255,.22);
  color:#fff;
}
.btn-sm{padding:9px 12px; font-weight:800}

.icon{ width:18px; height:18px; display:inline-block; }

/* Mobile */
.menu-btn{ display:none; }
.mobile-panel{
  display:none;
  border-top:1px solid rgba(11,18,32,.10);
  padding:10px 0 16px;
}
.mobile-panel a{
  display:block;
  padding:12px 10px;
  border-radius: 12px;
  font-weight:750;
  color: rgba(11,18,32,.78);
}
.mobile-panel a:hover{ background: rgba(11,18,32,.04); }
.mobile-panel.open{ display:block; }

/* Hero */
.hero{ padding: 44px 0 26px; }
.hero-grid{
  display:grid;
  grid-template-columns: 1.05fr .95fr;
  gap: 26px;
  align-items: stretch;
}
.hero-card{
  background: rgba(255,255,255,.76);
  border:1px solid rgba(11,18,32,.08);
  border-radius: var(--radius2);
  box-shadow: var(--shadow);
  padding: 34px;
}
.kicker{
  display:inline-flex; align-items:center; gap:8px;
  font-weight:900; letter-spacing:.08em; text-transform:uppercase;
  font-size:12px;
  color: rgba(11,18,32,.64);
  background: rgba(245,158,11,.12);
  border: 1px solid rgba(245,158,11,.20);
  padding:8px 10px; border-radius:999px;
}
.hero h1{
  margin:14px 0 10px;
  font-size: clamp(28px, 3.3vw, 44px);
  line-height:1.08;
  letter-spacing: -0.03em;
}
.hero h1 .brand{ color: var(--brand); }
.hero p{
  margin:0 0 18px;
  color: var(--muted);
  font-size: 16px;
  line-height: 1.55;
}
.hero-actions{ display:flex; gap:12px; flex-wrap:wrap; margin-top:10px; }

.hero-media{
  position:relative;
  border-radius: var(--radius2);
  border:1px solid rgba(11,18,32,.08);
  background: url("../img/hero.jpg");
  background-size: cover;
  background-position: center;
  box-shadow: var(--shadow);
  min-height: 340px;
  overflow:hidden;
}
.hero-media::after{
  content:"";
  position:absolute; inset:0;
  background: linear-gradient(90deg, rgba(255,255,255,.92) 0%, rgba(255,255,255,.25) 46%, rgba(255,255,255,.0) 70%);
}

.badges{
  display:grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 12px;
  margin-top: 18px;
}
.badge{
  background: rgba(255,255,255,.78);
  border:1px solid rgba(11,18,32,.08);
  border-radius: 16px;
  padding: 14px;
  display:flex; gap:10px; align-items:flex-start;
}
.badge b{display:block; font-size:14px}
.badge span{display:block; font-size:12px; color:var(--muted2); margin-top:2px}
.badge .dot{
  width:34px; height:34px; border-radius: 12px;
  background: rgba(192,22,29,.10);
  border:1px solid rgba(192,22,29,.16);
  display:grid; place-items:center;
}

/* Sections */
.section{ padding: 34px 0; }
.section h2{
  margin:0 0 12px;
  font-size: 26px;
  letter-spacing: -0.02em;
  color: rgba(11,18,32,.92);
}
.section h2 .accent{ color: var(--brand); }
.section p.lead{
  margin:0 0 18px;
  color: var(--muted);
  line-height: 1.6;
}

.grid-4{
  display:grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
}
.card{
  background: rgba(255,255,255,.78);
  border:1px solid rgba(11,18,32,.08);
  border-radius: var(--radius2);
  box-shadow: 0 10px 30px rgba(2,8,23,.06);
  overflow:hidden;
  display:flex; flex-direction:column;
  min-height: 300px;
}
.card-media{
  height: 156px;
  background-size: cover;
  background-position: center;
}
.card-body{
  padding: 16px 16px 18px;
  display:flex; flex-direction:column; gap:10px;
}
.card h3{ margin:0; font-size: 16px; letter-spacing:-0.01em; }
.card p{ margin:0; color: var(--muted); font-size: 13.5px; line-height: 1.45; }
.card .link{
  margin-top:auto;
  display:inline-flex; align-items:center; gap:8px;
  font-weight:900;
  color: var(--brand);
}

.pills{ display:flex; flex-wrap:wrap; gap:10px; margin-top: 14px; }
.pill{
  padding:8px 10px;
  border-radius: 999px;
  background: rgba(11,18,32,.04);
  border:1px solid rgba(11,18,32,.08);
  font-weight:750;
  color: rgba(11,18,32,.72);
  font-size: 13px;
}

/* Industry grid */
.grid-4b{
  display:grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 14px;
}
.tile{
  background: rgba(255,255,255,.78);
  border:1px solid rgba(11,18,32,.08);
  border-radius: var(--radius2);
  overflow:hidden;
  box-shadow: 0 10px 30px rgba(2,8,23,.06);
  display:flex; flex-direction:column;
}
.tile img{ height: 120px; width:100%; object-fit:cover; }
.tile .tile-body{ padding: 14px 14px 16px; }
.tile h3{ margin:0; font-size:15px; }
.tile p{ margin:6px 0 0; color:var(--muted); font-size: 13px; line-height:1.45; }

.grid-3{
  display:grid;
  grid-template-columns: 2fr 1fr 1fr;
  gap: 14px;
  margin-top: 14px;
}
.wide img{ height: 150px; }

/* CTA */
.cta{
  background: linear-gradient(135deg, rgba(192,22,29,.12), rgba(245,158,11,.12));
  border:1px solid rgba(11,18,32,.08);
  border-radius: var(--radius2);
  box-shadow: var(--shadow);
  padding: 26px 22px;
  display:flex; align-items:center; justify-content:space-between; gap:14px;
}
.cta h3{ margin:0; font-size: 20px; letter-spacing:-0.02em;}
.cta p{ margin:6px 0 0; color:var(--muted); max-width: 52ch; }

/* Footer */
.footer{
  margin-top: 18px;
  padding: 26px 0 32px;
  background:
    linear-gradient(180deg, rgba(192,22,29,.88) 0%, rgba(116,12,14,.92) 100%),
    url("../img/footer-texture.jpg");
  background-size: cover;
  background-position: center;
  color: rgba(255,255,255,.90);
}
.footer-grid{
  display:grid;
  grid-template-columns: 1.2fr 1fr 1fr 1fr;
  gap: 16px;
}
.footer h4{ margin:0 0 12px; font-size: 13px; letter-spacing:.08em; text-transform:uppercase; color: rgba(255,255,255,.80); }
.footer a{ display:block; padding: 6px 0; color: rgba(255,255,255,.92); }
.footer a:hover{ color: #fff; text-decoration: underline; }
.footer .muted{ color: rgba(255,255,255,.78); font-size: 13px; line-height:1.55; }
.footer .bottom{
  margin-top: 18px;
  padding-top: 16px;
  border-top: 1px solid rgba(255,255,255,.18);
  display:flex; align-items:center; justify-content:space-between; gap:12px;
  color: rgba(255,255,255,.78);
  font-size: 13px;
}

/* Page shell */
.page-hero{ padding: 34px 0 14px; }
.page-hero .box{
  background: rgba(255,255,255,.78);
  border:1px solid rgba(11,18,32,.08);
  border-radius: var(--radius2);
  box-shadow: var(--shadow);
  padding: 22px;
}
.page-hero h1{ margin:0; font-size: 30px; letter-spacing:-0.02em; }
.page-hero p{ margin:8px 0 0; color: var(--muted); line-height: 1.6; }

.two-col{ display:grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.panel{
  background: rgba(255,255,255,.78);
  border:1px solid rgba(11,18,32,.08);
  border-radius: var(--radius2);
  box-shadow: 0 10px 30px rgba(2,8,23,.06);
  padding: 18px;
}
.panel h3{ margin:0 0 8px; font-size: 16px; }
.panel p{ margin:0; color: var(--muted); line-height: 1.6; }

.form{ display:grid; gap: 12px; }
.field{ display:grid; gap: 6px; }
label{ font-weight: 750; font-size: 13px; color: rgba(11,18,32,.78); }
input, select, textarea{
  border:1px solid rgba(11,18,32,.14);
  border-radius: 12px;
  padding: 11px 12px;
  background: rgba(255,255,255,.95);
  outline:none;
}
input:focus, select:focus, textarea:focus{
  border-color: rgba(192,22,29,.45);
  box-shadow: 0 0 0 4px rgba(192,22,29,.12);
}
textarea{ min-height: 120px; resize: vertical; }

.notice{ font-size: 13px; color: var(--muted2); }

/* Responsive */
@media (max-width: 1020px){
  .grid-4{ grid-template-columns: repeat(2, 1fr); }
  .grid-4b{ grid-template-columns: repeat(2, 1fr); }
  .grid-3{ grid-template-columns: 1fr; }
  .footer-grid{ grid-template-columns: 1.2fr 1fr; }
  .hero-grid{ grid-template-columns: 1fr; }
  .hero-media{ min-height: 260px; }
  .badges{ grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 760px){
  .nav, .header-ctas{ display:none; }
  .menu-btn{ display:inline-flex; }
  .two-col{ grid-template-columns: 1fr; }
  .cta{ flex-direction: column; align-items:flex-start; }
  .footer-grid{ grid-template-columns: 1fr; }
}

/* ========== SEARCH PAGE STYLES ========== */

/* Search Results Container */
.search-results-container {
  margin: 0 auto;
  padding: 20px;
  max-width: 1000px;
}

/* Search Header */
.search-header {
  margin-bottom: 20px;
}

.search-header h2 {
  margin-bottom: 15px;
  color: var(--text);
  font-size: 24px;
  font-weight: 700;
}

.search-meta {
  margin-bottom: 15px;
}

.search-meta span {
  display: inline-block;
  margin-right: 15px;
  font-size: 14px;
  color: var(--muted);
}

.search-term strong {
  color: var(--brand);
}

/* Search Prompt (when no search term) */
.search-prompt {
  text-align: center;
  padding: 60px 20px;
  color: var(--muted);
}

.search-prompt h2 {
  margin-bottom: 10px;
  color: var(--text);
}

/* No Results */
.no-results {
  text-align: center;
  padding: 60px 20px;
  color: var(--muted);
}

.no-results h3 {
  margin-bottom: 10px;
  color: var(--text);
}

/* Search Results Table */
.search-table {
  width: 100%;
  border-collapse: collapse;
  margin: 20px 0;
  background: white;
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 4px 20px rgba(11,18,32,.08);
}

.search-table th {
  background-color: var(--brand);
  color: white;
  padding: 15px 10px;
  text-align: left;
  font-size: 16px;
  font-weight: 600;
}

.search-table td {
  padding: 15px 10px;
  font-size: 14px;
  color: var(--text);
  border-bottom: 1px solid var(--line);
}

.search-table tr:nth-child(even) {
  background-color: rgba(192,22,29,.03);
}

.search-table tr:nth-child(odd) {
  background-color: #fff;
}

.search-table tr:hover {
  background-color: rgba(192,22,29,.06);
}

/* Action buttons in table */
.search-table td span {
  display: inline-block;
  padding: 6px 12px;
  background-color: var(--brand);
  color: white;
  font-size: 12px;
  font-weight: 500;
  border-radius: 6px;
  cursor: pointer;
  transition: all 0.2s ease;
  border: 1px solid var(--brand);
}

.search-table td span:hover {
  background-color: var(--brand2);
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(192,22,29,.3);
}

/* Modal Styles */
.modal {
  display: none;
  position: fixed;
  z-index: 1000;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.5);
}

.modal-content {
  position: relative;
  background-color: white;
  margin: 5% auto;
  padding: 0;
  border: none;
  border-radius: var(--radius);
  width: 90%;
  max-width: 600px;
  box-shadow: var(--shadow);
  animation: modalSlideIn 0.3s ease-out;
}

.modal-content-rfq {
  max-width: 700px;
}

@keyframes modalSlideIn {
  from { opacity: 0; transform: translateY(-50px); }
  to { opacity: 1; transform: translateY(0); }
}

.modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 20px 25px;
  background: var(--brand);
  border-radius: var(--radius) var(--radius) 0 0;
  color: white;
}

.modal-header h2 {
  margin: 0;
  font-size: 18px;
  font-weight: 600;
}

.close {
  color: white;
  font-size: 24px;
  font-weight: bold;
  cursor: pointer;
  border: none;
  background: none;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background-color 0.2s ease;
}

.close:hover {
  background: rgba(255, 255, 255, 0.2);
}

.modal-body {
  padding: 25px;
}

.modal-body p {
  margin: 0 0 15px;
  display: flex;
  justify-content: space-between;
  padding: 10px 0;
  border-bottom: 1px solid var(--line);
}

.modal-body p:last-child {
  border-bottom: none;
}

.modal-body p strong {
  color: var(--text);
  font-weight: 600;
  min-width: 120px;
}

.modal-body span {
  color: var(--muted);
  font-family: monospace;
}

.modal-footer {
  padding: 20px 25px;
  background: rgba(192,22,29,.05);
  border-radius: 0 0 var(--radius) var(--radius);
  text-align: center;
  border-top: 1px solid var(--line);
}

.modal-footer h3 {
  margin: 0;
  font-size: 14px;
  color: var(--muted);
  font-weight: normal;
}

/* RFQ Form Styles */
#rfq-form .grid3 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
  margin-bottom: 20px;
}

#rfq-form label {
  display: block;
  margin-bottom: 15px;
}

#rfq-form label strong {
  display: block;
  margin-bottom: 5px;
  color: var(--text);
  font-size: 14px;
  font-weight: 600;
}

#rfq-form input,
#rfq-form textarea {
  width: 100%;
  padding: 10px 12px;
  border: 1px solid rgba(11,18,32,.14);
  border-radius: 8px;
  font-size: 14px;
  box-sizing: border-box;
  background: white;
}

#rfq-form input:focus,
#rfq-form textarea:focus {
  border-color: var(--brand);
  outline: none;
  box-shadow: 0 0 0 3px rgba(192,22,29,.1);
}

#rfq-form textarea {
  resize: vertical;
  min-height: 100px;
}

.alignright {
  text-align: right;
  margin-top: 20px;
  padding-top: 15px;
  border-top: 1px solid var(--line);
}

.alignright a.alt {
  display: inline-block;
  padding: 10px 16px;
  border: 1px solid rgba(11,18,32,.14);
  border-radius: 8px;
  color: var(--muted);
  text-decoration: none;
  font-size: 14px;
  margin-left: 10px;
  transition: all 0.2s ease;
  font-weight: 500;
}

.alignright a.alt:hover {
  background: rgba(11,18,32,.05);
  border-color: var(--brand);
  color: var(--brand);
}

.alignright a.alt:last-child {
  background: var(--brand);
  color: white;
  border-color: var(--brand);
}

.alignright a.alt:last-child:hover {
  background: var(--brand2);
  border-color: var(--brand2);
}

/* Pagination */
.pagination-wrapper {
  text-align: center;
  margin-top: 30px;
}

.pagination a {
  color: var(--text);
  padding: 8px 16px;
  text-decoration: none;
  transition: background-color 0.3s;
  border-radius: 6px;
  margin: 0 2px;
  display: inline-block;
}

.pagination a.active {
  background-color: var(--brand);
  color: white;
}

.pagination a:hover:not(.active) {
  background-color: rgba(11,18,32,.08);
}

/* Progress indicator */
.progress {
  margin: 0 auto;
  display: none;
  border: 4px solid #f3f3f3;
  border-top: 4px solid var(--brand);
  border-radius: 50%;
  width: 35px;
  height: 35px;
  animation: spin 1s linear infinite;
}

@keyframes spin {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

/* Responsive Design for Search */
@media (max-width: 768px) {
  .search-meta {
    display: block;
  }

  .search-meta span {
    display: block;
    margin-right: 0;
    margin-bottom: 5px;
  }

  .search-table {
    font-size: 12px;
  }

  .search-table th,
  .search-table td {
    padding: 8px 6px;
  }

  .modal-content {
    margin: 10px;
    width: calc(100% - 20px);
  }

  #rfq-form .grid3 {
    grid-template-columns: 1fr;
  }
}
