/* ============================================
   BadgeBytes — Responsive Styles
   Breakpoints: 1200px, 992px, 768px, 576px
   ============================================ */

/* ---------- Large Desktops (below 1400px) ---------- */
@media (max-width: 1400px) {
  .footer-grid {
    grid-template-columns: 1.5fr 1fr 1fr 1fr 1fr;
  }
}

/* ---------- Desktops (below 1200px) ---------- */
@media (max-width: 1200px) {
  :root {
    --text-5xl: 2.5rem;
    --text-4xl: 2rem;
    --text-3xl: 1.5rem;
  }

  .grid-4 {
    grid-template-columns: repeat(3, 1fr);
  }

  .footer-grid {
    grid-template-columns: 1fr 1fr 1fr;
    gap: var(--space-8);
  }

  .footer-brand {
    grid-column: 1 / -1;
    padding-right: 0;
  }

  .hero-visual {
    width: 40%;
  }

  .nav-link {
    padding: var(--space-2);
    font-size: 13px;
  }
}

/* ---------- Tablets (below 992px) ---------- */
@media (max-width: 992px) {
  :root {
    --text-5xl: 2.25rem;
    --text-4xl: 1.75rem;
    --text-3xl: 1.375rem;
    --space-20: 4rem;
    --space-16: 3rem;
  }

  /* Mobile Navigation */
  .nav-menu {
    position: fixed;
    top: 0;
    right: -100%;
    width: 320px;
    height: 100vh;
    background: var(--color-white);
    flex-direction: column;
    align-items: stretch;
    padding: calc(var(--header-height) + var(--space-4)) var(--space-6) var(--space-6);
    gap: 0;
    box-shadow: -5px 0 30px rgba(0, 0, 0, 0.1);
    transition: right var(--transition-slow);
    overflow-y: auto;
    z-index: 999;
  }

  .nav-menu.active {
    right: 0;
  }

  .nav-link {
    color: var(--color-text-dark);
    padding: var(--space-3) var(--space-4);
    font-size: var(--text-base);
    border-radius: var(--radius-md);
  }

  .nav-link:hover,
  .nav-link.active {
    color: var(--color-primary);
    background: var(--color-bg-light);
  }

  .nav-dropdown {
    position: static;
    opacity: 1;
    visibility: visible;
    transform: none;
    box-shadow: none;
    border: none;
    padding: 0 0 0 var(--space-4);
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease;
  }

  .nav-item.dropdown-open .nav-dropdown {
    max-height: 500px;
  }

  .nav-dropdown a {
    padding: var(--space-2) var(--space-4);
  }

  .nav-cta {
    margin-left: 0;
    margin-top: var(--space-4);
    padding: 0 var(--space-4);
  }

  .nav-cta .btn {
    width: 100%;
    justify-content: center;
  }

  .hamburger {
    display: flex;
  }

  .hamburger.active span {
    background: var(--color-text-dark);
  }

  /* Mobile overlay */
  .nav-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.4);
    z-index: 998;
    opacity: 0;
    visibility: hidden;
    transition: all var(--transition-base);
  }

  .nav-overlay.active {
    opacity: 1;
    visibility: visible;
  }

  /* Grids */
  .grid-4 {
    grid-template-columns: repeat(2, 1fr);
  }

  .grid-3 {
    grid-template-columns: repeat(2, 1fr);
  }

  .about-grid {
    grid-template-columns: 1fr;
    gap: var(--space-8);
  }

  .contact-grid {
    grid-template-columns: 1fr;
  }

  .solution-grid {
    grid-template-columns: 1fr;
  }

  .solution-grid:nth-child(even) {
    direction: ltr;
  }

  .training-program {
    grid-template-columns: 1fr;
    gap: var(--space-6);
  }

  .training-program:nth-child(even) {
    direction: ltr;
  }

  .mvv-grid {
    grid-template-columns: 1fr;
  }

  .benefits-grid {
    grid-template-columns: 1fr;
  }

  .blog-layout {
    grid-template-columns: 1fr;
  }

  .blog-sidebar {
    position: static;
  }

  /* Process timeline */
  .process-timeline::before {
    left: 24px;
  }

  .process-step {
    flex-direction: column !important;
    align-items: flex-start;
    padding-left: 60px;
  }

  .process-step-number {
    left: 0;
    transform: none;
  }

  .process-step-content {
    width: 100%;
  }

  .process-step:nth-child(even) .process-step-content {
    text-align: left;
  }

  /* Stats */
  .stats-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  /* Hero */
  .hero-content {
    max-width: 100%;
  }

  .hero-visual {
    display: none;
  }

  .hero-stats {
    gap: var(--space-6);
  }

  /* Footer */
  .footer-grid {
    grid-template-columns: 1fr 1fr;
  }

  .footer-bottom {
    flex-direction: column;
    gap: var(--space-4);
    text-align: center;
  }

  /* Calendar table scroll */
  .table-responsive {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
  }

  .calendar-table {
    min-width: 600px;
  }
}

/* ---------- Mobile Landscape (below 768px) ---------- */
@media (max-width: 768px) {
  :root {
    --text-5xl: 2rem;
    --text-4xl: 1.5rem;
    --text-3xl: 1.25rem;
    --text-2xl: 1.125rem;
    --space-20: 3rem;
    --space-16: 2.5rem;
    --space-12: 2rem;
    --header-height: 70px;
  }

  .container,
  .container-wide,
  .container-narrow {
    padding: 0 var(--space-4);
  }

  .grid-3 {
    grid-template-columns: 1fr;
  }

  .grid-2 {
    grid-template-columns: 1fr;
  }

  .hero {
    min-height: auto;
    padding-top: var(--header-height);
    padding-bottom: var(--space-12);
  }

  .hero-content {
    padding: var(--space-10) 0;
  }

  .hero h1 {
    font-size: var(--text-4xl);
  }

  .hero-stats {
    flex-direction: column;
    gap: var(--space-4);
  }

  .btn-group {
    flex-direction: column;
    width: 100%;
  }

  .btn-group .btn {
    width: 100%;
    justify-content: center;
  }

  .page-hero {
    padding: calc(var(--header-height) + var(--space-10)) 0 var(--space-10);
  }

  .page-hero h1 {
    font-size: var(--text-3xl);
  }

  .section-header {
    margin-bottom: var(--space-10);
  }

  .form-row {
    grid-template-columns: 1fr;
  }

  .newsletter-form {
    flex-direction: column;
  }

  .footer-grid {
    grid-template-columns: 1fr;
  }

  .footer-bottom-links {
    flex-direction: column;
    gap: var(--space-3);
  }

  .job-card-header {
    flex-direction: column;
    gap: var(--space-3);
  }

  .testimonial-card {
    padding: var(--space-6) var(--space-4);
  }

  .testimonial-card .testimonial-quote {
    font-size: var(--text-base);
  }
}

/* ---------- Mobile Portrait (below 576px) ---------- */
@media (max-width: 576px) {
  :root {
    --text-5xl: 1.75rem;
    --text-4xl: 1.375rem;
    --text-3xl: 1.125rem;
    --text-2xl: 1rem;
    --space-20: 2.5rem;
    --space-16: 2rem;
  }

  .grid-4 {
    grid-template-columns: 1fr;
  }

  .card {
    padding: var(--space-6);
  }

  .hero h1 {
    font-size: var(--text-3xl);
  }

  .stats-grid {
    grid-template-columns: 1fr;
    gap: var(--space-4);
  }

  .stat-item .stat-number {
    font-size: var(--text-4xl);
  }

  .header-logo .logo-text {
    font-size: var(--text-base);
  }

  .hero-label {
    font-size: var(--text-xs);
  }

  .breadcrumb {
    font-size: var(--text-xs);
    flex-wrap: wrap;
  }
}

/* ---------- SAP BTP Training Poster Responsive Rules ---------- */
@media (max-width: 1200px) {
  .why-learn-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

@media (max-width: 992px) {
  .btp-main-grid {
    grid-template-columns: 1fr;
  }
  
  .btp-philosophy-grid {
    grid-template-columns: 1fr;
  }
  
  .btp-philosophy-right {
    text-align: left;
    border-left: none;
    padding-left: 0;
    border-top: 1px solid rgba(255, 255, 255, 0.2);
    padding-top: var(--space-4);
  }
}

@media (max-width: 768px) {
  .why-learn-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 480px) {
  .why-learn-grid {
    grid-template-columns: 1fr;
  }
}


/* ---------- Print Styles ---------- */
@media print {
  .header,
  .footer,
  .loading-screen,
  .hamburger,
  .nav-overlay,
  .cta-section,
  .newsletter-section {
    display: none !important;
  }

  body {
    font-size: 12pt;
    color: #000;
    background: #fff;
  }

  .section {
    padding: 20px 0;
    break-inside: avoid;
  }

  a {
    color: #000;
    text-decoration: underline;
  }
}
