/* ═══════════════════════════════════════════════════════════════════
   Oak Dental Partners — Pediatric Dental Documentation Generator
   css/style.css
════════════════════════════════════════════════════════════════════ */

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

:root {
  --navy:        #1a2b4a;
  --navy-mid:    #2c3e63;
  --blue:        #2563a8;
  --blue-light:  #3474c0;
  --blue-pale:   #e8f0fb;
  --gray-900:    #111827;
  --gray-700:    #374151;
  --gray-500:    #6b7280;
  --gray-400:    #9ca3af;
  --gray-200:    #e5e7eb;
  --gray-100:    #f3f4f6;
  --gray-50:     #f9fafb;
  --white:       #ffffff;
  --shadow-sm:   0 1px 3px rgba(0,0,0,0.08), 0 1px 2px rgba(0,0,0,0.05);
  --shadow-md:   0 4px 12px rgba(0,0,0,0.10), 0 2px 6px rgba(0,0,0,0.06);
  --shadow-lg:   0 10px 30px rgba(0,0,0,0.12), 0 4px 12px rgba(0,0,0,0.08);
  --radius-sm:   8px;
  --radius-md:   12px;
  --radius-lg:   18px;
  --font:        'Inter', system-ui, -apple-system, sans-serif;
  --transition:  0.18s ease;
}

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

body {
  font-family: var(--font);
  background: var(--gray-50);
  color: var(--gray-900);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  -webkit-font-smoothing: antialiased;
}

/* ── Site Header ──────────────────────────────────────────────────── */
.site-header {
  background: var(--white);
  border-bottom: 1px solid var(--gray-200);
  padding: 20px 0 18px;
  box-shadow: var(--shadow-sm);
}

.header-inner {
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 32px;
  display: flex;
  align-items: center;
  gap: 28px;
  flex-wrap: wrap;
}

/* Brand / Logo */
.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-shrink: 0;
  text-decoration: none;
}

.brand-logo {
  width: 52px;
  height: 52px;
  flex-shrink: 0;
}

.brand-logo svg {
  width: 100%;
  height: 100%;
}

.brand-text {
  display: flex;
  flex-direction: column;
  line-height: 1.15;
}

.brand-name {
  font-size: 0.95rem;
  font-weight: 800;
  letter-spacing: 0.06em;
  color: var(--blue);
}

.brand-sub {
  font-size: 0.62rem;
  font-weight: 600;
  letter-spacing: 0.18em;
  color: var(--blue-light);
  text-transform: uppercase;
}

/* Divider between brand and title */
.header-inner::after {
  display: none; /* handled by gap */
}

/* Title block */
.header-title-block {
  flex: 1;
  min-width: 0;
}

.header-title {
  display: flex;
  align-items: center;
  gap: 10px;
}

.header-title-icon {
  font-size: 1.3rem;
  color: var(--blue);
  flex-shrink: 0;
}

.header-title h1 {
  font-size: 1.55rem;
  font-weight: 700;
  color: var(--navy);
  line-height: 1.2;
  letter-spacing: -0.01em;
}

.header-subtitle {
  margin-top: 5px;
  font-size: 0.875rem;
  color: var(--gray-500);
  font-weight: 400;
  padding-left: 2px;
}

/* ── Reference Buttons Bar ────────────────────────────────────────── */
.ref-bar {
  display: flex;
  justify-content: center;
  gap: 12px;
  padding: 22px 32px 0;
  flex-wrap: wrap;
}

.ref-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 9px 22px;
  background: var(--white);
  border: 1.5px solid var(--gray-200);
  border-radius: 100px;
  font-family: var(--font);
  font-size: 0.85rem;
  font-weight: 500;
  color: var(--gray-700);
  cursor: pointer;
  transition: all var(--transition);
  box-shadow: var(--shadow-sm);
  white-space: nowrap;
}

.ref-btn i {
  font-size: 0.82rem;
  color: var(--blue);
}

.ref-btn:hover {
  background: var(--blue-pale);
  border-color: var(--blue-light);
  color: var(--blue);
  box-shadow: var(--shadow-md);
  transform: translateY(-1px);
}

.ref-btn:active {
  transform: translateY(0);
  box-shadow: var(--shadow-sm);
}

/* ── Main Container ───────────────────────────────────────────────── */
.main-container {
  flex: 1;
  max-width: 1100px;
  margin: 0 auto;
  width: 100%;
  padding: 32px 32px 48px;
}

/* ── Tools Panel ──────────────────────────────────────────────────── */
.tools-panel {
  background: var(--white);
  border: 1px solid var(--gray-200);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-md);
  padding: 36px 36px 40px;
}

.tools-heading {
  text-align: center;
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--gray-900);
  margin-bottom: 30px;
  letter-spacing: -0.01em;
}

/* ── Tools Grid ───────────────────────────────────────────────────── */
.tools-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
}

/* Center the 2-card second row within a 4-column grid */
.tools-grid .tool-card:nth-child(5) { grid-column: 2; }
.tools-grid .tool-card:nth-child(6) { grid-column: 3; }

/* ── Tool Card ────────────────────────────────────────────────────── */
.tool-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 10px;
  padding: 28px 16px 24px;
  background: var(--white);
  border: 1.5px solid var(--gray-200);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-sm);
  cursor: pointer;
  transition: all var(--transition);
  font-family: var(--font);
  text-decoration: none;
  color: inherit;
  /* Reset button defaults */
  appearance: none;
  -webkit-appearance: none;
}

.tool-card:hover {
  border-color: var(--blue-light);
  box-shadow: var(--shadow-md);
  transform: translateY(-3px);
  background: var(--blue-pale);
}

.tool-card:hover .card-icon i {
  color: var(--blue);
}

.tool-card:active {
  transform: translateY(-1px);
  box-shadow: var(--shadow-sm);
}

.card-icon {
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.card-icon i {
  font-size: 1.45rem;
  color: var(--gray-500);
  transition: color var(--transition);
}

.card-title {
  font-size: 0.875rem;
  font-weight: 700;
  color: var(--gray-900);
  line-height: 1.3;
  letter-spacing: -0.005em;
}

.card-desc {
  font-size: 0.75rem;
  color: var(--gray-500);
  font-weight: 400;
  line-height: 1.4;
}



/* ── Modal Overlay ────────────────────────────────────────────────── */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(17, 24, 39, 0.55);
  backdrop-filter: blur(3px);
  -webkit-backdrop-filter: blur(3px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1000;
  padding: 24px;
  animation: fadeInOverlay 0.18s ease;
}

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

/* ── Modal Box ────────────────────────────────────────────────────── */
.modal-box {
  background: var(--white);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
  padding: 36px 36px 32px;
  width: 100%;
  max-width: 460px;
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  animation: slideUpModal 0.22s ease;
}

.modal-box.modal-wide {
  max-width: 580px;
}

@keyframes slideUpModal {
  from { opacity: 0; transform: translateY(16px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* Close button */
.modal-close {
  position: absolute;
  top: 16px;
  right: 16px;
  width: 32px;
  height: 32px;
  border: none;
  background: var(--gray-100);
  border-radius: 50%;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--gray-500);
  font-size: 0.85rem;
  transition: all var(--transition);
}

.modal-close:hover {
  background: var(--gray-200);
  color: var(--gray-900);
}

/* Coming-soon modal content */
.modal-coming-icon {
  width: 60px;
  height: 60px;
  background: var(--blue-pale);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 16px;
}

.modal-coming-icon i {
  font-size: 1.5rem;
  color: var(--blue);
}

.modal-coming-title {
  font-size: 1.2rem;
  font-weight: 700;
  color: var(--gray-900);
  margin-bottom: 8px;
}

.modal-coming-desc {
  font-size: 0.875rem;
  color: var(--gray-500);
  line-height: 1.5;
  margin-bottom: 24px;
}

/* Reference modal header row */
.modal-header-row {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 14px;
}

.modal-header-icon {
  font-size: 1.3rem;
  color: var(--blue);
}

.modal-header-row h2 {
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--gray-900);
}

.modal-placeholder-note {
  font-size: 0.82rem;
  color: var(--gray-400);
  margin-bottom: 18px;
  font-style: italic;
}

.ref-placeholder-block {
  width: 100%;
  padding: 28px 20px;
  background: var(--gray-50);
  border: 1.5px dashed var(--gray-200);
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  color: var(--gray-400);
  font-size: 0.875rem;
  margin-bottom: 24px;
}

.ref-placeholder-icon {
  font-size: 1.1rem;
}

/* OK / Close button */
.modal-ok-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 10px 32px;
  background: var(--blue);
  color: var(--white);
  border: none;
  border-radius: 100px;
  font-family: var(--font);
  font-size: 0.875rem;
  font-weight: 600;
  cursor: pointer;
  transition: all var(--transition);
  box-shadow: 0 2px 8px rgba(37,99,168,0.25);
}

.modal-ok-btn:hover {
  background: var(--blue-light);
  box-shadow: 0 4px 14px rgba(37,99,168,0.35);
  transform: translateY(-1px);
}

.modal-ok-btn:active {
  transform: translateY(0);
}

/* ── Site Footer ──────────────────────────────────────────────────── */
.site-footer {
  text-align: center;
  padding: 18px 32px;
  font-size: 0.75rem;
  color: var(--gray-400);
  border-top: 1px solid var(--gray-200);
  background: var(--white);
}

/* ── Responsive ───────────────────────────────────────────────────── */
@media (max-width: 900px) {
  .tools-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  .tools-grid::after {
    display: none;
  }
  .header-title h1 {
    font-size: 1.25rem;
  }
}

@media (max-width: 600px) {
  .header-inner {
    flex-direction: column;
    align-items: flex-start;
    gap: 12px;
    padding: 0 20px;
  }
  .header-title-block {
    width: 100%;
  }
  .header-title h1 {
    font-size: 1.1rem;
  }
  .tools-grid {
    grid-template-columns: 1fr;
  }
  .main-container {
    padding: 20px 16px 40px;
  }
  .tools-panel {
    padding: 24px 20px 28px;
  }
  .ref-bar {
    padding: 16px 20px 0;
    flex-direction: column;
    align-items: center;
  }
}
