/* tracker.css - 대통령 행보 트래커 전용 독립 스타일시트 */

/* ==================================== */
/* 1. 기본 & 공통 스타일                */
/* ==================================== */
body {
    margin: 0;
    font-family: sans-serif;
    background-color: #f9f9f9;
}

/* 광고 영역 플레이스홀더 기본 스타일 */
.ad-placeholder {
  background-color: #f0f0f0;
  border: 2px dashed #ccc;
  color: #aaa;
  display: flex;
  justify-content: center;
  align-items: center;
  font-size: 1rem;
  font-weight: bold;
  width: 100%;
  box-sizing: border-box;
}


/* ==================================== */
/* 2. 공통 내비게이션 바 (GNB) 스타일   */
/* ==================================== */
.gnb {
  width: 100%;
  background-color: #ffffff;
  border-bottom: 1px solid #e0e0e0;
  box-shadow: 0 2px 4px rgba(0,0,0,0.05);
  position: sticky;
  top: 0;
  z-index: 1000;
}

.gnb-inner {
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0 20px;
  height: 60px;
}

.gnb-logo {
  font-size: 1.2rem;
  font-weight: bold;
  color: #1a0dab;
  text-decoration: none;
}

.gnb-menu {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  gap: 24px;
}

.gnb-menu a {
  text-decoration: none;
  color: #333;
  font-weight: 500;
  padding: 8px;
  transition: color 0.2s ease;
}

.gnb-menu a:hover {
  color: #004098;
}


/* ==================================== */
/* 3. 트래커 페이지 고유 스타일          */
/* ==================================== */
.tracker-container {
  display: grid;
  /* grid-template-columns: 1fr 5fr 1fr; [광고]-[콘텐츠]-[광고] 비율 */
  max-width: 1200px;
  margin: 20px auto;
  gap: 20px;
  padding: 0 20px;
}

.main-content {
  width: 100%;
}

.tracker-header {
  background-color: #004098; /* 새 헤더 색상 */
  color: white;
  padding: 20px 20px;
  text-align: center;
  border-bottom: 5px solid #FFD700;
}

.tracker-header h1 {
  font-size: 2.5rem;
  margin-bottom: 0.5rem;
}

.tracker-controls select {
  padding: 8px 12px;
  font-size: 1rem;
  margin: 0 5px;
  border-radius: 6px;
  border: 1px solid #ccc;
}

.carousel-container {
  min-height: 400px; /* 임시 높이 */
  display: flex;
  align-items: center;
  justify-content: center;
}
.placeholder-text {
    color: #999;
    font-size: 1.2rem;
}

.carousel-btn {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  background-color: rgba(0,0,0,0.5);
  color: white;
  border: none;
  border-radius: 50%;
  width: 40px;
  height: 40px;
  font-size: 1.5rem;
  cursor: pointer;
}

.carousel-btn.prev { left: -20px; }
.carousel-btn.next { right: -20px; }

.ad-sidebar .ad-placeholder {
  min-height: 600px;
  height: 100%;
}

/* 새로운 날짜 선택기 스타일 */
.date-selector-container {
  padding: 1rem 1.5rem;
  background-color: #0c7cec;
  margin-bottom: 2rem;
  display: flex;
  justify-content: center;
  align-items: center;
  flex-wrap: wrap;
  gap: 1rem;
}

.date-selector {
  display: flex;
  justify-content: center;
  gap: 1rem;
}

.date-selector select {
  font-size: 1.5rem; /* 큼지막하게 */
  padding: 0.8rem 1.2rem;
  border: 2px solid #ccc;
  border-radius: 8px;
  font-weight: bold;
  cursor: pointer;
  background-color: white;
  transition: border-color 0.2s;
}

.date-selector select:hover {
  border-color: #007bff;
}

/* 카드 그리드 컨테이너 스타일 */
.card-grid-container {
  display: grid;
  grid-template-columns: repeat(3, 1fr); /* 3열 그리드 */
  gap: 1.5rem;
}



/* ==================================== */
/* 4. 공통 푸터(Footer) 스타일          */
/* ==================================== */
.site-footer {
  background-color: #f4f4f4;
  color: #444444;
  padding: 24px 16px;
  font-size: 14px;
  text-align: center;
  border-top: 2px solid #cccccc;
  margin-top: 40px;
}

.footer-inner {
  max-width: 960px;
  margin: 0 auto;
}

.footer-links {
  margin-bottom: 16px;
}

.site-footer a {
  color: #006699;
  text-decoration: none;
  margin: 0 8px;
  font-weight: bold;
}

.site-footer a:hover {
  text-decoration: underline;
}


/* ==================================== */
/* 5. 모바일 반응형 스타일              */
/* ==================================== */
@media screen and (max-width: 1024px) {
  .tracker-container {
    grid-template-columns: 1fr; /* 1단으로 변경 */
    padding: 0 10px;
    margin-top: 10px;
    gap: 10px;
  }

  /* 모바일에서는 양쪽 광고 사이드바 숨기기 */
  .ad-sidebar {
    display: none;
  }

    .card-grid-container {
    grid-template-columns: repeat(2, 1fr); /* 태블릿: 2열 */
  }

  .carousel-btn.prev { left: 5px; }
  .carousel-btn.next { right: 5px; }
}



@media screen and (max-width: 768px) {
  /* 모바일에서 GNB 메뉴 숨기기 (추후 햄버거 메뉴로 개선 가능) */
  .gnb-menu {
    display: none;
  }
  .gnb-inner {
    justify-content: center; /* 로고 중앙 정렬 */
  }
  .tracker-header h1 {
    font-size: 1.8rem;
  }

    .date-selector {
    flex-direction: row; /* 모바일: 수평 정렬 */
  }
  .card-grid-container {
    grid-template-columns: 1fr; /* 모바일: 1열 */
  }
  .date-selector select {
    font-size: 1rem; /* 글자 크기를 줄임 */
    padding: 8px 12px; /* 패딩을 줄여 버튼 전체 크기를 줄임 */
    margin-right: 5px; /* 간격도 약간 줄임 */
  }
  #entry-count-display {
    font-size: 1.2rem; /* 모바일에서 글자 크기 줄임 */
    padding: 0.6rem 1rem; /* 패딩 줄임 */
  }
}

@media (max-width: 480px) {
  .date-selector select {
    font-size: 0.9rem;
    padding: 6px 10px;
    margin-right: 3px;
  }  
  #entry-count-display {
    font-size: 0.9rem; /* 모바일에서 글자 크기 줄임 */
    padding: 0.4rem 0.8rem; /* 패딩 줄임 */
  } 
}

/* ==================================== */
/* 타임라인 카드 스타일 (확인 및 추가)   */
/* ==================================== */
.timeline-card {
  background-color: #fff;
  border: 1px solid #ddd;
  border-radius: 8px;
  box-shadow: 0 4px 8px rgba(0,0,0,0.08);
  display: flex;
  flex-direction: column;
  transition: transform 0.2s, box-shadow 0.2s;
  padding: 20px;
  height: 400px;
  text-decoration: none; /* ▼▼▼ [추가] 카드 전체의 밑줄 제거 ▼▼▼ */
}
.timeline-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 8px 16px rgba(0,0,0,0.12);
  transition: transform 0.2s, box-shadow 0.2s;
}

.ad-card {
  /* 인피드 광고 카드 스타일 */
  background-color: none; /* 배경색을 다르게 하여 구분 */
  border: none;
  border-radius: 8px; /* 다른 카드와 통일감 */
  display: block; /* 내부 ad-placeholder를 중앙 정렬하기 위함 */
  align-items: center;
  justify-content: center;
  min-width: 300px;
  height: 400px; /* 다른 카드들과 높이를 비슷하게 맞춤 */
  padding: 0px;
  width: 100%;
}

.ad-placeholder {
  border: none;
  background: none;
  width: 100%;
  height: 100%;
}

.card-date {
    font-size: 0.9rem;
    color: #888;
    margin-bottom: 8px;
}

.card-category {
    display: inline-block;
    background-color: #e0e0e0;
    color: #555;
    padding: 4px 10px;
    border-radius: 15px;
    font-size: 0.8rem;
    font-weight: bold;
    margin-left: 8px;
}

.card-title {
    font-size: 1.5rem;
    margin: 0 0 12px 0;
    color: #333;
}

.card-summary {
    font-size: 1rem;
    line-height: 1.6;
    color: #444;
    margin: 0 0 16px 0;
    flex-grow: 1; /* 카드가 모두 같은 높이를 갖도록 함 */
    overflow: hidden;
    text-overflow: ellipsis;
    display: -webkit-box;
    -webkit-line-clamp: 4; /* 보여줄 줄 수 */
    -webkit-box-orient: vertical;
}

.card-footer {
    margin-top: auto;
    padding-top: 10px;
    border-top: 1px solid #eee;
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.9rem;
}

.card-links {
    position: relative; /* 자식 요소(가상요소)의 위치 기준점 */
}

.card-links ul {
    list-style: none;
    padding: 0;
    margin: 0;
    border-top: 1px solid #eee;
    padding-top: 10px;
    max-height: 95px; /* 대략 4줄 높이 (line-height에 따라 조절) */
    overflow: hidden;
}

.card-links li {
    margin-bottom: 5px;
}

.card-links a {
    text-decoration: none;
    color: #0056b3;
}

.card-links a:hover {
    text-decoration: underline;
}

.card-links::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 30px; /* 흐려지는 효과의 높이 */
    background: linear-gradient(to bottom, transparent, white);
    pointer-events: none; /* 이 요소를 클릭할 수 없도록 설정 */
}

.card-links-count {
    color: #888;
}

.card-read-more {
    color: #0056b3;
    font-weight: bold;
}

.placeholder-text {
    color: #999;
    font-size: 1.2rem;
    grid-column: 1 / -1; /* 그리드 전체를 차지하도록 */
    text-align: center;
    padding: 4rem 0;
}

.entry-count-wrapper {
  font-size: 1.4rem; /* 큼지막하게 */
  color: rgb(255, 255, 255);
  padding: 0.8rem 1.2rem;
  border-radius: 8px;
  font-weight: bold;
  cursor: pointer;
  background-color: #0c7cec;
  transition: border-color 0.2s;
}

#load-more-container {
  text-align: center;
  margin-top: 2rem;
}

#load-more-btn {
  background-color: #007bff;
  color: white;
  border: none;
  border-radius: 8px;
  padding: 12px 30px;
  font-size: 1.1rem;
  font-weight: bold;
  cursor: pointer;
  transition: background-color 0.2s;
}

#load-more-btn:hover {
  background-color: #0056b3;
}