/* 
TulumList - Modern Classifieds Website
Main Stylesheet
*/

/* Base Styles */
:root {
  --primary: #00a0b0;
  --primary-dark: #008a98;
  --primary-light: #e6f7f9;
  --secondary: #f37735;
  --success: #7bc043;
  --success-light: #edf7e7;
  --info: #4596c4;
  --info-light: #e6f3fa;
  --warning: #ffc425;
  --danger: #d11141;
  --dark: #1d2b36;
  --light: #f8f9fa;
  --gray: #6c757d;
  --gray-light: #e9ecef;
  --gray-dark: #343a40;
  --body-bg: #ffffff;
  --body-color: #212529;
  --sidebar-background: #ffffff;
  --sidebar-foreground: #1d2b36;
  --sidebar-border: #e9ecef;
  --sidebar-accent: #e6f7f9;
  --sidebar-accent-foreground: #00a0b0;
}

body {
  font-family: "Poppins", sans-serif;
  color: var(--body-color);
  background-color: var(--body-bg);
  overflow-x: hidden;
}

a {
  text-decoration: none;
  color: var(--primary);
  transition: all 0.3s ease;
}

a:hover {
  color: var(--primary-dark);
}

/* Utility Classes */
.bg-primary-light {
  background-color: var(--primary-light);
}

.bg-success-light {
  background-color: var(--success-light);
}

.bg-info-light {
  background-color: var(--info-light);
}

.text-primary {
  color: var(--primary) !important;
}

.text-success {
  color: var(--success) !important;
}

.text-info {
  color: var(--info) !important;
}

/* Header & Navigation */
.navbar {
  padding: 0.75rem 0;
}

.navbar-brand {
  display: flex;
  align-items: center;
  font-weight: 700;
}

.nav-link {
  font-weight: 500;
  padding: 0.5rem 1rem !important;
  color: var(--dark);
}

.nav-link:hover,
.nav-link.active {
  color: var(--primary);
}

.dropdown-menu {
  border: none;
  box-shadow: 0 0.5rem 1rem rgba(0, 0, 0, 0.15);
  border-radius: 0.5rem;
}

.dropdown-item {
  padding: 0.5rem 1.5rem;
}

.dropdown-item:hover,
.dropdown-item:focus,
.dropdown-item.active {
  background-color: var(--primary-light);
  color: var(--primary);
}

/* Hero Section */
.hero-section {
  background-color: var(--light);
  padding: 3rem 0;
}

.search-box {
  border-radius: 1rem;
}

/* Category Cards */
.category-card {
  transition: all 0.3s ease;
}

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

.category-icon {
  font-size: 2rem;
  height: 60px;
  width: 60px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto;
  border-radius: 50%;
  background-color: var(--primary-light);
  color: var(--primary);
}

/* Listing Cards */
.listing-card {
  transition: all 0.3s ease;
  border-radius: 0.75rem;
  overflow: hidden;
}

.listing-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 0.5rem 1.5rem rgba(0, 0, 0, 0.1) !important;
}

.listing-img-wrapper {
  position: relative;
  height: 180px;
  overflow: hidden;
}

.listing-img-wrapper img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.3s ease;
}

.listing-card:hover .listing-img-wrapper img {
  transform: scale(1.05);
}

.btn-favorite {
  top: 10px;
  right: 10px;
  background-color: rgba(255, 255, 255, 0.9);
  border: none;
  border-radius: 50%;
  width: 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--gray);
  transition: all 0.3s ease;
  z-index: 1;
}

.btn-favorite:hover,
.btn-favorite.active {
  background-color: var(--danger);
  color: white;
}

.listing-price {
  color: var(--primary);
}

.listing-features {
  display: flex;
  flex-wrap: wrap;
}

/* How It Works */
.icon-circle {
  width: 80px;
  height: 80px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto;
  font-size: 2rem;
}

/* Footer */
.footer-links li {
  margin-bottom: 0.5rem;
}

.footer-links a {
  color: rgba(255, 255, 255, 0.7);
  transition: all 0.3s ease;
}

.footer-links a:hover {
  color: white;
  padding-left: 5px;
}

.social-links a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background-color: rgba(255, 255, 255, 0.1);
  transition: all 0.3s ease;
}

.social-links a:hover {
  background-color: var(--primary);
  color: white;
}

/* Back to Top Button */
.back-to-top {
  position: fixed;
  bottom: 20px;
  right: 20px;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  visibility: hidden;
  transition: all 0.3s ease;
  z-index: 1000;
}

.back-to-top.show {
  opacity: 1;
  visibility: visible;
}

/* Responsive Adjustments */
@media (max-width: 991.98px) {
  .navbar-collapse {
    background-color: white;
    padding: 1rem;
    border-radius: 0.5rem;
    box-shadow: 0 0.5rem 1rem rgba(0, 0, 0, 0.15);
    margin-top: 1rem;
  }
}

@media (max-width: 767.98px) {
  .hero-section {
    text-align: center;
  }

  .listing-img-wrapper {
    height: 200px;
  }
}

/* Nav Pills for Tabs */
.nav-pills .nav-link {
  border-radius: 50rem;
  padding: 0.5rem 1.5rem;
  margin: 0 0.25rem;
  color: var(--dark);
}

.nav-pills .nav-link.active {
  background-color: var(--primary);
  color: white;
}

/* Form Controls */
.form-control,
.form-select {
  padding: 0.75rem 1rem;
  border-color: var(--gray-light);
}

.form-control:focus,
.form-select:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 0.25rem rgba(0, 160, 176, 0.25);
}

.form-floating > .form-control,
.form-floating > .form-select {
  height: calc(3.5rem + 2px);
}

.form-floating > label {
  padding: 1rem;
}

/* Buttons */
.btn {
  padding: 0.5rem 1.5rem;
  border-radius: 0.5rem;
  font-weight: 500;
}

.btn-primary {
  background-color: var(--primary);
  border-color: var(--primary);
}

.btn-primary:hover,
.btn-primary:focus {
  background-color: var(--primary-dark);
  border-color: var(--primary-dark);
}

.btn-outline-primary {
  color: var(--primary);
  border-color: var(--primary);
}

.btn-outline-primary:hover,
.btn-outline-primary:focus {
  background-color: var(--primary);
  border-color: var(--primary);
}

/* Dashboard Specific Styles */
.listing-table img {
  width: 60px;
  height: 60px;
  object-fit: cover;
  border-radius: 6px;
}

.listing-table .dropdown-toggle::after {
  display: none;
}

.listing-table .dropdown-menu {
  min-width: 10rem;
}

.listing-status {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  display: inline-block;
  margin-right: 5px;
}

.status-active {
  background-color: var(--success);
}

.status-pending {
  background-color: var(--warning);
}

.status-expired {
  background-color: var(--danger);
}

.status-draft {
  background-color: var(--gray);
}

/* Separator */
.separator {
  display: flex;
  align-items: center;
  text-align: center;
}

.separator::before,
.separator::after {
  content: "";
  flex: 1;
  border-bottom: 1px solid var(--gray-light);
}

.separator::before {
  margin-right: 0.5em;
}

.separator::after {
  margin-left: 0.5em;
}
