/* ======================================================
   ðŸŒ¿ SwapHandMeDowns Global Styles â€” Jane & Nova Sage
   Cleaned, merged, optimized, conflict-free CSS
   ====================================================== */

/* ------------------------------------------------------
   Root Variables (merged duplicates)
------------------------------------------------------ */
:root {
  --primary-green: #2e7d32;
  --light-green: #a5d6a7;
  --soft-white: #f9fff9;
  --accent-gold: #ffc107;
  --text-dark: #333;
  --button-green: #4caf50;
  --button-hover: #388e3c;
  --glow-green: rgba(76, 175, 80, 0.45);

  --green: #4CAF50;
  --green-dark: #388e3c;
  --gold: #FFC107;
  --blue: #2196F3;
  --beige: #fff7e6;
}

/* ------------------------------------------------------
   GLOBAL RESET
------------------------------------------------------ */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

/* ------------------------------------------------------
   BASE BODY & TYPOGRAPHY
------------------------------------------------------ */
body {
  font-family: Arial, sans-serif;
  background: var(--soft-white);
  color: var(--text-dark);
  overflow-x: hidden;
  animation: fadeInPage 1.2s ease;
  font-size: 20px; 
  line-height: 1.6;
}

h1, h2, h3 {
  font-size: 26px;
  font-weight: bold;
}

/* ------------------------------------------------------
   HEADER (merged conflicting definitions)
------------------------------------------------------ */
header {
  position: sticky;
  top: 0;
  z-index: 1000;
  background: var(--primary-green);
  color: white;
  text-align: center;
  padding: 1.2rem;
  border-bottom: 3px solid #a5d6a7;
  box-shadow: 0 2px 8px rgba(0,0,0,0.2);
}

header h1 {
  font-size: 1.9rem;
}

/* ------------------------------------------------------
   MOBILE MENU TOGGLE
------------------------------------------------------ */
.menu-toggle {
  display: none;
  font-size: 2rem;
  background: none;
  border: none;
  color: white;
  cursor: pointer;
  position: absolute;
  right: 1rem;
  top: 1rem;
}

/* ------------------------------------------------------
   NAVIGATION BAR (merged all versions)
------------------------------------------------------ */
.main-nav,
nav {
  background-color: #256d32;
  padding: 18px 10px;
  text-align: center;
  border-bottom: 3px solid #a5d6a7;
  display: flex;
  flex-wrap: wrap;
  gap: 18px 28px;
  justify-content: center;
}

nav a, .main-nav a {
  color: #ffffff;
  text-decoration: none;
  font-size: 22px;
  font-weight: bold;
  padding: 10px 14px;
  border-radius: 8px;
  transition: 0.2s;
}

nav a:hover, .main-nav a:hover {
  background-color: #3b924b;
}

/* Mobile nav behavior */
@media (max-width: 700px) {
  nav {
    display: none;
    flex-direction: column;
  }

  nav.active {
    display: flex;
  }

  .menu-toggle {
    display: inline-block;
  }

  nav a {
    margin: 0.5rem 0;
    font-size: 22px;
  }
}

/* ------------------------------------------------------
   FORMS
------------------------------------------------------ */
form {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

input, select, textarea {
  width: 100%;
  padding: 12px;
  font-size: 20px;
  border-radius: 10px;
  border: 1px solid #aaa;
  margin-top: 6px;
}

input:focus, select:focus, textarea:focus {
  border-color: var(--primary-green);
  box-shadow: 0 0 8px var(--glow-green);
}

/* ------------------------------------------------------
   BUTTONS (all merged)
------------------------------------------------------ */
button, .btn, input[type="submit"] {
  padding: 15px 25px;
  font-size: 22px;
  border-radius: 12px;
  background: #4CAF50;
  color: white;
  font-weight: bold;
  border: none;
  cursor: pointer;
  display: inline-block;
  transition: background 0.3s, transform 0.2s;
}

button:hover, .btn:hover, input[type="submit"]:hover {
  background: #3e8e41;
  transform: translateY(-2px);
}

/* ------------------------------------------------------
   FLOATING BACK HOME BUTTON
------------------------------------------------------ */
#backHomeBtn {
  position: fixed;
  bottom: 22px;
  right: 22px;
  background: #4CAF50;
  color: white;
  border-radius: 50%;
  padding: 16px 18px;
  font-size: 26px;
  cursor: pointer;
  box-shadow: 0 4px 10px rgba(0,0,0,0.3);
  z-index: 1500;
}

/* Also "back to top" button (fixed) */
#backToTop {
  position: fixed;
  bottom: 80px;
  right: 22px;
  background: #4CAF50;
  padding: 12px;
  border-radius: 50%;
  color: white;
  font-size: 24px;
  cursor: pointer;
}

/* ------------------------------------------------------
   MAIN CONTENT
------------------------------------------------------ */
main {
  max-width: 1100px;
  margin: 2rem auto;
  background: white;
  padding: 2rem;
  border-radius: 12px;
  box-shadow: 0 4px 12px rgba(0,0,0,0.1);
  animation: fadeIn 0.8s ease;
}

/* ------------------------------------------------------
   ITEM CARDS (Browse)
------------------------------------------------------ */
.item-card {
  background: white;
  border: 1px solid var(--light-green);
  border-radius: 10px;
  padding: 15px;
  margin-bottom: 1.5rem;
  box-shadow: 0 3px 6px rgba(0,0,0,0.05);
  transition: transform 0.2s, box-shadow 0.2s;
}

.item-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 6px 14px var(--glow-green);
}

.item-card img {
  max-width: 100%;
  border-radius: 8px;
}

/* Footer */
footer {
  background: var(--primary-green);
  color: white;
  text-align: center;
  padding: 1.4rem;
  font-size: 0.9rem;
  line-height: 1.6;
}

/* ------------------------------------------------------
   ACCESSIBILITY
------------------------------------------------------ */
:focus {
  outline: 3px solid var(--accent-gold);
  outline-offset: 2px;
}

/* ------------------------------------------------------
   PAGE ANIMATIONS
------------------------------------------------------ */
@keyframes fadeInPage { from {opacity:0;} to {opacity:1;} }
@keyframes fadeIn { from {opacity:0;transform:translateY(10px);} to {opacity:1;} }

/* ------------------------------------------------------
   RESPONSIVE TYPOGRAPHY
------------------------------------------------------ */
@media (max-width: 600px) {
  body { font-size: 22px; }
  h1, h2, h3 { font-size: 28px; }
  nav a { font-size: 20px; }
  button { font-size: 22px; }
}
/* ============================================================
   🐾 PET PHOTO CONTEST — GLOBAL STYLES
   Added for Swaphandmedowns.com by Jane & Nova Sage
   ============================================================ */

.pet-gallery {
  display: flex;
  flex-wrap: wrap;
  gap: 15px;
  justify-content: center;
  margin-bottom: 40px;
}

.pet-card {
  background-color: #ffffff;
  border: 1px solid #a5d6a7;
  border-radius: 12px;
  padding: 15px;
  width: 220px;
  text-align: center;
  box-shadow: 0 3px 10px rgba(0,0,0,0.08);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.pet-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 6px 15px rgba(0,0,0,0.12);
}

.pet-card img {
  width: 100%;
  height: auto;
  border-radius: 10px;
  margin-bottom: 10px;
  object-fit: cover;
}

/* Vote Button */
.vote-btn {
  background-color: #2e7d32;
  color: white !important;
  padding: 8px 14px;
  border: none;
  border-radius: 6px;
  text-decoration: none;
  display: inline-block;
  cursor: pointer;
  font-weight: bold;
  margin-top: 6px;
}

.vote-btn:hover {
  background-color: #1b5e20;
}

/* 🏆 Top Pets Section Titles */
.top-pets-title {
  text-align: center;
  font-size: 1.5rem;
  color: #1b5e20;
  margin-bottom: 10px;
}

/* Upload Form */
.upload-form {
  background: white;
  padding: 20px;
  border-radius: 12px;
  max-width: 500px;
  margin: auto;
  box-shadow: 0 3px 10px rgba(0,0,0,0.08);
}

.upload-form input[type="text"],
.upload-form input[type="file"],
.upload-form button {
  width: 100%;
  padding: 10px;
  margin-bottom: 12px;
  border-radius: 8px;
  border: 1px solid #a5d6a7;
}

.upload-form button {
  background-color: #388e3c;
  color: white;
  font-weight: bold;
  border: none;
  cursor: pointer;
}

.upload-form button:hover {
  background-color: #2e7d32;
}

/* Login Overlay */
.overlay {
  position: fixed;
  top: 0; left: 0;
  width: 100%; height: 100%;
  background: rgba(0,0,0,0.6);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 10000;
}

.overlay-content {
  background: #ffffff;
  padding: 25px;
  width: 320px;
  border-radius: 14px;
  box-shadow: 0 5px 15px rgba(0,0,0,0.22);
  text-align: center;
}

.overlay-content input {
  width: 90%;
  padding: 10px;
  margin-bottom: 12px;
  border-radius: 6px;
  border: 1px solid #cccccc;
}

.overlay-content button {
  width: 95%;
  padding: 10px;
  background-color: #0073aa;
  color: white;
  border: none;
  border-radius: 6px;
  cursor: pointer;
}

.overlay-content button:hover {
  background-color: #005f87;
}

.overlay-content a {
  color: #2e7d32;
  font-weight: bold;
  text-decoration: none;
}
