/* Red-only animated gradient header + right-aligned links */

body, .header, .navwrap, .brand-text, .nav-link, .dropdown-item, .nav-cta {
  font-family: "Arial", sans-serif;
}

.header {
  padding: 0;
  border-bottom: 1px solid rgba(0,0,0,0.12);
  position: sticky;
  top: 0;
  z-index: 50;
  backdrop-filter: blur(6px);
  min-height: 60px;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* Moving red gradient */
.header--gradient {
  background: linear-gradient(120deg, #8b0000, #d30000, #ff4d4d, #d30000, #8b0000);
  background-size: 300% 300%;
  animation: headerFlow 12s ease-in-out infinite;
}
@keyframes headerFlow {
  0% { background-position: 0% 50%; }
  50% { background-position: 100% 50%; }
  100% { background-position: 0% 50%; }
}

/* Row: brand | spacer | links | buttons */
.navwrap {
  width: 100%;
  margin: 0;
  padding: 8px 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: nowrap;
}
.spacer { flex: 1 1 auto; }

/* Brand */
.brand-wrap {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
  transition: all 0.3s ease;
}
.brand-logo {
  height: 90px;
  width: auto;
  display: block;
  filter: drop-shadow(0 1px 1px rgba(0,0,0,.25));
  transition: height 0.3s ease;
}
.brand-text {
  font-weight: 900;
  font-size: 17px;
  letter-spacing: 1px;
  color: #fff;
  text-shadow: 0 1px 2px rgba(0,0,0,.3);
  line-height: 1;
  text-transform: uppercase;
}

/* Right-aligned links */
.nav-links { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.nav-link {
  color: #fff;
  text-decoration: none;
  height: 39px;
  line-height: 39px;
  padding: 0 16px;
  border-radius: 10px;
  border: 1px solid transparent;
  font-weight: 600;
  opacity: .95;
  background: #d30000;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}
.nav-link:hover { background: rgba(255,255,255,.1); }
.nav-link.is-active {
  border-color: rgba(255,255,255,.45);
  background: rgba(255,255,255,.12);
}

/* Dropdown */
.dropdown { position: relative; display: inline-block; }

/* Button styling (Our Services) */
.dropdown-toggle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  height: 39px;
  line-height: 39px;
  padding: 0 16px;
  font-size: 15px;
  font-weight: 600;
  border-radius: 10px;
  border: 1px solid transparent;
  color: #fff;
  background: #d30000;
  cursor: pointer;
  transition: background 0.2s ease;
}
.dropdown-toggle:hover { background: rgba(255, 255, 255, 0.15); }

/* Dropdown menu */
.dropdown-menu {
  position: absolute;
  top: calc(100% + 8px);
  left: 0;
  min-width: 220px;
  background: #fff;
  border: 1px solid rgba(0, 0, 0, 0.1);
  border-radius: 12px;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.15);
  padding: 10px;
  display: none;
  z-index: 1000;
}
.dropdown-menu.show { display: block; }

.dropdown-item {
  display: block;
  padding: 10px 14px;
  margin-bottom: 8px;
  border-radius: 8px;
  text-decoration: none;
  color: #0b1220;
  font-weight: 600;
  background: rgba(15, 23, 42, 0.06);
  transition: background 0.2s ease;
}
.dropdown-item:last-child { margin-bottom: 0; }
.dropdown-item:hover { background: rgba(15, 23, 42, 0.12); }

/* Navbar right side */
.navbar {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
  margin-left: 8px;
}

.nav-cta {
  height: 39px;
  line-height: 39px;
  padding: 0 16px;
  border-radius: 12px;
  border: 1px solid rgba(255,255,255,.4);
  background: rgba(255,255,255,.9);
  color: #7a0b0b;
  text-decoration: none;
  font-weight: 700;
  box-shadow: 0 1px 0 rgba(255,255,255,.35) inset, 0 2px 6px rgba(0,0,0,.1);
  transition: transform .06s ease, filter .2s ease;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}
.nav-cta:hover { filter: brightness(1.05); }
.nav-cta:active { transform: translateY(1px); }

/* Avatar Dropdown */
.profile-dropdown { 
    position: relative; 
    display: flex; 
    align-items: center;
    }

.profile-btn {
  background: none;
  border: none;
  color: #fff;
  display: flex;
  align-items: center;
  gap: 8px;
  cursor: pointer;
  font-weight: 600;
  height: 39px;
  padding: 0 10px;
  border-radius: 10px;
  transition: background 0.2s ease;
}
.profile-btn:hover { background: rgba(255, 255, 255, 0.1); }

.avatar {
  width: 36px; height: 36px;
  border-radius: 50%; object-fit: cover;
  border: 2px solid rgba(255, 255, 255, 0.5);
}
.username { font-size: 15px; color: #fff; }

/* Profile dropdown menu */
.profile-menu {
  display: none;
  position: absolute;
  right: 0;
  top: 110%;
  min-width: 220px;
  background: #fff;
  border: 1px solid rgba(0, 0, 0, 0.1);
  border-radius: 12px;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.15);
  padding: 10px;
  z-index: 1000;
}
.profile-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 14px;
  margin-bottom: 8px;
  border-radius: 8px;
  text-decoration: none;
  color: #0b1220;
  font-weight: 600;
  background: rgba(15, 23, 42, 0.06);
  transition: background 0.2s ease;
}
.profile-item:last-child { margin-bottom: 0; }
.profile-item:hover { background: rgba(15, 23, 42, 0.12); }
.profile-item.logout { color: #b30000; font-weight: 700; }
.profile-item.logout:hover { background: rgba(255, 0, 0, 0.1); }
.profile-dropdown.active .profile-menu { display: block; }


.header .hamburger {
  position: fixed;
  top: 50%;                     /* vertical center */
  left: 18px;                   /* distance from screen edge */
  transform: translateY(-50%);
  width: 38px;
  height: 38px;
  display: flex;                /* always visible */
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 5px;
  cursor: pointer;
  border-radius: 10px;
  background: rgba(0, 0, 0, 0.25);
  border: 1px solid rgba(255, 255, 255, 0.35);
  box-shadow: 0 3px 10px rgba(0, 0, 0, 0.25);
  z-index: 9999;
  transition: background 0.25s ease, transform 0.25s ease;
  backdrop-filter: blur(8px);
}

.header .hamburger:hover {
  background: rgba(0, 0, 0, 0.4);
  transform: translateY(-50%) scale(1.05);
}

/* Hamburger bars */
.header .hamburger span {
  width: 20px;
  height: 2.5px;
  background: #fff;
  border-radius: 2px;
  transition: all 0.3s ease;
}
.header .hamburger span + span {
  margin-top: 4px;
}

/* Adjust brand spacing so logo/text doesn’t overlap with the hamburger */
.brand-wrap {
  margin-left: 70px !important;   /* enough space for 38px btn + padding */
}


/* 1440px and below */
@media (max-width: 1440px) {
  .navwrap {
    padding: 8px 24px;
    gap: 10px;
  }

  .brand-logo {
    height: 80px;
  }

  .brand-text {
    font-size: 16px;
  }

  .nav-link,
  .dropdown-toggle,
  .nav-cta,
  .profile-btn {
    height: 38px;
    line-height: 38px;
    padding: 0 14px;
    font-size: 14px;
  }

  .username {
    font-size: 14px;
  }
}

@media (max-width: 1130px){
    .nav-cta,
    .nav-link{
    display: flex;
    flex-wrap: wrap;
    height: auto !important;
    line-height: 1.1;
    white-space: normal;
    padding: 6px 12px;
    text-align: center;
    font-size: 13;
    border-radius: 8px;
    }
    
    .nav-cta .username{
        display: block;
        white-space: normal;
        max-width: 100%;
        line-height: 1.3;
        text-align: center;
        
    }
    #userBtn{
        display: flex;
        flex-wrap: wrap;
        align-items: flex-start;
    }
    #userBtn .profile{
        flex: 0 0 auto;
        margin-right: 8px;
    }
    #userBtn .username,
    .role{
        flex: 1 1 100%;
        white-space: normal;
        text-align: left;
        line-height: 1.2;
    }
    #userBtn .caret{
        margin-left: 4px;
        flex: 0 0 auto;
        align-self: center;
    }
}



/* 1024px and below (large tablet / small laptop) */
@media (max-width: 1024px) {
  .header {
    min-height: 56px;
  }
  
  .navwrap {
    padding: 8px 18px;
    gap: 8px;
  }

  .brand-logo {
    height: 70px;
  }

  .brand-text {
    font-size: 15px;
    letter-spacing: 0.8px;
  }

  .nav-cta {
    display: inline-block;
    height: auto;
    line-height: 1.1;
    white-space: normal;
    padding: 6px 12px;
    text-align: center;
    font-size: 13;
    border-radius: 8px;
  }
  
  
  .nav-link{
  display: inline-block;
  height: auto;
  line-height: 1.3;
  white-space: normal;
  padding: 6px 12px;
  text-align: center;
  font-size: 13px;   /* <- add px */
  border-radius: 8px;
  }

  .dropdown-toggle,
  .profile-btn {
    height: 36px;
    line-height: 36px;
    padding: 0 12px;
    font-size: 13px;
    border-radius: 8px;
  }

  .dropdown-menu,
  .profile-menu {
    min-width: 200px;
  }

  .avatar {
    width: 32px;
    height: 32px;
  }
}

/* 834px and below (iPad portrait-ish) */
@media (max-width: 834px) {
  .navwrap {
    padding: 6px 16px;
  }

  .brand-logo {
    height: 60px;
  }

  .brand-text {
    font-size: 14px;
  }
  
  .nav-cta {
    display: inline-block;
    height: auto;
    line-height: 1;
    white-space: normal;
    padding: 6px 12px;
    text-align: center;
    font-size: 10;
    border-radius: 8px;
  }
  
  
  .nav-link{
  display: inline-block;
  height: auto;
  line-height: 1.3;
  white-space: normal;
  padding: 6px 12px;
  text-align: center;
  font-size: 13px;   /* <- add px */
  border-radius: 8px;
  }

  .dropdown-toggle,
  .profile-btn {
    height: 34px;
    line-height: 34px;
    padding: 0 10px;
    font-size: 12.5px;
  }

  .dropdown-item,
  .profile-item {
    padding: 8px 12px;
    font-size: 13px;
  }

  .username {
    font-size: 13px;
  }
}

/* 768px and below (standard tablet) */
@media (max-width: 768px) {
  .header {
    min-height: 52px;
  }

  .navwrap {
    flex-wrap: wrap;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 6px;
  }

  .brand-logo {
    height: 52px;
  }

  .brand-text {
    display: none;
  }
  
  .brand-wrap {
    margin-left: 0px !important;
    justify-content: center;
  }

  .navbar {
    width: 100%;
    display: flex;
    flex: wrap;
    justify-content: center;
    gap: 6px;
    margin-left: 0;
  }
  
  .nav-cta,
  .nav-link {
    display: inline-block;
    height: auto;
    line-height: 1.3;
    white-space: normal;
    padding: 6px 12px;
    text-align: center;
    font-size: 6;
    border-radius: 8px;
  }

  .dropdown-toggle,
  .profile-btn {
    height: 32px;
    line-height: 32px;
    padding: 0 9px;
    font-size: 12px;
    border-radius: 7px;
  }

  .dropdown-menu,
  .profile-menu {
    min-width: 180px;
    padding: 8px;
  }

  .dropdown-item,
  .profile-item {
    padding: 7px 10px;
    font-size: 12px;
  }

  .header .hamburger {
    width: 34px;
    height: 34px;
    left: 14px;
  }

  .header .hamburger span {
    width: 18px;
  }

  
}

/* 480px and below (mobile phones) */
@media (max-width: 480px) {
  .header {
    min-height: 50px;
  }

  .navwrap {
    padding: 4px 12px;
    gap: 4px;
  }

  .brand-logo {
    height: 44px;
  }
    letter-spacing: 0.6px;

  .brand-text {
    font-size: 11px;
  }

  .nav-cta,
  .nav-links {
    display: inline-block;
    height: auto;
    line-height: 1;
    white-space: normal;
    padding: 5px 8px;
    text-align: center;
    font-size: 6;
    border-radius: 8px;
  }
  
  .nav-links{
      display: none;
  }

  .dropdown-toggle,
  .profile-btn {
    height: 30px;
    line-height: 30px;
    padding: 0 8px;
    font-size: 11px;
    border-radius: 6px;
  }

  .dropdown-menu,
  .profile-menu {
    min-width: 160px;
    padding: 6px;
  }

  .dropdown-item,
  .profile-item {
    padding: 6px 9px;
    font-size: 11.5px;
    margin-bottom: 6px;
  }

  .avatar {
    width: 28px;
    height: 28px;
  }

  .username {
    font-size: 11px;
  }

  .header .hamburger {
    width: 32px;
    height: 32px;
    left: 12px;
  }

  .header .hamburger span {
    width: 16px;
    height: 2px;
  }

  .brand-wrap {
    margin-left: 0px !important;
    gap: 8px;
  }
}



html, body { overflow-x: hidden; }

