/**
 * Enhanced Custom Header Styles for InnoScientia Theme
 * Features: Particle effects, color-changing gradients, floating shapes, smooth hover animations
 */

/* ========================================================================
   ENHANCED CUSTOM HEADER WITH PARTICLE EFFECTS & ANIMATIONS
   ======================================================================== */

.innoscientia-custom-header {
    background: #fff;
    padding: 30px 0;
    border-bottom: 2px solid #f0f2f5;
    position: relative;
    z-index: 1000;
    overflow: hidden;
    min-height: 100px;
}

/* Particle Canvas Background */
.innoscientia-custom-header .particle-background {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1;
    pointer-events: none;
}

/* Animated Color-Changing Gradient Background */
.innoscientia-custom-header .animated-gradient-bg {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 0;
    background: linear-gradient(135deg,
            rgba(58, 123, 213, 0.05) 0%,
            rgba(0, 210, 255, 0.05) 25%,
            rgba(248, 87, 166, 0.05) 50%,
            rgba(255, 88, 88, 0.05) 75%,
            rgba(58, 123, 213, 0.05) 100%);
    background-size: 400% 400%;
    animation: gradientShift 15s ease infinite;
}

@keyframes gradientShift {
    0% {
        background-position: 0% 50%;
    }

    50% {
        background-position: 100% 50%;
    }

    100% {
        background-position: 0% 50%;
    }
}

/* Floating Decorative Shapes */
.innoscientia-custom-header .floating-shapes {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 2;
    pointer-events: none;
}

.innoscientia-custom-header .floating-shapes .shape {
    position: absolute;
    border-radius: 50%;
    opacity: 0.1;
    animation: float 20s ease-in-out infinite;
}

.innoscientia-custom-header .floating-shapes .shape-1 {
    width: 100px;
    height: 100px;
    background: linear-gradient(135deg, #3a7bd5, #00d2ff);
    top: 10%;
    left: 5%;
    animation-delay: 0s;
}

.innoscientia-custom-header .floating-shapes .shape-2 {
    width: 150px;
    height: 150px;
    background: linear-gradient(135deg, #f857a6, #ff5858);
    top: 60%;
    right: 10%;
    animation-delay: 5s;
}

.innoscientia-custom-header .floating-shapes .shape-3 {
    width: 80px;
    height: 80px;
    background: linear-gradient(135deg, #00d2ff, #3a7bd5);
    bottom: 20%;
    left: 15%;
    animation-delay: 10s;
}

.innoscientia-custom-header .floating-shapes .shape-4 {
    width: 120px;
    height: 120px;
    background: linear-gradient(135deg, #ff5858, #f857a6);
    top: 30%;
    right: 20%;
    animation-delay: 15s;
}

@keyframes float {

    0%,
    100% {
        transform: translate(0, 0) rotate(0deg);
    }

    25% {
        transform: translate(30px, -30px) rotate(90deg);
    }

    50% {
        transform: translate(-20px, 20px) rotate(180deg);
    }

    75% {
        transform: translate(20px, 30px) rotate(270deg);
    }
}

/* Header Content */
.innoscientia-custom-header .header-content {
    position: relative;
    z-index: 10;
}

.innoscientia-custom-header .custom-header-flex {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 30px;
}

.innoscientia-custom-header .journal-identity {
    flex: 1;
    min-width: 300px;
    display: flex;
    align-items: center;
    gap: 20px;
    transition: transform 0.3s ease;
}

.innoscientia-custom-header .journal-identity:hover {
    transform: translateX(10px);
}

.innoscientia-custom-header .journal-icon-wrapper {
    width: 50px;
    height: 50px;
    background: linear-gradient(135deg, #3a7bd5, #00d2ff);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 10px 30px rgba(58, 123, 213, 0.3);
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    position: relative;
    overflow: hidden;
}

.innoscientia-custom-header .journal-icon-wrapper:before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: linear-gradient(45deg, transparent, rgba(255, 255, 255, 0.3), transparent);
    transform: rotate(45deg);
    animation: shine 3s infinite;
}

.innoscientia-custom-header .journal-icon-wrapper:hover {
    transform: scale(1.1) rotate(5deg);
    box-shadow: 0 15px 40px rgba(58, 123, 213, 0.5);
}

.innoscientia-custom-header .journal-icon {
    font-size: 24px;
    color: white;
    z-index: 1;
}

@keyframes shine {
    0% {
        transform: translateX(-100%) translateY(-100%) rotate(45deg);
    }

    100% {
        transform: translateX(100%) translateY(100%) rotate(45deg);
    }
}

.innoscientia-custom-header .journal-text {
    flex: 1;
}

.innoscientia-custom-header .journal-name {
    margin: 0;
    font-family: 'Montserrat', 'Segoe UI', Roboto, sans-serif;
    font-weight: 800;
    font-size: 28px;
    color: #222;
    letter-spacing: -1px;
    background: linear-gradient(135deg, #3a7bd5, #00d2ff);
    background-clip: text;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    transition: all 0.3s ease;
}

.innoscientia-custom-header .journal-name:hover {
    letter-spacing: 0px;
}

.innoscientia-custom-header .publisher-info {
    margin-top: 5px;
    font-size: 13px;
    color: #666;
    font-weight: 500;
    transition: color 0.3s ease;
}

.innoscientia-custom-header .publisher-info i {
    color: #3a7bd5;
    margin-right: 8px;
    transition: transform 0.3s ease;
}

.innoscientia-custom-header .publisher-info:hover {
    color: #3a7bd5;
}

.innoscientia-custom-header .publisher-info:hover i {
    transform: scale(1.2);
}

.innoscientia-custom-header .journal-metadata {
    text-align: right;
}

.innoscientia-custom-header .issn-card {
    background: linear-gradient(135deg, rgba(58, 123, 213, 0.05), rgba(0, 210, 255, 0.05));
    padding: 12px 20px;
    border-radius: 20px;
    display: inline-flex;
    flex-direction: column;
    gap: 10px;
    border: 2px solid rgba(58, 123, 213, 0.1);
    backdrop-filter: blur(10px);
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.05);
}

.innoscientia-custom-header .issn-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 40px rgba(58, 123, 213, 0.2);
    border-color: rgba(58, 123, 213, 0.3);
}

.innoscientia-custom-header .issn-item {
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 14px;
    color: #555;
    font-weight: 600;
    transition: all 0.3s ease;
}

.innoscientia-custom-header .issn-item i {
    font-size: 16px;
    color: #3a7bd5;
    transition: all 0.3s ease;
}

.innoscientia-custom-header .issn-item:hover i {
    transform: scale(1.2) rotate(10deg);
    color: #00d2ff;
}

.innoscientia-custom-header .issn-content {
    display: flex;
    flex-direction: column;
    gap: 3px;
}

.innoscientia-custom-header .issn-content strong {
    color: #3a7bd5;
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.innoscientia-custom-header .issn-content .issn-value {
    font-size: 14px;
    color: #333;
    font-weight: 700;
    font-family: 'Courier New', monospace;
}

/* Scrolled State */
.innoscientia-custom-header.scrolled-header {
    padding: 20px 0;
    box-shadow: 0 5px 30px rgba(0, 0, 0, 0.1);
}

.innoscientia-custom-header.scrolled-header .journal-name {
    font-size: 22px;
}

.innoscientia-custom-header.scrolled-header .journal-icon-wrapper {
    width: 40px;
    height: 40px;
}

.innoscientia-custom-header.scrolled-header .journal-icon {
    font-size: 20px;
}

.innoscientia-custom-header.scrolled-header .issn-card {
    padding: 15px 20px;
}

/* Responsive Design */
@media (max-width: 768px) {
    .innoscientia-custom-header {
        text-align: center;
        padding: 40px 0;
    }

    .innoscientia-custom-header .custom-header-flex {
        flex-direction: column;
        text-align: center;
    }

    .innoscientia-custom-header .journal-identity {
        flex-direction: column;
        text-align: center;
    }

    .innoscientia-custom-header .journal-identity:hover {
        transform: none;
    }

    .innoscientia-custom-header .journal-metadata {
        margin-top: 20px;
        text-align: center;
    }

    .innoscientia-custom-header .journal-name {
        font-size: 28px;
    }

    .innoscientia-custom-header .issn-card {
        padding: 15px 20px;
    }

    .innoscientia-custom-header .issn-item {
        font-size: 12px;
    }

    .innoscientia-custom-header .floating-shapes .shape {
        display: none;
    }
}

/* ========================================================================
   HOME BUTTON ANIMATION
   ======================================================================== */
.nav-item-home>a i {
    display: inline-block;
    animation: homeBounce 2s infinite ease-in-out;
    color: #3a7bd5;
    /* Theme Primary Color */
    text-shadow: 0 0 10px rgba(58, 123, 213, 0.3);
}

@keyframes homeBounce {

    0%,
    100% {
        transform: translateY(0);
    }

    50% {
        transform: translateY(-4px);
    }
}

/* Pause animation on hover and show a different effect */
.nav-item-home>a:hover i {
    animation-play-state: paused;
    transform: scale(1.2);
    transition: transform 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    color: #ff5858;
    /* Theme Accent Color */
}

/* ========================================================================
   AMAZING SIDEBAR OVERHAUL
   ======================================================================== */

#sidebar {
    padding-top: 20px;
}

#sidebar .pkp_block,
#sidebar .block {
    background: rgba(255, 255, 255, 0.7) !important;
    backdrop-filter: blur(12px) !important;
    -webkit-backdrop-filter: blur(12px) !important;
    border: 1px solid rgba(255, 255, 255, 0.4) !important;
    border-radius: 20px !important;
    padding: 25px !important;
    margin-bottom: 30px !important;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.05) !important;
    transition: all 0.5s cubic-bezier(0.175, 0.885, 0.32, 1.275) !important;
    position: relative !important;
    overflow: hidden !important;
    transform: translateY(30px);
    opacity: 0;
    border-top: none !important;
    /* Remove old style */
}

#sidebar .pkp_block.block-visible,
#sidebar .block.block-visible {
    transform: translateY(0);
    opacity: 1;
}

#sidebar .pkp_block:hover,
#sidebar .block:hover {
    transform: translateY(-10px) scale(1.02) !important;
    box-shadow: 0 20px 40px rgba(58, 123, 213, 0.15) !important;
    background: rgba(255, 255, 255, 0.85) !important;
    border-color: rgba(58, 123, 213, 0.3) !important;
}

/* Animated Border Top Gradient */
#sidebar .pkp_block::before,
#sidebar .block::before {
    content: '' !important;
    position: absolute !important;
    top: 0 !important;
    left: 0 !important;
    width: 100% !important;
    height: 6px !important;
    background: linear-gradient(90deg, #3a7bd5, #00d2ff, #f857a6, #ff5858, #3a7bd5) !important;
    background-size: 400% 400% !important;
    animation: sidebarGradientFlow 8s linear infinite !important;
    z-index: 2 !important;
}

@keyframes sidebarGradientFlow {
    0% {
        background-position: 0% 50%;
    }

    100% {
        background-position: 100% 50%;
    }
}

#sidebar .pkp_block .title,
#sidebar .block .title {
    color: #222 !important;
    font-size: 16px !important;
    font-weight: 800 !important;
    text-transform: uppercase !important;
    letter-spacing: 1.5px !important;
    margin-bottom: 20px !important;
    padding-bottom: 12px !important;
    border-bottom: 2px solid rgba(0, 0, 0, 0.05) !important;
    position: relative !important;
    background: none !important;
    border-radius: 0 !important;
}

#sidebar .pkp_block .title::after,
#sidebar .block .title::after {
    content: '' !important;
    position: absolute !important;
    bottom: -2px !important;
    left: 0 !important;
    width: 40px !important;
    height: 2px !important;
    background: #3a7bd5 !important;
    transition: width 0.3s ease !important;
}

#sidebar .pkp_block:hover .title::after,
#sidebar .block:hover .title::after {
    width: 100% !important;
}

/* Content List Styles */
#sidebar .pkp_block ul,
#sidebar .block ul {
    border: none !important;
    background: transparent !important;
    padding: 0 !important;
    margin: 0 !important;
}

#sidebar .pkp_block li,
#sidebar .block li {
    background: transparent !important;
    border: none !important;
    margin-bottom: 4px !important;
    padding: 0 !important;
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275) !important;
    position: relative !important;
}

#sidebar .pkp_block li::after,
#sidebar .block li::after {
    content: '' !important;
    display: block !important;
    position: absolute !important;
    bottom: -2px !important;
    left: 15px !important;
    right: 15px !important;
    height: 1px !important;
    background: linear-gradient(90deg,
            rgba(58, 123, 213, 0) 0%,
            rgba(58, 123, 213, 0.15) 20%,
            rgba(58, 123, 213, 0.15) 80%,
            rgba(58, 123, 213, 0) 100%) !important;
    transition: all 0.4s ease !important;
    opacity: 0.8 !important;
    z-index: 0 !important;
}

#sidebar .pkp_block li:last-child::after,
#sidebar .block li:last-child::after {
    display: none !important;
}

#sidebar .pkp_block li:hover::after,
#sidebar .block li:hover::after {
    opacity: 0 !important;
    transform: scaleX(1.1) !important;
}

#sidebar .pkp_block li a,
#sidebar .block li a {
    display: block !important;
    padding: 12px 15px !important;
    color: #555 !important;
    text-decoration: none !important;
    border-radius: 12px !important;
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275) !important;
    position: relative !important;
    overflow: hidden !important;
    z-index: 1 !important;
}

/* Background Slide Effect */
#sidebar .pkp_block li a::before,
#sidebar .block li a::before {
    content: '' !important;
    position: absolute !important;
    top: 0 !important;
    left: -100% !important;
    width: 100% !important;
    height: 100% !important;
    background: linear-gradient(90deg, rgba(58, 123, 213, 0.1), rgba(0, 210, 255, 0.05)) !important;
    transition: all 0.4s cubic-bezier(0.77, 0, 0.175, 1) !important;
    z-index: -1 !important;
    border-radius: 12px !important;
}

/* Hover Icon (Lup/Arrow) */
#sidebar .pkp_block li a::after,
#sidebar .block li a::after {
    content: '\f105' !important;
    /* FontAwesome Angle Right */
    font-family: 'Font Awesome 6 Free' !important;
    font-weight: 900 !important;
    position: absolute !important;
    right: -20px !important;
    top: 50% !important;
    transform: translateY(-50%) !important;
    opacity: 0 !important;
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275) !important;
    color: #3a7bd5 !important;
}

#sidebar .pkp_block li a:hover,
#sidebar .block li a:hover {
    color: #3a7bd5 !important;
    padding-left: 20px !important;
    background: rgba(255, 255, 255, 0.4) !important;
    box-shadow: 0 4px 15px rgba(58, 123, 213, 0.1) !important;
}

#sidebar .pkp_block li a:hover::before,
#sidebar .block li a:hover::before {
    left: 0 !important;
}

#sidebar .pkp_block li a:hover::after,
#sidebar .block li a:hover::after {
    right: 15px !important;
    opacity: 1 !important;
}

/* Specific styling for active links if they exist */
#sidebar .pkp_block li a.active,
#sidebar .block li a.active {
    color: #3a7bd5 !important;
    font-weight: 700 !important;
    background: rgba(58, 123, 213, 0.05) !important;
}


/* Glowing Background Accent */
#sidebar .pkp_block::after,
#sidebar .block::after {
    content: '' !important;
    position: absolute !important;
    top: -50% !important;
    right: -50% !important;
    width: 100% !important;
    height: 100% !important;
    background: radial-gradient(circle, rgba(58, 123, 213, 0.1) 0%, transparent 70%) !important;
    opacity: 0 !important;
    transition: opacity 0.5s ease !important;
    pointer-events: none !important;
}

#sidebar .pkp_block:hover::after,
#sidebar .block:hover::after {
    opacity: 1 !important;
}