* { margin: 0; padding: 0; box-sizing: border-box; }
:root { --nav-h: 88px; }

html { scroll-behavior: smooth; scroll-padding-top: var(--nav-h); }

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  line-height: 1.6;
  color: #ffffff;
  background-color: var(--primary-blue);
  overflow-x: hidden;
}

/* lock page scroll when mobile menu open */
body.menu-open { overflow: hidden; }

:root {
  --accent-orange: #2446ff;
  --light-orange: #dbeafe;
  --primary-blue: #2446ff;
  --secondary-blue: #1e3a8a;
  --black: #1a1a1a;
  --dark-gray: #1f2937;
  --medium-gray: #6b7280;
  --light-gray: #f3f4f6;
  --white: #ffffff;
  --shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
  --shadow-lg: 0 20px 25px -5px rgba(0, 0, 0, 0.1);
}

h1, h2, h3, h4, h5, h6 { font-weight: 600; line-height: 1.2; margin-bottom: 1rem; }
h1 { font-size: 3.5rem; }
h2 { font-size: 2.5rem; }
h3 { font-size: 1.875rem; }
h4 { font-size: 1.5rem; }

p { margin-bottom: 1rem; color: var(--medium-gray); }

.container { max-width: 1200px; margin: 0 auto; padding: 0 2rem; }

.navbar { position: fixed; top: 0; width: 100%; background: var(--white); z-index: 1100; transition: all 0.3s ease; }

.nav-container {
  max-width: 1200px; margin: 0 auto; padding: 0 2rem;
  display: flex; justify-content: space-between; align-items: center; height: 88px;
}

.nav-logo { display: flex; align-items: center; gap: 0.5rem; }
.nav-logo-img { height: 90px; width: auto; display: block; }
.brand-link { color: inherit; text-decoration: none; }
.brand-link:hover { color: inherit; }

.nav-menu { display: flex; list-style: none; gap: 2rem; }
.nav-link { text-decoration: none; color: var(--black); font-weight: 500; transition: color 0.3s ease; position: relative; }
.nav-link:hover { color: var(--primary-blue); }

.hamburger { display: none; flex-direction: column; cursor: pointer; }
.bar { width: 25px; height: 3px; background: var(--black); margin: 3px 0; transition: 0.3s; }

/* Hero */
.hero {
  padding: 0;
  min-height: calc(100vh);
  background: linear-gradient(120deg, #1e3a8a, #2446ff, #3b82f6);
  background-size: 200% 200%;
  animation: blueFlow 12s ease infinite;
  color: var(--white);
  position: relative;
  overflow: hidden;
  display: flex; align-items: center;
}

.hero-container {
  width: 100%; max-width: 1200px; margin: 0 auto;
  padding: 88px 2rem 2rem; text-align: left;
}

@media (max-width: 768px) {
  .hero { min-height: calc(100vh - 88px); }
  .hero-container { padding: 88px 1rem 1.5rem; }
}

.hero-content { max-width: 800px; margin: 0; }
.hero-title { font-size: 3.5rem; font-weight: 700; margin-bottom: 2rem; line-height: 1.1; color: var(--white); }

.hero-tagline h2 {
  font-size: 5rem; font-weight: 700; margin-bottom: 0.5rem; line-height: 1.1; color: var(--white);
}

/* Services + additional */
.services { padding: 0; background: var(--light-gray); }

.services-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 0; }

.service-card {
  padding: 3rem 2rem; min-height: 430px;
  display: flex; flex-direction: column; justify-content: flex-start; align-items: flex-start;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.white-line { width: 60px; height: 3px; background: var(--white); margin-top: 1rem; }
.service-card h3 { font-size: 2rem; margin-bottom: 1rem; }
.service-card p { font-size: 1rem; line-height: 1.6; text-align: justify; }

.service-card.white { background: var(--white); color: var(--dark-gray); }
.service-card.dark-gray { background: var(--dark-gray); color: var(--white); }
.service-card.white p { color: var(--black); }
.service-card.dark-gray p { color: var(--white); }
.service-card:hover { transform: translateY(-6px); box-shadow: var(--shadow-lg); }

/* Contact */
.additional-content { padding: 0; background: var(--light-gray); }
.contact { padding: 80px 0; background: var(--primary-blue); color: var(--white); position: relative; overflow: hidden; }
.contact-container {
  max-width: 1200px; height: 680px; margin: 0 auto; padding: 0 2rem;
  display: grid; grid-template-columns: 1fr 1fr; gap: 4rem; align-items: start;
}
.contact-header h2 { color: var(--white); font-size: 3.5rem; margin-bottom: 0; position: relative; line-height: 1.1; }
.contact-header h2::after { content: ''; position: absolute; bottom: -10px; left: 0; width: 60px; height: 3px; background: var(--white); }

.contact-form { background: var(--dark-gray); padding: 2rem; width: 100%; border-radius: 12px; }
.form-group { margin-bottom: 1.5rem; }
.form-group label { display: block; margin-bottom: 0.5rem; color: var(--white); font-weight: 500; }
.form-group input, .form-group textarea {
  width: 100%; padding: 12px; border: 1px solid var(--white); border-radius: 6px;
  font-size: 1rem; background: var(--white); color: var(--dark-gray); transition: border-color 0.3s ease;
}
.form-group input:focus, .form-group textarea:focus {
  outline: none; border-color: var(--accent-orange); box-shadow: 0 0 0 3px rgba(249, 115, 22, 0.1);
}
.btn-submit {
  background: var(--white); color: var(--accent-orange); padding: 12px 24px; border: none; border-radius: 6px;
  font-weight: 600; font-size: 1rem; cursor: pointer; transition: all 0.3s ease;
}
.btn-submit:hover { background: var(--light-orange); transform: translateY(-2px); box-shadow: var(--shadow); }

.btn { display: inline-block; padding: 12px 24px; text-decoration: none; border-radius: 6px; font-weight: 500; transition: all 0.3s ease; border: none; cursor: pointer; font-size: 1rem; }
.btn-primary { background: var(--primary-blue); color: var(--white); }
.btn-primary:hover { background: #1e3a8a; transform: translateY(-2px); box-shadow: var(--shadow-lg); }
.btn-secondary { background: transparent; color: var(--white); border: 2px solid var(--white); }
.btn-secondary:hover { background: var(--white); color: var(--primary-blue); transform: translateY(-2px); }
.btn-outline { background: transparent; color: var(--primary-blue); border: 2px solid var(--primary-blue); }
.btn-outline:hover { background: var(--primary-blue); color: var(--white); }

.section-header { text-align: center; margin-bottom: 3rem; }
.section-header h2 { color: var(--primary-blue); margin-bottom: 0.5rem; letter-spacing: 0.3px; }
.section-header p { font-size: 1.125rem; color: var(--medium-gray); max-width: 720px; margin: 0.5rem auto 0; }

/* Footer */
.footer { background: var(--dark-gray); color: var(--white); padding: 3rem 0 1rem; }
.footer-content { display: grid; grid-template-columns: 1fr 1fr; align-items: start; gap: 2rem; margin-bottom: 2rem; }
.footer-section h3, .footer-section h4 { color: var(--white); margin-bottom: 1rem; }
.footer-section { text-align: left; }
.footer-section.links { justify-self: end; text-align: right; }
.footer-section ul { list-style: none; }
.footer-section ul li { margin-bottom: 0.5rem; }
.footer-section a { color: #d1d5db; text-decoration: none; transition: color 0.3s ease; }
.footer-section a:not(.brand-link):hover { color: var(--accent-orange); }
.footer-bottom { text-align: center; padding-top: 2rem; border-top: 1px solid #374151; color: #9ca3af; }

/* Mobile nav */
@media (max-width: 768px) {
  .hamburger { display: flex; }
  .nav-menu {
    position: fixed; left: -100%; top: 88px;
    flex-direction: column; background-color: var(--white);
    width: 100%; height: calc(100vh - 88px); overflow-y: auto;
    text-align: center; transition: 0.3s; box-shadow: var(--shadow); padding: 2rem 0;
    z-index: 1101;
  }
  .nav-menu.active { left: 0; }
  .hero-title { font-size: 2.5rem; }
  .hero-tagline h2 { font-size: 2rem; }
  .services-grid, .contact-container { grid-template-columns: 1fr; gap: 2rem; }
  .footer-content { grid-template-columns: 1fr; }
  .footer-section.links { justify-self: start; text-align: left; }
  .container { padding: 0 1rem; }
  .nav-container { padding: 0 1rem; }
}

/* Fix the previously broken 480px media block */
@media (max-width: 480px) {
  .hero-title { font-size: 2rem; }
  .hero-tagline h2 { font-size: 1.5rem; }
  .service-card { padding: 2rem 1rem; }
  .service-card h3 { font-size: 1.5rem; }
}

/* Careers page */
.careers-hero { padding: 120px 0 80px 0; background: var(--primary-blue); color: var(--white); text-align: center; position: relative; overflow: hidden; }
.careers-header h1 { font-size: 4rem; margin-bottom: 1rem; color: var(--white); }
.careers-header p { font-size: 1.25rem; color: rgba(255, 255, 255, 0.9); max-width: 600px; margin: 0 auto; }
.careers-content { padding: 80px 0; background: var(--primary-blue); }

.job-categories { max-width: 1000px; margin: 0 auto; }
.careers-intro { text-align: center; margin-bottom: 3rem; }
.careers-intro h3 { color: var(--white); margin-bottom: 1rem; }
.careers-intro p { font-size: 1.125rem; max-width: 800px; margin: 0 auto; color: rgba(255, 255, 255, 0.9); }

.job-categories { display: flex; flex-direction: column; gap: 3rem; }
.job-category {
  background: var(--white); border-radius: 16px; padding: 2rem; box-shadow: var(--shadow);
  border: 1px solid rgba(30, 58, 138, 0.1); color: var(--dark-gray);
}
.job-header h3 { color: var(--black); }

.category-title {
  color: var(--primary-blue); margin-bottom: 1.5rem; font-size: 1.75rem;
  border-bottom: 3px solid var(--primary-blue); padding-bottom: 0.75rem; position: relative;
}
.category-title::after { content: ''; position: absolute; bottom: -3px; left: 0; width: 60px; height: 3px; background: var(--secondary-blue); }

.job-list { display: flex; flex-direction: column; gap: 1rem; }

.job-item {
  background: var(--light-gray); border-radius: 12px; padding: 1.5rem; transition: all 0.2s ease;
  border: 2px solid transparent; position: relative; overflow: hidden; will-change: transform, box-shadow;
}
.job-item::before { content: ''; position: absolute; top: 0; left: 0; width: 4px; height: 100%; background: var(--primary-blue); transform: scaleY(0); transition: transform 0.3s ease; }
.job-item:hover::before { transform: scaleY(1); }
.job-item:hover { background: var(--white); border-color: var(--primary-blue); transform: translateY(-2px); box-shadow: var(--shadow-lg); }

.job-header { display: flex; justify-content: space-between; align-items: flex-start; margin-bottom: 1rem; }
.job-header h4 { color: var(--black); margin-bottom: 0.5rem; font-size: 1.25rem; }
.job-location { background: var(--light-orange); color: var(--primary-blue); padding: 0.25rem 0.75rem; border-radius: 20px; font-size: 0.875rem; font-weight: 500; white-space: nowrap; }

.job-preview p { color: var(--medium-gray); margin-bottom: 1rem; font-size: 1rem; }

.job-details-btn {
  background: var(--secondary-blue); color: var(--white); border: none; padding: 0.75rem 1.5rem; border-radius: 8px;
  font-size: 0.875rem; font-weight: 500; cursor: pointer; transition: all 0.3s ease; text-decoration: none; display: inline-block;
}
.job-details-btn:hover { background: var(--primary-blue); color: var(--white); transform: translateY(-2px); box-shadow: var(--shadow); }

/* Modal */
.job-modal {
  display: none; position: fixed; z-index: 2000; left: 0; top: 0; width: 100%; height: 100%;
  background-color: rgba(0, 0, 0, 0.5); backdrop-filter: blur(5px);
  opacity: 0; visibility: hidden; transition: opacity 0.3s ease, visibility 0.3s ease;
}
.job-modal.active { display: block; opacity: 1; visibility: visible; }
body.modal-open { overflow: hidden; }

.modal-content {
  background-color: var(--white); margin: 5% auto; padding: 2rem; border-radius: 16px; width: 90%; max-width: 800px;
  max-height: 80vh; overflow-y: auto; position: relative; box-shadow: var(--shadow-lg); transform: scale(0.9); transition: transform 0.3s ease;
  color: var(--dark-gray);
}
#applicationModal .contact-form { background: var(--light-gray); }
#applicationModal .form-group label { color: var(--dark-gray); }
.job-modal.active .modal-content { transform: scale(1); }

.job-modal.loading .modal-content::before {
  content: ''; position: absolute; top: 0; left: 0; right: 0; height: 3px;
  background: linear-gradient(90deg, var(--primary-blue), var(--secondary-blue)); animation: loading-bar 0.6s ease;
}
@keyframes loading-bar { 0% { width: 0%; } 100% { width: 100%; } }

.close-modal { position: absolute; right: 1.5rem; top: 1.5rem; font-size: 2rem; font-weight: bold; cursor: pointer; color: var(--medium-gray); transition: color 0.3s ease; }
.close-modal:hover { color: var(--primary-blue); }

.job-detail-header { margin-bottom: 2rem; padding-bottom: 1rem; border-bottom: 2px solid var(--light-gray); }
.job-detail-title { color: var(--primary-blue); font-size: 2rem; margin-bottom: 0.5rem; }
.job-detail-meta { display: flex; gap: 1rem; align-items: center; flex-wrap: wrap; }
.job-detail-location { background: var(--light-orange); color: var(--primary-blue); padding: 0.5rem 1rem; border-radius: 25px; font-weight: 500; }
.job-detail-category { background: var(--light-gray); color: var(--medium-gray); padding: 0.5rem 1rem; border-radius: 25px; font-weight: 500; }

.job-detail-description { margin-bottom: 2rem; font-size: 1.125rem; line-height: 1.7; color: var(--dark-gray); }
.job-detail-section { margin-bottom: 2rem; }
.job-detail-section h4 { color: var(--primary-blue); margin-bottom: 1rem; font-size: 1.25rem; }

.job-detail-list { list-style: none; padding-left: 0; }
.job-detail-list li {
  padding: 0.5rem 0; border-bottom: 1px solid var(--light-gray); position: relative; padding-left: 1.5rem; color: var(--dark-gray);
}
.job-detail-list li:before { content: "•"; color: var(--accent-orange); font-weight: bold; position: absolute; left: 0; }
.job-detail-list li:last-child { border-bottom: none; }

.apply-button {
  background: var(--primary-blue); color: var(--white); padding: 1rem 2rem; border: none; border-radius: 8px; font-size: 1.125rem; font-weight: 600;
  cursor: pointer; transition: all 0.3s ease; text-decoration: none; display: inline-block; text-align: center;
}
.apply-button:hover { background: #1e3a8a; transform: translateY(-2px); box-shadow: var(--shadow); }

.fade-in { opacity: 0; transform: translateY(30px); transition: all 0.6s ease; }
.fade-in.visible { opacity: 1; transform: translateY(0); }
.loading { opacity: 0; transition: opacity 0.3s ease; }
.loaded { opacity: 1; }

@keyframes blueFlow { 0% { background-position: 0% 50%; } 50% { background-position: 100% 50%; } 100% { background-position: 0% 50%; } }

/* Hamburger -> X animation (class-driven) */
.hamburger.active .bar:nth-child(1){ transform: rotate(45deg) translate(5px, 5px); }
.hamburger.active .bar:nth-child(2){ opacity: 0; }
.hamburger.active .bar:nth-child(3){ transform: rotate(-45deg) translate(7px, -6px); }

/* Stacking fixes */
@media (max-width: 768px) {
  .hamburger { z-index: 1102; }
  .nav-menu  { z-index: 1101; }
}
