/* ==========================================================================
   Light "SaaS" Theme - UEDU Modern
   ========================================================================== */

/* 1. 폰트 및 기본 설정 */
@import url('https://fonts.googleapis.com/css2?family=Noto+Sans+KR:wght@400;500;700&family=Poppins:wght@600;700&display=swap');

:root {
    --header-height: 80px;
    --banner-max-width: 1720px; /* 배너 최대 너비 */
    --banner-radius: 50px;      /* 둥근 모서리 */
    /* Main Color Palette */
    --primary-color: #3B82F6; /* Tailwind Blue 500 */
    --primary-dark: #2563EB;  /* Tailwind Blue 600 */
    --accent-color: #F59E0B;   /* Tailwind Amber 500 */
    --accent-dark: #D97706;    /* Tailwind Amber 600 */

    /* Neutrals */
    --text-heading: #1E293B; /* Slate 800 */
    --text-body: #334155;    /* Slate 700 */
    --text-muted: #64748B;   /* Slate 500 */
    --bg-body: #F8FAFC;      /* Slate 50 */
    --bg-card: #FFFFFF;
    --border-color: #E2E8F0; /* Slate 200 */

    /* UI Styles */
    --header-height: 80px;
    --card-radius: 12px;
    --button-radius: 8px;
    --shadow-sm: 0 1px 2px 0 rgb(0 0 0 / 0.05);
    --shadow-md: 0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.1);
    --shadow-lg: 0 10px 15px -3px rgb(0 0 0 / 0.1), 0 4px 6px -4px rgb(0 0 0 / 0.1);
}

* { box-sizing: border-box; }

body {
    margin: 0;
    font-family: 'Noto Sans KR', sans-serif;
    color: var(--text-body);
    line-height: 1.6;
    background-color: var(--bg-body);
    word-break: keep-all;
    overflow-x: hidden;
}

a { text-decoration: none; color: var(--primary-color); transition: color 0.3s ease; }
a:hover { color: var(--primary-dark); }
ul, li { list-style: none; margin: 0; padding: 0; }
img { max-width: 100%; display: block; }
h1, h2, h3, h4, h5, h6 {
    font-family: 'Poppins', sans-serif;
    color: var(--text-heading);
    font-weight: 700;
}

/* ===============================
   Layout & Container
================================ */
.container {
    max-width: 1200px;
    margin: 120px auto;
    padding: 0 20px;
    position: relative;
}
/* 상단 헤더 때문에 가려지는 현상 방지 */
body > .container { margin-top: 60px; margin-bottom: 60px; min-height: 600px; }

/* 메인 배너와 다음 섹션 사이 간격 */
body > .hero + .section { margin-top: 50px; }

/* ===============================
   Header
================================ */
.site-header {
    height: var(--header-height);
    background: rgba(255, 255, 255, 0.8);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid var(--border-color);
    position: fixed; top: 0; left: 0; right: 0;
    z-index: 1000;
    display: flex; align-items: center;
}
.header-inner {
    width: 100%;
    margin: 0 auto;
    padding: 0 24px;
    display: flex; justify-content: space-between; align-items: center;
    height: 100%;
}
.logo {
    font-size: 24px;
    font-weight: 700;
    color: var(--text-heading);
    white-space: nowrap;
    margin: 0;
}
.logo a {
    font-size: inherit;
    font-weight: inherit;
    font-family: 'Poppins', sans-serif;
    color: var(--primary-color);
}
.gnb {padding-left: 80px;display: flex;align-items: center;gap: 80px;}
.gnb a { font-size: 18px; font-weight: 500; color: var(--text-body); }
.gnb a:hover { color: var(--primary-color); }
.header-actions { display: flex; align-items: center; gap: 16px; }
.user-info { color: var(--text-muted); font-size: 14px; }
.user-info strong { font-weight: 700; color: var(--text-body); }
.link-admin { color: var(--accent-color) !important; font-weight: 700; }
.link-admin:hover { color: var(--accent-dark) !important; }

/* ===============================
   Buttons
================================ */
.btn {
    display: inline-flex; align-items: center; justify-content: center;
    padding: 12px 24px;
    font-size: 1rem; font-weight: 500;
    border-radius: var(--button-radius);
    transition: all 0.2s ease;
    border: 1px solid transparent;
    cursor: pointer;
}
.btn-primary { background-color: var(--primary-color); color: #fff; }
.btn-primary:hover { background-color: var(--primary-dark); color: #fff; transform: translateY(-2px); box-shadow: var(--shadow-md); }
.btn-secondary { background-color: var(--bg-card); color: var(--text-body); border-color: var(--border-color); }
.btn-secondary:hover { background-color: #f1f5f9; border-color: #cbd5e1; }
.btn-sm { padding: 8px 16px; font-size: 14px; }

/* ===============================
  New Main Visual Slider (Adapted for Light Theme)
================================ */
.hero {
    position: relative;
    width: 100%;
    padding-top: var(--header-height); /* 헤더 높이만큼 띄움 */
    padding-bottom: 0;
    background-color: #fff; 
}

/* 1. 실제 슬라이더 컨테이너 (둥근 모서리) */
.main-visual-con {
    position: relative;
    width: 100%;
    max-width: var(--banner-max-width); /* 1720px */
    height: 750px; /* 배너 높이 고정 */
    margin: 0 auto;
    border-radius: var(--banner-radius); /* 50px */
    overflow: hidden; /* 둥근 모서리 밖으로 이미지 나가지 않게 자름 */
    background: #000; /* 로딩 전 배경색 */
    z-index: 1;
}

/* [중요] Slick Slider 내부 요소 높이 강제 지정 (이미지 짤림 방지) */
.main-visual-con .slick-list,
.main-visual-con .slick-track {
    height: 100% !important;
}

/* 2. 개별 슬라이드 아이템 */
.main-visual-item {
    position: relative;
    width: 100%;
    height: 100%;
    overflow: hidden;
    outline: none;
}

/* 3. 배경 이미지 (Zoom 애니메이션) */
.main-visual-img {
    width: 100%;
    height: 100%;
    
    background-repeat: no-repeat !important;
    background-position: center center !important;
    background-size: cover !important;
    
    transform: scale(1.15);
    transition: transform 1s; 
}
/* 활성화 시 애니메이션 */
.active-item .main-visual-img {
    animation: image-zoom-out 6s cubic-bezier(0.25, 0.46, 0.45, 0.94) forwards;
}
@keyframes image-zoom-out { from { transform: scale(1.15); } to { transform: scale(1.0); } }

/* 이미지 위 오버레이 (그라데이션) */
.main-visual-item::after {
    content: ''; position: absolute; top: 0; left: 0; width: 100%; height: 100%;
    background: linear-gradient(180deg, rgba(0,0,0,0) 0%, rgba(0,0,0,0.4) 100%);
    z-index: 1;
}

/* 4. 텍스트 영역 */
.main-visual-txt-con {
    position: absolute; top: 0; left: 0; width: 100%; height: 100%;
    z-index: 2; pointer-events: none;
}
.main-visual-txt-box {
    display: flex; flex-direction: column; justify-content: center;
    width: 100%; height: 100%;
    padding-left: 100px; padding-right: 20px;
}
.main-visual-txt-inner { margin-top: -50px; }

.main-visual-txt1 {
    display: block; font-size: 70px; line-height: 1.1; letter-spacing: -0.02em; color: #fff; font-weight: 700;
    margin-bottom: 20px; opacity: 0; transform: translateX(-50px);
}
.main-visual-txt2 {
    display: block; font-size: 22px; color: rgba(255,255,255,0.9); font-weight: 400;
    opacity: 0; transform: translateX(-50px);
}

/* 텍스트도 active-item 클래스가 붙을 때만 등장 */
.active-item .main-visual-txt1 { animation: txtAni 1s cubic-bezier(0.4, 0, 0.2, 1) both 0.3s; }
.active-item .main-visual-txt2 { animation: txtAni 1s cubic-bezier(0.4, 0, 0.2, 1) both 0.5s; }

@keyframes txtAni { 
    from { opacity: 0; transform: translateX(-50px); } 
    to { opacity: 1; transform: translateX(0); } 
}

/* 5. 하단 컨트롤 바 (위치 조정) */
.main-visual-counter {
    position: absolute; bottom: 60px; left: 0; width: 100%; z-index: 10;
}
.main-visual-counter .area {
    display: flex; align-items: center; justify-content: space-between;
    width: 100%; 
    padding-left: 150px; /* 텍스트 시작점과 라인 맞춤 */
    padding-right: 150px;
}

.main-visual-num-box { display: flex; align-items: center; gap: 20px; color: #fff; font-weight: 500; }
.cur-num { font-size: 20px; font-weight: 700; }
.total-num { opacity: 0.6; }
.middle-line { width: 1px; height: 12px; background: rgba(255,255,255,0.4); }

.main-visual-arrow { display: flex; gap: 10px; margin-right: 20px; }
.main-visual-arrow button {
    width: 30px; height: 30px; border: 1px solid rgba(255,255,255,0.4);
    border-radius: 50%; background: transparent; color: #fff; cursor: pointer; transition: 0.3s;
    display: flex; align-items: center; justify-content: center;
}
.main-visual-arrow button:hover { background: #fff; color: #000; border-color: #fff; }

.main-visual-bar { flex: 1; height: 2px; background: rgba(255,255,255,0.2); margin-left: 50px; position: relative; }
.bar-fill { display: block; height: 100%; width: 0%; background: #fff; }


/* 6. 스크롤 아이콘 (위치 조정) */
.main-scroll-icon {
    position: absolute; bottom: 80px; left: 40px; z-index: 9;
    display: flex; flex-direction: column; align-items: center;
}
.main-scroll-icon .txt {
    writing-mode: vertical-rl; text-orientation: mixed;
    font-size: 13px; font-weight: 700; letter-spacing: 2px;
    margin-bottom: 20px; color: #000;
}
.scroll-arrow-ani { font-size: 18px; color: #000; animation: scrollBounce 1.5s infinite; }
@keyframes scrollBounce { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(10px); } }

/* 반응형 */
@media (max-width: 1800px) {
    .site-header .header-inner { max-width: 100%; }
    .main-visual-con { max-width: calc(100% - 100px); }
    .main-scroll-icon { left: 10px; }
}
@media (max-width: 1280px) {
    .main-visual-con { height: 600px; max-width: calc(100% - 40px); }
    .main-visual-txt1 { font-size: 50px; }
    .main-visual-txt-box, .main-visual-counter .area { padding-left: 60px; padding-right: 60px; }
    .main-scroll-icon { display: none; }
}
@media (max-width: 768px) {
    .main-visual-con { border-radius: 20px; height: 500px; max-width: calc(100% - 30px); }
    .main-visual-txt1 { font-size: 36px; }
    .main-visual-counter { bottom: 30px; }
    .main-visual-bar { display: none; }
}

/* ==========================================================================
   [섹션 1] Products
   ========================================================================== */
#mainContent1 {
    position: relative;
    padding: 100px 0 150px;
    background-color: #f9f9f9;
    overflow: hidden;
}

/* 배경 장식 (옵션) */
#mainContent1::before {
    content: ''; position: absolute; top: 0; left: 0; width: 100%; height: 100%;
    background: url('https://www.transparenttextures.com/patterns/cubes.png'); /* 패턴 예시 */
    opacity: 0.05; pointer-events: none;
}

/* 1. 상단 타이틀 영역 */
.main-prd-top-box {
    display: flex; justify-content: space-between; align-items: flex-end;
    margin-bottom: 60px;
    position: relative; z-index: 2;
}

.main-tit-box { width: 100%; }
.main-tit-en {
    display: block; font-size: 20px; color: var(--primary-navy); font-weight: 700;
    margin-bottom: 10px; text-transform: uppercase;
}

.prd-tit-box { display: flex; align-items: flex-end; gap: 40px; }
.main-tit {
    font-size: 80px; line-height: 1; color: #222; font-weight: 700; margin: 0;
    letter-spacing: -2px;
}
.main-txt {
    font-size: 18px; color: #666; font-weight: 500; line-height: 1.6;
    margin-bottom: 10px;
}

/* 더보기 버튼 */
.main-btn-box .main-btn {
    display: inline-flex; justify-content: space-between; align-items: center;
    width: 180px; height: 50px; padding: 0 25px;
    border: 2px solid #222; 
    border-radius: 50px; /* [수정] 둥근 모서리 강제 적용 */
    font-size: 16px; font-weight: 700; color: #222;
    transition: 0.3s; background: transparent;
}
.main-btn-box .main-btn:hover {
    background: #222; color: #fff;
}
/* ==========================================================================
   Sections, Course Cards & Filters
   ========================================================================== */
.content-section { padding: 0px 0; }
.section-header { text-align: center; margin-bottom: 64px; }
.section-tag { display: inline-block; padding: 6px 16px; background-color: var(--primary-color); color: #fff; font-size: 14px; font-weight: 500; border-radius: 99px; margin-bottom: 16px; font-family: 'Poppins', sans-serif; }
.section-title { font-size: 2.5rem; font-weight: 700; color: var(--text-heading); margin: 0 0 16px; }
.section-footer { text-align: center; margin-top: 64px; }
.course-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 32px; }
.vision-cards { display: grid; grid-template-columns: repeat(3, 1fr); gap: 32px; }
.course-card { background: var(--bg-card); border: 1px solid var(--border-color); border-radius: var(--card-radius); text-align: left; overflow: hidden; box-shadow: var(--shadow-sm); transition: transform 0.3s ease, box-shadow 0.3s ease; }
.course-card:hover { transform: translateY(-5px); box-shadow: var(--shadow-md); }
.card-img-wrap img { width: 100%; height: 180px; object-fit: cover; }
.card-body { padding: 24px; }
.card-title { font-size: 1.25rem; font-weight: 600; margin: 0 0 8px; color: var(--text-heading); }
.card-text { font-size: 1rem; color: var(--text-body); margin-bottom: 16px; }
.card-price { font-size: 1.1rem; font-weight: 700; color: var(--primary-color); text-align: right; }
.course-filters { display: flex; justify-content: center; gap: 15px; margin-bottom: 40px; flex-wrap: wrap; }
.filter-btn { padding: 10px 20px; font-size: 1rem; font-weight: 500; border: 1px solid var(--border-color); background-color: var(--bg-card); color: var(--text-body); border-radius: 99px; cursor: pointer; transition: all 0.2s ease; }
.filter-btn:hover { border-color: #cbd5e1; background-color: #f1f5f9; }
.filter-btn.active { background-color: var(--primary-color); color: #fff; border-color: var(--primary-color); font-weight: 600; }

/* ==========================================================================
   Login Page
   ========================================================================== */
.login-page { 
    display: flex; 
    align-items: center; 
    justify-content: center; 
    min-height: 100vh; 
    background-color: var(--bg-body); 
    padding: 24px;
    position: relative;
    z-index: 10; /* Ensure it stays above other content but below header if needed, or adjust as necessary */
    background: var(--bg-body); /* Force solid background */
}
.login-form__wrapper { width: 100%; max-width: 420px; background: var(--bg-card); padding: 48px; border-radius: var(--card-radius); box-shadow: var(--shadow-lg); }
.login-form__logo { text-align: center; margin-bottom: 24px; }
.login-form__logo a { font-size: 32px; font-weight: 700; color: var(--primary-color); }
.login-form__title { font-size: 24px; text-align: center; margin: 0 0 8px; }
.login-form__subtitle { font-size: 1rem; text-align: center; color: var(--text-muted); margin-bottom: 32px; }
.login-form__error { background-color: #FECACA; color: #991B1B; border-radius: var(--button-radius); padding: 12px 16px; margin-bottom: 24px; font-size: 14px; display: flex; align-items: center; gap: 10px; }
.form-group { margin-bottom: 20px; }
.form-label { display: block; font-size: 14px; font-weight: 500; margin-bottom: 8px; color: var(--text-body); }
.form-input-group { position: relative; border: 1px solid var(--border-color); border-radius: var(--button-radius); background-color: var(--bg-card); transition: border-color 0.2s, box-shadow 0.2s; }
.form-input-group:hover { border-color: #94a3b8; }
.form-input-group:focus-within { border-color: var(--primary-color); box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.2); }
.form-input-group i { position: absolute; left: 16px; top: 50%; transform: translateY(-50%); color: #94a3b8; transition: color 0.2s; }
.form-input-group:focus-within i { color: var(--primary-color); }
.form-control {
    box-sizing: border-box;
    width: 100%;
    height: 48px;
    padding: 0 16px; /* Default padding without icon */
    font-size: 1rem;
    border: none;
    border-radius: var(--button-radius);
    background-color: white;
    color: var(--text-body);
}
.form-input-group .form-control {
    padding-left: 48px; /* Add padding only for inputs with icons */
}
.form-control:focus { outline: none; }
.form-control::placeholder { color: #94a3b8; }
input.form-control { /* Added for explicit vertical alignment */
    vertical-align: middle;
}
/* Special override for file inputs to visually center them */
input.form-control[type="file"] {
    padding-top: 9px;
    padding-bottom: 9px;
}
textarea.form-control-textarea {
    margin-top: 10px;
    padding: 10px 16px;
    min-height: 120px;
    resize: vertical; /* Allow vertical resizing by user */
}
.btn-block { width: 100%; height: 48px; font-size: 1rem; font-weight: 600; }
.login-form__footer { text-align: center; margin-top: 32px; font-size: 14px; color: var(--text-muted); }
.login-form__footer a { font-weight: 500; }

/* ==========================================================================
   Footer
   ========================================================================== */
.site-footer {
    background: #fff;
    color: var(--text-muted);
    padding: 50px 0;
    margin-top: 100px;
    text-align: center;
    font-size: 14px;
    border-top: 1px solid var(--border-color);
}
.footer-logo { font-size: 24px; font-weight: 700; color: var(--text-heading); }
.footer-links a { margin: 0 12px; color: var(--text-body); }
.footer-links a:hover { color: var(--primary-color); }


/* ==========================================================================
   Mobile Menu Navigation
   ========================================================================== */
.mobile-menu-trigger {
    display: none; /* 평상시엔 숨김 */
    width: 30px;
    height: 20px;
    position: relative;
    cursor: pointer;
    background: transparent;
    border: none;
    z-index: 1002;
}

.mobile-menu-trigger span {
    display: block;
    width: 100%;
    height: 3px;
    background-color: var(--text-heading);
    position: absolute;
    left: 0;
    transition: all 0.3s ease;
}

.mobile-menu-trigger span:nth-child(1) { top: 0; }
.mobile-menu-trigger span:nth-child(2) { top: 50%; transform: translateY(-50%); }
.mobile-menu-trigger span:nth-child(3) { bottom: 0; }

/* 모바일 메뉴 활성화 시 Trigger (X 모양) */
.is-mobile-menu-active .mobile-menu-trigger span:nth-child(1) {
    top: 50%;
    transform: translateY(-50%) rotate(45deg);
}
.is-mobile-menu-active .mobile-menu-trigger span:nth-child(2) {
    opacity: 0;
}
.is-mobile-menu-active .mobile-menu-trigger span:nth-child(3) {
    bottom: 50%;
    transform: translateY(50%) rotate(-45deg);
}

/* 모바일 메뉴 컨테이너 */
.mobile-gnb {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(20, 20, 20, 0.98);
    backdrop-filter: blur(5px);
    z-index: 1001;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
}

.is-mobile-menu-active .mobile-gnb {
    opacity: 1;
    visibility: visible;
}

.mobile-gnb a {
    color: #fff;
    font-size: 24px;
    font-weight: 600;
    padding: 15px 0;
    text-align: center;
    width: 100%;
    transition: background-color 0.3s ease;
}

.mobile-gnb a:hover {
    background-color: rgba(255, 255, 255, 0.1);
}

.mobile-menu-close {
    position: absolute;
    top: 20px;
    right: 25px;
    background: transparent;
    border: none;
    color: #fff;
    font-size: 40px;
    line-height: 1;
    cursor: pointer;
    padding: 0;
}

/* ==========================================================================
   Board Styles
   ========================================================================== */
.board-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 24px;
    padding-bottom: 16px;
    border-bottom: 2px solid var(--text-heading);
}
.board-header-actions {
    display: flex;
    gap: 8px;
    align-items: center;
}
.board-header-actions .btn {
    height: 42px;
    padding-top: 0;
    padding-bottom: 0;
}
.board-search-form {
    display: flex;
    gap: 8px;
}
.board-search-form .form-control {
    width: 250px;
    height: 42px;
}
.board-list-header {
    display: flex;
    padding: 12px 24px;
    font-size: 14px;
    font-weight: 500;
    color: var(--text-muted);
    background-color: var(--bg-body);
    border-bottom: 1px solid var(--border-color);
}
.board-list-header .col-id { width: 10%; }
.board-list-header .col-title { flex: 1; }
.board-list-header .col-author { width: 15%; text-align: center; }
.board-list-header .col-date { width: 15%; text-align: center; }

.board-list {
    border: 1px solid var(--border-color);
    border-radius: var(--card-radius);
    background: var(--bg-card);
    box-shadow: var(--shadow-sm);
    overflow: hidden;
}
.board-item {
    display: flex;
    align-items: center;
    padding: 16px 24px;
    border-bottom: 1px solid var(--border-color);
    transition: background-color 0.2s ease;
}
.board-item:last-child {
    border-bottom: none;
}
.board-item:hover {
    background-color: #f8fafc;
}
.board-item > div {
    display: flex;
    align-items: center;
}
.col-id {
    width: 10%;
    font-size: 14px;
    color: var(--text-muted);
}
.col-title {
    flex: 1;
    font-size: 1rem;
    font-weight: 500;
}
.col-title a {
    color: var(--text-body);
}
.col-title a:hover {
    color: var(--primary-color);
    text-decoration: underline;
}
.col-author {
    width: 15%;
    font-size: 15px;
    color: var(--text-muted);
    justify-content: center;
}
.col-date {
    width: 15%;
    font-size: 15px;
    color: var(--text-muted);
    justify-content: center;
}
.new-badge {
    display: inline-block;
    margin-left: 8px;
    padding: 2px 6px;
    background-color: var(--primary-color);
    color: #fff;
    font-size: 11px;
    font-weight: 700;
    border-radius: 4px;
    line-height: 1;
    vertical-align: middle;
}

.badge {
    display: inline-block;
    padding: 4px 8px;
    background-color: var(--accent-color); /* Using accent color for badges */
    color: #fff;
    font-size: 0.8rem;
    font-weight: 500;
    border-radius: var(--button-radius); /* Use button radius for consistency */
    white-space: nowrap;
    vertical-align: middle;
}

.board-empty {
    padding: 80px 20px;
    text-align: center;
    color: var(--text-muted);
}
.pagination {
    display: flex;
    justify-content: center;
    gap: 8px;
    margin-top: 40px;
}
.pagination .btn {
    min-width: 40px;
    padding: 8px 12px;
}
.pagination .btn-green {
    font-weight: 700;
    box-shadow: var(--shadow-sm);
}

/* Board View Styles */
.board-view-card {
    background-color: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--card-radius);
    box-shadow: var(--shadow-sm);
    margin-top: 24px;
}
.board-view-card .card-body {
    padding: 40px;
}
.board-view-title {
    font-size: 2rem;
    font-weight: 700;
    margin-top: 0;
    margin-bottom: 16px;
    color: var(--text-heading);
}
.board-view-meta {
    display: flex;
    gap: 16px;
    font-size: 14px;
    color: var(--text-muted);
    padding-bottom: 24px;
    margin-bottom: 32px;
    border-bottom: 1px solid var(--border-color);
}
.board-view-meta .author:before {
    content: '작성자: ';
    font-weight: 500;
}
.board-view-meta .date:before {
    content: '등록일: ';
    font-weight: 500;
}
.post-content {
    min-height: 250px;
    line-height: 1.8;
    font-size: 1rem;
    color: var(--text-body);
}
.post-attachment {
    margin-top: 32px;
    padding: 16px;
    border-top: 1px dashed var(--border-color);
    font-size: 14px;
    background-color: var(--bg-body);
    border-radius: var(--button-radius);
}
.post-attachment strong {
    font-weight: 500;
    color: var(--text-body);
    margin-right: 8px;
}
.post-attachment a {
    text-decoration: underline;
}

.admin-answer-box {
    margin-top: 20px;
    border: 1px solid var(--primary-color);
    border-radius: var(--card-radius);
    background: #eff6ff; /* Blue 50 */
}
.admin-answer-box .answer-header {
    padding: 12px 20px;
    border-bottom: 1px solid var(--primary-color);
}
.admin-badge {
    font-weight: 700;
    color: var(--primary-dark);
}
.admin-answer-box .answer-content {
    padding: 20px;
    line-height: 1.8;
    color: var(--text-body);
}

.info-box {
    background-color: var(--bg-body);
    padding: 16px;
    border-radius: var(--card-radius);
    margin: 16px 0;
    border: 1px solid var(--border-color);
}


.form-actions {
    display: flex;
    justify-content: flex-end; /* Align buttons to the right */
    gap: 8px;
    padding-top: 24px;
    border-top: 1px solid var(--border-color);
    margin-top: 32px;
}
/* Move list button to the left */
.form-actions .btn-list {
    margin-right: auto;
}
.form-actions .btn-danger {
    background-color: #EF4444; /* Red 500 */
    color: #fff;
}
.form-actions .btn-danger:hover {
    background-color: #DC2626; /* Red 600 */
}

.password-prompt-card {
    max-width: 420px;
    margin: 40px auto;
    background: var(--bg-card);
    padding: 48px;
    border-radius: var(--card-radius);
    box-shadow: var(--shadow-lg);
    text-align: center;
}
.password-prompt-card h4 {
    font-size: 20px;
    margin-top: 0;
    margin-bottom: 8px;
}
.password-prompt-card p {
    color: var(--text-muted);
    margin-bottom: 24px;
}

/* ==========================================================================
   Content Page Styles (Greeting, etc.)
   ========================================================================== */
.path {
    font-size: 14px;
    color: var(--text-muted);
    border-bottom: 1px solid var(--border-color);
    padding-bottom: 16px;
    margin-bottom: 40px;
}
.path_list {
    display: flex;
    gap: 8px;
}
.path_list li:not(.last):after {
    content: '>';
    margin-left: 8px;
    color: var(--border-color);
}
.path_list a {
    color: var(--text-muted);
}
.path_list a:hover {
    color: var(--primary-color);
}
.content_body {
    background: var(--bg-card);
    padding: 40px;
    border-radius: var(--card-radius);
    border: 1px solid var(--border-color);
}
.greeting {
    display: flex;
    gap: 40px;
}
.greeting .scont_img {
    flex: 0 0 400px;
}
.greeting .scont_img img {
    border-radius: var(--card-radius);
    box-shadow: var(--shadow-md);
}
.greeting .scont {
    flex: 1;
}
.greeting .blog-prc {
    font-size: 1.1rem;
    line-height: 1.9;
}
.certs-gallery {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 20px;
}
.certs-gallery a {
    display: block;
    border: 1px solid var(--border-color);
    border-radius: var(--button-radius);
    overflow: hidden;
    transition: all 0.3s ease;
    box-shadow: var(--shadow-sm);
}
.certs-gallery a:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-lg);
    border-color: var(--primary-color);
}
.certs-gallery img {
    width: 100%;
    height: 100%; /* Make images fill their container */
    object-fit: cover;
}

/* Dynamic Layout Rules for certs-gallery */
.certs-gallery {
    display: flex; /* Changed to flex to stack rows/items */
    flex-direction: column; /* Stack items vertically */
    gap: 20px; /* Gap between rows/items */
    margin-top: 20px;
}
/* When certs-gallery contains direct image links (default grid for 1-4,6,8 items) */
.certs-gallery:not(:has(.certs-row)) {
    display: grid; /* Make it a grid for direct children */
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
}

.certs-row {
    display: grid; /* Each row is its own grid */
    gap: 20px;
    margin-bottom: 20px; /* Space between rows */
}
.certs-row:last-child {
    margin-bottom: 0;
}
.certs-row-2 {
    grid-template-columns: repeat(2, 1fr);
}
.certs-row-3 {
    grid-template-columns: repeat(3, 1fr);
}
.certs-row-4 {
    grid-template-columns: repeat(4, 1fr);
}


/* ==========================================================================
   Admin & CMS Styles
   ========================================================================== */
.editable-content-wrapper {
    position: relative;
    border: 2px dashed transparent;
    transition: border-color 0.3s;
}
.editable-content-wrapper:hover {
    border-color: var(--primary-color);
}
.content-edit-btn {
    position: absolute;
    top: 15px;
    right: 15px;
    z-index: 999;
    background: var(--primary-color) !important;
    color: white !important;
    padding: 6px 12px;
    font-size: 13px;
    font-weight: 500;
    border-radius: var(--button-radius);
    text-decoration: none;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s;
    transform: translateY(-10px);
}
.editable-content-wrapper:hover .content-edit-btn {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

/* certs_gallery_manage.php Specific Styles */
#certs-sortable-list {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); /* Responsive grid for admin */
    gap: 20px;
}
.cert-item-draggable {
    border: 1px solid var(--border-color);
    border-radius: var(--card-radius);
    padding: 10px;
    text-align: center;
    background: var(--bg-card);
    cursor: grab;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    align-items: center;
    height: 220px; /* Fixed height for consistent look */
}
.cert-item-draggable img {
    max-width: 100%;
    max-height: 140px; /* Max height for preview */
    object-fit: contain;
    border-radius: 4px;
    margin-bottom: 10px;
}
.cert-item-draggable p {
    font-size: 13px;
    color: var(--text-muted);
    margin: 0;
}
.cert-item-draggable .btn-red {
    margin-top: auto; /* Push delete button to bottom */
}

/* Upload slot style */
#certs-sortable-list > div:not(.cert-item-draggable) {
    border: 2px dashed var(--border-color);
    border-radius: var(--card-radius);
    padding: 20px;
    text-align: center;
    background: var(--bg-body);
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    height: 220px; /* Match height of draggable items */
}
#certs-sortable-list > div:not(.cert-item-draggable) input[type="file"] {
    display: block;
    margin-bottom: 10px;
    font-size: 14px;
    padding: 8px;
    border: 1px solid var(--border-color);
    border-radius: var(--button-radius);
    background: var(--bg-card);
}
#certs-sortable-list > div:not(.cert-item-draggable) .btn-primary {
    padding: 8px 16px;
    font-size: 14px;
}
.sortable-ghost {
    opacity: 0.2;
    background-color: var(--primary-color);
    border: 2px dashed var(--primary-dark) !important;
}


/* ==========================================================================
   Responsive Styles
   ========================================================================== */
@media (max-width: 992px) {
    /* --- Header --- */
    .gnb { display: none; } /* Hide navigation on medium screens */
    .header-inner { padding: 0 20px; }
    .mobile-menu-trigger { display: block; }


    /* --- Sections --- */
    .content-section { padding: 80px 0; }
    .section-title { font-size: 2rem; }
    .course-grid { grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 24px; }
    .vision-cards { grid-template-columns: 1fr; }

    /* --- Main Product Section --- */
    .main-prd-top-box { flex-direction: column; align-items: flex-start; gap: 30px; }
    .prd-tit-box { flex-direction: column; align-items: flex-start; gap: 10px; }
    .main-tit { font-size: 60px; }
    .main-btn-box { padding-left: 0; }
}

@media (max-width: 768px) {
    /* --- General Layout --- */
    body > .container { margin-top: 40px; margin-bottom: 40px; }
    .container { padding: 0 15px; }
    :root { --header-height: 70px; }

    /* --- Header --- */
    .site-header { height: var(--header-height); }
    .logo a { font-size: 24px; }
    .logo-suffix { display: none; }
    .header-actions { gap: 10px; }
    .btn-sm { padding: 6px 12px; font-size: 13px; }

    /* --- Hero Section --- */
    .main-visual-txt-box { padding-left: 30px; padding-right: 30px; }
    .main-visual-txt1 { font-size: 32px; }
    .main-visual-txt2 { font-size: 18px; }
    .main-visual-counter .area { padding-left: 30px; padding-right: 30px; }
    .main-visual-arrow { display: none; }

    /* --- Sections & Cards --- */
    .section-header { margin-bottom: 48px; }
    .content-section { padding: 60px 0; }
    .course-grid { grid-template-columns: 1fr; gap: 20px; }
    .card-body { padding: 20px; }
    .card-title { font-size: 1.15rem; }
    
    /* --- Main Product Section --- */
    #mainContent1 { padding: 80px 0; }
    .main-tit { font-size: 48px; }
    .main-txt { font-size: 16px; }

    /* --- Login Page --- */
    .login-page { padding: 15px; }
    .login-form__wrapper { padding: 32px; }

    /* --- Footer --- */
    .site-footer { padding: 40px 0; margin-top: 60px; }
    .footer-links { display: flex; flex-direction: column; gap: 10px; }
    .footer-links a { margin: 0; }

    /* Board Responsive */
    .board-header { flex-direction: column; align-items: stretch; gap: 16px; }
    .board-list-header { display: none; }
    .board-item { flex-direction: column; align-items: flex-start; gap: 8px; padding: 16px; }
    .board-item > div { width: 100%; justify-content: flex-start; }
    .col-title { order: 1; font-size: 1.1rem; }
    .col-id { display: none; }
    .col-meta { order: 2; display: flex; gap: 16px; width: 100%; font-size: 14px; }
    .col-author, .col-date { width: auto; }
}

/* --- Dropdown Menu Styles --- */
.nav-item.has-dropdown {
    position: relative;
    display: inline-flex;
    align-items: center;
    height: 100%;
}

/* 모바일 메뉴 내에서 부모 메뉴 항목 스타일 조정 */
@media (max-width: 992px) {
    .mobile-gnb .nav-item.has-dropdown {
        display: flex !important;
        flex-direction: column !important;
        width: 100% !important;
        height: auto !important;
        align-items: center !important;
    }
}

.gnb .nav-item.has-dropdown > a {
    margin: 0; /* div가 마진을 가지므로 a 마진은 제거 */
    padding: 0 15px;
}

.dropdown-menu {
    position: absolute;
    top: 100%;
    left: 50%;
    transform: translateX(-50%) translateY(10px);
    background-color: #fff;
    min-width: 160px;
    box-shadow: 0 10px 25px rgba(0,0,0,0.1);
    border-radius: 8px;
    padding: 10px 0;
    opacity: 0;
    visibility: hidden;
    pointer-events: none; /* 보이지 않을 때 클릭 무시 */
    transition: all 0.3s ease;
    z-index: 1000;
    border: 1px solid #eee;
}

/* PC 환경에서만 호버 효과 적용 */
@media (min-width: 993px) {
    .nav-item.has-dropdown:hover .dropdown-menu {
        opacity: 1;
        visibility: visible;
        pointer-events: auto; /* 보일 때만 클릭 허용 */
        transform: translateX(-50%) translateY(0);
    }
}

.dropdown-menu::before {
    content: '';
    position: absolute;
    top: -6px;
    left: 50%;
    transform: translateX(-50%) rotate(45deg);
    width: 12px;
    height: 12px;
    background-color: #fff;
    border-left: 1px solid #eee;
    border-top: 1px solid #eee;
}

.dropdown-menu a {
    display: block;
    padding: 10px 20px;
    color: var(--text-muted) !important;
    font-size: 14px !important;
    font-weight: 500 !important;
    text-decoration: none;
    transition: all 0.2s;
    white-space: nowrap;
    text-align: center;
    margin: 0 !important;
}

.dropdown-menu a:hover {
    color: var(--primary-color) !important;
    background-color: #f8f9fa;
}

/* 모바일 메뉴 내 드롭다운 처리 */
.mobile-gnb .dropdown-menu {
    position: relative !important;
    top: 0 !important;
    left: 0 !important;
    transform: none !important;
    opacity: 1 !important;
    visibility: visible !important;
    box-shadow: none !important;
    border: none !important;
    background: rgba(255,255,255,0.05) !important;
    width: 100% !important;
    padding: 0 !important;
    margin-top: 0 !important;
    display: flex !important;
    flex-direction: column !important;
    align-items: center !important;
}
.mobile-gnb .dropdown-menu::before { display: none !important; }
.mobile-gnb .dropdown-menu a {
    font-size: 18px !important;
    color: #ccc !important;
    padding: 12px 0 !important;
    width: 100% !important;
    text-align: center !important;
}


/* Adjustment for header layout to prevent clipping */
.site-header {
    overflow: visible !important;
}
.header-inner {
    overflow: visible !important;
}

/* ===== Customer Center ===== */
.customer-center-layout {
    display: grid;
    grid-template-columns: 260px minmax(0, 1fr);
    gap: 28px;
    align-items: start;
}
.customer-center-nav {
    background: #fff;
    border: 1px solid var(--border-color);
    border-radius: 12px;
    box-shadow: var(--shadow-sm);
    padding: 24px 20px;
    position: sticky;
    top: 110px;
}
.customer-center-nav__title {
    font-size: 1.4rem;
    margin: 0 0 18px 0;
}
.customer-center-nav__links {
    display: flex;
    flex-direction: column;
    gap: 10px;
}
.customer-center-nav__link {
    display: block;
    padding: 12px 14px;
    border-radius: 8px;
    color: var(--text-body);
    font-weight: 600;
    background: #f8fafc;
    border: 1px solid transparent;
}
.customer-center-nav__link.is-active,
.customer-center-nav__link:hover {
    color: var(--primary-dark);
    border-color: #bfdbfe;
    background: #eff6ff;
}
.customer-center-main {
    min-width: 0;
}
.customer-center-eyebrow {
    margin: 0 0 8px 0;
    color: var(--text-muted);
    font-size: 14px;
    font-weight: 700;
}
.board-header--customer {
    margin-bottom: 20px;
}
.faq-toolbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 18px;
    flex-wrap: wrap;
}
.faq-filter-chip {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 8px 14px;
    border-radius: 999px;
    background: #eef2ff;
    color: var(--primary-dark);
    font-size: 14px;
    font-weight: 700;
}
.faq-result-count {
    color: var(--text-muted);
    font-size: 14px;
}
.faq-board {
    display: flex;
    flex-direction: column;
    gap: 12px;
}
.faq-item {
    background: #fff;
    border: 1px solid var(--border-color);
    border-radius: 12px;
    box-shadow: var(--shadow-sm);
    overflow: hidden;
}
.faq-question {
    list-style: none;
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 20px 22px;
    cursor: pointer;
    font-weight: 700;
    color: var(--text-heading);
}
.faq-question::-webkit-details-marker {
    display: none;
}
.faq-question__badge,
.faq-answer__badge {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex: 0 0 32px;
    font-weight: 700;
    font-family: 'Poppins', sans-serif;
}
.faq-question__badge {
    background: #dbeafe;
    color: var(--primary-dark);
}
.faq-answer {
    display: grid;
    grid-template-columns: 32px minmax(0, 1fr);
    gap: 14px;
    padding: 0 22px 22px 22px;
    border-top: 1px solid var(--border-color);
    background: #fff;
}
.faq-answer__badge {
    margin-top: 18px;
    background: #fef3c7;
    color: #b45309;
}
.faq-answer__content {
    padding-top: 18px;
    color: var(--text-body);
    line-height: 1.75;
}
.board-inline-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    margin-left: 8px;
    padding: 2px 8px;
    border-radius: 999px;
    background: #e2e8f0;
    color: var(--text-muted);
    font-size: 12px;
    font-weight: 700;
    vertical-align: middle;
}
.board-inline-badge--file {
    background: #dbeafe;
    color: var(--primary-dark);
}
@media (max-width: 992px) {
    .customer-center-layout {
        grid-template-columns: 1fr;
    }
    .customer-center-nav {
        position: static;
        padding: 18px;
    }
    .customer-center-nav__links {
        flex-direction: row;
        flex-wrap: wrap;
    }
    .customer-center-nav__link {
        flex: 1 1 160px;
        text-align: center;
    }
    .faq-question,
    .faq-answer {
        padding-left: 16px;
        padding-right: 16px;
    }
}
