/* ==========================================================================
   LAPTOP & SMALLER DESKTOPS (Max-Width: 1024px)
   ========================================================================== */
@media (max-width: 1024px) {
  section {
    padding: 60px 0;
  }
  
  .hero-left h1 {
    font-size: 38px;
  }
  
  .grid-5, .features-grid {
    grid-template-columns: repeat(3, 1fr);
    gap: 16px;
  }
  
  .features-grid .feature-box:nth-child(4),
  .features-grid .feature-box:nth-child(5) {
    grid-column: span 1.5; /* Center the last two items */
  }
  
  .why-us-grid {
    grid-template-columns: 1fr;
    gap: 40px;
  }
  
  .why-us-image-col {
    display: flex;
    justify-content: center;
    max-width: 500px;
    margin: 0 auto;
  }
  
  .programs-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  
  .programs-grid.bottom-row {
    grid-template-columns: repeat(2, 1fr);
    width: 100%;
  }
  
  .certification-grid {
    grid-template-columns: 1fr;
    gap: 40px;
  }
  
  .certificate-container {
    order: 2; /* Put certificate below description on smaller screen */
  }
  
  .journey-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  
  .stats-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  
  .testimonials-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  
  .testimonials-grid .testimonial-card:last-child {
    grid-column: span 2;
    max-width: 50%;
    margin: 0 auto;
  }
  
  .footer-top {
    grid-template-columns: repeat(2, 1fr);
    gap: 30px;
  }

  .career-card {
    padding: 30px;
  }
}

/* ==========================================================================
   TABLET DEVICES (Max-Width: 768px)
   ========================================================================== */
@media (max-width: 768px) {
  .top-bar {
    display: none; /* Hide top contact bar on tablet and mobile */
  }
  
  .hamburger {
    display: block; /* Show menu toggle */
  }
  
  .nav-links {
    position: fixed;
    top: 78px;
    left: -100%;
    width: 100%;
    height: calc(100vh - 78px);
    background-color: var(--background-white);
    flex-direction: column;
    padding: 40px 24px;
    gap: 24px;
    transition: left 0.4s ease;
    box-shadow: 0 10px 15px rgba(0,0,0,0.05);
    align-items: stretch;
    z-index: 99;
  }
  
  .nav-links.active {
    left: 0;
  }
  
  .nav-links a {
    font-size: 16px;
    padding: 10px 0;
    border-bottom: 1px solid var(--soft-gray);
    text-align: center;
  }
  
  /* Mobile Dropdown Styling */
  .nav-links .nav-dropdown {
    display: flex;
    flex-direction: column;
    align-items: stretch;
  }

  .nav-links .dropdown-trigger {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    font-size: 16px;
    padding: 10px 0;
    border-bottom: 1px solid var(--soft-gray);
    font-weight: 500;
    color: #444;
  }

  .nav-links .dropdown-menu {
    position: static;
    transform: none;
    width: 100%;
    background-color: var(--soft-gray);
    border-radius: var(--radius-sm);
    box-shadow: none;
    border: none;
    padding: 16px;
    margin-top: 8px;
    display: none;
    grid-template-columns: 1fr;
    gap: 16px;
    opacity: 1;
    visibility: visible;
    z-index: auto;
    transition: none;
  }

  .nav-links .nav-dropdown.active .dropdown-menu {
    display: grid;
  }

  .nav-links .dropdown-column h4 {
    font-size: 12px;
    margin-bottom: 8px;
    border-bottom: 1px solid rgba(0, 0, 0, 0.08);
    padding-bottom: 4px;
    text-align: left;
    color: var(--primary-blue);
    font-weight: 700;
  }

  .nav-links .dropdown-column ul {
    display: flex;
    flex-direction: column;
    gap: 6px;
  }

  .nav-links .dropdown-menu a {
    font-size: 14px;
    padding: 4px 0;
    border-bottom: none;
    text-align: left;
    color: #555;
    font-weight: 400;
  }

  .nav-links .dropdown-menu .course-name {
    font-size: 14px;
    padding: 4px 0;
    text-align: left;
    color: #555;
    font-weight: 400;
  }
  
  .nav-links .dropdown-menu a:hover {
    color: var(--accent-gold);
    padding-left: 4px;
  }
  
  .nav-links .btn-apply {
    margin-top: 10px;
    text-align: center;
    justify-content: center;
  }
  
  .grid-2, .hero-grid {
    grid-template-columns: 1fr;
    gap: 40px;
  }
  
  .hero-left {
    text-align: center;
  }
  
  .hero-left .hero-subtitle {
    margin: 0 auto 30px auto;
  }
  
  .hero-bullets {
    max-width: 480px;
    margin: 0 auto 35px auto;
  }
  
  .hero-actions {
    justify-content: center;
  }
  
  .hero-right {
    justify-content: center;
    margin-top: 20px;
  }
  
  .hero-image-container {
    width: 85%;
  }
  
  .stat-card-overlay {
    padding: 8px 14px;
  }
  
  .stat-card-overlay .stat-number {
    font-size: 14px;
  }
  
  .stat-card-overlay .stat-label {
    font-size: 9px;
  }
  
  .journey-grid {
    grid-template-columns: 1fr;
    gap: 30px;
  }
  
  .journey-card {
    max-width: 400px;
    margin: 0 auto;
    width: 100%;
  }
  
  .testimonials-grid {
    grid-template-columns: 1fr;
  }
  
  .testimonials-grid .testimonial-card:last-child {
    grid-column: span 1;
    max-width: 100%;
  }
  
  .cta-container {
    padding: 40px 24px;
  }
  
  .cta-container h2 {
    font-size: 28px;
  }
  
  .cta-buttons {
    flex-direction: column;
    align-items: center;
    gap: 12px;
  }
  
  .cta-buttons .btn {
    width: 100%;
    max-width: 280px;
  }
  
  .modal-content {
    padding: 24px;
  }
  
  .programs-grid,
  .programs-grid.bottom-row {
    grid-template-columns: 1fr;
    width: 100%;
    max-width: 420px;
    margin: 0 auto;
    gap: 20px;
  }

  .career-card {
    padding: 24px 16px;
  }
  .career-tabs-container {
    flex-direction: row;
    flex-wrap: wrap;
    justify-content: center;
  }
  .career-tab {
    flex: 1 1 calc(50% - 10px);
  }
  .col-title {
    margin-top: 20px;
    margin-bottom: 15px;
    text-align: center !important;
  }
  .salary-chart-wrapper {
    margin-bottom: 20px;
  }
}

/* ==========================================================================
   MOBILE DEVICES (Max-Width: 480px)
   ========================================================================== */
@media (max-width: 480px) {
  section {
    padding: 50px 0;
  }
  
  .container {
    padding: 0 16px;
  }
  
  .section-title {
    font-size: 26px;
  }
  
  .hero-left h1 {
    font-size: 30px;
  }
  
  .hero-bullets {
    grid-template-columns: 1fr;
    gap: 12px;
  }
  
  .hero-actions {
    flex-direction: column;
    align-items: center;
    gap: 12px;
    width: 100%;
  }
  
  .hero-actions .btn {
    width: 100%;
    max-width: 320px;
  }
  
  .stat-card-overlay {
    display: none; /* Hide floating card overlays on extra small mobile to prevent text overflow */
  }
  
  .features-grid {
    grid-template-columns: 1fr;
  }
  
  .features-grid .feature-box:nth-child(4),
  .features-grid .feature-box:nth-child(5) {
    grid-column: span 1;
  }
  
  .programs-grid {
    grid-template-columns: 1fr;
  }
  
  .cert-features {
    grid-template-columns: 1fr;
  }
  
  .stats-grid {
    grid-template-columns: 1fr;
  }
  
  .footer-top {
    grid-template-columns: 1fr;
    gap: 30px;
  }

  /* Center mobile footer column content */
  .footer-col {
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
  }

  .footer-col h3::after {
    left: 50%;
    transform: translateX(-50%);
  }

  .social-links {
    justify-content: center;
  }

  .footer-contact {
    align-items: center;
    width: 100%;
  }

  .newsletter-form {
    width: 100%;
    max-width: 320px;
    margin: 0 auto;
  }
  
  .footer-bottom {
    flex-direction: column;
    gap: 12px;
    text-align: center;
  }
  
  .footer-bottom-links {
    justify-content: center;
  }
  
  .newsletter-form {
    flex-direction: column;
    align-items: stretch;
  }
  
  .newsletter-form button {
    padding: 12px;
  }

  .career-tab {
    flex: 1 1 100%;
  }
  .salary-chart {
    height: 150px;
    padding-bottom: 4px;
  }
  .chart-bar-container {
    width: 18%;
  }
  .bar-value {
    font-size: 10px;
  }
  .bar-label {
    font-size: 9px;
  }
  .companies-grid {
    gap: 12px;
  }
  .company-logo-card {
    padding: 10px;
    min-height: 55px;
  }
}
