/* ==== GLOBAL ==== */
:root {
  --brand-red:#9a0d0d;       
  --brand-red-2:#b22222;     
  --gold:#d4af37;
  --gold-dark:#b8860b;
  --bg:#fff;
  --fg:#141516;
  --muted:#5e6673;
  --radius:.75rem;
  --shadow:0 10px 22px rgba(0,0,0,.08);
}

*, *::before, *::after { box-sizing:border-box; }

body {
  margin: 0;
  font-family: Arial, Helvetica, sans-serif;
  line-height: 1.75;
  color: var(--fg);
  background:#fff; 
  font-size: 18px;
  display:flex;
  flex-direction:column;
}

h1, h2, h3, h4, h5, h6,
.brand-title {
  font-family: "Times New Roman", Arial;
}

/* ==== NAVBAR ==== */
nav {
  position: sticky;
  top: 0;
  z-index: 1000;
  background: #800000 !important;
  width: 100%;
}

nav .navbar {
  width: 100%;
  max-width: 100%;
  margin: 0;
  padding: 8px 40px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
}

.brand img {
  height: 48px;
}

.brand-title {
  font-size: 28px;
  font-weight: 700;
  color: #FFD700;
}

/* Desktop menu align right */
.nav-links {
  display: flex;
  gap: 26px;
  margin-left: auto;
}

.nav-links a {
  text-decoration: none;
  font-weight: 600;
  font-size: 18px;
  color: #FFD700;
}

.nav-links a:hover,
.nav-links a.active {
  color: #FFF5B0 !important;
}

/* ==== HAMBURGER (Mobile) ==== */
.hamburger {
  display: none;
  font-size: 28px;
  background: none;
  border: none;
  cursor: pointer;
  z-index: 1101;
  color: #FFD700 !important;
}

@media (max-width: 992px) {
  .hamburger {
    display: block;
  }
  
  .nav-links {
    position: fixed;
    top: 0;
    right: -270px;
    width: 250px;
    height: 100%;
    background: #800000;
    flex-direction: column;
    padding: 80px 20px;
    transition: right 0.3s ease;
    z-index: 1102;
  }

  .nav-links.show {
    right: 0;
  }

  .nav-links a {
    display: block;
    padding: 14px 0;
    border-bottom: 1px solid rgba(255,215,0,0.2);
  }
}

/* ==== HERO ==== */
.hero, .page-hero {
  position:relative;
  height:70vh;
  display:flex;
  align-items:center;
  justify-content:center;
  text-align:center;
  color:#ebc340; 
  text-shadow:0 2px 4px rgba(0,0,0,0.6);
  overflow:hidden;
  margin-top:0 !important;
}
.hero::before, .page-hero::before {
  content:"";
  position:absolute;
  inset:0;
  background:linear-gradient(rgba(0, 0, 0, 0.7), rgba(0,0,0,0.55));
  z-index:1;
  top: -80px;

}
.hero-inner {
  position:relative;
  z-index:2;
  max-width:800px;
  padding:20px;
}
.slide {
  position:absolute; inset:0; opacity:0;
  animation:slideFade 16s infinite;
}
.slide img {
  width:100%; height:100%;
  object-fit:cover;
  object-position:center;
}
.slide:nth-child(1){animation-delay:0s}
.slide:nth-child(2){animation-delay:4s}
.slide:nth-child(3){animation-delay:8s}
.slide:nth-child(4){animation-delay:12s}
@keyframes slideFade {
  0%,25% {opacity:1;}
  30%,100% {opacity:0;}
}
.hero h1 {
  font-size:clamp(32px,4vw,48px);
  margin:0 0 16px;
}
.hero p {
  font-size:20px;
  color:#ffe9b3;
  margin:0;
}

/* ==== SECTIONS ==== */
main { flex:1 0 auto; }

section { padding:80px 20px; }

section h2 {
  text-align:center;
  font-size:clamp(30px,4vw,42px);
  margin:0 0 20px;
  color:var(--brand-red);
}
section h2::after {
  content:""; width:60px; height:3px; background:var(--gold);
  display:block; margin:12px auto 0;
}
.container { max-width:1180px; margin:auto; }
section:nth-of-type(even){background:#f9f9f9}

/* ==== CARDS ==== */
.card {
  background:#fff;
  border-radius:var(--radius);
  box-shadow:var(--shadow);
  border-top:4px solid var(--brand-red);
  transition:.3s;
}
.card:hover { transform:translateY(-6px); }

/* === CERTIFICATES === */
.cert-section {
  padding: 80px 0;
  text-align: center;
}

.cert-grid {
  display: flex;
  justify-content: center;
  gap: 40px;
  flex-wrap: wrap;
  max-width: 1200px;
  margin: auto;
}

.cert-card {
  background: #fff;
  padding: 35px 30px;
  width: 380px;
  border-radius: 12px;
  box-shadow: 0 8px 20px rgba(0,0,0,0.1);
  text-align: center;
  transition: 0.3s;
}

.cert-card:hover {
  transform: translateY(-6px);
  box-shadow: 0 12px 26px rgba(0,0,0,0.15);
}

.cert-card img {
  height: 120px;
  margin-bottom: 20px;
  object-fit: contain;
}

.cert-card h4 {
  font-family: "Times New Roman", serif;
  color: #800000;
  margin-bottom: 5px;
  font-size: 20px;
}

.cert-card p {
  color: #555;
  margin-bottom: 25px;
  font-size: 16px;
}

/* Buttons */
.cert-btn {
  display: block;
  width: 100%;
  background: linear-gradient(90deg, #7a0000, #b30000);
  color: #fff;
  border: none;
  padding: 14px;
  border-radius: 8px;
  cursor: pointer;
  margin-bottom: 12px;
  font-size: 16px;
  font-weight: 600;
  transition: 0.2s;
}

.cert-btn:hover {
  opacity: 0.9;
}

/* Mobile */
@media (max-width: 768px) {
  .cert-card {
    width: 90%;
  }
}

/* === PDF MODAL VIEWER === */
#pdf-viewer {
  display: none; /* hidden by default */
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background: rgba(0,0,0,0.75);
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 99999;
  padding: 0 20px;
}

#pdf-viewer iframe {
  width: 80vw;
  max-width: 900px;
  height: 85vh;
  border: none;
  background: white;
  box-shadow: 0 10px 30px rgba(0,0,0,0.4);
  border-radius: 8px;
}

.close-pdf {
  position: absolute;
  top: 20px;
  right: 20px;
  background: #ffffff;
  border: none;
  font-size: 28px;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  cursor: pointer;
  z-index: 100000;
  font-weight: bold;
}
/* ==== CLIENTS ==== */
#clients { text-align:center; padding:70px 20px 80px; background:#fafafa; }

.cert-card img {
  max-height: 140px !important;
  width: 100% !important;
  object-fit: contain !important;
  object-position: center !important;
  margin: 0 auto 10px !important;
}
.cert-card img[src*="NatSteel"] { max-height:110px !important; }

.cert-card .pdf-links {
  display: flex;
  flex-direction: column;
  gap: 6px;
  text-align: center;
}

/* Make bottom 3 client logos bigger */
#clients img {
  height:100px;
  width:auto;
}

/* Only bottom row bigger */
#clients .bottom-row img {
  height:120px !important;
  width:auto !important;
  object-fit:contain;
}

/* ==== BUTTONS / GALLERY (unchanged) ==== */
.button-grid a,
.service-btn,
section a.service-link {
  display:inline-block;
  background:linear-gradient(90deg,var(--brand-red),var(--brand-red-2));
  color:#fff !important;
  padding:12px 22px;
  margin:6px;
  border-radius:8px;
  text-decoration:none !important;
  font-weight:600;
  font-family:"Times New Roman", serif;
  transition:0.25s;
}

.button-grid a:hover,
.service-btn:hover,
section a.service-link:hover {
  transform:translateY(-3px);
  background:linear-gradient(90deg,var(--brand-red-2),var(--brand-red));
}

.service-buttons,
.button-grid {
  display:flex;
  justify-content:center;
  flex-wrap:wrap;
  gap:28px;
  margin-top:30px !important;
  margin-bottom:10px !important;
}

.service-btn,
.button-grid a {
  background:linear-gradient(90deg,#640000,#b51a1a); 
  color:#fff !important;
  font-family:"Times New Roman", serif;
  font-weight:700;
  font-size:1.22rem;
  padding:18px 32px;
  border-radius:10px;
  min-width:280px;
  text-align:center;
  box-shadow:0 6px 14px rgba(0,0,0,0.18);
  transition:0.25s ease;
}

/* GALLERY */
.service-gallery.row {
  display:flex;
  justify-content:center;
  gap:30px;
  flex-wrap:wrap;
  margin-bottom:40px;
}
.service-gallery.row img {
  width:45%;
  min-width:280px;
  height:220px;
  object-fit:cover;
  border-radius:14px;
  box-shadow:0 6px 18px rgba(0,0,0,0.12);
}
.service-gallery.stack {
  display:flex;
  flex-direction:column;
  gap:30px;
  align-items:center;
}
.service-gallery.stack img {
  width:90%;
  max-width:700px;
  height:auto;
  border-radius:14px;
  box-shadow:0 6px 18px rgba(0,0,0,0.12);
}
@media(max-width:768px){
  .service-gallery.row img {
    width:90%;
    height:200px;
  }
}

/* ==== FOOTER ==== */
footer, .site-footer {
  background:var(--brand-red);
  color:#fff;
  text-align:center;
  padding:20px 0;
  font-size:16px;
}

/* === Sticky Footer Fix (final) === */
html, body {
  height: 100%;
}

body {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

main {
  flex: 1;
}

footer {
  margin-top: auto;
}

nav, .navbar, .top-divider {
  border: none !important;
  margin: 0 !important;
  padding: 20 !important;
}

nav {
  border-bottom: none !important;
  box-shadow: none !important;
}

/* ==== HERO SLIDESHOW ==== */
.hero {
  position: relative;
  height: 55vh;
  min-height: 380px;
  overflow: hidden;
}

.slide img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

html, body {
  height: 100%;
}

body {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

main {
  flex: 1;
}

footer {
  margin-top: auto;
}

.hero,
.page-hero {
  margin-top: -2px !important;
}

/* Move workshop gallery section up */
.workshop-tight {
  margin-top: -70px !important;
}

/* === CLIENT LOGO RESPONSIVE FIX === */

#clients .client-row {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 40px;
}

#clients img {
  height: 70px;
  width: auto;
  object-fit: contain;
}

/* Mobile layout */
@media (max-width: 600px) {
  #clients .client-row {
    gap: 25px;
  }

  #clients img {
    height: 55px;
  }
}

/* Ultra small phones */
@media (max-width: 400px) {
  #clients .client-row {
    gap: 18px;
  }

  #clients img {
    height: 50px;
  }
}

.cert-btn {
  background: linear-gradient(90deg, #6c0707, #a60d0d);
  color: #fff;
  border: none;
  padding: 12px 20px;
  margin-top: 8px;
  border-radius: 6px;
  cursor: pointer;
  font-size: 16px;
  font-family: Arial, sans-serif;
  font-weight: 600;
  transition: 0.3s ease;
  width: 100%;
  box-shadow: 0 4px 12px rgba(0,0,0,0.12);
}

.cert-btn:hover {
  background: linear-gradient(90deg, #720606, #b30000);
  transform: translateY(-2px);
  box-shadow: 0 6px 18px rgba(0,0,0,0.18);
}

#pdf-viewer {
  display: none; /* hide on page load */
  position: fixed;
  top: 0; left: 0;
  width: 100vw;
  height: 100vh;
  background: rgba(0,0,0,0.8);
  justify-content: center;
  align-items: center;
  z-index: 9999;
}

.back-btn {
  display: inline-block;
  background: linear-gradient(90deg, #7b0000, #b10000);
  color: #fff;
  padding: 14px 32px;
  border-radius: 8px;
  font-size: 18px;
  font-weight: 600;
  text-decoration: none;
  transition: 0.25s ease-in-out;
  box-shadow: 0 5px 12px rgba(0, 0, 0, 0.15);
}

.back-btn:hover {
  background: linear-gradient(90deg, #b10000, #7b0000);
  transform: translateY(-2px);
}

/* Prevent overlay showing on desktop or when menu is closed */
.overlay {
  display: none !important;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0,0,0,0.5);
  z-index: 900;
}

/* Show overlay only when mobile menu opens */
.nav-links.show + .overlay {
  display: block !important;
}

/* Mobile only */
@media (max-width: 1200px) {
  .overlay {
    display: none;
  }

  .nav-links.show + .overlay {
    display: block !important;
  }
}

/* === FORCE NAV ITEMS TO RIGHT === */
nav .navbar {
  display: flex;
  align-items: center;
  justify-content: space-between !important;
}

.nav-links {
  margin-left: auto !important;
  display: flex;
  align-items: center;
}
@media (min-width: 1201px) {
  .nav-links {
    position: static !important;
  }
}

 /* ===== FIX NAV ALIGNMENT (TIGHT SPACING) ===== */
nav .navbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.nav-links {
  display: flex;
  gap: 14px; /* ✅ much tighter */
  align-items: center;
}

.nav-links a {
  padding: 0;
  margin: 0;
  white-space: nowrap;
  font-size: 17px; /* slightly smaller for neat fit */
}

/* Desktop reduce extra margin */
@media (min-width:1201px) {
  .navbar {
    padding-right: 16px;
  }
}

/* Mobile menu unaffected */
@media (max-width:1200px) {
  .nav-links {
    flex-direction: column;
    gap: 10px;
  }
}

/* === LOGO FAR LEFT & PAGE NAMES FAR RIGHT === */
nav {
  background: #800000;
}

nav .navbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  width: 100%;
  max-width: none !important; /* remove centered constraint */
  margin: 0;
  padding: 8px 40px; /* spacing from left/right edges */
}

.brand {
  margin-right: auto; /* push logo to far left */
}

.nav-links {
  margin-left: auto; /* push links to far right */
  display: flex;
  gap: 26px;
  align-items: center;
}

.nav-links a {
  text-decoration: none;
  color: #FFD700;
  font-weight: 600;
  font-size: 18px;
  white-space: nowrap;
}

/* === PROJECTS PAGE GRID === */
.portfolio-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr)); /* 3 per row */
  gap: 35px;
  justify-items: center;
  padding: 40px 0;
  max-width: 1200px;
  margin: 0 auto;
}

.project-card {
  width: 100%;
  max-width: 360px;
  background: #fff;
  border-radius: 14px;
  overflow: hidden;
  box-shadow: 0 8px 20px rgba(0,0,0,0.15);
  transition: transform 0.25s ease;
}

.project-card:hover {
  transform: translateY(-4px);
}

.project-card img {
  width: 100%;
  height: 230px;
  object-fit: cover;
  display: block;
}

.project-label {
  text-align: center;
  padding: 10px 0 14px;
  background: #fff;
}

.project-label h3 {
  font-family: "Times New Roman", serif;
  font-size: 1.05rem;
  color: var(--brand-red);
  margin: 0;
}

/* Responsive */
@media (max-width: 900px) {
  .portfolio-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 600px) {
  .portfolio-grid {
    grid-template-columns: repeat(1, minmax(0, 1fr));
  }

  .project-card img {
    height: 260px;
  }
}
