/* ===================================
   JROM: Neighborhood Help
   Global CSS — Design System
   =================================== */

:root {
  /* Forest Green Palette */
  --green-deep:    #2d4a32;
  --green-primary: #3a5c40;
  --green-mid:     #4e7a55;
  --green-light:   #6a9b72;
  --green-pale:    #a8c9ac;
  --green-mist:    #d4e8d6;

  /* Off-White / Chalk Palette */
  --cream-deep:    #ddd8cc;
  --cream-mid:     #e8e3d8;
  --cream-light:   #f0ebe2;
  --cream-pale:    #f7f3ec;
  --cream-white:   #fdfaf6;

  /* Text */
  --text-dark:     #1c2b1e;
  --text-body:     #3a4a3c;
  --text-muted:    #6b7d6e;
  --text-light:    #9aab9d;

  /* Accents */
  --accent-warm:   #c4874a;
  --accent-gold:   #d4a547;
  --accent-terr:   #8b5e3c;

  /* Surfaces */
  --surface-1:     #fdfaf6;
  --surface-2:     #f0ebe2;
  --surface-3:     #e4dfd5;
  --surface-glass: rgba(253, 250, 246, 0.72);

  /* Shadows */
  --shadow-sm:  0 2px 8px rgba(44, 74, 50, 0.08);
  --shadow-md:  0 6px 24px rgba(44, 74, 50, 0.12);
  --shadow-lg:  0 16px 48px rgba(44, 74, 50, 0.16);
  --shadow-xl:  0 32px 80px rgba(44, 74, 50, 0.20);

  /* Border Radius */
  --radius-sm:  8px;
  --radius-md:  14px;
  --radius-lg:  22px;
  --radius-xl:  32px;
  --radius-full: 9999px;

  /* Transitions */
  --transition-fast:   0.15s ease;
  --transition-base:   0.25s ease;
  --transition-slow:   0.45s cubic-bezier(0.34, 1.56, 0.64, 1);

  /* Typography */
  --font-main:   'Outfit', sans-serif;
  --font-serif:  'Lora', serif;
}

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

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

body {
  font-family: var(--font-main);
  background: var(--cream-pale);
  color: var(--text-body);
  line-height: 1.65;
  overflow-x: hidden;
}

img { max-width: 100%; display: block; }
a { text-decoration: none; color: inherit; }
ul { list-style: none; }
button { cursor: pointer; border: none; background: none; font-family: inherit; }

/* ============ TYPOGRAPHY ============ */
h1, h2, h3, h4, h5 { font-family: var(--font-main); font-weight: 700; line-height: 1.15; color: var(--text-dark); }
h1 { font-size: clamp(2.4rem, 6vw, 5rem); }
h2 { font-size: clamp(1.8rem, 4vw, 3rem); }
h3 { font-size: clamp(1.1rem, 2.5vw, 1.5rem); }
h4 { font-size: 1.1rem; }
p  { font-size: 1rem; color: var(--text-body); }

/* ============ CONTAINERS ============ */
.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 1.5rem;
}

.section-pad {
  padding: 6rem 0;
}

/* ============ BUTTONS ============ */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.85rem 2rem;
  border-radius: var(--radius-full);
  font-family: var(--font-main);
  font-weight: 600;
  font-size: 0.95rem;
  letter-spacing: 0.02em;
  transition: all var(--transition-slow);
  cursor: pointer;
  border: 2px solid transparent;
  text-align: center;
  white-space: nowrap;
}

.btn-primary {
  background: var(--green-primary);
  color: var(--cream-white);
  box-shadow: 0 4px 20px rgba(58, 92, 64, 0.35);
}
.btn-primary:hover {
  background: var(--green-deep);
  box-shadow: 0 8px 32px rgba(58, 92, 64, 0.45);
  transform: translateY(-2px) scale(1.02);
}
.btn-primary:active { transform: translateY(0) scale(0.99); }

.btn-outline {
  border-color: var(--green-primary);
  color: var(--green-primary);
  background: transparent;
}
.btn-outline:hover {
  background: var(--green-primary);
  color: var(--cream-white);
  transform: translateY(-2px);
}

.btn-ghost {
  color: var(--green-primary);
  background: transparent;
  border-color: transparent;
  padding: 0.75rem 1.25rem;
}
.btn-ghost:hover {
  background: var(--green-mist);
  transform: translateY(-1px);
}

/* ============ SECTION HEADERS ============ */
.section-header {
  text-align: center;
  margin-bottom: 3.5rem;
}
.section-header h2 { margin-bottom: 0.6rem; }
.section-header p  { color: var(--text-muted); font-size: 1.05rem; max-width: 520px; margin: 0 auto; }

.section-tag {
  display: inline-block;
  background: var(--green-mist);
  color: var(--green-primary);
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  padding: 0.35rem 1rem;
  border-radius: var(--radius-full);
  margin-bottom: 0.8rem;
}

/* ============ NAVBAR ============ */
.navbar {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 100;
  transition: all 0.35s ease;
  padding: 0;
}

.navbar.scrolled {
  background: rgba(253, 250, 246, 0.92);
  backdrop-filter: blur(16px);
  box-shadow: var(--shadow-md);
}

.nav-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1.1rem 2rem;
  max-width: 1300px;
  margin: 0 auto;
}

.nav-logo {
  font-size: 1.7rem;
  font-weight: 900;
  color: var(--green-primary);
  letter-spacing: -0.02em;
  transition: all var(--transition-base);
}
.nav-logo:hover { color: var(--green-mid); transform: scale(1.04); }

.nav-links {
  display: flex;
  gap: 0.5rem;
  align-items: center;
}
.nav-links a {
  padding: 0.5rem 1rem;
  border-radius: var(--radius-full);
  font-weight: 500;
  font-size: 0.95rem;
  color: var(--text-body);
  transition: all var(--transition-base);
}
.nav-links a:hover,
.nav-links a.active {
  color: var(--green-primary);
  background: var(--green-mist);
}
.nav-links .nav-cta-link {
  background: var(--green-mist);
  color: var(--green-primary);
  font-weight: 600;
}
.nav-links .nav-cta-link:hover {
  background: var(--green-primary);
  color: var(--cream-white);
}

.nav-actions { display: flex; align-items: center; gap: 0.5rem; }

.nav-hamburger {
  display: none;
  flex-direction: column;
  gap: 5px;
  padding: 0.5rem;
  cursor: pointer;
}
.nav-hamburger span {
  display: block;
  width: 22px;
  height: 2px;
  background: var(--green-primary);
  border-radius: 99px;
  transition: all 0.3s;
}

.nav-mobile-menu {
  display: none;
  flex-direction: column;
  gap: 0;
  padding: 0.5rem 1.5rem 1rem;
  background: rgba(253, 250, 246, 0.98);
  border-top: 1px solid var(--cream-mid);
  backdrop-filter: blur(16px);
}
.nav-mobile-menu a {
  padding: 0.75rem 0;
  font-weight: 500;
  color: var(--text-body);
  border-bottom: 1px solid var(--cream-mid);
  transition: color var(--transition-base);
}
.nav-mobile-menu a:last-child { border-bottom: none; }
.nav-mobile-menu a:hover { color: var(--green-primary); }

/* ============ TILT CARDS ============ */
[data-tilt] {
  transform-style: preserve-3d;
  transition: transform 0.1s ease, box-shadow 0.2s ease;
  will-change: transform;
}

/* ============ SCROLLBAR ============ */
::-webkit-scrollbar { width: 8px; }
::-webkit-scrollbar-track { background: var(--cream-mid); }
::-webkit-scrollbar-thumb { background: var(--green-pale); border-radius: 99px; }
::-webkit-scrollbar-thumb:hover { background: var(--green-light); }

/* ============ SELECTION ============ */
::selection { background: var(--green-mist); color: var(--green-deep); }

/* ============ FOOTER ============ */
.footer {
  background: var(--green-deep);
  color: var(--cream-light);
  padding: 4rem 0 2rem;
}
.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: 3rem;
  margin-bottom: 3rem;
}
.footer-logo {
  font-size: 2rem;
  font-weight: 900;
  color: var(--cream-white);
  margin-bottom: 0.75rem;
  letter-spacing: -0.02em;
}
.footer-brand p { color: var(--green-pale); font-size: 0.95rem; line-height: 1.6; }

.footer-links h4 {
  color: var(--cream-white);
  font-size: 0.85rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  margin-bottom: 1rem;
}
.footer-links a {
  display: block;
  color: var(--green-pale);
  font-size: 0.95rem;
  margin-bottom: 0.6rem;
  transition: color var(--transition-base);
}
.footer-links a:hover { color: var(--cream-white); }

.footer-bottom {
  border-top: 1px solid rgba(255,255,255,0.1);
  padding-top: 1.5rem;
  text-align: center;
}
.footer-bottom p { color: var(--green-pale); font-size: 0.85rem; }

/* ============ FORM STYLES ============ */
.form-group {
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
}
.form-group label {
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--text-dark);
  letter-spacing: 0.02em;
}
.form-group input,
.form-group select,
.form-group textarea {
  padding: 0.85rem 1.1rem;
  border: 2px solid var(--cream-deep);
  border-radius: var(--radius-md);
  font-family: var(--font-main);
  font-size: 0.95rem;
  color: var(--text-dark);
  background: var(--cream-white);
  transition: border-color var(--transition-base), box-shadow var(--transition-base);
  outline: none;
  width: 100%;
}
.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
  border-color: var(--green-light);
  box-shadow: 0 0 0 3px rgba(106, 155, 114, 0.18);
}
.form-group textarea { resize: vertical; min-height: 100px; }

/* ============ STAR RATING ============ */
.star-rating {
  display: flex;
  gap: 0.3rem;
}
.star-btn {
  font-size: 1.8rem;
  color: var(--cream-deep);
  cursor: pointer;
  transition: color 0.15s, transform 0.15s;
  line-height: 1;
}
.star-btn:hover,
.star-btn.active { color: var(--accent-gold); transform: scale(1.15); }

/* ============ TOAST ============ */
.toast {
  position: fixed;
  bottom: 2rem;
  right: 2rem;
  background: var(--green-primary);
  color: var(--cream-white);
  padding: 1rem 1.5rem;
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-lg);
  font-weight: 600;
  z-index: 9999;
  transform: translateY(6rem);
  opacity: 0;
  transition: all 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
  pointer-events: none;
}
.toast.show {
  transform: translateY(0);
  opacity: 1;
}

/* ============ PAGE HERO (non-home) ============ */
.page-hero {
  padding: 9rem 0 5rem;
  text-align: center;
  background: linear-gradient(160deg, var(--green-mist) 0%, var(--cream-pale) 60%);
  position: relative;
  overflow: hidden;
}
.page-hero::before {
  content: '';
  position: absolute;
  top: -50%;
  left: -20%;
  width: 70%;
  height: 200%;
  background: radial-gradient(ellipse, rgba(74, 114, 80, 0.07) 0%, transparent 70%);
  pointer-events: none;
}
.page-hero .section-tag { margin-bottom: 1rem; }
.page-hero h1 { margin-bottom: 1rem; }
.page-hero p { color: var(--text-muted); max-width: 540px; margin: 0 auto; font-size: 1.05rem; }

/* ============ RESPONSIVE ============ */
@media (max-width: 900px) {
  .nav-links { display: none; }
  .nav-hamburger { display: flex; }
  .nav-mobile-menu.open { display: flex; }

  .footer-grid { grid-template-columns: 1fr 1fr; gap: 2rem; }
}

@media (max-width: 600px) {
  .section-pad { padding: 4rem 0; }
  .footer-grid { grid-template-columns: 1fr; gap: 1.5rem; }
  .btn { padding: 0.8rem 1.6rem; font-size: 0.9rem; }
}

/* Fix dropdown right padding and arrows globally */
select {
  appearance: none;
  -webkit-appearance: none;
  -moz-appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%233a4a3c' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 1.25rem center; /* Controls distance from the right edge */
  padding-right: 2.75rem !important;         /* Ensures text doesn't overlap the arrow */
  cursor: pointer;
}

/* ============ FORM VALIDATION & SELECT DROPDOWN ============ */

/* Error message styling (Placed above the text box) */
.field-error {
  display: none;
  color: #e53e3e;
  font-size: 0.82rem;
  font-weight: 600;
  margin-bottom: 0.35rem;
  animation: fadeIn 0.2s ease-in-out;
}

.field-error.active {
  display: block;
}

/* Red outline for fields with errors */
.form-group.has-error input,
.form-group.has-error select {
  border-color: #e53e3e !important;
  box-shadow: 0 0 0 3px rgba(229, 62, 62, 0.15) !important;
  background-color: #fff5f5;
}

/* Custom Dropdown Arrow Wrapper */
.select-wrapper {
  position: relative;
  width: 100%;
}

.select-wrapper select {
  width: 100%;
  appearance: none;
  -webkit-appearance: none;
  -moz-appearance: none;
  padding-right: 2.5rem;
  cursor: pointer;
}

/* Custom Arrow SVG Icon */
.select-wrapper::after {
  content: '';
  position: absolute;
  right: 1rem;
  top: 50%;
  transform: translateY(-50%);
  width: 12px;
  height: 8px;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 8'%3E%3Cpath fill='%233a5c40' d='M1.41 0L6 4.58 10.59 0 12 1.41l-6 6-6-6z'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: center;
  pointer-events: none;
}

@keyframes fadeIn {
  from { opacity: 0; transform: translateY(-3px); }
  to { opacity: 1; transform: translateY(0); }
}

/* Red Danger Button — Same pill shape and hover effects as .btn-primary */
.btn-danger {
  background: #dc2626;
  color: var(--cream-white);
  box-shadow: 0 4px 20px rgba(220, 38, 38, 0.35);
}

.btn-danger:hover {
  background: #b91c1c;
  box-shadow: 0 8px 32px rgba(220, 38, 38, 0.45);
  transform: translateY(-2px) scale(1.02);
}

.btn-danger:active {
  transform: translateY(0) scale(0.99);
}

/* Submit row layout: space-between */
/* Submit row layout: closer top spacing */
/* Submit row layout: exact same 0.75rem spacing */
.form-submit-row.between {
  grid-column: 1 / -1;
  display: flex;
  justify-content: space-between;
  align-items: center;
  width: 100%;
  margin-top: 0.75rem; /* Matches the 0.75rem gap between Change Email & Reset Password */
}

/* Custom Delete Account Modal Styling */
.delete-modal-card {
  text-align: center;
  max-width: 440px;
  padding: 2.5rem;
}

.delete-icon-badge {
  width: 68px;
  height: 68px;
  border-radius: 50%;
  background: #fee2e2;
  color: #dc2626;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.8rem;
  margin: 0 auto 1.25rem;
  border: 4px solid #fef2f2;
  box-shadow: 0 4px 14px rgba(220, 38, 38, 0.18);
  animation: pulseWarning 2s infinite ease-in-out;
}

@keyframes pulseWarning {
  0%, 100% {
    transform: scale(1);
    box-shadow: 0 4px 14px rgba(220, 38, 38, 0.18);
  }
  50% {
    transform: scale(1.06);
    box-shadow: 0 6px 22px rgba(220, 38, 38, 0.32);
  }
}

.delete-modal-card h3 {
  font-size: 1.5rem;
  color: var(--text-dark);
  margin-bottom: 0.5rem;
}

.delete-modal-card p {
  color: var(--text-muted);
  font-size: 0.95rem;
  line-height: 1.55;
  margin-bottom: 1.75rem;
}

.full-width-actions {
  display: flex;
  gap: 0.75rem;
  justify-content: center;
}

.full-width-actions .btn {
  flex: 1;
  justify-content: center;
}

/* Responsive adjustment for small screens */
@media (max-width: 600px) {
  .form-submit-row.between {
    flex-direction: column-reverse;
    gap: 0.85rem;
  }
  .form-submit-row.between .btn {
    width: 100%;
    justify-content: center;
  }
  .full-width-actions {
    flex-direction: column-reverse;
  }
}

.sidebar-user-avatar img {
  width: 100%;
  height: 100%;
  border-radius: 50%;
  object-fit: cover;
}