/* 감동비뇨의학과 Unified Responsive Stylesheet (Desktop untouched > 1024px) */

.gd-mobile-view {
  display: none;
}

#gd-m-header,
#gd-m-drawer-backdrop,
#gd-m-bottom-bar {
  display: none;
}

@media (max-width: 1024px) {
  html,
  body {
    max-width: 100vw !important;
    overflow-x: hidden !important;
    overflow-y: auto !important;
    height: auto !important;
  }

  /* Hide fixed 1700px desktop header & desktop floating side quick menus */
  #sh_hd_wrapper,
  .site-header,
  .site-logo,
  .site-menu,
  #fp-nav,
  .quick-cta,
  #quick_menu,
  div[style*="position: fixed"][style*="width: 90px"],
  div[style*="right: 80px"][style*="z-index: 99"],
  div[style*="position: fixed"][style*="right: 0"],
  div[style*="position: fixed"][style*="right:0"],
  div[style*="position:fixed"][style*="right:0"],
  div[style*="position: fixed"][style*="right: 20px"],
  div[style*="position: fixed"][style*="right: 30px"],
  div[style*="position: fixed"][style*="right: 1%"] {
    display: none !important;
  }

  html.fp-enabled,
  html.fp-enabled body {
    overflow: visible !important;
    overflow-x: hidden !important;
    overflow-y: auto !important;
    height: auto !important;
  }

  body {
    padding-top: 56px !important;
    padding-bottom: 64px !important;
  }

  /* Mobile Sticky Header */
  #gd-m-header {
    display: flex !important;
    align-items: center;
    justify-content: space-between;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    height: 56px;
    padding: 0 14px;
    background: #0d0d0d;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    z-index: 99980;
    box-sizing: border-box;
    font-family: "Pretendard", "Noto Sans KR", -apple-system, sans-serif;
  }

  #gd-m-header .gd-m-logo img {
    height: 28px;
    width: auto;
    display: block;
  }

  #gd-m-header .gd-m-actions {
    display: flex;
    align-items: center;
    gap: 8px;
  }

  #gd-m-header .gd-m-tel {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    background: #FEC63A;
    color: #111;
    font-size: 12px;
    font-weight: 800;
    padding: 6px 10px;
    border-radius: 999px;
    text-decoration: none;
    white-space: nowrap;
  }

  #gd-m-header .gd-m-menu-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 38px;
    height: 38px;
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.16);
    border-radius: 8px;
    color: #fff;
    cursor: pointer;
    padding: 0;
  }

  /* Mobile Slide-out Drawer */
  #gd-m-drawer-backdrop {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.6);
    z-index: 99990;
    backdrop-filter: blur(2px);
  }
  #gd-m-drawer-backdrop.open {
    display: block !important;
  }

  #gd-m-drawer {
    position: fixed;
    top: 0;
    right: 0;
    bottom: 0;
    width: min(86vw, 340px);
    background: #fff;
    color: #111;
    display: flex;
    flex-direction: column;
    overflow-y: auto;
    font-family: "Pretendard", "Noto Sans KR", -apple-system, sans-serif;
    box-shadow: -8px 0 32px rgba(0, 0, 0, 0.25);
  }

  .gd-m-drawer-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 14px 16px;
    background: #111;
    color: #fff;
  }
  .gd-m-drawer-head img {
    height: 24px;
    width: auto;
  }
  .gd-m-drawer-close {
    width: 34px;
    height: 34px;
    border: 0;
    background: rgba(255, 255, 255, 0.12);
    color: #fff;
    border-radius: 6px;
    font-size: 20px;
    line-height: 1;
    cursor: pointer;
  }

  .gd-m-drawer-auth {
    display: flex;
    gap: 8px;
    padding: 12px 16px;
    background: #faf9f6;
    border-bottom: 1px solid #ece8df;
  }
  .gd-m-drawer-auth a {
    flex: 1;
    text-align: center;
    padding: 9px 10px;
    border-radius: 6px;
    font-size: 13px;
    font-weight: 700;
    text-decoration: none;
  }
  .gd-m-auth-primary {
    background: #b2853f;
    color: #fff;
  }
  .gd-m-auth-outline {
    background: #fff;
    color: #111;
    border: 1px solid #d6d3d1;
  }

  .gd-m-drawer-nav {
    flex: 1;
    padding: 8px 0;
  }
  .gd-m-acc-item {
    border-bottom: 1px solid #f1f1f1;
  }
  .gd-m-acc-trigger {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 13px 18px;
    background: #fff;
    border: 0;
    font-size: 15px;
    font-weight: 700;
    color: #1c1917;
    text-align: left;
    cursor: pointer;
    text-decoration: none;
    box-sizing: border-box;
  }
  .gd-m-acc-panel {
    display: none;
    background: #fafaf9;
    padding: 4px 0 8px;
  }
  .gd-m-acc-item.open .gd-m-acc-panel {
    display: block;
  }
  .gd-m-acc-panel a {
    display: block;
    padding: 9px 26px;
    font-size: 13.5px;
    color: #44403c;
    text-decoration: none;
  }
  .gd-m-acc-panel a:hover {
    color: #b2853f;
    background: #f5f0e6;
  }

  .gd-m-drawer-langs {
    display: flex;
    gap: 8px;
    padding: 14px 16px;
    border-top: 1px solid #eee;
    background: #faf9f6;
  }
  .gd-m-drawer-langs a {
    flex: 1;
    text-align: center;
    padding: 7px 0;
    border-radius: 5px;
    border: 1px solid #e5e5e5;
    background: #fff;
    font-size: 12px;
    font-weight: 600;
    color: #333;
    text-decoration: none;
  }

  /* Mobile Bottom Sticky CTA Bar */
  #gd-m-bottom-bar {
    display: grid !important;
    grid-template-columns: repeat(4, 1fr);
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    height: 60px;
    background: #111;
    border-top: 1px solid rgba(255, 255, 255, 0.12);
    z-index: 99975;
    padding-bottom: env(safe-area-inset-bottom, 0px);
    font-family: "Pretendard", "Noto Sans KR", -apple-system, sans-serif;
  }
  #gd-m-bottom-bar a {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 3px;
    color: #f5f5f4;
    text-decoration: none;
    font-size: 11px;
    font-weight: 600;
    border-right: 1px solid rgba(255, 255, 255, 0.08);
  }
  #gd-m-bottom-bar a:last-child {
    border-right: 0;
  }
  #gd-m-bottom-bar a.gd-cta-kakao {
    background: #FEE500;
    color: #191919;
  }
  #gd-m-bottom-bar a.gd-cta-tel {
    background: #b2853f;
    color: #fff;
  }

  /* Auth pill position above bottom bar on mobile */
  #gd-auth-pill {
    bottom: 70px !important;
    left: 10px !important;
    font-size: 11px !important;
    padding: 6px 10px !important;
  }

  /* Responsive Popup */
  #pop_div1 {
    left: 50% !important;
    right: auto !important;
    top: 68px !important;
    transform: translateX(-50%) !important;
    width: min(92vw, 380px) !important;
    height: auto !important;
    z-index: 99985 !important;
  }
  #pop_div1 img {
    width: 100% !important;
    height: auto !important;
  }

  /* Responsive Footer */
  footer#footer {
    width: 100% !important;
    padding: 28px 18px 36px !important;
    box-sizing: border-box !important;
  }
  footer#footer .footer_inn {
    flex-direction: column !important;
    gap: 16px !important;
    padding: 0 !important;
  }
  footer#footer .logo {
    margin: 0 !important;
    width: auto !important;
  }
  footer#footer .f_box_wrap {
    float: none !important;
    margin: 0 !important;
    width: 100% !important;
  }
  footer#footer .txt {
    white-space: normal !important;
    line-height: 1.65 !important;
    word-break: keep-all !important;
  }

  /* General fluid images & containers */
  img {
    max-width: 100%;
    height: auto;
  }

  /* Remove desktop header top offset on SSR pages & stack SSR forms cleanly */
  main > div[style*="padding-top: 85px"] {
    padding-top: 0 !important;
  }

  .login_wrap {
    width: calc(100% - 28px) !important;
    margin: 24px auto 40px !important;
    padding: 28px 20px !important;
  }
  .loginCon li {
    flex-direction: column !important;
  }
  .loginCon li .login_btn {
    width: 100% !important;
    height: 46px !important;
  }

  .join-container,
  .inq-form-box,
  .res-box,
  .write-wrap,
  .board-wrap,
  .rev-wrap {
    max-width: 100% !important;
    margin: 20px auto 40px !important;
    padding: 20px 16px !important;
    box-sizing: border-box !important;
  }

  .join-table,
  .join-table tbody,
  .join-table tr,
  .join-table th,
  .join-table td,
  .write-table,
  .write-table tbody,
  .write-table tr,
  .write-table th,
  .write-table td {
    display: block !important;
    width: 100% !important;
    box-sizing: border-box !important;
  }
  .join-table th,
  .write-table th {
    padding: 10px 12px 6px !important;
    border-bottom: 0 !important;
  }
  .join-table td,
  .write-table td {
    padding: 6px 12px 14px !important;
  }
  .join-table input[type="text"],
  .join-table input[type="password"],
  .join-table input[type="number"] {
    max-width: 100% !important;
  }

  .field-grid,
  .cat-grid {
    grid-template-columns: 1fr !important;
  }

  .board-top,
  .rev-top {
    flex-direction: column !important;
    align-items: stretch !important;
    gap: 12px !important;
  }
  .btn-write,
  .btn-rev-write {
    width: 100% !important;
    box-sizing: border-box !important;
  }

  table.inq-table {
    font-size: 13px !important;
  }
  table.inq-table th:nth-child(2),
  table.inq-table td:nth-child(2) {
    display: none !important;
  }
  table.inq-table th,
  table.inq-table td {
    padding: 10px 6px !important;
  }
}

/* Switch PC body -> Mobile-optimized body/images at <= 768px */
@media (max-width: 768px) {
  .gd-has-mobile .gd-pc-view {
    display: none !important;
  }
  .gd-has-mobile .gd-mobile-view {
    display: block !important;
    width: 100% !important;
  }
  .gd-mobile-view img {
    display: block;
    width: 100% !important;
    height: auto !important;
  }
  .gd-mobile-view video {
    display: block;
    width: 100% !important;
    height: auto !important;
  }
}
