/* ============================================================
   COMPONENTS — cards, buttons, forms, modals, badges
   ============================================================ */

/* ── BUTTONS ─────────────────────────────────────────────── */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  border-radius: var(--radius-md);
  font-size: 0.875rem;
  font-weight: 500;
  padding: 0.5rem 1rem;
  cursor: pointer;
  transition: background 0.15s, opacity 0.15s, transform 0.15s;
  border: none;
  white-space: nowrap;
  text-decoration: none;
}
.btn:disabled { opacity: 0.5; cursor: not-allowed; }
.btn-primary {
  background-color: var(--primary);
  color: var(--primary-foreground);
}
.btn-primary:hover { background-color: color-mix(in oklch, var(--primary) 90%, black); }
.btn-accent {
  background-color: var(--accent);
  color: var(--accent-foreground);
}
.btn-accent:hover { background-color: color-mix(in oklch, var(--accent) 90%, black); }
.btn-outline {
  background: transparent;
  border: 1px solid var(--border);
  color: var(--foreground);
}
.btn-outline:hover { background: var(--muted); }
.btn-ghost {
  background: transparent;
  color: var(--foreground);
}
.btn-ghost:hover { background: var(--muted); }
.btn-lg {
  padding: 0.75rem 2rem;
  font-size: 1.125rem;
}
.btn-sm {
  padding: 0.25rem 0.75rem;
  font-size: 0.8125rem;
  height: 2rem;
}
.btn-icon {
  width: 2.5rem;
  height: 2.5rem;
  padding: 0;
  border-radius: var(--radius-md);
}

/* ── CARDS ───────────────────────────────────────────────── */
.card {
  background-color: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
}
.card-body { padding: 1.5rem; }
.card-accent-left { border-left: 4px solid var(--accent); }
.card:hover {
  box-shadow: 0 8px 24px rgba(0,0,0,0.08);
}
.card-hover {
  transition: transform 0.3s, box-shadow 0.3s;
}
.card-hover:hover {
  transform: translateY(-4px);
  box-shadow: 0 8px 24px rgba(0,0,0,0.12);
}

/* ── FORM ELEMENTS ───────────────────────────────────────── */
.form-input,
.form-textarea {
  width: 100%;
  border: 1px solid var(--input);
  border-radius: var(--radius-md);
  padding: 0.625rem 0.75rem;
  font-size: 0.875rem;
  background-color: var(--background);
  color: var(--foreground);
  transition: border-color 0.15s, box-shadow 0.15s;
  outline: none;
}
.form-input:focus,
.form-textarea:focus {
  border-color: var(--ring);
  box-shadow: 0 0 0 2px color-mix(in oklch, var(--ring) 20%, transparent);
}
.form-input.error,
.form-textarea.error {
  border-color: var(--destructive);
}
.form-textarea { resize: vertical; min-height: 8rem; }
.form-error {
  font-size: 0.75rem;
  color: var(--destructive);
  margin-top: 0.25rem;
}
.form-row {
  display: grid;
  gap: 1rem;
}
@media (min-width: 640px) {
  .form-row { grid-template-columns: repeat(2, 1fr); }
}

/* ── TOAST ───────────────────────────────────────────────── */
.toast-container {
  position: fixed;
  bottom: 1.5rem;
  right: 1.5rem;
  z-index: 9999;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  pointer-events: none;
}
.toast {
  background-color: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 1rem 1.25rem;
  box-shadow: 0 4px 16px rgba(0,0,0,0.12);
  max-width: 22rem;
  pointer-events: all;
  animation: toastIn 0.3s ease;
}
.toast-title {
  font-weight: 600;
  font-size: 0.9375rem;
  margin-bottom: 0.25rem;
}
.toast-desc {
  font-size: 0.8125rem;
  color: var(--muted-foreground);
}
.toast.hiding { animation: toastOut 0.3s ease forwards; }
@keyframes toastIn {
  from { opacity: 0; transform: translateX(1rem); }
  to   { opacity: 1; transform: translateX(0); }
}
@keyframes toastOut {
  from { opacity: 1; transform: translateX(0); }
  to   { opacity: 0; transform: translateX(1rem); }
}

/* ── DIALOG / MODAL ─────────────────────────────────────── */
.dialog-backdrop {
  position: fixed;
  inset: 0;
  background-color: rgba(0,0,0,0.5);
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1rem;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s;
}
.dialog-backdrop.open {
  opacity: 1;
  pointer-events: all;
}
.dialog {
  background-color: var(--card);
  border-radius: var(--radius-lg);
  max-width: 56rem;
  width: 100%;
  max-height: 90vh;
  overflow-y: auto;
  transform: scale(0.95);
  transition: transform 0.2s;
}
.dialog-backdrop.open .dialog { transform: scale(1); }
.dialog-header {
  padding: 1.5rem 1.5rem 0;
}
.dialog-header-row { display: flex; justify-content: space-between; align-items: center; }
.modal-skeleton.skeleton-sm { height: 3rem; margin-bottom: 1rem; border-radius: 0.5rem; }
.modal-skeleton.skeleton-lg { height: 16rem; margin-bottom: 1rem; border-radius: 0.5rem; }
.modal-skeleton.skeleton-md { height: 8rem; border-radius: 0.5rem; }
.modal-iframe { border: 0; display: none; width: 100%; }
.dialog-title {
  font-size: 1.5rem;
  font-weight: 700;
}
.dialog-body {
  padding: 1rem 1.5rem 1.5rem;
}

/* ── SHIMMER SKELETON ────────────────────────────────────── */
.shimmer {
  position: relative;
  overflow: hidden;
  background-color: var(--muted);
  border-radius: var(--radius-md);
}
.shimmer::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg,
    transparent 0%,
    color-mix(in oklch, var(--background) 60%, transparent) 50%,
    transparent 100%);
  animation: shimmer 1.5s infinite;
}
@keyframes shimmer {
  from { transform: translateX(-100%); }
  to   { transform: translateX(100%); }
}

/* ── COOKIE CONSENT ─────────────────────────────────────── */
.cookie-banner {
  position: fixed;
  bottom: 1rem;
  left: 1rem;
  right: 1rem;
  z-index: 50;
  max-width: 24rem;
  display: none;
}
.cookie-settings { display: none; }
.text-primary { color: var(--primary); }
.cookie-action-btn { flex: 1; }
.cookie-settings-icon { width: 2rem; height: 2rem; }
.cookie-pref-clickable { cursor: pointer; }
.cookie-save-btn { width: 100%; }
@media (min-width: 768px) {
  .cookie-banner {
    left: auto;
  }
}
.cookie-box {
  background-color: color-mix(in oklch, var(--card) 95%, transparent);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  box-shadow: 0 4px 16px rgba(0,0,0,0.1);
  backdrop-filter: blur(4px);
  padding: 0.75rem;
}
.cookie-box-header {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-bottom: 0.5rem;
}
.cookie-title { font-size: 0.875rem; font-weight: 600; }
.cookie-text {
  font-size: 0.75rem;
  line-height: 1.6;
  color: var(--muted-foreground);
  margin-bottom: 0.75rem;
}
.cookie-text a { color: var(--primary); }
.cookie-text a:hover { text-decoration: underline; }
.cookie-actions {
  display: flex;
  gap: 0.5rem;
  align-items: center;
}
.cookie-pref-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.75rem;
  color: var(--muted-foreground);
  padding: 0.25rem 0;
}
.cookie-pref-row input[type="checkbox"] {
  width: 1rem;
  height: 1rem;
  accent-color: var(--primary);
}
.cookie-pref-section { margin-bottom: 0.75rem; }
.cookie-back-btn {
  font-size: 0.75rem;
  color: var(--muted-foreground);
  background: none;
  border: none;
  cursor: pointer;
}
.cookie-back-btn:hover { color: var(--foreground); }
.cookie-pref-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 0.75rem;
}
.cookie-pref-title { font-size: 0.875rem; font-weight: 600; }

/* ── FLOATING BUTTONS ────────────────────────────────────── */
.floating-appointment {
  position: fixed;
  bottom: 2rem;
  right: 2rem;
  z-index: 50;
  width: 3.5rem;
  height: 3.5rem;
  border-radius: 9999px;
  background-color: #06b6d4;
  color: white;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 8px 24px rgba(0,0,0,0.2);
  transition: transform 0.2s, box-shadow 0.2s, background 0.15s;
  border: none;
}
.floating-appointment:hover {
  background-color: #0891b2;
  transform: scale(1.1);
  box-shadow: 0 12px 32px rgba(0,0,0,0.25);
}
.floating-whatsapp {
  position: fixed;
  bottom: 6rem;
  right: 2rem;
  z-index: 50;
  width: 3.5rem;
  height: 3.5rem;
  border-radius: 9999px;
  background: transparent;
  border: none;
  padding: 0;
  cursor: pointer;
  transition: transform 0.2s;
  box-shadow: 0 8px 24px rgba(0,0,0,0.2);
}
.floating-whatsapp:hover { transform: scale(1.1); }
.floating-whatsapp img {
  width: 3.5rem;
  height: 3.5rem;
  border-radius: 9999px;
}

/* ── ICONS (inline SVG helpers) ─────────────────────────── */
.icon { display: inline-block; vertical-align: middle; }
.icon-accent { color: var(--accent); }
.icon-box {
  width: 3rem;
  height: 3rem;
  border-radius: var(--radius-md);
  background-color: color-mix(in oklch, var(--accent) 10%, transparent);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.icon-circle {
  width: 4rem;
  height: 4rem;
  border-radius: 9999px;
  background-color: color-mix(in oklch, var(--accent) 10%, transparent);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-left: auto;
  margin-right: auto;
  margin-bottom: 1rem;
}

/* ── ACCORDION ───────────────────────────────────────────── */
.accordion-item {
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  background-color: var(--card);
  padding: 0 1.5rem;
  margin-bottom: 1rem;
}
.accordion-trigger {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1rem 0;
  text-align: left;
  background: none;
  border: none;
  cursor: pointer;
  font-size: 1rem;
  font-weight: 600;
  color: var(--foreground);
  gap: 0.75rem;
}
.accordion-chevron {
  flex-shrink: 0;
  transition: transform 0.3s;
  width: 1.25rem;
  height: 1.25rem;
  color: var(--muted-foreground);
}
.accordion-item.open .accordion-chevron {
  transform: rotate(180deg);
}
.accordion-content {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.3s ease;
  color: var(--muted-foreground);
  font-size: 0.9375rem;
  line-height: 1.7;
}
.accordion-content-inner { padding-bottom: 1rem; }

/* ── STAR RATING ─────────────────────────────────────────── */
.stars {
  display: flex;
  gap: 0.25rem;
  margin-top: 0.25rem;
}
.star {
  width: 1rem;
  height: 1rem;
  color: #f59e0b;
  fill: #f59e0b;
}

/* ── TESTIMONIALS CAROUSEL ───────────────────────────────── */
.testimonials-carousel-wrapper {
  position: relative;
  overflow: hidden;
}
.testimonials-track {
  display: flex;
  gap: 1rem;
  transition: transform 0.4s ease;
}
.testimonial-slide {
  flex-shrink: 0;
  width: 100%;
}
@media (min-width: 768px) {
  .testimonial-slide { width: calc(50% - 0.5rem); }
}
@media (min-width: 1024px) {
  .testimonial-slide { width: calc(33.333% - 0.667rem); }
}
.testimonials-nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 2.5rem;
  height: 2.5rem;
  border-radius: 9999px;
  background: white;
  border: 1px solid #e2e8f0;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 2px 8px rgba(0,0,0,0.1);
  cursor: pointer;
  transition: background 0.15s;
}
.testimonials-nav:hover { background: #f8fafc; }
.testimonials-nav.prev { left: -0.75rem; }
.testimonials-nav.next { right: -0.75rem; }
.testimonials-nav svg { width: 1.25rem; height: 1.25rem; }

/* Fade animations for section entry */
@keyframes fadeInUp {
  from { opacity: 0; transform: translateY(1.5rem); }
  to   { opacity: 1; transform: translateY(0); }
}
.animate-fade-in-up {
  animation: fadeInUp 0.7s ease both;
}
