:root {
  --primary: #0f6e8c;
  --primary-dark: #0a4f63;
  --primary-light: #e8f4f8;
  --accent: #14b8a6;
  --surface: #f4f7f9;
  --text: #1e293b;
  --text-muted: #64748b;
  --card-shadow: 0 4px 24px rgba(15, 110, 140, 0.08);
  --radius: 14px;
}

* {
  box-sizing: border-box;
}

html {
  font-size: 15px;
  scroll-behavior: smooth;
}

@media (min-width: 768px) {
  html {
    font-size: 16px;
  }
}

body {
  font-family: "DM Sans", system-ui, -apple-system, sans-serif;
  color: var(--text);
  background: #fff;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

main {
  flex: 1;
}

.app-header {
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid rgba(15, 110, 140, 0.08);
  position: sticky;
  top: 0;
  z-index: 1000;
}

.app-header .navbar {
  padding: 0.75rem 0;
}

.navbar-brand {
  padding: 0;
  line-height: 1;
}

.navbar-brand:hover {
  opacity: 0.92;
}

.site-logo {
  display: block;
  width: auto;
  height: auto;
  max-height: 42px;
}

.site-logo--nav {
  max-height: 40px;
}

.site-logo--footer {
  max-height: 48px;
}

.site-logo--login {
  max-height: 64px;
  margin: 0 auto 1rem;
}

.brand-icon {
  width: 36px;
  height: 36px;
  background: linear-gradient(135deg, var(--primary), var(--accent));
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-size: 1.1rem;
}

.nav-link {
  color: var(--text-muted) !important;
  font-weight: 500;
  padding: 0.5rem 1rem !important;
  border-radius: 8px;
  transition: all 0.2s;
}

.nav-link:hover {
  color: var(--primary) !important;
  background: var(--primary-light);
}

.app-footer {
  background: var(--surface);
  border-top: 1px solid rgba(15, 110, 140, 0.08);
  padding: 1.5rem 0;
  margin-top: auto;
  font-size: 0.9rem;
}

.app-footer a {
  color: var(--primary);
  text-decoration: none;
}

.app-footer a:hover {
  text-decoration: underline;
}

.hero-section {
  background: linear-gradient(135deg, #0a4f63 0%, #0f6e8c 40%, #14b8a6 100%);
  color: #fff;
  padding: 4.5rem 0 5rem;
  position: relative;
  overflow: hidden;
}

.hero-section::before {
  content: "";
  position: absolute;
  inset: 0;
  background: url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cg fill='%23ffffff' fill-opacity='0.04'%3E%3Cpath d='M36 34v-4h-2v4h-4v2h4v4h2v-4h4v-2h-4zm0-30V0h-2v4h-4v2h4v4h2V6h4V4h-4zM6 34v-4H4v4H0v2h4v4h2v-4h4v-2H6zM6 4V0H4v4H0v2h4v4h2V6h4V4H6z'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E");
  opacity: 0.5;
}

.hero-section .container {
  position: relative;
  z-index: 1;
}

.hero-badge {
  display: inline-block;
  background: rgba(255, 255, 255, 0.15);
  border: 1px solid rgba(255, 255, 255, 0.25);
  padding: 0.35rem 0.85rem;
  border-radius: 50px;
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.03em;
  text-transform: uppercase;
  margin-bottom: 1rem;
}

.hero-title {
  font-size: clamp(2rem, 5vw, 3rem);
  font-weight: 700;
  line-height: 1.15;
  margin-bottom: 1rem;
}

.hero-lead {
  font-size: 1.15rem;
  opacity: 0.9;
  line-height: 1.6;
  max-width: 540px;
}

.hero-stats-card {
  background: rgba(255, 255, 255, 0.12);
  backdrop-filter: blur(16px);
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: var(--radius);
  padding: 2rem;
  display: flex;
  justify-content: space-around;
  gap: 1rem;
}

.stat-item {
  text-align: center;
}

.stat-value {
  display: block;
  font-size: 2rem;
  font-weight: 700;
  line-height: 1.2;
}

.stat-label {
  font-size: 0.85rem;
  opacity: 0.8;
}

.section-padding {
  padding: 4rem 0;
}

.bg-surface {
  background: var(--surface);
}

.section-header h2 {
  font-weight: 700;
  font-size: 1.75rem;
}

.category-card {
  display: block;
  background: #fff;
  border: 1px solid rgba(15, 110, 140, 0.1);
  border-radius: var(--radius);
  padding: 1.75rem;
  height: 100%;
  transition: all 0.25s ease;
  color: var(--text);
}

.category-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--card-shadow);
  border-color: var(--accent-color);
}

.category-icon {
  width: 48px;
  height: 48px;
  border-radius: 12px;
  background: color-mix(in srgb, var(--accent-color) 12%, white);
  color: var(--accent-color);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.4rem;
  margin-bottom: 1rem;
}

.category-card h3 {
  font-size: 1.2rem;
  font-weight: 700;
  margin-bottom: 0.5rem;
}

.category-card p {
  color: var(--text-muted);
  font-size: 0.95rem;
  margin-bottom: 1rem;
  line-height: 1.5;
}

.category-count {
  color: var(--accent-color);
  font-weight: 600;
  font-size: 0.9rem;
}

.quick-link-card {
  display: flex;
  align-items: center;
  gap: 1rem;
  background: #fff;
  border: 1px solid rgba(15, 110, 140, 0.1);
  border-radius: 12px;
  padding: 1rem 1.25rem;
  color: var(--text);
  transition: all 0.2s;
}

.quick-link-card:hover {
  border-color: var(--accent-color);
  box-shadow: 0 2px 12px rgba(15, 110, 140, 0.08);
  color: var(--text);
}

.quick-link-card i {
  font-size: 1.5rem;
  color: var(--accent-color);
}

.quick-link-card strong {
  display: block;
  font-size: 0.95rem;
}

.quick-link-card small {
  color: var(--text-muted);
}

.page-header {
  background: linear-gradient(135deg, var(--primary-dark), var(--primary));
  color: #fff;
  padding: 2.5rem 0;
}

.page-header h1 {
  font-size: 1.75rem;
  font-weight: 700;
}

.page-header p {
  opacity: 0.85;
}

.page-header-icon {
  width: 52px;
  height: 52px;
  border-radius: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
  flex-shrink: 0;
}

.breadcrumb-light .breadcrumb-item a {
  color: rgba(255, 255, 255, 0.8);
  text-decoration: none;
}

.breadcrumb-light .breadcrumb-item.active {
  color: rgba(255, 255, 255, 0.6);
}

.breadcrumb-light .breadcrumb-item + .breadcrumb-item::before {
  color: rgba(255, 255, 255, 0.5);
}

.filter-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.filter-pill {
  display: inline-flex;
  align-items: center;
  padding: 0.45rem 1rem;
  border-radius: 50px;
  background: #fff;
  border: 1px solid rgba(15, 110, 140, 0.15);
  color: var(--text-muted);
  text-decoration: none;
  font-size: 0.9rem;
  font-weight: 500;
  transition: all 0.2s;
}

.filter-pill:hover {
  border-color: var(--pill-color, var(--primary));
  color: var(--pill-color, var(--primary));
}

.filter-pill.active {
  background: var(--pill-color, var(--primary));
  border-color: var(--pill-color, var(--primary));
  color: #fff;
}

.endpoint-group-header {
  display: flex;
  align-items: flex-start;
  gap: 1rem;
  margin-bottom: 1.25rem;
  padding-bottom: 1rem;
  border-bottom: 2px solid color-mix(in srgb, var(--accent-color) 25%, transparent);
}

.endpoint-group-header i {
  font-size: 1.75rem;
  color: var(--accent-color);
}

.endpoint-group-header h2 {
  font-size: 1.35rem;
  font-weight: 700;
  margin-bottom: 0.15rem;
}

.endpoint-group-header p {
  color: var(--text-muted);
  margin: 0;
  font-size: 0.95rem;
}

.endpoint-card {
  display: block;
  background: #fff;
  border: 1px solid rgba(15, 110, 140, 0.1);
  border-radius: 12px;
  padding: 1.25rem;
  height: 100%;
  color: var(--text);
  transition: all 0.2s;
}

.endpoint-card:hover {
  border-color: var(--primary);
  box-shadow: var(--card-shadow);
  transform: translateY(-2px);
  color: var(--text);
}

.endpoint-card-icon {
  font-size: 1.4rem;
  margin-bottom: 0.75rem;
}

.endpoint-card h3 {
  font-size: 1.05rem;
  font-weight: 700;
  margin-bottom: 0.4rem;
}

.endpoint-card p {
  color: var(--text-muted);
  font-size: 0.88rem;
  line-height: 1.45;
  margin-bottom: 0.75rem;
}

.endpoint-path {
  font-size: 0.75rem;
  background: var(--surface);
  padding: 0.2rem 0.5rem;
  border-radius: 4px;
  color: var(--primary);
}

.query-panel {
  background: #fff;
  border: 1px solid rgba(15, 110, 140, 0.1);
  border-radius: var(--radius);
  padding: 1.5rem;
  top: 5rem;
}

.query-panel-title {
  font-weight: 700;
  margin-bottom: 1.25rem;
  padding-bottom: 0.75rem;
  border-bottom: 1px solid var(--surface);
}

.query-panel .form-label {
  font-weight: 600;
  font-size: 0.85rem;
  color: var(--text);
}

.query-panel .form-control {
  border-radius: 8px;
  border-color: rgba(15, 110, 140, 0.15);
  font-size: 0.9rem;
}

.query-panel .form-control:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(15, 110, 140, 0.12);
}

.btn-link-example {
  background: none;
  border: none;
  padding: 0;
  color: var(--primary);
  font-size: inherit;
  cursor: pointer;
  text-decoration: underline;
}

.btn-primary {
  background: var(--primary);
  border-color: var(--primary);
  border-radius: 10px;
  font-weight: 600;
  padding: 0.6rem 1.25rem;
}

.btn-primary:hover {
  background: var(--primary-dark);
  border-color: var(--primary-dark);
}

.endpoint-meta code {
  font-size: 0.8rem;
  word-break: break-all;
}

.results-panel {
  background: #fff;
  border: 1px solid rgba(15, 110, 140, 0.1);
  border-radius: var(--radius);
  overflow: hidden;
}

.results-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  padding: 1.25rem 1.5rem;
  border-bottom: 1px solid var(--surface);
  gap: 1rem;
}

.results-header h5 {
  font-weight: 700;
}

.results-meta {
  color: var(--text-muted);
  font-size: 0.85rem;
}

.request-url-bar {
  padding: 0.75rem 1.5rem;
  background: var(--surface);
  border-bottom: 1px solid rgba(15, 110, 140, 0.08);
}

.request-url-bar code {
  display: block;
  font-size: 0.78rem;
  word-break: break-all;
  color: var(--primary-dark);
  margin-top: 0.25rem;
}

.json-output {
  margin: 0;
  padding: 1.5rem;
  background: #1e293b;
  color: #e2e8f0;
  font-size: 0.82rem;
  line-height: 1.55;
  max-height: 70vh;
  overflow: auto;
  border-radius: 0;
}

.empty-results {
  text-align: center;
  padding: 4rem 2rem;
  background: var(--surface);
  border-radius: var(--radius);
  border: 2px dashed rgba(15, 110, 140, 0.15);
}

.empty-results i {
  font-size: 3rem;
  color: var(--primary);
  opacity: 0.5;
  margin-bottom: 1rem;
}

.empty-results h5 {
  font-weight: 700;
}

.empty-results p {
  color: var(--text-muted);
  max-width: 400px;
  margin: 0 auto;
}

.content-card {
  background: #fff;
  border: 1px solid rgba(15, 110, 140, 0.1);
  border-radius: var(--radius);
  padding: 2.5rem;
}

.about-list {
  padding-left: 1.25rem;
  line-height: 1.8;
}

.about-list li {
  margin-bottom: 0.35rem;
}

.content-card code {
  background: var(--surface);
  padding: 0.15rem 0.4rem;
  border-radius: 4px;
  font-size: 0.88rem;
  color: var(--primary-dark);
}

.btn-outline-light {
  border-color: rgba(255, 255, 255, 0.5);
}

.btn-outline-light:hover {
  background: rgba(255, 255, 255, 0.15);
  border-color: #fff;
}

/* ── Mobile navigation ── */
.navbar-toggler {
  padding: 0.4rem 0.55rem;
  border: 1px solid rgba(15, 110, 140, 0.2);
  border-radius: 8px;
}

.navbar-toggler:focus {
  box-shadow: 0 0 0 3px rgba(15, 110, 140, 0.15);
}

.mobile-nav-list {
  padding: 0.75rem 0 0.5rem;
}

.mobile-nav-list .nav-link {
  padding: 0.75rem 1rem !important;
}

/* ── Filter pills scroll on small screens ── */
.filter-pills-wrapper {
  margin-left: -0.75rem;
  margin-right: -0.75rem;
  padding: 0 0.75rem;
}

.filter-pills {
  -webkit-overflow-scrolling: touch;
}

/* ── Touch-friendly form inputs (prevents iOS zoom) ── */
.query-panel .form-control,
.query-panel .btn {
  min-height: 44px;
}

@media (max-width: 575.98px) {
  .query-panel .form-control {
    font-size: 16px;
  }
}

/* ── Safe area for notched phones ── */
@supports (padding: max(0px)) {
  .app-header .container,
  .app-footer .container,
  .hero-section .container,
  .page-header .container,
  .section-padding .container {
    padding-left: max(0.75rem, env(safe-area-inset-left));
    padding-right: max(0.75rem, env(safe-area-inset-right));
  }

  .app-footer {
    padding-bottom: max(1.5rem, env(safe-area-inset-bottom));
  }
}

/* ── Tablet and below ── */
@media (max-width: 991.98px) {
  .query-panel {
    position: static;
    top: auto;
  }

  .json-output {
    max-height: 50vh;
  }
}

/* ── Mobile ── */
@media (max-width: 767.98px) {
  html {
    font-size: 14px;
  }

  .section-padding {
    padding: 2.5rem 0;
  }

  .section-header {
    margin-bottom: 1.5rem !important;
  }

  .section-header h2 {
    font-size: 1.4rem;
  }

  /* Hero */
  .hero-section {
    padding: 2.5rem 0 3rem;
  }

  .hero-title {
    font-size: 1.75rem;
  }

  .hero-lead {
    font-size: 1rem;
  }

  .hero-stats-card {
    padding: 1.25rem 1rem;
    margin-top: 0.5rem;
  }

  .stat-value {
    font-size: 1.5rem;
  }

  .stat-label {
    font-size: 0.75rem;
  }

  .hero-actions .btn {
    width: 100%;
    justify-content: center;
  }

  /* Page headers */
  .page-header {
    padding: 1.5rem 0;
  }

  .page-header h1 {
    font-size: 1.35rem;
    line-height: 1.3;
  }

  .page-header-content {
    flex-direction: column;
    gap: 0.75rem !important;
  }

  .page-header-icon {
    width: 44px;
    height: 44px;
    font-size: 1.25rem;
  }

  .breadcrumb-nav .breadcrumb {
    font-size: 0.8rem;
  }

  /* Cards */
  .category-card {
    padding: 1.25rem;
  }

  .category-card h3 {
    font-size: 1.1rem;
  }

  .endpoint-card {
    padding: 1rem;
  }

  .endpoint-group-header h2 {
    font-size: 1.15rem;
  }

  .content-card {
    padding: 1.5rem;
  }

  .content-card h1 {
    font-size: 1.5rem;
  }

  /* Filter pills — horizontal scroll */
  .filter-pills-wrapper {
    position: relative;
    overflow: hidden;
  }

  .filter-pills-wrapper::after {
    content: "";
    position: absolute;
    top: 0;
    right: 0;
    bottom: 0;
    width: 2rem;
    background: linear-gradient(to right, transparent, #fff);
    pointer-events: none;
  }

  .filter-pills {
    flex-wrap: nowrap;
    overflow-x: auto;
    padding-bottom: 0.25rem;
    scrollbar-width: none;
    -ms-overflow-style: none;
  }

  .filter-pills::-webkit-scrollbar {
    display: none;
  }

  .filter-pill {
    flex-shrink: 0;
    font-size: 0.85rem;
    padding: 0.4rem 0.85rem;
  }

  /* Query & results */
  .query-panel {
    padding: 1.25rem;
    margin-bottom: 0.5rem;
  }

  .results-header {
    flex-direction: column;
    align-items: stretch;
    padding: 1rem;
    gap: 0.75rem;
  }

  .results-copy-btn {
    width: 100%;
    min-height: 44px;
  }

  .request-url-bar {
    padding: 0.75rem 1rem;
  }

  .request-url-bar code {
    font-size: 0.72rem;
  }

  .json-output {
    padding: 1rem;
    font-size: 0.75rem;
    max-height: 45vh;
    -webkit-overflow-scrolling: touch;
  }

  .empty-results {
    padding: 2.5rem 1.25rem;
  }

  .empty-results i {
    font-size: 2.25rem;
  }

  /* Footer */
  .app-footer {
    text-align: center;
    padding: 1.25rem 0;
  }

  .app-footer .text-muted {
    font-size: 0.8rem;
    line-height: 1.5;
  }

  /* Navbar brand */
  .navbar-brand {
    max-width: calc(100% - 3.5rem);
  }

  .site-logo--nav {
    max-height: 34px;
  }

  .brand-icon {
    width: 32px;
    height: 32px;
    font-size: 1rem;
    flex-shrink: 0;
  }

  .mobile-nav-list {
    border-top: 1px solid rgba(15, 110, 140, 0.1);
    margin-top: 0.5rem;
  }
}

/* ── Very small phones ── */
@media (max-width: 374.98px) {
  .hero-stats-card {
    flex-direction: column;
    gap: 1.25rem;
  }

  .stat-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    text-align: left;
    width: 100%;
  }

  .stat-value {
    font-size: 1.35rem;
  }

  .stat-label {
    font-size: 0.85rem;
    opacity: 1;
  }
}

/* ── Disable hover lift on touch devices ── */
@media (hover: none) {
  .category-card:hover,
  .endpoint-card:hover,
  .quick-link-card:hover {
    transform: none;
  }
}

/* ── Landscape phones ── */
@media (max-width: 767.98px) and (orientation: landscape) {
  .hero-section {
    padding: 1.5rem 0 2rem;
  }

  .json-output {
    max-height: 35vh;
  }
}

/* ══════════════════════════════════════
   Blog
   ══════════════════════════════════════ */

.blog-card {
  background: #fff;
  border: 1px solid rgba(15, 110, 140, 0.1);
  border-radius: var(--radius);
  overflow: hidden;
  height: 100%;
  display: flex;
  flex-direction: column;
  transition: box-shadow 0.25s, border-color 0.25s;
}

.blog-card:hover {
  box-shadow: var(--card-shadow);
  border-color: var(--accent-color);
}

.blog-card-image-link {
  display: block;
  text-decoration: none;
}

.blog-card-image {
  position: relative;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  background: var(--surface);
}

.blog-card-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.blog-card-category {
  position: absolute;
  top: 0.75rem;
  left: 0.75rem;
  background: var(--accent-color);
  color: #fff;
  font-size: 0.75rem;
  font-weight: 600;
  padding: 0.25rem 0.65rem;
  border-radius: 50px;
}

.blog-card-body {
  padding: 1.25rem;
  flex: 1;
  display: flex;
  flex-direction: column;
}

.blog-card-meta {
  font-size: 0.8rem;
  color: var(--text-muted);
  margin-bottom: 0.5rem;
}

.blog-card-title {
  font-size: 1.1rem;
  font-weight: 700;
  line-height: 1.35;
  margin-bottom: 0.5rem;
}

.blog-card-title a {
  color: var(--text);
  text-decoration: none;
}

.blog-card-title a:hover {
  color: var(--primary);
}

.blog-card-excerpt {
  color: var(--text-muted);
  font-size: 0.9rem;
  line-height: 1.5;
  margin-bottom: 0.75rem;
  flex: 1;
}

.blog-card-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
  margin-bottom: 0.75rem;
}

.blog-tag {
  display: inline-block;
  background: var(--surface);
  color: var(--primary);
  font-size: 0.75rem;
  font-weight: 500;
  padding: 0.2rem 0.55rem;
  border-radius: 50px;
  text-decoration: none;
  border: 1px solid rgba(15, 110, 140, 0.12);
  transition: all 0.2s;
}

.blog-tag:hover {
  background: var(--primary-light);
  color: var(--primary-dark);
}

.blog-tag.active {
  background: var(--primary);
  color: #fff;
  border-color: var(--primary);
}

.blog-card-readmore {
  color: var(--accent-color, var(--primary));
  font-weight: 600;
  font-size: 0.9rem;
  text-decoration: none;
}

.blog-card-readmore:hover {
  color: var(--primary-dark);
}

/* Blog sidebar */
@media (min-width: 992px) {
  .blog-sidebar.sticky-lg-top {
    position: sticky;
    top: 5.5rem;
    z-index: 50;
    align-self: flex-start;
  }
}

.blog-sidebar {
  top: 5.5rem;
}

.blog-sidebar-widget {
  background: #fff;
  border: 1px solid rgba(15, 110, 140, 0.1);
  border-radius: var(--radius);
  padding: 1.25rem;
  margin-bottom: 1rem;
}

.blog-sidebar-widget h3 {
  font-size: 1rem;
  font-weight: 700;
  margin-bottom: 0.85rem;
  padding-bottom: 0.5rem;
  border-bottom: 1px solid var(--surface);
}

.blog-sidebar-list {
  list-style: none;
  padding: 0;
  margin: 0;
}

.blog-sidebar-list li {
  margin-bottom: 0.15rem;
}

.blog-sidebar-list a {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.45rem 0.5rem;
  border-radius: 8px;
  color: var(--text-muted);
  text-decoration: none;
  font-size: 0.9rem;
  transition: all 0.2s;
}

.blog-sidebar-list a:hover,
.blog-sidebar-list a.active {
  background: var(--primary-light);
  color: var(--primary);
}

.blog-sidebar-list .badge {
  background: var(--surface);
  color: var(--text-muted);
  font-weight: 500;
  font-size: 0.75rem;
}

.blog-tag-cloud {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
}

.blog-sidebar-cta {
  background: linear-gradient(135deg, var(--primary-dark), var(--primary));
  color: #fff;
  border-radius: var(--radius);
  padding: 1.25rem;
  text-align: center;
}

.blog-sidebar-cta i {
  font-size: 1.75rem;
  margin-bottom: 0.5rem;
  display: block;
  opacity: 0.9;
}

.blog-sidebar-cta h4 {
  font-size: 1rem;
  font-weight: 700;
  margin-bottom: 0.35rem;
}

.blog-sidebar-cta p {
  font-size: 0.85rem;
  opacity: 0.85;
  margin-bottom: 0.85rem;
}

.blog-pagination .page-link {
  border-radius: 8px;
  color: var(--primary);
  min-width: 40px;
  text-align: center;
}

.blog-pagination .page-item.active .page-link {
  background: var(--primary);
  border-color: var(--primary);
}

/* Single blog post */
.blog-post-hero {
  background: linear-gradient(135deg, var(--primary-dark), var(--accent-color, var(--primary)));
  color: #fff;
  padding: 2rem 0 2.5rem;
}

.blog-post-category {
  display: inline-block;
  background: rgba(255, 255, 255, 0.2);
  padding: 0.3rem 0.75rem;
  border-radius: 50px;
  font-size: 0.8rem;
  font-weight: 600;
  margin-bottom: 0.75rem;
}

.blog-post-title {
  font-size: clamp(1.5rem, 4vw, 2.25rem);
  font-weight: 700;
  line-height: 1.2;
  margin-bottom: 0.75rem;
}

.blog-post-excerpt {
  font-size: 1.05rem;
  opacity: 0.9;
  line-height: 1.55;
  margin-bottom: 1rem;
}

.blog-post-meta {
  font-size: 0.85rem;
  opacity: 0.85;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.35rem;
}

.blog-endpoint-badge {
  background: rgba(255, 255, 255, 0.15);
  padding: 0.15rem 0.5rem;
  border-radius: 4px;
  font-size: 0.78rem;
  color: #fff;
}

.blog-post-hero-image {
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.2);
}

.blog-post-hero-image img {
  width: 100%;
  height: auto;
  display: block;
}

.blog-post-content {
  background: #fff;
  border: 1px solid rgba(15, 110, 140, 0.1);
  border-radius: var(--radius);
  padding: 2rem;
}

.blog-section {
  margin-bottom: 2rem;
}

.blog-section:last-child {
  margin-bottom: 0;
}

.blog-section h2 {
  font-size: 1.25rem;
  font-weight: 700;
  margin-bottom: 0.75rem;
  color: var(--primary-dark);
}

.blog-section p {
  line-height: 1.7;
  color: var(--text);
  margin-bottom: 0.75rem;
}

.blog-section ul {
  padding-left: 1.25rem;
  line-height: 1.7;
}

.blog-section li {
  margin-bottom: 0.35rem;
}

.blog-section code,
.blog-code code {
  background: var(--surface);
  padding: 0.15rem 0.4rem;
  border-radius: 4px;
  font-size: 0.88em;
  color: var(--primary-dark);
}

.blog-code {
  background: #1e293b;
  border-radius: 10px;
  padding: 1rem 1.25rem;
  overflow-x: auto;
  margin: 1rem 0;
  -webkit-overflow-scrolling: touch;
}

.blog-code code {
  background: none;
  color: #e2e8f0;
  padding: 0;
  font-size: 0.85rem;
  white-space: pre-wrap;
  word-break: break-all;
}

.blog-post-cta {
  margin-top: 2rem;
}

.blog-post-cta-inner {
  display: flex;
  align-items: center;
  gap: 1rem;
  background: var(--primary-light);
  border: 1px solid rgba(15, 110, 140, 0.15);
  border-radius: var(--radius);
  padding: 1.25rem 1.5rem;
}

.blog-post-cta-inner i {
  font-size: 2rem;
  color: var(--primary);
  flex-shrink: 0;
}

.blog-post-cta-inner h3 {
  font-size: 1.05rem;
  font-weight: 700;
  margin-bottom: 0.2rem;
}

.blog-post-cta-inner p {
  font-size: 0.9rem;
  color: var(--text-muted);
  margin: 0;
}

.blog-post-cta-inner .btn {
  flex-shrink: 0;
  white-space: nowrap;
}

.blog-post-tags {
  margin-top: 2rem;
  padding-top: 1.5rem;
  border-top: 1px solid rgba(15, 110, 140, 0.1);
}

.blog-post-tags h3 {
  font-size: 1rem;
  font-weight: 700;
  margin-bottom: 0.75rem;
}

article.blog-post {
  padding-bottom: 3.5rem;
}

article.blog-post .blog-post-main {
  padding-bottom: 2rem;
}

.blog-details-list {
  margin: 0;
}

.blog-details-list dt {
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--text-muted);
  margin-top: 0.65rem;
}

.blog-details-list dt:first-child {
  margin-top: 0;
}

.blog-details-list dd {
  margin: 0.15rem 0 0;
  font-size: 0.9rem;
}

.blog-details-list code {
  font-size: 0.8rem;
  word-break: break-all;
}

.blog-related-list {
  list-style: none;
  padding: 0;
  margin: 0;
}

.blog-related-list li {
  margin-bottom: 0.65rem;
  padding-bottom: 0.65rem;
  border-bottom: 1px solid var(--surface);
}

.blog-related-list li:last-child {
  margin-bottom: 0;
  padding-bottom: 0;
  border-bottom: none;
}

.blog-related-list a {
  display: block;
  text-decoration: none;
  color: var(--text);
}

.blog-related-list a:hover strong {
  color: var(--primary);
}

.blog-related-list strong {
  display: block;
  font-size: 0.9rem;
  line-height: 1.35;
  margin-bottom: 0.15rem;
}

.blog-related-list small {
  color: var(--text-muted);
  font-size: 0.78rem;
}

/* Blog mobile */
@media (max-width: 991.98px) {
  .blog-sidebar {
    position: static;
    top: auto;
  }
}

@media (max-width: 767.98px) {
  .blog-post-hero {
    padding: 1.5rem 0 2rem;
  }

  .blog-post-hero-image {
    margin-top: 0.5rem;
  }

  .blog-post-content {
    padding: 1.25rem;
  }

  .blog-post-cta-inner {
    flex-direction: column;
    text-align: center;
    padding: 1.25rem;
  }

  .blog-post-cta-inner .btn {
    width: 100%;
    min-height: 44px;
  }

  .blog-sidebar-widget {
    padding: 1rem;
  }

  .blog-card-body {
    padding: 1rem;
  }

  .blog-card-title {
    font-size: 1rem;
  }
}

@media (hover: none) {
  .blog-card:hover {
    box-shadow: none;
  }
}

/* Home blog banner */
.blog-home-banner {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 1.25rem;
  background: linear-gradient(135deg, var(--primary-light), #fff);
  border: 1px solid rgba(15, 110, 140, 0.12);
  border-radius: var(--radius);
  padding: 2rem;
}

.blog-home-banner h2 {
  font-size: 1.35rem;
  font-weight: 700;
  margin-bottom: 0.35rem;
}

.blog-home-banner p {
  color: var(--text-muted);
  margin: 0;
  max-width: 540px;
}

@media (min-width: 768px) {
  .blog-home-banner {
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
    padding: 2rem 2.5rem;
  }

  .blog-home-banner .btn {
    flex-shrink: 0;
  }
}

@media (max-width: 767.98px) {
  .blog-home-banner .btn {
    width: 100%;
    min-height: 44px;
  }
}

/* Home extra sections */
.home-step-card {
  position: relative;
  background: #fff;
  border: 1px solid rgba(15, 110, 140, 0.1);
  border-radius: var(--radius);
  padding: 1.5rem 1.25rem;
  height: 100%;
  text-align: center;
}

.home-step-num {
  position: absolute;
  top: 0.75rem;
  right: 0.85rem;
  font-size: 0.75rem;
  font-weight: 700;
  color: var(--primary);
  opacity: 0.45;
}

.home-step-icon {
  font-size: 1.75rem;
  color: var(--primary);
  margin-bottom: 0.75rem;
  display: block;
}

.home-step-card h3 {
  font-size: 1rem;
  font-weight: 700;
  margin-bottom: 0.5rem;
}

.home-step-card p {
  font-size: 0.88rem;
  color: var(--text-muted);
  margin: 0;
  line-height: 1.55;
}

.home-audience-card {
  background: #fff;
  border: 1px solid rgba(15, 110, 140, 0.1);
  border-radius: var(--radius);
  padding: 1.5rem;
  height: 100%;
}

.home-audience-icon {
  width: 48px;
  height: 48px;
  border-radius: 12px;
  background: var(--primary-light);
  color: var(--primary);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.35rem;
  margin-bottom: 1rem;
}

.home-audience-card h3 {
  font-size: 1.05rem;
  font-weight: 700;
  margin-bottom: 0.5rem;
}

.home-audience-card p {
  font-size: 0.9rem;
  color: var(--text-muted);
  margin: 0;
  line-height: 1.55;
}

.home-benefits-list {
  list-style: none;
  padding: 0;
  margin: 0 0 1rem;
}

.home-benefits-list li {
  display: flex;
  gap: 0.85rem;
  margin-bottom: 1.1rem;
}

.home-benefits-list li i {
  color: var(--accent);
  font-size: 1.15rem;
  flex-shrink: 0;
  margin-top: 0.15rem;
}

.home-benefits-list strong {
  display: block;
  font-size: 0.95rem;
  margin-bottom: 0.15rem;
}

.home-benefits-list span {
  font-size: 0.88rem;
  color: var(--text-muted);
  line-height: 1.5;
}

.home-example-card {
  background: #fff;
  border: 1px solid rgba(15, 110, 140, 0.12);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--card-shadow);
}

.home-example-header {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 1rem 1.25rem;
  background: var(--primary-dark);
  color: #fff;
  font-weight: 600;
  font-size: 0.95rem;
}

.home-example-header i {
  font-size: 1.1rem;
  opacity: 0.9;
}

.home-example-list {
  display: flex;
  flex-direction: column;
}

.home-example-item {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
  padding: 1rem 1.25rem;
  text-decoration: none;
  color: inherit;
  border-bottom: 1px solid var(--surface);
  transition: background 0.2s;
}

.home-example-item:last-child {
  border-bottom: none;
}

.home-example-item:hover {
  background: var(--primary-light);
}

.home-example-item code {
  font-size: 0.82rem;
  color: var(--primary-dark);
  background: var(--surface);
  padding: 0.2rem 0.45rem;
  border-radius: 4px;
  width: fit-content;
}

.home-example-item span {
  font-size: 0.88rem;
  color: var(--text-muted);
}

.home-faq .accordion-item {
  border: 1px solid rgba(15, 110, 140, 0.12);
  border-radius: 10px !important;
  margin-bottom: 0.65rem;
  overflow: hidden;
}

.home-faq .accordion-button {
  font-weight: 600;
  font-size: 0.95rem;
  color: var(--text);
  background: #fff;
  box-shadow: none;
}

.home-faq .accordion-button:not(.collapsed) {
  background: var(--primary-light);
  color: var(--primary-dark);
}

.home-faq .accordion-button:focus {
  box-shadow: none;
  border-color: rgba(15, 110, 140, 0.2);
}

.home-faq .accordion-body {
  font-size: 0.92rem;
  color: var(--text-muted);
  line-height: 1.65;
}

@media (max-width: 575.98px) {
  .home-step-card {
    padding: 1.15rem 0.85rem;
  }

  .home-step-card h3 {
    font-size: 0.92rem;
  }

  .home-step-card p {
    font-size: 0.8rem;
  }
}

/* ══════════════════════════════════════
   Site Footer
   ══════════════════════════════════════ */

.site-footer {
  margin-top: auto;
  background: var(--primary-dark);
  color: rgba(255, 255, 255, 0.85);
}

.footer-main {
  padding: 3.5rem 0 2.5rem;
}

.footer-brand {
  margin-bottom: 1rem;
}

.footer-brand .site-logo {
  border-radius: 8px;
}

.footer-about {
  font-size: 0.9rem;
  line-height: 1.6;
  opacity: 0.8;
  margin-bottom: 1rem;
  max-width: 320px;
}

.footer-social a {
  display: inline-flex;
  width: 36px;
  height: 36px;
  align-items: center;
  justify-content: center;
  background: rgba(255, 255, 255, 0.1);
  border-radius: 8px;
  color: #fff;
  text-decoration: none;
  transition: background 0.2s;
}

.footer-social a:hover {
  background: rgba(255, 255, 255, 0.2);
  color: #fff;
}

.footer-heading {
  color: #fff;
  font-size: 0.95rem;
  font-weight: 700;
  margin-bottom: 1rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.footer-links {
  list-style: none;
  padding: 0;
  margin: 0;
}

.footer-links li {
  margin-bottom: 0.45rem;
}

.footer-links a {
  color: rgba(255, 255, 255, 0.75);
  text-decoration: none;
  font-size: 0.9rem;
  transition: color 0.2s;
}

.footer-links a:hover {
  color: var(--accent);
}

.footer-disclaimer {
  font-size: 0.8rem;
  opacity: 0.7;
  line-height: 1.5;
}

.footer-bottom {
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  padding: 1.25rem 0;
  font-size: 0.85rem;
  opacity: 0.7;
}

.footer-bottom-links a {
  color: rgba(255, 255, 255, 0.75);
  text-decoration: none;
}

.footer-bottom-links a:hover {
  color: #fff;
}

.footer-credit a {
  color: rgba(255, 255, 255, 0.85);
  text-decoration: none;
}

.footer-credit a:hover {
  color: #fff;
  text-decoration: underline;
}

/* Legal pages */
.legal-content h2 {
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--primary-dark);
  margin-top: 1.75rem;
  margin-bottom: 0.65rem;
}

.legal-content p,
.legal-content li {
  line-height: 1.7;
  color: var(--text);
}

.legal-content ul {
  padding-left: 1.25rem;
  margin-bottom: 1rem;
}

/* Contact page */
.contact-info-card {
  background: linear-gradient(135deg, var(--primary-dark), var(--primary));
  color: #fff;
  border-radius: var(--radius);
  padding: 2rem;
  height: 100%;
}

.contact-info-card h2 {
  font-size: 1.35rem;
  font-weight: 700;
  margin-bottom: 0.75rem;
}

.contact-info-card p {
  opacity: 0.9;
  line-height: 1.6;
  margin-bottom: 1.25rem;
}

.contact-info-list {
  list-style: none;
  padding: 0;
  margin: 0;
}

.contact-info-list li {
  display: flex;
  align-items: flex-start;
  gap: 0.65rem;
  margin-bottom: 0.75rem;
  font-size: 0.9rem;
  opacity: 0.9;
}

.contact-info-list a {
  color: var(--accent);
}

/* Admin */
.admin-bar {
  background: var(--primary-dark);
  padding: 0.65rem 0;
}

.admin-bar-links {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem 1rem;
}

.admin-bar-links a {
  color: rgba(255, 255, 255, 0.85);
  text-decoration: none;
  font-size: 0.9rem;
  font-weight: 500;
}

.admin-bar-links a:hover {
  color: #fff;
}

.admin-stat-card {
  background: #fff;
  border: 1px solid rgba(15, 110, 140, 0.1);
  border-radius: var(--radius);
  padding: 1.25rem;
  text-align: center;
}

.admin-stat-value {
  display: block;
  font-size: 1.75rem;
  font-weight: 700;
  color: var(--primary);
}

.admin-stat-label {
  font-size: 0.85rem;
  color: var(--text-muted);
}

.admin-table th {
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  color: var(--text-muted);
  border-bottom-width: 1px;
}

.admin-table td {
  vertical-align: middle;
  font-size: 0.9rem;
}

@media (max-width: 767.98px) {
  .footer-main {
    padding: 2.5rem 0 1.5rem;
  }

  .footer-bottom {
    text-align: center;
  }

  .admin-bar-links {
    width: 100%;
  }

  .admin-table .btn {
    margin-bottom: 0.25rem;
  }
}

/* Admin post editor */
.admin-post-form .form-label {
  font-weight: 600;
  font-size: 0.9rem;
  color: var(--text);
  margin-bottom: 0.35rem;
}

.admin-post-form .form-control,
.admin-post-form .form-select {
  border-radius: 10px;
  border-color: rgba(15, 110, 140, 0.2);
  padding: 0.55rem 0.85rem;
}

.admin-post-form .form-control:focus,
.admin-post-form .form-select:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 0.2rem rgba(15, 110, 140, 0.15);
}

.admin-post-form .form-text a {
  color: var(--primary);
  text-decoration: none;
  font-weight: 500;
}

.admin-post-form .form-text a:hover {
  text-decoration: underline;
}

/* Quill editor */
.admin-post-form .quill-wrap {
  border: 1px solid rgba(15, 110, 140, 0.2);
  border-radius: 10px;
  overflow: hidden;
  background: #fff;
}

.admin-post-form .quill-wrap .ql-toolbar.ql-snow {
  border: none;
  border-bottom: 1px solid rgba(15, 110, 140, 0.15);
  background: var(--surface);
  padding: 0.6rem 0.75rem;
  font-family: inherit;
}

.admin-post-form .quill-wrap .ql-container.ql-snow {
  border: none;
  font-size: 1rem;
  font-family: inherit;
}

.admin-post-form .quill-wrap .ql-editor {
  min-height: 280px;
  padding: 1rem 1.1rem;
  line-height: 1.7;
}

.admin-post-form .quill-wrap .ql-editor.ql-blank::before {
  color: var(--text-muted);
  font-style: normal;
}

/* Image upload */
.image-upload-zone {
  border: 2px dashed rgba(15, 110, 140, 0.25);
  border-radius: 10px;
  padding: 1.5rem;
  background: var(--surface);
  transition: border-color 0.2s, background 0.2s;
}

.image-upload-zone.drag-over {
  border-color: var(--primary);
  background: var(--primary-light);
}

.image-upload-prompt {
  text-align: center;
  padding: 0.5rem 0;
}

.image-upload-prompt i {
  font-size: 2.25rem;
  color: var(--primary);
  display: block;
  margin-bottom: 0.5rem;
}

.image-upload-prompt p {
  color: var(--text-muted);
  font-size: 0.9rem;
}

.image-upload-hint {
  margin-top: 0.75rem !important;
  margin-bottom: 0 !important;
  font-size: 0.8rem !important;
  color: var(--text-muted);
}

.image-preview-wrap {
  text-align: center;
  margin-bottom: 1rem;
  padding-bottom: 1rem;
  border-bottom: 1px solid rgba(15, 110, 140, 0.1);
}

.image-preview {
  max-width: 100%;
  max-height: 220px;
  border-radius: 10px;
  object-fit: contain;
  display: block;
  margin: 0 auto;
  box-shadow: var(--card-shadow);
}

.image-upload-zone.has-preview .image-upload-prompt {
  padding-top: 0.25rem;
}

/* Flatpickr */
.admin-post-form .flatpickr-wrapper {
  width: 100%;
}

.admin-post-form input.flatpickr-input[type="hidden"] + input.form-control,
.admin-post-form .flatpickr-wrapper input.form-control {
  width: 100%;
}

.admin-post-form .flatpickr-input.form-control {
  background: #fff;
}

.admin-post-form .flatpickr-calendar {
  border-radius: 10px;
  box-shadow: var(--card-shadow);
  border: 1px solid rgba(15, 110, 140, 0.12);
}

.admin-post-form .flatpickr-day.selected,
.admin-post-form .flatpickr-day.selected:hover {
  background: var(--primary);
  border-color: var(--primary);
}

.admin-post-form .flatpickr-day.today {
  border-color: var(--accent);
}

/* Tom Select tags */
.admin-post-form .ts-wrapper {
  width: 100%;
}

.admin-post-form .ts-wrapper .ts-control {
  border-radius: 10px;
  border-color: rgba(15, 110, 140, 0.2);
  padding: 0.45rem 0.65rem;
  min-height: 42px;
  box-shadow: none;
}

.admin-post-form .ts-wrapper.focus .ts-control {
  border-color: var(--primary);
  box-shadow: 0 0 0 0.2rem rgba(15, 110, 140, 0.15);
}

.admin-post-form .ts-wrapper .ts-control .item {
  background: var(--primary-light);
  color: var(--primary-dark);
  border-radius: 6px;
  border: none;
  padding: 0.2rem 0.5rem;
  font-size: 0.85rem;
}

.admin-post-form .ts-wrapper .ts-dropdown {
  border-radius: 10px;
  border-color: rgba(15, 110, 140, 0.15);
  box-shadow: var(--card-shadow);
}

.admin-post-form .ts-wrapper .ts-dropdown .active {
  background: var(--primary-light);
  color: var(--primary-dark);
}

.color-swatch {
  display: inline-block;
  width: 1.5rem;
  height: 1.5rem;
  border-radius: 4px;
  border: 1px solid rgba(0, 0, 0, 0.1);
}

/* Page loader */
.page-loader {
  position: fixed;
  inset: 0;
  z-index: 9999;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(255, 255, 255, 0.88);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.22s ease, visibility 0.22s ease;
}

.page-loader.is-active {
  opacity: 1;
  visibility: visible;
}

.page-loader__inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.85rem;
}

.page-loader__ring {
  width: 46px;
  height: 46px;
  border-radius: 50%;
  border: 3px solid rgba(15, 110, 140, 0.12);
  border-top-color: var(--primary);
  border-right-color: var(--accent);
  animation: page-loader-spin 0.75s linear infinite;
}

.page-loader__text {
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--primary);
  animation: page-loader-pulse 1.4s ease-in-out infinite;
}

body.loader-active {
  overflow: hidden;
}

@keyframes page-loader-spin {
  to {
    transform: rotate(360deg);
  }
}

@keyframes page-loader-pulse {
  0%,
  100% {
    opacity: 0.45;
  }

  50% {
    opacity: 1;
  }
}

@media (prefers-reduced-motion: reduce) {
  .page-loader__ring {
    animation: none;
    border-top-color: var(--primary);
    border-right-color: var(--primary);
  }

  .page-loader__text {
    animation: none;
    opacity: 0.8;
  }

  .page-loader {
    transition: none;
  }
}

@media (max-width: 767.98px) {
  .admin-post-form.content-card {
    padding: 1.25rem;
  }

  .admin-post-form .quill-wrap .ql-editor {
    min-height: 220px;
  }
}

.skip-link {
  position: absolute;
  left: -999px;
  top: 0;
  background: var(--primary);
  color: #fff;
  padding: 0.5rem 1rem;
  z-index: 10000;
}

.skip-link:focus {
  left: 0.75rem;
  top: 0.75rem;
}

.ad-slot {
  margin: 1.25rem 0;
  min-height: 100px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}

.ad-slot-label {
  font-size: 0.7rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-muted);
  margin-bottom: 0.35rem;
}

.ad-slot--sidebar {
  min-height: 250px;
}

.ad-slot--in-article {
  min-height: 120px;
}

.cookie-banner {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 1050;
  background: #fff;
  border-top: 1px solid rgba(15, 110, 140, 0.15);
  padding: 0.9rem 0;
}

.cookie-banner-inner {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem 1.25rem;
  align-items: center;
  justify-content: space-between;
}

.cookie-banner-inner p {
  margin: 0;
  flex: 1 1 16rem;
  font-size: 0.9rem;
  color: var(--text-muted);
}

.cookie-banner-actions {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
}
