/* F&N Engineering - Main Stylesheet */
:root {
  --navy: #0a2540;
  --navy-dark: #061a30;
  --navy-light: #1a3a5c;
  --orange: #f47b20;
  --orange-dark: #d66614;
  --orange-light: #ff9248;
  --gray: #6b7280;
  --gray-light: #f3f4f6;
  --gray-border: #e5e7eb;
  --white: #ffffff;
  --text: #1f2937;
  --text-light: #4b5563;
  --max-width: 1200px;
  --radius: 10px;
  --shadow: 0 4px 20px rgba(10, 37, 64, 0.08);
  --shadow-lg: 0 10px 40px rgba(10, 37, 64, 0.15);
  --transition: all 0.3s ease;
}

* { margin: 0; padding: 0; box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  color: var(--text);
  line-height: 1.6;
  background: var(--white);
  overflow-x: hidden;
}

img { max-width: 100%; height: auto; display: block; }
a { color: var(--navy); text-decoration: none; transition: var(--transition); }
a:hover { color: var(--orange); }

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

.skip-link {
  position: absolute; top: -40px; left: 0; background: var(--navy); color: #fff;
  padding: 8px 16px; z-index: 9999;
}
.skip-link:focus { top: 0; }

/* Buttons */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 12px 24px; border-radius: 6px; font-weight: 600; font-size: 15px;
  border: 2px solid transparent; cursor: pointer; transition: var(--transition);
  text-align: center; line-height: 1.2;
}
.btn-primary { background: var(--orange); color: #fff; border-color: var(--orange); }
.btn-primary:hover { background: var(--orange-dark); border-color: var(--orange-dark); color: #fff; transform: translateY(-2px); box-shadow: 0 6px 20px rgba(244, 123, 32, 0.4); }
.btn-secondary { background: var(--navy); color: #fff; border-color: var(--navy); }
.btn-secondary:hover { background: var(--navy-light); color: #fff; }
.btn-outline { background: transparent; color: var(--white); border-color: rgba(255,255,255,0.6); }
.btn-outline:hover { background: rgba(255,255,255,0.1); color: #fff; }
.btn-lg { padding: 16px 32px; font-size: 17px; }

/* Top Bar */
.top-bar { background: var(--navy-dark); color: #cbd5e1; font-size: 13px; padding: 8px 0; }
.top-bar-inner { display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 8px; }
.top-bar-left, .top-bar-right { display: flex; align-items: center; gap: 20px; flex-wrap: wrap; }
.top-bar-item { display: inline-flex; align-items: center; gap: 6px; color: #cbd5e1; }
.top-bar-item a { color: #cbd5e1; }
.top-bar-item svg { flex-shrink: 0; }

/* Header */
.site-header {
  background: rgba(255,255,255,0.98);
  box-shadow: var(--shadow);
  position: sticky; top: 0; z-index: 1000;
  backdrop-filter: blur(10px);
}
.header-inner { display: flex; justify-content: space-between; align-items: center; padding: 14px 20px; }
.brand { display: flex; align-items: center; gap: 12px; }
.brand img { height: 56px; width: auto; }
.brand-text { display: flex; flex-direction: column; line-height: 1.1; }
.brand-text { font-weight: 800; color: var(--navy); font-size: 18px; }
.brand-text small { font-size: 11px; color: var(--gray); font-weight: 500; letter-spacing: 0.5px; }

/* Navigation */
.main-nav { display: flex; align-items: center; }
.nav-list { display: flex; list-style: none; align-items: center; gap: 6px; }
.nav-list > li > a {
  display: block; padding: 10px 14px; font-weight: 600; color: var(--navy);
  font-size: 15px; border-radius: 6px;
}
.nav-list > li > a:hover { background: var(--gray-light); color: var(--orange); }
.nav-cta { background: var(--orange) !important; color: #fff !important; margin-left: 8px; }
.nav-cta:hover { background: var(--orange-dark) !important; }

.has-submenu { position: relative; }
.submenu {
  position: absolute; top: 100%; left: 0; background: #fff; box-shadow: var(--shadow-lg);
  list-style: none; min-width: 240px; border-radius: 8px; padding: 8px 0;
  opacity: 0; visibility: hidden; transform: translateY(10px); transition: var(--transition);
  z-index: 100;
}
.has-submenu:hover .submenu { opacity: 1; visibility: visible; transform: translateY(0); }
.submenu li a { display: block; padding: 10px 18px; color: var(--text); font-size: 14px; }
.submenu li a:hover { background: var(--gray-light); color: var(--orange); padding-left: 22px; }

.nav-toggle { display: none; flex-direction: column; gap: 5px; background: none; border: none; cursor: pointer; padding: 8px; }
.nav-toggle span { width: 26px; height: 3px; background: var(--navy); border-radius: 2px; transition: var(--transition); }

/* Hero */
.hero {
  position: relative; background: linear-gradient(135deg, var(--navy-dark) 0%, var(--navy) 50%, var(--navy-light) 100%);
  color: #fff; padding: 100px 0 80px; overflow: hidden;
}
.hero::before {
  content: ''; position: absolute; top: 0; right: 0; width: 50%; height: 100%;
  background: radial-gradient(circle at 70% 30%, rgba(244,123,32,0.25), transparent 60%);
}
.hero-inner { position: relative; z-index: 2; display: grid; grid-template-columns: 1.1fr 0.9fr; gap: 50px; align-items: center; }
.hero-badge {
  display: inline-flex; align-items: center; gap: 8px; background: rgba(244,123,32,0.15);
  border: 1px solid rgba(244,123,32,0.4); color: var(--orange-light);
  padding: 6px 14px; border-radius: 50px; font-size: 13px; font-weight: 600; margin-bottom: 20px;
}
.hero h1 { font-size: clamp(32px, 5vw, 52px); font-weight: 900; line-height: 1.1; margin-bottom: 18px; }
.hero h1 .accent { color: var(--orange); }
.hero p.lead { font-size: 18px; color: #cbd5e1; margin-bottom: 28px; max-width: 560px; }
.hero-actions { display: flex; gap: 14px; flex-wrap: wrap; }
.hero-stats { display: flex; gap: 30px; margin-top: 40px; flex-wrap: wrap; }
.hero-stat .num { font-size: 32px; font-weight: 900; color: var(--orange); }
.hero-stat .label { font-size: 13px; color: #94a3b8; text-transform: uppercase; letter-spacing: 0.5px; }

.hero-visual {
  position: relative; aspect-ratio: 4/3; border-radius: 16px; overflow: hidden;
  background: linear-gradient(135deg, #1a3a5c, #0a2540);
  box-shadow: var(--shadow-lg); border: 1px solid rgba(255,255,255,0.1);
}
.hero-visual .placeholder {
  width: 100%; height: 100%; display: flex; align-items: center; justify-content: center;
  background: repeating-linear-gradient(45deg, rgba(255,255,255,0.02), rgba(255,255,255,0.02) 10px, rgba(255,255,255,0.05) 10px, rgba(255,255,255,0.05) 20px);
  color: rgba(255,255,255,0.3); font-size: 14px;
}

/* Sections */
.section { padding: 80px 0; }
.section-alt { background: var(--gray-light); }
.section-dark { background: var(--navy); color: #fff; }
.section-header { text-align: center; max-width: 720px; margin: 0 auto 50px; }
.section-eyebrow { color: var(--orange); font-weight: 700; text-transform: uppercase; letter-spacing: 1.5px; font-size: 13px; margin-bottom: 10px; display: block; }
.section-header h2 { font-size: clamp(28px, 4vw, 40px); font-weight: 800; color: var(--navy); margin-bottom: 14px; }
.section-dark .section-header h2 { color: #fff; }
.section-header p { color: var(--text-light); font-size: 17px; }
.section-dark .section-header p { color: #cbd5e1; }

/* Grid helpers */
.grid-2 { display: grid; grid-template-columns: repeat(2, 1fr); gap: 30px; }
.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 28px; }
.grid-4 { display: grid; grid-template-columns: repeat(4, 1fr); gap: 24px; }

/* Cards */
.card {
  background: #fff; border-radius: var(--radius); padding: 28px; box-shadow: var(--shadow);
  transition: var(--transition); border: 1px solid var(--gray-border);
}
.card:hover { transform: translateY(-6px); box-shadow: var(--shadow-lg); border-color: var(--orange); }
.card-icon {
  width: 56px; height: 56px; border-radius: 12px; background: linear-gradient(135deg, var(--orange), var(--orange-dark));
  display: flex; align-items: center; justify-content: center; color: #fff; margin-bottom: 18px;
}
.card h3 { font-size: 20px; color: var(--navy); margin-bottom: 10px; }
.card p { color: var(--text-light); font-size: 15px; }

/* Service cards */
.service-card { position: relative; overflow: hidden; }
.service-card .card-icon { background: rgba(10,37,64,0.08); color: var(--navy); }
.service-card:hover .card-icon { background: linear-gradient(135deg, var(--orange), var(--orange-dark)); color: #fff; }
.service-card .learn-more { display: inline-flex; align-items: center; gap: 6px; color: var(--orange); font-weight: 600; margin-top: 14px; font-size: 14px; }
.service-card:hover .learn-more { gap: 10px; }

/* About */
.about-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 50px; align-items: center; }
.about-image { aspect-ratio: 4/3; border-radius: var(--radius); overflow: hidden; background: var(--gray-light); position: relative; }
.about-image .placeholder { width: 100%; height: 100%; display: flex; align-items: center; justify-content: center; color: var(--gray); }
.about-image::after {
  content: ''; position: absolute; bottom: -20px; right: -20px; width: 120px; height: 120px;
  background: var(--orange); border-radius: 16px; z-index: -1;
}
.about-features { list-style: none; margin: 20px 0; }
.about-features li { padding: 10px 0; display: flex; align-items: center; gap: 12px; color: var(--text); }
.about-features li svg { color: var(--orange); flex-shrink: 0; }

/* Why choose */
.why-item { text-align: center; padding: 30px 20px; }
.why-icon {
  width: 70px; height: 70px; margin: 0 auto 18px; border-radius: 50%;
  background: rgba(244,123,32,0.1); display: flex; align-items: center; justify-content: center;
  color: var(--orange);
}
.why-item h3 { color: #fff; margin-bottom: 10px; }
.why-item p { color: #cbd5e1; font-size: 14px; }

/* Projects */
.project-card {
  position: relative; border-radius: var(--radius); overflow: hidden; aspect-ratio: 4/3;
  background: linear-gradient(135deg, var(--navy-light), var(--navy-dark));
}
.project-card .placeholder { width: 100%; height: 100%; display: flex; align-items: center; justify-content: center; color: rgba(255,255,255,0.4); }
.project-overlay {
  position: absolute; inset: 0; background: linear-gradient(to top, rgba(10,37,64,0.95), rgba(10,37,64,0.2));
  display: flex; flex-direction: column; justify-content: flex-end; padding: 24px; opacity: 0; transition: var(--transition);
}
.project-card:hover .project-overlay { opacity: 1; }
.project-overlay h3 { color: #fff; font-size: 20px; margin-bottom: 6px; }
.project-overlay span { color: var(--orange-light); font-size: 13px; font-weight: 600; }

/* Process */
.process-steps { display: grid; grid-template-columns: repeat(4, 1fr); gap: 24px; counter-reset: step; }
.process-step { text-align: center; position: relative; }
.process-step::before {
  counter-increment: step; content: counter(step);
  width: 50px; height: 50px; border-radius: 50%; background: var(--orange); color: #fff;
  display: flex; align-items: center; justify-content: center; font-weight: 800; font-size: 20px;
  margin: 0 auto 16px;
}
.process-step h4 { color: var(--navy); margin-bottom: 8px; }
.process-step p { color: var(--text-light); font-size: 14px; }

/* Testimonials */
.testimonial-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 28px; }
.testimonial { background: #fff; padding: 28px; border-radius: var(--radius); box-shadow: var(--shadow); border-left: 4px solid var(--orange); }
.testimonial p { color: var(--text); font-style: italic; margin-bottom: 18px; }
.testimonial-author { display: flex; align-items: center; gap: 12px; }
.testimonial-avatar { width: 44px; height: 44px; border-radius: 50%; background: var(--navy); color: #fff; display: flex; align-items: center; justify-content: center; font-weight: 700; }
.testimonial-author strong { display: block; color: var(--navy); }
.testimonial-author span { color: var(--gray); font-size: 13px; }

/* CTA Banner */
.cta-banner {
  background: linear-gradient(135deg, var(--orange) 0%, var(--orange-dark) 100%);
  color: #fff; padding: 50px 0;
}
.cta-inner { display: flex; justify-content: space-between; align-items: center; gap: 30px; flex-wrap: wrap; }
.cta-banner h2 { font-size: 28px; margin-bottom: 6px; }
.cta-banner p { font-size: 16px; opacity: 0.95; }
.cta-banner .btn { background: #fff; color: var(--navy); border-color: #fff; }
.cta-banner .btn:hover { background: var(--navy); color: #fff; }

/* Footer */
.site-footer { background: var(--navy-dark); color: #cbd5e1; padding: 60px 0 0; }
.footer-grid { display: grid; grid-template-columns: 1.4fr 1fr 1fr 1.3fr; gap: 40px; padding-bottom: 40px; }
.footer-brand img { height: 48px; width: auto; margin-bottom: 12px; }
.footer-brand p { color: var(--orange); font-weight: 700; margin-bottom: 14px; }
.footer-desc { font-size: 14px; line-height: 1.7; margin-bottom: 18px; }
.footer-col h3 { color: #fff; font-size: 17px; margin-bottom: 18px; }
.footer-links { list-style: none; }
.footer-links li { margin-bottom: 10px; }
.footer-links a { color: #cbd5e1; font-size: 14px; }
.footer-links a:hover { color: var(--orange); padding-left: 4px; }
.footer-contact { list-style: none; font-size: 14px; }
.footer-contact li { margin-bottom: 12px; line-height: 1.6; }
.footer-contact a { color: var(--orange-light); }
.footer-bottom { border-top: 1px solid rgba(255,255,255,0.1); padding: 20px 0; font-size: 13px; }
.footer-bottom-inner { display: flex; justify-content: space-between; flex-wrap: wrap; gap: 10px; }

/* Floating contact */
.float-contact { position: fixed; right: 20px; bottom: 20px; z-index: 999; display: flex; flex-direction: column; gap: 10px; }
.float-btn {
  width: 52px; height: 52px; border-radius: 50%; display: flex; align-items: center; justify-content: center;
  color: #fff; box-shadow: var(--shadow-lg); transition: var(--transition);
}
.float-btn:hover { transform: scale(1.1); color: #fff; }
.float-call { background: var(--navy); }
.float-email { background: var(--orange); }

/* Page header */
.page-header {
  background: linear-gradient(135deg, var(--navy-dark), var(--navy));
  color: #fff; padding: 70px 0 60px; text-align: center; position: relative; overflow: hidden;
}
.page-header::after { content: ''; position: absolute; inset: 0; background: radial-gradient(circle at 80% 20%, rgba(244,123,32,0.2), transparent 60%); }
.page-header-inner { position: relative; z-index: 2; }
.page-header h1 { font-size: clamp(30px, 5vw, 44px); font-weight: 800; margin-bottom: 12px; }
.page-header .breadcrumb { font-size: 14px; color: #cbd5e1; }
.page-header .breadcrumb a { color: var(--orange-light); }

/* Breadcrumbs */
.breadcrumb-nav { padding: 14px 0; background: var(--gray-light); font-size: 13px; color: var(--gray); }
.breadcrumb-nav a { color: var(--navy); }

/* Contact form */
.contact-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 50px; }
.contact-info-box { background: var(--navy); color: #fff; padding: 36px; border-radius: var(--radius); }
.contact-info-box h3 { color: #fff; margin-bottom: 20px; }
.contact-info-list { list-style: none; }
.contact-info-list li { padding: 14px 0; border-bottom: 1px solid rgba(255,255,255,0.1); display: flex; gap: 14px; }
.contact-info-list li:last-child { border-bottom: none; }
.contact-info-list svg { color: var(--orange); flex-shrink: 0; margin-top: 3px; }
.contact-info-list strong { display: block; color: #fff; margin-bottom: 2px; }
.contact-info-list span, .contact-info-list a { color: #cbd5e1; font-size: 14px; }

.form-group { margin-bottom: 18px; }
.form-group label { display: block; font-weight: 600; color: var(--navy); margin-bottom: 6px; font-size: 14px; }
.form-group label .req { color: var(--orange); }
.form-control {
  width: 100%; padding: 12px 14px; border: 1.5px solid var(--gray-border); border-radius: 8px;
  font-family: inherit; font-size: 15px; transition: var(--transition); background: #fff;
}
.form-control:focus { outline: none; border-color: var(--orange); box-shadow: 0 0 0 3px rgba(244,123,32,0.15); }
textarea.form-control { min-height: 140px; resize: vertical; }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.form-alert { padding: 14px 16px; border-radius: 8px; margin-bottom: 18px; font-size: 14px; }
.form-alert.success { background: #dcfce7; color: #166534; border: 1px solid #86efac; }
.form-alert.error { background: #fee2e2; color: #991b1b; border: 1px solid #fca5a5; }

/* Map embed */
.map-embed { width: 100%; height: 350px; border: 0; border-radius: var(--radius); margin-top: 30px; }

/* Service detail page */
.service-hero { background: linear-gradient(135deg, var(--navy-dark), var(--navy)); color: #fff; padding: 80px 0; }
.service-hero-inner { display: grid; grid-template-columns: 1.2fr 0.8fr; gap: 40px; align-items: center; }
.service-hero h1 { font-size: clamp(28px, 4vw, 42px); margin-bottom: 16px; }
.service-hero p { color: #cbd5e1; font-size: 17px; margin-bottom: 24px; }
.service-content { padding: 60px 0; }
.service-content h2 { color: var(--navy); font-size: 26px; margin: 30px 0 14px; }
.service-content h2:first-child { margin-top: 0; }
.service-content ul { padding-left: 20px; margin: 14px 0; }
.service-content li { margin-bottom: 8px; color: var(--text-light); }
.service-sidebar { background: var(--gray-light); padding: 28px; border-radius: var(--radius); position: sticky; top: 120px; }
.service-sidebar h3 { color: var(--navy); margin-bottom: 16px; }
.service-sidebar ul { list-style: none; }
.service-sidebar li { padding: 10px 0; border-bottom: 1px solid var(--gray-border); }
.service-sidebar li a { color: var(--text); font-size: 14px; }
.service-sidebar li a:hover { color: var(--orange); }

/* Responsive */
@media (max-width: 968px) {
  .hero-inner, .about-grid, .contact-grid, .service-hero-inner { grid-template-columns: 1fr; gap: 30px; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .grid-3, .testimonial-grid { grid-template-columns: repeat(2, 1fr); }
  .grid-4, .process-steps { grid-template-columns: repeat(2, 1fr); }
  .nav-toggle { display: flex; }
  .nav-list {
    position: absolute; top: 100%; left: 0; right: 0; background: #fff; flex-direction: column;
    align-items: stretch; padding: 12px; box-shadow: var(--shadow-lg); gap: 4px;
    display: none;
  }
  .nav-list.open { display: flex; }
  .nav-list > li > a { padding: 12px 14px; }
  .submenu { position: static; opacity: 1; visibility: visible; transform: none; box-shadow: none; padding-left: 14px; }
  .has-submenu:hover .submenu { display: block; }
}

@media (max-width: 600px) {
  .section { padding: 50px 0; }
  .hero { padding: 60px 0 50px; }
  .grid-2, .grid-3, .grid-4, .testimonial-grid, .process-steps, .footer-grid { grid-template-columns: 1fr; }
  .form-row { grid-template-columns: 1fr; }
  .hero-stats { gap: 20px; }
  .hero-stat .num { font-size: 26px; }
  .brand-text small { display: none; }
  .float-contact { right: 12px; bottom: 12px; }
  .float-btn { width: 46px; height: 46px; }
}

/* Hero glow (decorative) */
.hero-glow {
  position: absolute; top: -25%; right: -12%; width: 620px; height: 620px;
  background: radial-gradient(circle, rgba(244,123,32,0.38), rgba(244,123,32,0) 65%);
  filter: blur(18px); pointer-events: none; z-index: 1;
  animation: heroGlow 6s ease-in-out infinite;
}
@keyframes heroGlow {
  0%, 100% { opacity: 0.65; transform: scale(1); }
  50% { opacity: 1; transform: scale(1.08); }
}

/* Image placeholders (drop-in ready) */
.hero-visual, .about-image, .project-card { position: relative; }
.ph-img { width: 100%; height: 100%; object-fit: cover; display: block; }
.ph-img.is-missing { opacity: 0; }
.ph-label {
  position: absolute; top: 12px; left: 12px; z-index: 3;
  background: rgba(10,37,64,0.82); color: #fff; font-size: 12px; font-weight: 600;
  padding: 6px 12px; border-radius: 50px; letter-spacing: 0.3px;
  border: 1px solid rgba(255,255,255,0.18); pointer-events: none;
}
.hero-visual:has(.ph-img:not(.is-missing)) .ph-label,
.about-image:has(.ph-img:not(.is-missing)) .ph-label,
.project-card:has(.ph-img:not(.is-missing)) .ph-label { display: none; }
.project-card:hover .ph-label { opacity: 0; }

/* FAQ accordion */
.faq-list { display: flex; flex-direction: column; gap: 12px; }
.faq-item {
  background: #fff; border: 1px solid var(--gray-border); border-radius: var(--radius);
  overflow: hidden; box-shadow: var(--shadow); transition: var(--transition);
}
.faq-item:hover { border-color: var(--orange); }
.faq-item summary {
  cursor: pointer; padding: 18px 22px; font-weight: 700; color: var(--navy); font-size: 16px;
  list-style: none; display: flex; justify-content: space-between; align-items: center; gap: 14px;
}
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item summary::after { content: '+'; color: var(--orange); font-size: 22px; font-weight: 800; line-height: 1; }
.faq-item[open] summary::after { content: '\2013'; }
.faq-item p { padding: 0 22px 20px; color: var(--text-light); font-size: 15px; }

/* Utility */
.text-center { text-align: center; }
.mt-40 { margin-top: 40px; }
.mb-40 { margin-bottom: 40px; }
.orange { color: var(--orange); }
