/* =====================================================
   DR. JEREMY CHAMBERS - MAIN STYLESHEET
   Clean, modern design system
   ===================================================== */

/* ----- CSS Variables (Design Tokens) ----- */
:root {
  /* Colors */
  --teal: #0ccead;
  --teal-dark: #0ab89a;
  --teal-light: #4dd9c0;
  --blue-accent: #5b77a5;
  --blue-dark: #45607f;
  --dark: #1a1a2e;
  --dark-lighter: #2d2d44;
  --text: #333333;
  --text-light: #666666;
  --text-muted: #999999;
  --white: #ffffff;
  --gray-50: #f8f9fa;
  --gray-100: #f1f3f5;
  --gray-200: #e9ecef;
  --gray-300: #dee2e6;

  /* Shadows */
  --shadow-sm: 0 2px 4px rgba(0, 0, 0, 0.08);
  --shadow-md: 0 4px 12px rgba(0, 0, 0, 0.12);
  --shadow-lg: 0 8px 30px rgba(0, 0, 0, 0.15);
  --shadow-xl: 0 20px 50px rgba(0, 0, 0, 0.2);

  /* Border Radius */
  --radius-sm: 6px;
  --radius-md: 12px;
  --radius-lg: 20px;
  --radius-full: 9999px;

  /* Transitions */
  --transition-fast: 0.15s ease;
  --transition: 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  --transition-slow: 0.5s cubic-bezier(0.4, 0, 0.2, 1);

  /* Typography */
  --font-sans: 'Open Sans', -apple-system, BlinkMacSystemFont, sans-serif;
  --font-serif: 'Roboto Slab', Georgia, serif;
  --font-display: 'Playfair Display', Georgia, serif;

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

  /* Container */
  --container-max: 1200px;
  --container-narrow: 900px;
}

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

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

body {
  font-family: var(--font-sans);
  color: var(--text);
  line-height: 1.6;
  background: var(--white);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
}

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

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

ul, ol {
  list-style: none;
}

button {
  font-family: inherit;
  cursor: pointer;
  border: none;
  background: none;
}

/* ----- Typography ----- */
h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-serif);
  color: var(--dark);
  line-height: 1.2;
  font-weight: 700;
}

h1 { font-size: clamp(2.5rem, 5vw, 4rem); }
h2 { font-size: clamp(2rem, 4vw, 3rem); }
h3 { font-size: clamp(1.5rem, 3vw, 2rem); }
h4 { font-size: clamp(1.25rem, 2vw, 1.5rem); }

p {
  margin-bottom: 1rem;
}

.lead {
  font-size: 1.25rem;
  line-height: 1.7;
  color: var(--text-light);
}

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

.container-narrow {
  max-width: var(--container-narrow);
}

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

.section-sm {
  padding: var(--space-2xl) 0;
}

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

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 70px;
}

.logo img {
  height: 40px;
  width: auto;
}

.nav {
  display: flex;
  align-items: center;
  gap: var(--space-lg);
}

.nav a {
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--text);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  padding: var(--space-xs) 0;
  position: relative;
}

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

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

.nav a:hover,
.nav a.active {
  color: var(--teal);
}

/* Mobile Menu Button */
.menu-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  padding: 10px;
  cursor: pointer;
}

.menu-toggle span {
  width: 25px;
  height: 2px;
  background: var(--dark);
  transition: var(--transition);
}

/* ----- Buttons ----- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-xs);
  padding: 14px 32px;
  font-size: 0.9rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1px;
  border-radius: var(--radius-full);
  transition: var(--transition);
  cursor: pointer;
}

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

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

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

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

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

.btn-outline:hover {
  background: var(--teal);
  color: var(--white);
}

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

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

/* ----- Cards ----- */
.card {
  background: var(--white);
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-md);
  transition: var(--transition);
}

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

.card-image {
  position: relative;
  overflow: hidden;
  height: 250px;
}

.card-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: var(--transition-slow);
}

.card:hover .card-image img {
  transform: scale(1.1);
}

.card-body {
  padding: var(--space-lg);
}

.card-title {
  font-size: 1.25rem;
  margin-bottom: var(--space-sm);
}

.card-title a:hover {
  color: var(--teal);
}

/* ----- Section Titles ----- */
.section-title {
  text-align: center;
  margin-bottom: var(--space-xl);
}

.section-title h2 {
  margin-bottom: var(--space-sm);
  position: relative;
  display: inline-block;
}

.section-title h2::after {
  content: '';
  position: absolute;
  bottom: -10px;
  left: 50%;
  transform: translateX(-50%);
  width: 80px;
  height: 4px;
  background: linear-gradient(90deg, var(--teal), var(--blue-accent));
  border-radius: 2px;
}

.section-title p {
  color: var(--text-light);
  font-size: 1.1rem;
  max-width: 600px;
  margin: var(--space-md) auto 0;
}

/* ----- Badges ----- */
.badge {
  display: inline-block;
  padding: 6px 16px;
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1px;
  border-radius: var(--radius-full);
}

.badge-teal {
  background: var(--teal);
  color: var(--white);
}

.badge-blue {
  background: var(--blue-accent);
  color: var(--white);
}

/* ----- Footer ----- */
.footer {
  background: var(--dark);
  color: var(--white);
  padding: var(--space-xl) 0;
  text-align: center;
}

.footer a {
  color: var(--teal);
}

.footer a:hover {
  color: var(--teal-light);
}

/* ----- Utilities ----- */
.text-center { text-align: center; }
.text-left { text-align: left; }
.text-right { text-align: right; }

.text-white { color: var(--white); }
.text-teal { color: var(--teal); }
.text-muted { color: var(--text-muted); }

.bg-dark { background: var(--dark); }
.bg-blue { background: var(--blue-accent); }
.bg-gray { background: var(--gray-50); }
.bg-white { background: var(--white); }

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

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

/* ----- Grid ----- */
.grid {
  display: grid;
  gap: var(--space-lg);
}

.grid-2 { grid-template-columns: repeat(2, 1fr); }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.grid-4 { grid-template-columns: repeat(4, 1fr); }

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

/* ----- Flex ----- */
.flex { display: flex; }
.flex-wrap { flex-wrap: wrap; }
.items-center { align-items: center; }
.justify-center { justify-content: center; }
.justify-between { justify-content: space-between; }
.gap-sm { gap: var(--space-sm); }
.gap-md { gap: var(--space-md); }
.gap-lg { gap: var(--space-lg); }

/* =====================================================
   RESPONSIVE DESIGN
   ===================================================== */

/* Tablet (769px - 1024px) - Use hamburger menu */
@media (min-width: 769px) and (max-width: 1024px) {
  :root {
    --space-3xl: 4rem;
    --space-2xl: 3rem;
  }
  
  .container {
    padding: 0 var(--space-lg);
  }
  
  /* Show hamburger menu on all tablets */
  .header .nav {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: var(--white);
    flex-direction: column;
    padding: var(--space-md);
    box-shadow: var(--shadow-lg);
    gap: 0;
  }

  .header .nav.active {
    display: flex;
  }

  .header .nav a {
    padding: var(--space-sm);
    border-bottom: 1px solid var(--gray-200);
    width: 100%;
    text-align: center;
    font-size: 0.9rem;
  }

  .header .nav a::after {
    display: none;
  }

  .header .menu-toggle {
    display: flex;
  }
  
  .grid-4 { grid-template-columns: repeat(2, 1fr); }
  .grid-3 { grid-template-columns: repeat(2, 1fr); }
}

/* Desktop Navigation - Full size above 1024px */
@media (min-width: 1025px) {
  .header .nav {
    display: flex !important;
    visibility: visible !important;
    opacity: 1 !important;
    position: static !important;
    flex-direction: row !important;
    background: transparent !important;
    box-shadow: none !important;
    padding: 0 !important;
    gap: var(--space-lg);
  }
  
  .header .menu-toggle {
    display: none !important;
    visibility: hidden !important;
  }
}

/* Mobile Navigation - Below 768px */
@media (max-width: 768px) {
  :root {
    --space-3xl: 4rem;
    --space-2xl: 3rem;
  }

  .nav {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: var(--white);
    flex-direction: column;
    padding: var(--space-md);
    box-shadow: var(--shadow-lg);
    gap: 0;
  }

  .nav.active {
    display: flex;
  }

  .nav a {
    padding: var(--space-sm);
    border-bottom: 1px solid var(--gray-200);
    width: 100%;
    text-align: center;
  }

  .nav a::after {
    display: none;
  }

  .menu-toggle {
    display: flex;
  }

  .grid-2,
  .grid-3,
  .grid-4 {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 480px) {
  :root {
    --space-3xl: 3rem;
    --space-2xl: 2rem;
  }

  .btn {
    width: 100%;
    padding: 12px 24px;
  }
}

