/**
 * Probiz Theme - Modern UI Enhancements
 * Sticky nav with scroll transition, buttons, typography, Back to Top
 */

/* ========== 1. STICKY NAVIGATION WITH SMOOTH COLOR TRANSITION ========== */

.nav-header-custom.navbar-default {
  transition: background-color 0.35s ease, box-shadow 0.35s ease, padding 0.3s ease;
  -webkit-transition: background-color 0.35s ease, box-shadow 0.35s ease, padding 0.3s ease;
}

/* Sticky state: fixed position + solid background + shadow */
.nav-header-custom.stick.sticky {
  top: 0 !important;
  left: 0;
  right: 0;
  width: 100% !important;
  position: fixed !important;
  z-index: 9999;
  background-color: #fff !important;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
  padding: 10px 0;
}

.nav-header-custom.stick.sticky #main_nav .navbar-nav li a {
  transition: color 0.25s ease;
}

/* Header transparent (style2): smooth transition from transparent to solid on scroll */
.nav-header-custom.header-transparent.navbar-default {
  transition: background-color 0.4s ease, box-shadow 0.35s ease;
}

/* ========== 2. MODERN BUTTON STYLES ========== */

.btn,
button[type="submit"],
input[type="submit"],
.navbar-form button {
  border-radius: 8px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
  transition: transform 0.2s ease, box-shadow 0.25s ease, background-color 0.25s ease, border-color 0.25s ease;
  -webkit-tap-highlight-color: transparent;
}

.btn:hover,
.btn:focus,
button[type="submit"]:hover,
button[type="submit"]:focus,
input[type="submit"]:hover,
input[type="submit"]:focus {
  transform: translateY(-1px);
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.12);
}

.btn:active,
button[type="submit"]:active,
input[type="submit"]:active {
  transform: translateY(0);
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.1);
}

.btn.btn-default {
  border-radius: 8px;
  box-shadow: 0 2px 10px rgba(17, 147, 212, 0.25);
}

.btn.btn-default:hover,
.btn.btn-default:focus {
  box-shadow: 0 4px 16px rgba(17, 147, 212, 0.35);
}

.btn-primary {
  border-radius: 8px;
  box-shadow: 0 2px 10px rgba(15, 127, 184, 0.3);
}

.btn-primary:hover,
.btn-primary:focus {
  box-shadow: 0 4px 16px rgba(15, 127, 184, 0.4);
}

/* ========== 3. TYPOGRAPHY - CONSISTENT & MOBILE READABLE ========== */

html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}

body {
  font-size: 16px;
  line-height: 1.6;
  letter-spacing: 0.01em;
}

h1, h2, h3, h4, h5, h6 {
  line-height: 1.3;
  margin-top: 0;
}

p {
  margin-bottom: 1em;
}

/* Mobile-first typography scaling */
@media (max-width: 767px) {
  body {
    font-size: 15px;
    line-height: 1.65;
  }

  h1 { font-size: 1.75rem; }
  h2 { font-size: 1.5rem; }
  h3 { font-size: 1.25rem; }
  h4, h5, h6 { font-size: 1.1rem; }

  .navbar-default #main_nav .navbar-nav li a {
    font-size: 14px;
    padding: 10px 12px;
    line-height: 1.4;
  }
}

@media (max-width: 480px) {
  body {
    font-size: 14px;
  }
}

/* ========== 4. BACK TO TOP BUTTON ========== */

#probiz-back-to-top {
  position: fixed;
  bottom: 28px;
  right: 28px;
  width: 48px;
  height: 48px;
  background: #1193d4;
  color: #fff;
  border: none;
  border-radius: 50%;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 16px rgba(17, 147, 212, 0.4);
  z-index: 9998;
  opacity: 0;
  visibility: hidden;
  transform: translateY(12px) scale(0.9);
  transition: opacity 0.35s ease, visibility 0.35s ease, transform 0.35s cubic-bezier(0.34, 1.56, 0.64, 1),
              background-color 0.2s ease, box-shadow 0.2s ease;
}

#probiz-back-to-top.visible {
  opacity: 1;
  visibility: visible;
  transform: translateY(0) scale(1);
}

#probiz-back-to-top:hover {
  background: #0d72a5;
  color: #fff;
  box-shadow: 0 6px 22px rgba(17, 147, 212, 0.45);
  transform: translateY(-2px) scale(1.05);
}

#probiz-back-to-top:active {
  transform: translateY(0) scale(0.98);
}

#probiz-back-to-top i {
  font-size: 18px;
  line-height: 1;
}

@media (max-width: 767px) {
  #probiz-back-to-top {
    bottom: 20px;
    right: 20px;
    width: 44px;
    height: 44px;
  }

  #probiz-back-to-top i {
    font-size: 16px;
  }
}
