/* ==========================================================================
   FACULTY NEWS WEBSITE — ROYAL PURPLE & IMPERIAL GOLD DESIGN SYSTEM
   Tone: Regal, Academic, Ultra-Premium, Prestigious
   ========================================================================== */

@import url('https://fonts.googleapis.com/css2?family=Kanit:ital,wght@0,300;0,400;0,500;0,600;0,700;1,300&family=Plus+Jakarta+Sans:wght@400;500;600;700;800&display=swap');

:root {
    /* Royal Purple Shades */
    --faculty-primary: #3b1064;
    --faculty-primary-light: #5b21b6;
    --faculty-primary-dark: #1e0735;
    --faculty-primary-subtle: #f6eefe;

    /* Imperial Gold Shades */
    --faculty-accent: #d4af37;
    --faculty-accent-hover: #b89120;
    --faculty-accent-light: #fef9c3;
    --faculty-accent-gradient: linear-gradient(135deg, #fae084 0%, #d4af37 50%, #ad8517 100%);
    --faculty-accent-soft: rgba(212, 175, 55, 0.14);

    /* Backgrounds & Surfaces */
    --faculty-surface: #ffffff;
    --faculty-bg: #fbf9fd;
    --faculty-bg-alt: #f3ecf9;
    --faculty-border: #ebdff5;
    --faculty-text-dark: #1e1329;
    --faculty-text-muted: #6b5c7e;

    /* Shadows & Radii */
    --faculty-shadow-sm: 0 4px 12px rgba(59, 16, 100, 0.05);
    --faculty-shadow-md: 0 10px 28px rgba(59, 16, 100, 0.09);
    --faculty-shadow-lg: 0 20px 48px rgba(59, 16, 100, 0.16);
    --faculty-radius: 14px;
    --faculty-radius-sm: 8px;
    --faculty-radius-lg: 20px;
    --faculty-font: 'Kanit', 'Plus Jakarta Sans', sans-serif;
}

body {
    font-family: var(--faculty-font);
    background-color: var(--faculty-bg);
    color: var(--faculty-text-dark);
    margin: 0;
    padding: 0;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    -webkit-font-smoothing: antialiased;
}

main {
    flex: 1 0 auto;
}

/* ==========================================================================
   Typography & Global Utilities
   ========================================================================== */
h1, h2, h3, h4, h5, h6 {
    font-weight: 600;
    color: var(--faculty-primary);
    letter-spacing: -0.01em;
}

.text-gold {
    color: var(--faculty-accent) !important;
}

.bg-gold {
    background: var(--faculty-accent-gradient) !important;
    color: #1e0735 !important;
}

.text-faculty-primary {
    color: var(--faculty-primary) !important;
}

.bg-faculty-primary {
    background-color: var(--faculty-primary) !important;
}

.bg-faculty-light {
    background-color: #fbf9fd !important;
}

.hover-gold:hover {
    color: var(--faculty-accent) !important;
    transition: color 0.2s ease;
}

/* ==========================================================================
   Navbar & Header (Purple & Gold Prestige)
   ========================================================================== */
.faculty-topbar {
    background-color: var(--faculty-primary-dark);
    color: #e4d7f5;
    font-size: 0.85rem;
    padding: 7px 0;
    border-bottom: 1px solid rgba(212, 175, 55, 0.25);
}

.faculty-navbar {
    background: rgba(255, 255, 255, 0.98);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    box-shadow: 0 4px 20px rgba(59, 16, 100, 0.06);
    padding: 12px 0;
    transition: all 0.3s ease;
    border-bottom: 2px solid var(--faculty-border);
}

.faculty-navbar .navbar-brand {
    font-weight: 700;
    color: var(--faculty-primary);
    font-size: 1.25rem;
    display: flex;
    align-items: center;
    gap: 12px;
}

.brand-icon {
    width: 44px;
    height: 44px;
    background: linear-gradient(135deg, var(--faculty-primary) 0%, #6d28d9 60%, var(--faculty-accent) 100%);
    color: #ffffff;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.3rem;
    box-shadow: 0 4px 14px rgba(59, 16, 100, 0.25);
    border: 1px solid rgba(212, 175, 55, 0.3);
}

.brand-text-sub {
    font-size: 0.75rem;
    font-weight: 500;
    color: var(--faculty-accent-hover);
    letter-spacing: 0.05em;
    text-transform: uppercase;
}

.faculty-nav-link {
    font-weight: 500;
    color: var(--faculty-text-dark) !important;
    padding: 8px 16px !important;
    border-radius: var(--faculty-radius-sm);
    transition: all 0.2s ease;
}

.faculty-nav-link:hover, .faculty-nav-link.active {
    color: var(--faculty-primary) !important;
    background-color: var(--faculty-primary-subtle);
}

/* ==========================================================================
   Hero & Featured News (Royal Purple Gradient with Warm Gold Ambient)
   ========================================================================== */
.hero-banner {
    background: radial-gradient(circle at 85% 20%, rgba(212, 175, 55, 0.22) 0%, transparent 45%),
                radial-gradient(circle at 15% 85%, rgba(126, 34, 206, 0.3) 0%, transparent 55%),
                linear-gradient(135deg, #1e0735 0%, #3b1064 50%, #581c87 100%);
    color: #ffffff;
    padding: 65px 0;
    position: relative;
    overflow: hidden;
    border-bottom: 3px solid var(--faculty-accent);
}

.hero-banner::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -10%;
    width: 600px;
    height: 600px;
    background: radial-gradient(circle, rgba(212, 175, 55, 0.18) 0%, transparent 70%);
    pointer-events: none;
}

.featured-carousel-card {
    background: #ffffff;
    border-radius: var(--faculty-radius);
    overflow: hidden;
    box-shadow: 0 20px 45px rgba(30, 7, 53, 0.3);
    transition: transform 0.3s ease;
    border: 1px solid rgba(212, 175, 55, 0.25);
}

.featured-img-wrap {
    height: 380px;
    background-color: #1e0735;
    position: relative;
    overflow: hidden;
}

.featured-img-wrap img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.featured-carousel-card:hover .featured-img-wrap img {
    transform: scale(1.03);
}

.featured-badge {
    position: absolute;
    top: 16px;
    left: 16px;
    background: var(--faculty-accent-gradient);
    color: #1e0735;
    padding: 6px 14px;
    border-radius: 50px;
    font-size: 0.8rem;
    font-weight: 700;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.25);
}

/* ==========================================================================
   News Card Component
   ========================================================================== */
.news-card {
    background: #ffffff;
    border: 1px solid var(--faculty-border);
    border-radius: var(--faculty-radius);
    overflow: hidden;
    transition: all 0.3s cubic-bezier(0.165, 0.84, 0.44, 1);
    display: flex;
    flex-direction: column;
    height: 100%;
    box-shadow: var(--faculty-shadow-sm);
}

.news-card:hover {
    transform: translateY(-6px);
    box-shadow: 0 16px 36px rgba(59, 16, 100, 0.12), 0 0 0 1px rgba(212, 175, 55, 0.4);
    border-color: rgba(212, 175, 55, 0.5);
}

.news-card-img-wrap {
    height: 210px;
    position: relative;
    overflow: hidden;
    background: linear-gradient(135deg, #2e1065, #4c1d95);
}

.news-card-img-wrap img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.4s ease;
}

.news-card:hover .news-card-img-wrap img {
    transform: scale(1.06);
}

.news-card-placeholder {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #3b1064, #1e0735);
    color: rgba(212, 175, 55, 0.5);
    font-size: 2.5rem;
}

.news-card-body {
    padding: 22px;
    display: flex;
    flex-direction: column;
    flex: 1 1 auto;
}

.news-card-title {
    font-size: 1.15rem;
    font-weight: 600;
    line-height: 1.45;
    margin-bottom: 10px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.news-card-title a {
    color: var(--faculty-primary);
    text-decoration: none;
    transition: color 0.2s ease;
}

.news-card-title a:hover {
    color: var(--faculty-accent-hover);
}

.news-card-excerpt {
    color: var(--faculty-text-muted);
    font-size: 0.92rem;
    line-height: 1.55;
    margin-bottom: 16px;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.news-card-meta {
    margin-top: auto;
    padding-top: 14px;
    border-top: 1px solid var(--faculty-border);
    display: flex;
    align-items: center;
    justify-content: space-between;
    font-size: 0.82rem;
    color: var(--faculty-text-muted);
}

.category-badge {
    display: inline-block;
    padding: 5px 12px;
    font-size: 0.78rem;
    font-weight: 600;
    border-radius: 50px;
    background-color: var(--faculty-primary-subtle);
    color: var(--faculty-primary);
    text-decoration: none;
    border: 1px solid rgba(91, 33, 182, 0.15);
    transition: all 0.2s ease;
}

.category-badge:hover {
    background: var(--faculty-accent-gradient);
    color: #1e0735;
    border-color: transparent;
}

/* ==========================================================================
   Buttons & UI Elements (Gold & Purple Luxe)
   ========================================================================== */
.btn-faculty-primary {
    background: linear-gradient(135deg, var(--faculty-primary) 0%, var(--faculty-primary-light) 100%);
    color: #ffffff;
    border: 1px solid rgba(212, 175, 55, 0.3);
    font-weight: 500;
    padding: 10px 22px;
    border-radius: var(--faculty-radius-sm);
    transition: all 0.25s ease;
}

.btn-faculty-primary:hover {
    background: linear-gradient(135deg, var(--faculty-primary-light) 0%, #7c3aed 100%);
    color: #ffffff;
    box-shadow: 0 6px 18px rgba(59, 16, 100, 0.25);
    transform: translateY(-1px);
}

.btn-faculty-gold {
    background: var(--faculty-accent-gradient);
    color: #1e0735;
    border: none;
    font-weight: 600;
    padding: 10px 22px;
    border-radius: var(--faculty-radius-sm);
    box-shadow: 0 4px 14px rgba(212, 175, 55, 0.35);
    transition: all 0.25s ease;
}

.btn-faculty-gold:hover {
    background: linear-gradient(135deg, #fde047 0%, #eab308 100%);
    color: #1e0735;
    box-shadow: 0 6px 20px rgba(212, 175, 55, 0.5);
    transform: translateY(-2px);
}

.btn-faculty-outline {
    background-color: transparent;
    color: var(--faculty-primary);
    border: 1.5px solid var(--faculty-primary);
    font-weight: 500;
    padding: 9px 20px;
    border-radius: var(--faculty-radius-sm);
    transition: all 0.2s ease;
}

.btn-faculty-outline:hover {
    background-color: var(--faculty-primary);
    color: #ffffff;
}

/* ==========================================================================
   News Detail Page
   ========================================================================== */
.news-detail-header {
    background-color: #ffffff;
    border-bottom: 1px solid var(--faculty-border);
    padding: 40px 0 30px;
}

.news-detail-title {
    font-size: 2.25rem;
    font-weight: 700;
    line-height: 1.35;
    color: var(--faculty-primary);
    margin-bottom: 20px;
}

.news-detail-meta {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 20px;
    color: var(--faculty-text-muted);
    font-size: 0.95rem;
}

.news-content {
    font-size: 1.12rem;
    line-height: 1.85;
    color: #334155;
}

.news-content p {
    margin-bottom: 1.5rem;
}

/* ==========================================================================
   Dashboard Styles
   ========================================================================== */
.dashboard-wrapper {
    display: flex;
    min-height: calc(100vh - 60px);
}

.dashboard-sidebar {
    width: 260px;
    background: var(--faculty-primary-dark);
    color: #cbd5e1;
    flex-shrink: 0;
    padding: 24px 16px;
    display: flex;
    flex-direction: column;
    border-right: 1px solid rgba(212, 175, 55, 0.2);
}

.dashboard-nav-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 11px 16px;
    color: #e4d7f5;
    text-decoration: none;
    border-radius: var(--faculty-radius-sm);
    font-weight: 500;
    font-size: 0.95rem;
    transition: all 0.2s ease;
    margin-bottom: 4px;
}

.dashboard-nav-item:hover, .dashboard-nav-item.active {
    background: rgba(212, 175, 55, 0.15);
    color: var(--faculty-accent-light);
    border-left: 3px solid var(--faculty-accent);
}

.dashboard-content {
    flex-grow: 1;
    background-color: #fbf9fd;
    padding: 32px;
}

.metric-card {
    background: #ffffff;
    border: 1px solid var(--faculty-border);
    border-radius: var(--faculty-radius);
    padding: 24px;
    box-shadow: var(--faculty-shadow-sm);
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.metric-icon {
    width: 52px;
    height: 52px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
}

/* ==========================================================================
   Footer (Royal Midnight Purple with Radiant Gold Accent)
   ========================================================================== */
.faculty-footer {
    background: linear-gradient(180deg, #1e0735 0%, #150325 100%);
    color: #d1c4e9;
    padding: 55px 0 25px;
    border-top: 4px solid var(--faculty-accent);
}

.footer-heading {
    color: #ffffff;
    font-size: 1.15rem;
    font-weight: 600;
    margin-bottom: 20px;
    position: relative;
    padding-bottom: 10px;
}

.footer-heading::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 38px;
    height: 3px;
    background: var(--faculty-accent-gradient);
    border-radius: 2px;
}

.footer-link {
    color: #e4d7f5;
    text-decoration: none;
    transition: all 0.2s ease;
    display: inline-block;
    margin-bottom: 8px;
    font-size: 0.95rem;
}

.footer-link:hover {
    color: var(--faculty-accent);
    transform: translateX(4px);
}

/* ==========================================================================
   Responsive Adaptations
   ========================================================================== */
@media (max-width: 991.98px) {
    .dashboard-wrapper {
        flex-direction: column;
    }
    .dashboard-sidebar {
        width: 100%;
        padding: 16px;
    }
    .news-detail-title {
        font-size: 1.75rem;
    }
    .hero-banner {
        padding: 40px 0;
    }
    .featured-img-wrap {
        height: 240px;
    }
    .navbar-search-wrapper {
        width: 100%;
        margin-top: 10px !important;
        margin-bottom: 10px !important;
    }
    .navbar-search-dropdown {
        position: absolute !important;
        left: 0 !important;
        right: 0 !important;
        width: 100% !important;
        max-width: 100% !important;
    }
}

/* ==========================================================================
   Real-Time Live Search (Navbar Dropdown)
   ========================================================================== */
.navbar-search-wrapper {
    position: relative;
    width: 270px;
    transition: width 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

@media (min-width: 1200px) {
    .navbar-search-wrapper:focus-within {
        width: 340px;
    }
}

.navbar-search-group {
    background: #ffffff;
    border-radius: 25px;
    box-shadow: 0 2px 8px rgba(59, 16, 100, 0.08);
    transition: all 0.25s ease;
    border: 1px solid var(--faculty-border);
}

.navbar-search-group:focus-within {
    box-shadow: 0 4px 16px rgba(91, 33, 182, 0.2);
    border-color: var(--faculty-primary-light);
}

.navbar-search-input {
    font-size: 0.88rem;
    background-color: transparent !important;
    padding-left: 6px;
    color: var(--faculty-text-dark);
}

.navbar-search-input::-webkit-search-decoration,
.navbar-search-input::-webkit-search-cancel-button,
.navbar-search-input::-webkit-search-results-button,
.navbar-search-input::-webkit-search-results-decoration {
    display: none;
    -webkit-appearance: none;
}

.navbar-search-input:focus {
    box-shadow: none !important;
}

.navbar-search-clear-btn {
    color: #9ca3af;
    font-size: 0.9rem;
    padding: 0 6px;
    background: transparent;
}

.navbar-search-clear-btn:hover {
    color: #ef4444;
}

.navbar-search-submit-btn {
    background-color: var(--faculty-primary) !important;
    border-color: var(--faculty-primary) !important;
    color: #ffffff !important;
    font-size: 0.85rem;
    font-weight: 500;
    transition: all 0.2s ease;
}

.navbar-search-submit-btn:hover {
    background-color: var(--faculty-primary-light) !important;
    border-color: var(--faculty-primary-light) !important;
    color: #ffffff !important;
    box-shadow: 0 2px 8px rgba(91, 33, 182, 0.3);
}

/* Live Search Dropdown Panel */
.navbar-search-dropdown {
    position: absolute;
    top: calc(100% + 8px);
    right: 0;
    width: 390px;
    max-width: 92vw;
    background: #ffffff;
    border: 1px solid var(--faculty-border);
    box-shadow: 0 16px 36px rgba(59, 16, 100, 0.18), 0 4px 12px rgba(0, 0, 0, 0.06);
    border-radius: 16px;
    z-index: 1060;
    overflow: hidden;
    animation: liveSearchSlideDown 0.22s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes liveSearchSlideDown {
    from {
        opacity: 0;
        transform: translateY(-8px) scale(0.98);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

.live-search-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 16px;
    background: var(--faculty-bg-alt);
    border-bottom: 1px solid var(--faculty-border);
    font-size: 0.78rem;
    font-weight: 600;
    color: var(--faculty-primary);
    letter-spacing: 0.02em;
    text-transform: uppercase;
}

.live-search-count-badge {
    background: var(--faculty-accent-gradient);
    color: #1e0735;
    padding: 2px 8px;
    border-radius: 12px;
    font-size: 0.75rem;
    font-weight: 700;
}

.live-search-list {
    max-height: 380px;
    overflow-y: auto;
    scrollbar-width: thin;
    scrollbar-color: var(--faculty-border) transparent;
}

.live-search-list::-webkit-scrollbar {
    width: 6px;
}
.live-search-list::-webkit-scrollbar-thumb {
    background-color: var(--faculty-border);
    border-radius: 10px;
}

.live-search-item {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    padding: 10px 14px;
    text-decoration: none;
    color: var(--faculty-text-dark);
    border-bottom: 1px solid #f6effc;
    transition: background-color 0.15s ease, transform 0.15s ease;
    cursor: pointer;
}

.live-search-item:last-child {
    border-bottom: none;
}

.live-search-item:hover,
.live-search-item.is-selected {
    background-color: var(--faculty-primary-subtle);
    color: var(--faculty-primary-dark);
}

.live-search-thumb {
    width: 54px;
    height: 54px;
    border-radius: 8px;
    object-fit: cover;
    flex-shrink: 0;
    background: #f1e9f7;
    border: 1px solid #ebdff5;
}

.live-search-thumb-placeholder {
    width: 54px;
    height: 54px;
    border-radius: 8px;
    background: #f3ecf9;
    color: var(--faculty-primary);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    font-size: 1.3rem;
}

.live-search-body {
    flex: 1;
    min-width: 0;
}

.live-search-title {
    font-size: 0.88rem;
    font-weight: 600;
    line-height: 1.35;
    margin-bottom: 4px;
    color: var(--faculty-primary);
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.live-search-item:hover .live-search-title,
.live-search-item.is-selected .live-search-title {
    color: var(--faculty-primary-light);
}

.live-search-meta {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.74rem;
    color: var(--faculty-text-muted);
}

.live-search-cat-badge {
    background-color: rgba(59, 16, 100, 0.08);
    color: var(--faculty-primary);
    padding: 1px 7px;
    border-radius: 6px;
    font-weight: 500;
    font-size: 0.72rem;
    white-space: nowrap;
}

.live-search-highlight {
    background: #fef08a;
    color: #854d0e;
    padding: 0 2px;
    border-radius: 3px;
    font-weight: 700;
}

.live-search-footer {
    padding: 10px 16px;
    background: var(--faculty-bg-alt);
    border-top: 1px solid var(--faculty-border);
    text-align: center;
}

.live-search-view-all {
    display: block;
    color: var(--faculty-primary);
    font-weight: 600;
    font-size: 0.85rem;
    text-decoration: none;
    transition: color 0.15s ease, transform 0.15s ease;
}

.live-search-view-all:hover {
    color: var(--faculty-accent-hover);
    transform: translateX(2px);
}

.live-search-empty {
    padding: 28px 20px;
    text-align: center;
    color: var(--faculty-text-muted);
}

.live-search-empty i {
    font-size: 2.2rem;
    color: #c4b5fd;
    margin-bottom: 8px;
    display: block;
}

.live-search-empty p {
    font-size: 0.88rem;
    margin: 0;
}

