/* K-Taste Route - Eatwith Inspired Responsive Design System */
/* Mobile-First Approach: 모바일 → 태블릿 → PC 순서로 확장 */
/* PC: 비교·탐색·신뢰 / Mobile: 직관·속도·행동 */

:root {
  /* Base Colors - Eatwith Style */
  --color-bg: #FFFFFF;
  --color-bg-soft: #F7F7F7;
  --color-border: #EDEDED;

  /* Text Colors - Eatwith Palette */
  --color-text-main: #1F1F1F;
  --color-text-sub: #6B6B6B;
  --color-text-muted: #9A9A9A;

  /* Accent (CTA) - Warm Coral (not gold) */
  --color-primary: #E85C4A;
  --color-primary-hover: #D94A38;

  /* Status */
  --color-success: #2E7D32;
  --color-warning: #C47A00;

  /* Minimal Shadows - Almost invisible */
  --shadow-minimal: 0 1px 3px rgba(0,0,0,0.04);
  --shadow-card: 0 2px 8px rgba(0,0,0,0.06);
}

/* ========================================
   MOBILE FIRST (Base: < 768px)
   1열 구조, 버튼 100% 폭, 짧은 스크롤
   ======================================== */

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: 'Pretendard', 'Noto Sans KR', -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Apple SD Gothic Neo', 'Malgun Gothic', sans-serif;
  color: var(--color-text-main);
  background: var(--color-bg);
  line-height: 1.6;
  font-size: 15px;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* Mobile Typography */
h1, h2, h3, h4, h5, h6 {
  font-weight: 600;
  line-height: 1.3;
  color: var(--color-text-main);
  letter-spacing: -0.01em;
}

h1 {
  font-size: 28px;
  line-height: 1.25;
}

h2 {
  font-size: 22px;
  line-height: 1.3;
}

h3 {
  font-size: 18px;
  font-weight: 500;
}

p {
  line-height: 1.6;
  color: var(--color-text-sub);
}

/* Mobile Navbar */
.navbar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  background: rgba(255, 255, 255, 0.98);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--color-border);
  z-index: 1000;
  transition: all 0.3s ease;
}

.navbar-container {
  max-width: 100%;
  margin: 0 auto;
  padding: 1rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.navbar-logo {
  font-size: 1.125rem;
  font-weight: 600;
  color: var(--color-text-main);
  text-decoration: none;
  letter-spacing: -0.01em;
}

/* Mobile Menu - Hidden by default, shown as drawer */
.navbar-menu {
  display: none;
  position: fixed;
  top: 60px;
  left: 0;
  right: 0;
  background: white;
  padding: 1rem;
  border-bottom: 1px solid var(--color-border);
  flex-direction: column;
  gap: 1rem;
  list-style: none;
}

.navbar-menu.active {
  display: flex;
}

.navbar-link {
  color: var(--color-text-sub);
  text-decoration: none;
  font-weight: 500;
  font-size: 15px;
  padding: 0.75rem 0;
  display: block;
}

/* Mobile Menu Toggle (Hamburger) */
.mobile-menu-toggle {
  display: block;
  background: none;
  border: none;
  font-size: 1.5rem;
  cursor: pointer;
  color: var(--color-text-main);
  padding: 0.5rem;
}

/* Mobile Language Selector - Dropdown Style */
.lang-selector {
  position: relative;
  padding-top: 0.5rem;
  border-top: 1px solid var(--color-border);
  margin-top: 0.5rem;
}

.lang-selector-toggle {
  width: 100%;
  padding: 0.75rem 1rem;
  border: 1px solid var(--color-border);
  background: white;
  cursor: pointer;
  font-size: 14px;
  color: var(--color-text-main);
  font-weight: 500;
  border-radius: 6px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  transition: all 0.2s ease;
}

.lang-selector-toggle:hover {
  border-color: var(--color-primary);
}

.lang-selector-toggle::after {
  content: '▼';
  font-size: 10px;
  color: var(--color-text-muted);
  transition: transform 0.2s ease;
}

.lang-selector-toggle.active::after {
  transform: rotate(180deg);
}

.lang-dropdown {
  display: none;
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  margin-top: 0.5rem;
  background: white;
  border: 1px solid var(--color-border);
  border-radius: 8px;
  box-shadow: 0 4px 12px rgba(0,0,0,0.1);
  overflow: hidden;
  z-index: 100;
}

.lang-dropdown.active {
  display: block;
}

.lang-btn {
  width: 100%;
  padding: 0.75rem 1rem;
  border: none;
  background: white;
  cursor: pointer;
  font-size: 14px;
  color: var(--color-text-sub);
  transition: all 0.2s ease;
  font-weight: 500;
  text-align: left;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.lang-btn:hover {
  background: var(--color-bg-soft);
  color: var(--color-text-main);
}

.lang-btn.active {
  color: var(--color-primary);
  background: var(--color-bg-soft);
  font-weight: 600;
}

.lang-btn.active::after {
  content: '✓';
  color: var(--color-primary);
  font-weight: 600;
}

/* Mobile Hero Section */
.hero {
  min-height: 70vh;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--color-bg);
  text-align: center;
  padding: 8rem 1.5rem 4rem;
  position: relative;
}

.hero-content {
  max-width: 100%;
}

.hero-title {
  font-size: 28px;
  font-weight: 600;
  margin-bottom: 1rem;
  color: var(--color-text-main);
  line-height: 1.25;
  letter-spacing: -0.02em;
}

.hero-subtitle {
  font-size: 18px;
  margin-bottom: 0.75rem;
  font-weight: 400;
  color: var(--color-text-main);
  line-height: 1.4;
}

.hero-description {
  font-size: 15px;
  margin-bottom: 2rem;
  color: var(--color-text-sub);
  line-height: 1.6;
}

/* Mobile Buttons - 100% Width */
.btn,
.cta-button,
.btn-primary,
.btn-secondary {
  display: block;
  width: 100%;
  padding: 1rem 1.5rem;
  border-radius: 8px;
  font-weight: 600;
  font-size: 16px;
  text-decoration: none;
  transition: all 0.2s ease;
  border: none;
  cursor: pointer;
  text-align: center;
}

.btn-primary,
.cta-button {
  background: var(--color-primary);
  color: white;
  border: 2px solid var(--color-primary);
}

.btn-secondary {
  background: transparent;
  color: var(--color-text-main);
  border: 1px solid var(--color-border);
  margin-top: 0.75rem;
}

/* Mobile Sections */
.section {
  padding: 3.5rem 1.5rem;
}

.section-dark {
  background: var(--color-bg-soft);
}

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

.section-header {
  text-align: center;
  margin-bottom: 2.5rem;
}

.section-title {
  margin-bottom: 0.75rem;
  color: var(--color-text-main);
  font-size: 22px;
}

.section-subtitle {
  color: var(--color-text-sub);
  font-size: 15px;
  line-height: 1.6;
}

/* Mobile Grid - 1 Column */
.grid {
  display: grid;
  gap: 2rem;
  grid-template-columns: 1fr;
}

/* Mobile Cards */
.card {
  background: white;
  border-radius: 12px;
  overflow: hidden;
  border: 1px solid var(--color-border);
  transition: all 0.3s ease;
}

.card-image {
  width: 100%;
  aspect-ratio: 16 / 9;
  object-fit: cover;
  background: linear-gradient(135deg, #f5f5f5 0%, #e8e8e8 100%);
}

.card-content {
  padding: 1.5rem;
}

.card-title {
  font-size: 18px;
  margin-bottom: 0.5rem;
  color: var(--color-text-main);
  font-weight: 600;
  line-height: 1.3;
}

.card-subtitle {
  color: var(--color-text-muted);
  font-size: 13px;
  margin-bottom: 0.75rem;
  font-weight: 500;
}

.card-description {
  color: var(--color-text-sub);
  line-height: 1.5;
  margin-bottom: 1rem;
  font-size: 14px;
}

.card-meta {
  display: flex;
  gap: 0.75rem;
  flex-wrap: wrap;
  margin-top: 1rem;
}

.meta-item {
  display: flex;
  align-items: center;
  gap: 0.375rem;
  color: var(--color-text-sub);
  font-size: 13px;
}

/* Mobile Badge */
.badge {
  display: inline-block;
  padding: 0.375rem 0.75rem;
  border-radius: 20px;
  font-size: 12px;
  font-weight: 600;
  background: var(--color-primary);
  color: white;
}

.badge-secondary {
  background: var(--color-bg-soft);
  color: var(--color-text-main);
  border: 1px solid var(--color-border);
}

/* Mobile Footer */
.footer {
  background: var(--color-bg-soft);
  color: var(--color-text-sub);
  padding: 3rem 1.5rem 2rem;
  border-top: 1px solid var(--color-border);
}

.footer-content {
  display: grid;
  grid-template-columns: 1fr;
  gap: 2rem;
  margin-bottom: 2rem;
}

.footer-section h3 {
  color: var(--color-text-main);
  margin-bottom: 0.75rem;
  font-size: 16px;
  font-weight: 600;
}

.footer-links {
  list-style: none;
}

.footer-links li {
  margin-bottom: 0.5rem;
}

.footer-links a {
  color: var(--color-text-sub);
  text-decoration: none;
  transition: color 0.2s ease;
  font-size: 14px;
}

.footer-bottom {
  text-align: center;
  padding-top: 1.5rem;
  border-top: 1px solid var(--color-border);
  color: var(--color-text-muted);
  font-size: 13px;
}

/* Mobile Loading */
.loading {
  text-align: center;
  padding: 3rem 1.5rem;
}

.spinner {
  width: 36px;
  height: 36px;
  border: 3px solid var(--color-border);
  border-top-color: var(--color-primary);
  border-radius: 50%;
  animation: spin 1s linear infinite;
  margin: 0 auto 1rem;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

/* Mobile Forms */
.form-group {
  margin-bottom: 1.25rem;
}

.form-label {
  display: block;
  margin-bottom: 0.5rem;
  font-weight: 500;
  color: var(--color-text-main);
  font-size: 14px;
}

.form-input,
.form-select,
.form-textarea {
  width: 100%;
  padding: 0.875rem 1rem;
  border: 1px solid var(--color-border);
  border-radius: 8px;
  font-family: inherit;
  font-size: 15px;
  transition: border-color 0.2s ease;
  background: white;
  color: var(--color-text-main);
}

.form-input:focus,
.form-select:focus,
.form-textarea:focus {
  outline: none;
  border-color: var(--color-primary);
}

.form-textarea {
  resize: vertical;
  min-height: 100px;
  line-height: 1.5;
}

/* Mobile Admin Styles */
.admin-container {
  max-width: 100%;
  margin: 0 auto;
  padding: 6rem 1rem 3rem;
}

.admin-header {
  margin-bottom: 2rem;
}

.admin-tabs {
  display: flex;
  gap: 0.25rem;
  margin-bottom: 1.5rem;
  border-bottom: 1px solid var(--color-border);
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}

.admin-tab {
  padding: 0.75rem 1rem;
  background: none;
  border: none;
  cursor: pointer;
  font-weight: 600;
  color: var(--color-text-sub);
  border-bottom: 2px solid transparent;
  margin-bottom: -1px;
  transition: all 0.2s ease;
  font-size: 14px;
  white-space: nowrap;
  flex-shrink: 0;
}

.admin-tab.active {
  color: var(--color-primary);
  border-bottom-color: var(--color-primary);
}

.admin-table {
  width: 100%;
  background: white;
  border-radius: 12px;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  border: 1px solid var(--color-border);
}

.admin-table table {
  width: 100%;
  border-collapse: collapse;
  min-width: 600px;
}

.admin-table th {
  background: var(--color-bg-soft);
  padding: 0.75rem;
  text-align: left;
  font-weight: 600;
  color: var(--color-text-main);
  font-size: 13px;
}

.admin-table td {
  padding: 0.75rem;
  border-top: 1px solid var(--color-border);
  font-size: 14px;
}

/* ========================================
   TABLET (768px ~ 1199px)
   2~3열 구조, 탐색 중심
   ======================================== */

@media (min-width: 768px) {
  body {
    font-size: 16px;
  }

  h1 {
    font-size: 36px;
  }

  h2 {
    font-size: 28px;
  }

  h3 {
    font-size: 20px;
  }

  .navbar-container {
    padding: 1.25rem 2rem;
  }

  .mobile-menu-toggle {
    display: none;
  }

  .navbar-menu {
    display: flex;
    position: static;
    flex-direction: row;
    gap: 2rem;
    padding: 0;
    border: none;
    background: transparent;
  }

  .navbar-link {
    padding: 0.5rem 0;
    font-size: 14px;
  }

  .lang-selector {
    position: relative;
    border-top: none;
    padding-top: 0;
    margin-top: 0;
    margin-left: 1.5rem;
    padding-left: 1.5rem;
    border-left: 1px solid var(--color-border);
  }

  .lang-selector-toggle {
    width: auto;
    min-width: 140px;
    padding: 0.5rem 1rem;
    font-size: 14px;
  }

  .lang-dropdown {
    right: 0;
    left: auto;
    min-width: 140px;
  }

  .hero {
    min-height: 80vh;
    padding: 10rem 3rem 6rem;
  }

  .hero-title {
    font-size: 42px;
  }

  .hero-subtitle {
    font-size: 22px;
  }

  .hero-description {
    font-size: 16px;
  }

  .btn,
  .cta-button,
  .btn-primary,
  .btn-secondary {
    width: auto;
    display: inline-block;
    padding: 0.875rem 1.75rem;
  }

  .section {
    padding: 4.5rem 2rem;
  }

  .container {
    max-width: 960px;
  }

  .section-title {
    font-size: 28px;
  }

  .section-subtitle {
    font-size: 16px;
  }

  .grid-2 {
    grid-template-columns: repeat(2, 1fr);
    gap: 2.5rem;
  }

  .grid-3 {
    grid-template-columns: repeat(2, 1fr);
    gap: 2.5rem;
  }

  .card-image {
    aspect-ratio: 4 / 3;
  }

  .card-content {
    padding: 1.75rem;
  }

  .footer-content {
    grid-template-columns: repeat(2, 1fr);
    gap: 2.5rem;
  }

  .admin-container {
    padding: 7rem 2rem 4rem;
  }
}

/* ========================================
   DESKTOP (1200px+)
   3~4열 구조, 비교·탐색·신뢰 중심
   ======================================== */

@media (min-width: 1200px) {
  h1 {
    font-size: 48px;
    line-height: 1.2;
  }

  h2 {
    font-size: 32px;
  }

  h3 {
    font-size: 22px;
  }

  .navbar-container {
    max-width: 1280px;
    padding: 1.25rem 2rem;
  }

  .navbar-logo {
    font-size: 1.25rem;
  }

  .navbar-link {
    font-size: 0.9375rem;
  }

  .hero {
    min-height: 85vh;
    padding: 10rem 2rem 6rem;
  }

  .hero-content {
    max-width: 800px;
  }

  .hero-title {
    font-size: 56px;
  }

  .hero-subtitle {
    font-size: 24px;
  }

  .hero-description {
    font-size: 18px;
    margin-bottom: 3rem;
  }

  .section {
    padding: 5rem 2rem;
  }

  .container {
    max-width: 1280px;
  }

  .section-header {
    max-width: 700px;
    margin-left: auto;
    margin-right: auto;
    margin-bottom: 4rem;
  }

  .section-title {
    font-size: 32px;
  }

  .section-subtitle {
    font-size: 17px;
  }

  .grid-2 {
    grid-template-columns: repeat(2, 1fr);
    gap: 2.5rem;
  }

  .grid-3 {
    grid-template-columns: repeat(3, 1fr);
    gap: 2.5rem;
  }

  .grid-4 {
    grid-template-columns: repeat(4, 1fr);
    gap: 2rem;
  }

  .card:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-card);
  }

  .card-title {
    font-size: 20px;
  }

  .card-description {
    font-size: 15px;
  }

  .footer-content {
    grid-template-columns: repeat(3, 1fr);
    gap: 3rem;
  }

  .admin-container {
    max-width: 1600px;
    padding: 8rem 2rem 4rem;
  }

  .admin-table table {
    min-width: auto;
  }
}

/* ========================================
   UTILITY CLASSES
   ======================================== */

.text-center {
  text-align: center;
}

.text-muted {
  color: var(--color-text-muted);
}

.text-sub {
  color: var(--color-text-sub);
}

.mt-1 { margin-top: 0.5rem; }
.mt-2 { margin-top: 1rem; }
.mt-3 { margin-top: 1.5rem; }
.mt-4 { margin-top: 2rem; }

.mb-1 { margin-bottom: 0.5rem; }
.mb-2 { margin-bottom: 1rem; }
.mb-3 { margin-bottom: 1.5rem; }
.mb-4 { margin-bottom: 2rem; }
