/* Complete Spacing and Overlap Fix */

/* Reset body padding from other files */
body {
    margin: 0 !important;
    padding: 0 !important;
    padding-top: 0 !important; /* Remove top padding */
}

/* Main content wrapper to handle navbar offset */
body > section:first-of-type,
body > nav + section {
    margin-top: 52px !important; /* Offset for fixed navbar */
}

/* Hero section specific styling */
.hero {
    background: var(--gradient-hero);
    position: relative;
    overflow: visible !important; /* Change from hidden */
    padding: 4rem 0 3rem !important; /* Adequate padding */
    margin-top: 52px !important; /* Account for navbar */
    z-index: 1;
}

/* Hero body padding */
.hero-body {
    padding: 2rem 1.5rem !important; /* Consistent padding */
}

/* Ensure sections have proper spacing */
.section {
    padding: 4rem 0 !important; /* Consistent vertical padding */
    position: relative !important;
    z-index: 2 !important; /* Higher than hero */
    background-color: #ffffff !important; /* Solid background */
}

/* First section after hero needs special treatment */
.hero + .section {
    margin-top: 0 !important; /* No additional margin needed */
}

/* Container spacing */
.container {
    position: relative !important;
    z-index: inherit !important;
}

/* Title positioning fixes */
.publication-title {
    margin-bottom: 1.5rem !important;
}

.publication-authors {
    margin: 1.5rem 0 !important;
}

.publication-links {
    margin: 2rem 0 !important;
}

/* Fix title underline positioning */
.title.is-3 {
    margin-bottom: 2.5rem !important; /* Reduce from 3rem */
}

.title.is-3::after {
    bottom: -0.5rem !important; /* Closer to text */
}

/* Navbar stays on top */
.navbar {
    position: fixed !important;
    top: 0 !important;
    left: 0 !important;
    right: 0 !important;
    width: 100% !important;
    z-index: 10000 !important; /* Highest z-index */
    background: rgb(255, 255, 255) !important;
    background: rgba(255, 255, 255, 0.98) !important;
}

/* Progress bar above navbar */
body > div[style*="position: fixed"][style*="top: 0"][style*="height: 3px"] {
    z-index: 10001 !important;
}

/* Back to top button positioning */
button[style*="position: fixed"][style*="bottom: 20px"] {
    z-index: 9998 !important; /* Below navbar but above content */
}

/* Remove any transform on hero that might cause issues */
.hero {
    transform: none !important;
}

/* Ensure smooth scrolling doesn't cause jumps */
html {
    scroll-behavior: smooth;
    scroll-padding-top: 52px; /* Account for fixed navbar */
}

/* Mobile responsive adjustments */
@media screen and (max-width: 768px) {
    .hero {
        padding: 3rem 0 2rem !important;
    }
    
    .section {
        padding: 3rem 0 !important;
    }
    
    .hero-body {
        padding: 1.5rem !important;
    }
}

/* Debug borders - uncomment to visualize spacing */
/*
.hero { border: 3px solid red !important; }
.section { border: 3px solid blue !important; }
.navbar { border: 3px solid green !important; }
.container { border: 2px dashed orange !important; }
*/ 