/* ---------------------------------- */
/* 1. Global & Variables              */
/* ---------------------------------- */
:root {
    --color-primary: #1a3a69; --color-secondary: #3a7ca5; --color-text: #2c3e50; --color-text-light: #ffffff; --color-text-muted: #8492a6; --color-background: #f7f9fc; --color-surface: #ffffff; --color-border: #e0e6ed; --font-family-base: 'Pretendard', -apple-system, BlinkMacSystemFont, "Segoe UI", "Helvetica Neue", Arial, sans-serif; --border-radius-md: 8px; --border-radius-lg: 12px; --shadow-sm: 0 4px 6px rgba(0, 0, 0, 0.04); --shadow-md: 0 10px 15px -3px rgba(0, 0, 0, 0.07), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
}
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
body { font-family: var(--font-family-base); line-height: 1.65; background-color: var(--color-background); color: var(--color-text); }
a { color: var(--color-secondary); text-decoration: none; transition: color 0.3s ease; }
a:hover { color: var(--color-primary); }
.page-container { max-width: 1140px; margin: 0 auto; padding: 20px 20px; }

/* ---------------------------------- */
/* 2. Common Layout & Components      */
/* ---------------------------------- */
.page-header { background-color: var(--color-surface); box-shadow: var(--shadow-sm); padding: 0 20px; height: 70px; position: fixed; top: 0; width: 100%; z-index: 1000; border-bottom: 1px solid var(--color-border); }
body { padding-top: 70px; }
.page-header__container { display: flex; align-items: center; justify-content: space-between; height: 100%; max-width: 1140px; margin: 0 auto; }
.page-header__logo { font-weight: 800; font-size: 1.4rem; color: var(--color-primary); letter-spacing: -0.5px; }
.main-nav__list { display: flex; list-style: none; gap: 25px; }
.main-nav__link { color: var(--color-text-muted); font-weight: 600; font-size: 1rem; padding: 10px 5px; position: relative; }
.main-nav__link::after { content: ''; position: absolute; bottom: 0; left: 5px; right: 5px; height: 2px; background-color: var(--color-primary); transform: scaleX(0); transition: transform 0.3s ease; }
.main-nav__link:hover, .main-nav__link.is-active { color: var(--color-primary); }
.main-nav__link.is-active::after, .main-nav__link:hover::after { transform: scaleX(1); }
.header__actions { display: flex; align-items: center; gap: 15px; }
.btn-labtool { background-color: var(--color-primary); color: var(--color-text-light) !important; padding: 8px 16px; border-radius: var(--border-radius-md); font-weight: 600; font-size: 0.9rem; transition: background-color 0.3s ease; }
.btn-labtool:hover { background-color: var(--color-secondary); }
.nav-toggle-btn { display: none; background: transparent; border: none; cursor: pointer; padding: 5px; font-size: 1.75rem; color: var(--color-primary); }
@media (max-width: 992px) { .main-navigation { display: none; position: absolute; top: 70px; left: 0; right: 0; background-color: var(--color-surface); box-shadow: 0 10px 15px rgba(0,0,0,0.1); padding: 10px 20px 20px; z-index: 999; } .main-navigation.is-open { display: block; } .main-nav__list { flex-direction: column; gap: 0; } .main-nav__link { display: block; padding: 12px 10px; } .btn-labtool { display: none; } .nav-toggle-btn { display: block; } }
.hero-section { background: linear-gradient(135deg, var(--color-primary) 0%, var(--color-secondary) 100%); color: var(--color-text-light); text-align: center; padding: 60px 20px; }
.hero-section__title { font-size: 2.5rem; font-weight: 800; }
.hero-section__subtitle { font-size: 1.2rem; opacity: 0.9; margin-top: 10px; }
.breadcrumbs-section { background-color: var(--color-surface); border-bottom: 1px solid var(--color-border); }
.breadcrumbs__list { display: flex; flex-wrap: wrap; list-style: none; max-width: 1140px; margin: 0 auto; font-size: 0.9rem; }
.breadcrumbs__list li + li::before { content: "/"; display: inline-block; padding: 0 10px; color: var(--color-text-muted); }
.breadcrumbs__list .is-current { font-weight: 600; color: var(--color-text); }
.btn { display: inline-block; padding: 8px 16px; font-size: 0.9rem; font-weight: 600; text-align: center; text-decoration: none !important; border-radius: var(--border-radius-md); transition: all 0.25s ease-in-out; cursor: pointer; border: 1px solid transparent; }
.btn--primary { background-color: var(--color-primary); color: var(--color-surface) !important; }
.btn--primary:hover { background-color: var(--color-secondary); transform: translateY(-2px); }
.btn--outline { background-color: transparent; color: var(--color-primary) !important; border-color: var(--color-border); }
.btn--outline:hover { background-color: var(--color-primary); color: var(--color-surface) !important; border-color: var(--color-primary); }
.btn--full-width { width: 100%; display: block; }

/* ---------------------------------- */
/* 3. Page-Specific Styles            */
/* ---------------------------------- */

/* MODIFIED: notice-grid에 반응형 2단 컬럼 레이아웃 적용 */
.notice-grid {
    display: grid;
    gap: 30px;
    grid-template-columns: 1fr;
}
@media (min-width: 992px) {
    .notice-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

/* ADDED: 특정 아이템이 그리드 전체 너비를 차지하도록 하는 유틸리티 클래스 */
.grid-span-all {
    grid-column: 1 / -1;
}

.info-card { background-color: var(--color-surface); border-radius: var(--border-radius-lg); box-shadow: var(--shadow-sm); transition: transform 0.3s ease, box-shadow 0.3s ease; overflow: hidden; border: 1px solid var(--color-border); margin-bottom: 30px;}
.info-card:hover { transform: translateY(-5px); box-shadow: var(--shadow-md); }
.info-card--recruitment { border-top: 5px solid var(--color-primary); }
.card__header { padding: 25px 30px; display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 15px; border-bottom: 1px solid var(--color-border); }
.card__body { padding: 25px 30px; }
.card__body .btn { margin-top: 1rem; }
.card__title { font-size: 1.25rem; font-weight: 700; color: var(--color-primary); }
.card__subtitle { font-size: 1.1rem; font-weight: 600; margin-top: 25px; margin-bottom: 15px; color: var(--color-secondary); }
.styled-list { list-style: none; padding: 0;}
.styled-list li { position: relative; padding-left: 22px; margin-bottom: 10px; }
.styled-list li::before { content: '✓'; position: absolute; left: 0; font-weight: 700; color: var(--color-secondary); font-size: 1.2em; line-height: 1; }
.styled-list b, .styled-list strong { color: var(--color-text); font-weight: 600; }

/* ADDED: 모집 공고 내 '지원' 섹션 스타일 */
.support-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 30px;
    margin-top: 20px;
}
@media (min-width: 768px) {
    .support-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}
.support-category .category-title {
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--color-text);
    margin-bottom: 15px;
    display: flex;
    align-items: center;
    gap: 8px;
}
.support-category .category-title i {
    color: var(--color-primary);
}

/* ADDED: 뉴스 피드 가독성 개선 스타일 */
.news-feed .card__body {
    padding-top: 15px;
    padding-bottom: 15px;
}
.news-feed__item {
    padding: 15px 0;
    border-bottom: 1px solid var(--color-border);
    display: flex;
    gap: 15px;
    align-items: flex-start;
}
.news-feed__item:first-child {
    padding-top: 0;
}
.news-feed__item:last-child {
    padding-bottom: 0;
    border-bottom: none;
}
.news-feed__date {
    flex-shrink: 0;
    font-size: 0.9rem;
    color: var(--color-secondary);
    font-weight: 500;
}
.news-feed__description {
    font-size: 0.95rem;
    line-height: 1.6;
    margin: 0; /* p태그 기본 마진 제거 */
}

/* ADDED: 카드 내 각주 스타일 */
.card__footnote {
    font-size: 0.9rem;
    color: var(--color-text-muted);
    padding-top: 20px;
}


.benefit-list { list-style: none; padding: 0; }
.benefit-list li { display: flex; align-items: flex-start; gap: 12px; margin-bottom: 15px; font-size: 0.95rem; color: var(--color-text-muted); line-height: 1.6; }
.benefit-list li i { font-size: 1.2rem; color: var(--color-primary); margin-top: 3px; }
.benefit-list li strong { color: var(--color-text); font-weight: 600; }
.accordion-list { list-style: none; padding: 0; border-top: 1px solid var(--color-border); }
.accordion-item { border-bottom: 1px solid var(--color-border); }
.accordion-header { width: 100%; display: flex; justify-content: space-between; align-items: center; padding: 20px 10px; background-color: transparent; border: none; cursor: pointer; text-align: left; font-size: 1.05rem; font-weight: 600; color: var(--color-text); transition: background-color 0.3s ease; }
.accordion-header:hover { background-color: var(--color-background); }
.accordion-header .header-title { flex-grow: 1; }
.accordion-header i { font-size: 1.2rem; color: var(--color-primary); transition: transform 0.3s ease; margin-left: 15px; }
.accordion-item.is-open .accordion-header i { transform: rotate(45deg); }
.accordion-panel { max-height: 0; overflow: hidden; transition: max-height 0.4s ease-out; background-color: var(--color-background); }
.accordion-panel .panel-content { padding: 0px 30px 25px 30px; }
.accordion-item.is-open .accordion-header {
    background-color: var(--color-background);
}

.topic-description {
	font-size: 1rem;
	margin-bottom: 25px; /* 설명과 하단 그리드 사이의 간격 */
}
.sub-topic-grid {
	list-style: none;
	padding: 0;
	display: grid;
	gap: 15px;
	grid-template-columns: 1fr; /* 모바일: 1단 그리드 */
}
/* 태블릿 이상 화면: 2단 그리드 */
@media (min-width: 768px) {
	.sub-topic-grid {
		grid-template-columns: repeat(2, 1fr);
	}
}
.sub-topic-item {
	background-color: #fff;
	border: 1px solid var(--color-border);
	border-radius: var(--border-radius-md);
	padding: 20px;
	display: flex;
	align-items: flex-start;
	gap: 15px;
	transition: transform 0.2s ease, box-shadow 0.2s ease;
}
.sub-topic-item:hover {
	transform: translateY(-3px);
	box-shadow: var(--shadow-sm);
}
.sub-topic-item__icon {
	font-size: 1.5rem;
	color: var(--color-secondary);
	margin-top: 3px;
}
.sub-topic-item__content {
	flex: 1;
}
.sub-topic-item__title {
	font-size: 1rem;
	font-weight: 600;
	color: var(--color-text);
	display: block;
	line-height: 1.4;
}
.sub-topic-item__description {
	font-size: 0.9rem;
	color: var(--color-text-muted);
	margin-top: 5px;
	margin-bottom: 0;
	line-height: 1.5;
}

/* Contact Page */
.contact-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(320px, 1fr)); gap: 30px; align-items: flex-start; }
.contact-card { background-color: var(--color-surface); padding: 30px; text-align: center; border-radius: var(--border-radius-lg); border: 1px solid var(--color-border); box-shadow: var(--shadow-sm); transition: transform 0.3s ease, box-shadow 0.3s ease; }
.contact-card:hover { transform: translateY(-5px); box-shadow: var(--shadow-md); }
.contact-card__icon { font-size: 2rem; color: var(--color-primary); margin-bottom: 15px; }
.contact-card__title { font-size: 1.15rem; font-weight: 700; color: var(--color-text); margin-bottom: 10px; }
.contact-card__text { font-size: 0.95rem; color: var(--color-text-muted); line-height: 1.5; }
.contact-map-container { width: 100%; min-height: 450px; height: 100%; border-radius: var(--border-radius-lg); overflow: hidden; box-shadow: var(--shadow-sm); border: 1px solid var(--color-border); }

/* Course & Archive Pages */
.course-layout, .archive-layout { display: grid; grid-template-columns: 1fr; gap: 30px; }
@media (min-width: 992px) { .course-layout, .archive-layout { grid-template-columns: 1fr 320px; } .course-content, .publication-content { order: 1; } .course-sidebar, .archive-sidebar { order: 2; } }
.course-semester-card, .publication-card { background-color: var(--color-surface); border-radius: var(--border-radius-lg); border: 1px solid var(--color-border); box-shadow: var(--shadow-sm); margin-bottom: 30px; }
.course-semester-card:last-child, .publication-card:last-child { margin-bottom: 0; }
.publication-card__body { padding: 25px; }
.course-semester-card__title, .publication-card__title { font-size: 1.5rem; font-weight: 700; color: var(--color-primary); padding: 20px 25px; border-bottom: 1px solid var(--color-border); margin: 0; display: flex; align-items: center; }
.course-list { padding: 25px; display: grid; gap: 15px; }
.course-item { padding: 15px; border: 1px solid var(--color-border); border-radius: var(--border-radius-md); transition: transform 0.2s ease, box-shadow 0.2s ease; }
.course-item:hover { transform: translateY(-3px); box-shadow: var(--shadow-sm); }
.course-item__title { font-size: 1.1rem; font-weight: 600; color: var(--color-text); margin-bottom: 5px; }
.course-item__tags { margin-top: 10px; display: flex; gap: 8px; flex-wrap: wrap; }
.tag { display: inline-block; padding: 4px 12px; font-size: 0.8rem; font-weight: 600; border-radius: 16px; line-height: 1.5; }
.tag--code { background-color: #eef2f7; color: var(--color-text-muted); }
.tag--level { background-color: #eaf3f9; color: var(--color-secondary); }
.sidebar-card { background-color: var(--color-surface); border-radius: var(--border-radius-lg); border: 1px solid var(--color-border); box-shadow: var(--shadow-sm); padding: 20px 25px; }
.sidebar-card__title { font-size: 1.25rem; font-weight: 700; color: var(--color-primary); padding-bottom: 15px; margin-bottom: 15px; border-bottom: 1px solid var(--color-border); display: flex; align-items: center; }
.sidebar-card__title > i { margin-right: 10px; }
/* Base style for all evaluation badges */
.evaluation-badge {
    display: inline-flex; /* Using flex to easily align icons and text */
    align-items: center;
    justify-content: center;
    font-weight: 700;   /* Bolder font for better readability */
    line-height: 1;     /* Prevents text from shifting vertically */
    margin-top: 6px;
}

/* Style for Letter Grades (e.g., 'A') - A distinct circular shape */
.evaluation-badge--grade-a {
    background-color: var(--color-primary);
    color: var(--color-surface);
    font-size: 0.9rem;
    width: 26px;
    height: 26px;
    border-radius: 50%; /* Makes it a circle */
}

/* Style for Numerical Scores (e.g., '98/100') */
.evaluation-badge--score {
    background-color: var(--color-secondary);
    color: var(--color-surface);
    font-size: 0.8rem;
    padding: 5px 10px;
    border-radius: 16px; /* Capsule shape */
    gap: 5px; /* Adds space between the icon and the score */
}

/* Style for Pending Status */
.evaluation-badge--pending {
    background-color: #eef2f7;
    color: var(--color-text-muted);
    font-size: 0.8rem;
    font-weight: 600;
    padding: 5px 10px;
    border-radius: 16px; /* Capsule shape */
}

/* Adjust colors for the 'active' state to ensure visibility */
.category-list__link.is-active .evaluation-badge--grade-a,
.category-list__link.is-active .evaluation-badge--score {
    background-color: var(--color-surface);
    color: var(--color-primary);
}

.category-list__link.is-active .evaluation-badge--score i {
    color: inherit;
}
.category-list { list-style: none; padding: 0; }
.category-list__link { display: flex; justify-content: space-between; align-items: center; padding: 10px; border-radius: var(--border-radius-md); transition: background-color 0.2s ease, color 0.2s ease; color: var(--color-text-muted); }
.category-list__link:hover { background-color: #eef2f7; color: var(--color-primary); }
.category-list__link.is-active { background-color: var(--color-primary); color: var(--color-surface) !important; }
.category-list__label { display: flex; align-items: center; gap: 12px; }
.category-list__label > i { font-size: 1.1rem; color: var(--color-secondary); transition: color 0.2s ease; }
.category-list__link:hover .category-list__label > i, .category-list__link.is-active .category-list__label > i { color: inherit; }
.category-list__count { font-size: 0.85rem; background-color: var(--color-border); color: var(--color-text-muted); padding: 2px 8px; border-radius: 12px; font-weight: 600; }
.category-list__link.is-active .category-list__count { background-color: var(--color-surface); color: var(--color-primary); }
.publication-list { list-style: none; padding: 0; }
.publication-item { display: flex; align-items: flex-start; gap: 20px; padding: 20px 5px; border-bottom: 1px solid var(--color-border); }
.publication-list li:last-child { border-bottom: none; }
.publication-item__icon-wrapper { font-size: 1.5rem; color: var(--color-primary); margin-top: 4px; }
.publication-item__content { flex-grow: 1; }
.publication-item__authors { font-size: 0.95rem; color: var(--color-text-muted); margin-bottom: 5px; font-style: italic; }
.publication-item__title { font-size: 1.1rem; font-weight: 600; color: var(--color-text); margin: 0; line-height: 1.5; }
.publication-item__meta { margin-top: 8px; font-size: 0.9rem; color: var(--color-secondary); }
.publication-item__venue { font-weight: 500; }
.publication-item__year, .publication-item__issue { color: var(--color-text-muted); }
.publication-item__tag-wrapper { margin-left: auto; flex-shrink: 0; }
.tag.tag--category { background-color: var(--color-primary); color: var(--color-surface); font-size: 0.75rem; padding: 5px 12px; }

/* ---------------------------------- */
/* 4. Team Page                       */
/* ---------------------------------- */
.team-nav { display: flex; justify-content: center; gap: 10px; margin-bottom: 40px; }
.professor-layout { display: grid; grid-template-columns: 1fr; gap: 30px; }
@media (min-width: 992px) { .professor-layout { grid-template-columns: 380px 1fr; } }
.profile-card--redesigned { padding: 0; text-align: center; }
.profile-card--redesigned .profile-card__image { width: 100%; height: auto; border-radius: var(--border-radius-lg) var(--border-radius-lg) 0 0; }
.profile-card--redesigned .profile-card__info { padding: 25px; }
.profile-card--redesigned .profile-card__name { font-size: 1.7rem; margin-bottom: 5px; font-weight: 700; color: var(--color-text); }
.profile-card--redesigned .profile-card__title-text { font-size: 1.1rem; font-weight: 500; color: var(--color-secondary); }
.profile-card--redesigned .profile-card__affiliation { font-size: 1rem; color: var(--color-text-muted); margin-top: 5px; }
.profile-card--redesigned .profile-card__divider { border: 0; height: 1px; background-color: var(--color-border); margin: 20px 0; }
.profile-card--redesigned .profile-card__contact { text-align: left; font-size: 0.95rem; }
.profile-card--redesigned .profile-card__contact p { display: flex; align-items: center; margin-bottom: 12px; }
.profile-card--redesigned .profile-card__contact p:last-child { margin-bottom: 0; }
.profile-card--redesigned .profile-card__contact i { color: var(--color-secondary); margin-right: 12px; font-size: 1.2rem; }
.cv-section { margin-bottom: 25px; }
.cv-section:last-child { margin-bottom: 0; }
.cv-section__title { font-size: 1.1rem; font-weight: 600; color: var(--color-text); padding-bottom: 10px; margin-bottom: 15px; border-bottom: 1px solid var(--color-border); }
.info-card__list { list-style: none; padding: 0; }
.info-card__list li { padding: 8px 0; color: var(--color-text-muted); display: flex; gap: 15px; }
.info-card__list li strong { color: var(--color-text); flex-shrink: 0; }
.info-card__list--compact li { padding: 4px 0; display: list-item; }
.member-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); justify-content: center; gap: 30px; }

/* ---------------------------------- */
/* 4.1 Team Page - Redesigned Member Card */
/* ---------------------------------- */
.member-card-v2 {
    background-color: var(--color-surface);
    border-radius: var(--border-radius-lg);
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--color-border);
    overflow: hidden;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    display: flex;
    flex-direction: column;
}
.member-card-v2:hover {
    transform: translateY(-8px);
    box-shadow: var(--shadow-md);
}
.member-card-v2__header {
    background-color: var(--color-background);
    padding: 25px 20px 0 20px;
    display: flex;
    justify-content: center;
}
/* FIXED: 이미지 크기를 320px에서 160px로 수정하여 주석 및 레이아웃과 일치시킴 */
.member-card-v2__image {
    width: 320px;
    height: 320px;
    border-radius: 50%;
    object-fit: cover;
    object-position: center;
    border: 5px solid var(--color-surface);
    box-shadow: var(--shadow-sm);
    margin-bottom: -80px; /* 이미지 높이(160px)의 절반 */
    position: relative;
    z-index: 2;
}
.member-card-v2__content {
    padding: 105px 25px 25px 25px; /* (이미지 높이 160px / 2) + 25px */
    text-align: center;
    display: flex;
    flex-direction: column;
    flex-grow: 1;
}
.member-card-v2__name {
    font-size: 1.3rem;
    font-weight: 700;
    color: var(--color-primary);
    margin: 0 0 4px 0;
}
.member-card-v2__degree {
    font-size: 0.95rem;
    color: var(--color-secondary);
    font-weight: 500;
    margin: 0;
}
.member-card-v2__interests {
    margin: 20px 0;
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 8px;
}
.interest-tag {
    background-color: #eef2f7;
    color: var(--color-text-muted);
    font-size: 0.8rem;
    font-weight: 500;
    padding: 5px 12px;
    border-radius: 16px;
}
.member-card-v2__footer {
    padding: 20px;
    border-top: 1px solid var(--color-border);
    margin-top: auto; /* Pushes footer to the bottom */
    background-color: var(--color-background);
}

/* 리스트 행을 좌/우로 분리 */
.category-list__item {
  align-items: center;
  justify-content: space-between; /* 왼쪽(연도) / 오른쪽(배지들) */
}


/* 배지 공통 */
.badge {
  display: inline-flex;
  align-items: center;
  padding: 2px 8px;
  font-size: 0.85rem;
  line-height: 1.4;
  border-radius: 999px;
  white-space: nowrap;
}

/* 과목 수 배지 (파란 톤) */
.badge-count {
  background: #f3f6ff;
  color: #1f3a8a;
  border: 1px solid #dbeafe;
  padding: 4px 10px;
  border-radius: 999px;
  font-size: 0.8rem;
  font-weight: 600;
}

/* 과목 수 배지 */
.badge-eval,
.badge-count {
  padding: 4px 10px;
  border-radius: 999px;
  font-size: 0.8rem;
  font-weight: 600;
}

/* ---------------------------------- */
/* 5. Footer & Scroll Top             */
/* ---------------------------------- */
.page-footer { background-color: var(--color-surface); color: var(--color-text-muted); padding: 40px 20px; border-top: 1px solid var(--color-border); }
.page-footer__container { max-width: 1140px; margin: 0 auto; }
.footer__main { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 30px; padding-bottom: 30px; margin-bottom: 30px; border-bottom: 1px solid var(--color-border); }
.footer__about { flex: 2; min-width: 280px; }
.footer__logo { font-weight: 800; font-size: 1.5rem; color: var(--color-primary); margin-bottom: 15px; display: inline-block; }
.footer__about p { font-size: 0.95rem; }
.footer__contact { flex: 1; min-width: 280px; }
.footer__contact h4 { font-size: 1.1rem; font-weight: 700; color: var(--color-text); margin-bottom: 15px; }
.footer__contact-list { list-style: none; padding: 0; font-size: 0.95rem; }
.footer__contact-list li { display: flex; align-items: flex-start; margin-bottom: 10px; }
.footer__contact-list i { color: var(--color-secondary); margin-right: 10px; margin-top: 4px; }
.footer__bottom-bar { text-align: center; font-size: 0.85rem; }
.footer__bottom-bar .credits a { font-weight: 600; }
.scroll-top { position: fixed; right: 20px; bottom: 20px; width: 45px; height: 45px; background: var(--color-primary); color: #ffffff; border-radius: 50%; display: flex; align-items: center; justify-content: center; cursor: pointer; transition: all 0.3s ease; box-shadow: var(--shadow-md); opacity: 0; visibility: hidden; z-index: 999; }
.scroll-top.is-visible { opacity: 1; visibility: visible; }
.scroll-top:hover { background: var(--color-secondary); transform: scale(1.1); }

.category-list__row {
  display: grid;
  grid-template-columns: minmax(0,1fr) 90px 56px; /* 기본 폭 */
  column-gap: 10px;
  align-items: center;
  border-radius: var(--border-radius-md);
  padding: 10px;
  transition: background-color .2s ease, color .2s ease;
  white-space: nowrap;        /* 줄바꿈 방지 */
}

.category-list__row * { min-width: 0; }

.category-list__row:focus-visible {
  outline: 2px solid #dbeafe;
  outline-offset: 2px;
}

.category-list__row:hover {
  background-color: #eef2f7;                 /* archive와 동일 hover 배경 */
  color: var(--color-primary);               /* 글자색도 살짝 강조 */
}

.category-list__row.is-active {
  background-color: var(--color-primary);    /* archive와 동일 active 배경 */
  color: var(--color-surface);               /* 글자 반전 */
}
.category-list__row.is-active .badge-eval,
.category-list__row.is-active .badge-count {
  background-color: var(--color-surface);
  color: var(--color-primary);
  border-color: var(--color-surface);
}
/* hover/active 때 왼쪽 텍스트 컬러도 따라가게 */
.category-list__row:hover .category-list__name,
.category-list__row.is-active .category-list__name {
  color: inherit;
}

/* 배지 공통 */
.badge {
  display: inline-flex;
  align-items: center;
  padding: 2px 8px;
  font-size: 0.85rem;
  line-height: 1.4;
  border-radius: 999px;
  white-space: nowrap;
}

/* 평가 배지 */
.badge-eval { background:#eef1f6; color:#334155; border:1px solid #e2e8f0; }
.badge-count{ background:#f3f6ff; color:#1f3a8a; border:1px solid #dbeafe; }



.category-list__right {
  display: contents !important; /* 기존 flex가 있어도 무력화 */
}


/* 각 칸 고정 + 오른쪽 정렬 */
.category-list__name {
  overflow: hidden;
  text-overflow: ellipsis;
}

.col-eval  { grid-column: 2; justify-self: end; text-align: right; white-space: nowrap; }
.col-count { grid-column: 3; justify-self: end; text-align: right; white-space: nowrap; }

/* 데스크톱(>=1200px): 사이드바를 넓혀서 잘림 최소화 */
@media (min-width: 1200px) {
  .course-layout { grid-template-columns: 1fr 380px; }  /* 사이드바 380px */
  .category-list__row { grid-template-columns: minmax(0,1fr) 96px 64px; }
}

/* 노트북(992~1199px): 살짝 줄임 */
@media (min-width: 992px) and (max-width: 1199px) {
  .course-layout { grid-template-columns: 1fr 350px; }  /* 사이드바 350px */
  .category-list__row { grid-template-columns: minmax(0,1fr) 90px 56px; }
}

/* 태블릿/모바일(<992px): 한 줄 유지하면서 열폭 더 축소 */
@media (max-width: 991.98px) {
  .course-layout { grid-template-columns: 1fr; }
  .category-list__row { grid-template-columns: minmax(0,1fr) 80px 54px; }
}

/* 아주 작은 모바일(<=360px): 마지막으로 더 촘촘하게 */
@media (max-width: 360px) {
  .category-list__row { grid-template-columns: minmax(0,1fr) 72px 48px; }
}