html {
  font-size: 14px;
}

@media (min-width: 768px) {
  html {
    font-size: 16px;
  }
}

.btn:focus, .btn:active:focus, .btn-link.nav-link:focus, .form-control:focus, .form-check-input:focus {
  box-shadow: 0 0 0 0.1rem white, 0 0 0 0.25rem #258cfb;
}

html {
  position: relative;
  min-height: 100%;
}

body {
  margin-bottom: 60px;
}

.form-floating > .form-control-plaintext::placeholder, .form-floating > .form-control::placeholder {
  color: var(--bs-secondary-color);
  text-align: end;
}

.form-floating > .form-control-plaintext:focus::placeholder, .form-floating > .form-control:focus::placeholder {
  text-align: start;
}

/* ══════════════════════════════════════════════
   Blog Styles
   ══════════════════════════════════════════════ */

/* Dark header bar */
.blog-header-bar {
  background: linear-gradient(135deg, #1a1a2e 0%, #16213e 100%);
  padding: 1.5rem 0;
}
.blog-header-bar .breadcrumb-item + .breadcrumb-item::before {
  color: rgba(255,255,255,.4);
}

/* Hero overlay gradient */
.blog-hero-overlay {
  background: linear-gradient(to top, rgba(0,0,0,.85) 0%, rgba(0,0,0,.3) 50%, transparent 100%);
}

/* Card hover lift + shadow */
.blog-card {
  transition: transform .3s ease, box-shadow .3s ease;
  border-radius: .75rem;
  overflow: hidden;
}
.blog-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 12px 32px rgba(0,0,0,.12) !important;
}

/* Card image zoom on hover */
.blog-card-img {
  transition: transform .5s ease;
}
.blog-card:hover .blog-card-img {
  transform: scale(1.08);
}

/* Card title underline animation */
.blog-card-title {
  background-image: linear-gradient(currentColor, currentColor);
  background-position: 0% 100%;
  background-repeat: no-repeat;
  background-size: 0% 2px;
  transition: background-size .35s ease;
}
.blog-card:hover .blog-card-title,
.blog-card-title:hover {
  background-size: 100% 2px;
}

/* Sidebar category hover */
.blog-sidebar-category {
  transition: background-color .2s ease;
}
.blog-sidebar-category:hover,
.blog-sidebar-category.active {
  background-color: rgba(var(--bs-primary-rgb), .08);
}

/* Tag badges */
.blog-tag-badge {
  background-color: #f0f0f0;
  color: #555;
  font-weight: 500;
  transition: background-color .2s ease, color .2s ease;
}
.blog-tag-badge:hover,
.blog-tag-badge.active {
  background-color: var(--bs-primary);
  color: #fff;
}

/* Circular pagination */
.blog-pagination .page-link {
  width: 40px;
  height: 40px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 50% !important;
  margin: 0 3px;
  padding: 0;
  border: 1px solid #dee2e6;
  color: #555;
  font-weight: 600;
  transition: all .2s ease;
}
.blog-pagination .page-item.active .page-link {
  background-color: var(--bs-primary);
  border-color: var(--bs-primary);
  color: #fff;
}
.blog-pagination .page-link:hover {
  background-color: var(--bs-primary);
  border-color: var(--bs-primary);
  color: #fff;
}

/* Blog content typography (article body) */
.blog-content {
  font-size: 1.125rem;
  line-height: 1.85;
  color: #333;
}
.blog-content h2 {
  margin-top: 2rem;
  margin-bottom: 1rem;
  font-weight: 700;
  font-size: 1.6rem;
}
.blog-content h3 {
  margin-top: 1.75rem;
  margin-bottom: .75rem;
  font-weight: 600;
  font-size: 1.3rem;
}
.blog-content p {
  margin-bottom: 1.25rem;
}
.blog-content blockquote {
  border-left: 4px solid var(--bs-primary);
  padding: 1rem 1.5rem;
  margin: 1.5rem 0;
  background: rgba(var(--bs-primary-rgb), .04);
  border-radius: 0 .5rem .5rem 0;
  font-style: italic;
  color: #555;
}
.blog-content blockquote p:last-child {
  margin-bottom: 0;
}
.blog-content table {
  width: 100%;
  border-collapse: collapse;
  margin: 1.5rem 0;
}
.blog-content table th,
.blog-content table td {
  padding: .75rem 1rem;
  border: 1px solid #dee2e6;
  text-align: left;
}
.blog-content table th {
  background: #f8f9fa;
  font-weight: 600;
}
.blog-content ul,
.blog-content ol {
  padding-left: 1.5rem;
  margin-bottom: 1.25rem;
}
.blog-content li {
  margin-bottom: .5rem;
}
.blog-content img {
  max-width: 100%;
  height: auto;
  border-radius: .5rem;
}

/* Detail page hero — Ken Burns on hover */
.blog-detail-hero-img {
  transition: transform 8s ease;
}
.blog-detail-hero:hover .blog-detail-hero-img {
  transform: scale(1.05);
}

/* ══════════════════════════════════════════════
   Global Reusable Page Styles
   ══════════════════════════════════════════════ */

/* Dark gradient header bar — generalized from blog */
.page-header-bar {
  background: linear-gradient(135deg, #1a1a2e 0%, #16213e 100%);
  padding: 2.5rem 0;
}
.page-header-bar h1,
.page-header-bar h2 {
  color: #fff;
  font-weight: 700;
}
.page-header-bar p {
  color: rgba(255,255,255,.7);
}
.page-header-bar .breadcrumb-item + .breadcrumb-item::before {
  color: rgba(255,255,255,.4);
}
.page-header-bar .breadcrumb-item a {
  color: rgba(255,255,255,.6);
  text-decoration: none;
}
.page-header-bar .breadcrumb-item a:hover {
  color: #fff;
}
.page-header-bar .breadcrumb-item.active {
  color: rgba(255,255,255,.8);
}

/* Card hover lift + shadow — generalized */
.hover-card {
  transition: transform .3s ease, box-shadow .3s ease;
  border-radius: .75rem;
  overflow: hidden;
  border: none;
}
.hover-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 12px 32px rgba(0,0,0,.12) !important;
}

/* Card image zoom on hover */
.hover-card-img {
  transition: transform .5s ease;
}
.hover-card:hover .hover-card-img {
  transform: scale(1.08);
}

/* Card title underline animation */
.hover-card-title {
  background-image: linear-gradient(currentColor, currentColor);
  background-position: 0% 100%;
  background-repeat: no-repeat;
  background-size: 0% 2px;
  transition: background-size .35s ease;
  display: inline;
}
.hover-card:hover .hover-card-title {
  background-size: 100% 2px;
}

/* Stat / summary cards */
.stat-card {
  border: none;
  border-radius: .75rem;
  padding: 1.5rem;
  text-align: center;
  transition: transform .3s ease, box-shadow .3s ease;
}
.stat-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 8px 24px rgba(0,0,0,.1);
}
.stat-card .stat-icon {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 1.4rem;
  margin-bottom: .75rem;
}
.stat-card .stat-number {
  font-size: 1.75rem;
  font-weight: 700;
  color: #1a1a2e;
  line-height: 1.2;
}
.stat-card .stat-label {
  font-size: .85rem;
  color: #6c757d;
  text-transform: uppercase;
  letter-spacing: .5px;
  margin-top: .25rem;
}

/* Modern table */
.modern-table {
  border-collapse: separate;
  border-spacing: 0;
  width: 100%;
}
.modern-table thead th {
  background: #f8f9fa;
  border-bottom: 2px solid #dee2e6;
  padding: .875rem 1rem;
  font-weight: 600;
  font-size: .85rem;
  text-transform: uppercase;
  letter-spacing: .5px;
  color: #495057;
  white-space: nowrap;
}
.modern-table tbody td {
  padding: .875rem 1rem;
  vertical-align: middle;
  border-bottom: 1px solid #f0f0f0;
}
.modern-table tbody tr {
  transition: background-color .15s ease;
}
.modern-table tbody tr:hover {
  background-color: rgba(var(--bs-primary-rgb), .04);
}
.modern-table tbody tr:last-child td {
  border-bottom: none;
}

/* Page content typography — alias of blog-content */
.page-content {
  font-size: 1.125rem;
  line-height: 1.85;
  color: #333;
}
.page-content h2 { margin-top: 2rem; margin-bottom: 1rem; font-weight: 700; font-size: 1.6rem; }
.page-content h3 { margin-top: 1.75rem; margin-bottom: .75rem; font-weight: 600; font-size: 1.3rem; }
.page-content p { margin-bottom: 1.25rem; }
.page-content blockquote {
  border-left: 4px solid var(--bs-primary);
  padding: 1rem 1.5rem;
  margin: 1.5rem 0;
  background: rgba(var(--bs-primary-rgb), .04);
  border-radius: 0 .5rem .5rem 0;
  font-style: italic;
  color: #555;
}
.page-content blockquote p:last-child { margin-bottom: 0; }
.page-content img { max-width: 100%; height: auto; border-radius: .5rem; }
.page-content ul,
.page-content ol { padding-left: 1.5rem; margin-bottom: 1.25rem; }
.page-content li { margin-bottom: .5rem; }

/* Gradient icon box */
.gradient-icon-box {
  width: 64px;
  height: 64px;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
  color: #fff;
}
.gradient-icon-box.primary   { background: linear-gradient(135deg, #667eea 0%, #764ba2 100%); }
.gradient-icon-box.success   { background: linear-gradient(135deg, #11998e 0%, #38ef7d 100%); }
.gradient-icon-box.warning   { background: linear-gradient(135deg, #f093fb 0%, #f5576c 100%); }
.gradient-icon-box.info      { background: linear-gradient(135deg, #4facfe 0%, #00f2fe 100%); }
.gradient-icon-box.danger    { background: linear-gradient(135deg, #ff6a00 0%, #ee0979 100%); }
.gradient-icon-box.secondary { background: linear-gradient(135deg, #a18cd1 0%, #fbc2eb 100%); }

/* Empty state */
.empty-state {
  text-align: center;
  padding: 3rem 1rem;
}
.empty-state .empty-state-icon {
  font-size: 3rem;
  color: #dee2e6;
  margin-bottom: 1rem;
}
.empty-state .empty-state-title {
  font-size: 1.25rem;
  font-weight: 600;
  color: #495057;
  margin-bottom: .5rem;
}
.empty-state .empty-state-text {
  color: #6c757d;
  margin-bottom: 1.5rem;
}

/* Hero overlay gradient — generalized */
.hero-overlay {
  background: linear-gradient(to top, rgba(0,0,0,.85) 0%, rgba(0,0,0,.3) 50%, transparent 100%);
}

/* Hero image Ken Burns */
.hero-img {
  transition: transform 8s ease;
}
.hero-section:hover .hero-img {
  transform: scale(1.05);
}

/* Form polish */
.form-control:focus,
.form-select:focus {
  border-color: var(--bs-primary);
  box-shadow: 0 0 0 .2rem rgba(var(--bs-primary-rgb), .15);
}

/* Status badges */
.badge-status {
  font-weight: 500;
  font-size: .78rem;
  padding: .35em .65em;
  border-radius: 50rem;
}

/* Sale ribbon */
.sale-ribbon {
  position: absolute;
  top: 12px;
  right: 12px;
  background: linear-gradient(135deg, #ff6a00 0%, #ee0979 100%);
  color: #fff;
  padding: .25rem .75rem;
  border-radius: 50rem;
  font-size: .75rem;
  font-weight: 600;
  z-index: 2;
}

/* Date overlay badge */
.date-badge {
  position: absolute;
  top: 12px;
  left: 12px;
  background: rgba(26,26,46,.9);
  color: #fff;
  padding: .5rem .75rem;
  border-radius: .5rem;
  text-align: center;
  z-index: 2;
  line-height: 1.1;
}
.date-badge .date-day {
  font-size: 1.4rem;
  font-weight: 700;
  display: block;
}
.date-badge .date-month {
  font-size: .7rem;
  text-transform: uppercase;
  letter-spacing: 1px;
  opacity: .8;
}

/* Animated success check */
.success-checkmark {
  width: 80px;
  height: 80px;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, #11998e 0%, #38ef7d 100%);
  color: #fff;
  font-size: 2.5rem;
  animation: successPop .5s cubic-bezier(.175,.885,.32,1.275);
}
@keyframes successPop {
  0%   { transform: scale(0); opacity: 0; }
  60%  { transform: scale(1.1); }
  100% { transform: scale(1); opacity: 1; }
}

/* Progress bar gradient */
.progress-gradient .progress-bar {
  background: linear-gradient(90deg, #667eea 0%, #764ba2 100%);
}

/* Sticky sidebar for learn pages */
.sticky-sidebar {
  position: sticky;
  top: 1rem;
  max-height: calc(100vh - 2rem);
  overflow-y: auto;
}

/* Counter animation helper */
.counter-number {
  font-size: 2.5rem;
  font-weight: 800;
  color: #1a1a2e;
  line-height: 1;
}
.counter-label {
  font-size: .9rem;
  color: #6c757d;
  text-transform: uppercase;
  letter-spacing: .5px;
}

/* ══════════════════════════════════════════════
   Cart Badge
   ══════════════════════════════════════════════ */
.cart-badge {
  position: absolute;
  top: 2px;
  right: -4px;
  background: #dc3545;
  color: #fff;
  font-size: .65rem;
  font-weight: 700;
  min-width: 18px;
  height: 18px;
  line-height: 18px;
  text-align: center;
  border-radius: 50rem;
  padding: 0 4px;
}
@keyframes cartBadgePulse {
  0%   { transform: scale(1); }
  50%  { transform: scale(1.4); }
  100% { transform: scale(1); }
}
.cart-badge-pulse {
  animation: cartBadgePulse .4s ease;
}

/* Quantity buttons */
.qty-controls .qty-btn {
  width: 28px;
  height: 28px;
  padding: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: .7rem;
  border-radius: 50%;
}

/* PayPal container */
.paypal-container {
  min-height: 55px;
}
