/* ══════════════════════════════════════════
   LAYOUT — Lowcountry Pool House
   ══════════════════════════════════════════ */

/* ── Container ── */
.container {
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 2rem;
}

/* ── Section padding ── */
.section {
  padding: var(--space-xl) 0;
}

/* ══ NAV ══════════════════════════════════ */
#nav {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 1000;
  height: var(--nav-height);
  min-height: 56px;
  display: flex;
  align-items: center;
  transition: background 0.4s ease, box-shadow 0.4s ease, backdrop-filter 0.4s ease;
}

#nav.scrolled {
  background: rgba(10, 60, 72, 0.95);
  box-shadow: 0 2px 24px rgba(0,0,0,0.5);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}

.nav-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
}

.nav-logo {
  display: flex;
  align-items: center;
  text-decoration: none;
}

.nav-logo img {
  height: 40px;
  width: auto;
  display: block;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 2.25rem;
}

.nav-links a {
  font-size: 0.875rem;
  font-weight: 500;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--color-text-muted);
  transition: color var(--duration-fast);
}

.nav-links a:hover {
  color: var(--color-text-primary);
}

.nav-right {
  display: flex;
  align-items: center;
  gap: 1.5rem;
}

/* ── Hamburger ── */
.hamburger {
  display: none;
  width: 28px;
  height: 20px;
  min-height: 44px;
  cursor: pointer;
  background: none;
  border: none;
  padding: 0;
  position: relative;
  align-items: center;
  justify-content: center;
}

.hamburger span {
  position: absolute;
  left: 0;
  width: 100%;
  height: 2px;
  background: var(--color-text-primary);
  border-radius: 2px;
  transition: transform 0.3s ease, opacity 0.3s ease;
}

.hamburger span:nth-child(1) { top: calc(50% - 10px); }
.hamburger span:nth-child(2) { top: calc(50% - 1px); }
.hamburger span:nth-child(3) { top: calc(50% + 8px); }

.hamburger.is-open span:nth-child(1) {
  transform: translateY(9px) rotate(45deg);
}
.hamburger.is-open span:nth-child(2) {
  opacity: 0;
}
.hamburger.is-open span:nth-child(3) {
  transform: translateY(-9px) rotate(-45deg);
}

/* ── Mobile Overlay ── */
.mobile-overlay {
  display: flex;
  position: fixed;
  top: 0; left: 0;
  width: 100vw;
  height: 100dvh;
  z-index: 999;
  background: rgba(9, 48, 58, 0.98);
  flex-direction: column;
  justify-content: center;
  gap: clamp(1rem, 3vh, 2.5rem);
  padding: clamp(1.5rem, 5vh, 3rem) 0;
  overflow-y: auto;
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  transform: translateX(-100%);
  transition: transform 0.65s cubic-bezier(0.22, 1, 0.36, 1);
  pointer-events: none;
}

.mobile-overlay.is-open {
  transform: translateX(0);
  pointer-events: all;
}

.mobile-overlay a {
  font-family: var(--font-heading);
  font-size: clamp(2.8rem, 11vw, 4.5rem);
  font-weight: 800;
  letter-spacing: 0.03em;
  color: var(--color-text-primary);
  text-align: center;
  width: 100%;
  transition: color var(--duration-fast);
  opacity: 0;
  transform: translateX(-30px);
  flex-shrink: 0;
  transition: color var(--duration-fast), opacity 0.4s var(--ease-out), transform 0.4s var(--ease-out);
}

.mobile-overlay.is-open a {
  opacity: 1;
  transform: translateX(0);
}

.mobile-overlay a:hover {
  color: var(--color-accent);
}

/* ══ HERO ═════════════════════════════════ */
.hero {
  position: relative;
  min-height: 100svh;
  display: flex;
  align-items: center;
  overflow: hidden;
}

.hero-bg {
  position: absolute;
  inset: 0;
  background-size: cover;
  background-position: center;
  will-change: transform;
  overflow: hidden;
}

/* Full-cover video background — mirrors uk-cover behavior */
.hero-video {
  position: absolute;
  top: 50%;
  left: 50%;
  min-width: 100%;
  min-height: 100%;
  width: auto;
  height: auto;
  transform: translate(-50%, -50%);
  object-fit: cover;
  pointer-events: none;
}

.hero-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(
    135deg,
    rgba(8, 40, 52, 0.92) 0%,
    rgba(12, 80, 100, 0.75) 40%,
    rgba(18, 100, 120, 0.65) 65%,
    rgba(8, 40, 52, 0.88) 100%
  );
}

.hero-particles {
  position: absolute;
  inset: 0;
  pointer-events: none;
  overflow: hidden;
}

.hero-content {
  position: relative;
  z-index: 2;
  width: 100%;
  padding-top: var(--nav-height);
  padding-bottom: 6rem;
}

.hero-eyebrow {
  font-size: 0.8rem;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--color-accent);
  margin-bottom: 1.25rem;
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.hero-eyebrow::before {
  content: '';
  display: inline-block;
  width: 32px;
  height: 2px;
  background: var(--color-accent);
}

.hero-title {
  font-family: var(--font-heading);
  font-size: clamp(3.5rem, 9vw, 9rem);
  font-weight: 900;
  line-height: 0.95;
  color: var(--color-text-primary);
  margin-bottom: 1.75rem;
  text-transform: uppercase;
}

.hero-title-line1,
.hero-title-line2 {
  display: block;
}

.hero-title-line2 {
  color: var(--color-accent);
}

.hero-sub {
  font-size: clamp(1rem, 2vw, 1.2rem);
  color: var(--color-text-muted);
  max-width: 560px;
  line-height: 1.75;
  margin-bottom: 2.5rem;
}

.hero-ctas {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
}

.hero-scroll-hint {
  position: absolute;
  bottom: 2.5rem;
  left: 50%;
  transform: translateX(-50%);
  z-index: 2;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.5rem;
  color: var(--color-text-muted);
  font-size: 0.7rem;
  letter-spacing: 0.15em;
  text-transform: uppercase;
}

.scroll-line {
  width: 1px;
  height: 48px;
  background: linear-gradient(to bottom, var(--color-accent), transparent);
  animation: scrollLine 1.6s ease-in-out infinite;
}

/* ══ ABOUT ════════════════════════════════ */
.about-section {
  background: var(--color-bg-mid);
}

.about-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 5rem;
  align-items: center;
}

.about-label {
  font-size: 0.75rem;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--color-accent-warm);
  margin-bottom: 1rem;
  display: block;
}

.about-heading {
  font-size: clamp(2.5rem, 5vw, 4rem);
  font-weight: 800;
  color: var(--color-text-primary);
  margin-bottom: 1.5rem;
  line-height: 1.05;
}

.about-body {
  color: var(--color-text-muted);
  font-size: 1.0625rem;
  line-height: 1.8;
  margin-bottom: 2.5rem;
}

.about-body p + p {
  margin-top: 1rem;
}

.about-stats {
  display: flex;
  gap: 3rem;
  flex-wrap: wrap;
}

.stat-item {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}

.stat-number {
  font-family: var(--font-heading);
  font-size: 3.25rem;
  font-weight: 900;
  color: var(--color-accent);
  line-height: 1;
  text-shadow: var(--glow-accent);
}

.stat-label {
  font-size: 0.78rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--color-text-muted);
}

.about-visual {
  position: relative;
}

.about-img-wrap {
  border-radius: var(--radius-lg);
  overflow: hidden;
  aspect-ratio: 4/5;
  background: var(--color-bg-light);
  position: relative;
  border: 2px solid rgba(147,250,135,0.25);
  box-shadow: 0 0 40px rgba(147,250,135,0.15);
}

.about-img-wrap img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.about-badge {
  position: absolute;
  bottom: 2rem;
  left: -2rem;
  background: var(--color-accent);
  color: var(--color-text-dark);
  padding: 1rem 1.5rem;
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-card), var(--glow-accent);
}

.about-badge-label {
  font-size: 0.7rem;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  opacity: 0.7;
  font-weight: 600;
}

.about-badge-value {
  font-family: var(--font-heading);
  font-size: 1.6rem;
  font-weight: 800;
  line-height: 1.1;
  color: var(--color-text-dark);
}

/* ══ SECTION HEADER ═══════════════════════ */
.section-header {
  margin-bottom: 3.5rem;
}

.section-label {
  font-size: 0.75rem;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--color-accent-warm);
  margin-bottom: 0.75rem;
  display: block;
}

.section-heading {
  font-family: var(--font-heading);
  font-size: clamp(2.2rem, 4.5vw, 3.75rem);
  font-weight: 800;
  color: var(--color-text-primary);
  margin-bottom: 0.75rem;
  line-height: 1.05;
}

.section-sub {
  color: var(--color-text-muted);
  font-size: 1rem;
  max-width: 520px;
  line-height: 1.7;
}

/* ══ SERVICES / TABS ══════════════════════ */
.services-section {
  background: var(--color-bg-primary);
}

.tabs-nav {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
  margin-bottom: 2.5rem;
  border-bottom: 1px solid var(--color-border-dim);
  padding-bottom: 0;
}

.tab-btn {
  font-family: var(--font-body);
  font-size: 0.875rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--color-text-muted);
  background: none;
  border: none;
  padding: 0.75rem 1.5rem;
  cursor: pointer;
  position: relative;
  transition: color var(--duration-fast);
  border-bottom: 2px solid transparent;
  margin-bottom: -1px;
}

.tab-btn::after {
  content: '';
  position: absolute;
  bottom: -1px; left: 0; right: 0;
  height: 2px;
  background: var(--color-accent);
  transform: scaleX(0);
  transition: transform var(--duration-normal) var(--ease-out);
}

.tab-btn.active,
.tab-btn:hover {
  color: var(--color-text-primary);
}

.tab-btn.active::after {
  transform: scaleX(1);
}

.tab-panel {
  display: none;
}

.tab-panel.active {
  display: grid;
  grid-template-columns: 1fr 1.2fr;
  gap: 4rem;
  align-items: center;
}

.tab-panel-content {
  display: flex;
  flex-direction: column;
}

.tab-panel-icon {
  font-size: 2.5rem;
  color: var(--color-accent);
  margin-bottom: 1.25rem;
  display: block;
}

.tab-panel h3 {
  font-size: clamp(1.8rem, 3vw, 2.75rem);
  font-weight: 800;
  color: var(--color-text-primary);
  margin-bottom: 1rem;
  line-height: 1.1;
}

.tab-panel p {
  color: var(--color-text-muted);
  line-height: 1.8;
  margin-bottom: 1.5rem;
}

.tab-panel ul {
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
  margin-bottom: 2rem;
}

.tab-panel ul li {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  color: var(--color-text-muted);
  font-size: 0.95rem;
}

.tab-panel ul li i {
  color: var(--color-accent);
  font-size: 1rem;
  flex-shrink: 0;
}

.tab-panel-visual {
  border-radius: var(--radius-lg);
  overflow: hidden;
  aspect-ratio: 16/10;
  background: var(--color-bg-light);
  border: 1px solid var(--color-border-dim);
}

.tab-panel-visual img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* ══ GALLERY ══════════════════════════════ */
.gallery-section {
  background: var(--color-bg-mid);
}

.gallery-track-wrap {
  overflow: hidden;
  border-radius: var(--radius-lg);
  position: relative;
  touch-action: pan-y;
  /* Peek: show a sliver of the next card so users know they can swipe */
  margin: 0 -1rem;
  padding: 0 1rem;
}

.gallery-track {
  display: flex;
  gap: 1.25rem;
  transition: transform 0.55s cubic-bezier(0.22, 1, 0.36, 1);
}

/* Desktop: show 3 cards */
.gallery-card {
  min-width: calc(33.333% - 0.875rem);
  flex-shrink: 0;
  border-radius: var(--radius-md);
  overflow: hidden;
  background: var(--color-bg-light);
  border: 1px solid var(--color-border-dim);
  transition: transform var(--duration-normal), box-shadow var(--duration-normal);
}

.gallery-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-strong);
}

.gallery-card figure {
  position: relative;
}

.gallery-card img {
  width: 100%;
  aspect-ratio: 4/3;
  object-fit: cover;
  display: block;
}

/* Caption as gradient overlay */
.gallery-card figcaption {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  padding: 2rem 1.25rem 1rem;
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #fff;
  background: linear-gradient(to top, rgba(0,0,0,0.72) 0%, transparent 100%);
}

.gallery-card figcaption i {
  margin-right: 0.35rem;
  color: var(--color-accent);
}

/* Controls row */
.gallery-controls {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 1rem;
  margin-top: 1.75rem;
  flex-wrap: nowrap;
}

.gallery-prev,
.gallery-next {
  width: 48px;
  height: 48px;
  min-width: 48px;  /* prevent flex shrink distorting the circle */
  min-height: unset;
  border-radius: 50%;
  border: 1.5px solid var(--color-border);
  background: rgba(147,250,135,0.08);
  color: var(--color-text-primary);
  font-size: 1.1rem;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  flex-shrink: 0;
  transition: background var(--duration-fast), border-color var(--duration-fast), transform var(--duration-fast);
}

.gallery-prev:hover,
.gallery-next:hover {
  background: var(--color-accent);
  border-color: var(--color-accent);
  color: var(--color-text-dark);
  transform: scale(1.08);
}

.gallery-prev:disabled,
.gallery-next:disabled {
  opacity: 0.3;
  cursor: default;
  transform: none;
}

.gallery-counter {
  font-size: 0.875rem;
  color: var(--color-text-muted);
  letter-spacing: 0.1em;
}

/* ── Gallery dot indicators ── */
.gallery-dots {
  display: flex;
  justify-content: center;
  gap: 0.5rem;
  margin-top: 1.25rem;
}
.gallery-dot {
  width: 8px;
  height: 8px;
  min-width: 8px;  /* stop flex from stretching dots */
  min-height: 8px;
  border-radius: 50%;
  border: none;
  background: var(--color-border-dim);
  cursor: pointer;
  padding: 0;
  flex-shrink: 0;
  transition: background 0.3s, transform 0.3s;
}
.gallery-dot.is-active {
  background: var(--color-accent);
  transform: scale(1.3);
}

/* ══ TESTIMONIALS ═════════════════════════ */
.reviews-section {
  background: var(--color-bg-deep);
}

.testimonials-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1.5rem;
}

.testimonial-card {
  background: var(--color-bg-mid);
  border: 1px solid var(--color-border-dim);
  border-radius: var(--radius-lg);
  padding: 2rem;
  display: flex;
  flex-direction: column;
  gap: 1rem;
  transition: border-color var(--duration-normal), box-shadow var(--duration-normal);
}

.testimonial-card:hover {
  border-color: rgba(147,250,135,0.35);
  box-shadow: var(--shadow-card);
}

.testimonial-stars {
  display: flex;
  gap: 0.2rem;
  color: var(--color-accent);
  font-size: 0.9rem;
}

.testimonial-quote {
  color: var(--color-text-muted);
  font-size: 0.975rem;
  line-height: 1.75;
  font-style: italic;
  flex: 1;
}

.testimonial-author {
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
}

.testimonial-name {
  font-weight: 700;
  font-size: 0.9rem;
  color: var(--color-text-primary);
}

.testimonial-city {
  font-size: 0.78rem;
  color: var(--color-accent-warm);
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

/* ══ CONTACT ══════════════════════════════ */
.contact-section {
  background: var(--color-bg-primary);
}

.contact-grid {
  display: grid;
  grid-template-columns: 1fr 1.4fr;
  gap: 5rem;
  align-items: start;
}

.contact-info h2 {
  font-size: clamp(2.2rem, 4vw, 3.5rem);
  font-weight: 800;
  color: var(--color-text-primary);
  margin-bottom: 1rem;
  line-height: 1.1;
}

.contact-info p {
  color: var(--color-text-muted);
  line-height: 1.7;
  margin-bottom: 2rem;
}

.contact-detail {
  display: flex;
  align-items: flex-start;
  gap: 0.85rem;
  margin-bottom: 1.25rem;
  color: var(--color-text-muted);
  font-size: 0.95rem;
}

.contact-detail i {
  color: var(--color-accent);
  font-size: 1.2rem;
  margin-top: 0.1rem;
  flex-shrink: 0;
}

.contact-detail a {
  color: var(--color-text-muted);
  transition: color var(--duration-fast);
}

.contact-detail a:hover {
  color: var(--color-accent);
}

.contact-hours {
  margin-top: 2rem;
  padding-top: 1.5rem;
  border-top: 1px solid var(--color-border-dim);
}

.contact-hours h4 {
  font-size: 0.75rem;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--color-accent-warm);
  margin-bottom: 0.75rem;
}

.contact-hours p {
  font-size: 0.9rem;
  margin-bottom: 0;
  color: var(--color-text-muted);
}

/* ── Contact Form ── */
.contact-form {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

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

.form-group {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
}

.form-group label {
  font-size: 0.78rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--color-text-muted);
  font-weight: 600;
}

.form-group input,
.form-group textarea {
  background: rgba(255,255,255,0.06);
  border: 1px solid var(--color-border-dim);
  border-radius: var(--radius-md);
  padding: 0.85rem 1rem;
  color: var(--color-text-primary);
  font-size: 0.95rem;
  transition: border-color var(--duration-fast), background var(--duration-fast);
  outline: none;
  min-height: 44px;
}

.form-group textarea {
  resize: vertical;
  min-height: 130px;
}

.form-group input:focus,
.form-group textarea:focus {
  border-color: var(--color-accent);
  background: rgba(147,250,135,0.05);
}

.form-group input::placeholder,
.form-group textarea::placeholder {
  color: rgba(168,221,232,0.4);
}

/* ══ FOOTER ═══════════════════════════════ */
footer {
  background: var(--color-bg-deep);
  padding: var(--space-lg) 0 0;
}

.footer-inner {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr;
  gap: 3rem;
  padding-bottom: 3rem;
  border-bottom: 1px solid var(--color-border-dim);
}

.footer-brand {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.footer-logo img {
  height: 36px;
  width: auto;
}

.footer-tagline {
  color: var(--color-text-muted);
  font-size: 0.9rem;
  line-height: 1.6;
  max-width: 260px;
}

.footer-socials {
  display: flex;
  gap: 0.75rem;
  margin-top: 0.5rem;
}

.footer-socials a {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  border: 1px solid var(--color-border-dim);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1rem;
  color: var(--color-text-muted);
  transition: background var(--duration-fast), color var(--duration-fast), border-color var(--duration-fast);
}

.footer-socials a:hover {
  background: var(--color-accent);
  color: var(--color-text-dark);
  border-color: var(--color-accent);
}

.footer-col h4 {
  font-size: 0.75rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--color-accent-warm);
  margin-bottom: 1.25rem;
  font-weight: 600;
}

.footer-col ul {
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
}

.footer-col ul li a {
  font-size: 0.9rem;
  color: var(--color-text-muted);
  transition: color var(--duration-fast);
}

.footer-col ul li a:hover {
  color: var(--color-accent);
}

.footer-col p {
  font-size: 0.9rem;
  color: var(--color-text-muted);
  line-height: 1.7;
}

.footer-bottom {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1.5rem 0;
  flex-wrap: wrap;
  gap: 1rem;
}

.footer-copy {
  font-size: 0.8rem;
  color: var(--color-text-muted);
  opacity: 0.6;
}

/* ══ RESPONSIVE ═══════════════════════════ */
@media (max-width: 1024px) {
  .about-grid {
    grid-template-columns: 1fr;
    gap: 3rem;
  }
  .about-visual {
    max-width: 480px;
    margin: 0 auto;
  }
  .tab-panel.active {
    grid-template-columns: 1fr;
    gap: 2rem;
  }
  .tab-panel-visual {
    max-height: 280px;
  }
  .contact-grid {
    grid-template-columns: 1fr;
    gap: 3rem;
  }
  .testimonials-grid {
    grid-template-columns: 1fr;
  }
  .footer-inner {
    grid-template-columns: 1fr 1fr;
  }
}

@media (max-width: 768px) {
  .nav-links {
    display: none;
  }
  .hamburger {
    display: flex;
  }
  .btn-nav-cta {
    display: none;
  }
  .section {
    padding: 4.5rem 0;
  }
  .gallery-card {
    /* ~85% wide so the next card peeks at right — visual swipe hint */
    min-width: calc(85% - 0.75rem);
    width: calc(85% - 0.75rem);
  }
  /* Keep images a sensible height on mobile — 4/3 is taller but contained */
  .gallery-card img {
    aspect-ratio: 4/3;
    max-height: 260px;
  }
  /* Fixed square buttons on mobile — no stretching */
  .gallery-prev,
  .gallery-next {
    width: 44px;
    height: 44px;
    min-width: 44px;
    font-size: 1rem;
  }
  .form-row {
    grid-template-columns: 1fr;
  }
  .footer-inner {
    grid-template-columns: 1fr;
    gap: 2rem;
  }
  .about-badge {
    left: 0.5rem;
  }
}

@media (max-width: 480px) {
  .container {
    padding: 0 1.25rem;
  }
  .hero-title {
    font-size: clamp(3rem, 14vw, 5rem);
  }
}
