/* ============================================
   FRAMEWORK COMPARISON TOOL - STYLES
   ============================================ */

/* Smooth Scrolling */
html {
  scroll-behavior: smooth;
}

/* Hero Section Animations */
.comparison-hero .hero-title,
.comparison-hero .hero-subtitle,
.comparison-hero .hero-cta {
  animation: fadeInUp 0.8s ease-out forwards;
}

.comparison-hero .hero-title {
  animation-delay: 0.1s;
}

.comparison-hero .hero-subtitle {
  animation-delay: 0.3s;
}

.comparison-hero .hero-cta {
  animation-delay: 0.5s;
}

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

/* Button Hover Effects */
.btn-primary,
.btn-secondary,
.cta-btn-primary,
.cta-btn-secondary {
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  position: relative;
  overflow: hidden;
}

.btn-primary:hover,
.cta-btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.3);
}

.btn-secondary:hover,
.cta-btn-secondary:hover {
  transform: translateY(-2px);
  background: rgba(255, 255, 255, 0.1);
}

.btn-primary::before,
.cta-btn-primary::before {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  width: 0;
  height: 0;
  border-radius: 50%;
  background: rgba(0, 85, 159, 0.1);
  transform: translate(-50%, -50%);
  transition: width 0.6s ease, height 0.6s ease;
}

.btn-primary:hover::before,
.cta-btn-primary:hover::before {
  width: 300px;
  height: 300px;
}

/* Quick Stats Animation */
.quick-stats .stat-item {
  animation: fadeInUp 0.6s ease-out forwards;
  opacity: 0;
}

.quick-stats .stat-item:nth-child(1) { animation-delay: 0.1s; }
.quick-stats .stat-item:nth-child(2) { animation-delay: 0.2s; }
.quick-stats .stat-item:nth-child(3) { animation-delay: 0.3s; }
.quick-stats .stat-item:nth-child(4) { animation-delay: 0.4s; }

.stat-value {
  transition: transform 0.3s ease;
}

.stat-item:hover .stat-value {
  transform: scale(1.1);
}

/* Radar Chart Section */
.radar-chart-section {
  position: relative;
}

.radar-chart-container {
  animation: fadeInScale 1s ease-out forwards;
}

@keyframes fadeInScale {
  from {
    opacity: 0;
    transform: scale(0.9);
  }
  to {
    opacity: 1;
    transform: scale(1);
  }
}

/* Category Filter Buttons */
.filter-btn {
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  position: relative;
  overflow: hidden;
}

.filter-btn::before {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  width: 0;
  height: 0;
  border-radius: 50%;
  background: rgba(0, 85, 159, 0.1);
  transform: translate(-50%, -50%);
  transition: width 0.6s ease, height 0.6s ease;
}

.filter-btn:hover::before {
  width: 300px;
  height: 300px;
}

.filter-btn.active {
  background: #00559f !important;
  color: #ffffff !important;
  border-color: #00559f !important;
  box-shadow: 0 4px 12px rgba(0, 85, 159, 0.3);
  transform: translateY(-2px);
}

.filter-btn:not(.active):hover {
  background: #f0f7ff !important;
  border-color: #00559f !important;
  transform: translateY(-2px);
}

/* Comparison Table */
.comparison-table-wrapper {
  position: relative;
}

.table-scroll {
  scrollbar-width: thin;
  scrollbar-color: #00559f #f0f0f0;
}

.table-scroll::-webkit-scrollbar {
  height: 8px;
}

.table-scroll::-webkit-scrollbar-track {
  background: #f0f0f0;
  border-radius: 4px;
}

.table-scroll::-webkit-scrollbar-thumb {
  background: #00559f;
  border-radius: 4px;
}

.table-scroll::-webkit-scrollbar-thumb:hover {
  background: #003d7a;
}

.comparison-table {
  animation: fadeIn 0.8s ease-out;
}

@keyframes fadeIn {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

.comparison-table tbody tr {
  transition: all 0.3s ease;
  cursor: pointer;
}

.comparison-table tbody tr:hover {
  background: #f8f9fa;
  transform: scale(1.01);
}

.comparison-table tbody tr.expanded {
  background: #f0f7ff;
}

.comparison-table tbody tr.expanded:hover {
  background: #e6f3ff;
}

/* Expandable Row Details */
.row-details {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.5s ease-out, padding 0.5s ease-out;
  padding: 0 20px;
}

.row-details.expanded {
  max-height: 1000px;
  padding: 20px;
  background: #ffffff;
  border-top: 1px solid #e0e0e0;
}

.row-details-content {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 24px;
  padding: 20px 0;
}

.detail-card {
  background: #f8f9fa;
  border-radius: 8px;
  padding: 20px;
  border-left: 4px solid #00559f;
}

.detail-card h4 {
  font-size: 16px;
  font-weight: 700;
  color: #0b2540;
  margin-bottom: 12px;
}

.detail-card p {
  font-size: 14px;
  color: #5a6c7d;
  line-height: 1.6;
  margin: 0;
}

/* Comparison Indicators */
.comparison-indicator {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  font-weight: 700;
  font-size: 18px;
  transition: all 0.3s ease;
}

.indicator-full {
  background: #00a86b;
  color: #ffffff;
}

.indicator-limited {
  background: #ff6b35;
  color: #ffffff;
}

.indicator-none {
  background: #5a6c7d;
  color: #ffffff;
}

.comparison-indicator:hover {
  transform: scale(1.2);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

/* Badge Styles */
.comparison-badge {
  display: inline-block;
  padding: 4px 12px;
  border-radius: 12px;
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-left: 8px;
}

.badge-enhanced {
  background: #00a86b;
  color: #ffffff;
}

.badge-limited {
  background: #ff6b35;
  color: #ffffff;
}

.badge-none {
  background: #5a6c7d;
  color: #ffffff;
}

/* Bar Charts Section */
.bar-charts-section .chart-card {
  animation: fadeInUp 0.8s ease-out forwards;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.bar-charts-section .chart-card:nth-child(1) { animation-delay: 0.1s; }
.bar-charts-section .chart-card:nth-child(2) { animation-delay: 0.2s; }
.bar-charts-section .chart-card:nth-child(3) { animation-delay: 0.3s; }
.bar-charts-section .chart-card:nth-child(4) { animation-delay: 0.4s; }
.bar-charts-section .chart-card:nth-child(5) { animation-delay: 0.5s; }

.bar-charts-section .chart-card:hover {
  transform: translateY(-8px);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.12);
}

/* Why Choose Section - Benefit Cards with Advanced Hover Effects */
.why-choose-section .benefit-card {
  animation: fadeInUp 0.8s ease-out forwards;
  position: relative;
  overflow: hidden;
  transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1) !important;
  cursor: pointer;
}

.why-choose-section .benefit-card:nth-child(1) { animation-delay: 0.1s; }
.why-choose-section .benefit-card:nth-child(2) { animation-delay: 0.2s; }
.why-choose-section .benefit-card:nth-child(3) { animation-delay: 0.3s; }
.why-choose-section .benefit-card:nth-child(4) { animation-delay: 0.4s; }
.why-choose-section .benefit-card:nth-child(5) { animation-delay: 0.5s; }
.why-choose-section .benefit-card:nth-child(6) { animation-delay: 0.6s; }

.why-choose-section .benefit-card::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: linear-gradient(135deg, rgba(0, 85, 159, 0.05) 0%, transparent 100%);
  opacity: 0;
  transition: opacity 0.4s ease;
  pointer-events: none;
  z-index: 1;
}

.why-choose-section .benefit-card::after {
  content: "";
  position: absolute;
  top: -50%;
  left: -50%;
  width: 200%;
  height: 200%;
  background: radial-gradient(circle, rgba(0, 85, 159, 0.1) 0%, transparent 70%);
  opacity: 0;
  transition: opacity 0.4s ease;
  pointer-events: none;
  z-index: 1;
}

.why-choose-section .benefit-card:hover::before {
  opacity: 1;
}

.why-choose-section .benefit-card:hover::after {
  opacity: 1;
}

.why-choose-section .benefit-card:hover {
  transform: translateY(-10px) scale(1.03) !important;
  box-shadow: 0 16px 40px rgba(0, 85, 159, 0.25) !important;
  border: 2px solid #00559f !important;
  z-index: 2;
}

.benefit-icon {
  transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1) !important;
  position: relative;
  z-index: 2;
}

.why-choose-section .benefit-card:hover .benefit-icon {
  transform: scale(1.15) rotate(5deg) !important;
}

.benefit-title,
.benefit-description {
  position: relative;
  z-index: 2;
}

.why-choose-section .benefit-card:hover .benefit-title {
  color: #00559f !important;
  transition: color 0.3s ease;
}

/* CTA Section */
.cta-section {
  position: relative;
}

.cta-btn-primary,
.cta-btn-secondary {
  position: relative;
  overflow: hidden;
}

.cta-btn-primary::after,
.cta-btn-secondary::after {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  width: 0;
  height: 0;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.2);
  transform: translate(-50%, -50%);
  transition: width 0.6s ease, height 0.6s ease;
}

.cta-btn-primary:hover::after,
.cta-btn-secondary:hover::after {
  width: 400px;
  height: 400px;
}

/* Loading States */
.loading {
  opacity: 0.6;
  pointer-events: none;
}

.loading::after {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  width: 20px;
  height: 20px;
  margin: -10px 0 0 -10px;
  border: 3px solid #00559f;
  border-top-color: transparent;
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

/* Scroll Animations */
.fade-in-on-scroll {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 0.8s ease-out, transform 0.8s ease-out;
}

.fade-in-on-scroll.visible {
  opacity: 1;
  transform: translateY(0);
}

/* Mobile Responsive */
@media (max-width: 768px) {
  .comparison-hero h1 {
    font-size: 32px !important;
  }

  .comparison-hero p {
    font-size: 16px !important;
  }

  .hero-cta {
    flex-direction: column;
    align-items: stretch;
  }

  .hero-cta a {
    width: 100%;
    text-align: center;
  }

  .category-filters {
    flex-direction: column;
  }

  .category-filters button {
    width: 100%;
  }

  .table-scroll {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
  }

  .comparison-table {
    min-width: 800px;
  }

  .charts-grid {
    grid-template-columns: 1fr !important;
  }

  .benefits-grid {
    grid-template-columns: 1fr !important;
  }

  .row-details-content {
    grid-template-columns: 1fr !important;
  }

  .cta-buttons {
    flex-direction: column;
  }

  .cta-buttons a,
  .cta-buttons button {
    width: 100%;
  }
}

/* Print Styles */
@media print {
  .main-nav,
  .category-filters,
  .cta-section,
  footer {
    display: none;
  }

  .comparison-table {
    page-break-inside: avoid;
  }

  .chart-card {
    page-break-inside: avoid;
  }
}

/* Accessibility */
.comparison-indicator:focus,
.filter-btn:focus,
.btn-primary:focus,
.btn-secondary:focus,
.cta-btn-primary:focus,
.cta-btn-secondary:focus {
  outline: 3px solid #00559f;
  outline-offset: 2px;
}

/* High Contrast Mode Support */
@media (prefers-contrast: high) {
  .comparison-table tbody tr {
    border: 2px solid #000000;
  }

  .comparison-indicator {
    border: 2px solid #000000;
  }
}

/* Reduced Motion Support */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}

