/* SKKU Alumni Homepage - Main Styles
   Reference: alumni.skku.edu design patterns */

:root {
    --skku-green: #006241;
    --skku-green-light: #007a52;
    --skku-green-dark: #004d33;
    --skku-navy: #1a2a3a;
    --skku-bg: #f5f6f8;
    --skku-card-bg: #ffffff;
    --skku-border: #e8e8e8;
    --skku-text: #333333;
    --skku-text-light: #888888;
    --skku-text-muted: #aaaaaa;
}

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

body {
    font-family: '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;
}

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: 20px;
    border-color: var(--skku-border);
    padding-left: 16px;
    font-size: 13px;
}

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

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

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

.main-nav {
    background-color: var(--skku-green);
    border: none;
    padding: 0;
}

.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;
}

.hero-overlay {
    background: linear-gradient(135deg, var(--skku-green) 0%, var(--skku-green-dark) 100%);
    color: #fff;
    padding: 80px 0;
    text-align: center;
}

.hero-overlay h1 {
    font-size: 2.4rem;
    font-weight: 700;
    margin-bottom: 12px;
}

.hero-overlay p {
    font-size: 1.1rem;
    opacity: 0.85;
    max-width: 550px;
    margin: 0 auto 24px;
}

/* ─── 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 (alumni.skku.edu 패턴) ──────── */

.news-card {
    background: var(--skku-card-bg);
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0,0,0,0.04);
    transition: box-shadow 0.2s, transform 0.2s;
    height: 100%;
}

.news-card:hover {
    box-shadow: 0 6px 20px rgba(0,0,0,0.1);
    transform: translateY(-2px);
}

.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-radius: 8px;
    padding: 20px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.04);
    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 (회비납부안내) ──────────────── */

.cta-banner {
    background: linear-gradient(135deg, var(--skku-green) 0%, #008a5e 100%);
    color: #fff;
    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;
}

.cta-banner p {
    opacity: 0.85;
    font-size: 14px;
    margin: 0;
}

.cta-banner .btn-cta {
    background: #fff;
    color: var(--skku-green);
    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: #f0f0f0;
}

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

.stat-card {
    background: var(--skku-card-bg);
    border-radius: 12px;
    padding: 24px;
    text-align: center;
    box-shadow: 0 2px 8px rgba(0,0,0,0.04);
}

.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);
}

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

/* ─── General Cards ────────────────────────────── */

.card {
    border: none;
    box-shadow: 0 2px 8px rgba(0,0,0,0.04);
    border-radius: 8px;
}

.card:hover {
    box-shadow: 0 4px 16px rgba(0,0,0,0.08);
}

.card-header {
    background: #fff;
    border-bottom: 1px solid #f0f0f0;
    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: 6px;
    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: 6px;
}

.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;
    }

    .hero-overlay {
        padding: 50px 20px;
    }

    .hero-overlay h1 {
        font-size: 1.6rem;
    }

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

@media (max-width: 768px) {
    .top-bar .search-box {
        display: none;
    }

    .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;
    }
}
