/* ============================================================
   AllChambersofCommerce — Modern UI
   Airbnb / Apple style
   ============================================================ */

/* ── GLOBAL ──────────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; }

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Inter', 'Segoe UI', sans-serif;
  color: #222;
  background: #fff;
}

/* ── NAVBAR ─────────────────────────────────────────────────── */
.site-nav {
  position: absolute;
  top: 0; left: 0; right: 0;
  z-index: 100;
  background: transparent;
  padding: 18px 0;
}

.site-nav .navbar-nav .nav-link {
  color: rgba(255,255,255,0.85) !important;
  font-size: 0.9rem;
  font-weight: 500;
  transition: color 0.2s;
}

.site-nav .navbar-nav .nav-link:hover {
  color: #fff !important;
}

.site-brand {
  font-size: 1.1rem;
  font-weight: 700;
  color: #fff !important;
  letter-spacing: -0.3px;
}

/* Results page nav */
.results-nav {
  background: #fff !important;
  border-bottom: 1px solid #ebebeb;
  padding: 12px 0;
}

.site-brand-dark {
  font-size: 1.05rem;
  font-weight: 700;
  color: #222 !important;
  text-decoration: none;
}

/* ── HERO SECTION ────────────────────────────────────────────── */
.hero-section {
  position: relative;
  width: 100%;
  min-height: 580px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  background: linear-gradient(135deg, #1a1a2e 0%, #16213e 45%, #0f3460 100%);
  overflow: hidden;
  padding: 100px 20px 80px;
}

.hero-section::before {
  content: '';
  position: absolute;
  inset: 0;
  background: url('../images/pic_mining_1.png') center/cover no-repeat;
  opacity: 0.15;
  z-index: 0;
}

.hero-section > * { position: relative; z-index: 1; }

.hero-title {
  font-size: clamp(1.8rem, 4vw, 2.9rem);
  font-weight: 700;
  color: #fff;
  text-align: center;
  margin-bottom: 12px;
  letter-spacing: -0.5px;
  line-height: 1.15;
}

.hero-subtitle {
  font-size: 1.05rem;
  color: rgba(255,255,255,0.72);
  text-align: center;
  margin-bottom: 40px;
  font-weight: 400;
}

/* ── SEARCH PILL ─────────────────────────────────────────────── */
.search-pill-wrapper {
  width: 100%;
  max-width: 860px;
  margin: 0 auto;
}

.search-pill {
  display: flex;
  align-items: center;
  background: #fff;
  border-radius: 64px;
  box-shadow: 0 8px 40px rgba(0,0,0,0.28), 0 2px 8px rgba(0,0,0,0.12);
  transition: box-shadow 0.25s;
}

.search-pill:hover {
  box-shadow: 0 12px 50px rgba(0,0,0,0.35), 0 4px 12px rgba(0,0,0,0.15);
}

.search-segment {
  flex: 1;
  border-radius: 64px;
  transition: background 0.2s;
  cursor: pointer;
}

.search-segment:hover { background: #f7f7f7; }

.search-segment-inner { padding: 14px 24px; }

.search-segment label {
  display: block;
  font-size: 0.7rem;
  font-weight: 700;
  color: #222;
  letter-spacing: 0.4px;
  text-transform: uppercase;
  margin-bottom: 3px;
  cursor: pointer;
}

.search-segment input,
.search-segment select {
  width: 100%;
  border: none;
  outline: none;
  background: transparent;
  font-size: 0.9rem;
  font-weight: 400;
  color: #484848;
  padding: 0;
  appearance: none;
  -webkit-appearance: none;
  cursor: pointer;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.search-segment input::placeholder { color: #b0b0b0; }

.search-divider {
  width: 1px;
  height: 32px;
  background: #ddd;
  flex-shrink: 0;
  transition: opacity 0.2s;
}

.search-pill:hover .search-divider { opacity: 0; }

.search-btn-wrap { padding: 8px; flex-shrink: 0; }

.search-btn {
  display: flex;
  align-items: center;
  gap: 8px;
  background: linear-gradient(135deg, #e31c5f 0%, #c0002d 100%);
  color: #fff;
  border: none;
  border-radius: 64px;
  padding: 14px 22px;
  font-size: 0.9rem;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.2s, transform 0.15s, box-shadow 0.2s;
  white-space: nowrap;
}

.search-btn:hover {
  background: linear-gradient(135deg, #d90b4f 0%, #a80026 100%);
  transform: scale(1.04);
  box-shadow: 0 4px 16px rgba(227,28,95,0.45);
}

.search-btn:active { transform: scale(0.98); }
.search-btn svg { width: 16px; height: 16px; fill: currentColor; }

/* ── QUICK FILTERS ───────────────────────────────────────────── */
.quick-filters {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  justify-content: center;
  margin-top: 24px;
}

.quick-filter-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: rgba(255,255,255,0.14);
  border: 1px solid rgba(255,255,255,0.32);
  color: #fff;
  border-radius: 32px;
  padding: 8px 18px;
  font-size: 0.82rem;
  font-weight: 500;
  cursor: pointer;
  text-decoration: none;
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  transition: background 0.2s, border-color 0.2s, transform 0.15s;
}

.quick-filter-btn:hover {
  background: rgba(255,255,255,0.26);
  border-color: rgba(255,255,255,0.6);
  color: #fff;
  text-decoration: none;
  transform: translateY(-1px);
}

.filter-icon { font-size: 1rem; }

/* ── STATS SECTION ───────────────────────────────────────────── */
.stats-section {
  background: #fff;
  padding: 48px 0;
  border-bottom: 1px solid #f0f0f0;
}

.stat-number {
  font-size: 2.2rem;
  font-weight: 700;
  color: #e31c5f;
  letter-spacing: -1px;
  line-height: 1;
}

.stat-label {
  font-size: 0.85rem;
  color: #888;
  margin-top: 4px;
}

/* ── HOW IT WORKS ────────────────────────────────────────────── */
.how-icon {
  font-size: 2.8rem;
  line-height: 1;
}

/* ── RESULTS PAGE ────────────────────────────────────────────── */
.results-page { background: #f8f8f8; }

.results-summary {
  font-size: 0.9rem;
  color: #555;
  margin-bottom: 20px;
  padding-bottom: 16px;
  border-bottom: 1px solid #ebebeb;
}

/* Compact search bar in results nav */
.nav-search-pill {
  display: flex;
  align-items: center;
  background: #fff;
  border: 1px solid #ddd;
  border-radius: 40px;
  overflow: hidden;
  padding: 0 6px 0 16px;
  flex: 1;
  max-width: 520px;
}

.nav-search-pill input {
  border: none;
  outline: none;
  font-size: 0.88rem;
  color: #333;
  padding: 8px 4px;
  flex: 1;
  background: transparent;
}

.nav-search-pill input::placeholder { color: #aaa; }

.nav-divider {
  width: 1px;
  height: 20px;
  background: #ddd;
  margin: 0 8px;
  flex-shrink: 0;
}

.nav-search-btn {
  background: #e31c5f;
  color: #fff;
  border: none;
  border-radius: 50%;
  width: 34px;
  height: 34px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: background 0.2s;
  flex-shrink: 0;
}

.nav-search-btn:hover { background: #c0002d; }

/* ── CHAMBER CARDS ───────────────────────────────────────────── */
.chamber-card {
  display: block;
  background: #fff;
  border-radius: 16px;
  border: 1px solid #ebebeb;
  overflow: hidden;
  text-decoration: none;
  color: inherit;
  transition: box-shadow 0.22s, transform 0.18s;
  height: 100%;
}

.chamber-card:hover {
  box-shadow: 0 6px 30px rgba(0,0,0,0.12);
  transform: translateY(-3px);
  text-decoration: none;
  color: inherit;
}

.chamber-card-body { padding: 20px 20px 12px; }

.chamber-flag-wrap { margin-bottom: 10px; }

.chamber-country-code {
  display: inline-block;
  background: #f3f3f3;
  color: #555;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 1px;
  text-transform: uppercase;
  padding: 3px 10px;
  border-radius: 20px;
}

.chamber-name {
  font-size: 0.98rem;
  font-weight: 600;
  color: #222;
  margin-bottom: 8px;
  line-height: 1.35;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.chamber-location {
  font-size: 0.82rem;
  color: #717171;
  margin-bottom: 4px;
}

.chamber-meta {
  font-size: 0.8rem;
  color: #999;
  margin-bottom: 0;
}

.chamber-card-footer {
  padding: 12px 20px;
  border-top: 1px solid #f5f5f5;
  font-size: 0.82rem;
  font-weight: 600;
  color: #e31c5f;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.chamber-card-footer .arrow { transition: transform 0.2s; }
.chamber-card:hover .chamber-card-footer .arrow { transform: translateX(4px); }

/* Empty state */
.empty-state { color: #555; }

/* ── CHAMBER DETAIL ──────────────────────────────────────────── */
.detail-hero {
  background: linear-gradient(135deg, #1a1a2e 0%, #0f3460 100%);
  border-radius: 20px;
  padding: 36px 36px 32px;
  color: #fff;
}

.detail-country-badge {
  display: inline-block;
  background: rgba(255,255,255,0.18);
  color: rgba(255,255,255,0.9);
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  padding: 4px 14px;
  border-radius: 20px;
  margin-bottom: 14px;
  border: 1px solid rgba(255,255,255,0.25);
}

.detail-title {
  font-size: clamp(1.4rem, 3vw, 2rem);
  font-weight: 700;
  margin-bottom: 10px;
  line-height: 1.2;
}

.detail-location {
  font-size: 0.95rem;
  color: rgba(255,255,255,0.72);
  margin-bottom: 0;
}

/* Info Cards */
.info-card {
  display: flex;
  align-items: flex-start;
  gap: 14px;
  background: #fff;
  border: 1px solid #ebebeb;
  border-radius: 14px;
  padding: 16px 18px;
  height: 100%;
  transition: box-shadow 0.2s;
}

.info-card:hover { box-shadow: 0 4px 16px rgba(0,0,0,0.08); }

.info-card-icon { font-size: 1.5rem; line-height: 1; flex-shrink: 0; }

.info-card-label {
  font-size: 0.7rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.4px;
  color: #888;
  margin-bottom: 4px;
}

.info-card-value {
  font-size: 0.9rem;
  font-weight: 500;
  color: #222;
  word-break: break-word;
}

.info-card-value a {
  color: #e31c5f;
  text-decoration: none;
}

.info-card-value a:hover { text-decoration: underline; }

/* ── FOOTER ─────────────────────────────────────────────────── */
.site-footer {
  background: #1a1a2e;
  color: #fff;
  padding: 40px 0 24px;
  margin-top: auto;
}

.footer-brand {
  font-size: 1.05rem;
  font-weight: 700;
}

.footer-heading {
  font-size: 0.78rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: rgba(255,255,255,0.5);
  margin-bottom: 12px;
}

.footer-links li { margin-bottom: 6px; }
.footer-links a {
  color: rgba(255,255,255,0.65);
  text-decoration: none;
  font-size: 0.88rem;
  transition: color 0.2s;
}

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

.footer-link-email {
  color: rgba(255,255,255,0.65);
  text-decoration: none;
}

.footer-link-email:hover { color: #fff; }

.footer-divider {
  border-color: rgba(255,255,255,0.12);
  margin: 28px 0 20px;
}

.site-footer .text-muted { color: rgba(255,255,255,0.45) !important; }

/* ── WORDPRESS EMBED ────────────────────────────────────────── */
.acofc-search-wrapper {
  width: 100%;
  max-width: 900px;
  margin: 0 auto;
}

.acofc-search-wrapper .search-pill-wrapper {
  max-width: 100%;
}

/* Larger text for embedded widget */
.acofc-search-wrapper .search-segment label {
  font-size: 0.78rem;
  letter-spacing: 0.5px;
}

.acofc-search-wrapper .search-segment input,
.acofc-search-wrapper .search-segment select {
  font-size: 1.05rem;
  font-weight: 500;
  color: #222;
}

.acofc-search-wrapper .search-segment-inner {
  padding: 16px 26px;
}

.acofc-search-wrapper .search-btn {
  font-size: 1rem;
  padding: 16px 26px;
}

/* Dark-background variant of filter pills (for hero sections in WordPress) */
.quick-filter-btn--dark {
  background: rgba(0, 0, 0, 0.07) !important;
  border: 1px solid rgba(0, 0, 0, 0.15) !important;
  color: #333 !important;
  backdrop-filter: none !important;
  -webkit-backdrop-filter: none !important;
}

.quick-filter-btn--dark:hover {
  background: rgba(0, 0, 0, 0.13) !important;
  border-color: rgba(0, 0, 0, 0.28) !important;
  color: #111 !important;
}

/* ── SIDEBAR FILTER ──────────────────────────────────────────── */
.sidebar-panel {
  background: #fff;
  border: 1px solid #e8e8e8;
  border-radius: 16px;
  overflow: hidden;
  position: sticky;
  top: 80px;
  box-shadow: 0 2px 12px rgba(0,0,0,0.05);
}

/* Header */
.sidebar-panel-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 20px;
  border-bottom: 1px solid #f0f0f0;
  background: #fafafa;
}

.sidebar-panel-header span {
  font-size: 0.88rem;
  font-weight: 700;
  color: #111;
  letter-spacing: -0.1px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.clear-filters-link {
  font-size: 0.78rem;
  font-weight: 600;
  color: #e31c5f;
  text-decoration: none;
  padding: 3px 10px;
  border-radius: 20px;
  background: #fff0f4;
  border: 1px solid #f8c0ce;
  transition: background 0.15s;
  white-space: nowrap;
}

.clear-filters-link:hover {
  background: #ffd6e0;
  color: #c0002d;
  text-decoration: none;
}

/* Sections */
.filter-section {
  border-bottom: 1px solid #f2f2f2;
}

/* Section title — override ALL Bootstrap button styles */
.filter-section-title,
.filter-section-title:focus,
.filter-section-title:active,
.filter-section-title:hover {
  display: flex !important;
  align-items: center !important;
  justify-content: space-between !important;
  width: 100% !important;
  background: transparent !important;
  border: none !important;
  border-radius: 0 !important;
  box-shadow: none !important;
  outline: none !important;
  padding: 14px 20px !important;
  font-family: inherit !important;
  font-size: 0.86rem !important;
  font-weight: 600 !important;
  color: #222 !important;
  cursor: pointer;
  text-align: left !important;
  transition: background 0.15s;
  letter-spacing: -0.1px;
}

.filter-section-title:hover { background: #fafafa !important; }

.filter-chevron {
  flex-shrink: 0;
  transition: transform 0.22s ease;
  color: #ccc;
  margin-left: 8px;
}

.filter-section-title[aria-expanded="false"] .filter-chevron {
  transform: rotate(-90deg);
}

/* Body — force block layout to prevent 2-column bug */
.filter-section-body {
  display: block !important;
  padding: 4px 20px 14px !important;
}

/* Each filter row */
.filter-option {
  display: flex !important;
  align-items: center !important;
  flex-wrap: nowrap !important;
  width: 100% !important;
  gap: 10px;
  padding: 6px 0;
  cursor: pointer;
  font-size: 0.855rem;
  color: #333;
  margin: 0;
  transition: color 0.12s;
  line-height: 1.3;
}

.filter-option:hover .filter-option-text { color: #e31c5f; }

.filter-option input[type="radio"],
.filter-option input[type="checkbox"] {
  display: block !important;
  width: 15px !important;
  height: 15px !important;
  min-width: 15px !important;
  accent-color: #e31c5f;
  cursor: pointer;
  flex-shrink: 0 !important;
  margin: 0 !important;
}

.filter-option-text {
  flex: 1 !important;
  min-width: 0;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.filter-option-count {
  font-size: 0.73rem;
  color: #aaa;
  background: #f4f4f4;
  padding: 2px 8px;
  border-radius: 20px;
  font-weight: 500;
  flex-shrink: 0;
  margin-left: auto;
}

.filter-clear-option { opacity: 0.65; }
.filter-clear-option .filter-option-text { font-style: italic; }

/* "All countries" reset link — anchor styled as radio option, no form submit */
.filter-reset-link {
  text-decoration: none !important;
  color: #333 !important;
}
.filter-reset-link:hover .filter-option-text { color: #e31c5f; }

/* Fake checked-radio dot for the reset link */
.filter-radio-checked {
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  width: 15px !important;
  height: 15px !important;
  min-width: 15px !important;
  border-radius: 50%;
  border: 2px solid #e31c5f;
  background: #e31c5f;
  flex-shrink: 0 !important;
}
.filter-radio-checked::after {
  content: '';
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: #fff;
}

/* "Other countries" — reset link inside Country section */
.other-countries-link {
  display: block;
  color: #e31c5f !important;
  font-size: 0.82rem;
  font-weight: 600;
  text-decoration: none !important;
  padding: 8px 0 2px;
  margin-top: 4px;
  border-top: 1px solid #f0f0f0;
  transition: color 0.15s;
}
.other-countries-link:hover {
  color: #c0002d !important;
  text-decoration: underline !important;
}

/* "Ver más" button */
.show-more-btn,
.show-more-btn:focus,
.show-more-btn:active {
  display: block !important;
  background: none !important;
  border: none !important;
  box-shadow: none !important;
  outline: none !important;
  padding: 6px 0 0 25px !important;
  font-size: 0.82rem !important;
  font-weight: 600 !important;
  color: #e31c5f !important;
  cursor: pointer;
  text-align: left;
}

.show-more-btn:hover { color: #c0002d !important; text-decoration: underline; }

/* Footer with apply button */
.sidebar-panel-footer {
  padding: 12px 16px 16px;
  border-top: 1px solid #f0f0f0;
  background: #fafafa;
}

/* ── ACTIVE FILTER TAGS ──────────────────────────────────────── */
.active-filters {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 10px;
}

.active-filter-tag {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  background: #fff0f4;
  border: 1px solid #f8c0ce;
  color: #c0002d;
  border-radius: 20px;
  padding: 4px 12px;
  font-size: 0.78rem;
  font-weight: 500;
  text-decoration: none;
  cursor: default;
  pointer-events: none;
}

/* ── RESPONSIVE ─────────────────────────────────────────────── */
@media (max-width: 768px) {
  .search-pill {
    flex-direction: column;
    border-radius: 20px;
    overflow: hidden;
  }

  .search-segment { width: 100%; border-radius: 0; }
  .search-segment:first-child { border-radius: 20px 20px 0 0; }

  .search-divider { width: 100%; height: 1px; }

  .search-btn-wrap { width: 100%; padding: 0; }

  .search-btn {
    width: 100%;
    border-radius: 0 0 20px 20px;
    padding: 16px;
    justify-content: center;
  }

  .detail-hero { padding: 24px 20px 20px; }
}

@media (max-width: 480px) {
  .hero-subtitle { font-size: 0.92rem; }
  .stat-number { font-size: 1.8rem; }
}

@media (max-width: 991px) {
  /* Sidebar below results (order handled by Bootstrap order classes in HTML) */
  .sidebar-panel { position: static; margin-bottom: 1.5rem; margin-top: 1.5rem; }

  /* Show ALL countries/states on mobile — no "Ver más" needed when scrolling */
  .filter-option.fs-extra { display: flex !important; }
  .show-more-btn { display: none !important; }

  /* Slightly larger tap targets on touch screens */
  .filter-option { padding: 9px 0; }
  .filter-section-title { padding: 14px 20px; }
}
