/* ============================================
   DrGeorgeAI - AI for CPD Website
   Design system based on Australian medical
   professional website conventions
   ============================================ */

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

:root {
  /* Primary palette */
  --navy: #1A3A5C;
  --navy-dark: #0F2440;
  --teal: #2A9D8F;
  --teal-dark: #238377;
  --cta-blue: #0067B9;
  --cta-blue-hover: #005299;

  /* Backgrounds */
  --white: #FFFFFF;
  --gray-light: #F5F6F8;
  --teal-light: #E8F4F2;

  /* Text */
  --text-body: #374151;
  --text-heading: #1A3A5C;
  --text-muted: #6B7280;
  --text-white: #FFFFFF;

  /* Borders */
  --border-light: #E5E7EB;

  /* Spacing */
  --section-padding: 64px;
  --container-max: 1140px;

  /* Typography */
  --font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  --font-size-base: 16px;
  --line-height: 1.6;
}

html {
  font-size: var(--font-size-base);
  scroll-behavior: smooth;
}

/* --- Skip to Content --- */
.skip-link {
  position: absolute;
  top: -100%;
  left: 16px;
  z-index: 200;
  padding: 8px 16px;
  background-color: var(--navy);
  color: var(--white);
  font-weight: 600;
  text-decoration: none;
  border-radius: 0 0 6px 6px;
}

.skip-link:focus {
  top: 0;
  color: var(--white);
  text-decoration: none;
}

/* --- Focus Styles --- */
:focus-visible {
  outline: 3px solid var(--teal);
  outline-offset: 2px;
}

/* Respect prefers-reduced-motion */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
  html {
    scroll-behavior: auto;
  }
}

body {
  font-family: var(--font-family);
  font-size: 1rem;
  line-height: var(--line-height);
  color: var(--text-body);
  background-color: var(--white);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

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

a {
  color: var(--cta-blue);
  text-decoration: underline;
  transition: color 0.2s ease;
}

a:hover {
  color: var(--cta-blue-hover);
  text-decoration: underline;
}

h1, h2, h3, h4, h5, h6 {
  color: var(--text-heading);
  font-weight: 600;
  line-height: 1.3;
  margin-bottom: 0.5em;
}

h1 { font-size: 2.25rem; }
h2 { font-size: 1.75rem; }
h3 { font-size: 1.25rem; }

p {
  margin-bottom: 1rem;
}

ul, ol {
  margin-bottom: 1rem;
  padding-left: 1.5rem;
}

li {
  margin-bottom: 0.25rem;
}

/* --- Container --- */
.container {
  max-width: var(--container-max);
  margin: 0 auto;
  padding: 0 24px;
}

/* --- Section --- */
.section {
  padding: var(--section-padding) 0;
}

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

.section--teal-light {
  background-color: var(--teal-light);
}

.section--navy {
  background-color: var(--navy);
  color: var(--text-white);
}

.section--navy h2,
.section--navy h3 {
  color: var(--text-white);
}

.section-title {
  text-align: center;
  margin-bottom: 48px;
}

.section-subtitle {
  text-align: center;
  color: var(--text-muted);
  max-width: 640px;
  margin: -32px auto 48px;
}

/* --- Header / Navigation --- */
.site-header {
  background-color: var(--white);
  border-bottom: 1px solid var(--border-light);
  position: sticky;
  top: 0;
  z-index: 100;
}

.nav-wrapper {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 24px;
  max-width: var(--container-max);
  margin: 0 auto;
}

.site-logo {
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--navy);
  text-decoration: none !important;
}

.site-logo:hover {
  color: var(--navy);
  text-decoration: none !important;
}

.site-logo span {
  color: var(--teal);
}

/* Mobile menu toggle (checkbox hack) */
.nav-toggle {
  display: none;
}

.nav-toggle-label {
  display: none;
  cursor: pointer;
  padding: 8px;
}

.nav-toggle-label span,
.nav-toggle-label span::before,
.nav-toggle-label span::after {
  display: block;
  background: var(--navy);
  height: 2px;
  width: 24px;
  border-radius: 2px;
  position: relative;
  transition: all 0.3s ease;
}

.nav-toggle-label span::before,
.nav-toggle-label span::after {
  content: '';
  position: absolute;
}

.nav-toggle-label span::before {
  top: -7px;
}

.nav-toggle-label span::after {
  top: 7px;
}

.nav-toggle:checked + .nav-toggle-label span {
  background: transparent;
}

.nav-toggle:checked + .nav-toggle-label span::before {
  transform: rotate(45deg);
  top: 0;
}

.nav-toggle:checked + .nav-toggle-label span::after {
  transform: rotate(-45deg);
  top: 0;
}

.nav-menu {
  display: flex;
  list-style: none;
  gap: 32px;
  align-items: center;
  margin: 0;
  padding: 0;
}

.nav-menu a {
  color: var(--text-body);
  font-size: 0.9375rem;
  font-weight: 500;
  text-decoration: none !important;
  transition: color 0.2s ease;
}

.nav-menu a:hover,
.nav-menu a.active,
.nav-menu a[aria-current="page"] {
  color: var(--teal);
  text-decoration: none !important;
}

/* --- Hero Section --- */
.hero {
  background-color: var(--navy);
  color: var(--text-white);
  padding: 80px 0;
  text-align: center;
}

.hero h1 {
  color: var(--text-white);
  font-size: 2.5rem;
  font-weight: 700;
  max-width: 720px;
  margin: 0 auto 16px;
}

.hero .lead {
  font-size: 1.125rem;
  color: rgba(255, 255, 255, 0.85);
  max-width: 600px;
  margin: 0 auto 32px;
  line-height: 1.7;
}

.hero-cta {
  display: flex;
  gap: 16px;
  justify-content: center;
  flex-wrap: wrap;
}

/* --- Buttons --- */
.btn {
  display: inline-block;
  padding: 12px 28px;
  font-size: 1rem;
  font-weight: 600;
  border-radius: 6px;
  text-decoration: none;
  transition: all 0.2s ease;
  cursor: pointer;
  border: 2px solid transparent;
}

.btn,
.btn:hover {
  text-decoration: none !important;
}

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

.btn--primary:hover {
  background-color: var(--teal-dark);
  border-color: var(--teal-dark);
  color: var(--white);
}

.btn--outline {
  background-color: transparent;
  color: var(--white);
  border-color: rgba(255, 255, 255, 0.6);
}

.btn--outline:hover {
  background-color: rgba(255, 255, 255, 0.1);
  border-color: var(--white);
  color: var(--white);
}

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

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

.btn--blue {
  background-color: var(--cta-blue);
  color: var(--white);
  border-color: var(--cta-blue);
}

.btn--blue:hover {
  background-color: var(--cta-blue-hover);
  border-color: var(--cta-blue-hover);
  color: var(--white);
}

/* --- Card Grid --- */
.card-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}

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

.card {
  background-color: var(--white);
  border-radius: 8px;
  padding: 32px;
  border: 1px solid var(--border-light);
  transition: box-shadow 0.2s ease;
}

.card:hover {
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
}

.card h3 {
  margin-bottom: 12px;
}

.card p {
  color: var(--text-muted);
  font-size: 0.9375rem;
  margin-bottom: 0;
}

.card-icon {
  font-size: 2rem;
  margin-bottom: 16px;
  display: block;
}

/* --- Trust Signals (Home) --- */
.trust-card {
  text-align: center;
  padding: 40px 24px;
}

.trust-card .card-icon {
  width: 48px;
  height: 48px;
  background-color: var(--teal-light);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 20px;
  font-size: 1.25rem;
}

/* --- Use Case List (Tips Page) --- */
.use-case {
  background-color: var(--white);
  border-radius: 8px;
  padding: 32px;
  margin-bottom: 24px;
  border: 1px solid var(--border-light);
}

.use-case h3 {
  color: var(--navy);
  margin-bottom: 12px;
}

.use-case .prompt-example {
  background-color: var(--gray-light);
  border-left: 3px solid var(--teal);
  padding: 16px 20px;
  margin-top: 16px;
  border-radius: 0 6px 6px 0;
  font-size: 0.9375rem;
  color: var(--text-body);
}

.use-case .prompt-example strong {
  display: block;
  font-size: 0.8125rem;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 8px;
}

/* --- About Page --- */
.about-header {
  display: flex;
  gap: 48px;
  align-items: flex-start;
}

.about-photo {
  flex-shrink: 0;
  width: 200px;
  height: 200px;
  border-radius: 8px;
  background-color: var(--gray-light);
  border: 1px solid var(--border-light);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-muted);
  font-size: 0.875rem;
  text-align: center;
  overflow: hidden;
}

.about-photo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.about-content {
  flex: 1;
}

.about-content h2 {
  margin-bottom: 8px;
}

.about-content .role {
  color: var(--teal);
  font-size: 1.0625rem;
  font-weight: 500;
  margin-bottom: 24px;
}

.credentials-list {
  list-style: none;
  padding: 0;
  margin: 24px 0;
}

.credentials-list li {
  padding: 8px 0;
  padding-left: 24px;
  position: relative;
  border-bottom: 1px solid var(--border-light);
}

.credentials-list li::before {
  content: '';
  width: 8px;
  height: 8px;
  background-color: var(--teal);
  border-radius: 50%;
  position: absolute;
  left: 0;
  top: 16px;
}

/* --- Governance Page --- */
.governance-block {
  margin-bottom: 40px;
}

.governance-block h2 {
  padding-bottom: 12px;
  border-bottom: 2px solid var(--teal);
  margin-bottom: 20px;
}

.governance-highlight {
  background-color: var(--teal-light);
  border-radius: 8px;
  padding: 24px 32px;
  margin: 24px 0;
}

.governance-highlight p:last-child {
  margin-bottom: 0;
}

/* --- Exclusions Block --- */
.exclusions {
  background-color: var(--gray-light);
  border-radius: 8px;
  padding: 24px 32px;
  margin-top: 40px;
  font-size: 0.9375rem;
  color: var(--text-muted);
}

.exclusions strong {
  color: var(--text-body);
  display: block;
  margin-bottom: 8px;
}

/* --- Contact Section --- */
.contact-section {
  text-align: center;
}

.contact-form {
  max-width: 480px;
  margin: 0 auto;
  text-align: left;
}

.form-group {
  margin-bottom: 20px;
}

.form-group label {
  display: block;
  font-weight: 500;
  font-size: 0.9375rem;
  margin-bottom: 6px;
  color: var(--text-heading);
}

.form-group input,
.form-group textarea {
  width: 100%;
  padding: 10px 14px;
  border: 1px solid var(--border-light);
  border-radius: 6px;
  font-family: var(--font-family);
  font-size: 1rem;
  color: var(--text-body);
  transition: border-color 0.2s ease;
}

.form-group input:focus,
.form-group textarea:focus {
  border-color: var(--teal);
  box-shadow: 0 0 0 3px rgba(42, 157, 143, 0.15);
  outline: 3px solid var(--teal);
  outline-offset: 2px;
}

.form-group input:focus:not(:focus-visible),
.form-group textarea:focus:not(:focus-visible) {
  outline: none;
}

.form-group textarea {
  resize: vertical;
  min-height: 120px;
}

.contact-alt {
  margin-top: 24px;
  font-size: 0.9375rem;
  color: var(--text-muted);
}

/* --- Footer --- */
.site-footer {
  background-color: var(--navy-dark);
  color: rgba(255, 255, 255, 0.85);
  padding: 48px 0 24px;
  font-size: 0.875rem;
}

.footer-content {
  display: flex;
  justify-content: space-between;
  gap: 48px;
  margin-bottom: 32px;
}

.footer-section h4,
.footer-heading {
  color: var(--white);
  font-size: 0.9375rem;
  font-weight: 600;
  margin-bottom: 16px;
}

.footer-section ul {
  list-style: none;
  padding: 0;
  margin: 0;
}

.footer-section ul li {
  margin-bottom: 8px;
}

.footer-section a {
  color: rgba(255, 255, 255, 0.85);
  font-size: 0.875rem;
  text-decoration: none;
}

.footer-section a:hover {
  color: var(--white);
  text-decoration: underline;
}

.footer-acknowledgement {
  border-top: 1px solid rgba(255, 255, 255, 0.15);
  padding-top: 24px;
  margin-bottom: 16px;
  font-size: 0.8125rem;
  line-height: 1.6;
  color: rgba(255, 255, 255, 0.75);
}

.footer-bottom {
  border-top: 1px solid rgba(255, 255, 255, 0.15);
  padding-top: 16px;
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 8px;
  font-size: 0.8125rem;
  color: rgba(255, 255, 255, 0.75);
}

/* --- Page Header (for interior pages) --- */
.page-header {
  background-color: var(--navy);
  color: var(--text-white);
  padding: 48px 0;
  text-align: center;
}

.page-header h1 {
  color: var(--text-white);
  margin-bottom: 8px;
}

.page-header .lead {
  color: rgba(255, 255, 255, 0.8);
  font-size: 1.0625rem;
  max-width: 600px;
  margin: 0 auto;
}

/* --- CTA Banner --- */
.cta-banner {
  background-color: var(--navy);
  color: var(--text-white);
  text-align: center;
  padding: 48px 0;
}

.cta-banner h2 {
  color: var(--text-white);
  margin-bottom: 12px;
}

.cta-banner p {
  color: rgba(255, 255, 255, 0.8);
  margin-bottom: 24px;
}

/* --- Responsive Design --- */
@media (max-width: 768px) {
  :root {
    --section-padding: 48px;
  }

  .nav-toggle-label {
    display: block;
  }

  .nav-menu {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background-color: var(--white);
    flex-direction: column;
    padding: 16px 24px 24px;
    gap: 0;
    border-bottom: 1px solid var(--border-light);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
  }

  .nav-menu li {
    padding: 12px 0;
    border-bottom: 1px solid var(--border-light);
  }

  .nav-menu li:last-child {
    border-bottom: none;
  }

  .nav-toggle:checked ~ .nav-menu {
    display: flex;
  }

  .hero h1 {
    font-size: 1.75rem;
  }

  .hero {
    padding: 56px 0;
  }

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

  .card-grid--2 {
    grid-template-columns: 1fr;
  }

  .about-header {
    flex-direction: column;
    align-items: center;
    text-align: center;
  }

  .about-content {
    text-align: left;
  }

  .footer-content {
    flex-direction: column;
    gap: 32px;
  }

  .footer-bottom {
    flex-direction: column;
    text-align: center;
  }

  h1 { font-size: 1.75rem; }
  h2 { font-size: 1.5rem; }
}

@media (max-width: 480px) {
  :root {
    --section-padding: 36px;
  }

  .hero h1 {
    font-size: 1.5rem;
  }

  .hero .lead {
    font-size: 1rem;
  }

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

  .btn {
    width: 100%;
    text-align: center;
  }
}
