/* ============================================================
   Albany Eye Associates – Custom Styles
   Tailwind CSS loaded via pre-built file before this one.
   ============================================================ */

/* ---------- CSS Custom Properties ---------- */
:root {
  --navy:        #1a4f7a;
  --navy-dark:   #12344f;
  --blue:        #2176ae;
  --green:       #80cc28;
  --orange:      #f6a800;
  --light-bg:    #f4f7fb;
  --text:        #2d3748;
  --text-muted:  #4a5568;
  --border:      #e2e8f0;
  --font-display: ui-sans-serif, system-ui, -apple-system, sans-serif;
  --font-body:    ui-sans-serif, system-ui, -apple-system, sans-serif;
  --shadow-sm:   0 2px 12px rgba(0,0,0,0.08);
  --shadow-md:   0 6px 24px rgba(0,0,0,0.12);
  --shadow-lg:   0 14px 40px rgba(0,0,0,0.15);
  --ease:        cubic-bezier(0.4, 0, 0.2, 1);
  --radius:      10px;
}

/* ---------- Base ---------- */
html { scroll-behavior: smooth; }

body {
  font-family: var(--font-body);
  font-weight: 500;
  color: var(--text);
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3 {
  font-family: var(--font-display);
  font-weight: 900;
  letter-spacing: -0.01em;
}

/* ---------- Accessibility ---------- */
.skip-link {
  position: absolute;
  top: -100%;
  left: 0;
  background: var(--navy);
  color: #ffffff;
  padding: 0.75rem 1.5rem;
  font-weight: 700;
  z-index: 9999;
  text-decoration: none;
  border-bottom-right-radius: 8px;
  font-family: var(--font-body);
}
.skip-link:focus { top: 0; }

:focus-visible {
  outline: 3px solid var(--orange) !important;
  outline-offset: 3px !important;
}

/* ---------- Navbar ---------- */
.navbar-toggler-icon {
  display: inline-block;
  width: 24px;
  height: 24px;
  background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 30 30'%3e%3cpath stroke='%231a4f7a' stroke-linecap='round' stroke-miterlimit='10' stroke-width='2' d='M4 7h22M4 15h22M4 23h22'/%3e%3c/svg%3e");
  background-repeat: no-repeat;
  background-position: center;
  background-size: contain;
}

.nav-link {
  font-family: var(--font-body);
  font-size: 0.92rem;
  letter-spacing: 0.01em;
  transition: background 0.18s var(--ease), color 0.18s var(--ease);
}

/* ---------- Section Headings ---------- */
.section-title {
  font-family: var(--font-display);
  color: var(--navy);
  font-weight: 700;
  font-size: clamp(1.6rem, 3vw, 2.2rem);
}

.section-divider {
  width: 52px;
  height: 3px;
  background: linear-gradient(90deg, var(--blue) 0%, var(--green) 100%);
  border-radius: 2px;
  margin: 0.85rem auto 0;
}

.section-divider--left {
  margin-left: 0;
  margin-right: auto;
}

/* ---------- Hero ---------- */
.hero-lens {
  position: absolute;
  inset: 0;
  pointer-events: none;
  overflow: hidden;
}
.hero-lens::before {
  content: '';
  position: absolute;
  width: 650px;
  height: 650px;
  border-radius: 50%;
  border: 1px solid rgba(255,255,255,0.07);
  top: -280px;
  right: -120px;
}
.hero-lens::after {
  content: '';
  position: absolute;
  width: 420px;
  height: 420px;
  border-radius: 50%;
  border: 1px solid rgba(255,255,255,0.05);
  bottom: -180px;
  left: -80px;
}
.hero-lens-inner {
  position: absolute;
  width: 300px;
  height: 300px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(128,204,40,0.07) 0%, transparent 70%);
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
}

/* ---------- Stat Cards ---------- */
.stat-number {
  font-family: var(--font-display);
  font-size: 2.6rem;
  font-weight: 700;
  color: var(--orange);
  line-height: 1;
  letter-spacing: -0.02em;
  display: block;
}

/* ---------- Service Cards (homepage grid) ---------- */
.service-card-home {
  background: #ffffff;
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
  padding: 1.75rem;
  border-top: 3px solid var(--blue);
  transition: transform 0.22s var(--ease), box-shadow 0.22s var(--ease), border-top-color 0.22s var(--ease);
  height: 100%;
}
.service-card-home:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-md);
  border-top-color: var(--green);
}
.service-icon-wrap {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 52px;
  height: 52px;
  border-radius: 12px;
  background: linear-gradient(135deg, #dceefb 0%, #e8f5d0 100%);
  margin-bottom: 1rem;
  font-size: 1.4rem;
  line-height: 1;
}

/* ---------- Services Accordion ---------- */
details.service-card {
  background: #ffffff;
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
  border-left: 4px solid var(--blue);
  overflow: hidden;
  transition: box-shadow 0.22s var(--ease);
}
details.service-card[open] {
  box-shadow: var(--shadow-md);
  border-left-color: var(--navy);
}
details.service-card summary {
  display: flex; align-items: center; gap: 0.85rem;
  padding: 1.25rem 1.5rem;
  cursor: pointer; list-style: none; user-select: none;
  transition: background 0.15s var(--ease);
}
details.service-card summary::-webkit-details-marker { display: none; }
details.service-card summary:hover { background: #f4f7fb; }
details.service-card summary:focus-visible {
  outline: 3px solid var(--orange) !important; outline-offset: -3px !important;
}
.service-icon { font-size: 1.6rem; flex-shrink: 0; line-height: 1; }
.service-summary-text { flex: 1; }
.service-summary-text h3 { color: var(--navy); font-size: 1.05rem; margin: 0; line-height: 1.3; font-family: var(--font-display); }
.service-summary-text p { color: var(--text-muted); font-size: 0.85rem; margin: 0.2rem 0 0; }
.service-toggle {
  font-size: 1.4rem; font-weight: 300; color: var(--blue);
  flex-shrink: 0; transition: transform 0.22s var(--ease);
}
details.service-card[open] .service-toggle { transform: rotate(45deg); }
.service-body {
  padding: 1rem 1.5rem 1.5rem;
  border-top: 1px solid var(--border);
}
.service-body p { color: var(--text-muted); font-size: 0.93rem; line-height: 1.75; margin-bottom: 0.75rem; }
.service-body p:last-child { margin-bottom: 0; }
.service-body ul, .service-body ol { color: var(--text-muted); font-size: 0.93rem; padding-left: 1.25rem; margin-bottom: 0.75rem; line-height: 1.8; }
.service-body h4 { color: var(--navy); font-size: 0.95rem; margin: 0.85rem 0 0.35rem; font-family: var(--font-display); }

/* ---------- Doctor Cards ---------- */
.doctor-card {
  background: #ffffff;
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
  overflow: hidden;
  transition: box-shadow 0.22s var(--ease), transform 0.22s var(--ease);
  height: auto;
}
.doctor-card:hover {
  box-shadow: var(--shadow-md);
  transform: translateY(-2px);
}
details.doctor-card > summary { cursor: pointer; list-style: none; }
details.doctor-card > summary::-webkit-details-marker { display: none; }
details.doctor-card > summary:focus-visible { outline: 2px solid var(--green); outline-offset: -2px; }
.doctor-card-header {
  background: linear-gradient(135deg, #1a4f7a 0%, #2176ae 100%);
  padding: 1.5rem;
  display: flex;
  align-items: center;
  gap: 1rem;
  position: relative;
  overflow: hidden;
}
.doctor-card-header::after {
  content: '';
  position: absolute;
  width: 120px;
  height: 120px;
  border-radius: 50%;
  background: rgba(255,255,255,0.04);
  bottom: -40px;
  right: -20px;
  pointer-events: none;
}
.doctor-card-toggle {
  color: rgba(255,255,255,0.7);
  font-size: 1.5rem;
  font-weight: 300;
  line-height: 1;
  margin-left: auto;
  flex-shrink: 0;
  transition: transform 0.22s var(--ease), color 0.18s var(--ease);
}
.doctor-card:hover .doctor-card-toggle { color: rgba(255,255,255,0.95); }
details.doctor-card[open] .doctor-card-toggle { transform: rotate(45deg); }
.doctor-avatar {
  width: 80px; height: 80px;
  border-radius: 50%;
  background: rgba(255,255,255,0.15);
  display: flex; align-items: center; justify-content: center;
  font-size: 1.6rem; color: #ffffff;
  flex-shrink: 0; overflow: hidden;
  border: 2px solid rgba(255,255,255,0.3);
  box-shadow: 0 2px 12px rgba(0,0,0,0.2);
}
.doctor-avatar img {
  width: 100%; height: 100%;
  object-fit: cover; object-position: top center;
}
.doctor-card-header h3 {
  color: #ffffff;
  font-size: 1.05rem;
  line-height: 1.25;
  margin: 0;
  font-family: var(--font-display);
}
.doctor-card-header .credential {
  color: rgba(168,221,232,0.9);
  font-size: 0.8rem;
  margin-top: 0.25rem;
  font-family: var(--font-body);
}
.doctor-card-body { padding: 1.25rem 1.5rem; }
.doctor-card-body p { color: var(--text-muted); font-size: 0.93rem; line-height: 1.7; margin: 0 0 0.5rem; }
.doctor-bio-details { margin-top: 0.75rem; }
.doctor-bio-details dt {
  color: var(--navy);
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.07em;
  margin-top: 0.65rem;
  font-family: var(--font-body);
}
.doctor-bio-details dd {
  color: var(--text-muted);
  font-size: 0.88rem;
  margin: 0.15rem 0 0;
  line-height: 1.55;
}
.specialty-tag {
  display: inline-flex;
  align-items: center;
  background: #e8f4fd;
  color: var(--navy);
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.02em;
  padding: 0.3rem 0.75rem;
  border-radius: 20px;
  margin-top: 0.75rem;
  margin-right: 0.25rem;
  border: 1px solid rgba(33,118,174,0.15);
  font-family: var(--font-body);
}

/* ---------- Retired Doctors ---------- */
.retired-card {
  display: flex;
  gap: 2rem;
  align-items: flex-start;
  background: #ffffff;
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
  padding: 2rem;
  margin-bottom: 2rem;
  border-left: 4px solid var(--blue);
  transition: box-shadow 0.22s var(--ease);
}
.retired-card:hover { box-shadow: var(--shadow-md); }
.retired-photo {
  width: 160px; height: 160px;
  border-radius: 50%;
  object-fit: cover; object-position: top center;
  flex-shrink: 0;
  border: 3px solid var(--border);
  box-shadow: 0 2px 12px rgba(0,0,0,0.1);
}
.retired-info h3 {
  color: var(--navy);
  font-size: 1.4rem;
  margin-bottom: 0.25rem;
  font-family: var(--font-display);
}
.retired-info .credential {
  color: var(--text-muted);
  font-size: 0.92rem;
  font-style: italic;
  margin-bottom: 1rem;
}
.retired-info p { color: var(--text-muted); font-size: 0.97rem; line-height: 1.75; margin-bottom: 0.75rem; }

@media (max-width: 600px) {
  .retired-card { flex-direction: column; align-items: center; text-align: center; }
}

/* ---------- Hours Table ---------- */
.hours-table { width: 100%; border-collapse: collapse; font-size: 0.93rem; margin-top: 0.5rem; }
.hours-table th {
  text-align: left;
  color: var(--navy);
  font-weight: 600;
  padding: 0.4rem 0.6rem 0.4rem 0;
  border-bottom: 2px solid var(--border);
  font-family: var(--font-display);
  font-size: 0.88rem;
}
.hours-table td { padding: 0.4rem 0.6rem 0.4rem 0; color: var(--text-muted); border-bottom: 1px solid var(--border); vertical-align: top; }

/* ---------- Fade-in Animation ---------- */
@keyframes fadeInUp {
  from { opacity: 0; transform: translateY(18px); }
  to   { opacity: 1; transform: translateY(0); }
}
.fade-in-up {
  animation: fadeInUp 0.65s var(--ease) both;
}
.fade-in-up--delay-1 { animation-delay: 0.1s; }
.fade-in-up--delay-2 { animation-delay: 0.2s; }
.fade-in-up--delay-3 { animation-delay: 0.3s; }

/* ---------- Footer Links ---------- */
footer a {
  transition: color 0.18s var(--ease);
}
footer a:hover {
  color: #ffffff !important;
}

/* ---------- Print ---------- */
@media print {
  header, footer, .btn-primary, .btn-blue { display: none; }
  body { color: #000; background: #fff; }
}
