/* ==========================================================================
   Queen's Dental Clinic - Main Design System & Stylesheet
   Color Palette: Royal Teal, Cyan, Gold & Slate Navy
   ========================================================================== */

:root {
  --primary: #006680;
  --primary-dark: #004b5e;
  --primary-light: #e6f4f8;
  --secondary: #0a9396;
  --accent-gold: #d4af37;
  --accent-gold-hover: #b89628;
  --dark: #121e29;
  --dark-surface: #1e2d3b;
  --text-main: #2b3a4a;
  --text-muted: #5a6e7f;
  --light-bg: #f8fafc;
  --white: #ffffff;
  --border: #e2e8f0;
  --error: #e63946;
  --success: #2a9d8f;
  --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.06);
  --shadow-md: 0 8px 24px rgba(0, 0, 0, 0.1);
  --shadow-lg: 0 16px 32px rgba(0, 0, 0, 0.15);
  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 20px;
  --radius-full: 9999px;
  --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  --header-height: 80px;
}

/* --- Reset & Global Base --- */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
  font-size: 16px;
  overflow-x: hidden;
}

body {
  font-family: 'Outfit', 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  color: var(--text-main);
  background-color: var(--light-bg);
  line-height: 1.6;
  overflow-x: hidden;
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

a {
  text-decoration: none;
  color: inherit;
  transition: var(--transition);
}

ul {
  list-style: none;
}

/* --- Container --- */
.container {
  width: 100%;
  max-width: 1240px;
  margin: 0 auto;
  padding: 0 1.5rem;
}

/* --- Typography Helpers --- */
.text-center { text-align: center; }
.text-left { text-align: left; }

.section-tag {
  display: inline-block;
  font-size: 0.85rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1.5px;
  color: var(--secondary);
  background: var(--primary-light);
  padding: 6px 16px;
  border-radius: var(--radius-full);
  margin-bottom: 0.75rem;
}

.section-title {
  font-size: 2.25rem;
  font-weight: 700;
  color: var(--dark);
  line-height: 1.25;
  margin-bottom: 1rem;
}

.section-subtitle {
  font-size: 1.1rem;
  color: var(--text-muted);
  max-width: 650px;
  margin: 0 auto 2.5rem auto;
}

/* --- Buttons --- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.85rem 1.8rem;
  font-size: 1rem;
  font-weight: 600;
  border-radius: var(--radius-md);
  border: 2px solid transparent;
  cursor: pointer;
  transition: var(--transition);
  box-shadow: var(--shadow-sm);
}

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

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

.btn-accent {
  background-color: var(--accent-gold);
  color: var(--dark);
}

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

.btn-outline {
  background: transparent;
  border-color: var(--primary);
  color: var(--primary);
}

.btn-outline:hover {
  background: var(--primary);
  color: var(--white);
  transform: translateY(-2px);
}

/* --- Sticky Header / Navigation --- */
.site-header {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: var(--header-height);
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.05);
  z-index: 1000;
  display: flex;
  align-items: center;
}

.header-container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
}

.brand-logo {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  font-size: 1.35rem;
  font-weight: 800;
  color: var(--primary-dark);
  letter-spacing: -0.5px;
}

.brand-logo svg {
  width: 36px;
  height: 36px;
  fill: var(--primary);
}

.brand-logo span.highlight {
  color: var(--accent-gold);
}

.nav-menu {
  display: flex;
  align-items: center;
  gap: 1.8rem;
}

.nav-link {
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--text-main);
  position: relative;
  padding: 0.5rem 0;
}

.nav-link::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 0%;
  height: 3px;
  background: var(--primary);
  border-radius: 2px;
  transition: var(--transition);
}

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

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

.mobile-toggle {
  display: none;
  background: none;
  border: none;
  font-size: 1.5rem;
  color: var(--dark);
  cursor: pointer;
}

/* --- Floating Action Buttons --- */
.floating-actions {
  position: fixed;
  bottom: 24px;
  right: 24px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  z-index: 1050;
}

.float-btn {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--white);
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.2);
  transition: var(--transition);
  position: relative;
}

.float-btn svg {
  width: 28px;
  height: 28px;
  fill: currentColor;
}

.float-whatsapp {
  background-color: #25D366;
}

.float-whatsapp:hover {
  background-color: #20ba5a;
  transform: scale(1.1);
}

.float-call {
  background-color: var(--primary);
}

.float-call:hover {
  background-color: var(--primary-dark);
  transform: scale(1.1);
}

.float-btn .tooltip {
  position: absolute;
  right: 68px;
  background: var(--dark);
  color: var(--white);
  padding: 6px 12px;
  border-radius: var(--radius-sm);
  font-size: 0.8rem;
  font-weight: 600;
  white-space: nowrap;
  opacity: 0;
  visibility: hidden;
  transition: var(--transition);
  pointer-events: none;
}

.float-btn:hover .tooltip {
  opacity: 1;
  visibility: visible;
}

/* --- Zero-Gap Hero Section --- */
.hero-section {
  padding-top: var(--header-height); /* Starts immediately below sticky navbar with zero gap */
  background: linear-gradient(135deg, #f0f7f9 0%, #e6f2f5 100%);
  min-height: calc(100vh - var(--header-height));
  display: flex;
  align-items: center;
}

.hero-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 3rem;
  align-items: center;
  padding: 4rem 0;
}

.hero-content h1 {
  font-size: 3rem;
  font-weight: 800;
  color: var(--dark);
  line-height: 1.15;
  margin-bottom: 1.25rem;
}

.hero-content h1 span {
  color: var(--primary);
}

.hero-content p {
  font-size: 1.15rem;
  color: var(--text-muted);
  margin-bottom: 2rem;
  max-width: 520px;
}

.hero-badges {
  display: flex;
  gap: 1.5rem;
  margin-top: 2rem;
  padding-top: 1.5rem;
  border-top: 1px solid var(--border);
}

.badge-item {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.badge-item .icon-box {
  width: 44px;
  height: 44px;
  background: var(--white);
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--primary);
  box-shadow: var(--shadow-sm);
}

.badge-item .text h4 {
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--dark);
}

.badge-item .text p {
  font-size: 0.85rem;
  margin: 0;
}

/* --- Universal Image Interactions (Hover Zoom + Reveal) --- */
.img-wrapper {
  overflow: hidden;
  border-radius: var(--radius-md);
  position: relative;
  box-shadow: var(--shadow-md);
  background: #e2e8f0;
}

.img-wrapper img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.4s ease, opacity 0.5s ease;
}

.img-wrapper:hover img {
  transform: scale(1.05); /* Slight zoom animation (~1.05 scale) */
}

/* Scroll reveal class */
.reveal {
  opacity: 0;
  transform: translateY(30px);
  transition: all 0.8s ease-out;
}

.reveal.active {
  opacity: 1;
  transform: translateY(0);
}

/* --- Section Styling --- */
.py-section {
  padding: 5rem 0;
}

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

/* --- Page Header for Inner Pages --- */
.page-header {
  padding-top: calc(var(--header-height) + 3rem);
  padding-bottom: 3rem;
  background: linear-gradient(135deg, var(--primary-dark) 0%, var(--primary) 100%);
  color: var(--white);
  text-align: center;
}

.page-header h1 {
  font-size: 2.5rem;
  font-weight: 800;
  margin-bottom: 0.5rem;
}

.page-header p {
  font-size: 1.1rem;
  opacity: 0.9;
}

/* --- Preview Grid Layouts --- */
.services-grid, .doctors-grid, .gallery-grid, .testimonials-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 2rem;
}

/* --- Service Card --- */
.service-card {
  background: var(--white);
  border-radius: var(--radius-md);
  overflow: hidden;
  border: 1px solid var(--border);
  box-shadow: var(--shadow-sm);
  transition: var(--transition);
  display: flex;
  flex-direction: column;
}

.service-card:hover {
  transform: translateY(-6px);
  box-shadow: var(--shadow-md);
}

.service-card .card-img {
  height: 220px;
}

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

.service-card h3 {
  font-size: 1.3rem;
  color: var(--dark);
  margin-bottom: 0.75rem;
}

.service-card p {
  font-size: 0.95rem;
  color: var(--text-muted);
  margin-bottom: 1.25rem;
  flex-grow: 1;
}

/* --- Doctor Card --- */
.doctor-card {
  background: var(--white);
  border-radius: var(--radius-md);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  transition: var(--transition);
  text-align: center;
  border: 1px solid var(--border);
}

.doctor-card:hover {
  transform: translateY(-6px);
  box-shadow: var(--shadow-md);
}

.doctor-card .doctor-img {
  height: 300px;
}

.doctor-card .doctor-info {
  padding: 1.5rem;
}

.doctor-card h3 {
  font-size: 1.25rem;
  color: var(--dark);
}

.doctor-card .doc-spec {
  color: var(--primary);
  font-size: 0.9rem;
  font-weight: 600;
  margin-bottom: 0.5rem;
}

.doctor-card .demo-badge {
  display: inline-block;
  font-size: 0.75rem;
  padding: 3px 10px;
  background: #fef3c7;
  color: #92400e;
  border-radius: var(--radius-full);
  font-weight: 600;
  margin-top: 0.5rem;
}

/* --- Testimonial Card --- */
.testimonial-card {
  background: var(--white);
  padding: 2rem;
  border-radius: var(--radius-md);
  border: 1px solid var(--border);
  box-shadow: var(--shadow-sm);
  display: flex;
  flex-direction: column;
}

.testimonial-card .stars {
  color: var(--accent-gold);
  margin-bottom: 1rem;
  font-size: 1.1rem;
}

.testimonial-card p {
  font-style: italic;
  color: var(--text-main);
  margin-bottom: 1.5rem;
  flex-grow: 1;
}

.testimonial-card .author {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.testimonial-card .author-avatar {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: var(--primary-light);
  color: var(--primary);
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
}

.testimonial-card .author-info h4 {
  font-size: 1rem;
  color: var(--dark);
}

.testimonial-card .author-info p {
  font-size: 0.8rem;
  color: var(--text-muted);
  margin: 0;
  font-style: normal;
}

/* --- Gallery Grid --- */
.gallery-grid {
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
}

.gallery-item {
  height: 250px;
  cursor: pointer;
}

/* Lightbox overlay */
.lightbox {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.85);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 2000;
  opacity: 0;
  visibility: hidden;
  transition: var(--transition);
}

.lightbox.active {
  opacity: 1;
  visibility: visible;
}

.lightbox img {
  max-width: 90%;
  max-height: 85vh;
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-lg);
}

.lightbox-close {
  position: absolute;
  top: 24px;
  right: 32px;
  color: var(--white);
  font-size: 2.5rem;
  cursor: pointer;
}

/* --- FAQ Accordion --- */
.faq-accordion {
  max-width: 800px;
  margin: 0 auto;
}

.faq-item {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  margin-bottom: 1rem;
  overflow: hidden;
}

.faq-question {
  padding: 1.25rem 1.5rem;
  font-size: 1.1rem;
  font-weight: 600;
  color: var(--dark);
  cursor: pointer;
  display: flex;
  justify-content: space-between;
  align-items: center;
  user-select: none;
}

.faq-question::after {
  content: '+';
  font-size: 1.5rem;
  color: var(--primary);
  transition: transform 0.3s ease;
}

.faq-item.active .faq-question::after {
  transform: rotate(45deg);
}

.faq-answer {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.3s ease, padding 0.3s ease;
  background: #fafcfd;
}

.faq-item.active .faq-answer {
  max-height: 300px;
  padding: 0 1.5rem 1.25rem 1.5rem;
}

/* --- Forms & Contact Page --- */
.contact-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 3rem;
  align-items: start;
}

.form-card {
  background: var(--white);
  padding: 2.5rem;
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-md);
  border: 1px solid var(--border);
}

.form-group {
  margin-bottom: 1.25rem;
}

.form-group label {
  display: block;
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--dark);
  margin-bottom: 0.5rem;
}

.form-control {
  width: 100%;
  padding: 0.85rem 1rem;
  font-size: 0.95rem;
  border: 1.5px solid var(--border);
  border-radius: var(--radius-sm);
  outline: none;
  font-family: inherit;
  transition: var(--transition);
}

.form-control:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 4px var(--primary-light);
}

.form-control.input-error {
  border-color: var(--error);
  background-color: #fff5f5;
}

.error-text {
  font-size: 0.8rem;
  color: var(--error);
  margin-top: 0.35rem;
  display: none;
}

.form-control.input-error + .error-text {
  display: block;
}

.alert-banner {
  padding: 1rem 1.25rem;
  border-radius: var(--radius-sm);
  margin-bottom: 1.5rem;
  font-size: 0.95rem;
  display: none;
}

.alert-banner.alert-success {
  background-color: #d1fae5;
  color: #065f46;
  border: 1px solid #a7f3d0;
  display: block;
}

.alert-banner.alert-danger {
  background-color: #fee2e2;
  color: #991b1b;
  border: 1px solid #fca5a5;
  display: block;
}

/* Map frame */
.map-container {
  border-radius: var(--radius-md);
  overflow: hidden;
  box-shadow: var(--shadow-md);
  height: 380px;
  margin-top: 1.5rem;
}

.map-container iframe {
  width: 100%;
  height: 100%;
  border: none;
}

/* --- Footer --- */
.site-footer {
  background-color: var(--dark);
  color: #a0aec0;
  padding: 4rem 0 2rem 0;
}

.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1.5fr;
  gap: 2.5rem;
  margin-bottom: 3rem;
}

.footer-col h4 {
  color: var(--white);
  font-size: 1.1rem;
  margin-bottom: 1.25rem;
}

.footer-links li {
  margin-bottom: 0.65rem;
}

.footer-links a:hover {
  color: var(--accent-gold);
  padding-left: 4px;
}

.footer-bottom {
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  padding-top: 1.5rem;
  text-align: center;
  font-size: 0.85rem;
}

/* --- Responsive Media Queries --- */
@media (max-width: 992px) {
  .hero-grid, .contact-grid {
    grid-template-columns: 1fr;
  }
  
  .footer-grid {
    grid-template-columns: 1fr 1fr;
  }

  .nav-menu {
    position: fixed;
    top: var(--header-height);
    left: -100%;
    width: 100%;
    height: calc(100vh - var(--header-height));
    background: var(--white);
    flex-direction: column;
    padding: 2rem;
    gap: 1.5rem;
    transition: left 0.3s ease;
    box-shadow: var(--shadow-md);
  }

  .nav-menu.active {
    left: 0;
  }

  .mobile-toggle {
    display: block;
  }
}

@media (max-width: 600px) {
  .hero-content h1 {
    font-size: 2.2rem;
  }
  
  .footer-grid {
    grid-template-columns: 1fr;
  }
  
  .floating-actions {
    bottom: 16px;
    right: 16px;
  }
  
  .float-btn {
    width: 48px;
    height: 48px;
  }
}
