/* ============================================================
   PoolSpa.Pro – Mobile-first stylesheet
   Brand palette: #334356 navy | #7aa8c1 pool blue | #fdfdfd light
   ============================================================ */

@import url('https://fonts.googleapis.com/css2?family=Lora:ital,wght@0,400;0,500;0,600;0,700;1,400&display=swap');

*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

:root {
  --accent:       #7aa8c1;
  --accent-dark:  #5c8faa;
  --accent-glow:  rgba(122, 168, 193, 0.18);

  --bg:           #1b2838;
  --surface:      #243040;
  --surface-2:    #2e3d50;

  --text:         #e8f0f5;
  --text-muted:   #7a9aad;
  --border:       #334356;

  --radius:       12px;
  --nav-height:   80px;
  --header-height: 70px;

  /* iOS-style nav icon colors */
  --nav-home:    #5ba3c9;
  --nav-about:   #d4813a;
  --nav-contact: #3eaa6a;
}

html {
  font-size: 16px;
  -webkit-text-size-adjust: 100%;
}

body {
  font-family: Lora, Georgia, 'Times New Roman', serif;
  letter-spacing: 0.025em;
  background: var(--bg);
  color: var(--text);
  line-height: 1.65;
  min-height: 100vh;
  padding-top: var(--header-height);
  padding-bottom: var(--nav-height);
}

/* ── Header ─────────────────────────────────────────────── */
.site-header {
  position: fixed;
  top: 0; left: 0; right: 0;
  height: var(--header-height);
  background: var(--surface);
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 100;
}

.header-inner {
  display: flex;
  align-items: center;
  gap: 11px;
}

.site-logo-img {
  height: 38px;
  width: auto;
}

.site-logo {
  font-family: Lora, Georgia, serif;
  font-size: 1.45rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  color: var(--text);
}

.site-logo .accent {
  color: var(--accent);
}

/* ── Bottom Nav ─────────────────────────────────────────── */
.bottom-nav {
  position: fixed;
  bottom: 0; left: 0; right: 0;
  height: var(--nav-height);
  background: var(--surface);
  border-top: 1px solid var(--border);
  display: flex;
  z-index: 100;
}

.nav-item {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 5px;
  color: var(--text-muted);
  text-decoration: none;
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  font-size: 0.68rem;
  font-weight: 500;
  letter-spacing: 0.04em;
  -webkit-tap-highlight-color: transparent;
}

.nav-icon-wrap {
  width: 42px;
  height: 42px;
  border-radius: 11px;
  background: var(--surface-2);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.18s, transform 0.12s;
}

.nav-item svg {
  width: 20px;
  height: 20px;
  transition: color 0.18s;
}

.nav-logo-icon {
  height: 24px;
  width: auto;
}

.nav-item:active .nav-icon-wrap {
  transform: scale(0.9);
}

/* Active state – iOS-style colored icon backgrounds */
.nav-item:nth-child(1).active .nav-icon-wrap { background: var(--nav-home); }
.nav-item:nth-child(2).active .nav-icon-wrap { background: var(--nav-about); }
.nav-item:nth-child(3).active .nav-icon-wrap { background: var(--nav-contact); }

.nav-item.active { color: var(--text); }
.nav-item.active svg { color: #fff; }

/* Subtle hover for non-active items */
.nav-item:not(.active):hover .nav-icon-wrap {
  background: var(--border);
}

/* ── Feed (Home) ────────────────────────────────────────── */
.feed {
  max-width: 480px;
  margin: 0 auto;
  padding: 1rem;
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.post-card {
  background: var(--surface);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: 0 2px 12px rgba(0,0,0,0.28);
}

.post-title {
  font-size: 1rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  padding: 0.875rem 1rem 0;
  color: var(--text);
}

.media-pair {
  display: flex;
  flex-direction: column;
  gap: 2px;
  margin-top: 0.75rem;
}

.media-pair figure {
  position: relative;
  margin: 0;
}

.media-pair figcaption {
  position: absolute;
  top: 8px;
  right: 8px;
  background: rgba(27, 40, 56, 0.72);
  color: var(--accent);
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  padding: 3px 8px;
  border-radius: 5px;
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  border: 1px solid rgba(122, 168, 193, 0.25);
}

.media-pair img,
.media-pair video {
  width: 100%;
  display: block;
  aspect-ratio: 4/3;
  object-fit: cover;
  background: var(--surface-2);
}

/* ── Video play button overlay ──────────────────────────── */
.video-wrap {
  position: relative;
  display: block;
}

.video-wrap video {
  display: block;
}

.play-btn {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  background: none;
  border: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: opacity 0.2s;
}

.play-btn-inner {
  width: 64px;
  height: 64px;
  border-radius: 50%;
  background: linear-gradient(135deg, #7aa8c1 0%, #5c8faa 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: transform 0.15s, box-shadow 0.15s;
  box-shadow: 0 4px 20px rgba(92, 143, 170, 0.55);
}

.play-btn:hover .play-btn-inner {
  transform: scale(1.08);
  box-shadow: 0 6px 28px rgba(92, 143, 170, 0.75);
}

.play-btn:active .play-btn-inner {
  transform: scale(0.95);
}

.play-btn svg {
  width: 22px;
  height: 22px;
  color: #fff;
  margin-left: 3px;
}

.play-btn .icon-pause { display: none; margin-left: 0; }
.play-btn.playing .icon-play  { display: none; }
.play-btn.playing .icon-pause { display: block; }

.play-btn.playing {
  opacity: 0;
}

.play-btn.playing:hover {
  opacity: 1;
}

.post-description {
  padding: 0.75rem 1rem 1rem;
  font-size: 0.9rem;
  color: var(--text-muted);
  line-height: 1.6;
}

/* ── Page Content (About / Contact) ─────────────────────── */
.page-content {
  max-width: 480px;
  margin: 0 auto;
  padding: 1.25rem 1rem;
  display: flex;
  flex-direction: column;
  gap: 2rem;
}

.page-content h1 {
  font-size: 1.5rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  margin-bottom: 0.75rem;
  color: var(--text);
}

.page-content h2 {
  font-size: 1.15rem;
  font-weight: 600;
  letter-spacing: 0.05em;
  margin-bottom: 0.75rem;
  color: var(--text);
}

/* ── About ──────────────────────────────────────────────── */
.about-description p {
  margin-bottom: 0.75rem;
  color: var(--text-muted);
  line-height: 1.75;
}

.services-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.services-list li {
  padding: 0.65rem 0.85rem;
  background: var(--surface);
  border-radius: var(--radius);
  border-left: 3px solid var(--accent);
  font-size: 0.95rem;
  color: var(--text);
  box-shadow: 0 1px 6px rgba(0,0,0,0.2);
}

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

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

.form-group label {
  font-size: 0.875rem;
  font-weight: 500;
  letter-spacing: 0.04em;
  color: var(--text-muted);
}

.required {
  color: #e06060;
}

.form-group input,
.form-group textarea {
  width: 100%;
  padding: 0.7rem 0.9rem;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  font-size: 1rem;
  font-family: Lora, Georgia, serif;
  letter-spacing: 0.02em;
  background: var(--surface-2);
  color: var(--text);
  transition: border-color 0.15s, box-shadow 0.15s;
  -webkit-appearance: none;
}

.form-group input:focus,
.form-group textarea:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-glow);
}

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

.btn-primary {
  padding: 0.85rem;
  background: linear-gradient(135deg, var(--accent) 0%, var(--accent-dark) 100%);
  color: #fff;
  border: none;
  border-radius: var(--radius);
  font-size: 1rem;
  font-family: Lora, Georgia, serif;
  font-weight: 600;
  letter-spacing: 0.08em;
  cursor: pointer;
  box-shadow: 0 4px 16px rgba(92, 143, 170, 0.35);
  transition: opacity 0.15s, transform 0.12s;
  -webkit-tap-highlight-color: transparent;
}

.btn-primary:hover {
  opacity: 0.9;
}

.btn-primary:active {
  transform: scale(0.98);
}

.btn-primary:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.form-status {
  text-align: center;
  padding: 0.65rem;
  border-radius: var(--radius);
  font-size: 0.9rem;
}

.form-status.success {
  background: rgba(87, 170, 132, 0.15);
  color: #7dcca8;
  border: 1px solid rgba(87, 170, 132, 0.3);
}

.form-status.error {
  background: rgba(196, 122, 91, 0.15);
  color: #e89878;
  border: 1px solid rgba(196, 122, 91, 0.3);
}

.business-phone {
  font-size: 1.05rem;
  font-weight: 600;
  text-align: center;
  padding-top: 1.25rem;
  letter-spacing: 0.05em;
}

.business-phone a {
  color: var(--accent);
  text-decoration: none;
}

.business-phone a:hover {
  text-decoration: underline;
}

.business-address {
  font-size: 0.82rem;
  color: var(--text-muted);
  text-align: center;
  padding-top: 0.35rem;
}

.business-address a {
  color: var(--text-muted);
  text-decoration: none;
}

.business-address a:hover {
  color: var(--text);
}

/* ── Utility ────────────────────────────────────────────── */
.loading {
  text-align: center;
  color: var(--text-muted);
  padding: 2rem;
  font-size: 0.9rem;
}

.empty-state {
  text-align: center;
  color: var(--text-muted);
  padding: 3rem 1rem;
  font-size: 0.95rem;
}

/* ── License footer ─────────────────────────────────────── */
.license-footer {
  padding: 1rem 1.5rem 6rem;
  text-align: center;
}

.license-statement {
  font-size: 0.75rem;
  color: var(--text-muted);
  line-height: 1.5;
}

.license-statement a {
  color: var(--text-muted);
  text-decoration: underline;
}

/* ── Desktop centering ──────────────────────────────────── */
@media (min-width: 600px) {
  .bottom-nav {
    max-width: 480px;
    left: 50%;
    transform: translateX(-50%);
    border-left: 1px solid var(--border);
    border-right: 1px solid var(--border);
  }

  .site-header {
    border-left: none;
    border-right: none;
  }
}
