/* CSS Variables */
:root {
  --primary-color: #2563eb;
  --primary-dark: #1d4ed8;
  --primary-light: #3b82f6;
  --gray-50: #f9fafb;
  --gray-100: #f3f4f6;
  --gray-200: #e5e7eb;
  --gray-300: #d1d5db;
  --gray-400: #9ca3af;
  --gray-500: #6b7280;
  --gray-600: #4b5563;
  --gray-700: #374151;
  --gray-800: #1f2937;
  --gray-900: #111827;
  --white: #ffffff;
  --space-xs: 0.25rem;
  --space-sm: 0.5rem;
  --space-md: 1rem;
  --space-lg: 1.5rem;
  --space-xl: 2rem;
  --space-2xl: 3rem;
  --radius-sm: 0.25rem;
  --radius-md: 0.375rem;
  --radius-lg: 0.5rem;
  --radius-xl: 0.75rem;
  --radius-full: 9999px;
  --font-size-xs: 0.75rem;
  --font-size-sm: 0.875rem;
  --font-size-base: 1rem;
  --font-size-lg: 1.125rem;
  --font-size-xl: 1.25rem;
}

/* Base Styles */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: "Inter", sans-serif;
  line-height: 1.6;
  color: var(--gray-800);
  background: var(--white);
}

.nf-container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 var(--space-md);
}

/* Section Styles */
.nf-reviews-section {
  padding: var(--space-2xl) 0;
  background: var(--gray-50);
}

.nf-reviews-header {
  text-align: center;
  margin-bottom: var(--space-2xl);
}

.nf-section-title {
  font-size: 2.5rem;
  font-weight: 700;
  color: var(--gray-900);
  margin-bottom: var(--space-md);
}

.nf-google-rating {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-md);
  margin-top: var(--space-lg);
}

.nf-google-logo {
  height: 30px;
  width: auto;
}

.nf-rating-stars {
  display: flex;
  align-items: center;
  gap: var(--space-xs);
}

.nf-rating-stars i {
  color: #ffc107;
  font-size: var(--font-size-lg);
}

.nf-rating-text {
  margin-left: var(--space-sm);
  font-weight: 600;
  color: var(--gray-700);
}

/* Google Reviews Slider Styles */
.nf-google-reviews-slider {
  margin-top: var(--space-2xl);
  width: 100%;
  overflow: hidden;
}

.nf-slider-container {
  position: relative;
  display: flex;
  align-items: center;
  gap: var(--space-md);
  width: 100%;
  max-width: 100%;
}

.nf-slider-wrapper {
  flex: 1;
  overflow: hidden;
  border-radius: var(--radius-xl);
  width: 100%;
  max-width: 100%;
}

.nf-slider-track {
  display: flex;
  gap: var(--space-md);
  transition: transform 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94);
  align-items: flex-start;
  width: max-content;
}

.nf-google-review-card {
  min-width: 400px;
  width: 400px;
  background: var(--white);
  padding: var(--space-xl);
  border-radius: var(--radius-xl);
  box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
  border: 1px solid var(--gray-200);
  transition: all 0.3s cubic-bezier(0.25, 0.46, 0.45, 0.94);
  flex-shrink: 0;
  overflow: hidden;
  box-sizing: border-box;
  height: auto;
  min-height: 200px;
}

.nf-google-review-card.expanded {
  transition: all 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

@media (hover: hover) and (pointer: fine) {
  .nf-google-review-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
  }
}

.nf-review-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: var(--space-sm);
}

.nf-reviewer-info {
  display: flex;
  align-items: center;
  gap: var(--space-sm);
  flex: 1;
  min-width: 0;
}

.nf-reviewer-avatar {
  width: 50px;
  height: 50px;
  border-radius: var(--radius-full);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--white);
  font-weight: 700;
  font-size: var(--font-size-xl);
  flex-shrink: 0;
}

.nf-reviewer-details {
  min-width: 0;
  flex: 1;
}

.nf-reviewer-details h4 {
  margin: 0;
  font-size: var(--font-size-lg);
  font-weight: 600;
  color: var(--gray-900);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.nf-review-date {
  font-size: var(--font-size-sm);
  color: var(--gray-500);
  margin-top: 2px;
}

.nf-google-icon {
  flex-shrink: 0;
  margin-left: var(--space-xs);
}

.nf-google-small-logo {
  height: 20px;
  width: auto;
}

.nf-review-stars {
  display: flex;
  gap: 2px;
  margin-bottom: var(--space-sm);
}

.nf-review-stars i {
  color: #ffc107;
  font-size: var(--font-size-base);
}

.nf-review-text {
  line-height: 1.6;
}

.nf-review-content,
.nf-review-content-full {
  color: var(--gray-700);
  margin-bottom: var(--space-sm);
  font-size: var(--font-size-base);
  transition: opacity 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94);
  word-wrap: break-word;
  overflow-wrap: break-word;
  hyphens: auto;
}

.nf-review-content-full {
  animation: fadeInSmooth 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

@keyframes fadeInSmooth {
  from {
    opacity: 0;
    transform: translateY(-10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.nf-read-more-btn {
  background: none;
  border: none;
  color: var(--primary-color);
  font-weight: 600;
  font-size: var(--font-size-sm);
  cursor: pointer;
  padding: var(--space-xs) 0;
  text-decoration: none;
  transition: all 0.3s cubic-bezier(0.25, 0.46, 0.45, 0.94);
  border-radius: var(--radius-sm);
  display: inline-block;
  position: relative;
}

.nf-read-more-btn::after {
  content: "";
  position: absolute;
  bottom: 0;
  left: 0;
  width: 0;
  height: 2px;
  background: var(--primary-color);
  transition: width 0.3s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

.nf-read-more-btn:hover::after {
  width: 100%;
}

.nf-read-more-btn:hover {
  color: var(--primary-dark);
}

/* Slider Navigation Buttons */
.nf-slider-btn {
  width: 50px;
  height: 50px;
  border-radius: var(--radius-full);
  border: none;
  background: var(--white);
  box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.3s cubic-bezier(0.25, 0.46, 0.45, 0.94);
  color: var(--gray-600);
  font-size: var(--font-size-lg);
  z-index: 10;
  flex-shrink: 0;
}

.nf-slider-btn:hover {
  background: var(--primary-color);
  color: var(--white);
  transform: scale(1.05);
  box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
}

.nf-slider-btn:active {
  transform: scale(0.98);
}

.nf-slider-prev {
  margin-right: var(--space-sm);
}

.nf-slider-next {
  margin-left: var(--space-sm);
}

/* Slider Dots */
.nf-slider-dots {
  display: flex;
  justify-content: center;
  gap: var(--space-xs);
  margin-top: var(--space-lg);
  width: 100%;
  max-width: 100%;
  overflow: hidden;
}

.nf-dot {
  width: 12px;
  height: 12px;
  border-radius: var(--radius-full);
  background: var(--gray-300);
  cursor: pointer;
  transition: all 0.3s cubic-bezier(0.25, 0.46, 0.45, 0.94);
  flex-shrink: 0;
}

.nf-dot.active {
  background: var(--primary-color);
  transform: scale(1.2);
}

.nf-dot:hover {
  background: var(--primary-light);
}

/* Responsive Design */
@media (max-width: 1024px) {
  .nf-google-review-card {
    min-width: 350px;
    width: 350px;
  }

  .nf-slider-container {
    gap: var(--space-sm);
  }

  .nf-slider-btn {
    width: 45px;
    height: 45px;
    font-size: var(--font-size-base);
  }
}

@media (max-width: 768px) {
  .nf-google-reviews-slider {
    margin-left: calc(-1 * var(--space-md));
    margin-right: calc(-1 * var(--space-md));
    padding: 0 var(--space-md);
  }

  .nf-slider-container {
    flex-direction: column;
    gap: var(--space-md);
    width: 100%;
    max-width: 100vw;
  }

  .nf-slider-wrapper {
    order: 1;
    width: 100%;
    max-width: 100%;
  }

  .nf-slider-track {
    gap: var(--space-md);
  }

  .nf-google-review-card {
    min-width: 320px;
    width: 320px;
    max-width: calc(100vw - 3rem);
    padding: var(--space-lg);
    min-height: 180px;
  }

  .nf-slider-btn {
    display: none;
  }

  .nf-reviewer-avatar {
    width: 45px;
    height: 45px;
    font-size: var(--font-size-lg);
  }

  .nf-reviewer-details h4 {
    font-size: var(--font-size-base);
  }

  .nf-review-date {
    font-size: var(--font-size-xs);
  }

  .nf-google-review-card:hover {
    transform: none;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
  }
}

@media (max-width: 480px) {
  .nf-google-reviews-slider {
    margin-left: calc(-1 * var(--space-sm));
    margin-right: calc(-1 * var(--space-sm));
    padding: 0 var(--space-sm);
  }

  .nf-google-review-card {
    min-width: 280px;
    width: 280px;
    max-width: calc(100vw - 2rem);
    padding: var(--space-md);
    min-height: 160px;
  }

  .nf-slider-track {
    gap: var(--space-sm);
  }

  .nf-reviewer-info {
    gap: var(--space-xs);
  }

  .nf-reviewer-avatar {
    width: 40px;
    height: 40px;
    font-size: var(--font-size-base);
  }

  .nf-review-content,
  .nf-review-content-full {
    font-size: var(--font-size-sm);
  }

  .nf-google-small-logo {
    height: 16px;
  }

  .nf-slider-dots {
    gap: var(--space-xs);
    padding: 0 var(--space-sm);
  }

  .nf-dot {
    width: 10px;
    height: 10px;
  }
}

/* Focus states for accessibility */
.nf-slider-btn:focus,
.nf-dot:focus,
.nf-read-more-btn:focus {
  outline: 2px solid var(--primary-color);
  outline-offset: 2px;
}

/* High contrast mode support */
@media (prefers-contrast: high) {
  .nf-google-review-card {
    border: 2px solid var(--gray-900);
  }

  .nf-slider-btn {
    border: 2px solid var(--gray-900);
  }
}

/* Reduced motion support */
@media (prefers-reduced-motion: reduce) {
  .nf-slider-track {
    transition: none;
  }

  .nf-google-review-card {
    transition: none;
  }

  .nf-google-review-card.expanded {
    transition: none;
  }

  .nf-slider-btn,
  .nf-dot {
    transition: none;
  }

  .nf-review-content-full {
    animation: none;
  }

  .nf-read-more-btn::after {
    transition: none;
  }

  @keyframes fadeInSmooth {
    from {
      opacity: 0;
    }
    to {
      opacity: 1;
    }
  }
}
