/* ==================================================
   RESPONSIVE OVERRIDES
   --------------------------------------------------
   Desktop styles live in each component's own CSS
   file; this file only overrides what needs to change
   below the breakpoints. Loaded last, after every
   component stylesheet.

   Breakpoints (matching Bootstrap's grid):
     max-width: 991.98px  -> tablet
     max-width: 767.98px  -> large mobile
     max-width: 575.98px  -> mobile
   ================================================== */

/* ==================================================
   GLOBAL
   ================================================== */
@media (max-width: 991.98px) {
  .cx-container {
    padding-inline: var(--cx-space-md);
  }

  .cx-section {
    padding-block: var(--cx-space-xl);
  }

  h1 { font-size: var(--cx-fs-4xl); }
  h2 { font-size: var(--cx-fs-2xl); }
}

@media (max-width: 575.98px) {
  .cx-container {
    padding-inline: var(--cx-space-sm);
  }

  .cx-section {
    padding-block: var(--cx-space-lg);
  }

  h1 { font-size: var(--cx-fs-3xl); }
  h2 { font-size: var(--cx-fs-xl); }

  .cx-btn {
    padding: 0.75rem 1.5rem;
    font-size: var(--cx-fs-xs);
  }
}

/* ==================================================
   NAVBAR
   ================================================== */
@media (max-width: 991.98px) {
  .cx-navbar {
    height: 72px;
  }

  .cx-navbar-toggler {
    display: flex;
  }

  .cx-navbar-collapse {
    position: absolute;
    top: 72px;
    left: 0;
    right: 0;
    flex-direction: column;
    align-items: stretch;
    background-color: var(--cx-bg-alt);
    border-bottom: 1px solid var(--cx-border);
    box-shadow: var(--cx-shadow-lg);
    padding: var(--cx-space-md) var(--cx-space-md) var(--cx-space-lg);
    gap: var(--cx-space-md);
    max-height: calc(100vh - 72px);
    overflow-y: auto;

    visibility: hidden;
    opacity: 0;
    transform: translateY(-8px);
    pointer-events: none;
    transition: opacity 0.22s var(--cx-ease), transform 0.22s var(--cx-ease), visibility 0.22s;
  }

  .cx-navbar-collapse.is-open {
    visibility: visible;
    opacity: 1;
    transform: translateY(0);
    pointer-events: auto;
  }

  .cx-navbar-links {
    flex-direction: column;
    align-items: flex-start;
    gap: 1rem;
    width: 100%;
  }

  .cx-navbar-link {
    width: 100%;
    padding: 0.65rem 0.85rem;
    border-radius: var(--cx-radius-sm);
  }

  .cx-navbar-link::after {
    display: none;
  }

  a.cx-navbar-link.cx-navbar-link-mobile-only {
    display: block;
  }

  .cx-navbar-link.is-active {
    color: var(--cx-primary);
    font-weight: 700;
    background: linear-gradient(135deg, rgba(37, 99, 235, 0.14) 0%, rgba(79, 70, 229, 0.08) 100%);
    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);
    border: 1px solid rgba(37, 99, 235, 0.18);
    box-shadow: 0 2px 10px rgba(37, 99, 235, 0.08);
  }

  [data-theme="dark"] .cx-navbar-link.is-active {
    color: #70EEFF;
  }

  .cx-navbar-actions {
    flex-direction: column;
    align-items: stretch;
    width: 100%;
    gap: 0.75rem;
  }

  .cx-navbar-actions .cx-btn {
    width: 100%;
  }

  .cx-theme-toggle-desktop {
    display: none;
  }

  .cx-theme-toggle-mobile {
    display: inline-flex;
  }
}

/* ==================================================
   HERO
   ================================================== */
@media (max-width: 991.98px) {
  .cx-hero-inner {
    grid-template-columns: 1fr;
  }

  .cx-hero-visual {
    order: -1;
    margin-bottom: var(--cx-space-lg);
  }

  .cx-hero-content {
    align-items: center;
    text-align: center;
    max-width: 100%;
    margin-inline: auto;
  }

  .cx-hero-desc {
    max-width: 100%;
  }

  .cx-hero-cta,
  .cx-hero-pills {
    justify-content: center;
  }

  .cx-hero-laptop {
    max-width: 400px;
  }

  .cx-float-html {
    top: 4%;
    left: 10%;
  }

  .cx-float-react {
    top: 4%;
    right: 7%;
  }

  .cx-float-js {
    top: -5%;
    right: 32%;
  }

  /* Shrink the dashboard's internals in step with the laptop's width,
     otherwise fixed-size content forces extra height and the laptop
     looks stretched/elongated instead of scaling proportionally. */
  .cx-hero-laptop-screen {
    padding: 0.75rem 0.75rem 1rem;
  }

  .cx-dashboard {
    padding: 0.85rem;
    gap: 0.85rem;
  }

  .cx-dashboard-grid {
    gap: 0.55rem;
  }

  .cx-dashboard-avatar {
    width: 34px;
    height: 34px;
    font-size: 0.68rem;
  }

  .cx-dashboard-name {
    font-size: 0.85rem;
  }

  .cx-dashboard-role {
    font-size: 0.64rem;
  }

  .cx-dashboard-card {
    padding: 0.6rem;
  }

  .cx-dashboard-card-title {
    font-size: 0.72rem;
  }

  .cx-dashboard-card-label {
    font-size: 0.58rem;
  }

  .cx-dashboard-card-meta {
    font-size: 0.6rem;
  }

  /* Tablet: laptop is already smaller, so thin the badge set out now
     rather than waiting for mobile — otherwise they scatter too far
     from the laptop's edges. */
  
  .cx-float-laravel,
  .cx-float-php {
    display: block;
  }

  .cx-float-ai{
    display: block;
    left: 7%;
  }

  .cx-float-figma{
    display: block;
    right: 7%;
  }
}

@media (max-width: 767.98px) {
  .cx-hero-cta {
    flex-direction: column;
    width: 100%;
  }

  .cx-hero-cta .cx-btn {
    width: 100%;
  }

  .cx-hero-laptop {
    max-width: 320px;
  }

  .cx-hero-laptop-screen {
    padding: 0.6rem 0.6rem 0.8rem;
  }

  .cx-dashboard {
    padding: 0.65rem;
    gap: 0.6rem;
  }

  .cx-dashboard-avatar {
    width: 28px;
    height: 28px;
    font-size: 0.58rem;
  }

  .cx-dashboard-name {
    font-size: 0.72rem;
  }

  .cx-dashboard-role {
    font-size: 0.55rem;
  }

  .cx-dashboard-card {
    padding: 0.5rem;
  }

  .cx-dashboard-card-title {
    font-size: 0.62rem;
  }

  .cx-dashboard-card-label {
    font-size: 0.5rem;
  }

  .cx-dashboard-card-meta {
    font-size: 0.52rem;
  }

  .cx-dashboard-progress {
    height: 4px;
  }

  .cx-float-css,
  .cx-float-js {
    display: block;
  }

  .cx-float-ai{
    display: block;
    top: 48%;
    left: 14%;
  }

  .cx-float-figma{
    right: 9%;
  }

}

@media (max-width: 575.98px) {
  .cx-hero-laptop {
    max-width: 260px;
  }

  .cx-hero-laptop-screen {
    padding: 0.55rem 0.55rem 0.75rem;
  }

  .cx-dashboard {
    padding: 0.6rem;
    gap: 0.55rem;
  }

  .cx-dashboard-grid {
    grid-template-columns: 1fr;
  }

  .cx-float-ai {
    display: block;
    left: 4%;
  }

  .cx-float-figma {
    display: block;
    right: 3%;
  }

  
  .cx-float-js {
    display: block;
    right: 34%;
    top: -8%;
  }
  .cx-float-css{
    display: none;
  }
}

/* ==================================================
   FEATURED COURSES
   ================================================== */
@media (max-width: 991.98px) {
  .cx-course-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .cx-courses-header {
    flex-direction: column;
    align-items: center;
    text-align: center;
    gap: var(--cx-space-sm);
  }
}

@media (max-width: 575.98px) {
  .cx-course-grid {
    grid-template-columns: 1fr;
  }
}

/* ==================================================
   WHY CODEXA
   ================================================== */
@media (max-width: 991.98px) {
  .cx-why-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .cx-why-item-featured {
    grid-column: span 2;
    grid-row: span 1;
  }

  .cx-why-item-wide {
    grid-column: span 2;
  }
}

@media (max-width: 575.98px) {
  .cx-why-grid {
    grid-template-columns: 1fr;
  }

  .cx-why-item-featured {
    grid-column: span 1;
  }

  .cx-why-item-featured .cx-why-item-title {
    font-size: var(--cx-fs-xl);
  }

  .cx-why-item-wide {
    grid-column: span 1;
    flex-direction: column;
  }
}

/* ==================================================
   LEARNING PROCESS
   ================================================== */
@media (max-width: 991.98px) {
  .cx-process-track {
    grid-template-columns: repeat(2, 1fr);
    row-gap: var(--cx-space-xl);
  }

  .cx-process-line {
    display: none;
  }
}

@media (max-width: 575.98px) {
  .cx-process-track {
    grid-template-columns: 1fr;
  }

  .cx-process-step-desc {
    max-width: 100%;
  }
}

/* ==================================================
   STUDENT PROJECTS
   ================================================== */
@media (max-width: 991.98px) {
  .cx-project-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 575.98px) {
  .cx-project-grid {
    grid-template-columns: 1fr;
  }
}

/* ==================================================
   TESTIMONIALS
   ================================================== */
@media (max-width: 991.98px) {
  .cx-testimonial-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 575.98px) {
  .cx-testimonial-grid {
    grid-template-columns: 1fr;
  }
}

/* ==================================================
   FAQ
   ================================================== */
@media (max-width: 575.98px) {
  .cx-faq-question {
    font-size: var(--cx-fs-base);
    gap: var(--cx-space-sm);
  }
}

/* ==================================================
   CTA
   ================================================== */
@media (max-width: 767.98px) {
  .cx-cta-panel {
    padding: var(--cx-space-xl) var(--cx-space-md);
  }

  .cx-cta-actions {
    flex-direction: column;
    width: 100%;
  }

  .cx-cta-actions .cx-btn {
    width: 100%;
  }
}

/* ==================================================
   FOOTER
   ================================================== */
@media (max-width: 991.98px) {
  .cx-footer-top {
    grid-template-columns: repeat(2, 1fr);
    row-gap: var(--cx-space-lg);
    text-align: center;
  }

  .cx-footer-brand {
    grid-column: span 2;
    display: flex;
    flex-direction: column;
    align-items: center;
  }

  .cx-footer-social {
    justify-content: center;
  }

  .cx-footer-col {
    display: flex;
    flex-direction: column;
    align-items: center;
  }

  .cx-footer-contact {
    align-items: center;
  }
}

@media (max-width: 575.98px) {
  .cx-footer-top {
    grid-template-columns: 1fr;
  }

  .cx-footer-brand {
    grid-column: span 1;
  }

  .cx-footer-bottom {
    flex-direction: column;
    align-items: center;
    gap: 0.75rem;
    text-align: center;
  }
}

/* ==================================================
   PAGE BANNER (shared, all inner pages)
   ================================================== */
@media (max-width: 575.98px) {
  .cx-page-banner {
    padding-block: var(--cx-space-xl) var(--cx-space-lg);
  }
}

/* ==================================================
   ABOUT PAGE
   ================================================== */
@media (max-width: 991.98px) {
  .cx-about-story-grid {
    grid-template-columns: 1fr;
    gap: var(--cx-space-lg);
  }

  .cx-value-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 575.98px) {
  .cx-about-stats {
    grid-template-columns: 1fr;
  }

  .cx-value-grid {
    grid-template-columns: 1fr;
  }
}

/* ==================================================
   ADMISSION PAGE
   ================================================== */
@media (max-width: 991.98px) {
  .cx-admission-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 575.98px) {
  .cx-form-row {
    grid-template-columns: 1fr;
  }

  .cx-admission-form-wrap {
    padding: var(--cx-space-md);
  }
}

/* ==================================================
   CONTACT PAGE
   ================================================== */
@media (max-width: 991.98px) {
  .cx-contact-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 575.98px) {
  .cx-contact-form-wrap {
    padding: var(--cx-space-md);
  }

  .cx-contact-map {
    height: 260px;
  }
}

/* ==================================================
   GALLERY PAGE
   ================================================== */
@media (max-width: 991.98px) {
  .cx-gallery-grid {
    column-count: 2;
  }
}

@media (max-width: 575.98px) {
  .cx-gallery-grid {
    column-count: 1;
  }

  .cx-lightbox-visual {
    height: 220px;
  }

  .cx-lightbox-info {
    padding: var(--cx-space-md);
  }
}

/* ==================================================
   PLACEMENT PAGE
   ================================================== */
@media (max-width: 991.98px) {
  .cx-placement-stats {
    grid-template-columns: repeat(2, 1fr);
  }

  .cx-partner-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

@media (max-width: 575.98px) {
  .cx-partner-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .cx-placement-row {
    flex-direction: column;
    align-items: flex-start;
    gap: 0.5rem;
  }

  .cx-placement-package {
    align-self: flex-start;
  }
}

/* ==================================================
   FLOATING CONTACT
   ================================================== */
@media (max-width: 575.98px) {
  .cx-floating-contact {
    right: var(--cx-space-sm);
    bottom: var(--cx-space-sm);
    gap: 0.6rem;
  }

  .cx-floating-btn {
    width: 46px;
    height: 46px;
  }

  .cx-floating-tooltip {
    display: none;
  }
}

/* ==================================================
   COURSE CAROUSEL
   ================================================== */
@media (max-width: 991.98px) {
  .cx-course-carousel-track,
  .cx-course-carousel-track.cx-course-carousel-compact {
    --cx-cards-per-view: 2;
  }
}

@media (max-width: 575.98px) {
  .cx-course-carousel-track,
  .cx-course-carousel-track.cx-course-carousel-compact {
    --cx-cards-per-view: 1;
  }
}

/* ==================================================
   COURSE DETAIL PAGE
   ================================================== */
@media (max-width: 991.98px) {
  .cx-course-hero-grid {
    display: flex;
    flex-direction: column;
    gap: var(--cx-space-lg);
  }

  .cx-course-hero-visual {
    width: 100%;
    max-width: 420px;
    aspect-ratio: 1 / 1;
    margin-inline: auto;
  }

  .cx-course-hero-thumb {
    width: 100%;
    height: 100%;
  }

  .cx-course-hero-title {
    font-size: var(--cx-fs-3xl);
    text-align: center;
  }

  .cx-course-hero-badges,
  .cx-course-hero-actions {
    justify-content: center;
  }
}

@media (max-width: 575.98px) {
  .cx-course-hero-desc {
    text-align: center;
  }

  .cx-course-highlights-title {
    text-align: center;
  }

  .cx-course-highlights {
    grid-template-columns: 1fr;
    max-width: 320px;
    margin-inline: auto;
    text-align: left;
  }

  .cx-course-hero-actions {
    flex-direction: column;
    width: 100%;
  }

  .cx-course-hero-actions .cx-btn {
    width: 100%;
    justify-content: center;
  }

  .cx-course-module-list {
    grid-template-columns: 1fr;
  }

  .cx-course-hero-title {
    font-size: var(--cx-fs-2xl);
  }
}