/* ==============================================
   Scrap Rates Page — Stylesheet
   ============================================== */

/* ---- Page Hero ---- */
.page-hero {
  min-height: 480px;
  position: relative;
  display: flex;
  align-items: center;
  padding-top: var(--nav-height);
  overflow: hidden;
}

.page-hero-bg {
  position: absolute;
  inset: 0;
  z-index: 0;
}

.page-hero-bg img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
}

.page-hero-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(
    135deg,
    rgba(22, 163, 74, 0.88) 0%,
    rgba(15, 23, 42, 0.82) 100%
  );
}

.page-hero-content {
  position: relative;
  z-index: 1;
  color: var(--white);
  padding: 80px 0;
}

.page-hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: rgba(255, 255, 255, 0.15);
  border: 1px solid rgba(255, 255, 255, 0.3);
  color: var(--white);
  font-size: 0.82rem;
  font-weight: 600;
  padding: 7px 18px;
  border-radius: 100px;
  margin-bottom: 20px;
  backdrop-filter: blur(8px);
}

.page-hero-content h1 {
  font-family: var(--font-heading);
  font-size: clamp(32px, 5vw, 58px);
  font-weight: 900;
  line-height: 1.15;
  margin-bottom: 16px;
  color: var(--white);
}

.page-hero-content h1 .highlight {
  color: #bbf7d0;
}

.page-hero-content p {
  font-size: 1.1rem;
  color: rgba(255, 255, 255, 0.85);
  max-width: 520px;
  margin-bottom: 28px;
  line-height: 1.6;
}

.page-hero-meta {
  display: flex;
  gap: 24px;
  flex-wrap: wrap;
}

.page-hero-meta span {
  display: flex;
  align-items: center;
  gap: 7px;
  font-size: 0.88rem;
  color: rgba(255, 255, 255, 0.8);
  background: rgba(255, 255, 255, 0.1);
  padding: 6px 14px;
  border-radius: 100px;
  border: 1px solid rgba(255, 255, 255, 0.2);
}

.page-hero-meta span i {
  color: #bbf7d0;
}

/* ---- Rate Alert Banner ---- */
.rate-alert-banner {
  background: linear-gradient(90deg, #166534, #15803d);
  color: var(--white);
  padding: 12px 0;
  overflow: hidden;
}

.rate-alert-inner {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 0.88rem;
  flex-wrap: wrap;
}

.rate-alert-dot {
  width: 8px;
  height: 8px;
  background: #4ade80;
  border-radius: 50%;
  display: inline-block;
  animation: pulseDot 1.4s ease-in-out infinite;
  flex-shrink: 0;
}

@keyframes pulseDot {
  0%,
  100% {
    box-shadow: 0 0 0 0 rgba(74, 222, 128, 0.6);
  }
  50% {
    box-shadow: 0 0 0 6px rgba(74, 222, 128, 0);
  }
}

.rate-alert-banner i.fa-bolt {
  color: #fde047;
}

.rate-alert-inner a {
  color: #bbf7d0;
  font-weight: 700;
  margin-left: auto;
  text-decoration: underline;
  white-space: nowrap;
}

/* ---- Quick Rate Cards ---- */
.quick-rate-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
}

.qr-card {
  display: flex;
  align-items: center;
  gap: 16px;
  background: var(--white);
  border: 1px solid var(--gray-light);
  border-radius: var(--radius);
  padding: 20px 22px;
  box-shadow: var(--shadow-sm);
  transition: var(--transition);
}

.qr-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-md);
  border-color: var(--green-light);
}

.qr-icon {
  width: 52px;
  height: 52px;
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.3rem;
  flex-shrink: 0;
}

.qr-info {
  flex: 1;
}

.qr-info h4 {
  font-family: var(--font-heading);
  font-size: 1rem;
  font-weight: 700;
  margin-bottom: 4px;
}

.qr-cat {
  font-size: 0.78rem;
  color: var(--gray);
  text-transform: uppercase;
  letter-spacing: 1px;
  font-weight: 600;
}

.qr-price {
  text-align: right;
}

.qr-price strong {
  font-family: var(--font-heading);
  font-size: 1.15rem;
  font-weight: 800;
  color: var(--charcoal);
  display: block;
}

.qr-price small {
  font-size: 0.78rem;
  color: var(--gray);
}

.qr-trend {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 0.75rem;
  font-weight: 600;
  padding: 3px 8px;
  border-radius: 100px;
  margin-top: 4px;
}

.qr-trend.up {
  background: #dcfce7;
  color: #16a34a;
}
.qr-trend.down {
  background: #fee2e2;
  color: #dc2626;
}
.qr-trend.neutral {
  background: #f1f5f9;
  color: #64748b;
}

/* ---- Rate Tabs ---- */
.rate-tabs {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  margin-bottom: 28px;
  border-bottom: 2px solid var(--gray-light);
  padding-bottom: 0;
}

.rate-tab {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 12px 24px;
  border-radius: var(--radius-sm) var(--radius-sm) 0 0;
  font-weight: 600;
  font-size: 0.92rem;
  color: var(--gray);
  background: transparent;
  border: none;
  border-bottom: 3px solid transparent;
  margin-bottom: -2px;
  cursor: pointer;
  transition: var(--transition);
  font-family: var(--font-main);
}

.rate-tab:hover {
  color: var(--green);
  background: rgba(34, 197, 94, 0.06);
}

.rate-tab.active {
  color: var(--green-dark);
  border-bottom-color: var(--green);
  background: rgba(34, 197, 94, 0.07);
}

/* ---- Rate Table ---- */
.rate-table-wrap {
  background: var(--white);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
  border: 1px solid var(--gray-light);
  overflow: hidden;
}

.rate-panel {
  display: none;
}

.rate-panel.active {
  display: block;
}

.rate-table {
  width: 100%;
  border-collapse: collapse;
}

.rate-table thead tr {
  background: linear-gradient(135deg, var(--charcoal), var(--charcoal-2));
  color: var(--white);
}

.rate-table thead th {
  padding: 16px 20px;
  text-align: left;
  font-size: 0.82rem;
  font-weight: 700;
  letter-spacing: 0.5px;
  text-transform: uppercase;
}

.rate-table tbody tr {
  border-bottom: 1px solid var(--gray-light);
  transition: background 0.2s;
}

.rate-table tbody tr:last-child {
  border-bottom: none;
}

.rate-table tbody tr:hover {
  background: #f0fdf4;
}

.rate-table tbody td {
  padding: 15px 20px;
  font-size: 0.92rem;
  color: var(--charcoal);
  vertical-align: middle;
}

.item-dot {
  display: inline-block;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  margin-right: 8px;
  vertical-align: middle;
  flex-shrink: 0;
}

.item-dot.yellow {
  background: #f59e0b;
}
.item-dot.pink {
  background: #ec4899;
}
.item-dot.gray {
  background: #6b7280;
}
.item-dot.blue {
  background: #3b82f6;
}
.item-dot.green {
  background: #22c55e;
}
.item-dot.red {
  background: #ef4444;
}
.item-dot.brown {
  background: #92400e;
}

.rate-val {
  font-family: var(--font-heading);
  font-weight: 700;
  font-size: 1rem;
  color: var(--green-dark) !important;
}

.trend-badge {
  display: inline-block;
  padding: 4px 12px;
  border-radius: 100px;
  font-size: 0.78rem;
  font-weight: 700;
}

.trend-badge.up {
  background: #dcfce7;
  color: #16a34a;
}
.trend-badge.down {
  background: #fee2e2;
  color: #dc2626;
}
.trend-badge.stable {
  background: #f1f5f9;
  color: #64748b;
}

.btn-sell {
  display: inline-flex;
  align-items: center;
  padding: 7px 16px;
  background: linear-gradient(135deg, var(--green), var(--green-dark));
  color: var(--white);
  border-radius: 100px;
  font-size: 0.8rem;
  font-weight: 700;
  transition: var(--transition);
  white-space: nowrap;
}

.btn-sell:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(34, 197, 94, 0.4);
}

.rate-disclaimer {
  margin-top: 20px;
  padding: 16px 20px;
  background: #fefce8;
  border: 1px solid #fde047;
  border-radius: var(--radius-sm);
  font-size: 0.88rem;
  color: #713f12;
  display: flex;
  align-items: flex-start;
  gap: 10px;
}

.rate-disclaimer i {
  color: #ca8a04;
  margin-top: 2px;
  flex-shrink: 0;
}

/* ---- Factors Section ---- */
.factors-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 28px;
}

.factor-card {
  padding: 32px 28px;
  border-radius: var(--radius);
  transition: var(--transition);
}

.factor-card:hover {
  transform: translateY(-6px);
  box-shadow: var(--shadow-lg);
}

.factor-icon {
  width: 52px;
  height: 52px;
  background: linear-gradient(
    135deg,
    var(--green-light),
    rgba(34, 197, 94, 0.2)
  );
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.3rem;
  color: var(--green-dark);
  margin-bottom: 18px;
}

.factor-card h3 {
  font-family: var(--font-heading);
  font-size: 1.05rem;
  font-weight: 700;
  margin-bottom: 10px;
}

.factor-card p {
  color: var(--gray);
  font-size: 0.9rem;
  line-height: 1.6;
}

/* ---- FAQ ---- */
.faq-list {
  max-width: 820px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.faq-item {
  background: var(--white);
  border: 1px solid var(--gray-light);
  border-radius: var(--radius);
  overflow: hidden;
  transition: box-shadow 0.3s;
}

.faq-item.open {
  border-color: var(--green-light);
  box-shadow: 0 4px 20px rgba(34, 197, 94, 0.1);
}

.faq-question {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 20px 24px;
  font-family: var(--font-heading);
  font-size: 1rem;
  font-weight: 600;
  color: var(--charcoal);
  text-align: left;
  background: none;
  border: none;
  cursor: pointer;
  transition: color 0.3s;
}

.faq-question:hover {
  color: var(--green-dark);
}

.faq-item.open .faq-question {
  color: var(--green-dark);
}

.faq-arrow {
  font-size: 0.9rem;
  color: var(--green);
  transition: transform 0.35s ease;
  flex-shrink: 0;
}

.faq-item.open .faq-arrow {
  transform: rotate(180deg);
}

.faq-answer {
  max-height: 0;
  overflow: hidden;
  transition:
    max-height 0.4s ease,
    padding 0.3s ease;
  padding: 0 24px;
}

.faq-item.open .faq-answer {
  max-height: 200px;
  padding: 0 24px 20px;
}

.faq-answer p {
  color: var(--gray);
  font-size: 0.92rem;
  line-height: 1.7;
}

/* ---- Responsive ---- */
@media (max-width: 1024px) {
  .quick-rate-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  .factors-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 768px) {
  .quick-rate-grid {
    grid-template-columns: 1fr;
  }
  .factors-grid {
    grid-template-columns: 1fr;
  }
  .page-hero-meta {
    flex-direction: column;
    gap: 10px;
  }
  .rate-tabs {
    gap: 6px;
  }
  .rate-tab {
    padding: 10px 14px;
    font-size: 0.82rem;
  }
  .rate-table thead th,
  .rate-table tbody td {
    padding: 12px 14px;
    font-size: 0.82rem;
  }
  .rate-alert-inner a {
    margin-left: 0;
  }
}

/* @media (max-width: 540px) {
  .rate-table {
    display: block;
    overflow-x: auto;
  }
  .rate-tabs {
    overflow-x: auto;
    flex-wrap: nowrap;
    padding-bottom: 4px;
  }
} */

@media (max-width: 540px) {

  .rate-table-wrap{
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
  }

  .rate-table{
    min-width: 700px;
  }

  .rate-tabs{
    overflow-x: auto;
    flex-wrap: nowrap;
    padding-bottom: 4px;
    scrollbar-width: none;
  }

  .rate-tabs::-webkit-scrollbar{
    display: none;
  }

  .rate-tab{
    flex-shrink: 0;
  }
}









@media (max-width: 768px) {

  .page-hero{
      min-height: auto;
      padding-top: 68px;
  }

  .page-hero-content{
      padding: 60px 20px !important;
  }

  .page-hero-content h1{
      font-size: 2.2rem;
      line-height: 1.15;
      margin-bottom: 16px;
  }

  .page-hero-content p{
      font-size: 1rem;
      max-width: 100%;
      margin-bottom: 20px;
  }

  .page-hero-meta{
      display:flex;
      flex-direction:column;
      gap:12px;
  }

  .page-hero-meta span{
      width:100%;
      justify-content:flex-start;
  }

  .page-hero-badge{
      margin-bottom:16px;
  }
}