/*
Theme Name: DI Diagnostics
Theme URI: https://www.didiagnostics.com
Author: Dental Imaging Diagnostics LLC
Description: Clean, professional theme for Dental Imaging Diagnostics — built for clarity, trust, and easy portal integration.
Version: 1.0
License: GNU General Public License v2 or later
Text Domain: didiagnostics
*/

/* =============================================
   DESIGN TOKENS
   ============================================= */
:root {
  --navy:       #0B1F3A;
  --navy-mid:   #132D54;
  --teal:       #1A7F8E;
  --teal-light: #22A8BC;
  --cream:      #F8F6F1;
  --white:      #FFFFFF;
  --text:       #1C2B3A;
  --muted:      #5A6B7A;
  --border:     #D8E4EC;

  --font-head: 'Playfair Display', Georgia, serif;
  --font-body: 'DM Sans', 'Helvetica Neue', sans-serif;

  --radius:  8px;
  --radius-lg: 16px;
  --shadow:  0 4px 24px rgba(11,31,58,0.10);
  --shadow-lg: 0 12px 48px rgba(11,31,58,0.16);

  --max-w: 1180px;
  --transition: 0.25s ease;
}

/* =============================================
   RESET & BASE
   ============================================= */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

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

body {
  font-family: var(--font-body);
  color: var(--text);
  background: var(--white);
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}

img { max-width: 100%; height: auto; display: block; }
a { color: inherit; text-decoration: none; }
ul { list-style: none; }

h1, h2, h3, h4 {
  font-family: var(--font-head);
  line-height: 1.2;
  color: var(--navy);
}

p { color: var(--text); }

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

.section { padding: 80px 0; }
.section-sm { padding: 48px 0; }

/* =============================================
   HEADER / NAV
   ============================================= */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: var(--white);
  border-bottom: 1px solid var(--border);
  box-shadow: 0 2px 12px rgba(11,31,58,0.06);
}

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

.site-logo img {
  height: 48px;
  width: auto;
}
.site-logo span {
  font-family: var(--font-head);
  font-size: 1.1rem;
  color: var(--navy);
  font-weight: 700;
}

/* Primary nav */
.primary-nav { display: flex; align-items: center; gap: 8px; }

.primary-nav > li { position: relative; }

.primary-nav > li > a {
  display: block;
  padding: 8px 14px;
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--text);
  border-radius: var(--radius);
  transition: background var(--transition), color var(--transition);
  white-space: nowrap;
}
.primary-nav > li > a:hover,
.primary-nav > li.current-menu-item > a {
  background: var(--cream);
  color: var(--teal);
}

/* Dropdown */
.primary-nav .sub-menu {
  position: absolute;
  top: calc(100% + 8px);
  left: 0;
  min-width: 220px;
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  opacity: 0;
  pointer-events: none;
  transform: translateY(-6px);
  transition: opacity var(--transition), transform var(--transition);
  z-index: 200;
}
.primary-nav li:hover > .sub-menu {
  opacity: 1;
  pointer-events: auto;
  transform: translateY(0);
}
.primary-nav .sub-menu li a {
  display: block;
  padding: 10px 18px;
  font-size: 0.875rem;
  color: var(--text);
  transition: background var(--transition), color var(--transition);
}
.primary-nav .sub-menu li a:hover {
  background: var(--cream);
  color: var(--teal);
}

/* CTA buttons */
.header-ctas {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-left: 16px;
}

.btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 10px 20px;
  border-radius: var(--radius);
  font-family: var(--font-body);
  font-size: 0.875rem;
  font-weight: 600;
  cursor: pointer;
  transition: all var(--transition);
  border: 2px solid transparent;
  white-space: nowrap;
}
.btn-outline {
  border-color: var(--navy);
  color: var(--navy);
  background: transparent;
}
.btn-outline:hover {
  background: var(--navy);
  color: var(--white);
}
.btn-primary {
  background: var(--teal);
  color: var(--white);
  border-color: var(--teal);
}
.btn-primary:hover {
  background: var(--teal-light);
  border-color: var(--teal-light);
}
.btn-lg {
  padding: 14px 28px;
  font-size: 1rem;
}

/* Hamburger */
.nav-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 6px;
}
.nav-toggle span {
  display: block;
  width: 24px;
  height: 2px;
  background: var(--navy);
  border-radius: 2px;
  transition: all 0.3s ease;
}

/* =============================================
   HERO
   ============================================= */
.hero {
  background: linear-gradient(135deg, var(--navy) 0%, var(--navy-mid) 60%, #1a4a6e 100%);
  padding: 96px 0 80px;
  position: relative;
  overflow: hidden;
}

.hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background: url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cg fill='%23ffffff' fill-opacity='0.03'%3E%3Cpath d='M36 34v-4h-2v4h-4v2h4v4h2v-4h4v-2h-4zm0-30V0h-2v4h-4v2h4v4h2V6h4V4h-4zM6 34v-4H4v4H0v2h4v4h2v-4h4v-2H6zM6 4V0H4v4H0v2h4v4h2V6h4V4H6z'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E");
}

.hero-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 64px;
  align-items: center;
  position: relative;
}

.hero-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: rgba(26,127,142,0.2);
  border: 1px solid rgba(26,127,142,0.4);
  color: var(--teal-light);
  padding: 6px 14px;
  border-radius: 100px;
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  margin-bottom: 24px;
}
.hero-eyebrow::before {
  content: '';
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--teal-light);
}

.hero h1 {
  font-size: clamp(2.2rem, 4vw, 3.2rem);
  color: var(--white);
  margin-bottom: 20px;
  line-height: 1.15;
}

.hero-sub {
  font-size: 1.1rem;
  color: rgba(255,255,255,0.75);
  margin-bottom: 36px;
  max-width: 480px;
}

.hero-actions {
  display: flex;
  gap: 14px;
  flex-wrap: wrap;
}

.btn-hero-primary {
  background: var(--teal);
  color: var(--white);
  border-color: var(--teal);
  padding: 14px 28px;
  font-size: 1rem;
}
.btn-hero-primary:hover {
  background: var(--teal-light);
  border-color: var(--teal-light);
  transform: translateY(-1px);
  box-shadow: 0 6px 20px rgba(26,127,142,0.35);
}

.btn-hero-ghost {
  background: rgba(255,255,255,0.1);
  color: var(--white);
  border-color: rgba(255,255,255,0.3);
  padding: 14px 28px;
  font-size: 1rem;
}
.btn-hero-ghost:hover {
  background: rgba(255,255,255,0.18);
  border-color: rgba(255,255,255,0.5);
}

.hero-trust {
  display: flex;
  align-items: center;
  gap: 24px;
  margin-top: 40px;
  padding-top: 32px;
  border-top: 1px solid rgba(255,255,255,0.12);
}

.trust-item {
  display: flex;
  flex-direction: column;
}
.trust-item strong {
  font-family: var(--font-head);
  font-size: 1.6rem;
  color: var(--teal-light);
}
.trust-item span {
  font-size: 0.8rem;
  color: rgba(255,255,255,0.6);
  line-height: 1.3;
}
.trust-divider {
  width: 1px;
  height: 36px;
  background: rgba(255,255,255,0.15);
}

/* Hero visual card */
.hero-visual {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.portal-card {
  background: rgba(255,255,255,0.06);
  border: 1px solid rgba(255,255,255,0.12);
  border-radius: var(--radius-lg);
  padding: 28px;
  backdrop-filter: blur(8px);
}

.portal-card-title {
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--teal-light);
  margin-bottom: 16px;
}

.portal-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

.portal-action-btn {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  padding: 20px 16px;
  background: rgba(255,255,255,0.07);
  border: 1px solid rgba(255,255,255,0.1);
  border-radius: var(--radius);
  color: var(--white);
  font-size: 0.875rem;
  font-weight: 500;
  transition: all var(--transition);
  cursor: pointer;
  text-align: center;
}
.portal-action-btn:hover {
  background: rgba(26,127,142,0.25);
  border-color: rgba(26,127,142,0.5);
}
.portal-action-btn svg {
  width: 24px;
  height: 24px;
  color: var(--teal-light);
}

.contact-strip {
  display: flex;
  gap: 12px;
}
.contact-chip {
  flex: 1;
  display: flex;
  align-items: center;
  gap: 10px;
  background: rgba(255,255,255,0.06);
  border: 1px solid rgba(255,255,255,0.1);
  border-radius: var(--radius);
  padding: 14px 16px;
  color: rgba(255,255,255,0.8);
  font-size: 0.85rem;
  transition: all var(--transition);
}
.contact-chip:hover {
  background: rgba(255,255,255,0.1);
  color: var(--white);
}
.contact-chip svg { width: 16px; height: 16px; color: var(--teal-light); flex-shrink: 0; }

/* =============================================
   SERVICES
   ============================================= */
.services-section { background: var(--cream); }

.section-header {
  text-align: center;
  max-width: 560px;
  margin: 0 auto 52px;
}
.section-label {
  display: inline-block;
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--teal);
  margin-bottom: 12px;
}
.section-header h2 {
  font-size: clamp(1.8rem, 3vw, 2.4rem);
  margin-bottom: 14px;
}
.section-header p { color: var(--muted); font-size: 1.05rem; }

.services-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 20px;
}

.service-card {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 32px 24px;
  transition: all var(--transition);
  display: flex;
  flex-direction: column;
}
.service-card:hover {
  border-color: var(--teal);
  box-shadow: var(--shadow);
  transform: translateY(-3px);
}

.service-icon {
  width: 48px;
  height: 48px;
  background: rgba(26,127,142,0.1);
  border-radius: var(--radius);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 20px;
}
.service-icon svg { width: 24px; height: 24px; color: var(--teal); }

.service-card h3 {
  font-family: var(--font-head);
  font-size: 1.15rem;
  margin-bottom: 10px;
  color: var(--navy);
}
.service-card p {
  font-size: 0.9rem;
  color: var(--muted);
  flex: 1;
  margin-bottom: 20px;
}
.service-link {
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--teal);
  display: inline-flex;
  align-items: center;
  gap: 4px;
  transition: gap var(--transition);
}
.service-link:hover { gap: 8px; }

/* Ceph callout */
.ceph-callout {
  margin-top: 24px;
  background: linear-gradient(135deg, var(--navy) 0%, var(--navy-mid) 100%);
  border-radius: var(--radius-lg);
  padding: 32px 40px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}
.ceph-callout-text { color: var(--white); }
.ceph-callout-text span {
  display: block;
  font-size: 0.78rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--teal-light);
  font-weight: 700;
  margin-bottom: 8px;
}
.ceph-callout-text h3 {
  color: var(--white);
  font-size: 1.3rem;
  margin-bottom: 6px;
}
.ceph-callout-text p {
  color: rgba(255,255,255,0.7);
  font-size: 0.9rem;
}

/* =============================================
   HOW IT WORKS
   ============================================= */
.how-section { background: var(--white); }

.steps-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 0;
  position: relative;
}

.steps-grid::before {
  content: '';
  position: absolute;
  top: 28px;
  left: 12.5%;
  right: 12.5%;
  height: 2px;
  background: var(--border);
  z-index: 0;
}

.step {
  text-align: center;
  padding: 0 20px;
  position: relative;
  z-index: 1;
}

.step-num {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: var(--white);
  border: 2px solid var(--teal);
  color: var(--teal);
  font-family: var(--font-head);
  font-size: 1.3rem;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 20px;
}

.step h3 {
  font-size: 1rem;
  margin-bottom: 8px;
  color: var(--navy);
}
.step p { font-size: 0.875rem; color: var(--muted); }

/* =============================================
   REVIEWS / SOCIAL PROOF
   ============================================= */
.reviews-section { background: var(--cream); }

.reviews-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
}

.review-card {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 28px;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.stars {
  display: flex;
  gap: 3px;
  color: #F59E0B;
  font-size: 0.9rem;
}

.review-text {
  font-size: 0.95rem;
  color: var(--text);
  line-height: 1.7;
  flex: 1;
  font-style: italic;
}

.reviewer {
  display: flex;
  flex-direction: column;
}
.reviewer strong { font-size: 0.9rem; color: var(--navy); }
.reviewer span { font-size: 0.8rem; color: var(--muted); }

.reviews-cta {
  text-align: center;
  margin-top: 40px;
  display: flex;
  gap: 14px;
  justify-content: center;
}

/* =============================================
   TEAM STRIP
   ============================================= */
.team-section { background: var(--white); }

.team-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 24px;
  max-width: 760px;
  margin: 0 auto;
}

.team-card {
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 28px;
  display: flex;
  align-items: center;
  gap: 20px;
  transition: all var(--transition);
}
.team-card:hover {
  border-color: var(--teal);
  box-shadow: var(--shadow);
}

.team-avatar {
  width: 72px;
  height: 72px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--navy), var(--teal));
  flex-shrink: 0;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-family: var(--font-head);
  font-size: 1.5rem;
}
.team-avatar img { width: 100%; height: 100%; object-fit: cover; }

.team-info h3 { font-size: 1.05rem; color: var(--navy); margin-bottom: 4px; }
.team-info span {
  font-size: 0.82rem;
  color: var(--teal);
  font-weight: 600;
  display: block;
  margin-bottom: 6px;
}
.team-info p { font-size: 0.85rem; color: var(--muted); }

/* =============================================
   CONTACT
   ============================================= */
.contact-section { background: var(--navy); }

.contact-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 64px;
  align-items: start;
}

.contact-left h2 { color: var(--white); margin-bottom: 14px; }
.contact-left p { color: rgba(255,255,255,0.65); margin-bottom: 36px; }

.contact-items { display: flex; flex-direction: column; gap: 20px; }
.contact-item {
  display: flex;
  align-items: flex-start;
  gap: 14px;
}
.contact-item-icon {
  width: 40px;
  height: 40px;
  border-radius: var(--radius);
  background: rgba(26,127,142,0.2);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.contact-item-icon svg { width: 18px; height: 18px; color: var(--teal-light); }
.contact-item-text { display: flex; flex-direction: column; gap: 2px; }
.contact-item-text strong { color: var(--white); font-size: 0.9rem; }
.contact-item-text a, .contact-item-text span {
  color: rgba(255,255,255,0.65);
  font-size: 0.875rem;
}
.contact-item-text a:hover { color: var(--teal-light); }

/* Contact form */
.contact-form {
  background: var(--white);
  border-radius: var(--radius-lg);
  padding: 36px;
}
.contact-form h3 {
  font-size: 1.3rem;
  margin-bottom: 24px;
  color: var(--navy);
}

.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
}

.form-group {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-bottom: 14px;
}
.form-group label {
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--text);
}
.form-group input,
.form-group textarea,
.form-group select {
  font-family: var(--font-body);
  font-size: 0.9rem;
  padding: 10px 14px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  color: var(--text);
  background: var(--white);
  transition: border-color var(--transition);
  outline: none;
}
.form-group input:focus,
.form-group textarea:focus,
.form-group select:focus {
  border-color: var(--teal);
  box-shadow: 0 0 0 3px rgba(26,127,142,0.12);
}
.form-group textarea { resize: vertical; min-height: 100px; }

.form-submit { width: 100%; justify-content: center; }

/* =============================================
   FOOTER
   ============================================= */
.site-footer {
  background: #07142A;
  color: rgba(255,255,255,0.6);
  padding: 48px 0 32px;
}

.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: 40px;
  margin-bottom: 40px;
}

.footer-brand img { height: 44px; width: auto; margin-bottom: 14px; }
.footer-brand p { font-size: 0.875rem; line-height: 1.7; max-width: 280px; }

.footer-col h4 {
  font-family: var(--font-body);
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--white);
  margin-bottom: 16px;
}

.footer-links { display: flex; flex-direction: column; gap: 10px; }
.footer-links a {
  font-size: 0.875rem;
  color: rgba(255,255,255,0.55);
  transition: color var(--transition);
}
.footer-links a:hover { color: var(--teal-light); }

.footer-bottom {
  border-top: 1px solid rgba(255,255,255,0.1);
  padding-top: 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  font-size: 0.8rem;
  flex-wrap: wrap;
}
.footer-legal {
  display: flex;
  gap: 16px;
}
.footer-legal a { color: rgba(255,255,255,0.45); }
.footer-legal a:hover { color: var(--teal-light); }

/* =============================================
   MOBILE NAV OVERLAY
   ============================================= */
.mobile-nav {
  display: none;
  position: fixed;
  inset: 0;
  background: var(--white);
  z-index: 999;
  flex-direction: column;
  padding: 24px;
  overflow-y: auto;
}
.mobile-nav.open { display: flex; }

.mobile-nav-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 32px;
}
.mobile-nav-close {
  background: none;
  border: none;
  font-size: 1.5rem;
  cursor: pointer;
  color: var(--navy);
}

.mobile-nav-links { display: flex; flex-direction: column; gap: 0; }
.mobile-nav-links a {
  display: block;
  padding: 14px 0;
  border-bottom: 1px solid var(--border);
  font-size: 1.05rem;
  font-weight: 500;
  color: var(--navy);
}
.mobile-nav-ctas {
  margin-top: 32px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

/* =============================================
   RESPONSIVE
   ============================================= */
@media (max-width: 1024px) {
  .services-grid { grid-template-columns: repeat(2, 1fr); }
  .steps-grid { grid-template-columns: repeat(2, 1fr); }
  .steps-grid::before { display: none; }
  .step { margin-bottom: 32px; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 768px) {
  .primary-nav, .header-ctas { display: none; }
  .nav-toggle { display: flex; }

  .hero { padding: 60px 0 48px; }
  .hero-grid { grid-template-columns: 1fr; gap: 40px; }
  .hero-visual { display: none; }

  .services-grid { grid-template-columns: 1fr 1fr; }
  .steps-grid { grid-template-columns: 1fr 1fr; }
  .reviews-grid { grid-template-columns: 1fr; }
  .team-grid { grid-template-columns: 1fr; }
  .contact-grid { grid-template-columns: 1fr; gap: 40px; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .ceph-callout { flex-direction: column; align-items: flex-start; }
}

@media (max-width: 480px) {
  .services-grid { grid-template-columns: 1fr; }
  .portal-actions { grid-template-columns: 1fr; }
  .contact-strip { flex-direction: column; }
  .form-row { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr; }
  .hero-trust { flex-wrap: wrap; }
  .trust-divider { display: none; }
}

/* =============================================
   ANIMATIONS
   ============================================= */
@keyframes fadeUp {
  from { opacity: 0; transform: translateY(20px); }
  to   { opacity: 1; transform: translateY(0); }
}

.hero-content > * {
  animation: fadeUp 0.6s ease both;
}
.hero-content > *:nth-child(1) { animation-delay: 0.1s; }
.hero-content > *:nth-child(2) { animation-delay: 0.2s; }
.hero-content > *:nth-child(3) { animation-delay: 0.3s; }
.hero-content > *:nth-child(4) { animation-delay: 0.4s; }
.hero-content > *:nth-child(5) { animation-delay: 0.5s; }
