/* ================================
   ADE Dental Management - Main Styles
   Design inspired by modern dental marketing aesthetics
   ================================ */

/* ========== CSS Variables ========== */
:root {
  /* Brand Colors */
  --primary-color: #0891b2; /* Cyan 600 - Professional trust */
  --primary-dark: #0e7490; /* Cyan 700 */
  --primary-light: #06b6d4; /* Cyan 500 */
  --secondary-color: #2563eb; /* Blue 600 */
  --accent-color: #7c3aed; /* Violet 600 */

  /* Neutral Colors */
  --white: #ffffff;
  --off-white: #fafafa;
  --light-gray: #f3f4f6;
  --gray: #9ca3af;
  --dark-gray: #4b5563;
  --darker-gray: #1f2937;
  --black: #111827;

  /* Status Colors */
  --success: #10b981;
  --warning: #f59e0b;
  --error: #ef4444;

  /* Typography */
  --font-primary: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', 'Oxygen', 'Ubuntu', 'Cantarell', sans-serif;
  --font-heading: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;

  /* Spacing */
  --spacing-xs: 0.5rem;
  --spacing-sm: 1rem;
  --spacing-md: 2rem;
  --spacing-lg: 4rem;
  --spacing-xl: 6rem;

  /* Border Radius */
  --radius-sm: 0.375rem;
  --radius-md: 0.5rem;
  --radius-lg: 1rem;
  --radius-xl: 1.5rem;

  /* Shadows */
  --shadow-sm: 0 1px 2px 0 rgb(0 0 0 / 0.05);
  --shadow-md: 0 4px 6px -1px rgb(0 0 0 / 0.1);
  --shadow-lg: 0 10px 15px -3px rgb(0 0 0 / 0.1);
  --shadow-xl: 0 20px 25px -5px rgb(0 0 0 / 0.1);

  /* Transitions */
  --transition-fast: 150ms ease-in-out;
  --transition-base: 300ms ease-in-out;
  --transition-slow: 500ms ease-in-out;

  /* Layout */
  --max-width: 1280px;
  --header-height: 80px;
}

/* ========== Reset & Base ========== */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

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

body {
  font-family: var(--font-primary);
  line-height: 1.6;
  color: var(--darker-gray);
  background-color: var(--white);
  overflow-x: hidden;
}

/* ========== Typography ========== */
h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-heading);
  font-weight: 700;
  line-height: 1.2;
  color: var(--black);
  margin-bottom: var(--spacing-sm);
}

h1 {
  font-size: clamp(2.5rem, 5vw, 4rem);
  letter-spacing: -0.02em;
}

h2 {
  font-size: clamp(2rem, 4vw, 3rem);
  letter-spacing: -0.01em;
}

h3 {
  font-size: clamp(1.5rem, 3vw, 2rem);
}

h4 {
  font-size: clamp(1.25rem, 2vw, 1.5rem);
}

p {
  margin-bottom: var(--spacing-sm);
  font-size: 1.125rem;
  color: var(--dark-gray);
}

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

a:hover {
  color: var(--primary-dark);
}

/* ========== Layout ========== */
.container {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 var(--spacing-md);
}

.section {
  padding: var(--spacing-xl) 0;
}

.section-sm {
  padding: var(--spacing-lg) 0;
}

/* ========== Header & Navigation ========== */
.header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: var(--header-height);
  background-color: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(10px);
  box-shadow: var(--shadow-sm);
  z-index: 1000;
  transition: all var(--transition-base);
}

.header.scrolled {
  box-shadow: var(--shadow-md);
  background-color: rgba(255, 255, 255, 0.98);
}

.nav {
  display: flex;
  justify-content: space-between;
  align-items: center;
  height: 100%;
}

.logo {
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--primary-color);
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

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

.nav-link {
  color: var(--darker-gray);
  font-weight: 500;
  padding: 0.5rem 0;
  position: relative;
}

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

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

/* Free Consultation Nav Link - Special Styling */
a[href="#free-consultation"].nav-link {
  background: linear-gradient(135deg, #7c3aed, #2563eb);
  color: white;
  padding: 0.5rem 1rem;
  border-radius: 0.5rem;
  font-weight: 600;
  transition: all var(--transition-base);
  box-shadow: 0 4px 12px rgba(124, 58, 237, 0.3);
}

a[href="#free-consultation"].nav-link:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(124, 58, 237, 0.4);
  background: linear-gradient(135deg, #8b5cf6, #3b82f6);
}

a[href="#free-consultation"].nav-link::after {
  display: none; /* Remove the underline effect for this special link */
}

/* Mobile Menu Toggle */
.menu-toggle {
  display: none;
  flex-direction: column;
  gap: 0.25rem;
  background: none;
  border: none;
  cursor: pointer;
  padding: 0.5rem;
}

.menu-toggle span {
  width: 25px;
  height: 3px;
  background-color: var(--darker-gray);
  transition: all var(--transition-base);
}

/* ========== Buttons ========== */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 1rem 2rem;
  font-size: 1rem;
  font-weight: 600;
  border-radius: var(--radius-md);
  border: none;
  cursor: pointer;
  transition: all var(--transition-base);
  text-decoration: none;
  white-space: nowrap;
}

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

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

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

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

.btn-large {
  padding: 1.25rem 2.5rem;
  font-size: 1.125rem;
}

/* ========== Hero Section ========== */
.hero {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, var(--off-white) 0%, var(--light-gray) 100%);
  position: relative;
  overflow: hidden;
  padding-top: var(--header-height);
}

.hero-content {
  text-align: center;
  max-width: 900px;
  margin: 0 auto;
  animation: fadeInUp 1s ease-out;
}

.hero-subtitle {
  color: var(--primary-color);
  font-size: 1.25rem;
  font-weight: 600;
  margin-bottom: var(--spacing-sm);
  text-transform: uppercase;
  letter-spacing: 0.1em;
}

.hero-title {
  margin-bottom: var(--spacing-md);
}

.hero-description {
  font-size: 1.25rem;
  color: var(--dark-gray);
  margin-bottom: var(--spacing-lg);
  max-width: 700px;
  margin-left: auto;
  margin-right: auto;
}

.hero-cta {
  display: flex;
  gap: var(--spacing-sm);
  justify-content: center;
  flex-wrap: wrap;
}

/* Animated Text */
.animated-text {
  display: inline-block;
  position: relative;
}

.text-gradient {
  background: linear-gradient(135deg, var(--primary-color), var(--accent-color));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

/* ========== Stats Section ========== */
.stats-section {
  background-color: var(--primary-color);
  color: var(--white);
  padding: var(--spacing-lg) 0;
}

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

.stat-card {
  text-align: center;
  padding: var(--spacing-md);
}

.stat-value {
  font-size: 3rem;
  font-weight: 700;
  margin-bottom: var(--spacing-xs);
  color: var(--white);
}

.stat-label {
  font-size: 1.125rem;
  font-weight: 600;
  margin-bottom: var(--spacing-xs);
  color: rgba(255, 255, 255, 0.9);
}

.stat-description {
  font-size: 0.875rem;
  color: rgba(255, 255, 255, 0.7);
}

/* ========== Services Section ========== */
.services-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: var(--spacing-lg);
  margin-top: var(--spacing-lg);
}

.service-card {
  background-color: var(--white);
  border-radius: var(--radius-lg);
  padding: var(--spacing-lg);
  box-shadow: var(--shadow-md);
  transition: all var(--transition-base);
  border: 1px solid var(--light-gray);
}

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

.service-icon {
  width: 60px;
  height: 60px;
  background: linear-gradient(135deg, var(--primary-light), var(--primary-color));
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: var(--spacing-sm);
  font-size: 1.5rem;
  color: var(--white);
}

.service-title {
  margin-bottom: var(--spacing-sm);
}

.service-description {
  color: var(--dark-gray);
  margin-bottom: var(--spacing-md);
}

.service-link {
  color: var(--primary-color);
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
}

/* ========== Testimonials Section ========== */
.testimonials-slider {
  margin-top: var(--spacing-lg);
  position: relative;
}

.testimonial-card {
  background-color: var(--white);
  border-radius: var(--radius-lg);
  padding: var(--spacing-lg);
  box-shadow: var(--shadow-lg);
  max-width: 800px;
  margin: 0 auto;
}

.testimonial-header {
  display: flex;
  align-items: center;
  gap: var(--spacing-sm);
  margin-bottom: var(--spacing-md);
}

.testimonial-avatar {
  width: 60px;
  height: 60px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--primary-light), var(--primary-color));
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--white);
}

.testimonial-info h4 {
  margin-bottom: 0.25rem;
}

.testimonial-practice {
  color: var(--gray);
  font-size: 0.875rem;
}

.testimonial-quote {
  font-size: 1.125rem;
  font-style: italic;
  color: var(--darker-gray);
  margin-bottom: var(--spacing-md);
  line-height: 1.8;
}

.testimonial-results {
  display: flex;
  gap: var(--spacing-md);
  flex-wrap: wrap;
  padding-top: var(--spacing-md);
  border-top: 1px solid var(--light-gray);
}

.result-item {
  text-align: center;
}

.result-value {
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--primary-color);
}

.result-label {
  font-size: 0.875rem;
  color: var(--gray);
}

/* ========== CTA Section ========== */
.cta-section {
  background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
  color: var(--white);
  text-align: center;
  padding: var(--spacing-xl) 0;
}

.cta-section h2,
.cta-section p {
  color: var(--white);
}

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

.cta-section .btn-primary:hover {
  background-color: var(--off-white);
  color: var(--primary-dark);
}

/* ========== Footer ========== */
.footer {
  background-color: var(--darker-gray);
  color: var(--white);
  padding: var(--spacing-xl) 0 var(--spacing-md);
}

.footer-content {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: var(--spacing-lg);
  margin-bottom: var(--spacing-lg);
}

.footer-section h4 {
  color: var(--white);
  margin-bottom: var(--spacing-sm);
}

.footer-links {
  list-style: none;
}

.footer-links li {
  margin-bottom: var(--spacing-xs);
}

.footer-links a {
  color: var(--gray);
  transition: color var(--transition-fast);
}

.footer-links a:hover {
  color: var(--white);
}

.footer-bottom {
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  padding-top: var(--spacing-md);
  text-align: center;
  color: var(--gray);
}

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

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

.fade-in-up {
  animation: fadeInUp 0.8s ease-out;
}

.fade-in {
  animation: fadeIn 0.6s ease-out;
}

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

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

/* ========== Responsive Design ========== */
@media (max-width: 768px) {
  .nav-menu {
    position: fixed;
    top: var(--header-height);
    left: -100%;
    width: 100%;
    height: calc(100vh - var(--header-height));
    background-color: var(--white);
    flex-direction: column;
    padding: var(--spacing-lg);
    gap: var(--spacing-sm);
    transition: left var(--transition-base);
    box-shadow: var(--shadow-lg);
  }

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

  .menu-toggle {
    display: flex;
  }

  .menu-toggle.active span:nth-child(1) {
    transform: rotate(45deg) translate(5px, 5px);
  }

  .menu-toggle.active span:nth-child(2) {
    opacity: 0;
  }

  .menu-toggle.active span:nth-child(3) {
    transform: rotate(-45deg) translate(7px, -6px);
  }

  .hero-cta {
    flex-direction: column;
    align-items: stretch;
  }

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

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

  .testimonial-results {
    flex-direction: column;
    gap: var(--spacing-sm);
  }
}

/* ========== Utility Classes ========== */
.text-center {
  text-align: center;
}

.text-primary {
  color: var(--primary-color);
}

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

.mt-sm { margin-top: var(--spacing-sm); }
.mt-md { margin-top: var(--spacing-md); }
.mt-lg { margin-top: var(--spacing-lg); }

.mb-sm { margin-bottom: var(--spacing-sm); }
.mb-md { margin-bottom: var(--spacing-md); }
.mb-lg { margin-bottom: var(--spacing-lg); }

.pt-sm { padding-top: var(--spacing-sm); }
.pt-md { padding-top: var(--spacing-md); }
.pt-lg { padding-top: var(--spacing-lg); }

.pb-sm { padding-bottom: var(--spacing-sm); }
.pb-md { padding-bottom: var(--spacing-md); }
.pb-lg { padding-bottom: var(--spacing-lg); }

/* ===================================
   Consulting Agent Modal Styles
   =================================== */

/* Modal Overlay */
.consult-modal {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.75);
  z-index: 10000;
  opacity: 0;
  transition: opacity 0.3s ease;
}

.consult-modal.active {
  display: flex;
  opacity: 1;
  align-items: center;
  justify-content: center;
}

/* Modal Content Container */
.consult-modal-content {
  position: relative;
  width: 95%;
  max-width: 1200px;
  height: 90vh;
  max-height: 900px;
  background: white;
  border-radius: 16px;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
  overflow: hidden;
  transform: scale(0.9);
  transition: transform 0.3s ease;
}

.consult-modal.active .consult-modal-content {
  transform: scale(1);
}

/* Close Button */
.consult-modal-close {
  position: absolute;
  top: 16px;
  right: 16px;
  width: 40px;
  height: 40px;
  background: rgba(0, 0, 0, 0.5);
  color: white;
  border: none;
  border-radius: 50%;
  font-size: 28px;
  line-height: 1;
  cursor: pointer;
  z-index: 10001;
  transition: all 0.2s ease;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0;
}

.consult-modal-close:hover {
  background: rgba(0, 0, 0, 0.8);
  transform: rotate(90deg);
}

/* Iframe Container */
.consult-modal-content iframe {
  width: 100%;
  height: 100%;
  border: none;
}

/* Responsive Adjustments */
@media (max-width: 768px) {
  .consult-modal-content {
    width: 100%;
    height: 100%;
    max-height: 100%;
    border-radius: 0;
  }

  .consult-modal-close {
    top: 10px;
    right: 10px;
    width: 36px;
    height: 36px;
    font-size: 24px;
  }
}

/* Loading State */
.consult-modal-content::before {
  content: 'Loading...';
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  font-size: 1.5rem;
  color: var(--primary-color, #0891B2);
  opacity: 0;
  transition: opacity 0.3s ease;
  pointer-events: none;
  z-index: 1;
}

.consult-modal.active .consult-modal-content:not(.loaded)::before {
  opacity: 1;
}

/* Animation for modal entrance */
@keyframes modalFadeIn {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

@keyframes modalSlideUp {
  from {
    transform: translateY(50px) scale(0.9);
  }
  to {
    transform: translateY(0) scale(1);
  }
}

.consult-modal.active {
  animation: modalFadeIn 0.3s ease;
}

.consult-modal.active .consult-modal-content {
  animation: modalSlideUp 0.3s ease;
}
