:root {
    --primary-color: #B18E63;
    --primary-color-rgb: 177, 142, 99;
    --scopus-color: #e9711c;
    --scopus-color-rgb: 233, 113, 28;
    --dark-color: #2c2c2c;
    --light-color: #f8f9fa;
    --transition: all 0.3s ease;
}

body {
    font-family: 'Inter', sans-serif;
    overflow-x: hidden;
}

/* Navbar */
.navbar {
    background: transparent;
    padding: 1.5rem 0;
    transition: all 0.5s ease;
    z-index: 1000;
}

.navbar.navbar-scrolled {
    background: rgba(var(--primary-color-rgb), 0.95);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    box-shadow: 0 2px 15px rgba(0, 0, 0, 0.1);
    padding: 0.8rem 0;
}

.navbar-brand {
    display: flex;
    align-items: center;
    color: white !important;
    transition: var(--transition);
}

.navbar-brand img {
    height: 50px;
    margin-right: 15px;
    filter: brightness(0) invert(1);
    /* Default white for hero */
    transition: var(--transition);
}

/* On scrolled or subpages, make brand/links appropriate colors */
.navbar.navbar-scrolled .navbar-brand img {
    filter: none;
    /* Show original logo colors or use a dark filter */
}

/* If we want to keep it white when scrolled (since scrolled is primary gold background) */
.navbar.navbar-scrolled .navbar-brand img {
    filter: brightness(0) invert(1);
}

/* IMPORTANT: If on a subpage AND NOT SCROLLED, the background is white. 
   We need the navbar to show DARK text and DARK logo. 
   But currently navbar-scrolled is used for subpages in header.php logic.
   Let's check the header.php logic I just wrote.
*/

.nav-link {
    color: rgba(255, 255, 255, 0.9);
    font-weight: 500;
    margin: 0 5px; /* Reduced base margin for more flexibility */
    transition: var(--transition);
    text-transform: uppercase;
    font-size: 0.82rem; /* Slightly smaller base font */
    letter-spacing: 0.5px;
    white-space: nowrap;
}

@media (min-width: 992px) {
    .navbar-collapse {
        display: flex !important;
        justify-content: center !important;
    }
    
    .navbar-nav {
        flex-grow: 0; /* Don't stretch, stay centered */
    }
    
    /* Allow some breathing room for the logo */
    .navbar-brand {
        margin-right: 20px;
    }
}

.navbar.navbar-scrolled .nav-link {
    color: white;
}

.nav-link:hover {
    color: #ffd700 !important;
    /* Gold hover */
}

.navbar-toggler {
    border-color: rgba(255, 255, 255, 0.5);
}

.navbar-toggler-icon {
    filter: brightness(0) invert(1);
}



/* Search Overlay */




/* Inline Search */
.search-inline-wrapper {
    display: none;
    width: 100%;
    align-items: center;
    animation: fadeIn 0.3s ease;
}

.search-inline-wrapper.active {
    display: flex;
}

.search-input {
    background: rgba(0, 0, 0, 0.05);
    border: 1px solid rgba(0, 0, 0, 0.1);
    border-radius: 25px;
    padding: 0.5rem 1.5rem;
    font-size: 0.9rem;
    margin-right: 1rem;
}

.search-input:focus {
    background: white;
    box-shadow: 0 0 0 3px rgba(var(--primary-color-rgb), 0.2);
    border-color: var(--primary-color);
}

.btn-close-search {
    background: none;
    border: none;
    font-size: 1.2rem;
    color: var(--dark-color);
    cursor: pointer;
    transition: var(--transition);
}

.btn-close-search:hover {
    color: var(--primary-color);
}

/* Language Switcher */
.lang-switcher {
    display: flex;
    align-items: center;
    font-size: 0.8rem;
    font-weight: 700;
}

.lang-link {
    text-decoration: none;
    color: rgba(255, 255, 255, 0.7);
    transition: var(--transition);
    white-space: nowrap;
}

.lang-link.active {
    color: white;
}

.lang-link:hover {
    color: white;
}

.lang-separator {
    color: rgba(255, 255, 255, 0.5);
    margin: 0 8px;
}

.navbar.navbar-scrolled .lang-link {
    color: rgba(255, 255, 255, 0.8);
}

.navbar.navbar-scrolled .lang-link.active {
    color: var(--dark-color);
    background: white;
    padding: 2px 8px;
    border-radius: 4px;
}

.navbar.navbar-scrolled .lang-link:hover {
    color: white;
}

.navbar.navbar-scrolled .lang-separator {
    color: rgba(255, 255, 255, 0.4);
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(-5px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Search Overlay - REMOVED */


/* Hero Section */
.hero-wrapper {
    position: relative;
    height: 75vh;
    width: 100%;
    z-index: 5;
    /* Ensure stacking context is above content sections */
}


.video-container {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    overflow: hidden;
    background: #000;
}

.video-container video {
    width: 100%;
    height: 100%;
    object-fit: cover;
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    opacity: 0;
    transition: opacity 1.5s ease;
}

.video-container video.loaded {
    opacity: 1;
}

.hero-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(var(--primary-color-rgb), 0.4);
    z-index: 1;
}

.hero-content {
    position: relative;
    z-index: 2;
    height: 100%;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    color: white;
    text-align: center;
    padding-bottom: 50px;
}

/* Flip Cards Container */
.hero-cards-container {
    position: absolute;
    bottom: 0;
    /* Align to the very bottom of hero */
    left: 0;
    width: 100%;
    z-index: 10;
    transform: translateY(50%);
    /* Half overlay on next section */
}

.cards-grid {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 0;
    /* Mepet saja */
    width: 100%;
    max-width: 66.66%;
    margin: 0 auto;
    padding: 0;
}

/* Flip Card Base */
.flip-card {
    background-color: transparent;
    height: 140px;
    perspective: 1000px;
}

.flip-card-inner {
    position: relative;
    width: 100%;
    height: 100%;
    text-align: center;
    transition: transform 0.6s;
    transform-style: preserve-3d;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    border-radius: 0;
    /* No rounded */
}

.flip-card:hover .flip-card-inner {
    transform: rotateY(180deg);
}

.flip-card-front,
.flip-card-back {
    position: absolute;
    width: 100%;
    height: 100%;
    -webkit-backface-visibility: hidden;
    backface-visibility: hidden;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 10px;
    border-radius: 0;
    /* No rounded */
    border: 1px solid rgba(0, 0, 0, 0.05);
    /* Subtle border for separation since they touch */
}

/* Front Side */
.flip-card-front {
    background-color: #faf7f2;
    /* Off-white with a brownish/warm undertone */
    color: var(--dark-color);
}


.flip-card-front i {
    font-size: 1.8rem;
    margin-bottom: 8px;
    color: var(--primary-color);
}

.flip-card-front h5 {
    font-size: 0.75rem;
    font-weight: 700;
    margin: 0;
    text-transform: uppercase;
    line-height: 1.2;
}

/* Back Side */
.flip-card-back {
    background-color: white;
    color: var(--dark-color);
    transform: rotateY(180deg);
}

/* Footer */
.footer {
    background-color: var(--primary-color) !important;
    color: white;
}

.footer-brand h5 {
    color: white;
    /* Changed from primary to white for contrast on gold */
}

.footer-links li {
    margin-bottom: 12px;
}

.footer-links a {
    color: rgba(255, 255, 255, 0.9);
    text-decoration: none;
    transition: all 0.3s ease;
    font-size: 0.9rem;
    font-weight: 500;
}

.footer-links a:hover {
    color: var(--dark-color);
    padding-left: 5px;
}

.social-icon {
    width: 40px;
    height: 40px;
    background: rgba(0, 0, 0, 0.1);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    text-decoration: none;
    transition: all 0.3s ease;
}

.social-icon:hover {
    background: var(--dark-color);
    transform: translateY(-3px);
    color: white;
}

.footer-bottom {
    background: transparent;
}

.bg-scopus-light {
    background-color: rgba(var(--scopus-color-rgb), 0.1) !important;
}

.text-scopus {
    color: var(--scopus-color) !important;
}

.border-scopus-light {
    border-color: rgba(var(--scopus-color-rgb), 0.15) !important;
}

.btn-card {
    background-color: var(--primary-color);
    color: white;
    border: none;
    padding: 6px 12px;
    border-radius: 20px;
    font-size: 0.7rem;
    font-weight: 600;
    transition: var(--transition);
    text-decoration: none;
}

.btn-card:hover {
    background-color: var(--dark-color);
    color: white;
}

@media (max-width: 991.98px) {

    .navbar.navbar-expanded,
    .navbar:has(.collapse.show),
    .navbar:has(.collapsing) {
        background: rgba(var(--primary-color-rgb), 1) !important;
        box-shadow: 0 4px 10px rgba(0, 0, 0, 0.2);
    }

    .navbar-collapse.collapse.show,
    .navbar-collapse.collapsing {
        display: block !important;
        background: transparent;
        /* Navbar handles the background */
    }

    .navbar-nav {
        flex-direction: column !important;
        padding: 1rem 0;
    }

    .navbar-nav .nav-item {
        margin: 5px 0;
        width: 100%;
    }

    .navbar-nav .nav-link {
        padding: 10px 0;
        border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    }

    .search-inline-wrapper {
        position: absolute;
        top: 0;
        left: 0;
        background: white;
        padding: 10px;
        z-index: 1001;
    }
}

@media (max-width: 1200px) {
    .cards-grid {
        grid-template-columns: repeat(4, 1fr);
    }

    .hero-cards-container {
        transform: translateY(20%);
    }
}

@media (max-width: 768px) {
    .hero-wrapper {
        height: auto;
    }

    .video-container {
        height: 65vh;
        position: relative;
    }

    .hero-overlay,
    .hero-content {
        position: absolute;
        top: 0;
        left: 0;
        width: 100%;
        height: 65vh;
    }

    .cards-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 0;
        max-width: 100%;
        margin: 0;
    }

    .hero-cards-container {
        position: relative;
        bottom: 0;
        transform: none;
        background-color: #fdfaf5;
        padding: 40px 0;
        width: 100%;
        z-index: 10;
        box-shadow: inset 0 10px 20px rgba(0, 0, 0, 0.05);
    }

    .flip-card {
        height: 140px;
    }

    .flip-card-inner {
        border-radius: 0;
        box-shadow: none;
    }

    .flip-card-front,
    .flip-card-back {
        border-radius: 0;
        border: 0.5px solid rgba(0, 0, 0, 0.05);
    }

    .flip-card-front h5 {
        font-size: 0.8rem;
    }
}

/* Premium UI Utilities */
.fw-extrabold { font-weight: 800; }
.letter-spacing-1 { letter-spacing: 1px; }
.letter-spacing-2 { letter-spacing: 2px; }

.text-gold-light { color: #f7e6b4 !important; }
.text-gold-dark { color: #B18E63 !important; }

.bg-primary-soft { background-color: rgba(var(--primary-color-rgb), 0.1) !important; }
.bg-gold-soft { background-color: rgba(177, 142, 99, 0.1) !important; }

.title-divider {
    width: 60px;
    height: 4px;
    background: var(--primary-color);
    border-radius: 2px;
}

.title-accent-premium {
    display: flex;
    align-items: center;
}

.title-accent-premium::before {
    content: '';
    width: 4px;
    height: 30px;
    background: var(--primary-color);
    margin-right: 15px;
    border-radius: 2px;
}

.btn-premium-outline {
    border: 2px solid var(--primary-color);
    color: var(--primary-color);
    background: transparent;
    transition: all 0.3s ease;
    text-decoration: none;
    display: inline-block;
}

.btn-premium-outline:hover {
    background: var(--primary-color);
    color: white !important;
    box-shadow: 0 4px 15px rgba(var(--primary-color-rgb), 0.3);
}

.text-shadow-premium {
    text-shadow: 0 10px 30px rgba(0,0,0,0.5);
}

.hero-divider-premium {
    width: 100px;
    height: 4px;
    background: linear-gradient(90deg, transparent, var(--primary-gold), transparent);
    border-radius: 2px;
}

.fw-extrabold { font-weight: 800; }
.fw-medium { font-weight: 500; }

@keyframes expandX {
    from { width: 0; opacity: 0; }
    to { width: 100px; opacity: 1; }
}

.glass-header {
    background: rgba(255, 255, 255, 0.7);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.3);
}

/* Lecturer Cell Premium Styles */
.stat-badge {
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 8px;
    font-size: 0.85rem;
    box-shadow: 0 2px 5px rgba(0,0,0,0.05);
}

.scholar-badge {
    background-color: var(--gold-soft);
    color: var(--primary-gold);
}

.scopus-badge {
    background-color: rgba(0, 0, 0, 0.05);
    color: #444;
}

.btn-view-profile {
    opacity: 0;
    transform: translateY(10px);
    transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.lecturer-card:hover .btn-view-profile {
    opacity: 1;
    transform: translateY(0);
}

.small-text-responsive {
    font-size: 0.9rem;
}

@media (max-width: 576px) {
    .small-text-responsive {
        font-size: 0.8rem;
    }
}