/* =========================================================
   HKCWCA — tablet & mobile layout layer
   tablet: <=1024px   mobile: <=767px
   ========================================================= */

/* ---------- Header (主頁 869 + 內頁 870) ---------- */
@media (max-width:1024px){
  body .elementor-location-header .e-con[data-id="77eff53"],
  body .elementor-location-header .e-con[data-id="0ea12f2"]{
    flex-direction:row !important;flex-wrap:nowrap !important;align-items:center !important;
    padding:10px 18px !important;margin-bottom:-76px !important;position:relative;min-height:76px;
  }
  body .elementor-location-header .e-con[data-id="61b2b3c"],
  body .elementor-location-header .e-con[data-id="ec218c8"]{
    width:auto !important;flex:0 0 auto !important;--width:auto;
  }
  body .elementor-location-header [data-id="254f15c"],
  body .elementor-location-header [data-id="1d15210"]{
    margin:0 !important;width:auto !important;max-width:none !important;--container-widget-width:auto;
  }
  body .elementor-location-header [data-id="254f15c"] img,
  body .elementor-location-header [data-id="1d15210"] img{height:56px !important;width:auto !important;max-width:none !important;}
  body .elementor-location-header .e-con[data-id="ef9d726"],
  body .elementor-location-header .e-con[data-id="d284b0f"]{
    width:auto !important;flex:1 1 auto !important;--width:auto;position:static !important;padding:0 !important;
    align-items:flex-end !important;justify-content:center !important;
  }
  body .elementor-location-header .elementor-widget-nav-menu{position:static !important;width:auto !important;padding:0 !important;}
  body .elementor-location-header .elementor-widget-nav-menu > .elementor-widget-container{position:static !important;}
  body .elementor-location-header .elementor-menu-toggle{
    margin-left:auto;width:44px;height:44px;border-radius:12px;background:rgba(255,255,255,.9) !important;
    color:#BB1F2E !important;box-shadow:0 3px 12px rgba(187,31,46,.15);display:flex;align-items:center;justify-content:center;
    font-size:22px !important;padding:0 !important;border:0 !important;
  }
  body .elementor-location-header .elementor-menu-toggle svg{fill:#BB1F2E !important;width:22px;height:22px;}
  body .elementor-location-header .elementor-menu-toggle.elementor-active{background:#BB1F2E !important;color:#fff !important;}
  body .elementor-location-header .elementor-menu-toggle.elementor-active svg{fill:#fff !important;}
  body .elementor-location-header nav.elementor-nav-menu--dropdown{
    position:absolute !important;left:12px !important;right:12px !important;top:calc(100% - 4px) !important;width:auto !important;
    background:#fff !important;border-radius:14px;box-shadow:0 14px 34px rgba(58,20,24,.18);overflow:hidden;z-index:1000;margin:0 !important;
  }
  body .elementor-location-header nav.elementor-nav-menu--dropdown .elementor-item{
    color:#3A1418 !important;text-shadow:none !important;font-family:'Noto Sans TC',sans-serif !important;font-size:16px !important;font-weight:500 !important;
    padding:15px 22px !important;border-bottom:1px solid #F6E0E3;background:#fff !important;justify-content:flex-start;
  }
  body .elementor-location-header nav.elementor-nav-menu--dropdown li:last-child .elementor-item{border-bottom:0;}
  body .elementor-location-header nav.elementor-nav-menu--dropdown .elementor-item.elementor-item-active,
  body .elementor-location-header nav.elementor-nav-menu--dropdown .elementor-item:hover{color:#BB1F2E !important;background:#FCEBEC !important;}
  body .elementor-location-header nav.elementor-nav-menu--dropdown .elementor-item.elementor-item-active{box-shadow:inset 4px 0 0 #BB1F2E;}
}
@media (max-width:767px){
  body .elementor-location-header .e-con[data-id="77eff53"],
  body .elementor-location-header .e-con[data-id="0ea12f2"]{padding:8px 14px !important;min-height:68px;margin-bottom:-68px !important;}
  body .elementor-location-header [data-id="254f15c"] img,
  body .elementor-location-header [data-id="1d15210"] img{height:48px !important;}
}

/* inner pages: header takes its own space on tablet/mobile */
@media (max-width:1024px){
  body .elementor-location-header .e-con[data-id="0ea12f2"]{margin-bottom:0 !important;}
}

/* ---------- 主頁 (page 15) ---------- */
@media (max-width:767px){
  /* about: 4 feature cards -> 2 x 2 */
  .elementor-15 .e-con[data-id="32a2604"]{display:grid !important;grid-template-columns:1fr 1fr;gap:12px !important;}
  .elementor-15 .e-con[data-id="32a2604"] > .e-con{width:auto !important;--width:auto;flex-direction:column !important;align-items:flex-start !important;padding:18px 14px !important;gap:8px !important;margin:0 !important;}
  .elementor-15 .e-con[data-id="32a2604"] > .e-con > .e-con{width:100% !important;--width:100%;padding:0 !important;}
  .elementor-15 .e-con[data-id="32a2604"] .elementor-heading-title{font-size:15px !important;}
  .elementor-15 .e-con[data-id="32a2604"] .elementor-widget-text-editor{font-size:12.5px !important;line-height:1.7 !important;}
}

/* ---------- 關於我們 (page 82) ---------- */
@media (max-width:1024px) and (min-width:768px){
  .elementor-82 .e-con[data-id="6111060"]{display:grid !important;grid-template-columns:repeat(3,1fr);gap:14px !important;}
  .elementor-82 .e-con[data-id="6111060"] > .e-con{width:auto !important;--width:auto;margin:0 !important;}
}
@media (max-width:767px){
  .elementor-82 .e-con[data-id="6111060"]{display:grid !important;grid-template-columns:1fr 1fr;gap:10px !important;}
  .elementor-82 .e-con[data-id="6111060"] > .e-con{width:auto !important;--width:auto;margin:0 !important;padding:16px 13px !important;}
  .elementor-82 .e-con[data-id="6111060"] > .e-con > .e-con{padding:0 !important;gap:6px !important;}
  .elementor-82 .e-con[data-id="6111060"] .elementor-heading-title{font-size:14.5px !important;line-height:1.45 !important;}
  .elementor-82 .e-con[data-id="6111060"] .elementor-widget-text-editor{font-size:12px !important;line-height:1.7 !important;}
}

/* member directory: 2 columns on phones */
@media (max-width:767px){
  .jet-listing-grid--507.grid-col-mobile-1{margin:0 -5px;}
  .jet-listing-grid--507.grid-col-mobile-1 > .jet-listing-grid__item{width:50% !important;max-width:50% !important;flex:0 0 50% !important;padding:5px !important;}
  .jet-listing-grid--507 .elementor-heading-title{font-size:15px !important;}
  .jet-listing-grid--507 .nm-cuisine,.jet-listing-grid--507 .jet-listing-dynamic-terms{font-size:11.5px !important;}
}
@media (max-width:1024px) and (min-width:768px){
  .jet-listing-grid--507.grid-col-tablet-2 > .jet-listing-grid__item{width:33.333% !important;max-width:33.333% !important;flex:0 0 33.333% !important;}
}

/* ---------- 活動 (events shortcode) ---------- */
@media (max-width:1024px){
  .nm-ev .nm-evwrap{align-items:stretch !important;}
  .nm-ev .nm-evmain{width:100%;}
}
@media (max-width:767px){
  .nm-ev .nm-evfilter{padding:10px 12px;gap:6px;overflow-x:auto;flex-wrap:nowrap;-webkit-overflow-scrolling:touch;scrollbar-width:none;}
  .nm-ev .nm-evfilter::-webkit-scrollbar{display:none;}
  .nm-ev .nm-evtab{flex:none;padding:7px 15px;}
  .nm-ev .nm-evside{order:-1;gap:0;}
  .nm-ev .nm-evside .nm-sbox:first-child{display:none;}
  .nm-ev .nm-evside .nm-sbox{padding:0;background:transparent;box-shadow:none;display:flex;gap:6px;overflow-x:auto;scrollbar-width:none;margin-bottom:14px;}
  .nm-ev .nm-evside .nm-sbox::-webkit-scrollbar{display:none;}
  .nm-ev .nm-evside .nm-sbox h4{display:none;}
  .nm-ev .nm-evside .nm-syr{flex:none !important;width:auto !important;border:1px solid #E6BFC5;background:#fff;border-radius:999px;padding:6px 14px;margin:0;font-size:12px;white-space:nowrap;}
  .nm-ev .nm-evside .nm-sbox{min-width:0 !important;flex:none !important;width:100%;}
  .nm-ev .nm-syr.on{background:#FCEBEC;border-color:#BB1F2E;}
  .nm-ev .nm-card{flex-direction:row !important;gap:12px;padding:12px;}
  .nm-ev .nm-cimg{width:96px !important;height:96px !important;}
  .nm-ev .nm-cbody h4{font-size:14px;margin-bottom:5px;}
  .nm-ev .nm-meta{gap:8px;font-size:11.5px;}
  .nm-ev .nm-note{font-size:12px;display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;overflow:hidden;}
  .nm-ev .nm-featl{min-height:190px;}
}

/* ---------- 廁藝交流 / 義務教學 / 課程 / 獎項 page titles ---------- */
@media (max-width:767px){
  .elementor-1100 .elementor-heading-title,.elementor-1101 .elementor-heading-title,.elementor-1102 .elementor-heading-title{word-break:keep-all;}
  .elementor-1100 h1.elementor-heading-title,.elementor-1101 h1.elementor-heading-title,.elementor-1102 h1.elementor-heading-title,
  .elementor-1100 h2.elementor-heading-title,.elementor-1101 h2.elementor-heading-title,.elementor-1102 h2.elementor-heading-title{font-size:28px !important;}
}

/* ---------- general mobile polish ---------- */
@media (max-width:767px){
  body{-webkit-text-size-adjust:100%;}
  .elementor-widget-button .elementor-button{min-height:40px;}
}

@media (max-width:1024px){ body .elementor-location-header .e-con[data-id="0ea12f2"]{margin-bottom:0 !important;} }

/* member cuisine tabs: one swipeable row on phones */
@media (max-width:767px){
  .nm-tabs{flex-wrap:nowrap !important;overflow-x:auto;justify-content:flex-start !important;padding:2px 2px 8px !important;scrollbar-width:none;-webkit-mask-image:linear-gradient(90deg,#000 88%,transparent);mask-image:linear-gradient(90deg,#000 88%,transparent);}
  .nm-tabs::-webkit-scrollbar{display:none;}
  .nm-tabs .nm-tab{flex:none !important;}
}

/* hide the theme's plain page title (pages have their own designed headings) */
@media (max-width:1024px){ body.page .page-header{display:none !important;} }

/* 廁藝交流 overview: image always above its text on phones */
@media (max-width:767px){
  .elementor-1103 .e-con[data-id="d07a84f"],.elementor-1103 .e-con[data-id="2b947ad"],.elementor-1103 .e-con[data-id="cbcc21b"]{order:-1;}
}

/* News page: remove desktop header-offset spacing */
@media (max-width:1024px){
  .elementor-79 .e-con[data-id="9d33efd"]{margin-top:0 !important;}
  .elementor-79 [data-id="ae62e69"]{margin-top:40px !important;}
}
@media (max-width:767px){
  .elementor-79 [data-id="ae62e69"]{margin-top:28px !important;}
}


/* =========================================================
   Footer (template 868) — tablet & mobile
   ========================================================= */
@media (max-width:1024px){
  .elementor-868 .e-con[data-id="19cabcd"]{padding:44px 32px 18px !important;}
  .elementor-868 .e-con[data-id="9107fd2"]{margin-bottom:0 !important;gap:32px !important;align-items:flex-start;}
  .elementor-868 .e-con[data-id="d4ed55a"],.elementor-868 .e-con[data-id="033ec82"],.elementor-868 .e-con[data-id="a193174"]{margin:0 !important;padding:0 !important;}
  .elementor-868 .e-con[data-id="033ec82"]{margin-top:14px !important;}
  .elementor-868 .e-con[data-id="a193174"]{margin-top:28px !important;gap:12px !important;}
  .elementor-868 [data-id="26e6f22"] .elementor-heading-title,
  .elementor-868 [data-id="fbac02a"] .elementor-heading-title{font-size:20px !important;font-weight:700 !important;color:#BB1F2E !important;line-height:1.4 !important;}
  .elementor-868 [data-id="26e6f22"] .elementor-heading-title:after,
  .elementor-868 [data-id="fbac02a"] .elementor-heading-title:after{content:'';display:block;width:32px;height:3px;border-radius:2px;background:#EC5251;margin-top:10px;}
  .elementor-868 [data-id="cd87e6e"] .elementor-icon-list-items{display:flex;flex-direction:column;gap:12px;}
  .elementor-868 [data-id="cd87e6e"] .elementor-icon-list-item{padding:0 !important;margin:0 !important;align-items:center !important;}
  .elementor-868 [data-id="cd87e6e"] .elementor-icon-list-item > a{display:flex;align-items:center;}
  .elementor-868 [data-id="cd87e6e"] .elementor-icon-list-icon{flex:none;width:34px;height:34px;border-radius:50%;background:#fff;display:flex !important;align-items:center;justify-content:center;margin-right:12px !important;padding:0 !important;box-shadow:0 2px 8px rgba(187,31,46,.10);}
  .elementor-868 [data-id="cd87e6e"] .elementor-icon-list-icon svg{width:14px !important;height:14px !important;fill:#BB1F2E !important;}
  .elementor-868 [data-id="cd87e6e"] .elementor-icon-list-icon i{font-size:14px !important;color:#BB1F2E !important;}
  .elementor-868 [data-id="cd87e6e"] .elementor-icon-list-text{font-size:14px !important;line-height:1.6 !important;color:#3A1418 !important;padding:0 !important;}
  .elementor-868 [data-id="cd87e6e"] a .elementor-icon-list-text{text-decoration:none;}
  .elementor-868 [data-id="9f686c9"] .elementor-social-icons-wrapper{display:flex;gap:12px;}
  .elementor-868 [data-id="9f686c9"] .elementor-grid-item{margin:0 !important;}
  .elementor-868 [data-id="9f686c9"] .elementor-social-icon{width:44px !important;height:44px !important;border-radius:50% !important;background:#fff !important;display:flex !important;align-items:center;justify-content:center;padding:0 !important;box-shadow:0 2px 8px rgba(187,31,46,.12);transition:background .2s,transform .2s;}
  .elementor-868 [data-id="9f686c9"] .elementor-social-icon svg{fill:#BB1F2E !important;width:18px !important;height:18px !important;}
  .elementor-868 [data-id="9f686c9"] .elementor-social-icon i{color:#BB1F2E !important;font-size:18px !important;}
  .elementor-868 [data-id="9f686c9"] .elementor-social-icon:hover{background:#BB1F2E !important;transform:translateY(-2px);}
  .elementor-868 [data-id="9f686c9"] .elementor-social-icon:hover svg{fill:#fff !important;}
  .elementor-868 [data-id="9f686c9"] .elementor-social-icon:hover i{color:#fff !important;}
  .elementor-868 .e-con[data-id="34d6261"]{width:100% !important;--width:100%;padding:0 !important;}
  .elementor-868 [data-id="4274119"]{width:100% !important;}
  .elementor-868 [data-id="4274119"] .elementor-custom-embed,.elementor-868 [data-id="4274119"] iframe{border-radius:14px;overflow:hidden;display:block;}
  .elementor-868 .e-con[data-id="7e8abe6"]{margin-top:28px !important;padding:0 !important;gap:0 !important;}
  .elementor-868 [data-id="ab42ee1"]{width:100% !important;}
  .elementor-868 [data-id="ab42ee1"] .elementor-divider-separator{border-top-color:#EBC3CA !important;border-top-width:1px !important;}
  .elementor-868 [data-id="4397ead"]{margin-top:0 !important;text-align:center;width:100%;}
  .elementor-868 [data-id="4397ead"],.elementor-868 [data-id="4397ead"] *{font-size:12px !important;color:#8F6B70 !important;text-align:center !important;}
}
@media (min-width:768px) and (max-width:1024px){
  .elementor-868 .e-con[data-id="9107fd2"]{flex-direction:row !important;flex-wrap:nowrap !important;}
  .elementor-868 .e-con[data-id="5168f70"]{width:44% !important;--width:44%;flex:0 0 44% !important;padding:0 !important;}
  .elementor-868 .e-con[data-id="5f0f38f"]{width:auto !important;--width:auto;flex:1 1 auto !important;padding:0 !important;}
  .elementor-868 [data-id="4274119"] iframe{height:300px !important;}
}
@media (max-width:767px){
  .elementor-868 .e-con[data-id="19cabcd"]{padding:40px 24px 16px !important;}
  .elementor-868 .e-con[data-id="9107fd2"]{flex-direction:column !important;gap:30px !important;align-items:stretch;}
  .elementor-868 .e-con[data-id="5168f70"],.elementor-868 .e-con[data-id="5f0f38f"]{width:100% !important;--width:100%;padding:0 !important;align-items:center !important;}
  .elementor-868 .e-con[data-id="d4ed55a"],.elementor-868 .e-con[data-id="033ec82"],.elementor-868 .e-con[data-id="a193174"]{align-items:center !important;text-align:center;width:100% !important;}
  .elementor-868 [data-id="26e6f22"] .elementor-heading-title:after,
  .elementor-868 [data-id="fbac02a"] .elementor-heading-title:after{margin-left:auto;margin-right:auto;}
  .elementor-868 [data-id="26e6f22"],.elementor-868 [data-id="fbac02a"]{text-align:center !important;width:100% !important;}
  .elementor-868 [data-id="cd87e6e"]{width:auto !important;max-width:100%;}
  .elementor-868 [data-id="cd87e6e"] .elementor-icon-list-items{align-items:flex-start;}
  .elementor-868 [data-id="cd87e6e"] .elementor-icon-list-text{text-align:left;}
  .elementor-868 [data-id="9f686c9"]{width:auto !important;}
  .elementor-868 [data-id="9f686c9"] .elementor-social-icons-wrapper{justify-content:center;}
  .elementor-868 [data-id="4274119"] iframe{height:200px !important;}
}
@media (max-width:1024px){ .elementor-868 [data-id="4397ead"] > .elementor-widget-container{margin:10px 0 0 !important;} .elementor-868 .e-con[data-id="7e8abe6"]{padding-bottom:6px !important;} }

/* ---------- Footer icons: same style on every screen size ---------- */
.elementor-868 [data-id="cd87e6e"] .elementor-icon-list-item{align-items:center !important;}
.elementor-868 [data-id="cd87e6e"] .elementor-icon-list-item > a{display:flex;align-items:center;}
.elementor-868 [data-id="cd87e6e"] .elementor-icon-list-icon{flex:none;width:34px;height:34px;border-radius:50%;background:#fff;display:flex !important;align-items:center;justify-content:center;margin-right:12px !important;padding:0 !important;box-shadow:0 2px 8px rgba(187,31,46,.10);}
.elementor-868 [data-id="cd87e6e"] .elementor-icon-list-icon svg{width:14px !important;height:14px !important;fill:#BB1F2E !important;}
.elementor-868 [data-id="cd87e6e"] .elementor-icon-list-icon i{font-size:14px !important;color:#BB1F2E !important;}
.elementor-868 [data-id="cd87e6e"] .elementor-icon-list-text{padding:0 !important;}
.elementor-868 [data-id="9f686c9"] .elementor-social-icons-wrapper{display:flex;gap:12px;}
.elementor-868 [data-id="9f686c9"] .elementor-grid-item{margin:0 !important;}
.elementor-868 [data-id="9f686c9"] .elementor-social-icon{width:44px !important;height:44px !important;border-radius:50% !important;background:#fff !important;display:flex !important;align-items:center;justify-content:center;padding:0 !important;box-shadow:0 2px 8px rgba(187,31,46,.12);transition:background .2s,transform .2s;}
.elementor-868 [data-id="9f686c9"] .elementor-social-icon svg{fill:#BB1F2E !important;width:18px !important;height:18px !important;}
.elementor-868 [data-id="9f686c9"] .elementor-social-icon i{color:#BB1F2E !important;font-size:18px !important;}
.elementor-868 [data-id="9f686c9"] .elementor-social-icon:hover{background:#BB1F2E !important;transform:translateY(-2px);}
.elementor-868 [data-id="9f686c9"] .elementor-social-icon:hover svg{fill:#fff !important;}
.elementor-868 [data-id="9f686c9"] .elementor-social-icon:hover i{color:#fff !important;}

/* ---------- Footer on phones: plan B (info left, small map right) ---------- */
@media (max-width:767px){
  .elementor-868 .e-con[data-id="19cabcd"]{padding:30px 18px 12px !important;}
  .elementor-868 .e-con[data-id="9107fd2"]{flex-direction:row !important;flex-wrap:nowrap !important;gap:14px !important;align-items:flex-start !important;}
  .elementor-868 .e-con[data-id="5168f70"]{width:auto !important;--width:auto;flex:1 1 auto !important;min-width:0;align-items:flex-start !important;}
  .elementor-868 .e-con[data-id="5f0f38f"]{width:130px !important;--width:130px;flex:0 0 130px !important;align-items:stretch !important;padding-top:4px !important;}
  .elementor-868 .e-con[data-id="d4ed55a"],.elementor-868 .e-con[data-id="033ec82"],.elementor-868 .e-con[data-id="a193174"]{align-items:flex-start !important;text-align:left !important;}
  .elementor-868 .e-con[data-id="033ec82"]{margin-top:10px !important;}
  .elementor-868 .e-con[data-id="a193174"]{margin-top:18px !important;gap:8px !important;}
  .elementor-868 [data-id="26e6f22"],.elementor-868 [data-id="fbac02a"]{text-align:left !important;}
  .elementor-868 [data-id="26e6f22"] .elementor-heading-title,.elementor-868 [data-id="fbac02a"] .elementor-heading-title{font-size:17px !important;}
  .elementor-868 [data-id="26e6f22"] .elementor-heading-title:after,.elementor-868 [data-id="fbac02a"] .elementor-heading-title:after{margin:7px 0 0 !important;width:26px;}
  .elementor-868 [data-id="cd87e6e"]{width:100% !important;}
  .elementor-868 [data-id="cd87e6e"] .elementor-icon-list-items{gap:9px !important;}
  .elementor-868 [data-id="cd87e6e"] .elementor-icon-list-icon{width:28px !important;height:28px !important;margin-right:9px !important;}
  .elementor-868 [data-id="cd87e6e"] .elementor-icon-list-icon svg{width:12px !important;height:12px !important;}
  .elementor-868 [data-id="cd87e6e"] .elementor-icon-list-text{font-size:12.5px !important;line-height:1.55 !important;word-break:break-all;}
  .elementor-868 [data-id="9f686c9"] .elementor-social-icons-wrapper{justify-content:flex-start !important;gap:10px !important;}
  .elementor-868 [data-id="9f686c9"] .elementor-social-icon{width:38px !important;height:38px !important;}
  .elementor-868 [data-id="9f686c9"] .elementor-social-icon svg{width:16px !important;height:16px !important;}
  .elementor-868 [data-id="4274119"] iframe{height:130px !important;width:130px !important;}
  .elementor-868 .e-con[data-id="7e8abe6"]{margin-top:18px !important;}
}
@media (min-width:768px){ .elementor-868 [data-id="9f686c9"] .elementor-social-icons-wrapper{justify-content:flex-start !important;} }

/* ---------- Desktop header (>=1025px): logo & menu aligned to content edges ---------- */
@media (min-width:1025px){
  body .elementor-location-header .e-con[data-id="77eff53"],
  body .elementor-location-header .e-con[data-id="0ea12f2"]{
    padding-left:40px !important;
    padding-right:40px !important;
    align-items:center !important;
  }
  body .elementor-location-header .e-con[data-id="61b2b3c"],
  body .elementor-location-header .e-con[data-id="ec218c8"]{
    width:auto !important;--width:auto;flex:0 0 auto !important;justify-content:center !important;
  }
  body .elementor-location-header [data-id="254f15c"],
  body .elementor-location-header [data-id="1d15210"]{
    margin:0 !important;width:auto !important;max-width:none !important;--container-widget-width:auto;text-align:left !important;
  }
  body .elementor-location-header [data-id="254f15c"] img,
  body .elementor-location-header [data-id="1d15210"] img{height:64px !important;width:auto !important;max-width:none !important;}
  body .elementor-location-header .e-con[data-id="ef9d726"],
  body .elementor-location-header .e-con[data-id="d284b0f"]{
    width:auto !important;--width:auto;flex:1 1 auto !important;padding-right:0 !important;
  }
}