/* ============================================
   Blue Box Cold Chain - Header & Footer Styles (WordPress Version)
   ============================================ */

/* ========== HEADER ========== */
.site-header {
  background: linear-gradient(135deg, var(--secondary) 0%, var(--primary) 100%);
  color: white;
  padding: 1rem 0;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
  position: sticky;
  top: 0;
  z-index: 100;
}

body.admin-bar .site-header {
  top: 32px;
}

@media (max-width: 782px) {
  body.admin-bar .site-header {
    top: 46px;
  }
}

.header-container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 1rem;
}

.logo {
  font-size: 1.5rem;
  font-weight: 700;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  letter-spacing: -0.3px;
}

.custom-logo {
  max-height: 45px;
  width: auto;
  display: block;
}

.custom-logo-link {
  display: flex;
  align-items: center;
  text-decoration: none;
}

.custom-logo-link:hover {
  text-decoration: none;
}

.logo-img {
  max-height: 45px;
  width: auto;
  display: block;
  animation: slideUp 0.6s ease-out;
  transition: filter 0.3s ease;
}

.logo-img:hover {
  filter: drop-shadow(0 5px 15px rgba(0, 209, 255, 0.4));
}

/* ========== NAVIGATION ========== */
.site-nav {
  display: flex;
  gap: 2rem;
  list-style: none;
  align-items: center;
}

.site-nav ul {
  display: flex;
  gap: 2rem;
  align-items: center;
  margin: 0;
  padding: 0;
  list-style: none;
}

.site-nav li {
  list-style: none;
}

.site-nav a {
  color: white;
  font-weight: 500;
  transition: color 0.3s ease;
  position: relative;
  padding: 0.35rem 0;
  text-decoration: none;
}

.site-nav a:hover {
  color: var(--accent);
  text-decoration: none;
}

.site-nav a::after {
  content: '';
  position: absolute;
  bottom: -5px;
  left: 0;
  width: 0;
  height: 2px;
  background: var(--accent);
  transition: width 0.3s ease;
}

.site-nav a:hover::after {
  width: 100%;
}

/* Current page link */
.site-nav a.current-menu-item,
.site-nav a.current-menu-ancestor {
  color: var(--accent);
}

.nav-toggle {
  display: none;
  background: none;
  border: none;
  color: white;
  font-size: 1.5rem;
  cursor: pointer;
  padding: 0.5rem;
  border-radius: 6px;
  transition: background 0.2s ease;
}

.nav-toggle:hover {
  background: rgba(255, 255, 255, 0.1);
}

.nav-toggle:focus {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

/* ========== FOOTER ========== */
.site-footer {
  background: var(--secondary);
  color: white;
  padding: 3rem 0 1rem;
  margin-top: 5rem;
  border-top: 4px solid var(--accent);
}

.footer-content {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 2rem;
  margin-bottom: 2rem;
}

.footer-section h3 {
  color: var(--accent);
  margin-bottom: 1rem;
  font-size: 1.1rem;
}

.footer-section p {
  color: rgba(255, 255, 255, 0.8);
  font-size: 0.9rem;
}

.footer-section ul {
  list-style: none;
  padding: 0;
  margin: 0;
}

.footer-section li {
  margin-bottom: 0.5rem;
  list-style: none;
}

.footer-section a {
  color: rgba(255, 255, 255, 0.8);
  transition: color 0.3s ease;
  text-decoration: none;
}

.footer-section a:hover {
  color: var(--accent);
}

.footer-bottom {
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  padding-top: 1rem;
  text-align: center;
  color: rgba(255, 255, 255, 0.7);
  font-size: 0.9rem;
}

.footer-bottom p {
  margin: 0;
  color: rgba(255, 255, 255, 0.7);
}

/* Social Links */
.social-links {
  display: flex;
  gap: 1rem;
  justify-content: flex-start;
  margin-top: 1rem;
  flex-wrap: wrap;
}

.social-links a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  background: rgba(255, 255, 255, 0.1);
  border-radius: 50%;
  font-size: 1.2rem;
  transition: background 0.3s ease, transform 0.3s ease;
  text-decoration: none;
  color: white;
}

.social-links a:hover {
  background: var(--accent);
  text-decoration: none;
  transform: translateY(-3px);
}

.social-links img {
  max-width: 100%;
  height: auto;
}

/* Breadcrumb Navigation */
.breadcrumb {
  background: var(--light-bg);
  padding: 1rem 0;
  margin-bottom: 2rem;
  border-bottom: 1px solid var(--border-color);
}

.breadcrumb ol {
  list-style: none;
  display: flex;
  gap: 0.5rem;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 1rem;
  flex-wrap: wrap;
}

.breadcrumb li::after {
  content: '/';
  margin: 0 0.5rem;
  color: var(--muted-text);
}

.breadcrumb li:last-child::after {
  display: none;
}

.breadcrumb a {
  color: var(--primary);
  text-decoration: none;
}

.breadcrumb a:hover {
  text-decoration: underline;
}

.breadcrumb li:last-child {
  color: var(--muted-text);
}

/* ========== BACK TO TOP BUTTON ========== */
.back-to-top {
  position: fixed;
  bottom: 2rem;
  right: 2rem;
  width: 50px;
  height: 50px;
  background: linear-gradient(135deg, var(--primary) 0%, var(--accent) 100%);
  color: white;
  border: none;
  border-radius: 50%;
  cursor: pointer;
  font-size: 1.5rem;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  visibility: hidden;
  transform: translateY(20px);
  transition: all 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
  box-shadow: 0 10px 30px rgba(0, 107, 191, 0.3);
  z-index: 99;
}

.back-to-top:hover {
  transform: translateY(-5px);
  box-shadow: 0 15px 40px rgba(0, 107, 191, 0.4);
}

.back-to-top.visible {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

/* ========== PROGRESS BAR ========== */
.progress-bar {
  position: fixed;
  top: 0;
  left: 0;
  height: 3px;
  background: linear-gradient(90deg, var(--accent) 0%, var(--primary) 100%);
  width: 0%;
  transition: width 0.3s ease;
  z-index: 200;
}

body.admin-bar .progress-bar {
  top: 32px;
}

@media (max-width: 782px) {
  body.admin-bar .progress-bar {
    top: 46px;
  }
}

/* ========== STICKY CTA ========== */
.sticky-cta {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  background: rgba(3, 47, 87, 0.95);
  backdrop-filter: blur(10px);
  padding: 1rem;
  text-align: center;
  transform: translateY(100%);
  transition: transform 0.3s ease;
  z-index: 98;
  box-shadow: 0 -5px 20px rgba(0, 0, 0, 0.15);
}

.sticky-cta.show {
  transform: translateY(0);
}

.sticky-cta p {
  color: white;
  margin-bottom: 0.75rem;
  font-size: 0.9rem;
}

.sticky-cta .btn {
  padding: 0.6rem 1.5rem;
  font-size: 0.95rem;
}

/* ========== LOADING SPINNER ========== */
.spinner {
  display: inline-block;
  width: 20px;
  height: 20px;
  border: 3px solid rgba(255, 255, 255, 0.3);
  border-radius: 50%;
  border-top-color: white;
  animation: spin 0.8s linear infinite;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

/* ========== SCROLL HEADER ========== */
.site-header.scrolled {
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
  background: linear-gradient(135deg, rgba(3, 47, 87, 0.98) 0%, rgba(0, 107, 191, 0.98) 100%);
}

/* Slide-in animations */
@keyframes slideUp {
  from {
    opacity: 0;
    transform: translateY(40px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes slideDown {
  from {
    opacity: 0;
    transform: translateY(-20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}
