/* ==========================================================================
   IJCEM - Premium Global Additions
   Must be included after any page-specific CSS; enhances every page.
   ========================================================================== */

/* ---------------- Reveal animation classes ---------------- */
.reveal {
    opacity: 0;
    transform: translateY(36px);
    filter: blur(2px);
    transition: opacity 0.9s cubic-bezier(0.22, 1, 0.36, 1), transform 0.9s cubic-bezier(0.22, 1, 0.36, 1), filter 0.9s cubic-bezier(0.22, 1, 0.36, 1);
    will-change: opacity, transform, filter;
}
.reveal.is-visible { opacity: 1; transform: translateY(0); filter: blur(0); }

.reveal-left  { transform: translateX(-48px); }
.reveal-right { transform: translateX(48px); }
.reveal-scale { transform: scale(0.9); }
.reveal.is-visible.reveal-left,
.reveal.is-visible.reveal-right,
.reveal.is-visible.reveal-scale { transform: translate(0) scale(1); }

.reveal-delay-1 { transition-delay: 0.08s; }
.reveal-delay-2 { transition-delay: 0.16s; }
.reveal-delay-3 { transition-delay: 0.24s; }
.reveal-delay-4 { transition-delay: 0.32s; }
.reveal-delay-5 { transition-delay: 0.4s; }

/* Stagger container: JS adds delays to children */
.reveal-stagger > * { opacity: 0; transform: translateY(28px); transition: opacity 0.7s cubic-bezier(0.22,1,0.36,1), transform 0.7s cubic-bezier(0.22,1,0.36,1); }
.reveal-stagger.is-visible > * { opacity: 1; transform: translateY(0); }

/* Smooth cubic easing override */
.ease-premium { transition-timing-function: cubic-bezier(0.22, 1, 0.36, 1); }

/* ---------------- Hero particles canvas ---------------- */
.hero-particles { position: relative; overflow: hidden; }
.hero-particle-canvas {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 2;
}

/* ---------------- Magnetic / tilt cursor helpers ---------------- */
.magnetic { transition: transform 0.22s cubic-bezier(0.22, 1, 0.36, 1); }
.tilt-card { transform-style: preserve-3d; transition: transform 0.35s cubic-bezier(0.22, 1, 0.36, 1); }

/* ---------------- Floating animation ---------------- */
@keyframes float {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-12px); }
}
.float-anim { animation: float 5s ease-in-out infinite; }

/* ---------------- Soft pulse on badges ---------------- */
@keyframes softPulse {
    0%, 100% { box-shadow: 0 0 0 0 rgba(168, 100, 46, 0.22); }
    50% { box-shadow: 0 0 0 8px rgba(168, 100, 46, 0); }
}
.pulse-soft { animation: softPulse 2.4s ease-in-out infinite; }

/* ---------------- Shimmer text / accent ---------------- */
@keyframes shimmer {
    0% { background-position: -200% center; }
    100% { background-position: 200% center; }
}
.shimmer-text {
    background: linear-gradient(90deg, var(--accent-color) 0%, var(--accent-hover) 45%, #f1cfa1 50%, var(--accent-hover) 55%, var(--accent-color) 100%);
    background-size: 200% auto;
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    animation: shimmer 5s linear infinite;
}

/* ---------------- Glass cards ---------------- */
.glass-card {
    background: rgba(255, 255, 255, 0.78);
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
    border: 1px solid rgba(255, 255, 255, 0.45);
    box-shadow: 0 14px 40px rgba(59, 32, 18, 0.08);
}

/* ---------------- Scroll progress ---------------- */
.scroll-progress {
    position: fixed;
    top: 0;
    left: 0;
    height: 3px;
    width: 0%;
    background: linear-gradient(90deg, var(--accent-color), var(--accent-hover));
    z-index: 9999;
    box-shadow: 0 0 14px rgba(168, 100, 46, 0.55);
}

/* ---------------- Compact premium spacing utilities ---------------- */
.compact-section { padding: 50px 0 !important; }
.compact-card { padding: 20px !important; }
.section-divider {
    height: 1px; border: 0;
    background: linear-gradient(90deg, transparent, var(--accent-border), transparent);
    margin: 30px 0;
}

/* ---------------- Back to top ---------------- */
.back-to-top {
    position: fixed;
    right: 22px;
    bottom: 22px;
    z-index: 997;
    width: 48px;
    height: 48px;
    border-radius: 50%;
    display: grid;
    place-items: center;
    border: 0;
    cursor: pointer;
    background: linear-gradient(135deg, var(--accent-color), var(--accent-hover));
    color: #fff;
    font-size: 1.1rem;
    box-shadow: 0 8px 24px rgba(168, 100, 46, 0.38);
    opacity: 0;
    visibility: hidden;
    transform: translateY(20px);
    transition: opacity 0.35s ease, visibility 0.35s ease, transform 0.35s cubic-bezier(0.22, 1, 0.36, 1), box-shadow 0.25s ease;
}
.back-to-top.visible {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}
.back-to-top:hover {
    box-shadow: 0 12px 30px rgba(168, 100, 46, 0.5);
    transform: translateY(-3px);
}
@media (max-width: 600px) {
    .back-to-top { right: 14px; bottom: 14px; width: 44px; height: 44px; }
}

/* ---------------- Floating action / page CTA ---------------- */
.floating-cta {
    position: fixed;
    right: 22px;
    bottom: 22px;
    z-index: 998;
    display: flex;
    flex-direction: column;
    gap: 10px;
    align-items: flex-end;
}
.floating-cta a {
    display: inline-flex;
    align-items: center;
    gap: 9px;
    padding: 13px 20px;
    border-radius: 999px;
    font-weight: 700;
    font-size: 0.9rem;
    color: #fff;
    background: linear-gradient(135deg, var(--accent-color), var(--accent-hover));
    box-shadow: 0 8px 24px rgba(168, 100, 46, 0.38);
    transform: translateY(0);
    transition: transform 0.3s cubic-bezier(0.22, 1, 0.36, 1), box-shadow 0.3s ease;
}
.floating-cta a:hover {
    transform: translateY(-3px);
    box-shadow: 0 12px 30px rgba(168, 100, 46, 0.5);
}
@media (max-width: 600px) {
    .floating-cta { right: 14px; bottom: 14px; }
    .floating-cta a { padding: 11px 16px; font-size: 0.82rem; }
}

/* ---------------- Section kicker ---------------- */
.section-kicker {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-size: 0.78rem;
    font-weight: 700;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: var(--accent-dark);
    margin-bottom: 10px;
}
.section-kicker::before {
    content: '';
    width: 22px;
    height: 2px;
    background: var(--accent-color);
    border-radius: 2px;
}

/* ---------------- Premium dividers ---------------- */
.divider-bronze {
    width: 60px;
    height: 4px;
    background: linear-gradient(90deg, var(--accent-color), var(--accent-hover));
    border-radius: 2px;
}

/* ---------------- Image reveal mask ---------------- */
.img-reveal {
    position: relative;
    overflow: hidden;
    border-radius: 12px;
}
.img-reveal img { transition: transform 0.8s cubic-bezier(0.22, 1, 0.36, 1); }
.img-reveal:hover img { transform: scale(1.06); }

/* ---------------- Smooth SVG decorative blobs ---------------- */
.blob {
    position: absolute;
    border-radius: 50%;
    filter: blur(80px);
    pointer-events: none;
    z-index: 0;
    opacity: 0.22;
}

/* ---------------- Global page background decoration ---------------- */
body::before {
    content: '';
    position: fixed;
    top: 0; left: 0; width: 100%; height: 100%;
    background:
        radial-gradient(ellipse at 10% 20%, rgba(168,100,46,0.04) 0%, transparent 40%),
        radial-gradient(ellipse at 90% 80%, rgba(201,133,71,0.03) 0%, transparent 40%);
    pointer-events: none;
    z-index: -1;
}

/* Page transition fade-in */
main, .dashboard-page, .login-page, .register-page, .submission-page {
    animation: pageEnter 0.5s cubic-bezier(0.22,1,0.36,1);
}
@keyframes pageEnter {
    from { opacity: 0; transform: translateY(12px); }
    to { opacity: 1; transform: translateY(0); }
}

/* ---------------- Textured background patterns ---------------- */
.texture-dots {
    background-image: radial-gradient(rgba(168,100,46,0.05) 1px, transparent 1px);
    background-size: 28px 28px;
}
.texture-grid {
    background-image:
        linear-gradient(rgba(168,100,46,0.04) 1px, transparent 1px),
        linear-gradient(90deg, rgba(168,100,46,0.04) 1px, transparent 1px);
    background-size: 40px 40px;
}
.texture-diagonal {
    background-image: repeating-linear-gradient(
        45deg,
        transparent,
        transparent 10px,
        rgba(168,100,46,0.03) 10px,
        rgba(168,100,46,0.03) 20px
    );
}
.texture-noise {
    background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noiseFilter'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.65' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noiseFilter)' opacity='0.03'/%3E%3C/svg%3E");
}

/* ---------------- Modern page header (premium) ---------------- */
.page-header-modern {
    position: relative;
    min-height: 250px;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 125px 5% 60px;
    background: linear-gradient(135deg, #1a0e07 0%, #3b2012 35%, #4d2a16 65%, #2a170d 100%);
    background-size: 300% 300%;
    animation: headerGradient 15s ease infinite;
    overflow: hidden;
}
@keyframes headerGradient {
    0%, 100% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
}
.page-header-modern::before {
    content: '';
    position: absolute;
    inset: 0;
    background:
        radial-gradient(circle at 82% 18%, rgba(201,133,71,0.22) 0%, transparent 28%),
        radial-gradient(circle at 15% 85%, rgba(168,100,46,0.14) 0%, transparent 30%),
        linear-gradient(180deg, rgba(0,0,0,0.08) 0%, rgba(0,0,0,0.18) 100%);
    pointer-events: none;
}
.page-header-modern::after {
    content: '';
    position: absolute;
    inset: 0;
    background-image:
        linear-gradient(rgba(255,255,255,0.03) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255,255,255,0.03) 1px, transparent 1px);
    background-size: 44px 44px;
    opacity: 0.35;
    pointer-events: none;
}
.page-header-modern .header-content {
    position: relative;
    z-index: 2;
    color: #fff;
    max-width: 820px;
}
.page-header-modern h1 {
    font-size: clamp(2.1rem, 5vw, 3.3rem);
    font-weight: 800;
    margin-bottom: 12px;
    letter-spacing: -0.03em;
    line-height: 1.1;
    text-shadow: 0 8px 30px rgba(0,0,0,0.25);
}
.page-header-modern .breadcrumb {
    color: rgba(255,255,255,0.88);
    font-weight: 500;
    font-size: 0.92rem;
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 8px 16px;
    border-radius: 50px;
    background: rgba(255,255,255,0.08);
    border: 1px solid rgba(201,133,71,0.22);
    backdrop-filter: blur(6px);
}
.page-header-modern .breadcrumb a { color: rgba(255,255,255,0.78); }
.page-header-modern .breadcrumb a:hover { color: var(--accent-hover); }
.page-header-modern .breadcrumb i { color: var(--accent-hover); }

/* Decorative animated SVG background inside page header */
.page-header-modern .header-blob {
    position: absolute;
    border-radius: 50%;
    filter: blur(70px);
    pointer-events: none;
    z-index: 1;
    opacity: 0.28;
    animation: headerBlobDrift 18s ease-in-out infinite alternate;
}
.page-header-modern .header-blob.one {
    width: 420px; height: 420px;
    background: radial-gradient(circle, rgba(201,133,71,0.45), transparent 70%);
    top: -120px; right: -80px;
}
.page-header-modern .header-blob.two {
    width: 320px; height: 320px;
    background: radial-gradient(circle, rgba(168,100,46,0.35), transparent 70%);
    bottom: -90px; left: -60px;
    animation-delay: -6s;
    animation-duration: 22s;
}
@keyframes headerBlobDrift {
    0% { transform: translate(0, 0) scale(1); }
    100% { transform: translate(-30px, 20px) scale(1.08); }
}

/* ---------------- Flash messages ---------------- */
.flash-message {
    padding: 14px 18px;
    border-radius: 10px;
    margin-bottom: 20px;
    font-size: 0.92rem;
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 10px;
}
.flash-message.success { background: #d4edda; color: #155724; border: 1px solid #c3e6cb; }
.flash-message.error { background: #f8d7da; color: #721c24; border: 1px solid #f5c6cb; }
.flash-message.info { background: #d1ecf1; color: #0c5460; border: 1px solid #bee5eb; }

/* ---------------- Password toggle ---------------- */
.password-field { position: relative; }
.password-field input { padding-right: 46px !important; }
.password-toggle {
    position: absolute; right: 12px; top: 50%; transform: translateY(-50%);
    background: none; border: 0; cursor: pointer; color: #9ca3af;
    font-size: 1rem; padding: 4px; transition: color 0.2s;
    z-index: 2;
}
.password-toggle:hover { color: var(--accent-color); }

/* ---------------- Premium card system ---------------- */
.premium-card {
    background: linear-gradient(160deg, #ffffff 0%, #fdfbf8 100%);
    border: 1px solid rgba(168,100,46,0.15);
    border-radius: 18px;
    padding: 28px;
    box-shadow: 0 12px 35px rgba(59,32,18,0.07), 0 0 0 1px rgba(168,100,46,0.04);
    transition: transform 0.4s cubic-bezier(0.22,1,0.36,1), box-shadow 0.4s cubic-bezier(0.22,1,0.36,1), border-color 0.3s;
    position: relative; overflow: hidden;
}
.premium-card::before {
    content: ''; position: absolute; top: 0; left: 0; right: 0; height: 3px;
    background: linear-gradient(90deg, var(--accent-color), var(--accent-hover), var(--accent-color));
    background-size: 200% auto; animation: shimmer 4s linear infinite;
}
.premium-card:hover {
    transform: translateY(-6px);
    box-shadow: 0 20px 50px rgba(59,32,18,0.12), 0 0 0 1px rgba(168,100,46,0.15);
    border-color: rgba(168,100,46,0.25);
}

/* ---------------- Additional premium animations ---------------- */
@keyframes slideInUp {
    from { opacity: 0; transform: translateY(40px); }
    to { opacity: 1; transform: translateY(0); }
}
@keyframes slideInLeft {
    from { opacity: 0; transform: translateX(-40px); }
    to { opacity: 1; transform: translateX(0); }
}
@keyframes slideInRight {
    from { opacity: 0; transform: translateX(40px); }
    to { opacity: 1; transform: translateX(0); }
}
@keyframes scaleIn {
    from { opacity: 0; transform: scale(0.85); }
    to { opacity: 1; transform: scale(1); }
}
@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}
@keyframes pulseGlow {
    0%, 100% { box-shadow: 0 0 0 0 rgba(168,100,46,0.3); }
    50% { box-shadow: 0 0 0 12px rgba(168,100,46,0); }
}
@keyframes floatY {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-8px); }
}
@keyframes rotateSlow {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}
@keyframes borderGlow {
    0%, 100% { border-color: rgba(168,100,46,0.2); }
    50% { border-color: rgba(168,100,46,0.5); }
}

.animate-slide-up { animation: slideInUp 0.7s cubic-bezier(0.22,1,0.36,1) both; }
.animate-slide-left { animation: slideInLeft 0.7s cubic-bezier(0.22,1,0.36,1) both; }
.animate-slide-right { animation: slideInRight 0.7s cubic-bezier(0.22,1,0.36,1) both; }
.animate-scale-in { animation: scaleIn 0.6s cubic-bezier(0.22,1,0.36,1) both; }
.animate-fade-in { animation: fadeIn 0.8s ease both; }
.animate-pulse-glow { animation: pulseGlow 2s ease-in-out infinite; }
.animate-float { animation: floatY 3s ease-in-out infinite; }
.animate-border-glow { animation: borderGlow 2s ease-in-out infinite; }

/* Stagger delay utilities */
.stagger-1 { animation-delay: 0.1s; }
.stagger-2 { animation-delay: 0.2s; }
.stagger-3 { animation-delay: 0.3s; }
.stagger-4 { animation-delay: 0.4s; }
.stagger-5 { animation-delay: 0.5s; }

/* Premium hover lift */
.hover-lift { transition: transform 0.35s cubic-bezier(0.22,1,0.36,1), box-shadow 0.35s ease; }
.hover-lift:hover { transform: translateY(-6px); box-shadow: 0 18px 45px rgba(59,32,18,0.12); }

/* Premium border glow on hover */
.border-glow { transition: border-color 0.3s ease, box-shadow 0.3s ease; }
.border-glow:hover { border-color: rgba(168,100,46,0.4); box-shadow: 0 0 0 3px rgba(168,100,46,0.08); }

/* Text gradient */
.text-gradient {
    background: linear-gradient(135deg, var(--accent-color), var(--accent-hover), #e5b072);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

/* Glass morphism card */
.glass-premium {
    background: rgba(255,255,255,0.75);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border: 1px solid rgba(255,255,255,0.4);
    box-shadow: 0 14px 40px rgba(59,32,18,0.08);
}

/* IJCEM reusable forms */
.ijcem-form {
    background: linear-gradient(180deg, #ffffff 0%, #fdfbf8 100%);
    border: 1px solid rgba(168,100,46,0.18);
    border-radius: 16px;
    padding: 34px;
    box-shadow: 0 16px 40px rgba(59, 32, 18, 0.08);
    position: relative;
    overflow: hidden;
}
.ijcem-form::before {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0;
    height: 4px;
    background: linear-gradient(90deg, var(--accent-color), var(--accent-hover), var(--accent-color));
}
.ijcem-form h3 { margin-top: 0; margin-bottom: 22px; color: var(--primary-color); font-size: 1.35rem; }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
.form-group { margin-bottom: 18px; }
.form-group.full-width { grid-column: 1 / -1; }
.ijcem-form label { display: block; margin-bottom: 7px; font-weight: 600; font-size: 0.88rem; color: var(--primary-color); }
.ijcem-form label .required { color: #c0392b; margin-left: 3px; }

/* Input with icon wrapper */
.input-icon {
    position: relative;
    display: flex;
    align-items: center;
}
.input-icon > i:first-child {
    position: absolute;
    left: 14px;
    color: var(--accent-color);
    font-size: 0.95rem;
    pointer-events: none;
}
.input-icon input,
.input-icon select,
.input-icon textarea {
    padding-left: 40px !important;
}
.input-icon textarea { padding-top: 12px; }

.ijcem-form input[type="text"],
.ijcem-form input[type="email"],
.ijcem-form input[type="tel"],
.ijcem-form input[type="url"],
.ijcem-form input[type="file"],
.ijcem-form select,
.ijcem-form textarea {
    width: 100%;
    padding: 12px 14px;
    border: 1px solid var(--accent-border);
    border-radius: 9px;
    font-family: inherit;
    font-size: 0.92rem;
    color: var(--text-dark);
    background: #fff;
    transition: border-color 0.2s, box-shadow 0.2s;
}
.ijcem-form input[type="file"] {
    padding: 10px;
    background: #fbf8f4;
    cursor: pointer;
}
.ijcem-form input[type="file"]::file-selector-button {
    margin-right: 12px;
    padding: 8px 14px;
    border: 0;
    border-radius: 6px;
    background: linear-gradient(135deg, var(--accent-color), var(--accent-hover));
    color: #fff;
    font-weight: 600;
    font-family: inherit;
    cursor: pointer;
    transition: box-shadow 0.2s;
}
.ijcem-form input[type="file"]::file-selector-button:hover {
    box-shadow: 0 4px 12px rgba(168, 100, 46, 0.35);
}
.ijcem-form input:focus,
.ijcem-form select:focus,
.ijcem-form textarea:focus { outline: none; border-color: var(--accent-color); box-shadow: 0 0 0 3px rgba(168, 100, 46, 0.12); }
.ijcem-form textarea { min-height: 120px; resize: vertical; }
.ijcem-form .form-note { font-size: 0.8rem; color: var(--text-muted); margin-top: 4px; }
.ijcem-form .form-hint { font-size: 0.8rem; color: var(--text-muted); margin-top: 6px; padding: 10px 12px; background: var(--accent-light); border-radius: 7px; border-left: 3px solid var(--accent-color); }
.ijcem-form .btn-row { display: flex; gap: 12px; align-items: center; flex-wrap: wrap; margin-top: 6px; }
.ijcem-form .btn-primary,
.btn-primary {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 13px 28px;
    border: 0;
    border-radius: 50px;
    background: linear-gradient(135deg, var(--accent-color), var(--accent-hover));
    color: #fff;
    font-weight: 700;
    font-size: 0.95rem;
    cursor: pointer;
    box-shadow: 0 6px 18px rgba(168, 100, 46, 0.35);
    transition: transform 0.25s, box-shadow 0.25s;
    text-decoration: none;
}
.ijcem-form .btn-primary:hover,
.btn-primary:hover { transform: translateY(-2px); box-shadow: 0 10px 25px rgba(168, 100, 46, 0.5); color: #fff; }
.ijcem-form .btn-secondary,
.btn-secondary {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 12px 24px;
    border: 1px solid var(--accent-border);
    border-radius: 50px;
    background: #fff;
    color: var(--primary-color);
    font-weight: 600;
    font-size: 0.92rem;
    cursor: pointer;
    transition: 0.2s;
    text-decoration: none;
}
.ijcem-form .btn-secondary:hover,
.btn-secondary:hover { border-color: var(--accent-color); color: var(--accent-dark); }
@media (max-width: 600px) {
    .ijcem-form { padding: 22px; }
    .form-row { grid-template-columns: 1fr; }
}

/* ---------------- Page layout (sidebar + content) ---------------- */
.page-layout {
    max-width: 1250px;
    margin: -80px auto 80px;
    display: flex;
    gap: 2.5rem;
    padding: 0 5%;
    position: relative;
    z-index: 10;
}
.page-sidebar {
    flex: 0 0 300px;
    background: #ffffff;
    border-radius: 14px;
    padding: 1.5rem 0;
    box-shadow: var(--card-shadow, 0 10px 30px rgba(59, 32, 18, 0.08));
    height: fit-content;
    position: sticky;
    top: 95px;
    border: 1px solid rgba(168, 100, 46, 0.22);
}
.page-content {
    flex: 1;
    background: #ffffff;
    border-radius: 14px;
    padding: 3rem;
    box-shadow: var(--card-shadow, 0 10px 30px rgba(59, 32, 18, 0.08));
    min-height: 600px;
    border: 1px solid rgba(168, 100, 46, 0.22);
}

/* Sidebar navigation items */
.page-sidebar .nav-item {
    display: flex;
    align-items: center;
    padding: 14px 22px;
    color: var(--text-dark, #2d1a10);
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition, all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1));
    border-left: 4px solid transparent;
    font-size: 0.92rem;
}
.page-sidebar .nav-item i {
    width: 28px;
    color: #9ca3af;
    transition: var(--transition, all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1));
    font-size: 1.05rem;
}
.page-sidebar .nav-item:hover {
    background: #fbf8f4;
    color: var(--accent-dark, #7a3e14);
}
.page-sidebar .nav-item.active {
    background: var(--accent-light, #fbf5ee);
    color: var(--primary-color, #3b2012);
    border-left-color: var(--accent-color, #a8642e);
}
.page-sidebar .nav-item.active i { color: var(--accent-color, #a8642e); }

/* Tab panels */
.tab-panel { display: none; animation: fadeIn 0.4s ease-in-out; }
.tab-panel.active { display: block; }

/* Shared tab/page titles */
h2.tab-title,
.page-content h2.tab-title {
    font-size: 2rem;
    color: var(--primary-color, #3b2012);
    margin-bottom: 1.5rem;
    border-bottom: 2px solid #ede4db;
    padding-bottom: 12px;
    font-weight: 700;
    position: relative;
}
h2.tab-title::after,
.page-content h2.tab-title::after {
    content: '';
    position: absolute;
    left: 0;
    bottom: -2px;
    width: 50px;
    height: 2px;
    background: var(--accent-color, #a8642e);
}

/* Shared body text for tabbed pages */
.page-content p {
    font-size: 1rem;
    line-height: 1.8;
    color: #4b5563;
    margin-bottom: 1.5rem;
}

/* Premium card hover helpers */
.hover-lift {
    transition: transform 0.35s cubic-bezier(0.22, 1, 0.36, 1), box-shadow 0.35s ease, border-color 0.35s ease;
}
.hover-lift:hover {
    transform: translateY(-8px);
    box-shadow: 0 20px 45px rgba(168, 100, 46, 0.16);
}
.border-glow:hover {
    border-color: var(--accent-color, #a8642e);
}

/* ---------------- Flash container ---------------- */
.flash-container {
    position: fixed;
    top: 86px;
    left: 0;
    width: 100%;
    z-index: 2000;
    padding: 0 5%;
    pointer-events: none;
}
.flash-container .flash-message {
    max-width: 920px;
    margin: 0 auto;
    pointer-events: auto;
    box-shadow: 0 12px 30px rgba(0,0,0,0.15);
    animation: flashSlide 0.35s ease;
}
@keyframes flashSlide {
    from { opacity: 0; transform: translateY(-12px); }
    to { opacity: 1; transform: translateY(0); }
}

/* ---------------- Unified page layout (tabbed interior pages) ---------------- */
.page-layout {
    max-width: 1250px;
    margin: -60px auto 60px;
    display: flex;
    gap: 2.5rem;
    padding: 0 5%;
    position: relative;
    z-index: 10;
    align-items: flex-start;
}
.page-sidebar {
    flex: 0 0 280px;
    background: rgba(255,255,255,0.98);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border-radius: 16px;
    padding: 1.25rem 0;
    box-shadow: 0 12px 35px rgba(59,32,18,0.08);
    position: sticky;
    top: 95px;
    height: fit-content;
    border: 1px solid rgba(168,100,46,0.18);
}
.page-sidebar .nav-item,
.page-sidebar .sidebar-nav-item {
    display: flex;
    align-items: center;
    padding: 14px 24px;
    color: #374151;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.25,0.8,0.25,1);
    border-left: 4px solid transparent;
    font-size: 0.92rem;
    position: relative;
}
.page-sidebar .nav-item:hover,
.page-sidebar .sidebar-nav-item:hover {
    background: var(--accent-light);
    color: var(--accent-dark);
}
.page-sidebar .nav-item.active,
.page-sidebar .sidebar-nav-item.active {
    background: var(--accent-light);
    color: var(--primary-color);
    border-left-color: var(--accent-color);
}
.page-sidebar .nav-item i,
.page-sidebar .sidebar-nav-item i {
    width: 28px;
    color: #9ca3af;
    transition: all 0.3s;
    font-size: 1rem;
}
.page-sidebar .nav-item.active i,
.page-sidebar .sidebar-nav-item.active i { color: var(--accent-color); }
.page-sidebar .sidebar-cta {
    padding: 22px 20px;
    margin: 16px 14px 4px;
    border-top: 1px solid #ede4db;
    text-align: center;
}
.page-sidebar .sidebar-cta p { font-size: 0.88rem; color: #6b7280; margin-bottom: 12px; font-weight: 500; }
.page-sidebar .btn-submit,
.page-sidebar .sidebar-cta .btn-primary {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    width: 100%;
    background: linear-gradient(135deg, var(--accent-color), var(--accent-hover));
    color: #ffffff !important;
    padding: 12px 18px;
    border-radius: 50px;
    font-weight: 700;
    font-size: 0.9rem;
    box-shadow: 0 6px 18px rgba(168,100,46,0.35);
    transition: transform 0.25s, box-shadow 0.25s;
    text-decoration: none;
}
.page-sidebar .btn-submit:hover { transform: translateY(-2px); box-shadow: 0 10px 25px rgba(168,100,46,0.5); }

.page-content {
    flex: 1;
    min-width: 0;
    background: #ffffff;
    border-radius: 16px;
    padding: 2.8rem 3rem;
    box-shadow: 0 12px 35px rgba(59,32,18,0.07);
    border: 1px solid rgba(168,100,46,0.16);
}
.page-content .tab-panel { display: none; animation: tabFade 0.4s ease-in-out; }
.page-content .tab-panel.active { display: block; }
@keyframes tabFade { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: translateY(0); } }

.page-content h2.tab-title {
    font-size: clamp(1.6rem, 3vw, 2rem);
    color: var(--primary-color);
    margin-bottom: 1.4rem;
    border-bottom: 2px solid #ede4db;
    padding-bottom: 12px;
    font-weight: 800;
    position: relative;
    letter-spacing: -0.02em;
}
.page-content h2.tab-title::after {
    content: '';
    position: absolute;
    left: 0;
    bottom: -2px;
    width: 55px;
    height: 3px;
    background: linear-gradient(90deg, var(--accent-color), var(--accent-hover));
    border-radius: 2px;
}

@media (max-width: 992px) {
    .page-layout { flex-direction: column; margin-top: -50px; gap: 1.5rem; }
    .page-sidebar {
        width: 100%;
        display: flex;
        overflow-x: auto;
        white-space: nowrap;
        padding: 8px;
        border-radius: 12px;
        position: relative;
        top: 0;
        gap: 4px;
    }
    .page-sidebar .nav-item,
    .page-sidebar .sidebar-nav-item {
        border-left: none;
        border-bottom: 3px solid transparent;
        padding: 11px 16px;
        border-radius: 8px;
        flex-shrink: 0;
    }
    .page-sidebar .nav-item.active,
    .page-sidebar .sidebar-nav-item.active {
        border-left: none;
        border-bottom-color: var(--accent-color);
    }
    .page-sidebar .sidebar-cta { display: none; }
    .page-content { padding: 1.8rem; }
}

/* ---------------- Compact premium spacing utilities ---------------- */
.compact-section { padding: 50px 0 !important; }
.compact-card { padding: 20px !important; }
.section-divider {
    height: 1px; border: 0;
    background: linear-gradient(90deg, transparent, var(--accent-border), transparent);
    margin: 30px 0;
}

/* ---------------- Back to top ---------------- */
.back-to-top {
    position: fixed;
    right: 22px;
    bottom: 86px;
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background: #fff;
    color: var(--primary-color);
    border: 1px solid var(--accent-border);
    box-shadow: 0 8px 22px rgba(59,32,18,0.12);
    display: grid;
    place-items: center;
    cursor: pointer;
    opacity: 0;
    visibility: hidden;
    transform: translateY(10px);
    transition: all 0.25s ease;
    z-index: 997;
}
.back-to-top.visible { opacity: 1; visibility: visible; transform: translateY(0); }
.back-to-top:hover { background: linear-gradient(135deg, var(--accent-color), var(--accent-hover)); color: #fff; border-color: transparent; }
@media (max-width: 600px) { .back-to-top { right: 14px; bottom: 78px; width: 40px; height: 40px; } }

/* ---------------- Responsive page layout ---------------- */
@media (max-width: 992px) {
    .page-layout { flex-direction: column; margin-top: 20px; }
    .page-sidebar { width: 100%; display: flex; overflow-x: auto; white-space: nowrap; padding: 10px; border-radius: 10px; top: auto; position: relative; flex-wrap: nowrap; }
    .page-sidebar .nav-item { border-left: none; border-bottom: 3px solid transparent; padding: 10px 18px; }
    .page-sidebar .nav-item.active { border-left: none; border-bottom-color: var(--accent-color, #a8642e); }
    .page-content { padding: 2rem; }
}

/* ---------------- Reduced motion ---------------- */
@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
        scroll-behavior: auto !important;
    }
}

/* ==========================================================================
   IJCEM Premium Enhancements v2 (visual polish + animations)
   ========================================================================== */

/* Smooth global transitions */
html { scroll-behavior: smooth; }
body { -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale; }
::selection { background: rgba(168,100,46,0.25); color: var(--primary-dark); }

/* Enhanced card hover glow (applies to common card patterns) */
.theme-card, .benefit-card, .metric-card, .feature-card, .member-card, .info-card,
.archive-card, .contact-card, .stat-card, .strip-item, .pillar-card, .timeline-card,
.submission-step, .submission-checklist, .submission-quick-links, .ijcem-form,
.current-issue-card, .issue-card, .paper-card {
    transition: transform 0.4s cubic-bezier(0.22,1,0.36,1), box-shadow 0.4s cubic-bezier(0.22,1,0.36,1), border-color 0.3s ease;
}
.theme-card:hover, .benefit-card:hover, .metric-card:hover, .feature-card:hover,
.member-card:hover, .archive-card:hover, .contact-card:hover, .stat-card:hover,
.strip-item:hover, .pillar-card:hover, .timeline-card:hover, .submission-step:hover,
.current-issue-card:hover, .issue-card:hover, .paper-card:hover {
    box-shadow: 0 18px 45px rgba(59,32,18,0.12), 0 0 0 1px rgba(168,100,46,0.12);
}

/* Subtle animated gradient border on focus-within for forms */
.ijcem-form:focus-within {
    box-shadow: 0 20px 50px rgba(59,32,18,0.1), 0 0 0 1px rgba(168,100,46,0.18);
}

/* Button polish */
.btn-primary, .nav-submit, .btn-submit, .cta-button, a.btn-primary, button.btn-primary {
    position: relative;
    overflow: hidden;
}
.btn-primary::after, .nav-submit::after {
    content: '';
    position: absolute;
    top: 0; left: -100%;
    width: 60%; height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.25), transparent);
    transform: skewX(-18deg);
    transition: left 0.6s ease;
}
.btn-primary:hover::after, .nav-submit:hover::after { left: 140%; }

/* Animated underline for tab titles / section headings */
h2.tab-title, .section-title, .tab-title {
    position: relative;
}

/* Navbar scroll enhancement hook */
header.scrolled {
    background: rgba(34, 18, 10, 0.98) !important;
    box-shadow: 0 8px 30px rgba(0,0,0,0.3) !important;
}
header.scrolled .header-inner { padding-top: 0.4rem; padding-bottom: 0.4rem; }

/* Page header decorative orbs */
.page-header-modern .orb {
    position: absolute;
    border-radius: 50%;
    filter: blur(40px);
    opacity: 0.35;
    pointer-events: none;
    animation: orbFloat 8s ease-in-out infinite;
}
.page-header-modern .orb-1 { width: 220px; height: 220px; background: #a8642e; top: -60px; right: 10%; animation-delay: 0s; }
.page-header-modern .orb-2 { width: 160px; height: 160px; background: #c98547; bottom: -40px; left: 8%; animation-delay: -3s; }
@keyframes orbFloat {
    0%, 100% { transform: translate(0, 0) scale(1); }
    33% { transform: translate(18px, -12px) scale(1.05); }
    66% { transform: translate(-12px, 14px) scale(0.96); }
}

/* Table row hover */
.issue-table tbody tr, table tbody tr { transition: background-color 0.2s ease; }
.issue-table tbody tr:hover { background: rgba(251,245,238,0.7); }

/* Input focus glow refinement */
.ijcem-form input:focus, .ijcem-form select:focus, .ijcem-form textarea:focus {
    transform: translateY(-1px);
}

/* Floating CTA refinement */
.floating-cta a { animation: ctaPulse 3s ease-in-out infinite; }
@keyframes ctaPulse {
    0%, 100% { box-shadow: 0 8px 24px rgba(168,100,46,0.38); }
    50% { box-shadow: 0 10px 32px rgba(168,100,46,0.52), 0 0 0 6px rgba(168,100,46,0.08); }
}

/* Definitive back-to-top (override duplicates) */
.back-to-top {
    position: fixed !important;
    right: 22px !important;
    bottom: 90px !important;
    width: 46px !important;
    height: 46px !important;
    border-radius: 50% !important;
    display: grid !important;
    place-items: center !important;
    border: 0 !important;
    cursor: pointer !important;
    background: linear-gradient(135deg, var(--accent-color), var(--accent-hover)) !important;
    color: #fff !important;
    font-size: 1.05rem !important;
    box-shadow: 0 10px 28px rgba(168,100,46,0.42) !important;
    opacity: 0;
    visibility: hidden;
    transform: translateY(16px) scale(0.9);
    transition: opacity 0.35s ease, visibility 0.35s ease, transform 0.35s cubic-bezier(0.22,1,0.36,1), box-shadow 0.25s ease !important;
    z-index: 997 !important;
}
.back-to-top.visible { opacity: 1 !important; visibility: visible !important; transform: translateY(0) scale(1) !important; }
.back-to-top:hover { box-shadow: 0 14px 34px rgba(168,100,46,0.55) !important; transform: translateY(-4px) scale(1.02) !important; }
@media (max-width: 600px) { .back-to-top { right: 14px !important; bottom: 82px !important; width: 42px !important; height: 42px !important; } }

/* Responsive polish */
@media (max-width: 768px) {
    .page-header-modern { min-height: 240px; padding: 130px 5% 60px; }
    .page-content { padding: 1.5rem !important; border-radius: 14px; }
    .ijcem-form { padding: 22px !important; }
}

/* Reduced motion: disable fancy animations */
@media (prefers-reduced-motion: reduce) {
    .page-header-modern { animation: none !important; background-size: 100% 100% !important; }
    .page-header-modern .orb, .floating-cta a, .btn-primary::after, .nav-submit::after { animation: none !important; }
    .reveal { filter: none !important; }
}

/* Page load polish */
@keyframes pageFadeIn { from { opacity: 0.96; } to { opacity: 1; } }
body { animation: pageFadeIn 0.35s ease; }
@media (prefers-reduced-motion: reduce) { body { animation: none; } }

/* ==========================================================================
   IJCEM Elite Compact Layout v3 — Zero-Waste Full-Width Command Bar
   Eliminates empty vertical sidebar space; uses sticky horizontal pill bar
   ========================================================================== */

.page-layout {
    max-width: 1320px !important;
    margin: -48px auto 64px !important;
    display: flex !important;
    flex-direction: column !important;
    gap: 22px !important;
    padding: 0 4% !important;
    position: relative;
    z-index: 15;
    align-items: stretch !important;
}

.page-sidebar {
    flex: none !important;
    width: 100% !important;
    background: rgba(255, 255, 255, 0.94) !important;
    backdrop-filter: blur(16px) !important;
    -webkit-backdrop-filter: blur(16px) !important;
    border-radius: 16px !important;
    padding: 10px 14px !important;
    box-shadow: 0 14px 38px rgba(34, 18, 10, 0.10), 0 0 0 1px rgba(168, 100, 46, 0.22) !important;
    position: sticky !important;
    top: 90px !important;
    z-index: 90 !important;
    display: flex !important;
    flex-direction: row !important;
    align-items: center !important;
    justify-content: flex-start !important;
    gap: 8px !important;
    overflow-x: auto !important;
    white-space: nowrap !important;
    scrollbar-width: thin;
}

.page-sidebar::-webkit-scrollbar { height: 4px; }
.page-sidebar::-webkit-scrollbar-thumb { background: rgba(168,100,46,0.3); border-radius: 4px; }

.page-sidebar .nav-item,
.page-sidebar .sidebar-nav-item {
    display: inline-flex !important;
    align-items: center !important;
    gap: 8px !important;
    padding: 10px 18px !important;
    color: #3b2012 !important;
    font-weight: 600 !important;
    font-size: 0.88rem !important;
    border-left: none !important;
    border-bottom: none !important;
    border-radius: 10px !important;
    background: transparent !important;
    transition: all 0.25s cubic-bezier(0.22, 1, 0.36, 1) !important;
    flex-shrink: 0 !important;
}

.page-sidebar .nav-item i,
.page-sidebar .sidebar-nav-item i {
    width: auto !important;
    margin-right: 0 !important;
    font-size: 0.95rem !important;
    color: var(--accent-color) !important;
    transition: color 0.25s ease !important;
}

.page-sidebar .nav-item:hover,
.page-sidebar .sidebar-nav-item:hover {
    background: var(--accent-light) !important;
    color: var(--accent-dark) !important;
    transform: translateY(-1px);
}

.page-sidebar .nav-item.active,
.page-sidebar .sidebar-nav-item.active {
    background: linear-gradient(135deg, var(--primary-dark), var(--primary-color)) !important;
    color: #ffffff !important;
    box-shadow: 0 6px 18px rgba(59, 32, 18, 0.22) !important;
}

.page-sidebar .nav-item.active i,
.page-sidebar .sidebar-nav-item.active i {
    color: var(--accent-hover) !important;
}

.page-sidebar .nav-item.active::after {
    display: none !important;
}

.page-sidebar .sidebar-cta {
    display: inline-flex !important;
    align-items: center !important;
    gap: 10px !important;
    margin: 0 0 0 auto !important;
    padding: 0 0 0 12px !important;
    border-top: none !important;
    border-left: 1px solid #ede4db !important;
    flex-shrink: 0 !important;
}

.page-sidebar .sidebar-cta p {
    display: none !important;
}

.page-sidebar .btn-submit,
.page-sidebar .sidebar-cta .btn-primary {
    padding: 9px 18px !important;
    font-size: 0.84rem !important;
    border-radius: 10px !important;
    white-space: nowrap !important;
    width: auto !important;
}

.page-content {
    width: 100% !important;
    background: #ffffff !important;
    border-radius: 20px !important;
    padding: 36px 42px !important;
    box-shadow: 0 16px 48px rgba(59, 32, 18, 0.07) !important;
    border: 1px solid rgba(168, 100, 46, 0.18) !important;
    min-height: auto !important;
}

/* Multi-column compact grids inside full-width page-content */
.theme-grid { grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)) !important; gap: 18px !important; }
.benefit-grid { grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)) !important; gap: 18px !important; }
.metric-grid { grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)) !important; gap: 18px !important; }
.member-grid { grid-template-columns: repeat(auto-fill, minmax(290px, 1fr)) !important; gap: 18px !important; }
.contact-grid { grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)) !important; gap: 20px !important; }

/* Compact date cards in a 3-column row instead of stacked full-width bars */
#cfp .date-card {
    display: inline-block;
    width: calc(33.333% - 12px);
    margin-right: 12px;
    vertical-align: top;
}
@media (max-width: 900px) {
    #cfp .date-card { width: 100%; margin-right: 0; display: block; }
}

/* Compact info-page horizontal TOC bar (ijcem-information.php) */
.info-page {
    max-width: 1320px !important;
    margin: -48px auto 64px !important;
    padding: 0 4% !important;
    position: relative;
    z-index: 15;
}
.info-layout {
    display: flex !important;
    flex-direction: column !important;
    gap: 22px !important;
}
.info-toc {
    position: sticky !important;
    top: 90px !important;
    z-index: 90 !important;
    width: 100% !important;
    padding: 10px 14px !important;
    margin-bottom: 0 !important;
    border-radius: 16px !important;
    background: rgba(255, 255, 255, 0.94) !important;
    backdrop-filter: blur(16px) !important;
    box-shadow: 0 14px 38px rgba(34, 18, 10, 0.10), 0 0 0 1px rgba(168, 100, 46, 0.22) !important;
}
.info-toc h3 { display: none !important; }
.info-toc ul {
    display: flex !important;
    flex-direction: row !important;
    align-items: center !important;
    gap: 6px !important;
    overflow-x: auto !important;
    white-space: nowrap !important;
    scrollbar-width: thin;
}
.info-toc li { margin-bottom: 0 !important; flex-shrink: 0 !important; }
.info-toc a {
    padding: 8px 14px !important;
    border-radius: 10px !important;
    font-size: 0.84rem !important;
    font-weight: 600 !important;
    transform: none !important;
}
.info-toc a.active {
    background: linear-gradient(135deg, var(--primary-dark), var(--primary-color)) !important;
    color: #fff !important;
}
.info-toc a.active i { color: var(--accent-hover) !important; }

@media (max-width: 1100px) {
    .page-sidebar, .info-toc { top: 68px !important; }
}
@media (max-width: 768px) {
    .page-layout, .info-page { margin: -36px auto 44px !important; padding: 0 4% !important; gap: 16px !important; }
    .page-sidebar, .info-toc { padding: 8px 10px !important; border-radius: 12px !important; }
    .page-sidebar .nav-item, .page-sidebar .sidebar-nav-item { padding: 8px 14px !important; font-size: 0.82rem !important; }
    .page-sidebar .sidebar-cta { display: none !important; }
    .page-content { padding: 24px 20px !important; border-radius: 16px !important; }
}
