/* ==========================================================================
   SmileSavvy Dental Clinic — Standalone Flat Brand Styling (Tailwind Offline)
   Strictly Flat Design: No Gradients, No Neon Glows, No Shadows.
   Authentic Brand Palette defined in old CSS:
     --brand-tan:    #C9B59C
     --brand-taupe:  #D9CFC7
     --brand-cream:  #EFE9E3
     --brand-white:  #F9F8F6
     --brand-text:   #4a3f36
     --brand-footer: #4a3f36
   ========================================================================== */

@import url('https://fonts.googleapis.com/css2?family=Plus+Jakarta+Sans:wght@300;400;500;600;700;800&family=Open+Sans:wght@300;400;500;600;700&display=swap');

:root {
  --brand-tan: #C9B59C;
  --brand-taupe: #D9CFC7;
  --brand-cream: #EFE9E3;
  --brand-white: #F9F8F6;
  --brand-text: #4a3f36;
  --brand-footer: #4a3f36;
  --brand-border: #D9CFC7;
}

*, ::before, ::after {
  box-sizing: border-box;
  border-width: 0;
  border-style: solid;
  border-color: #D9CFC7;
  box-shadow: none !important;
  text-shadow: none !important;
}

html {
  line-height: 1.5;
  -webkit-text-size-adjust: 100%;
  font-family: 'Plus Jakarta Sans', 'Open Sans', system-ui, -apple-system, sans-serif;
  scroll-behavior: smooth;
}

body {
  margin: 0;
  line-height: inherit;
  background-color: #F9F8F6;
  color: #4a3f36;
  overflow-x: hidden;
  font-family: 'Plus Jakarta Sans', 'Open Sans', system-ui, -apple-system, sans-serif;
}

/* ---------------- Flat Brand Containers & Glassmorphism ---------------- */
.flat-navbar {
  background-color: #EFE9E3;
  border-bottom: 1px solid #D9CFC7;
}

/* Translucent Flat Glassmorphism (No Gradients, No Glows) */
.glass-card-flat {
  background-color: rgba(249, 248, 246, 0.88);
  backdrop-filter: blur(12px) saturate(180%);
  -webkit-backdrop-filter: blur(12px) saturate(180%);
  border: 1px solid rgba(217, 207, 199, 0.75);
}

.glass-card-tan {
  background-color: rgba(201, 181, 156, 0.15);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  border: 1px solid rgba(201, 181, 156, 0.45);
}

.glass-card-taupe {
  background-color: rgba(217, 207, 199, 0.35);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border: 1px solid rgba(217, 207, 199, 0.8);
}

.glass-header-flat {
  background-color: rgba(239, 233, 227, 0.94);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid rgba(217, 207, 199, 0.85);
  transition: padding 0.3s ease, background-color 0.3s ease;
}

.glass-header-scrolled {
  background-color: rgba(239, 233, 227, 0.98);
  border-bottom-color: #C9B59C;
  padding-top: 0.35rem !important;
  padding-bottom: 0.35rem !important;
}

.glass-dark-footer {
  background-color: #4a3f36;
  border-top: 1px solid rgba(201, 181, 156, 0.25);
}

.flat-card {
  background-color: #ffffff;
  border: 1px solid #D9CFC7;
  border-radius: 8px;
}

.flat-panel-cream {
  background-color: #EFE9E3;
  border: 1px solid #D9CFC7;
}

.flat-panel-taupe {
  background-color: #D9CFC7;
  color: #4a3f36;
}

.flat-panel-tan {
  background-color: #C9B59C;
  color: #ffffff;
}

.flat-panel-footer {
  background-color: #4a3f36;
  color: #F9F8F6;
}

/* ---------------- Flat Brand Inputs & Buttons ---------------- */
.flat-input {
  background-color: #ffffff;
  border: 1px solid #D9CFC7;
  color: #4a3f36;
  border-radius: 6px;
  padding: 0.65rem 0.85rem;
  font-size: 0.875rem;
  transition: border-color 0.2s ease;
}

.flat-input:focus {
  outline: none;
  border-color: #C9B59C;
  background-color: #ffffff;
}

.btn-flat-primary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.75rem 1.75rem;
  font-weight: 600;
  font-size: 0.875rem;
  border-radius: 9999px;
  background-color: #C9B59C;
  color: #ffffff;
  border: 1px solid #C9B59C;
  text-decoration: none;
  cursor: pointer;
  transition: background-color 0.2s ease, transform 0.15s ease;
}

.btn-flat-primary:hover {
  background-color: #b8a184;
  transform: scale(1.02);
}

.btn-flat-primary:active {
  transform: scale(0.98);
}

.btn-flat-secondary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.75rem 1.75rem;
  font-weight: 600;
  font-size: 0.875rem;
  border-radius: 9999px;
  background-color: #ffffff;
  color: #4a3f36;
  border: 1px solid #C9B59C;
  text-decoration: none;
  cursor: pointer;
  transition: all 0.2s ease;
}

.btn-flat-secondary:hover {
  background-color: #EFE9E3;
  color: #4a3f36;
  transform: scale(1.02);
}

.btn-flat-secondary:active {
  transform: scale(0.98);
}

.btn-flat-white {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.75rem 1.75rem;
  font-weight: 600;
  font-size: 0.875rem;
  border-radius: 9999px;
  background-color: #ffffff;
  color: #C9B59C;
  border: 1px solid #ffffff;
  text-decoration: none;
  cursor: pointer;
  transition: all 0.2s ease;
}

.btn-flat-white:hover {
  background-color: #EFE9E3;
  color: #4a3f36;
  transform: scale(1.02);
}

/* ---------------- Micro-Interactions & Hover Effects ---------------- */
.hover-card-lift {
  transition: transform 0.28s cubic-bezier(0.16, 1, 0.3, 1), border-color 0.25s ease;
}

.hover-card-lift:hover {
  transform: translateY(-5px);
  border-color: #C9B59C !important;
}

.hover-icon-scale {
  transition: transform 0.28s cubic-bezier(0.16, 1, 0.3, 1), background-color 0.2s ease, border-color 0.2s ease;
}

.service-card:hover .service-icon-circle,
.hover-card-lift:hover .service-icon-circle,
.hover-card-lift:hover .hover-icon-scale {
  transform: scale(1.08);
  border-color: #C9B59C;
  background-color: #EFE9E3;
}

.nav-link {
  position: relative;
  display: inline-block;
  padding-bottom: 2px;
  font-weight: 600;
  transition: color 0.2s ease;
}

.nav-link::after {
  content: '';
  position: absolute;
  left: 0;
  bottom: -2px;
  width: 0;
  height: 2px;
  background-color: #C9B59C;
  transition: width 0.25s ease;
}

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

.nav-link.active {
  color: #C9B59C !important;
}

/* ---------------- Scroll Progress Bar ---------------- */
#reading-progress-bar {
  position: fixed;
  top: 0;
  left: 0;
  height: 3px;
  background-color: #C9B59C;
  z-index: 9999;
  width: 0%;
  transition: width 0.1s linear;
}

/* ---------------- Scroll Reveal Animations ---------------- */
.reveal-on-scroll {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.6s cubic-bezier(0.16, 1, 0.3, 1), transform 0.6s cubic-bezier(0.16, 1, 0.3, 1);
  will-change: opacity, transform;
}

.reveal-left {
  opacity: 0;
  transform: translateX(-24px);
  transition: opacity 0.6s cubic-bezier(0.16, 1, 0.3, 1), transform 0.6s cubic-bezier(0.16, 1, 0.3, 1);
  will-change: opacity, transform;
}

.reveal-right {
  opacity: 0;
  transform: translateX(24px);
  transition: opacity 0.6s cubic-bezier(0.16, 1, 0.3, 1), transform 0.6s cubic-bezier(0.16, 1, 0.3, 1);
  will-change: opacity, transform;
}

.reveal-visible {
  opacity: 1 !important;
  transform: translate(0, 0) !important;
}

/* ---------------- Floating Quick Booking Trigger ---------------- */
#floating-booking-btn {
  position: fixed;
  bottom: 1.5rem;
  right: 1.5rem;
  z-index: 40;
  opacity: 0;
  transform: translateY(20px);
  pointer-events: none;
  transition: opacity 0.3s ease, transform 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

#floating-booking-btn.visible {
  opacity: 1;
  transform: translateY(0);
  pointer-events: auto;
}

/* ---------------- FAQ Accordion ---------------- */
.faq-header {
  cursor: pointer;
  user-select: none;
}

.faq-body {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.35s cubic-bezier(0.16, 1, 0.3, 1), opacity 0.25s ease;
  opacity: 0;
}

.faq-item.active .faq-body {
  max-height: 250px;
  opacity: 1;
}

.faq-item.active .faq-chevron {
  transform: rotate(180deg);
}

.faq-chevron {
  transition: transform 0.25s ease;
}

/* ---------------- Flat Service Round Icons ---------------- */
.service-icon-circle {
  width: 80px;
  height: 80px;
  border-radius: 50%;
  border: 2px solid #D9CFC7;
  background-color: #ffffff;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 1.5rem auto;
  color: #C9B59C;
  font-size: 2.25rem;
  transition: all 0.25s ease;
}

.service-card:hover .service-icon-circle {
  border-color: #C9B59C;
  background-color: #EFE9E3;
}

/* ---------------- Flat Interactive Calendar ---------------- */
.cal-day-cell {
  aspect-ratio: 1 / 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  border-radius: 6px;
  border: 1px solid #EFE9E3;
  background-color: #ffffff;
  color: #4a3f36;
  cursor: pointer;
  transition: background-color 0.15s ease, border-color 0.15s ease;
}

.cal-day-cell:hover:not(.disabled) {
  background-color: #EFE9E3;
  border-color: #C9B59C;
}

.cal-day-cell.selected {
  background-color: #C9B59C !important;
  color: #ffffff !important;
  font-weight: 700;
  border-color: #C9B59C !important;
}

.cal-day-cell.disabled {
  opacity: 0.35;
  cursor: not-allowed;
  background-color: #f5f5f5 !important;
}

.slot-pill {
  padding: 0.625rem 0.875rem;
  border-radius: 6px;
  font-size: 0.85rem;
  font-weight: 600;
  background-color: #ffffff;
  border: 1px solid #D9CFC7;
  color: #4a3f36;
  cursor: pointer;
  text-align: center;
  transition: all 0.15s ease;
}

.slot-pill:hover:not(.disabled) {
  border-color: #C9B59C;
  background-color: #EFE9E3;
}

.slot-pill.active {
  background-color: #C9B59C !important;
  color: #ffffff !important;
  border-color: #C9B59C !important;
}

.slot-pill.booked {
  opacity: 0.4;
  cursor: not-allowed;
  text-decoration: line-through;
  background-color: #f5f5f5;
}

/* ---------------- Flat Modal ---------------- */
.flat-modal-backdrop {
  position: fixed;
  inset: 0;
  background-color: rgba(0, 0, 0, 0.6);
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1rem;
}

.flat-modal-card {
  background-color: #ffffff;
  border: 1px solid #D9CFC7;
  border-radius: 8px;
  max-width: 32rem;
  width: 100%;
  overflow: hidden;
}

/* ---------------- Layout Utilities (Tailwind Offline) ---------------- */
.container {
  width: 100%;
  margin-right: auto;
  margin-left: auto;
  padding-right: 1rem;
  padding-left: 1rem;
}

@media (min-width: 640px) { .container { max-width: 640px; } }
@media (min-width: 768px) { .container { max-width: 768px; } }
@media (min-width: 1024px) { .container { max-width: 1024px; } }
@media (min-width: 1280px) { .container { max-width: 1200px; } }

/* Grid */
.grid { display: grid; }
.grid-cols-1 { grid-template-columns: repeat(1, minmax(0, 1fr)); }
.grid-cols-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.grid-cols-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.grid-cols-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.grid-cols-7 { grid-template-columns: repeat(7, minmax(0, 1fr)); }
.grid-cols-12 { grid-template-columns: repeat(12, minmax(0, 1fr)); }

@media (min-width: 640px) {
  .sm\:grid-cols-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .sm\:grid-cols-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}

@media (min-width: 768px) {
  .md\:grid-cols-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .md\:grid-cols-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .md\:grid-cols-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .md\:col-span-4 { grid-column: span 4 / span 4; }
  .md\:col-span-8 { grid-column: span 8 / span 8; }
}

@media (min-width: 1024px) {
  .lg\:grid-cols-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .lg\:grid-cols-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .lg\:col-span-5 { grid-column: span 5 / span 5; }
  .lg\:col-span-6 { grid-column: span 6 / span 6; }
  .lg\:col-span-7 { grid-column: span 7 / span 7; }
  .lg\:col-span-8 { grid-column: span 8 / span 8; }
}

/* Flexbox */
.flex { display: flex; }
.inline-flex { display: inline-flex; }
.flex-col { flex-direction: column; }
.flex-row { flex-direction: row; }
.flex-wrap { flex-wrap: wrap; }
.items-center { align-items: center; }
.items-start { align-items: flex-start; }
.items-end { align-items: flex-end; }
.justify-center { justify-content: center; }
.justify-between { justify-content: space-between; }
.justify-end { justify-content: flex-end; }
.flex-1 { flex: 1 1 0%; }
.flex-shrink-0 { flex-shrink: 0; }

/* Spacing */
.gap-1 { gap: 0.25rem; }
.gap-2 { gap: 0.5rem; }
.gap-3 { gap: 0.75rem; }
.gap-4 { gap: 1rem; }
.gap-6 { gap: 1.5rem; }
.gap-8 { gap: 2rem; }
.gap-10 { gap: 2.5rem; }
.gap-12 { gap: 3rem; }

.p-2 { padding: 0.5rem; }
.p-3 { padding: 0.75rem; }
.p-4 { padding: 1rem; }
.p-6 { padding: 1.5rem; }
.p-8 { padding: 2rem; }
.px-3 { padding-left: 0.75rem; padding-right: 0.75rem; }
.px-4 { padding-left: 1rem; padding-right: 1rem; }
.px-6 { padding-left: 1.5rem; padding-right: 1.5rem; }
.px-8 { padding-left: 2rem; padding-right: 2rem; }
.py-1 { padding-top: 0.25rem; padding-bottom: 0.25rem; }
.py-2 { padding-top: 0.5rem; padding-bottom: 0.5rem; }
.py-3 { padding-top: 0.75rem; padding-bottom: 0.75rem; }
.py-4 { padding-top: 1rem; padding-bottom: 1rem; }
.py-6 { padding-top: 1.5rem; padding-bottom: 1.5rem; }
.py-12 { padding-top: 3rem; padding-bottom: 3rem; }
.py-16 { padding-top: 4rem; padding-bottom: 4rem; }
.py-20 { padding-top: 5rem; padding-bottom: 5rem; }

.m-0 { margin: 0; }
.mb-1 { margin-bottom: 0.25rem; }
.mb-2 { margin-bottom: 0.5rem; }
.mb-3 { margin-bottom: 0.75rem; }
.mb-4 { margin-bottom: 1rem; }
.mb-6 { margin-bottom: 1.5rem; }
.mb-8 { margin-bottom: 2rem; }
.mb-12 { margin-bottom: 3rem; }
.mt-2 { margin-top: 0.5rem; }
.mt-4 { margin-top: 1rem; }
.mt-6 { margin-top: 1.5rem; }
.mt-8 { margin-top: 2rem; }
.mr-2 { margin-right: 0.5rem; }
.mr-3 { margin-right: 0.75rem; }
.mr-4 { margin-right: 1rem; }
.mx-auto { margin-left: auto; margin-right: auto; }

/* Sizing */
.w-full { width: 100%; }
.w-auto { width: auto; }
.h-full { height: 100%; }
.w-8 { width: 2rem; }
.h-8 { height: 2rem; }
.w-10 { width: 2.5rem; }
.h-10 { height: 2.5rem; }
.w-12 { width: 3rem; }
.h-12 { height: 3rem; }
.max-w-md { max-width: 28rem; }
.max-w-xl { max-width: 36rem; }
.max-w-2xl { max-width: 42rem; }
.max-w-3xl { max-width: 48rem; }
.max-w-4xl { max-width: 56rem; }
.max-w-5xl { max-width: 64rem; }

/* Positioning */
.relative { position: relative; }
.absolute { position: absolute; }
.fixed { position: fixed; }
.sticky { position: sticky; }
.top-0 { top: 0; }
.bottom-0 { bottom: 0; }
.left-0 { left: 0; }
.right-0 { right: 0; }
.inset-0 { top: 0; right: 0; bottom: 0; left: 0; }
.z-10 { z-index: 10; }
.z-50 { z-index: 50; }

/* Display */
.hidden { display: none; }
.block { display: block; }
.inline-block { display: inline-block; }
.overflow-hidden { overflow: hidden; }

@media (min-width: 768px) {
  .md\:block { display: block; }
  .md\:hidden { display: none; }
  .md\:flex { display: flex; }
}
@media (min-width: 1024px) {
  .lg\:block { display: block; }
  .lg\:hidden { display: none; }
  .lg\:flex { display: flex; }
}

/* Borders & Radii */
.rounded { border-radius: 0.25rem; }
.rounded-md { border-radius: 0.375rem; }
.rounded-lg { border-radius: 0.5rem; }
.rounded-xl { border-radius: 0.75rem; }
.rounded-2xl { border-radius: 1rem; }
.rounded-full { border-radius: 9999px; }
.border { border-width: 1px; }
.border-2 { border-width: 2px; }
.border-b { border-bottom-width: 1px; }
.border-t { border-top-width: 1px; }

/* Typography */
.text-xs { font-size: 0.75rem; line-height: 1rem; }
.text-sm { font-size: 0.875rem; line-height: 1.25rem; }
.text-base { font-size: 1rem; line-height: 1.5rem; }
.text-lg { font-size: 1.125rem; line-height: 1.75rem; }
.text-xl { font-size: 1.25rem; line-height: 1.75rem; }
.text-2xl { font-size: 1.5rem; line-height: 2rem; }
.text-3xl { font-size: 1.875rem; line-height: 2.25rem; }
.text-4xl { font-size: 2.25rem; line-height: 2.5rem; }
.text-5xl { font-size: 3rem; line-height: 1.15; }

.font-normal { font-weight: 400; }
.font-medium { font-weight: 500; }
.font-semibold { font-weight: 600; }
.font-bold { font-weight: 700; }
.font-extrabold { font-weight: 800; }

.text-left { text-align: left; }
.text-center { text-align: center; }
.text-right { text-align: right; }

.text-white { color: #ffffff; }
.text-brand-tan { color: #C9B59C; }
.text-brand-taupe { color: #D9CFC7; }
.text-brand-cream { color: #EFE9E3; }
.text-brand-text { color: #4a3f36; }
.text-muted { color: #666666; }

/* Flat Solid Backgrounds */
.bg-white { background-color: #ffffff; }
.bg-brand-tan { background-color: #C9B59C; }
.bg-brand-taupe { background-color: #D9CFC7; }
.bg-brand-cream { background-color: #EFE9E3; }
.bg-brand-white { background-color: #F9F8F6; }
.bg-brand-text { background-color: #4a3f36; }
.bg-brand-footer { background-color: #4a3f36; }

/* Border Colors */
.border-brand-tan { border-color: #C9B59C; }
.border-brand-taupe { border-color: #D9CFC7; }
.border-brand-cream { border-color: #EFE9E3; }
.border-brand-text { border-color: #4a3f36; }

/* Masonry Gallery */
.masonry-gallery {
  column-count: 3;
  column-gap: 15px;
  padding: 0 10px;
}

.masonry-item {
  break-inside: avoid;
  margin-bottom: 15px;
  overflow: hidden;
  border-radius: 8px;
  border: 1px solid #D9CFC7;
}

.masonry-item img {
  width: 100%;
  display: block;
  border-radius: 8px;
}

@media (max-width: 991.98px) {
  .masonry-gallery { column-count: 2; }
}

@media (max-width: 575.98px) {
  .masonry-gallery { column-count: 1; }
}
