/* ===================================
   Quadracom Components CSS
   Reusable UI Components
   =================================== */

/* ===================================
   Buttons
   =================================== */

.btn {
  display: inline-block;
  padding: 0.875rem 2rem;
  font-family: var(--font-secondary);
  font-size: var(--fs-base);
  font-weight: 600;
  text-align: center;
  text-decoration: none;
  border: none;
  border-radius: var(--radius-md);
  cursor: pointer;
  transition: all var(--transition-base);
  position: relative;
  overflow: hidden;
}

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

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

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-xl);
}

.btn-secondary {
  background: var(--gradient-accent);
  color: #ffffff;
  box-shadow: var(--shadow-md);
}

.btn-secondary:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-xl);
}

.btn-outline {
  background: transparent;
  color: var(--primary-deep-blue);
  border: 2px solid var(--primary-deep-blue);
}

.btn-outline:hover {
  background: var(--primary-deep-blue);
  color: #ffffff;
}

.btn-lg {
  padding: 1.125rem 2.5rem;
  font-size: var(--fs-md);
}

.btn-sm {
  padding: 0.625rem 1.5rem;
  font-size: var(--fs-sm);
}

/* Button Loading State */
.btn.loading {
  pointer-events: none;
  opacity: 0.7;
}

.btn.loading::after {
  content: '';
  position: absolute;
  width: 16px;
  height: 16px;
  top: 50%;
  left: 50%;
  margin-left: -8px;
  margin-top: -8px;
  border: 2px solid #ffffff;
  border-radius: 50%;
  border-top-color: transparent;
  animation: spinner 0.6s linear infinite;
}

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

/* ===================================
   Cards
   =================================== */

.card {
  background: #ffffff;
  border-radius: var(--radius-lg);
  padding: var(--spacing-lg);
  box-shadow: var(--shadow-md);
  transition: all var(--transition-base);
  position: relative;
  overflow: hidden;
}

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

.card-glass {
  background: rgba(255, 255, 255, 0.7);
  backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 255, 255, 0.3);
}

.card-icon {
  width: 64px;
  height: 64px;
  background: var(--gradient-accent);
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: var(--spacing-md);
  font-size: var(--fs-2xl);
  color: #ffffff;
}

.card-title {
  font-size: var(--fs-xl);
  margin-bottom: var(--spacing-sm);
  color: var(--primary-deep-blue);
}

.card-text {
  color: var(--neutral-dark);
  line-height: 1.6;
}

/* Service Cards */
.card.service-card {
  text-align: center;
  padding: 0;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  height: 100%;
}

.service-card-img-wrapper {
  position: relative;
  overflow: hidden;
}

.service-card-img {
  width: 100%;
  height: 220px;
  object-fit: cover;
  object-position: center;
  display: block;
  border-radius: 0;
  margin: 0;
  padding: 0;
  transition: transform 0.4s ease;
}

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

.service-card-img-wrapper::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 40px;
  background: linear-gradient(to top, rgba(0,0,0,0.08), transparent);
  pointer-events: none;
}

.service-card-body {
  padding: var(--spacing-md) var(--spacing-lg);
  flex-grow: 1;
  display: flex;
  flex-direction: column;
  border-top: 3px solid var(--primary-teal);
}

.service-card-body .card-text {
  flex-grow: 1;
  margin-bottom: var(--spacing-md);
}

.service-card-body .link-underline {
  display: inline-block;
  padding: 0.5rem 1.25rem;
  background: var(--primary-blue-lightest, #e8f4fd);
  border-radius: var(--radius-md);
  font-weight: 600;
  font-size: 0.9rem;
  transition: all 0.2s ease;
}

.service-card-body .link-underline:hover {
  background: var(--primary-teal);
  color: #ffffff !important;
}

/* Pricing Cards */
.pricing-card {
  text-align: center;
  border: 2px solid var(--neutral-medium);
}

.pricing-card.featured {
  border-color: var(--primary-teal);
  transform: scale(1.05);
}

.pricing-price {
  font-size: var(--fs-4xl);
  font-weight: 700;
  color: var(--primary-deep-blue);
  margin: var(--spacing-md) 0;
}

.pricing-features {
  list-style: none;
  margin: var(--spacing-lg) 0;
}

.pricing-features li {
  padding: var(--spacing-xs) 0;
  border-bottom: 1px solid var(--neutral-light);
}

/* ===================================
   Forms
   =================================== */

.form-group {
  margin-bottom: var(--spacing-md);
}

label {
  display: block;
  margin-bottom: var(--spacing-xs);
  font-weight: 600;
  color: var(--primary-deep-blue);
}

input[type="text"],
input[type="email"],
input[type="tel"],
input[type="number"],
select,
textarea {
  width: 100%;
  padding: 0.875rem 1rem;
  font-family: var(--font-primary);
  font-size: var(--fs-base);
  border: 2px solid var(--neutral-medium);
  border-radius: var(--radius-md);
  background: #ffffff;
  transition: all var(--transition-fast);
}

input:focus,
select:focus,
textarea:focus {
  outline: none;
  border-color: var(--primary-teal);
  box-shadow: 0 0 0 3px rgba(0, 180, 216, 0.1);
}

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

.form-error {
  color: var(--error-red);
  font-size: var(--fs-sm);
  margin-top: var(--spacing-xs);
  display: none;
}

input.error,
select.error,
textarea.error {
  border-color: var(--error-red);
}

input.error + .form-error,
select.error + .form-error,
textarea.error + .form-error {
  display: block;
}

/* ===================================
   Navigation
   =================================== */

.nav {
  display: flex;
  gap: var(--spacing-md);
  list-style: none;
}

.nav-link {
  padding: var(--spacing-xs) var(--spacing-sm);
  color: var(--neutral-darkest);
  font-weight: 500;
  position: relative;
  transition: color var(--transition-fast);
}

.nav-link:hover {
  color: var(--primary-teal);
}

.nav-link::after {
  content: '';
  position: absolute;
  bottom: -2px;
  left: 0;
  width: 0;
  height: 2px;
  background: var(--gradient-accent);
  transition: width var(--transition-base);
}

.nav-link:hover::after,
.nav-link.active::after {
  width: 100%;
}

/* ===================================
   Badges & Pills
   =================================== */

.badge {
  display: inline-block;
  padding: 0.25rem 0.75rem;
  font-size: var(--fs-xs);
  font-weight: 600;
  border-radius: var(--radius-full);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.badge-primary {
  background: var(--primary-deep-blue);
  color: #ffffff;
}

.badge-success {
  background: var(--success-green);
  color: #ffffff;
}

.badge-warning {
  background: var(--warning-orange);
  color: #ffffff;
}

/* ===================================
   Testimonials
   =================================== */

.testimonial {
  background: #ffffff;
  padding: var(--spacing-xl);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
  position: relative;
}

.testimonial::before {
  content: '"';
  position: absolute;
  top: var(--spacing-md);
  left: var(--spacing-md);
  font-size: 4rem;
  color: var(--primary-teal);
  opacity: 0.2;
  font-family: Georgia, serif;
}

.testimonial-text {
  font-size: var(--fs-md);
  line-height: 1.8;
  margin-bottom: var(--spacing-md);
  font-style: italic;
}

.testimonial-author {
  display: flex;
  align-items: center;
  gap: var(--spacing-sm);
}

.testimonial-avatar {
  width: 50px;
  height: 50px;
  border-radius: 50%;
  object-fit: cover;
}

.testimonial-name {
  font-weight: 600;
  color: var(--primary-deep-blue);
  margin-bottom: 0.25rem;
}

.testimonial-role {
  font-size: var(--fs-sm);
  color: var(--neutral-dark);
}

/* ===================================
   Stats / Counters
   =================================== */

.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: var(--spacing-lg);
}

.stat-item {
  text-align: center;
  padding: var(--spacing-lg);
}

.stat-number {
  font-size: var(--fs-5xl);
  font-weight: 700;
  color: var(--primary-teal);
  line-height: 1;
  margin-bottom: var(--spacing-sm);
}

.stat-label {
  font-size: var(--fs-md);
  color: var(--neutral-dark);
  text-transform: uppercase;
  letter-spacing: 1px;
}

/* ===================================
   Timeline
   =================================== */

.timeline {
  position: relative;
  padding: var(--spacing-lg) 0;
}

.timeline::before {
  content: '';
  position: absolute;
  left: 50%;
  top: 0;
  bottom: 0;
  width: 2px;
  background: var(--primary-teal);
  transform: translateX(-50%);
}

.timeline-item {
  position: relative;
  margin-bottom: var(--spacing-2xl);
  display: flex;
  align-items: center;
}

.timeline-item:nth-child(odd) {
  flex-direction: row-reverse;
}

.timeline-content {
  width: 45%;
  background: #ffffff;
  padding: var(--spacing-lg);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-md);
}

.timeline-dot {
  position: absolute;
  left: 50%;
  width: 20px;
  height: 20px;
  background: var(--primary-teal);
  border-radius: 50%;
  transform: translateX(-50%);
  z-index: 1;
}

/* ===================================
   Accordion / FAQ
   =================================== */

.accordion-item {
  background: #ffffff;
  border-radius: var(--radius-md);
  margin-bottom: var(--spacing-sm);
  box-shadow: var(--shadow-sm);
  overflow: hidden;
}

.accordion-header {
  width: 100%;
  padding: var(--spacing-md) var(--spacing-lg);
  background: none;
  border: none;
  text-align: left;
  font-size: var(--fs-md);
  font-weight: 600;
  color: var(--primary-deep-blue);
  cursor: pointer;
  display: flex;
  justify-content: space-between;
  align-items: center;
  transition: background-color var(--transition-fast);
}

.accordion-header:hover {
  background-color: var(--neutral-lightest);
}

.accordion-icon {
  transition: transform var(--transition-base);
}

.accordion-item.active .accordion-icon {
  transform: rotate(180deg);
}

.accordion-content {
  max-height: 0;
  overflow: hidden;
  transition: max-height var(--transition-base);
}

.accordion-item.active .accordion-content {
  max-height: 1000px;
}

.accordion-body {
  padding: 0 var(--spacing-lg) var(--spacing-md);
  color: var(--neutral-dark);
}

/* ===================================
   Breadcrumb
   =================================== */

.breadcrumb {
  display: flex;
  gap: var(--spacing-xs);
  list-style: none;
  font-size: var(--fs-sm);
  margin-bottom: var(--spacing-md);
}

.breadcrumb-item {
  color: var(--neutral-dark);
}

.breadcrumb-item:not(:last-child)::after {
  content: '/';
  margin-left: var(--spacing-xs);
  color: var(--neutral-medium);
}

.breadcrumb-item.active {
  color: var(--primary-deep-blue);
  font-weight: 600;
}

/* ===================================
   Back to Top Button
   =================================== */

.back-to-top {
  position: fixed;
  bottom: 2rem;
  right: 7rem;
  width: 50px;
  height: 50px;
  background: var(--gradient-accent);
  color: #ffffff;
  border: none;
  border-radius: 50%;
  font-size: var(--fs-xl);
  cursor: pointer;
  box-shadow: var(--shadow-lg);
  opacity: 0;
  visibility: hidden;
  transition: all var(--transition-base);
  z-index: 999999;
  display: flex;
  align-items: center;
  justify-content: center;
}

.back-to-top.visible {
  opacity: 1;
  visibility: visible;
}

.back-to-top:hover {
  transform: translateY(-5px);
  box-shadow: var(--shadow-2xl);
}

/* ===================================
   Live Chat Widget Positioning
   =================================== */

/* Yeastar Live Chat Widget */
#yeastar-live-chat-widget,
#yeastar-live-chat,
div[id*="yeastar"],
div[class*="yeastar"] {
  bottom: 100px !important;
}

/* ===================================
   Responsive Adjustments
   =================================== */

@media (max-width: 768px) {
  .timeline::before {
    left: 0;
  }

  .timeline-item {
    flex-direction: column !important;
    align-items: flex-start;
  }

  .timeline-content {
    width: 100%;
    margin-left: var(--spacing-lg);
  }

  .timeline-dot {
    left: 0;
  }

  .stats-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 480px) {
  .btn {
    width: 100%;
  }

  .stats-grid {
    grid-template-columns: 1fr;
  }
}
