/* =========================================
   COMPONENTS.CSS — Nav, Footer, Buttons,
   Cards, Forms, Badges, Page Header
   Waggy Bums Dog Groomers
   ========================================= */

/* ===== LAYOUT CONTAINERS ===== */
.container {
  width: 100%;
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 var(--sp-md);
}
.container--md { max-width: var(--container-md); }
.container--sm { max-width: var(--container-sm); }

section {
  padding: var(--sp-xxl) 0;
}

/* ===== NAVIGATION ===== */
.nav {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 1000;
  height: var(--nav-h);
  background: rgba(253, 249, 255, 0.95);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 2px solid var(--border);
  display: flex;
  align-items: center;
  width: 100%;
  max-width: 100vw;
}

.nav__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 var(--sp-md);
}

.nav__brand {
  display: flex;
  align-items: center;
  gap: var(--sp-sm);
  text-decoration: none;
}

.nav__logo {
  width: 48px;
  height: 48px;
  border-radius: var(--r-round);
  object-fit: cover;
  border: 2px solid var(--purple-light);
}

.nav__brand-text {
  display: flex;
  flex-direction: column;
  line-height: 1.1;
}

.nav__brand-name {
  font-family: var(--font-heading);
  font-size: 1.25rem;
  color: var(--purple-dark);
}

.nav__brand-sub {
  font-size: 0.65rem;
  color: var(--text-muted);
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.nav__links {
  display: flex;
  align-items: center;
  gap: var(--sp-xs);
}

.nav__link {
  font-size: 0.95rem;
  font-weight: 500;
  color: var(--text-body);
  padding: 6px 14px;
  border-radius: var(--r-pill);
  transition: var(--t);
  position: relative;
}

.nav__link:hover {
  color: var(--purple-dark);
  background: var(--purple-xlight);
}

.nav__link.active {
  color: var(--white);
  background: var(--purple-dark);
}

.nav__cta {
  background: linear-gradient(135deg, var(--purple), var(--purple-dark));
  color: var(--white) !important;
  padding: 8px 20px !important;
  border-radius: var(--r-pill) !important;
  box-shadow: var(--shadow-sm);
}

.nav__cta:hover {
  background: linear-gradient(135deg, var(--purple-dark), var(--purple-deep)) !important;
  transform: translateY(-1px);
  box-shadow: var(--shadow-md) !important;
}

/* Hamburger */
.nav__toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  padding: 8px;
  cursor: pointer;
}

.nav__toggle span {
  display: block;
  width: 24px;
  height: 2px;
  background: var(--purple-dark);
  border-radius: 2px;
  transition: var(--t);
}

.nav__toggle.open span:nth-child(1) { transform: rotate(45deg) translate(5px, 5px); }
.nav__toggle.open span:nth-child(2) { opacity: 0; }
.nav__toggle.open span:nth-child(3) { transform: rotate(-45deg) translate(5px, -5px); }

/* ===== PAGE HEADER HERO ===== */
.page-header {
  padding: calc(var(--nav-h) + 60px) 0 60px;
  background: linear-gradient(135deg, var(--purple-light) 0%, var(--pink-light) 100%);
  text-align: center;
  position: relative;
  overflow: hidden;
}

.page-header::before {
  content: '🐾';
  position: absolute;
  font-size: 8rem;
  opacity: 0.06;
  top: -20px;
  right: 5%;
  transform: rotate(20deg);
}

.page-header::after {
  content: '🐾';
  position: absolute;
  font-size: 5rem;
  opacity: 0.06;
  bottom: -10px;
  left: 5%;
  transform: rotate(-15deg);
}

.page-header__tag {
  display: inline-block;
  background: var(--purple);
  color: var(--white);
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  padding: 5px 16px;
  border-radius: var(--r-pill);
  margin-bottom: var(--sp-sm);
}

.page-header h1 {
  color: var(--purple-dark);
  margin-bottom: var(--sp-sm);
}

.page-header p {
  font-size: 1.1rem;
  max-width: 520px;
  margin: 0 auto;
  color: var(--text-body);
}

/* ===== BUTTONS ===== */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: var(--font-heading);
  font-size: 1rem;
  letter-spacing: 0.03em;
  padding: 14px 32px;
  border-radius: var(--r-pill);
  transition: var(--t);
  cursor: pointer;
  border: none;
  text-decoration: none;
  white-space: nowrap;
}

.btn--primary {
  background: linear-gradient(135deg, var(--purple), var(--purple-dark));
  color: var(--white);
  box-shadow: 0 4px 16px rgba(149, 117, 205, 0.4);
}

.btn--primary:hover {
  transform: translateY(-3px);
  box-shadow: 0 8px 28px rgba(149, 117, 205, 0.5);
}

.btn--secondary {
  background: var(--white);
  color: var(--purple-dark);
  border: 2px solid var(--purple);
}

.btn--secondary:hover {
  background: var(--purple-xlight);
  transform: translateY(-2px);
  box-shadow: var(--shadow-sm);
}

.btn--pink {
  background: linear-gradient(135deg, var(--pink), #E91E8C);
  color: var(--white);
  box-shadow: 0 4px 16px rgba(244, 143, 177, 0.4);
}

.btn--pink:hover {
  transform: translateY(-3px);
  box-shadow: 0 8px 28px rgba(244, 143, 177, 0.5);
}

.btn--sm {
  padding: 9px 22px;
  font-size: 0.9rem;
}

.btn--lg {
  padding: 18px 44px;
  font-size: 1.15rem;
}

/* ===== CARDS ===== */
.card {
  background: var(--white);
  border-radius: var(--r-lg);
  padding: var(--sp-lg);
  box-shadow: var(--shadow-sm);
  border: 1px solid var(--border);
  transition: var(--t);
}

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

.card__icon {
  width: 64px;
  height: 64px;
  background: var(--purple-light);
  border-radius: var(--r-md);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2rem;
  margin-bottom: var(--sp-md);
}

.card__title {
  font-family: var(--font-heading);
  font-size: 1.3rem;
  color: var(--text-dark);
  margin-bottom: var(--sp-xs);
}

.card__body {
  color: var(--text-body);
  font-size: 0.95rem;
  line-height: 1.7;
}

/* ===== FORM ELEMENTS ===== */
.form-group {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.form-label {
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--text-dark);
}

.form-input,
.form-select,
.form-textarea {
  padding: 13px 16px;
  border: 2px solid var(--border);
  border-radius: var(--r-md);
  background: var(--bg);
  font-size: 0.95rem;
  color: var(--text-dark);
  transition: var(--t);
  outline: none;
  width: 100%;
}

.form-input:focus,
.form-select:focus,
.form-textarea:focus {
  border-color: var(--purple);
  background: var(--white);
  box-shadow: 0 0 0 4px rgba(149, 117, 205, 0.12);
}

.form-input.error,
.form-select.error,
.form-textarea.error {
  border-color: var(--red);
  box-shadow: 0 0 0 4px rgba(232, 86, 106, 0.1);
}

.form-error {
  font-size: 0.8rem;
  color: var(--red);
  display: none;
}

.form-error.show { display: block; }

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

/* Radio / Checkbox groups */
.radio-group,
.check-group {
  display: flex;
  flex-direction: column;
  gap: var(--sp-xs);
}

.radio-option,
.check-option {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 12px var(--sp-sm);
  border: 2px solid var(--border);
  border-radius: var(--r-md);
  cursor: pointer;
  transition: var(--t);
}

.radio-option:hover,
.check-option:hover {
  border-color: var(--purple);
  background: var(--purple-xlight);
}

.radio-option input,
.check-option input {
  margin-top: 3px;
  accent-color: var(--purple);
  width: 18px;
  height: 18px;
  flex-shrink: 0;
}

.radio-option__label,
.check-option__label {
  flex: 1;
}

.radio-option__title,
.check-option__title {
  font-weight: 600;
  font-size: 0.95rem;
  color: var(--text-dark);
  display: block;
}

.radio-option__desc,
.check-option__desc {
  font-size: 0.8rem;
  color: var(--text-muted);
  margin-top: 2px;
}

.radio-option input:checked ~ .radio-option__label .radio-option__title,
.check-option input:checked ~ .check-option__label .check-option__title {
  color: var(--purple-dark);
}

/* ===== SECTION TITLES ===== */
.section-tag {
  display: inline-block;
  background: var(--purple-light);
  color: var(--purple-dark);
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  padding: 5px 16px;
  border-radius: var(--r-pill);
  margin-bottom: var(--sp-sm);
}

.section-title {
  color: var(--text-dark);
  margin-bottom: var(--sp-sm);
}

.section-title span {
  color: var(--purple);
}

.section-desc {
  font-size: 1.05rem;
  color: var(--text-body);
  max-width: 560px;
}

.section-desc--center {
  margin: 0 auto;
}

/* Paw divider */
.paw-divider {
  text-align: center;
  font-size: 1.4rem;
  letter-spacing: 8px;
  opacity: 0.35;
  margin: var(--sp-lg) 0;
}

/* ===== BADGE ===== */
.badge {
  display: inline-block;
  padding: 4px 12px;
  border-radius: var(--r-pill);
  font-size: 0.78rem;
  font-weight: 600;
}

.badge--purple { background: var(--purple-light); color: var(--purple-dark); }
.badge--pink   { background: var(--pink-light);   color: #C2185B; }
.badge--green  { background: #E8F5E9; color: #388E3C; }

/* ===== FOOTER ===== */
.footer {
  background: linear-gradient(135deg, #3D1F6B, var(--purple-deep));
  color: rgba(255,255,255,0.85);
  padding: var(--sp-xxl) 0 var(--sp-lg);
  position: relative;
  overflow: hidden;
}

.footer::before {
  content: '🐾';
  position: absolute;
  font-size: 12rem;
  opacity: 0.04;
  top: -2rem;
  right: -2rem;
  transform: rotate(25deg);
}

.footer__grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1.5fr;
  gap: var(--sp-xl);
  margin-bottom: var(--sp-xl);
}

.footer__brand {
  display: flex;
  align-items: center;
  gap: var(--sp-sm);
  margin-bottom: var(--sp-md);
}

.footer__logo {
  width: 52px;
  height: 52px;
  border-radius: var(--r-round);
  object-fit: cover;
  border: 2px solid rgba(255,255,255,0.2);
}

.footer__brand-name {
  font-family: var(--font-heading);
  font-size: 1.3rem;
  color: var(--white);
}

.footer__tagline {
  font-size: 0.9rem;
  line-height: 1.7;
  color: rgba(255,255,255,0.7);
  margin-bottom: var(--sp-md);
}

.footer__social {
  display: flex;
  gap: var(--sp-sm);
}

.footer__social-link {
  width: 40px;
  height: 40px;
  background: rgba(255,255,255,0.1);
  border-radius: var(--r-round);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.1rem;
  transition: var(--t);
  text-decoration: none;
}

.footer__social-link:hover {
  background: var(--purple);
  transform: translateY(-3px);
}

.footer__heading {
  font-family: var(--font-heading);
  color: var(--white);
  font-size: 1.1rem;
  margin-bottom: var(--sp-md);
  padding-bottom: var(--sp-xs);
  border-bottom: 1px solid rgba(255,255,255,0.15);
}

.footer__links {
  display: flex;
  flex-direction: column;
  gap: var(--sp-xs);
}

.footer__link {
  color: rgba(255,255,255,0.7);
  font-size: 0.9rem;
  transition: var(--t);
  text-decoration: none;
  display: flex;
  align-items: center;
  gap: 6px;
}

.footer__link:hover {
  color: var(--white);
  transform: translateX(4px);
}

.footer__contact-item {
  display: flex;
  gap: var(--sp-sm);
  align-items: flex-start;
  margin-bottom: var(--sp-sm);
  color: rgba(255,255,255,0.7);
  font-size: 0.9rem;
}

.footer__contact-icon {
  font-size: 1rem;
  flex-shrink: 0;
  margin-top: 2px;
}

.footer__bottom {
  border-top: 1px solid rgba(255,255,255,0.1);
  padding-top: var(--sp-md);
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 0.85rem;
  color: rgba(255,255,255,0.5);
  flex-wrap: wrap;
  gap: var(--sp-sm);
}

.footer__bottom a {
  color: rgba(255,255,255,0.5);
  transition: var(--t);
}

.footer__bottom a:hover { color: var(--white); }

/* ===== MODAL ===== */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(30, 15, 50, 0.6);
  backdrop-filter: blur(4px);
  z-index: 9000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: var(--sp-md);
  opacity: 0;
  pointer-events: none;
  transition: var(--t);
}

.modal-overlay.show {
  opacity: 1;
  pointer-events: all;
}

.modal {
  background: var(--white);
  border-radius: var(--r-xl);
  padding: var(--sp-xl);
  max-width: 480px;
  width: 100%;
  text-align: center;
  transform: scale(0.85);
  transition: var(--t);
  position: relative;
}

.modal-overlay.show .modal {
  transform: scale(1);
}

.modal__close {
  position: absolute;
  top: var(--sp-sm);
  right: var(--sp-sm);
  width: 36px;
  height: 36px;
  border-radius: var(--r-round);
  background: var(--bg-alt);
  border: none;
  cursor: pointer;
  font-size: 1.2rem;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: var(--t);
}

.modal__close:hover {
  background: var(--purple-light);
  color: var(--purple-dark);
}

.modal__icon {
  font-size: 4rem;
  margin-bottom: var(--sp-sm);
  display: block;
  animation: bounce-in 0.6s cubic-bezier(0.34,1.56,0.64,1);
}

.modal h3 {
  color: var(--purple-dark);
  margin-bottom: var(--sp-sm);
}

.modal p {
  color: var(--text-body);
  margin-bottom: var(--sp-lg);
}

/* ===== RESPONSIVE ===== */
@media (max-width: 768px) {
  .nav__links {
    position: fixed;
    top: var(--nav-h);
    left: 0; right: 0;
    background: var(--white);
    flex-direction: column;
    padding: 0;
    gap: var(--sp-xs);
    border-bottom: 2px solid var(--border);
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.35s ease, padding 0.35s ease;
    z-index: 999;
    box-shadow: none;
  }

  .nav__links.open {
    max-height: 480px;
    padding: var(--sp-md);
    box-shadow: var(--shadow-lg);
  }

  .nav__link {
    width: 100%;
    padding: 12px 20px;
    border-radius: var(--r-md);
  }

  .nav__toggle { display: flex; }

  .nav__brand-sub {
    display: none;
  }

  .footer__grid {
    grid-template-columns: 1fr 1fr;
    gap: var(--sp-lg);
  }
}

@media (max-width: 480px) {
  .footer__grid {
    grid-template-columns: 1fr;
  }
}

/* ===== FLOATING CHAT WIDGET ===== */
.chat-widget {
  position: fixed;
  bottom: 24px;
  right: 24px;
  z-index: 1000;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 10px;
}

.chat-widget__buttons {
  display: flex;
  flex-direction: column;
  gap: 10px;
  transition: var(--t);
}

.chat-btn {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 18px 12px 14px;
  border-radius: var(--r-pill);
  text-decoration: none;
  font-family: var(--font-body);
  font-size: 0.875rem;
  font-weight: 600;
  color: #fff;
  box-shadow: 0 4px 20px rgba(0,0,0,0.18);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
  white-space: nowrap;
}
.chat-btn:hover {
  transform: translateY(-2px) scale(1.03);
  box-shadow: 0 8px 28px rgba(0,0,0,0.24);
  color: #fff;
}
.chat-btn__icon {
  width: 28px;
  height: 28px;
  flex-shrink: 0;
}
.chat-btn--whatsapp { background: #25D366; }
.chat-btn--messenger { background: linear-gradient(135deg, #0082fb 0%, #a033ff 100%); }

.chat-widget__toggle {
  width: 56px;
  height: 56px;
  border-radius: var(--r-round);
  background: var(--purple);
  border: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
  box-shadow: var(--shadow-lg);
  transition: var(--t);
  flex-shrink: 0;
}
.chat-widget__toggle:hover {
  background: var(--purple-dark);
  transform: scale(1.08);
}
.chat-widget__toggle .icon-open  { display: block; }
.chat-widget__toggle .icon-close { display: none; }
.chat-widget--open .icon-open    { display: none; }
.chat-widget--open .icon-close   { display: block; }

/* hide buttons until open */
.chat-widget__buttons {
  opacity: 0;
  pointer-events: none;
  transform: translateY(12px);
}
.chat-widget--open .chat-widget__buttons {
  opacity: 1;
  pointer-events: auto;
  transform: translateY(0);
}

/* Tooltip label on toggle */
.chat-widget__label {
  position: absolute;
  right: 66px;
  bottom: 0;
  background: var(--purple-dark);
  color: #fff;
  font-size: 0.75rem;
  font-family: var(--font-body);
  font-weight: 600;
  padding: 5px 10px;
  border-radius: var(--r-pill);
  white-space: nowrap;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s ease;
}
.chat-widget__toggle:hover + .chat-widget__label,
.chat-widget:not(.chat-widget--open) .chat-widget__toggle:focus + .chat-widget__label {
  opacity: 1;
}

@media (max-width: 480px) {
  .chat-widget { bottom: 16px; right: 16px; }
  .chat-btn { font-size: 0.8rem; padding: 10px 14px 10px 12px; }
  .chat-btn__icon { width: 24px; height: 24px; }
}
