/* ==========================================
   GigDir - Global Freelance Platform Directory
   Modern, Clean, SEO-Friendly Stylesheet
   ========================================== */

/* CSS Custom Properties */
:root {
  --primary: #1e3a5f;
  --primary-light: #2d5a8e;
  --primary-dark: #0f1f33;
  --accent: #00b4d8;
  --accent-light: #48cae4;
  --accent-dark: #0096c7;
  --success: #06d6a0;
  --warning: #ffd166;
  --danger: #ef476f;
  --gray-50: #f8fafc;
  --gray-100: #f1f5f9;
  --gray-200: #e2e8f0;
  --gray-300: #cbd5e1;
  --gray-400: #94a3b8;
  --gray-500: #64748b;
  --gray-600: #475569;
  --gray-700: #334155;
  --gray-800: #1e293b;
  --gray-900: #0f172a;
  --white: #ffffff;
  --font-sans: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  --font-mono: 'JetBrains Mono', 'Fira Code', monospace;
  --shadow-sm: 0 1px 2px rgba(0,0,0,0.05);
  --shadow: 0 1px 3px rgba(0,0,0,0.1), 0 1px 2px rgba(0,0,0,0.06);
  --shadow-md: 0 4px 6px rgba(0,0,0,0.07), 0 2px 4px rgba(0,0,0,0.06);
  --shadow-lg: 0 10px 15px rgba(0,0,0,0.1), 0 4px 6px rgba(0,0,0,0.05);
  --shadow-xl: 0 20px 25px rgba(0,0,0,0.1), 0 10px 10px rgba(0,0,0,0.04);
  --radius-sm: 6px;
  --radius: 10px;
  --radius-lg: 16px;
  --radius-xl: 24px;
  --transition: 0.2s ease;
}

/* Reset & Base */
*, *::before, *::after {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  font-size: 16px;
}

body {
  font-family: var(--font-sans);
  color: var(--gray-800);
  background: var(--gray-50);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

a {
  color: var(--accent-dark);
  text-decoration: none;
  transition: color var(--transition);
}

a:hover {
  color: var(--accent);
}

img {
  max-width: 100%;
  height: auto;
}

/* Typography */
h1, h2, h3, h4, h5, h6 {
  font-weight: 700;
  line-height: 1.3;
  color: var(--gray-900);
}

h1 { font-size: 2.5rem; }
h2 { font-size: 2rem; }
h3 { font-size: 1.5rem; }
h4 { font-size: 1.25rem; }

/* Container */
.container {
  width: 100%;
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 24px;
}

/* ==========================================
   HEADER & NAVIGATION
   ========================================== */
.header {
  background: var(--white);
  border-bottom: 1px solid var(--gray-200);
  position: sticky;
  top: 0;
  z-index: 1000;
  backdrop-filter: blur(12px);
  background: rgba(255,255,255,0.95);
}

.header .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 72px;
}

.logo {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 1.5rem;
  font-weight: 800;
  color: var(--primary);
  text-decoration: none;
}

.logo-icon {
  width: 36px;
  height: 36px;
  background: linear-gradient(135deg, var(--accent), var(--primary));
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--white);
  font-size: 1.1rem;
  font-weight: 900;
}

.nav {
  display: flex;
  align-items: center;
  gap: 8px;
}

.nav a {
  padding: 8px 16px;
  border-radius: var(--radius-sm);
  font-weight: 500;
  font-size: 0.925rem;
  color: var(--gray-600);
  transition: all var(--transition);
}

.nav a:hover,
.nav a.active {
  color: var(--primary);
  background: var(--gray-100);
}

.mobile-toggle {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  padding: 8px;
  color: var(--gray-700);
}

.mobile-toggle svg {
  width: 24px;
  height: 24px;
}

/* ==========================================
   HERO SECTION
   ========================================== */
.hero {
  background: linear-gradient(135deg, var(--primary-dark) 0%, var(--primary) 50%, var(--primary-light) 100%);
  color: var(--white);
  padding: 80px 0 60px;
  position: relative;
  overflow: hidden;
}

.hero::before {
  content: '';
  position: absolute;
  top: -50%;
  right: -20%;
  width: 600px;
  height: 600px;
  background: radial-gradient(circle, rgba(0,180,216,0.15) 0%, transparent 70%);
  border-radius: 50%;
}

.hero::after {
  content: '';
  position: absolute;
  bottom: -30%;
  left: -10%;
  width: 400px;
  height: 400px;
  background: radial-gradient(circle, rgba(6,214,160,0.1) 0%, transparent 70%);
  border-radius: 50%;
}

.hero .container {
  position: relative;
  z-index: 1;
  text-align: center;
}

.hero h1 {
  color: var(--white);
  font-size: 3rem;
  margin-bottom: 16px;
  letter-spacing: -0.02em;
}

.hero h1 span {
  background: linear-gradient(90deg, var(--accent-light), var(--success));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.hero p {
  font-size: 1.2rem;
  color: rgba(255,255,255,0.8);
  max-width: 640px;
  margin: 0 auto 32px;
  line-height: 1.7;
}

.hero-stats {
  display: flex;
  justify-content: center;
  gap: 48px;
  margin-top: 40px;
}

.hero-stat {
  text-align: center;
}

.hero-stat .number {
  font-size: 2rem;
  font-weight: 800;
  color: var(--accent-light);
}

.hero-stat .label {
  font-size: 0.875rem;
  color: rgba(255,255,255,0.7);
  margin-top: 4px;
}

/* Search Bar */
.search-wrapper {
  max-width: 600px;
  margin: 0 auto;
  position: relative;
}

.search-bar {
  width: 100%;
  padding: 16px 20px 16px 52px;
  border: 2px solid rgba(255,255,255,0.2);
  border-radius: var(--radius-lg);
  background: rgba(255,255,255,0.1);
  backdrop-filter: blur(8px);
  color: var(--white);
  font-size: 1.05rem;
  font-family: var(--font-sans);
  transition: all var(--transition);
  outline: none;
}

.search-bar::placeholder {
  color: rgba(255,255,255,0.5);
}

.search-bar:focus {
  border-color: var(--accent);
  background: rgba(255,255,255,0.15);
  box-shadow: 0 0 0 4px rgba(0,180,216,0.2);
}

.search-icon {
  position: absolute;
  left: 18px;
  top: 50%;
  transform: translateY(-50%);
  color: rgba(255,255,255,0.5);
  pointer-events: none;
}

.search-icon svg {
  width: 22px;
  height: 22px;
}

/* ==========================================
   FILTER / CATEGORY SECTION
   ========================================== */
.filter-section {
  background: var(--white);
  border-bottom: 1px solid var(--gray-200);
  padding: 20px 0;
  position: sticky;
  top: 72px;
  z-index: 999;
}

.filter-pills {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  padding-bottom: 4px;
  scrollbar-width: thin;
  -ms-overflow-style: none;
}

.filter-pills::-webkit-scrollbar {
  height: 4px;
}

.filter-pills::-webkit-scrollbar-thumb {
  background: var(--gray-300);
  border-radius: 4px;
}

.filter-pill {
  padding: 8px 18px;
  border: 1px solid var(--gray-200);
  border-radius: 50px;
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--gray-600);
  cursor: pointer;
  white-space: nowrap;
  transition: all var(--transition);
  background: var(--white);
  font-family: var(--font-sans);
}

.filter-pill:hover {
  border-color: var(--accent);
  color: var(--accent-dark);
  background: rgba(0,180,216,0.05);
}

.filter-pill.active {
  background: var(--primary);
  color: var(--white);
  border-color: var(--primary);
}

.filter-pill .count {
  display: inline-block;
  background: rgba(0,0,0,0.1);
  padding: 1px 8px;
  border-radius: 50px;
  font-size: 0.75rem;
  margin-left: 6px;
}

.filter-pill.active .count {
  background: rgba(255,255,255,0.2);
}

/* ==========================================
   MAIN CONTENT
   ========================================== */
.main-content {
  padding: 40px 0 80px;
}

.results-info {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 24px;
  color: var(--gray-500);
  font-size: 0.925rem;
}

.results-count {
  font-weight: 600;
  color: var(--gray-700);
}

/* Category Section */
.category-section {
  margin-bottom: 48px;
}

.category-header {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 20px;
  padding-bottom: 12px;
  border-bottom: 2px solid var(--gray-200);
}

.category-icon {
  width: 40px;
  height: 40px;
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.2rem;
  flex-shrink: 0;
}

.category-header h2 {
  font-size: 1.4rem;
  color: var(--gray-800);
}

.category-header .category-count {
  background: var(--gray-100);
  color: var(--gray-500);
  padding: 2px 12px;
  border-radius: 50px;
  font-size: 0.8rem;
  font-weight: 600;
}

/* Platform Cards Grid */
.platforms-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(380px, 1fr));
  gap: 20px;
}

/* Platform Card */
.platform-card {
  background: var(--white);
  border: 1px solid var(--gray-200);
  border-radius: var(--radius-lg);
  padding: 24px;
  transition: all 0.3s ease;
  position: relative;
  overflow: hidden;
}

.platform-card:hover {
  border-color: var(--accent);
  box-shadow: var(--shadow-lg);
  transform: translateY(-2px);
}

.platform-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: linear-gradient(90deg, var(--accent), var(--accent-light));
  opacity: 0;
  transition: opacity var(--transition);
}

.platform-card:hover::before {
  opacity: 1;
}

.card-header {
  display: flex;
  align-items: flex-start;
  gap: 14px;
  margin-bottom: 14px;
}

.card-logo {
  width: 48px;
  height: 48px;
  border-radius: var(--radius);
  background: var(--gray-100);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.4rem;
  flex-shrink: 0;
  font-weight: 700;
  color: var(--primary);
}

.card-title-area {
  flex: 1;
  min-width: 0;
}

.card-title {
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--gray-900);
  margin-bottom: 2px;
}

.card-url {
  font-size: 0.8rem;
  color: var(--gray-400);
  word-break: break-all;
}

.card-badge {
  padding: 4px 10px;
  border-radius: 50px;
  font-size: 0.7rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  flex-shrink: 0;
}

.badge-popular {
  background: rgba(239,71,111,0.1);
  color: var(--danger);
}

.badge-vetted {
  background: rgba(6,214,160,0.1);
  color: #059669;
}

.badge-new {
  background: rgba(0,180,216,0.1);
  color: var(--accent-dark);
}

.badge-free {
  background: rgba(255,209,102,0.15);
  color: #b45309;
}

.card-description {
  font-size: 0.9rem;
  color: var(--gray-600);
  line-height: 1.6;
  margin-bottom: 16px;
}

.card-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: 16px;
}

.card-tag {
  padding: 3px 10px;
  background: var(--gray-100);
  border-radius: 50px;
  font-size: 0.75rem;
  color: var(--gray-600);
  font-weight: 500;
}

.card-meta {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding-top: 14px;
  border-top: 1px solid var(--gray-100);
  font-size: 0.825rem;
}

.meta-item {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  color: var(--gray-500);
}

.meta-item svg {
  width: 16px;
  height: 16px;
  flex-shrink: 0;
  margin-top: 2px;
}

.meta-item strong {
  color: var(--gray-700);
  font-weight: 600;
}

.card-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: 16px;
  padding-top: 14px;
  border-top: 1px solid var(--gray-100);
}

.visit-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 20px;
  background: var(--primary);
  color: var(--white);
  border-radius: var(--radius-sm);
  font-size: 0.85rem;
  font-weight: 600;
  transition: all var(--transition);
}

.visit-btn:hover {
  background: var(--primary-light);
  color: var(--white);
  transform: translateX(2px);
}

.visit-btn svg {
  width: 14px;
  height: 14px;
}

.card-pricing {
  font-size: 0.8rem;
  color: var(--gray-500);
}

.card-pricing strong {
  color: var(--success);
}

/* No Results */
.no-results {
  text-align: center;
  padding: 80px 20px;
  display: none;
}

.no-results.visible {
  display: block;
}

.no-results svg {
  width: 80px;
  height: 80px;
  color: var(--gray-300);
  margin-bottom: 20px;
}

.no-results h3 {
  color: var(--gray-600);
  margin-bottom: 8px;
}

.no-results p {
  color: var(--gray-400);
}

/* ==========================================
   FOOTER
   ========================================== */
.footer {
  background: var(--gray-900);
  color: rgba(255,255,255,0.7);
  padding: 60px 0 30px;
}

.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: 48px;
  margin-bottom: 48px;
}

.footer-brand .logo {
  color: var(--white);
  margin-bottom: 16px;
}

.footer-brand p {
  font-size: 0.9rem;
  line-height: 1.7;
  color: rgba(255,255,255,0.5);
  max-width: 320px;
}

.footer-col h4 {
  color: var(--white);
  font-size: 0.9rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1px;
  margin-bottom: 20px;
}

.footer-col ul {
  list-style: none;
}

.footer-col li {
  margin-bottom: 10px;
}

.footer-col a {
  color: rgba(255,255,255,0.5);
  font-size: 0.9rem;
  transition: color var(--transition);
}

.footer-col a:hover {
  color: var(--accent-light);
}

.footer-bottom {
  border-top: 1px solid rgba(255,255,255,0.1);
  padding-top: 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 0.825rem;
  color: rgba(255,255,255,0.4);
}

.footer-bottom a {
  color: rgba(255,255,255,0.4);
}

.footer-bottom a:hover {
  color: var(--accent-light);
}

/* ==========================================
   INNER PAGES (About, Privacy, Terms, Contact)
   ========================================== */
.page-hero {
  background: linear-gradient(135deg, var(--primary-dark), var(--primary));
  color: var(--white);
  padding: 60px 0 40px;
  text-align: center;
}

.page-hero h1 {
  color: var(--white);
  font-size: 2.5rem;
  margin-bottom: 12px;
}

.page-hero p {
  color: rgba(255,255,255,0.7);
  font-size: 1.1rem;
}

.page-content {
  max-width: 800px;
  margin: 0 auto;
  padding: 48px 24px 80px;
}

.page-content h2 {
  font-size: 1.5rem;
  margin: 40px 0 16px;
  padding-bottom: 10px;
  border-bottom: 2px solid var(--gray-200);
}

.page-content h3 {
  font-size: 1.2rem;
  margin: 28px 0 12px;
}

.page-content p {
  margin-bottom: 16px;
  color: var(--gray-600);
  line-height: 1.8;
}

.page-content ul, .page-content ol {
  margin: 12px 0 20px 24px;
  color: var(--gray-600);
}

.page-content li {
  margin-bottom: 8px;
  line-height: 1.7;
}

.page-content a {
  color: var(--accent-dark);
  text-decoration: underline;
}

/* Contact Form */
.contact-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 48px;
  max-width: 1000px;
  margin: 0 auto;
  padding: 48px 24px 80px;
}

.contact-info-card {
  background: var(--white);
  border: 1px solid var(--gray-200);
  border-radius: var(--radius-lg);
  padding: 32px;
}

.contact-info-card h3 {
  margin-bottom: 20px;
}

.contact-item {
  display: flex;
  align-items: flex-start;
  gap: 14px;
  margin-bottom: 24px;
}

.contact-item-icon {
  width: 44px;
  height: 44px;
  border-radius: var(--radius);
  background: var(--gray-100);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  color: var(--accent-dark);
}

.contact-item-icon svg {
  width: 20px;
  height: 20px;
}

.contact-item h4 {
  font-size: 0.925rem;
  margin-bottom: 4px;
}

.contact-item p {
  font-size: 0.875rem;
  color: var(--gray-500);
}

.contact-form-card {
  background: var(--white);
  border: 1px solid var(--gray-200);
  border-radius: var(--radius-lg);
  padding: 32px;
}

.form-group {
  margin-bottom: 20px;
}

.form-group label {
  display: block;
  font-weight: 600;
  font-size: 0.875rem;
  margin-bottom: 6px;
  color: var(--gray-700);
}

.form-group input,
.form-group textarea,
.form-group select {
  width: 100%;
  padding: 12px 16px;
  border: 1px solid var(--gray-200);
  border-radius: var(--radius-sm);
  font-family: var(--font-sans);
  font-size: 0.925rem;
  color: var(--gray-800);
  transition: border-color var(--transition);
  background: var(--white);
}

.form-group input:focus,
.form-group textarea:focus,
.form-group select:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(0,180,216,0.1);
}

.form-group textarea {
  resize: vertical;
  min-height: 120px;
}

.submit-btn {
  width: 100%;
  padding: 14px 24px;
  background: var(--primary);
  color: var(--white);
  border: none;
  border-radius: var(--radius-sm);
  font-family: var(--font-sans);
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  transition: all var(--transition);
}

.submit-btn:hover {
  background: var(--primary-light);
}

/* ==========================================
   BACK TO TOP BUTTON
   ========================================== */
.back-to-top {
  position: fixed;
  bottom: 32px;
  right: 32px;
  width: 48px;
  height: 48px;
  background: var(--primary);
  color: var(--white);
  border: none;
  border-radius: 50%;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: var(--shadow-lg);
  opacity: 0;
  visibility: hidden;
  transform: translateY(10px);
  transition: all 0.3s ease;
  z-index: 100;
}

.back-to-top.visible {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.back-to-top:hover {
  background: var(--accent-dark);
  transform: translateY(-2px);
}

.back-to-top svg {
  width: 20px;
  height: 20px;
}

/* ==========================================
   RESPONSIVE DESIGN
   ========================================== */
@media (max-width: 1024px) {
  .platforms-grid {
    grid-template-columns: repeat(auto-fill, minmax(340px, 1fr));
  }

  .footer-grid {
    grid-template-columns: 1fr 1fr;
    gap: 32px;
  }
}

@media (max-width: 768px) {
  html { font-size: 15px; }

  .header .container {
    height: 64px;
  }

  .nav {
    display: none;
    position: absolute;
    top: 64px;
    left: 0;
    right: 0;
    background: var(--white);
    border-bottom: 1px solid var(--gray-200);
    flex-direction: column;
    padding: 16px;
    box-shadow: var(--shadow-lg);
  }

  .nav.open {
    display: flex;
  }

  .nav a {
    padding: 12px 16px;
    width: 100%;
  }

  .mobile-toggle {
    display: block;
  }

  .hero {
    padding: 60px 0 40px;
  }

  .hero h1 {
    font-size: 2rem;
  }

  .hero p {
    font-size: 1rem;
  }

  .hero-stats {
    gap: 24px;
  }

  .hero-stat .number {
    font-size: 1.5rem;
  }

  .filter-section {
    top: 64px;
  }

  .platforms-grid {
    grid-template-columns: 1fr;
  }

  .contact-grid {
    grid-template-columns: 1fr;
    gap: 24px;
  }

  .footer-grid {
    grid-template-columns: 1fr;
    gap: 32px;
  }

  .footer-bottom {
    flex-direction: column;
    gap: 12px;
    text-align: center;
  }

  .page-hero h1 {
    font-size: 2rem;
  }
}

@media (max-width: 480px) {
  .container {
    padding: 0 16px;
  }

  .hero h1 {
    font-size: 1.7rem;
  }

  .hero-stats {
    flex-direction: column;
    gap: 16px;
  }

  .card-header {
    flex-direction: column;
    gap: 10px;
  }

  .card-badge {
    align-self: flex-start;
  }

  .back-to-top {
    bottom: 20px;
    right: 20px;
    width: 42px;
    height: 42px;
  }
}

/* Utility classes */
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0,0,0,0);
  white-space: nowrap;
  border-width: 0;
}

.hidden {
  display: none !important;
}

/* Category color themes */
.cat-general { background: rgba(30,58,95,0.08); color: var(--primary); }
.cat-tech { background: rgba(0,180,216,0.1); color: var(--accent-dark); }
.cat-design { background: rgba(239,71,111,0.1); color: var(--danger); }
.cat-writing { background: rgba(255,209,102,0.15); color: #b45309; }
.cat-translation { background: rgba(6,214,160,0.1); color: #059669; }
.cat-voice { background: rgba(168,85,247,0.1); color: #7c3aed; }
.cat-local { background: rgba(251,146,60,0.1); color: #c2410c; }
.cat-micro { background: rgba(99,102,241,0.1); color: #4f46e5; }
.cat-consulting { background: rgba(20,184,166,0.1); color: #0d9488; }
.cat-remote { background: rgba(236,72,153,0.1); color: #be185d; }
.cat-education { background: rgba(34,197,94,0.1); color: #15803d; }
.cat-media { background: rgba(245,158,11,0.1); color: #b45309; }
