/*============================================================================================*/
/* Your custom styles below */
/*============================================================================================*/

/* Ensure other pages (header_in) use default positioning, not fixed */
header.header_in {
  position: relative !important;
}

header.header_in.is_sticky,
header.header_in.menu_fixed {
  position: relative !important;
}

/* Sticky Header Styles ONLY for Homepage (header.header.menu_fixed) */
header.header.menu_fixed {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  z-index: 9999;
  background-color: transparent;
  transition: background-color 0.3s ease, box-shadow 0.3s ease;
  padding: 15px 0;
}

/* Global container max-width override - Bootstrap default is 1140px */
.container {
  max-width: 1300px !important;
}

/* Container max-width for homepage header */
header.header.menu_fixed .header-container {
  max-width: 1300px;
  margin-left: auto;
  margin-right: auto;
  padding-left: 15px;
  padding-right: 15px;
  width: 100%;
  box-sizing: border-box;
  position: relative;
}

header.header.menu_fixed.header-scrolled {
  background-color: #ffffff;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
  padding: 10px 0;
}

/* Ensure header content is visible when scrolled */
header.header.menu_fixed.header-scrolled #top_menu li a,
header.header.menu_fixed.header-scrolled .main-menu ul li span a {
  color: #444;
}

header.header.menu_fixed.header-scrolled #top_menu li a:hover,
header.header.menu_fixed.header-scrolled .main-menu ul li span:hover a {
  color: #004dda;
}

/* Logo visibility - Fixed for white logo on transparent background */
header.header.menu_fixed .logo_normal {
  display: block !important;
  opacity: 1 !important;
  visibility: visible !important;
}

header.header.menu_fixed .logo_sticky {
  display: none !important;
}

header.header.menu_fixed.header-scrolled .logo_normal {
  display: none !important;
}

header.header.menu_fixed.header-scrolled .logo_sticky {
  display: block !important;
  opacity: 1 !important;
  visibility: visible !important;
}

/* Ensure logo is always visible */
header.header.menu_fixed #logo img {
  opacity: 1 !important;
  visibility: visible !important;
  max-width: 165px;
  height: auto;
}

/* Hamburger menu color adjustment */
header.header.menu_fixed.header-scrolled .hamburger-inner,
header.header.menu_fixed.header-scrolled .hamburger-inner::before,
header.header.menu_fixed.header-scrolled .hamburger-inner::after {
  background-color: #444;
}

/* Smooth transition for all header elements */
header.header.menu_fixed * {
  transition: color 0.3s ease, opacity 0.3s ease;
}

/* Ensure header container maintains proper layout */
header.header.menu_fixed #logo {
  transition: all 0.3s ease;
}

/* FAQ Page Enhancements */
.faq-section {
  margin-bottom: 40px;
}

.faq-section h4 {
  color: #333;
  font-weight: 600;
  margin-bottom: 25px;
  padding-bottom: 10px;
  border-bottom: 2px solid #004dda;
}

.accordion_2 .card {
  border: 1px solid #e0e0e0;
  border-radius: 4px;
  margin-bottom: 10px;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
  transition: box-shadow 0.3s ease;
}

.accordion_2 .card:hover {
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.accordion_2 .card-header {
  background-color: #f8f9fa;
  border-bottom: 1px solid #e0e0e0;
  padding: 15px 20px;
}

.accordion_2 .card-header h5 {
  text-align: left;
}

.accordion_2 .card-header h5 a {
  color: #333;
  font-weight: 500;
  text-decoration: none;
  display: flex;
  align-items: center;
  justify-content: space-between;
  transition: color 0.3s ease;
  text-align: left;
}

.accordion_2 .card-header h5 a .question-text {
  flex: 1;
  text-align: left !important;
  padding-right: 15px;
}

.accordion_2 .card-header h5 a {
  text-align: left !important;
}

.accordion_2 .card-header h5 a:hover {
  color: #004dda;
}

.accordion_2 .card-header h5 a .indicator {
  margin-left: 15px;
  flex-shrink: 0;
  transition: transform 0.3s ease;
}

.accordion_2 .card-header h5 a[aria-expanded="true"] .indicator {
  transform: rotate(180deg);
}

.accordion_2 .card-body {
  padding: 20px;
  background-color: #fff;
  color: #555;
  line-height: 1.8;
}

.accordion_2 .card-body p {
  margin-bottom: 0;
}

#faq_cat .box_style_cat {
  background-color: #fff;
  border-radius: 4px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
  padding: 20px;
  position: sticky;
  top: 80px;
}

#cat_nav {
  list-style: none;
  padding: 0;
  margin: 0;
}

#cat_nav li {
  margin-bottom: 8px;
}

#cat_nav li a {
  display: flex;
  align-items: center;
  padding: 12px 15px;
  color: #555;
  text-decoration: none;
  border-radius: 4px;
  transition: all 0.3s ease;
}

#cat_nav li a:hover {
  background-color: #f0f0f0;
  color: #004dda;
}

#cat_nav li a.active {
  background-color: #004dda !important;
  color: #fff !important;
  font-weight: 600;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

#cat_nav li a.active i {
  color: #fff !important;
}

#cat_nav li a.active:hover {
  background-color: #004dda !important;
  color: #fff !important;
}

#cat_nav li a i {
  margin-right: 10px;
  font-size: 18px;
  transition: color 0.3s ease;
}

/* Remove margin-top and increase height by 20px, set text to white */
.sub_header_in.sticky_header {
  margin-top: 75px !important;
  padding-top: 30px !important;
  padding-bottom: 30px !important;
  background-color: #004dda !important;
}

.sub_header_in {
  background-color: #004dda !important;
}

.sub_header_in.sticky_header h1,
.sub_header_in.sticky_header p,
.sub_header_in.sticky_header * {
  color: #fff !important;
}

/* Contact Page Improvements */
.contact-form-messages {
  margin-bottom: 25px;
}

.contact-form-messages .alert {
  padding: 15px 20px;
  border-radius: 5px;
  margin-bottom: 0;
  display: flex;
  align-items: center;
  gap: 10px;
}

.contact-form-messages .alert i {
  font-size: 20px;
}

.contact-form-messages .alert-danger {
  background-color: #f8d7da;
  border-color: #f5c6cb;
  color: #721c24;
}

.contact-form-messages .alert-success {
  background-color: #d4edda;
  border-color: #c3e6cb;
  color: #155724;
}

.box_contacts {
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  border: 1px solid #e0e0e0;
}

.box_contacts:hover {
  transform: translateY(-5px);
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}

.box_contacts h3 {
  font-weight: 600;
  margin: 15px 0 10px 0;
  font-size: 20px;
  color: #333;
}

.box_contacts p {
  color: #666;
  margin-bottom: 15px;
  font-size: 14px;
}

.box_contacts .contacts_info {
  list-style: none;
  padding: 0;
  margin: 0;
  text-align: left;
}

.box_contacts .contacts_info li {
  margin-bottom: 10px;
  color: #555;
  font-size: 14px;
}

.box_contacts .contacts_info li strong {
  color: #333;
  margin-right: 5px;
}

.box_contacts .contacts_info li a {
  color: #004dda;
  text-decoration: none;
  transition: color 0.3s ease;
}

.box_contacts .contacts_info li a:hover {
  color: #0033a0;
  text-decoration: underline;
}

.box_contacts address {
  font-style: normal;
  line-height: 1.8;
  color: #555;
  margin: 0;
  text-align: left;
}

.box_contacts address strong {
  color: #333;
  display: block;
  margin-bottom: 5px;
}

#contactform label {
  font-weight: 500;
  color: #333;
  margin-bottom: 8px;
}

#contactform .text-danger {
  color: #dc3545;
}

#contactform .form-control {
  border: 1px solid #ddd;
  border-radius: 5px;
  padding: 12px 15px;
  transition: border-color 0.3s ease, box-shadow 0.3s ease;
}

#contactform .form-control:focus {
  border-color: #004dda;
  box-shadow: 0 0 0 0.2rem rgba(0, 77, 218, 0.25);
  outline: none;
}

#contactform textarea.form-control {
  resize: vertical;
  min-height: 150px;
}

/* Header Main (parts/header.php) Specific Styles */
header.header-main.menu_fixed {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  z-index: 9999;
  background-color: transparent;
  transition: background-color 0.3s ease, box-shadow 0.3s ease;
  padding: 15px 0;
}

/* Container max-width for header-main */
header.header-main.menu_fixed .header-container {
  max-width: 1300px;
  margin-left: auto;
  margin-right: auto;
  padding-left: 15px;
  padding-right: 15px;
  width: 100%;
  box-sizing: border-box;
  position: relative;
}

header.header-main.menu_fixed.header-scrolled {
  background-color: #ffffff;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
  padding: 10px 0;
}

/* Nav items color - #333 */
header.header-main.menu_fixed .main-menu > ul > li span > a {
  color: #333 !important;
}

header.header-main.menu_fixed .main-menu > ul > li span:hover > a {
  color: #004dda !important;
}

/* When scrolled, maintain #333 color */
header.header-main.menu_fixed.header-scrolled .main-menu > ul > li span > a {
  color: #333 !important;
}

header.header-main.menu_fixed.header-scrolled
  .main-menu
  > ul
  > li
  span:hover
  > a {
  color: #004dda !important;
}

/* Logo visibility for header-main */
header.header-main.menu_fixed .logo_normal {
  display: block !important;
  opacity: 1 !important;
  visibility: visible !important;
}

header.header-main.menu_fixed .logo_sticky {
  display: none !important;
}

header.header-main.menu_fixed.header-scrolled .logo_normal {
  display: none !important;
}

header.header-main.menu_fixed.header-scrolled .logo_sticky {
  display: block !important;
  opacity: 1 !important;
  visibility: visible !important;
}

/* Top menu buttons color */
header.header-main.menu_fixed #top_menu li a {
  color: #333 !important;
}

header.header-main.menu_fixed #top_menu li a.btn_add {
  color: #fff !important;
}

header.header-main.menu_fixed #top_menu li a:hover {
  color: #004dda !important;
}

header.header-main.menu_fixed.header-scrolled #top_menu li a {
  color: #333 !important;
}

header.header-main.menu_fixed.header-scrolled #top_menu li a.btn_add {
  color: #fff !important;
}

header.header-main.menu_fixed.header-scrolled #top_menu li a:hover {
  color: #004dda !important;
}

/* Hamburger menu color */
header.header-main.menu_fixed .hamburger-inner,
header.header-main.menu_fixed .hamburger-inner::before,
header.header-main.menu_fixed .hamburger-inner::after {
  background-color: #333;
}

header.header-main.menu_fixed.header-scrolled .hamburger-inner,
header.header-main.menu_fixed.header-scrolled .hamburger-inner::before,
header.header-main.menu_fixed.header-scrolled .hamburger-inner::after {
  background-color: #333;
}

/* Mobile Menu Toggle Styles */
@media (max-width: 991px) {
  /* Override style.css hiding of nav#menu on mobile */
  nav#menu,
  nav#menu.main-menu {
    display: block !important;
    visibility: visible !important;
  }

  /* Hide menu by default on mobile (off-screen) */
  nav#menu.main-menu {
    position: fixed !important;
    top: 0 !important;
    right: -100% !important;
    width: 280px !important;
    height: 100vh !important;
    background: #fff !important;
    z-index: 9998 !important;
    transition: right 0.3s ease !important;
    overflow-y: auto !important;
    box-shadow: -2px 0 10px rgba(0, 0, 0, 0.1) !important;
    padding: 80px 20px 20px !important;
  }

  /* Show menu when open */
  nav#menu.main-menu.menu-open {
    right: 0 !important;
    display: block !important;
    visibility: visible !important;
  }

  /* Menu list styling */
  nav#menu.main-menu ul {
    list-style: none !important;
    padding: 0 !important;
    margin: 0 !important;
    display: block !important;
  }

  nav#menu.main-menu ul li {
    border-bottom: 1px solid #eee;
    display: block !important;
  }

  nav#menu.main-menu ul li span {
    display: block !important;
  }

  nav#menu.main-menu ul li span a {
    display: block !important;
    padding: 15px 0 !important;
    color: #333 !important;
    text-decoration: none !important;
    font-size: 16px !important;
    transition: color 0.3s ease !important;
  }

  nav#menu.main-menu ul li span a:hover {
    color: #004dda !important;
  }

  /* Overlay when menu is open */
  body.menu-open::before {
    content: "";
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    z-index: 9997;
  }

  /* Hamburger animation */
  .hamburger.is-active .hamburger-inner {
    transform: rotate(225deg);
    transition-delay: 0.12s;
    transition-timing-function: cubic-bezier(0.215, 0.61, 0.355, 1);
  }

  .hamburger.is-active .hamburger-inner::before {
    top: 0;
    opacity: 0;
    transition: top 0.1s ease-out, opacity 0.1s 0.12s ease-out;
  }

  .hamburger.is-active .hamburger-inner::after {
    bottom: 0;
    transform: rotate(-90deg);
    transition: bottom 0.1s ease-out,
      transform 0.22s 0.12s cubic-bezier(0.215, 0.61, 0.355, 1);
  }
}

/* Mobile Search Button and Form Toggle */
@media (max-width: 991px) {
  a.btn_search_mobile {
    display: block !important;
    cursor: pointer !important;
    pointer-events: auto !important;
    z-index: 10 !important;
    position: relative !important;
  }

  a.btn_search_mobile.side_panel {
    display: block !important;
  }

  /* Show the form when toggled (form is already hidden by default in style.css) */
  #mobile_search_form.custom-search-input-2.inner.mobile-form-show {
    display: flex !important;
    flex-wrap: wrap;
    width: 100%;
    margin-top: 15px;
  }

  #mobile_search_form.custom-search-input-2.inner.mobile-form-show .col-lg-3,
  #mobile_search_form.custom-search-input-2.inner.mobile-form-show .col-lg-2,
  #mobile_search_form.custom-search-input-2.inner.mobile-form-show .col-lg-1 {
    width: 100% !important;
    max-width: 100% !important;
    margin-bottom: 15px;
    padding-left: 0;
    padding-right: 0;
  }

  #mobile_search_form.custom-search-input-2.inner.mobile-form-show
    input[type="submit"] {
    width: 100%;
    margin-top: 10px;
  }
}

@media (max-width: 991px) {
  #faq_cat .box_style_cat {
    position: relative;
    top: 0;
    margin-bottom: 30px;
  }

  .sub_header_in.sticky_header {
    margin-top: 70px !important;
  }

  .col-xl-6.pr-xl-4,
  .col-xl-6.pl-xl-4 {
    padding-left: 15px;
    padding-right: 15px;
  }

  .box_contacts {
    margin-bottom: 25px;
  }
}
