/* ========================================
   PCRU Chinese Website — Premium Design
   ======================================== */

/* ---------- Google Fonts ---------- */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700;800;900&family=Noto+Sans+SC:wght@300;400;500;600;700;900&display=swap');

/* ---------- CSS Variables ---------- */
:root {
    --primary: #1a0a3e;
    --primary-light: #2d1b69;
    --primary-vivid: #6c3ce0;
    --accent-gold: #f0b547;
    --accent-gold-light: #ffd76e;
    --accent-warm: #ff6b35;
    --surface: #ffffff;
    --surface-glass: rgba(255,255,255,0.72);
    --surface-dark: #0d0b1a;
    --text-primary: #1a1a2e;
    --text-secondary: #5a5a7a;
    --text-muted: #8888a8;
    --border-subtle: rgba(108,60,224,0.12);
    --gradient-hero: linear-gradient(135deg, #1a0a3e 0%, #2d1b69 40%, #6c3ce0 100%);
    --gradient-card: linear-gradient(145deg, rgba(255,255,255,0.95), rgba(248,246,255,0.85));
    --gradient-gold: linear-gradient(135deg, #f0b547, #ffd76e);
    --shadow-sm: 0 2px 8px rgba(26,10,62,0.06);
    --shadow-md: 0 8px 32px rgba(26,10,62,0.10);
    --shadow-lg: 0 16px 48px rgba(26,10,62,0.14);
    --shadow-glow: 0 0 40px rgba(108,60,224,0.18);
    --radius-sm: 12px;
    --radius-md: 16px;
    --radius-lg: 24px;
    --radius-xl: 32px;
    --transition: all 0.35s cubic-bezier(0.4, 0, 0.2, 1);
}

/* ---------- Reset & Base ---------- */
*, *::before, *::after { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
    font-family: 'Inter', 'Noto Sans SC', -apple-system, BlinkMacSystemFont, sans-serif;
    background: #f3f0fa;
    background-image:
        radial-gradient(ellipse at 20% 0%, rgba(108,60,224,0.06) 0%, transparent 60%),
        radial-gradient(ellipse at 80% 100%, rgba(240,181,71,0.05) 0%, transparent 60%);
    color: var(--text-primary);
    line-height: 1.7;
    -webkit-font-smoothing: antialiased;
    min-height: 100vh;
}

/* ---------- Utility: Fade-in on load ---------- */
@keyframes fadeInUp {
    from { opacity: 0; transform: translateY(28px); }
    to   { opacity: 1; transform: translateY(0); }
}
@keyframes fadeIn {
    from { opacity: 0; }
    to   { opacity: 1; }
}
@keyframes slideDown {
    from { opacity: 0; transform: translateY(-12px); }
    to   { opacity: 1; transform: translateY(0); }
}
@keyframes shimmer {
    0%   { background-position: -200% center; }
    100% { background-position: 200% center; }
}
@keyframes float {
    0%, 100% { transform: translateY(0); }
    50%      { transform: translateY(-6px); }
}

.animate-in {
    animation: fadeInUp 0.7s ease-out both;
}
.animate-in-1 { animation-delay: 0.08s; }
.animate-in-2 { animation-delay: 0.16s; }
.animate-in-3 { animation-delay: 0.24s; }
.animate-in-4 { animation-delay: 0.32s; }
.animate-in-5 { animation-delay: 0.40s; }
.animate-in-6 { animation-delay: 0.48s; }

/* ---------- Top Language Bar ---------- */
.top-bar {
    background: var(--surface-dark);
    padding: 6px 0;
    font-size: 0.78rem;
    letter-spacing: 0.5px;
    position: relative;
    z-index: 1000;
}
.top-bar a {
    color: rgba(255,255,255,0.65);
    text-decoration: none;
    padding: 4px 14px;
    transition: var(--transition);
    border-radius: 20px;
    font-weight: 500;
}
.top-bar a:hover,
.top-bar a.active-lang {
    color: #fff;
    background: rgba(108,60,224,0.5);
}
.top-bar .separator {
    color: rgba(255,255,255,0.2);
    margin: 0 2px;
}

/* ---------- Hero Header ---------- */
.hero-header {
    background: var(--gradient-hero);
    padding: 56px 0 48px;
    position: relative;
    overflow: hidden;
    text-align: center;
}
.hero-header::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -20%;
    width: 600px;
    height: 600px;
    background: radial-gradient(circle, rgba(240,181,71,0.15) 0%, transparent 70%);
    border-radius: 50%;
    pointer-events: none;
}
.hero-header::after {
    content: '';
    position: absolute;
    bottom: -40%;
    left: -10%;
    width: 500px;
    height: 500px;
    background: radial-gradient(circle, rgba(108,60,224,0.2) 0%, transparent 70%);
    border-radius: 50%;
    pointer-events: none;
}
.hero-header .hero-logo {
    width: 80px;
    height: auto;
    margin-bottom: 16px;
    animation: float 3s ease-in-out infinite;
    filter: drop-shadow(0 4px 12px rgba(0,0,0,0.3));
}
.hero-header h1 {
    color: #ffffff;
    font-size: 2.4rem;
    font-weight: 800;
    letter-spacing: -0.5px;
    margin-bottom: 6px;
    position: relative;
    z-index: 1;
    text-shadow: 0 2px 20px rgba(0,0,0,0.3);
}
.hero-header .hero-sub {
    color: rgba(255,255,255,0.6);
    font-size: 0.95rem;
    font-weight: 400;
    position: relative;
    z-index: 1;
    letter-spacing: 1px;
}
.hero-header .hero-sub a {
    color: var(--accent-gold-light);
    text-decoration: none;
}

/* ---------- Main Navbar ---------- */
.main-nav {
    background: var(--surface-glass) !important;
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-bottom: 1px solid var(--border-subtle);
    box-shadow: var(--shadow-sm);
    padding: 0;
    position: sticky;
    top: 0;
    z-index: 999;
    transition: var(--transition);
}
.main-nav .navbar-nav .nav-link {
    color: var(--text-primary) !important;
    font-weight: 600;
    font-size: 0.88rem;
    padding: 16px 20px;
    letter-spacing: 0.3px;
    position: relative;
    transition: var(--transition);
    text-transform: uppercase;
}
.main-nav .navbar-nav .nav-link::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%) scaleX(0);
    width: 60%;
    height: 3px;
    background: var(--gradient-gold);
    border-radius: 3px 3px 0 0;
    transition: transform 0.3s ease;
}
.main-nav .navbar-nav .nav-link:hover {
    color: var(--primary-vivid) !important;
}
.main-nav .navbar-nav .nav-link:hover::after,
.main-nav .navbar-nav .nav-link.active::after {
    transform: translateX(-50%) scaleX(1);
}
.main-nav .navbar-nav .nav-link.active {
    color: var(--primary-vivid) !important;
}
.main-nav .navbar-toggler {
    border: 2px solid var(--primary-vivid);
    padding: 6px 10px;
    margin: 8px 0;
}
.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='%236c3ce0' stroke-linecap='round' stroke-miterlimit='10' stroke-width='2' d='M4 7h22M4 15h22M4 23h22'/%3e%3c/svg%3e");
}

/* ---------- Page Content Area ---------- */
.page-content {
    padding: 40px 0 60px;
    min-height: 60vh;
}

/* ---------- Premium Cards ---------- */
.premium-card {
    background: var(--gradient-card);
    backdrop-filter: blur(10px);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-md);
    padding: 32px;
    margin-bottom: 24px;
    box-shadow: var(--shadow-sm);
    transition: var(--transition);
    position: relative;
    overflow: hidden;
}
.premium-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, var(--primary-vivid), var(--accent-gold), var(--accent-warm));
    opacity: 0;
    transition: var(--transition);
}
.premium-card:hover {
    box-shadow: var(--shadow-md);
    transform: translateY(-3px);
    border-color: rgba(108,60,224,0.2);
}
.premium-card:hover::before {
    opacity: 1;
}

.premium-card .card-title {
    font-size: 1.35rem;
    font-weight: 700;
    color: var(--primary);
    margin-bottom: 16px;
    display: flex;
    align-items: center;
    gap: 10px;
}
.premium-card .card-title .icon {
    width: 36px;
    height: 36px;
    background: linear-gradient(135deg, var(--primary-vivid), var(--primary));
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    font-size: 1rem;
    flex-shrink: 0;
}
.premium-card p {
    color: var(--text-secondary);
    font-size: 0.95rem;
    line-height: 1.85;
}
.premium-card ul {
    padding-left: 0;
    list-style: none;
}
.premium-card ul li {
    padding: 10px 0 10px 28px;
    position: relative;
    color: var(--text-secondary);
    font-size: 0.93rem;
    line-height: 1.7;
    border-bottom: 1px solid rgba(108,60,224,0.06);
    transition: var(--transition);
}
.premium-card ul li:last-child {
    border-bottom: none;
}
.premium-card ul li::before {
    content: '';
    position: absolute;
    left: 0;
    top: 50%;
    transform: translateY(-50%);
    width: 8px;
    height: 8px;
    background: var(--gradient-gold);
    border-radius: 50%;
    box-shadow: 0 0 8px rgba(240,181,71,0.4);
}
.premium-card ul li:hover {
    padding-left: 34px;
    color: var(--primary);
}
.premium-card ul li a {
    color: var(--primary-vivid);
    text-decoration: none;
    font-weight: 500;
    transition: var(--transition);
}
.premium-card ul li a:hover {
    color: var(--accent-warm);
}

/* ---------- Hero Card (special first card) ---------- */
.hero-card {
    background: var(--gradient-hero);
    color: #ffffff;
    border: none;
    border-radius: var(--radius-lg);
    padding: 48px 40px;
    position: relative;
    overflow: hidden;
}
.hero-card::before {
    content: '';
    position: absolute;
    top: -30%;
    right: -15%;
    width: 300px;
    height: 300px;
    background: radial-gradient(circle, rgba(240,181,71,0.2) 0%, transparent 70%);
    border-radius: 50%;
}
.hero-card .card-title {
    color: #fff;
    font-size: 1.6rem;
}
.hero-card .card-title .icon {
    background: rgba(255,255,255,0.2);
}
.hero-card p {
    color: rgba(255,255,255,0.85);
    font-size: 1.05rem;
}

/* ---------- Sidebar ---------- */
.sidebar-widget {
    background: var(--surface);
    border-radius: var(--radius-md);
    padding: 28px;
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--border-subtle);
    position: sticky;
    top: 80px;
}
.sidebar-widget .widget-title {
    font-size: 0.82rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    color: var(--text-muted);
    margin-bottom: 20px;
    padding-bottom: 12px;
    border-bottom: 2px solid var(--border-subtle);
    position: relative;
}
.sidebar-widget .widget-title::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    width: 40px;
    height: 2px;
    background: var(--gradient-gold);
}
.sidebar-widget ul {
    list-style: none;
    padding: 0;
    margin: 0;
}
.sidebar-widget ul li {
    margin-bottom: 4px;
}
.sidebar-widget ul li a {
    display: block;
    padding: 10px 16px;
    color: var(--text-secondary);
    text-decoration: none;
    font-size: 0.88rem;
    font-weight: 500;
    border-radius: var(--radius-sm);
    transition: var(--transition);
    position: relative;
    overflow: hidden;
}
.sidebar-widget ul li a::before {
    content: '→';
    position: absolute;
    right: 16px;
    opacity: 0;
    transform: translateX(-8px);
    transition: var(--transition);
    color: var(--primary-vivid);
}
.sidebar-widget ul li a:hover {
    background: rgba(108,60,224,0.06);
    color: var(--primary-vivid);
    padding-left: 22px;
}
.sidebar-widget ul li a:hover::before {
    opacity: 1;
    transform: translateX(0);
}

/* ---------- Premium Table ---------- */
.premium-table {
    border-radius: var(--radius-md);
    overflow: hidden;
    box-shadow: var(--shadow-sm);
}
.premium-table thead th {
    background: var(--gradient-hero) !important;
    color: #fff !important;
    font-weight: 600;
    font-size: 0.9rem;
    padding: 14px 18px;
    border: none !important;
    letter-spacing: 0.3px;
}
.premium-table tbody td {
    padding: 12px 18px;
    font-size: 0.88rem;
    color: var(--text-secondary);
    border-color: rgba(108,60,224,0.06) !important;
    transition: var(--transition);
    vertical-align: middle;
}
.premium-table tbody tr:hover td {
    background: rgba(108,60,224,0.04);
    color: var(--primary);
}
.premium-table .sub-header td {
    font-weight: 600;
    color: var(--primary-vivid);
    background: rgba(108,60,224,0.04);
    font-size: 0.85rem;
}

/* ---------- Emblem / Image Showcase ---------- */
.emblem-showcase {
    text-align: center;
    padding: 40px 20px;
}
.emblem-showcase img {
    max-width: 180px;
    filter: drop-shadow(0 8px 24px rgba(26,10,62,0.15));
    animation: float 3s ease-in-out infinite;
    margin-bottom: 24px;
}

/* ---------- Timeline ---------- */
.timeline {
    position: relative;
    padding-left: 40px;
}
.timeline::before {
    content: '';
    position: absolute;
    left: 15px;
    top: 0;
    bottom: 0;
    width: 3px;
    background: linear-gradient(180deg, var(--primary-vivid), var(--accent-gold));
    border-radius: 3px;
}
.timeline-item {
    position: relative;
    padding: 16px 0 16px 24px;
    transition: var(--transition);
}
.timeline-item::before {
    content: '';
    position: absolute;
    left: -32px;
    top: 22px;
    width: 14px;
    height: 14px;
    background: var(--surface);
    border: 3px solid var(--primary-vivid);
    border-radius: 50%;
    z-index: 1;
    transition: var(--transition);
    box-shadow: 0 0 0 4px rgba(108,60,224,0.1);
}
.timeline-item:hover::before {
    background: var(--primary-vivid);
    box-shadow: 0 0 0 6px rgba(108,60,224,0.2);
}
.timeline-item .year {
    font-size: 1.1rem;
    font-weight: 800;
    color: var(--primary-vivid);
    display: inline-block;
    margin-right: 8px;
    min-width: 60px;
}
.timeline-item .description {
    color: var(--text-secondary);
    font-size: 0.93rem;
}
.timeline-item:hover .description {
    color: var(--primary);
}

/* ---------- Map Image ---------- */
.map-wrapper {
    border-radius: var(--radius-lg);
    overflow: hidden;
    box-shadow: var(--shadow-lg);
    border: 4px solid rgba(108,60,224,0.15);
    transition: var(--transition);
}
.map-wrapper:hover {
    border-color: var(--primary-vivid);
    box-shadow: var(--shadow-glow);
}
.map-wrapper img {
    width: 100%;
    height: auto;
    display: block;
}

/* ---------- Video Placeholder ---------- */
.video-wrapper {
    border-radius: var(--radius-md);
    overflow: hidden;
    background: var(--surface-dark);
    box-shadow: var(--shadow-md);
    position: relative;
    aspect-ratio: 4/3;
    display: flex;
    align-items: center;
    justify-content: center;
}
.video-wrapper .video-placeholder {
    text-align: center;
    color: rgba(255,255,255,0.5);
    padding: 40px;
}
.video-wrapper .video-placeholder .play-icon {
    width: 64px;
    height: 64px;
    background: rgba(108,60,224,0.6);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 16px;
    font-size: 1.5rem;
    color: #fff;
    transition: var(--transition);
    cursor: pointer;
}
.video-wrapper .video-placeholder .play-icon:hover {
    background: var(--primary-vivid);
    transform: scale(1.1);
    box-shadow: 0 0 30px rgba(108,60,224,0.4);
}

/* ---------- Footer ---------- */
.site-footer {
    background: var(--surface-dark);
    color: rgba(255,255,255,0.6);
    padding: 48px 0 32px;
    margin-top: 60px;
    position: relative;
    overflow: hidden;
}
.site-footer::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, var(--primary-vivid), var(--accent-gold), var(--accent-warm), var(--primary-vivid));
}
.site-footer h5 {
    color: #ffffff;
    font-weight: 700;
    font-size: 1rem;
    margin-bottom: 16px;
}
.site-footer a {
    color: var(--accent-gold-light);
    text-decoration: none;
    transition: var(--transition);
}
.site-footer a:hover {
    color: #fff;
}
.site-footer .footer-bottom {
    border-top: 1px solid rgba(255,255,255,0.08);
    margin-top: 32px;
    padding-top: 24px;
    font-size: 0.82rem;
    color: rgba(255,255,255,0.35);
}
.site-footer .footer-contact p {
    font-size: 0.88rem;
    line-height: 1.8;
    margin-bottom: 0;
}

/* ---------- Page Title Banner ---------- */
.page-title-banner {
    background: var(--gradient-hero);
    padding: 36px 0;
    text-align: center;
    position: relative;
    overflow: hidden;
}
.page-title-banner::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -15%;
    width: 400px;
    height: 400px;
    background: radial-gradient(circle, rgba(240,181,71,0.12) 0%, transparent 70%);
    border-radius: 50%;
}
.page-title-banner h2 {
    color: #fff;
    font-weight: 800;
    font-size: 1.8rem;
    margin: 0;
    position: relative;
    z-index: 1;
}
.page-title-banner .breadcrumb-text {
    color: rgba(255,255,255,0.5);
    font-size: 0.85rem;
    margin-top: 8px;
    position: relative;
    z-index: 1;
}
.page-title-banner .breadcrumb-text a {
    color: var(--accent-gold-light);
    text-decoration: none;
}

/* ---------- Color Swatches (Emblem page) ---------- */
.color-swatch {
    display: flex;
    align-items: center;
    padding: 14px 0;
    border-bottom: 1px solid rgba(108,60,224,0.06);
    transition: var(--transition);
}
.color-swatch:last-child { border-bottom: none; }
.color-swatch:hover { padding-left: 8px; }
.color-swatch .swatch-dot {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    margin-right: 16px;
    flex-shrink: 0;
    box-shadow: 0 2px 8px rgba(0,0,0,0.15);
}
.color-swatch .swatch-text {
    color: var(--text-secondary);
    font-size: 0.93rem;
}

/* ---------- Faculty Cards ---------- */
.faculty-link {
    display: flex;
    align-items: center;
    padding: 16px 20px;
    background: rgba(108,60,224,0.03);
    border-radius: var(--radius-sm);
    margin-bottom: 10px;
    text-decoration: none;
    color: var(--text-primary);
    transition: var(--transition);
    border: 1px solid transparent;
    font-weight: 500;
}
.faculty-link:hover {
    background: rgba(108,60,224,0.08);
    border-color: var(--border-subtle);
    transform: translateX(6px);
    color: var(--primary-vivid);
    box-shadow: var(--shadow-sm);
}
.faculty-link .faculty-icon {
    width: 40px;
    height: 40px;
    background: var(--gradient-hero);
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    font-size: 1rem;
    margin-right: 14px;
    flex-shrink: 0;
}

/* ---------- Responsive ---------- */
@media (max-width: 991px) {
    .hero-header h1 { font-size: 1.6rem; }
    .hero-header { padding: 36px 0 28px; }
    .premium-card { padding: 24px; }
    .main-nav .navbar-nav .nav-link { padding: 12px 16px; }
}
@media (max-width: 767px) {
    .page-content { padding: 24px 0 40px; }
    .premium-card { padding: 20px; margin-bottom: 16px; }
    .sidebar-widget { margin-top: 24px; position: static; }
    .hero-header h1 { font-size: 1.4rem; }
}

/* ---------- Scrollbar ---------- */
::-webkit-scrollbar { width: 8px; }
::-webkit-scrollbar-track { background: #f3f0fa; }
::-webkit-scrollbar-thumb {
    background: linear-gradient(180deg, var(--primary-vivid), var(--primary));
    border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover { background: var(--primary); }

/* ---------- Selection ---------- */
::selection {
    background: rgba(108,60,224,0.2);
    color: var(--primary);
}
