/* ===== 모바일 전용 ===== */
@media (max-width: 576px) {
  /* 메뉴는 숨김, 햄버거는 보임 */
  /* ===== header ========================================*/
  header nav {
    display: none;
  }

  .nav-toggle {
    display: inline-flex;
    width: 3.2rem;
    height: 3.2rem;
  }

  /* 헤더 컨테이너 기준으로 정렬이 먹도록 */
  header .container {
    position: relative;
    padding: 2.4rem 2rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
  }

  header .logo {
    width: 9.2rem;
    height: 2.8rem;
    display: flex;
    align-items: center;
  }

  /* ===== menu-modal(햄버거 버튼 클릭 시 발생) ========================================*/
  .menu-modal {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.45);
    display: none; /* 기본 숨김 */
    z-index: 10000;
  }

  /* 모달 박스 */

  .menu-container {
    display: flex;
    position: absolute;
    top: 0;
    right: 0;
    overflow: hidden;
    background-color: #263140;
    width: 70%;
    height: 100vh;
  }
  .arrow-btn {
    display: flex;
    padding: 2.2rem 0 0 2rem;
    background-color: transparent;
    border: none;
    cursor: pointer;
  }
  .menu-list {
    display: flex;
    flex-direction: column;
    gap: 3rem;
    margin: 12rem 19.2rem 0 5rem;
    font-size: 1.6rem;
    font-weight: 700;
  }

  .menu-list a {
    display: block;
    color: #fff;
    text-decoration: none;
    line-height: 1.2;
    text-align: left;
  }

  .menu-list .btn-download {
    margin-top: 2rem;
    display: inline-flex; /* 가로로 가운데 정렬 */
    align-items: center;
    justify-content: center;
    padding: 1.1rem 2.4rem;
    border-radius: 4rem;
    background: var(--orange);
    color: #fff;
    font-weight: 700;
    cursor: pointer;
    line-height: 1; /* 세로로 딱 맞게 */
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.2);
    align-self: flex-start; /* 리스트에서 왼쪽 정렬 유지 */
    text-decoration: none; /* 혹시 상속된 underline 제거 */
  }

  /* ===== main / 히어로 ========================================*/
  .hero-heading {
    text-align: center;
    margin-bottom: 3rem;
  }

  .hero-container {
    display: flex;
    flex-direction: column; /* 위아래로 쌓기 */
    align-items: center; /* 가로(교차축) 가운데 */
    justify-content: center; /* 세로(주축) 가운데 */
    text-align: center; /* 안의 텍스트들도 가운데 */
    gap: 2rem; /* 텍스트와 이미지 간 간격 */
    padding-block: 4rem 0;
  }

  .hero-text {
    text-align: center;
    margin: 0 auto;
  }

  .hero-photo {
    margin: 0;
    align-self: center;
  }

  .hero-photo img {
    /* 가로만 유동, 세로는 비율로 자동 */
    width: clamp(197px, calc(197px + 11.354vw), 415px);
    height: auto; /* ← 세로 고정 해제 */
    aspect-ratio: 415 / 766; /* 비율 유지 (있으면 좋음) */
    object-fit: contain; /* 부모 안에서 잘리지 않게 */
    min-width: 0; /* 데스크톱에서 준 min-width 해제 */
    max-height: 80vh; /* 선택: 화면 높이 넘지 않게 안전장치 */
  }

  /* 소개 섹션 + 갤러리 좌우 패딩 */
  #about .main-container {
    padding-left: 3.2rem;
    padding-right: 3.2rem;
    padding-bottom: 0;
    letter-spacing: 0.4px;
  }

  #about .copy h2 {
    font-size: 2.4rem;
    margin-bottom: 2rem;
  }
  .main-container {
    margin: 0;
  }
  .main-photo img {
    margin-bottom: 4rem;
  }

  #about .copy p {
    font-size: 1.4rem;
    margin-bottom: 6rem;
  }

  /* ===== gallery ========================================*/

  .gallery-container-text {
    display: flex;
    flex-direction: column;
    margin: 0 0 10rem;
    width: 100%;
  }

  .gallery-container-text p {
    text-align: justify; /* 양쪽 정렬 */
    width: 100%; /* 부모 너비 꽉 채움 */
    max-width: 100%; /* 혹시 데스크톱 제한이 있으면 해제 */
  }
  .gallery-container-text .btn {
    align-self: flex-end;
    margin-top: 1.2rem;
  }

  /* ===== subscirbe ========================================*/
  #subscribe {
    position: relative;
    /* 배경 높이 확보(배경높이(340px) + 카드 높이 절반) */
  }

  .subscribe-bg {
    position: absolute;
    height: 24rem; /* subscribe-container 높이의 끝에서 36px 위 */
  }

  .scroll-top-btn {
    display: none;
  }
  .subscribe-form {
    flex-direction: column; /* 핵심 */
    align-items: stretch;
    gap: 1.2rem;
    background: transparent; /* 입력창이 자체 배경 갖도록 */
    padding: 0;
    border-radius: 0;
    width: 100%;
  }

  /* 기존 아이콘 숨기고, 입력창 배경아이콘으로 대체 */
  .subscribe-icon {
    display: none;
  }

  .subscribe-form input {
    width: 100%;
    border-radius: 6rem;
    padding: 1.4rem 1.6rem 1.4rem 4.8rem; /* 아이콘 자리 */
    background: #fff url("../images/mail.svg") no-repeat 1.6rem center;
    background-size: 2rem;
    font-size: 1.4rem;
  }

  .subscribe-btn {
    align-self: flex-start; /* 버튼을 왼쪽 정렬 */
    padding: 1.2rem 2.4rem;
  }
  /* 모달 내용 */
  .modal-content {
    background: url("../images/mobile-modal.png") no-repeat center/cover;
    width: 30rem;
    height: 30rem;
    aspect-ratio: 1/1;
  }

  .modal-title {
    font-size: 2.4rem;
    margin-top: 12.6rem;
    margin-bottom: 1rem;
  }

  .modal-text {
    font-size: 1.4rem;
    margin: 0 5rem 2.8rem;
  }

  /* ===== footer ========================================*/
  .container-footer {
    display: grid;
    /* 왼쪽은 가능한 넓게 차지, 오른쪽 칸은 내용 크기에 맞춰서 */
    grid-template-columns: 1fr auto;
    /* 왼쪽 칸과 오른쪽 칸의 간격 */

    column-gap: 8.9rem;

    justify-items: start;
    padding: 3rem 2rem 3.2rem;
  }

  .container-footer .footer-logo {
    /*  첫번째 줄 왼쪽 칸 */
    grid-column: 1;
    grid-row: 1;
    align-self: left;
  }

  .container-footer .footer-logo img {
    display: block;
    width: 112px;
  }
  .container-footer .social {
    /* 두번째 줄 왼쪽 칸 */
    grid-column: 1;
    grid-row: 2;
    /* 한줄에 나란히 매치 */
    display: flex;
    /* 아이콘 간의 간격 */
    gap: 16px;
    list-style: none;
    padding: 0;
    margin: 0;
    width: 176px;
    align-items: center;
    margin-top: 50px;
  }
  .container-footer .social img {
    width: 32px;
    height: 32px;
  }
  .container-footer .mobile-menu {
    grid-column: 2;
    /* 오른쪽 칸에서 첫번째 줄부터 두번째 줄까지 차지*/
    grid-row: 1 / span 2;
    display: flex;
    flex-direction: column;
    /* 메뉴 항목 사이 간격 */
    gap: 16px;
    list-style: none;
    margin: 0;
    padding: 0;
    text-align: right;
    justify-content: space-between;
  }

  .container-footer .mobile-menu a {
    color: var(--placeholder-gray);
    text-decoration: none;
    font-size: 14px;
  }
}
