/* ==========================================================================
   Gold Bottom Ent. LLC — Responsive
   All media queries consolidated: 1024px, 768px, 480px
   ========================================================================== */

/* =============================================
   Large Tablets / Small Desktops: max-width 1024px
   ============================================= */

@media (max-width: 1024px) {

  /* --- Dashboard Sidebar: overlay mode --- */
  .dashboard-sidebar {
    transform: translateX(-100%);
    z-index: var(--z-overlay);
    box-shadow: var(--shadow-xl);
  }

  .dashboard-sidebar.mobile-open {
    transform: translateX(0);
  }

  .sidebar-backdrop {
    display: none;
    position: fixed;
    inset: 0;
    z-index: calc(var(--z-overlay) - 1);
    background: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
  }

  .sidebar-backdrop.active {
    display: block;
  }

  /* Reset main wrapper margin */
  .dashboard-main-wrapper {
    margin-left: 0;
  }

  .dashboard-topbar {
    left: 0;
  }

  /* Show mobile sidebar toggle in topbar */
  .sidebar-mobile-toggle {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border: none;
    background: none;
    color: var(--color-text-secondary);
    font-size: var(--text-lg);
    cursor: pointer;
    border-radius: var(--radius-sm);
    transition: color var(--transition-fast), background var(--transition-fast);
  }

  .sidebar-mobile-toggle:hover {
    color: var(--color-text);
    background: var(--color-bg-tertiary);
  }

  /* --- Grids: 2 columns --- */
  .grid-3,
  .grid-4 {
    grid-template-columns: repeat(2, 1fr);
  }

  /* --- Dashboard layout grids --- */
  .dashboard-grid-wide-narrow,
  .dashboard-grid-narrow-wide {
    grid-template-columns: 1fr;
  }

  /* --- Pipeline: scroll horizontally --- */
  .pipeline {
    padding-bottom: var(--space-md);
  }

  .pipeline-column {
    flex: 0 0 260px;
  }

  /* --- Hero adjustments --- */
  .hero-corporate {
    min-height: 80vh;
  }

  .hero-title {
    font-size: var(--text-4xl);
  }

  .hero-split {
    grid-template-columns: 1fr;
    text-align: center;
    min-height: auto;
    padding: calc(var(--header-height) + var(--space-2xl)) var(--space-lg) var(--space-2xl);
  }

  .hero-split .hero-text {
    text-align: center;
  }

  .hero-split .hero-text .hero-subtitle {
    margin-left: auto;
    margin-right: auto;
  }

  .hero-split .hero-actions {
    justify-content: center;
  }

  .hero-split .hero-media {
    order: -1;
    max-width: 480px;
    margin: 0 auto;
  }

  /* --- Process timeline --- */
  .process-step-number {
    width: 40px;
    height: 40px;
    font-size: var(--text-base);
  }

  .process-timeline {
    padding-left: var(--space-2xl);
  }

  .process-timeline::before {
    left: 19px;
  }

  .process-step-number {
    left: calc(-1 * var(--space-2xl));
  }

  /* --- Trust bar --- */
  .trust-bar-logos {
    gap: var(--space-lg);
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    justify-content: flex-start;
    padding: 0 var(--space-md);
    flex-wrap: nowrap;
  }

  .trust-bar-logo {
    flex-shrink: 0;
  }

  /* --- Contact grid --- */
  .contact-grid {
    grid-template-columns: 1fr;
  }

  /* --- Footer --- */
  .public-footer-inner {
    grid-template-columns: 1fr 1fr;
    gap: var(--space-xl);
  }

  .footer-brand {
    grid-column: 1 / -1;
  }

  /* --- Commission calculator --- */
  .commission-input-group {
    grid-template-columns: 1fr;
  }

  /* --- Roadmap: shrink card max-width --- */
  .roadmap-card {
    max-width: 340px;
  }
}


/* --- Body scroll lock when mobile menus are open --- */
body.mobile-menu-open,
body.sidebar-mobile-open {
  overflow: hidden;
}

/* =============================================
   Tablets / Large Phones: max-width 768px
   ============================================= */

@media (max-width: 768px) {

  /* --- Public Header --- */
  .public-nav {
    display: none;
  }

  .mobile-menu-toggle {
    display: flex;
  }

  .header-actions .dashboard-btn {
    display: none;
  }

  /* --- Typography scale down --- */
  h1, .hero-title {
    font-size: var(--text-3xl);
  }

  h2, .page-title {
    font-size: var(--text-2xl);
  }

  h3 {
    font-size: var(--text-xl);
  }

  .hero-subtitle {
    font-size: var(--text-base);
  }

  /* --- Hero --- */
  .hero-section,
  .hero-corporate {
    min-height: 80vh;
    padding: calc(var(--header-height) + var(--space-2xl)) var(--space-md) var(--space-2xl);
  }

  /* Hide hero orbs on tablet — body orbs are sufficient */
  .hero-corporate .hero-orb {
    display: none;
  }

  .hero-compact {
    min-height: 30vh;
  }

  .hero-actions {
    flex-direction: column;
    align-items: stretch;
    gap: var(--space-sm);
  }

  .hero-scroll {
    display: none;
  }

  /* --- Hero split: stack --- */
  .hero-split {
    padding: calc(var(--header-height) + var(--space-2xl)) var(--space-md) var(--space-2xl);
    gap: var(--space-xl);
  }

  .hero-media-frame {
    width: 240px;
    height: 280px;
  }

  .hero-code-terminal {
    width: 100%;
    max-width: 360px;
  }

  .hero-floating-badges {
    display: none;
  }

  /* --- Testimonials: single column --- */
  .testimonials-grid {
    grid-template-columns: 1fr;
  }

  /* --- Process timeline: tighter --- */
  .process-timeline {
    padding-left: var(--space-2xl);
  }

  .process-step-number {
    width: 36px;
    height: 36px;
    font-size: var(--text-sm);
    left: calc(-1 * var(--space-2xl));
  }

  .process-timeline::before {
    left: 17px;
  }

  /* --- Grids: single column --- */
  .grid-2,
  .grid-3,
  .grid-4 {
    grid-template-columns: 1fr;
  }

  .dashboard-grid-2 {
    grid-template-columns: 1fr;
  }

  /* --- Section padding --- */
  .page-section {
    padding: var(--space-2xl) var(--space-md);
  }

  .page-section-lg {
    padding: var(--space-3xl) var(--space-md);
  }

  /* --- Metrics grid --- */
  .metrics-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .metric-value {
    font-size: var(--text-2xl);
  }

  /* --- Stats bar --- */
  .stats-bar {
    gap: var(--space-lg);
  }

  .stat-number {
    font-size: var(--text-3xl);
  }

  /* --- Quick actions --- */
  .quick-actions {
    grid-template-columns: repeat(2, 1fr);
  }

  /* --- Finance summary --- */
  .finance-summary {
    grid-template-columns: 1fr 1fr;
  }

  /* --- Dashboard page --- */
  .dashboard-page {
    padding: var(--space-md);
  }

  .dashboard-main {
    padding: var(--space-md);
  }

  .dashboard-page-header .page-heading {
    font-size: var(--text-xl);
  }

  /* --- Topbar --- */
  .topbar-search {
    display: none;
  }

  /* --- Cards --- */
  .card,
  .glass-card {
    padding: var(--space-md);
  }

  /* --- Modal --- */
  .modal-overlay {
    padding: var(--space-md);
    align-items: flex-end;
  }

  .modal-content {
    max-height: 90vh;
    border-radius: var(--radius-xl) var(--radius-xl) 0 0;
  }

  /* --- Tabs: scrollable --- */
  .tabs {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
  }

  .tabs::-webkit-scrollbar {
    display: none;
  }

  /* --- Filter bar: scrollable --- */
  .filter-bar {
    flex-wrap: nowrap;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    padding-bottom: var(--space-sm);
  }

  .filter-bar::-webkit-scrollbar {
    display: none;
  }

  /* --- Footer --- */
  .public-footer-inner {
    grid-template-columns: 1fr;
    gap: var(--space-lg);
  }

  .footer-brand {
    grid-column: auto;
  }

  .footer-bottom {
    flex-direction: column;
    gap: var(--space-md);
    text-align: center;
  }

  .footer-bottom .footer-legal-links {
    justify-content: center;
  }

  /* --- Toast container --- */
  .toast-container {
    left: var(--space-md);
    right: var(--space-md);
    max-width: none;
  }


  /* =============================================
     Responsive Table: thead hidden, td as cards
     ============================================= */

  .data-table-responsive thead {
    display: none;
  }

  .data-table-responsive tbody tr {
    display: block;
    background: var(--color-bg-secondary);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-lg);
    margin-bottom: var(--space-sm);
    padding: var(--space-md);
  }

  .data-table-responsive tbody tr:nth-child(even) {
    background: var(--color-bg-secondary);
  }

  .data-table-responsive tbody td {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: var(--space-xs) 0;
    border-bottom: 1px solid var(--color-border);
    font-size: var(--text-sm);
  }

  .data-table-responsive tbody td:last-child {
    border-bottom: none;
  }

  .data-table-responsive tbody td::before {
    content: attr(data-label);
    font-size: var(--text-xs);
    font-weight: var(--fw-semibold);
    color: var(--color-text-muted);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    flex-shrink: 0;
    margin-right: var(--space-md);
  }

  .data-table-responsive tbody td:first-child {
    font-weight: var(--fw-semibold);
    font-size: var(--text-base);
    padding-bottom: var(--space-sm);
    margin-bottom: var(--space-xs);
  }

  .data-table-responsive .data-table-actions {
    justify-content: flex-end;
    padding-top: var(--space-sm);
  }

  /* --- Table wrapper: remove border, cards handle it --- */
  .table-wrapper.responsive-cards {
    border: none;
    border-radius: 0;
    overflow: visible;
  }

  /* --- Timeline --- */
  .about-timeline::before {
    left: 12px;
  }

  .timeline-item {
    padding-left: 44px;
  }

  .timeline-item .timeline-dot {
    left: 4px;
    width: 16px;
    height: 16px;
  }

  /* --- Pipeline: vertical on mobile --- */
  .pipeline {
    flex-direction: column;
  }

  .pipeline-column {
    flex: none;
    width: 100%;
  }

  .pipeline-column-body {
    max-height: 300px;
  }

  /* --- Roadmap: linear single-column layout --- */
  .roadmap::before {
    left: 14px;
    transform: none;
  }

  .roadmap-stop {
    flex-direction: row !important;
    padding-left: 48px !important;
    padding-right: 0 !important;
  }

  .roadmap-stop:nth-child(odd) .roadmap-card,
  .roadmap-stop:nth-child(even) .roadmap-card {
    margin: 0;
    text-align: left;
    max-width: 100%;
  }

  .roadmap-stop:nth-child(odd) .roadmap-card h4 {
    justify-content: flex-start;
  }

  .roadmap-dot {
    left: 14px !important;
    width: 24px;
    height: 24px;
  }

  .roadmap-dot i {
    font-size: 9px;
  }

  .roadmap-stop::after {
    display: none;
  }

  .roadmap-marker-icon {
    width: 40px;
    height: 40px;
    font-size: var(--text-base);
  }

  /* --- Project tracking: stack --- */
  .project-tracking {
    grid-template-columns: 1fr;
  }
}


/* =============================================
   Small Phones: max-width 480px
   ============================================= */

@media (max-width: 480px) {

  /* --- Further text reductions --- */
  h1, .hero-title {
    font-size: var(--text-2xl);
  }

  h2, .page-title {
    font-size: var(--text-xl);
  }

  .hero-subtitle {
    font-size: var(--text-sm);
  }

  /* --- Hero split: compact --- */
  .hero-code-terminal {
    display: none;
  }

  .hero-media-frame {
    width: 200px;
    height: 240px;
  }

  .hero-media-frame .frame-icon {
    font-size: 4rem;
  }

  /* --- Premium CTA: compact --- */
  .cta-premium {
    padding: var(--space-2xl) var(--space-md);
  }

  .cta-premium .cta-actions {
    flex-direction: column;
  }

  .cta-premium .cta-actions .btn {
    width: 100%;
  }

  /* --- Metrics grid: single column --- */
  .metrics-grid {
    grid-template-columns: 1fr;
  }

  /* --- Finance summary: single column --- */
  .finance-summary {
    grid-template-columns: 1fr;
  }

  /* --- Quick actions: single column --- */
  .quick-actions {
    grid-template-columns: 1fr;
  }

  /* --- Buttons: full width --- */
  .btn-fullwidth-mobile {
    width: 100%;
    justify-content: center;
  }

  .hero-actions .btn {
    width: 100%;
    justify-content: center;
  }

  .cta-section .cta-actions {
    flex-direction: column;
  }

  .cta-section .cta-actions .btn {
    width: 100%;
  }

  /* --- Minimal padding --- */
  .container {
    padding: 0 var(--space-md);
  }

  .dashboard-page {
    padding: var(--space-sm);
  }

  .dashboard-main {
    padding: var(--space-sm);
  }

  .page-section {
    padding: var(--space-xl) var(--space-sm);
  }

  .card,
  .glass-card {
    padding: var(--space-sm);
    border-radius: var(--radius-md);
  }

  /* --- Header: tighter --- */
  .public-header-inner {
    padding: 0 var(--space-md);
  }

  .logo-link .logo-text {
    font-size: var(--text-base);
  }

  /* --- Section headers: stack --- */
  .section-header {
    flex-direction: column;
    align-items: flex-start;
  }

  .dashboard-page-header {
    flex-direction: column;
    align-items: flex-start;
  }

  /* --- Stats --- */
  .stats-bar {
    flex-direction: column;
    gap: var(--space-md);
  }

  .stat-number {
    font-size: var(--text-2xl);
  }

  /* --- Contact form --- */
  .contact-form {
    padding: var(--space-md);
  }

  .contact-info-item {
    padding: var(--space-md);
  }

  /* --- Form row: stack --- */
  .form-row {
    flex-direction: column;
  }

  /* --- Button group: stack --- */
  .btn-group.stack-mobile {
    flex-direction: column;
  }

  .btn-group.stack-mobile .btn {
    width: 100%;
  }

  /* --- Modal: full width --- */
  .modal-overlay {
    padding: 0;
  }

  .modal-content {
    max-width: 100%;
    max-height: 100vh;
    border-radius: 0;
    height: 100%;
  }

  .modal-content.modal-sm,
  .modal-content.modal-lg {
    max-width: 100%;
  }

  /* --- Metric card --- */
  .metric-card {
    padding: var(--space-md);
  }

  .metric-value {
    font-size: var(--text-xl);
  }

  /* --- Checklist --- */
  .checklist-section-header {
    flex-direction: column;
    align-items: flex-start;
    gap: var(--space-sm);
  }

  .checklist-item {
    padding: var(--space-sm) var(--space-md);
  }

  /* --- Integration cards: stack --- */
  .integration-card {
    flex-direction: column;
    text-align: center;
    gap: var(--space-sm);
  }

  .integration-actions {
    width: 100%;
  }

  .integration-actions .btn {
    width: 100%;
  }

  /* --- Topbar --- */
  .breadcrumb {
    display: none;
  }

  .dashboard-topbar {
    padding: 0 var(--space-md);
  }

  /* --- Sidebar footer user --- */
  .sidebar-user-name {
    font-size: var(--text-xs);
  }

  /* --- Legal content --- */
  .legal-content {
    padding: 0 var(--space-sm);
  }

  .legal-tabs {
    gap: 0;
  }

  .legal-tabs .legal-tab {
    padding: var(--space-sm) var(--space-sm);
    font-size: var(--text-xs);
  }

  /* --- Team / talent cards --- */
  .team-card-info {
    padding: var(--space-md);
  }

  .talent-card-info {
    padding: var(--space-sm);
  }

  /* --- Commission calculator --- */
  .commission-result {
    flex-direction: column;
    text-align: center;
    gap: var(--space-sm);
  }

  .commission-result-value {
    font-size: var(--text-xl);
  }

  /* --- Toast --- */
  .toast-container {
    top: auto;
    bottom: var(--space-md);
    left: var(--space-sm);
    right: var(--space-sm);
  }

  /* --- Roadmap: tighter spacing --- */
  .roadmap-stop {
    margin-bottom: var(--space-md);
    padding-left: 42px !important;
  }

  .roadmap::before {
    left: 12px;
  }

  .roadmap-dot {
    left: 12px !important;
    width: 20px;
    height: 20px;
    border-width: 2px;
  }

  .roadmap-dot i {
    font-size: 8px;
  }

  .roadmap-card {
    padding: var(--space-sm) var(--space-md);
  }

  .roadmap-card h4 {
    font-size: var(--text-sm);
  }

  .roadmap-card p {
    font-size: var(--text-xs);
  }

  .roadmap-marker-icon {
    width: 36px;
    height: 36px;
    font-size: var(--text-sm);
  }
}


/* =============================================
   Print Styles
   ============================================= */

@media print {
  .public-header,
  .public-footer,
  .dashboard-sidebar,
  .dashboard-topbar,
  .mobile-menu-toggle,
  .mobile-nav-overlay,
  .toast-container,
  .modal-overlay,
  .btn,
  .sidebar-backdrop {
    display: none !important;
  }

  body {
    background: #fff;
    color: #000;
    font-size: 12pt;
  }

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

  .public-main {
    padding-top: 0 !important;
  }

  .card,
  .glass-card,
  .metric-card {
    background: #fff;
    border: 1px solid #ccc;
    box-shadow: none;
    backdrop-filter: none;
  }

  a {
    color: #000;
    text-decoration: underline;
  }

  .hero-section,
  .hero-corporate {
    min-height: auto;
    padding: 2rem 0;
  }

  .hero-section::before,
  .hero-section::after,
  .hero-corporate::before,
  .hero-corporate::after,
  .hero-corporate .hero-orb,
  .bg-orbs {
    display: none;
  }

  /* --- Roadmap: print-friendly --- */
  .roadmap::before {
    background: #ccc;
  }

  .roadmap-dot {
    background: #fff;
    border-color: #999;
  }

  .roadmap-card {
    background: #fff;
    border: 1px solid #ccc;
    backdrop-filter: none;
  }

  .roadmap-stop.active .roadmap-dot {
    background: #d4a017;
    animation: none;
  }
}
