/* assets/style.css */
body {
  font-family: 'Poppins', sans-serif;
  margin: 0;
  padding: 0;
  background: #f4f7fb;
  color: #333;
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

/* Header styling */
header {
    position: sticky;
    top: 0;
    background: #2575fc; /* A professional blue background */
    z-index: 1000;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
    color: white; /* Make text inside header white */
}

header .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 90%;
    margin: 0 auto;
}

header h1 {
    margin: 0;
    font-size: 1.8rem;
    font-weight: 600;
    color: white; /* Ensure site title is visible */
}

/* Navigation links */
nav a {
    color: white; /* Keep links visible */
    margin-left: 20px;
    text-decoration: none;
    font-weight: 500;
    transition: color 0.3s;
}

nav a:hover {
    color: #ffd700; /* Hover effect */
}

nav .welcome-text {
    margin-left: 20px;
    font-weight: 500;
    color: white;
}


main {
  flex: 1;
  padding: 2rem 0;
}

/* Optional: add some padding so content doesn't hide behind sticky header */
main .container {
    padding-top: 20px; 
}

form {
  background: white;
  padding: 2rem;
  border-radius: 12px;
  box-shadow: 0 4px 12px rgba(0,0,0,0.1);
  max-width: 600px;
  margin: 0 auto 2rem;
}

input, select, textarea, button {
  width: 100%;
  padding: 0.8rem;
  margin-top: 0.5rem;
  margin-bottom: 1rem;
  border: 1px solid #ccc;
  border-radius: 8px;
  font-size: 1rem;
}

button {
  background: #2575fc;
  color: white;
  border: none;
  cursor: pointer;
  font-weight: bold;
  transition: background 0.3s ease;
}

button:hover {
  background: #1a5ed8;
}

.grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 1.5rem;
}

.card {
  background: white;
  border-radius: 12px;
  box-shadow: 0 4px 12px rgba(0,0,0,0.1);
  padding: 1rem;
  transition: transform 0.3s ease;
}

.card:hover {
  transform: translateY(-5px);
}

.card img {
  width: 100%;
  border-radius: 10px;
  margin-bottom: 1rem;
}

footer {
  background: #333;
  color: white;
  text-align: center;
  padding: 1rem;
  margin-top: auto;
}

.logo img {
  max-height: 60px;   /* Limits logo height */
  width: auto;        /* Keeps aspect ratio */
  border-radius: 8px; /* Optional rounded corners */
  display: block;
}

/* Hero Section with background image */
.hero {
  background: url('bag.jpg') no-repeat center center/cover;
  color: white;
  padding: 100px 20px 60px;
  text-align: center;
  border-radius: 12px;
  margin-bottom: 40px;
  position: relative;
}

/* Optional: overlay for better text readability */
.hero::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0,0,0,0.4); /* semi-transparent overlay */
  border-radius: 12px;
  z-index: 0;
}

.hero-content {
  position: relative;
  z-index: 1; /* bring text above overlay */
}

/* === Categories Section === */
.categories {
  text-align: center;
  margin-bottom: 40px;
}

.categories h3 {
  font-size: 2rem;
  margin-bottom: 20px;
  color: #2575fc;
}

.category-grid {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 20px;
}

.category-card {
  background: #ffffff;
  padding: 20px 30px;
  border-radius: 12px;
  box-shadow: 0 4px 12px rgba(0,0,0,0.1);
  font-weight: 600;
  font-size: 1.2rem;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  cursor: pointer;
}

.category-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 8px 20px rgba(0,0,0,0.15);
}

/* === How It Works Section === */
.how-it-works {
  text-align: center;
  margin-bottom: 40px;
}

.how-it-works h3 {
  font-size: 2rem;
  margin-bottom: 30px;
  color: #6a11cb;
}

.steps {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 20px;
}

.step {
  background: white;
  padding: 20px;
  border-radius: 12px;
  flex: 1 1 250px;
  max-width: 300px;
  box-shadow: 0 4px 12px rgba(0,0,0,0.1);
  transition: transform 0.3s ease;
}

.step:hover {
  transform: translateY(-5px);
}

.step h4 {
  margin-bottom: 10px;
  color: #2575fc;
}

.step p {
  font-size: 0.95rem;
}

/* === Recent Items Section === */
.recent-items {
  margin-bottom: 40px;
}

.recent-items h3 {
  text-align: center;
  font-size: 2rem;
  margin-bottom: 20px;
  color: #6a11cb;
}

.items-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 20px;
}

.item-card {
  background: white;
  border-radius: 12px;
  box-shadow: 0 4px 12px rgba(0,0,0,0.1);
  padding: 15px;
  transition: transform 0.3s ease;
}

.item-card:hover {
  transform: translateY(-5px);
}

.item-card img {
  width: 100%;
  border-radius: 10px;
  margin-bottom: 10px;
}

/* === Trust Section === */
.trust {
  text-align: center;
  margin-bottom: 40px;
}

.trust h3 {
  font-size: 2rem;
  margin-bottom: 20px;
  color: #2575fc;
}

.trust ul {
  list-style: none;
  padding: 0;
}

.trust li {
  background: #ffd700;
  color: #333;
  display: inline-block;
  padding: 10px 20px;
  border-radius: 20px;
  margin: 5px;
  font-weight: 600;
  transition: background 0.3s ease;
}

.trust li:hover {
  background: #ffb700;
}

/* === Call-to-Action (CTA) === */
.cta {
  text-align: center;
  background: linear-gradient(135deg, #6a11cb, #2575fc);
  color: white;
  padding: 50px 20px;
  border-radius: 12px;
  margin-bottom: 40px;
}

.cta h3 {
  font-size: 2rem;
  margin-bottom: 15px;
}

.cta p {
  font-size: 1.2rem;
  margin-bottom: 25px;
}

.cta .btn {
  background: #ffd700;
  color: #333;
  padding: 12px 25px;
  font-weight: bold;
  border-radius: 8px;
  text-decoration: none;
  transition: background 0.3s ease;
}

.cta .btn:hover {
  background: #ffb700;
}

/* === Responsive === */
@media (max-width: 768px) {
  .steps, .category-grid {
    flex-direction: column;
    align-items: center;
  }
}

/* Registration / Login Container */
.auth-container {
    background: white;
    max-width: 450px;
    margin: 50px auto;
    padding: 40px 30px;
    border-radius: 16px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.1);
    text-align: center;
    transition: transform 0.3s ease;
}

.auth-container:hover {
    transform: translateY(-5px);
}

.auth-container h2 {
    margin-bottom: 25px;
    font-size: 2rem;
    color: #6a11cb;
}

.auth-container input {
    width: 100%;
    padding: 14px;
    margin: 10px 0 20px;
    border-radius: 10px;
    border: 1px solid #ccc;
    font-size: 1rem;
}

.auth-container button {
    background: #2575fc;
    color: white;
    width: 100%;
    padding: 14px;
    border-radius: 10px;
    border: none;
    font-weight: bold;
    cursor: pointer;
    transition: background 0.3s ease;
}

.auth-container button:hover {
    background: #1a5ed8;
}

.or {
    margin: 25px 0 15px;
    font-weight: bold;
    color: #666;
}

.google-btn {
    display: inline-block;
    background: #de5246;
    color: white;
    padding: 14px 25px;
    border-radius: 12px;
    text-decoration: none;
    font-weight: bold;
    transition: background 0.3s ease;
}

.google-btn:hover {
    background: #c73f30;
}

.register-link {
    margin-top: 20px;
}

.register-link a {
    color: #2575fc;
    text-decoration: none;
    font-weight: bold;
}

.register-link a:hover {
    text-decoration: underline;
}

/* Responsive */
@media (max-width: 480px) {
    .auth-container {
        padding: 30px 20px;
    }
}

.auth-container {
    background: white;
    max-width: 400px;
    margin: 40px auto;
    padding: 30px;
    border-radius: 12px;
    box-shadow: 0 8px 20px rgba(0,0,0,0.15);
    text-align: center;
}

.auth-container h2 {
    margin-bottom: 20px;
    color: #2575fc;
}

.auth-container input {
    width: 100%;
    padding: 12px;
    margin: 8px 0 15px;
    border-radius: 8px;
    border: 1px solid #ccc;
}

.auth-container button {
    background: #2575fc;
    color: white;
    width: 100%;
    padding: 12px;
    border-radius: 8px;
    border: none;
    font-weight: bold;
    cursor: pointer;
    transition: background 0.3s ease;
}

.auth-container button:hover {
    background: #1a5ed8;
}

.or {
    margin: 20px 0;
    font-weight: bold;
    color: #666;
}

.google-btn {
    display: inline-block;
    background: #de5246;
    color: white;
    padding: 12px 20px;
    border-radius: 8px;
    text-decoration: none;
    font-weight: bold;
    transition: background 0.3s ease;
}

.google-btn:hover {
    background: #c73f30;
}

.register-link {
    margin-top: 15px;
}

.register-link a {
    color: #2575fc;
    text-decoration: none;
    font-weight: bold;
}

.register-link a:hover {
    text-decoration: underline;
}

.post-item-container {
    max-width: 700px;
    margin: 50px auto;
    background: white;
    padding: 40px 30px;
    border-radius: 16px;
    box-shadow: 0 10px 25px rgba(0,0,0,0.15);
    text-align: center;
}

.post-item-container h2 {
    color: #6a11cb;
    margin-bottom: 10px;
}

.welcome-note {
    color: #333;
    font-size: 1.1rem;
    margin-bottom: 25px;
}

.success-message {
    color: #28a745;
    font-weight: bold;
    margin-bottom: 20px;
}

.post-item-form {
    text-align: left;
}

.post-item-form label {
    font-weight: 600;
    display: block;
    margin-bottom: 5px;
    margin-top: 15px;
}

.post-item-form input,
.post-item-form select,
.post-item-form textarea {
    width: 100%;
    padding: 12px;
    border-radius: 10px;
    border: 1px solid #ccc;
    font-size: 1rem;
}

.post-item-form textarea {
    min-height: 100px;
    resize: vertical;
}

.post-item-form button {
    background: #2575fc;
    color: white;
    width: 100%;
    padding: 14px;
    border-radius: 12px;
    border: none;
    font-weight: bold;
    cursor: pointer;
    margin-top: 20px;
    transition: background 0.3s ease;
}

.post-item-form button:hover {
    background: #1a5ed8;
}

.user-items {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 20px;
    margin-top: 20px;
}

.item-card {
    background: white;
    padding: 20px;
    border-radius: 16px;
    box-shadow: 0 8px 20px rgba(0,0,0,0.1);
    transition: transform 0.3s ease;
    text-align: left;
}

.item-card:hover {
    transform: translateY(-5px);
}

.item-card img {
    width: 100%;
    border-radius: 12px;
    margin-bottom: 10px;
}

.item-card h4 {
    color: #6a11cb;
    margin-bottom: 8px;
}

.item-card p {
    font-size: 0.95rem;
    margin-bottom: 8px;
}

.item-actions {
    display: flex;
    gap: 10px;
}

.edit-btn, .delete-btn {
    padding: 8px 12px;
    border-radius: 8px;
    text-decoration: none;
    font-weight: bold;
    color: white;
    transition: background 0.3s ease;
}

.edit-btn {
    background: #28a745;
}

.edit-btn:hover {
    background: #1e7e34;
}

.delete-btn {
    background: #dc3545;
}

.delete-btn:hover {
    background: #b52a37;
}

.edit-item-container {
    max-width: 700px;
    margin: 50px auto;
    background: white;
    padding: 40px 30px;
    border-radius: 16px;
    box-shadow: 0 10px 25px rgba(0,0,0,0.15);
    text-align: center;
}

.edit-item-container h2 {
    color: #6a11cb;
    margin-bottom: 15px;
}

.cancel-btn {
    display: inline-block;
    background: #6c757d;
    color: white;
    padding: 12px 25px;
    border-radius: 12px;
    text-decoration: none;
    font-weight: bold;
    margin-left: 10px;
    transition: background 0.3s ease;
}

.cancel-btn:hover {
    background: #5a6268;
}

/* ===== General ===== */
.post-item-container {
    max-width: 900px;
    margin: 20px auto;
    padding: 20px;
    background: #f8f9fa;
    border-radius: 12px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
    font-family: 'Poppins', sans-serif;
}

h2 {
    color: #2575fc;
    margin-bottom: 10px;
}

.welcome-note {
    font-size: 1rem;
    margin-bottom: 20px;
    color: #555;
}

/* ===== Form ===== */
.post-item-form label {
    display: block;
    margin-top: 15px;
    font-weight: 600;
    color: #333;
}

.post-item-form input[type="text"],
.post-item-form input[type="file"],
.post-item-form select,
.post-item-form textarea {
    width: 100%;
    padding: 10px;
    margin-top: 5px;
    border-radius: 8px;
    border: 1px solid #ccc;
    font-size: 1rem;
}

.post-item-form textarea {
    resize: vertical;
    min-height: 80px;
}

.btn-submit {
    margin-top: 20px;
    padding: 12px 25px;
    background: #2575fc;
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 1rem;
    cursor: pointer;
    transition: 0.3s;
}

.btn-submit:hover {
    background: #1a5ad6;
}

.note {
    font-size: 0.9rem;
    color: #777;
}

.image-preview {
    display: none;
    max-width: 200px;
    margin-top: 10px;
    border-radius: 8px;
}

/* ===== User Items ===== */
.section-title {
    margin-top: 40px;
    color: #2575fc;
    font-size: 1.5rem;
    border-bottom: 2px solid #2575fc;
    padding-bottom: 5px;
}

.user-items {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 20px;
    margin-top: 20px;
}

.item-card {
    background: #fff;
    padding: 15px;
    border-radius: 12px;
    box-shadow: 0 3px 10px rgba(0,0,0,0.08);
    transition: 0.3s;
}

.item-card:hover {
    box-shadow: 0 6px 18px rgba(0,0,0,0.15);
}

.item-card img {
    max-width: 100%;
    border-radius: 8px;
    margin-bottom: 10px;
}

.item-actions {
    margin-top: 10px;
    display: flex;
    gap: 10px;
}

.edit-btn, .delete-btn {
    text-decoration: none;
    padding: 6px 12px;
    border-radius: 6px;
    font-size: 0.9rem;
    transition: 0.3s;
}

.edit-btn {
    background: #ffc107;
    color: #fff;
}

.edit-btn:hover {
    background: #e0a800;
}

.delete-btn {
    background: #dc3545;
    color: #fff;
}

.delete-btn:hover {
    background: #b02a37;
}

.success-message {
    color: green;
    font-weight: bold;
    margin-bottom: 15px;
}

.no-items {
    color: #555;
}
.post-item-container {
    max-width: 800px;
    margin: 0 auto;
    font-family: Arial, sans-serif;
    padding: 20px;
}

.post-item-form label {
    font-weight: bold;
    margin-top: 10px;
    display: block;
}

.post-item-form input, .post-item-form textarea, .post-item-form select {
    width: 100%;
    padding: 8px;
    margin-top: 5px;
    margin-bottom: 15px;
    border-radius: 6px;
    border: 1px solid #ccc;
}

.image-options button {
    margin-right: 10px;
    padding: 8px 12px;
    border-radius: 5px;
    cursor: pointer;
    background: #2575fc;
    color: #fff;
    border: none;
}

.image-section {
    margin-bottom: 15px;
}

.image-preview {
    display: block;
    margin-top: 10px;
    max-width: 320px;
    border-radius: 6px;
    border: 1px solid #ccc;
}

.btn-submit {
    background: #28a745;
    color: #fff;
    padding: 10px 15px;
    border-radius: 6px;
    border: none;
    cursor: pointer;
}

.item-card {
    border: 1px solid #ccc;
    padding: 15px;
    margin-bottom: 15px;
    border-radius: 6px;
}

.item-card img {
    max-width: 200px;
    border-radius: 4px;
}

.item-actions a {
    margin-right: 10px;
    text-decoration: none;
    color: #fff;
    padding: 5px 10px;
    border-radius: 4px;
}

.edit-btn {
    background: #ffc107;
}

.delete-btn {
    background: #dc3545;
}

.success-message {
    color: green;
    font-weight: bold;
    margin-bottom: 10px;
}

/* View item page */
.view-item {
  display: flex;
  justify-content: center;
  padding: 2rem;
}

.view-card {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
  background: #fff;
  border-radius: 12px;
  padding: 2rem;
  box-shadow: 0 4px 12px rgba(0,0,0,0.1);
  max-width: 800px;
  width: 100%;
}

.view-image img {
  width: 100%;
  border-radius: 12px;
  object-fit: cover;
}

.view-details h2 {
  margin-bottom: 0.5rem;
  font-size: 1.8rem;
  color: #333;
}

.view-details p {
  margin: 0.3rem 0;
  font-size: 1rem;
  color: #555;
}

.contact-box {
  margin-top: 1rem;
  padding: 1rem;
  background: #f9fafb;
  border: 1px solid #ddd;
  border-radius: 10px;
}

.contact-box h3 {
  margin-bottom: 0.5rem;
  color: #444;
}

.back-btn {
    display: inline-block;
    padding: 8px 15px;
    background: #2575fc;
    color: white;
    border-radius: 6px;
    text-decoration: none;
    font-weight: bold;
    transition: background 0.3s ease;
}

.back-btn:hover {
    background: #1a5ed8;
}

.back-container {
    display: flex;
    justify-content: center;
    margin-top: 25px;
}

.back-btn {
    display: inline-block;
    padding: 10px 20px;
    background: #2575fc;
    color: white;
    border-radius: 8px;
    text-decoration: none;
    font-weight: bold;
    font-size: 1rem;
    transition: background 0.3s ease, transform 0.2s ease;
}

.back-btn:hover {
    background: #1a5ed8;
    transform: translateY(-2px);
}

/* Filter Menu */
.filter-menu {
    display: flex;
    justify-content: center;
    gap: 15px;
    margin-bottom: 20px;
}

.filter-btn {
    background: #f4f7fb;
    border: 1px solid #2575fc;
    color: #2575fc;
    padding: 8px 20px;
    border-radius: 25px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
}

.filter-btn:hover {
    background: #2575fc;
    color: #fff;
}

.filter-btn.active {
    background: #2575fc;
    color: #fff;
}

/* Desktop grid vs Mobile dropdown */
.desktop-only { display: flex; flex-wrap: wrap; gap: 10px; }
.mobile-only { display: none; }

/* Dropdown Menu */
.dropdown {
  position: relative;
  display: inline-block;
}

.dropbtn {
  background-color: #2575fc;
  color: white;
  padding: 10px 16px;
  font-size: 16px;
  border: none;
  border-radius: 6px;
  cursor: pointer;
}

.dropdown-content {
  display: none;
  position: absolute;
  background-color: #f9f9f9;
  min-width: 220px;
  box-shadow: 0px 8px 16px rgba(0,0,0,0.2);
  border-radius: 6px;
  z-index: 1;
}

.dropdown-content a,
.dropdown-district {
  color: #333;
  padding: 10px 14px;
  text-decoration: none;
  display: block;
}

.dropdown-content a:hover {
  background-color: #f1f1f1;
}

/* Show menu when hovering/tapping */
.dropdown:hover .dropdown-content {
  display: block;
}

/* Mobile view */
@media (max-width: 768px) {
  .desktop-only { display: none; }
  .mobile-only { display: inline-block; margin: 10px; }
}

/* Style district select */
.district-select {
  width: 100%;
  margin-top: 6px;
  padding: 6px;
  border-radius: 4px;
  border: 1px solid #ccc;
}

.modal {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.6);
  justify-content: center;
  align-items: center;
  z-index: 9999;
}

.modal-content {
  background: #fff;
  border-radius: 14px;
  max-width: 600px;
  width: 90%;
  padding: 20px;
  box-shadow: 0 10px 30px rgba(0,0,0,0.3);
  animation: slideUp 0.3s ease-out;
  position: relative;
}

.close-btn {
  position: absolute;
  top: 12px;
  right: 16px;
  font-size: 24px;
  cursor: pointer;
  color: #888;
  transition: color 0.2s;
}

.close-btn:hover { color: #2575fc; }

@keyframes slideUp {
  from { transform: translateY(50px); opacity: 0; }
  to { transform: translateY(0); opacity: 1; }
}

.view-card img {
  width: 100%;
  border-radius: 8px;
  margin-bottom: 12px;
}

.view-details h2 {
  color: #2575fc;
  margin-bottom: 8px;
}

.search-results {
  list-style: none;
  padding: 0;
  margin: 10px 0;
}
.search-results li {
  padding: 8px 10px;
  border-bottom: 1px solid #eee;
}
.search-results li:hover {
  background: #f4f7fb;
  cursor: pointer;
}
.search-results a {
  text-decoration: none;
  color: #2575fc;
  font-weight: 500;
}
.search-results .tag {
  color: #555;
  font-size: 0.85em;
  font-style: italic;
  margin-left: 5px;
}
.no-results {
  color: #888;
  font-style: italic;
  padding: 10px;
}
/* Image Upload Styles */
.image-upload-container {
    margin-bottom: 20px;
}

.file-input {
    width: 100%;
    padding: 12px;
    margin-bottom: 15px;
    border: 2px dashed #ddd;
    border-radius: 8px;
    background: #f9f9f9;
    cursor: pointer;
    transition: all 0.3s ease;
}

.file-input:hover {
    border-color: #667eea;
    background: #f0f8ff;
}

.file-input:focus {
    outline: none;
    border-color: #667eea;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

.image-preview-container {
    width: 100%;
    height: 250px;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    background: #fafafa;
    margin-bottom: 15px;
}

.image-placeholder {
    text-align: center;
    color: #666;
    padding: 20px;
}

.placeholder-icon {
    font-size: 48px;
    margin-bottom: 10px;
    opacity: 0.5;
}

.placeholder-text {
    font-size: 16px;
    font-weight: 500;
    margin-bottom: 5px;
}

.placeholder-subtext {
    font-size: 12px;
    color: #888;
}

#imagePreview {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
    display: none;
}

.btn-remove-image {
    background: #dc3545;
    color: white;
    border: none;
    padding: 10px 20px;
    border-radius: 6px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 500;
    transition: all 0.3s ease;
    width: 100%;
    margin-bottom: 10px;
}

.btn-remove-image:hover {
    background: #c82333;
}

.file-info {
    color: #666;
    font-size: 13px;
    margin: 5px 0;
    text-align: center;
    line-height: 1.4;
}

/* Error toast animation */
@keyframes slideIn {
    from {
        opacity: 0;
        transform: translateX(100%);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes fadeOut {
    from {
        opacity: 1;
    }
    to {
        opacity: 0;
    }
}

.error-toast {
    animation: slideIn 0.3s ease;
}

.error-toast.fade-out {
    animation: fadeOut 0.3s ease forwards;
}