/* Paws & Heroes - Modern Dark Nonprofit Theme */

:root {
  --color-bg: #0b0f14;
  --color-surface: #10161d;
  --color-elevated: #141b23;
  --color-border: rgba(255, 255, 255, 0.08);
  --color-text: #e8edf2;
  --color-muted: #aab4bf;
  --color-primary: #4cc9f0; /* bright aqua */
  --color-primary-600: #3bb6dc;
  --color-primary-700: #2ea4c8;
  --color-secondary: #adb5bd; /* soft gray */
  --color-accent: #ffd166; /* warm gold accents */
  --shadow-sm: 0 6px 14px rgba(0, 0, 0, 0.25);
  --shadow-md: 0 12px 30px rgba(0, 0, 0, 0.35);
  --radius-sm: 10px;
  --radius-md: 16px;
  --radius-lg: 22px;
}

/* Base & Typography */
html, body {
  height: 100%;
}

body {
  font-family: 'Montserrat', system-ui, -apple-system, Segoe UI, Roboto, Ubuntu, Cantarell, 'Helvetica Neue', Arial, sans-serif;
  color: var(--color-text);
  background-color: var(--color-bg);
  background-image: linear-gradient(180deg, rgba(0,0,0,0.55), rgba(0,0,0,0.55)), url('https://images.unsplash.com/photo-1509205477838-a534e43a849f?q=80&w=2078&auto=format&fit=crop&ixlib=rb-4.0.3&ixid=M3wxMjA3fDB8MHxwaG90by1wYWdlfHx8fGVufDB8fHx8fA%3D%3D');
  background-attachment: fixed;
  background-size: cover;
  background-position: center;
  backdrop-filter: blur(6px);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

main {
  flex: 1 0 auto;
  display: block;
}

p { color: var(--color-text); }
.lead { color: #f2f6fb; }

h1, h2, h3, h4, h5, h6 {
  letter-spacing: 0.2px;
  color: #f6fbff;
}

/* Layout Containers */
.container, .container-fluid {
  background: transparent;
}

main.container {
  background: linear-gradient(180deg, rgba(16,22,29,0.92), rgba(16,22,29,0.92));
  border: 1px solid var(--color-border);
  box-shadow: var(--shadow-sm);
  border-radius: var(--radius-md);
  padding: 26px;
  margin-top: 24px;
}

/* Navbar */
.navbar {
  background: rgba(10, 14, 18, 0.7) !important;
  border: 1px solid var(--color-border);
  box-shadow: var(--shadow-sm);
  backdrop-filter: saturate(120%) blur(6px);
  border-radius: var(--radius-lg);
  padding: 10px 14px;
}

.navbar-brand {
  font-weight: 800;
  color: #f7fbff !important;
  letter-spacing: 0.4px;
}

/* Ensure consistent spacing across items */
.navbar-nav {
  gap: 8px;
  align-items: center;
}

.nav-link {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: #ebf2f7 !important;
  font-weight: 600;
  padding: 10px 14px;
  line-height: 1;
  height: 40px;
  white-space: nowrap;
  margin: 0;
  border-radius: 999px;
  box-sizing: border-box;
}

.nav-link::after {
  content: "";
  position: absolute;
  left: 10%;
  right: 10%;
  bottom: 4px;
  height: 2px;
  background: linear-gradient(90deg, transparent, var(--color-primary), transparent);
  opacity: 0;
  transform: translateY(2px);
  transition: opacity .2s ease, transform .2s ease;
}

.nav-link:hover::after, .nav-link:focus::after {
  opacity: 1;
  transform: translateY(0);
}

/* Buttons */
.btn {
  border-radius: 999px;
  border: 1px solid var(--color-border);
  box-shadow: 0 2px 0 rgba(255,255,255,0.06) inset, 0 1px 10px rgba(0,0,0,0.25);
  padding: 10px 18px;
  font-weight: 700;
  letter-spacing: 0.3px;
  transition: transform .12s ease, box-shadow .2s ease, background .2s ease;
}

.btn:focus { outline: none; box-shadow: 0 0 0 0.25rem rgba(76, 201, 240, 0.2); }

.btn-primary {
  color: #041017;
  background: linear-gradient(180deg, var(--color-primary), var(--color-primary-600));
  border-color: rgba(255,255,255,0.12);
}

.btn-primary:hover {
  color: #041017;
  background: linear-gradient(180deg, var(--color-primary-600), var(--color-primary-700));
  transform: translateY(-1px);
}

.btn-secondary {
  color: #eaf3fb;
  background: linear-gradient(180deg, #2a313a, #1f252c);
}

.btn-secondary:hover {
  color: #ffffff;
  background: linear-gradient(180deg, #303844, #242b33);
  transform: translateY(-1px);
}

/* Cards */
.card {
  background: linear-gradient(180deg, rgba(20,27,35,0.95), rgba(20,27,35,0.95));
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-sm);
}

.card .card-title { color: #f5f9ff; font-weight: 800; }
.card .card-text { color: var(--color-muted); }

.card-footer {
  background: rgba(255,255,255,0.02);
  border-top: 1px solid var(--color-border);
}

/* Adopted ribbon */
.adopted-banner {
  top: 10px;
  left: -10px;
  background-color: #d7263d;
  padding: 10px 20px;
  font-weight: 900;
  transform: rotate(-45deg);
  z-index: 2;
  text-transform: uppercase;
  letter-spacing: 1px;
  box-shadow: var(--shadow-sm);
}

.adopted-banner span { color: white; font-size: 0.95rem; }

/* Adopt listing cards */
.card-img-top { display: block; margin-left: auto; margin-right: auto; }

/* Adopt detail content */
.centered-content { text-align: center; }
.centered-content img,
.centered-content h1,
.centered-content h2,
.centered-content h3,
.centered-content h4,
.centered-content h5,
.centered-content h6 {
  margin: auto;
  display: block;
}

.content-area { text-align: center; max-width: 100%; }
.content-area p,
.content-area ul,
.content-area ol,
.content-area div {
  display: inline-block;
  text-align: center;
  width: 100%;
}

.content-area ul,
.content-area ol { list-style-position: inside; }

.content-area img {
  max-width: 90%;
  height: auto;
  margin: 0 auto;
}

.form-area { width: 100%; max-width: 640px; margin: 0 auto; }
.form-area input,
.form-area select,
.form-area textarea,
.form-area button { width: 100%; }

/* Forms */
.form-control, .form-select, textarea {
  color: var(--color-text);
  background: var(--color-elevated);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-sm);
}

.form-control:focus, .form-select:focus, textarea:focus {
  border-color: var(--color-primary-600);
  box-shadow: 0 0 0 0.2rem rgba(76, 201, 240, 0.15);
  outline: none;
}

label { color: #d9e2eb; font-weight: 600; }

/* Footer */
footer {
  background: rgba(10, 14, 18, 0.75);
  border-top: 1px solid var(--color-border);
  box-shadow: 0 -10px 30px rgba(0,0,0,0.35);
}

footer p { margin: 0; color: #dbe5ef; }
footer a { color: #f0f7ff; text-decoration: none; }
footer a:hover { text-decoration: underline; color: #ffffff; }

/* Images */
img { max-width: 100%; height: auto; user-select: none; -webkit-user-drag: none; }

/* Banner */
.banner-placeholder {
  position: relative;
  overflow: hidden;
  margin-bottom: 2rem; /* ensure separation from cards below */
}

.banner-text-overlay {
  background: linear-gradient(180deg, rgba(0,0,0,0.45), rgba(0,0,0,0.55));
  padding: 1.25rem;
  text-align: center;
}

/* Anchor the overlay to the banner image area */
.banner-placeholder .banner-text-overlay {
  position: absolute;
  inset: 0; /* top:0; right:0; bottom:0; left:0 */
  z-index: 1;
}

.banner-text-overlay h1 { text-shadow: 0 4px 18px rgba(0,0,0,0.65); }
.banner-text-overlay p { color: #e3edf6; }

/* Utilities */
.border-muted { border-color: var(--color-border) !important; }
.text-muted-soft { color: var(--color-muted) !important; }
.text-accent { color: var(--color-accent) !important; }
.bg-surface { background: var(--color-surface) !important; }
.bg-elevated { background: var(--color-elevated) !important; }

/* Rich content flow: allow inline images from editor to sit side-by-side */
.rich-content-flow p { margin-bottom: 1rem; }
.rich-content-flow img {
  display: inline-block;
  vertical-align: middle;
  margin: 0.25rem 0.35rem;
  height: auto;
  max-width: 100%;
}
.rich-content-flow figure { display: inline-block; margin: 0.25rem 0.35rem; }
.rich-content-flow figure img { display: block; }
.rich-content-flow .image { display: inline-block; }
.rich-content-flow .image img { display: block; }
.rich-content-flow { text-align: center; }
.rich-content-flow > * { text-align: left; display: inline-block; max-width: 100%; }
/* Prevent global centering rules from forcing images to full width */
.rich-content-flow .content-area, .rich-content-flow .content, .rich-content-flow p, .rich-content-flow div {
  width: auto;
}

/* Responsive */
@media (max-width: 992px) {
  .navbar { border-radius: var(--radius-md); }
}

@media (max-width: 768px) {
  main.container { padding: 18px; }
  .navbar-brand, .nav-link { font-size: 0.95rem; }
  .banner-text-overlay h1 { font-size: 2rem; }
  .banner-text-overlay p { font-size: 1rem; }
}

/* Normalize list alignment inside cards */
.card-body ul,
.card-body ol {
  display: inline-block;
  text-align: left;
  list-style-position: outside;
  padding-left: 1.25rem;
}

/* Before/After carousel image alignment */
.before-after-pair {
  display: flex;
  align-items: center; /* vertical alignment within slide height */
  justify-content: center; /* center horizontally */
  gap: 0;
  height: 100%;
  z-index: -1;
}
.before-after-pair img {
  object-fit: cover;
  height: 100%;
}

/* Condensed review cards on homepage */
.review-condensed { min-height: 0 !important; }
.review-condensed h2 { font-size: 1.25rem; }
.review-condensed .card-text { margin-bottom: 0.25rem; }