/* Base styles */
body {
  margin: 0;
  font-family: 'Ubuntu', sans-serif;
  padding-top: 100px;
}

/* Header menu area */
header {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  z-index: 1000;
  background: #fff;
}

/* Header menu area */
.header__menu-area {
  transition: all 0.3s ease;
  height: 100px;
  display: flex;
  align-items: center;
  width: 100%;
  position: relative;
  overflow: hidden; /* Prevent overflow */
  z-index: 100; /* Ensure header stays above hero */
}

.header__menu-area .container-fluid {
  width: 100%;
  height: 100%;
  padding: 0;
  margin: 0;
  position: relative;
}

.header__menu-area .container-fluid .header-grid {
  width: 100%;
  height: 100%;
  padding: 0;
  margin: 0;
  position: relative;
}

/* Fractional Grid Layout for Header (Large Screens) */
.header-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr 1fr;
  align-items: center;
  height: 100%;
  gap: 20px;
  width: 100%;
  padding-right: 250px; /* default padding for >1400px */
}

/* Logo Styling */
.header__logo {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  height: 100%;
  margin-left: 0;
  position: relative;
  z-index: 10;
  max-width: 150px;
  overflow: hidden;
}

.header__logo a {
  display: flex;
  align-items: center;
  height: 100%;
  text-decoration: none;
  width: 100%;
}

.header__logo img {
  max-height: 70px;
  width: auto;
  display: block;
  max-width: 150px;
  object-fit: contain;
  visibility: visible !important;
  opacity: 1 !important;
  position: relative;
  z-index: 1;
}

/* Independent Page Links Styling */
.header__home,
.header__about,
.header__contact,
.header__products {
  display: flex;
  justify-content: flex-start;
  align-items: center;
  height: 100%;
}

.header__home a,
.header__about a,
.header__contact a,
.header__products a {
  text-decoration: none;
  font-weight: 500;
  color: #000;
  transition: all 0.3s ease;
}

.header__home a:hover,
.header__about a:hover,
.header__contact a:hover,
.header__products a:hover {
  opacity: 0.7;
}

/* Navigation Styling */
.header__nav {
  display: flex;
  align-items: center;
  justify-content: center;
  height: 100%;
  margin-left: auto;
}

.header__nav ul {
  display: flex;
  list-style: none;
  margin: 0;
  padding: 0;
  gap: 20px;
}

.header__nav .b-right {
  border-right-color: #ffffff !important;
}

.header__nav ul li a {
  text-decoration: none;
  font-weight: 500;
  color: #000;
  white-space: nowrap;
  transition: all 0.3s ease;
}
.header__nav ul li a:hover {
  opacity: 0.8;
}

/* Support Section Styling */
.header__support {
  display: flex;
  align-items: center;
  justify-content: flex-end; /* Aligns support text to the far right */
  height: 100%;
}
.header__support p {
  margin: 0;
  white-space: nowrap;
}
.header__support p a {
  text-decoration: none;
  color: inherit;
  font-weight: 500;
  transition: all 0.3s ease;
}
.header__support p a:hover {
  opacity: 0.8;
}

/* Offcanvas Menu Styling */
.header__offcanvas {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  height: 100%;
  margin-left: auto;
}
.header__offcanvas.b-left {
  border-left-color: #ffffff !important;
}
.header__offcanvas span {
  padding: 10px;
  transition: all 0.3s ease;
}
.header__offcanvas span:hover {
  opacity: 0.8;
}

/* Offcanvas Grid Layout */
.offcanvas__inner {
  display: grid;
  grid-template-columns: 1fr 1fr; /* 1:1 ratio between left and right */
  grid-template-rows: auto; /* Single row for horizontal layout */
  gap: 0; /* Remove gap between left and right sections */
  height: 100%;
  width: 100%;
}

/* Remove extra padding from offcanvas left for all screen sizes */
.offcanvas__left {
  margin: 0 !important;
  width: 100% !important;
  max-width: 100% !important;
}

.offcanvas__right {
  grid-column: 2 / 3;
  grid-row: 1 / 2;
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  align-items: flex-start;
  padding: 20px;
  padding-top: 10%;
  width: 100%; /* Occupy full width */
}

.offcanvas__logo {
  grid-column: 2 / 3;
  grid-row: 1 / 2;
  display: flex;
  justify-content: flex-start;
  align-items: flex-start;
  margin-bottom: 20px;
  width: 100%; /* Occupy full width of right section */
}

/* Ensure logo maintains aspect ratio */
.offcanvas__logo img {
  width: auto;
  height: auto;
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
  aspect-ratio: auto; /* Maintain original aspect ratio */
}

.offcanvas__contact {
  grid-column: 2 / 3;
  grid-row: 1 / 2;
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  align-items: flex-start;
  width: 100%; /* Occupy full width of right section */
}

/* Hide header__offcanvas above 992px */
@media (min-width: 993px) {
  .header__nav{
    display: none !important;
  }
  .header__support{
    display: none !important;
  }
  .header__offcanvas {
    display: none !important;
  }
}

/* Responsive Grid Changes */
@media (max-width: 1915px) {
  .header-grid { grid-template-columns: 2fr 1fr 1fr 1fr 1fr auto; gap: 20px; }
  .header__logo { max-width: 150px; }
  .header__logo img { margin-bottom: 20px; max-width: 130px; }
  .header__nav ul li a p { font-size: 15px; }
  .offcanvas__logo img { max-width: 200px; max-height: 80px; }
}

@media (max-width: 1400px) {
  .header-grid { padding-right: 250px; }
  .header__logo { max-width: 150px; }
  .header__logo img { margin-bottom: 25px; max-width: 130px; }
  .header__nav ul li a p { font-size: 15px; }
  .offcanvas__logo img { max-width: 90%; max-height: 80px; width: auto; height: auto; object-fit: contain; }
}

@media (max-width: 1200px) {
  .header-grid { padding-right: 250px; }
  .header__logo { max-width: 150px; }
  .header__logo img { margin-bottom: 40px; max-width: 130px; }
  .header__nav ul li a p { font-size: 15px; }
  .offcanvas__logo img { max-width: 80%; max-height: 60px; width: auto; height: auto; object-fit: contain; }
}

/* Hide new links on smaller screens */
@media (max-width: 992px) {
  .header__home,
  .header__about,
  .header__contact,
  .header__products { display: none; }
  .header-grid { grid-template-columns: 2fr 2fr 2fr 1fr; gap: 5px;padding-right: 10px; }
  .header__logo { max-width: 150px; }
  .header__logo img { margin-bottom: 40px; max-width: 130px; }
  .header__nav ul li a, .header__support p { font-size: 15px; }
  .header__offcanvas { margin-right: 10px; }
  .offcanvas__logo img { max-width: 75%; max-height: 50px; width: auto; height: auto; object-fit: contain; }
}

@media (max-width: 768px) {
  .header-grid { grid-template-columns: 1fr 1.5fr 1.5fr 1fr; gap: 1px; }
  .header__logo { max-width: 150px; }
  .header__logo img { margin-bottom: 40px; max-width: 130px; }
}

@media (max-width: 576px) {
  /* Adjust grid to keep constant gap */
  .header-grid { 
    grid-template-columns: 1fr 3fr 3fr 1.3fr;gap: 0.5px;}

  .header__logo { 
    max-width: 150px; 
  }
  .header__logo img { 
    margin-bottom: 30px; 
    max-width: 130px; 
  }

  .header__nav { 
    max-width: 60px;
    min-width: 40px;
  }
  
  .header__nav ul li a { 
    font-size: 14px; 
  }

  .header__support p { 
    font-size: 14px;
    text-align: right;
    margin-left: 20px;
  }

  .header__offcanvas { 
    min-width: 50px; /* slightly reduced width */
    max-width: 50px;
    margin-right: 0; /* no extra spacing */
  }

  /* Make offcanvas__left occupy full width on top */
  .offcanvas__inner {
    display: flex;
    flex-direction: column;
    width: 100%;
  }

  .offcanvas__left {
    order: 1;
    width: 100% !important;
  }

  /* Place logo on left and contact on right inside offcanvas__right */
  .offcanvas__right {
    order: 2;
    display: flex;
    flex-direction: row; /* side by side */
    justify-content: space-between;
    align-items: center;
    width: 100%;
    padding: 10px 20px; /* spacing similar to top */
    height: auto;
  }

  .offcanvas__right img {
    max-width: 45%;
    height: auto;
  }

  .offcanvas__contact {
    width: 50%;
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    text-align: right;
  }

  /* Stack offcanvas sections vertically */
  .offcanvas__inner {
    display: flex;
    flex-direction: column;
    width: 100%;
    height: auto; /* remove fixed height */
  }

  /* Offcanvas left takes full width and adjusts height automatically */
  .offcanvas__left {
    order: 1;
    width: 100% !important;
    height: auto !important; /* ensure no fixed height */
    overflow: visible !important; /* disable scrolling */
  }

  /* Offcanvas right below menu */
  .offcanvas__right {
    order: 2;
    display: flex;
    flex-direction: row; /* logo left, contact right */
    justify-content: space-between;
    align-items: center;
    width: 100%;
    padding: 10px 20px;
  }

  .offcanvas__right img {
    max-width: 45%;
    height: auto;
  }

  .offcanvas__contact {
    width: 50%;
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    text-align: right;
  }
}

/* Hide nav & support below 530px, keep only logo and offcanvas */
@media (max-width: 530px) {
  .header__nav,
  .header__support,
  .header__home,
  .header__about,
  .header__contact,
  .header__products {
    display: none !important;
  }

  /* Adjust grid to only logo and offcanvas */
  .header-grid {
    grid-template-columns: 1fr auto; /* Logo | Offcanvas */
    gap: 10px; /* Optional small gap */
  }

  /* Ensure logo takes left and offcanvas to right */
  .header__logo {
    justify-content: flex-start;
  }
  .header__offcanvas {
    justify-content: flex-end;
  }

  .years.custom-font {
    margin: 0px;
    padding: 0;
  }

  .years.custom-font h1 {
      font-size: 48px;
      font-weight: bold;
      margin: 0;
  }

  .years.custom-font h5 {
      font-size: 16px;
      margin: 5px 0 0 0;
  }
}

/* Allow scrolling inside offcanvas__inner when content is taller than viewport */
.offcanvas__inner {
  height: auto;           /* no fixed height */
  max-height: 100vh;      /* do not exceed viewport height */
  overflow-y: auto;       /* enable vertical scrolling */
  -webkit-overflow-scrolling: touch; /* smooth scrolling for iOS */
}

/* Make sure child sections don't restrict scrolling */
.offcanvas__left,
.offcanvas__right {
  height: auto !important;
  max-height: none !important;
  overflow: visible !important;
}

/* Slide years experience box to left for small screens */
@media (max-width: 375px) {
  .years.custom-font {
    position: relative;
    left: 15px;
    margin-right: 35px;
  }
}





