/*
 * CEC Evaporator Theme - responsive layer
 * Breakpoints (identical to 04_Design_System.md): 1200 / 1024 / 900 / 640 / 480 / 360
 * Target sizes tested: 1920x1080, 1440x900, 1366x768, 1280x800, 1024x768,
 * 834x1194, 768x1024, 480x800, 430x932, 414x896, 390x844, 375x812, 360x800.
 */

/* ---------- >=1200: nothing extra, container caps at 1200px ---------- */

/* ---------- <=1200px ---------- */
@media (max-width:1200px){
  :root{--cec-gutter:22px;--section-y:84px;}
  .cec-menu>li>a{padding-inline:10px;font-size:13px;}
  .cec-header__inner{gap:14px;}
  .cec-brand__logo{height:38px;max-width:180px;}
  .cec-hero h1{font-size:46px;}
}

/* ---------- <=1024px (tablet landscape / small laptop) ---------- */
@media (max-width:1024px){
  :root{--cec-gutter:20px;--section-y:72px;--cec-grid-gap:20px;}
  h1{font-size:40px;}
  h2{font-size:30px;}
  .cec-grid--4{grid-template-columns:repeat(2,minmax(0,1fr));}
  .cec-workflow{grid-template-columns:repeat(3,minmax(0,1fr));}
  .cec-process-grid{grid-template-columns:repeat(3,minmax(0,1fr));}
  .cec-steps{grid-template-columns:repeat(3,minmax(0,1fr));gap:20px;}
  .cec-steps--6{grid-template-columns:repeat(3,minmax(0,1fr));}
  .cec-cert-strip{grid-template-columns:repeat(2,minmax(0,1fr));}
  .cec-footer__grid{grid-template-columns:repeat(2,minmax(0,1fr));gap:30px;}
  .cec-layout-with-sidebar{grid-template-columns:minmax(0,1fr) 270px;gap:28px;}
  .cec-company-intro__grid,.cec-overview__grid,.cec-product-intro__grid,.cec-structure__grid,.cec-featured__grid{gap:32px;}
  .cec-hero{min-height:520px;}
  .cec-hero h1{font-size:42px;}
  .cec-hero__lead{font-size:16px;}
  .cec-page-banner h1,.cec-page-banner .cec-page-banner__title{font-size:38px;}
  .cec-table th[scope="row"]{width:34%;}
}

/* ---------- <=900px: mobile navigation switch ---------- */
@media (max-width:900px){
  :root{--section-y:64px;}
  .cec-topbar{height:auto;min-height:30px;}
  .cec-topbar__inner{height:auto;min-height:30px;padding-block:5px;flex-wrap:wrap;gap:4px 12px;}
  .cec-topbar__tagline{white-space:normal;font-size:11px;}
  .cec-topbar__contact{font-size:11px;gap:12px;}
  .cec-header__inner{height:64px;}
  .cec-nav-desktop,.cec-header__cta{display:none;}
  .cec-menu-toggle{display:block;}
  .cec-mobile-cta-bar{display:block;position:fixed;left:0;right:0;bottom:0;z-index:150;background:#FFF;border-top:1px solid var(--cec-line);padding:8px 16px;box-shadow:0 -2px 12px rgba(10,37,64,.08);}
  .cec-mobile-cta-bar .btn{width:100%;min-height:44px;}
  body{padding-bottom:62px;}
  .cec-lightbox{padding:14px;}
  .cec-cta-band{padding-block:48px;}
  .cec-cta-band__inner{gap:24px;}
  .cec-cta-band__actions{width:100%;}
  .cec-cta-band__actions .btn{flex:1 1 auto;}
  .cec-layout-with-sidebar{grid-template-columns:1fr;}
  .cec-layout-with-sidebar__side{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:18px;}
  .cec-layout-with-sidebar__side .cec-widget{margin-bottom:0;}
  .cec-company-intro__grid,.cec-overview__grid,.cec-product-intro__grid,.cec-structure__grid,.cec-featured__grid{grid-template-columns:1fr;}
  .cec-product-intro__grid--reverse .cec-product-intro__media{order:0;}
  .cec-company-intro__badge{right:12px;bottom:-14px;padding:12px 16px;}
  .cec-company-intro__badge strong{font-size:24px;}
  .cec-structure__media{order:-1;}
  .cec-hero{min-height:480px;}
  .cec-hero__inner{padding-block:64px;}
  .cec-hero h1{font-size:38px;}
  .cec-page-banner{min-height:250px;}
  .cec-page-banner h1,.cec-page-banner .cec-page-banner__title{font-size:34px;}
  .cec-page-banner__sub{font-size:15px;}
  .cec-grid--3{grid-template-columns:repeat(2,minmax(0,1fr));}
  .cec-gallery{grid-template-columns:repeat(2,minmax(0,1fr));}
  .cec-stats{grid-template-columns:repeat(2,minmax(0,1fr));}
  .cec-form__grid{gap:16px;}
  .cec-form-section__head h2{font-size:26px;}
  .cec-footer__grid{padding-block:48px 32px;}
  html{scroll-padding-top:80px;}
}

/* ---------- <=768px (tablet portrait) ---------- */
@media (max-width:768px){
  .cec-grid--4,.cec-grid--3,.cec-grid--2{grid-template-columns:repeat(2,minmax(0,1fr));}
  .cec-workflow{grid-template-columns:repeat(2,minmax(0,1fr));}
  .cec-process-grid{grid-template-columns:repeat(2,minmax(0,1fr));}
  .cec-steps,.cec-steps--6{grid-template-columns:repeat(2,minmax(0,1fr));}
  .cec-cert-grid{grid-template-columns:repeat(2,minmax(0,1fr));}
  .cec-structure__list{grid-template-columns:repeat(2,minmax(0,1fr));}
  .cec-table-wrap{position:relative;}
  .cec-table-wrap::after{content:"Swipe to view the full table \2192";display:block;position:sticky;left:0;bottom:0;background:var(--cec-bg-alt);border-top:1px solid var(--cec-line);color:var(--cec-steel);font-size:11px;padding:6px 12px;text-align:right;}
  .cec-article__head h1{font-size:32px;}
  .cec-footer__grid{grid-template-columns:repeat(2,minmax(0,1fr));}
  .cec-footer__bottom-inner{flex-direction:column;align-items:flex-start;}
}

/* ---------- <=640px (phones) ---------- */
@media (max-width:640px){
  :root{--cec-gutter:16px;--section-y:56px;--cec-grid-gap:16px;}
  body{font-size:15px;}
  h1{font-size:30px;}
  h2{font-size:25px;}
  h3{font-size:18px;}
  .section-head{margin-bottom:32px;}
  .section-head--left,.section-head{text-align:left;}
  .cec-eyebrow{font-size:11px;letter-spacing:.12em;}
  .cec-grid--4,.cec-grid--3,.cec-grid--2,.cec-cert-strip,.cec-gallery,.cec-stats,.cec-workflow,.cec-process-grid,.cec-steps,.cec-steps--6,.cec-structure__list,.cec-footer__grid,.cec-layout-with-sidebar__side{grid-template-columns:1fr;}
  .cec-hero{min-height:auto;}
  .cec-hero::before{background:linear-gradient(180deg,rgba(7,28,49,.90),rgba(7,28,49,.78));}
  .cec-hero__inner{padding-block:64px 56px;}
  .cec-hero h1{font-size:32px;max-width:none;}
  .cec-hero__lead{font-size:15px;margin-bottom:26px;}
  .cec-hero__actions{flex-direction:column;align-items:stretch;}
  .cec-hero__actions .btn{width:100%;}
  .cec-hero__facts{gap:8px;margin-top:32px;flex-direction:column;}
  .cec-page-banner{min-height:210px;}
  .cec-page-banner__inner{padding-block:40px;}
  .cec-page-banner h1,.cec-page-banner .cec-page-banner__title{font-size:28px;}
  .cec-page-banner__sub{font-size:14px;}
  .cec-breadcrumb{font-size:12px;}
  .cec-card__body{padding:18px;}
  .cec-app-card__body{padding:16px;}
  .cec-company-intro__badge{position:static;margin-top:12px;display:inline-flex;}
  .cec-cta-band h2{font-size:25px;}
  .cec-cta-band__actions{flex-direction:column;}
  .cec-cta-band__actions .btn{width:100%;}
  .cec-form__grid{grid-template-columns:1fr;}
  .cec-field--full{grid-column:auto;}
  .cec-form-section__head{text-align:left;}
  .cec-form__submit .btn{width:100%;}
  .cec-contact-cards{gap:16px;}
  .cec-footer__grid{padding-block:40px 24px;}
  .cec-footer__bottom-inner{font-size:11px;}
  .cec-footer__bottom nav{gap:12px;}
  .cec-lightbox{max-width:96vw;padding:10px;}
  .cec-lightbox img{max-height:70vh;}
  .cec-article__image img{aspect-ratio:4/3;}
  .cec-article__head h1{font-size:27px;}
  .cec-404__code{font-size:68px;}
  .cec-stat{padding:18px;}
  .cec-stat strong{font-size:30px;}
  .cec-workflow__item,.cec-process-card{padding:18px;}
  .cec-faq__item summary{padding:15px 16px;font-size:14px;}
  .cec-faq__answer{padding:0 16px 16px;}
  .cec-table{min-width:560px;font-size:13px;}
  .cec-table--3{min-width:700px;}
  .cec-table th[scope="row"],.cec-table td,.cec-table thead th{padding:10px 12px;}
  .cec-filter{gap:6px;margin-bottom:24px;}
  .cec-filter__link{padding:7px 12px;font-size:13px;}
  .cec-cert-strip img,.cec-cert-card__trigger img{height:180px;}
  .cec-topbar__contact{flex-wrap:wrap;}
  .cec-brand__wordmark{padding-left:8px;}
  .cec-brand__wordmark strong{font-size:15px;}
  .cec-brand__wordmark small{font-size:9px;}
  .cec-brand__logo{height:34px;max-width:140px;}
  .cec-mobile-cta-bar .btn{min-height:44px;}
}

/* ---------- <=480px ---------- */
@media (max-width:480px){
  :root{--section-y:48px;}
  h1{font-size:27px;}
  h2{font-size:23px;}
  .cec-hero h1{font-size:29px;}
  .cec-page-banner h1,.cec-page-banner .cec-page-banner__title{font-size:25px;}
  .cec-btn,.btn{font-size:14px;padding-inline:18px;}
  .cec-header__inner{gap:8px;}
  .cec-topbar__tagline{display:none;}
  .cec-topbar__inner{justify-content:flex-end;}
  .cec-topbar__contact{gap:10px;font-size:10px;}
  .cec-table-wrap{margin-inline:-16px;border-radius:0;border-left:0;border-right:0;}
  .cec-form__grid{gap:14px;}
  .cec-gallery__item figcaption,.cec-figure figcaption{font-size:12px;}
  .cec-footer__bottom-inner{gap:10px;}
  .cec-project-card{padding:18px;}
  .cec-project-card dl>div{flex-direction:column;gap:2px;}
  .cec-project-card dt{min-width:0;}
}

/* ---------- <=360px (narrow phones) ---------- */
@media (max-width:360px){
  :root{--cec-gutter:12px;--section-y:44px;}
  body{font-size:14px;}
  h1,.cec-hero h1{font-size:25px;}
  h2,.cec-cta-band h2{font-size:21px;}
  .cec-page-banner h1,.cec-page-banner .cec-page-banner__title{font-size:23px;}
  .cec-brand__logo{height:30px;max-width:120px;}
  .cec-brand__wordmark strong{font-size:13px;}
  .cec-brand__wordmark small{display:none;}
  .cec-eyebrow{font-size:10px;}
  .btn{padding-inline:14px;font-size:13px;}
  .cec-card__body{padding:15px;}
  .cec-stat strong{font-size:26px;}
  .cec-topbar__contact{font-size:9px;}
}

/* ---------- Safety: never allow horizontal overflow ---------- */
@media (max-width:1024px){
  html,body{max-width:100%;overflow-x:hidden;}
  .cec-main,.cec-header,.cec-footer,.cec-cta-band,.cec-topbar{overflow-x:clip;}
  .cec-table-wrap{max-width:100%;}
}


/* ---------- v2 responsive additions ---------- */
@media (max-width:1200px){
  .cec-cert-strip--6{grid-template-columns:repeat(3,minmax(0,1fr));}
  .cec-workflow--4{grid-template-columns:repeat(2,minmax(0,1fr));}
  .cec-steps--5{grid-template-columns:repeat(3,minmax(0,1fr));}
}
@media (max-width:1024px){
  .cec-structure__list--wide{grid-template-columns:repeat(2,minmax(0,1fr));}
  .cec-stage{grid-template-columns:1fr;}
  .cec-stage:nth-child(even){direction:ltr;}
  .cec-stage__media img{min-height:220px;max-height:320px;}
}
@media (max-width:900px){
  .cec-workflow--4{grid-template-columns:repeat(2,minmax(0,1fr));}
  .cec-steps--5{grid-template-columns:repeat(2,minmax(0,1fr));}
}
@media (max-width:640px){
  .cec-cert-strip--6,.cec-structure__list--wide,.cec-workflow--4,.cec-steps--5{grid-template-columns:repeat(2,minmax(0,1fr));}
  .cec-cert-strip--6 img{height:120px;}
  .cec-stage__body{padding:22px;}
  .cec-stage__body h3{font-size:20px;}
}
@media (max-width:420px){
  .cec-cert-strip--6,.cec-structure__list--wide,.cec-workflow--4,.cec-steps--5{grid-template-columns:1fr;}
}


/* ---------- v2.2 responsive ---------- */
@media (max-width:640px){
  .cec-stages-compact__item{grid-template-columns:42px minmax(0,1fr);gap:12px;padding:16px;}
  .cec-stages-compact__num{width:36px;height:36px;font-size:13px;}
  .cec-stages-compact h3{font-size:16px;}
}
