/**
 * Core Stylesheet for IBB Graduate School CMS Frontend Shortcodes
 */

/* -------------------- NAVBAR SHORTCODE -------------------- */
.ibb-shortcode-navbar {
    background-color: #09112e;
    color: #ffffff;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen, Ubuntu, Cantarell, "Open Sans", "Helvetica Neue", sans-serif;
    position: relative;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
    transition: all 0.3s ease;
    border-bottom: 2px solid #eab308;
    margin: 24px 0;
    border-radius: 12px;
    overflow: hidden;
    width: 100%;
    box-sizing: border-box;
}

/* Full Width Topbar Layouts */
.ibb-shortcode-navbar.ibb-navbar-topbar {
    border-radius: 8px;
}

.ibb-shortcode-navbar.ibb-navbar-sticky {
    position: -webkit-sticky;
    position: sticky;
    top: 0;
    z-index: 99999;
    border-radius: 0;
    margin-top: 0;
    margin-bottom: 24px;
}

/* Sidebar Layout */
.ibb-shortcode-navbar.ibb-navbar-sidebar {
    position: fixed;
    top: 0;
    left: 0;
    bottom: 0;
    width: 280px;
    height: 100vh;
    border-radius: 0;
    border-bottom: none;
    border-right: 3px solid #eab308;
    margin: 0;
    z-index: 9999;
    display: flex;
    flex-direction: column;
}

@media (max-width: 991px) {
    .ibb-shortcode-navbar.ibb-navbar-sidebar {
        position: relative;
        width: 100%;
        height: auto;
        border-right: none;
        border-bottom: 3px solid #eab308;
    }
    body.has-ibb-sidebar-layout {
        padding-left: 0 !important;
    }
}

@media (min-width: 992px) {
    body.has-ibb-sidebar-layout {
        padding-left: 280px !important;
    }
}

/* Navbar Inner layout structure */
.ibb-navbar-inner {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 14px 24px;
    position: relative;
    box-sizing: border-box;
    width: 100%;
}

.ibb-navbar-sidebar .ibb-navbar-inner {
    flex-direction: column;
    align-items: flex-start;
    justify-content: flex-start;
    height: 100%;
    padding: 30px 20px;
    gap: 40px;
}

/* Branding logo + stacked descriptions */
.ibb-nav-brand-container {
    display: flex;
    align-items: center;
    gap: 14px;
}

.ibb-navbar-sidebar .ibb-nav-brand-container {
    flex-direction: column;
    align-items: flex-start;
    gap: 18px;
    width: 100%;
    padding-bottom: 20px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.ibb-nav-logo-wrapper {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background-color: #ffffff;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.15);
    flex-shrink: 0;
}

.ibb-nav-custom-logo {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.ibb-nav-svg-seal {
    width: 36px;
    height: 36px;
    display: block;
}

.ibb-nav-titles {
    display: flex;
    flex-direction: column;
    gap: 3px;
}

.ibb-nav-dept-name {
    font-size: 14px;
    font-weight: 800;
    color: #ffffff;
    letter-spacing: 1.2px;
    text-transform: uppercase;
    margin: 0;
    padding: 0;
    line-height: 1.2;
    font-family: inherit;
}

.ibb-nav-univ-name {
    font-size: 10px;
    color: #38bdf8;
    font-family: monospace;
    text-transform: uppercase;
    margin: 0;
    padding: 0;
    letter-spacing: 0.5px;
    font-weight: 600;
}

/* Links Roster wrapper */
.ibb-nav-links-container {
    display: flex;
    align-items: center;
    gap: 8px;
    transition: all 0.3s ease;
}

.ibb-navbar-sidebar .ibb-nav-links-container {
    flex-direction: column;
    align-items: flex-start;
    width: 100%;
    gap: 12px;
}

.ibb-nav-link-item {
    color: #93c5fd;
    text-decoration: none !important;
    font-size: 12px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.8px;
    padding: 10px 16px;
    border-radius: 10px;
    transition: all 0.2s ease;
    border-left: 4px solid transparent;
}

.ibb-nav-link-item:hover, 
.ibb-nav-link-item:focus {
    color: #ffffff;
    background-color: rgba(255, 255, 255, 0.06);
}

/* Active links inside sidebar layout */
.ibb-navbar-sidebar .ibb-nav-link-item {
    width: 100%;
    box-sizing: border-box;
    display: block;
}

.ibb-navbar-sidebar .ibb-nav-link-item:hover {
    color: #fbbf24;
    border-left: 4px solid #fbbf24;
    background-color: rgba(30, 58, 138, 0.4);
    padding-left: 20px;
}

/* Responsive mobile burger toggle */
.ibb-nav-mobile-toggle {
    display: none;
    background: none;
    border: none;
    cursor: pointer;
    flex-direction: column;
    gap: 5px;
    padding: 8px;
    z-index: 10000;
}

.ibb-toggle-line {
    display: block;
    width: 22px;
    height: 2.5px;
    background-color: #ffffff;
    border-radius: 2px;
    transition: all 0.3s ease;
}

@media (max-width: 991px) {
    .ibb-nav-mobile-toggle {
        display: flex;
    }

    .ibb-nav-links-container {
        display: none;
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        background-color: #09112e;
        flex-direction: column;
        align-items: flex-start;
        padding: 16px 24px;
        border-top: 1px solid rgba(255, 255, 255, 0.1);
        gap: 10px;
        box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.3);
    }

    /* Open mobile state helper */
    .ibb-mobile-open .ibb-nav-links-container {
        display: flex;
    }

    .ibb-mobile-open .ibb-nav-link-item {
        width: 100%;
        box-sizing: border-box;
        display: block;
        padding: 12px 16px;
    }

    /* Cross animation for open mobile toggle */
    .ibb-mobile-open .ibb-toggle-line:nth-child(1) {
        transform: translateY(7.5px) rotate(45deg);
    }
    .ibb-mobile-open .ibb-toggle-line:nth-child(2) {
        opacity: 0;
    }
    .ibb-mobile-open .ibb-toggle-line:nth-child(3) {
        transform: translateY(-7.5px) rotate(-45deg);
    }
}

/* Beautiful dynamic bottom accent strip representing the school colors */
.ibb-navbar-accent-strip {
    height: 4px;
    background: linear-gradient(90deg, #2563eb 0%, #eab308 50%, #dc2626 100%);
    width: 100%;
}

.ibb-navbar-sidebar .ibb-navbar-accent-strip {
    position: absolute;
    bottom: 0;
    left: 0;
    height: 6px;
}

/* -------------------- CURRICULUM SHORTCODE -------------------- */
.ibb-curriculum-container {
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 16px;
    overflow: hidden;
    margin: 24px 0;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.05);
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
}

.ibb-curr-header {
    background-color: #1e3b8b;
    color: #ffffff;
    padding: 16px 24px;
    border-bottom: 3px solid #fbbf24;
}

.ibb-curr-header h4 {
    margin: 0;
    font-size: 15px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    font-weight: 700;
}

.ibb-curr-table {
    width: 100%;
    border-collapse: collapse;
    text-align: left;
}

.ibb-curr-table th {
    background-color: #f8fafc;
    color: #475569;
    font-weight: 700;
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    padding: 14px 20px;
    border-bottom: 1px solid #e2e8f0;
}

.ibb-curr-table td {
    padding: 16px 20px;
    border-bottom: 1px solid #f1f5f9;
    vertical-align: top;
    color: #334155;
    font-size: 13px;
}

.ibb-course-row:hover {
    background-color: #fafbfd;
}

.ibb-course-code {
    background-color: #f1f5f9;
    color: #1e3b8b;
    font-family: monospace;
    font-weight: bold;
    padding: 3px 8px;
    border-radius: 6px;
    font-size: 11px;
}

.ibb-course-title {
    color: #0f172a;
    font-size: 14px;
    display: block;
    margin-bottom: 4px;
}

.ibb-course-desc {
    margin: 0;
    color: #64748b;
    font-size: 11.5px;
    line-height: 1.4;
}

.ibb-badge-credits {
    background-color: #eff6ff;
    color: #2563eb;
    font-size: 11px;
    font-weight: 700;
    padding: 3px 8px;
    border-radius: 9999px;
}

.ibb-badge-type {
    font-size: 10px;
    font-weight: 800;
    padding: 2px 6px;
    border-radius: 4px;
    letter-spacing: 0.5px;
}

.ibb-badge-type.core {
    background-color: #ecfdf5;
    color: #059669;
}

.ibb-badge-type.elective {
    background-color: #fef3c7;
    color: #d97706;
}

.ibb-badge-type.seminar {
    background-color: #f3e8ff;
    color: #9333ea;
}

.ibb-badge-term {
    font-family: monospace;
    font-weight: bold;
    font-size: 11px;
    color: #475569;
}

/* -------------------- FACULTY SHORTCODE -------------------- */
.ibb-faculty-container {
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 16px;
    overflow: hidden;
    margin: 24px 0;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.05);
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
}

.ibb-fac-header {
    background-color: #0f172a;
    color: #ffffff;
    padding: 16px 24px;
    border-bottom: 3px solid #dc2626;
}

.ibb-fac-header h4 {
    margin: 0;
    font-size: 15px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    font-weight: 700;
}

.ibb-faculty-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 24px;
    padding: 24px;
}

.ibb-faculty-card {
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    padding: 20px;
    display: flex;
    gap: 16px;
    align-items: start;
    transition: transform 0.2s, box-shadow 0.2s;
}

.ibb-faculty-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.05);
}

.ibb-fac-avatar {
    width: 64px;
    height: 64px;
    border-radius: 50%;
    overflow: hidden;
    flex-shrink: 0;
    border: 2px solid #e2e8f0;
}

.ibb-fac-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.ibb-fac-info {
    flex: 1;
}

.ibb-fac-name {
    margin: 0 0 4px;
    font-size: 15px;
    color: #0f172a;
    font-weight: 800;
}

.ibb-fac-role {
    display: block;
    font-size: 11px;
    font-weight: 600;
    color: #e11d48;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 8px;
}

.ibb-fac-email {
    color: #2563eb;
    text-decoration: none;
    font-size: 12px;
    display: block;
    margin-bottom: 10px;
}

.ibb-fac-email:hover {
    text-decoration: underline;
}

.ibb-fac-bio {
    margin: 0 0 10px;
    font-size: 11.5px;
    line-height: 1.4;
    color: #475569;
}

.ibb-fac-pubs {
    border-top: 1px dashed #cbd5e1;
    padding-top: 8px;
    font-size: 11px;
}

.ibb-fac-pubs strong {
    color: #1e293b;
    display: block;
    margin-bottom: 2px;
}

.ibb-fac-pubs span {
    color: #64748b;
    font-style: italic;
}

/* -------------------- GALLERY SHORTCODE -------------------- */
.ibb-gallery-container {
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 16px;
    overflow: hidden;
    margin: 24px 0;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.05);
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
}

.ibb-gal-header {
    background-color: #1e1b4b;
    color: #ffffff;
    padding: 16px 24px;
    border-bottom: 3px solid #7c3aed;
}

.ibb-gal-header h4 {
    margin: 0;
    font-size: 15px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    font-weight: 700;
}

.ibb-gallery-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
    gap: 20px;
    padding: 24px;
}

.ibb-gallery-item {
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    overflow: hidden;
    background: #ffffff;
    box-shadow: 0 1px 3px rgba(0,0,0,0.05);
}

.ibb-gal-image {
    aspect-ratio: 4/3;
    overflow: hidden;
    position: relative;
    background-color: #f1f5f9;
}

.ibb-gal-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s;
}

.ibb-gallery-item:hover .ibb-gal-image img {
    transform: scale(1.05);
}

.ibb-gal-badge {
    position: absolute;
    bottom: 8px;
    left: 8px;
    background-color: #7c3aed;
    color: #ffffff;
    font-size: 9px;
    font-weight: 800;
    padding: 2px 6px;
    border-radius: 4px;
    text-transform: uppercase;
}

.ibb-gal-meta {
    padding: 12px;
}

.ibb-gal-title {
    margin: 0 0 4px;
    font-size: 13px;
    font-weight: 700;
    color: #0f172a;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.ibb-gal-desc {
    margin: 0 0 8px;
    font-size: 11px;
    line-height: 1.3;
    color: #64748b;
    height: 2.6em;
    overflow: hidden;
}

.ibb-gal-date {
    font-size: 10px;
    color: #94a3b8;
    font-weight: 600;
}

/* Fallback fallback fallbacks */
.ibb-error-fallback {
    background-color: #fef2f2;
    border: 1px solid #fca5a5;
    color: #991b1b;
    padding: 12px;
    border-radius: 8px;
    font-size: 12px;
    font-family: monospace;
    margin: 15px 0;
}

@keyframes ibb-pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: .4; }
}
