/* ==============================================================================
   MAXENERGY SDN BHD - OFFICIAL CORPORATE WEBSITE STYLESHEET
   Accurate 1:1 reproduction of the original white-background website layout
   ============================================================================== */

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

html {
  font-size: 16px;
  scroll-behavior: smooth;
  background-color: #ffffff;
}

body {
  font-family: Arial, Helvetica, "Nimbus Sans L", sans-serif;
  background-color: #ffffff;
  color: #222222;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

/* Centered Page Container matching 960px classic corporate width */
.page-container {
  max-width: 960px;
  margin: 0 auto;
  padding: 16px 20px 40px 20px;
  background-color: #ffffff;
}

/* ==============================================================================
   1. TOP HEADER: LOGO ON LEFT & TAGLINE ON RIGHT
   ============================================================================== */
.header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 10px 0 16px 0;
  gap: 16px;
}

.header-logo a {
  display: inline-block;
  text-decoration: none;
}

.logo-img {
  height: 78px;
  width: auto;
  max-width: 320px;
  display: block;
}

.header-tagline {
  color: #0b8043;
  font-family: Arial, Helvetica, sans-serif;
  font-style: italic;
  font-weight: 700;
  font-size: 1.25rem;
  letter-spacing: -0.2px;
  text-align: right;
  line-height: 1.2;
}

/* ==============================================================================
   2. CLASSIC NAVIGATION BAR (NAVY BLUE)
   ============================================================================== */
.nav-bar {
  background-color: #040b75; /* Exact navy blue from original site */
  width: 100%;
  margin-bottom: 1px;
}

.nav-list {
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  margin: 0;
  padding: 0;
}

.nav-list li {
  margin: 0;
}

.nav-link {
  display: inline-block;
  color: #ffffff;
  text-decoration: none;
  font-family: Arial, Helvetica, sans-serif;
  font-size: 13.5px;
  font-weight: 700;
  padding: 9px 18px;
  border-right: 1px solid rgba(255, 255, 255, 0.12);
  transition: background-color 0.15s ease, color 0.15s ease;
  cursor: pointer;
}

.nav-link:hover {
  background-color: #081799;
}

/* Active tab yellow indicator border */
.nav-link.active {
  border-bottom: 3px solid #ffff00;
  padding-bottom: 6px;
}

/* ==============================================================================
   3. BANNER WITH INTEGRATED CAPTION BAR
   ============================================================================== */
.banner-wrapper {
  width: 100%;
  margin-bottom: 18px;
  border: 1px solid #d1d5db;
}

.banner-img {
  width: 100%;
  height: auto;
  display: block;
}

/* ==============================================================================
   4. INTRODUCTORY PARAGRAPHS
   ============================================================================== */
.intro-section {
  margin-top: 16px;
  margin-bottom: 18px;
}

.intro-section p {
  font-size: 13.5px;
  line-height: 1.55;
  color: #222222;
  margin-bottom: 14px;
  text-align: left;
}

.intro-section p:last-child {
  margin-bottom: 0;
}

/* Horizontal Divider Line */
.section-divider {
  border: 0;
  border-top: 1px solid #c8cbcf;
  margin: 22px 0 20px 0;
}

/* ==============================================================================
   5. BUSINESS SEGMENTS 3-COLUMN ARCHITECTURE
   ============================================================================== */
.segments-section {
  margin-top: 12px;
}

.segments-title {
  font-size: 18px;
  font-weight: 700;
  color: #111111;
  margin-bottom: 16px;
  font-family: Arial, Helvetica, sans-serif;
}

.segments-grid {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 28px;
  align-items: start;
}

.segment-col {
  display: flex;
  flex-direction: column;
}

.col-heading {
  font-size: 14px;
  font-weight: 700;
  color: #0066ff; /* Exact bright blue from original site */
  line-height: 1.35;
  margin-bottom: 14px;
  font-family: Arial, Helvetica, sans-serif;
}

.col-abbr {
  color: #0066ff;
  font-weight: 700;
}

.group-block {
  margin-bottom: 14px;
}

.group-block:last-child {
  margin-bottom: 0;
}

.group-name {
  font-size: 13px;
  font-weight: 400;
  color: #222222;
  margin-bottom: 3px;
}

.bullet-list {
  list-style-type: disc;
  margin: 0;
  padding-left: 18px;
}

.bullet-list li {
  font-size: 12.5px;
  line-height: 1.45;
  color: #222222;
  margin-bottom: 2px;
}

/* ==============================================================================
   6. FOOTER
   ============================================================================== */
.footer {
  margin-top: 48px;
  padding-top: 14px;
  text-align: right;
}

.footer-text {
  font-size: 12px;
  color: #333333;
  font-family: Arial, Helvetica, sans-serif;
}

/* ==============================================================================
   7. MODAL DIALOGS (FOR CORE PRINCIPLES, CORP INFO, CONTACT US)
   ============================================================================== */
.modal-backdrop {
  position: fixed;
  inset: 0;
  background-color: rgba(0, 0, 0, 0.55);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 9999;
  padding: 16px;
}

.modal-backdrop.open {
  display: flex;
}

.modal-card {
  background-color: #ffffff;
  border-radius: 4px;
  max-width: 620px;
  width: 100%;
  padding: 28px 32px;
  position: relative;
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.25);
  border-top: 4px solid #040b75;
  max-height: 90vh;
  overflow-y: auto;
}

.modal-close {
  position: absolute;
  top: 14px;
  right: 18px;
  background: none;
  border: none;
  font-size: 26px;
  line-height: 1;
  color: #666666;
  cursor: pointer;
}

.modal-close:hover {
  color: #000000;
}

.modal-title {
  font-size: 20px;
  font-weight: 700;
  color: #040b75;
  margin-bottom: 6px;
  font-family: Arial, Helvetica, sans-serif;
}

.modal-subtitle {
  font-size: 13.5px;
  color: #555555;
  margin-bottom: 18px;
}

.principle-item {
  margin-bottom: 16px;
  padding-bottom: 14px;
  border-bottom: 1px solid #eeeeee;
}

.principle-item:last-child {
  border-bottom: none;
  margin-bottom: 0;
  padding-bottom: 0;
}

.principle-name {
  display: block;
  font-size: 15px;
  color: #0ea062;
  margin-bottom: 4px;
}

.principle-item p {
  font-size: 13.5px;
  color: #333333;
  line-height: 1.5;
}

/* Corporate Table */
.corp-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
  margin-top: 10px;
}

.corp-table th, .corp-table td {
  padding: 10px 12px;
  border-bottom: 1px solid #e5e7eb;
  vertical-align: top;
  text-align: left;
}

.corp-table th {
  color: #040b75;
  font-weight: 700;
  width: 36%;
  background-color: #f9fafb;
}

.corp-table td {
  color: #333333;
  line-height: 1.45;
}

/* Contact Details */
.contact-details p {
  font-size: 14px;
  line-height: 1.6;
  color: #333333;
  margin-bottom: 12px;
}

.contact-details a {
  color: #0066ff;
  text-decoration: none;
  font-weight: 600;
}

.contact-details a:hover {
  text-decoration: underline;
}

/* ==============================================================================
   8. RESPONSIVE BREAKPOINTS
   ============================================================================== */
@media (max-width: 820px) {
  .header {
    flex-direction: column;
    align-items: flex-start;
  }
  
  .header-tagline {
    text-align: left;
    font-size: 1.05rem;
  }

  .segments-grid {
    grid-template-columns: 1fr;
    gap: 22px;
  }

  .nav-list {
    flex-direction: column;
  }

  .nav-link {
    width: 100%;
    border-right: none;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  }

  .nav-link.active {
    border-bottom: 3px solid #ffff00;
  }
}
