/* ==========================================================================
   Brix Engineering - Mobile Responsiveness & Navigation Layout CSS
   ========================================================================== */

/* 1. Global Performance & Smooth Scrolling
   -------------------------------------------------------------------------- */
html {
  scroll-behavior: smooth;
}

body {
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
}

body.sidebar-open {
  overflow: hidden !important;
  height: 100vh;
}

/* 2. Header & Navigation Top and Bottom Center Alignment
   -------------------------------------------------------------------------- */
.header {
  position: relative;
  z-index: 10000;
}

.header .main-header-1 {
  padding: 0 !important;
  background-color: #000000 !important;
}

/* Center all items vertically (top and bottom center) */
.header .main-header-1 .container {
  display: flex !important;
  align-items: center !important;
  justify-content: space-between !important;
  min-height: 80px;
  padding-top: 10px !important;
  padding-bottom: 10px !important;
}

.header .logo {
  display: flex !important;
  align-items: center !important;
  padding: 0 !important;
  margin: 0 !important;
  float: none !important;
}

.header .logo a {
  display: flex !important;
  align-items: center !important;
  line-height: 1 !important;
}

.header .logo img {
  height: 55px !important;
  width: auto !important;
  margin: 0 !important;
  display: block !important;
}

/* Desktop Navigation Alignment - Perfect Vertical Center */
.header .navigation {
  float: none !important;
  display: flex !important;
  align-items: center !important;
  margin: 0 !important;
  height: 100% !important;
}

.header .navigation ul.nav {
  display: flex !important;
  align-items: center !important;
  margin: 0 !important;
  padding: 0 !important;
  float: none !important;
  gap: 28px;
  height: 100% !important;
}

.header .navigation ul.nav > li {
  float: none !important;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  margin: 0 !important;
  padding: 0 !important;
  height: 100% !important;
}

.header .navigation ul.nav > li > a {
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  height: 42px !important;
  line-height: 1 !important;
  padding: 0 4px !important;
  margin: 0 !important;
  color: #ffffff !important;
  font-family: "Montserrat", sans-serif;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.5px;
  transition: color 0.25s ease;
  vertical-align: middle;
}

.header .navigation ul.nav > li.active > a,
.header .navigation ul.nav > li > a:hover {
  color: #eaab00 !important;
}

.header .navigation ul.nav > li > a.btn-nav-quote {
  height: 42px !important;
  padding: 0 22px !important;
  background-color: #e50914 !important;
  color: #ffffff !important;
  border-radius: 2px;
  font-weight: 700;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  transition: all 0.3s ease;
}

.header .navigation ul.nav > li > a.btn-nav-quote:hover {
  background-color: #ffffff !important;
  color: #000000 !important;
}

/* Hide theme default mobile-nav-menu div */
.mobile-nav-menu {
  display: none !important;
}

/* Custom Mobile Navigation Hamburger Toggle Button (Top and Bottom Centered) */
.mobile-nav-toggle {
  display: none;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(234, 171, 0, 0.4);
  cursor: pointer;
  padding: 8px 14px;
  border-radius: 6px;
  outline: none;
  align-items: center;
  gap: 10px;
  color: #ffffff;
  transition: all 0.3s ease;
  float: none !important;
  margin: 0 !important;
}

.mobile-nav-toggle:hover,
.mobile-nav-toggle:focus {
  background: rgba(234, 171, 0, 0.2);
  border-color: #eaab00;
}

.mobile-nav-toggle .hamburger-icon {
  width: 22px;
  height: 16px;
  position: relative;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.mobile-nav-toggle .hamburger-icon span {
  display: block;
  width: 100%;
  height: 2px;
  background-color: #eaab00;
  border-radius: 2px;
  transition: all 0.3s ease;
}

.mobile-nav-toggle .toggle-label {
  font-family: "Montserrat", sans-serif;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 1px;
  text-transform: uppercase;
  color: #ffffff;
}

/* 3. Mobile Sidebar Drawer & Backdrop Overlay
   -------------------------------------------------------------------------- */
.mobile-sidebar-backdrop {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background: rgba(0, 0, 0, 0.75);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  z-index: 999998;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.3s ease, visibility 0.3s ease;
}

.mobile-sidebar-backdrop.active {
  opacity: 1;
  visibility: visible;
}

.mobile-sidebar-drawer {
  position: fixed;
  top: 0;
  right: 0;
  width: 310px;
  max-width: 85vw;
  height: 100vh;
  background-color: #111111;
  box-shadow: -8px 0 30px rgba(0, 0, 0, 0.6);
  z-index: 999999;
  display: flex;
  flex-direction: column;
  transform: translateX(100%);
  transition: transform 0.35s cubic-bezier(0.4, 0, 0.2, 1);
  will-change: transform;
}

.mobile-sidebar-drawer.active {
  transform: translateX(0);
}

.mobile-sidebar-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 20px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  background-color: #080808;
}

.mobile-sidebar-logo img {
  height: 48px !important;
  width: auto;
}

.mobile-sidebar-close {
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.15);
  color: #ffffff;
  font-size: 24px;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  line-height: 1;
  transition: all 0.25s ease;
}

.mobile-sidebar-close:hover {
  background: #eaab00;
  color: #000000;
  border-color: #eaab00;
}

.mobile-sidebar-body {
  padding: 20px 0;
  overflow-y: auto;
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.mobile-sidebar-menu {
  list-style: none;
  padding: 0;
  margin: 0;
}

.mobile-sidebar-menu li {
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.mobile-sidebar-menu li a {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 16px 24px;
  color: #e0e0e0;
  font-family: "Montserrat", sans-serif;
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.5px;
  text-transform: uppercase;
  text-decoration: none;
  transition: all 0.25s ease;
}

.mobile-sidebar-menu li a i {
  font-size: 15px;
  width: 20px;
  color: #eaab00;
  text-align: center;
}

.mobile-sidebar-menu li a:hover,
.mobile-sidebar-menu li.active a {
  color: #eaab00;
  background-color: rgba(234, 171, 0, 0.12);
  padding-left: 28px;
}

.mobile-sidebar-footer {
  padding: 20px;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  background-color: #080808;
}

.mobile-sidebar-cta {
  display: block;
  width: 100%;
  padding: 13px 20px;
  background-color: #eaab00;
  color: #000000;
  font-family: "Montserrat", sans-serif;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 1px;
  text-transform: uppercase;
  text-align: center;
  border-radius: 4px;
  text-decoration: none;
  transition: all 0.3s ease;
  box-shadow: 0 4px 12px rgba(234, 171, 0, 0.3);
}

.mobile-sidebar-cta:hover {
  background-color: #ffffff;
  color: #000000;
}

.mobile-sidebar-contacts {
  margin-top: 18px;
  font-size: 13px;
  color: #ffffff !important;
  text-align: center;
}

.mobile-sidebar-contacts p,
.mobile-sidebar-contacts a,
.mobile-sidebar-contacts span {
  margin-bottom: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  color: #ffffff !important;
  font-weight: 600;
  text-decoration: none !important;
}

.mobile-sidebar-contacts a:hover {
  color: #eaab00 !important;
}

.mobile-sidebar-contacts p i,
.mobile-sidebar-contacts a i,
.mobile-sidebar-contacts span i {
  color: #eaab00 !important;
  font-size: 14px;
}

/* 4. Responsive Breakpoints & Mobile Optimization
   -------------------------------------------------------------------------- */
@media screen and (max-width: 991px) {
  /* Hide desktop header navbar links on mobile screens */
  .header .navigation {
    display: none !important;
  }
  
  /* Show hamburger button on mobile screens */
  .mobile-nav-toggle {
    display: flex !important;
  }

  /* Prevent page-wrap translate jitter on mobile */
  #page-wrap {
    transform: none !important;
    transition: none !important;
  }

  /* Slider headline adjustments for mobile */
  .tp-headline {
    font-size: 24px !important;
    line-height: 32px !important;
    white-space: normal !important;
    text-align: center !important;
    padding: 0 15px !important;
  }

  /* Responsive section padding */
  .section {
    padding-top: 45px !important;
    padding-bottom: 45px !important;
  }

  /* Grid card spacing */
  .portfolio-item, .service-item, .card {
    margin-bottom: 25px;
  }

  /* Form touch target optimization */
  input[type="text"], input[type="email"], input[type="tel"], textarea, select {
    min-height: 44px;
    font-size: 14px;
  }

  /* Footer adjustments */
  .foot-widget aside {
    margin-bottom: 30px;
  }
}

@media screen and (max-width: 575px) {
  .header .main-header-1 .container {
    min-height: 70px;
    padding-top: 8px !important;
    padding-bottom: 8px !important;
  }

  .header .logo img {
    height: 45px !important;
  }

  .mobile-nav-toggle {
    padding: 6px 10px;
  }

  .mobile-sidebar-drawer {
    width: 290px;
  }

  .whatsapp-float {
    bottom: 20px;
    right: 20px;
    width: 48px;
    height: 48px;
  }
}
