/* =================================================================== */
/* [개편] 메인 페이지 전용 스타일 (index.php)                           */
/* =================================================================== */

.main-container {
  width: 100%;
  max-width: 1200px; /* 넓은 레이아웃을 위해 최대 너비 확장 */
  margin: 0 auto;
  padding: 40px 20px;
  animation: fadeIn 0.5s ease-in-out;
}

@keyframes fadeIn {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: translateY(0); }
}

.main-header {
  text-align: center;
  margin-bottom: 60px;
}

.main-header .logo-container {
  font-weight: 700;
  font-size: 20px;
  margin-bottom: 24px;
  color: var(--rg-color-text-secondary);
}

.main-header h1 {
    font-size: clamp(30px, 5vw, 42px); /* 폰트 크기 미세 조정 */
    font-weight: 800;
    margin-bottom: 32px; /* 검색창과의 간격 확보 */
    color: var(--rg-color-text); /* 그라데이션 대신 단색 적용 */
}

.main-header p {
  font-size: 18px;
  max-width: 600px;
  margin: 0 auto 32px auto;
  color: var(--rg-color-text-secondary);
}


/* 링크 배너 */
.link-banner-group {
  margin-bottom: 40px;
}
.link-banner-group h2 {
  font-size: 20px;
  font-weight: 700;
  margin-bottom: 20px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--rg-color-border);
  color: var(--rg-color-text);
}

.link-banner-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); /* 최소 너비 조정 */
  gap: 20px;
}

.link-banner {
  display: flex;
  align-items: flex-start; /* 아이콘과 텍스트를 위쪽 기준으로 정렬 */
  gap: 16px;
  padding: 20px;
  background-color: var(--rg-color-background-alt);
  border: 1px solid var(--rg-color-border);
  border-radius: var(--rg-border-radius);
  text-decoration: none;
  transition: all 0.2s ease;
}
.link-banner:hover {
  transform: translateY(-4px);
  box-shadow: var(--rg-shadow-md);
  border-color: var(--rg-color-primary);
}
.link-banner .icon-wrapper {
  flex-shrink: 0;
  width: 48px;
  height: 48px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: var(--rg-border-radius); /* 원형에서 사각형으로 변경 */
  background-color: var(--rg-color-background);
  color: var(--rg-color-primary);
  font-size: 20px;
  box-shadow: var(--rg-shadow-sm);
  margin-top: 2px; /* 텍스트와의 미세 정렬 */
}

/* text-wrapper 수정 */
.link-banner .text-wrapper {
  display: flex;
  flex-direction: column; /* 제목과 설명을 수직으로 배열 */
  gap: 4px; /* 제목과 설명 사이 간격 */
}

/* 새로 추가될 클래스 스타일 */
.banner-title {
  color: var(--rg-color-text);
  font-weight: 600;
  font-size: 16px;
}
.banner-desc {
  color: var(--rg-color-text-secondary);
  font-size: 13px;
  line-height: 1.5;
  margin: 0; /* p 태그 기본 마진 제거 */
}


.trends-container {
    margin-top: var(--rg-spacing);
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    align-items: center;
    gap: 10px;
    max-width: 768px;
    margin-left: auto;
    margin-right: auto;
}

.trends-title {
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--rg-color-text-secondary);
    margin-right: 8px;
    flex-shrink: 0;
}

/* /css/main.css 의 트렌드 키워드 스타일을 아래 코드로 교체 */

.trend-keyword {
    font-family: var(--rg-font-family);
    font-size: 0.9rem;
    font-weight: 500;
    color: var(--rg-color-text-secondary);
    
    /* [수정] 박스 스타일 제거 */
    background-color: transparent;
    border: none;
    border-radius: 0;
    padding: 2px 4px; /* 텍스트 주변에 약간의 여백 */

    /* [추가] 언더바 스타일 */
    border-bottom: 1px solid var(--rg-color-border);
    
    cursor: pointer;
    text-decoration: none; 
    transition: all 0.2s ease;
}

.trend-keyword:hover {
    /* [수정] 마우스 오버 시 텍스트와 언더바 색상 변경 */
    color: var(--rg-color-primary);
    border-bottom-color: var(--rg-color-primary);
    
    /* [제거] 기존 배경색, 테두리색, transform 효과 제거 */
    background-color: transparent; 
}

@media (max-width: 768px) {
  .main-container { padding: 20px 15px; }
  .main-header { margin-bottom: 40px; }
  .link-banner-grid {
    grid-template-columns: 1fr; /* 모바일에서는 한 줄에 하나씩 */
  }
}