/* Custom CSS for Courier Tracking Website */
/* Safe to use alongside Tailwind CSS - no global overrides */

/* =============================================
   BASE RESET (minimal - Tailwind handles most)
   ============================================= */

html {
  scroll-behavior: smooth;
}

body {
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* =============================================
   CUSTOM SCROLLBAR
   ============================================= */

::-webkit-scrollbar {
  width: 10px;
}

::-webkit-scrollbar-track {
  background: #f1f5f9;
}

::-webkit-scrollbar-thumb {
  background: #4f46e5;
  border-radius: 5px;
}

::-webkit-scrollbar-thumb:hover {
  background: #4338ca;
}

/* =============================================
   ANIMATIONS (keyframes only - apply via class)
   ============================================= */

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

@keyframes slideInLeft {
  from {
    opacity: 0;
    transform: translateX(-20px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

@keyframes slideInRight {
  from {
    opacity: 0;
    transform: translateX(20px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

@keyframes blob {
  0%, 100% { transform: translate(0, 0) scale(1); }
  33%       { transform: translate(30px, -50px) scale(1.1); }
  66%       { transform: translate(-20px, 20px) scale(0.9); }
}

@keyframes spin {
  0%   { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

/* Animation utility classes - only apply where explicitly used */
.animate-fade-in-up {
  animation: fadeInUp 0.6s ease-out;
}

.animate-slide-in-left {
  animation: slideInLeft 0.6s ease-out;
}

.animate-slide-in-right {
  animation: slideInRight 0.6s ease-out;
}

.animate-blob {
  animation: blob 7s infinite;
}

.animation-delay-2000 {
  animation-delay: 2s;
}

.animation-delay-4000 {
  animation-delay: 4s;
}

/* =============================================
   TARGETED TRANSITIONS (not global *)
   Apply these classes only on specific elements
   ============================================= */

/* Use .card-hover on courier cards */
.card-hover {
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.card-hover:hover {
  transform: translateY(-5px);
  box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1);
}

/* Use .btn-hover on CTA buttons only */
.btn-hover {
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.btn-hover:hover {
  transform: scale(1.02);
  box-shadow: 0 10px 15px -3px rgba(79, 70, 229, 0.3);
}

/* =============================================
   GRADIENT UTILITY CLASSES
   Use these as className on elements directly
   ============================================= */

.gradient-primary {
  background: linear-gradient(135deg, #4f46e5 0%, #3b82f6 100%);
}

.gradient-secondary {
  background: linear-gradient(135deg, #3b82f6 0%, #06b6d4 100%);
}

.gradient-accent {
  background: linear-gradient(135deg, #8b5cf6 0%, #ec4899 100%);
}

.gradient-warm {
  background: linear-gradient(135deg, #f59e0b 0%, #ef4444 100%);
}

.gradient-cool {
  background: linear-gradient(135deg, #06b6d4 0%, #10b981 100%);
}

/* =============================================
   LOADER
   ============================================= */

.loader {
  border: 4px solid #f3f4f6;
  border-top: 4px solid #4f46e5;
  border-radius: 50%;
  width: 40px;
  height: 40px;
  animation: spin 1s linear infinite;
}

/* =============================================
   BREADCRUMB (scoped - no global link override)
   ============================================= */

.breadcrumb {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.875rem;
  color: #6b7280;
  flex-wrap: wrap;
}

.breadcrumb a {
  color: #4f46e5;
  text-decoration: none;
  transition: color 0.2s ease;
}

.breadcrumb a:hover {
  text-decoration: underline;
  color: #3b82f6;
}

.breadcrumb span {
  color: #d1d5db;
}

/* =============================================
   RESPONSIVE GRID UTILITY
   Use .grid-auto class only where needed
   ============================================= */

.grid-auto {
  display: grid;
  gap: 1.5rem;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
}

@media (max-width: 768px) {
  .grid-auto {
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1rem;
  }
}

@media (max-width: 480px) {
  .grid-auto {
    grid-template-columns: 1fr;
    gap: 1rem;
  }
}

.vtab-wrap {
  display: flex;
  min-height: 400px;
  border: 1px solid #e5e7eb;
  border-radius: 12px;
  overflow: hidden;
  background: #fff;
}
.vtab-sidebar {
  width: 200px;
  min-width: 160px;
  border-right: 1px solid #e5e7eb;
  background: #f9fafb;
  display: flex;
  flex-direction: column;
}
.vtab-btn {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 14px 16px;
  font-size: 14px;
  font-weight: 400;
  color: #6b7280;
  border: none;
  background: none;
  cursor: pointer;
  text-align: left;
  border-left: 2.5px solid transparent;
  transition: all 0.15s;
}
.vtab-btn:hover { background: #fff; color: #111827; }
.vtab-btn.active {
  background: #fff;
  color: #111827;
  font-weight: 600;
  border-left-color: #4F46E5;
}
.vtab-icon { width: 16px; height: 16px; flex-shrink: 0; opacity: 0.5; }
.vtab-btn.active .vtab-icon { opacity: 1; }
.vtab-content-area { flex: 1; overflow: auto; padding: 24px; }
.vtab-panel { display: none; }
.vtab-panel.active { display: block; }

/* Mobile nav */
.vtab-mobile-nav {
  display: none;
  overflow-x: auto;
  border-bottom: 1px solid #e5e7eb;
  background: #f9fafb;
  scrollbar-width: none;
}
.vtab-mobile-nav::-webkit-scrollbar { display: none; }
.vtab-mobile-btn {
  flex-shrink: 0;
  padding: 12px 16px;
  font-size: 13px;
  color: #6b7280;
  border: none;
  border-bottom: 2px solid transparent;
  background: none;
  cursor: pointer;
  white-space: nowrap;
}
.vtab-mobile-btn.active { color: #4F46E5; border-bottom-color: #4F46E5; font-weight: 600; }

@media (max-width: 640px) {
  .vtab-sidebar { display: none; }
  .vtab-mobile-nav { display: flex; }
  .vtab-wrap { flex-direction: column; min-height: auto; border-top: none; border-radius: 0 0 12px 12px; }
  .vtab-content-area { padding: 16px; }
}

/* =============================================
   ARTICLE DETAIL ONLY (STRICT SCOPING)
   ============================================= */

.article-detail {
  color: #374151;
  line-height: 1.7;
  font-size: 17px;
}

/* Only direct content inside article-detail */
.article-detail h2 {
  font-size: 1.5rem;
  font-weight: 700;
  color: #111827;
  margin: 2rem 0 1rem;
}

.article-detail h3 {
  font-size: 1.25rem;
  font-weight: 700;
  color: #111827;
  margin: 1.5rem 0 0.75rem;
}

.article-detail h4 {
  font-size: 1.125rem;
  font-weight: 600;
  color: #111827;
  margin: 1.25rem 0 0.5rem;
}

.article-detail p {
  margin-bottom: 1rem;
  color: #4b5563;
}

.article-detail ul {
  margin: 1rem 0;
  padding-left: 1.25rem;
  list-style: disc;
}

.article-detail li {
  margin-bottom: 0.5rem;
}

.article-detail strong {
  font-weight: 600;
  color: #111827;
}

/* Header Base */
.main-header {
  width: 100%;
  background: #fff;
  box-shadow: 0 2px 6px rgba(0,0,0,0.05);
  position: relative;
  z-index: 1000;
}

/* Container */
.container {
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 15px;
}

/* Header Layout */
.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 80px;
}

/* Logo Styling */
.header-logo img {
  height: 60px;
  width: auto;
  display: block;
  object-fit: contain;
}

/* Tablet */
@media (max-width: 768px) {
  .header-inner {
    height: 65px;
  }

  .header-logo img {
    height: 45px;
  }
}

/* Mobile */
@media (max-width: 480px) {
  .header-inner {
    height: 60px;
  }

  .header-logo img {
    height: 40px;
  }
}