/* SKKU Alumni Homepage - Main Styles
   Design language: see /DESIGN.md (Notion base + Stripe trust + Linear restraint) */

:root {
    --skku-green: #006241;
    --skku-green-light: #007a52;
    --skku-green-dark: #004d33;
    --skku-green-tint: #e8f1ed;
    --skku-ink: #12241d;          /* hero deep ink (스크림/밴드) */
    --skku-navy: #1a2a3a;
    --skku-bg: #f7f6f4;           /* warm off-white */
    --skku-surface: #f7f6f4;      /* 섹션 밴드 */
    --skku-card-bg: #ffffff;
    --skku-border: #e7e5e0;       /* warm hairline */
    --skku-border-strong: #d8d6d0;
    --skku-text: #33322e;         /* warm charcoal */
    --skku-text-light: #6b6a64;
    --skku-text-muted: #9a9892;
}

/* ─── Base ─────────────────────────────────────── */

body {
    font-family: 'Pretendard', 'Pretendard Variable', 'Noto Sans KR', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    background-color: var(--skku-bg);
    color: var(--skku-text);
    font-size: 14px;
    line-height: 1.7;
    word-break: keep-all;
    overflow-wrap: break-word;
}

main {
    flex: 1;
}

a {
    color: var(--skku-green);
    text-decoration: none;
}
a:hover {
    color: var(--skku-green-dark);
    text-decoration: underline;
}

/* ─── Top Bar (로고 + 검색 + 로그인) ──────────── */

.top-bar {
    background: #fff;
    border-bottom: 1px solid var(--skku-border);
    padding: 12px 0;
}

.top-bar .logo-link {
    display: flex;
    align-items: center;
    text-decoration: none;
    color: var(--skku-green);
    font-weight: 700;
    font-size: 1.3rem;
    gap: 8px;
}

.top-bar .logo-link .logo-icon {
    font-size: 1.8rem;
}

.top-bar .logo-sub {
    font-size: 0.75rem;
    color: var(--skku-text-light);
    font-weight: 400;
}

.top-bar .search-box {
    max-width: 300px;
}

.top-bar .search-box .form-control {
    border-radius: 8px;
    border-color: var(--skku-border-strong);
    padding-left: 16px;
    font-size: 13px;
}

.top-bar .search-box .btn {
    border-radius: 0 8px 8px 0;
}

/* ─── Main Nav ─────────────────────────────────── */

.bg-skku {
    background-color: var(--skku-green) !important;
}

.main-nav {
    background-color: var(--skku-green);
    border: none;
    padding: 0;
    box-shadow: 0 2px 5px rgba(0,0,0,0.08);
}
.main-nav .navbar-toggler {
    border-color: rgba(255,255,255,0.4);
    padding: 6px 10px;
}
.main-nav .navbar-toggler-icon {
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 30 30'%3e%3cpath stroke='rgba(255,255,255,0.9)' stroke-linecap='round' stroke-miterlimit='10' stroke-width='2' d='M4 7h22M4 15h22M4 23h22'/%3e%3c/svg%3e");
}

.main-nav .navbar-nav .nav-link {
    color: rgba(255,255,255,0.9);
    font-size: 15px;
    font-weight: 500;
    padding: 14px 16px;
    transition: background 0.2s;
}

.main-nav .navbar-nav .nav-link:hover,
.main-nav .navbar-nav .nav-link:focus {
    background-color: rgba(255,255,255,0.1);
    color: #fff;
}

.main-nav .dropdown-menu {
    border: none;
    border-radius: 0 0 8px 8px;
    box-shadow: 0 6px 20px rgba(0,0,0,0.12);
    padding: 8px 0;
    min-width: 200px;
}

.main-nav .dropdown-item {
    padding: 8px 20px;
    font-size: 13px;
    color: var(--skku-text);
}

.main-nav .dropdown-item:hover {
    background-color: rgba(0, 98, 65, 0.06);
    color: var(--skku-green);
}

/* ─── Hero Carousel ────────────────────────────── */

.hero-carousel {
    position: relative;
    overflow: hidden;
}

.hero-carousel .carousel-item img {
    width: 100%;
    height: 420px;
    object-fit: cover;
}

.hero-carousel .carousel-caption {
    background: rgba(0,0,0,0.4);
    border-radius: 12px;
    padding: 20px 30px;
    bottom: 40px;
}

/* 섹션 밴드 (warm off-white 교차) */
.section-band {
    background: var(--skku-surface);
    border-top: 1px solid var(--skku-border);
    border-bottom: 1px solid var(--skku-border);
}

/* ─── Section Titles ───────────────────────────── */

.section-title {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 20px;
    padding-bottom: 12px;
    border-bottom: 2px solid var(--skku-green);
}

.section-title h3 {
    font-size: 1.2rem;
    font-weight: 700;
    color: var(--skku-text);
    margin: 0;
}

.section-title .btn-more {
    font-size: 12px;
    color: var(--skku-text-light);
    display: flex;
    align-items: center;
    gap: 4px;
    text-decoration: none;
}

.section-title .btn-more:hover {
    color: var(--skku-green);
}

/* ─── News Card (플랫 + 헤어라인) ─────────────── */

.news-card {
    background: var(--skku-card-bg);
    border: 1px solid var(--skku-border);
    border-radius: 12px;
    overflow: hidden;
    transition: box-shadow 0.18s ease, border-color 0.18s ease;
    height: 100%;
}

.news-card:hover {
    border-color: var(--skku-border-strong);
    box-shadow: 0 4px 12px rgba(0,0,0,0.06);
}

.news-card .card-thumb {
    height: 180px;
    overflow: hidden;
    background: var(--skku-bg);
}

.news-card .card-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.news-card .card-body {
    padding: 16px;
}

.news-card .card-date {
    font-size: 12px;
    color: var(--skku-text-muted);
    margin-bottom: 6px;
}

.news-card .card-title {
    font-size: 15px;
    font-weight: 600;
    color: var(--skku-text);
    margin-bottom: 8px;
    line-height: 1.4;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.news-card .card-link {
    font-size: 12px;
    color: var(--skku-green);
    font-weight: 500;
}

/* ─── Dashboard 4-Column (공지/행사/동문동정/경조사) */

.dash-section {
    background: var(--skku-card-bg);
    border: 1px solid var(--skku-border);
    border-radius: 12px;
    padding: 20px;
    height: 100%;
}

.dash-section .dash-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.dash-section .dash-list li {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 0;
    border-bottom: 1px solid #f0f0f0;
    gap: 12px;
}

.dash-section .dash-list li:last-child {
    border-bottom: none;
}

.dash-section .dash-list .item-title {
    flex: 1;
    font-size: 13px;
    color: var(--skku-text);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    text-decoration: none;
}

.dash-section .dash-list .item-title:hover {
    color: var(--skku-green);
}

.dash-section .dash-list .item-date {
    font-size: 12px;
    color: var(--skku-text-muted);
    white-space: nowrap;
}

/* ─── Magazine Section ─────────────────────────── */

.magazine-card {
    text-align: center;
    padding: 12px;
}

.magazine-card img {
    width: 100%;
    max-width: 160px;
    border-radius: 4px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    transition: transform 0.2s;
}

.magazine-card img:hover {
    transform: scale(1.03);
}

.magazine-card .issue-label {
    font-size: 12px;
    color: var(--skku-text-light);
    margin-top: 8px;
}

/* ─── CTA Banner (회비납부안내 — surface 밴드) ── */

.cta-banner {
    background: var(--skku-surface);
    border: 1px solid var(--skku-border);
    color: var(--skku-text);
    border-radius: 12px;
    padding: 30px 40px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin: 40px 0;
}

.cta-banner h4 {
    font-size: 1.2rem;
    font-weight: 700;
    margin-bottom: 4px;
    color: var(--skku-text);
}

.cta-banner p {
    color: var(--skku-text-light);
    font-size: 14px;
    margin: 0;
}

.cta-banner .btn-cta {
    background: var(--skku-green);
    color: #fff;
    border: none;
    border-radius: 8px;
    padding: 10px 28px;
    font-weight: 600;
    font-size: 14px;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    transition: background 0.2s;
}

.cta-banner .btn-cta:hover {
    background: var(--skku-green-dark);
    color: #fff;
}

/* ─── Stat Cards (대시보드 통계) ────────────── */

.stat-card {
    background: var(--skku-card-bg);
    border: 1px solid var(--skku-border);
    border-radius: 12px;
    padding: 24px;
    text-align: center;
}

.stat-card .stat-icon {
    font-size: 2rem;
    color: var(--skku-green);
    margin-bottom: 8px;
}

.stat-card .stat-number {
    font-size: 1.8rem;
    font-weight: 700;
    color: var(--skku-green);
    font-variant-numeric: tabular-nums;
}

.stat-card .stat-label {
    font-size: 13px;
    color: var(--skku-text-light);
}

/* ─── General Cards (플랫) ─────────────────────── */

.card {
    border: 1px solid var(--skku-border);
    box-shadow: none;
    border-radius: 12px;
}

.card-header {
    background: #fff;
    border-bottom: 1px solid var(--skku-border);
    font-weight: 600;
}

/* ─── Flash Alerts ─────────────────────────────── */

.alert.alert-dismissible {
    position: relative;
    padding-right: 40px;
}
.alert.alert-dismissible .btn-close {
    position: absolute;
    top: 50%;
    right: 12px;
    transform: translateY(-50%);
    padding: 8px;
    font-size: 10px;
}

/* ─── Buttons ──────────────────────────────────── */

.btn-skku {
    background-color: var(--skku-green);
    border-color: var(--skku-green);
    color: #fff;
    border-radius: 8px;
    font-weight: 500;
    font-size: 14px;
}

.btn-skku:hover {
    background-color: var(--skku-green-light);
    border-color: var(--skku-green-light);
    color: #fff;
}

.btn-outline-skku {
    color: var(--skku-green);
    border-color: var(--skku-green);
    border-radius: 8px;
}

.btn-outline-skku:hover {
    background-color: var(--skku-green);
    border-color: var(--skku-green);
    color: #fff;
}

/* ─── Auth Forms ───────────────────────────────── */

.auth-card {
    max-width: 480px;
    margin: 60px auto;
    padding: 40px;
    border-radius: 12px;
}

.auth-card .form-control:focus {
    border-color: var(--skku-green);
    box-shadow: 0 0 0 0.2rem rgba(0, 98, 65, 0.12);
}

/* ─── Badge ────────────────────────────────────── */

.badge-skku {
    background-color: var(--skku-green);
    color: #fff;
    font-weight: 500;
}

.badge-status-open { background: #198754; color: #fff; }
.badge-status-resolved { background: #6c757d; color: #fff; }
.badge-status-pending { background: #ffc107; color: #333; }

/* ─── Post Detail ──────────────────────────────── */

.post-pinned {
    border-left: 3px solid var(--skku-green);
    background-color: rgba(0, 98, 65, 0.02);
}

.post-content {
    font-size: 15px;
    line-height: 1.8;
}

.post-content img {
    max-width: 100%;
    height: auto;
    border-radius: 4px;
}

/* ─── Table ────────────────────────────────────── */

.table {
    font-size: 13px;
}

.table th {
    background: #f8f9fa;
    font-weight: 600;
    white-space: nowrap;
}

/* ─── Pagination ───────────────────────────────── */

.page-link {
    color: var(--skku-green);
    font-size: 13px;
}

.page-item.active .page-link {
    background-color: var(--skku-green);
    border-color: var(--skku-green);
}

/* ─── Footer (alumni.skku.edu 패턴) ───────── */

.site-footer {
    background: var(--skku-navy);
    color: rgba(255,255,255,0.7);
    padding: 40px 0 24px;
    font-size: 13px;
    margin-top: auto;
}

.site-footer a {
    color: rgba(255,255,255,0.7);
    text-decoration: none;
}

.site-footer a:hover {
    color: #fff;
    text-decoration: none;
}

.site-footer .footer-logo {
    color: #fff;
    font-size: 1.1rem;
    font-weight: 700;
    margin-bottom: 16px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.site-footer .footer-links {
    display: flex;
    gap: 16px;
    flex-wrap: wrap;
    margin-bottom: 16px;
}

.site-footer .footer-links a {
    font-size: 12px;
    padding: 2px 0;
}

.site-footer .footer-contact {
    font-size: 12px;
    line-height: 1.8;
    color: rgba(255,255,255,0.5);
}

.site-footer .footer-social {
    display: flex;
    gap: 12px;
    margin-top: 12px;
}

.site-footer .footer-social a {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: rgba(255,255,255,0.1);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
    transition: background 0.2s;
}

.site-footer .footer-social a:hover {
    background: var(--skku-green);
    color: #fff;
}

.site-footer .copyright {
    border-top: 1px solid rgba(255,255,255,0.1);
    padding-top: 16px;
    margin-top: 20px;
    font-size: 11px;
    color: rgba(255,255,255,0.4);
}

/* ─── Scroll to Top ────────────────────────────── */

.scroll-top {
    position: fixed;
    bottom: 24px;
    right: 24px;
    width: 44px;
    height: 44px;
    background: var(--skku-green);
    color: #fff;
    border: none;
    border-radius: 50%;
    display: none;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
    cursor: pointer;
    z-index: 999;
    transition: opacity 0.3s;
}

.scroll-top.show {
    display: flex;
}

/* ─── Responsive ───────────────────────────────── */

@media (max-width: 991px) {
    .main-nav .navbar-nav .nav-link {
        padding: 10px 16px;
        font-size: 14px;
    }

    .cta-banner {
        flex-direction: column;
        text-align: center;
        gap: 16px;
        padding: 24px;
    }
}

@media (max-width: 768px) {
    /* ── 상단바 모바일 ── */
    .top-bar { padding: 8px 0; }
    .top-bar .logo-link { font-size: 1rem; gap: 6px; white-space: nowrap; }
    .top-bar .logo-link .logo-icon { font-size: 1.3rem; }
    .top-bar .logo-sub { font-size: 0.65rem; }
    .top-bar .search-box { display: none; }
    .top-bar .d-flex.gap-3 { gap: 6px !important; }
    .top-bar .btn-sm { font-size: 11px; padding: 4px 8px; min-height: 30px; white-space: nowrap; }
    .top-bar .small { font-size: 11px; }

    .hero-carousel .carousel-item img {
        height: 220px;
    }

    .auth-card {
        margin: 20px 12px;
        padding: 24px;
    }

    .table-responsive-mobile {
        overflow-x: auto;
    }

    .dash-section {
        margin-bottom: 16px;
    }

    /* 모바일 폰트/간격 개선 */
    body { font-size: 15px; }
    .container, .container-fluid { padding-left: 12px; padding-right: 12px; }

    /* 버튼 터치 영역 최소 44px */
    .btn-sm { min-height: 36px; padding: 6px 12px; font-size: 13px; }
    .btn { min-height: 44px; }

    /* 페이지네이션 터치 개선 */
    .pagination .page-link { padding: 8px 14px; font-size: 14px; min-width: 40px; text-align: center; }

    /* 테이블 모바일 */
    .table td, .table th { font-size: 13px; padding: 8px 8px; }
    .table th[style*="width:"] { width: auto !important; min-width: 0 !important; }

    /* 게시판 테이블: 번호/작성일/조회수 숨김 */
    .board-table .col-num,
    .board-table .col-views,
    .board-table .col-hide-mobile { display: none; }
    .board-table .col-date { font-size: 11px; }
    .board-table td, .board-table th { padding: 8px 6px; }

    /* breadcrumb */
    .breadcrumb { font-size: 12px; margin-bottom: 12px; }
    .breadcrumb-item + .breadcrumb-item::before { padding: 0 4px; }

    /* 폼 select/input 고정 너비 해제 */
    select[style*="width:"], input[style*="width:"] { width: 100% !important; }

    /* h4 제목 */
    h4 { font-size: 1.1rem; }
    h4 .bi { font-size: 0.95rem; }
}

@media (max-width: 575px) {
    body { font-size: 15px; }

    /* 카드/섹션 모바일 여백 */
    .card-body { padding: 14px; }
    .section-title h3 { font-size: 14px; }

    /* 모바일 폼 */
    .form-label { font-size: 13px; }
    .form-control, .form-select { font-size: 14px; }
}
