/* ========================================
   Responsive Styles - 연세미래치과
   Fluid Typography(clamp) 기반 + 레이아웃 전환
   ======================================== */

/* === Tablet (max-width: 1024px) === */
@media (max-width: 1024px) {

  .container {
    padding: 0 20px;
  }

  /* ========================================
     Header - 태블릿 (데스크톱 동일 레이아웃, 폰트 축소)
     ======================================== */
  .header {
    height: 80px;
  }

  .header__nav {
    padding: 0 3% 0 3%;
  }

  .header__logo img {
    height: 44px;
  }

  /* 메뉴 링크 표시 (데스크톱과 동일) */
  .header__links {
    gap: 1.5rem;
  }

  .header__nav-link {
    font-size: 1.05rem;
  }

  /* 네이버예약 */
  .header__nav-link--naver {
    font-size: 0.875rem;
    padding: 8px 16px;
  }

  /* 전화번호 */
  .header__nav-link--phone {
    font-size: 1.05rem;
    white-space: nowrap;
  }

  /* 햄버거 - 태블릿에서 숨김 */
  .header__hamburger {
    display: none !important;
  }

  /* 모바일 메뉴 드롭다운 */
  .mobile-menu {
    display: none;
    flex-direction: column;
    background: linear-gradient(180deg, #0a3558, #0b4570);
    position: absolute;
    top: 100%;
    left: 0;
    width: 100%;
    z-index: 999;
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.3);
  }

  .mobile-menu.open {
    display: flex;
  }

  .mobile-menu__link {
    display: block;
    padding: 18px 24px;
    color: rgba(255, 255, 255, 0.9);
    font-size: 1.125rem;
    font-weight: var(--font-weight-medium);
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    text-align: center;
    transition: background 0.2s ease;
  }

  .mobile-menu__link:hover,
  .mobile-menu__link:active {
    background: rgba(255, 255, 255, 0.1);
  }

  .mobile-menu__link--phone {
    display: none;
  }

  /* 앵커 스크롤 오프셋 */
  section[id] {
    scroll-margin-top: 84px;
  }

  /* ========================================
     Hero
     ======================================== */
  .hero {
    margin-top: 80px;
  }

  .hero__video-wrap {
    height: 55vh;
    min-height: 350px;
  }

  /* ========================================
     단체사진
     ======================================== */
  .doctor-team__photo img {
    height: 500px;
  }

  .doctor-team__info {
    padding: 50px 20px;
  }

  /* ========================================
     책임진료
     ======================================== */
  .responsible-care__text {
    padding: 40px 20px 45px;
  }

  /* ========================================
     교정 카드 - 태블릿 4열
     ======================================== */
  .orthodontics__grid {
    padding: 0 16px 50px;
  }

  /* ========================================
     임플란트 - 데스크톱 동일 3열
     ======================================== */

  /* ========================================
     클리닉 인포 - 4열 유지
     ======================================== */
  /* ========================================
     의료진 - 데스크톱 동일 3열, 폰트 축소
     ======================================== */
  .doctor-card__credentials li {
    font-size: 0.8125rem;
  }

  /* ========================================
     오시는 길
     ======================================== */
  .location__info {
    grid-template-columns: repeat(3, 1fr);
    gap: var(--space-lg);
  }

  .location__map {
    height: 350px;
  }

  /* ========================================
     푸터 - 데스크톱 동일, 폰트 비례 축소
     ======================================== */
  .footer {
    padding-bottom: calc(var(--space-xl) + 80px);
  }

  .footer .container {
    padding: 0 5%;
  }

  .footer__phone {
    font-size: 1.5rem;
  }

  .footer__naver {
    font-size: 0.875rem;
    padding: 8px 20px;
  }

  .footer__address-main span {
    font-size: 0.875rem;
  }

  /* ========================================
     Side menu - 태블릿 하단 고정 바
     ======================================== */
  .side-menu {
    position: fixed;
    right: auto;
    left: 0;
    top: auto;
    bottom: 0;
    transform: none;
    flex-direction: row;
    width: 100%;
    border-radius: 0;
    box-shadow: 0 -6px 24px rgba(0, 0, 0, 0.4);
    z-index: 998;
  }

  /* 인스타그램 숨기기 */
  .side-menu__item--insta {
    display: none;
  }

  .side-menu__item {
    flex: 1;
    width: auto;
    height: 76px;
    border-radius: 0;
  }

  .side-menu__item::after {
    display: none;
  }

  .side-menu__item:hover {
    width: auto;
  }

  .side-menu__icon {
    font-size: 1.75rem;
    font-weight: var(--font-weight-extrabold);
    margin-bottom: 4px;
  }

  .side-menu__icon-svg {
    width: 26px;
    height: 26px;
    margin-bottom: 4px;
  }

  .side-menu__label {
    font-size: 0.8125rem;
    font-weight: var(--font-weight-bold);
  }
}

/* === Mobile (max-width: 768px) === */
@media (max-width: 768px) {

  .container {
    padding: 0 16px;
  }

  /* 앵커 스크롤 오프셋 - 모바일 헤더 높이 */
  section[id] {
    scroll-margin-top: 75px;
  }

  /* 모바일 애니메이션 - 블러 미리보기 + 스크롤 시 등장 */

  /* ========================================
     Header - 모바일 (로고 + 네이버 + 전화 + 햄버거)
     ======================================== */
  .header {
    height: 64px;
  }

  .header__nav {
    width: 100%;
    padding: 0 5%;
    align-items: center;
    justify-content: space-evenly;
  }

  .header__links {
    display: none;
  }

  .header__logo {
    display: flex;
    align-items: center;
    line-height: 1;
  }

  .header__logo img {
    height: 36px;
    vertical-align: middle;
  }

  .header__nav-link--naver {
    font-size: 0.675rem;
    padding: 5px 13px;
    line-height: 1;
    display: inline-flex;
    align-items: center;
  }

  .header__nav-link--phone {
    font-size: 0.875rem;
    white-space: nowrap;
    line-height: 1;
    display: inline-flex;
    align-items: center;
  }

  .header__hamburger {
    display: flex !important;
    width: 34px;
    height: 34px;
    align-items: center;
    justify-content: center;
    position: relative;
    top: -3px;
    margin-right: -3.5%;
  }

  .header__hamburger span {
    width: 19px;
    height: 2px;
  }

  /* 모바일 드롭다운 메뉴 */
  .mobile-menu {
    display: none;
    flex-direction: column;
    background: linear-gradient(180deg, #0a3558, #0b4570);
    position: absolute;
    top: 100%;
    left: 0;
    width: 100%;
    z-index: 999;
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.3);
  }

  .mobile-menu.open {
    display: flex;
  }

  .mobile-menu__link {
    display: block;
    padding: 16px 24px;
    color: rgba(255, 255, 255, 0.9);
    font-size: 1rem;
    font-weight: var(--font-weight-medium);
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    text-align: center;
    transition: background 0.2s ease;
  }

  .mobile-menu__link:hover,
  .mobile-menu__link:active {
    background: rgba(255, 255, 255, 0.1);
  }

  .mobile-menu__link--phone {
    display: none;
  }

  /* ========================================
     Hero (비디오 배경)
     ======================================== */
  .hero {
    margin-top: 64px;
  }

  .hero__video-wrap {
    height: 45vh;
    min-height: 280px;
  }

  .hero__subtitle-bar {
    padding: 24px 16px 32px;
  }

  .hero__title {
    font-size: 1.5rem;
  }

  /* ========================================
     Doctor Team (단체사진) - 사진 위 자막 오버랩
     ======================================== */
  .doctor-team {
    position: relative;
  }

  .doctor-team__photo img {
    height: 360px;
  }

  .doctor-team__info {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    padding: 30px 16px 24px;
    background: linear-gradient(to top, rgba(10, 20, 50, 0.9) 0%, rgba(10, 20, 50, 0.6) 60%, transparent 100%);
  }

  .doctor-team__title {
    font-size: 1.25rem;
    white-space: nowrap;
  }

  .doctor-team__desc {
    font-size: 0.75rem;
    word-break: keep-all;
  }

  /* ========================================
     대표원장 책임진료
     ======================================== */
  .responsible-care__text {
    padding: 30px 16px 35px;
  }

  .responsible-care__sub {
    font-size: 1rem;
    word-break: keep-all;
  }

  .responsible-care__desc {
    font-size: 0.8125rem;
    word-break: keep-all;
    line-height: 1.8;
  }

  /* ========================================
     야간진료
     ======================================== */
  .night-care {
    padding: 50px 16px;
    word-break: keep-all;
  }

  .night-care__title,
  .night-care__desc {
    white-space: nowrap;
  }

  /* ========================================
     교정 - 모바일 4열 유지 (카드 축소)
     ======================================== */
  .orthodontics__header {
    padding: 16px 16px 8px;
  }

  .orthodontics__grid {
    grid-template-columns: repeat(4, 1fr);
    gap: 10px;
    padding: 0 8px 16px;
  }

  .ortho-card__hex {
    width: 70px;
    height: 70px;
    border-radius: 16px;
  }

  .ortho-card__label {
    font-size: 0.75rem;
    white-space: nowrap;
  }

  /* ========================================
     임플란트 - 간격 80% 축소
     ======================================== */
  .implant {
    padding: 16px 0;
  }

  .implant__title {
    margin-bottom: 12px;
  }

  .implant__cards {
    grid-template-columns: 1fr;
    gap: var(--space-sm);
  }

  .implant__card-text {
    padding: 12px 16px;
  }

  /* ========================================
     클리닉 인포
     ======================================== */
  .clinic-info {
    padding: 10px 16px;
  }

  .clinic-info__sub {
    margin-bottom: 4px;
    font-size: 0.8rem;
  }

  .clinic-info__title {
    margin-bottom: 8px;
  }

  .clinic-info__icons {
    grid-template-columns: repeat(2, 1fr);
    gap: var(--space-sm);
  }

  .clinic-info__icon-hex {
    width: 104px;
    height: 104px;
  }

  .clinic-info__icon-hex svg {
    width: 55px;
    height: 55px;
  }

  .clinic-info__icon-label {
    font-size: 0.8rem;
    white-space: nowrap;
  }

  .clinic-info__icon-label {
    font-weight: var(--font-weight-bold);
  }

  /* ========================================
     의료진
     ======================================== */
  .doctors__grid {
    grid-template-columns: 1fr;
    gap: var(--space-2xl);
  }

  /* ========================================
     진료시간
     ======================================== */
  .hours__title {
    white-space: nowrap;
  }

  .hours__row {
    flex-direction: row;
    gap: var(--space-md);
    padding: 10px 0;
    text-align: center;
    white-space: nowrap;
    justify-content: center;
  }

  .hours__day {
    font-size: 1.125rem;
    min-width: auto;
    text-align: center;
    white-space: nowrap;
  }

  .hours__time {
    font-size: 1.125rem;
    min-width: auto;
    text-align: center;
    color: rgba(255, 255, 255, 0.6);
    white-space: nowrap;
  }

  .hours__photo {
    max-width: 100%;
  }

  .hours__photo img {
    border-radius: var(--radius-md);
  }

  /* ========================================
     오시는 길
     ======================================== */
  .location {
    padding: 24px 0;
  }

  .location .section-title {
    margin-bottom: var(--space-sm);
  }

  .location .section-subtitle {
    margin-bottom: var(--space-md);
  }

  .location__map {
    height: 250px;
    border-radius: var(--radius-md);
  }

  /* ========================================
     푸터
     ======================================== */
  .footer {
    padding: var(--space-md) 0 calc(var(--space-md) + 72px);
  }

  .footer__top {
    flex-direction: column;
    gap: var(--space-md);
    text-align: left;
    padding-bottom: var(--space-md);
  }

  .footer__contact {
    justify-content: flex-start;
  }

  .footer__phone {
    font-size: 1.375rem;
  }

  .footer__naver {
    align-self: center;
  }

  .footer__address-main {
    flex-direction: row;
    align-items: flex-start;
    gap: var(--space-sm);
  }

  .footer__address-main svg {
    flex-shrink: 0;
    margin-top: 2px;
  }

  .footer__address-main span {
    font-size: 0.875rem;
    text-align: left;
    line-height: 1.7;
    word-break: keep-all;
    white-space: normal;
  }

  .footer__bottom {
    font-size: 0.6875rem;
    line-height: 1.8;
    word-break: keep-all;
    padding: 0 8px;
    text-align: center;
  }

  /* Side menu - 모바일 하단 고정 바 */
  .side-menu {
    position: fixed;
    right: auto;
    left: 0;
    top: auto;
    bottom: 0;
    transform: none;
    flex-direction: row;
    width: 100%;
    border-radius: 0;
    box-shadow: 0 -6px 24px rgba(0, 0, 0, 0.4);
    z-index: 998;
  }

  /* 인스타그램 숨기기 */
  .side-menu__item--insta {
    display: none;
  }

  .side-menu__item {
    flex: 1;
    width: auto;
    height: 68px;
    border-radius: 0;
  }

  .side-menu__item::after {
    display: none;
  }

  .side-menu__item:hover {
    width: auto;
  }

  .side-menu__icon {
    font-size: 1.5rem;
    font-weight: var(--font-weight-extrabold);
    margin-bottom: 4px;
  }

  .side-menu__icon-svg {
    width: 24px;
    height: 24px;
    margin-bottom: 4px;
  }

  .side-menu__label {
    font-size: 0.75rem;
    font-weight: var(--font-weight-bold);
    letter-spacing: 0.01em;
  }
}

/* === Small Mobile (max-width: 480px) === */
@media (max-width: 480px) {

  .header__logo img {
    height: 32px;
  }

  .header__nav-link[href^="tel:"] {
    font-size: 0.8rem;
  }

  .hero__video-wrap {
    height: 40vh;
    min-height: 240px;
  }

  .hero__subtitle-bar {
    padding: 20px 12px 24px;
  }

  .doctor-team__photo img {
    height: 240px;
  }

  .ortho-card__hex {
    width: 60px;
    height: 60px;
    border-radius: 14px;
  }

  .ortho-card__label {
    font-size: 0.6875rem;
  }

  .footer__phone {
    font-size: 1.25rem;
  }
}

/* === Print === */
@media print {
  .header,
  .side-menu {
    display: none;
  }

  .hero {
    margin-top: 0;
    background: none;
    color: var(--color-text);
  }

  body {
    font-size: 12pt;
  }
}
