/*
  Carrollton Plumbing Service, Inc. — base styles
  Tailwind (compiled, purged, self-hosted) handles most layout; this file holds
  resets, accessibility helpers, the mobile sticky CTA bar, and blog prose styles.
*/

/* Screen-reader-only text (visually hidden, still announced) */
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

/* Base resets */
*, *::before, *::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  padding: 0;
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, sans-serif;
}

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

a {
  text-decoration: none;
}

/* Skip to content for accessibility */
.skip-link {
  position: absolute;
  top: -100px;
  left: 6px;
  z-index: 999;
  background: #0d9488;
  color: #fff;
  padding: 8px 16px;
  border-radius: 0 0 6px 6px;
  font-weight: 600;
  font-size: 14px;
  transition: top 0.2s;
}
.skip-link:focus {
  top: 0;
}

/* Mobile sticky CTA bar */
.mobile-cta-bar {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: 50;
  background: rgba(255,255,255,0.97);
  border-top: 1px solid #fed7aa;
  padding: 10px 12px;
}

@media (min-width: 768px) {
  .mobile-cta-bar {
    display: none !important;
  }
}

/* Services dropdown (hover on desktop) — replaces Tailwind group-hover combo */
.has-dropdown .dropdown-menu {
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.2s ease, visibility 0.2s ease;
}
.has-dropdown:hover .dropdown-menu,
.has-dropdown:focus-within .dropdown-menu,
.has-dropdown [aria-expanded="true"] + .dropdown-menu {
  opacity: 1;
  visibility: visible;
}

/* Homepage reviews rotator */
.review-slide {
  opacity: 1;
  transition: opacity 0.5s ease;
}
.review-slide[hidden] {
  display: none;
}
/* When JS is active it adds .is-active on show; start non-active slides faded
   so the fade-in reads. Slides without JS stay visible (no [hidden] removed). */
.review-slide:not(.is-active) {
  opacity: 0;
}
/* Progressive enhancement: if JS never runs, the server only un-hides slide 0,
   and the others keep [hidden], so this opacity rule never strands content. */

.review-dot {
  width: 9px;
  height: 9px;
  border-radius: 9999px;
  border: 0;
  padding: 0;
  background: #fed7aa;
  cursor: pointer;
  transition: background 0.2s ease, transform 0.2s ease;
}
.review-dot:hover {
  background: #fdba74;
}
.review-dot.is-active {
  background: #0d9488;
  transform: scale(1.25);
}

@media (prefers-reduced-motion: reduce) {
  .review-slide {
    transition: none;
  }
}

/* Prose content for blog posts / rich text pages */
.prose h2 {
  font-size: 1.5rem;
  font-weight: 600;
  color: #1c1917;
  margin-top: 2rem;
  margin-bottom: 0.75rem;
}
.prose h3 {
  font-size: 1.2rem;
  font-weight: 600;
  color: #1c1917;
  margin-top: 1.5rem;
  margin-bottom: 0.5rem;
}
.prose p {
  color: #57534e;
  line-height: 1.75;
  margin-bottom: 1rem;
}
.prose ul {
  list-style: disc;
  padding-left: 1.5rem;
  color: #57534e;
  margin-bottom: 1rem;
}
.prose ul li {
  margin-bottom: 0.4rem;
}
.prose a {
  color: #0d9488;
  text-decoration: underline;
}
.prose a:hover {
  color: #0f766e;
}
