/* ============================================
   JMES Infrastructure Group — Main Stylesheet
   ============================================ */

/* --- Reset & Base --- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --black: #0c1018;
  --orange: #e07b00;
  --amber: #f5a623;
  --white: #f4f5f6;
  --gray: #6b7280;
  --bg-light: #ffffff;
  --bg-dark: #0c1018;
  --radius: 6px;
  --max-w: 1200px;
  --transition: 0.3s ease;
}

html { scroll-behavior: smooth; }

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  color: var(--black);
  background: var(--bg-light);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

img { max-width: 100%; height: auto; display: block; }
a { text-decoration: none; color: inherit; }
ul { list-style: none; }

.container { max-width: var(--max-w); margin: 0 auto; padding: 0 24px; }

/* --- Typography --- */
h1 { font-size: clamp(2rem, 5vw, 3.25rem); font-weight: 800; line-height: 1.15; }
h2 { font-size: clamp(1.5rem, 3.5vw, 2.25rem); font-weight: 700; line-height: 1.2; }
h3 { font-size: 1.25rem; font-weight: 600; }
p  { color: var(--gray); }

/* --- Buttons --- */
.btn {
  display: inline-block;
  padding: 14px 32px;
  border-radius: var(--radius);
  font-weight: 600;
  font-size: 1rem;
  cursor: pointer;
  border: none;
  transition: var(--transition);
}
.btn-primary {
  background: var(--orange);
  color: #fff;
}
.btn-primary:hover { background: #c56a00; transform: translateY(-2px); }
.btn-outline {
  background: transparent;
  color: var(--white);
  border: 2px solid var(--orange);
}
.btn-outline:hover { background: var(--orange); color: #fff; }

/* ============================================
   HEADER / NAV
   ============================================ */
.site-header {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 1000;
  background: var(--bg-dark);
  border-bottom: 1px solid rgba(255,255,255,0.08);
  transition: var(--transition);
}
.site-header.scrolled { box-shadow: 0 2px 20px rgba(0,0,0,0.4); }

.nav-wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 72px;
}

/* Logo */
.logo { font-size: 1.5rem; font-weight: 800; letter-spacing: 1px; }
.logo-jm { color: var(--white); }
.logo-bolt { color: var(--orange); }
.logo-es { color: var(--amber); }
.logo-sub {
  display: block;
  font-size: 0.6rem;
  font-weight: 600;
  letter-spacing: 3px;
  text-transform: uppercase;
  color: var(--gray);
  margin-top: -2px;
}

/* Nav links */
.nav-links { display: flex; gap: 32px; align-items: center; }
.nav-links a {
  color: var(--white);
  font-size: 0.9rem;
  font-weight: 500;
  opacity: 0.8;
  transition: var(--transition);
  position: relative;
}
.nav-links a:hover, .nav-links a.active { opacity: 1; color: var(--orange); }
.nav-links a.active::after {
  content: '';
  position: absolute;
  bottom: -4px; left: 0; right: 0;
  height: 2px;
  background: var(--orange);
  border-radius: 2px;
}

/* Mobile toggle */
.nav-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 4px;
}
.nav-toggle span {
  width: 24px;
  height: 2px;
  background: var(--white);
  border-radius: 2px;
  transition: var(--transition);
}

/* ============================================
   HERO
   ============================================ */
.hero {
  background: var(--bg-dark);
  padding: 160px 0 100px;
  position: relative;
  overflow: hidden;
}
.hero::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0; bottom: 0;
  background: radial-gradient(ellipse at 30% 50%, rgba(224,123,0,0.08) 0%, transparent 60%);
}
.hero .container { position: relative; }
.hero-content { max-width: 700px; }
.hero-label {
  display: inline-block;
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: var(--orange);
  margin-bottom: 16px;
}
.hero h1 { color: var(--white); margin-bottom: 20px; }
.hero h1 .accent { color: var(--orange); }
.hero p {
  font-size: 1.15rem;
  color: rgba(244,245,246,0.7);
  margin-bottom: 36px;
  max-width: 540px;
}
.hero-buttons { display: flex; gap: 16px; flex-wrap: wrap; }

/* ============================================
   TRUST BAR
   ============================================ */
.trust-bar {
  background: var(--bg-dark);
  border-top: 1px solid rgba(255,255,255,0.06);
  padding: 48px 0;
}
.trust-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 32px;
  text-align: center;
}
.trust-item-number {
  font-size: 2rem;
  font-weight: 800;
  color: var(--orange);
}
.trust-item-label {
  font-size: 0.85rem;
  color: var(--gray);
  margin-top: 4px;
}

/* ============================================
   SECTIONS
   ============================================ */
.section { padding: 96px 0; }
.section-dark { background: var(--bg-dark); color: var(--white); }
.section-light { background: var(--bg-light); }

.section-header {
  text-align: center;
  margin-bottom: 64px;
}
.section-header h2 { margin-bottom: 12px; }
.section-header p { max-width: 560px; margin: 0 auto; }
.section-header .accent-line {
  width: 48px;
  height: 3px;
  background: var(--orange);
  margin: 16px auto 0;
  border-radius: 2px;
}

/* ============================================
   SERVICES PILLARS (Home + Services page)
   ============================================ */
.pillars-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 32px;
}
.pillar-card {
  background: #fff;
  border: 1px solid #e5e7eb;
  border-radius: var(--radius);
  padding: 40px 32px;
  transition: var(--transition);
  position: relative;
  overflow: hidden;
}
.pillar-card::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 3px;
  background: var(--orange);
  transform: scaleX(0);
  transition: var(--transition);
}
.pillar-card:hover { transform: translateY(-4px); box-shadow: 0 12px 32px rgba(0,0,0,0.08); }
.pillar-card:hover::before { transform: scaleX(1); }

.pillar-icon {
  width: 56px;
  height: 56px;
  background: rgba(224,123,0,0.1);
  border-radius: var(--radius);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
  margin-bottom: 20px;
}
.pillar-card h3 { margin-bottom: 12px; color: var(--black); }
.pillar-card p { font-size: 0.95rem; margin-bottom: 16px; }
.pillar-card ul { margin-top: 12px; }
.pillar-card ul li {
  font-size: 0.9rem;
  color: var(--gray);
  padding: 6px 0;
  padding-left: 20px;
  position: relative;
}
.pillar-card ul li::before {
  content: '';
  position: absolute;
  left: 0;
  top: 14px;
  width: 8px;
  height: 2px;
  background: var(--orange);
}

/* ============================================
   SERVICES PAGE — Detailed
   ============================================ */
.service-detail {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 64px;
  align-items: center;
  padding: 80px 0;
  border-bottom: 1px solid #e5e7eb;
}
.service-detail:last-child { border-bottom: none; }
.service-detail.reverse { direction: rtl; }
.service-detail.reverse > * { direction: ltr; }

.service-detail-content h2 { margin-bottom: 16px; }
.service-detail-content p { margin-bottom: 20px; font-size: 1.05rem; }
.service-detail-content ul li {
  padding: 8px 0 8px 24px;
  position: relative;
  color: var(--gray);
}
.service-detail-content ul li::before {
  content: '✓';
  position: absolute;
  left: 0;
  color: var(--orange);
  font-weight: 700;
}

.service-detail-visual {
  background: var(--bg-dark);
  border-radius: var(--radius);
  padding: 60px 40px;
  text-align: center;
}
.service-detail-visual .service-icon {
  font-size: 4rem;
  margin-bottom: 16px;
}
.service-detail-visual p {
  color: var(--gray);
  font-size: 0.9rem;
}

/* ============================================
   ABOUT PAGE
   ============================================ */
.about-intro {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 64px;
  align-items: center;
}
.about-intro-content h2 { margin-bottom: 16px; }
.about-intro-content p { margin-bottom: 16px; font-size: 1.05rem; }

.about-photo {
  background: var(--bg-dark);
  border-radius: var(--radius);
  padding: 60px;
  text-align: center;
}
.about-photo-placeholder {
  width: 180px;
  height: 180px;
  border-radius: 50%;
  background: rgba(224,123,0,0.15);
  margin: 0 auto 20px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 3rem;
  color: var(--orange);
}
.about-photo h3 { color: var(--white); margin-bottom: 4px; }
.about-photo p { color: var(--gray); font-size: 0.9rem; }

/* Values */
.values-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 24px;
}
.value-card {
  text-align: center;
  padding: 40px 24px;
  border-radius: var(--radius);
  border: 1px solid rgba(255,255,255,0.08);
  transition: var(--transition);
}
.value-card:hover { border-color: var(--orange); transform: translateY(-4px); }
.value-card .value-icon {
  font-size: 2rem;
  margin-bottom: 16px;
}
.value-card h3 { color: var(--white); margin-bottom: 8px; }
.value-card p { font-size: 0.9rem; color: var(--gray); }

/* ============================================
   PROJECTS / GALLERY
   ============================================ */
.gallery-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}
.gallery-item {
  position: relative;
  aspect-ratio: 4/3;
  background: var(--bg-dark);
  border-radius: var(--radius);
  overflow: hidden;
  cursor: pointer;
}
.gallery-placeholder {
  width: 100%;
  height: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  color: var(--gray);
  font-size: 0.85rem;
  gap: 8px;
  transition: var(--transition);
}
.gallery-placeholder .icon { font-size: 2rem; opacity: 0.5; }
.gallery-item:hover .gallery-placeholder { background: rgba(224,123,0,0.05); }
.gallery-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.gallery-overlay {
  position: absolute;
  bottom: 0; left: 0; right: 0;
  padding: 20px;
  background: linear-gradient(transparent, rgba(12,16,24,0.9));
  transform: translateY(100%);
  transition: var(--transition);
}
.gallery-item:hover .gallery-overlay { transform: translateY(0); }
.gallery-overlay h3 { color: var(--white); font-size: 1rem; }
.gallery-overlay p { color: var(--gray); font-size: 0.8rem; }

/* ============================================
   CONTACT
   ============================================ */
.contact-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 64px;
}
.contact-form { display: flex; flex-direction: column; gap: 20px; }
.form-group { display: flex; flex-direction: column; gap: 6px; }
.form-group label {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--black);
}
.form-group input,
.form-group select,
.form-group textarea {
  padding: 12px 16px;
  border: 1px solid #d1d5db;
  border-radius: var(--radius);
  font-size: 1rem;
  font-family: inherit;
  transition: var(--transition);
  background: #fff;
}
.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
  outline: none;
  border-color: var(--orange);
  box-shadow: 0 0 0 3px rgba(224,123,0,0.1);
}
.form-group textarea { resize: vertical; min-height: 120px; }

.contact-info { display: flex; flex-direction: column; gap: 32px; }
.contact-info-item { display: flex; gap: 16px; align-items: flex-start; }
.contact-info-icon {
  width: 48px;
  height: 48px;
  background: rgba(224,123,0,0.1);
  border-radius: var(--radius);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.25rem;
  flex-shrink: 0;
}
.contact-info-item h3 { font-size: 1rem; margin-bottom: 4px; }
.contact-info-item p { font-size: 0.9rem; }
.contact-info-item a { color: var(--orange); }
.contact-info-item a:hover { text-decoration: underline; }

.map-placeholder {
  width: 100%;
  height: 240px;
  background: var(--bg-dark);
  border-radius: var(--radius);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--gray);
  font-size: 0.9rem;
  margin-top: 16px;
}

/* ============================================
   CTA BANNER
   ============================================ */
.cta-banner {
  background: var(--bg-dark);
  padding: 80px 0;
  text-align: center;
  position: relative;
  overflow: hidden;
}
.cta-banner::before {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse at center, rgba(224,123,0,0.1) 0%, transparent 70%);
}
.cta-banner .container { position: relative; }
.cta-banner h2 { color: var(--white); margin-bottom: 12px; }
.cta-banner p { color: var(--gray); margin-bottom: 32px; max-width: 480px; margin-left: auto; margin-right: auto; }

/* ============================================
   FOOTER
   ============================================ */
.site-footer {
  background: var(--bg-dark);
  border-top: 1px solid rgba(255,255,255,0.06);
  padding: 48px 0 24px;
}
.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: 40px;
  margin-bottom: 40px;
}
.footer-brand .logo { margin-bottom: 12px; }
.footer-brand p { font-size: 0.9rem; color: var(--gray); max-width: 280px; }
.footer-col h4 {
  color: var(--white);
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 1px;
  margin-bottom: 16px;
}
.footer-col a {
  display: block;
  color: var(--gray);
  font-size: 0.9rem;
  padding: 4px 0;
  transition: var(--transition);
}
.footer-col a:hover { color: var(--orange); }
.footer-bottom {
  border-top: 1px solid rgba(255,255,255,0.06);
  padding-top: 24px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.footer-bottom p { font-size: 0.8rem; color: var(--gray); }

/* ============================================
   FORM SUCCESS MESSAGE
   ============================================ */
.form-success {
  display: none;
  text-align: center;
  padding: 40px;
}
.form-success.show { display: block; }
.form-success .check { font-size: 3rem; margin-bottom: 12px; }
.form-success h3 { margin-bottom: 8px; }

/* ============================================
   RESPONSIVE
   ============================================ */
@media (max-width: 968px) {
  .pillars-grid { grid-template-columns: 1fr; }
  .service-detail { grid-template-columns: 1fr; gap: 32px; }
  .service-detail.reverse { direction: ltr; }
  .about-intro { grid-template-columns: 1fr; }
  .values-grid { grid-template-columns: repeat(2, 1fr); }
  .gallery-grid { grid-template-columns: repeat(2, 1fr); }
  .contact-grid { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .trust-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 768px) {
  .nav-links {
    position: fixed;
    top: 72px; left: 0; right: 0;
    background: var(--bg-dark);
    flex-direction: column;
    padding: 32px 24px;
    gap: 24px;
    transform: translateY(-120%);
    transition: var(--transition);
    border-bottom: 1px solid rgba(255,255,255,0.08);
  }
  .nav-links.open { transform: translateY(0); }
  .nav-toggle { display: flex; }

  .hero { padding: 130px 0 72px; }
  .hero h1 { font-size: 2rem; }
  .section { padding: 64px 0; }
  .footer-grid { grid-template-columns: 1fr; }
  .footer-bottom { flex-direction: column; gap: 12px; text-align: center; }
}

@media (max-width: 480px) {
  .trust-grid { grid-template-columns: 1fr 1fr; gap: 24px; }
  .values-grid { grid-template-columns: 1fr; }
  .gallery-grid { grid-template-columns: 1fr; }
  .hero-buttons { flex-direction: column; }
  .hero-buttons .btn { text-align: center; }
}
