/* ========================================
   COMPONENTS - Buttons, Cards, Forms, etc.
   ======================================== */

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 1rem 2rem;
  font-size: 1rem;
  font-weight: 600;
  line-height: 1;
  text-decoration: none;
  border: none;
  border-radius: var(--radius-md);
  cursor: pointer;
  transition: all var(--transition-base);
  white-space: nowrap;
  font-family: var(--font-primary);
}

.btn:focus-visible {
  outline: 2px solid var(--primary);
  outline-offset: 2px;
}

.btn-primary {
  background-color: var(--primary);
  color: var(--white);
  box-shadow: var(--shadow-md);
}

.btn-primary:hover {
  background-color: var(--primary-dark);
  transform: translateY(-2px);
  box-shadow: var(--shadow-lg);
  color: var(--white);
}

.btn-primary:active {
  transform: translateY(0);
}

.btn-secondary {
  background-color: var(--white);
  color: var(--primary);
  border: 2px solid var(--primary);
  box-shadow: var(--shadow-sm);
}

.btn-secondary:hover {
  background-color: var(--primary);
  color: var(--white);
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}

.btn-accent {
  background-color: var(--accent);
  color: var(--white);
  box-shadow: var(--shadow-md);
}

.btn-accent:hover {
  background-color: #D97706;
  transform: translateY(-2px);
  box-shadow: var(--shadow-lg);
  color: var(--white);
}

.btn-lg {
  padding: 1.25rem 2.5rem;
  font-size: 1.125rem;
}

.btn-sm {
  padding: 0.75rem 1.5rem;
  font-size: 0.875rem;
}

.btn-block {
  width: 100%;
}

.btn-icon {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
}

.btn-icon svg {
  width: 1.25rem;
  height: 1.25rem;
}

/* Button Group */
.btn-group {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
}

.btn-group.center {
  justify-content: center;
}

/* Cards */
.card {
  background-color: var(--white);
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-md);
  transition: all var(--transition-base);
  height: 100%;
  display: flex;
  flex-direction: column;
}

.card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-xl);
}

.card-image {
  width: 100%;
  aspect-ratio: 16 / 10;
  overflow: hidden;
  background-color: var(--neutral-100);
}

.card-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform var(--transition-slow);
}

.card:hover .card-image img {
  transform: scale(1.05);
}

.card-body {
  padding: 1.5rem;
  flex: 1;
  display: flex;
  flex-direction: column;
}

.card-title {
  font-size: 1.5rem;
  font-weight: 700;
  margin-bottom: 0.75rem;
  color: var(--text-primary);
}

.card-text {
  color: var(--text-secondary);
  margin-bottom: 1rem;
  flex: 1;
}

.card-footer {
  padding: 1rem 1.5rem;
  border-top: 1px solid var(--neutral-200);
  background-color: var(--neutral-50);
}

/* Service Card */
.service-card {
  text-align: center;
}

.service-card .card-body {
  align-items: center;
}

.service-icon {
  width: 4rem;
  height: 4rem;
  margin-bottom: 1rem;
  display: flex;
  align-items: center;
  justify-content: center;
  background-color: var(--primary-light);
  border-radius: var(--radius-full);
  color: var(--white);
}

.service-icon svg {
  width: 2rem;
  height: 2rem;
}

/* Review Card */
.review-card {
  padding: 1.5rem;
  background-color: var(--white);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-md);
  transition: all var(--transition-base);
  display: flex;
  flex-direction: column;
  gap: 1rem;
  height: 100%;
}

.review-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-xl);
}

.review-header {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.review-avatar {
  width: 3rem;
  height: 3rem;
  border-radius: var(--radius-full);
  overflow: hidden;
  background-color: var(--neutral-200);
  flex-shrink: 0;
}

.review-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.review-info {
  flex: 1;
}

.review-author {
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 0.25rem;
}

.review-date {
  font-size: 0.875rem;
  color: var(--text-secondary);
}

.review-rating {
  display: flex;
  gap: 0.25rem;
}

.review-text {
  color: var(--text-secondary);
  line-height: 1.6;
  flex: 1;
}

/* Star Rating */
.stars {
  display: inline-flex;
  gap: 0.25rem;
  color: #F59E0B;
}

.star {
  width: 1.25rem;
  height: 1.25rem;
}

.star.filled {
  fill: currentColor;
}

.star.empty {
  fill: var(--neutral-300);
}

/* Trust Badges */
.trust-badges {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 2rem;
  margin: 3rem 0;
}

.trust-badge {
  text-align: center;
  padding: 2rem;
  background-color: var(--neutral-50);
  border-radius: var(--radius-lg);
  transition: all var(--transition-base);
}

.trust-badge:hover {
  background-color: var(--white);
  box-shadow: var(--shadow-lg);
  transform: translateY(-4px);
}

.trust-badge-icon {
  width: 4rem;
  height: 4rem;
  margin: 0 auto 1rem;
  display: flex;
  align-items: center;
  justify-content: center;
  background-color: var(--primary);
  border-radius: var(--radius-full);
  color: var(--white);
}

.trust-badge-icon svg {
  width: 2rem;
  height: 2rem;
}

.trust-badge-title {
  font-size: 1.25rem;
  font-weight: 700;
  margin-bottom: 0.5rem;
  color: var(--text-primary);
}

.trust-badge-text {
  color: var(--text-secondary);
  margin-bottom: 0;
}

/* Grid Layouts */
.grid {
  display: grid;
  gap: 2rem;
}

.grid-2 {
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
}

.grid-3 {
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
}

.grid-4 {
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
}

/* Forms */
.form-group {
  margin-bottom: 1.5rem;
}

.form-label {
  display: block;
  font-weight: 600;
  margin-bottom: 0.5rem;
  color: var(--text-primary);
}

.form-label.required::after {
  content: " *";
  color: #EF4444;
}

.form-input,
.form-textarea,
.form-select {
  width: 100%;
  padding: 0.875rem 1rem;
  font-size: 1rem;
  font-family: var(--font-primary);
  color: var(--text-primary);
  background-color: var(--white);
  border: 2px solid var(--neutral-300);
  border-radius: var(--radius-md);
  transition: all var(--transition-base);
}

.form-input:focus,
.form-textarea:focus,
.form-select:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(30, 58, 138, 0.1);
}

.form-textarea {
  min-height: 150px;
  resize: vertical;
}

.form-checkbox-wrapper {
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
}

.form-checkbox {
  width: 1.25rem;
  height: 1.25rem;
  margin-top: 0.125rem;
  cursor: pointer;
  flex-shrink: 0;
}

.form-checkbox-label {
  font-size: 0.875rem;
  color: var(--text-secondary);
  line-height: 1.5;
  cursor: pointer;
}

.form-error {
  color: #EF4444;
  font-size: 0.875rem;
  margin-top: 0.5rem;
}

.form-success {
  color: var(--secondary);
  font-size: 0.875rem;
  margin-top: 0.5rem;
}

/* Alert Messages */
.alert {
  padding: 1rem 1.5rem;
  border-radius: var(--radius-md);
  margin-bottom: 1.5rem;
}

.alert-success {
  background-color: #D1FAE5;
  color: #065F46;
  border-left: 4px solid var(--secondary);
}

.alert-error {
  background-color: #FEE2E2;
  color: #991B1B;
  border-left: 4px solid #EF4444;
}

.alert-info {
  background-color: #DBEAFE;
  color: #1E40AF;
  border-left: 4px solid var(--primary);
}

/* Badge */
.badge {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.5rem 1rem;
  font-size: 0.875rem;
  font-weight: 600;
  border-radius: var(--radius-full);
  background-color: var(--neutral-100);
  color: var(--text-primary);
}

.badge-primary {
  background-color: var(--primary-light);
  color: var(--white);
}

.badge-success {
  background-color: var(--secondary);
  color: var(--white);
}

/* Divider */
.divider {
  height: 1px;
  background-color: var(--neutral-200);
  margin: 3rem 0;
}

/* Loading Spinner */
.spinner {
  width: 2rem;
  height: 2rem;
  border: 3px solid var(--neutral-200);
  border-top-color: var(--primary);
  border-radius: var(--radius-full);
  animation: spin 0.8s linear infinite;
}

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

.spinner-wrapper {
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 2rem;
}
