/* HM360 Client Area Header Overrides
   ------------------------------------------------------------------ */

/* Sticky Header */
.header-area {
  position: sticky;
  top: 0;
  z-index: 1020;
  background-color: #fff;
  box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
}

.header-area .navbar {
  padding: 1rem 0; /* Increased height */
  min-height: 80px;
}

.header-area .navbar-brand img, 
.header-area .logo-img {
    max-height: 50px !important; /* Taller logo */
}

.header-area .navbar-nav .nav-link {
  font-weight: 600;
  color: #0f172a;
  padding: 0.65rem 1rem;
  transition: color 0.25s ease, background-color 0.25s ease;
}

.header-area .navbar-nav .nav-link:hover,
.header-area .navbar-nav .nav-link:focus {
  color: #2563eb;
  background-color: rgba(37, 99, 235, 0.08);
  border-radius: 8px;
  outline: none;
}

.header-area .navbar-nav .dropdown-toggle::after {
  margin-left: 0.35rem;
  font-size: 0.7rem;
  vertical-align: middle;
}

/* Dropdown Menu */
.header-area .dropdown-menu {
  min-width: 220px;
  border: 1px solid rgba(15, 23, 42, 0.08);
  box-shadow: 0 18px 45px rgba(15, 23, 42, 0.12);
  border-radius: 15px;
  padding: 0.35rem 0;
  margin-top: 0; /* Remove gap for smooth hover */
  background-color: #fff;
  display: none;
}

/* Hover Support for Dropdowns */
@media (min-width: 992px) {
    .header-area .navbar-nav .dropdown:hover > .dropdown-menu,
    .header-area .navbar-nav .dropdown:focus-within > .dropdown-menu {
        display: block;
        opacity: 1;
        visibility: visible;
        transform: translateY(0);
        animation: slideUp 0.3s ease-out forwards;
    }
}

@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.header-area .dropdown-menu.show {
  display: block;
  opacity: 1;
  visibility: visible;
  transform: translateY(4px);
  transition: opacity 0.2s ease, transform 0.2s ease;
}

.header-area .dropdown-item {
  font-weight: 500;
  padding: 0.65rem 1.25rem;
  color: #1f2937;
  transition: background-color 0.2s ease, color 0.2s ease;
}

.header-area .dropdown-item i {
  width: 18px;
  font-size: 0.85rem;
  color: #64748b;
}

.header-area .dropdown-item:hover,
.header-area .dropdown-item:focus {
  background-color: rgba(37, 99, 235, 0.08);
  color: #0f172a;
}

.captcha-section {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.captcha-wrapper {
  display: flex;
  align-items: center;
  margin-bottom: 0.5rem;
}
.captcha-image-wrapper {
  margin-right: 0.5rem;
}
.captcha-section .captcha-wrapper {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.captcha-image {
  height: 48px;
  width: 140px;
  border-radius: 8px;
  border: 1px solid rgba(228, 232, 240, 0.7);
  object-fit: cover;
}

.refresh-captcha {

  background: none;
    border: 1px solid #ced4da;
    border-radius: 0.375rem;
    padding: 0.375rem 0.5rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;

  
}

.refresh-captcha:hover {
  background: rgba(78, 115, 223, 0.1);
}

.header-area .sub-header {
  border-top: 1px solid rgba(15, 23, 42, 0.08);
  border-bottom: 1px solid rgba(15, 23, 42, 0.08);
}

.hm360-footer {
  background: linear-gradient(135deg, #0f172a 0%, #1e3a8a 100%);
  color: rgba(255, 255, 255, 0.85);
  padding: 3rem 0;
  margin-top: 4rem;
}

.hm360-footer h6 {
  color: #ffffff;
  font-weight: 600;
  margin-bottom: 1rem;
}

.hm360-footer a {
  color: rgba(255, 255, 255, 0.85);
  text-decoration: none;
  transition: color 0.2s ease;
}

.hm360-footer a:hover {
  color: #ffffff;
}

.hm360-footer hr {
  border-color: rgba(255, 255, 255, 0.15);
}

.hm360-footer .copyright {
  color: rgba(255, 255, 255, 0.8);
}

.hm360-footer .footer-logo {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: rgba(255, 255, 255, 0.08);
  border-radius: 14px;
  padding: 0.65rem 1rem;
  margin-bottom: 1rem;
  max-width: 220px;
}

.hm360-footer .footer-logo img {
  max-height: 42px;
  width: auto;
  display: block;
  height: auto;
  filter: brightness(0) invert(1);
}

.hm360-footer .msme-badge {
  display: inline-flex;
  flex-direction: column;
  align-items: flex-start;
  margin-top: 1rem;
}

.hm360-footer .msme-badge img {
  max-width: 140px;
  border-radius: 8px;
  padding: 4px;
  background: rgba(255, 255, 255, 0.08);
}

.hm360-footer .social-links .btn-icon {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.15);
  color: #fff;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: background 0.2s ease;
}

.hm360-footer .social-links .btn-icon:hover {
  background: rgba(255, 255, 255, 0.3);
}

.hm360-footer .list-unstyled li {
  margin-bottom: 0.4rem;
}

.hm360-footer a,
.hm360-footer a:visited {
  color: rgba(255, 255, 255, 0.85) !important;
}

.hm360-footer a:hover {
  color: #ffffff !important;
}

@media (max-width: 991.98px) {
  body.hm360-mobile-nav-open {
    overflow: hidden;
  }

  .header-area .navbar-toggler {
    display: block;
    border: 1px solid #dbe3f0;
    border-radius: 8px;
    padding: 0.35rem 0.5rem;
    z-index: 20;
  }

  .header-area #navbarNav.navbar-collapse {
    position: fixed;
    top: 0;
    left: 0;
    width: min(80vw, 340px);
    height: 100vh;
    height: 100dvh;
    margin: 0;
    padding: 0 0 1.25rem;
    background: #fff;
    border-radius: 0;
    box-shadow: 8px 0 32px rgba(15, 23, 42, 0.18);
    display: flex !important;
    flex-direction: column;
    align-items: stretch;
    overflow-y: auto;
    overflow-x: hidden;
    z-index: 1056;
    transform: translateX(-105%);
    transition: transform 0.28s ease;
    visibility: visible;
  }

  .header-area #navbarNav.hm360-drawer-open {
    transform: translateX(0);
  }

  .hm360-mobile-nav-backdrop {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(15, 23, 42, 0.45);
    z-index: 1050;
  }

  .hm360-mobile-nav-backdrop.is-open {
    display: block;
  }

  .hm360-mobile-nav-header {
    padding: 0.85rem 1rem;
    border-bottom: 1px solid #eef0f4;
    gap: 0.75rem;
  }

  .hm360-mobile-nav-header .logo-img {
    max-width: 180px;
    max-height: 40px;
  }

  .hm360-mobile-nav-close {
    background: none;
    border: 0;
    font-size: 2rem;
    line-height: 1;
    color: #111827;
    padding: 0 0.25rem;
    cursor: pointer;
  }

  .header-area #navbarNav .navbar-nav {
    align-items: stretch !important;
    gap: 0 !important;
    width: 100%;
    margin: 0;
    padding: 0;
  }

  .header-area #navbarNav .nav-item {
    width: 100%;
    border-bottom: 1px solid #eef0f4;
    margin: 0;
  }

  .header-area .navbar-nav .nav-link,
  .header-area #navbarNav .nav-link {
    color: #1e3a8a;
    font-weight: 600;
    padding: 0.95rem 1.25rem;
  }

  .header-area #navbarNav .dropdown-toggle::after {
    float: right;
    margin-top: 0.55rem;
    transition: transform 0.2s ease;
  }

  .header-area #navbarNav .dropdown.hm360-submenu-open > .dropdown-toggle::after {
    transform: rotate(180deg);
  }

  .header-area .dropdown-menu {
    position: static;
    width: 100%;
    box-shadow: none;
    border: none;
    margin-top: 0;
    padding: 0 0 0.5rem;
    background: #f8fafc;
    display: none;
    transform: none;
  }

  .header-area .dropdown-menu.show,
  .header-area .dropdown.hm360-submenu-open > .dropdown-menu {
    display: block;
    opacity: 1;
    visibility: visible;
    transform: none;
  }

  .header-area #navbarNav .dropdown-item {
    padding: 0.55rem 1.5rem;
    color: #1e3a8a;
  }

  .header-area #navbarNav .hm360-header-search {
    display: none !important;
  }

  .hm360-mobile-nav-contact {
    margin-top: auto;
    padding: 1.25rem 1.25rem 0.75rem;
  }

  .hm360-mobile-nav-contact h6 {
    color: #1e3a8a;
    font-weight: 700;
    margin-bottom: 0.45rem;
  }

  .hm360-mobile-nav-contact a {
    text-decoration: none;
  }

  .hm360-mobile-nav-contact .hm360-mobile-phone {
    display: block;
    color: #4b5563;
    font-weight: 400;
    margin-bottom: 0.2rem;
  }

  .hm360-mobile-nav-contact .hm360-mobile-email {
    display: block;
    color: #2563eb;
    font-weight: 500;
  }

  .hm360-mobile-nav-contact .hm360-mobile-social {
    list-style: none;
    display: flex;
    align-items: center;
    gap: 0.85rem;
    padding: 0;
    margin: 0.85rem 0 0;
  }

  .hm360-mobile-nav-contact .hm360-mobile-social a {
    color: #111827;
    font-size: 1.05rem;
    line-height: 1;
  }

  .hm360-mobile-nav-contact .hm360-mobile-social a:hover {
    color: #2563eb;
  }
}

@media (min-width: 992px) {
  .hm360-mobile-nav-backdrop {
    display: none !important;
  }
}

/* Global Layout & Container Width Standardization
   Matches: https://clients.wingshoster.net/
   ------------------------------------------------------------------ */

.header-area .container,
.header-area .sub-header .container,
#main-body .container,
#footer .container {
    max-width: 1200px;
    width: 100%;
    margin-left: auto;
    margin-right: auto;
    padding-left: 15px;
    padding-right: 15px;
}

/* Ensure body content doesn't overflow or become too narrow */
#main-body .container {
    box-sizing: border-box;
}

/* Responsive adjustments */
@media (max-width: 1200px) {
    .header-area .container,
    .header-area .sub-header .container,
    #main-body .container,
    #footer .container {
        max-width: 100%;
        padding-left: 20px;
        padding-right: 20px;
    }
}

@media (max-width: 768px) {
    .header-area .container,
    .header-area .sub-header .container,
    #main-body .container,
    #footer .container {
        padding-left: 15px;
        padding-right: 15px;
    }
}

/* ------------------------------------------------------------------
   Client auth pages (login / register) – match standard #main-body layout
   ------------------------------------------------------------------ */
.client-auth-page #main-body.tt-auth-wrap {
    padding: 20px 0;
    min-height: 350px;
}

.client-auth-page #main-body .primary-content {
    margin-bottom: 60px;
}

.client-auth-page {
    overflow-x: hidden;
}

/* Login card */
.client-auth-login-card {
    display: flex;
    max-width: 900px;
    width: 100%;
    margin-left: auto;
    margin-right: auto;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.05);
    border-radius: 15px;
    overflow: hidden;
    background: #fff;
    align-items: stretch;
}

.client-auth-login-card .login-form {
    flex: 1;
    padding: 40px;
    display: flex;
    flex-direction: column;
}

.client-auth-login-card .login-image,
.client-auth-login-card .tt-login-registration-testimonial {
    flex: 1;
    background: linear-gradient(135deg, #f5f7fa 0%, #e4e8f0 100%);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-end;
    padding: 40px;
    min-height: 320px;
}

.client-auth-login-card .tt-login-registration-testimonial {
    background-size: cover !important;
    background-position: center bottom !important;
    background-repeat: no-repeat !important;
}

.client-auth-register-card {
    max-width: 1100px;
    margin-left: auto;
    margin-right: auto;
    border: none;
    border-radius: 15px;
}

.client-auth-register-card .registration-image {
    object-fit: cover;
    height: 100%;
    width: 100%;
    border-radius: 15px 0 0 15px;
}

/* Register form grid */
.client-auth-page .form-row {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    margin-bottom: 1rem;
}

.client-auth-page .form-col {
    flex: 1 1 100%;
    min-width: 0;
}

@media (min-width: 768px) {
    .client-auth-register-card .registration-card-row {
        min-height: 500px;
    }

    .client-auth-page .form-col.half-width {
        flex: 1 1 calc(50% - 0.5rem);
    }
}

/* ---- Mobile / tablet auth pages ---- */
@media (max-width: 991.98px) {
    .client-auth-login-card {
        flex-direction: column;
    }

    .client-auth-login-card .login-form,
    .client-auth-login-card .login-image,
    .client-auth-login-card .tt-login-registration-testimonial {
        flex: 1 1 100%;
        width: 100%;
        max-width: 100%;
        min-width: 0;
        min-height: auto;
        padding: 28px 20px;
    }
}

@media (max-width: 767.98px) {
    .client-auth-page #main-body.tt-auth-wrap {
        padding: 12px 0;
    }

    .client-auth-page #main-body .primary-content {
        margin-bottom: 32px;
        padding-left: 0;
        padding-right: 0;
    }

    .client-auth-page #main-body .container {
        padding-left: 12px;
        padding-right: 12px;
    }

    .client-auth-login-card {
        border-radius: 12px;
        box-shadow: 0 4px 20px rgba(0, 0, 0, 0.06);
    }

    .client-auth-login-card .login-form {
        padding: 24px 16px;
    }

    .client-auth-register-card {
        border-radius: 12px;
        box-shadow: 0 4px 20px rgba(0, 0, 0, 0.06);
    }

    .client-auth-register-card .card-body {
        padding: 1.25rem 1rem;
    }

    .client-auth-register-card .registration-card-row {
        min-height: auto;
    }

    .client-auth-page .form-row {
        flex-direction: column;
        gap: 0.75rem;
        margin-bottom: 0.75rem;
    }

    .client-auth-page .form-col,
    .client-auth-page .form-col.half-width,
    .client-auth-page .form-col.full-width {
        flex: 1 1 100%;
        width: 100%;
    }

    .client-auth-page .phone-input {
        flex-direction: column;
        gap: 0.5rem;
    }

    .client-auth-page .phone-country-code {
        width: auto;
        min-width: 3.5rem;
    }

    .client-auth-page .captcha-container,
    .client-auth-page .captcha-wrapper {
        flex-direction: column;
        align-items: stretch !important;
    }

    .client-auth-page .captcha-image-wrapper {
        margin-right: 0 !important;
        margin-bottom: 0.5rem;
    }

    .client-auth-page .footer-links {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.75rem;
    }

    .client-auth-page .mailing-list-options {
        flex-wrap: wrap;
    }

    .client-auth-page .input-group {
        flex-wrap: nowrap;
    }

    .client-auth-page .input-group .form-control,
    .client-auth-page .input-group .form-select {
        min-width: 0;
    }

    #footer.tt-footer .tt-footer-top {
        padding-top: 40px;
        padding-bottom: 40px;
    }

    #footer.tt-footer .tt-footer-top .row > [class*="col-"] {
        margin-bottom: 1.5rem;
    }

    #footer.tt-footer .tt-footer-top .row > [class*="col-"]:last-child {
        margin-bottom: 0;
    }
}

@media (max-width: 575.98px) {
    .client-auth-login-card .login-header h2 {
        font-size: 1.35rem;
    }

    .client-auth-register-card .card-body h3 {
        font-size: 1.25rem;
    }

    .client-auth-page .section-title {
        font-size: 1rem;
    }

    .client-auth-page .btn-lg {
        font-size: 1rem;
        padding: 0.65rem 1rem;
    }
}

/* Footer spacing – tt-footer-top uses ptb-60 class without Bootstrap utility */
#footer.tt-footer .tt-footer-top {
    padding-top: 31px;
    padding-bottom: 60px;
}

#footer.tt-footer .tt-footer-bottom {
    padding-top: 12px;
    padding-bottom: 12px;
}

#footer.tt-footer .footer-logo {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: rgba(255, 255, 255, 0.08);
    border-radius: 14px;
    padding: 0.65rem 1rem;
    margin-bottom: 1rem;
    max-width: 220px;
}

#footer.tt-footer .footer-logo img.logo-white {
    max-height: 42px;
    width: auto;
    display: block;
    height: auto;
}

#footer.tt-footer .tt-footer-widget h6 {
    margin-bottom: 1rem;
}

#footer.tt-footer .tt-footer-menu {
    margin-top: 1rem;
}

/* Bootstrap 5 btn-close fallback (theme/admin pages use mixed Bootstrap versions) */
.btn-close {
    box-sizing: content-box;
    width: 1em;
    height: 1em;
    padding: 0.25em;
    color: #000;
    background: transparent url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' fill='%23000'%3e%3cpath d='M.293.293a1 1 0 0 1 1.414 0L8 6.586 14.293.293a1 1 0 1 1 1.414 1.414L9.414 8l6.293 6.293a1 1 0 0 1-1.414 1.414L8 9.414l-6.293 6.293a1 1 0 0 1-1.414-1.414L6.586 8 .293 1.707a1 1 0 0 1 0-1.414z'/%3e%3c/svg%3e") center/1em auto no-repeat;
    border: 0;
    border-radius: 0.375rem;
    opacity: 0.5;
}

.btn-close:hover,
.btn-close:focus {
    color: #000;
    text-decoration: none;
    opacity: 0.75;
}

.alert-dismissible .btn-close,
.modal-header .btn-close {
    position: absolute;
    top: 0;
    right: 0;
    z-index: 2;
    padding: 0.75rem 1.25rem;
}

.alert-dismissible {
    position: relative;
}

.alert-dismissible .close,
.alert-dismissible .hm360-alert-dismiss {
    position: absolute;
    top: 0;
    right: 0;
    z-index: 2;
    padding: 0.75rem 1.25rem;
    color: inherit;
    opacity: 0.7;
    background: transparent;
    border: 0;
    font-size: 1.5rem;
    font-weight: 700;
    line-height: 1;
}

.alert-dismissible .close:hover,
.alert-dismissible .hm360-alert-dismiss:hover {
    opacity: 1;
}
