/* ==========================================================================
   Company Profiles - Train & Hire
   Public company profile pages: hero, stats, response badge, job grid
   ========================================================================== */

/* --------------------------------------------------------------------------
   Page Layout
   -------------------------------------------------------------------------- */

.cp-page {
  font-family: var(--th-font);
  max-width: 1140px;
  margin: 0 auto;
  padding: 0 1.5rem 3rem;
}

.cp-back-link {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--th-text-secondary);
  text-decoration: none;
  margin-bottom: 1rem;
  transition: color 0.15s ease;
}

.cp-back-link:hover {
  color: var(--th-accent);
}

.cp-back-link svg {
  width: 14px;
  height: 14px;
  stroke: currentColor;
  stroke-width: 2;
  fill: none;
}

/* --------------------------------------------------------------------------
   Hero Section
   -------------------------------------------------------------------------- */

.cp-hero {
  background: linear-gradient(135deg, #eef2ff 0%, #f6f7f9 50%, #fef9f0 100%);
  border: 1.5px solid var(--th-border);
  border-radius: 14px;
  padding: 2rem 2.25rem;
  margin-bottom: 1.5rem;
}

.cp-hero-inner {
  display: flex;
  align-items: center;
  gap: 1.5rem;
}

.cp-hero-logo {
  width: 72px;
  height: 72px;
  border-radius: 14px;
  object-fit: cover;
  border: 1.5px solid var(--th-border);
  flex-shrink: 0;
}

.cp-hero-logo-placeholder {
  width: 72px;
  height: 72px;
  border-radius: 14px;
  background: var(--th-accent);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.75rem;
  font-weight: 800;
  flex-shrink: 0;
  letter-spacing: -0.02em;
}

.cp-hero-info {
  flex: 1;
  min-width: 0;
}

.cp-hero-name {
  font-size: 1.85rem;
  font-weight: 800;
  color: var(--th-text);
  letter-spacing: -0.035em;
  line-height: 1.15;
  margin: 0 0 0.35rem;
}

.cp-hero-meta {
  display: flex;
  align-items: center;
  gap: 1rem;
  flex-wrap: wrap;
}

.cp-hero-meta-item {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  font-size: 0.85rem;
  color: var(--th-text-secondary);
  font-weight: 500;
}

.cp-hero-meta-item svg {
  width: 14px;
  height: 14px;
  stroke: currentColor;
  stroke-width: 2;
  fill: none;
  flex-shrink: 0;
}

.cp-hero-meta-item a {
  color: var(--th-accent);
  text-decoration: none;
}

.cp-hero-meta-item a:hover {
  text-decoration: underline;
}

/* --------------------------------------------------------------------------
   Stats Row
   -------------------------------------------------------------------------- */

.cp-stats {
  display: flex;
  gap: 0.75rem;
  flex-wrap: wrap;
  margin-bottom: 1.5rem;
}

.cp-stat-chip {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.5rem 1rem;
  background: var(--th-bg-card);
  border: 1.5px solid var(--th-border);
  border-radius: 100px;
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--th-text);
  white-space: nowrap;
}

.cp-stat-chip svg {
  width: 14px;
  height: 14px;
  flex-shrink: 0;
}

.cp-stat-chip-label {
  color: var(--th-text-secondary);
  font-weight: 500;
}

.cp-stat-chip .rv-star-filled {
  width: 14px;
  height: 14px;
}

/* --------------------------------------------------------------------------
   Response Time Badge
   -------------------------------------------------------------------------- */

.cp-response-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  font-size: 0.75rem;
  font-weight: 700;
  padding: 0.35rem 0.85rem;
  border-radius: 100px;
  margin-bottom: 1.5rem;
}

.cp-response-badge svg {
  width: 14px;
  height: 14px;
  stroke: currentColor;
  stroke-width: 2;
  fill: none;
  flex-shrink: 0;
}

.cp-response-very_responsive {
  background: #d1fae5;
  color: #065f46;
  border: 1px solid #a7f3d0;
}

.cp-response-responsive {
  background: #dbeafe;
  color: #1e40af;
  border: 1px solid #bfdbfe;
}

.cp-response-moderate {
  background: #fef3c7;
  color: #92400e;
  border: 1px solid #fde68a;
}

.cp-response-slow {
  background: var(--th-border-light);
  color: #6b7280;
  border: 1px solid #e5e7eb;
}

.cp-response-very_slow {
  background: var(--th-border-light);
  color: #6b7280;
  border: 1px solid #e5e7eb;
}

/* Inline response badge (for job detail) */
.cp-response-inline {
  font-size: 0.65rem;
  font-weight: 700;
  padding: 0.15rem 0.5rem;
  border-radius: 100px;
  margin-left: 0.5rem;
  margin-bottom: 0;
  vertical-align: middle;
}

/* --------------------------------------------------------------------------
   Sections
   -------------------------------------------------------------------------- */

.cp-section {
  margin-bottom: 2rem;
}

.cp-section-title {
  font-size: 1.15rem;
  font-weight: 800;
  color: var(--th-text);
  letter-spacing: -0.025em;
  margin-bottom: 1rem;
}

/* --------------------------------------------------------------------------
   Description
   -------------------------------------------------------------------------- */

.cp-description {
  font-size: 0.92rem;
  line-height: 1.7;
  color: var(--th-text);
}

.cp-description p {
  margin: 0 0 0.75rem;
}

.cp-description p:last-child {
  margin-bottom: 0;
}

/* --------------------------------------------------------------------------
   Reviews Summary
   -------------------------------------------------------------------------- */

.cp-reviews-summary {
  background: var(--th-bg-card);
  border: 1.5px solid var(--th-border);
  border-radius: 12px;
  padding: 1.75rem;
  margin-bottom: 1rem;
}

.cp-reviews-link {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--th-accent);
  text-decoration: none;
  transition: color 0.15s ease;
}

.cp-reviews-link:hover {
  text-decoration: underline;
}

.cp-reviews-link svg {
  width: 14px;
  height: 14px;
  stroke: currentColor;
  stroke-width: 2;
  fill: none;
}

/* --------------------------------------------------------------------------
   Jobs Grid
   -------------------------------------------------------------------------- */

.cp-jobs-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 1rem;
}

.cp-job-card {
  display: block;
  background: var(--th-bg-card);
  border: 1.5px solid var(--th-border);
  border-radius: 12px;
  padding: 1.25rem 1.5rem;
  text-decoration: none;
  color: inherit;
  transition: border-color 0.2s ease, box-shadow 0.2s ease, transform 0.2s ease;
}

.cp-job-card:hover {
  border-color: #c7d7f7;
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.07), 0 1px 3px rgba(0, 0, 0, 0.04);
  transform: translateY(-2px);
  color: inherit;
  text-decoration: none;
}

.cp-job-card-title {
  font-size: 1rem;
  font-weight: 700;
  color: var(--th-text);
  margin-bottom: 0.5rem;
  letter-spacing: -0.015em;
  line-height: 1.3;
}

.cp-job-card-badges {
  display: flex;
  gap: 0.4rem;
  flex-wrap: wrap;
  margin-bottom: 0.5rem;
}

.cp-job-card-meta {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  flex-wrap: wrap;
  font-size: 0.8rem;
  color: var(--th-text-secondary);
}

.cp-job-card-meta-item {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
}

.cp-job-card-meta-item svg {
  width: 13px;
  height: 13px;
  stroke: currentColor;
  stroke-width: 1.5;
  fill: none;
  flex-shrink: 0;
}

.cp-job-card-skills {
  display: flex;
  gap: 0.35rem;
  flex-wrap: wrap;
  margin-top: 0.65rem;
}

.cp-job-card-skills .skill-chip {
  font-size: 0.72rem;
  padding: 0.15rem 0.5rem;
}

/* --------------------------------------------------------------------------
   Empty State
   -------------------------------------------------------------------------- */

.cp-empty {
  text-align: center;
  padding: 3rem 1.5rem;
  background: var(--th-bg-card);
  border: 1.5px dashed var(--th-border);
  border-radius: 12px;
}

.cp-empty-icon {
  width: 48px;
  height: 48px;
  margin: 0 auto 1rem;
  color: var(--th-text-muted);
}

.cp-empty-icon svg {
  width: 100%;
  height: 100%;
  stroke: currentColor;
  stroke-width: 1.5;
  fill: none;
}

.cp-empty-title {
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--th-text);
  margin: 0 0 0.35rem;
}

.cp-empty-message {
  font-size: 0.85rem;
  color: var(--th-text-secondary);
  line-height: 1.6;
  max-width: 440px;
  margin: 0 auto;
}

.cp-empty-cta {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  font-family: var(--th-font);
  font-size: 0.82rem;
  font-weight: 700;
  color: #fff;
  background: var(--th-accent);
  border: 1.5px solid var(--th-accent);
  border-radius: 8px;
  padding: 0.55rem 1.25rem;
  text-decoration: none;
  margin-top: 1rem;
  transition: transform 0.15s ease, box-shadow 0.15s ease, background 0.15s ease;
}

.cp-empty-cta:hover {
  background: var(--th-accent-hover);
  transform: translateY(-1px);
  box-shadow: 0 4px 14px rgba(13, 110, 253, 0.25);
}

/* --------------------------------------------------------------------------
   Responsive
   -------------------------------------------------------------------------- */

@media (max-width: 767.98px) {
  .cp-page {
    padding: 0 1rem 2rem;
  }

  .cp-hero {
    padding: 1.5rem;
  }

  .cp-hero-inner {
    flex-direction: column;
    align-items: flex-start;
    gap: 1rem;
  }

  .cp-hero-name {
    font-size: 1.4rem;
  }

  .cp-hero-meta {
    flex-direction: column;
    align-items: flex-start;
    gap: 0.5rem;
  }

  .cp-stats {
    flex-wrap: wrap;
  }

  .cp-jobs-grid {
    grid-template-columns: 1fr;
  }

  .cp-reviews-summary {
    padding: 1.25rem;
  }

  .cp-section-title {
    font-size: 1.05rem;
  }

  .rv-aggregate {
    grid-template-columns: 1fr;
  }

  .rv-aggregate-overall {
    border-right: none;
    border-bottom: 1px solid var(--th-border-light);
    padding-right: 0;
    padding-bottom: 1.25rem;
  }

  .rv-category-row {
    grid-template-columns: 100px 1fr 32px;
    gap: 0.5rem;
  }
}

/* ==========================================================================
   Browse Page - Company Discovery
   ========================================================================== */

.cp-browse-page {
  font-family: var(--th-font);
  max-width: 1140px;
  margin: 0 auto;
  padding: 2rem 1.5rem 3rem;
}

/* Browse header */
.cp-browse-header {
  margin-bottom: 1.75rem;
}

.cp-browse-title {
  font-size: 1.85rem;
  font-weight: 800;
  color: var(--th-text);
  letter-spacing: -0.035em;
  line-height: 1.15;
  margin: 0 0 0.35rem;
}

.cp-browse-subtitle {
  font-size: 0.92rem;
  color: var(--th-text-secondary);
  margin: 0;
  line-height: 1.5;
}

/* Browse filters */
.cp-browse-filters {
  margin-bottom: 1.75rem;
}

.cp-browse-search-wrap {
  position: relative;
  margin-bottom: 0.75rem;
}

.cp-browse-search-icon {
  position: absolute;
  left: 0.85rem;
  top: 50%;
  transform: translateY(-50%);
  width: 16px;
  height: 16px;
  stroke: var(--th-text-muted);
  stroke-width: 2;
  fill: none;
  pointer-events: none;
}

.cp-browse-search-input {
  width: 100%;
  padding: 0.65rem 0.85rem 0.65rem 2.5rem;
  border: 1.5px solid var(--th-border);
  border-radius: 10px;
  font-size: 0.88rem;
  font-family: var(--th-font);
  color: var(--th-text);
  background: var(--th-bg-card);
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.cp-browse-search-input:focus {
  outline: none;
  border-color: var(--th-accent);
  box-shadow: 0 0 0 3px rgba(13, 110, 253, 0.1);
}

.cp-browse-search-input::placeholder {
  color: var(--th-text-muted);
}

.cp-browse-filter-row {
  display: flex;
  gap: 0.75rem;
  flex-wrap: wrap;
  align-items: flex-end;
}

.cp-browse-filter-group {
  flex: 1;
  min-width: 140px;
}

.cp-browse-filter-label {
  display: block;
  font-size: 0.72rem;
  font-weight: 700;
  color: var(--th-text-secondary);
  text-transform: uppercase;
  letter-spacing: 0.04em;
  margin-bottom: 0.3rem;
}

.cp-browse-select-wrap {
  position: relative;
}

.cp-browse-select {
  width: 100%;
  padding: 0.5rem 0.75rem;
  border: 1.5px solid var(--th-border);
  border-radius: 8px;
  font-size: 0.82rem;
  font-family: var(--th-font);
  color: var(--th-text);
  background: var(--th-bg-card);
  transition: border-color 0.15s ease;
  appearance: auto;
}

.cp-browse-select:focus {
  outline: none;
  border-color: var(--th-accent);
  box-shadow: 0 0 0 3px rgba(13, 110, 253, 0.1);
}

.cp-browse-filter-actions {
  display: flex;
  gap: 0.5rem;
  align-items: center;
  padding-bottom: 1px;
}

.cp-browse-btn-search {
  padding: 0.5rem 1.25rem;
  background: var(--th-accent);
  color: #fff;
  border: 1.5px solid var(--th-accent);
  border-radius: 8px;
  font-size: 0.82rem;
  font-weight: 700;
  font-family: var(--th-font);
  cursor: pointer;
  transition: background 0.15s ease, transform 0.1s ease;
}

.cp-browse-btn-search:hover {
  background: var(--th-accent-hover, #0b5ed7);
  transform: translateY(-1px);
}

.cp-browse-btn-clear {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  font-size: 0.78rem;
  font-weight: 700;
  color: var(--th-text-secondary);
  text-decoration: none;
  padding: 0.45rem 0.85rem;
  border: 1.5px solid var(--th-border);
  border-radius: 8px;
  transition: all 0.15s ease;
}

.cp-browse-btn-clear svg {
  width: 13px;
  height: 13px;
  stroke: currentColor;
  stroke-width: 2;
  fill: none;
}

.cp-browse-btn-clear:hover {
  border-color: #fca5a5;
  color: #dc2626;
  background: #fef2f2;
}

/* Browse grid */
.cp-browse-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 1rem;
}

/* Browse card */
.cp-browse-card {
  display: flex;
  flex-direction: column;
  background: var(--th-bg-card);
  border: 1.5px solid var(--th-border);
  border-radius: 12px;
  padding: 1.25rem;
  text-decoration: none;
  color: inherit;
  transition: border-color 0.2s ease, box-shadow 0.2s ease, transform 0.2s ease;
}

.cp-browse-card:hover {
  border-color: #c7d7f7;
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.07), 0 1px 3px rgba(0, 0, 0, 0.04);
  transform: translateY(-2px);
  text-decoration: none;
  color: inherit;
}

.cp-browse-card-header {
  display: flex;
  align-items: flex-start;
  gap: 0.85rem;
  margin-bottom: 0.85rem;
}

.cp-browse-card-logo {
  width: 48px;
  height: 48px;
  border-radius: 10px;
  object-fit: cover;
  border: 1.5px solid var(--th-border);
  flex-shrink: 0;
}

.cp-browse-card-logo-placeholder {
  width: 48px;
  height: 48px;
  border-radius: 10px;
  background: var(--th-accent);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.15rem;
  font-weight: 800;
  flex-shrink: 0;
}

.cp-browse-card-info {
  min-width: 0;
  flex: 1;
}

.cp-browse-card-name {
  font-size: 1rem;
  font-weight: 700;
  color: var(--th-text);
  letter-spacing: -0.015em;
  line-height: 1.3;
  margin: 0 0 0.2rem;
}

.cp-browse-card-body {
  display: flex;
  flex-direction: column;
  gap: 0.3rem;
  flex: 1;
  margin-bottom: 0.85rem;
}

.cp-browse-card-meta {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  font-size: 0.8rem;
  color: var(--th-text-secondary);
  font-weight: 500;
}

.cp-browse-card-meta svg {
  width: 13px;
  height: 13px;
  stroke: currentColor;
  stroke-width: 1.5;
  fill: none;
  flex-shrink: 0;
}

.cp-browse-card-footer {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding-top: 0.75rem;
  border-top: 1px solid var(--th-border);
}

.cp-browse-card-stat {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--th-text-secondary);
}

.cp-browse-card-stat svg {
  width: 13px;
  height: 13px;
  stroke: currentColor;
  stroke-width: 1.5;
  fill: none;
  flex-shrink: 0;
}

.cp-browse-card-star {
  fill: #f59e0b;
  stroke: #f59e0b;
}

/* Browse pagination */
.cp-browse-pagination {
  display: flex;
  justify-content: center;
  margin-top: 1.5rem;
}

/* Browse responsive */
@media (max-width: 767.98px) {
  .cp-browse-page {
    padding: 1.25rem 1rem 2rem;
  }

  .cp-browse-title {
    font-size: 1.4rem;
  }

  .cp-browse-filter-row {
    flex-direction: column;
  }

  .cp-browse-filter-group {
    min-width: 100%;
  }

  .cp-browse-filter-label {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    max-width: 100%;
  }

  .cp-browse-grid {
    grid-template-columns: 1fr;
  }
}

/* --------------------------------------------------------------------------
   Follow Button
   -------------------------------------------------------------------------- */

.cp-follow-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.4rem 1rem;
  border: 1.5px solid var(--th-border);
  border-radius: 100px;
  font-size: 0.78rem;
  font-weight: 700;
  font-family: var(--th-font);
  color: var(--th-text-secondary);
  background: var(--th-bg-card);
  cursor: pointer;
  transition: all 0.15s ease;
}

.cp-follow-btn svg {
  width: 14px;
  height: 14px;
  stroke: currentColor;
  stroke-width: 2;
  fill: none;
}

.cp-follow-btn:hover {
  border-color: #f87171;
  color: #ef4444;
  background: #fef2f2;
}

.cp-follow-btn:hover svg {
  fill: #fca5a5;
}

.cp-follow-btn-following {
  border-color: #fca5a5;
  color: #ef4444;
  background: #fef2f2;
}

.cp-follow-btn-following svg {
  fill: #ef4444;
}

.cp-follow-btn-following:hover {
  border-color: var(--th-border);
  color: var(--th-text-secondary);
  background: var(--th-bg-card);
}

.cp-follow-btn-following:hover svg {
  fill: none;
}

/* Browse card follow wrapper */
.cp-browse-card-wrap {
  position: relative;
}

.cp-browse-card-follow {
  position: absolute;
  top: 0.75rem;
  right: 0.75rem;
  z-index: 1;
}

/* Industry badge */
.cp-industry-badge {
  display: inline-flex;
  align-items: center;
  padding: 0.2rem 0.6rem;
  border-radius: 6px;
  font-size: 0.72rem;
  font-weight: 600;
  background: #e0e7ff;
  color: #3730a3;
  margin-top: 0.35rem;
}
