/* ============================================
   펫포털 - 모바일 스타일시트
   (max-width: 768px)
   ============================================ */

/* Header - Mobile */
.header-inner {
  padding: 0 15px;
}

.logo {
  font-size: 1.2rem;
}

.logo-icon {
  font-size: 1.5rem;
}

/* Navigation - Mobile */
.nav-desktop {
  display: none;
}

.menu-toggle {
  display: block;
}

/* Page Header - Mobile */
.page-header {
  padding: 25px 15px;
  margin: -30px -15px 20px;
}

.page-header h1 {
  font-size: 1.5rem;
}

.page-header p {
  font-size: 0.95rem;
}

/* Container - Mobile */
.container {
  padding: 0 15px;
}

/* Main - Mobile */
.main {
  padding: 20px 15px;
}

/* Grid - Mobile */
.grid-2,
.grid-3,
.grid-4 {
  grid-template-columns: repeat(2, 1fr);
  gap: 12px;
}

/* Stats - Mobile */
.stats-grid {
  grid-template-columns: repeat(2, 1fr);
  gap: 12px;
}

.stat-card {
  padding: 16px;
}

.stat-icon {
  font-size: 1.8rem;
}

.stat-value {
  font-size: 1.5rem;
}

.stat-label {
  font-size: 0.8rem;
}

/* Cards - Mobile */
.card-body {
  padding: 12px;
}

.card-title {
  font-size: 0.9rem;
}

.card-meta {
  font-size: 0.8rem;
}

.card-badge {
  padding: 3px 8px;
  font-size: 0.7rem;
}

/* Section - Mobile */
.section {
  margin-bottom: 30px;
}

.section-header {
  margin-bottom: 15px;
}

.section-title {
  font-size: 1.2rem;
}

.section-more {
  font-size: 0.9rem;
}

/* Filter - Mobile */
.filter-bar {
  padding: 15px;
  margin-bottom: 20px;
}

.filter-form {
  flex-direction: column;
  gap: 12px;
}

.filter-group {
  min-width: 100%;
}

.filter-group select,
.filter-group input {
  padding: 12px;
}

/* Buttons - Mobile */
.btn {
  padding: 10px 18px;
  font-size: 0.95rem;
}

/* Pagination - Mobile */
.pagination {
  flex-wrap: wrap;
  gap: 6px;
}

.pagination a,
.pagination span {
  min-width: 36px;
  height: 36px;
  padding: 0 10px;
  font-size: 0.9rem;
}

/* Detail Page - Mobile */
.detail-container {
  padding: 0 15px;
}

.detail-body {
  padding: 20px;
}

.detail-title {
  font-size: 1.4rem;
}

.detail-info {
  grid-template-columns: 1fr;
  gap: 10px;
}

.detail-info-item {
  flex-direction: column;
  gap: 3px;
}

.detail-info-label {
  font-size: 0.85rem;
}

.detail-actions {
  flex-direction: column;
}

.detail-actions .btn {
  width: 100%;
}

.detail-thumbnails img {
  width: 60px;
  height: 60px;
}

/* Map - Mobile */
.map-container {
  height: 350px;
  border-radius: var(--radius);
}

/* Footer - Mobile */
.footer {
  padding: 40px 0 25px;
}

.footer-inner {
  padding: 0 15px;
}

.footer-top {
  margin-bottom: 30px;
}

.footer-links {
  grid-template-columns: repeat(2, 1fr);
  gap: 25px;
}

.footer-col h4 {
  font-size: 0.95rem;
  margin-bottom: 12px;
}

.footer-col ul li {
  margin-bottom: 8px;
}

.footer-col ul li a {
  font-size: 0.9rem;
}

.footer-bottom {
  padding-top: 15px;
}

.copyright {
  font-size: 0.85rem;
}

.data-source {
  font-size: 0.75rem;
}

/* Ad Container - Mobile */
.ad-container {
  margin: 20px 0;
  min-height: 80px;
}

.ad-container.ad-horizontal {
  min-height: 60px;
}

.ad-container.ad-square {
  min-height: 200px;
}

/* Empty State - Mobile */
.empty-state {
  padding: 40px 15px;
}

.empty-icon {
  font-size: 3rem;
}

.empty-title {
  font-size: 1.1rem;
}

/* Utility - Mobile */
.hide-mobile {
  display: none !important;
}

.show-mobile {
  display: block !important;
}

/* ============================================
   Extra Small Devices (max-width: 480px)
   ============================================ */
@media screen and (max-width: 480px) {
  html {
    font-size: 14px;
  }
  
  .grid-2,
  .grid-3,
  .grid-4 {
    grid-template-columns: 1fr;
  }
  
  .stats-grid {
    grid-template-columns: 1fr 1fr;
  }
  
  .footer-links {
    grid-template-columns: 1fr;
    gap: 20px;
  }
  
  .pagination a,
  .pagination span {
    min-width: 32px;
    height: 32px;
    font-size: 0.85rem;
  }
}

/* ============================================
   Mobile Nav Active States
   ============================================ */
body.nav-open {
  overflow: hidden;
}

body.nav-open .nav-mobile {
  display: block;
}

body.nav-open .menu-icon {
  background: transparent;
}

body.nav-open .menu-icon::before {
  top: 0;
  transform: translateX(-50%) rotate(45deg);
}

body.nav-open .menu-icon::after {
  top: 0;
  transform: translateX(-50%) rotate(-45deg);
}

/* ============================================
   Touch Friendly
   ============================================ */
@media (hover: none) {
  .card:hover {
    transform: none;
    box-shadow: var(--shadow);
  }
  
  .has-dropdown:hover .dropdown-menu {
    display: none;
  }
}

/* ============================================
   Safe Area (for notched phones)
   ============================================ */
@supports (padding-top: env(safe-area-inset-top)) {
  .header {
    padding-top: env(safe-area-inset-top);
    height: calc(var(--header-height) + env(safe-area-inset-top));
  }
  
  .main {
    margin-top: calc(var(--header-height) + env(safe-area-inset-top));
  }
  
  .footer {
    padding-bottom: calc(25px + env(safe-area-inset-bottom));
  }
}
/* ============================================
   추가 스타일 - 기존 mobile.css 하단에 추가
   ============================================ */

/* ============================================
   햄버거 메뉴 버튼 - 모바일 표시
   ============================================ */
.menu-toggle {
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  width: 44px;
  height: 44px;
  padding: 10px;
  background: none;
  border: none;
  cursor: pointer;
  z-index: 1001;
}

.menu-toggle span {
  display: block;
  width: 24px;
  height: 2px;
  background-color: #333;
  margin: 3px 0;
  transition: all 0.3s ease;
  border-radius: 2px;
}

/* ============================================
   모바일 하단 네비게이션 표시
   ============================================ */
.mobile-bottom-nav {
  display: flex;
}

/* 메인 콘텐츠 하단 여백 */
.main {
  padding-bottom: 80px;
}

/* 푸터 하단 여백 */
.footer {
  padding-bottom: 70px;
}

/* ============================================
   상단 광고 모바일 조정
   ============================================ */
.ad-top {
  margin-top: 70px;
  padding: 10px 15px;
}

.ad-bottom {
  margin-bottom: 70px;
}

/* ============================================
   사이드바 너비 조정 (작은 화면)
   ============================================ */
@media screen and (max-width: 375px) {
  .mobile-nav-sidebar {
    width: 260px;
    right: -260px;
  }

  .mobile-nav-sidebar.open {
    right: 0;
  }

  .mobile-bottom-label {
    font-size: 0.65rem;
  }

  .mobile-bottom-icon {
    font-size: 1.2rem;
  }
}
