/* ========================================
   DentaGo Custom Styles
   Brand: Dental Tourism Thailand
   ======================================== */

/* === Tailwind CDN Config === */
/* Include via: <script src="https://cdn.tailwindcss.com"></script> */
/* Custom config inline in header.html */

/* === Custom Utility Classes === */
.container-page {
  max-width: 80rem;
  margin-left: auto;
  margin-right: auto;
  padding-left: 1rem;
  padding-right: 1rem;
}
@media (min-width: 640px) {
  .container-page {
    padding-left: 1.5rem;
    padding-right: 1.5rem;
  }
}
@media (min-width: 1024px) {
  .container-page {
    padding-left: 2rem;
    padding-right: 2rem;
  }
}

.section-padding {
  padding-top: 4rem;
  padding-bottom: 4rem;
}
@media (min-width: 640px) {
  .section-padding {
    padding-top: 5rem;
    padding-bottom: 5rem;
  }
}
@media (min-width: 1024px) {
  .section-padding {
    padding-top: 6rem;
    padding-bottom: 6rem;
  }
}

/* === Gradient Utilities === */
.gradient-brand {
  background: linear-gradient(135deg, #0d9488, #0f766e);
}
.gradient-warm {
  background: linear-gradient(135deg, #f59e0b, #d97706);
}

/* === Brand Colors (Tailwind format) === */
/* These are defined in the Tailwind CDN config block in header.html */
/* CSS fallback variables */
:root {
  --brand: #0d9488;
  --brand-dark: #0f766e;
  --brand-light: #ccfbf1;
  --brand-foreground: #f8fafc;
  --warm: #f59e0b;
  --warm-light: #fef3c7;
  --warm-foreground: #f8fafc;
}

/* === Animations === */
@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

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

@keyframes zoomIn {
  from {
    opacity: 0;
    transform: scale(0.95);
  }
  to {
    opacity: 1;
    transform: scale(1);
  }
}

@keyframes slideInRight {
  from {
    opacity: 0;
    transform: translateX(16px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

@keyframes slideDown {
  from {
    opacity: 0;
    transform: translateY(-8px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes pulse-soft {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.7; }
}

.animate-fadeInUp {
  animation: fadeInUp 0.6s ease-out both;
}
.animate-fadeIn {
  animation: fadeIn 0.3s ease-out both;
}
.animate-zoomIn {
  animation: zoomIn 0.2s ease-out both;
}
.animate-slideInRight {
  animation: slideInRight 0.35s ease-out both;
}
.animate-slideDown {
  animation: slideDown 0.3s ease-out both;
}
.animate-pulse-soft {
  animation: pulse-soft 2s ease-in-out infinite;
}

/* Staggered animation delays */
.delay-100 { animation-delay: 0.1s; }
.delay-200 { animation-delay: 0.2s; }
.delay-300 { animation-delay: 0.3s; }
.delay-400 { animation-delay: 0.4s; }
.delay-500 { animation-delay: 0.5s; }

/* === Mobile Menu === */
.mobile-menu-open {
  overflow: hidden;
}

.mobile-menu-backdrop {
  position: fixed;
  inset: 0;
  z-index: 9998;
  background: rgba(0, 0, 0, 0.4);
  backdrop-filter: blur(4px);
  transition: opacity 0.3s ease, visibility 0.3s ease;
}
.mobile-menu-backdrop.hidden {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

.mobile-menu-panel {
  position: fixed;
  top: 0;
  right: 0;
  z-index: 9999;
  height: 100%;
  width: 300px;
  background: white;
  box-shadow: -4px 0 24px rgba(0, 0, 0, 0.15);
  transition: transform 0.3s ease-out;
  overflow-y: auto;
}
.mobile-menu-panel.closed {
  transform: translateX(100%);
}
@media (min-width: 640px) {
  .mobile-menu-panel {
    width: 350px;
  }
}

/* === Desktop Dropdown === */
.nav-dropdown {
  position: absolute;
  top: 100%;
  left: 0;
  margin-top: 0.25rem;
  width: 14rem;
  border-radius: 0.75rem;
  border: 1px solid #e2e8f0;
  background: white;
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.1);
  padding: 0.5rem;
  z-index: 100;
  animation: zoomIn 0.2s ease-out both;
}

/* === Scroll To Top Button === */
.scroll-to-top {
  position: fixed;
  bottom: 2rem;
  right: 2rem;
  z-index: 9990;
  width: 3rem;
  height: 3rem;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.4s ease-out;
  cursor: pointer;
  border: none;
  background: transparent;
}
.scroll-to-top.hidden {
  opacity: 0;
  transform: translateY(1.5rem);
  pointer-events: none;
}
.scroll-to-top.visible {
  opacity: 1;
  transform: translateY(0);
}

.scroll-to-top-glow {
  position: absolute;
  inset: 0;
  border-radius: 50%;
  opacity: 0;
  background: radial-gradient(circle, rgba(13, 148, 136, 0.25) 0%, transparent 70%);
  filter: blur(8px);
  transform: scale(1.5);
  transition: opacity 0.5s;
}
.scroll-to-top:hover .scroll-to-top-glow {
  opacity: 1;
}

.scroll-to-top-inner {
  position: relative;
  width: 2.25rem;
  height: 2.25rem;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(255, 255, 255, 0.75);
  backdrop-filter: blur(12px);
  border: 1px solid rgba(255, 255, 255, 0.6);
  box-shadow: 0 4px 12px rgba(13, 148, 136, 0.15);
  transition: all 0.4s ease-out;
}
.scroll-to-top:hover .scroll-to-top-inner {
  background: rgba(255, 255, 255, 0.9);
  box-shadow: 0 8px 24px rgba(13, 148, 136, 0.25);
  transform: scale(1.1);
}
.scroll-to-top:active .scroll-to-top-inner {
  transform: scale(0.95);
}

.scroll-to-top-dot {
  position: absolute;
  top: 0;
  right: 0;
  width: 0.5rem;
  height: 0.5rem;
  border-radius: 50%;
  background: linear-gradient(135deg, #38bdf8, #3b82f6);
  box-shadow: 0 1px 4px rgba(56, 189, 248, 0.4);
  transform: translate(2px, -2px);
  transition: all 0.4s ease-out;
}
.scroll-to-top:hover .scroll-to-top-dot {
  transform: translate(2px, -2px) scale(1.25);
  box-shadow: 0 2px 6px rgba(56, 189, 248, 0.5);
}

/* Progress ring SVG inside scroll-to-top */
.scroll-to-top svg.progress-ring {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  transform: rotate(-90deg);
}

/* === Glassmorphism Effects === */
.glass-card {
  background: rgba(255, 255, 255, 0.75);
  backdrop-filter: blur(12px);
  border: 1px solid rgba(255, 255, 255, 0.6);
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.06);
}

.glass-card-strong {
  background: rgba(255, 255, 255, 0.9);
  backdrop-filter: blur(16px);
  border: 1px solid rgba(255, 255, 255, 0.7);
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.08);
}

/* === Hero Section Enhancements === */
.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.2);
  background: rgba(255, 255, 255, 0.1);
  padding: 0.375rem 1rem;
  font-size: 0.875rem;
  color: rgba(255, 255, 255, 0.9);
  backdrop-filter: blur(8px);
}

/* === Card Hover Effects === */
.card-hover {
  transition: all 0.3s ease;
}
.card-hover:hover {
  transform: translateY(-2px);
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.1);
}

/* === Clinic Card === */
.clinic-card-img {
  height: 12rem;
  background: linear-gradient(135deg, rgba(13, 148, 136, 0.2), rgba(245, 158, 11, 0.2));
  display: flex;
  align-items: center;
  justify-content: center;
}

.clinic-avatar {
  width: 4rem;
  height: 4rem;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.8);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--brand);
}

/* === Filter Bar === */
.filter-bar {
  background: white;
  border-radius: 1rem;
  border: 1px solid #e2e8f0;
  padding: 1rem;
  margin-bottom: 2rem;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
}
@media (min-width: 768px) {
  .filter-bar {
    padding: 1.25rem;
  }
}

/* === Rating Stars === */
.star-filled {
  color: #eab308;
  fill: #eab308;
}

/* === Breadcrumb === */
.breadcrumb {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.875rem;
  color: #64748b;
  margin-bottom: 1.5rem;
  flex-wrap: wrap;
}
.breadcrumb a {
  color: #64748b;
  text-decoration: none;
  transition: color 0.2s;
}
.breadcrumb a:hover {
  color: var(--brand);
}
.breadcrumb .separator {
  color: #cbd5e1;
  user-select: none;
}
.breadcrumb .current {
  color: var(--brand);
  font-weight: 500;
}

/* === Form Elements === */
.form-input {
  display: block;
  width: 100%;
  height: 2.75rem;
  padding: 0 0.75rem;
  border: 1px solid #e2e8f0;
  border-radius: 0.5rem;
  font-size: 0.875rem;
  color: #1e293b;
  background: white;
  transition: border-color 0.2s, box-shadow 0.2s;
  outline: none;
}
.form-input:focus {
  border-color: var(--brand);
  box-shadow: 0 0 0 3px rgba(13, 148, 136, 0.15);
}
.form-input::placeholder {
  color: #94a3b8;
}

.form-select {
  display: block;
  width: 100%;
  height: 2.75rem;
  padding: 0 2rem 0 0.75rem;
  border: 1px solid #e2e8f0;
  border-radius: 0.5rem;
  font-size: 0.875rem;
  color: #1e293b;
  background: white;
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' fill='none'%3E%3Cpath d='M3 4.5l3 3 3-3' stroke='%2394a3b8' stroke-width='1.5' stroke-linecap='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 0.75rem center;
  transition: border-color 0.2s;
  outline: none;
  cursor: pointer;
}
.form-select:focus {
  border-color: var(--brand);
  box-shadow: 0 0 0 3px rgba(13, 148, 136, 0.15);
}

/* === Buttons === */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  font-weight: 500;
  border-radius: 0.5rem;
  cursor: pointer;
  transition: all 0.2s;
  border: none;
  outline: none;
  text-decoration: none;
  font-size: 0.875rem;
  line-height: 1.5;
}

.btn-sm { height: 2.25rem; padding: 0 0.75rem; font-size: 0.8125rem; }
.btn-md { height: 2.5rem; padding: 0 1rem; }
.btn-lg { height: 3rem; padding: 0 1.5rem; font-size: 1rem; }

.btn-primary {
  background: var(--brand);
  color: white;
}
.btn-primary:hover {
  opacity: 0.9;
}

.btn-outline {
  background: transparent;
  border: 1px solid #e2e8f0;
  color: #475569;
}
.btn-outline:hover {
  background: #f8fafc;
  border-color: #cbd5e1;
}

.btn-ghost {
  background: transparent;
  color: #64748b;
}
.btn-ghost:hover {
  background: #f1f5f9;
  color: #334155;
}

.btn-brand-outline {
  background: transparent;
  border: 1px solid var(--brand);
  color: var(--brand);
}
.btn-brand-outline:hover {
  background: rgba(13, 148, 136, 0.05);
}

.btn-warm {
  background: var(--warm);
  color: white;
  box-shadow: 0 4px 12px rgba(245, 158, 11, 0.3);
}
.btn-warm:hover {
  opacity: 0.9;
  box-shadow: 0 6px 20px rgba(245, 158, 11, 0.4);
}

.btn-hero-outline {
  background: transparent;
  border: 1px solid rgba(255, 255, 255, 0.3);
  color: white;
}
.btn-hero-outline:hover {
  background: rgba(255, 255, 255, 0.1);
}

/* === Badge === */
.badge {
  display: inline-flex;
  align-items: center;
  padding: 0.125rem 0.625rem;
  border-radius: 999px;
  font-size: 0.75rem;
  font-weight: 500;
  line-height: 1.25rem;
}

.badge-secondary {
  background: #f1f5f9;
  color: #475569;
}
.badge-brand {
  background: rgba(13, 148, 136, 0.1);
  color: var(--brand);
}
.badge-white {
  background: rgba(0, 0, 0, 0.5);
  color: white;
}

/* === Search Input === */
.search-input-wrapper {
  position: relative;
  flex: 1;
}
.search-input-icon {
  position: absolute;
  left: 0.75rem;
  top: 50%;
  transform: translateY(-50%);
  color: #94a3b8;
  pointer-events: none;
}
.search-input-wrapper .form-input {
  padding-left: 2.5rem;
}

/* === Active Filter Tag === */
.filter-active {
  background: var(--brand);
  color: white;
  border-color: var(--brand);
}

/* === Page Header === */
.page-header {
  margin-bottom: 2rem;
}
.page-header-title {
  font-size: 1.875rem;
  font-weight: 700;
  color: #1e293b;
  margin-bottom: 0.5rem;
  line-height: 1.2;
}
@media (min-width: 640px) {
  .page-header-title {
    font-size: 2.25rem;
  }
}
.page-header-desc {
  font-size: 1.0625rem;
  color: #64748b;
  max-width: 42rem;
  line-height: 1.6;
}

/* === Empty State === */
.empty-state {
  text-align: center;
  padding: 4rem 1rem;
}
.empty-state-icon {
  font-size: 3rem;
  margin-bottom: 1rem;
  opacity: 0.3;
}
.empty-state-title {
  font-size: 1.25rem;
  font-weight: 600;
  color: #334155;
  margin-bottom: 0.5rem;
}
.empty-state-desc {
  font-size: 0.9375rem;
  color: #94a3b8;
  margin-bottom: 1.5rem;
}

/* === CTA Banner === */
.cta-banner {
  background: linear-gradient(135deg, var(--brand), var(--brand-dark));
  border-radius: 1rem;
  padding: 2rem;
  color: white;
  text-align: center;
}
@media (min-width: 768px) {
  .cta-banner {
    padding: 3rem;
  }
}
.cta-banner-title {
  font-size: 1.5rem;
  font-weight: 700;
  margin-bottom: 0.75rem;
}
@media (min-width: 768px) {
  .cta-banner-title {
    font-size: 1.75rem;
  }
}
.cta-banner-desc {
  font-size: 1rem;
  color: rgba(255, 255, 255, 0.85);
  margin-bottom: 1.5rem;
  max-width: 36rem;
  margin-left: auto;
  margin-right: auto;
}

/* === Why Us Icons === */
.whyus-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 3.5rem;
  height: 3.5rem;
  border-radius: 1rem;
  background: rgba(13, 148, 136, 0.1);
  color: var(--brand);
  margin-bottom: 1rem;
  transition: transform 0.3s;
}
.whyus-card:hover .whyus-icon {
  transform: scale(1.1);
}

/* === Service Card Icon === */
.service-icon {
  width: 3rem;
  height: 3rem;
  border-radius: 0.75rem;
  background: rgba(13, 148, 136, 0.1);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  transition: all 0.2s;
  color: var(--brand);
}
.service-card:hover .service-icon {
  background: var(--brand);
  color: white;
}

/* === Responsive helpers === */
@media (max-width: 768px) {
  .hide-mobile {
    display: none !important;
  }
}
@media (min-width: 769px) {
  .show-mobile {
    display: none !important;
  }
}

/* === Footer styles === */
.footer-link {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  color: #94a3b8;
  text-decoration: none;
  font-size: 0.875rem;
  transition: color 0.2s;
}
.footer-link:hover {
  color: white;
}
.footer-link-arrow {
  font-size: 0.75rem;
  opacity: 0;
  margin-left: -1rem;
  transition: all 0.2s;
}
.footer-link:hover .footer-link-arrow {
  opacity: 1;
  margin-left: 0;
}

/* === Social Icon === */
.social-icon {
  width: 2.25rem;
  height: 2.25rem;
  border-radius: 0.5rem;
  background: #1e293b;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #94a3b8;
  transition: all 0.2s;
  text-decoration: none;
}
.social-icon:hover {
  background: var(--brand);
  color: white;
}

/* === Utility: line-clamp === */
.line-clamp-1 {
  overflow: hidden;
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 1;
}
.line-clamp-2 {
  overflow: hidden;
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

/* === Skeleton loading (minimal) === */
.skeleton {
  background: linear-gradient(90deg, #f1f5f9 25%, #e2e8f0 50%, #f1f5f9 75%);
  background-size: 200% 100%;
  animation: shimmer 1.5s infinite;
  border-radius: 0.25rem;
}
@keyframes shimmer {
  0% { background-position: 200% 0; }
  100% { background-position: -200% 0; }
}
