@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600&family=Poppins:wght@600;700&display=swap');

/* BODY & GLOBAL BACKGROUND */
:root {
  --bs-primary: #F97316;
  --bs-primary-hover: #ea580c;
  --bs-accent: #92400E;
  --bs-bg-light: #FFF7ED;
  --bs-text-dark: #1E293B;
  --bs-card-shadow: 0 8px 20px rgba(0, 0, 0, 0.08);
  --transition: all 0.3s ease;
}

body {
  background: linear-gradient(180deg, #FFF7ED 0%, #FFFFFF 35%, #FFF7ED 100%) !important;
  background-attachment: fixed;
  font-family: 'Inter', sans-serif;
  color: var(--bs-text-dark);
  margin: 0;
  padding: 0;
}

header,
main,
.container {
  background: transparent !important;
}

/* GLOBAL LINK STYLES (No Underlines) */
a {
  text-decoration: none !important;
  color: var(--bs-primary);
  transition: color 0.3s ease, filter 0.3s ease;
}

a:hover,
a:focus {
  text-decoration: none !important;
  color: var(--bs-primary-hover);
  filter: brightness(1.1);
}

button a,
.card a {
  text-decoration: none !important;
  color: inherit !important;
}

/* HERO SECTION */
header {
  background: linear-gradient(180deg, rgba(249, 115, 22, 0.08) 0%, rgba(255, 247, 237, 0.95) 100%) !important;
  text-align: center;
  padding: 6rem 1rem 5rem;
}

header h1 {
  font-family: 'Poppins', sans-serif;
  font-size: 2.5rem;
  font-weight: 700;
  color: var(--bs-text-dark);
  letter-spacing: -0.5px;
  margin-bottom: 1rem;
}

header p {
  font-size: 1.1rem;
  color: #334155;
  max-width: 600px;
  margin: 0 auto 2rem;
}

header .btn-primary {
  font-size: 1.125rem;
  font-weight: 600;
  padding: 0.8rem 2rem;
  border-radius: 0.75rem;
  box-shadow: 0 6px 16px rgba(249, 115, 22, 0.4);
}

header .btn-primary:hover {
  box-shadow: 0 8px 22px rgba(249, 115, 22, 0.6);
}

/* TYPOGRAPHY */
h1, h2, h3, .navbar-brand {
  font-family: 'Poppins', sans-serif;
  letter-spacing: -0.5px;
}

p {
  line-height: 1.6;
}

/* NAVBAR */
.navbar {
  background-color: var(--bs-primary) !important;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
  transition: background-color 0.3s ease;
}

.navbar-nav {
  gap: 0.25rem;
}

.navbar-brand {
  text-decoration: none !important;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  color: #fff !important;
  font-weight: 700;
  letter-spacing: -0.5px;
  transition: all 0.3s ease;
}

.navbar-brand i {
  color: #fff;
  font-size: 1.25rem;
  vertical-align: middle;
}

.navbar-brand:hover {
  filter: brightness(1.15);
  transform: scale(1.02);
}

.nav-link {
  color: rgba(255, 255, 255, 0.85) !important;
  font-weight: 500;
  font-size: 0.95rem;
  padding: 0.4rem 0.75rem;
  border-radius: 0.5rem;
  transition: background-color 0.25s ease, color 0.25s ease, transform 0.2s ease;
}

.nav-link:hover {
  color: #fff !important;
  background-color: rgba(255, 255, 255, 0.15);
  transform: translateY(-1px);
}

.nav-link.active {
  color: #fff !important;
  background-color: rgba(0, 0, 0, 0.1);
  font-weight: 600;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.25);
}

.nav-link:focus-visible {
  outline: 2px solid rgba(255, 255, 255, 0.6);
  outline-offset: 2px;
}

/* NAVBAR TOGGLER */
.navbar-toggler {
  border: 1px solid rgba(255, 255, 255, 0.25);
  border-radius: 8px;
  padding: 6px 8px;
  background: rgba(255, 255, 255, 0.05);
  transition: all 0.3s ease;
}

.navbar-toggler-icon {
  background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 30 30'%3e%3cpath stroke='rgba(255,255,255,1)' stroke-width='2' stroke-linecap='round' stroke-miterlimit='10' d='M4 7h22M4 15h22M4 23h22'/%3e%3c/svg%3e");
}

.navbar-toggler:hover {
  border-color: rgba(255, 255, 255, 0.6);
  box-shadow: 0 0 8px rgba(255, 255, 255, 0.4);
  background: rgba(255, 255, 255, 0.1);
  transform: scale(1.05);
}

.navbar-toggler:focus {
  outline: none;
  box-shadow: 0 0 8px rgba(255, 255, 255, 0.5);
}

/* BUTTONS */
.btn-primary {
  background-color: var(--bs-primary);
  border-color: var(--bs-primary);
  color: #fff;
  transition: all 0.3s ease;
  box-shadow: 0 4px 12px rgba(249, 115, 22, 0.3);
}

.btn-primary:hover,
.btn-primary:focus {
  background-color: var(--bs-primary-hover);
  border-color: var(--bs-primary-hover);
  box-shadow: 0 6px 14px rgba(249, 115, 22, 0.4);
  transform: translateY(-2px);
}

/* PET CARDS */
main.container h2,
main h2 {
  font-family: 'Poppins', sans-serif;
  font-weight: 700;
  color: var(--bs-text-dark);
  text-align: center !important;
  font-size: 1.9rem;
  margin-bottom: 2.5rem;
}

/* PET CARDS (Uniform Height) */
#pet-list {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 2rem;
  justify-items: center;
  align-items: start;
  margin-top: 2rem;
  max-width: 1200px;
  margin-left: auto;
  margin-right: auto;
}

#pet-list>.card {
  width: 100%;
}

.card {
  border: none;
  border-radius: 1rem;
  overflow: hidden;
  background: #fff;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
  transition: all 0.3s ease;
  animation: fadeUp 0.6s ease forwards;
  display: flex;
  flex-direction: column;
  height: 100%;
  max-width: 320px;
}

.card img {
  width: 100%;
  height: 230px;
  object-fit: cover;
  border-top-left-radius: 1rem;
  border-top-right-radius: 1rem;
  transition: transform 0.4s ease;
}

.card-body {
  flex-grow: 1;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: 1rem 1.25rem;
  text-align: left;
  min-height: 110px;
}

.card-title {
  font-family: 'Poppins', sans-serif;
  font-weight: 600;
  color: var(--bs-text-dark);
  margin-bottom: 0.25rem;
}

.card-text {
  color: #64748b;
  font-size: 0.95rem;
}

.card:hover {
  transform: translateY(-5px);
  transition: all 0.3s ease;
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.1);
}


.card:hover img {
  transform: scale(1.05);
}

@keyframes fadeUp {
  from {
    opacity: 0;
    transform: translateY(20px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* SEARCH BAR (Improved Contrast) */
.search-bar {
  display: flex;
  justify-content: center;
  margin-bottom: 2rem;
}

.search-bar input {
  background-color: #ffffff;
  border: 1px solid rgba(0, 0, 0, 0.1);
  font-size: 1rem;
  width: 100%;
  padding: 0.75rem 1rem;
  border-radius: 0.75rem;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
  transition: all 0.3s ease;
}

.search-bar input::placeholder {
  color: #9ca3af;
}

.search-bar input:focus {
  background-color: #fff;
  border-color: var(--bs-primary);
  box-shadow: 0 0 0 0.25rem rgba(249, 115, 22, 0.2);
  outline: none;
  transform: scale(1.02);
}

/* PET DETAILS PAGE */
#pet-details img {
  border-top-left-radius: 1rem;
  border-top-right-radius: 1rem;
  object-fit: cover;
  height: 400px;
  width: 100%;
}

#pet-details .card-body {
  background: #fff;
  border-radius: 0 0 1rem 1rem;
  padding: 2rem;
}

#pet-details .card-title {
  font-family: 'Poppins', sans-serif;
  font-weight: 700;
  color: var(--bs-text-dark);
}

#share-btn i {
  vertical-align: middle;
  margin-right: 4px;
}

/* BUTTON ENHANCEMENTS */
#adopt-btn {
  font-weight: 600;
  box-shadow: 0 4px 12px rgba(249, 115, 22, 0.3);
  transition: all 0.3s ease;
}

#adopt-btn:hover {
  background-color: var(--bs-primary-hover);
  transform: translateY(-2px);
  box-shadow: 0 6px 16px rgba(249, 115, 22, 0.4);
}

#adopt-btn i {
  animation: pulse 1.5s infinite;
}

@keyframes pulse {
  0% {
    transform: scale(1);
    opacity: 1;
  }

  50% {
    transform: scale(1.2);
    opacity: 0.85;
  }

  100% {
    transform: scale(1);
    opacity: 1;
  }
}

.back-btn {
  font-weight: 500;
  border-radius: 0.75rem;
  transition: all 0.3s ease;
}

.back-btn:hover {
  background-color: var(--bs-primary);
  color: #fff !important;
  border-color: var(--bs-primary);
  transform: translateY(-2px);
}


#share-btn {
  border: 2px solid rgba(0, 0, 0, 0.1);
  font-weight: 500;
  transition: all 0.3s ease;
}

#share-btn:hover {
  border-color: var(--bs-primary);
  color: var(--bs-primary-hover);
  background-color: rgba(249, 115, 22, 0.05);
}

/* LAYOUT FIX (Footer alignment) */
html, body {
  height: 100%;
}

body {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

main {
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
}

/* ADMIN LOGIN / REGISTER FORMS */
.login-card {
  margin-top: 2rem;
  margin-bottom: 2rem;
  border-radius: 1rem;
}

@media (min-width: 768px) {
  .login-card {
    padding: 2rem 2.5rem !important;
  }
}

.login-card p.small {
  margin-bottom: 0;
}

/* ADMIN LOGIN / REGISTER BALANCE FIX */
.login-card h2,
.register-card h2 {
  font-size: 1.75rem;
  margin-bottom: 0.25rem;
}

.login-card p.small,
.register-card p.small {
  margin-bottom: 1rem;
  line-height: 1.4;
}

.register-card form {
  margin-bottom: 0.5rem;
}

.register-card .btn {
  margin-top: 0.75rem;
}

.register-card p.small.mb-0 {
  margin-top: 0.75rem;
}

.register-card {
  max-width: 460px;
  width: 100%;
  padding: 2rem 1.75rem;
  border-radius: 1rem;
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.08);
  margin-top: 2rem;
  margin-bottom: 2rem;
}

/* FORM PLACEHOLDER STYLE TWEAKS */
.login-card .form-control::placeholder {
  font-size: 0.92rem;
  color: #6b7280 !important;
  opacity: 0.65 !important;
  letter-spacing: 0.2px;
}

.password-wrapper {
  position: relative;
}

.password-wrapper .form-control {
  padding-right: 2.75rem !important;
}

#togglePassword {
  position: absolute;
  top: 50%;
  right: 0.9rem;
  transform: translateY(-50%);
  cursor: pointer;
  color: #9ca3af;
  transition: color 0.3s ease, transform 0.2s ease;
  font-size: 1.05rem;
  pointer-events: auto;
  z-index: 2;
}

#togglePassword:hover {
  color: var(--bs-primary);
  transform: scale(1.1);
}


.login-card .form-control::placeholder {
  color: #6b7280 !important;
  opacity: 0.85 !important;
}

/* ADMIN FORM RESPONSIVE SPACING FIX */

.login-card,
.register-card {
  margin-top: 2rem;
  margin-bottom: 2rem;
  border-radius: 1rem;
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.08);
}

.register-card {
  padding: 2rem 1.75rem !important;
  max-width: 460px;
  width: 100%;
}

@media (min-width: 992px) {

  .login-card,
  .register-card {
    margin-top: 4rem;
    margin-bottom: 4rem;
  }
}

@media (min-height: 900px) {
  main {
    padding-top: 2rem;
    padding-bottom: 2rem;
  }
}

/* CREATE PET FORM - SPACING + PLACEHOLDERS */
.create-card {
  margin-top: 2rem;
  margin-bottom: 2rem;
  border-radius: 1rem;
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.08);
  padding: 2rem 1.75rem !important;
  max-width: 600px;
  width: 100%;
}

@media (min-width: 992px) {
  .create-card {
    margin-top: 4rem;
    margin-bottom: 4rem;
  }
}

.create-card .form-control::placeholder {
  font-size: 0.92rem;
  color: #6b7280 !important;
  opacity: 0.65 !important;
  letter-spacing: 0.2px;
}

/* ADMIN DASHBOARD (EDIT/DELETE) */
#adminPetList {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 2rem;
  justify-items: center;
  align-items: start;
  margin-top: 2rem;
  padding: 2rem 0;
}

.pet-card-wrapper {
  width: 100%;
  display: flex;
  justify-content: center;
}

#adminPetList .card {
  width: 100%;
  max-width: 320px;
  border: none;
  border-radius: 1rem;
  overflow: hidden;
  background: #fff;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
  display: flex;
  flex-direction: column;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

#adminPetList .card:hover {
  transform: translateY(-5px);
  box-shadow: 0 10px 25px rgba(249, 115, 22, 0.25);
}

#adminPetList img {
  height: 220px;
  width: 100%;
  object-fit: cover;
  border-top-left-radius: 1rem;
  border-top-right-radius: 1rem;
}

#adminPetList .card-body {
  text-align: center;
  padding: 1rem 1.25rem;
}

#adminPetList .card-title {
  font-family: 'Poppins', sans-serif;
  font-weight: 700;
  font-size: 1.05rem;
  color: var(--bs-text-dark);
  margin-bottom: 0.25rem;
}

#adminPetList .card-text {
  color: #64748b;
  font-size: 0.9rem;
  margin-bottom: 1rem;
}

#adminPetList .btn {
  font-size: 0.9rem;
  padding: 0.4rem 1rem;
  border-radius: 0.5rem;
  transition: all 0.3s ease;
}

#adminPetList .btn-warning {
  background-color: #f59e0b;
  border-color: #f59e0b;
  color: #fff;
}

#adminPetList .btn-warning:hover {
  background-color: #d97706;
  border-color: #d97706;
}

#adminPetList .btn-danger {
  background-color: #ef4444;
  border-color: #ef4444;
  color: #fff;
}

#adminPetList .btn-danger:hover {
  background-color: #dc2626;
  border-color: #dc2626;
}

#adminPetList .btn:hover {
  transform: translateY(-2px);
  opacity: 0.95;
}


/* EDIT PET PAGE - STYLE FIX */
.create-card {
  margin-top: 2rem;
  margin-bottom: 2rem;
  border-radius: 1rem;
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.08);
  padding: 2rem 1.75rem !important;
  max-width: 600px;
  width: 100%;
}

@media (min-width: 992px) {
  .create-card {
    margin-top: 4rem;
    margin-bottom: 4rem;
  }
}

.create-card .form-control::placeholder {
  font-size: 0.92rem;
  color: #6b7280 !important;
  opacity: 0.65 !important;
  letter-spacing: 0.2px;
}

/* FOOTER (Final Polished) */

footer {
  background-color: var(--bs-primary);
  color: #fff;
  font-size: 0.95rem;
  padding-top: 1.5rem;
  padding-bottom: 1.5rem;
  text-align: center;
}

footer a {
  color: #fff;
  text-decoration: none;
  transition: color 0.3s ease, opacity 0.3s ease;
  font-weight: 500;
}

footer a:hover,
footer a:focus {
  color: #fde68a;
  opacity: 1;
}

footer a:visited,
footer a:active {
  color: #fff;
  opacity: 0.95;
}

.footer-icon i {
  color: #fff;
  transition: all 0.3s ease;
  line-height: 1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.footer-icon i:hover {
  color: #fde68a;
  transform: scale(1.1);
}

.footer-icon i::before {
  display: inline-block;
  vertical-align: middle;
}

footer .small {
  color: #fff;
  opacity: 0.9;
}

/* Responsive */
@media (max-width: 768px) {
  footer .row.align-items-center {
    flex-direction: column;
    text-align: center;
    gap: 1rem;
  }

  footer .col-md-4 {
    width: 100%;
  }
}