:root {
  --brand-primary: #2563eb;
  --brand-primary-dark: #1d4ed8;
  --brand-primary-soft: #dbeafe;
  --brand-accent: #f59e0b;
  --brand-text: #0f172a;
}

body {
  background: #f7f9fc;
  color: var(--brand-text);
  transition: background-color 0.25s ease, color 0.25s ease;
}

body[data-theme="dark"] {
  background: #020617;
  color: #e5e7eb;
}

#mainNav {
  background: rgba(17, 24, 39, 0.9) !important;
  backdrop-filter: blur(6px);
}

#mainNav .navbar-brand {
  color: #fff !important;
}

#mainNav .nav-link {
  color: rgba(255, 255, 255, 0.82) !important;
  transition: all 0.2s ease;
}

#mainNav .nav-link:hover,
#mainNav .nav-link:focus,
#mainNav .nav-link.active {
  color: #fff !important;
  background: rgba(37, 99, 235, 0.28);
}

#mainNav .navbar-nav > li.nav-item > a.nav-link.active {
  color: #fff !important;
  background-color: rgba(37, 99, 235, 0.42) !important;
  border-radius: 0.5rem;
}

#mainNav .navbar-nav > li.nav-item > a.nav-link:hover {
  background-color: rgba(37, 99, 235, 0.24) !important;
  border-radius: 0.5rem;
}

#mainNav.navbar--layout-minimal {
  padding-top: 0.4rem !important;
  padding-bottom: 0.4rem !important;
}

#mainNav.navbar--layout-minimal .navbar-brand-minimal {
  font-size: 1.05rem;
  letter-spacing: -0.01em;
  text-transform: none !important;
}

#mainNav.navbar--layout-minimal .navbar-nav-minimal .nav-link {
  padding-top: 0.55rem !important;
  padding-bottom: 0.55rem !important;
  font-size: 0.92rem !important;
  text-transform: none !important;
}

#mainNav.navbar--layout-branded .navbar-brand {
  text-transform: none !important;
  color: #fff !important;
}

#mainNav.navbar--layout-branded .navbar-brand-logo {
  width: 40px;
  height: 40px;
  object-fit: contain;
}

#mainNav.navbar--layout-branded .navbar-brand-title {
  font-size: 1rem;
  line-height: 1.2;
}

#mainNav.navbar--layout-branded .navbar-brand-tagline {
  font-weight: 400;
}

#mainNav.navbar--layout-branded .navbar-nav-branded .nav-link {
  text-transform: none !important;
  font-weight: 500;
}

/* Navbar dropdown styling */
#mainNav .dropdown-menu {
  border: none;
  border-radius: 0.75rem;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.25);
  padding: 0.5rem;
  min-width: 12rem;
  animation: navDropdownFade 0.2s ease;
}

@keyframes navDropdownFade {
  from { opacity: 0; transform: translateY(-8px); }
  to { opacity: 1; transform: translateY(0); }
}

#mainNav .dropdown-menu .dropdown-item {
  border-radius: 0.5rem;
  padding: 0.55rem 0.85rem;
  font-size: 0.88rem;
  font-weight: 500;
  transition: background 0.15s;
}

#mainNav .dropdown-menu .dropdown-item:hover,
#mainNav .dropdown-menu .dropdown-item:focus {
  background: rgba(37, 99, 235, 0.15);
}

#mainNav .dropdown-menu .dropdown-item.active {
  background: rgba(37, 99, 235, 0.25);
}

#mainNav .dropdown-toggle::after {
  font-size: 0.7em;
  vertical-align: 0.15em;
}

/* Mobile dropdown fix: ensure dropdowns work inside collapsed navbar */
@media (max-width: 991.98px) {
  #mainNav .navbar-collapse .dropdown-menu {
    background: rgba(30, 41, 59, 0.95);
    border: 1px solid rgba(255, 255, 255, 0.1);
    position: static !important;
    float: none;
    width: 100%;
    margin-top: 0.25rem;
    box-shadow: none;
    padding: 0.5rem;
    transform: none !important;
  }

  #mainNav .navbar-collapse .dropdown-menu .dropdown-item {
    color: rgba(255, 255, 255, 0.85);
    padding: 0.6rem 1rem;
  }

  #mainNav .navbar-collapse .dropdown-menu .dropdown-item:hover,
  #mainNav .navbar-collapse .dropdown-menu .dropdown-item:focus {
    background: rgba(37, 99, 235, 0.2);
    color: #fff;
  }

  #mainNav .navbar-collapse .nav-item.dropdown {
    position: relative;
  }

  #mainNav .navbar-collapse .dropdown-toggle {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
  }
}

.custom-hero {
  background: linear-gradient(135deg, #0f172a 0%, #1e3a8a 55%, #2563eb 100%);
  position: relative;
  overflow: hidden;
}

.custom-hero::after {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at 20% 20%, rgba(255, 255, 255, 0.2), transparent 45%);
}

.custom-hero .container {
  position: relative;
  z-index: 1;
}

.custom-hero .masthead-avatar {
  width: 11rem;
  height: 11rem;
  border-radius: 50%;
  object-fit: cover;
  border: 4px solid rgba(255, 255, 255, 0.8);
  box-shadow: 0 12px 30px rgba(15, 23, 42, 0.35);
}

.custom-section-card {
  background: #fff;
  border-radius: 1rem;
  padding: 1.5rem;
  box-shadow: 0 10px 25px rgba(15, 23, 42, 0.06);
}

.divider-custom .divider-custom-line {
  background-color: var(--brand-primary);
}

.divider-custom .divider-custom-icon {
  color: var(--brand-primary);
}

#portfolio .divider-custom .divider-custom-line,
#contact .divider-custom .divider-custom-line {
  background-color: #0f172a;
}

#portfolio .divider-custom .divider-custom-icon,
#contact .divider-custom .divider-custom-icon {
  color: #0f172a;
}

#updates .divider-custom .divider-custom-line {
  background-color: #0f172a;
}

#updates .divider-custom .divider-custom-icon {
  color: #0f172a;
}

#portfolio .portfolio-item {
  border-radius: 0.9rem;
  overflow: hidden;
  box-shadow: 0 10px 20px rgba(15, 23, 42, 0.1);
}

#portfolio .portfolio-item img {
  width: 100%;
  height: 230px;
  object-fit: cover;
}

#about {
  background: linear-gradient(135deg, #1e293b 0%, #0f172a 100%) !important;
}

#about .skill-chip {
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 0.8rem;
}

#about .experience-card {
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 0.8rem;
}

#contact .contact-card {
  background: #fff;
  border-radius: 1rem;
  padding: 1.25rem;
  box-shadow: 0 10px 25px rgba(15, 23, 42, 0.08);
}

#updates .updates-section-wrap {
  border: 1px solid #e2e8f0;
}

body[data-theme="dark"] .custom-section-card,
body[data-theme="dark"] #contact .contact-card,
body[data-theme="dark"] #updates .updates-section-wrap {
  background: #020617;
  border-color: #1f2937;
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.65);
}

body[data-theme="dark"] .page-section-heading {
  color: #e5e7eb !important;
}

body[data-theme="dark"] .text-secondary {
  color: #e5e7eb !important;
}

#updates .update-card {
  border-radius: 0.85rem;
  overflow: hidden;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

#updates .update-card:hover,
.updates-preview-section .update-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 16px 28px rgba(15, 23, 42, 0.14) !important;
}

.update-card--clickable {
  cursor: pointer;
}

.update-card--clickable:focus-visible {
  outline: 3px solid rgba(37, 99, 235, 0.35);
  outline-offset: 3px;
}

#updates .update-time {
  color: #1d4ed8 !important;
  font-weight: 600;
  font-size: 0.76rem;
}

.update-detail-shell {
  max-width: 880px;
}

.update-gallery {
  margin-inline: -0.15rem;
}

.update-gallery-scroll {
  display: flex;
  gap: 0.85rem;
  overflow-x: auto;
  overflow-y: hidden;
  scroll-snap-type: x proximity;
  padding: 0.15rem 0.15rem 0.9rem;
  scrollbar-color: var(--brand-primary) rgba(148, 163, 184, 0.22);
  scrollbar-width: thin;
}

.update-gallery-scroll::-webkit-scrollbar {
  height: 9px;
}

.update-gallery-scroll::-webkit-scrollbar-track {
  background: rgba(148, 163, 184, 0.22);
  border-radius: 999px;
}

.update-gallery-scroll::-webkit-scrollbar-thumb {
  background: var(--brand-primary);
  border-radius: 999px;
}

.update-gallery-item {
  display: block;
  flex: 0 0 clamp(220px, 42vw, 340px);
  overflow: hidden;
  border-radius: 0.8rem;
  border: 1px solid rgba(148, 163, 184, 0.28);
  background: #e2e8f0;
  scroll-snap-align: start;
  box-shadow: 0 10px 24px rgba(15, 23, 42, 0.1);
  transition: transform 0.15s ease, border-color 0.15s ease, box-shadow 0.15s ease;
}

.update-gallery-item:hover {
  border-color: var(--brand-primary);
  box-shadow: 0 8px 18px rgba(37, 99, 235, 0.18);
  transform: translateY(-2px);
}

.update-gallery-item img {
  display: block;
  width: 100%;
  height: 220px;
  object-fit: cover;
}

body[data-theme="dark"] .update-gallery-item {
  background: #0f172a;
  border-color: rgba(148, 163, 184, 0.24);
}

@media (max-width: 575.98px) {
  .update-detail-shell {
    padding: 1rem;
  }

  .update-gallery-item {
    flex-basis: 78vw;
  }

  .update-gallery-item img {
    height: 210px;
  }
}

.btn-primary {
  --bs-btn-bg: var(--brand-primary);
  --bs-btn-border-color: var(--brand-primary);
  --bs-btn-hover-bg: var(--brand-primary-dark);
  --bs-btn-hover-border-color: var(--brand-primary-dark);
  --bs-btn-active-bg: var(--brand-primary-dark);
  --bs-btn-active-border-color: var(--brand-primary-dark);
}

.btn-outline-primary {
  --bs-btn-color: var(--brand-primary);
  --bs-btn-border-color: var(--brand-primary);
  --bs-btn-hover-bg: var(--brand-primary);
  --bs-btn-hover-border-color: var(--brand-primary);
}

.portfolio-modal .btn-outline-secondary {
  --bs-btn-color: #334155;
  --bs-btn-border-color: #94a3b8;
  --bs-btn-hover-bg: #334155;
  --bs-btn-hover-border-color: #334155;
}

.text-primary {
  color: var(--brand-primary) !important;
}

.form-control:focus,
.form-floating > .form-control:focus {
  border-color: var(--brand-primary);
  box-shadow: 0 0 0 0.2rem rgba(37, 99, 235, 0.15);
}

.footer {
  background: #0f172a;
  color: #e2e8f0;
}

.footer a {
  color: #93c5fd;
}

.copyright {
  background: #020617;
}

body[data-theme="dark"] .footer {
  background: #020617;
}

.theme-toggle-btn .theme-icon {
  font-size: 0.9rem;
}

.footer-heading,
.footer-heading-sm {
  letter-spacing: 0.06em;
  font-size: 0.85rem;
}

.footer--minimal .footer-minimal-logo,
.footer--split .footer-split-logo {
  max-height: 52px;
  width: auto;
  object-fit: contain;
}

.footer--split {
  border-top: 1px solid rgba(148, 163, 184, 0.2);
}

.footer-quick-links a {
  text-decoration: none;
  color: #e2e8f0 !important;
  font-weight: 500;
}

.footer-quick-links a:hover {
  color: #fff !important;
  text-decoration: underline;
}

.footer-phone {
  color: inherit;
}

.btn-social.btn-sm {
  width: 2.25rem;
  height: 2.25rem;
  padding: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
}

.footer-visitor-stats .visitor-stat-card {
  display: flex;
  align-items: center;
  gap: 0.85rem;
  padding: 0.85rem 1rem;
  border-radius: 0.85rem;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.1);
  min-width: 9rem;
  transition: transform 0.2s ease, background 0.2s ease, border-color 0.2s ease;
}

.footer-visitor-stats .visitor-stat-card:hover {
  transform: translateY(-2px);
  background: rgba(255, 255, 255, 0.1);
  border-color: rgba(255, 255, 255, 0.2);
}

.footer-visitor-stats .visitor-stat-card i {
  font-size: 1.35rem;
  color: var(--brand-accent, #f59e0b);
  width: 2.25rem;
  height: 2.25rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: rgba(245, 158, 11, 0.15);
  border-radius: 50%;
}

.footer-visitor-stats .visitor-stat-number {
  font-size: 1.25rem;
  font-weight: 700;
  color: #fff;
  line-height: 1.1;
}

.footer-visitor-inline strong {
  font-weight: 700;
  font-variant-numeric: tabular-nums;
}

@media (max-width: 575.98px) {
  .footer-visitor-stats .visitor-stat-card {
    min-width: 100%;
  }
}

/* Reading progress bar */
.reading-progress {
  pointer-events: none;
}

.reading-progress--floating {
  position: fixed;
  right: 1rem;
  bottom: 5.5rem;
  width: min(240px, calc(100vw - 2rem));
  padding: 0.45rem 0.55rem 0.55rem;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.88);
  border: 1px solid rgba(15, 23, 42, 0.08);
  box-shadow: 0 10px 24px rgba(15, 23, 42, 0.14);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  z-index: 1060;
  opacity: 1;
  transform: none;
}

.reading-progress__meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.55rem;
  margin-bottom: 0.32rem;
  color: rgba(15, 23, 42, 0.78);
}

.reading-progress__label {
  display: none;
}

.reading-progress__value {
  font-size: 0.72rem;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  color: rgba(15, 23, 42, 0.72);
}

.reading-progress__track {
  position: relative;
  height: 6px;
  border-radius: 999px;
  background: rgba(15, 23, 42, 0.09);
  overflow: hidden;
}

.reading-progress__fill {
  height: 100%;
  width: 0;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--brand-primary, #2563eb), var(--brand-accent, #f59e0b));
  transition: width 0.12s linear;
}

body[data-theme="dark"] .reading-progress--floating {
  background: rgba(17, 24, 39, 0.9);
  border-color: rgba(255, 255, 255, 0.08);
  box-shadow: 0 10px 24px rgba(0, 0, 0, 0.32);
}

body[data-theme="dark"] .reading-progress__meta {
  color: rgba(255, 255, 255, 0.9);
}

body[data-theme="dark"] .reading-progress__value {
  color: rgba(255, 255, 255, 0.82);
}

body[data-theme="dark"] .reading-progress__track {
  background: rgba(255, 255, 255, 0.1);
}

/* Floating WhatsApp button */
.whatsapp-floating {
  position: fixed;
  right: 1.25rem;
  bottom: 1.25rem;
  z-index: 1050;
  display: inline-flex;
  align-items: center;
  gap: 0;
  padding: 0;
  width: 56px;
  height: 56px;
  border-radius: 999px;
  background: linear-gradient(135deg, #25d366 0%, #128c7e 100%);
  color: #fff !important;
  box-shadow: 0 12px 30px rgba(37, 211, 102, 0.45);
  text-decoration: none !important;
  overflow: hidden;
  transition: width 0.3s cubic-bezier(0.34, 1.56, 0.64, 1), box-shadow 0.2s ease, transform 0.2s ease;
}

.whatsapp-floating:hover,
.whatsapp-floating:focus-visible {
  width: 200px;
  box-shadow: 0 18px 38px rgba(37, 211, 102, 0.55);
  transform: translateY(-2px);
}

.whatsapp-floating__pulse {
  position: absolute;
  top: 0;
  left: 0;
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: rgba(37, 211, 102, 0.35);
  animation: wa-float-pulse 2s ease-out infinite;
  pointer-events: none;
}

.whatsapp-floating__icon {
  flex-shrink: 0;
  width: 56px;
  height: 56px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 1.7rem;
  color: #fff;
}

.whatsapp-floating__label {
  flex-grow: 1;
  white-space: nowrap;
  font-weight: 600;
  font-size: 0.9rem;
  opacity: 0;
  transform: translateX(-6px);
  transition: opacity 0.2s ease 0.05s, transform 0.2s ease 0.05s;
  padding-right: 1rem;
}

.whatsapp-floating:hover .whatsapp-floating__label,
.whatsapp-floating:focus-visible .whatsapp-floating__label {
  opacity: 1;
  transform: translateX(0);
}

@keyframes wa-float-pulse {
  0%   { transform: scale(1);   opacity: 0.55; }
  70%  { transform: scale(1.6); opacity: 0; }
  100% { transform: scale(1.6); opacity: 0; }
}

@media (max-width: 575.98px) {
  .whatsapp-floating { right: 1rem; bottom: 1rem; }
  .reading-progress--floating { right: 1rem; bottom: 4.75rem; width: min(200px, calc(100vw - 2rem)); }
}

/* Blog-only reading scope hook */
.blog-reading-section {
  position: relative;
}

/* Blog: reading meta + share + TOC */
.blog-meta-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 1rem;
  font-size: 0.875rem;
  color: rgba(15, 23, 42, 0.65);
  margin-bottom: 1rem;
}

body[data-theme="dark"] .blog-meta-row {
  color: rgba(229, 231, 235, 0.7);
}

.blog-meta-row .meta-item {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
}

.share-buttons {
  display: inline-flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.share-buttons .share-btn {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid rgba(15, 23, 42, 0.12);
  color: #1f2937;
  background: #fff;
  text-decoration: none;
  transition: transform 0.15s ease, color 0.15s ease, background 0.15s ease, border-color 0.15s ease;
  cursor: pointer;
}

.share-buttons .share-btn:hover {
  transform: translateY(-2px);
}

.share-buttons .share-btn[data-share="whatsapp"]:hover { background: #25d366; color: #fff; border-color: #25d366; }
.share-buttons .share-btn[data-share="x"]:hover        { background: #000;     color: #fff; border-color: #000; }
.share-buttons .share-btn[data-share="telegram"]:hover { background: #229ed9; color: #fff; border-color: #229ed9; }
.share-buttons .share-btn[data-share="linkedin"]:hover { background: #0a66c2; color: #fff; border-color: #0a66c2; }
.share-buttons .share-btn[data-share="facebook"]:hover { background: #1877f2; color: #fff; border-color: #1877f2; }
.share-buttons .share-btn[data-share="copy"]:hover     { background: #f59e0b; color: #fff; border-color: #f59e0b; }

body[data-theme="dark"] .share-buttons .share-btn {
  background: rgba(255,255,255,0.06);
  border-color: rgba(255,255,255,0.15);
  color: #e5e7eb;
}

.blog-toc {
  background: rgba(37, 99, 235, 0.04);
  border: 1px solid rgba(37, 99, 235, 0.15);
  border-radius: 0.75rem;
  padding: 1rem 1.25rem;
  margin: 1.5rem 0;
}

.blog-toc__title {
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  font-size: 0.75rem;
  color: var(--brand-primary, #2563eb);
  margin-bottom: 0.5rem;
}

.blog-toc ol {
  list-style: decimal;
  padding-left: 1.25rem;
  margin: 0;
  counter-reset: toc;
}

.blog-toc ol li { margin-bottom: 0.25rem; }

.blog-toc a {
  color: inherit;
  text-decoration: none;
  border-bottom: 1px solid transparent;
  transition: color 0.15s ease, border-color 0.15s ease;
}

.blog-toc a:hover,
.blog-toc a.active {
  color: var(--brand-primary, #2563eb);
  border-bottom-color: currentColor;
}

.blog-toc__sub {
  list-style: disc;
  padding-left: 1.25rem;
  margin-top: 0.25rem;
  font-size: 0.9rem;
  opacity: 0.85;
}

body[data-theme="dark"] .blog-toc {
  background: rgba(124, 92, 255, 0.08);
  border-color: rgba(124, 92, 255, 0.25);
}

/* Tag pill in admin form */
.tag-pill { transition: background 0.15s ease, border-color 0.15s ease; }
.tag-pill:hover { background: rgba(99, 102, 241, 0.08); }
.tag-pill--active { background: rgba(99, 102, 241, 0.12); border-color: #6366f1 !important; }

/* Comment items */
.comment-item { background: #fff; }
body[data-theme="dark"] .comment-item {
  background: rgba(255,255,255,0.04);
  border-color: rgba(255,255,255,0.08) !important;
  color: #e5e7eb;
}

/* Scroll-reveal animations (driven by IntersectionObserver) */
[data-animate] {
  opacity: 0;
  transition: opacity 0.7s cubic-bezier(0.22, 1, 0.36, 1), transform 0.7s cubic-bezier(0.22, 1, 0.36, 1);
  will-change: transform, opacity;
}
[data-animate="fade-up"]    { transform: translateY(28px); }
[data-animate="fade-down"]  { transform: translateY(-28px); }
[data-animate="fade-left"]  { transform: translateX(-32px); }
[data-animate="fade-right"] { transform: translateX(32px); }
[data-animate="zoom-in"]    { transform: scale(0.92); }

[data-animate].is-visible {
  opacity: 1;
  transform: none;
}

@media (prefers-reduced-motion: reduce) {
  [data-animate] { opacity: 1 !important; transform: none !important; transition: none !important; }
}

/* Image lightbox */
.lightbox-overlay {
  position: fixed;
  inset: 0;
  background: rgba(2, 6, 23, 0.92);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 1090;
  padding: 1rem;
  cursor: zoom-out;
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  opacity: 0;
  transition: opacity 0.25s ease;
}

.lightbox-overlay.is-active {
  display: flex;
  opacity: 1;
}

.lightbox-overlay img {
  max-width: min(92vw, 1200px);
  max-height: 90vh;
  object-fit: contain;
  border-radius: 0.5rem;
  box-shadow: 0 30px 80px rgba(0,0,0,0.6);
  cursor: default;
}

.lightbox-close {
  position: absolute;
  top: 1rem;
  right: 1rem;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: rgba(255,255,255,0.12);
  color: #fff;
  border: 1px solid rgba(255,255,255,0.2);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  font-size: 1.2rem;
}

.lightbox-close:hover { background: rgba(255,255,255,0.2); }

.blog-content img {
  cursor: zoom-in;
  border-radius: 0.5rem;
  transition: transform 0.2s ease;
}

.blog-content img:hover {
  transform: scale(1.01);
}

/* === Testimonials carousel === */
.testimonials-section .custom-section-card {
  padding-bottom: 3rem;
}

.testimonial-carousel {
  position: relative;
  max-width: 980px;
  margin: 0 auto;
}

.testimonial-track {
  display: flex;
  gap: 1.5rem;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  scroll-behavior: smooth;
  padding: 1rem 0.25rem 1.5rem;
  scrollbar-width: none;
}

.testimonial-track::-webkit-scrollbar { display: none; }

.testimonial-card {
  flex: 0 0 100%;
  scroll-snap-align: center;
  background: #ffffff;
  border-radius: 1.25rem;
  padding: 2rem 2rem 1.75rem;
  box-shadow: 0 18px 40px rgba(15, 23, 42, 0.08);
  border: 1px solid rgba(148, 163, 184, 0.18);
  display: flex;
  flex-direction: column;
  gap: 1rem;
  position: relative;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

@media (min-width: 768px) {
  .testimonial-card { flex-basis: calc(50% - 0.75rem); }
}

@media (min-width: 1100px) {
  .testimonial-card { flex-basis: calc(33.3333% - 1rem); }
}

body[data-theme="dark"] .testimonial-card {
  background: #0f172a;
  border-color: rgba(148, 163, 184, 0.25);
  color: #e5e7eb;
}

.testimonial-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 24px 60px rgba(15, 23, 42, 0.14);
}

.testimonial-quote-icon {
  color: var(--brand-primary);
  font-size: 1.5rem;
  margin-right: 0.5rem;
  opacity: 0.6;
}

.testimonial-rating {
  color: #cbd5e1;
  font-size: 0.95rem;
  letter-spacing: 0.18rem;
}

.testimonial-rating .is-on { color: #f59e0b; }

.testimonial-message {
  margin: 0;
  flex: 1;
  font-size: 1rem;
  line-height: 1.7;
  color: inherit;
}

.testimonial-person {
  display: flex;
  align-items: center;
  gap: 0.85rem;
  border-top: 1px dashed rgba(148, 163, 184, 0.4);
  padding-top: 1rem;
}

.testimonial-person img,
.testimonial-avatar-placeholder {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  object-fit: cover;
  background: linear-gradient(135deg, #2563eb, #f59e0b);
  color: #fff;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  flex-shrink: 0;
}

.testimonial-person strong { display: block; font-size: 0.95rem; }
.testimonial-person small { display: block; color: #64748b; font-size: 0.8rem; }
body[data-theme="dark"] .testimonial-person small { color: #94a3b8; }

.testimonial-nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 42px;
  height: 42px;
  border-radius: 50%;
  border: 0;
  background: var(--brand-primary);
  color: #fff;
  box-shadow: 0 8px 24px rgba(37, 99, 235, 0.35);
  cursor: pointer;
  z-index: 2;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: background 0.2s ease, transform 0.2s ease;
}

.testimonial-nav:hover { background: var(--brand-primary-dark); transform: translateY(-50%) scale(1.05); }
.testimonial-prev { left: -8px; }
.testimonial-next { right: -8px; }

@media (max-width: 575px) {
  .testimonial-prev { left: -4px; }
  .testimonial-next { right: -4px; }
}

.testimonial-dots {
  display: flex;
  justify-content: center;
  gap: 0.4rem;
  margin-top: 0.5rem;
}

.testimonial-dots button {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  border: 0;
  background: rgba(148, 163, 184, 0.5);
  cursor: pointer;
  padding: 0;
  transition: background 0.2s ease, transform 0.2s ease;
}

.testimonial-dots button.is-active {
  background: var(--brand-primary);
  transform: scale(1.2);
}

/* === FAQ accordion === */
.faq-section {
  background: linear-gradient(135deg, #1e293b 0%, #0f172a 100%);
}

.faq-accordion {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.faq-item {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 0.85rem;
  overflow: hidden;
  backdrop-filter: blur(4px);
  transition: border-color 0.25s ease, background 0.25s ease;
}

.faq-item:hover { border-color: rgba(245, 158, 11, 0.4); }

.faq-question {
  width: 100%;
  background: transparent;
  color: #f8fafc;
  border: 0;
  padding: 1.1rem 1.25rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  cursor: pointer;
  font-size: 1.02rem;
  font-weight: 600;
  text-align: left;
  transition: background 0.2s ease;
}

.faq-question:hover { background: rgba(255, 255, 255, 0.04); }
.faq-question.is-open { background: rgba(37, 99, 235, 0.18); }

.faq-question-text { flex: 1; display: flex; gap: 0.6rem; align-items: center; flex-wrap: wrap; }

.faq-tag {
  display: inline-block;
  background: rgba(245, 158, 11, 0.18);
  color: #fbbf24;
  font-size: 0.7rem;
  padding: 0.18rem 0.55rem;
  border-radius: 999px;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  font-weight: 700;
}

.faq-icon {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.08);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: transform 0.3s ease, background 0.2s ease;
  flex-shrink: 0;
}

.faq-question.is-open .faq-icon {
  transform: rotate(45deg);
  background: var(--brand-primary);
}

.faq-answer {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.4s ease;
}

.faq-answer.is-open {
  max-height: 800px;
}

.faq-answer-inner {
  padding: 0.25rem 1.25rem 1.25rem;
  color: rgba(241, 245, 249, 0.85);
  line-height: 1.75;
}

/* === Newsletter form === */
.newsletter-box {
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 1rem;
  padding: 1.25rem 1.4rem;
  color: #f8fafc;
  text-align: left;
}

.newsletter-headline {
  display: flex;
  align-items: center;
  gap: 0.85rem;
  margin-bottom: 0.85rem;
}

.newsletter-icon {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--brand-primary), var(--brand-accent));
  color: #fff;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 1.05rem;
  flex-shrink: 0;
}

.newsletter-title { color: #fff; font-weight: 700; }
.newsletter-subtitle { color: rgba(255, 255, 255, 0.7); font-size: 0.85rem; }

.newsletter-input-group {
  display: flex;
  gap: 0.5rem;
}

.newsletter-input-group .form-control {
  border-radius: 0.5rem;
  flex: 1;
  background: rgba(255, 255, 255, 0.95);
  border: 0;
}

.newsletter-btn {
  white-space: nowrap;
  border-radius: 0.5rem;
  padding: 0.6rem 1.1rem;
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
}

.newsletter-disclaimer {
  display: block;
  margin-top: 0.5rem;
  color: rgba(255, 255, 255, 0.55);
  font-size: 0.75rem;
}

.newsletter-alert {
  border-radius: 0.5rem;
  padding: 0.55rem 0.85rem;
  font-size: 0.85rem;
  margin-bottom: 0.6rem;
}

.newsletter-alert-success { background: rgba(34, 197, 94, 0.15); color: #bbf7d0; border: 1px solid rgba(34, 197, 94, 0.35); }
.newsletter-alert-error { background: rgba(239, 68, 68, 0.15); color: #fecaca; border: 1px solid rgba(239, 68, 68, 0.35); }

@media (max-width: 575px) {
  .newsletter-input-group { flex-direction: column; }
  .newsletter-btn { width: 100%; justify-content: center; }
}

.newsletter-status-card {
  background: #fff;
  border-radius: 1rem;
  padding: 2.5rem 2rem;
  box-shadow: 0 18px 40px rgba(15, 23, 42, 0.08);
}

body[data-theme="dark"] .newsletter-status-card {
  background: #0f172a;
  color: #e5e7eb;
}

/* === Global search overlay === */
.nav-search-trigger {
  background: transparent !important;
  border: 0 !important;
  font-size: 1.05rem;
}

.global-search-overlay {
  position: fixed;
  inset: 0;
  z-index: 1100;
  display: none;
  align-items: flex-start;
  justify-content: center;
  padding: 6vh 1rem 1rem;
  opacity: 0;
  transition: opacity 0.2s ease;
}

.global-search-overlay.is-open {
  display: flex;
  opacity: 1;
}

.global-search-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(2, 6, 23, 0.78);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  cursor: pointer;
}

.global-search-modal {
  position: relative;
  width: min(720px, 100%);
  background: #ffffff;
  border-radius: 1rem;
  box-shadow: 0 30px 80px rgba(2, 6, 23, 0.45);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  max-height: 80vh;
  animation: globalSearchIn 0.18s ease both;
}

@keyframes globalSearchIn {
  from { transform: translateY(-20px); opacity: 0; }
  to { transform: none; opacity: 1; }
}

body[data-theme="dark"] .global-search-modal {
  background: #0f172a;
  color: #f1f5f9;
}

.global-search-form {
  display: flex;
  align-items: center;
  padding: 0.85rem 1rem;
  border-bottom: 1px solid rgba(148, 163, 184, 0.25);
  gap: 0.6rem;
}

.global-search-icon {
  color: #94a3b8;
  font-size: 1.1rem;
}

.global-search-input {
  flex: 1;
  border: 0;
  outline: none !important;
  background: transparent;
  font-size: 1.05rem;
  padding: 0.4rem 0;
  color: inherit;
}

.global-search-input::placeholder { color: #94a3b8; }

.global-search-close {
  background: rgba(148, 163, 184, 0.18);
  border: 0;
  color: #475569;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: background 0.15s ease;
}

.global-search-close:hover { background: rgba(148, 163, 184, 0.35); }

body[data-theme="dark"] .global-search-close {
  background: rgba(148, 163, 184, 0.18);
  color: #e2e8f0;
}

.global-search-hint, .global-search-loading, .global-search-empty {
  padding: 1.2rem 1.25rem;
  text-align: center;
}

.global-search-loading,
.global-search-empty {
  display: none;
}

.global-search-loading.is-active,
.global-search-empty.is-active {
  display: block;
}

.global-search-spinner {
  width: 28px;
  height: 28px;
  margin: 0 auto;
  border: 3px solid rgba(148, 163, 184, 0.3);
  border-top-color: var(--brand-primary);
  border-radius: 50%;
  animation: gsSpin 0.8s linear infinite;
}

@keyframes gsSpin {
  to { transform: rotate(360deg); }
}

.global-search-empty i {
  font-size: 2rem;
  color: #cbd5e1;
  margin-bottom: 0.5rem;
  display: block;
}

.global-search-results {
  overflow-y: auto;
  flex: 1;
  padding: 0.25rem 0;
}

.global-search-results.has-results { padding: 0.5rem 0; }

.global-search-group-label {
  text-transform: uppercase;
  font-size: 0.7rem;
  letter-spacing: 0.08em;
  color: #94a3b8;
  padding: 0.6rem 1.25rem 0.3rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-weight: 700;
}

.global-search-result {
  display: flex;
  align-items: center;
  gap: 0.85rem;
  padding: 0.7rem 1.25rem;
  text-decoration: none;
  color: inherit;
  border-left: 3px solid transparent;
  transition: background 0.12s ease, border-color 0.12s ease;
  cursor: pointer;
}

.global-search-result:hover,
.global-search-result.is-active {
  background: rgba(37, 99, 235, 0.08);
  border-left-color: var(--brand-primary);
  color: inherit;
}

body[data-theme="dark"] .global-search-result:hover,
body[data-theme="dark"] .global-search-result.is-active {
  background: rgba(37, 99, 235, 0.18);
}

.global-search-thumb {
  width: 44px;
  height: 44px;
  flex-shrink: 0;
  border-radius: 0.5rem;
  background: rgba(37, 99, 235, 0.12);
  color: var(--brand-primary);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  font-size: 1rem;
}

.global-search-thumb img { width: 100%; height: 100%; object-fit: cover; }

.global-search-text { flex: 1; min-width: 0; }
.global-search-text strong { display: block; font-weight: 600; font-size: 0.95rem; }
.global-search-text small { display: block; color: #64748b; font-size: 0.8rem; }
body[data-theme="dark"] .global-search-text small { color: #94a3b8; }

.global-search-meta { color: #94a3b8; font-size: 0.75rem; flex-shrink: 0; padding-left: 0.5rem; }

.global-search-see-all {
  display: block;
  text-align: center;
  padding: 0.85rem 1rem;
  border-top: 1px solid rgba(148, 163, 184, 0.2);
  background: rgba(37, 99, 235, 0.04);
  color: var(--brand-primary);
  text-decoration: none;
  font-weight: 600;
  font-size: 0.9rem;
}

.global-search-see-all:hover { background: rgba(37, 99, 235, 0.1); color: var(--brand-primary-dark); }

.global-search-footer {
  display: flex;
  gap: 1.25rem;
  padding: 0.6rem 1.25rem;
  border-top: 1px solid rgba(148, 163, 184, 0.2);
  font-size: 0.72rem;
  color: #94a3b8;
  background: rgba(248, 250, 252, 0.6);
}

body[data-theme="dark"] .global-search-footer {
  background: rgba(15, 23, 42, 0.6);
}

.global-search-footer kbd {
  background: rgba(148, 163, 184, 0.25);
  color: inherit;
  padding: 0.05rem 0.4rem;
  border-radius: 0.25rem;
  font-size: 0.7rem;
  margin-right: 0.2rem;
}

@media (max-width: 575px) {
  .global-search-overlay { padding-top: 0; }
  .global-search-modal { border-radius: 0; max-height: 100vh; height: 100vh; }
  .global-search-footer { display: none; }
}

/* === Search results page === */
.search-result-card {
  display: flex;
  gap: 0.85rem;
  padding: 0.75rem;
  border: 1px solid rgba(148, 163, 184, 0.25);
  border-radius: 0.65rem;
  text-decoration: none;
  color: inherit;
  background: #fff;
  transition: transform 0.15s ease, box-shadow 0.15s ease, border-color 0.15s ease;
  height: 100%;
}

body[data-theme="dark"] .search-result-card { background: #0f172a; }

.search-result-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 18px rgba(15, 23, 42, 0.08);
  border-color: var(--brand-primary);
  color: inherit;
}

.search-result-card img,
.search-result-placeholder {
  width: 90px;
  height: 90px;
  flex-shrink: 0;
  border-radius: 0.5rem;
  object-fit: cover;
  background: rgba(37, 99, 235, 0.12);
  color: var(--brand-primary);
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.search-result-body { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 0.2rem; }
.search-result-body h6 { margin: 0; font-weight: 600; }

/* === PWA install button === */
.pwa-install-btn {
  position: fixed;
  left: 1.25rem;
  bottom: 1.25rem;
  z-index: 1080;
  background: linear-gradient(135deg, var(--brand-primary), var(--brand-primary-dark));
  color: #fff;
  border: 0;
  border-radius: 999px;
  padding: 0.65rem 1.1rem;
  display: none;
  align-items: center;
  gap: 0.5rem;
  font-weight: 600;
  font-size: 0.9rem;
  box-shadow: 0 14px 30px rgba(37, 99, 235, 0.35);
  cursor: pointer;
  animation: pwaPopIn 0.3s ease both;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.pwa-install-btn.is-visible { display: inline-flex; }
.pwa-install-btn:hover { transform: translateY(-2px); box-shadow: 0 18px 36px rgba(37, 99, 235, 0.4); }

@keyframes pwaPopIn {
  from { opacity: 0; transform: translateY(20px); }
  to { opacity: 1; transform: none; }
}

@media (max-width: 575px) {
  .pwa-install-btn span { display: none; }
  .pwa-install-btn { padding: 0.7rem 0.85rem; }
}

/* === GitHub widget === */
.github-section .custom-section-card { padding-bottom: 3rem; }

.github-profile-card {
  display: flex;
  flex-wrap: wrap;
  gap: 1.5rem;
  align-items: center;
  justify-content: space-between;
  background: linear-gradient(135deg, #0d1117 0%, #161b22 100%);
  border-radius: 1rem;
  padding: 1.5rem 1.75rem;
  color: #f0f6fc;
  margin-bottom: 1.5rem;
  box-shadow: 0 12px 30px rgba(13, 17, 23, 0.3);
}

.github-profile-link {
  display: flex;
  gap: 1rem;
  align-items: center;
  flex: 1 1 320px;
  text-decoration: none;
  color: inherit;
  min-width: 0;
}

.github-avatar {
  width: 72px;
  height: 72px;
  border-radius: 50%;
  border: 3px solid rgba(255,255,255,0.15);
  flex-shrink: 0;
  object-fit: cover;
}

.github-profile-info { min-width: 0; }
.github-name { display: block; font-size: 1.05rem; }
.github-handle { color: #8b949e; }
.github-bio { margin: 0.4rem 0 0; color: #c9d1d9; font-size: 0.85rem; line-height: 1.55; }

.github-stats {
  display: flex;
  gap: 1.25rem;
  flex-wrap: wrap;
}

.github-stats > div {
  text-align: center;
}

.github-stats strong { display: block; font-size: 1.25rem; color: #fff; }
.github-stats small { display: block; color: #8b949e; font-size: 0.7rem; text-transform: uppercase; letter-spacing: 0.06em; }

.github-repo-card {
  display: flex;
  flex-direction: column;
  height: 100%;
  background: #ffffff;
  border: 1px solid rgba(148, 163, 184, 0.25);
  border-radius: 0.75rem;
  padding: 1rem 1.1rem;
  text-decoration: none;
  color: inherit;
  transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
}

.github-repo-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 14px 32px rgba(15, 23, 42, 0.1);
  border-color: var(--brand-primary);
  color: inherit;
}

body[data-theme="dark"] .github-repo-card {
  background: #0f172a;
  border-color: rgba(148, 163, 184, 0.25);
  color: #e5e7eb;
}

.github-repo-head {
  font-size: 0.95rem;
  color: var(--brand-primary);
  margin-bottom: 0.35rem;
}

.github-repo-head strong { color: var(--brand-primary); }

.github-repo-desc {
  margin: 0;
  font-size: 0.85rem;
  color: #475569;
  line-height: 1.55;
  flex: 1;
}

body[data-theme="dark"] .github-repo-desc { color: #cbd5e1; }

.github-repo-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.85rem;
  font-size: 0.78rem;
  color: #64748b;
  margin-top: 0.65rem;
  align-items: center;
}

body[data-theme="dark"] .github-repo-meta { color: #94a3b8; }

.github-lang {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  font-weight: 600;
}

.github-lang-dot {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: var(--brand-primary);
  display: inline-block;
}

.github-repo-topics {
  display: flex;
  flex-wrap: wrap;
  gap: 0.3rem;
  margin-top: 0.55rem;
}

.github-repo-topics span {
  background: rgba(37, 99, 235, 0.12);
  color: var(--brand-primary);
  font-size: 0.7rem;
  padding: 0.12rem 0.5rem;
  border-radius: 999px;
}

/* === Spotify Now Playing widget ===
 * Placed at bottom-LEFT to leave bottom-right free for the WhatsApp button
 * and the floating reCAPTCHA badge.
 */
.spotify-widget {
  position: fixed;
  left: 1.25rem;
  bottom: 1.25rem;
  z-index: 1075;
  width: 280px;
  max-width: calc(100vw - 2rem);
  background: linear-gradient(135deg, #0f172a 0%, #1e293b 100%);
  color: #f1f5f9;
  border-radius: 0.85rem;
  box-shadow: 0 18px 45px rgba(2, 6, 23, 0.45);
  padding: 0.7rem 0.85rem;
  display: flex;
  align-items: center;
  gap: 0.7rem;
  border: 1px solid rgba(34, 197, 94, 0.25);
  animation: spotifyIn 0.35s ease both;
  transition: opacity 0.25s ease, transform 0.25s ease;
}

@keyframes spotifyIn {
  from { opacity: 0; transform: translateY(20px); }
  to { opacity: 1; transform: none; }
}

.spotify-widget.is-hidden {
  opacity: 0;
  pointer-events: none;
  transform: translateY(20px);
}

.spotify-widget-link {
  display: flex;
  align-items: center;
  gap: 0.7rem;
  flex: 1;
  min-width: 0;
  text-decoration: none;
  color: inherit;
}

.spotify-widget-link:hover { color: inherit; }

.spotify-widget-art {
  width: 52px;
  height: 52px;
  border-radius: 0.5rem;
  flex-shrink: 0;
  background-color: rgba(34, 197, 94, 0.15);
  background-size: cover;
  background-position: center;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: #22c55e;
  font-size: 1.3rem;
  position: relative;
  overflow: hidden;
}

.spotify-widget-art.has-image i { display: none; }

.spotify-widget-art::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, transparent 50%, rgba(34, 197, 94, 0.3) 100%);
  opacity: 0;
  transition: opacity 0.2s ease;
}

.spotify-widget.is-playing .spotify-widget-art::after { opacity: 1; }

.spotify-widget-body {
  min-width: 0;
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 0.05rem;
}

.spotify-widget-status {
  font-size: 0.68rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: #22c55e;
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  font-weight: 700;
}

.spotify-widget-title {
  font-size: 0.92rem;
  color: #fff;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  display: block;
}

.spotify-widget-artist {
  font-size: 0.78rem;
  color: #cbd5e1;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  display: block;
}

.spotify-widget-progress {
  margin-top: 0.4rem;
  background: rgba(255,255,255,0.1);
  height: 3px;
  border-radius: 999px;
  overflow: hidden;
}

.spotify-widget-progress span {
  display: block;
  height: 100%;
  background: linear-gradient(90deg, #22c55e, #16a34a);
  width: 0;
  transition: width 0.4s linear;
}

.spotify-widget-close {
  position: absolute;
  top: 4px;
  right: 4px;
  background: transparent;
  border: 0;
  color: rgba(255,255,255,0.5);
  width: 22px;
  height: 22px;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  font-size: 0.75rem;
  transition: background 0.15s ease, color 0.15s ease;
}

.spotify-widget-close:hover { background: rgba(255,255,255,0.12); color: #fff; }

/* Equalizer animation */
.spotify-equalizer {
  display: inline-flex;
  align-items: flex-end;
  gap: 2px;
  height: 12px;
  width: 14px;
}

.spotify-equalizer span {
  width: 3px;
  background: #22c55e;
  border-radius: 1px;
  height: 30%;
}

.spotify-widget.is-playing .spotify-equalizer span:nth-child(1) { animation: spotifyEq 0.9s ease-in-out infinite; }
.spotify-widget.is-playing .spotify-equalizer span:nth-child(2) { animation: spotifyEq 1.1s ease-in-out infinite 0.15s; }
.spotify-widget.is-playing .spotify-equalizer span:nth-child(3) { animation: spotifyEq 0.7s ease-in-out infinite 0.3s; }

@keyframes spotifyEq {
  0%, 100% { height: 30%; }
  50% { height: 100%; }
}

@media (max-width: 575px) {
  .spotify-widget {
    left: 0.75rem;
    right: 0.75rem;
    bottom: 5rem; /* clear of bottom-right WhatsApp button */
    width: auto;
    max-width: none;
  }
}

/* Avoid overlap with floating WhatsApp / install buttons on mobile */
@media (max-width: 575px) {
  .pwa-install-btn { bottom: 5rem; }
}

/* === Google reCAPTCHA badge ===
 * Default position is bottom-right which collides with the WhatsApp button.
 * Pinned to bottom-LEFT and lifted above the Spotify widget when present.
 */
.grecaptcha-badge {
  left: 14px !important;
  right: auto !important;
  bottom: 110px !important; /* sits above the Spotify pill (~80px tall + 20px from edge) */
  box-shadow: 0 8px 24px rgba(2, 6, 23, 0.18) !important;
}

@media (max-width: 575px) {
  .grecaptcha-badge {
    left: 12px !important;
    bottom: 13.5rem !important; /* above the full-width Spotify pill on mobile */
  }
}


/* ===== Mobile Nav Panel ===== */
.mobile-nav-overlay {
    position: fixed;
    inset: 0;
    z-index: 1080;
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(4px);
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.25s, visibility 0.25s;
}
.mobile-nav-overlay.is-open {
    opacity: 1;
    visibility: visible;
}
.mobile-nav-panel {
    position: absolute;
    top: 0;
    right: 0;
    width: min(320px, 85vw);
    height: 100%;
    background: #0f172a;
    color: #f1f5f9;
    display: flex;
    flex-direction: column;
    transform: translateX(100%);
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    overflow-y: auto;
}
.mobile-nav-overlay.is-open .mobile-nav-panel {
    transform: translateX(0);
}
.mobile-nav-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px 20px;
    border-bottom: 1px solid rgba(255,255,255,0.1);
}
.mobile-nav-close {
    background: none;
    border: none;
    color: #f1f5f9;
    font-size: 1.3rem;
    cursor: pointer;
    padding: 4px 8px;
    border-radius: 6px;
}
.mobile-nav-close:hover { background: rgba(255,255,255,0.1); }
.mobile-nav-body {
    flex: 1;
    padding: 12px 16px;
    overflow-y: auto;
}
.mobile-nav-link {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 11px 14px;
    color: rgba(241, 245, 249, 0.85);
    text-decoration: none;
    border-radius: 8px;
    font-size: 0.88rem;
    font-weight: 500;
    transition: background 0.15s, color 0.15s;
}
.mobile-nav-link:hover, .mobile-nav-link:focus {
    background: rgba(37, 99, 235, 0.15);
    color: #fff;
}
.mobile-nav-link i { opacity: 0.6; width: 20px; text-align: center; }
.mobile-nav-divider {
    height: 1px;
    background: rgba(255,255,255,0.08);
    margin: 8px 0;
}
.mobile-nav-section {
    display: block;
    font-size: 0.68rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: rgba(148, 163, 184, 0.7);
    padding: 8px 14px 4px;
}
.mobile-nav-footer {
    padding: 8px 0 16px;
}
@media (min-width: 992px) {
    .mobile-nav-overlay { display: none !important; }
    #mobileNavToggle { display: none !important; }
}
