/* Goel Law Professional Corporation — global styles */

html {
  scroll-behavior: smooth;
}

h1, h2, h3, h4, h5, h6 {
  font-family: 'Playfair Display', Georgia, serif;
}

/* Scroll-in fade/slide animation */
/* Offset anchor scroll (e.g. #contact-form) so the sticky header doesn't cover it */
#contact-form {
  scroll-margin-top: 100px;
}

/* Prevent iOS Safari from auto-zooming the page when a form field is focused.
   Any input/select/textarea under 16px triggers this on iPhone, which then
   leaves the page in a zoomed-in state that makes scrolling feel broken. */
input,
select,
textarea {
  font-size: 16px;
}
@media (min-width: 640px) {
  input,
  select,
  textarea {
    font-size: 0.875rem; /* restore the intended text-sm size on larger screens where iOS zoom doesn't apply */
  }
}

.reveal {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.7s ease, transform 0.7s ease;
}
.reveal.is-visible {
  opacity: 1;
  transform: translateY(0);
}
.reveal-delay-1 { transition-delay: 0.08s; }
.reveal-delay-2 { transition-delay: 0.16s; }
.reveal-delay-3 { transition-delay: 0.24s; }
.reveal-delay-4 { transition-delay: 0.32s; }
.reveal-delay-5 { transition-delay: 0.4s; }

/* Testimonial fade slider */
.testimonial-slide {
  display: none;
  opacity: 0;
  transition: opacity 0.5s ease;
}
.testimonial-slide.active {
  display: block;
  opacity: 1;
}

/* FAQ accordion */
.faq-answer {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.35s ease;
}
.faq-item.open .faq-answer {
  max-height: 400px;
}
.faq-item .faq-icon {
  transition: transform 0.3s ease;
}
.faq-item.open .faq-icon {
  transform: rotate(45deg);
}

/* Simple grayscale-on-hover image treatment for a monochrome brand feel */
.img-mono {
  filter: grayscale(100%) contrast(1.05);
}

::selection {
  background: #0A0A0A;
  color: #FFFFFF;
}

/* Mobile hamburger -> X animation */
#menuBtn .hamburger-line {
  transition: transform 0.3s ease, opacity 0.2s ease;
  transform-origin: center;
}
#menuBtn.is-active .hamburger-line-1 {
  transform: translateY(7px) rotate(45deg);
}
#menuBtn.is-active .hamburger-line-2 {
  opacity: 0;
}
#menuBtn.is-active .hamburger-line-3 {
  transform: translateY(-7px) rotate(-45deg);
}

/* Mobile menu: practice-area accordion chevron rotates when expanded */
.mobile-accordion-trigger[aria-expanded="true"] .mobile-accordion-chevron {
  transform: rotate(180deg);
}

/* Mobile menu: scrolls internally instead of the page behind it */
#mobileMenu {
  -webkit-overflow-scrolling: touch;
  overscroll-behavior: contain;
}

/* Lock background scroll while the mobile menu is open */
html.mobile-menu-open,
html.mobile-menu-open body {
  overflow: hidden;
  height: 100%;
}

/* ---------- Google reviews (fed by /api/reviews) ---------- */
[hidden] { display: none !important; }
.gr-track {
  display: flex;
  gap: 1.5rem;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  scrollbar-width: none;
  -webkit-overflow-scrolling: touch;
  padding: 2px; /* keeps card borders from clipping */
}
.gr-track::-webkit-scrollbar { display: none; }
.gr-track.is-centered { justify-content: center; }

.gr-card {
  flex: 0 0 88%;
  scroll-snap-align: start;
  display: flex;
  flex-direction: column;
  background: #FFFFFF;
  border: 1px solid #DADADA;
  padding: 1.75rem;
  text-align: left;
  transition: border-color 0.2s ease, box-shadow 0.3s ease;
}
.gr-card:hover {
  border-color: #0A0A0A;
  box-shadow: 0 2px 24px rgba(0, 0, 0, 0.06);
}
@media (min-width: 768px)  { .gr-card { flex-basis: calc((100% - 1.5rem) / 2); } }
@media (min-width: 1024px) { .gr-card { flex-basis: calc((100% - 3rem) / 3); } }

.gr-head { display: flex; align-items: center; gap: 0.75rem; margin-bottom: 1rem; }
.gr-avatar {
  width: 2.75rem; height: 2.75rem; flex: none;
  border-radius: 9999px; object-fit: cover;
  background: #0A0A0A; color: #FFFFFF;
  display: flex; align-items: center; justify-content: center;
  font-size: 0.95rem; font-weight: 500; letter-spacing: 0.02em;
}
.gr-name { display: block; font-size: 0.9rem; font-weight: 500; color: #0A0A0A; line-height: 1.25; }
a.gr-name:hover { text-decoration: underline; text-underline-offset: 3px; }
.gr-when { font-size: 0.75rem; color: #848484; margin-top: 2px; }
.gr-stars { display: inline-flex; gap: 2px; color: #0A0A0A; margin-bottom: 0.85rem; }
.gr-stars svg { width: 1rem; height: 1rem; }
.gr-stars .off { color: #DADADA; }
.gr-text {
  font-size: 0.95rem; line-height: 1.7; color: #3D3D3D;
  display: -webkit-box; -webkit-box-orient: vertical;
  -webkit-line-clamp: 7; overflow: hidden;
  white-space: pre-line;
}
.gr-text.is-open { display: block; -webkit-line-clamp: unset; overflow: visible; }
.gr-more {
  align-self: flex-start; margin-top: 0.6rem; padding: 0;
  font-size: 0.75rem; letter-spacing: 0.06em; text-transform: uppercase;
  color: #0A0A0A; text-decoration: underline; text-underline-offset: 4px;
  background: none; border: 0; cursor: pointer;
}
.gr-foot {
  margin-top: auto; padding-top: 1.25rem;
  font-size: 0.6875rem; letter-spacing: 0.08em; text-transform: uppercase; color: #848484;
}

.gr-nav {
  width: 2.75rem; height: 2.75rem;
  border: 1px solid #0A0A0A; color: #0A0A0A; background: #FFFFFF;
  display: inline-flex; align-items: center; justify-content: center;
  transition: background-color 0.2s ease, color 0.2s ease, opacity 0.2s ease;
  cursor: pointer;
}
.gr-nav:hover:not(:disabled) { background: #0A0A0A; color: #FFFFFF; }
.gr-nav:disabled { opacity: 0.3; cursor: default; }

/* loading skeleton */
.gr-skeleton {
  flex: 0 0 88%; height: 12rem; background: #F2F2F2; border: 1px solid #DADADA;
  animation: gr-pulse 1.4s ease-in-out infinite;
}
@media (min-width: 768px)  { .gr-skeleton { flex-basis: calc((100% - 1.5rem) / 2); } }
@media (min-width: 1024px) { .gr-skeleton { flex-basis: calc((100% - 3rem) / 3); } }
@keyframes gr-pulse { 50% { opacity: 0.5; } }
@media (prefers-reduced-motion: reduce) { .gr-skeleton { animation: none; } }
