/* ========== IPDC UNIFIED FRONTEND CSS ========== */
:root {
    --ipdc-blue: #0056b3;
    --ipdc-dark-blue: #003366;
    --ipdc-yellow: #ffc107;
    --ipdc-red: #dc3545;
    --ipdc-green: #198754;
    --ipdc-info: #0d6efd;
    --ipdc-dark: #212529;
    --ipdc-light: #f8f9fa;
    --transition: all 0.3s ease;
    
    /* Legacy variables mapping */
    --primary-color: #e6f2ff;
    --secondary-color: #ffffff;
    --text-dark: #333333;
    --text-light: #666666;
    --primary: var(--ipdc-blue);
    --warning: var(--ipdc-yellow);
    --danger: var(--ipdc-red);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Poppins', sans-serif;
    background-color: var(--secondary-color);
    color: var(--text-dark);
    overflow-x: hidden;
    padding-top: 0;
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

/* ========== TOP BAR ========== */
.top-bar {
    background: linear-gradient(135deg, var(--ipdc-dark-blue) 0%, var(--ipdc-blue) 100%);
    color: white;
    padding: 8px 0;
    font-size: 0.85rem;
    position: relative;
    z-index: 1030;
}

.top-bar .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 10px;
}

.contact-info {
    display: flex;
    align-items: center;
    gap: 20px;
    flex-wrap: wrap;
}

.contact-info a {
    color: white;
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: 5px;
    transition: var(--transition);
    white-space: nowrap;
}

.contact-info a:hover {
    color: var(--ipdc-yellow);
    transform: translateY(-1px);
}

.contact-info i {
    font-size: 0.9rem;
}

.social-links {
    display: flex;
    align-items: center;
    gap: 8px;
}

.social-links a {
    width: 30px;
    height: 30px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.1);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    transition: var(--transition);
    font-size: 0.85rem;
}

.social-links a:hover {
    background: var(--ipdc-yellow);
    color: var(--ipdc-dark-blue);
    transform: translateY(-3px);
    box-shadow: 0 4px 8px rgba(0,0,0,0.2);
}

/* ========== NAVBAR ========== */
.navbar {
    background: rgba(255, 255, 255, 0.98) !important;
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    box-shadow: 0 2px 20px rgba(0, 0, 0, 0.08);
    padding: 0;
    transition: var(--transition);
    z-index: 1020;
}

.navbar .container {
    position: relative;
    padding: 0 15px;
}

.navbar.scrolled {
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.12);
}

.navbar-brand {
    display: flex;
    align-items: center;
    gap: 12px;
    text-decoration: none;
    padding: 10px 0;
    margin-right: 30px;
    color: var(--ipdc-blue) !important;
    font-weight: bold;
}

.navbar-brand img {
    height: 55px;
    width: auto;
    flex-shrink: 0;
    transition: var(--transition);
}

.navbar-brand:hover img {
    transform: scale(1.05);
}

.brand-text {
    display: flex;
    flex-direction: column;
    line-height: 1.3;
}

.brand-name {
    font-family: 'Montserrat', sans-serif;
    font-weight: 800;
    font-size: 1rem;
    color: var(--ipdc-dark-blue);
    letter-spacing: 0.3px;
    text-transform: uppercase;
    white-space: nowrap;
}

.brand-name-short {
    display: none;
}

.brand-tagline {
    font-family: 'Poppins', sans-serif;
    font-style: italic;
    font-size: 0.75rem;
    font-weight: 400;
    color: #666;
    white-space: nowrap;
}

/* ========== NAVIGATION ========== */
.navbar-nav {
    gap: 2px;
}

.nav-item {
    position: relative;
}

.nav-link {
    color: var(--ipdc-dark) !important;
    padding: 20px 12px !important;
    font-weight: 500;
    font-family: 'Montserrat', sans-serif;
    font-size: 0.88rem;
    transition: var(--transition);
    position: relative;
    white-space: nowrap;
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: 15px;
    left: 50%;
    width: 0;
    height: 2px;
    background: var(--ipdc-blue);
    transition: var(--transition);
    transform: translateX(-50%);
}

.nav-link:hover,
.nav-link:focus {
    color: var(--ipdc-blue) !important;
}

.nav-link:hover::after,
.nav-item.active .nav-link::after {
    width: 60%;
}

.nav-item.active .nav-link {
    color: var(--ipdc-blue) !important;
    font-weight: 600;
}

/* ========== DROPDOWN ========== */
.dropdown-toggle::after {
    margin-left: 5px;
    vertical-align: middle;
    font-size: 0.7rem;
}

.dropdown-menu {
    border: none;
    border-radius: 8px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.12);
    padding: 10px 0;
    margin-top: 5px;
    animation: fadeInUp 0.3s ease-out;
    border-top: 3px solid transparent;
    min-width: 220px;
}

@keyframes fadeInUp {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

.dropdown-item {
    padding: 10px 20px;
    font-size: 0.88rem;
    font-weight: 500;
    color: #333;
    transition: var(--transition);
    display: flex;
    align-items: center;
    gap: 8px;
}

.dropdown-item i {
    width: 18px;
    text-align: center;
    color: #999;
    transition: var(--transition);
}

.dropdown-item:hover {
    background: rgba(0, 86, 179, 0.05);
    color: var(--ipdc-blue);
    padding-left: 25px;
}

.dropdown-item:hover i {
    color: var(--ipdc-blue);
}

.dropdown-divider {
    margin: 8px 0;
    border-color: #e9ecef;
}

/* Dropdown Color Themes */
#academicDropdown ~ .dropdown-menu { border-top-color: var(--ipdc-yellow); }
#penelitianDropdown ~ .dropdown-menu { border-top-color: var(--ipdc-red); }
#newsDropdown ~ .dropdown-menu { border-top-color: var(--ipdc-info); }
#galleryDropdown ~ .dropdown-menu { border-top-color: var(--ipdc-green); }

/* ========== MEGA MENU (ABOUT) ========== */
@media (min-width: 992px) {
    #aboutDropdown ~ .dropdown-menu {
        min-width: 800px;
        border-top-color: var(--ipdc-blue);
        padding: 20px;
        left: 50%;
        transform: translateX(-50%);
        animation: fadeInUpCenter 0.3s ease-out;
        text-align: center;
    }
}

@keyframes fadeInUpCenter {
    from { opacity: 0; transform: translateX(-50%) translateY(10px); }
    to { opacity: 1; transform: translateX(-50%) translateY(0); }
}

.mega-menu .dropdown-header {
    color: var(--ipdc-blue);
    font-weight: 700;
    text-transform: uppercase;
    font-size: 0.82rem;
    letter-spacing: 0.5px;
    margin-bottom: 12px;
    padding-bottom: 8px;
    border-bottom: 2px solid #e9ecef;
    text-align: center;
}

.mega-menu .dropdown-item {
    padding: 8px 15px;
    border-radius: 6px;
    margin-bottom: 2px;
    justify-content: center;
}

/* ========== TOGGLER (MOBILE) ========== */
.navbar-toggler {
    border: 2px solid var(--ipdc-blue);
    padding: 8px 10px;
    border-radius: 8px;
    transition: var(--transition);
}

.navbar-toggler:focus {
    box-shadow: 0 0 0 3px rgba(0, 86, 179, 0.2);
    outline: none;
}

.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(0, 86, 179, 1)' stroke-linecap='round' stroke-miterlimit='10' stroke-width='2' d='M4 7h22M4 15h22M4 23h22'/%3e%3c/svg%3e");
}

/* ========== RESPONSIVE BREAKPOINTS ========== */
@media (min-width: 1200px) {
    .nav-link { padding: 20px 15px !important; }
    .nav-item.dropdown:hover > .dropdown-menu { display: block; }
    .nav-item.dropdown:hover > .nav-link { color: var(--ipdc-blue) !important; }
    .nav-item.dropdown:hover > .nav-link::after { width: 60%; }
}

@media (max-width: 1199.98px) {
    .brand-name-full { font-size: 0.9rem; }
    .brand-tagline { font-size: 0.7rem; }
    .navbar-brand img { height: 48px; }
    .nav-link { padding: 15px 10px !important; font-size: 0.82rem; }
    #aboutDropdown ~ .dropdown-menu { min-width: 700px; }
}

@media (max-width: 991.98px) {
    .top-bar .contact-info { display: none; }
    .top-bar .social-links { margin: 0 auto; }
    .navbar-collapse {
        background: white;
        padding: 15px;
        border-radius: 0 0 10px 10px;
        box-shadow: 0 10px 20px rgba(0,0,0,0.1);
        max-height: 80vh;
        overflow-y: auto;
    }
    .nav-link { padding: 12px 15px !important; }
    .nav-link::after { display: none; }
    .dropdown-menu {
        border: none;
        box-shadow: none;
        background: #f8f9fa;
        margin: 0;
        padding: 0;
        border-left: 3px solid var(--ipdc-blue);
        margin-left: 15px;
        animation: none;
    }
    .dropdown-item { padding: 10px 20px; }
    #aboutDropdown ~ .dropdown-menu { min-width: 100%; padding: 15px; }
    .mega-menu .col-md-4 { margin-bottom: 15px; }
    .nav-item.dropdown:hover > .dropdown-menu { display: none; }
    .nav-item.dropdown.show > .dropdown-menu { display: block; }
}

@media (max-width: 767.98px) {
    .navbar-brand { gap: 8px; margin-right: 0; }
    .navbar-brand img { height: 42px; }
    .brand-name-full { font-size: 0.85rem; }
    .brand-tagline { font-size: 0.7rem; }
}

@media (max-width: 575.98px) {
    .top-bar { font-size: 0.75rem; padding: 5px 0; }
    .social-links a { width: 25px; height: 25px; font-size: 0.75rem; }
    .navbar-brand { gap: 8px; }
    .navbar-brand img { height: 38px; }
    .brand-name-full { display: none; }
    .brand-name-short { display: block; font-size: 1rem; font-weight: 800; }
    .brand-tagline { display: none; }
    .nav-link { font-size: 0.85rem; padding: 10px 12px !important; }
}

/* ========== HERO SECTION ========== */
.hero-section {
    background-image: linear-gradient(rgba(0, 0, 0, 0.7), rgba(0, 0, 0, 0.7)), url('../images/campus.jpg');
    background-size: cover;
    background-position: center;
    background-attachment: fixed;
    color: white;
    padding: 140px 20px 100px;
    text-align: center;
    position: relative;
}

.hero-content h1 {
    font-size: 2.8rem;
    font-weight: 700;
    margin-bottom: 1rem;
    color: white;
}

.hero-content .lead {
    font-size: 1.3rem;
    margin-bottom: 2rem;
    color: #e0e0e0;
}

.btn-primary-custom {
    background-color: var(--ipdc-yellow);
    border-color: var(--ipdc-yellow);
    color: var(--ipdc-dark-blue);
    font-weight: 600;
    padding: 12px 30px;
    border-radius: 50px;
    transition: all 0.3s ease;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.2);
}

.btn-primary-custom:hover {
    background-color: #e0a800;
    border-color: #e0a800;
    transform: translateY(-3px);
    box-shadow: 0 7px 15px rgba(0, 0, 0, 0.3);
    color: var(--ipdc-dark-blue);
}

.btn-outline-light-custom {
    border: 2px solid white;
    color: white;
    padding: 12px 30px;
    border-radius: 50px;
    font-weight: 600;
    transition: all 0.3s ease;
}

.btn-outline-light-custom:hover {
    background: white;
    color: var(--ipdc-blue);
}

/* ========== UTILITIES & COMPONENTS ========== */
.card {
    border: none;
    border-radius: 12px;
    overflow: hidden;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
    margin-bottom: 20px;
}

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

.card-header {
    background-color: var(--secondary-color);
    border-bottom: 1px solid rgba(0, 0, 0, 0.05);
    font-weight: 600;
}

/* Features Section */
.features-section {
    padding: 90px 0;
    background-color: var(--ipdc-light);
}

.section-title {
    font-weight: 700;
    color: var(--ipdc-blue);
    margin-bottom: 1.5rem;
}

.section-subtitle {
    color: #666;
    font-size: 1.1rem;
}

.feature-icon {
    font-size: 2.8rem;
    margin-bottom: 1rem;
}

.feature-icon-blue { color: var(--ipdc-blue); }
.feature-icon-yellow { color: var(--ipdc-yellow); }
.feature-icon-red { color: var(--ipdc-red); }

/* Borders & Colors */
.border-start-primary { border-left: 4px solid var(--primary) !important; }
.border-start-warning { border-left: 4px solid var(--warning) !important; }
.border-start-danger { border-left: 4px solid var(--danger) !important; }

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

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

.btn-primary { background-color: var(--ipdc-blue); border-color: var(--ipdc-blue); }
.btn-primary:hover { background-color: var(--ipdc-dark-blue); border-color: var(--ipdc-dark-blue); }
.btn-danger { background-color: var(--ipdc-red); border-color: var(--ipdc-red); }
.btn-warning { background-color: var(--ipdc-yellow); border-color: var(--ipdc-yellow); color: var(--text-dark); }

.list-group-item { border-left: none; border-right: none; }
.list-group-item:first-child { border-top: none; }
.list-group-item:last-child { border-bottom: none; }

.alert { border-radius: 8px; }

/* Modal */
.modal-header.bg-primary { background-color: var(--ipdc-blue) !important; color: white; }
.modal-header.bg-danger { background-color: var(--ipdc-red) !important; color: white; }

/* ========== FOOTER ========== */
.footer {
    background-color: var(--ipdc-dark-blue);
    color: white;
    flex-shrink: 0;
    padding-top: 50px;
    padding-bottom: 20px;
}

.footer h5 {
    color: var(--ipdc-yellow);
    font-weight: 600;
    margin-bottom: 1.2rem;
}

.footer a {
    color: #ddd;
    text-decoration: none;
    transition: color 0.3s;
}

.footer a:hover {
    color: var(--ipdc-yellow);
}

.copyright {
    background-color: rgba(0, 0, 0, 0.3);
    color: #ccc;
    padding: 12px 0;
    font-size: 0.9rem;
    margin-top: 30px;
}