/* ==========================================================================
   RESPONSIVE.CSS — CoinSpent Full Responsive Overrides
   Covers: Mobile (320px+), iPhone SE/12/14/Plus, iPad/Tablet, Desktop
   Applies to ALL pages: index, sell, buy, rates, how-it-works, support,
   register, login, dashboard, admin-*
   ========================================================================== */

/* --------------------------------------------------------------------------
   GLOBAL BASE FIXES (all screen sizes)
   -------------------------------------------------------------------------- */
*, *::before, *::after {
  box-sizing: border-box;
}

html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  scroll-behavior: smooth;
}

body {
  overflow-x: hidden;
  min-width: 320px;
}

img, svg, video {
  max-width: 100%;
  height: auto;
}

input, select, textarea, button {
  font-size: max(16px, 1em); /* prevents iOS zoom on focus */
  -webkit-appearance: none;
  appearance: none;
}

/* Safe area for iPhone notch/home indicator */
.site-header {
  padding-left: env(safe-area-inset-left);
  padding-right: env(safe-area-inset-right);
}

.site-footer {
  padding-bottom: calc(2rem + env(safe-area-inset-bottom));
}

.mobile-nav-overlay {
  padding-left: env(safe-area-inset-left);
  padding-right: env(safe-area-inset-right);
  padding-bottom: env(safe-area-inset-bottom);
}

/* --------------------------------------------------------------------------
   TABLET — max-width: 1024px
   -------------------------------------------------------------------------- */
@media (max-width: 1024px) {

  /* === HEADER === */
  .header-inner {
    gap: 1.5rem;
    height: 68px;
  }

  .main-nav ul {
    gap: 1.2rem;
  }

  .nav-link {
    font-size: 0.88rem;
  }

  .logo-tagline {
    display: none;
  }

  .lang-selector {
    display: none; /* hide lang on tablet to save space */
  }

  /* === HERO === */
  .hero {
    padding: 3rem 0 4rem;
  }

  .hero-inner {
    grid-template-columns: 1fr;
    gap: 2rem;
    text-align: center;
  }

  .hero-badge,
  .hero-trust-badges {
    justify-content: center;
  }

  .hero-subtitle {
    margin: 0 auto 2rem;
    max-width: 100%;
  }

  .hero-illustration {
    display: none;
  }

  .hero-widget-wrap {
    max-width: 480px;
    margin: 0 auto;
    width: 100%;
  }

  .hero-title {
    font-size: 2.8rem;
  }

  /* === WHY SECTION === */
  .why-grid {
    grid-template-columns: 1fr;
    gap: 2.5rem;
  }

  .why-features-grid {
    grid-template-columns: 1fr 1fr;
  }

  /* === HOW STEPS === */
  .how-steps {
    grid-template-columns: repeat(2, 1fr);
    gap: 2rem;
  }

  .step-connector {
    display: none;
  }

  /* === BANNER === */
  .banner-content {
    flex-direction: column;
    text-align: center;
    padding: 3rem 2rem;
    gap: 2.5rem;
  }

  .banner-left {
    max-width: 100%;
  }

  .banner-stats {
    flex-wrap: wrap;
    justify-content: center;
    gap: 2rem;
  }

  .banner-globe {
    display: none;
  }

  /* === TESTIMONIALS === */
  .testimonials-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  /* === CTA === */
  .cta-inner {
    grid-template-columns: 1fr;
    gap: 2.5rem;
    padding: 2.5rem;
  }

  /* === FOOTER === */
  .footer-top {
    grid-template-columns: 1fr;
    gap: 2.5rem;
  }

  .footer-links {
    grid-template-columns: repeat(2, 1fr);
  }

  /* === INNER PAGES (buy, sell, rates, how-it-works) === */
  .order-container {
    grid-template-columns: 1fr;
  }

  /* === REGISTER / LOGIN === */
  .login-container {
    flex-direction: column;
    padding: 16px;
    gap: 16px;
  }

  .login-left {
    padding: 40px 32px;
    min-height: 280px;
  }

  .login-left h1 {
    font-size: 2.5rem;
  }

  .login-stats {
    gap: 24px;
    padding: 20px 24px;
  }

  /* === DASHBOARD === */
  .sidebar {
    width: 60px;
    overflow: hidden;
  }

  .sb-logo-name,
  .sb-logo-tag,
  .sb-refer-text,
  .nav-item span {
    display: none;
  }

  .nav-item {
    justify-content: center;
    padding: 12px;
  }

  .nav-dropdown .left span,
  .nav-dropdown svg.chevron-down {
    display: none;
  }

  .main {
    margin-left: 60px;
  }

  .stats-row {
    grid-template-columns: repeat(2, 1fr);
  }

  /* === ADMIN === */
  .admin-sidebar {
    width: 200px;
  }
}

/* --------------------------------------------------------------------------
   MOBILE — max-width: 768px
   -------------------------------------------------------------------------- */
@media (max-width: 768px) {

  /* === HEADER === */
  .main-nav {
    display: none;
  }

  .btn-login,
  .btn-signup {
    display: none;
  }

  .lang-selector,
  .country-selector {
    display: none;
  }

  #header-auth-area {
    display: none !important;
  }

  .hamburger {
    display: flex !important;
  }

  .header-inner {
    height: 60px;
    gap: 0;
  }

  .logo-name {
    font-size: 1.1rem;
  }

  /* Mobile nav overlay */
  .mobile-nav-overlay {
    top: 60px;
    height: calc(100vh - 60px);
    padding: 1.5rem 1.25rem;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
  }

  .mobile-nav ul {
    gap: 1rem;
  }

  .mobile-nav a {
    font-size: 1.1rem;
    padding: 0.5rem 0;
    display: block;
  }

  .mobile-nav-ctas {
    margin-top: 1rem;
  }

  .mobile-nav-ctas .btn-login,
  .mobile-nav-ctas .btn-signup {
    display: flex !important;
    justify-content: center;
    padding: 0.875rem 1rem;
    font-size: 1rem;
    border-radius: 10px;
    text-align: center;
  }

  .mobile-nav-ctas .btn-login {
    border: 1.5px solid #e2e8f0;
    color: #2563eb;
    background: transparent;
  }

  .mobile-nav-ctas .btn-signup {
    background: #fbbf24;
    color: #0f172a;
  }

  /* === HERO === */
  .hero {
    padding: 2rem 0 3rem;
  }

  .hero-title {
    font-size: 2.2rem;
    letter-spacing: -0.01em;
  }

  .hero-subtitle {
    font-size: 1rem;
  }

  .hero-trust-badges {
    gap: 1rem;
    justify-content: center;
  }

  .trust-badge {
    font-size: 0.8rem;
    gap: 0.5rem;
  }

  .trust-icon {
    width: 34px;
    height: 34px;
  }

  /* === CONVERSION WIDGET === */
  .conversion-widget {
    max-width: 100%;
    border-radius: 16px;
  }

  .widget-tab {
    font-size: 0.9rem;
    padding: 1rem 0.75rem;
  }

  .widget-panel {
    padding: 1.25rem 1rem;
  }

  .widget-step {
    padding: 1rem;
    border-radius: 12px;
  }

  .widget-amount-input,
  .receive-amount-big {
    font-size: 1.6rem;
  }

  .coin-select-btn,
  .currency-select-btn {
    padding: 0.4rem 0.6rem;
    font-size: 0.9rem;
  }

  .rate-info-row {
    flex-direction: column;
    align-items: flex-start;
    gap: 0.5rem;
  }

  .fee-info-row {
    flex-wrap: wrap;
    gap: 0.35rem;
  }

  .widget-cta-btn {
    font-size: 1rem;
    padding: 0.875rem;
  }

  .wallet-input {
    font-size: 0.9rem;
  }

  /* === SECTION GLOBALS === */
  section {
    padding: 3rem 0;
  }

  .section-title {
    font-size: 2rem;
  }

  .section-body,
  .section-body-center {
    font-size: 1rem;
  }

  .section-header-row {
    flex-direction: column;
    align-items: flex-start;
    gap: 1rem;
    margin-bottom: 2rem;
  }

  .view-all-link {
    font-size: 0.9rem;
  }

  /* === WHY CoinSpent === */
  .why-features-grid {
    grid-template-columns: 1fr;
    gap: 1rem;
  }

  .why-card {
    padding: 1.25rem;
  }

  .why-card-icon {
    width: 40px;
    height: 40px;
  }

  .user-count {
    margin-top: 1.5rem;
  }

  /* === HOW IT WORKS === */
  .how-tabs {
    flex-direction: column;
    gap: 0.75rem;
    align-items: stretch;
    margin-bottom: 2rem;
  }

  .how-tab {
    padding: 0.875rem 1rem;
    font-size: 0.95rem;
    border-radius: 12px;
    text-align: center;
  }

  .how-steps {
    grid-template-columns: 1fr;
    gap: 1.5rem;
  }

  .step-connector {
    display: none;
  }

  .step-card {
    padding: 1.5rem 1.25rem;
  }

  /* === ASSETS GRID === */
  .assets-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 1rem;
  }

  .asset-card {
    padding: 1.25rem 1rem;
  }

  /* === PAYMENTS GRID === */
  .payments-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 1rem;
  }

  .payment-card {
    padding: 1.25rem 1rem;
  }

  /* === GLOBAL BANNER === */
  .global-banner {
    margin: 2rem 0;
  }

  .banner-content {
    border-radius: 16px;
    padding: 2.5rem 1.5rem;
    flex-direction: column;
    gap: 2rem;
    text-align: center;
  }

  .banner-title {
    font-size: 2rem;
  }

  .banner-subtitle {
    font-size: 1rem;
  }

  .banner-tagline {
    font-size: 1.5rem;
  }

  .banner-stats {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1.5rem;
    width: 100%;
  }

  .stat-val {
    font-size: 1.6rem;
  }

  /* === TESTIMONIALS === */
  .testimonials-grid {
    grid-template-columns: 1fr;
    gap: 1.25rem;
  }

  .testimonial-card {
    padding: 1.5rem;
  }

  /* === CTA SECTION === */
  .cta-inner {
    grid-template-columns: 1fr;
    padding: 2rem 1.5rem;
    gap: 2rem;
    border-radius: 16px;
  }

  .cta-title {
    font-size: 2rem;
  }

  .cta-body {
    font-size: 1rem;
  }

  .cta-actions {
    flex-direction: column;
    gap: 0.75rem;
  }

  .btn-cta-primary,
  .btn-cta-secondary {
    width: 100%;
    justify-content: center;
    text-align: center;
    padding: 0.875rem 1rem;
  }

  /* === FOOTER === */
  .footer-top {
    grid-template-columns: 1fr;
    gap: 2rem;
  }

  .footer-links {
    grid-template-columns: repeat(2, 1fr);
    gap: 1.5rem;
  }

  .footer-bottom {
    flex-direction: column;
    gap: 0.75rem;
    text-align: center;
  }

  .footer-bottom-links {
    flex-wrap: wrap;
    justify-content: center;
    gap: 1rem;
  }

  /* === INNER PAGES (sell.html, buy.html) === */
  .inner-page {
    padding: 2rem 0;
  }

  .page-title {
    font-size: 2rem;
  }

  .page-subtitle {
    font-size: 1rem;
  }

  .order-container {
    grid-template-columns: 1fr;
    gap: 1.25rem;
  }

  .order-form-card {
    padding: 1.5rem;
    border-radius: 12px;
  }

  .form-title {
    font-size: 1.1rem;
  }

  /* === RATES PAGE === */
  .rates-table-container {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    border-radius: 12px;
  }

  .rates-table th,
  .rates-table td {
    padding: 0.875rem 1rem;
    font-size: 0.85rem;
  }

  .rates-table .btn-primary-outline,
  .rates-table .btn-secondary-outline {
    padding: 0.35rem 0.75rem;
    font-size: 0.8rem;
  }

  /* === SUPPORT PAGE === */
  .hero-support {
    padding: 40px 20px 80px !important;
  }

  .hero-inner {
    flex-direction: column !important;
    gap: 2rem;
  }

  .hs-left {
    padding-right: 0 !important;
  }

  .hs-left h1 {
    font-size: 2.2rem !important;
  }

  .hs-right {
    display: none !important;
  }

  .hs-search input {
    padding: 14px 14px 14px 46px !important;
    font-size: 1rem !important;
  }

  .hs-search button {
    padding: 0 18px !important;
    font-size: 0.9rem !important;
  }

  /* === REGISTER / LOGIN === */
  .login-container {
    flex-direction: column !important;
    padding: 12px !important;
    gap: 12px !important;
    min-height: unset !important;
  }

  .login-left {
    padding: 28px 24px !important;
    border-radius: 16px !important;
    min-height: unset !important;
  }

  .login-left h1 {
    font-size: 2rem !important;
  }

  .login-left p.desc {
    font-size: 1rem !important;
    margin-bottom: 24px !important;
  }

  .login-stats {
    display: none !important;
  }

  .features {
    gap: 16px !important;
  }

  .feat-item {
    gap: 12px !important;
  }

  .login-right {
    padding: 28px 20px !important;
    border-radius: 16px !important;
  }

  /* auth card (login.html) */
  .auth-card {
    padding: 2rem 1.5rem;
    border-radius: 12px;
  }

  .auth-container {
    max-width: 100%;
    padding: 0 1rem;
  }

  /* === DASHBOARD === */
  .sidebar {
    display: none !important;
  }

  .main {
    margin-left: 0 !important;
  }

  .topbar {
    padding: 0 14px;
    height: 52px;
    gap: 10px;
  }

  .tb-name,
  .tb-status {
    display: none;
  }

  .content {
    flex-direction: column;
  }

  .content-right {
    width: 100% !important;
    border-left: none !important;
    border-top: 1px solid var(--border, #e5e7eb);
  }

  .content-main {
    padding: 14px;
  }

  .stats-row {
    grid-template-columns: repeat(2, 1fr);
    gap: 10px;
  }

  .quick-cards {
    grid-template-columns: 1fr;
    gap: 10px;
  }

  .hero {
    padding: 20px 18px !important;
    border-radius: 12px !important;
  }

  .hero h1 {
    font-size: 1.3rem !important;
    max-width: 100% !important;
  }

  .hero-coins {
    display: none !important;
  }

  .hero-btns {
    flex-direction: column;
    gap: 8px;
  }

  .hero-btns .btn-yellow,
  .hero-btns .btn-outline {
    text-align: center;
    justify-content: center;
    width: 100%;
  }

  .rates-wrap {
    gap: 8px;
  }

  .rate-chip {
    padding: 8px 12px;
  }

  .table-responsive {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
  }

  .dashboard-table th,
  .dashboard-table td {
    padding: 0.875rem 1rem;
    font-size: 0.8rem;
    white-space: nowrap;
  }

  /* === ADMIN PAGES === */
  .admin-layout {
    flex-direction: column;
  }

  .admin-sidebar {
    width: 100% !important;
    height: auto;
    flex-direction: row;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
  }

  .admin-sidebar-header {
    white-space: nowrap;
    flex-shrink: 0;
    padding: 1rem;
  }

  .admin-sidebar-nav {
    display: flex;
    flex-direction: row;
    padding: 0.5rem 0;
    gap: 0;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
  }

  .admin-nav-item {
    white-space: nowrap;
    padding: 0.75rem 1rem;
    font-size: 0.82rem;
    flex-shrink: 0;
  }

  .admin-sidebar-footer {
    display: none;
  }

  .admin-main {
    flex: 1;
  }

  .admin-header {
    flex-direction: column;
    align-items: flex-start;
    gap: 0.5rem;
    padding: 1rem;
  }

  .admin-content {
    padding: 1rem;
  }

  .admin-stats-grid {
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
  }

  .admin-table th,
  .admin-table td {
    padding: 0.75rem 0.875rem;
    font-size: 0.82rem;
  }

  .admin-panel-section {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
  }
}

/* --------------------------------------------------------------------------
   SMALL MOBILE — max-width: 480px
   -------------------------------------------------------------------------- */
@media (max-width: 480px) {

  /* === HEADER === */
  .header-inner {
    padding: 0 1rem;
    height: 56px;
  }

  .logo-name {
    font-size: 1rem;
  }

  /* === HERO === */
  .hero-title {
    font-size: 1.9rem;
    line-height: 1.15;
  }

  .hero-badge {
    font-size: 0.7rem;
  }

  .hero-trust-badges {
    gap: 0.75rem;
  }

  .trust-badge {
    font-size: 0.75rem;
  }

  .trust-badge span {
    line-height: 1.2;
  }

  /* === WIDGET === */
  .widget-amount-input,
  .receive-amount-big {
    font-size: 1.4rem;
  }

  .widget-tabs {
    border-radius: 0;
  }

  .widget-tab {
    font-size: 0.85rem;
    padding: 0.875rem 0.5rem;
    gap: 0.35rem;
  }

  .widget-panel {
    padding: 1rem 0.875rem;
  }

  .coin-select-btn,
  .currency-select-btn {
    font-size: 0.82rem;
    padding: 0.35rem 0.5rem;
  }

  .network-pills {
    gap: 0.35rem;
  }

  .network-pill {
    padding: 0.2rem 0.5rem;
    font-size: 0.7rem;
  }

  .rate-badge {
    font-size: 0.72rem;
  }

  .widget-cta-btn {
    font-size: 0.95rem;
    padding: 0.8rem;
  }

  .widget-note {
    font-size: 0.7rem;
  }

  /* === SECTIONS === */
  section {
    padding: 2.5rem 0;
  }

  .container {
    padding: 0 1rem;
  }

  .section-title {
    font-size: 1.75rem;
  }

  /* === WHY CARDS === */
  .why-card {
    flex-direction: column;
    gap: 0.75rem;
  }

  /* === HOW TABS === */
  .how-tab {
    font-size: 0.88rem;
    padding: 0.75rem;
  }

  /* === ASSETS === */
  .assets-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 0.75rem;
  }

  .asset-card {
    padding: 1rem 0.75rem;
  }

  .asset-icon-wrap {
    width: 40px;
    height: 40px;
  }

  /* === PAYMENTS === */
  .payments-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 0.75rem;
  }

  .payment-card {
    padding: 1rem 0.75rem;
  }

  /* === BANNER === */
  .banner-stats {
    grid-template-columns: repeat(2, 1fr);
    gap: 1rem;
  }

  .banner-title {
    font-size: 1.75rem;
  }

  .stat-val {
    font-size: 1.4rem;
  }

  /* === TESTIMONIALS === */
  .testimonial-card {
    padding: 1.25rem 1rem;
  }

  .testimonial-card p {
    font-size: 0.9rem;
  }

  /* === CTA === */
  .cta-inner {
    padding: 1.5rem 1rem;
  }

  .cta-title {
    font-size: 1.75rem;
  }

  /* === FOOTER === */
  .footer-links {
    grid-template-columns: 1fr 1fr;
    gap: 1.25rem;
  }

  .footer-col h4 {
    font-size: 0.9rem;
    margin-bottom: 1rem;
  }

  .footer-col a,
  .footer-col ul {
    font-size: 0.85rem;
  }

  /* === INNER PAGES === */
  .page-title {
    font-size: 1.75rem;
  }

  .order-form-card {
    padding: 1.25rem 1rem;
  }

  .form-control {
    font-size: 1rem; /* prevent iOS zoom */
  }

  .receive-highlight {
    font-size: 1.6rem;
  }

  /* === RATES PAGE === */
  .rates-table th,
  .rates-table td {
    font-size: 0.8rem;
    padding: 0.75rem 0.75rem;
  }

  /* === SUPPORT PAGE === */
  .hs-left h1 {
    font-size: 1.9rem !important;
  }

  .hs-search input {
    padding: 12px 12px 12px 40px !important;
    font-size: 0.95rem !important;
    border-radius: 12px !important;
  }

  .hs-search button {
    font-size: 0.85rem !important;
    padding: 0 12px !important;
  }

  .hs-tags {
    gap: 8px !important;
  }

  .hs-tag {
    font-size: 0.75rem !important;
    padding: 5px 10px !important;
  }

  /* === REGISTER === */
  .login-left h1 {
    font-size: 1.75rem !important;
  }

  .login-left {
    padding: 20px 16px !important;
  }

  .login-left p.desc {
    font-size: 0.95rem !important;
  }

  .features {
    gap: 12px !important;
  }

  .feat-icon {
    width: 36px !important;
    height: 36px !important;
  }

  .feat-text h4 {
    font-size: 0.9rem !important;
  }

  .feat-text p {
    font-size: 0.8rem !important;
  }

  /* === AUTH === */
  .auth-card {
    padding: 1.5rem 1rem;
  }

  /* === DASHBOARD === */
  .stats-row {
    grid-template-columns: 1fr 1fr;
    gap: 8px;
  }

  .sc-val {
    font-size: 1.15rem;
  }

  .sc-label {
    font-size: 0.68rem;
  }

  /* === ADMIN === */
  .admin-stats-grid {
    grid-template-columns: 1fr;
  }

  .admin-content {
    padding: 0.875rem;
  }
}

/* --------------------------------------------------------------------------
   EXTRA SMALL — max-width: 375px (iPhone SE, older iPhones)
   -------------------------------------------------------------------------- */
@media (max-width: 375px) {

  .hero-title {
    font-size: 1.7rem;
  }

  .hero-subtitle {
    font-size: 0.95rem;
  }

  .hero-trust-badges {
    flex-wrap: wrap;
    gap: 0.6rem;
  }

  .trust-badge {
    font-size: 0.72rem;
    gap: 0.4rem;
  }

  .widget-amount-input,
  .receive-amount-big {
    font-size: 1.25rem;
  }

  .widget-tab {
    font-size: 0.8rem;
    padding: 0.75rem 0.35rem;
  }

  .coin-select-btn span,
  .currency-select-btn span {
    font-size: 0.78rem;
  }

  .section-title {
    font-size: 1.6rem;
  }

  .banner-title {
    font-size: 1.6rem;
  }

  .cta-title {
    font-size: 1.6rem;
  }

  .assets-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .payments-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .banner-stats {
    grid-template-columns: 1fr 1fr;
  }

  .footer-links {
    grid-template-columns: 1fr 1fr;
  }

  .how-tab {
    font-size: 0.82rem;
  }
}

/* --------------------------------------------------------------------------
   LANDSCAPE MOBILE — max-height: 500px + max-width: 900px
   (Handles iPhone horizontal orientation)
   -------------------------------------------------------------------------- */
@media (max-height: 500px) and (max-width: 900px) and (orientation: landscape) {

  .hero {
    padding: 1.5rem 0 2rem;
  }

  .hero-title {
    font-size: 1.8rem;
  }

  .mobile-nav-overlay {
    top: 56px;
    height: calc(100vh - 56px);
    overflow-y: auto;
  }

  .hero-trust-badges {
    gap: 0.75rem;
  }

  .conversion-widget {
    max-height: 90vh;
    overflow-y: auto;
  }
}

/* --------------------------------------------------------------------------
   LARGE TABLET / SMALL DESKTOP — 769px to 1024px
   -------------------------------------------------------------------------- */
@media (min-width: 769px) and (max-width: 1024px) {

  /* Re-show nav on tablet */
  .main-nav {
    display: block;
  }

  .main-nav ul {
    gap: 1rem;
  }

  .btn-login,
  .btn-signup {
    display: inline-flex;
    font-size: 0.85rem;
    padding: 0.5rem 0.875rem;
  }

  .hamburger {
    display: none !important;
  }

  .country-selector {
    display: flex;
  }
}

/* --------------------------------------------------------------------------
   SPECIFIC PAGE FIXES
   -------------------------------------------------------------------------- */

/* ---- HOW-IT-WORKS PAGE ---- */
@media (max-width: 768px) {
  /* how-it-works.html may have extra inline styles */
  .hiw-header,
  .hiw-hero {
    padding: 40px 20px !important;
    text-align: center;
  }

  .hiw-steps-grid {
    grid-template-columns: 1fr !important;
    gap: 1.5rem !important;
  }

  .hiw-step-number {
    font-size: 2rem;
  }

  /* Payments section in how-it-works */
  .payments-methods-grid {
    grid-template-columns: repeat(2, 1fr) !important;
  }

  .faq-item {
    padding: 1rem !important;
  }

  .faq-q {
    font-size: 1rem !important;
  }
}

/* ---- SELL.HTML & BUY.HTML ---- */
@media (max-width: 768px) {
  /* Address any inline-styled progress bars, step indicators */
  .progress-steps {
    flex-direction: column;
    gap: 0.5rem;
  }

  .progress-step {
    font-size: 0.82rem;
  }

  /* Countdown timer row */
  .countdown-row {
    flex-direction: column;
    align-items: flex-start;
    gap: 0.5rem;
  }

  /* wallet address display in sell/buy confirmation */
  .wallet-display {
    word-break: break-all;
    font-size: 0.8rem;
  }

  /* Network selection pill group */
  .network-pills {
    flex-wrap: wrap;
  }

  /* coin dropdown always close to viewport */
  .coin-dropdown {
    right: 0;
    left: auto;
    min-width: 180px;
  }
}

/* ---- RATES.HTML ---- */
@media (max-width: 768px) {
  /* Rates page filter row */
  .rates-filter-row {
    flex-direction: column;
    gap: 0.75rem;
  }

  .rates-search-input {
    width: 100%;
    font-size: 1rem;
  }
}

/* ---- SUPPORT.HTML ---- */
@media (max-width: 768px) {
  /* FAQ accordion */
  .faq-list {
    gap: 0.75rem;
  }

  .faq-question {
    padding: 1rem !important;
    font-size: 0.95rem !important;
  }

  .faq-answer {
    padding: 0 1rem 1rem !important;
    font-size: 0.9rem !important;
  }

  /* Contact card grid */
  .contact-grid,
  .support-cards-grid,
  .support-grid {
    grid-template-columns: 1fr !important;
    gap: 1rem !important;
  }

  /* Support categories */
  .categories-grid {
    grid-template-columns: repeat(2, 1fr) !important;
    gap: 0.75rem !important;
  }
}

@media (max-width: 480px) {
  .categories-grid {
    grid-template-columns: 1fr !important;
  }
}

/* ---- DASHBOARD.HTML ---- */
@media (max-width: 768px) {

  /* Dashboard mobile top nav hamburger */
  .dash-mobile-nav-btn {
    display: flex !important;
  }

  /* Transaction table: allowed to scroll horizontally */

  /* Right sidebar becomes bottom panel */
  .content-right {
    border-radius: 0;
    max-height: 50vh;
    overflow-y: auto;
  }

  /* Rate chips wrap nicely */
  .rates-wrap {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    flex-wrap: nowrap;
    padding-bottom: 6px;
  }

  .rate-chip {
    flex-shrink: 0;
  }
}

/* ---- ADMIN PAGES ---- */
@media (max-width: 768px) {

  /* Admin login page */
  body.admin-login-body {
    align-items: flex-start;
    padding-top: 2rem;
  }

  .admin-auth-card {
    padding: 2rem 1.25rem;
    border-radius: 12px;
  }

  /* Admin dashboard table action columns */
  .admin-table td:last-child,
  .admin-table th:last-child {
    position: sticky;
    right: 0;
    background: white;
    box-shadow: -4px 0 8px rgba(0,0,0,0.05);
  }

  /* Admin wallets / countries / rates forms */
  .admin-form-row {
    flex-direction: column !important;
    gap: 1rem;
  }

  .admin-form-col {
    width: 100% !important;
  }
}

/* --------------------------------------------------------------------------
   UTILITY OVERRIDES FOR INLINE-STYLED ELEMENTS
   These override common inline styles found throughout the HTML pages
   -------------------------------------------------------------------------- */
@media (max-width: 768px) {

  /* Header inline styles override */
  .header-inner[style] {
    max-width: 100% !important;
  }

  /* Country / lang selectors in header */
  [class="country-selector"][style],
  [class="lang-selector"][style] {
    display: none !important;
  }

  /* Hero section inline max-width containers */
  .hero-inner[style] {
    max-width: 100% !important;
  }

  /* Support hero inner */
  .hero-inner.support-inner {
    flex-direction: column !important;
  }

  /* Register page left side bg block */
  .login-left[style] {
    padding: 24px !important;
  }

  /* Banner content inline padding */
  .banner-content[style] {
    padding: 2rem 1.25rem !important;
  }
}

/* --------------------------------------------------------------------------
   PRINT
   -------------------------------------------------------------------------- */
@media print {
  .site-header,
  .hamburger,
  .mobile-nav-overlay,
  .sidebar,
  .topbar,
  .admin-sidebar,
  .cta-section,
  .rates-ticker,
  .hero-illustration {
    display: none !important;
  }

  body {
    font-size: 12pt;
  }

  .container {
    max-width: 100%;
  }
}

