/* === Modern UI Additions for Performalytic === */

/* Scroll Reveal */
.reveal {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 0.6s cubic-bezier(0.16, 1, 0.3, 1), transform 0.6s cubic-bezier(0.16, 1, 0.3, 1);
}
.reveal.revealed {
  opacity: 1;
  transform: translateY(0);
}
.reveal-left {
  opacity: 0;
  transform: translateX(-30px);
  transition: opacity 0.6s cubic-bezier(0.16, 1, 0.3, 1), transform 0.6s cubic-bezier(0.16, 1, 0.3, 1);
}
.reveal-left.revealed {
  opacity: 1;
  transform: translateX(0);
}
.reveal-right {
  opacity: 0;
  transform: translateX(30px);
  transition: opacity 0.6s cubic-bezier(0.16, 1, 0.3, 1), transform 0.6s cubic-bezier(0.16, 1, 0.3, 1);
}
.reveal-right.revealed {
  opacity: 1;
  transform: translateX(0);
}
.reveal-scale {
  opacity: 0;
  transform: scale(0.92);
  transition: opacity 0.5s cubic-bezier(0.16, 1, 0.3, 1), transform 0.5s cubic-bezier(0.16, 1, 0.3, 1);
}
.reveal-scale.revealed {
  opacity: 1;
  transform: scale(1);
}

/* Back to Top */
.back-to-top {
  position: fixed;
  bottom: 30px;
  right: 30px;
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: linear-gradient(135deg, #2563eb, #7c3aed);
  color: #fff;
  border: none;
  cursor: pointer;
  font-size: 1.2rem;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  visibility: hidden;
  transform: translateY(20px) scale(0.8);
  transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
  box-shadow: 0 4px 16px rgba(37, 99, 235, 0.3);
  z-index: 999;
  pointer-events: none;
}
.back-to-top.visible {
  opacity: 1;
  visibility: visible;
  transform: translateY(0) scale(1);
  pointer-events: auto;
}
.back-to-top:hover {
  transform: translateY(-3px) scale(1.05);
  box-shadow: 0 8px 24px rgba(37, 99, 235, 0.45);
}

/* Gradient Text */
.gradient-text {
  background: linear-gradient(135deg, #60a5fa, #a78bfa);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

/* Shimmer Hover Effect on Cards */
.service-card::after,
.solution-card::after,
.tech-item::after,
.vendor-card::after {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,0.15), transparent);
  transition: left 0.6s;
  pointer-events: none;
}
.service-card:hover::after,
.solution-card:hover::after,
.tech-item:hover::after,
.vendor-card:hover::after {
  left: 100%;
}
.service-card,
.solution-card,
.tech-item,
.vendor-card {
  position: relative;
  overflow: hidden;
}

/* Page Load Animation */
@keyframes fadeInUp {
  from { opacity: 0; transform: translateY(20px); }
  to { opacity: 1; transform: translateY(0); }
}
.hero-content {
  animation: fadeInUp 0.8s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}
.hero-stats {
  animation: fadeInUp 0.8s cubic-bezier(0.16, 1, 0.3, 1) 0.2s forwards;
  opacity: 0;
}

/* Smooth image loading */
img {
  transition: opacity 0.3s;
}
img[loading="lazy"] {
  opacity: 0;
}
img[loading="lazy"].loaded,
img[loading="lazy"]:not([src]) {
  opacity: 1;
}

/* Better focus styles */
:focus-visible {
  outline: 2px solid #60a5fa;
  outline-offset: 2px;
  border-radius: 4px;
}

/* Smooth section transitions */
section {
  transition: background 0.3s;
}

/* Glow pulse for hero badge */
.hero-badge {
  animation: badgePulse 3s ease-in-out infinite;
}
@keyframes badgePulse {
  0%, 100% { box-shadow: 0 0 0 0 rgba(37, 99, 235, 0.2); }
  50% { box-shadow: 0 0 0 8px rgba(37, 99, 235, 0); }
}

/* Counter animation styling */
.counter-value {
  display: inline-block;
}

/* Blog specific styles */
.blog-hero {
  padding: 160px 0 80px;
  background: linear-gradient(135deg, #0f172a 0%, #1e293b 50%, #0f172a 100%);
  color: #fff;
  position: relative;
  overflow: hidden;
}
.blog-hero::before {
  content: '';
  position: absolute;
  top: -50%;
  right: -10%;
  width: 700px;
  height: 700px;
  background: radial-gradient(circle, rgba(37,99,235,0.12) 0%, transparent 70%);
  pointer-events: none;
}
.blog-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(340px, 1fr));
  gap: 32px;
  margin-top: 48px;
}
.blog-card {
  background: #fff;
  border-radius: 16px;
  border: 1px solid #e2e8f0;
  overflow: hidden;
  transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
  display: flex;
  flex-direction: column;
}
.blog-card:hover {
  transform: translateY(-8px);
  box-shadow: 0 24px 60px rgba(0,0,0,0.08);
  border-color: #2563eb;
}
.blog-card-image {
  width: 100%;
  height: 200px;
  object-fit: cover;
  display: block;
  transition: transform 0.5s;
}
.blog-card:hover .blog-card-image {
  transform: scale(1.05);
}
.blog-card-body {
  padding: 28px;
  flex: 1;
  display: flex;
  flex-direction: column;
}
.blog-card-category {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: rgba(37,99,235,0.08);
  padding: 4px 12px;
  border-radius: 100px;
  font-size: 0.75rem;
  font-weight: 600;
  color: #2563eb;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 12px;
  align-self: flex-start;
}
.blog-card h3 {
  font-size: 1.15rem;
  font-weight: 700;
  color: #0f172a;
  margin-bottom: 10px;
  line-height: 1.4;
}
.blog-card h3 a {
  text-decoration: none;
  color: inherit;
  transition: color 0.2s;
}
.blog-card h3 a:hover {
  color: #2563eb;
}
.blog-card p {
  font-size: 0.9rem;
  color: #475569;
  line-height: 1.7;
  margin-bottom: 16px;
  flex: 1;
}
.blog-card-meta {
  display: flex;
  align-items: center;
  gap: 16px;
  font-size: 0.8rem;
  color: #94a3b8;
  padding-top: 16px;
  border-top: 1px solid #f1f5f9;
}
.blog-card-meta span {
  display: flex;
  align-items: center;
  gap: 4px;
}

/* Blog post page */
.post-content {
  max-width: 800px;
  margin: 0 auto;
}
.post-content h2 {
  font-size: 1.6rem;
  font-weight: 700;
  color: #0f172a;
  margin: 40px 0 16px;
}
.post-content h3 {
  font-size: 1.25rem;
  font-weight: 700;
  color: #0f172a;
  margin: 32px 0 12px;
}
.post-content p {
  font-size: 1.05rem;
  color: #475569;
  line-height: 1.8;
  margin-bottom: 20px;
}
.post-content ul,
.post-content ol {
  margin-bottom: 20px;
  padding-left: 24px;
}
.post-content li {
  font-size: 1.05rem;
  color: #475569;
  line-height: 1.8;
  margin-bottom: 8px;
}
.post-content blockquote {
  border-left: 4px solid #2563eb;
  padding: 16px 24px;
  margin: 24px 0;
  background: #f8fafc;
  border-radius: 0 12px 12px 0;
  font-style: italic;
  color: #475569;
}
.post-hero {
  padding: 160px 0 60px;
  background: linear-gradient(135deg, #0f172a 0%, #1e293b 50%, #0f172a 100%);
  color: #fff;
  position: relative;
  overflow: hidden;
}
.post-hero::before {
  content: '';
  position: absolute;
  top: -50%;
  right: -10%;
  width: 700px;
  height: 700px;
  background: radial-gradient(circle, rgba(37,99,235,0.12) 0%, transparent 70%);
  pointer-events: none;
}
.post-meta {
  display: flex;
  align-items: center;
  gap: 16px;
  font-size: 0.9rem;
  color: #94a3b8;
  margin-bottom: 16px;
}
.post-meta-category {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: rgba(37,99,235,0.15);
  padding: 4px 14px;
  border-radius: 100px;
  font-size: 0.8rem;
  font-weight: 600;
  color: #93c5fd;
}
.post-toc {
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  padding: 24px 28px;
  margin: 32px 0;
}
.post-toc h3 {
  font-size: 1rem;
  font-weight: 700;
  color: #0f172a;
  margin-bottom: 12px;
  margin-top: 0;
}
.post-toc ul {
  list-style: none;
  padding: 0;
  margin: 0;
}
.post-toc li {
  padding: 6px 0;
  border-bottom: 1px solid #f1f5f9;
  margin: 0;
}
.post-toc li:last-child {
  border-bottom: none;
}
.post-toc a {
  color: #2563eb;
  text-decoration: none;
  font-size: 0.9rem;
  font-weight: 500;
}
.post-toc a:hover {
  text-decoration: underline;
}
.post-footer-nav {
  display: flex;
  justify-content: space-between;
  gap: 24px;
  margin-top: 48px;
  padding-top: 32px;
  border-top: 1px solid #e2e8f0;
}
.post-footer-nav a {
  display: flex;
  flex-direction: column;
  gap: 4px;
  text-decoration: none;
  color: #0f172a;
  max-width: 50%;
}
.post-footer-nav a .nav-label {
  font-size: 0.75rem;
  font-weight: 600;
  color: #94a3b8;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}
.post-footer-nav a .nav-title {
  font-size: 0.95rem;
  font-weight: 600;
  color: #2563eb;
  transition: color 0.2s;
}
.post-footer-nav a:hover .nav-title {
  color: #1d4ed8;
}
.post-footer-nav .next {
  text-align: right;
}

/* Newsletter section */
.newsletter-box {
  background: linear-gradient(135deg, #f8fafc, #eff6ff);
  border: 1px solid #e2e8f0;
  border-radius: 16px;
  padding: 48px;
  text-align: center;
  margin-top: 48px;
}
.newsletter-box h3 {
  font-size: 1.3rem;
  font-weight: 700;
  color: #0f172a;
  margin-bottom: 8px;
}
.newsletter-box p {
  color: #475569;
  margin-bottom: 24px;
  max-width: 500px;
  margin-left: auto;
  margin-right: auto;
}
.newsletter-form {
  display: flex;
  gap: 12px;
  max-width: 480px;
  margin: 0 auto;
}
.newsletter-form input {
  flex: 1;
  padding: 12px 16px;
  border-radius: 10px;
  border: 1px solid #e2e8f0;
  font-size: 0.9rem;
  font-family: inherit;
  transition: border-color 0.2s;
}
.newsletter-form input:focus {
  outline: none;
  border-color: #2563eb;
}

/* Featured post */
.featured-post {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 40px;
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 20px;
  overflow: hidden;
  margin-top: 48px;
  transition: all 0.3s;
}
.featured-post:hover {
  box-shadow: 0 24px 60px rgba(0,0,0,0.06);
  border-color: #2563eb;
}
.featured-post-image {
  width: 100%;
  height: 100%;
  min-height: 320px;
  object-fit: cover;
  display: block;
}
.featured-post-body {
  padding: 48px 48px 48px 0;
  display: flex;
  flex-direction: column;
  justify-content: center;
}
.featured-post-body .blog-card-category {
  margin-bottom: 16px;
}
.featured-post-body h2 {
  font-size: 1.6rem;
  font-weight: 800;
  color: #0f172a;
  margin-bottom: 12px;
  line-height: 1.3;
}
.featured-post-body h2 a {
  text-decoration: none;
  color: inherit;
  transition: color 0.2s;
}
.featured-post-body h2 a:hover {
  color: #2563eb;
}
.featured-post-body p {
  font-size: 1rem;
  color: #475569;
  line-height: 1.7;
  margin-bottom: 20px;
}

/* Tag / Category filter */
.blog-filters {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  justify-content: center;
  margin-top: 32px;
}
.blog-filter {
  padding: 8px 20px;
  border-radius: 100px;
  border: 1px solid #e2e8f0;
  background: #fff;
  color: #475569;
  font-size: 0.85rem;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s;
  text-decoration: none;
}
.blog-filter:hover,
.blog-filter.active {
  background: #2563eb;
  color: #fff;
  border-color: #2563eb;
}

/* Responsive blog */
@media(max-width:768px){
  .featured-post {
    grid-template-columns: 1fr;
  }
  .featured-post-body {
    padding: 24px;
  }
  .featured-post-image {
    min-height: 200px;
    max-height: 240px;
  }
  .blog-grid {
    grid-template-columns: 1fr;
  }
  .newsletter-form {
    flex-direction: column;
  }
  .post-footer-nav {
    flex-direction: column;
  }
  .post-footer-nav a {
    max-width: 100%;
  }
  .post-footer-nav .next {
    text-align: left;
  }
}
@media(max-width:480px){
  .blog-card-image {
    height: 180px;
  }
  .blog-card-body {
    padding: 20px;
  }
  .featured-post-body {
    padding: 16px;
  }
}

/* Reduce motion */
@media(prefers-reduced-motion: reduce) {
  .reveal,
  .reveal-left,
  .reveal-right,
  .reveal-scale {
    opacity: 1;
    transform: none;
    transition: none;
  }
  .back-to-top {
    transition: none;
  }
  * {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}

/* Loading skeleton for images */
@keyframes shimmer {
  0% { background-position: -200% 0; }
  100% { background-position: 200% 0; }
}

/* Benefits table */
.cta-benefits-title {
  font-size: 1rem;
  font-weight: 700;
  color: #e2e8f0;
  margin-bottom: 16px;
  margin-top: 36px;
}
.cta-benefits-table {
  border-collapse: collapse;
  width: auto;
}
.cta-benefits-table td {
  padding: 4px 24px 4px 0;
}
.cta-benefits-table td + td {
  padding: 4px 0;
}
.cta-benefit-item {
  display: flex;
  align-items: center;
  gap: 10px;
}
.cta-benefit-item svg {
  width: 18px;
  height: 18px;
  flex-shrink: 0;
}
.cta-benefit-item span {
  color: #cbd5e1;
  font-size: 0.9rem;
}



/* Blog CTA section (dark gradient) */
.blog-cta {
  background: linear-gradient(135deg, #0f172a 0%, #1e293b 100%);
  color: #fff;
  position: relative;
  overflow: hidden;
}
.blog-cta .container {
  position: relative;
  z-index: 1;
}
.blog-cta .section-label {
  background: rgba(37,99,235,0.15);
  color: #93c5fd;
  border: 1px solid rgba(37,99,235,0.2);
}
.blog-cta .section-title {
  color: #fff;
  font-size: clamp(1.8rem, 3.5vw, 2.5rem);
  margin-bottom: 16px;
}
.blog-cta .section-subtitle {
  color: #cbd5e1;
  font-size: 1.05rem;
  max-width: 600px;
  line-height: 1.7;
  margin: 0 auto 36px;
}
.blog-cta-actions {
  display: flex;
  gap: 16px;
  justify-content: center;
  flex-wrap: wrap;
}
.blog-cta-actions .btn-secondary {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: transparent;
  color: #e2e8f0;
  padding: 14px 32px;
  border-radius: 10px;
  text-decoration: none;
  font-weight: 600;
  font-size: 0.95rem;
  border: 1px solid rgba(255,255,255,0.2);
  transition: all 0.2s;
}
.blog-cta-actions .btn-secondary:hover {
  background: rgba(255,255,255,0.05);
  border-color: rgba(255,255,255,0.3);
  transform: translateY(-2px);
}
