/* ==================================
/* --- 기본 & 전체 레이아웃 --- */
@import url('https://fonts.googleapis.com/css2?family=Noto+Sans+KR:wght@400;700&display=swap');
@font-face {
  font-family: 'CookieRun';
  /* 폰트 이름 지정 */
  src: url('https://fastly.jsdelivr.net/gh/projectnoonnu/noonfonts_2001@1.1/CookieRun-Regular.woff') format('woff');
  font-weight: normal;
  font-style: normal;
}

:root {
  --bg-color: #f3f3f3;
  /* 배경색 */
  --card-bg-color: #1E1E1E;
  /* 카드 배경색 */
  --primary-color: #8A2BE2;
  /* 보라색 계열 포인트 */
  --text-color: #E0E0E0;
  /* 기본 텍스트 색상 */
  --heading-color: #009297;
  /* 제목 텍스트 색상 */
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

.home-body {
  font-family: 'Noto Sans KR', sans-serif;
  background-color: var(--bg-color);
  color: var(--text-color);
  display: flex;
  justify-content: center;
  align-items: center;
  min-height: 100vh;
  padding: 40px 20px;
}

#main-content {
  width: 100%;
  max-width: 960px;
  text-align: center;
}

a {
  text-decoration: none;
  color: inherit;
}

h1,
h2,
h3 {
  color: var(--heading-color);
  font-weight: 700;
}

/* --- 히어로(Hero) 섹션 --- */

.hero {
  margin-bottom: 60px;
}

.hero h1 {
  font-size: 2.8rem;
  margin-bottom: 15px;
}

.hero p {
  font-size: 1.2rem;
  margin-bottom: 30px;
  color: #5c5c5c;
}

.main-cta-button {
  display: inline-block;
  background-color: var(--primary-color);
  color: white;
  padding: 15px 35px;
  border-radius: 50px;
  font-size: 1.1rem;
  font-weight: 700;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.main-cta-button:hover {
  transform: translateY(-3px);
  box-shadow: 0 4px 20px rgba(138, 43, 226, 0.4);
}


/* --- 주요 서비스 섹션 --- */

.services h2 {
  font-size: 2.2rem;
  margin-bottom: 40px;
}

.service-cards {
  display: grid;
  /* 화면 크기에 맞춰 1~3개의 카드가 자동으로 정렬됩니다 */
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 30px;
}

.card {
  background-color: var(--card-bg-color);
  border-radius: 16px;
  padding: 30px;
  border: 1px solid #333;
  transition: transform 0.3s ease, box-shadow 0.3s ease, border-color 0.3s ease;
}

.card:hover {
  transform: translateY(-8px);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
  border-color: var(--primary-color);
}

.card img {
  max-width: 200px;
  margin-bottom: 20px;
}

.card h3 {
  font-size: 1.5rem;
  margin-bottom: 10px;
}

.card p {
  font-size: 1rem;
  line-height: 1.6;
}
/* ===== 최종 수정된 메뉴 버튼 스타일 ===== */
/* 구글 아이콘 기본 스타일 */
.material-symbols-outlined {
  font-variation-settings:
    'FILL' 0,
    'wght' 400,
    'GRAD' 0,
    'opsz' 24;
  vertical-align: middle;
  /* 아이콘과 텍스트의 세로 정렬을 맞출 때 유용 */
}
/* 아이콘 버튼 공통 스타일 (예시) */
.icon-btn {
  background: none;
  border: none;
  padding: 5px;
  cursor: pointer;
  border-radius: 50%;
  /* 동그란 버튼 */
  width: 40px;
  height: 40px;
  display: inline-flex;
  justify-content: center;
  align-items: center;
  transition: background-color 0.2s;
}

.icon-btn:hover {
  background-color: rgba(0, 0, 0, 0.1);
}
/* 홈 아이콘을 제외한 모든 메뉴 아이템에 적용 */

.menu-item:not(.menu-home) {
  --width: 150px;
  --timing: 2s;

  /* 1. 크기 조절: 이 padding 값으로 버튼 크기를 조절하세요 */
  padding: 0.5em 1em;

  /* 2. 라운드 조절: 이 값으로 모서리 둥글기를 조절하세요 */
  border-radius: 8px;

  /* --- 나머지 스타일 --- */
  border: 0;
  color: #000000;
  font-weight:normal;
  font-family: 'CookieRun', sans-serif;
  font-size: 1rem;
  background: rgb(233, 245, 164);
  transition: all 0.2s;
  cursor: pointer;
  display: flex;
  justify-content: center;
  align-items: center;
  text-decoration: none;
  position: relative;
  /* :hover 효과를 위해 추가 */
}

/* --- 호버 효과 (그대로 유지) --- */
.menu-item:not(.menu-home):hover {
  background-image: linear-gradient(to right,
      rgb(250, 82, 82), rgb(250, 82, 82) 16.65%,
      rgb(190, 75, 219) 16.65%, rgb(190, 75, 219) 33.3%,
      rgb(76, 110, 245) 33.3%, rgb(76, 110, 245) 49.95%,
      rgb(64, 192, 87) 49.95%, rgb(64, 192, 87) 66.6%,
      rgb(250, 176, 5) 66.6%, rgb(250, 176, 5) 83.25%,
      rgb(253, 126, 20) 83.25%, rgb(253, 126, 20) 100%,
      rgb(250, 82, 82) 100%);
  animation: var(--timing) linear dance6123 infinite;
  transform: scale(1.1) translateY(-1px);
}

@keyframes dance6123 {
  to {
    background-position: var(--width);
  }
}
/* 버튼 스타일 끝 */

.index-page .menu {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 50px;
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 999;
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.4);
  background: linear-gradient(-45deg, #46ac81, #267c8b);
  background-size: 400% 400%;
  animation: gradient 20s ease infinite;
}

/*
/* PC 환경 메뉴 아이템 컨테이너 */
.index-page .menu .menu-items {
  display: flex;
  align-items: center;
  justify-content: center;
  height: 100%;
  width: 100%;
  padding: 0 40px;

  box-sizing: border-box;
  gap: 30px;

}

/* PC 홈 아이콘 스타일 */
.menu-item.menu-home {
  /* margin-right: auto; 를 추가하여 오른쪽 여백을 최대로 만듭니다. */

}

/* '문의하기' 메뉴: position: absolute 로 변경하여 독립적으로 우측에 배치 */
.index-page .menu-item.menu-contact {
  position: absolute;
  /* <<< 독립적인 위치 지정을 위해 absolute로 변경 */
  right: 40px;
  /* <<< 오른쪽에서 40px 떨어진 곳에 배치 */
  top: 50%;
  /* 세로 중앙 정렬 */
  transform: translateY(-50%);
  /* 세로 중앙 정렬 */

  /* margin-left: auto; 는 더 이상 필요 없으므로 삭제합니다. */
  font-size: 13px;
  font-weight: 500;
}

/* PC 메뉴 hover 효과: 메뉴 아이템 전체를 약간 확대 */
.index-page .menu-item:not(.menu-contact):not(.menu-home):hover {
  transform: scale(1.2);
}


/* PC 홈 아이콘 스타일 */
.menu-item.menu-home img.home-icon {
  display: block;
  height: 30px;
  width: auto;
  margin: 0 auto;
}

/* 홈 아이콘 메뉴의 테두리 애니메이션은 숨김 */
.menu-item.menu-home::before {
  display: none !important;
}

/* ===== 메인 콘텐츠 영역 ===== */
.index-page #main-content {
  /* top-bar(40px)가 사라졌으므로 메뉴 높이(115px)만큼만 margin-top 적용 */
    /* 2. 메뉴바와 콘텐츠 사이에 원하는 간격을 padding-top으로 조절 */
  margin-top: 65px;
  min-height: calc(100vh - 65px);
  box-sizing: border-box;
  font-family: 'Noto Sans KR', sans-serif;
}

/* ===== 문의하기 페이지 스타일 (공통) ===== */
.contact-info-container {
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  text-align: center;
  padding: 40px 20px;
  box-sizing: border-box;
}

.contact-info-container img {
  max-width: 150px;
  margin-bottom: 20px;
  border-radius: 10px;
}

.contact-info-container h2 {
  font-size: 26px;
  color: #333;
  margin-bottom: 15px;
}

.contact-info-container p {
  font-size: 18px;
  color: #555;
  line-height: 1.6;
}

.contact-info-container .email-link {
  font-size: 20px;
  color: #007bff;
  text-decoration: none;
  font-weight: bold;
  margin-top: 15px;
  display: inline-block;
}

.contact-info-container .email-link:hover {
  text-decoration: underline;
}

@keyframes gradient {
  0% {
    background-position: 0% 50%;
  }

  50% {
    background-position: 100% 50%;
  }

  100% {
    background-position: 0% 50%;
  }
}

.mobile-menu-toggle{
  display: none;
}

/* ==================================
     반응형 처리 - 모바일 환경
   ================================== */
@media (max-width: 768px) {
  /* --- Part 1: 공통 모바일 토글 메뉴 (최종 수정본) --- */
/* 메뉴 바 (상단 고정) 스타일 */
  .index-page .menu {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 50px;
    background: #1f3a44;
    padding: 0 15px;
    z-index: 1000;
  }

  /* 메뉴 바 내부 헤더(로고, 토글버튼) 정렬 */
  .menu-header {
    display: flex;
    justify-content: flex-start;
    /* 왼쪽부터 정렬 */
    align-items: center;
    width: 100%;
    height: 100%;
    gap: 15px;
    /* 아이콘과 버튼 사이 간격 */
  }

  /* 햄버거 버튼이 먼저 오도록 순서 변경 */
  .mobile-menu-toggle {
    order: 1;
  }

  .index-page .menu-item.menu-home {
  order: -1;
    /* 다른 모든 아이템보다 앞에 오도록 설정 */
    padding-bottom: 15px !important;
    margin-bottom: 10px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    /* 구분선 */
  }

  /* 토글 버튼 (햄버거 아이콘) */
  .mobile-menu-toggle {
    display: flex;
    flex-direction: column;
    justify-content: space-around;
    width: 30px;
    height: 25px;
    background: transparent;
    border: none;
    cursor: pointer;
    padding: 0;
  }

  .mobile-menu-toggle .bar {
    width: 100%;
    height: 3px;
    background-color: white;
    border-radius: 10px;
  }

  /* --- Part 2: 펼쳐지는 슬라이드 메뉴판 --- */

  /* 메뉴 아이템 목록 (기본: 화면 왼쪽에 숨김) */
  .index-page .menu .menu-items {
    position: fixed;
    top: 0;
    left: 0;
    transform: translateX(-100%);
    width: 43%;
    height: 100vh;
    background-color: #2c3e50;
    padding: 10px 10px;
    box-shadow: 2px 0 15px rgba(0, 0, 0, 0.2);
    transition: transform 0.3s ease-out;
    z-index: 2000;
    display: flex;
    flex-direction: column;
  /* ✅ 1. 기본 정렬을 '시작점' (상단)으로 변경합니다. */
    justify-content: flex-start;
    align-items: flex-start;
    gap: 5px;
  }
  /* 메뉴가 열렸을 때, 슬라이드해서 나타남 */
  .menu.menu-open .menu-items {
    transform: translateX(0);
  }


  /* 개별 메뉴 아이템 */
  .index-page .menu-item {
    padding: 8px 0 !important;
    font-size: 1.1rem;
    font-weight: normal;
    text-align: left;
    height: auto;
    /* 높이 자동 조절 */
    color: white !important;
    background: none !important;
  }

  /* '문의하기' 메뉴를 맨 아래로 보내기 */
  .index-page .menu-item.menu-contact {
      position: static;
        /* position: absolute 해제 */
        margin-top: auto;
        /* 자동으로 위쪽 여백을 최대로 만들어 맨 아래로 보냄 */
        padding-top: 15px !important;
        border-top: 1px solid rgba(255, 255, 255, 0.2);
  }
  /* --- Part 2: 펼쳐지는 슬라이드 메뉴판 --- */


  /* 메뉴가 열렸을 때, 슬라이드해서 나타남 */
  .menu.menu-open .menu-items {
    left: 0;
  }

  /* 개별 메뉴 아이템 */
  .index-page .menu-item {
    color: white !important;
    background: none !important;
    padding: 10px 0 !important;
    font-size: 1.1rem;
    font-weight: normal;
    width: 100%;
    text-align: left;
    height: auto;
  }

  .index-page .menu-item:hover {
    background-color: rgba(255, 255, 255, 0.1) !important;
  }

  /* --- Part 3: 본문 콘텐츠 상호작용 --- */
  body {
    padding-top: 50px;
    /* 고정 메뉴 높이만큼 본문에 여백 */
  }

  /* --- Part 2: index.html 페이지 전용 모바일 스타일 --- */

  /* 데스크탑의 flex 중앙 정렬을 해제하고 일반적인 블록 형태로 변경 */
  .home-body {
    display: block;
    padding: 0;
    /* body의 패딩은 제거 */
  }

  /* 메인 콘텐츠 영역에 직접 패딩을 줌 */
  .home-body #main-content {
    padding: 20px;
    text-align: center;
  }

  /* 히어로 섹션 글자 크기 및 간격 조정 */
  .home-body .hero {
    margin-bottom: 40px;
  }

  .home-body .hero h1 {
    font-size: 2.2rem;
  }

  .home-body .hero p {
    font-size: 1rem;
    margin-bottom: 25px;
  }

  .home-body .main-cta-button {
    padding: 12px 28px;
    font-size: 1rem;
  }

  /* 주요 서비스 섹션 제목 조정 */
  .home-body .services h2 {
    font-size: 1.8rem;
    margin-bottom: 30px;
  }

  /* 카드 간격 조정 */
  .home-body .service-cards {
    gap: 20px;
  }

  .home-body .card {
    padding: 25px;
  }
}