/* OLX.ro Style - GastroHub Platform */
:root {
  --primary: #2563eb;
  --primary-dark: #1e40af;
  --secondary: #333333;
  --accent: #2563eb;
  --success: #10b981;
  --danger: #ef4444;
  
  --bg-main: #f5f5f5;
  --bg-white: #ffffff;
  --border: #e0e0e0;
  --border-light: #f0f0f0;
  
  --text-primary: #333333;
  --text-secondary: #666666;
  --text-light: #999999;
  
  --shadow-sm: 0 1px 3px rgba(0,0,0,0.1);
  --shadow-md: 0 4px 6px rgba(0,0,0,0.1);
  --shadow-lg: 0 10px 25px rgba(0,0,0,0.15);
  
  --radius: 4px;
  --radius-lg: 8px;
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
  color: var(--text-primary);
  background: var(--bg-main);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

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

.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 15px;
}

.container-wide {
  max-width: 1400px;
  margin: 0 auto;
  padding: 0 15px;
}

/* Header */
.header {
  background: var(--bg-white);
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 0;
  z-index: 1000;
  box-shadow: var(--shadow-sm);
}

.header-top {
  background: var(--bg-white);
  padding: 12px 0;
  border-bottom: 1px solid var(--border-light);
}

.header-top-content {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 20px;
}

.header-logo {
  font-size: 28px;
  font-weight: 700;
  color: var(--primary);
  display: flex;
  align-items: center;
  gap: 8px;
}

.header-actions {
  display: flex;
  gap: 15px;
  align-items: center;
}

.header-search {
  display: flex;
  gap: 0;
  flex: 1;
  max-width: 600px;
}

.header-search input {
  flex: 1;
  padding: 12px 20px;
  border: 2px solid var(--border);
  border-right: none;
  border-radius: var(--radius) 0 0 var(--radius);
  font-size: 15px;
  outline: none;
  transition: all 0.3s ease;
}

.header-search input:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
  transform: scale(1.02);
}

.header-search button {
  padding: 12px 30px;
  background: var(--primary);
  color: white;
  border: none;
  border-radius: 0 var(--radius) var(--radius) 0;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
  position: relative;
  overflow: hidden;
}

.header-search button::before {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  width: 0;
  height: 0;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.3);
  transform: translate(-50%, -50%);
  transition: width 0.6s, height 0.6s;
}

.header-search button:hover::before {
  width: 300px;
  height: 300px;
}

.header-search button:hover {
  background: var(--primary-dark);
  transform: scale(1.05);
}

.header-search button:active {
  transform: scale(0.98);
}

.header-search button i {
  transition: transform 0.3s ease;
}

.header-search button:hover i {
  transform: scale(1.2);
}

/* Navigation */
.nav {
  background: var(--bg-white);
  border-bottom: 1px solid var(--border);
  padding: 0;
}

.nav-menu {
  display: flex;
  list-style: none;
  gap: 0;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}

.nav-menu::-webkit-scrollbar {
  display: none;
}

.nav-item {
  white-space: nowrap;
}

.nav-link {
  display: block;
  padding: 15px 20px;
  color: var(--text-primary);
  font-weight: 500;
  transition: all 0.3s ease;
  border-bottom: 3px solid transparent;
  position: relative;
}

.nav-link::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 50%;
  width: 0;
  height: 3px;
  background: var(--primary);
  transition: all 0.3s ease;
  transform: translateX(-50%);
}

.nav-link:hover::after,
.nav-link.active::after {
  width: 80%;
}

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

.nav-link i {
  transition: transform 0.3s ease;
}

.nav-link:hover i {
  transform: scale(1.2);
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 20px;
  border: none;
  border-radius: var(--radius);
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
  text-decoration: none;
  font-size: 14px;
  position: relative;
  overflow: hidden;
}

.btn::before {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  width: 0;
  height: 0;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.2);
  transform: translate(-50%, -50%);
  transition: width 0.6s, height 0.6s;
}

.btn:hover::before {
  width: 300px;
  height: 300px;
}

.btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.btn:active {
  transform: translateY(0);
}

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

.btn-primary:hover {
  background: var(--primary-dark);
}

.btn-secondary {
  background: var(--bg-white);
  color: var(--text-primary);
  border: 1px solid var(--border);
}

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

.btn-success {
  background: var(--success);
  color: white;
}

.btn-icon {
  padding: 8px;
  width: 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* Categories Grid */
.categories-section {
  background: var(--bg-white);
  padding: 30px 0;
  margin-bottom: 20px;
}

.categories-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
  gap: 15px;
}

.category-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 20px 10px;
  border: 1px solid var(--border-light);
  border-radius: var(--radius);
  transition: all 0.3s ease;
  text-align: center;
  background: var(--bg-white);
  position: relative;
  overflow: hidden;
}

.category-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(37, 99, 235, 0.1), transparent);
  transition: left 0.5s;
}

.category-card:hover::before {
  left: 100%;
}

.category-card:hover {
  border-color: var(--primary);
  box-shadow: var(--shadow-md);
  transform: translateY(-5px) scale(1.02);
}

.category-icon {
  transition: all 0.3s ease;
}

.category-card:hover .category-icon {
  transform: scale(1.2) rotate(5deg);
  color: var(--primary);
}

.category-icon {
  font-size: 32px;
  color: var(--primary);
  margin-bottom: 10px;
}

.category-name {
  font-size: 13px;
  font-weight: 500;
  color: var(--text-primary);
  margin-bottom: 5px;
}

.category-count {
  font-size: 11px;
  color: var(--text-light);
}

/* Listings Grid */
.listings-section {
  padding: 20px 0;
}

.listings-header-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 20px;
  padding: 15px;
  background: var(--bg-white);
  border-radius: var(--radius);
}

.listings-count {
  font-size: 14px;
  color: var(--text-secondary);
}

.listings-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 15px;
}

.listing-card {
  background: var(--bg-white);
  border: 1px solid var(--border-light);
  border-radius: var(--radius);
  overflow: hidden;
  transition: all 0.3s ease;
  display: block;
  position: relative;
}

.listing-card::after {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(135deg, rgba(37, 99, 235, 0.05) 0%, transparent 100%);
  opacity: 0;
  transition: opacity 0.3s ease;
  pointer-events: none;
}

.listing-card:hover::after {
  opacity: 1;
}

.listing-card:hover {
  box-shadow: var(--shadow-lg);
  transform: translateY(-5px) scale(1.02);
  border-color: var(--primary);
}

.listing-image {
  transition: transform 0.5s ease;
}

.listing-card:hover .listing-image {
  transform: scale(1.1);
}

.listing-title {
  transition: color 0.3s ease;
}

.listing-card:hover .listing-title {
  color: var(--primary);
}

.listing-image-wrapper {
  position: relative;
  width: 100%;
  padding-top: 75%;
  background: var(--bg-main);
  overflow: hidden;
}

.listing-image {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.listing-badge {
  position: absolute;
  top: 8px;
  left: 8px;
  background: rgba(0,0,0,0.7);
  color: white;
  padding: 4px 8px;
  border-radius: var(--radius);
  font-size: 11px;
  font-weight: 600;
}

.listing-type-badge {
  position: absolute;
  top: 8px;
  right: 8px;
  padding: 4px 8px;
  border-radius: var(--radius);
  font-size: 10px;
  font-weight: 600;
  color: white;
}

.listing-content {
  padding: 12px;
}

.listing-title {
  font-size: 14px;
  font-weight: 500;
  color: var(--text-primary);
  margin-bottom: 8px;
  line-height: 1.4;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.listing-price {
  font-size: 18px;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 8px;
}

.listing-meta {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 12px;
  color: var(--text-light);
}

.listing-location {
  display: flex;
  align-items: center;
  gap: 4px;
}

.listing-date {
  font-size: 11px;
}

/* Filters */
.filters-bar {
  background: var(--bg-white);
  padding: 20px;
  border-radius: var(--radius);
  margin-bottom: 20px;
  display: flex;
  gap: 15px;
  flex-wrap: wrap;
  align-items: flex-end;
}

.filter-group {
  display: flex;
  flex-direction: column;
  gap: 5px;
  flex: 1;
  min-width: 150px;
}

.filter-group label {
  font-size: 12px;
  font-weight: 600;
  color: var(--text-secondary);
  text-transform: uppercase;
}

.filter-control {
  padding: 10px 12px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  font-size: 14px;
  outline: none;
  transition: border-color 0.2s;
}

.filter-control:focus {
  border-color: var(--primary);
}

/* Pagination */
.pagination {
  display: flex;
  justify-content: center;
  gap: 5px;
  margin-top: 30px;
  padding: 20px 0;
}

.page-item {
  padding: 8px 12px;
  border: 1px solid var(--border);
  background: var(--bg-white);
  color: var(--text-primary);
  border-radius: var(--radius);
  transition: all 0.3s ease;
  text-decoration: none;
  position: relative;
  overflow: hidden;
}

.page-item::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: var(--primary);
  transition: left 0.3s ease;
  z-index: -1;
}

.page-item:hover::before {
  left: 0;
}

.page-item:hover {
  border-color: var(--primary);
  color: white;
  transform: translateY(-2px);
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

.page-item.active {
  background: var(--primary);
  color: white;
  border-color: var(--primary);
}

.page-item.disabled {
  opacity: 0.5;
  pointer-events: none;
}

/* Footer */
.footer {
  background: var(--bg-white);
  border-top: 1px solid var(--border);
  padding: 40px 0 20px;
  margin-top: 50px;
}

.footer-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 30px;
  margin-bottom: 30px;
}

.footer-section h4 {
  font-size: 14px;
  font-weight: 600;
  margin-bottom: 15px;
  color: var(--text-primary);
}

.footer-section ul {
  list-style: none;
}

.footer-section li {
  margin-bottom: 8px;
}

.footer-section a {
  color: var(--text-secondary);
  font-size: 13px;
  transition: all 0.3s ease;
  display: inline-block;
}

.footer-section a:hover {
  color: var(--primary);
  transform: translateX(5px);
}

.footer-section a i {
  transition: transform 0.3s ease;
}

.footer-section a:hover i {
  transform: scale(1.2);
}

.footer-bottom {
  text-align: center;
  padding-top: 20px;
  border-top: 1px solid var(--border-light);
  color: var(--text-light);
  font-size: 12px;
}

/* Responsive */
@media (max-width: 768px) {
  .header-top-content {
    flex-direction: column;
    gap: 15px;
  }

  .header-search {
    max-width: 100%;
    width: 100%;
  }

  .header-logo {
    width: 100%;
    text-align: center;
  }

  .header-actions {
    width: 100%;
  }

  .header-actions .btn {
    width: 100%;
    justify-content: center;
  }
  
  .listings-grid {
    grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
    gap: 10px;
  }
  
  .categories-grid {
    grid-template-columns: repeat(auto-fill, minmax(100px, 1fr));
    gap: 10px;
  }
  
  .filters-bar {
    flex-direction: column;
  }
  
  .filter-group {
    width: 100%;
  }

  /* Hero responsive */
  section[style*="grid-template-columns: 1fr 1fr"] {
    grid-template-columns: 1fr !important;
    gap: 30px !important;
  }

  section[style*="grid-template-columns: 1fr 1fr"] > div:first-child {
    text-align: center !important;
  }

  section[style*="grid-template-columns: 1fr 1fr"] h1 {
    font-size: 32px !important;
  }

  section[style*="grid-template-columns: 1fr 1fr"] h2 {
    font-size: 24px !important;
  }

  section[style*="grid-template-columns: 1fr 1fr"] p {
    font-size: 16px !important;
  }

  section[style*="grid-template-columns: 1fr 1fr"] > div:last-child {
    order: -1;
  }

  /* Newsletter form responsive */
  form[style*="display: flex"] {
    flex-direction: column !important;
  }

  form[style*="display: flex"] button {
    width: 100%;
  }
}
