/* ============================================
   Express Engineering Solutions — Responsive
   Phase 1: Navigation + Hero
   ============================================ */

/* ---------- Large Desktop ---------- */
@media (min-width: 1400px) {
  :root {
    --container-max: 1320px;
  }

  .hero__visual-wrapper {
    --hero-image-width: 760px;
    --hero-image-max-height: 680px;
  }

  .hero__float-card--1 {
    right: 0;
  }

  .hero__float-card--2 {
    left: -5%;
  }

  .hero__float-card--3 {
    right: -5%;
  }
}

/* ---------- Laptop / Small Desktop ---------- */
@media (max-width: 1024px) {
  .hero__container {
    grid-template-columns: 1fr;
    text-align: center;
  }

  .hero__content {
    max-width: 100%;
    order: 1;
  }

  .hero__subtitle {
    margin-inline: auto;
  }

  .hero__trust {
    justify-items: center;
    max-width: 480px;
    margin-inline: auto;
  }

  .hero__cta {
    justify-content: center;
  }

  .hero__visual {
    order: 2;
    width: 100%;
    max-width: 100%;
    margin-inline: auto;
    justify-content: center;
  }

  .hero__visual-wrapper {
    --hero-image-width: 560px;
    --hero-image-max-height: 420px;
    width: 100%;
    max-width: min(var(--hero-image-width), 100%);
    margin-right: 0;
    transform: none;
  }

  .hero__slider-arrow {
    width: 36px;
    height: 36px;
  }

  .hero__slider-arrow--prev {
    left: var(--space-sm);
  }

  .hero__slider-arrow--next {
    right: var(--space-sm);
  }

  .hero__float-card--1 {
    top: 5%;
    right: 0;
  }

  .hero__float-card--2 {
    bottom: 15%;
    left: 0;
  }

  .hero__float-card--3 {
    top: 40%;
    right: 0;
  }
}

/* ---------- Tablet ---------- */
@media (max-width: 768px) {
  :root {
    --header-height: 64px;
  }

  /* Mobile Navigation */
  .nav__toggle {
    display: flex;
  }

  .nav__menu {
    position: fixed;
    top: 0;
    right: -100%;
    width: min(320px, 85vw);
    height: 100vh;
    height: 100dvh;
    flex-direction: column;
    align-items: flex-start;
    justify-content: flex-start;
    padding: calc(var(--header-height) + 2rem) 2rem 2rem;
    background: rgba(255, 255, 255, 0.97);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    box-shadow: -8px 0 40px rgba(0, 0, 0, 0.08);
    transition: right var(--transition-slow);
    gap: var(--space-xl);
    overflow-y: auto;
  }

  .nav__menu.is-open {
    right: 0;
  }

  .nav__list {
    flex-direction: column;
    align-items: flex-start;
    width: 100%;
    gap: 0;
  }

  .nav__item {
    width: 100%;
    border-bottom: 1px solid var(--color-gray-light);
  }

  .nav__link {
    display: block;
    padding: var(--space-md) 0;
    font-size: 1rem;
  }

  .nav__menu .btn--nav {
    width: 100%;
    margin-top: var(--space-md);
  }

  /* Mobile overlay */
  .nav-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.4);
    z-index: calc(var(--z-header) - 1);
    opacity: 0;
    visibility: hidden;
    transition: opacity var(--transition-base), visibility var(--transition-base);
  }

  .nav-overlay.is-visible {
    opacity: 1;
    visibility: visible;
  }

  /* Hero adjustments */
  .hero {
    min-height: auto;
  }

  .hero__container {
    padding-block: clamp(1.5rem, 5vh, 2.5rem);
    gap: var(--space-xl);
  }

  .hero__subtitle {
    margin-bottom: var(--space-lg);
  }

  .hero__trust {
    grid-template-columns: repeat(2, 1fr);
    gap: 0.5rem;
    max-width: 100%;
    margin-inline: auto;
    margin-bottom: var(--space-lg);
    text-align: left;
  }

  .hero__trust-item {
    font-size: 0.75rem;
    padding: 0.5rem 0.625rem;
    gap: 0.375rem;
  }

  .hero__trust-icon {
    width: 1rem;
    height: 1rem;
    flex-shrink: 0;
  }

  .hero__cta {
    flex-direction: row;
    flex-wrap: nowrap;
    justify-content: center;
    gap: var(--space-sm);
    width: 100%;
    max-width: 100%;
    margin-inline: auto;
  }

  .hero__cta .btn {
    width: auto;
    flex: 1 1 0;
    min-width: 0;
    padding: 0.75rem 0.875rem;
    font-size: 0.8125rem;
  }

  .hero__cta .btn--lg {
    padding: 0.75rem 0.875rem;
    font-size: 0.8125rem;
    border-radius: var(--border-radius);
  }

  .hero__cta .btn__icon {
    width: 1rem;
    height: 1rem;
  }

  .hero__float-card {
    padding: 0.625rem 0.875rem;
  }

  .hero__float-number {
    font-size: 1.125rem;
  }

  .hero__float-label {
    font-size: 0.6875rem;
  }

  .hero__shape {
    display: none;
  }
}

/* ---------- Mobile ---------- */
@media (max-width: 480px) {
  .hero__badge {
    font-size: 0.75rem;
    padding: 0.375rem 0.875rem;
  }

  .hero__title {
    font-size: clamp(1.75rem, 7vw, 2.25rem);
    margin-bottom: var(--space-md);
  }

  .hero__trust-item {
    font-size: 0.6875rem;
    padding: 0.4375rem 0.5rem;
  }

  .hero__cta .btn {
    padding: 0.625rem 0.625rem;
    font-size: 0.75rem;
  }

  .hero__visual-wrapper {
    max-width: 100%;
  }

  .hero__float-card--1 {
    top: 2%;
    right: -2%;
    padding: 0.5rem 0.75rem;
  }

  .hero__float-card--2 {
    bottom: 10%;
    left: -2%;
    padding: 0.5rem 0.75rem;
  }

  .hero__float-card--3 {
    display: none;
  }

  .hero__gradient--1,
  .hero__gradient--2 {
    opacity: 0.35;
  }
}

/* ---------- Small Mobile ---------- */
@media (max-width: 360px) {
  .nav__menu {
    width: 100vw;
    right: -100vw;
  }

  .hero__trust-item {
    font-size: 0.8125rem;
  }

  .btn--lg {
    padding: 0.875rem 1.5rem;
    font-size: 0.9375rem;
  }
}

/* ============================================
   Phase 2: Responsive
   ============================================ */

/* Laptop */
@media (max-width: 1024px) {
  .why__layout {
    grid-template-columns: 1fr;
    gap: var(--space-xl);
  }

  .why__header {
    text-align: center;
  }

  .why__header .section__eyebrow {
    margin-inline: auto;
  }

  .why__intro {
    max-width: 520px;
    margin-inline: auto;
  }

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

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

  .attend__grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

/* Tablet */
@media (max-width: 768px) {
  .section {
    padding-block: var(--space-3xl);
  }

  .section__header {
    margin-bottom: var(--space-2xl);
  }

  .why__grid {
    grid-template-columns: repeat(3, 1fr);
    gap: 0.5rem;
  }

  .why__feature {
    padding: 0.5rem 0.375rem;
    gap: 0.375rem;
  }

  .why__feature-title {
    font-size: 0.6875rem;
    line-height: 1.25;
  }

  .why__icon {
    width: 28px;
    height: 28px;
    border-radius: 8px;
  }

  .why__icon svg {
    width: 14px;
    height: 14px;
  }

  .why__card {
    padding: var(--space-lg);
  }

  .why__card-title {
    font-size: 0.9375rem;
  }

  .why__card-text {
    font-size: 0.8125rem;
  }

  .stats__grid {
    grid-template-columns: repeat(2, 1fr);
    gap: var(--space-md);
  }

  .stats__item {
    padding: var(--space-lg);
  }

  /* Timeline — 2-column card grid on mobile */
  .learn .timeline {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 0.75rem;
    max-width: none;
  }

  .timeline::before {
    display: none;
  }

  .timeline__item,
  .timeline__item--reverse {
    display: block;
    position: relative;
    margin-bottom: 0;
    padding-left: 0;
  }

  .timeline__item .timeline__content,
  .timeline__item--reverse .timeline__content {
    grid-column: unset;
    grid-row: unset;
    height: 100%;
    min-height: 148px;
    padding: 1rem 0.75rem 0.875rem;
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: var(--border-radius-lg);
    box-shadow: 0 8px 24px rgba(15, 34, 64, 0.18);
  }

  .timeline__item .timeline__marker,
  .timeline__item--reverse .timeline__marker {
    position: absolute;
    top: 0.625rem;
    right: 0.625rem;
    left: auto;
    grid-column: unset;
    grid-row: unset;
    width: 28px;
    height: 28px;
    border-width: 2px;
    box-shadow: 0 4px 12px rgba(37, 99, 235, 0.35);
  }

  .timeline__marker span {
    font-size: 0.625rem;
  }

  .timeline__title {
    font-size: 0.8125rem;
    line-height: 1.3;
    padding-right: 2rem;
    margin-bottom: 0.375rem;
  }

  .timeline__text {
    font-size: 0.6875rem;
    line-height: 1.45;
    opacity: 0.92;
  }

  .timeline__content.hover-lift:hover {
    transform: translateY(-3px);
  }

  .attend__grid {
    grid-template-columns: repeat(2, 1fr);
    gap: var(--space-md);
  }

  .attend__cta {
    padding: var(--space-xl);
  }

  .marquee__logo-item {
    width: 112px;
    height: 52px;
    padding: 0.4375rem 0.75rem;
  }

  .marquee__logo {
    max-width: 100px;
    max-height: 38px;
  }
}

/* Mobile */
@media (max-width: 480px) {
  .stats__grid {
    grid-template-columns: repeat(2, 1fr);
    gap: var(--space-sm);
  }

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

  .stats__number {
    font-size: clamp(1.5rem, 6vw, 2rem);
  }

  .stats__label {
    font-size: 0.75rem;
  }

  .attend__grid {
    grid-template-columns: 1fr;
  }

  .attend__cta p {
    font-size: 1rem;
  }

  .attend__cta .btn {
    width: 100%;
  }
}

/* ============================================
   Phase 3: Responsive
   ============================================ */

@media (max-width: 1024px) {
  .courses__grid {
    grid-template-columns: repeat(2, 1fr);
    gap: var(--space-lg);
  }

  .curriculum__modules {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 768px) {
  .courses__grid {
    grid-template-columns: 1fr;
    gap: var(--space-lg);
  }

  .course-card__actions {
    flex-direction: column;
    align-items: stretch;
  }

  .course-card__actions .btn {
    width: 100%;
    justify-content: center;
  }

  .course-card__link {
    text-align: center;
  }

  .accordion__trigger {
    padding: var(--space-md) var(--space-lg);
  }

  .accordion__content {
    padding-inline: var(--space-lg);
  }

  .accordion__item.is-open .accordion__content {
    padding-top: var(--space-lg);
  }
}

@media (max-width: 480px) {
  .course-card__body {
    padding: var(--space-lg);
  }

  .accordion__trigger-title {
    font-size: 1rem;
  }
}

/* ============================================
   Phase 4: Responsive
   ============================================ */

@media (max-width: 1024px) {
  .orgs__grid {
    grid-template-columns: repeat(3, 1fr);
  }

  .about__grid {
    grid-template-columns: 1fr;
    gap: var(--space-2xl);
  }

  .about__visual {
    max-width: 480px;
    margin-inline: auto;
  }

  .about__badge {
    right: 0;
  }
}

@media (max-width: 768px) {
  .orgs__grid {
    grid-template-columns: repeat(2, 1fr);
    gap: var(--space-md);
  }

  .orgs__logo-wrap {
    padding: var(--space-lg);
    min-height: 80px;
  }

  .global__countries li {
    font-size: 0.75rem;
    padding: 0.25rem 0.625rem;
  }

  .about__content {
    text-align: center;
  }

  .about__content .section__eyebrow,
  .about__title {
    text-align: center;
  }

  .about__features {
    align-items: center;
  }

  .about__content .btn {
    width: 100%;
  }

  .testimonials__card {
    padding: var(--space-lg);
  }

  .testimonials__header {
    gap: var(--space-md);
  }

  .testimonials__avatar {
    width: 88px;
    height: 88px;
  }

  .testimonials__avatar--photo img {
    width: 100%;
    height: 100%;
  }

  .testimonials__name {
    font-size: 0.9375rem;
  }

  .testimonials__role {
    font-size: 0.75rem;
  }

  .testimonials__quote {
    font-size: 0.9375rem;
  }

  .testimonials__controls {
    gap: var(--space-md);
    flex-wrap: wrap;
  }

  .testimonials__dots {
    flex-wrap: wrap;
    justify-content: center;
    max-width: 12rem;
    gap: 0.375rem;
  }

  .testimonials__dot {
    width: 8px;
    height: 8px;
  }
}

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

  .global__marker {
    width: 8px;
    height: 8px;
  }

  .about__badge {
    bottom: 4%;
    right: 4%;
    padding: 0.75rem 1rem;
  }

  .testimonials__arrow {
    width: 38px;
    height: 38px;
  }
}

/* Phase 5 Responsive */
@media (max-width: 1024px) {
  .footer__grid { grid-template-columns: 1fr 1fr; }
  .contact__grid { grid-template-columns: 1fr; }
}
@media (max-width: 768px) {
  .footer__grid { grid-template-columns: 1fr; gap: var(--space-xl); }
  .contact__info { text-align: center; }
  .contact__info .section__eyebrow, .contact__title { text-align: center; }
  .contact__benefits { align-items: center; }
  .contact__form { padding: var(--space-xl); }
  .modal { padding: var(--space-sm); }
  .modal__dialog { padding: var(--space-md) var(--space-lg); overflow: visible; }
  .sticky-actions { bottom: var(--space-md); right: var(--space-md); }
  .sticky-whatsapp { width: 3.25rem; height: 3.25rem; }
  .sticky-whatsapp svg { width: 1.5rem; height: 1.5rem; }
  .sticky-cta { padding: 0.75rem 1.25rem; font-size: 0.8125rem; }
  .sticky-cta span { display: none; }
}
@media (max-width: 480px) {
  .final-cta__title { font-size: 1.5rem; }
  .sticky-cta { padding: 0.875rem; border-radius: 50%; }
  .sticky-cta svg { width: 1.25rem; height: 1.25rem; }
}
