/* =====================
   모바일 전용 + 공통 스타일
   ===================== */

/* =====================
   공통 레이아웃/폰트/버튼/박스 스타일
   ===================== */
body {
  font-family: 'Noto Sans KR', sans-serif;
  margin: 0;
  padding: 0;
  background: #fff;
  color: #222;
}

h1, h2, h3, h4, h5, h6 {
  font-weight: 700;
  margin: 0 0 1rem 0;
  text-align: center;
}

.section-box {
  max-width: 1100px;
  margin: 2rem auto;
  padding: 2rem 1rem;
  background: #fafafa;
  border-radius: 16px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.04);
}

.btn-more, .main-btn, .btn-map, .btn-copy {
  display: inline-block;
  padding: 0.2em 1.5em;
  margin: 0.5em 0.2em;
  background: linear-gradient(135deg, #374151 0%, #6b7280 100%);
  color: #fff;
  border: none;
  border-radius: 24px;
  font-size: 1rem;
  font-weight: 500;
  text-decoration: none;
  cursor: pointer;
  transition: all 0.3s ease;
  box-shadow: 0 4px 12px rgba(55, 65, 81, 0.3);
  text-align: center;
}
.btn-more:hover, .main-btn:hover, .btn-map:hover, .btn-copy:hover {
  background: linear-gradient(135deg, #4b5563 0%, #9ca3af 100%);
  transform: translateY(-3px) scale(1.05);
  box-shadow: 0 6px 20px rgba(55, 65, 81, 0.4);
}

/* 모바일 하단 버튼 호버 효과 */
.mobile-bottom-btns .main-btn:hover,
.mobile-bottom-btns a.main-btn:hover {
  background: linear-gradient(135deg, #4b5563 0%, #9ca3af 100%) !important;
  transform: translateY(-3px) scale(1.05) !important;
  box-shadow: 0 6px 20px rgba(55, 65, 81, 0.4) !important;
}

#logo {
  font-size: 2rem;
  font-weight: bold;
  letter-spacing: 2px;
  color: #111;
}

/* SNS/블로그 아이콘 공통 */
#sidebar-sns {
  position: fixed;
  top: 40%;
  left: 0;
  z-index: 100;
  background: rgba(255,255,255,0.95);
  border-radius: 0 16px 16px 0;
  box-shadow: 2px 2px 8px rgba(0,0,0,0.08);
  padding: 0.5em 0.3em;
  transition: top 0.6s ease-out, transform 0.3s ease; /* 더 부드러운 전환 효과 */
  animation: float-mobile 3s ease-in-out infinite; /* 모바일용 떠다니는 효과 */
}
#sidebar-sns ul {
  list-style: none;
  margin: 0;
  padding: 0;
}
#sidebar-sns li {
  margin: 0.7em 0;
}
#sidebar-sns img {
  width: 32px;
  height: 32px;
  border-radius: 8px;
  transition: transform 0.2s;
}
#sidebar-sns a:hover img {
  transform: scale(1.15);
}

/* 모바일용 자연스러운 떠다니는 애니메이션 */
@keyframes float-mobile {
  0%, 100% {
    transform: translateY(0px);
  }
  50% {
    transform: translateY(-6px); /* 모바일에서는 더 작은 움직임 */
  }
}

/* 호버 시 애니메이션 일시정지 */
#sidebar-sns:hover {
  animation-play-state: paused;
  transform: translateY(-2px) scale(1.02); /* 모바일에서는 더 작은 효과 */
}

/* 마이진소개 페이지 모바일 스타일 */
.intro-section {
  padding: 2rem 1rem;
}

.intro-image-container {
  margin-bottom: 2rem;
}

.intro-profile-image {
  max-width: 300px;
  border-radius: 16px;
  box-shadow: 0 6px 24px rgba(0,0,0,0.1);
}

.intro-title {
  font-size: 2rem;
  margin-bottom: 1.5rem;
}

.brand-name {
  font-size: 2.2rem;
  letter-spacing: 1px;
}

.tagline {
  font-size: 1.4rem;
}

.main-intro {
  font-size: 1.1rem;
  padding: 1rem;
  margin-bottom: 1.5rem;
}

.philosophy {
  font-size: 1rem;
  padding: 1rem;
  margin-bottom: 2rem;
}

.intro-highlights, .intro-experience {
  margin-bottom: 1.5rem;
  padding: 1rem;
}

.intro-highlights h3, .intro-experience h3 {
  font-size: 1.2rem;
  margin-bottom: 0.8rem;
}

.intro-bullets li, .experience-list li {
  font-size: 1rem;
  padding: 0.4rem 0;
}

/* 맨위로 버튼 */
#to-top {
  position: fixed;
  right: 2vw;
  /* Safe Area를 고려한 위치 조정 */
  bottom: calc(2vw + env(safe-area-inset-bottom));
  background: linear-gradient(135deg, #374151 0%, #6b7280 100%);
  color: #fff;
  border: none;
  border-radius: 50%;
  width: 48px;
  height: 48px;
  font-size: 1.1rem;
  box-shadow: 0 4px 12px rgba(55, 65, 81, 0.3);
  cursor: pointer;
  display: none;
  z-index: 200;
  transition: all 0.3s ease;
}

/* 기타 공통 스타일 */
.profile-img {
  width: 120px;
  height: 120px;
  border-radius: 50%;
  object-fit: cover;
  margin-right: 1.5rem;
  border: 3px solid #eee;
}
.intro-profile {
  display: flex;
  align-items: center;
  gap: 1.5rem;
}
.intro-text {
  flex: 1;
}

.tattoo-cards {
  display: flex;
  flex-wrap: wrap;
  gap: 1.2rem;
  justify-content: center;
}
.tattoo-card {
  background: #fff;
  border-radius: 12px;
  box-shadow: 0 1px 4px rgba(0,0,0,0.06);
  overflow: hidden;
  width: 140px;
  text-align: center;
  transition: transform 0.18s;
  cursor: pointer !important;
  text-decoration: none !important;
  color: inherit !important;
  position: relative;
  display: block !important;
  pointer-events: auto !important;
  z-index: 10 !important;
}
.tattoo-card img {
  width: 100%;
  height: 100px;
  object-fit: cover;
}
.tattoo-card span {
  display: block;
  padding: 0.7em 0;
  font-weight: 500;
}
.tattoo-card:hover {
  transform: scale(1.06);
  box-shadow: 0 4px 16px rgba(0,0,0,0.10);
}

/* 카드 오버레이 효과 */
.card-overlay {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0,0,0,0.7);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transition: opacity 0.3s ease;
  padding: 0.5em;
  text-align: center;
}

.tattoo-card:hover .card-overlay {
  opacity: 1;
}

.card-overlay p {
  margin: 0;
  font-size: 0.85rem;
  font-weight: 500;
  line-height: 1.3;
}

/* 타투 상세 페이지 스타일 */
.breadcrumb {
  margin-bottom: 1.5rem;
  font-size: 0.9rem;
  color: #666;
}

.breadcrumb a {
  color: #222;
  text-decoration: none;
}

.breadcrumb a:hover {
  text-decoration: underline;
}

.breadcrumb span {
  color: #888;
}

.section-description {
  font-size: 1.1rem;
  color: #666;
  margin-bottom: 2rem;
  line-height: 1.6;
}

.tattoo-detail {
  margin-top: 2rem;
}

.tattoo-info {
  margin-bottom: 3rem;
}

.tattoo-info h3 {
  color: #222;
  margin-bottom: 1rem;
  font-size: 1.4rem;
}

.tattoo-info h4 {
  color: #444;
  margin: 1.5rem 0 0.8rem 0;
  font-size: 1.1rem;
}

.tattoo-info p {
  line-height: 1.7;
  color: #555;
  margin-bottom: 1.5rem;
}

.tattoo-info ul {
  margin: 0.5rem 0 1.5rem 0;
  padding-left: 1.5rem;
}

.tattoo-info li {
  margin-bottom: 0.5rem;
  line-height: 1.6;
  color: #555;
}

.tattoo-gallery {
  margin-bottom: 3rem;
}

.tattoo-gallery h3 {
  color: #222;
  margin-bottom: 1.5rem;
  font-size: 1.4rem;
}

.gallery-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 1rem;
  margin-bottom: 2rem;
}

.gallery-item {
  background: #fff;
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 2px 8px rgba(0,0,0,0.08);
  transition: transform 0.2s ease;
}

.gallery-item:hover {
  transform: translateY(-4px);
  box-shadow: 0 4px 16px rgba(0,0,0,0.12);
}

.gallery-item img {
  width: 100%;
  height: 150px;
  object-fit: cover;
}

.consultation-section {
  background: #f8f8f8;
  padding: 1.5rem;
  border-radius: 12px;
  text-align: center;
}

.consultation-section h3 {
  color: #222;
  margin-bottom: 1rem;
  font-size: 1.4rem;
}

.consultation-section p {
  color: #666;
  line-height: 1.6;
  margin-bottom: 1.5rem;
}

.consultation-buttons {
  display: flex;
  gap: 1rem;
  justify-content: center;
  flex-wrap: wrap;
}

.portfolio-thumbs {
  display: flex;
  gap: 1.2rem;
  justify-content: center;
}
.portfolio-thumb {
  background: #fff;
  border-radius: 12px;
  box-shadow: 0 1px 4px rgba(0,0,0,0.06);
  overflow: hidden;
  width: 180px;
  text-align: center;
  transition: transform 0.18s;
}
.portfolio-thumb img {
  width: 100%;
  height: 120px;
  object-fit: cover;
}
.portfolio-thumb p {
  margin: 0.5em 0;
  font-size: 0.98rem;
}
.portfolio-thumb:hover {
  transform: scale(1.05);
  box-shadow: 0 4px 16px rgba(0,0,0,0.10);
}

.review-cards {
  display: flex;
  gap: 1.2rem;
  flex-wrap: wrap;
  justify-content: center;
}
.review-card {
  background: #fff;
  border-radius: 12px;
  box-shadow: 0 1px 4px rgba(0,0,0,0.06);
  width: 260px;
  padding: 1em;
  margin-bottom: 1em;
}
.review-imgs {
  display: flex;
  gap: 0.5em;
  margin-bottom: 0.7em;
}
.review-imgs img {
  width: 60px;
  height: 60px;
  border-radius: 8px;
  object-fit: cover;
}
.review-user {
  font-size: 0.95em;
  color: #888;
}

.faq-list {
  margin: 1em 0;
}
.faq-item {
  margin-bottom: 0.7em;
  border-bottom: 1px solid #eee;
}
.faq-question {
  background: none;
  border: none;
  font-size: 1.1em;
  font-weight: 600;
  color: #222;
  cursor: pointer;
  width: 100%;
  text-align: left;
  padding: 0.7em 0;
}
.faq-answer {
  display: none;
  padding: 0.5em 0 1em 1em;
  color: #444;
  font-size: 0.98em;
}

.location-tabs {
  display: flex;
  gap: 1em;
  margin-bottom: 1em;
  justify-content: center;
}
.tab-btn {
  background: #eee;
  border: none;
  border-radius: 16px 16px 0 0;
  padding: 0.7em 1.5em;
  font-size: 1em;
  cursor: pointer;
  font-weight: 500;
  transition: background 0.18s;
}
.tab-btn.active {
  background: #222;
  color: #fff;
}
.location-contents {
  background: #fff;
  border-radius: 0 0 16px 16px;
  box-shadow: 0 1px 4px rgba(0,0,0,0.06);
  padding: 1.5em;
}
.location-content {
  display: none;
}
.location-content.active {
  display: block;
}
.btn-map {
  margin-right: 0.5em;
}

footer {
  background: #374151 !important;
  color: #fff !important;
  text-align: center !important;
  padding: 1.5em 0 0.8em 0 !important;
  margin-top: 2em !important;
  /* Safe Area를 고려한 동적 여백 - 하단 버튼 높이 + Safe Area */
  margin-bottom: calc(50px + env(safe-area-inset-bottom)) !important;
  border-radius: 24px 24px 0 0 !important;
}
.footer-info {
  font-size: 0.95em !important;
  margin-bottom: 0.4em !important;
}
.footer-copy {
  font-size: 0.9em !important;
  color: #9ca3af !important;
}

/* =====================
   모바일 전용 스타일
   ===================== */

body {
  font-size: 1rem;
  background: #fff;
  margin-top: 70px; /* 네비게이션바 높이만큼 마진 추가 */
}

#main-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1rem 1.2rem;
  background: #fff;
  border-bottom: 1px solid #eee;
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  box-shadow: 0 2px 8px rgba(0,0,0,0.1);
  transition: all 0.3s ease;
}
#logo {
  font-size: 1.5rem;
  margin: 0;
}
#main-menu {
  display: none; /* 모바일에서는 메뉴 숨김 */
}
#hamburger-btn {
  display: block;
  background: none;
  border: none;
  font-size: 2rem;
  cursor: pointer;
}

/* 햄버거 메뉴 오픈 시 사이드바 메뉴 */
.mobile-menu {
  position: fixed;
  top: 0;
  right: 0;
  width: 80vw;
  max-width: 320px;
  height: 100vh;
  background: #fff;
  box-shadow: -2px 0 16px rgba(0,0,0,0.12);
  z-index: 200;
  padding: 2rem 1.5rem;
  display: flex;
  flex-direction: column;
  gap: 1.2rem;
  transform: translateX(100%);
  transition: transform 0.3s;
}
.mobile-menu.open {
  transform: translateX(0);
}
.mobile-menu ul {
  list-style: none;
  padding: 0;
  margin: 0;
}
.mobile-menu li {
  margin-bottom: 1.2rem;
}
.mobile-menu a {
  color: #222;
  font-size: 1.2rem;
  text-decoration: none;
  font-weight: 500;
}
.mobile-menu .submenu {
  margin-top: 0.5rem;
  margin-left: 1.2rem;
  display: none;
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.3s ease;
}

.mobile-menu .has-submenu.open > .submenu {
  display: block;
  max-height: 200px; /* 충분한 높이 */
}

/* 왼쪽 SNS 아이콘: 모바일에서는 작게, 중앙에 위치 */
#sidebar-sns {
  top: 50vh; /* 하단 고정 대신 중앙에 위치 */
  left: 0;
  border-radius: 0 16px 16px 0;
  box-shadow: 2px 2px 8px rgba(0,0,0,0.08);
  background: rgba(255,255,255,0.95);
  padding: 0.3em 0.2em;
  transition: top 0.6s ease-out, transform 0.3s ease; /* 부드러운 전환 효과 */
  animation: float-mobile 3s ease-in-out infinite; /* 모바일용 떠다니는 효과 */
}
#sidebar-sns img {
  width: 28px; /* 모바일에서는 더 작게 */
  height: 28px;
  border-radius: 6px; /* 모바일에서는 더 작은 둥근 모서리 */
}

/* 모바일에서 SNS 아이콘 간격 조정 */
#sidebar-sns li {
  margin: 0.5em 0; /* 모바일에서는 더 작은 간격 */
}

/* 메인 환영 메시지 */
.main-welcome {
  text-align: center;
  padding: 2.5rem 1rem 1.5rem 1rem;
}
.main-btns {
  display: none; /* 모바일에서는 하단 고정 버튼만 노출 */
}
.mobile-bottom-btns {
  position: fixed;
  left: 0;
  bottom: 0;
  width: 100vw;
  background: #fff;
  box-shadow: 0 -2px 12px rgba(0,0,0,0.08);
  display: flex;
  justify-content: space-around;
  padding: 0.35em 0 0.7em 0;
  z-index: 300;
  /* iOS Safe Area 지원 - 하단 노치/홈 인디케이터 영역 자동 조정 */
  padding-bottom: calc(0.7em + env(safe-area-inset-bottom));
}
/* 모바일 하단 버튼 전용 스타일 - 최고 우선순위 */
.mobile-bottom-btns .main-btn,
.mobile-bottom-btns a.main-btn,
.mobile-bottom-btns a[href*="tel"],
.mobile-bottom-btns a[href*="sms"],
.mobile-bottom-btns a[href*="kakao"] {
  flex: 1 !important;
  margin: 0 0.15em !important;
  font-size: 0.8em !important;
  padding: 0.35em 0.6em !important;
  text-align: center !important;
  background: linear-gradient(135deg, #374151 0%, #6b7280 100%) !important;
  color: #fff !important;
  border: none !important;
  border-radius: 24px !important;
  text-decoration: none !important;
  cursor: pointer !important;
  transition: all 0.3s ease !important;
  letter-spacing: 0.3em !important;
  word-spacing: 0.2em !important;
  white-space: pre !important;
  box-shadow: 0 4px 12px rgba(55, 65, 81, 0.3) !important;
}

/* 마이진소개, 타투종류, 포트폴리오, 후기, FAQ, 오시는길: 세로 배치 */
.section-box {
  margin: 1.2rem 0.2rem;
  padding: 1.2rem 0.5rem;
  border-radius: 12px;
  text-align: center;
}
.intro-profile {
  flex-direction: column;
  align-items: center;
  text-align: center;
}
.profile-img {
  margin: 0 0 1rem 0;
}

.tattoo-cards, .portfolio-thumbs, .review-cards {
  flex-direction: column;
  gap: 1rem;
}
.portfolio-thumb, .review-card {
  width: 100%;
  max-width: 340px;
  margin: 0 auto;
}

/* FAQ 아코디언 모바일 */
.faq-question {
  font-size: 1.05em;
}

/* 오시는길 탭 버튼 모바일 */
.location-tabs {
  gap: 0.5em;
}
.tab-btn {
  font-size: 0.98em;
  padding: 0.5em 1em;
}

footer {
  font-size: 0.98em !important;
  padding: 1em 0 0.6em 0 !important;
  background: #374151 !important;
  /* Safe Area를 고려한 동적 여백 - 하단 버튼 높이 + Safe Area */
  margin-bottom: calc(50px + env(safe-area-inset-bottom)) !important;
  border-radius: 16px 16px 0 0 !important;
}

#to-top {
  width: 40px;
  height: 40px;
  font-size: 0.95em;
  right: 1vw;
  /* Safe Area를 고려한 위치 조정 */
  bottom: calc(8vh + env(safe-area-inset-bottom));
}
.intro-profile {
  display: flex;
  flex-direction: column;
  align-items: center;
  background: linear-gradient(180deg, #f8fafc 80%, #f0f4f8 100%);
  padding: 2rem 1rem;
  border-radius: 16px;
}
.profile-img {
  width: 100%;
  max-width: 300px;
  border-radius: 12px;
  border: 4px solid #dbeafe;
  margin-bottom: 1.5rem;
  box-shadow: 0 2px 10px rgba(0,0,0,0.06);
}
.intro-text h2 {
  font-size: 1.8rem;
  margin-bottom: 0.8rem;
  text-align: center;
}
.intro-text p {
  font-size: 1.05rem;
  line-height: 1.6;
  text-align: center;
  color: #444;
}

/* =====================
   마이진소개 페이지 모바일 스타일
   ===================== */
.intro-section {
  text-align: center;
  padding: 2rem 1rem;
}

.intro-image-container {
  margin-bottom: 2rem;
}

.intro-profile-image {
  width: 100%;
  max-width: 300px;
  height: auto;
  border-radius: 16px;
  box-shadow: 0 6px 24px rgba(0,0,0,0.1);
  border: 3px solid #f8f9fa;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.intro-profile-image:hover {
  transform: translateY(-3px);
  box-shadow: 0 8px 32px rgba(0,0,0,0.12);
}

.intro-text-container {
  max-width: 100%;
  margin: 0 auto;
}

.intro-title {
  margin-bottom: 1.5rem;
  font-size: 2rem;
  font-weight: 700;
  color: #222;
}

.brand-name {
  color: #333;
  font-size: 2.2rem;
  letter-spacing: 1px;
}

.tagline {
  color: #666;
  font-size: 1.4rem;
  font-weight: 500;
}

.intro-description {
  text-align: left;
  line-height: 1.6;
}

.main-intro {
  font-size: 1.1rem;
  color: #444;
  margin-bottom: 1.5rem;
  padding: 1rem;
  background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
  border-radius: 12px;
  border-left: 3px solid #007bff;
}

.philosophy {
  font-size: 1rem;
  color: #555;
  margin-bottom: 2rem;
  font-style: italic;
  padding: 1rem;
  background: #fff;
  border-radius: 12px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.06);
  border-left: 3px solid #28a745;
}

.intro-highlights, .intro-experience {
  margin-bottom: 1.5rem;
  padding: 1rem;
  background: #fff;
  border-radius: 12px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.06);
}

.intro-highlights h3, .intro-experience h3 {
  color: #333;
  font-size: 1.2rem;
  margin-bottom: 0.8rem;
  text-align: center;
  font-weight: 600;
}

.intro-bullets, .experience-list {
  list-style: none;
  padding: 0;
  margin: 0;
}

.intro-bullets li, .experience-list li {
  padding: 0.4rem 0;
  font-size: 1rem;
  color: #555;
  border-bottom: 1px solid #f0f0f0;
}

.intro-bullets li:last-child, .experience-list li:last-child {
  border-bottom: none;
}

.intro-bullets li {
  color: #28a745;
  font-weight: 500;
}

.experience-list li {
  color: #007bff;
  font-weight: 500;
}
