/* ============================================
   TradoO - Modern Classified Ads Platform
   Fresh Professional Design
   ============================================ */

/* === RESET & BASE === */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  font-size: 16px;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  color: #1f2937;
  background: #f9fafb;
  line-height: 1.6;
  overflow-x: hidden;
}

a {
  text-decoration: none;
  color: inherit;
}

img {
  max-width: 100%;
  height: auto;
}

/* === CONTAINER === */
.container {
  width: 100%;
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 1rem;
}

@media (min-width: 768px) {
  .container {
    padding: 0 2rem;
  }
}

/* === HEADER === */
.site-header {
  background: #ffffff;
  border-bottom: 1px solid #e5e7eb;
  position: sticky;
  top: 0;
  z-index: 1000;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
}

.navbar {
  width: 100%;
}

.navbar-container {
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 1rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 70px;
}

@media (min-width: 768px) {
  .navbar-container {
    padding: 0 2rem;
  }
}

.navbar-brand .logo {
  display: flex;
  align-items: center;
}

.logo-image {
  height: 40px;
  width: auto;
  max-width: 150px;
}

.mobile-menu-toggle {
  display: block;
  background: none;
  border: none;
  cursor: pointer;
  padding: 0.5rem;
}

@media (min-width: 1024px) {
  .mobile-menu-toggle {
    display: none;
  }
}

.hamburger {
  width: 25px;
  height: 2px;
  background: #1f2937;
  position: relative;
  transition: all 0.3s;
}

.hamburger::before,
.hamburger::after {
  content: '';
  position: absolute;
  width: 25px;
  height: 2px;
  background: #1f2937;
  transition: all 0.3s;
}

.hamburger::before {
  top: -8px;
}

.hamburger::after {
  bottom: -8px;
}

.navbar-menu {
  display: none;
}

@media (min-width: 1024px) {
  .navbar-menu {
    display: flex;
    align-items: center;
    gap: 2rem;
    flex: 1;
    margin-left: 3rem;
  }
}

@media (max-width: 1023px) {
  .navbar-menu.active {
    display: flex;
    flex-direction: column;
    position: fixed;
    top: 70px;
    left: 0;
    right: 0;
    background: #ffffff;
    border-bottom: 1px solid #e5e7eb;
    padding: 1rem;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    z-index: 999;
  }
  
  .navbar-start,
  .navbar-end {
    flex-direction: column;
    width: 100%;
    gap: 0.5rem;
  }
  
  .nav-link,
  .btn {
    width: 100%;
    text-align: center;
  }
}

.navbar-start,
.navbar-end {
  display: flex;
  align-items: center;
  gap: 1.5rem;
}

.nav-link {
  color: #4b5563;
  text-decoration: none;
  font-weight: 500;
  font-size: 0.95rem;
  padding: 0.5rem 1rem;
  border-radius: 0.5rem;
  transition: all 0.2s;
  position: relative;
}

.nav-link:hover {
  color: #ef4444;
  background: #fef2f2;
}

.badge {
  position: absolute;
  top: 0;
  right: 0;
  background: #ef4444;
  color: white;
  font-size: 0.7rem;
  padding: 0.15rem 0.4rem;
  border-radius: 10px;
  font-weight: 600;
}

/* === BUTTONS === */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.75rem 1.5rem;
  font-size: 1rem;
  font-weight: 600;
  border-radius: 0.5rem;
  border: none;
  cursor: pointer;
  transition: all 0.2s;
  text-decoration: none;
  white-space: nowrap;
}

.btn-primary {
  background: #ef4444;
  color: #ffffff;
}

.btn-primary:hover {
  background: #dc2626;
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(239, 68, 68, 0.3);
}

.btn-secondary {
  background: #3b82f6;
  color: #ffffff;
}

.btn-secondary:hover {
  background: #2563eb;
}

.btn-outline {
  background: transparent;
  color: #ef4444;
  border: 2px solid #ef4444;
}

.btn-outline:hover {
  background: #ef4444;
  color: #ffffff;
}

.btn-lg {
  padding: 1rem 2rem;
  font-size: 1.125rem;
}

/* === DROPDOWN === */
.dropdown {
  position: relative;
}

.dropdown-toggle {
  background: none;
  border: none;
  color: #4b5563;
  font-weight: 500;
  font-size: 0.95rem;
  padding: 0.5rem 1rem;
  border-radius: 0.5rem;
  cursor: pointer;
  transition: all 0.2s;
}

.dropdown-toggle:hover {
  background: #f3f4f6;
}

.dropdown-menu {
  display: none;
  position: absolute;
  top: 100%;
  right: 0;
  background: white;
  border: 1px solid #e5e7eb;
  border-radius: 0.5rem;
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.1);
  min-width: 200px;
  margin-top: 0.5rem;
  z-index: 1000;
}

.dropdown-menu.active {
  display: block;
}

.dropdown-item {
  display: block;
  padding: 0.75rem 1rem;
  color: #4b5563;
  transition: all 0.2s;
  border: none;
  background: none;
  width: 100%;
  text-align: left;
  cursor: pointer;
}

.dropdown-item:hover {
  background: #f3f4f6;
  color: #ef4444;
}

.dropdown-divider {
  border: none;
  border-top: 1px solid #e5e7eb;
  margin: 0.5rem 0;
}

/* === HOME PAGE === */
.home-page {
  background: #f9fafb;
}

/* === SEARCH SECTION === */
.search-section {
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  padding: 4rem 0;
  position: relative;
  overflow: hidden;
}

.search-container {
  max-width: 900px;
  margin: 0 auto;
  padding: 0 1rem;
  position: relative;
  z-index: 1;
  text-align: center;
}

.search-container h1 {
  font-size: 2.5rem;
  font-weight: 700;
  color: #ffffff;
  margin-bottom: 1rem;
  text-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

@media (min-width: 768px) {
  .search-container h1 {
    font-size: 3.5rem;
  }
}

.subtitle {
  font-size: 1.125rem;
  color: rgba(255, 255, 255, 0.95);
  margin-bottom: 2rem;
}

.search-form {
  background: #ffffff;
  border-radius: 1rem;
  padding: 1.5rem;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.2);
}

.search-input-group {
  display: flex;
  gap: 0.75rem;
  margin-bottom: 1rem;
}

@media (max-width: 767px) {
  .search-input-group {
    flex-direction: column;
  }
}

.search-input {
  flex: 1;
  padding: 1rem 1.25rem;
  border: 2px solid #e5e7eb;
  border-radius: 0.5rem;
  font-size: 1rem;
  transition: all 0.2s;
}

.search-input:focus {
  outline: none;
  border-color: #3b82f6;
  box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

.search-btn {
  padding: 1rem 2rem;
  white-space: nowrap;
}

.search-filters {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.75rem;
}

@media (max-width: 767px) {
  .search-filters {
    grid-template-columns: 1fr;
  }
}

.filter-select {
  padding: 0.875rem 1rem;
  border: 2px solid #e5e7eb;
  border-radius: 0.5rem;
  font-size: 0.95rem;
  background: #ffffff;
  cursor: pointer;
  transition: all 0.2s;
}

.filter-select:focus {
  outline: none;
  border-color: #3b82f6;
  box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

/* === LOCATIONS SECTION === */
.locations-section {
  padding: 3rem 0;
  background: #ffffff;
}

.section-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 2rem;
}

.section-header h2 {
  font-size: 1.875rem;
  font-weight: 700;
  color: #1f2937;
}

.view-all-link {
  color: #3b82f6;
  text-decoration: none;
  font-weight: 600;
  font-size: 1rem;
  transition: color 0.2s;
}

.view-all-link:hover {
  color: #2563eb;
}

.locations-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1rem;
}

@media (min-width: 640px) {
  .locations-grid {
    grid-template-columns: repeat(4, 1fr);
  }
}

@media (min-width: 1024px) {
  .locations-grid {
    grid-template-columns: repeat(4, 1fr);
    gap: 1.5rem;
  }
}

.location-card {
  background: #ffffff;
  border: 2px solid #e5e7eb;
  border-radius: 1rem;
  padding: 1.5rem;
  text-align: center;
  transition: all 0.3s;
  cursor: pointer;
}

.location-card:hover {
  border-color: #3b82f6;
  transform: translateY(-4px);
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.1);
}

.location-link {
  display: block;
  color: inherit;
}

.location-icon {
  margin-bottom: 0.75rem;
}

.emoji-icon {
  font-size: 2.5rem;
  display: inline-block;
}

.location-name {
  font-size: 1.125rem;
  font-weight: 600;
  color: #1f2937;
  margin-bottom: 0.25rem;
}

.location-count {
  font-size: 0.875rem;
  color: #6b7280;
}

/* === FEATURED & ADS SECTIONS === */
.featured-section,
.ads-section {
  padding: 3rem 0;
}

.featured-section {
  background: #f9fafb;
}

.ads-section {
  background: #ffffff;
}

.ads-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.5rem;
}

@media (min-width: 640px) {
  .ads-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (min-width: 1024px) {
  .ads-grid {
    grid-template-columns: repeat(4, 1fr);
  }
}

.featured-grid {
  margin-bottom: 2rem;
}

/* === AD CARD === */
.ad-card {
  background: #ffffff;
  border-radius: 1rem;
  overflow: hidden;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
  transition: all 0.3s;
  display: block;
  color: inherit;
}

.ad-card:hover {
  transform: translateY(-8px);
  box-shadow: 0 12px 24px rgba(0, 0, 0, 0.15);
}

.ad-image-container {
  position: relative;
  width: 100%;
  height: 200px;
  background: #f3f4f6;
  overflow: hidden;
}

.ad-image {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.ad-badge {
  position: absolute;
  top: 0.75rem;
  right: 0.75rem;
  background: #ef4444;
  color: white;
  padding: 0.25rem 0.75rem;
  border-radius: 0.25rem;
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
}

.ad-content {
  padding: 1rem;
}

.ad-title {
  font-size: 1.125rem;
  font-weight: 600;
  color: #1f2937;
  margin-bottom: 0.5rem;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  line-height: 1.4;
}

.ad-price {
  font-size: 1.5rem;
  font-weight: 700;
  color: #ef4444;
  margin-bottom: 0.5rem;
}

.ad-meta {
  display: flex;
  align-items: center;
  gap: 1rem;
  font-size: 0.875rem;
  color: #6b7280;
  flex-wrap: wrap;
}

.ad-meta-item {
  display: flex;
  align-items: center;
  gap: 0.25rem;
}

/* === EMPTY STATE === */
.empty-state {
  text-align: center;
  padding: 4rem 2rem;
}

.empty-state p {
  font-size: 1.125rem;
  color: #6b7280;
  margin-bottom: 1.5rem;
}

/* === PAGINATION === */
.pagination {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 0.5rem;
  margin-top: 3rem;
  flex-wrap: wrap;
}

.pagination a,
.pagination span {
  padding: 0.5rem 0.75rem;
  border: 1px solid #e5e7eb;
  border-radius: 0.375rem;
  color: #4b5563;
  text-decoration: none;
  transition: all 0.2s;
}

.pagination a:hover {
  background: #f3f4f6;
  border-color: #3b82f6;
  color: #3b82f6;
}

.pagination .current {
  background: #3b82f6;
  color: white;
  border-color: #3b82f6;
}

.pagination .disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

/* === FOOTER === */
.site-footer {
  background: #1f2937;
  color: #d1d5db;
  padding: 3rem 0 1.5rem;
  margin-top: 3rem;
}

.footer-container {
  display: grid;
  grid-template-columns: 1fr;
  gap: 2rem;
  margin-bottom: 2rem;
}

@media (min-width: 640px) {
  .footer-container {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (min-width: 1024px) {
  .footer-container {
    grid-template-columns: repeat(5, 1fr);
  }
}

.footer-section h3 {
  color: #ffffff;
  font-size: 1.125rem;
  font-weight: 600;
  margin-bottom: 1rem;
}

.footer-section p {
  font-size: 0.95rem;
  line-height: 1.6;
}

.footer-links {
  list-style: none;
}

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

.footer-links a {
  color: #9ca3af;
  text-decoration: none;
  font-size: 0.95rem;
  transition: color 0.2s;
}

.footer-links a:hover {
  color: #3b82f6;
}

.social-links {
  display: flex;
  gap: 0.75rem;
}

.social-links a {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  background: #374151;
  color: #ffffff;
  border-radius: 0.5rem;
  text-decoration: none;
  transition: all 0.2s;
  font-size: 0.875rem;
  font-weight: 600;
}

.social-links a:hover {
  background: #3b82f6;
  transform: translateY(-2px);
}

.app-download-links {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  margin-top: 1rem;
}

.app-badge {
  display: inline-flex;
  flex-direction: column;
  justify-content: center;
  align-items: flex-start;
  padding: 0.5rem 1rem;
  background: #000000;
  color: #ffffff;
  text-decoration: none;
  border-radius: 0.5rem;
  transition: opacity 0.2s;
  width: 140px;
  height: 45px;
}

.app-badge:hover {
  opacity: 0.85;
}

.badge-text-small {
  font-size: 10px;
  line-height: 1;
  margin-bottom: 2px;
}

.badge-text-large {
  font-size: 16px;
  font-weight: 600;
  line-height: 1;
}

.footer-bottom {
  border-top: 1px solid #374151;
  padding-top: 1.5rem;
  text-align: center;
}

.footer-bottom p {
  color: #9ca3af;
  font-size: 0.875rem;
}

/* === FLASH MESSAGES === */
.flash {
  padding: 1rem;
  border-radius: 0.5rem;
  margin-bottom: 1.5rem;
}

.flash.notice {
  background: #dbeafe;
  color: #1e40af;
  border: 1px solid #93c5fd;
}

.flash.alert {
  background: #fee2e2;
  color: #991b1b;
  border: 1px solid #fca5a5;
}

.flash.success {
  background: #d1fae5;
  color: #065f46;
  border: 1px solid #6ee7b7;
}

/* === LANGUAGE SWITCHER === */
.language-switcher {
  position: relative;
}

.language-link {
  color: #4b5563;
  text-decoration: none;
  font-weight: 500;
  font-size: 0.95rem;
  padding: 0.5rem 1rem;
  border-radius: 0.5rem;
  transition: all 0.2s;
  display: inline-block;
}

.language-link:hover {
  color: #ef4444;
  background: #fef2f2;
}

.language-switcher select {
  padding: 0.5rem 2rem 0.5rem 0.75rem;
  border: 1px solid #e5e7eb;
  border-radius: 0.375rem;
  background: white;
  cursor: pointer;
  font-size: 0.875rem;
}

/* === UTILITY CLASSES === */
.hidden {
  display: none !important;
}

.text-center {
  text-align: center;
}

.mt-4 { margin-top: 1rem; }
.mb-4 { margin-bottom: 1rem; }
.mt-8 { margin-top: 2rem; }
.mb-8 { margin-bottom: 2rem; }

/* === MAIN CONTENT === */
main {
  min-height: calc(100vh - 70px - 300px);
}

/* === BROWSE PAGES === */
.browse-page {
  background: #f9fafb;
}

.page-header-section {
  background: #ffffff;
  padding: 2rem 0;
  border-bottom: 1px solid #e5e7eb;
}

.breadcrumb {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.875rem;
  color: #6b7280;
  margin-bottom: 1rem;
}

.breadcrumb a {
  color: #3b82f6;
  text-decoration: none;
  transition: color 0.2s;
}

.breadcrumb a:hover {
  color: #2563eb;
}

.breadcrumb .separator {
  color: #9ca3af;
}

.page-title {
  font-size: 2rem;
  font-weight: 700;
  color: #1f2937;
  margin-bottom: 0.5rem;
}

@media (min-width: 768px) {
  .page-title {
    font-size: 2.5rem;
  }
}

.page-subtitle {
  font-size: 1.125rem;
  color: #6b7280;
}

.browse-categories-section {
  padding: 3rem 0;
  background: #ffffff;
}

.browse-categories-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1rem;
}

@media (min-width: 640px) {
  .browse-categories-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

@media (min-width: 1024px) {
  .browse-categories-grid {
    grid-template-columns: repeat(4, 1fr);
    gap: 1.5rem;
  }
}

.browse-category-card {
  background: #ffffff;
  border: 2px solid #e5e7eb;
  border-radius: 1rem;
  transition: all 0.3s;
  overflow: hidden;
}

.browse-category-card:hover {
  border-color: #3b82f6;
  transform: translateY(-4px);
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.1);
}

.browse-category-link {
  display: block;
  padding: 2rem 1.5rem;
  text-align: center;
  color: inherit;
  text-decoration: none;
}

.browse-category-icon {
  width: 48px;
  height: 48px;
  margin: 0 auto 1rem;
  color: #3b82f6;
}

.browse-category-icon svg {
  width: 100%;
  height: 100%;
}

.browse-category-name {
  font-size: 1.125rem;
  font-weight: 600;
  color: #1f2937;
  margin-bottom: 0.5rem;
}

.browse-category-count {
  font-size: 0.875rem;
  color: #6b7280;
}

.browse-ads-section {
  padding: 3rem 0;
  background: #f9fafb;
}

/* === RESPONSIVE === */
@media (max-width: 767px) {
  .hidden-mobile {
    display: none !important;
  }
}

@media (min-width: 768px) {
  .hidden-desktop {
    display: none !important;
  }
}

/* === CONTACT BUTTONS === */
.contact-buttons-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.75rem;
  margin-bottom: 1rem;
}

@media (min-width: 768px) {
  .contact-buttons-grid {
    grid-template-columns: 1fr 1fr 1fr;
  }
}

.contact-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.875rem 1rem;
  border-radius: 0.5rem;
  font-weight: 600;
  font-size: 0.95rem;
  text-decoration: none;
  transition: all 0.2s;
  border: 2px solid;
}

.contact-btn svg {
  width: 20px;
  height: 20px;
}

.phone-btn {
  background: #3b82f6;
  color: #ffffff;
  border-color: #3b82f6;
}

.phone-btn:hover {
  background: #2563eb;
  border-color: #2563eb;
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(59, 130, 246, 0.3);
}

.whatsapp-btn {
  background: #25d366;
  color: #ffffff;
  border-color: #25d366;
}

.whatsapp-btn:hover {
  background: #20ba5a;
  border-color: #20ba5a;
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(37, 211, 102, 0.3);
}

.chat-btn {
  background: #ef4444;
  color: #ffffff;
  border-color: #ef4444;
}

.chat-btn:hover {
  background: #dc2626;
  border-color: #dc2626;
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(239, 68, 68, 0.3);
}

@media (max-width: 767px) {
  .contact-buttons-grid {
    grid-template-columns: 1fr;
  }
  
  .btn-text {
    display: inline;
  }
}
