/* === 기본 폰트 & 바디 === */
body, html {
  margin: 0;
  padding: 0;
  background: #f5f7fa;
  color: #222;
  font-family: 'Pretendard', 'Inter', 'Segoe UI', sans-serif;
}

/* === 네비게이션 === */
.navbar {
  background: linear-gradient(135deg, #00f7ff, #8500ff);
  padding: 1.5rem 1.5rem; /* 위아래 패딩 좀 더 늘림 */
  position: sticky;
  top: 0;
  z-index: 999;
  height: auto;
  min-height: 20px;
  display: flex;
  align-items: center;
}

/* 모바일 850px 이하에서 메뉴 높이 줄이기 */
@media (max-width: 850px) {
  .navbar {
    min-height: 15px;  /* 모바일에 적당한 높이로 줄임 */
    padding: 1rem 1rem; /* 패딩도 줄여서 더 슬림하게 */
  }
  .nav-container {
    padding: 0 1rem;
  }
}

.nav-container {
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0 1rem; /* 좌우 공간 확보 */
  width: 100%;
}
.logo {
  font-weight: 700;
  font-size: 1.6rem;
  color: white;
  text-decoration: none;
  margin-left: -1rem; /* 왼쪽 여백 제거 */
  padding-left: 0; /* 혹은 필요시 */
}
.nav-links {
  list-style: none;
  padding-left: 0;
  margin: 0;
  display: flex;
  gap: 1rem;
  flex-grow: 0; /* 너무 퍼지지 않도록 제한 */
}

.navbar, .nav-container, .logo, .nav-links {
  line-height: 1.5;
}

/* 데스크탑 네비 */
@media (min-width: 851px) {
  .nav-links li a {
    color: white;
    font-weight: 500;
    font-size: 1.2rem;
    padding: 0.3rem 1rem;
    border-radius: 0.8rem;
    transition: background 0.15s, color 0.15s;
    text-decoration: none;
  }
  .nav-links li a:hover,
  .nav-links li a.active {
    background: rgba(255,255,255,0.15);
    color: #ffeb3b;
    font-weight: 500; /* hover에서 bold 제거 */
  }
}

/* 모바일 네비게이션 햄버거 버튼 */
.hamburger {
  display: none;               /* 데스크탑에서는 숨김 */
  background: none !important;
  border: none !important;
  color: white;                /* 흰색 */
  cursor: pointer;
  font-size: 2.8rem;           /* 크기 키움 (기존 2.2rem에서 크게) */
  user-select: none;
  padding: 0;
  margin: 0;
  line-height: 1;
}

/* 850px 이하 화면에서 햄버거 보이기 */
@media (max-width: 850px) {
  .hamburger {
    display: block;
  }

  /* 모바일 메뉴 박스 스타일 */
  .nav-links {
    flex-direction: column;
    position: absolute;
    top: 70px;
    right: 10px;
    width: 220px;
    background-color: #1e1e1e;
    border-radius: 0.8rem;
    box-shadow: 0 6px 20px #0ff7;
    padding: 1.2rem 0;
    display: none;              /* 기본은 숨김, show 클래스 붙으면 보임 */
    z-index: 1200;
    gap: 1.2rem;
    font-size: 1.2rem;
  }

  /* 모바일 메뉴가 열렸을 때 */
  .nav-links.show {
    display: flex;
  }

  /* 모바일 메뉴 내 링크 스타일 */
  .nav-links li a {
    color: white;
    padding: 0.9rem 1.6rem;
    font-weight: 700;
    display: flex;
    align-items: center;
    gap: 0.8rem;
    border-radius: 0.8rem;
    text-decoration: none;
    transition: background-color 0.2s;
  }
  .nav-links li a:hover {
    background-color: rgba(255, 255, 255, 0.12);
    color: #0ff;
  }
}

/* === 히어로 영역 === */
.hero {
  text-align: center;
  padding: 3.5rem 1rem;
  background: linear-gradient(135deg,#00f7ff,#8500ff);
  color: white;
}
.hero h1 {
  font-size: 3rem;
  font-weight: 900;
  margin-bottom: 2rem;
  letter-spacing: 0.04em;
}
.hero p {
  margin: 0 0 0.5rem 0;
  font-size: 1.35rem;
  font-weight: 600;
}
.hero p:last-child { margin-bottom: 2rem; }

.hero-browse-btn { margin: 2rem auto 0; display: flex; justify-content: center; }
.hero-browse-btn button {
  background: #0ff; color: #17181a;
  border-radius: 1.2rem; padding: 0.5rem 2rem;
  font-weight: 700; font-size: 1.2rem;
  box-shadow: 0 5px 10px #0ff7; border: none;
  transition: background 0.3s;
  display: flex; align-items: center; gap: 0.5em;
}
.hero-browse-btn button:hover { background: #16ffe5; }
.hero-search { display: flex; justify-content: center; max-width: 320px; min-width: 320px; margin: 1.2rem auto; padding: 0 1.2rem; }
.hero-search input {
  width: 300px; max-width: 90vw;
  padding: 0.5rem 1rem; font-size: 0.95rem;
  border-radius: 1.2rem; border: 2px solid #1a73e8; outline: none;
  transition: border-color 0.3s;
}
.hero-search input:focus { border-color: #0b47c1; }

/* === 이벤트 카드 === */
.event-list {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  max-width: 1200px; margin: 0 auto;
  gap: 2rem 2.5rem;
  padding: 3rem 0;
  background: #f3f7fa;
}
.card {
  display: flex;
  flex-direction: column;
  gap: 0.8em;              /* 버튼과 텍스트 간 간격 줄임 */
  justify-content: flex-start; /* 카드 내부 요소 위쪽 정렬 */
  height: 100%;
}

.button-container {
  margin-top: auto;        /* 버튼 그룹을 카드 하단에 붙임 */
  display: flex;
  flex-direction: column;
  gap: 0.4em;              /* 버튼 간 간격 적당히 조절 */
}
}

/* 모바일에서 카드 너비를 화면 너비에 맞게 조절 */
@media (max-width: 700px) {
  .card {
    width: 90vw; /* 화면 너비의 90% */
    min-width: auto; /* 고정 최소 너비 해제 */
  }
}

.card:hover,
.card:focus-within {
  box-shadow: 0 14px 44px #a8e3ff35, 0 4px 32px #b8daff19;
  transform: translateY(-4px) scale(1.03);
  z-index: 2;
}
@media (max-width: 1100px) {
  .event-list { max-width: 700px; gap: 1.5rem 1rem; }
}
@media (max-width: 700px) {
  .event-list { max-width: 99vw; grid-template-columns: 1fr; padding: 1.2rem 0.1rem 2rem; gap: 1.2rem 0.5rem; }
  .card { width: 98vw; max-width: 98vw; padding: 1.1rem 0.7rem 1rem; }
}

/* === 공통 탭 버튼 === */
.tabs {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 50px;
  margin-top: 30px;
  margin-bottom: 10px;
  flex-wrap: wrap;
}
.tab {
  background: none;
  border: none;
  outline: none;
  padding: 15px 0 5px 0;
  font-size: 1.2rem;
  font-weight: 600;
  font-family: inherit;
  color: #333;
  cursor: pointer;
  border-bottom: 5px solid transparent;
  transition: color 0.2s;
  letter-spacing: 0.02em;
  position: relative;
}
.tab:hover,
.tab.active {
  color: #4262ff;
  border-bottom: 5px solid #4262ff;
}

/* === 카드 제목/메타/버튼 === */
.card h2 {
  font-size: 1.7rem;
  font-weight: 800;
  margin: 0 0 0.3em 0;
  color: #1662d7;
  letter-spacing: 0.01em;
}
.meta {
  font-size: 1.1em;
  color: #0d3e86;
  margin-bottom: 0.3em;
}
.days-left-btn, .official-site-btn {
  display: inline-flex; align-items: center;
  font-family: inherit; font-size: 0.9em; font-weight: 700;
  border-radius: 1em; box-shadow: 0 1px 3px #a0caff11;
  outline: none; text-decoration: none; cursor: pointer;
  padding: 0.53em 1.15em; margin-top: 0.1em;
  transition: background 0.16s, color 0.14s, border 0.16s;
  border: 1.5px solid #b0dfff;
}
.days-left-btn {
  background: #f5faff; color: #0074bb; border-color: #b0dfff;
}
.days-left-btn:hover, .days-left-btn:focus {
  background: #e3f2ff; border-color: #79bbfa; color: #094cb3;
}
.days-left-result {
  color: #022431;  
  font-weight: 700;
  background: #93d3fa;   
  border: 1.5px solid #66bcf1;
  border-radius: 1em; box-shadow: 0 1px 3px #a0caff11;
  outline: none; text-decoration: none;
  padding: 0.53em 1.15em; margin-top: 0.1em;
}
.official-site-btn {
  background: #fafdff; color: #2787c7; border: 1.6px solid #cbe9ff; padding: 0.52em 1.2em;
}
.official-site-btn:hover, .official-site-btn:focus {
  background: #e7f3ff; border-color: #92ceff; color: #1662d7;
}