/* Desktop layout system. Phone layouts stay intact; tablet-width metric cards
   get a separate compact arrangement for narrow windows and browser zoom. */
@media (min-width:1025px) {
  :root { --desktop-content-width:1240px; }
  html, body { max-width:100%; overflow-x:clip; }
  .container, .gp-container {
    width:min(calc(100% - 64px),var(--desktop-content-width)) !important;
    max-width:var(--desktop-content-width) !important;
    margin-inline:auto !important;
    padding-inline:0 !important;
  }
  section:not(.hero-section) { padding-block:clamp(60px,5.2vw,78px); }
  .section-title { margin:0 auto 16px !important; font-size:clamp(1.9rem,2.35vw,2.5rem) !important; line-height:1.35 !important; }
  .section-subtitle { max-width:68ch; margin:0 auto 36px; font-size:1.05rem !important; line-height:1.8; }

  .header { height:76px !important; }
  .header .nav-container {
    display:flex; width:min(calc(100% - 48px),1440px); max-width:1440px;
    min-height:76px; margin-inline:auto; padding:8px 0; gap:16px;
  }
  .header .logo { flex:0 0 auto; }
  .header .logo-img { width:clamp(112px,10vw,138px); height:48px; max-width:none; }
  .header .logo-img-link { padding:3px 7px; background:var(--bg-card) !important; }
  .header .nav-menu { display:flex; flex:1 1 auto; min-width:0; justify-content:center; position:static; width:auto; height:auto; padding:0; overflow:visible; border:0; background:transparent; box-shadow:none; }
  .header .nav-menu > ul { display:flex; flex-direction:row; flex-wrap:nowrap; align-items:center; justify-content:center; gap:2px; width:100%; margin:0; padding:0; }
  .header .nav-menu > ul > li { flex:0 0 auto; min-width:0; }
  .header .nav-menu .nav-link { min-height:44px; padding:8px clamp(6px,.7vw,11px); font-size:clamp(.92rem,.98vw,1.05rem); line-height:1.35; white-space:nowrap; }
  .header .nav-menu .nav-dropdown { position:relative; }
  .header .nav-menu .dropdown-menu { z-index:1002; }
  .header .header-controls { flex:0 0 auto; gap:7px !important; }
  .header .header-controls .btn-icon { width:42px; min-width:42px; height:42px; min-height:42px; }
  .header .hamburger { display:none !important; }

  .hero-section { min-height:0 !important; padding:clamp(64px,6vw,88px) 0 60px !important; }
  .hero-container {
    display:grid !important; grid-template-columns:minmax(0,1.08fr) minmax(300px,.82fr);
    align-items:center; gap:clamp(40px,6vw,88px); width:min(calc(100% - 64px),1240px);
    max-width:1240px; margin-inline:auto; padding:0;
  }
  .hero-content { min-width:0; max-width:660px; align-items:flex-start; text-align:start; gap:0; }
  .hero-title { max-width:18ch; margin:0 0 14px !important; font-size:clamp(2.5rem,4vw,3.6rem) !important; line-height:1.25 !important; text-wrap:balance; }
  .hero-subtitle { max-width:50ch; margin:0 0 26px !important; font-size:clamp(1.05rem,1.25vw,1.2rem) !important; line-height:1.85 !important; }
  .hero-btns { display:flex; flex-wrap:wrap; justify-content:flex-start; gap:12px; }
  .hero-btns .btn { min-height:48px; padding:11px 19px !important; font-size:.94rem !important; }
  .hero-image-wrapper { width:100%; min-width:0; justify-content:center; }
  .hero-img-container { width:min(100%,410px); max-width:410px; height:auto !important; min-height:0; aspect-ratio:4/5; }
  .hero-img-container img { object-fit:cover !important; object-position:50% 18% !important; }

  .dp-stats-grid { grid-template-columns:repeat(2,minmax(0,1fr)) !important; gap:20px !important; }
  .dp-stat-card { min-width:0; padding:26px 24px !important; gap:18px !important; }
  .dp-stat-number { font-size:clamp(2rem,3vw,2.75rem) !important; }
  .dp-social-links { gap:14px !important; }
  .dp-social-card { min-width:0; justify-content:center; }
  .training-stats-wrapper { width:100%; }
  .training-stats-grid { width:100%; max-width:none !important; grid-template-columns:repeat(3,minmax(0,1fr)) !important; gap:16px !important; }
  .training-stats-grid .stat-card { min-width:0; grid-template-columns:38px max-content minmax(0,1fr); gap:8px 12px; padding:13px 14px !important; }
  .training-stats-grid .stat-card .stat-icon { width:38px; height:38px; }
  .training-stats-grid .stat-card .stat-icon svg { width:26px; height:26px; }
  .training-stats-grid .stat-card .stat-number { font-size:clamp(1.35rem,1.8vw,1.7rem); }
  .training-stats-grid .stat-card .stat-label { font-size:.84rem; line-height:1.45; }
  .main-programs-grid { grid-template-columns:repeat(2,minmax(0,1fr)) !important; gap:22px !important; }
  .main-program-card { min-width:0; padding:26px !important; }
  .main-program-card .program-card-title { font-size:clamp(1.3rem,1.8vw,1.65rem); line-height:1.45; }
  .certs-grid { grid-template-columns:repeat(4,minmax(0,1fr)) !important; gap:18px !important; }
  .certs-grid .cert-card { min-width:0; }
  .feedback-grid { display:grid !important; grid-template-columns:repeat(3,minmax(0,1fr)); gap:18px; overflow:visible; padding:4px 0 12px; scroll-snap-type:none; }
  .feedback-grid .feedback-card { min-width:0; width:auto; }
  .feedback-dots { display:none !important; }
  .gallery-grid { grid-template-columns:repeat(6,minmax(0,1fr)) !important; gap:14px !important; }
  .gallery-grid .static-featured-card { grid-column:span 3; }
  .gallery-grid .gallery-card:not(.static-featured-card) { grid-column:span 2; min-width:0; }
  .gallery-img-container { aspect-ratio:4/3 !important; }
  .book-layout { width:min(100%,1020px); margin-inline:auto; gap:clamp(36px,6vw,76px); align-items:center; }
  .book-cover-wrapper { width:min(100%,340px); }
  .contact-layout { display:flex; justify-content:center; width:100%; }
  .contact-info { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); align-items:stretch; width:min(100%,1080px); max-width:1080px; margin-inline:auto; gap:18px; }
  .contact-card { display:flex; flex-direction:column; align-items:stretch; justify-content:space-between; min-width:0; min-height:148px; gap:14px; padding:18px 20px; }
  .contact-card-info-group,.contact-card-content { min-width:0; }
  .contact-card-btn { align-self:flex-start; max-width:100%; }
  .gp-cards-grid { grid-template-columns:repeat(2,minmax(0,1fr)); gap:22px; }
  .growth-partners-section .gp-card { min-width:0; }
  .growth-partners-section .gp-card-highlight { grid-column:1/-1; }
  .gp-details-grid { grid-template-columns:repeat(2,minmax(0,1fr)); }
  .mobile-sticky-booking { display:none !important; }
}

@media (min-width:1440px) {
  .container,.gp-container { width:min(calc(100% - 96px),1320px) !important; max-width:1320px !important; }
  .hero-container { width:min(calc(100% - 96px),1320px); max-width:1320px; grid-template-columns:minmax(0,1.1fr) minmax(360px,.82fr); }
  .hero-img-container { max-width:440px; }
}

/* Keep each desktop metric's number and label aligned as one RTL/LTR text block. */
@media (min-width:768px) {
  .dp-stat-card .dp-stat-content { flex:1 1 auto; min-width:0; text-align:start; }
  .dp-stat-card .dp-stat-number { display:block; width:100%; }
  html[dir="rtl"] .dp-stat-card .dp-stat-number { direction:rtl !important; text-align:right !important; }
  html[dir="ltr"] .dp-stat-card .dp-stat-number { direction:ltr !important; text-align:left !important; }
}

@media (min-width:1025px) and (max-width:1199px) {
  .header .nav-container { width:calc(100% - 40px); justify-content:space-between; gap:12px; }
  .header .logo-img { width:clamp(112px,12vw,136px); }
  .header .header-controls .btn-icon { width:40px; min-width:40px; height:40px; min-height:40px; }
  .header .hamburger { display:flex !important; flex-direction:column; align-items:center; justify-content:center; gap:4px; }
  .header .hamburger span { display:block; width:22px !important; height:2px !important; border-radius:999px; background:var(--text-primary) !important; }
  .header .nav-menu { position:fixed; z-index:1001; top:76px; inset-inline-end:-100%; display:flex; flex-direction:column; align-items:stretch; width:min(360px,calc(100vw - 32px)); max-height:calc(100dvh - 76px); padding:16px; overflow-y:auto; border:1px solid var(--border-color); border-top:0; border-radius:0 0 0 18px; background:var(--bg-card); box-shadow:var(--shadow-md); transition:inset-inline-end .25s ease; }
  .header .nav-menu.active { inset-inline-end:0; }
  .header .nav-menu > ul { display:flex; flex-direction:column; align-items:stretch; gap:8px; width:100%; }
  .header .nav-menu > ul > li { width:100%; }
  .header .nav-menu .nav-link { justify-content:flex-start; width:100%; min-height:46px; padding:10px 13px; font-size:1rem; white-space:normal; }
  .header .nav-menu .nav-dropdown { margin-top:4px; padding-top:10px; border-top:1px solid var(--border-subtle); }
  .header .nav-menu .dropdown-menu { position:static; display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:8px; width:100%; min-width:0; margin:6px 0 0; padding:0; border:0; background:transparent; box-shadow:none; opacity:1; visibility:visible; transform:none; }
  .header .nav-menu .dropdown-item { min-height:44px; padding:9px 10px; font-size:.9rem; }
  .hero-container { grid-template-columns:minmax(0,1.1fr) minmax(280px,.85fr); gap:32px; }
  .container,.gp-container { width:calc(100% - 48px) !important; }
  .training-stats-wrapper { width:100%; }
  .training-stats-grid { width:100%; max-width:none !important; grid-template-columns:repeat(3,minmax(0,1fr)) !important; }
  .training-stats-grid .stat-card { grid-template-columns:38px minmax(0,1fr) !important; grid-template-rows:auto auto; align-items:center; gap:6px 10px; padding:12px !important; }
  .training-stats-grid .stat-icon { grid-column:1; grid-row:1 / span 2; }
  .training-stats-grid .stat-number { grid-column:2; grid-row:1; justify-self:start; }
  .training-stats-grid .stat-label { grid-column:2; grid-row:2; font-size:.84rem; line-height:1.4; }
  .certs-grid { grid-template-columns:repeat(3,minmax(0,1fr)) !important; }
  .feedback-grid { grid-template-columns:repeat(2,minmax(0,1fr)); }
}

/* Preserve readable three-card metrics when desktop zoom reduces the CSS
   viewport into tablet width, without changing the phone layout. */
@media (min-width:768px) and (max-width:1024px) {
  .training-stats-wrapper { width:100%; max-width:none; }
  .training-stats-grid { display:grid !important; width:100%; max-width:none !important; grid-template-columns:repeat(3,minmax(0,1fr)) !important; gap:12px !important; }
  .training-stats-grid .stat-card { display:grid !important; grid-template-columns:38px minmax(0,1fr) !important; grid-template-rows:auto auto; align-items:center; justify-items:start; gap:6px 10px; min-width:0; padding:12px !important; text-align:start; }
  .training-stats-grid .stat-icon { grid-column:1; grid-row:1 / span 2; width:36px; height:36px; }
  .training-stats-grid .stat-icon svg { width:27px; height:27px; }
  .training-stats-grid .stat-number { grid-column:2; grid-row:1; justify-self:start; min-width:0; font-size:clamp(1.2rem,2vw,1.55rem) !important; }
  .training-stats-grid .stat-label { grid-column:2; grid-row:2; min-width:0; font-size:clamp(.78rem,1.15vw,.9rem); line-height:1.4; overflow-wrap:normal; }
}

/* Tablet and desktop refinements; phone composition remains untouched. */
@media (min-width:768px) {
  section[id] { scroll-margin-top:calc(var(--header-height,76px) + 18px); }
  #training-programs > .container > .section-subtitle {
    max-width:none;
    margin-inline:0;
    text-align:start;
  }
  .marquee-stack .marquee-ticker-track { animation-duration:78s; }
  .marquee-stack .marquee-row-two .marquee-ticker-track { animation-duration:86s; }

  .dropdown-toggle .dropdown-arrow {
    display:inline-block;
    width:8px;
    height:8px;
    margin-inline-start:3px;
    border-right:2px solid currentColor;
    border-bottom:2px solid currentColor;
    font-size:0;
    line-height:0;
    transform:rotate(45deg) translateY(-2px);
    transition:transform .2s ease;
  }
  .nav-dropdown:hover .dropdown-arrow,
  .nav-dropdown.active .dropdown-arrow {
    transform:rotate(225deg) translate(-2px,-1px);
  }

  .certs-grid {
    width:min(100%,1000px);
    max-width:1000px;
    margin-inline:auto;
    grid-template-columns:repeat(3,minmax(0,1fr)) !important;
    gap:18px !important;
  }
  .cert-img-container {
    height:auto !important;
    max-height:190px;
    aspect-ratio:16/10 !important;
  }
  .cert-img-container img { object-fit:contain !important; padding:10px; }

  .gallery-grid {
    width:min(100%,1120px);
    margin-inline:auto;
  }
  .gallery-grid .static-featured-card .gallery-img-container {
    aspect-ratio:16/10 !important;
  }
  .gallery-grid .static-featured-card .gallery-img {
    object-fit:contain !important;
    object-position:center !important;
    background:var(--bg-surface);
  }
  .gallery-grid .gallery-card:not(.static-featured-card) .gallery-img-container {
    aspect-ratio:4/3 !important;
    height:auto !important;
  }
  .gallery-grid .gallery-card:not(.static-featured-card) .gallery-img {
    object-fit:contain !important;
    background:var(--bg-surface);
  }

  .book-layout { width:min(100%,980px); }
  .book-cover-wrapper {
    width:clamp(200px,18vw,260px);
    height:auto !important;
    aspect-ratio:2/3;
  }
  .book-cover { object-fit:contain !important; background:var(--bg-surface); }
}

/* Replace browser-default triangles and text glyphs with consistent chevrons. */
.cert-details > summary {
  display:inline-flex;
  align-items:center;
  gap:9px;
  list-style:none;
  font-weight:700;
}
.cert-details > summary::-webkit-details-marker { display:none; }
.cert-details > summary::after {
  content:"";
  width:8px;
  height:8px;
  flex:0 0 8px;
  border-right:2px solid currentColor;
  border-bottom:2px solid currentColor;
  transform:rotate(45deg) translateY(-2px);
  transition:transform .2s ease;
}
.cert-details[open] > summary::after { transform:rotate(225deg) translate(-2px,-1px); }
.gp-details-disclosure > summary::after {
  content:"";
  background-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%23C48BFF' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
  background-position:center;
  background-repeat:no-repeat;
  background-size:14px;
}

/* Keep the requested proof ticker moving even when the OS asks to reduce
   motion. The slow linear loop is subtle and must not be paused by hover. */
.marquee-stack .marquee-ticker-track {
  animation-name:marqueeTickerRtl !important;
  animation-duration:50s !important;
  animation-timing-function:linear !important;
  animation-iteration-count:infinite !important;
  animation-play-state:running !important;
}
.marquee-stack .marquee-row-two .marquee-ticker-track {
  animation-name:marqueeTickerRtl !important;
  animation-duration:54s !important;
  animation-direction:reverse !important;
}
@keyframes marqueeSeamlessLtr {
  from { transform:translate3d(0,0,0); }
  to { transform:translate3d(calc(-1 * var(--ticker-distance)),0,0); }
}
@keyframes marqueeSeamlessRtl {
  from { transform:translate3d(calc(-1 * var(--ticker-distance)),0,0); }
  to { transform:translate3d(0,0,0); }
}
@media (min-width:768px) {
  .marquee-stack .marquee-ticker-track { animation-duration:78s !important; }
  .marquee-stack .marquee-row-two .marquee-ticker-track { animation-duration:86s !important; }
  .experience-show-more::after {
    content:"" !important;
    width:9px;
    height:9px;
    flex:0 0 9px;
    border-right:2px solid currentColor;
    border-bottom:2px solid currentColor;
    transform:rotate(45deg) translateY(-2px);
    transition:transform .2s ease;
  }
  .experience-show-more[aria-expanded="true"]::after {
    transform:rotate(225deg) translate(-2px,-1px);
  }
}
